@ankhorage/surface 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveExpoIconComponent.d.ts","sourceRoot":"","sources":["../../../src/primitives/icon/resolveExpoIconComponent.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"resolveExpoIconComponent.d.ts","sourceRoot":"","sources":["../../../src/primitives/icon/resolveExpoIconComponent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAI9D,MAAM,MAAM,iBAAiB,GAAG,KAAK,CAAC,WAAW,CAAC;IAChD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC,CAAC;AAwCH,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,GAAG,iBAAiB,CAQ5E"}
|
|
@@ -1,14 +1,23 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';
|
|
2
1
|
import {} from 'react-native';
|
|
3
|
-
const require = createRequire(import.meta.url);
|
|
4
2
|
let cachedIcons = null;
|
|
3
|
+
function resolveRuntimeRequire() {
|
|
4
|
+
const globalCandidate = globalThis.require;
|
|
5
|
+
if (typeof globalCandidate === 'function') {
|
|
6
|
+
return globalCandidate;
|
|
7
|
+
}
|
|
8
|
+
return null;
|
|
9
|
+
}
|
|
5
10
|
function loadExpoIcons() {
|
|
6
11
|
if (cachedIcons) {
|
|
7
12
|
return cachedIcons;
|
|
8
13
|
}
|
|
14
|
+
const runtimeRequire = resolveRuntimeRequire();
|
|
9
15
|
try {
|
|
10
|
-
|
|
11
|
-
|
|
16
|
+
if (!runtimeRequire) {
|
|
17
|
+
throw new Error('runtime require is unavailable');
|
|
18
|
+
}
|
|
19
|
+
// Keep icon loading lazy so non-Expo consumers do not need the package until Icon is used.
|
|
20
|
+
cachedIcons = runtimeRequire('@expo/vector-icons');
|
|
12
21
|
return cachedIcons;
|
|
13
22
|
}
|
|
14
23
|
catch {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveExpoIconComponent.js","sourceRoot":"","sources":["../../../src/primitives/icon/resolveExpoIconComponent.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"resolveExpoIconComponent.js","sourceRoot":"","sources":["../../../src/primitives/icon/resolveExpoIconComponent.ts"],"names":[],"mappings":"AAEA,OAAO,EAAkC,MAAM,cAAc,CAAC;AAY9D,IAAI,WAAW,GAA2B,IAAI,CAAC;AAE/C,SAAS,qBAAqB;IAC5B,MAAM,eAAe,GACnB,UAGD,CAAC,OAAO,CAAC;IAEV,IAAI,OAAO,eAAe,KAAK,UAAU,EAAE,CAAC;QAC1C,OAAO,eAA0C,CAAC;IACpD,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,aAAa;IACpB,IAAI,WAAW,EAAE,CAAC;QAChB,OAAO,WAAW,CAAC;IACrB,CAAC;IAED,MAAM,cAAc,GAAG,qBAAqB,EAAE,CAAC;IAE/C,IAAI,CAAC;QACH,IAAI,CAAC,cAAc,EAAE,CAAC;YACpB,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;QACpD,CAAC;QAED,2FAA2F;QAC3F,WAAW,GAAG,cAAc,CAAC,oBAAoB,CAAoB,CAAC;QACtE,OAAO,WAAW,CAAC;IACrB,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,KAAK,CACb,qHAAqH,CACtH,CAAC;IACJ,CAAC;AACH,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,QAAgB;IACvD,MAAM,KAAK,GAAG,aAAa,EAAE,CAAC;IAC9B,MAAM,SAAS,GAAI,KAAiC,CAAC,QAAQ,CAAC,CAAC;IAC/D,IAAI,OAAO,SAAS,KAAK,UAAU,EAAE,CAAC;QACpC,OAAO,SAA8B,CAAC;IACxC,CAAC;IAED,OAAO,KAAK,CAAC,QAA6B,CAAC;AAC7C,CAAC"}
|
package/package.json
CHANGED