smbls 3.14.841 → 3.14.842

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 (33) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +37 -3
  3. package/dist/smbls.cjs +44 -44
  4. package/dist/smbls.cjs.map +2 -2
  5. package/dist/smbls.core.chunk-JBVUJUQL.esm.js +38 -0
  6. package/dist/smbls.core.chunk-JBVUJUQL.esm.js.map +6 -0
  7. package/dist/smbls.core.chunk-NONUVRXL.esm.js +36 -0
  8. package/dist/smbls.core.chunk-NONUVRXL.esm.js.map +6 -0
  9. package/dist/{smbls.core.dropdown-3KQXEVA7.esm.js → smbls.core.dropdown-TBLYU3DR.esm.js} +2 -2
  10. package/dist/smbls.core.esm.js +1 -1
  11. package/dist/smbls.core.fetch-I5K66EGS.esm.js +2 -0
  12. package/dist/smbls.core.fetch-I5K66EGS.esm.js.map +6 -0
  13. package/dist/{smbls.core.inspect-RK43N6ZS.esm.js → smbls.core.inspect-CVM7JDKV.esm.js} +2 -2
  14. package/dist/{smbls.core.sync-EGQBZXO4.esm.js → smbls.core.sync-ZNHOYM5C.esm.js} +2 -2
  15. package/dist/{smbls.core.windows-J5KM6ECG.esm.js → smbls.core.windows-C6QNO2N3.esm.js} +2 -2
  16. package/dist/smbls.embed.iife.js +1 -1
  17. package/dist/smbls.embed.iife.js.map +1 -1
  18. package/dist/smbls.esm.js +44 -44
  19. package/dist/smbls.esm.js.map +2 -2
  20. package/dist/smbls.iife-string.js +2 -2
  21. package/dist/smbls.iife.js +1 -1
  22. package/dist/smbls.iife.js.map +1 -1
  23. package/package.json +6 -6
  24. package/dist/smbls.core.chunk-LBCOGPQA.esm.js +0 -38
  25. package/dist/smbls.core.chunk-LBCOGPQA.esm.js.map +0 -6
  26. package/dist/smbls.core.chunk-ZHQLDZRA.esm.js +0 -36
  27. package/dist/smbls.core.chunk-ZHQLDZRA.esm.js.map +0 -6
  28. package/dist/smbls.core.fetch-L2MDZV25.esm.js +0 -2
  29. package/dist/smbls.core.fetch-L2MDZV25.esm.js.map +0 -6
  30. /package/dist/{smbls.core.dropdown-3KQXEVA7.esm.js.map → smbls.core.dropdown-TBLYU3DR.esm.js.map} +0 -0
  31. /package/dist/{smbls.core.inspect-RK43N6ZS.esm.js.map → smbls.core.inspect-CVM7JDKV.esm.js.map} +0 -0
  32. /package/dist/{smbls.core.sync-EGQBZXO4.esm.js.map → smbls.core.sync-ZNHOYM5C.esm.js.map} +0 -0
  33. /package/dist/{smbls.core.windows-J5KM6ECG.esm.js.map → smbls.core.windows-C6QNO2N3.esm.js.map} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # smbls
2
2
 
3
+ ## 3.14.842
4
+
5
+ ### Patch Changes
6
+
7
+ - Round 4 (Nika 2026-10-21, without the once-per-frame iOS flush):
8
+
9
+ - smbls/fetch: a stale pre-rendered page refreshes once it takes a recorded answer, whenever that happens (a replaced page whose only reads are getDB() calls in code).
10
+ - scratch/element: the sprite parse and the caret check use the target document's realm.
11
+ - element/smbls: a frame removed during a later chunk of the first render or the adoption stops the boot.
12
+ - polyglot/smbls: labels persist in the app's own window storage; a project loadTranslations is tracked.
13
+ - smbls: create() never writes into the caller's app definition (a second create() of the same definition took the first app's state); a node or key passed as the app is kept. Docs: first-render hooks run outside the document; "removed" is el.\_\_ref === null; wait with el.whenConnected.
14
+ - app-rules: the rules namespace is appRules, not R (census collision with minified R).
15
+ - frank: a globalScope.X named in a comment is no read; a block-scoped const/let is never the project's single-letter name; the watchdog runs its child without --cpu-prof unless FRANK_WATCHDOG_CPU_PROF=1 (the profiler hung pushes on macOS node 24).
16
+ - cli/runner: smbls start listens on 127.0.0.1 unless --lan / --host / SMBLS_HOST; a bundler flag with a value passes through; lock.json records the API base of its projectId and a lock from another base re-resolves by owner/key.
17
+ - channels: an API base in the environment (SYMBOLS_API_BASE_URL / SYMBOLS_API_URL) names the channel when it is a known channel's API.
18
+
3
19
  ## 3.14.841
4
20
 
5
21
  ### Patch Changes
package/README.md CHANGED
@@ -121,9 +121,40 @@ When things happen:
121
121
  route behind an awaited guard renders later, as before: the shell goes in,
122
122
  then the page — built outside the document in the same chunks and inserted
123
123
  whole.
124
+ - Every element of the first view — the root too — runs `onInit`, `onCreate`
125
+ and `onRender` while its node is outside the document, and stays outside
126
+ until the commit, some tasks later. Code that awaits something in a hook
127
+ and then tests `el.node.isConnected` finds `false` and must not read that
128
+ as "removed". A removed element has `el.node === null` and
129
+ `el.__ref === null`. For work that needs a connected node (`showModal()`,
130
+ measuring, focus), or a swap that must wait for the node to be in, use
131
+ `el.whenConnected(fn)`: it runs `fn(el)` now if the node is connected,
132
+ otherwise in the same task as the insertion that connects it, and never
133
+ for an element removed first.
134
+
135
+ ```js
136
+ onCreate: async (el) => {
137
+ const page = await el.scope.loader()
138
+ el.whenConnected(() => el.set(page)) // not: if (!el.node.isConnected) return
139
+ }
140
+ ```
141
+
142
+ `onMounted` runs after the first view is in (next frame).
124
143
  - `DOMContentLoaded` and `load` can fire before the app is in the document
125
144
  (the boot continues after the entry script's task). Code after `create()` in
126
145
  the entry script runs before the design system is prepared.
146
+ - The document can go away while the boot waits for its next task: an iframe
147
+ app whose host removes the frame, a test whose window closes when it ends.
148
+ The boot checks its document after that wait, and again at every chunk of
149
+ the first render and of the adoption of a pre-rendered page (one check per
150
+ chunk, not per element). A frame that left its document, or a document
151
+ that lost its window, stops the boot: the chunks built so far are disposed,
152
+ nothing more is built or attached, and `create()`
153
+ resolves with the bare definition, nothing mounts, no root `onCreate` runs,
154
+ no `popstate` listener is added and no error is logged. A top-level
155
+ document always keeps its boot. Await `create()` before you tear the frame
156
+ down when the app must finish. (A `<style>` whose document has no sheet for
157
+ it drops its rules; it never throws.)
127
158
  - The app root's own `onCreate` … `onRenderRouter` run before the root is in
128
159
  the document — every other element's hooks always ran before their element
129
160
  was attached. The first page's hooks, `onRouteChanged`, the scroll and the
@@ -154,9 +185,12 @@ When things happen:
154
185
  `fetch.seed.maxAge`), it is adopted from the build's data as any page is,
155
186
  and when the hydration window closes (on a replaced page: when its first
156
187
  view has settled) the fetch plugin asks again, at idle, for exactly what
157
- took a recorded answer and swaps in what changed;
158
- `window.__BRENDER_HYDRATION__.refreshed` counts it. A page that is not
159
- stale sends nothing extra. See `@symbo.ls/fetch`, "A pre-built page shows
188
+ took a recorded answer and swaps in what changed. A page whose first
189
+ recorded answer is taken later (a `getDB()` read in `onRender`) refreshes
190
+ after that take, once its view settled again.
191
+ `window.__BRENDER_HYDRATION__.refreshed` counts it; on a replaced page that
192
+ object is `{ replaced: true, refreshed }`. A page that is not stale sends
193
+ nothing extra. See `@symbo.ls/fetch`, "A pre-built page shows
160
194
  the data of its build".
161
195
 
162
196
  ## Plugins