embedded-react 0.21.0 → 0.22.0

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 (99) hide show
  1. package/README.md +2 -2
  2. package/aot/compile.mjs +1 -1
  3. package/aot/compiler/alerts.mjs +604 -0
  4. package/aot/compiler/check.mjs +1 -1
  5. package/aot/compiler/collect.mjs +1 -1
  6. package/aot/compiler/elements/button.mjs +3 -3
  7. package/aot/compiler/elements/image-background.mjs +1 -1
  8. package/aot/compiler/elements/props.mjs +10 -6
  9. package/aot/compiler/elements/section-list.mjs +1 -1
  10. package/aot/compiler/expressions.mjs +29 -2
  11. package/aot/compiler/handlers.mjs +73 -16
  12. package/aot/compiler/keyboard-dismiss.mjs +99 -0
  13. package/aot/compiler/keyboard.mjs +1 -1
  14. package/aot/compiler/lower.mjs +12 -0
  15. package/aot/compiler/nodes.mjs +17 -9
  16. package/aot/compiler/out.mjs +4 -0
  17. package/aot/compiler/package/codegen.mjs +36 -2
  18. package/aot/compiler/package/format.mjs +5 -3
  19. package/aot/compiler/package/lower.mjs +53 -19
  20. package/aot/compiler/scroll-to.mjs +112 -0
  21. package/aot/compiler/style-text.mjs +2 -2
  22. package/aot/compiler/svg.mjs +6 -3
  23. package/aot/compiler/updaters.mjs +1 -0
  24. package/aot/style-map.mjs +44 -1
  25. package/assets/bake-font.mjs +187 -244
  26. package/assets/bake-image.mjs +47 -71
  27. package/assets/bake-svg.mjs +465 -533
  28. package/assets/build-builtin-font.mjs +14 -27
  29. package/assets/emit-c.mjs +124 -204
  30. package/assets/emit-container.mjs +129 -197
  31. package/assets/emit-pack.mjs +92 -136
  32. package/assets/font-config.mjs +19 -27
  33. package/assets/font-sizes.mjs +432 -507
  34. package/assets/glyph-coverage.mjs +170 -214
  35. package/assets/index.mjs +52 -97
  36. package/assets/rasterize.mjs +173 -194
  37. package/assets/svg-loader.mjs +42 -48
  38. package/build.mjs +84 -101
  39. package/cli.mjs +482 -621
  40. package/compile-bin.mjs +24 -36
  41. package/flash.mjs +297 -401
  42. package/hotreload/dev-device.mjs +229 -270
  43. package/hotreload/pack-app.mjs +118 -159
  44. package/hotreload/pack-split.mjs +144 -200
  45. package/hotreload/package-transfer.mjs +128 -131
  46. package/hotreload/protocol.mjs +118 -118
  47. package/hotreload/uploader.mjs +132 -159
  48. package/hotreload/watch-tree.mjs +56 -65
  49. package/pack-container.mjs +93 -123
  50. package/package.json +19 -16
  51. package/persist-transform.mjs +89 -105
  52. package/qjsc-wasm.mjs +47 -72
  53. package/sim/embedded-react.wasm +0 -0
  54. package/sim/index.html +1 -1
  55. package/sim-server.mjs +260 -354
  56. package/src/embedded-react/Alert.mjs +112 -0
  57. package/src/embedded-react/Animated.mjs +412 -0
  58. package/src/embedded-react/{AppRegistry.js → AppRegistry.mjs} +26 -25
  59. package/src/embedded-react/{Button.js → Button.mjs} +29 -53
  60. package/src/embedded-react/{Dimensions.js → Dimensions.mjs} +12 -17
  61. package/src/embedded-react/Easing.mjs +34 -0
  62. package/src/embedded-react/{FlatList.js → FlatList.mjs} +25 -42
  63. package/src/embedded-react/{ImageBackground.js → ImageBackground.mjs} +11 -22
  64. package/src/embedded-react/Keyboard.mjs +82 -0
  65. package/src/embedded-react/{LayoutAnimation.js → LayoutAnimation.mjs} +17 -28
  66. package/src/embedded-react/PanResponder.mjs +256 -0
  67. package/src/embedded-react/{Platform.js → Platform.mjs} +8 -9
  68. package/src/embedded-react/{Pressable.js → Pressable.mjs} +12 -25
  69. package/src/embedded-react/SectionList.mjs +103 -0
  70. package/src/embedded-react/{StyleSheet.js → StyleSheet.mjs} +16 -20
  71. package/src/embedded-react/{TouchableOpacity.js → TouchableOpacity.mjs} +47 -83
  72. package/src/embedded-react/background-image.mjs +321 -0
  73. package/src/embedded-react/{components.js → components.mjs} +1 -3
  74. package/src/embedded-react/{imperative.js → imperative.mjs} +27 -38
  75. package/src/embedded-react/index.d.ts +155 -2
  76. package/src/embedded-react/index.js +26 -19
  77. package/src/embedded-react/layout-anim-config.mjs +85 -0
  78. package/src/embedded-react/{list-child.js → list-child.mjs} +11 -20
  79. package/src/embedded-react/{named-colors.js → named-colors.mjs} +2 -6
  80. package/src/embedded-react/nativeModule.mjs +371 -0
  81. package/src/embedded-react/split-style.mjs +57 -0
  82. package/src/embedded-react/svg-ops.mjs +1075 -0
  83. package/src/embedded-react/{useHostValue.js → useHostValue.mjs} +2 -4
  84. package/src/embedded-react/{usePersistentState.js → usePersistentState.mjs} +34 -38
  85. package/src/embedded-react/{warn-props.js → warn-props.mjs} +32 -39
  86. package/src/host-config.mjs +512 -0
  87. package/src/{native-ui.js → native-ui.mjs} +1 -8
  88. package/src/props.mjs +341 -0
  89. package/src/{renderer.js → renderer.mjs} +30 -44
  90. package/src/embedded-react/Animated.js +0 -440
  91. package/src/embedded-react/Easing.js +0 -39
  92. package/src/embedded-react/PanResponder.js +0 -330
  93. package/src/embedded-react/SectionList.js +0 -146
  94. package/src/embedded-react/layout-anim-config.js +0 -101
  95. package/src/embedded-react/nativeModule.js +0 -462
  96. package/src/embedded-react/split-style.js +0 -58
  97. package/src/embedded-react/svg-ops.js +0 -1295
  98. package/src/host-config.js +0 -548
  99. package/src/props.js +0 -306
@@ -13,10 +13,9 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
-
17
16
  // pack-split — build the vendor/app SPLIT of a Flow A app, for incremental hot reload.
18
17
  //
19
- // The monolithic packer (pack-app.mjs) inlines react + react-reconciler + the embedded-react library
18
+ // The monolithic packer (pack-app.mts) inlines react + react-reconciler + the embedded-react library
20
19
  // together with the user's source into one ~1 MB bytecode blob. But the framework half never changes
21
20
  // when you edit your app, so re-shipping and re-parsing it on every save is pure waste. pack-split cuts
22
21
  // the bundle along the one seam that matters:
@@ -32,45 +31,40 @@
32
31
  // then the app. A hot-reload frame carries only the app chunk — the device keeps the resident vendor and
33
32
  // swaps just the app (a "soft reset"). Old monolithic containers still boot unchanged (emit-container's
34
33
  // vendor section is optional), so this is backwards-compatible, and production behavior is identical.
35
-
36
- import {createRequire} from 'node:module';
37
- import {pathToFileURL} from 'node:url';
38
- import {basename, dirname, resolve, relative} from 'node:path';
39
- import {existsSync, statSync} from 'node:fs';
40
-
34
+ import { createRequire } from 'node:module';
35
+ import { pathToFileURL } from 'node:url';
36
+ import { basename, dirname, resolve, relative } from 'node:path';
37
+ import { existsSync, statSync } from 'node:fs';
41
38
  const require = createRequire(import.meta.url);
42
-
43
- // QuickJS release the bytecode container targets — MUST match cli.mjs's QJS_TAG, pack-app.mjs, and the
39
+ const loadEsbuild = () => require('esbuild');
40
+ // QuickJS release the bytecode container targets — MUST match cli.mts's QJS_TAG, pack-app.mts, and the
44
41
  // device loader.
45
42
  const QJS_TAG = 'v0.15.0';
46
-
47
43
  // The shared deps the app chunk resolve through the vendor registry instead of inlining.
48
44
  export const VENDOR_EXTERNALS = [
49
- 'react',
50
- 'react/jsx-runtime',
51
- 'embedded-react',
45
+ 'react',
46
+ 'react/jsx-runtime',
47
+ 'embedded-react',
52
48
  ];
53
-
54
- const esbuildCommon = nodePaths => ({
55
- bundle: true,
56
- format: 'iife',
57
- platform: 'neutral',
58
- target: 'es2020',
59
- jsx: 'automatic',
60
- nodePaths,
61
- define: {'process.env.NODE_ENV': '"production"'},
62
- legalComments: 'none',
63
- logLevel: 'silent',
64
- write: false,
49
+ const esbuildCommon = (nodePaths) => ({
50
+ bundle: true,
51
+ format: 'iife',
52
+ platform: 'neutral',
53
+ target: 'es2020',
54
+ jsx: 'automatic',
55
+ nodePaths,
56
+ define: { 'process.env.NODE_ENV': '"production"' },
57
+ legalComments: 'none',
58
+ logLevel: 'silent',
59
+ write: false,
65
60
  });
66
-
67
61
  /**
68
62
  * The vendor chunk's synthetic entry source: import the shared deps, register them in a runtime module
69
63
  * registry, and install the `require()` shim the app chunk resolves through. esbuild's `__require` helper
70
64
  * (emitted for the app chunk's external imports) finds this global `require` at runtime.
71
65
  */
72
66
  function vendorEntrySource() {
73
- return `import * as React from 'react';
67
+ return `import * as React from 'react';
74
68
  import * as JsxRuntime from 'react/jsx-runtime';
75
69
  import * as EmbeddedReact from 'embedded-react';
76
70
  const reg = (globalThis.__er_modules = globalThis.__er_modules || {});
@@ -84,217 +78,167 @@ globalThis.require = function (id) {
84
78
  };
85
79
  `;
86
80
  }
87
-
88
81
  /**
89
82
  * Bundle the vendor chunk (react + reconciler + embedded-react lib) to a self-contained IIFE source.
90
83
  *
91
- * @param {object} options
92
- * @param {string} options.libSrc embedded-react library entry (aliased as 'embedded-react').
93
- * @param {string[]} options.nodePaths esbuild nodePaths (package + project node_modules).
94
- * @returns {Promise<string>} The bundled JS source.
84
+ * @returns The bundled JS source.
95
85
  */
96
- export async function bundleVendorSource({libSrc, nodePaths}) {
97
- const esbuild = require('esbuild');
98
- const result = await esbuild.build({
99
- ...esbuildCommon(nodePaths),
100
- stdin: {
101
- contents: vendorEntrySource(),
102
- resolveDir: dirname(libSrc),
103
- sourcefile: 'vendor-entry.js',
104
- loader: 'js',
105
- },
106
- alias: {'embedded-react': libSrc},
107
- });
108
- return result.outputFiles[0].text;
86
+ export async function bundleVendorSource({ libSrc, nodePaths, }) {
87
+ const esbuild = loadEsbuild();
88
+ const result = await esbuild.build({
89
+ ...esbuildCommon(nodePaths),
90
+ stdin: {
91
+ contents: vendorEntrySource(),
92
+ resolveDir: dirname(libSrc),
93
+ sourcefile: 'vendor-entry.js',
94
+ loader: 'js',
95
+ },
96
+ alias: { 'embedded-react': libSrc },
97
+ });
98
+ return result.outputFiles[0].text;
109
99
  }
110
-
111
100
  /**
112
101
  * Build an asset-discovering esbuild plugin shared with the monolithic packer's behavior: image/font/svg
113
102
  * imports become bare string names (the bytes live in the ERPK pack). The app's own source gives its native modules
114
103
  * their signatures and, when persist is on, gets the useState→persist transform so state survives a live reload.
115
104
  */
116
- function makeAssetPlugin({images, fonts, persist, projectRoot}) {
117
- const assetName = filePath => basename(filePath).replace(/\.[^.]+$/, '');
118
- return {
119
- name: 'embedded-react-assets',
120
- async setup(build) {
121
- const {registerSvgVectorLoader} =
122
- await import('../assets/svg-loader.mjs');
123
- const {shouldPersist, transformPersist} =
124
- await import('../persist-transform.mjs');
125
- const {loadAppFile, loadDependencyFile} =
126
- await import('../aot/app-file-loader.mjs');
127
- const normalizedProjectRoot = projectRoot.replace(/\\/g, '/');
128
- build.onLoad({filter: /\.(jsx?|tsx?)$/}, async args => {
129
- if (!shouldPersist(args.path, normalizedProjectRoot)) {
130
- return loadDependencyFile(args.path);
131
- }
132
- try {
133
- return await loadAppFile(
134
- args.path,
135
- persist
136
- ? source =>
137
- transformPersist(
138
- source,
139
- relative(projectRoot, args.path).replace(/\\/g, '/'),
140
- )
141
- : undefined,
142
- );
143
- } catch (error) {
144
- return {errors: [{text: `persist transform: ${error.message}`}]};
145
- }
146
- });
147
- build.onLoad({filter: /\.(png|jpe?g|webp|gif|bmp)$/i}, args => {
148
- const name = assetName(args.path);
149
- images.set(name, args.path);
150
- return {
151
- contents: `module.exports = ${JSON.stringify(name)};`,
152
- loader: 'js',
153
- };
154
- });
155
- build.onLoad({filter: /\.(ttf|otf)$/i}, args => {
156
- const family = assetName(args.path);
157
- fonts.set(family, args.path);
158
- return {
159
- contents: `module.exports = ${JSON.stringify(family)};`,
160
- loader: 'js',
161
- };
162
- });
163
- registerSvgVectorLoader(build, (name, pngPath) =>
164
- images.set(name, pngPath),
165
- );
166
- },
167
- };
105
+ function makeAssetPlugin({ images, fonts, persist, projectRoot, }) {
106
+ const assetName = (filePath) => basename(filePath).replace(/\.[^.]+$/, '');
107
+ return {
108
+ name: 'embedded-react-assets',
109
+ async setup(build) {
110
+ const { registerSvgVectorLoader } = await import('../assets/svg-loader.mjs');
111
+ const { shouldPersist, transformPersist } = await import('../persist-transform.mjs');
112
+ const { loadAppFile, loadDependencyFile } = await import('../aot/app-file-loader.mjs');
113
+ const normalizedProjectRoot = projectRoot.replace(/\\/g, '/');
114
+ build.onLoad({ filter: /\.(jsx?|tsx?)$/ }, async (args) => {
115
+ if (!shouldPersist(args.path, normalizedProjectRoot)) {
116
+ return loadDependencyFile(args.path);
117
+ }
118
+ try {
119
+ return await loadAppFile(args.path, persist
120
+ ? (source) => transformPersist(source, relative(projectRoot, args.path).replace(/\\/g, '/'))
121
+ : undefined);
122
+ }
123
+ catch (error) {
124
+ return { errors: [{ text: `persist transform: ${error.message}` }] };
125
+ }
126
+ });
127
+ build.onLoad({ filter: /\.(png|jpe?g|webp|gif|bmp)$/i }, args => {
128
+ const name = assetName(args.path);
129
+ images.set(name, args.path);
130
+ return {
131
+ contents: `module.exports = ${JSON.stringify(name)};`,
132
+ loader: 'js',
133
+ };
134
+ });
135
+ build.onLoad({ filter: /\.(ttf|otf)$/i }, args => {
136
+ const family = assetName(args.path);
137
+ fonts.set(family, args.path);
138
+ return {
139
+ contents: `module.exports = ${JSON.stringify(family)};`,
140
+ loader: 'js',
141
+ };
142
+ });
143
+ registerSvgVectorLoader(build, (name, pngPath) => images.set(name, pngPath));
144
+ },
145
+ };
168
146
  }
169
-
170
147
  /**
171
148
  * Bundle the app chunk: the user's entry with the shared deps marked external (resolved at runtime through
172
149
  * the vendor registry). Returns the bundled source plus the discovered image/font maps for baking.
173
150
  */
174
- export async function bundleAppSource({
175
- entry,
176
- projectRoot,
177
- nodePaths,
178
- persist = false,
179
- }) {
180
- const esbuild = require('esbuild');
181
- const images = new Map();
182
- const fonts = new Map();
183
-
184
- const result = await esbuild.build({
185
- ...esbuildCommon(nodePaths),
186
- entryPoints: [entry],
187
- external: VENDOR_EXTERNALS,
188
- plugins: [makeAssetPlugin({images, fonts, persist, projectRoot})],
189
- });
190
- return {source: result.outputFiles[0].text, images, fonts};
151
+ export async function bundleAppSource({ entry, projectRoot, nodePaths, persist = false, }) {
152
+ const esbuild = loadEsbuild();
153
+ const images = new Map();
154
+ const fonts = new Map();
155
+ const result = await esbuild.build({
156
+ ...esbuildCommon(nodePaths),
157
+ entryPoints: [entry],
158
+ external: VENDOR_EXTERNALS,
159
+ plugins: [makeAssetPlugin({ images, fonts, persist, projectRoot })],
160
+ });
161
+ return { source: result.outputFiles[0].text, images, fonts };
191
162
  }
192
-
193
163
  /** Bake the discovered images/fonts into an ERPK asset pack (or null if there are none). */
194
- async function bakeAssets({images, fonts, source, projectRoot}) {
195
- const {bakeImage} = await import('../assets/bake-image.mjs');
196
- const {bakeFont} = await import('../assets/bake-font.mjs');
197
- const {resolveFontJobs} = await import('../assets/font-config.mjs');
198
- const {analyzeFontSizes, warnFontSizes} =
199
- await import('../assets/font-sizes.mjs');
200
- const {warnMissingGlyphs} = await import('../assets/glyph-coverage.mjs');
201
- const {emitAssetPack} = await import('../assets/emit-pack.mjs');
202
-
203
- const usedSizes = analyzeFontSizes(source);
204
-
205
- let config = {};
206
- const configPath = resolve(projectRoot, 'assets.config.js');
207
- if (existsSync(configPath))
208
- config =
209
- (
210
- await import(
211
- `${pathToFileURL(configPath).href}?t=${statSync(configPath).mtimeMs}`
212
- )
213
- ).default || {};
214
- const fontConfig = config.fonts || {};
215
- const imageConfig = config.images || {};
216
-
217
- const fontJobs = resolveFontJobs(fonts, fontConfig, usedSizes.sizes);
218
- const imageJobs = [...images.entries()].map(([name, path]) => ({
219
- path,
220
- name,
221
- format: imageConfig[name]?.format,
222
- }));
223
- const bakedImages = imageJobs.map(bakeImage);
224
- const bakedFonts = fontJobs.map(bakeFont);
225
- warnMissingGlyphs({source, fonts: bakedFonts});
226
- warnFontSizes({used: usedSizes, fonts: bakedFonts});
227
- return bakedImages.length || bakedFonts.length
228
- ? emitAssetPack({images: bakedImages, fonts: bakedFonts})
229
- : null;
164
+ async function bakeAssets({ images, fonts, source, projectRoot, }) {
165
+ const { bakeImage } = await import('../assets/bake-image.mjs');
166
+ const { bakeFont } = await import('../assets/bake-font.mjs');
167
+ const { resolveFontJobs } = await import('../assets/font-config.mjs');
168
+ const { analyzeFontSizes, warnFontSizes } = await import('../assets/font-sizes.mjs');
169
+ const { warnMissingGlyphs } = await import('../assets/glyph-coverage.mjs');
170
+ const { emitAssetPack } = await import('../assets/emit-pack.mjs');
171
+ const usedSizes = analyzeFontSizes(source);
172
+ let config = {};
173
+ const configPath = resolve(projectRoot, 'assets.config.js');
174
+ if (existsSync(configPath))
175
+ config =
176
+ (await import(`${pathToFileURL(configPath).href}?t=${statSync(configPath).mtimeMs}`)).default || {};
177
+ const fontConfig = config.fonts || {};
178
+ const imageConfig = config.images || {};
179
+ const fontJobs = resolveFontJobs(fonts, fontConfig, usedSizes.sizes);
180
+ const imageJobs = [...images.entries()].map(([name, path]) => ({
181
+ path,
182
+ name,
183
+ format: imageConfig[name]?.format,
184
+ }));
185
+ const bakedImages = imageJobs.map(bakeImage);
186
+ const bakedFonts = fontJobs.map(bakeFont);
187
+ warnMissingGlyphs({ source, fonts: bakedFonts });
188
+ warnFontSizes({ used: usedSizes, fonts: bakedFonts });
189
+ return bakedImages.length || bakedFonts.length
190
+ ? emitAssetPack({ images: bakedImages, fonts: bakedFonts })
191
+ : null;
230
192
  }
231
-
232
193
  /**
233
194
  * Compile the vendor chunk to a QuickJS bytecode blob. Built once per dev session (it changes only when a
234
195
  * dependency changes), so the per-edit reload never re-ships it.
235
- *
236
- * @returns {Promise<{bytecode: Buffer, bytecodeLen: number}>}
237
196
  */
238
- export async function packVendor({libSrc, nodePaths, simDir, strip = false}) {
239
- const {compileToBytecode} = await import('../qjsc-wasm.mjs');
240
- const source = await bundleVendorSource({libSrc, nodePaths});
241
- const bytecode = await compileToBytecode(source, simDir, {strip});
242
- return {bytecode, bytecodeLen: bytecode.length};
197
+ export async function packVendor({ libSrc, nodePaths, simDir, strip = false, }) {
198
+ const { compileToBytecode } = await import('../qjsc-wasm.mjs');
199
+ const source = await bundleVendorSource({ libSrc, nodePaths });
200
+ const bytecode = await compileToBytecode(source, simDir, { strip });
201
+ return { bytecode, bytecodeLen: bytecode.length };
243
202
  }
244
-
245
203
  /**
246
204
  * Compile the app chunk to a QuickJS bytecode blob and bake its assets. This is the only thing rebuilt on
247
205
  * each save — and the only thing a hot-reload frame carries.
248
- *
249
- * @returns {Promise<{bytecode: Buffer, assetPack: Buffer|null, bytecodeLen: number, assetsLen: number}>}
250
206
  */
251
- export async function packApp({
252
- entry,
253
- projectRoot,
254
- libSrc,
255
- nodePaths,
256
- simDir,
257
- persist = false,
258
- strip = false,
259
- }) {
260
- const {compileToBytecode} = await import('../qjsc-wasm.mjs');
261
- const {source, images, fonts} = await bundleAppSource({
262
- entry,
263
- projectRoot,
264
- nodePaths,
265
- persist,
266
- });
267
- const bytecode = await compileToBytecode(source, simDir, {strip});
268
- const assetPack = await bakeAssets({images, fonts, source, projectRoot});
269
- return {
270
- bytecode,
271
- assetPack,
272
- bytecodeLen: bytecode.length,
273
- assetsLen: assetPack ? assetPack.length : 0,
274
- };
207
+ export async function packApp({ entry, projectRoot, nodePaths, simDir, persist = false, strip = false, }) {
208
+ const { compileToBytecode } = await import('../qjsc-wasm.mjs');
209
+ const { source, images, fonts } = await bundleAppSource({
210
+ entry,
211
+ projectRoot,
212
+ nodePaths,
213
+ persist,
214
+ });
215
+ const bytecode = await compileToBytecode(source, simDir, { strip });
216
+ const assetPack = await bakeAssets({ images, fonts, source, projectRoot });
217
+ return {
218
+ bytecode,
219
+ assetPack,
220
+ bytecodeLen: bytecode.length,
221
+ assetsLen: assetPack ? assetPack.length : 0,
222
+ };
275
223
  }
276
-
277
224
  /**
278
225
  * Assemble the flashed BOOT container: vendor + app + assets in one ERCF. The device runs vendor first
279
226
  * (installs the registry + require shim), registers assets, then runs the app. Used by `embedded-react
280
227
  * build` so the same firmware/artifact serves both production and hot reload.
281
228
  */
282
- export function emitBootContainer({vendorBytecode, appBytecode, assetPack}) {
283
- return emit({bytecode: appBytecode, vendorBytecode, assetPack});
229
+ export function emitBootContainer({ vendorBytecode, appBytecode, assetPack, }) {
230
+ return emit({ bytecode: appBytecode, vendorBytecode, assetPack });
284
231
  }
285
-
286
232
  /**
287
233
  * Assemble a hot-reload APP frame: the app chunk + its assets, NO vendor. The device keeps the resident
288
234
  * vendor and swaps just the app (soft reset). This is the ~64 KB that travels on each save.
289
235
  */
290
- export function emitAppFrame({appBytecode, assetPack}) {
291
- return emit({bytecode: appBytecode, assetPack});
236
+ export function emitAppFrame({ appBytecode, assetPack, }) {
237
+ return emit({ bytecode: appBytecode, assetPack });
292
238
  }
293
-
294
239
  // emitBootContainer/emitAppFrame are async (emit() dynamically imports the emitter) — callers await them.
295
240
  async function emit(options) {
296
- const {emitContainer} = await import('../assets/emit-container.mjs');
297
- return emitContainer({...options, qjsTag: QJS_TAG});
241
+ const { emitContainer } = await import('../assets/emit-container.mjs');
242
+ return emitContainer({ ...options, qjsTag: QJS_TAG });
298
243
  }
299
-
300
- export {QJS_TAG};
244
+ export { QJS_TAG };