Home
last modified time | relevance | path

Searched refs:source (Results 1 – 25 of 2691) sorted by relevance

12345678910>>...108

/expo/packages/expo-av/build/
H A DAV.js56 uri: source,
65 else if (source != null &&
67 'uri' in source &&
69 uri = source.uri;
74 if (source != null &&
80 if (source != null &&
82 'headers' in source &&
84 headers = source.headers;
89 if (source == null) {
97 asset = source;
[all …]
/expo/packages/expo-image/build/web/
H A Dhooks.js5 export function useThumbhash(source) { argument
11 export function useImageHashes(source) { argument
12 const thumbhash = useThumbhash(source);
13 const blurhash = useBlurhash(source);
15 resolvedSource: blurhash ?? thumbhash ?? source,
23 if (!source?.headers || !source.uri) {
28 headers: source.headers,
48 }, [source]);
49 if (!source?.headers) {
50 return source;
[all …]
H A DuseSourceSelection.js9 ?.map((source) => {
11 return { source, penalty: 0, covers: false };
13 … const { width, height } = typeof source === 'object' ? source : { width: null, height: null };
15 return { source, penalty: 0, covers: false };
19 source,
29 function getCSSMediaQueryForSource(source) { argument
30 return `(max-width: ${source.webMaxViewportWidth ?? source.width}px) ${source.width}px`;
47 ?.map((source) => `${source.uri} ${source.width}w`)
89 const source = selectSource(sources, size, responsivePolicy);
92 source,
[all …]
H A DImageWrapper.js9 function getImgPropsFromSource(source) { argument
10 if (source && 'srcset' in source) {
12 srcSet: source.srcset,
13 sizes: source.sizes,
18 const ImageWrapper = React.forwardRef(({ source, events, contentPosition, hashPlaceholderContentPos… field
23 const { resolvedSource, isImageHash } = useImageHashes(source);
31 …tyLabel, className: className, src: sourceWithHeaders?.uri || undefined, key: source?.uri, style: {
40 …ageWrapperEventHandler(events, sourceWithHeaders), ...getImgPropsFromSource(source), ...props })));
/expo/packages/expo-image/build/utils/
H A DresolveSources.js11 function resolveSource(source) { argument
12 if (typeof source === 'string') {
13 if (isBlurhashString(source)) {
14 return resolveBlurhashString(source);
16 else if (isThumbhashString(source)) {
17 return resolveThumbhashString(source);
19 return { uri: source };
21 if (typeof source === 'number') {
22 return resolveAssetSource(source);
24 if (typeof source === 'object' && (source?.blurhash || source?.thumbhash)) {
[all …]
/expo/packages/expo-image/src/web/
H A Dhooks.ts20 const thumbhash = useThumbhash(source);
21 const blurhash = useBlurhash(source);
32 source: ImageSource | null | undefined,
39 if (!source?.headers || !source.uri) {
43 const result = await fetch(source.uri, {
44 headers: source.headers,
60 onError?.forEach((e) => e?.({ source }));
63 }, [source]);
64 if (!source?.headers) {
65 return source;
[all …]
H A DuseSourceSelection.ts16 ?.map((source) => {
18 return { source, penalty: 0, covers: false };
21 typeof source === 'object' ? source : { width: null, height: null };
23 return { source, penalty: 0, covers: false };
27 source,
47 function getCSSMediaQueryForSource(source: ImageSource) {
48 return `(max-width: ${source.webMaxViewportWidth ?? source.width}px) ${source.width}px`;
79 ?.map((source) => `${source.uri} ${source.width}w`)
94 source: ImageSource | SrcSetSource | null;
143 source,
[all …]
/expo/apps/native-component-list/src/screens/Image/tests/
H A Dsources.ts10 source: images.require_webp,
16 source: images.require_webp_anim,
28 source: images.require_jpg1,
34 source: images.require_jpg2,
40 source: images.require_png,
46 source: images.require_svg,
53 source: images.uri_png,
59 source: images.uri_jpg,
65 source: images.uri_gif,
71 source: images.uri_ico,
[all …]
/expo/packages/expo-av/src/
H A DAV.ts71 uri: source,
81 source != null &&
83 'uri' in source &&
86 uri = source.uri;
94 source != null &&
103 source != null &&
105 'headers' in source &&
108 headers = source.headers;
114 if (source == null) {
122 asset = source;
[all …]
/expo/apps/native-component-list/src/constants/
H A DComparisonImages.ts4 source: ImageSource;
11 source: { uri: 'https://picsum.photos/seed/175/300/200' },
20 source: { uri: 'https://picsum.photos/seed/picsum/200/300' },
25 source: { uri: 'https://picsum.photos/seed/8/200/300' },
30 source: require('../../assets/images/expo-icon.png'),
36 source: { uri: 'https://picsum.photos/seed/13/200/300' },
45 source: { uri: 'https://picsum.photos/seed/566/200/300' },
50 source: { uri: 'https://picsum.photos/seed/666/200/300' },
70 source: { uri: 'https://picsum.photos/id/237/200/300' },
79 source: { uri: 'https://picsum.photos/id/705/200/300' },
[all …]
/expo/packages/create-expo/src/utils/
H A Dobj.ts1 export function deepMerge(target: any, source: any) {
3 return source;
5 if (Array.isArray(target) && Array.isArray(source)) {
6 return target.concat(source);
8 Object.keys(source).forEach((key) => {
9 if (typeof source[key] === 'object' && source[key] !== null) {
10 target[key] = deepMerge(target[key], source[key]);
12 target[key] = source[key];
/expo/packages/expo-image/src/utils/
H A DresolveSources.tsx16 if (typeof source === 'string') {
17 if (isBlurhashString(source)) {
18 return resolveBlurhashString(source);
19 } else if (isThumbhashString(source)) {
20 return resolveThumbhashString(source);
22 return { uri: source };
24 if (typeof source === 'number') {
25 return resolveAssetSource(source);
27 if (typeof source === 'object' && (source?.blurhash || source?.thumbhash)) {
37 return source ?? null;
[all …]
/expo/packages/expo-asset/src/__tests__/
H A DAssetSources-test.ts31 expect(source.uri).toBe(
34 expect(source.hash).toBe('cafecafecafecafecafecafecafecafe');
49 expect(source.uri).toBe(
71 expect(source.uri).toBe(
81 const source = AssetSources.selectAssetSource({ constant
93 const source = AssetSources.selectAssetSource({ constant
98 expect(source.uri).toBe(
109 const source = AssetSources.selectAssetSource({ constant
128 expect(source.hash).toBe(hash);
136 const source = AssetSources.selectAssetSource({ constant
[all …]
/expo/packages/expo-font/src/
H A DFontLoader.ts21 export function getAssetForSource(source: FontSource): Asset | FontResource {
22 if (source instanceof Asset) {
23 return source;
26 if (typeof source === 'string') {
27 return Asset.fromURI(source);
28 } else if (typeof source === 'number') {
29 return Asset.fromModule(source);
30 } else if (typeof source === 'object' && typeof source.uri !== 'undefined') {
31 return getAssetForSource(source.uri);
37 return source;
/expo/packages/expo-font/build/
H A DFontLoader.js14 export function getAssetForSource(source) { argument
15 if (source instanceof Asset) {
16 return source;
18 if (typeof source === 'string') {
19 return Asset.fromURI(source);
21 else if (typeof source === 'number') {
22 return Asset.fromModule(source);
24 else if (typeof source === 'object' && typeof source.uri !== 'undefined') {
25 return getAssetForSource(source.uri);
30 return source;
/expo/packages/@expo/fingerprint/src/
H A DDedup.ts13 for (const source of sources) { constant
16 source,
21 debug(`Skipping duplicated source: ${source}`);
24 ...source,
28 duplicatedItem.reasons.push(...source.reasons);
31 newSources.push(source);
51 source: HashSource,
55 if (source.type === 'contents') {
57 newSources.findIndex((item) => item.type === source.type && item.id === source.id) ?? null,
66 if (isDescendant(source, existingSource, projectRoot)) {
[all …]
/expo/packages/@expo/fingerprint/src/hash/
H A DHash.ts28 sources.map((source) => createFingerprintSourceAsync(source, limiter, projectRoot, options))
33 if (source.hash != null) {
35 hasher.update(source.hash);
51 source: HashSource,
57 switch (source.type) {
182 source: HashSourceContents,
186 return { id: source.id, hex };
193 switch (source.type) {
195 return source.id;
197 return source.filePath;
[all …]
/expo/packages/@expo/fingerprint/build/hash/
H A DHash.js21 for (const source of fingerprintSources) {
22 if (source.hash != null) {
23 hasher.update(createSourceId(source));
24 hasher.update(source.hash);
40 switch (source.type) {
144 return { id: source.id, hex };
150 function createSourceId(source) { argument
151 switch (source.type) {
153 return source.id;
155 return source.filePath;
[all …]
/expo/docs/ui/components/Diagram/
H A DDiagram.tsx6 source: string;
11 export const Diagram = ({ source, darkSource, alt }: Props) => {
15 if (!source.match(/\.png$/)) {
20 {isDark && darkSource && <source srcSet={darkSource} />}
21 <img src={source} alt={alt} />
31 {!isDark && <source srcSet={source.replace('.png', '.avif')} type="image/avif" />}
33 <source srcSet={darkSource.replace('.png', '.avif')} type="image/avif" />
35 {!isDark && <source srcSet={source.replace('.png', '.webp')} type="image/webp" />}
37 <source srcSet={darkSource.replace('.png', '.webp')} type="image/webp" />
39 {darkSource && isDark && <source srcSet={darkSource} />}
[all …]
/expo/packages/@expo/fingerprint/build/
H A DDedup.js15 for (const source of sources) {
19 debug(`Skipping duplicated source: ${source}`);
22 ...source,
23 reasons: [...source.reasons, ...duplicatedItem.reasons],
27 duplicatedItem.reasons.push(...source.reasons);
31 newSources.push(source);
48 function findDuplicatedSourceIndex(newSources, source, projectRoot) { argument
50 if (source.type === 'contents') {
52 … newSources.findIndex((item) => item.type === source.type && item.id === source.id) ?? null,
60 if (isDescendant(source, existingSource, projectRoot)) {
[all …]
/expo/apps/native-component-list/src/components/HashPlaceholdersDemo/
H A DComparisonRow.tsx8 source: ImageSource;
16 source,
24 <ComparisonImage source={source} showGrid={showGrid} transition={0} />
26 source={showRealImage ? source : null}
31 source={showRealImage ? source : null}
/expo/tools/src/vendoring/devmenu/steps/
H A DRemoveFiles.ts8 source?: string;
13 protected readonly source?: string;
16 constructor({ source, filePattern }: RemoveFilesSettings) {
18 this.source = source;
23 return this.source || '<workingDirectory>';
/expo/ios/versioned-react-native/ABI49_0_0/ReactNative/React/CxxBridge/
H A DABI49_0_0NSDataBigString.mm4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
13 static NSData *ensureNullTerminated(NSData *source)
15 if (!source || source.length == 0) {
19 NSUInteger sourceLength = source.length;
21 [source getBytes:&lastByte range:NSMakeRange(sourceLength - 1, 1)];
27 return source;
29 NSMutableData *data = [source mutableCopy];
/expo/ios/versioned-react-native/ABI48_0_0/ReactNative/React/CxxBridge/
H A DABI48_0_0NSDataBigString.mm4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
13 static NSData *ensureNullTerminated(NSData *source)
15 if (!source || source.length == 0) {
19 NSUInteger sourceLength = source.length;
21 [source getBytes:&lastByte range:NSMakeRange(sourceLength - 1, 1)];
27 return source;
29 NSMutableData *data = [source mutableCopy];
/expo/ios/versioned-react-native/ABI47_0_0/ReactNative/React/CxxBridge/
H A DABI47_0_0NSDataBigString.mm4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
13 static NSData *ensureNullTerminated(NSData *source)
15 if (!source || source.length == 0) {
19 NSUInteger sourceLength = source.length;
21 [source getBytes:&lastByte range:NSMakeRange(sourceLength - 1, 1)];
27 return source;
29 NSMutableData *data = [source mutableCopy];

12345678910>>...108