Home
last modified time | relevance | path

Searched refs:Asset (Results 1 – 25 of 134) sorted by relevance

123456

/expo/packages/expo-asset/src/__tests__/
H A DAsset-test.ts60 const { Asset } = require('../index'); constant
67 const { Asset } = require('../index'); constant
75 const { Asset } = require('../index'); constant
84 const { Asset } = require('../index'); constant
91 const { Asset } = require('../index'); constant
98 const { Asset } = require('../index'); constant
101 const asset1 = Asset.fromURI(uri);
102 const asset2 = Asset.fromURI(uri);
113 const asset = Asset.fromModule(1);
119 const { Asset } = require('../index'); constant
[all …]
H A DAssetHooks-test.ts3 import { Asset } from '../Asset';
13 new Asset({ name: 'test-first', type: 'jpg', uri: 'non/existing' }),
14 new Asset({ name: 'test-second', type: 'png', uri: 'non/existing' }),
17 const loadAsyncSpy = jest.spyOn(Asset, 'loadAsync').mockResolvedValue(STUB_ASSETS);
/expo/packages/expo-asset/src/
H A DAsset.ts33 export class Asset { class
157 const asset = new Asset({
179 return Asset.fromMetadata(meta);
187 if (Asset.byHash[metaHash]) {
188 return Asset.byHash[metaHash];
192 const asset = new Asset({
200 Asset.byHash[metaHash] = asset;
206 if (Asset.byUri[uri]) {
207 return Asset.byUri[uri];
219 const asset = new Asset({
[all …]
H A DAssetHooks.ts3 import { Asset } from './Asset';
26 export function useAssets(moduleIds: number | number[]): [Asset[] | undefined, Error | undefined] {
27 const [assets, setAssets] = useState<Asset[]>();
31 Asset.loadAsync(moduleIds).then(setAssets).catch(setError);
H A DAsset.fx.ts1 import { Asset } from './Asset';
11 const asset = Asset.fromMetadata(resolver.asset);
/expo/packages/expo-font/src/
H A DFontLoader.ts1 import { Asset } from 'expo-asset';
21 export function getAssetForSource(source: FontSource): Asset | FontResource {
22 if (source instanceof Asset) {
27 return Asset.fromURI(source);
29 return Asset.fromModule(source);
42 input: Asset | FontResource
44 const asset = input as Asset;
H A DFontLoader.web.ts1 import { Asset } from 'expo-asset';
13 return uriFromFontSource(Asset.fromModule(asset));
26 export function getAssetForSource(source: FontSource): Asset | FontResource {
50 export function loadSingleFontAsync(name: string, input: Asset | FontResource): Promise<void> {
H A DFont.types.ts1 import { Asset } from 'expo-asset';
8 export type FontSource = string | number | Asset | FontResource;
/expo/packages/expo-asset/build/
H A DAsset.js14 export class Asset { class
128 const asset = new Asset({
147 return Asset.fromMetadata(meta);
154 if (Asset.byHash[metaHash]) {
155 return Asset.byHash[metaHash];
158 const asset = new Asset({
166 Asset.byHash[metaHash] = asset;
171 if (Asset.byUri[uri]) {
172 return Asset.byUri[uri];
183 const asset = new Asset({
[all …]
H A DAsset.d.ts19 export declare class Asset { class
82 static loadAsync(moduleId: number | number[] | string | string[]): Promise<Asset[]>;
89 static fromModule(virtualAssetModule: number | string): Asset;
90 static fromMetadata(meta: AssetMetadata): Asset;
91 static fromURI(uri: string): Asset;
H A DAssetHooks.d.ts1 import { Asset } from './Asset';
22 export declare function useAssets(moduleIds: number | number[]): [Asset[] | undefined, Error | unde…
H A DAsset.fx.d.ts.map1 {"version":3,"file":"Asset.fx.d.ts","sourceRoot":"","sources":["../src/Asset.fx.ts"],"names":[],"ma…
H A DAssetHooks.js2 import { Asset } from './Asset';
28 Asset.loadAsync(moduleIds).then(setAssets).catch(setError);
H A DAsset.fx.js1 import { Asset } from './Asset';
10 const asset = Asset.fromMetadata(resolver.asset);
H A DAsset.fx.js.map1Asset.fx.js","sourceRoot":"","sources":["../src/Asset.fx.ts"],"names":[],"mappings":"AAAA,OAAO,EAA…
H A Dindex.js.map1 …S,CAAC;AACxB,cAAc,cAAc,CAAC","sourcesContent":["import './Asset.fx';\n\nexport * from './Asset';\n…
/expo/packages/expo-font/build/
H A DFontLoader.d.ts1 import { Asset } from 'expo-asset';
4 export declare function getAssetForSource(source: FontSource): Asset | FontResource;
5 export declare function loadSingleFontAsync(name: string, input: Asset | FontResource): Promise<voi…
H A DFontLoader.web.d.ts1 import { Asset } from 'expo-asset';
4 export declare function getAssetForSource(source: FontSource): Asset | FontResource;
5 export declare function loadSingleFontAsync(name: string, input: Asset | FontResource): Promise<voi…
H A DFontLoader.js1 import { Asset } from 'expo-asset';
15 if (source instanceof Asset) {
19 return Asset.fromURI(source);
22 return Asset.fromModule(source);
H A DFont.types.d.ts1 import { Asset } from 'expo-asset';
6 export type FontSource = string | number | Asset | FontResource;
/expo/packages/expo-media-library/build/
H A DMediaLibrary.d.ts29 export type Asset = { alias
77 export type AssetInfo = Asset & {
130 insertedAssets?: Asset[];
135 deletedAssets?: Asset[];
141 updatedAssets?: Asset[];
253 export type AssetRef = Asset | string;
318 export declare function createAssetAsync(localUri: string): Promise<Asset>;
409 export declare function getAssetsAsync(assetsOptions?: AssetsOptions): Promise<PagedInfo<Asset>>;
/expo/packages/expo-font/src/__tests__/
H A DFontLoader-test.web.ts1 import { Asset } from 'expo-asset';
14 expect(() => FontLoader.loadSingleFontAsync('foo', Asset.fromURI('foo'))).toThrow(
19 expect(() => FontLoader.loadSingleFontAsync('foo', Asset.fromURI('foo'))).toThrow(
23 FontLoader.loadSingleFontAsync('foo', { uri: Asset.fromURI('foo') } as any)
/expo/apps/test-suite/tests/
H A DAsset.js3 import { Asset } from 'expo-asset';
34 const asset = Asset.fromModule(module);
41 const asset = Asset.fromModule(module);
50 const asset = Asset.fromModule(module);
H A DAsset.web.js3 import { Asset } from 'expo-asset';
25 const asset = Asset.fromModule(module);
34 const asset = Asset.fromModule(module);
/expo/packages/@expo/cli/src/export/
H A DsaveAssets.ts12 export type Asset = ManifestAsset | BundleAssetWithFileHashes; alias
21 function collectAssetPaths(assets: Asset[]): Record<string, string> {
34 { assets, outputDir }: { assets: Asset[]; outputDir: string }

123456