vxrn 2.0.0-beta.168.1 → 2.0.0-beta.362.1

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.
Files changed (103) hide show
  1. package/dist/backgroundComputation.mjs +145 -0
  2. package/dist/backgroundComputation.mjs.map +1 -0
  3. package/dist/backgroundComputation.native.js +163 -0
  4. package/dist/backgroundComputation.native.js.map +1 -0
  5. package/dist/backgroundComputationNative.mjs +16 -0
  6. package/dist/backgroundComputationNative.mjs.map +1 -0
  7. package/dist/backgroundComputationNative.native.js +18 -0
  8. package/dist/backgroundComputationNative.native.js.map +1 -0
  9. package/dist/config/getBaseViteConfigOnly.mjs +1 -0
  10. package/dist/config/getBaseViteConfigOnly.mjs.map +1 -1
  11. package/dist/config/getBaseViteConfigOnly.native.js +1 -0
  12. package/dist/config/getBaseViteConfigOnly.native.js.map +1 -1
  13. package/dist/config/getOptimizeDeps.mjs +1 -0
  14. package/dist/config/getOptimizeDeps.mjs.map +1 -1
  15. package/dist/config/getOptimizeDeps.native.js +1 -0
  16. package/dist/config/getOptimizeDeps.native.js.map +1 -1
  17. package/dist/constants/defaults.mjs +1 -0
  18. package/dist/constants/defaults.mjs.map +1 -1
  19. package/dist/constants/defaults.native.js +1 -0
  20. package/dist/constants/defaults.native.js.map +1 -1
  21. package/dist/exports/prebuildWithoutExpo.mjs +67 -3
  22. package/dist/exports/prebuildWithoutExpo.mjs.map +1 -1
  23. package/dist/exports/prebuildWithoutExpo.native.js +104 -39
  24. package/dist/exports/prebuildWithoutExpo.native.js.map +1 -1
  25. package/dist/index.js +4 -1
  26. package/dist/index.mjs +4 -1
  27. package/dist/index.native.js +4 -1
  28. package/dist/patches/builtInDepPatches.mjs +0 -13
  29. package/dist/patches/builtInDepPatches.mjs.map +1 -1
  30. package/dist/patches/builtInDepPatches.native.js +0 -13
  31. package/dist/patches/builtInDepPatches.native.js.map +1 -1
  32. package/dist/plugins/backgroundComputationPlugin.mjs +27 -0
  33. package/dist/plugins/backgroundComputationPlugin.mjs.map +1 -0
  34. package/dist/plugins/backgroundComputationPlugin.native.js +32 -0
  35. package/dist/plugins/backgroundComputationPlugin.native.js.map +1 -0
  36. package/dist/plugins/reactNativeDevAssetPlugin.mjs +2 -1
  37. package/dist/plugins/reactNativeDevAssetPlugin.mjs.map +1 -1
  38. package/dist/plugins/reactNativeDevAssetPlugin.native.js +2 -1
  39. package/dist/plugins/reactNativeDevAssetPlugin.native.js.map +1 -1
  40. package/dist/plugins/reactNativeDevServer.mjs +1 -0
  41. package/dist/plugins/reactNativeDevServer.mjs.map +1 -1
  42. package/dist/plugins/reactNativeDevServer.native.js +1 -0
  43. package/dist/plugins/reactNativeDevServer.native.js.map +1 -1
  44. package/dist/plugins/workletImportsPlugin.mjs +9 -30
  45. package/dist/plugins/workletImportsPlugin.mjs.map +1 -1
  46. package/dist/plugins/workletImportsPlugin.native.js +9 -34
  47. package/dist/plugins/workletImportsPlugin.native.js.map +1 -1
  48. package/dist/utils/compileNativeDevBytecode.mjs +42 -4
  49. package/dist/utils/compileNativeDevBytecode.mjs.map +1 -1
  50. package/dist/utils/compileNativeDevBytecode.native.js +45 -4
  51. package/dist/utils/compileNativeDevBytecode.native.js.map +1 -1
  52. package/dist/utils/nativeRun.mjs +1 -0
  53. package/dist/utils/nativeRun.mjs.map +1 -1
  54. package/dist/utils/nativeRun.native.js +1 -0
  55. package/dist/utils/nativeRun.native.js.map +1 -1
  56. package/dist/utils/scanDepsToOptimize.mjs +2 -0
  57. package/dist/utils/scanDepsToOptimize.mjs.map +1 -1
  58. package/dist/utils/scanDepsToOptimize.native.js +2 -0
  59. package/dist/utils/scanDepsToOptimize.native.js.map +1 -1
  60. package/expo-plugin.cjs +118 -0
  61. package/package.json +22 -12
  62. package/src/backgroundComputation.ts +220 -0
  63. package/src/backgroundComputationNative.ts +23 -0
  64. package/src/config/getBaseViteConfigOnly.ts +1 -0
  65. package/src/config/getOptimizeDeps.ts +1 -0
  66. package/src/config/glbAssets.test.ts +228 -0
  67. package/src/constants/defaults.ts +2 -0
  68. package/src/exports/prebuildWithoutExpo.test.ts +117 -1
  69. package/src/exports/prebuildWithoutExpo.ts +131 -3
  70. package/src/index.ts +8 -0
  71. package/src/patches/builtInDepPatches.ts +0 -21
  72. package/src/plugins/backgroundComputationPlugin.test.ts +77 -0
  73. package/src/plugins/backgroundComputationPlugin.ts +29 -0
  74. package/src/plugins/reactNativeDevAssetPlugin.ts +5 -1
  75. package/src/plugins/reactNativeDevServer.ts +2 -0
  76. package/src/plugins/rnCodegenPlugin.test.ts +30 -0
  77. package/src/plugins/workletImportsPlugin.ts +19 -37
  78. package/src/utils/compileNativeDevBytecode.test.ts +109 -2
  79. package/src/utils/compileNativeDevBytecode.ts +70 -15
  80. package/src/utils/createNativeDevEngine.test.ts +42 -14
  81. package/src/utils/nativeRun.test.ts +18 -6
  82. package/src/utils/nativeRun.ts +2 -0
  83. package/src/utils/scanDepsToOptimize.test.ts +12 -0
  84. package/src/utils/scanDepsToOptimize.ts +7 -1
  85. package/types/backgroundComputation.d.ts +28 -0
  86. package/types/backgroundComputation.d.ts.map +1 -0
  87. package/types/backgroundComputationNative.d.ts +2 -0
  88. package/types/backgroundComputationNative.d.ts.map +1 -0
  89. package/types/config/getBaseViteConfigOnly.d.ts.map +1 -1
  90. package/types/config/getOptimizeDeps.d.ts.map +1 -1
  91. package/types/constants/defaults.d.ts.map +1 -1
  92. package/types/exports/prebuildWithoutExpo.d.ts.map +1 -1
  93. package/types/index.d.ts +2 -0
  94. package/types/index.d.ts.map +1 -1
  95. package/types/patches/builtInDepPatches.d.ts.map +1 -1
  96. package/types/plugins/backgroundComputationPlugin.d.ts +3 -0
  97. package/types/plugins/backgroundComputationPlugin.d.ts.map +1 -0
  98. package/types/plugins/reactNativeDevAssetPlugin.d.ts.map +1 -1
  99. package/types/plugins/reactNativeDevServer.d.ts.map +1 -1
  100. package/types/plugins/workletImportsPlugin.d.ts.map +1 -1
  101. package/types/utils/compileNativeDevBytecode.d.ts.map +1 -1
  102. package/types/utils/nativeRun.d.ts.map +1 -1
  103. package/types/utils/scanDepsToOptimize.d.ts.map +1 -1
@@ -0,0 +1,145 @@
1
+ import MagicString from "magic-string";
2
+ import { parse } from "sucrase/dist/parser/index.js";
3
+ import { IdentifierRole } from "sucrase/dist/parser/tokenizer/index.js";
4
+ import { TokenType } from "sucrase/dist/parser/tokenizer/types.js";
5
+
6
+ const marker = ".__one_background_worker_";
7
+ const hex = (name) => [...new TextEncoder().encode(name)].map((byte) => byte.toString(16).padStart(2, "0")).join("");
8
+ function loadBackgroundComputationModule(id) {
9
+ const match = id.match(/^(.*?)\.__one_background_worker_([a-f0-9]+)\.js(?:\?.*)?$/);
10
+ if (!match) return;
11
+ const [, calculate, encoded] = match;
12
+ const name = new TextDecoder().decode(Uint8Array.from(encoded.match(/../g), (byte) => Number.parseInt(byte, 16)));
13
+ return {
14
+ id,
15
+ calculate,
16
+ name,
17
+ platform: "web",
18
+ source: `import { ${name} as calculate } from ${JSON.stringify(calculate)};
19
+ self.onmessage = ({ data: { revision, input } }) => {
20
+ try {
21
+ const value = calculate(input);
22
+ if (value instanceof Promise) throw new TypeError('background computations must be synchronous');
23
+ self.postMessage({ ok: true, result: { revision, value } });
24
+ } catch (error) {
25
+ self.postMessage({ ok: false, revision, error: String(error) });
26
+ }
27
+ };`
28
+ };
29
+ }
30
+ function transformBackgroundComputations(source, id, options) {
31
+ if (!source.includes("defineBackgroundComputation") || id.includes(marker)) return;
32
+ const file = parse(source, !/\.[cm]?ts(?:\?|$)/.test(id), /\.[cm]?tsx?(?:\?|$)/.test(id), false);
33
+ const { tokens } = file;
34
+ const text = (index) => tokens[index] ? source.slice(tokens[index].start, tokens[index].end) : "";
35
+ const imports = /* @__PURE__ */ new Map();
36
+ const definitions = /* @__PURE__ */ new Set();
37
+ for (let index = 0; index < tokens.length; index++) {
38
+ if (text(index) !== "import" || tokens[index].isType || text(index + 1) !== "{") continue;
39
+ const start = index + 2;
40
+ let end = start;
41
+ while (end < tokens.length && text(end) !== "}") end++;
42
+ if (text(end + 1) !== "from" || tokens[end + 2]?.type !== TokenType.string) continue;
43
+ const specifier = text(end + 2).slice(1, -1);
44
+ for (let binding = start; binding < end; binding++) {
45
+ if (tokens[binding].isType || tokens[binding].type !== TokenType.name) continue;
46
+ const name = text(binding);
47
+ const local = text(binding + 1) === "as" ? text(binding + 2) : name;
48
+ imports.set(local, {
49
+ source: specifier,
50
+ name
51
+ });
52
+ if (specifier === "one/background" && name === "defineBackgroundComputation") definitions.add(local);
53
+ if (local !== name) binding += 2;
54
+ }
55
+ index = end + 2;
56
+ }
57
+ if (!definitions.size) return;
58
+ const code = new MagicString(source);
59
+ const modules = [];
60
+ for (let index = 0; index < tokens.length; index++) {
61
+ const token = tokens[index];
62
+ if (token.identifierRole !== IdentifierRole.Access || !definitions.has(text(index))) continue;
63
+ let opening = index + 1;
64
+ while (tokens[opening]?.isType) opening++;
65
+ if (text(opening) !== "(") continue;
66
+ let binding = index - 2;
67
+ while (tokens[binding]?.isType) binding--;
68
+ if (token.scopeDepth !== 0 || text(index - 1) !== "=" || tokens[binding]?.identifierRole !== IdentifierRole.TopLevelDeclaration) throw new Error(`[one background] ${id}: definitions must be module-scope variables`);
69
+ const argument = tokens[opening + 1];
70
+ const calculate = argument?.type === TokenType.name ? imports.get(text(opening + 1)) : void 0;
71
+ if (!calculate || !calculate.source.startsWith(".") || text(opening + 2) !== ")") throw new Error(`[one background] ${id}: defineBackgroundComputation requires one named import from a relative pure module at module scope`);
72
+ const resolved = options.resolve(calculate.source, id);
73
+ if (options.platform === "native") {
74
+ const local = `__oneBackgroundCalculate${modules.length}`;
75
+ const module = {
76
+ id: `${resolved}.__one_background_native_${hex(calculate.name)}.js`,
77
+ source: `export { ${calculate.name} } from ${JSON.stringify(resolved)};`,
78
+ calculate: resolved,
79
+ name: calculate.name,
80
+ platform: "native"
81
+ };
82
+ const selected = options.nativeModule ? options.nativeModule(module) : `${calculate.source}?one-background=${encodeURIComponent(calculate.name)}`;
83
+ code.prepend(`import { ${calculate.name} as ${local} } from ${JSON.stringify(selected)};
84
+ `);
85
+ code.overwrite(argument.start, argument.end, local);
86
+ modules.push(module);
87
+ } else {
88
+ const module = loadBackgroundComputationModule(`${resolved}${marker}${hex(calculate.name)}.js`);
89
+ const factory = options.workerFactory ? options.workerFactory(module) : `() => new Worker(new URL(${JSON.stringify(module.id)}, import.meta.url), { type: 'module' })`;
90
+ code.appendLeft(tokens[opening + 2].start, `, ${factory}`);
91
+ modules.push(module);
92
+ }
93
+ }
94
+ if (!modules.length) return;
95
+ return {
96
+ code: code.toString(),
97
+ map: code.generateMap({ hires: true }),
98
+ modules
99
+ };
100
+ }
101
+ function createBackgroundWorkletModule(bundle, names, key) {
102
+ const loader = `__oneLoadWorkletModule_${key}`;
103
+ return `function ${loader}() {
104
+ 'worklet';
105
+ const cache = globalThis.__oneWorkletImportCache || (globalThis.__oneWorkletImportCache = new WeakMap());
106
+ let namespace = cache.get(${loader});
107
+ if (namespace === undefined) {
108
+ ${bundle}
109
+ namespace = __oneWorkletBundle;
110
+ cache.set(${loader}, namespace);
111
+ }
112
+ return namespace;
113
+ }
114
+ ${names.map((name, index) => `function __oneExport${index}(...args) {
115
+ 'worklet';
116
+ return (0, ${loader}().__export${index})(...args);
117
+ }
118
+ export { __oneExport${index} as ${name} };`).join("\n")}`;
119
+ }
120
+ function assertBackgroundDependency(source) {
121
+ const name = source.replaceAll("\\", "/");
122
+ if (name.startsWith("node:") || /(?:^|\/node_modules\/)(?:react|react-native|react-native-worklets|react-native-reanimated|@react-native)(?:\/|$)/.test(name)) throw new Error(`[one background] runtime dependency ${source} is not pure JavaScript`);
123
+ }
124
+ function bundleBackgroundGraph(modules, entry, names) {
125
+ return `var __oneWorkletBundle = (function () {
126
+ const factories = { ${modules.map((module) => `${module.id}: function(global, _require, _importDefault, _importAll, module, exports, _dependencyMap) {
127
+ ${module.code}
128
+ }`).join(",\n")} };
129
+ const dependencies = ${JSON.stringify(Object.fromEntries(modules.map((module) => [module.id, module.dependencies])))};
130
+ const cache = Object.create(null);
131
+ function require(id) {
132
+ if (cache[id]) return cache[id].exports;
133
+ const module = cache[id] = { exports: {} };
134
+ factories[id](globalThis, require, importDefault, importAll, module, module.exports, dependencies[id]);
135
+ return module.exports;
136
+ }
137
+ function importDefault(id) { const value = require(id); return value && value.__esModule ? value.default : value; }
138
+ function importAll(id) { const value = require(id); return value && value.__esModule ? value : Object.assign({ default: value }, value); }
139
+ const namespace = require(${entry});
140
+ return { ${names.map((name, index) => `__export${index}: namespace[${JSON.stringify(name)}]`).join(", ")} };
141
+ })();`;
142
+ }
143
+
144
+ export { assertBackgroundDependency, bundleBackgroundGraph, createBackgroundWorkletModule, loadBackgroundComputationModule, transformBackgroundComputations };
145
+ //# sourceMappingURL=backgroundComputation.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backgroundComputation.js","names":[],"sources":["backgroundComputation.js"],"sourcesContent":["import MagicString from \"magic-string\";\nimport { parse } from \"sucrase/dist/parser/index.js\";\nimport { IdentifierRole } from \"sucrase/dist/parser/tokenizer/index.js\";\nimport { TokenType } from \"sucrase/dist/parser/tokenizer/types.js\";\nconst marker = \".__one_background_worker_\";\nconst hex = (name) => [...new TextEncoder().encode(name)].map((byte) => byte.toString(16).padStart(2, \"0\")).join(\"\");\nfunction loadBackgroundComputationModule(id) {\n const match = id.match(/^(.*?)\\.__one_background_worker_([a-f0-9]+)\\.js(?:\\?.*)?$/);\n if (!match) return;\n const [, calculate, encoded] = match;\n const name = new TextDecoder().decode(\n Uint8Array.from(encoded.match(/../g), (byte) => Number.parseInt(byte, 16))\n );\n return {\n id,\n calculate,\n name,\n platform: \"web\",\n source: `import { ${name} as calculate } from ${JSON.stringify(calculate)};\nself.onmessage = ({ data: { revision, input } }) => {\n try {\n const value = calculate(input);\n if (value instanceof Promise) throw new TypeError('background computations must be synchronous');\n self.postMessage({ ok: true, result: { revision, value } });\n } catch (error) {\n self.postMessage({ ok: false, revision, error: String(error) });\n }\n};`\n };\n}\nfunction transformBackgroundComputations(source, id, options) {\n if (!source.includes(\"defineBackgroundComputation\") || id.includes(marker)) return;\n const file = parse(\n source,\n !/\\.[cm]?ts(?:\\?|$)/.test(id),\n /\\.[cm]?tsx?(?:\\?|$)/.test(id),\n false\n );\n const { tokens } = file;\n const text = (index) => tokens[index] ? source.slice(tokens[index].start, tokens[index].end) : \"\";\n const imports = /* @__PURE__ */ new Map();\n const definitions = /* @__PURE__ */ new Set();\n for (let index = 0; index < tokens.length; index++) {\n if (text(index) !== \"import\" || tokens[index].isType || text(index + 1) !== \"{\")\n continue;\n const start = index + 2;\n let end = start;\n while (end < tokens.length && text(end) !== \"}\") end++;\n if (text(end + 1) !== \"from\" || tokens[end + 2]?.type !== TokenType.string) continue;\n const specifier = text(end + 2).slice(1, -1);\n for (let binding = start; binding < end; binding++) {\n if (tokens[binding].isType || tokens[binding].type !== TokenType.name) continue;\n const name = text(binding);\n const local = text(binding + 1) === \"as\" ? text(binding + 2) : name;\n imports.set(local, { source: specifier, name });\n if (specifier === \"one/background\" && name === \"defineBackgroundComputation\")\n definitions.add(local);\n if (local !== name) binding += 2;\n }\n index = end + 2;\n }\n if (!definitions.size) return;\n const code = new MagicString(source);\n const modules = [];\n for (let index = 0; index < tokens.length; index++) {\n const token = tokens[index];\n if (token.identifierRole !== IdentifierRole.Access || !definitions.has(text(index)))\n continue;\n let opening = index + 1;\n while (tokens[opening]?.isType) opening++;\n if (text(opening) !== \"(\") continue;\n let binding = index - 2;\n while (tokens[binding]?.isType) binding--;\n if (token.scopeDepth !== 0 || text(index - 1) !== \"=\" || tokens[binding]?.identifierRole !== IdentifierRole.TopLevelDeclaration)\n throw new Error(\n `[one background] ${id}: definitions must be module-scope variables`\n );\n const argument = tokens[opening + 1];\n const calculate = argument?.type === TokenType.name ? imports.get(text(opening + 1)) : void 0;\n if (!calculate || !calculate.source.startsWith(\".\") || text(opening + 2) !== \")\")\n throw new Error(\n `[one background] ${id}: defineBackgroundComputation requires one named import from a relative pure module at module scope`\n );\n const resolved = options.resolve(calculate.source, id);\n if (options.platform === \"native\") {\n const local = `__oneBackgroundCalculate${modules.length}`;\n const module = {\n id: `${resolved}.__one_background_native_${hex(calculate.name)}.js`,\n source: `export { ${calculate.name} } from ${JSON.stringify(resolved)};`,\n calculate: resolved,\n name: calculate.name,\n platform: \"native\"\n };\n const selected = options.nativeModule ? options.nativeModule(module) : `${calculate.source}?one-background=${encodeURIComponent(calculate.name)}`;\n code.prepend(\n `import { ${calculate.name} as ${local} } from ${JSON.stringify(selected)};\n`\n );\n code.overwrite(argument.start, argument.end, local);\n modules.push(module);\n } else {\n const module = loadBackgroundComputationModule(\n `${resolved}${marker}${hex(calculate.name)}.js`\n );\n const factory = options.workerFactory ? options.workerFactory(module) : `() => new Worker(new URL(${JSON.stringify(module.id)}, import.meta.url), { type: 'module' })`;\n code.appendLeft(tokens[opening + 2].start, `, ${factory}`);\n modules.push(module);\n }\n }\n if (!modules.length) return;\n return { code: code.toString(), map: code.generateMap({ hires: true }), modules };\n}\nfunction createBackgroundWorkletModule(bundle, names, key) {\n const loader = `__oneLoadWorkletModule_${key}`;\n return `function ${loader}() {\n 'worklet';\n const cache = globalThis.__oneWorkletImportCache || (globalThis.__oneWorkletImportCache = new WeakMap());\n let namespace = cache.get(${loader});\n if (namespace === undefined) {\n ${bundle}\n namespace = __oneWorkletBundle;\n cache.set(${loader}, namespace);\n }\n return namespace;\n}\n${names.map(\n (name, index) => `function __oneExport${index}(...args) {\n 'worklet';\n return (0, ${loader}().__export${index})(...args);\n}\nexport { __oneExport${index} as ${name} };`\n ).join(\"\\n\")}`;\n}\nfunction assertBackgroundDependency(source) {\n const name = source.replaceAll(\"\\\\\", \"/\");\n if (name.startsWith(\"node:\") || /(?:^|\\/node_modules\\/)(?:react|react-native|react-native-worklets|react-native-reanimated|@react-native)(?:\\/|$)/.test(\n name\n ))\n throw new Error(\n `[one background] runtime dependency ${source} is not pure JavaScript`\n );\n}\nfunction bundleBackgroundGraph(modules, entry, names) {\n return `var __oneWorkletBundle = (function () {\n const factories = { ${modules.map((module) => `${module.id}: function(global, _require, _importDefault, _importAll, module, exports, _dependencyMap) {\n${module.code}\n}`).join(\",\\n\")} };\n const dependencies = ${JSON.stringify(Object.fromEntries(modules.map((module) => [module.id, module.dependencies])))};\n const cache = Object.create(null);\n function require(id) {\n if (cache[id]) return cache[id].exports;\n const module = cache[id] = { exports: {} };\n factories[id](globalThis, require, importDefault, importAll, module, module.exports, dependencies[id]);\n return module.exports;\n }\n function importDefault(id) { const value = require(id); return value && value.__esModule ? value.default : value; }\n function importAll(id) { const value = require(id); return value && value.__esModule ? value : Object.assign({ default: value }, value); }\n const namespace = require(${entry});\n return { ${names.map((name, index) => `__export${index}: namespace[${JSON.stringify(name)}]`).join(\", \")} };\n})();`;\n}\nexport {\n assertBackgroundDependency,\n bundleBackgroundGraph,\n createBackgroundWorkletModule,\n loadBackgroundComputationModule,\n transformBackgroundComputations\n};\n//# sourceMappingURL=backgroundComputation.js.map\n"],"mappings":";;;;;;AAIA,MAAM,SAAS;AACf,MAAM,OAAO,SAAS,CAAC,GAAG,IAAI,YAAY,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC,KAAK,SAAS,KAAK,SAAS,EAAE,CAAC,CAAC,SAAS,GAAG,GAAG,CAAC,CAAC,CAAC,KAAK,EAAE;AACnH,SAAS,gCAAgC,IAAI;CAC3C,MAAM,QAAQ,GAAG,MAAM,2DAA2D;CAClF,IAAI,CAAC,OAAO;CACZ,MAAM,GAAG,WAAW,WAAW;CAC/B,MAAM,OAAO,IAAI,YAAY,CAAC,CAAC,OAC7B,WAAW,KAAK,QAAQ,MAAM,KAAK,IAAI,SAAS,OAAO,SAAS,MAAM,EAAE,CAAC,CAC3E;CACA,OAAO;EACL;EACA;EACA;EACA,UAAU;EACV,QAAQ,YAAY,KAAK,uBAAuB,KAAK,UAAU,SAAS,EAAE;;;;;;;;;;CAU5E;AACF;AAC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;;8BAUzF,MAAM;aACvB,MAAM,KAAK,MAAM,UAAU,WAAW,MAAM,cAAc,KAAK,UAAU,IAAI,EAAE,EAAE,CAAC,CAAC,KAAK,IAAI,EAAE;;AAE3G"}
@@ -0,0 +1,163 @@
1
+ import MagicString from "magic-string";
2
+ import { parse } from "sucrase/dist/parser/index.js";
3
+ import { IdentifierRole } from "sucrase/dist/parser/tokenizer/index.js";
4
+ import { TokenType } from "sucrase/dist/parser/tokenizer/types.js";
5
+
6
+ var marker = ".__one_background_worker_";
7
+ var hex = function(name) {
8
+ return [...new TextEncoder().encode(name)].map(function(byte) {
9
+ return byte.toString(16).padStart(2, "0");
10
+ }).join("");
11
+ };
12
+ function loadBackgroundComputationModule(id) {
13
+ var match = id.match(/^(.*?)\.__one_background_worker_([a-f0-9]+)\.js(?:\?.*)?$/);
14
+ if (!match) return;
15
+ var [, calculate, encoded] = match;
16
+ var name = new TextDecoder().decode(Uint8Array.from(encoded.match(/../g), function(byte) {
17
+ return Number.parseInt(byte, 16);
18
+ }));
19
+ return {
20
+ id,
21
+ calculate,
22
+ name,
23
+ platform: "web",
24
+ source: `import { ${name} as calculate } from ${JSON.stringify(calculate)};
25
+ self.onmessage = ({ data: { revision, input } }) => {
26
+ try {
27
+ const value = calculate(input);
28
+ if (value instanceof Promise) throw new TypeError('background computations must be synchronous');
29
+ self.postMessage({ ok: true, result: { revision, value } });
30
+ } catch (error) {
31
+ self.postMessage({ ok: false, revision, error: String(error) });
32
+ }
33
+ };`
34
+ };
35
+ }
36
+ function transformBackgroundComputations(source, id, options) {
37
+ if (!source.includes("defineBackgroundComputation") || id.includes(marker)) return;
38
+ var file = parse(source, !/\.[cm]?ts(?:\?|$)/.test(id), /\.[cm]?tsx?(?:\?|$)/.test(id), false);
39
+ var { tokens } = file;
40
+ var text = function(index2) {
41
+ return tokens[index2] ? source.slice(tokens[index2].start, tokens[index2].end) : "";
42
+ };
43
+ var imports = /* @__PURE__ */ new Map();
44
+ var definitions = /* @__PURE__ */ new Set();
45
+ for (var index = 0; index < tokens.length; index++) {
46
+ var _tokens_;
47
+ if (text(index) !== "import" || tokens[index].isType || text(index + 1) !== "{") continue;
48
+ var start = index + 2;
49
+ var end = start;
50
+ while (end < tokens.length && text(end) !== "}") end++;
51
+ if (text(end + 1) !== "from" || ((_tokens_ = tokens[end + 2]) === null || _tokens_ === void 0 ? void 0 : _tokens_.type) !== TokenType.string) continue;
52
+ var specifier = text(end + 2).slice(1, -1);
53
+ for (var binding = start; binding < end; binding++) {
54
+ if (tokens[binding].isType || tokens[binding].type !== TokenType.name) continue;
55
+ var name = text(binding);
56
+ var local = text(binding + 1) === "as" ? text(binding + 2) : name;
57
+ imports.set(local, {
58
+ source: specifier,
59
+ name
60
+ });
61
+ if (specifier === "one/background" && name === "defineBackgroundComputation") definitions.add(local);
62
+ if (local !== name) binding += 2;
63
+ }
64
+ index = end + 2;
65
+ }
66
+ if (!definitions.size) return;
67
+ var code = new MagicString(source);
68
+ var modules = [];
69
+ for (var index1 = 0; index1 < tokens.length; index1++) {
70
+ var _tokens_opening, _tokens_binding, _tokens_binding1;
71
+ var token = tokens[index1];
72
+ if (token.identifierRole !== IdentifierRole.Access || !definitions.has(text(index1))) continue;
73
+ var opening = index1 + 1;
74
+ while ((_tokens_opening = tokens[opening]) === null || _tokens_opening === void 0 ? void 0 : _tokens_opening.isType) opening++;
75
+ if (text(opening) !== "(") continue;
76
+ var binding1 = index1 - 2;
77
+ while ((_tokens_binding = tokens[binding1]) === null || _tokens_binding === void 0 ? void 0 : _tokens_binding.isType) binding1--;
78
+ if (token.scopeDepth !== 0 || text(index1 - 1) !== "=" || ((_tokens_binding1 = tokens[binding1]) === null || _tokens_binding1 === void 0 ? void 0 : _tokens_binding1.identifierRole) !== IdentifierRole.TopLevelDeclaration) throw new Error(`[one background] ${id}: definitions must be module-scope variables`);
79
+ var argument = tokens[opening + 1];
80
+ var calculate = (argument === null || argument === void 0 ? void 0 : argument.type) === TokenType.name ? imports.get(text(opening + 1)) : void 0;
81
+ if (!calculate || !calculate.source.startsWith(".") || text(opening + 2) !== ")") throw new Error(`[one background] ${id}: defineBackgroundComputation requires one named import from a relative pure module at module scope`);
82
+ var resolved = options.resolve(calculate.source, id);
83
+ if (options.platform === "native") {
84
+ var local1 = `__oneBackgroundCalculate${modules.length}`;
85
+ var module = {
86
+ id: `${resolved}.__one_background_native_${hex(calculate.name)}.js`,
87
+ source: `export { ${calculate.name} } from ${JSON.stringify(resolved)};`,
88
+ calculate: resolved,
89
+ name: calculate.name,
90
+ platform: "native"
91
+ };
92
+ var selected = options.nativeModule ? options.nativeModule(module) : `${calculate.source}?one-background=${encodeURIComponent(calculate.name)}`;
93
+ code.prepend(`import { ${calculate.name} as ${local1} } from ${JSON.stringify(selected)};
94
+ `);
95
+ code.overwrite(argument.start, argument.end, local1);
96
+ modules.push(module);
97
+ } else {
98
+ var module1 = loadBackgroundComputationModule(`${resolved}${marker}${hex(calculate.name)}.js`);
99
+ var factory = options.workerFactory ? options.workerFactory(module1) : `() => new Worker(new URL(${JSON.stringify(module1.id)}, import.meta.url), { type: 'module' })`;
100
+ code.appendLeft(tokens[opening + 2].start, `, ${factory}`);
101
+ modules.push(module1);
102
+ }
103
+ }
104
+ if (!modules.length) return;
105
+ return {
106
+ code: code.toString(),
107
+ map: code.generateMap({ hires: true }),
108
+ modules
109
+ };
110
+ }
111
+ function createBackgroundWorkletModule(bundle, names, key) {
112
+ var loader = `__oneLoadWorkletModule_${key}`;
113
+ return `function ${loader}() {
114
+ 'worklet';
115
+ const cache = globalThis.__oneWorkletImportCache || (globalThis.__oneWorkletImportCache = new WeakMap());
116
+ let namespace = cache.get(${loader});
117
+ if (namespace === undefined) {
118
+ ${bundle}
119
+ namespace = __oneWorkletBundle;
120
+ cache.set(${loader}, namespace);
121
+ }
122
+ return namespace;
123
+ }
124
+ ${names.map(function(name, index) {
125
+ return `function __oneExport${index}(...args) {
126
+ 'worklet';
127
+ return (0, ${loader}().__export${index})(...args);
128
+ }
129
+ export { __oneExport${index} as ${name} };`;
130
+ }).join("\n")}`;
131
+ }
132
+ function assertBackgroundDependency(source) {
133
+ var name = source.replaceAll("\\", "/");
134
+ if (name.startsWith("node:") || /(?:^|\/node_modules\/)(?:react|react-native|react-native-worklets|react-native-reanimated|@react-native)(?:\/|$)/.test(name)) throw new Error(`[one background] runtime dependency ${source} is not pure JavaScript`);
135
+ }
136
+ function bundleBackgroundGraph(modules, entry, names) {
137
+ return `var __oneWorkletBundle = (function () {
138
+ const factories = { ${modules.map(function(module) {
139
+ return `${module.id}: function(global, _require, _importDefault, _importAll, module, exports, _dependencyMap) {
140
+ ${module.code}
141
+ }`;
142
+ }).join(",\n")} };
143
+ const dependencies = ${JSON.stringify(Object.fromEntries(modules.map(function(module) {
144
+ return [module.id, module.dependencies];
145
+ })))};
146
+ const cache = Object.create(null);
147
+ function require(id) {
148
+ if (cache[id]) return cache[id].exports;
149
+ const module = cache[id] = { exports: {} };
150
+ factories[id](globalThis, require, importDefault, importAll, module, module.exports, dependencies[id]);
151
+ return module.exports;
152
+ }
153
+ function importDefault(id) { const value = require(id); return value && value.__esModule ? value.default : value; }
154
+ function importAll(id) { const value = require(id); return value && value.__esModule ? value : Object.assign({ default: value }, value); }
155
+ const namespace = require(${entry});
156
+ return { ${names.map(function(name, index) {
157
+ return `__export${index}: namespace[${JSON.stringify(name)}]`;
158
+ }).join(", ")} };
159
+ })();`;
160
+ }
161
+
162
+ export { assertBackgroundDependency, bundleBackgroundGraph, createBackgroundWorkletModule, loadBackgroundComputationModule, transformBackgroundComputations };
163
+ //# sourceMappingURL=backgroundComputation.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backgroundComputation.native.js","names":[],"sources":["backgroundComputation.native.js"],"sourcesContent":["import MagicString from \"magic-string\";\nimport { parse } from \"sucrase/dist/parser/index.js\";\nimport { IdentifierRole } from \"sucrase/dist/parser/tokenizer/index.js\";\nimport { TokenType } from \"sucrase/dist/parser/tokenizer/types.js\";\nvar marker = \".__one_background_worker_\";\nvar hex = function(name) {\n return [\n ...new TextEncoder().encode(name)\n ].map(function(byte) {\n return byte.toString(16).padStart(2, \"0\");\n }).join(\"\");\n};\nfunction loadBackgroundComputationModule(id) {\n var match = id.match(/^(.*?)\\.__one_background_worker_([a-f0-9]+)\\.js(?:\\?.*)?$/);\n if (!match) return;\n var [, calculate, encoded] = match;\n var name = new TextDecoder().decode(Uint8Array.from(encoded.match(/../g), function(byte) {\n return Number.parseInt(byte, 16);\n }));\n return {\n id,\n calculate,\n name,\n platform: \"web\",\n source: `import { ${name} as calculate } from ${JSON.stringify(calculate)};\nself.onmessage = ({ data: { revision, input } }) => {\n try {\n const value = calculate(input);\n if (value instanceof Promise) throw new TypeError('background computations must be synchronous');\n self.postMessage({ ok: true, result: { revision, value } });\n } catch (error) {\n self.postMessage({ ok: false, revision, error: String(error) });\n }\n};`\n };\n}\nfunction transformBackgroundComputations(source, id, options) {\n if (!source.includes(\"defineBackgroundComputation\") || id.includes(marker)) return;\n var file = parse(source, !/\\.[cm]?ts(?:\\?|$)/.test(id), /\\.[cm]?tsx?(?:\\?|$)/.test(id), false);\n var { tokens } = file;\n var text = function(index2) {\n return tokens[index2] ? source.slice(tokens[index2].start, tokens[index2].end) : \"\";\n };\n var imports = /* @__PURE__ */ new Map();\n var definitions = /* @__PURE__ */ new Set();\n for (var index = 0; index < tokens.length; index++) {\n var _tokens_;\n if (text(index) !== \"import\" || tokens[index].isType || text(index + 1) !== \"{\") continue;\n var start = index + 2;\n var end = start;\n while (end < tokens.length && text(end) !== \"}\") end++;\n if (text(end + 1) !== \"from\" || ((_tokens_ = tokens[end + 2]) === null || _tokens_ === void 0 ? void 0 : _tokens_.type) !== TokenType.string) continue;\n var specifier = text(end + 2).slice(1, -1);\n for (var binding = start; binding < end; binding++) {\n if (tokens[binding].isType || tokens[binding].type !== TokenType.name) continue;\n var name = text(binding);\n var local = text(binding + 1) === \"as\" ? text(binding + 2) : name;\n imports.set(local, {\n source: specifier,\n name\n });\n if (specifier === \"one/background\" && name === \"defineBackgroundComputation\") definitions.add(local);\n if (local !== name) binding += 2;\n }\n index = end + 2;\n }\n if (!definitions.size) return;\n var code = new MagicString(source);\n var modules = [];\n for (var index1 = 0; index1 < tokens.length; index1++) {\n var _tokens_opening, _tokens_binding, _tokens_binding1;\n var token = tokens[index1];\n if (token.identifierRole !== IdentifierRole.Access || !definitions.has(text(index1))) continue;\n var opening = index1 + 1;\n while ((_tokens_opening = tokens[opening]) === null || _tokens_opening === void 0 ? void 0 : _tokens_opening.isType) opening++;\n if (text(opening) !== \"(\") continue;\n var binding1 = index1 - 2;\n while ((_tokens_binding = tokens[binding1]) === null || _tokens_binding === void 0 ? void 0 : _tokens_binding.isType) binding1--;\n if (token.scopeDepth !== 0 || text(index1 - 1) !== \"=\" || ((_tokens_binding1 = tokens[binding1]) === null || _tokens_binding1 === void 0 ? void 0 : _tokens_binding1.identifierRole) !== IdentifierRole.TopLevelDeclaration) throw new Error(`[one background] ${id}: definitions must be module-scope variables`);\n var argument = tokens[opening + 1];\n var calculate = (argument === null || argument === void 0 ? void 0 : argument.type) === TokenType.name ? imports.get(text(opening + 1)) : void 0;\n if (!calculate || !calculate.source.startsWith(\".\") || text(opening + 2) !== \")\") throw new Error(`[one background] ${id}: defineBackgroundComputation requires one named import from a relative pure module at module scope`);\n var resolved = options.resolve(calculate.source, id);\n if (options.platform === \"native\") {\n var local1 = `__oneBackgroundCalculate${modules.length}`;\n var module = {\n id: `${resolved}.__one_background_native_${hex(calculate.name)}.js`,\n source: `export { ${calculate.name} } from ${JSON.stringify(resolved)};`,\n calculate: resolved,\n name: calculate.name,\n platform: \"native\"\n };\n var selected = options.nativeModule ? options.nativeModule(module) : `${calculate.source}?one-background=${encodeURIComponent(calculate.name)}`;\n code.prepend(`import { ${calculate.name} as ${local1} } from ${JSON.stringify(selected)};\n`);\n code.overwrite(argument.start, argument.end, local1);\n modules.push(module);\n } else {\n var module1 = loadBackgroundComputationModule(`${resolved}${marker}${hex(calculate.name)}.js`);\n var factory = options.workerFactory ? options.workerFactory(module1) : `() => new Worker(new URL(${JSON.stringify(module1.id)}, import.meta.url), { type: 'module' })`;\n code.appendLeft(tokens[opening + 2].start, `, ${factory}`);\n modules.push(module1);\n }\n }\n if (!modules.length) return;\n return {\n code: code.toString(),\n map: code.generateMap({\n hires: true\n }),\n modules\n };\n}\nfunction createBackgroundWorkletModule(bundle, names, key) {\n var loader = `__oneLoadWorkletModule_${key}`;\n return `function ${loader}() {\n 'worklet';\n const cache = globalThis.__oneWorkletImportCache || (globalThis.__oneWorkletImportCache = new WeakMap());\n let namespace = cache.get(${loader});\n if (namespace === undefined) {\n ${bundle}\n namespace = __oneWorkletBundle;\n cache.set(${loader}, namespace);\n }\n return namespace;\n}\n${names.map(function(name, index) {\n return `function __oneExport${index}(...args) {\n 'worklet';\n return (0, ${loader}().__export${index})(...args);\n}\nexport { __oneExport${index} as ${name} };`;\n }).join(\"\\n\")}`;\n}\nfunction assertBackgroundDependency(source) {\n var name = source.replaceAll(\"\\\\\", \"/\");\n if (name.startsWith(\"node:\") || /(?:^|\\/node_modules\\/)(?:react|react-native|react-native-worklets|react-native-reanimated|@react-native)(?:\\/|$)/.test(name)) throw new Error(`[one background] runtime dependency ${source} is not pure JavaScript`);\n}\nfunction bundleBackgroundGraph(modules, entry, names) {\n return `var __oneWorkletBundle = (function () {\n const factories = { ${modules.map(function(module) {\n return `${module.id}: function(global, _require, _importDefault, _importAll, module, exports, _dependencyMap) {\n${module.code}\n}`;\n }).join(\",\\n\")} };\n const dependencies = ${JSON.stringify(Object.fromEntries(modules.map(function(module) {\n return [\n module.id,\n module.dependencies\n ];\n })))};\n const cache = Object.create(null);\n function require(id) {\n if (cache[id]) return cache[id].exports;\n const module = cache[id] = { exports: {} };\n factories[id](globalThis, require, importDefault, importAll, module, module.exports, dependencies[id]);\n return module.exports;\n }\n function importDefault(id) { const value = require(id); return value && value.__esModule ? value.default : value; }\n function importAll(id) { const value = require(id); return value && value.__esModule ? value : Object.assign({ default: value }, value); }\n const namespace = require(${entry});\n return { ${names.map(function(name, index) {\n return `__export${index}: namespace[${JSON.stringify(name)}]`;\n }).join(\", \")} };\n})();`;\n}\nexport {\n assertBackgroundDependency,\n bundleBackgroundGraph,\n createBackgroundWorkletModule,\n loadBackgroundComputationModule,\n transformBackgroundComputations\n};\n//# sourceMappingURL=backgroundComputation.js.map\n"],"mappings":";;;;;;AAIA,IAAI,SAAS;AACb,IAAI,MAAM,SAAS,MAAM;CACvB,OAAO,CACL,GAAG,IAAI,YAAY,CAAC,CAAC,OAAO,IAAI,CAClC,CAAC,CAAC,IAAI,SAAS,MAAM;EACnB,OAAO,KAAK,SAAS,EAAE,CAAC,CAAC,SAAS,GAAG,GAAG;CAC1C,CAAC,CAAC,CAAC,KAAK,EAAE;AACZ;AACA,SAAS,gCAAgC,IAAI;CAC3C,IAAI,QAAQ,GAAG,MAAM,2DAA2D;CAChF,IAAI,CAAC,OAAO;CACZ,IAAI,GAAG,WAAW,WAAW;CAC7B,IAAI,OAAO,IAAI,YAAY,CAAC,CAAC,OAAO,WAAW,KAAK,QAAQ,MAAM,KAAK,GAAG,SAAS,MAAM;EACvF,OAAO,OAAO,SAAS,MAAM,EAAE;CACjC,CAAC,CAAC;CACF,OAAO;EACL;EACA;EACA;EACA,UAAU;EACV,QAAQ,YAAY,KAAK,uBAAuB,KAAK,UAAU,SAAS,EAAE;;;;;;;;;;CAU5E;AACF;AACA,SAAS,gCAAgC,QAAQ,IAAI,SAAS;CAC5D,IAAI,CAAC,OAAO,SAAS,6BAA6B,KAAK,GAAG,SAAS,MAAM,GAAG;CAC5E,IAAI,OAAO,MAAM,QAAQ,CAAC,oBAAoB,KAAK,EAAE,GAAG,sBAAsB,KAAK,EAAE,GAAG,KAAK;CAC7F,IAAI,EAAE,WAAW;CACjB,IAAI,OAAO,SAAS,QAAQ;EAC1B,OAAO,OAAO,UAAU,OAAO,MAAM,OAAO,OAAO,CAAC,OAAO,OAAO,OAAO,CAAC,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T;CACF,CAAC,CAAC,CAAC,EAAE;;;;;;;;;;8BAUuB,MAAM;aACvB,MAAM,IAAI,SAAS,MAAM,OAAO;EACzC,OAAO,WAAW,MAAM,cAAc,KAAK,UAAU,IAAI,EAAE;CAC7D,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE;;AAEhB"}
@@ -0,0 +1,16 @@
1
+ import { JS_GLOBALS, getClosureVariables, transformHermesLoops } from "@vxrn/compiler/worklet-utils";
2
+ import { parseSync } from "oxc-parser";
3
+
4
+ function prepareBackgroundWorkletModule(source, id) {
5
+ const code = transformHermesLoops(source, id)?.code ?? source;
6
+ const parsed = parseSync(id, code, { lang: "js" });
7
+ if (parsed.errors.length) throw new Error(parsed.errors[0].message);
8
+ const captures = getClosureVariables(parsed.program.body[0], /* @__PURE__ */ new Set([...JS_GLOBALS, "arguments"]));
9
+ if (captures.length) {
10
+ throw new Error(`[worklet imports] ${id} requires unsupported runtime globals: ${captures.join(", ")}`);
11
+ }
12
+ return code;
13
+ }
14
+
15
+ export { prepareBackgroundWorkletModule };
16
+ //# sourceMappingURL=backgroundComputationNative.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backgroundComputationNative.js","names":[],"sources":["backgroundComputationNative.js"],"sourcesContent":["import {\n getClosureVariables,\n JS_GLOBALS,\n transformHermesLoops\n} from \"@vxrn/compiler/worklet-utils\";\nimport { parseSync } from \"oxc-parser\";\nfunction prepareBackgroundWorkletModule(source, id) {\n const code = transformHermesLoops(source, id)?.code ?? source;\n const parsed = parseSync(id, code, { lang: \"js\" });\n if (parsed.errors.length) throw new Error(parsed.errors[0].message);\n const captures = getClosureVariables(\n parsed.program.body[0],\n /* @__PURE__ */ new Set([...JS_GLOBALS, \"arguments\"])\n );\n if (captures.length) {\n throw new Error(\n `[worklet imports] ${id} requires unsupported runtime globals: ${captures.join(\", \")}`\n );\n }\n return code;\n}\nexport {\n prepareBackgroundWorkletModule\n};\n//# sourceMappingURL=backgroundComputationNative.js.map\n"],"mappings":";;;;AAMA,SAAS,+BAA+B,QAAQ,IAAI;CAClD,MAAM,OAAO,qBAAqB,QAAQ,EAAE,CAAC,EAAE,QAAQ;CACvD,MAAM,SAAS,UAAU,IAAI,MAAM,EAAE,MAAM,KAAK,CAAC;CACjD,IAAI,OAAO,OAAO,QAAQ,MAAM,IAAI,MAAM,OAAO,OAAO,EAAE,CAAC,OAAO;CAClE,MAAM,WAAW,oBACf,OAAO,QAAQ,KAAK,oBACJ,IAAI,IAAI,CAAC,GAAG,YAAY,WAAW,CAAC,CACtD;CACA,IAAI,SAAS,QAAQ;EACnB,MAAM,IAAI,MACR,qBAAqB,GAAG,yCAAyC,SAAS,KAAK,IAAI,GACrF;CACF;CACA,OAAO;AACT"}
@@ -0,0 +1,18 @@
1
+ import { JS_GLOBALS, getClosureVariables, transformHermesLoops } from "@vxrn/compiler/worklet-utils";
2
+ import { parseSync } from "oxc-parser";
3
+
4
+ function prepareBackgroundWorkletModule(source, id) {
5
+ var _ref;
6
+ var _transformHermesLoops;
7
+ var code = (_ref = (_transformHermesLoops = transformHermesLoops(source, id)) === null || _transformHermesLoops === void 0 ? void 0 : _transformHermesLoops.code) !== null && _ref !== void 0 ? _ref : source;
8
+ var parsed = parseSync(id, code, { lang: "js" });
9
+ if (parsed.errors.length) throw new Error(parsed.errors[0].message);
10
+ var captures = getClosureVariables(parsed.program.body[0], /* @__PURE__ */ new Set([...JS_GLOBALS, "arguments"]));
11
+ if (captures.length) {
12
+ throw new Error(`[worklet imports] ${id} requires unsupported runtime globals: ${captures.join(", ")}`);
13
+ }
14
+ return code;
15
+ }
16
+
17
+ export { prepareBackgroundWorkletModule };
18
+ //# sourceMappingURL=backgroundComputationNative.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backgroundComputationNative.native.js","names":[],"sources":["backgroundComputationNative.native.js"],"sourcesContent":["import { getClosureVariables, JS_GLOBALS, transformHermesLoops } from \"@vxrn/compiler/worklet-utils\";\nimport { parseSync } from \"oxc-parser\";\nfunction prepareBackgroundWorkletModule(source, id) {\n var _ref;\n var _transformHermesLoops;\n var code = (_ref = (_transformHermesLoops = transformHermesLoops(source, id)) === null || _transformHermesLoops === void 0 ? void 0 : _transformHermesLoops.code) !== null && _ref !== void 0 ? _ref : source;\n var parsed = parseSync(id, code, {\n lang: \"js\"\n });\n if (parsed.errors.length) throw new Error(parsed.errors[0].message);\n var captures = getClosureVariables(parsed.program.body[0], /* @__PURE__ */ new Set([\n ...JS_GLOBALS,\n \"arguments\"\n ]));\n if (captures.length) {\n throw new Error(`[worklet imports] ${id} requires unsupported runtime globals: ${captures.join(\", \")}`);\n }\n return code;\n}\nexport {\n prepareBackgroundWorkletModule\n};\n//# sourceMappingURL=backgroundComputationNative.js.map\n"],"mappings":";;;;AAEA,SAAS,+BAA+B,QAAQ,IAAI;CAClD,IAAI;CACJ,IAAI;CACJ,IAAI,QAAQ,QAAQ,wBAAwB,qBAAqB,QAAQ,EAAE,OAAO,QAAQ,0BAA0B,KAAK,IAAI,KAAK,IAAI,sBAAsB,UAAU,QAAQ,SAAS,KAAK,IAAI,OAAO;CACvM,IAAI,SAAS,UAAU,IAAI,MAAM,EAC/B,MAAM,KACR,CAAC;CACD,IAAI,OAAO,OAAO,QAAQ,MAAM,IAAI,MAAM,OAAO,OAAO,EAAE,CAAC,OAAO;CAClE,IAAI,WAAW,oBAAoB,OAAO,QAAQ,KAAK,oBAAoB,IAAI,IAAI,CACjF,GAAG,YACH,WACF,CAAC,CAAC;CACF,IAAI,SAAS,QAAQ;EACnB,MAAM,IAAI,MAAM,qBAAqB,GAAG,yCAAyC,SAAS,KAAK,IAAI,GAAG;CACxG;CACA,OAAO;AACT"}
@@ -38,6 +38,7 @@ async function getBaseViteConfig(config) {
38
38
  const { version } = await FSExtra.readJSON(reactNativePackageJsonPath);
39
39
  return {
40
40
  mode,
41
+ assetsInclude: ["**/*.glb"],
41
42
  css: postCSSConfigPath ? { postcss: postCSSConfigPath } : {
42
43
  transformer: "lightningcss",
43
44
  lightningcss: { targets: { safari: 15 << 16 | 2 << 8 } }
@@ -1 +1 @@
1
- {"version":3,"file":"getBaseViteConfigOnly.js","names":[],"sources":["config/getBaseViteConfigOnly.js"],"sourcesContent":["import { resolvePath } from \"@vxrn/resolve\";\nimport FSExtra from \"fs-extra\";\nimport { join } from \"node:path\";\nconst dedupe = [\n \"one\",\n \"react\",\n \"react-dom\",\n \"react-dom/client\",\n \"react-native-web\",\n \"react-native-web-lite\",\n \"@react-navigation/core\",\n \"@react-navigation/native\",\n \"@react-navigation/elements\",\n \"@react-navigation/native-stack\",\n \"@react-navigation/bottom-tabs\",\n \"@tamagui/core\",\n \"@tamagui/web\",\n \"@tamagui/react-native-web\",\n \"@tamagui/react-native-web-lite\",\n \"tamagui\",\n \"react-native-reanimated\",\n \"escape-string-regexp\"\n];\nasync function getBaseViteConfig(config) {\n const { root, mode } = config;\n const postCSSPaths = [\n join(root, \"postcss.config.js\"),\n join(root, \"postcss.config.ts\"),\n join(root, \"postcss.config.json\")\n ];\n const postCSSConfigPath = (await Promise.all(\n postCSSPaths.map(async (x) => {\n if (await FSExtra.pathExists(x)) {\n return x;\n }\n })\n )).find((x) => typeof x === \"string\");\n const reactNativePackageJsonPath = resolvePath(\"react-native/package.json\", root);\n const { version } = await FSExtra.readJSON(reactNativePackageJsonPath);\n return {\n mode,\n // we load the config ourselves\n // if you disable this is disables auto-reloading config changes\n // configFile: false,\n // TODO make this documented / configurable through the plugins\n css: postCSSConfigPath ? {\n postcss: postCSSConfigPath\n } : {\n transformer: \"lightningcss\",\n lightningcss: {\n targets: {\n safari: 15 << 16 | 2 << 8\n }\n }\n },\n define: {\n __DEV__: `${mode === \"development\"}`,\n \"process.env.NODE_ENV\": `\"${mode}\"`,\n \"process.env.REACT_NATIVE_VERSION\": `\"${version}\"`\n },\n resolve: {\n alias: [\n // deep react-native/Libraries/* paths must be caught BEFORE the general\n // react-native → react-native-web alias, since react-native-web doesn't\n // have these native-only subpaths\n {\n find: /^react-native\\/Libraries\\/.*/,\n replacement: resolvePath(\"@vxrn/vite-plugin-metro/empty\", import.meta.dirname)\n },\n {\n // react native 0.87 removed @react-native/assets-registry, but libraries\n // like react-native-svg still import its registry\n find: /^(react-native\\/asset-registry|@react-native\\/assets-registry\\/registry)$/,\n replacement: \"react-native-web/dist/modules/AssetRegistry\"\n },\n {\n find: \"react-native/package.json\",\n replacement: \"react-native-web/package.json\"\n },\n // named by package so it resolves (from the root, through dedupe) only\n // once something imports react-native: an app with no react-native\n // imports needs no react-native-web.\n {\n find: \"react-native\",\n replacement: \"react-native-web\"\n },\n // bundle size optimizations\n {\n find: \"query-string\",\n replacement: resolvePath(\"@vxrn/query-string\", root)\n },\n {\n find: \"url-parse\",\n replacement: resolvePath(\"@vxrn/url-parse\", root)\n }\n ],\n // TODO auto dedupe all include optimize deps?\n dedupe\n },\n build: {},\n // enable OXC React Refresh so component registration ($RefreshReg$) is\n // injected into TSX/JSX output; the one:react-refresh-web compiler plugin\n // then wraps the output with the runtime preamble and import.meta.hot.accept\n // only enable in dev mode - in production the refresh plugin doesn't run,\n // leaving $RefreshReg$ undefined which crashes client-side JS\n oxc: {\n jsx: {\n refresh: mode === \"development\"\n }\n }\n };\n}\nexport {\n dedupe,\n getBaseViteConfig\n};\n//# sourceMappingURL=getBaseViteConfigOnly.js.map\n"],"mappings":";;;;;AAGA,MAAM,SAAS;CACb;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AACA,eAAe,kBAAkB,QAAQ;CACvC,MAAM,EAAE,MAAM,SAAS;CACvB,MAAM,eAAe;EACnB,KAAK,MAAM,mBAAmB;EAC9B,KAAK,MAAM,mBAAmB;EAC9B,KAAK,MAAM,qBAAqB;CAClC;CACA,MAAM,qBAAqB,MAAM,QAAQ,IACvC,aAAa,IAAI,OAAO,MAAM;EAC5B,IAAI,MAAM,QAAQ,WAAW,CAAC,GAAG;GAC/B,OAAO;EACT;CACF,CAAC,CACH,EAAC,CAAE,MAAM,MAAM,OAAO,MAAM,QAAQ;CACpC,MAAM,6BAA6B,YAAY,6BAA6B,IAAI;CAChF,MAAM,EAAE,YAAY,MAAM,QAAQ,SAAS,0BAA0B;CACrE,OAAO;EACL;EAKA,KAAK,oBAAoB,EACvB,SAAS,kBACX,IAAI;GACF,aAAa;GACb,cAAc,EACZ,SAAS,EACP,QAAQ,MAAM,KAAK,KAAK,EAC1B,EACF;EACF;EACA,QAAQ;GACN,SAAS,GAAG,SAAS;GACrB,wBAAwB,IAAI,KAAK;GACjC,oCAAoC,IAAI,QAAQ;EAClD;EACA,SAAS;GACP,OAAO;IAIL;KACE,MAAM;KACN,aAAa,YAAY,iCAAiC,YAAY,OAAO;IAC/E;IACA;KAGE,MAAM;KACN,aAAa;IACf;IACA;KACE,MAAM;KACN,aAAa;IACf;IAIA;KACE,MAAM;KACN,aAAa;IACf;IAEA;KACE,MAAM;KACN,aAAa,YAAY,sBAAsB,IAAI;IACrD;IACA;KACE,MAAM;KACN,aAAa,YAAY,mBAAmB,IAAI;IAClD;GACF;GAEA;EACF;EACA,OAAO,CAAC;EAMR,KAAK,EACH,KAAK,EACH,SAAS,SAAS,cACpB,EACF;CACF;AACF"}
1
+ {"version":3,"file":"getBaseViteConfigOnly.js","names":[],"sources":["config/getBaseViteConfigOnly.js"],"sourcesContent":["import { resolvePath } from \"@vxrn/resolve\";\nimport FSExtra from \"fs-extra\";\nimport { join } from \"node:path\";\nconst dedupe = [\n \"one\",\n \"react\",\n \"react-dom\",\n \"react-dom/client\",\n \"react-native-web\",\n \"react-native-web-lite\",\n \"@react-navigation/core\",\n \"@react-navigation/native\",\n \"@react-navigation/elements\",\n \"@react-navigation/native-stack\",\n \"@react-navigation/bottom-tabs\",\n \"@tamagui/core\",\n \"@tamagui/web\",\n \"@tamagui/react-native-web\",\n \"@tamagui/react-native-web-lite\",\n \"tamagui\",\n \"react-native-reanimated\",\n \"escape-string-regexp\"\n];\nasync function getBaseViteConfig(config) {\n const { root, mode } = config;\n const postCSSPaths = [\n join(root, \"postcss.config.js\"),\n join(root, \"postcss.config.ts\"),\n join(root, \"postcss.config.json\")\n ];\n const postCSSConfigPath = (await Promise.all(\n postCSSPaths.map(async (x) => {\n if (await FSExtra.pathExists(x)) {\n return x;\n }\n })\n )).find((x) => typeof x === \"string\");\n const reactNativePackageJsonPath = resolvePath(\"react-native/package.json\", root);\n const { version } = await FSExtra.readJSON(reactNativePackageJsonPath);\n return {\n mode,\n assetsInclude: [\"**/*.glb\"],\n // we load the config ourselves\n // if you disable this is disables auto-reloading config changes\n // configFile: false,\n // TODO make this documented / configurable through the plugins\n css: postCSSConfigPath ? {\n postcss: postCSSConfigPath\n } : {\n transformer: \"lightningcss\",\n lightningcss: {\n targets: {\n safari: 15 << 16 | 2 << 8\n }\n }\n },\n define: {\n __DEV__: `${mode === \"development\"}`,\n \"process.env.NODE_ENV\": `\"${mode}\"`,\n \"process.env.REACT_NATIVE_VERSION\": `\"${version}\"`\n },\n resolve: {\n alias: [\n // deep react-native/Libraries/* paths must be caught BEFORE the general\n // react-native → react-native-web alias, since react-native-web doesn't\n // have these native-only subpaths\n {\n find: /^react-native\\/Libraries\\/.*/,\n replacement: resolvePath(\"@vxrn/vite-plugin-metro/empty\", import.meta.dirname)\n },\n {\n // react native 0.87 removed @react-native/assets-registry, but libraries\n // like react-native-svg still import its registry\n find: /^(react-native\\/asset-registry|@react-native\\/assets-registry\\/registry)$/,\n replacement: \"react-native-web/dist/modules/AssetRegistry\"\n },\n {\n find: \"react-native/package.json\",\n replacement: \"react-native-web/package.json\"\n },\n // named by package so it resolves (from the root, through dedupe) only\n // once something imports react-native: an app with no react-native\n // imports needs no react-native-web.\n {\n find: \"react-native\",\n replacement: \"react-native-web\"\n },\n // bundle size optimizations\n {\n find: \"query-string\",\n replacement: resolvePath(\"@vxrn/query-string\", root)\n },\n {\n find: \"url-parse\",\n replacement: resolvePath(\"@vxrn/url-parse\", root)\n }\n ],\n // TODO auto dedupe all include optimize deps?\n dedupe\n },\n build: {},\n // enable OXC React Refresh so component registration ($RefreshReg$) is\n // injected into TSX/JSX output; the one:react-refresh-web compiler plugin\n // then wraps the output with the runtime preamble and import.meta.hot.accept\n // only enable in dev mode - in production the refresh plugin doesn't run,\n // leaving $RefreshReg$ undefined which crashes client-side JS\n oxc: {\n jsx: {\n refresh: mode === \"development\"\n }\n }\n };\n}\nexport {\n dedupe,\n getBaseViteConfig\n};\n//# sourceMappingURL=getBaseViteConfigOnly.js.map\n"],"mappings":";;;;;AAGA,MAAM,SAAS;CACb;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AACA,eAAe,kBAAkB,QAAQ;CACvC,MAAM,EAAE,MAAM,SAAS;CACvB,MAAM,eAAe;EACnB,KAAK,MAAM,mBAAmB;EAC9B,KAAK,MAAM,mBAAmB;EAC9B,KAAK,MAAM,qBAAqB;CAClC;CACA,MAAM,qBAAqB,MAAM,QAAQ,IACvC,aAAa,IAAI,OAAO,MAAM;EAC5B,IAAI,MAAM,QAAQ,WAAW,CAAC,GAAG;GAC/B,OAAO;EACT;CACF,CAAC,CACH,EAAC,CAAE,MAAM,MAAM,OAAO,MAAM,QAAQ;CACpC,MAAM,6BAA6B,YAAY,6BAA6B,IAAI;CAChF,MAAM,EAAE,YAAY,MAAM,QAAQ,SAAS,0BAA0B;CACrE,OAAO;EACL;EACA,eAAe,CAAC,UAAU;EAK1B,KAAK,oBAAoB,EACvB,SAAS,kBACX,IAAI;GACF,aAAa;GACb,cAAc,EACZ,SAAS,EACP,QAAQ,MAAM,KAAK,KAAK,EAC1B,EACF;EACF;EACA,QAAQ;GACN,SAAS,GAAG,SAAS;GACrB,wBAAwB,IAAI,KAAK;GACjC,oCAAoC,IAAI,QAAQ;EAClD;EACA,SAAS;GACP,OAAO;IAIL;KACE,MAAM;KACN,aAAa,YAAY,iCAAiC,YAAY,OAAO;IAC/E;IACA;KAGE,MAAM;KACN,aAAa;IACf;IACA;KACE,MAAM;KACN,aAAa;IACf;IAIA;KACE,MAAM;KACN,aAAa;IACf;IAEA;KACE,MAAM;KACN,aAAa,YAAY,sBAAsB,IAAI;IACrD;IACA;KACE,MAAM;KACN,aAAa,YAAY,mBAAmB,IAAI;IAClD;GACF;GAEA;EACF;EACA,OAAO,CAAC;EAMR,KAAK,EACH,KAAK,EACH,SAAS,SAAS,cACpB,EACF;CACF;AACF"}
@@ -40,6 +40,7 @@ async function getBaseViteConfig(config) {
40
40
  var { version } = await FSExtra.readJSON(reactNativePackageJsonPath);
41
41
  return {
42
42
  mode,
43
+ assetsInclude: ["**/*.glb"],
43
44
  css: postCSSConfigPath ? { postcss: postCSSConfigPath } : {
44
45
  transformer: "lightningcss",
45
46
  lightningcss: { targets: { safari: 15 << 16 | 2 << 8 } }
@@ -1 +1 @@
1
- {"version":3,"file":"getBaseViteConfigOnly.native.js","names":[],"sources":["config/getBaseViteConfigOnly.native.js"],"sourcesContent":["import { resolvePath } from \"@vxrn/resolve\";\nimport FSExtra from \"fs-extra\";\nimport { join } from \"path\";\nvar dedupe = [\n \"one\",\n \"react\",\n \"react-dom\",\n \"react-dom/client\",\n \"react-native-web\",\n \"react-native-web-lite\",\n \"@react-navigation/core\",\n \"@react-navigation/native\",\n \"@react-navigation/elements\",\n \"@react-navigation/native-stack\",\n \"@react-navigation/bottom-tabs\",\n \"@tamagui/core\",\n \"@tamagui/web\",\n \"@tamagui/react-native-web\",\n \"@tamagui/react-native-web-lite\",\n \"tamagui\",\n \"react-native-reanimated\",\n \"escape-string-regexp\"\n];\nasync function getBaseViteConfig(config) {\n var { root, mode } = config;\n var postCSSPaths = [\n join(root, \"postcss.config.js\"),\n join(root, \"postcss.config.ts\"),\n join(root, \"postcss.config.json\")\n ];\n var postCSSConfigPath = (await Promise.all(postCSSPaths.map(async function(x) {\n if (await FSExtra.pathExists(x)) {\n return x;\n }\n }))).find(function(x) {\n return typeof x === \"string\";\n });\n var reactNativePackageJsonPath = resolvePath(\"react-native/package.json\", root);\n var { version } = await FSExtra.readJSON(reactNativePackageJsonPath);\n return {\n mode,\n // we load the config ourselves\n // if you disable this is disables auto-reloading config changes\n // configFile: false,\n // TODO make this documented / configurable through the plugins\n css: postCSSConfigPath ? {\n postcss: postCSSConfigPath\n } : {\n transformer: \"lightningcss\",\n lightningcss: {\n targets: {\n safari: 15 << 16 | 2 << 8\n }\n }\n },\n define: {\n __DEV__: `${mode === \"development\"}`,\n \"process.env.NODE_ENV\": `\"${mode}\"`,\n \"process.env.REACT_NATIVE_VERSION\": `\"${version}\"`\n },\n resolve: {\n alias: [\n // deep react-native/Libraries/* paths must be caught BEFORE the general\n // react-native → react-native-web alias, since react-native-web doesn't\n // have these native-only subpaths\n {\n find: /^react-native\\/Libraries\\/.*/,\n replacement: resolvePath(\"@vxrn/vite-plugin-metro/empty\", import.meta.dirname)\n },\n {\n // react native 0.87 removed @react-native/assets-registry, but libraries\n // like react-native-svg still import its registry\n find: /^(react-native\\/asset-registry|@react-native\\/assets-registry\\/registry)$/,\n replacement: \"react-native-web/dist/modules/AssetRegistry\"\n },\n {\n find: \"react-native/package.json\",\n replacement: \"react-native-web/package.json\"\n },\n // named by package so it resolves (from the root, through dedupe) only\n // once something imports react-native: an app with no react-native\n // imports needs no react-native-web.\n {\n find: \"react-native\",\n replacement: \"react-native-web\"\n },\n // bundle size optimizations\n {\n find: \"query-string\",\n replacement: resolvePath(\"@vxrn/query-string\", root)\n },\n {\n find: \"url-parse\",\n replacement: resolvePath(\"@vxrn/url-parse\", root)\n }\n ],\n // TODO auto dedupe all include optimize deps?\n dedupe\n },\n build: {},\n // enable OXC React Refresh so component registration ($RefreshReg$) is\n // injected into TSX/JSX output; the one:react-refresh-web compiler plugin\n // then wraps the output with the runtime preamble and import.meta.hot.accept\n // only enable in dev mode - in production the refresh plugin doesn't run,\n // leaving $RefreshReg$ undefined which crashes client-side JS\n oxc: {\n jsx: {\n refresh: mode === \"development\"\n }\n }\n };\n}\nexport {\n dedupe,\n getBaseViteConfig\n};\n//# sourceMappingURL=getBaseViteConfigOnly.js.map\n"],"mappings":";;;;;AAGA,IAAI,SAAS;CACX;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AACA,eAAe,kBAAkB,QAAQ;CACvC,IAAI,EAAE,MAAM,SAAS;CACrB,IAAI,eAAe;EACjB,KAAK,MAAM,mBAAmB;EAC9B,KAAK,MAAM,mBAAmB;EAC9B,KAAK,MAAM,qBAAqB;CAClC;CACA,IAAI,qBAAqB,MAAM,QAAQ,IAAI,aAAa,IAAI,eAAe,GAAG;EAC5E,IAAI,MAAM,QAAQ,WAAW,CAAC,GAAG;GAC/B,OAAO;EACT;CACF,CAAC,CAAC,EAAC,CAAE,KAAK,SAAS,GAAG;EACpB,OAAO,OAAO,MAAM;CACtB,CAAC;CACD,IAAI,6BAA6B,YAAY,6BAA6B,IAAI;CAC9E,IAAI,EAAE,YAAY,MAAM,QAAQ,SAAS,0BAA0B;CACnE,OAAO;EACL;EAKA,KAAK,oBAAoB,EACvB,SAAS,kBACX,IAAI;GACF,aAAa;GACb,cAAc,EACZ,SAAS,EACP,QAAQ,MAAM,KAAK,KAAK,EAC1B,EACF;EACF;EACA,QAAQ;GACN,SAAS,GAAG,SAAS;GACrB,wBAAwB,IAAI,KAAK;GACjC,oCAAoC,IAAI,QAAQ;EAClD;EACA,SAAS;GACP,OAAO;IAIL;KACE,MAAM;KACN,aAAa,YAAY,iCAAiC,YAAY,OAAO;IAC/E;IACA;KAGE,MAAM;KACN,aAAa;IACf;IACA;KACE,MAAM;KACN,aAAa;IACf;IAIA;KACE,MAAM;KACN,aAAa;IACf;IAEA;KACE,MAAM;KACN,aAAa,YAAY,sBAAsB,IAAI;IACrD;IACA;KACE,MAAM;KACN,aAAa,YAAY,mBAAmB,IAAI;IAClD;GACF;GAEA;EACF;EACA,OAAO,CAAC;EAMR,KAAK,EACH,KAAK,EACH,SAAS,SAAS,cACpB,EACF;CACF;AACF"}
1
+ {"version":3,"file":"getBaseViteConfigOnly.native.js","names":[],"sources":["config/getBaseViteConfigOnly.native.js"],"sourcesContent":["import { resolvePath } from \"@vxrn/resolve\";\nimport FSExtra from \"fs-extra\";\nimport { join } from \"path\";\nvar dedupe = [\n \"one\",\n \"react\",\n \"react-dom\",\n \"react-dom/client\",\n \"react-native-web\",\n \"react-native-web-lite\",\n \"@react-navigation/core\",\n \"@react-navigation/native\",\n \"@react-navigation/elements\",\n \"@react-navigation/native-stack\",\n \"@react-navigation/bottom-tabs\",\n \"@tamagui/core\",\n \"@tamagui/web\",\n \"@tamagui/react-native-web\",\n \"@tamagui/react-native-web-lite\",\n \"tamagui\",\n \"react-native-reanimated\",\n \"escape-string-regexp\"\n];\nasync function getBaseViteConfig(config) {\n var { root, mode } = config;\n var postCSSPaths = [\n join(root, \"postcss.config.js\"),\n join(root, \"postcss.config.ts\"),\n join(root, \"postcss.config.json\")\n ];\n var postCSSConfigPath = (await Promise.all(postCSSPaths.map(async function(x) {\n if (await FSExtra.pathExists(x)) {\n return x;\n }\n }))).find(function(x) {\n return typeof x === \"string\";\n });\n var reactNativePackageJsonPath = resolvePath(\"react-native/package.json\", root);\n var { version } = await FSExtra.readJSON(reactNativePackageJsonPath);\n return {\n mode,\n assetsInclude: [\n \"**/*.glb\"\n ],\n // we load the config ourselves\n // if you disable this is disables auto-reloading config changes\n // configFile: false,\n // TODO make this documented / configurable through the plugins\n css: postCSSConfigPath ? {\n postcss: postCSSConfigPath\n } : {\n transformer: \"lightningcss\",\n lightningcss: {\n targets: {\n safari: 15 << 16 | 2 << 8\n }\n }\n },\n define: {\n __DEV__: `${mode === \"development\"}`,\n \"process.env.NODE_ENV\": `\"${mode}\"`,\n \"process.env.REACT_NATIVE_VERSION\": `\"${version}\"`\n },\n resolve: {\n alias: [\n // deep react-native/Libraries/* paths must be caught BEFORE the general\n // react-native → react-native-web alias, since react-native-web doesn't\n // have these native-only subpaths\n {\n find: /^react-native\\/Libraries\\/.*/,\n replacement: resolvePath(\"@vxrn/vite-plugin-metro/empty\", import.meta.dirname)\n },\n {\n // react native 0.87 removed @react-native/assets-registry, but libraries\n // like react-native-svg still import its registry\n find: /^(react-native\\/asset-registry|@react-native\\/assets-registry\\/registry)$/,\n replacement: \"react-native-web/dist/modules/AssetRegistry\"\n },\n {\n find: \"react-native/package.json\",\n replacement: \"react-native-web/package.json\"\n },\n // named by package so it resolves (from the root, through dedupe) only\n // once something imports react-native: an app with no react-native\n // imports needs no react-native-web.\n {\n find: \"react-native\",\n replacement: \"react-native-web\"\n },\n // bundle size optimizations\n {\n find: \"query-string\",\n replacement: resolvePath(\"@vxrn/query-string\", root)\n },\n {\n find: \"url-parse\",\n replacement: resolvePath(\"@vxrn/url-parse\", root)\n }\n ],\n // TODO auto dedupe all include optimize deps?\n dedupe\n },\n build: {},\n // enable OXC React Refresh so component registration ($RefreshReg$) is\n // injected into TSX/JSX output; the one:react-refresh-web compiler plugin\n // then wraps the output with the runtime preamble and import.meta.hot.accept\n // only enable in dev mode - in production the refresh plugin doesn't run,\n // leaving $RefreshReg$ undefined which crashes client-side JS\n oxc: {\n jsx: {\n refresh: mode === \"development\"\n }\n }\n };\n}\nexport {\n dedupe,\n getBaseViteConfig\n};\n//# sourceMappingURL=getBaseViteConfigOnly.js.map\n"],"mappings":";;;;;AAGA,IAAI,SAAS;CACX;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AACA,eAAe,kBAAkB,QAAQ;CACvC,IAAI,EAAE,MAAM,SAAS;CACrB,IAAI,eAAe;EACjB,KAAK,MAAM,mBAAmB;EAC9B,KAAK,MAAM,mBAAmB;EAC9B,KAAK,MAAM,qBAAqB;CAClC;CACA,IAAI,qBAAqB,MAAM,QAAQ,IAAI,aAAa,IAAI,eAAe,GAAG;EAC5E,IAAI,MAAM,QAAQ,WAAW,CAAC,GAAG;GAC/B,OAAO;EACT;CACF,CAAC,CAAC,EAAC,CAAE,KAAK,SAAS,GAAG;EACpB,OAAO,OAAO,MAAM;CACtB,CAAC;CACD,IAAI,6BAA6B,YAAY,6BAA6B,IAAI;CAC9E,IAAI,EAAE,YAAY,MAAM,QAAQ,SAAS,0BAA0B;CACnE,OAAO;EACL;EACA,eAAe,CACb,UACF;EAKA,KAAK,oBAAoB,EACvB,SAAS,kBACX,IAAI;GACF,aAAa;GACb,cAAc,EACZ,SAAS,EACP,QAAQ,MAAM,KAAK,KAAK,EAC1B,EACF;EACF;EACA,QAAQ;GACN,SAAS,GAAG,SAAS;GACrB,wBAAwB,IAAI,KAAK;GACjC,oCAAoC,IAAI,QAAQ;EAClD;EACA,SAAS;GACP,OAAO;IAIL;KACE,MAAM;KACN,aAAa,YAAY,iCAAiC,YAAY,OAAO;IAC/E;IACA;KAGE,MAAM;KACN,aAAa;IACf;IACA;KACE,MAAM;KACN,aAAa;IACf;IAIA;KACE,MAAM;KACN,aAAa;IACf;IAEA;KACE,MAAM;KACN,aAAa,YAAY,sBAAsB,IAAI;IACrD;IACA;KACE,MAAM;KACN,aAAa,YAAY,mBAAmB,IAAI;IAClD;GACF;GAEA;EACF;EACA,OAAO,CAAC;EAMR,KAAK,EACH,KAAK,EACH,SAAS,SAAS,cACpB,EACF;CACF;AACF"}
@@ -70,6 +70,7 @@ function getOptimizeDeps(mode) {
70
70
  "@react-navigation/bottom-tabs",
71
71
  "@react-navigation/native-stack",
72
72
  "one",
73
+ "one/drawer",
73
74
  "react-native-safe-area-context",
74
75
  "styleq",
75
76
  "fbjs",
@@ -1 +1 @@
1
- {"version":3,"file":"getOptimizeDeps.js","names":[],"sources":["config/getOptimizeDeps.js"],"sourcesContent":["import { webExtensions } from \"../constants\";\nfunction getOptimizeDeps(mode) {\n const needsInterop = [\n \"nativewind\",\n \"react-native-css-interop/jsx-runtime\",\n \"react-native-css-interop/jsx-dev-runtime\",\n \"react-native-css-interop\",\n \"secure-json-parse\",\n \"@react-native/normalize-colors\",\n \"@vxrn/vendor/react-19-prod\",\n \"@vxrn/vendor/react-19\",\n \"@vxrn/vendor/react-19-compiler-runtime\",\n \"@vxrn/vendor/react-dom-19\",\n \"@vxrn/vendor/react-dom-client-19\",\n \"@vxrn/vendor/react-dom-server.browser-19\",\n \"@vxrn/vendor/react-jsx-19\",\n \"@vxrn/vendor/react-jsx-dev-19\",\n \"react\",\n \"react/jsx-runtime\",\n \"react/jsx-dev-runtime\",\n \"react/compiler-runtime\",\n \"react-dom\",\n \"react-dom/server\",\n \"react-dom/client\",\n \"react-native-web-internals\",\n \"@react-native-masked-view/masked-view\",\n \"url-parse\",\n \"query-string\",\n \"escape-string-regexp\",\n \"use-latest-callback\",\n \"react-is\",\n \"fast-deep-equal\",\n \"@supabase/auth-helpers-react\",\n \"@supabase/postgres-js\",\n \"core-js\",\n \"parse-numeric-range\",\n \"use-sync-external-store\",\n \"use-sync-external-store/shim\",\n \"inline-style-prefixer\",\n \"@docsearch/react\",\n \"@algolia/autocomplete-core\",\n \"@algolia/autocomplete-plugin-algolia-insights\",\n \"@algolia/autocomplete-shared\",\n \"moti\"\n ];\n const depsToOptimize = [\n ...needsInterop,\n \"fast-xml-parser\",\n \"set-cookie-parser\",\n \"ipaddr.js\",\n \"cross-fetch\",\n \"pg\",\n \"react-native-svg\",\n \"react-native-screens\",\n \"ws\",\n \"lodash\",\n // added these when using a worker env\n \"reading-time\",\n \"mdx-bundler/client\",\n \"gray-matter\",\n \"glob\",\n \"memoize-one\",\n \"css-in-js-utils\",\n \"hyphenate-style-name\",\n \"use-sync-external-store\",\n \"react-native-reanimated\",\n // uses .web.js extensions\n \"@react-navigation/core\",\n \"@react-navigation/native\",\n \"@react-navigation/elements\",\n \"@react-navigation/bottom-tabs\",\n \"@react-navigation/native-stack\",\n \"one\",\n // one's own copy, by alias: prebundled with one so both share one context\n \"react-native-safe-area-context\",\n \"styleq\",\n \"fbjs\",\n \"@vxrn/universal-color-scheme\",\n \"@vxrn/color-scheme\",\n \"requires-port\",\n \"querystringify\",\n \"compare-versions\",\n \"strict-uri-encode\",\n \"decode-uri-component\",\n \"split-on-first\",\n \"filter-obj\",\n \"scheduler\",\n \"warn-once\",\n \"@radix-ui/react-compose-refs\",\n \"@radix-ui/react-slot\",\n \"nanoid\",\n \"swr\",\n \"swr/mutation\",\n \"one\",\n \"one/zero\",\n \"refractor/lang/tsx\",\n \"invariant\",\n \"tamagui/linear-gradient\",\n \"@react-native/normalize-color\",\n \"react-native\",\n \"@floating-ui/react\",\n \"@floating-ui/react-dom\",\n \"tamagui\",\n \"reforest\"\n ];\n if (mode === \"build\") {\n depsToOptimize.push(\"@babel/runtime\");\n }\n return {\n needsInterop,\n depsToOptimize,\n optimizeDeps: {\n include: depsToOptimize,\n exclude: [\n \"util\",\n \"@swc/wasm\",\n \"@swc/core-darwin-arm64\",\n \"moti/author\",\n \"@hot-updater/cli-tools\"\n ],\n needsInterop,\n // Enable lazy optimization - don't wait for all deps before starting server\n // This allows browser to process requests in parallel for faster initial load\n holdUntilCrawlEnd: false,\n rolldownOptions: {\n resolve: {\n extensions: webExtensions\n },\n // expo reads its platform from this constant, which babel-preset-expo\n // inlines during transform. a pre-bundled dep never goes through babel,\n // so the constant has to be defined here or it reads as undefined and\n // every expo module in a client chunk takes its native branch. expo's\n // dev HMR client is the one that bites: setupHMR calls\n // HMRClient.setup({ isEnabled: true }), the web form, and the native\n // branch asserts a string platform, so the whole client fails to\n // initialize and every route renders blank. rolldown takes define under\n // `transform`, and vite's dep optimizer merges that one key into its own\n // define; a top-level `define` is typed `never` and is rejected outright.\n transform: {\n define: {\n \"process.env.EXPO_OS\": '\"web\"'\n }\n },\n // some packages ship JSX in .js files (e.g., react-native-css-interop/dist/doctor.js).\n // .ts/.tsx must be declared too. when es-module-lexer can't read a dep entry,\n // vite's extractExportsData retries it as `moduleTypes[extname] || 'jsx'`, and\n // lexer always fails on TS syntax, so an undeclared .ts entry gets re-parsed as\n // JSX and dies on the first inline type specifier (`import { type Foo }`).\n moduleTypes: { \".js\": \"jsx\", \".ts\": \"ts\", \".tsx\": \"tsx\" },\n // react-native packages import native-only exports (TurboModuleRegistry etc.)\n // from react-native, which is aliased to react-native-web on web. react-native-web\n // doesn't export these, so rolldown would error. shimMissingExports creates\n // undefined shims instead, matching esbuild's lenient behavior.\n shimMissingExports: true\n }\n }\n };\n}\nexport {\n getOptimizeDeps\n};\n//# sourceMappingURL=getOptimizeDeps.js.map\n"],"mappings":";;;AACA,SAAS,gBAAgB,MAAM;CAC7B,MAAM,eAAe;EACnB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,MAAM,iBAAiB;EACrB,GAAG;EACH;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,IAAI,SAAS,SAAS;EACpB,eAAe,KAAK,gBAAgB;CACtC;CACA,OAAO;EACL;EACA;EACA,cAAc;GACZ,SAAS;GACT,SAAS;IACP;IACA;IACA;IACA;IACA;GACF;GACA;GAGA,mBAAmB;GACnB,iBAAiB;IACf,SAAS,EACP,YAAY,cACd;IAWA,WAAW,EACT,QAAQ,EACN,uBAAuB,UACzB,EACF;IAMA,aAAa;KAAE,OAAO;KAAO,OAAO;KAAM,QAAQ;IAAM;IAKxD,oBAAoB;GACtB;EACF;CACF;AACF"}
1
+ {"version":3,"file":"getOptimizeDeps.js","names":[],"sources":["config/getOptimizeDeps.js"],"sourcesContent":["import { webExtensions } from \"../constants\";\nfunction getOptimizeDeps(mode) {\n const needsInterop = [\n \"nativewind\",\n \"react-native-css-interop/jsx-runtime\",\n \"react-native-css-interop/jsx-dev-runtime\",\n \"react-native-css-interop\",\n \"secure-json-parse\",\n \"@react-native/normalize-colors\",\n \"@vxrn/vendor/react-19-prod\",\n \"@vxrn/vendor/react-19\",\n \"@vxrn/vendor/react-19-compiler-runtime\",\n \"@vxrn/vendor/react-dom-19\",\n \"@vxrn/vendor/react-dom-client-19\",\n \"@vxrn/vendor/react-dom-server.browser-19\",\n \"@vxrn/vendor/react-jsx-19\",\n \"@vxrn/vendor/react-jsx-dev-19\",\n \"react\",\n \"react/jsx-runtime\",\n \"react/jsx-dev-runtime\",\n \"react/compiler-runtime\",\n \"react-dom\",\n \"react-dom/server\",\n \"react-dom/client\",\n \"react-native-web-internals\",\n \"@react-native-masked-view/masked-view\",\n \"url-parse\",\n \"query-string\",\n \"escape-string-regexp\",\n \"use-latest-callback\",\n \"react-is\",\n \"fast-deep-equal\",\n \"@supabase/auth-helpers-react\",\n \"@supabase/postgres-js\",\n \"core-js\",\n \"parse-numeric-range\",\n \"use-sync-external-store\",\n \"use-sync-external-store/shim\",\n \"inline-style-prefixer\",\n \"@docsearch/react\",\n \"@algolia/autocomplete-core\",\n \"@algolia/autocomplete-plugin-algolia-insights\",\n \"@algolia/autocomplete-shared\",\n \"moti\"\n ];\n const depsToOptimize = [\n ...needsInterop,\n \"fast-xml-parser\",\n \"set-cookie-parser\",\n \"ipaddr.js\",\n \"cross-fetch\",\n \"pg\",\n \"react-native-svg\",\n \"react-native-screens\",\n \"ws\",\n \"lodash\",\n // added these when using a worker env\n \"reading-time\",\n \"mdx-bundler/client\",\n \"gray-matter\",\n \"glob\",\n \"memoize-one\",\n \"css-in-js-utils\",\n \"hyphenate-style-name\",\n \"use-sync-external-store\",\n \"react-native-reanimated\",\n // uses .web.js extensions\n \"@react-navigation/core\",\n \"@react-navigation/native\",\n \"@react-navigation/elements\",\n \"@react-navigation/bottom-tabs\",\n \"@react-navigation/native-stack\",\n \"one\",\n \"one/drawer\",\n // one's own copy, by alias: prebundled with one so both share one context\n \"react-native-safe-area-context\",\n \"styleq\",\n \"fbjs\",\n \"@vxrn/universal-color-scheme\",\n \"@vxrn/color-scheme\",\n \"requires-port\",\n \"querystringify\",\n \"compare-versions\",\n \"strict-uri-encode\",\n \"decode-uri-component\",\n \"split-on-first\",\n \"filter-obj\",\n \"scheduler\",\n \"warn-once\",\n \"@radix-ui/react-compose-refs\",\n \"@radix-ui/react-slot\",\n \"nanoid\",\n \"swr\",\n \"swr/mutation\",\n \"one\",\n \"one/zero\",\n \"refractor/lang/tsx\",\n \"invariant\",\n \"tamagui/linear-gradient\",\n \"@react-native/normalize-color\",\n \"react-native\",\n \"@floating-ui/react\",\n \"@floating-ui/react-dom\",\n \"tamagui\",\n \"reforest\"\n ];\n if (mode === \"build\") {\n depsToOptimize.push(\"@babel/runtime\");\n }\n return {\n needsInterop,\n depsToOptimize,\n optimizeDeps: {\n include: depsToOptimize,\n exclude: [\n \"util\",\n \"@swc/wasm\",\n \"@swc/core-darwin-arm64\",\n \"moti/author\",\n \"@hot-updater/cli-tools\"\n ],\n needsInterop,\n // Enable lazy optimization - don't wait for all deps before starting server\n // This allows browser to process requests in parallel for faster initial load\n holdUntilCrawlEnd: false,\n rolldownOptions: {\n resolve: {\n extensions: webExtensions\n },\n // expo reads its platform from this constant, which babel-preset-expo\n // inlines during transform. a pre-bundled dep never goes through babel,\n // so the constant has to be defined here or it reads as undefined and\n // every expo module in a client chunk takes its native branch. expo's\n // dev HMR client is the one that bites: setupHMR calls\n // HMRClient.setup({ isEnabled: true }), the web form, and the native\n // branch asserts a string platform, so the whole client fails to\n // initialize and every route renders blank. rolldown takes define under\n // `transform`, and vite's dep optimizer merges that one key into its own\n // define; a top-level `define` is typed `never` and is rejected outright.\n transform: {\n define: {\n \"process.env.EXPO_OS\": '\"web\"'\n }\n },\n // some packages ship JSX in .js files (e.g., react-native-css-interop/dist/doctor.js).\n // .ts/.tsx must be declared too. when es-module-lexer can't read a dep entry,\n // vite's extractExportsData retries it as `moduleTypes[extname] || 'jsx'`, and\n // lexer always fails on TS syntax, so an undeclared .ts entry gets re-parsed as\n // JSX and dies on the first inline type specifier (`import { type Foo }`).\n moduleTypes: { \".js\": \"jsx\", \".ts\": \"ts\", \".tsx\": \"tsx\" },\n // react-native packages import native-only exports (TurboModuleRegistry etc.)\n // from react-native, which is aliased to react-native-web on web. react-native-web\n // doesn't export these, so rolldown would error. shimMissingExports creates\n // undefined shims instead, matching esbuild's lenient behavior.\n shimMissingExports: true\n }\n }\n };\n}\nexport {\n getOptimizeDeps\n};\n//# sourceMappingURL=getOptimizeDeps.js.map\n"],"mappings":";;;AACA,SAAS,gBAAgB,MAAM;CAC7B,MAAM,eAAe;EACnB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,MAAM,iBAAiB;EACrB,GAAG;EACH;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,IAAI,SAAS,SAAS;EACpB,eAAe,KAAK,gBAAgB;CACtC;CACA,OAAO;EACL;EACA;EACA,cAAc;GACZ,SAAS;GACT,SAAS;IACP;IACA;IACA;IACA;IACA;GACF;GACA;GAGA,mBAAmB;GACnB,iBAAiB;IACf,SAAS,EACP,YAAY,cACd;IAWA,WAAW,EACT,QAAQ,EACN,uBAAuB,UACzB,EACF;IAMA,aAAa;KAAE,OAAO;KAAO,OAAO;KAAM,QAAQ;IAAM;IAKxD,oBAAoB;GACtB;EACF;CACF;AACF"}
@@ -70,6 +70,7 @@ function getOptimizeDeps(mode) {
70
70
  "@react-navigation/bottom-tabs",
71
71
  "@react-navigation/native-stack",
72
72
  "one",
73
+ "one/drawer",
73
74
  "react-native-safe-area-context",
74
75
  "styleq",
75
76
  "fbjs",
@@ -1 +1 @@
1
- {"version":3,"file":"getOptimizeDeps.native.js","names":[],"sources":["config/getOptimizeDeps.native.js"],"sourcesContent":["import { webExtensions } from \"../constants\";\nfunction getOptimizeDeps(mode) {\n var needsInterop = [\n \"nativewind\",\n \"react-native-css-interop/jsx-runtime\",\n \"react-native-css-interop/jsx-dev-runtime\",\n \"react-native-css-interop\",\n \"secure-json-parse\",\n \"@react-native/normalize-colors\",\n \"@vxrn/vendor/react-19-prod\",\n \"@vxrn/vendor/react-19\",\n \"@vxrn/vendor/react-19-compiler-runtime\",\n \"@vxrn/vendor/react-dom-19\",\n \"@vxrn/vendor/react-dom-client-19\",\n \"@vxrn/vendor/react-dom-server.browser-19\",\n \"@vxrn/vendor/react-jsx-19\",\n \"@vxrn/vendor/react-jsx-dev-19\",\n \"react\",\n \"react/jsx-runtime\",\n \"react/jsx-dev-runtime\",\n \"react/compiler-runtime\",\n \"react-dom\",\n \"react-dom/server\",\n \"react-dom/client\",\n \"react-native-web-internals\",\n \"@react-native-masked-view/masked-view\",\n \"url-parse\",\n \"query-string\",\n \"escape-string-regexp\",\n \"use-latest-callback\",\n \"react-is\",\n \"fast-deep-equal\",\n \"@supabase/auth-helpers-react\",\n \"@supabase/postgres-js\",\n \"core-js\",\n \"parse-numeric-range\",\n \"use-sync-external-store\",\n \"use-sync-external-store/shim\",\n \"inline-style-prefixer\",\n \"@docsearch/react\",\n \"@algolia/autocomplete-core\",\n \"@algolia/autocomplete-plugin-algolia-insights\",\n \"@algolia/autocomplete-shared\",\n \"moti\"\n ];\n var depsToOptimize = [\n ...needsInterop,\n \"fast-xml-parser\",\n \"set-cookie-parser\",\n \"ipaddr.js\",\n \"cross-fetch\",\n \"pg\",\n \"react-native-svg\",\n \"react-native-screens\",\n \"ws\",\n \"lodash\",\n // added these when using a worker env\n \"reading-time\",\n \"mdx-bundler/client\",\n \"gray-matter\",\n \"glob\",\n \"memoize-one\",\n \"css-in-js-utils\",\n \"hyphenate-style-name\",\n \"use-sync-external-store\",\n \"react-native-reanimated\",\n // uses .web.js extensions\n \"@react-navigation/core\",\n \"@react-navigation/native\",\n \"@react-navigation/elements\",\n \"@react-navigation/bottom-tabs\",\n \"@react-navigation/native-stack\",\n \"one\",\n // one's own copy, by alias: prebundled with one so both share one context\n \"react-native-safe-area-context\",\n \"styleq\",\n \"fbjs\",\n \"@vxrn/universal-color-scheme\",\n \"@vxrn/color-scheme\",\n \"requires-port\",\n \"querystringify\",\n \"compare-versions\",\n \"strict-uri-encode\",\n \"decode-uri-component\",\n \"split-on-first\",\n \"filter-obj\",\n \"scheduler\",\n \"warn-once\",\n \"@radix-ui/react-compose-refs\",\n \"@radix-ui/react-slot\",\n \"nanoid\",\n \"swr\",\n \"swr/mutation\",\n \"one\",\n \"one/zero\",\n \"refractor/lang/tsx\",\n \"invariant\",\n \"tamagui/linear-gradient\",\n \"@react-native/normalize-color\",\n \"react-native\",\n \"@floating-ui/react\",\n \"@floating-ui/react-dom\",\n \"tamagui\",\n \"reforest\"\n ];\n if (mode === \"build\") {\n depsToOptimize.push(\"@babel/runtime\");\n }\n return {\n needsInterop,\n depsToOptimize,\n optimizeDeps: {\n include: depsToOptimize,\n exclude: [\n \"util\",\n \"@swc/wasm\",\n \"@swc/core-darwin-arm64\",\n \"moti/author\",\n \"@hot-updater/cli-tools\"\n ],\n needsInterop,\n // Enable lazy optimization - don't wait for all deps before starting server\n // This allows browser to process requests in parallel for faster initial load\n holdUntilCrawlEnd: false,\n rolldownOptions: {\n resolve: {\n extensions: webExtensions\n },\n // expo reads its platform from this constant, which babel-preset-expo\n // inlines during transform. a pre-bundled dep never goes through babel,\n // so the constant has to be defined here or it reads as undefined and\n // every expo module in a client chunk takes its native branch. expo's\n // dev HMR client is the one that bites: setupHMR calls\n // HMRClient.setup({ isEnabled: true }), the web form, and the native\n // branch asserts a string platform, so the whole client fails to\n // initialize and every route renders blank. rolldown takes define under\n // `transform`, and vite's dep optimizer merges that one key into its own\n // define; a top-level `define` is typed `never` and is rejected outright.\n transform: {\n define: {\n \"process.env.EXPO_OS\": '\"web\"'\n }\n },\n // some packages ship JSX in .js files (e.g., react-native-css-interop/dist/doctor.js).\n // .ts/.tsx must be declared too. when es-module-lexer can't read a dep entry,\n // vite's extractExportsData retries it as `moduleTypes[extname] || 'jsx'`, and\n // lexer always fails on TS syntax, so an undeclared .ts entry gets re-parsed as\n // JSX and dies on the first inline type specifier (`import { type Foo }`).\n moduleTypes: {\n \".js\": \"jsx\",\n \".ts\": \"ts\",\n \".tsx\": \"tsx\"\n },\n // react-native packages import native-only exports (TurboModuleRegistry etc.)\n // from react-native, which is aliased to react-native-web on web. react-native-web\n // doesn't export these, so rolldown would error. shimMissingExports creates\n // undefined shims instead, matching esbuild's lenient behavior.\n shimMissingExports: true\n }\n }\n };\n}\nexport {\n getOptimizeDeps\n};\n//# sourceMappingURL=getOptimizeDeps.js.map\n"],"mappings":";;;AACA,SAAS,gBAAgB,MAAM;CAC7B,IAAI,eAAe;EACjB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,IAAI,iBAAiB;EACnB,GAAG;EACH;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,IAAI,SAAS,SAAS;EACpB,eAAe,KAAK,gBAAgB;CACtC;CACA,OAAO;EACL;EACA;EACA,cAAc;GACZ,SAAS;GACT,SAAS;IACP;IACA;IACA;IACA;IACA;GACF;GACA;GAGA,mBAAmB;GACnB,iBAAiB;IACf,SAAS,EACP,YAAY,cACd;IAWA,WAAW,EACT,QAAQ,EACN,uBAAuB,UACzB,EACF;IAMA,aAAa;KACX,OAAO;KACP,OAAO;KACP,QAAQ;IACV;IAKA,oBAAoB;GACtB;EACF;CACF;AACF"}
1
+ {"version":3,"file":"getOptimizeDeps.native.js","names":[],"sources":["config/getOptimizeDeps.native.js"],"sourcesContent":["import { webExtensions } from \"../constants\";\nfunction getOptimizeDeps(mode) {\n var needsInterop = [\n \"nativewind\",\n \"react-native-css-interop/jsx-runtime\",\n \"react-native-css-interop/jsx-dev-runtime\",\n \"react-native-css-interop\",\n \"secure-json-parse\",\n \"@react-native/normalize-colors\",\n \"@vxrn/vendor/react-19-prod\",\n \"@vxrn/vendor/react-19\",\n \"@vxrn/vendor/react-19-compiler-runtime\",\n \"@vxrn/vendor/react-dom-19\",\n \"@vxrn/vendor/react-dom-client-19\",\n \"@vxrn/vendor/react-dom-server.browser-19\",\n \"@vxrn/vendor/react-jsx-19\",\n \"@vxrn/vendor/react-jsx-dev-19\",\n \"react\",\n \"react/jsx-runtime\",\n \"react/jsx-dev-runtime\",\n \"react/compiler-runtime\",\n \"react-dom\",\n \"react-dom/server\",\n \"react-dom/client\",\n \"react-native-web-internals\",\n \"@react-native-masked-view/masked-view\",\n \"url-parse\",\n \"query-string\",\n \"escape-string-regexp\",\n \"use-latest-callback\",\n \"react-is\",\n \"fast-deep-equal\",\n \"@supabase/auth-helpers-react\",\n \"@supabase/postgres-js\",\n \"core-js\",\n \"parse-numeric-range\",\n \"use-sync-external-store\",\n \"use-sync-external-store/shim\",\n \"inline-style-prefixer\",\n \"@docsearch/react\",\n \"@algolia/autocomplete-core\",\n \"@algolia/autocomplete-plugin-algolia-insights\",\n \"@algolia/autocomplete-shared\",\n \"moti\"\n ];\n var depsToOptimize = [\n ...needsInterop,\n \"fast-xml-parser\",\n \"set-cookie-parser\",\n \"ipaddr.js\",\n \"cross-fetch\",\n \"pg\",\n \"react-native-svg\",\n \"react-native-screens\",\n \"ws\",\n \"lodash\",\n // added these when using a worker env\n \"reading-time\",\n \"mdx-bundler/client\",\n \"gray-matter\",\n \"glob\",\n \"memoize-one\",\n \"css-in-js-utils\",\n \"hyphenate-style-name\",\n \"use-sync-external-store\",\n \"react-native-reanimated\",\n // uses .web.js extensions\n \"@react-navigation/core\",\n \"@react-navigation/native\",\n \"@react-navigation/elements\",\n \"@react-navigation/bottom-tabs\",\n \"@react-navigation/native-stack\",\n \"one\",\n \"one/drawer\",\n // one's own copy, by alias: prebundled with one so both share one context\n \"react-native-safe-area-context\",\n \"styleq\",\n \"fbjs\",\n \"@vxrn/universal-color-scheme\",\n \"@vxrn/color-scheme\",\n \"requires-port\",\n \"querystringify\",\n \"compare-versions\",\n \"strict-uri-encode\",\n \"decode-uri-component\",\n \"split-on-first\",\n \"filter-obj\",\n \"scheduler\",\n \"warn-once\",\n \"@radix-ui/react-compose-refs\",\n \"@radix-ui/react-slot\",\n \"nanoid\",\n \"swr\",\n \"swr/mutation\",\n \"one\",\n \"one/zero\",\n \"refractor/lang/tsx\",\n \"invariant\",\n \"tamagui/linear-gradient\",\n \"@react-native/normalize-color\",\n \"react-native\",\n \"@floating-ui/react\",\n \"@floating-ui/react-dom\",\n \"tamagui\",\n \"reforest\"\n ];\n if (mode === \"build\") {\n depsToOptimize.push(\"@babel/runtime\");\n }\n return {\n needsInterop,\n depsToOptimize,\n optimizeDeps: {\n include: depsToOptimize,\n exclude: [\n \"util\",\n \"@swc/wasm\",\n \"@swc/core-darwin-arm64\",\n \"moti/author\",\n \"@hot-updater/cli-tools\"\n ],\n needsInterop,\n // Enable lazy optimization - don't wait for all deps before starting server\n // This allows browser to process requests in parallel for faster initial load\n holdUntilCrawlEnd: false,\n rolldownOptions: {\n resolve: {\n extensions: webExtensions\n },\n // expo reads its platform from this constant, which babel-preset-expo\n // inlines during transform. a pre-bundled dep never goes through babel,\n // so the constant has to be defined here or it reads as undefined and\n // every expo module in a client chunk takes its native branch. expo's\n // dev HMR client is the one that bites: setupHMR calls\n // HMRClient.setup({ isEnabled: true }), the web form, and the native\n // branch asserts a string platform, so the whole client fails to\n // initialize and every route renders blank. rolldown takes define under\n // `transform`, and vite's dep optimizer merges that one key into its own\n // define; a top-level `define` is typed `never` and is rejected outright.\n transform: {\n define: {\n \"process.env.EXPO_OS\": '\"web\"'\n }\n },\n // some packages ship JSX in .js files (e.g., react-native-css-interop/dist/doctor.js).\n // .ts/.tsx must be declared too. when es-module-lexer can't read a dep entry,\n // vite's extractExportsData retries it as `moduleTypes[extname] || 'jsx'`, and\n // lexer always fails on TS syntax, so an undeclared .ts entry gets re-parsed as\n // JSX and dies on the first inline type specifier (`import { type Foo }`).\n moduleTypes: {\n \".js\": \"jsx\",\n \".ts\": \"ts\",\n \".tsx\": \"tsx\"\n },\n // react-native packages import native-only exports (TurboModuleRegistry etc.)\n // from react-native, which is aliased to react-native-web on web. react-native-web\n // doesn't export these, so rolldown would error. shimMissingExports creates\n // undefined shims instead, matching esbuild's lenient behavior.\n shimMissingExports: true\n }\n }\n };\n}\nexport {\n getOptimizeDeps\n};\n//# sourceMappingURL=getOptimizeDeps.js.map\n"],"mappings":";;;AACA,SAAS,gBAAgB,MAAM;CAC7B,IAAI,eAAe;EACjB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,IAAI,iBAAiB;EACnB,GAAG;EACH;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,IAAI,SAAS,SAAS;EACpB,eAAe,KAAK,gBAAgB;CACtC;CACA,OAAO;EACL;EACA;EACA,cAAc;GACZ,SAAS;GACT,SAAS;IACP;IACA;IACA;IACA;IACA;GACF;GACA;GAGA,mBAAmB;GACnB,iBAAiB;IACf,SAAS,EACP,YAAY,cACd;IAWA,WAAW,EACT,QAAQ,EACN,uBAAuB,UACzB,EACF;IAMA,aAAa;KACX,OAAO;KACP,OAAO;KACP,QAAQ;IACV;IAKA,oBAAoB;GACtB;EACF;CACF;AACF"}
@@ -8,6 +8,7 @@ const DEFAULT_ASSET_EXTS = [
8
8
  "svg",
9
9
  "webp",
10
10
  "lottie",
11
+ "glb",
11
12
  "m4v",
12
13
  "mov",
13
14
  "mp4",
@@ -1 +1 @@
1
- {"version":3,"file":"defaults.js","names":[],"sources":["constants/defaults.js"],"sourcesContent":["const DEFAULT_ASSET_EXTS = [\n // Image formats\n \"bmp\",\n \"gif\",\n \"jpg\",\n \"jpeg\",\n \"png\",\n \"psd\",\n \"svg\",\n \"webp\",\n // dotLottie animation archives\n \"lottie\",\n // Video formats\n \"m4v\",\n \"mov\",\n \"mp4\",\n \"mpeg\",\n \"mpg\",\n \"webm\",\n // Audio formats\n \"aac\",\n \"aiff\",\n \"caf\",\n \"m4a\",\n \"mp3\",\n \"wav\",\n // Document formats\n \"html\",\n \"pdf\",\n \"txt\",\n \"yaml\",\n \"yml\",\n // Font formats\n \"otf\",\n \"ttf\",\n \"woff\",\n \"woff2\",\n // Archives (virtual files)\n \"zip\"\n];\nexport {\n DEFAULT_ASSET_EXTS\n};\n//# sourceMappingURL=defaults.js.map\n"],"mappings":";AAAA,MAAM,qBAAqB;CAEzB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CAEA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CAEA;AACF"}
1
+ {"version":3,"file":"defaults.js","names":[],"sources":["constants/defaults.js"],"sourcesContent":["const DEFAULT_ASSET_EXTS = [\n // Image formats\n \"bmp\",\n \"gif\",\n \"jpg\",\n \"jpeg\",\n \"png\",\n \"psd\",\n \"svg\",\n \"webp\",\n // dotLottie animation archives\n \"lottie\",\n // binary gltf models\n \"glb\",\n // Video formats\n \"m4v\",\n \"mov\",\n \"mp4\",\n \"mpeg\",\n \"mpg\",\n \"webm\",\n // Audio formats\n \"aac\",\n \"aiff\",\n \"caf\",\n \"m4a\",\n \"mp3\",\n \"wav\",\n // Document formats\n \"html\",\n \"pdf\",\n \"txt\",\n \"yaml\",\n \"yml\",\n // Font formats\n \"otf\",\n \"ttf\",\n \"woff\",\n \"woff2\",\n // Archives (virtual files)\n \"zip\"\n];\nexport {\n DEFAULT_ASSET_EXTS\n};\n//# sourceMappingURL=defaults.js.map\n"],"mappings":";AAAA,MAAM,qBAAqB;CAEzB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CAEA;CAEA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CAEA;AACF"}