first commit

This commit is contained in:
2026-03-10 16:18:05 +00:00
commit 11f9c069b5
31635 changed files with 3187747 additions and 0 deletions

13
node_modules/expo-font/build/ExpoFontLoader.d.ts generated vendored Normal file
View File

@@ -0,0 +1,13 @@
import { UnloadFontOptions } from './Font.types';
export type ExpoFontLoaderModule = {
getLoadedFonts: () => string[];
loadAsync: (fontFamilyName: string, localUriOrWebAsset: any) => Promise<void>;
unloadAllAsync?: () => Promise<void>;
unloadAsync?: (fontFamilyName: string, options?: UnloadFontOptions) => Promise<void>;
isLoaded?: (fontFamilyName: string, options?: UnloadFontOptions) => boolean;
getServerResources?: () => string[];
resetServerContext?: () => void;
};
declare const m: ExpoFontLoaderModule;
export default m;
//# sourceMappingURL=ExpoFontLoader.d.ts.map

1
node_modules/expo-font/build/ExpoFontLoader.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"ExpoFontLoader.d.ts","sourceRoot":"","sources":["../src/ExpoFontLoader.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEjD,MAAM,MAAM,oBAAoB,GAAG;IACjC,cAAc,EAAE,MAAM,MAAM,EAAE,CAAC;IAC/B,SAAS,EAAE,CAAC,cAAc,EAAE,MAAM,EAAE,kBAAkB,EAAE,GAAG,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAE9E,cAAc,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACrC,WAAW,CAAC,EAAE,CAAC,cAAc,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,iBAAiB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACrF,QAAQ,CAAC,EAAE,CAAC,cAAc,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,iBAAiB,KAAK,OAAO,CAAC;IAC5E,kBAAkB,CAAC,EAAE,MAAM,MAAM,EAAE,CAAC;IACpC,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;CACjC,CAAC;AAEF,QAAA,MAAM,CAAC,EAAE,oBAWkC,CAAC;AAC5C,eAAe,CAAC,CAAC"}

14
node_modules/expo-font/build/ExpoFontLoader.js generated vendored Normal file
View File

@@ -0,0 +1,14 @@
import { requireNativeModule } from 'expo-modules-core';
const m = typeof window === 'undefined'
? // React server mock
{
getLoadedFonts() {
return [];
},
loadAsync() {
return Promise.resolve();
},
}
: requireNativeModule('ExpoFontLoader');
export default m;
//# sourceMappingURL=ExpoFontLoader.js.map

1
node_modules/expo-font/build/ExpoFontLoader.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"ExpoFontLoader.js","sourceRoot":"","sources":["../src/ExpoFontLoader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAexD,MAAM,CAAC,GACL,OAAO,MAAM,KAAK,WAAW;IAC3B,CAAC,CAAC,oBAAoB;QACpB;YACE,cAAc;gBACZ,OAAO,EAAE,CAAC;YACZ,CAAC;YACD,SAAS;gBACP,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;YAC3B,CAAC;SACF;IACH,CAAC,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;AAC5C,eAAe,CAAC,CAAC","sourcesContent":["import { requireNativeModule } from 'expo-modules-core';\n\nimport { UnloadFontOptions } from './Font.types';\n\nexport type ExpoFontLoaderModule = {\n getLoadedFonts: () => string[];\n loadAsync: (fontFamilyName: string, localUriOrWebAsset: any) => Promise<void>;\n // the following methods are only available on web\n unloadAllAsync?: () => Promise<void>;\n unloadAsync?: (fontFamilyName: string, options?: UnloadFontOptions) => Promise<void>;\n isLoaded?: (fontFamilyName: string, options?: UnloadFontOptions) => boolean;\n getServerResources?: () => string[];\n resetServerContext?: () => void;\n};\n\nconst m: ExpoFontLoaderModule =\n typeof window === 'undefined'\n ? // React server mock\n {\n getLoadedFonts() {\n return [];\n },\n loadAsync() {\n return Promise.resolve();\n },\n }\n : requireNativeModule('ExpoFontLoader');\nexport default m;\n"]}

7
node_modules/expo-font/build/ExpoFontLoader.web.d.ts generated vendored Normal file
View File

@@ -0,0 +1,7 @@
import type { ExpoFontLoaderModule } from './ExpoFontLoader';
import { FontResource } from './Font.types';
declare const ExpoFontLoader: Required<ExpoFontLoaderModule>;
declare const _default: typeof ExpoFontLoader;
export default _default;
export declare function _createWebFontTemplate(fontFamily: string, resource: FontResource): string;
//# sourceMappingURL=ExpoFontLoader.web.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ExpoFontLoader.web.d.ts","sourceRoot":"","sources":["../src/ExpoFontLoader.web.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAE7D,OAAO,EAAe,YAAY,EAAE,MAAM,cAAc,CAAC;AAgFzD,QAAA,MAAM,cAAc,EAAE,QAAQ,CAAC,oBAAoB,CAsGlD,CAAC;wBAcyB,OAAO,cAAc;AAAhD,wBAAiD;AAejD,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,YAAY,GAAG,MAAM,CAIzF"}

197
node_modules/expo-font/build/ExpoFontLoader.web.js generated vendored Normal file
View File

@@ -0,0 +1,197 @@
import { CodedError, registerWebModule } from 'expo-modules-core';
import FontObserver from 'fontfaceobserver';
import { FontDisplay } from './Font.types';
function getFontFaceStyleSheet() {
if (typeof window === 'undefined') {
return null;
}
const styleSheet = getStyleElement();
return styleSheet.sheet ? styleSheet.sheet : null;
}
function getFontFaceRules() {
const sheet = getFontFaceStyleSheet();
if (sheet) {
// @ts-ignore: rule iterator
const rules = [...sheet.cssRules];
const items = [];
for (let i = 0; i < rules.length; i++) {
const rule = rules[i];
if (rule instanceof CSSFontFaceRule) {
items.push({ rule, index: i });
}
}
return items;
}
return [];
}
function getFontFaceRulesMatchingResource(fontFamilyName, options) {
const rules = getFontFaceRules();
return rules.filter(({ rule }) => {
return (rule.style.fontFamily === fontFamilyName &&
(options && options.display ? options.display === rule.style.fontDisplay : true));
});
}
const serverContext = new Set();
function getHeadElements() {
const entries = [...serverContext.entries()];
if (!entries.length) {
return [];
}
const css = entries.map(([{ css }]) => css).join('\n');
const links = entries.map(([{ resourceId }]) => resourceId);
// TODO: Maybe return nothing if no fonts were loaded.
return [
{
$$type: 'style',
children: css,
id: ID,
type: 'text/css',
},
...links.map((resourceId) => ({
$$type: 'link',
rel: 'preload',
href: resourceId,
as: 'font',
crossorigin: '',
})),
];
}
const ExpoFontLoader = {
async unloadAllAsync() {
if (typeof window === 'undefined')
return;
const element = document.getElementById(ID);
if (element && element instanceof HTMLStyleElement) {
document.removeChild(element);
}
},
async unloadAsync(fontFamilyName, options) {
const sheet = getFontFaceStyleSheet();
if (!sheet)
return;
const items = getFontFaceRulesMatchingResource(fontFamilyName, options);
for (const item of items) {
sheet.deleteRule(item.index);
}
},
getServerResources() {
const elements = getHeadElements();
return elements
.map((element) => {
switch (element.$$type) {
case 'style':
return `<style id="${element.id}">${element.children}</style>`;
case 'link':
return `<link rel="${element.rel}" href="${element.href}" as="${element.as}" crossorigin="${element.crossorigin}" />`;
default:
return '';
}
})
.filter(Boolean);
},
resetServerContext() {
serverContext.clear();
},
getLoadedFonts() {
if (typeof window === 'undefined') {
return [...serverContext.values()].map(({ name }) => name);
}
const rules = getFontFaceRules();
return rules.map(({ rule }) => rule.style.fontFamily);
},
isLoaded(fontFamilyName, resource = {}) {
if (typeof window === 'undefined') {
return !![...serverContext.values()].find((asset) => {
return asset.name === fontFamilyName;
});
}
return getFontFaceRulesMatchingResource(fontFamilyName, resource)?.length > 0;
},
// NOTE(vonovak): This is used in RN vector-icons to load fonts dynamically on web. Changing the signature is breaking.
// NOTE(EvanBacon): No async keyword! This cannot return a promise in Node environments.
loadAsync(fontFamilyName, resource) {
if (__DEV__ && typeof resource !== 'object') {
// to help devving on web, where loadAsync interface is different from native
throw new CodedError('ERR_FONT_SOURCE', `Expected font resource of type \`object\` instead got: ${typeof resource}`);
}
if (typeof window === 'undefined') {
serverContext.add({
name: fontFamilyName,
css: _createWebFontTemplate(fontFamilyName, resource),
// @ts-expect-error: typeof string
resourceId: resource.uri,
});
return Promise.resolve();
}
const canInjectStyle = document.head && typeof document.head.appendChild === 'function';
if (!canInjectStyle) {
throw new CodedError('ERR_WEB_ENVIRONMENT', `The browser's \`document.head\` element doesn't support injecting fonts.`);
}
const style = getStyleElement();
document.head.appendChild(style);
const res = getFontFaceRulesMatchingResource(fontFamilyName, resource);
if (!res.length) {
_createWebStyle(fontFamilyName, resource);
}
if (!isFontLoadingListenerSupported()) {
return Promise.resolve();
}
return new FontObserver(fontFamilyName, {
// @ts-expect-error: TODO(@kitten): Typings indicate that the polyfill may not support this?
display: resource.display,
}).load(resource.testString ?? null, 12000);
},
};
const isServer = process.env.EXPO_OS === 'web' && typeof window === 'undefined';
function createExpoFontLoader() {
return ExpoFontLoader;
}
const toExport = isServer
? ExpoFontLoader
: // @ts-expect-error: registerWebModule calls `new` on the module implementation.
// Normally that'd be a class but that doesn't work on server, so we use a function instead.
// TS doesn't like that but we don't need it to be a class.
registerWebModule(createExpoFontLoader, 'ExpoFontLoader');
export default toExport;
const ID = 'expo-generated-fonts';
function getStyleElement() {
const element = document.getElementById(ID);
if (element && element instanceof HTMLStyleElement) {
return element;
}
const styleElement = document.createElement('style');
styleElement.id = ID;
return styleElement;
}
export function _createWebFontTemplate(fontFamily, resource) {
return `@font-face{font-family:"${fontFamily}";src:url("${resource.uri}");font-display:${resource.display || FontDisplay.AUTO}}`;
}
function _createWebStyle(fontFamily, resource) {
const fontStyle = _createWebFontTemplate(fontFamily, resource);
const styleElement = getStyleElement();
// @ts-ignore: TypeScript does not define HTMLStyleElement::styleSheet. This is just for IE and
// possibly can be removed if it's unnecessary on IE 11.
if (styleElement.styleSheet) {
const styleElementIE = styleElement;
styleElementIE.styleSheet.cssText = styleElementIE.styleSheet.cssText
? styleElementIE.styleSheet.cssText + fontStyle
: fontStyle;
}
else {
const textNode = document.createTextNode(fontStyle);
styleElement.appendChild(textNode);
}
return styleElement;
}
function isFontLoadingListenerSupported() {
const { userAgent } = window.navigator;
// WebKit is broken https://github.com/bramstein/fontfaceobserver/issues/95
const isIOS = !!userAgent.match(/iPad|iPhone/i);
const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
// Edge is broken https://github.com/bramstein/fontfaceobserver/issues/109#issuecomment-333356795
const isEdge = userAgent.includes('Edge');
// Internet Explorer
const isIE = userAgent.includes('Trident');
return !isSafari && !isIOS && !isEdge && !isIE;
}
//# sourceMappingURL=ExpoFontLoader.web.js.map

File diff suppressed because one or more lines are too long

3
node_modules/expo-font/build/ExpoFontUtils.d.ts generated vendored Normal file
View File

@@ -0,0 +1,3 @@
declare const _default: any;
export default _default;
//# sourceMappingURL=ExpoFontUtils.d.ts.map

1
node_modules/expo-font/build/ExpoFontUtils.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"ExpoFontUtils.d.ts","sourceRoot":"","sources":["../src/ExpoFontUtils.ts"],"names":[],"mappings":";AAEA,wBAA4D"}

3
node_modules/expo-font/build/ExpoFontUtils.js generated vendored Normal file
View File

@@ -0,0 +1,3 @@
import { requireOptionalNativeModule } from 'expo-modules-core';
export default requireOptionalNativeModule('ExpoFontUtils');
//# sourceMappingURL=ExpoFontUtils.js.map

1
node_modules/expo-font/build/ExpoFontUtils.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"ExpoFontUtils.js","sourceRoot":"","sources":["../src/ExpoFontUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAEhE,eAAe,2BAA2B,CAAC,eAAe,CAAC,CAAC","sourcesContent":["import { requireOptionalNativeModule } from 'expo-modules-core';\n\nexport default requireOptionalNativeModule('ExpoFontUtils');\n"]}

8
node_modules/expo-font/build/ExpoFontUtils.web.d.ts generated vendored Normal file
View File

@@ -0,0 +1,8 @@
import { NativeModule } from 'expo-modules-core';
import { RenderToImageOptions } from './FontUtils.types';
declare class ExpoFontUtils extends NativeModule {
renderToImageAsync(glyphs: string, options?: RenderToImageOptions): Promise<string>;
}
declare const _default: typeof ExpoFontUtils;
export default _default;
//# sourceMappingURL=ExpoFontUtils.web.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ExpoFontUtils.web.d.ts","sourceRoot":"","sources":["../src/ExpoFontUtils.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAA0C,MAAM,mBAAmB,CAAC;AAEzF,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAEzD,cAAM,aAAc,SAAQ,YAAY;IAChC,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,MAAM,CAAC;CAG1F;;AAED,wBAAiE"}

8
node_modules/expo-font/build/ExpoFontUtils.web.js generated vendored Normal file
View File

@@ -0,0 +1,8 @@
import { NativeModule, registerWebModule, UnavailabilityError } from 'expo-modules-core';
class ExpoFontUtils extends NativeModule {
async renderToImageAsync(glyphs, options) {
throw new UnavailabilityError('expo-font', 'renderToImageAsync');
}
}
export default registerWebModule(ExpoFontUtils, 'ExpoFontUtils');
//# sourceMappingURL=ExpoFontUtils.web.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ExpoFontUtils.web.js","sourceRoot":"","sources":["../src/ExpoFontUtils.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAIzF,MAAM,aAAc,SAAQ,YAAY;IACtC,KAAK,CAAC,kBAAkB,CAAC,MAAc,EAAE,OAA8B;QACrE,MAAM,IAAI,mBAAmB,CAAC,WAAW,EAAE,oBAAoB,CAAC,CAAC;IACnE,CAAC;CACF;AAED,eAAe,iBAAiB,CAAC,aAAa,EAAE,eAAe,CAAC,CAAC","sourcesContent":["import { NativeModule, registerWebModule, UnavailabilityError } from 'expo-modules-core';\n\nimport { RenderToImageOptions } from './FontUtils.types';\n\nclass ExpoFontUtils extends NativeModule {\n async renderToImageAsync(glyphs: string, options?: RenderToImageOptions): Promise<string> {\n throw new UnavailabilityError('expo-font', 'renderToImageAsync');\n }\n}\n\nexport default registerWebModule(ExpoFontUtils, 'ExpoFontUtils');\n"]}

54
node_modules/expo-font/build/Font.d.ts generated vendored Normal file
View File

@@ -0,0 +1,54 @@
import { FontDisplay, FontSource, FontResource, UnloadFontOptions } from './Font.types';
/**
* Synchronously detect if the font for `fontFamily` has finished loading.
*
* @param fontFamily The name used to load the `FontResource`.
* @return Returns `true` if the font has fully loaded.
*/
export declare function isLoaded(fontFamily: string): boolean;
/**
* Synchronously get all the fonts that have been loaded.
* This includes fonts that were bundled at build time using the config plugin, as well as those loaded at runtime using `loadAsync`.
*
* @returns Returns array of strings which you can use as `fontFamily` [style prop](https://reactnative.dev/docs/text#style).
*/
export declare function getLoadedFonts(): string[];
/**
* Synchronously detect if the font for `fontFamily` is still being loaded.
*
* @param fontFamily The name used to load the `FontResource`.
* @returns Returns `true` if the font is still loading.
*/
export declare function isLoading(fontFamily: string): boolean;
/**
* An efficient method for loading fonts from static or remote resources which can then be used
* with the platform's native text elements. In the browser, this generates a `@font-face` block in
* a shared style sheet for fonts. No CSS is needed to use this method.
*
* > **Note**: We recommend using the [config plugin](#configuration-in-app-config) instead whenever possible.
*
* @param fontFamilyOrFontMap String or map of values that can be used as the `fontFamily` [style prop](https://reactnative.dev/docs/text#style)
* with React Native `Text` elements.
* @param source The font asset that should be loaded into the `fontFamily` namespace.
*
* @return Returns a promise that fulfils when the font has loaded. Often you may want to wrap the
* method in a `try/catch/finally` to ensure the app continues if the font fails to load.
*/
export declare function loadAsync(fontFamilyOrFontMap: string | Record<string, FontSource>, source?: FontSource): Promise<void>;
/**
* Unloads all the custom fonts. This is used for testing.
* @hidden
*/
export declare function unloadAllAsync(): Promise<void>;
/**
* Unload custom fonts matching the `fontFamily`s and display values provided.
* This is used for testing.
*
* @param fontFamilyOrFontMap The name or names of the custom fonts that will be unloaded.
* @param options When `fontFamilyOrFontMap` is a string, this should be the font source used to load
* the custom font originally.
* @hidden
*/
export declare function unloadAsync(fontFamilyOrFontMap: string | Record<string, UnloadFontOptions>, options?: UnloadFontOptions): Promise<void>;
export { FontDisplay, FontSource, FontResource, UnloadFontOptions };
//# sourceMappingURL=Font.d.ts.map

1
node_modules/expo-font/build/Font.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"Font.d.ts","sourceRoot":"","sources":["../src/Font.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAaxF;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAUpD;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,IAAI,MAAM,EAAE,CAEzC;AAGD;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAErD;AAGD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,SAAS,CACvB,mBAAmB,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,EACxD,MAAM,CAAC,EAAE,UAAU,GAClB,OAAO,CAAC,IAAI,CAAC,CAkCf;AA0CD;;;GAGG;AACH,wBAAsB,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,CAapD;AAGD;;;;;;;;GAQG;AACH,wBAAsB,WAAW,CAC/B,mBAAmB,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,EAC/D,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC,IAAI,CAAC,CAkBf;AA0BD,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,YAAY,EAAE,iBAAiB,EAAE,CAAC"}

168
node_modules/expo-font/build/Font.js generated vendored Normal file
View File

@@ -0,0 +1,168 @@
import { CodedError, Platform, UnavailabilityError } from 'expo-modules-core';
import ExpoFontLoader from './ExpoFontLoader';
import { FontDisplay } from './Font.types';
import { getAssetForSource, loadSingleFontAsync } from './FontLoader';
import { isLoadedInCache, isLoadedNative, loadPromises, markLoaded, purgeCache, purgeFontFamilyFromCache, } from './memory';
import { registerStaticFont } from './server';
// @needsAudit
/**
* Synchronously detect if the font for `fontFamily` has finished loading.
*
* @param fontFamily The name used to load the `FontResource`.
* @return Returns `true` if the font has fully loaded.
*/
export function isLoaded(fontFamily) {
if (Platform.OS === 'web') {
if (typeof ExpoFontLoader.isLoaded !== 'function') {
throw new Error(`expected ExpoFontLoader.isLoaded to be a function, was ${typeof ExpoFontLoader.isLoaded}`);
}
return isLoadedInCache(fontFamily) || ExpoFontLoader.isLoaded(fontFamily);
}
return isLoadedNative(fontFamily);
}
/**
* Synchronously get all the fonts that have been loaded.
* This includes fonts that were bundled at build time using the config plugin, as well as those loaded at runtime using `loadAsync`.
*
* @returns Returns array of strings which you can use as `fontFamily` [style prop](https://reactnative.dev/docs/text#style).
*/
export function getLoadedFonts() {
return ExpoFontLoader.getLoadedFonts();
}
// @needsAudit
/**
* Synchronously detect if the font for `fontFamily` is still being loaded.
*
* @param fontFamily The name used to load the `FontResource`.
* @returns Returns `true` if the font is still loading.
*/
export function isLoading(fontFamily) {
return fontFamily in loadPromises;
}
// @needsAudit
/**
* An efficient method for loading fonts from static or remote resources which can then be used
* with the platform's native text elements. In the browser, this generates a `@font-face` block in
* a shared style sheet for fonts. No CSS is needed to use this method.
*
* > **Note**: We recommend using the [config plugin](#configuration-in-app-config) instead whenever possible.
*
* @param fontFamilyOrFontMap String or map of values that can be used as the `fontFamily` [style prop](https://reactnative.dev/docs/text#style)
* with React Native `Text` elements.
* @param source The font asset that should be loaded into the `fontFamily` namespace.
*
* @return Returns a promise that fulfils when the font has loaded. Often you may want to wrap the
* method in a `try/catch/finally` to ensure the app continues if the font fails to load.
*/
export function loadAsync(fontFamilyOrFontMap, source) {
// NOTE(EvanBacon): Static render pass on web must be synchronous to collect all fonts.
// Because of this, `loadAsync` doesn't use the `async` keyword and deviates from the
// standard Expo SDK style guide.
const isServer = Platform.OS === 'web' && typeof window === 'undefined';
if (typeof fontFamilyOrFontMap === 'object') {
if (source) {
return Promise.reject(new CodedError(`ERR_FONT_API`, `No fontFamily can be used for the provided source: ${source}. The second argument of \`loadAsync()\` can only be used with a \`string\` value as the first argument.`));
}
const fontMap = fontFamilyOrFontMap;
const names = Object.keys(fontMap);
if (isServer) {
names.map((name) => registerStaticFont(name, fontMap[name]));
return Promise.resolve();
}
return Promise.all(names.map((name) => loadFontInNamespaceAsync(name, fontMap[name]))).then(() => { });
}
if (isServer) {
registerStaticFont(fontFamilyOrFontMap, source);
return Promise.resolve();
}
return loadFontInNamespaceAsync(fontFamilyOrFontMap, source);
}
async function loadFontInNamespaceAsync(fontFamily, source) {
if (!source) {
throw new CodedError(`ERR_FONT_SOURCE`, `Cannot load null or undefined font source: { "${fontFamily}": ${source} }. Expected asset of type \`FontSource\` for fontFamily of name: "${fontFamily}"`);
}
// we consult the native module to see if the font is already loaded
// this is slower than checking the cache but can help avoid loading the same font n times
if (isLoaded(fontFamily)) {
return;
}
if (loadPromises.hasOwnProperty(fontFamily)) {
return loadPromises[fontFamily];
}
// Important: we want all callers that concurrently try to load the same font to await the same
// promise. If we're here, we haven't created the promise yet. To ensure we create only one
// promise in the program, we need to create the promise synchronously without yielding the event
// loop from this point.
const asset = getAssetForSource(source);
loadPromises[fontFamily] = (async () => {
try {
await loadSingleFontAsync(fontFamily, asset);
markLoaded(fontFamily);
}
finally {
delete loadPromises[fontFamily];
}
})();
await loadPromises[fontFamily];
}
// @needsAudit
/**
* Unloads all the custom fonts. This is used for testing.
* @hidden
*/
export async function unloadAllAsync() {
if (!ExpoFontLoader.unloadAllAsync) {
throw new UnavailabilityError('expo-font', 'unloadAllAsync');
}
if (Object.keys(loadPromises).length) {
throw new CodedError(`ERR_UNLOAD`, `Cannot unload fonts while they're still loading: ${Object.keys(loadPromises).join(', ')}`);
}
purgeCache();
await ExpoFontLoader.unloadAllAsync();
}
// @needsAudit
/**
* Unload custom fonts matching the `fontFamily`s and display values provided.
* This is used for testing.
*
* @param fontFamilyOrFontMap The name or names of the custom fonts that will be unloaded.
* @param options When `fontFamilyOrFontMap` is a string, this should be the font source used to load
* the custom font originally.
* @hidden
*/
export async function unloadAsync(fontFamilyOrFontMap, options) {
if (!ExpoFontLoader.unloadAsync) {
throw new UnavailabilityError('expo-font', 'unloadAsync');
}
if (typeof fontFamilyOrFontMap === 'object') {
if (options) {
throw new CodedError(`ERR_FONT_API`, `No fontFamily can be used for the provided options: ${options}. The second argument of \`unloadAsync()\` can only be used with a \`string\` value as the first argument.`);
}
const fontMap = fontFamilyOrFontMap;
const names = Object.keys(fontMap);
await Promise.all(names.map((name) => unloadFontInNamespaceAsync(name, fontMap[name])));
return;
}
return await unloadFontInNamespaceAsync(fontFamilyOrFontMap, options);
}
async function unloadFontInNamespaceAsync(fontFamily, options) {
if (!isLoaded(fontFamily)) {
return;
}
else {
purgeFontFamilyFromCache(fontFamily);
}
// Important: we want all callers that concurrently try to load the same font to await the same
// promise. If we're here, we haven't created the promise yet. To ensure we create only one
// promise in the program, we need to create the promise synchronously without yielding the event
// loop from this point.
if (!fontFamily) {
throw new CodedError(`ERR_FONT_FAMILY`, `Cannot unload an empty name`);
}
if (!ExpoFontLoader.unloadAsync) {
throw new UnavailabilityError('expo-font', 'unloadAsync');
}
await ExpoFontLoader.unloadAsync(fontFamily, options);
}
export { FontDisplay };
//# sourceMappingURL=Font.js.map

1
node_modules/expo-font/build/Font.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

72
node_modules/expo-font/build/Font.types.d.ts generated vendored Normal file
View File

@@ -0,0 +1,72 @@
import { Asset } from 'expo-asset';
/**
* The different types of assets you can provide to the [`loadAsync()`](#loadasyncfontfamilyorfontmap-source) function.
* A font source can be a URI, a module ID, or an Expo Asset.
*/
export type FontSource = string | number | Asset | FontResource;
/**
* An object used to dictate the resource that is loaded into the provided font namespace when used
* with [`loadAsync`](#loadasyncfontfamilyorfontmap-source).
*/
export type FontResource = {
uri?: string | number;
/**
* Sets the [`font-display`](#fontdisplay) property for a given typeface in the browser.
* @platform web
*/
display?: FontDisplay;
default?: string;
/**
* Sets a custom test string passed to the [FontFace Observer](https://www.npmjs.com/package/fontfaceobserver).
* @platform web
*/
testString?: string;
};
/**
* Sets the [font-display](https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display)
* for a given typeface. The default font value on web is `FontDisplay.AUTO`.
* Even though setting the `fontDisplay` does nothing on native platforms, the default behavior
* emulates `FontDisplay.SWAP` on flagship devices like iOS, Samsung, Pixel, etc. Default
* functionality varies on One Plus devices. In the browser this value is set in the generated
* `@font-face` CSS block and not as a style property meaning you cannot dynamically change this
* value based on the element it's used in.
* @platform web
*/
export declare enum FontDisplay {
/**
* __(Default)__ The font display strategy is defined by the user agent or platform.
* This generally defaults to the text being invisible until the font is loaded.
* Good for buttons or banners that require a specific treatment.
*/
AUTO = "auto",
/**
* Fallback text is rendered immediately with a default font while the desired font is loaded.
* This is good for making the content appear to load instantly and is usually preferred.
*/
SWAP = "swap",
/**
* The text will be invisible until the font has loaded. If the font fails to load then nothing
* will appear - it's best to turn this off when debugging missing text.
*/
BLOCK = "block",
/**
* Splits the behavior between `SWAP` and `BLOCK`.
* There will be a [100ms timeout](https://developers.google.com/web/updates/2016/02/font-display?hl=en)
* where the text with a custom font is invisible, after that the text will either swap to the
* styled text or it'll show the unstyled text and continue to load the custom font. This is good
* for buttons that need a custom font but should also be quickly available to screen-readers.
*/
FALLBACK = "fallback",
/**
* This works almost identically to `FALLBACK`, the only difference is that the browser will
* decide to load the font based on slow connection speed or critical resource demand.
*/
OPTIONAL = "optional"
}
/**
* Object used to query fonts for unloading.
* @hidden
*/
export type UnloadFontOptions = Pick<FontResource, 'display'>;
export type UseFontHook = (map: string | Record<string, FontSource>) => [boolean, Error | null];
//# sourceMappingURL=Font.types.d.ts.map

1
node_modules/expo-font/build/Font.types.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"Font.types.d.ts","sourceRoot":"","sources":["../src/Font.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAGnC;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,YAAY,CAAC;AAGhE;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB;;;OAGG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAGF;;;;;;;;;GASG;AACH,oBAAY,WAAW;IACrB;;;;OAIG;IACH,IAAI,SAAS;IACb;;;OAGG;IACH,IAAI,SAAS;IACb;;;OAGG;IACH,KAAK,UAAU;IACf;;;;;;OAMG;IACH,QAAQ,aAAa;IACrB;;;OAGG;IACH,QAAQ,aAAa;CACtB;AAGD;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC;AAE9D,MAAM,MAAM,WAAW,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,GAAG,IAAI,CAAC,CAAC"}

44
node_modules/expo-font/build/Font.types.js generated vendored Normal file
View File

@@ -0,0 +1,44 @@
// @needsAudit
/**
* Sets the [font-display](https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display)
* for a given typeface. The default font value on web is `FontDisplay.AUTO`.
* Even though setting the `fontDisplay` does nothing on native platforms, the default behavior
* emulates `FontDisplay.SWAP` on flagship devices like iOS, Samsung, Pixel, etc. Default
* functionality varies on One Plus devices. In the browser this value is set in the generated
* `@font-face` CSS block and not as a style property meaning you cannot dynamically change this
* value based on the element it's used in.
* @platform web
*/
export var FontDisplay;
(function (FontDisplay) {
/**
* __(Default)__ The font display strategy is defined by the user agent or platform.
* This generally defaults to the text being invisible until the font is loaded.
* Good for buttons or banners that require a specific treatment.
*/
FontDisplay["AUTO"] = "auto";
/**
* Fallback text is rendered immediately with a default font while the desired font is loaded.
* This is good for making the content appear to load instantly and is usually preferred.
*/
FontDisplay["SWAP"] = "swap";
/**
* The text will be invisible until the font has loaded. If the font fails to load then nothing
* will appear - it's best to turn this off when debugging missing text.
*/
FontDisplay["BLOCK"] = "block";
/**
* Splits the behavior between `SWAP` and `BLOCK`.
* There will be a [100ms timeout](https://developers.google.com/web/updates/2016/02/font-display?hl=en)
* where the text with a custom font is invisible, after that the text will either swap to the
* styled text or it'll show the unstyled text and continue to load the custom font. This is good
* for buttons that need a custom font but should also be quickly available to screen-readers.
*/
FontDisplay["FALLBACK"] = "fallback";
/**
* This works almost identically to `FALLBACK`, the only difference is that the browser will
* decide to load the font based on slow connection speed or critical resource demand.
*/
FontDisplay["OPTIONAL"] = "optional";
})(FontDisplay || (FontDisplay = {}));
//# sourceMappingURL=Font.types.js.map

1
node_modules/expo-font/build/Font.types.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"Font.types.js","sourceRoot":"","sources":["../src/Font.types.ts"],"names":[],"mappings":"AA6BA,cAAc;AACd;;;;;;;;;GASG;AACH,MAAM,CAAN,IAAY,WA8BX;AA9BD,WAAY,WAAW;IACrB;;;;OAIG;IACH,4BAAa,CAAA;IACb;;;OAGG;IACH,4BAAa,CAAA;IACb;;;OAGG;IACH,8BAAe,CAAA;IACf;;;;;;OAMG;IACH,oCAAqB,CAAA;IACrB;;;OAGG;IACH,oCAAqB,CAAA;AACvB,CAAC,EA9BW,WAAW,KAAX,WAAW,QA8BtB","sourcesContent":["import { Asset } from 'expo-asset';\n\n// @needsAudit\n/**\n * The different types of assets you can provide to the [`loadAsync()`](#loadasyncfontfamilyorfontmap-source) function.\n * A font source can be a URI, a module ID, or an Expo Asset.\n */\nexport type FontSource = string | number | Asset | FontResource;\n\n// @needsAudit\n/**\n * An object used to dictate the resource that is loaded into the provided font namespace when used\n * with [`loadAsync`](#loadasyncfontfamilyorfontmap-source).\n */\nexport type FontResource = {\n uri?: string | number;\n /**\n * Sets the [`font-display`](#fontdisplay) property for a given typeface in the browser.\n * @platform web\n */\n display?: FontDisplay;\n default?: string;\n /**\n * Sets a custom test string passed to the [FontFace Observer](https://www.npmjs.com/package/fontfaceobserver).\n * @platform web\n */\n testString?: string;\n};\n\n// @needsAudit\n/**\n * Sets the [font-display](https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display)\n * for a given typeface. The default font value on web is `FontDisplay.AUTO`.\n * Even though setting the `fontDisplay` does nothing on native platforms, the default behavior\n * emulates `FontDisplay.SWAP` on flagship devices like iOS, Samsung, Pixel, etc. Default\n * functionality varies on One Plus devices. In the browser this value is set in the generated\n * `@font-face` CSS block and not as a style property meaning you cannot dynamically change this\n * value based on the element it's used in.\n * @platform web\n */\nexport enum FontDisplay {\n /**\n * __(Default)__ The font display strategy is defined by the user agent or platform.\n * This generally defaults to the text being invisible until the font is loaded.\n * Good for buttons or banners that require a specific treatment.\n */\n AUTO = 'auto',\n /**\n * Fallback text is rendered immediately with a default font while the desired font is loaded.\n * This is good for making the content appear to load instantly and is usually preferred.\n */\n SWAP = 'swap',\n /**\n * The text will be invisible until the font has loaded. If the font fails to load then nothing\n * will appear - it's best to turn this off when debugging missing text.\n */\n BLOCK = 'block',\n /**\n * Splits the behavior between `SWAP` and `BLOCK`.\n * There will be a [100ms timeout](https://developers.google.com/web/updates/2016/02/font-display?hl=en)\n * where the text with a custom font is invisible, after that the text will either swap to the\n * styled text or it'll show the unstyled text and continue to load the custom font. This is good\n * for buttons that need a custom font but should also be quickly available to screen-readers.\n */\n FALLBACK = 'fallback',\n /**\n * This works almost identically to `FALLBACK`, the only difference is that the browser will\n * decide to load the font based on slow connection speed or critical resource demand.\n */\n OPTIONAL = 'optional',\n}\n\n// @needsAudit\n/**\n * Object used to query fonts for unloading.\n * @hidden\n */\nexport type UnloadFontOptions = Pick<FontResource, 'display'>;\n\nexport type UseFontHook = (map: string | Record<string, FontSource>) => [boolean, Error | null];\n"]}

24
node_modules/expo-font/build/FontHooks.d.ts generated vendored Normal file
View File

@@ -0,0 +1,24 @@
import { UseFontHook } from './Font.types';
/**
* Load a map of fonts at runtime with [`loadAsync`](#loadasyncfontfamilyorfontmap-source). This returns `true` if the fonts are
* loaded and ready to use. It also returns an error if something went wrong, to use in development.
*
* > Note, the fonts are not "reloaded" when you dynamically change the font map.
*
* @param map A map of `fontFamily`s to [`FontSource`](#fontsource)s. After loading the font you can
* use the key in the `fontFamily` style prop of a `Text` element.
*
* @return
* - __loaded__ (`boolean`) - A boolean to detect if the font for `fontFamily` has finished
* loading.
* - __error__ (`Error | null`) - An error encountered when loading the fonts.
*
* @example
* ```tsx
* const [loaded, error] = useFonts({
* 'Inter-Black': require('./assets/fonts/Inter-Black.otf'),
* });
* ```
*/
export declare const useFonts: UseFontHook;
//# sourceMappingURL=FontHooks.d.ts.map

1
node_modules/expo-font/build/FontHooks.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"FontHooks.d.ts","sourceRoot":"","sources":["../src/FontHooks.ts"],"names":[],"mappings":"AAGA,OAAO,EAAc,WAAW,EAAE,MAAM,cAAc,CAAC;AA+CvD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,QAAQ,EAAE,WAC2C,CAAC"}

63
node_modules/expo-font/build/FontHooks.js generated vendored Normal file
View File

@@ -0,0 +1,63 @@
import { useEffect, useState } from 'react';
import { loadAsync, isLoaded } from './Font';
function isMapLoaded(map) {
if (typeof map === 'string') {
return isLoaded(map);
}
else {
return Object.keys(map).every((fontFamily) => isLoaded(fontFamily));
}
}
function useRuntimeFonts(map) {
const [loaded, setLoaded] = useState(
// For web rehydration, we need to check if the fonts are already loaded during the static render.
// Native will also benefit from this optimization.
isMapLoaded(map));
const [error, setError] = useState(null);
useEffect(() => {
let isMounted = true;
loadAsync(map)
.then(() => {
if (isMounted) {
setLoaded(true);
}
})
.catch((error) => {
if (isMounted) {
setError(error);
}
});
return () => {
isMounted = false;
};
}, []);
return [loaded, error];
}
function useStaticFonts(map) {
loadAsync(map);
return [true, null];
}
// @needsAudit
/**
* Load a map of fonts at runtime with [`loadAsync`](#loadasyncfontfamilyorfontmap-source). This returns `true` if the fonts are
* loaded and ready to use. It also returns an error if something went wrong, to use in development.
*
* > Note, the fonts are not "reloaded" when you dynamically change the font map.
*
* @param map A map of `fontFamily`s to [`FontSource`](#fontsource)s. After loading the font you can
* use the key in the `fontFamily` style prop of a `Text` element.
*
* @return
* - __loaded__ (`boolean`) - A boolean to detect if the font for `fontFamily` has finished
* loading.
* - __error__ (`Error | null`) - An error encountered when loading the fonts.
*
* @example
* ```tsx
* const [loaded, error] = useFonts({
* 'Inter-Black': require('./assets/fonts/Inter-Black.otf'),
* });
* ```
*/
export const useFonts = typeof window === 'undefined' ? useStaticFonts : useRuntimeFonts;
//# sourceMappingURL=FontHooks.js.map

1
node_modules/expo-font/build/FontHooks.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"FontHooks.js","sourceRoot":"","sources":["../src/FontHooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAG7C,SAAS,WAAW,CAAC,GAAwC;IAC3D,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;QAC5B,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC;IACvB,CAAC;SAAM,CAAC;QACN,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC;IACtE,CAAC;AACH,CAAC;AAED,SAAS,eAAe,CAAC,GAAwC;IAC/D,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ;IAClC,kGAAkG;IAClG,mDAAmD;IACnD,WAAW,CAAC,GAAG,CAAC,CACjB,CAAC;IACF,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAe,IAAI,CAAC,CAAC;IAEvD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,SAAS,GAAG,IAAI,CAAC;QAErB,SAAS,CAAC,GAAG,CAAC;aACX,IAAI,CAAC,GAAG,EAAE;YACT,IAAI,SAAS,EAAE,CAAC;gBACd,SAAS,CAAC,IAAI,CAAC,CAAC;YAClB,CAAC;QACH,CAAC,CAAC;aACD,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;YACf,IAAI,SAAS,EAAE,CAAC;gBACd,QAAQ,CAAC,KAAK,CAAC,CAAC;YAClB,CAAC;QACH,CAAC,CAAC,CAAC;QAEL,OAAO,GAAG,EAAE;YACV,SAAS,GAAG,KAAK,CAAC;QACpB,CAAC,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AACzB,CAAC;AAED,SAAS,cAAc,CAAC,GAAwC;IAC9D,SAAS,CAAC,GAAG,CAAC,CAAC;IACf,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AACtB,CAAC;AAED,cAAc;AACd;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,MAAM,QAAQ,GACnB,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,eAAe,CAAC","sourcesContent":["import { useEffect, useState } from 'react';\n\nimport { loadAsync, isLoaded } from './Font';\nimport { FontSource, UseFontHook } from './Font.types';\n\nfunction isMapLoaded(map: string | Record<string, FontSource>) {\n if (typeof map === 'string') {\n return isLoaded(map);\n } else {\n return Object.keys(map).every((fontFamily) => isLoaded(fontFamily));\n }\n}\n\nfunction useRuntimeFonts(map: string | Record<string, FontSource>): [boolean, Error | null] {\n const [loaded, setLoaded] = useState(\n // For web rehydration, we need to check if the fonts are already loaded during the static render.\n // Native will also benefit from this optimization.\n isMapLoaded(map)\n );\n const [error, setError] = useState<Error | null>(null);\n\n useEffect(() => {\n let isMounted = true;\n\n loadAsync(map)\n .then(() => {\n if (isMounted) {\n setLoaded(true);\n }\n })\n .catch((error) => {\n if (isMounted) {\n setError(error);\n }\n });\n\n return () => {\n isMounted = false;\n };\n }, []);\n\n return [loaded, error];\n}\n\nfunction useStaticFonts(map: string | Record<string, FontSource>): [boolean, Error | null] {\n loadAsync(map);\n return [true, null];\n}\n\n// @needsAudit\n/**\n * Load a map of fonts at runtime with [`loadAsync`](#loadasyncfontfamilyorfontmap-source). This returns `true` if the fonts are\n * loaded and ready to use. It also returns an error if something went wrong, to use in development.\n *\n * > Note, the fonts are not \"reloaded\" when you dynamically change the font map.\n *\n * @param map A map of `fontFamily`s to [`FontSource`](#fontsource)s. After loading the font you can\n * use the key in the `fontFamily` style prop of a `Text` element.\n *\n * @return\n * - __loaded__ (`boolean`) - A boolean to detect if the font for `fontFamily` has finished\n * loading.\n * - __error__ (`Error | null`) - An error encountered when loading the fonts.\n *\n * @example\n * ```tsx\n * const [loaded, error] = useFonts({\n * 'Inter-Black': require('./assets/fonts/Inter-Black.otf'),\n * });\n * ```\n */\nexport const useFonts: UseFontHook =\n typeof window === 'undefined' ? useStaticFonts : useRuntimeFonts;\n"]}

5
node_modules/expo-font/build/FontLoader.d.ts generated vendored Normal file
View File

@@ -0,0 +1,5 @@
import { Asset } from 'expo-asset';
import { FontResource, FontSource } from './Font.types';
export declare function getAssetForSource(source: FontSource): Asset | FontResource;
export declare function loadSingleFontAsync(name: string, input: Asset | FontResource): Promise<void>;
//# sourceMappingURL=FontLoader.d.ts.map

1
node_modules/expo-font/build/FontLoader.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"FontLoader.d.ts","sourceRoot":"","sources":["../src/FontLoader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAInC,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAExD,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,UAAU,GAAG,KAAK,GAAG,YAAY,CAc1E;AAED,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,KAAK,GAAG,YAAY,GAC1B,OAAO,CAAC,IAAI,CAAC,CAcf"}

30
node_modules/expo-font/build/FontLoader.js generated vendored Normal file
View File

@@ -0,0 +1,30 @@
import { Asset } from 'expo-asset';
import { CodedError } from 'expo-modules-core';
import ExpoFontLoader from './ExpoFontLoader';
export function getAssetForSource(source) {
if (source instanceof Asset) {
return source;
}
if (typeof source === 'string') {
return Asset.fromURI(source);
}
else if (typeof source === 'number') {
return Asset.fromModule(source);
}
else if (typeof source === 'object' && typeof source.uri !== 'undefined') {
return getAssetForSource(source.uri);
}
return source;
}
export async function loadSingleFontAsync(name, input) {
const asset = input;
if (!asset.downloadAsync) {
throw new CodedError(`ERR_FONT_SOURCE`, '`loadSingleFontAsync` expected resource of type `Asset` from expo-asset on native');
}
await asset.downloadAsync();
if (!asset.downloaded) {
throw new CodedError(`ERR_DOWNLOAD`, `Failed to download asset for font "${name}"`);
}
await ExpoFontLoader.loadAsync(name, asset.localUri);
}
//# sourceMappingURL=FontLoader.js.map

1
node_modules/expo-font/build/FontLoader.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"FontLoader.js","sourceRoot":"","sources":["../src/FontLoader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAG9C,MAAM,UAAU,iBAAiB,CAAC,MAAkB;IAClD,IAAI,MAAM,YAAY,KAAK,EAAE,CAAC;QAC5B,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;QAC/B,OAAO,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAC/B,CAAC;SAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;QACtC,OAAO,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;IAClC,CAAC;SAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,OAAO,MAAM,CAAC,GAAG,KAAK,WAAW,EAAE,CAAC;QAC3E,OAAO,iBAAiB,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACvC,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,IAAY,EACZ,KAA2B;IAE3B,MAAM,KAAK,GAAG,KAAc,CAAC;IAC7B,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,CAAC;QACzB,MAAM,IAAI,UAAU,CAClB,iBAAiB,EACjB,mFAAmF,CACpF,CAAC;IACJ,CAAC;IAED,MAAM,KAAK,CAAC,aAAa,EAAE,CAAC;IAC5B,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC;QACtB,MAAM,IAAI,UAAU,CAAC,cAAc,EAAE,sCAAsC,IAAI,GAAG,CAAC,CAAC;IACtF,CAAC;IACD,MAAM,cAAc,CAAC,SAAS,CAAC,IAAI,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;AACvD,CAAC","sourcesContent":["import { Asset } from 'expo-asset';\nimport { CodedError } from 'expo-modules-core';\n\nimport ExpoFontLoader from './ExpoFontLoader';\nimport { FontResource, FontSource } from './Font.types';\n\nexport function getAssetForSource(source: FontSource): Asset | FontResource {\n if (source instanceof Asset) {\n return source;\n }\n\n if (typeof source === 'string') {\n return Asset.fromURI(source);\n } else if (typeof source === 'number') {\n return Asset.fromModule(source);\n } else if (typeof source === 'object' && typeof source.uri !== 'undefined') {\n return getAssetForSource(source.uri);\n }\n\n return source;\n}\n\nexport async function loadSingleFontAsync(\n name: string,\n input: Asset | FontResource\n): Promise<void> {\n const asset = input as Asset;\n if (!asset.downloadAsync) {\n throw new CodedError(\n `ERR_FONT_SOURCE`,\n '`loadSingleFontAsync` expected resource of type `Asset` from expo-asset on native'\n );\n }\n\n await asset.downloadAsync();\n if (!asset.downloaded) {\n throw new CodedError(`ERR_DOWNLOAD`, `Failed to download asset for font \"${name}\"`);\n }\n await ExpoFontLoader.loadAsync(name, asset.localUri);\n}\n"]}

5
node_modules/expo-font/build/FontLoader.web.d.ts generated vendored Normal file
View File

@@ -0,0 +1,5 @@
import { Asset } from 'expo-asset';
import { FontResource, FontSource } from './Font.types';
export declare function getAssetForSource(source: FontSource): Asset | FontResource;
export declare function loadSingleFontAsync(name: string, input: Asset | FontResource): Promise<void>;
//# sourceMappingURL=FontLoader.web.d.ts.map

1
node_modules/expo-font/build/FontLoader.web.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"FontLoader.web.d.ts","sourceRoot":"","sources":["../src/FontLoader.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAInC,OAAO,EAAE,YAAY,EAAE,UAAU,EAAe,MAAM,cAAc,CAAC;AAgCrE,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,UAAU,GAAG,KAAK,GAAG,YAAY,CAa1E;AAYD,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAY5F"}

64
node_modules/expo-font/build/FontLoader.web.js generated vendored Normal file
View File

@@ -0,0 +1,64 @@
import { Asset } from 'expo-asset';
import { CodedError } from 'expo-modules-core';
import ExpoFontLoader from './ExpoFontLoader';
import { FontDisplay } from './Font.types';
function uriFromFontSource(asset) {
if (typeof asset === 'string') {
return asset || null;
}
else if (typeof asset === 'number') {
return uriFromFontSource(Asset.fromModule(asset));
}
else if (typeof asset === 'object' && typeof asset.uri === 'number') {
return uriFromFontSource(asset.uri);
}
else if (typeof asset === 'object') {
return asset.uri || asset.localUri || asset.default || null;
}
return null;
}
function displayFromFontSource(asset) {
if (typeof asset === 'object' && 'display' in asset) {
return asset.display || FontDisplay.AUTO;
}
return FontDisplay.AUTO;
}
function testStringFromFontSource(asset) {
if (typeof asset === 'object' && 'testString' in asset) {
return asset.testString ?? undefined;
}
return undefined;
}
export function getAssetForSource(source) {
const uri = uriFromFontSource(source);
const display = displayFromFontSource(source);
const testString = testStringFromFontSource(source);
if (!uri || typeof uri !== 'string') {
throwInvalidSourceError(uri);
}
return {
uri,
display,
testString,
};
}
function throwInvalidSourceError(source) {
let type = typeof source;
if (type === 'object')
type = JSON.stringify(source, null, 2);
throw new CodedError(`ERR_FONT_SOURCE`, `Expected font asset of type \`string | FontResource | Asset\` instead got: ${type}`);
}
// NOTE(EvanBacon): No async keyword!
export function loadSingleFontAsync(name, input) {
if (typeof input !== 'object' || typeof input.uri !== 'string' || input.downloadAsync) {
throwInvalidSourceError(input);
}
try {
return ExpoFontLoader.loadAsync(name, input);
}
catch {
// No-op.
}
return Promise.resolve();
}
//# sourceMappingURL=FontLoader.web.js.map

1
node_modules/expo-font/build/FontLoader.web.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"FontLoader.web.js","sourceRoot":"","sources":["../src/FontLoader.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAA4B,WAAW,EAAE,MAAM,cAAc,CAAC;AAErE,SAAS,iBAAiB,CAAC,KAAiB;IAC1C,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,OAAO,KAAK,IAAI,IAAI,CAAC;IACvB,CAAC;SAAM,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QACrC,OAAO,iBAAiB,CAAC,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;IACpD,CAAC;SAAM,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,CAAC,GAAG,KAAK,QAAQ,EAAE,CAAC;QACtE,OAAO,iBAAiB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACtC,CAAC;SAAM,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QACrC,OAAO,KAAK,CAAC,GAAG,IAAK,KAAe,CAAC,QAAQ,IAAK,KAAsB,CAAC,OAAO,IAAI,IAAI,CAAC;IAC3F,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,qBAAqB,CAAC,KAAiB;IAC9C,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,IAAI,KAAK,EAAE,CAAC;QACpD,OAAO,KAAK,CAAC,OAAO,IAAI,WAAW,CAAC,IAAI,CAAC;IAC3C,CAAC;IAED,OAAO,WAAW,CAAC,IAAI,CAAC;AAC1B,CAAC;AAED,SAAS,wBAAwB,CAAC,KAAiB;IACjD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,YAAY,IAAI,KAAK,EAAE,CAAC;QACvD,OAAO,KAAK,CAAC,UAAU,IAAI,SAAS,CAAC;IACvC,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,MAAkB;IAClD,MAAM,GAAG,GAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC;IACtC,MAAM,OAAO,GAAG,qBAAqB,CAAC,MAAM,CAAC,CAAC;IAC9C,MAAM,UAAU,GAAG,wBAAwB,CAAC,MAAM,CAAC,CAAC;IACpD,IAAI,CAAC,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;QACpC,uBAAuB,CAAC,GAAG,CAAC,CAAC;IAC/B,CAAC;IAED,OAAO;QACL,GAAG;QACH,OAAO;QACP,UAAU;KACX,CAAC;AACJ,CAAC;AAED,SAAS,uBAAuB,CAAC,MAAW;IAC1C,IAAI,IAAI,GAAW,OAAO,MAAM,CAAC;IACjC,IAAI,IAAI,KAAK,QAAQ;QAAE,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAC9D,MAAM,IAAI,UAAU,CAClB,iBAAiB,EACjB,8EAA8E,IAAI,EAAE,CACrF,CAAC;AACJ,CAAC;AAED,qCAAqC;AACrC,MAAM,UAAU,mBAAmB,CAAC,IAAY,EAAE,KAA2B;IAC3E,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,CAAC,GAAG,KAAK,QAAQ,IAAK,KAAa,CAAC,aAAa,EAAE,CAAC;QAC/F,uBAAuB,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC;IAED,IAAI,CAAC;QACH,OAAO,cAAc,CAAC,SAAS,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC/C,CAAC;IAAC,MAAM,CAAC;QACP,SAAS;IACX,CAAC;IAED,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;AAC3B,CAAC","sourcesContent":["import { Asset } from 'expo-asset';\nimport { CodedError } from 'expo-modules-core';\n\nimport ExpoFontLoader from './ExpoFontLoader';\nimport { FontResource, FontSource, FontDisplay } from './Font.types';\n\nfunction uriFromFontSource(asset: FontSource): string | number | null {\n if (typeof asset === 'string') {\n return asset || null;\n } else if (typeof asset === 'number') {\n return uriFromFontSource(Asset.fromModule(asset));\n } else if (typeof asset === 'object' && typeof asset.uri === 'number') {\n return uriFromFontSource(asset.uri);\n } else if (typeof asset === 'object') {\n return asset.uri || (asset as Asset).localUri || (asset as FontResource).default || null;\n }\n\n return null;\n}\n\nfunction displayFromFontSource(asset: FontSource): FontDisplay {\n if (typeof asset === 'object' && 'display' in asset) {\n return asset.display || FontDisplay.AUTO;\n }\n\n return FontDisplay.AUTO;\n}\n\nfunction testStringFromFontSource(asset: FontSource): string | undefined {\n if (typeof asset === 'object' && 'testString' in asset) {\n return asset.testString ?? undefined;\n }\n\n return undefined;\n}\n\nexport function getAssetForSource(source: FontSource): Asset | FontResource {\n const uri = uriFromFontSource(source);\n const display = displayFromFontSource(source);\n const testString = testStringFromFontSource(source);\n if (!uri || typeof uri !== 'string') {\n throwInvalidSourceError(uri);\n }\n\n return {\n uri,\n display,\n testString,\n };\n}\n\nfunction throwInvalidSourceError(source: any): never {\n let type: string = typeof source;\n if (type === 'object') type = JSON.stringify(source, null, 2);\n throw new CodedError(\n `ERR_FONT_SOURCE`,\n `Expected font asset of type \\`string | FontResource | Asset\\` instead got: ${type}`\n );\n}\n\n// NOTE(EvanBacon): No async keyword!\nexport function loadSingleFontAsync(name: string, input: Asset | FontResource): Promise<void> {\n if (typeof input !== 'object' || typeof input.uri !== 'string' || (input as any).downloadAsync) {\n throwInvalidSourceError(input);\n }\n\n try {\n return ExpoFontLoader.loadAsync(name, input);\n } catch {\n // No-op.\n }\n\n return Promise.resolve();\n}\n"]}

12
node_modules/expo-font/build/FontUtils.d.ts generated vendored Normal file
View File

@@ -0,0 +1,12 @@
import type { RenderToImageOptions, RenderToImageResult } from './FontUtils.types';
export type { RenderToImageOptions, RenderToImageResult };
/**
* Creates an image with provided text.
* @param glyphs Text to be exported.
* @param options RenderToImageOptions.
* @return Promise which fulfils with image metadata.
* @platform android
* @platform ios
*/
export declare function renderToImageAsync(glyphs: string, options?: RenderToImageOptions): Promise<RenderToImageResult>;
//# sourceMappingURL=FontUtils.d.ts.map

1
node_modules/expo-font/build/FontUtils.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"FontUtils.d.ts","sourceRoot":"","sources":["../src/FontUtils.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAEnF,YAAY,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,CAAC;AAE1D;;;;;;;GAOG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,oBAAoB,GAC7B,OAAO,CAAC,mBAAmB,CAAC,CAS9B"}

21
node_modules/expo-font/build/FontUtils.js generated vendored Normal file
View File

@@ -0,0 +1,21 @@
import { UnavailabilityError } from 'expo-modules-core';
import { processColor } from 'react-native';
import ExpoFontUtils from './ExpoFontUtils';
/**
* Creates an image with provided text.
* @param glyphs Text to be exported.
* @param options RenderToImageOptions.
* @return Promise which fulfils with image metadata.
* @platform android
* @platform ios
*/
export async function renderToImageAsync(glyphs, options) {
if (!ExpoFontUtils) {
throw new UnavailabilityError('expo-font', 'ExpoFontUtils.renderToImageAsync');
}
return await ExpoFontUtils.renderToImageAsync(glyphs, {
...options,
color: options?.color ? processColor(options.color) : undefined,
});
}
//# sourceMappingURL=FontUtils.js.map

1
node_modules/expo-font/build/FontUtils.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"FontUtils.js","sourceRoot":"","sources":["../src/FontUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAK5C;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,MAAc,EACd,OAA8B;IAE9B,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,MAAM,IAAI,mBAAmB,CAAC,WAAW,EAAE,kCAAkC,CAAC,CAAC;IACjF,CAAC;IAED,OAAO,MAAM,aAAa,CAAC,kBAAkB,CAAC,MAAM,EAAE;QACpD,GAAG,OAAO;QACV,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS;KAChE,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { UnavailabilityError } from 'expo-modules-core';\nimport { processColor } from 'react-native';\n\nimport ExpoFontUtils from './ExpoFontUtils';\nimport type { RenderToImageOptions, RenderToImageResult } from './FontUtils.types';\n\nexport type { RenderToImageOptions, RenderToImageResult };\n\n/**\n * Creates an image with provided text.\n * @param glyphs Text to be exported.\n * @param options RenderToImageOptions.\n * @return Promise which fulfils with image metadata.\n * @platform android\n * @platform ios\n */\nexport async function renderToImageAsync(\n glyphs: string,\n options?: RenderToImageOptions\n): Promise<RenderToImageResult> {\n if (!ExpoFontUtils) {\n throw new UnavailabilityError('expo-font', 'ExpoFontUtils.renderToImageAsync');\n }\n\n return await ExpoFontUtils.renderToImageAsync(glyphs, {\n ...options,\n color: options?.color ? processColor(options.color) : undefined,\n });\n}\n"]}

40
node_modules/expo-font/build/FontUtils.types.d.ts generated vendored Normal file
View File

@@ -0,0 +1,40 @@
export interface RenderToImageOptions {
/**
* Font family name.
* @default system default
*/
fontFamily?: string;
/**
* Size of the font.
* @default 24
*/
size?: number;
/**
* Font color
* @default 'black'
*/
color?: string;
/**
* Line height of the text. Accepts number in dp units.
*/
lineHeight?: number;
}
export interface RenderToImageResult {
/**
* The file uri to the image.
*/
uri: string;
/**
* Image width in dp.
*/
width: number;
/**
* Image height in dp.
*/
height: number;
/**
* Scale factor of the image. Multiply the dp dimensions by this value to get the dimensions in pixels.
* */
scale: number;
}
//# sourceMappingURL=FontUtils.types.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"FontUtils.types.d.ts","sourceRoot":"","sources":["../src/FontUtils.types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAID,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;SAEK;IACL,KAAK,EAAE,MAAM,CAAC;CACf"}

2
node_modules/expo-font/build/FontUtils.types.js generated vendored Normal file
View File

@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=FontUtils.types.js.map

1
node_modules/expo-font/build/FontUtils.types.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"FontUtils.types.js","sourceRoot":"","sources":["../src/FontUtils.types.ts"],"names":[],"mappings":"","sourcesContent":["export interface RenderToImageOptions {\n /**\n * Font family name.\n * @default system default\n */\n fontFamily?: string;\n /**\n * Size of the font.\n * @default 24\n */\n size?: number;\n /**\n * Font color\n * @default 'black'\n */\n color?: string;\n /**\n * Line height of the text. Accepts number in dp units.\n */\n lineHeight?: number;\n}\n\n// RenderToImageResult needs to be usable as the `source` prop for image,\n// so it must stay compatible with ImageURISource type\nexport interface RenderToImageResult {\n /**\n * The file uri to the image.\n */\n uri: string;\n /**\n * Image width in dp.\n */\n width: number;\n /**\n * Image height in dp.\n */\n height: number;\n\n /**\n * Scale factor of the image. Multiply the dp dimensions by this value to get the dimensions in pixels.\n * */\n scale: number;\n}\n"]}

4
node_modules/expo-font/build/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,4 @@
export * from './Font';
export * from './FontUtils';
export { useFonts } from './FontHooks';
//# sourceMappingURL=index.d.ts.map

1
node_modules/expo-font/build/index.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC"}

4
node_modules/expo-font/build/index.js generated vendored Normal file
View File

@@ -0,0 +1,4 @@
export * from './Font';
export * from './FontUtils';
export { useFonts } from './FontHooks';
//# sourceMappingURL=index.js.map

1
node_modules/expo-font/build/index.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC","sourcesContent":["export * from './Font';\nexport * from './FontUtils';\nexport { useFonts } from './FontHooks';\n"]}

4
node_modules/expo-font/build/index.server.d.ts generated vendored Normal file
View File

@@ -0,0 +1,4 @@
import { UseFontHook } from './Font.types';
export * from './Font';
export declare const useFonts: UseFontHook;
//# sourceMappingURL=index.server.d.ts.map

1
node_modules/expo-font/build/index.server.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"index.server.d.ts","sourceRoot":"","sources":["../src/index.server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,cAAc,QAAQ,CAAC;AAEvB,eAAO,MAAM,QAAQ,EAAE,WAEtB,CAAC"}

5
node_modules/expo-font/build/index.server.js generated vendored Normal file
View File

@@ -0,0 +1,5 @@
export * from './Font';
export const useFonts = () => {
return [false, null];
};
//# sourceMappingURL=index.server.js.map

1
node_modules/expo-font/build/index.server.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"index.server.js","sourceRoot":"","sources":["../src/index.server.ts"],"names":[],"mappings":"AAEA,cAAc,QAAQ,CAAC;AAEvB,MAAM,CAAC,MAAM,QAAQ,GAAgB,GAAG,EAAE;IACxC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;AACvB,CAAC,CAAC","sourcesContent":["import { UseFontHook } from './Font.types';\n\nexport * from './Font';\n\nexport const useFonts: UseFontHook = () => {\n return [false, null];\n};\n"]}

9
node_modules/expo-font/build/memory.d.ts generated vendored Normal file
View File

@@ -0,0 +1,9 @@
export declare const loadPromises: {
[name: string]: Promise<void>;
};
export declare function markLoaded(fontFamily: string): void;
export declare function isLoadedInCache(fontFamily: string): boolean;
export declare function isLoadedNative(fontFamily: string): boolean;
export declare function purgeFontFamilyFromCache(fontFamily: string): void;
export declare function purgeCache(): void;
//# sourceMappingURL=memory.d.ts.map

1
node_modules/expo-font/build/memory.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../src/memory.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,EAAE;IAAE,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CAAO,CAAC;AAKlE,wBAAgB,UAAU,CAAC,UAAU,EAAE,MAAM,QAE5C;AAED,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAE3D;AAED,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAkB1D;AAED,wBAAgB,wBAAwB,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAEjE;AAED,wBAAgB,UAAU,IAAI,IAAI,CAEjC"}

35
node_modules/expo-font/build/memory.js generated vendored Normal file
View File

@@ -0,0 +1,35 @@
import ExpoFontLoader from './ExpoFontLoader';
export const loadPromises = {};
// cache the value on the js side for fast access to the fonts that are loaded
let cache = {};
export function markLoaded(fontFamily) {
cache[fontFamily] = true;
}
export function isLoadedInCache(fontFamily) {
return fontFamily in cache;
}
export function isLoadedNative(fontFamily) {
if (isLoadedInCache(fontFamily)) {
return true;
}
else {
const loadedNativeFonts = ExpoFontLoader.getLoadedFonts();
// NOTE(brentvatne): Bail out here if there are no loaded fonts. This
// is functionally equivalent to the behavior below if the returned array
// is empty, but this handles improper mocking of `getLoadedFonts`.
if (!loadedNativeFonts?.length) {
return false;
}
loadedNativeFonts.forEach((font) => {
cache[font] = true;
});
return fontFamily in cache;
}
}
export function purgeFontFamilyFromCache(fontFamily) {
delete cache[fontFamily];
}
export function purgeCache() {
cache = {};
}
//# sourceMappingURL=memory.js.map

1
node_modules/expo-font/build/memory.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"memory.js","sourceRoot":"","sources":["../src/memory.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAE9C,MAAM,CAAC,MAAM,YAAY,GAAsC,EAAE,CAAC;AAElE,8EAA8E;AAC9E,IAAI,KAAK,GAAgC,EAAE,CAAC;AAE5C,MAAM,UAAU,UAAU,CAAC,UAAkB;IAC3C,KAAK,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC;AAC3B,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,UAAkB;IAChD,OAAO,UAAU,IAAI,KAAK,CAAC;AAC7B,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,UAAkB;IAC/C,IAAI,eAAe,CAAC,UAAU,CAAC,EAAE,CAAC;QAChC,OAAO,IAAI,CAAC;IACd,CAAC;SAAM,CAAC;QACN,MAAM,iBAAiB,GAAa,cAAc,CAAC,cAAc,EAAE,CAAC;QAEpE,qEAAqE;QACrE,yEAAyE;QACzE,mEAAmE;QACnE,IAAI,CAAC,iBAAiB,EAAE,MAAM,EAAE,CAAC;YAC/B,OAAO,KAAK,CAAC;QACf,CAAC;QAED,iBAAiB,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;YACjC,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;QACrB,CAAC,CAAC,CAAC;QACH,OAAO,UAAU,IAAI,KAAK,CAAC;IAC7B,CAAC;AACH,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,UAAkB;IACzD,OAAO,KAAK,CAAC,UAAU,CAAC,CAAC;AAC3B,CAAC;AAED,MAAM,UAAU,UAAU;IACxB,KAAK,GAAG,EAAE,CAAC;AACb,CAAC","sourcesContent":["import ExpoFontLoader from './ExpoFontLoader';\n\nexport const loadPromises: { [name: string]: Promise<void> } = {};\n\n// cache the value on the js side for fast access to the fonts that are loaded\nlet cache: { [name: string]: boolean } = {};\n\nexport function markLoaded(fontFamily: string) {\n cache[fontFamily] = true;\n}\n\nexport function isLoadedInCache(fontFamily: string): boolean {\n return fontFamily in cache;\n}\n\nexport function isLoadedNative(fontFamily: string): boolean {\n if (isLoadedInCache(fontFamily)) {\n return true;\n } else {\n const loadedNativeFonts: string[] = ExpoFontLoader.getLoadedFonts();\n\n // NOTE(brentvatne): Bail out here if there are no loaded fonts. This\n // is functionally equivalent to the behavior below if the returned array\n // is empty, but this handles improper mocking of `getLoadedFonts`.\n if (!loadedNativeFonts?.length) {\n return false;\n }\n\n loadedNativeFonts.forEach((font) => {\n cache[font] = true;\n });\n return fontFamily in cache;\n }\n}\n\nexport function purgeFontFamilyFromCache(fontFamily: string): void {\n delete cache[fontFamily];\n}\n\nexport function purgeCache(): void {\n cache = {};\n}\n"]}

13
node_modules/expo-font/build/server.d.ts generated vendored Normal file
View File

@@ -0,0 +1,13 @@
import { FontSource } from './Font.types';
/**
* @returns the server resources that should be statically extracted.
* @private
*/
export declare function getServerResources(): string[];
/**
* @returns clear the server resources from the global scope.
* @private
*/
export declare function resetServerContext(): void;
export declare function registerStaticFont(fontFamily: string, source?: FontSource | null): void;
//# sourceMappingURL=server.d.ts.map

1
node_modules/expo-font/build/server.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,EAAE,CAK7C;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,SAKjC;AAED,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,UAAU,GAAG,IAAI,QAWhF"}

32
node_modules/expo-font/build/server.js generated vendored Normal file
View File

@@ -0,0 +1,32 @@
import { CodedError, UnavailabilityError } from 'expo-modules-core';
import ExpoFontLoader from './ExpoFontLoader';
import { getAssetForSource, loadSingleFontAsync } from './FontLoader';
/**
* @returns the server resources that should be statically extracted.
* @private
*/
export function getServerResources() {
if (!ExpoFontLoader.getServerResources) {
throw new UnavailabilityError('expo-font', 'getServerResources');
}
return ExpoFontLoader.getServerResources();
}
/**
* @returns clear the server resources from the global scope.
* @private
*/
export function resetServerContext() {
if (!ExpoFontLoader.resetServerContext) {
throw new UnavailabilityError('expo-font', 'resetServerContext');
}
return ExpoFontLoader.resetServerContext();
}
export function registerStaticFont(fontFamily, source) {
// MUST BE A SYNC FUNCTION!
if (!source) {
throw new CodedError(`ERR_FONT_SOURCE`, `Cannot load null or undefined font source: { "${fontFamily}": ${source} }. Expected asset of type \`FontSource\` for fontFamily of name: "${fontFamily}"`);
}
const asset = getAssetForSource(source);
loadSingleFontAsync(fontFamily, asset);
}
//# sourceMappingURL=server.js.map

1
node_modules/expo-font/build/server.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAEpE,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAEtE;;;GAGG;AACH,MAAM,UAAU,kBAAkB;IAChC,IAAI,CAAC,cAAc,CAAC,kBAAkB,EAAE,CAAC;QACvC,MAAM,IAAI,mBAAmB,CAAC,WAAW,EAAE,oBAAoB,CAAC,CAAC;IACnE,CAAC;IACD,OAAO,cAAc,CAAC,kBAAkB,EAAE,CAAC;AAC7C,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,kBAAkB;IAChC,IAAI,CAAC,cAAc,CAAC,kBAAkB,EAAE,CAAC;QACvC,MAAM,IAAI,mBAAmB,CAAC,WAAW,EAAE,oBAAoB,CAAC,CAAC;IACnE,CAAC;IACD,OAAO,cAAc,CAAC,kBAAkB,EAAE,CAAC;AAC7C,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,UAAkB,EAAE,MAA0B;IAC/E,2BAA2B;IAC3B,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,IAAI,UAAU,CAClB,iBAAiB,EACjB,iDAAiD,UAAU,MAAM,MAAM,sEAAsE,UAAU,GAAG,CAC3J,CAAC;IACJ,CAAC;IACD,MAAM,KAAK,GAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAExC,mBAAmB,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;AACzC,CAAC","sourcesContent":["import { CodedError, UnavailabilityError } from 'expo-modules-core';\n\nimport ExpoFontLoader from './ExpoFontLoader';\nimport { FontSource } from './Font.types';\nimport { getAssetForSource, loadSingleFontAsync } from './FontLoader';\n\n/**\n * @returns the server resources that should be statically extracted.\n * @private\n */\nexport function getServerResources(): string[] {\n if (!ExpoFontLoader.getServerResources) {\n throw new UnavailabilityError('expo-font', 'getServerResources');\n }\n return ExpoFontLoader.getServerResources();\n}\n\n/**\n * @returns clear the server resources from the global scope.\n * @private\n */\nexport function resetServerContext() {\n if (!ExpoFontLoader.resetServerContext) {\n throw new UnavailabilityError('expo-font', 'resetServerContext');\n }\n return ExpoFontLoader.resetServerContext();\n}\n\nexport function registerStaticFont(fontFamily: string, source?: FontSource | null) {\n // MUST BE A SYNC FUNCTION!\n if (!source) {\n throw new CodedError(\n `ERR_FONT_SOURCE`,\n `Cannot load null or undefined font source: { \"${fontFamily}\": ${source} }. Expected asset of type \\`FontSource\\` for fontFamily of name: \"${fontFamily}\"`\n );\n }\n const asset = getAssetForSource(source);\n\n loadSingleFontAsync(fontFamily, asset);\n}\n"]}