smbls 3.14.837 → 3.14.838

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 (57) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +73 -0
  3. package/core.js +52 -0
  4. package/dist/smbls.cjs +52 -51
  5. package/dist/smbls.cjs.map +6 -0
  6. package/dist/smbls.core.analyze-PPLS2PAN.esm.js +2 -0
  7. package/dist/smbls.core.analyze-PPLS2PAN.esm.js.map +6 -0
  8. package/dist/smbls.core.chunk-7JOJ6YVP.esm.js +22 -0
  9. package/dist/smbls.core.chunk-7JOJ6YVP.esm.js.map +6 -0
  10. package/dist/smbls.core.chunk-I5EGBLTJ.esm.js +2 -0
  11. package/dist/smbls.core.chunk-I5EGBLTJ.esm.js.map +6 -0
  12. package/dist/smbls.core.chunk-ITZIHIXJ.esm.js +2 -0
  13. package/dist/smbls.core.chunk-ITZIHIXJ.esm.js.map +6 -0
  14. package/dist/smbls.core.chunk-J6JACLXE.esm.js +36 -0
  15. package/dist/smbls.core.chunk-J6JACLXE.esm.js.map +6 -0
  16. package/dist/smbls.core.chunk-KA4MADUH.esm.js +38 -0
  17. package/dist/smbls.core.chunk-KA4MADUH.esm.js.map +6 -0
  18. package/dist/smbls.core.chunk-NJZRPU6B.esm.js +3 -0
  19. package/dist/smbls.core.chunk-NJZRPU6B.esm.js.map +6 -0
  20. package/dist/smbls.core.chunk-PDZOHW5Y.esm.js +2 -0
  21. package/dist/smbls.core.chunk-PDZOHW5Y.esm.js.map +6 -0
  22. package/dist/smbls.core.chunk-WFARPHWF.esm.js +2 -0
  23. package/dist/smbls.core.chunk-WFARPHWF.esm.js.map +6 -0
  24. package/dist/smbls.core.chunk-ZCSKJHNR.esm.js +2 -0
  25. package/dist/smbls.core.chunk-ZCSKJHNR.esm.js.map +6 -0
  26. package/dist/smbls.core.dropdown-67KQ35SU.esm.js +69 -0
  27. package/dist/smbls.core.dropdown-67KQ35SU.esm.js.map +6 -0
  28. package/dist/smbls.core.esm.js +2 -0
  29. package/dist/smbls.core.esm.js.map +6 -0
  30. package/dist/smbls.core.fetch-OYYY24CY.esm.js +2 -0
  31. package/dist/smbls.core.fetch-OYYY24CY.esm.js.map +6 -0
  32. package/dist/smbls.core.fetchOnCreate-QRFDUMYQ.esm.js +2 -0
  33. package/dist/smbls.core.fetchOnCreate-QRFDUMYQ.esm.js.map +6 -0
  34. package/dist/smbls.core.inspect-6DYWYQQS.esm.js +8 -0
  35. package/dist/smbls.core.inspect-6DYWYQQS.esm.js.map +6 -0
  36. package/dist/smbls.core.local-ITIODLSE.esm.js +2 -0
  37. package/dist/smbls.core.local-ITIODLSE.esm.js.map +6 -0
  38. package/dist/smbls.core.shorthand-CY4EDSP4.esm.js +2 -0
  39. package/dist/smbls.core.shorthand-CY4EDSP4.esm.js.map +6 -0
  40. package/dist/smbls.core.sync-2BMJGR2N.esm.js +2 -0
  41. package/dist/smbls.core.sync-2BMJGR2N.esm.js.map +6 -0
  42. package/dist/smbls.core.tooltip-PBREERMR.esm.js +2 -0
  43. package/dist/smbls.core.tooltip-PBREERMR.esm.js.map +6 -0
  44. package/dist/smbls.core.windows-DRIJQJSI.esm.js +2 -0
  45. package/dist/smbls.core.windows-DRIJQJSI.esm.js.map +6 -0
  46. package/dist/smbls.embed.iife.js +1 -20
  47. package/dist/smbls.embed.iife.js.map +1 -0
  48. package/dist/smbls.esm.js +67 -66
  49. package/dist/smbls.esm.js.map +6 -0
  50. package/dist/smbls.iife-string.js +2 -2
  51. package/dist/smbls.iife.js +2 -175
  52. package/dist/smbls.iife.js.map +1 -0
  53. package/dist/smbls.socket-io-client.esm.js +1 -0
  54. package/dist/smbls.socket-io-client.esm.js.map +6 -0
  55. package/embed.js +14 -2
  56. package/index.js +9 -5
  57. package/package.json +19 -13
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # smbls
2
2
 
3
+ ## 3.14.838
4
+
5
+ ### Patch Changes
6
+
7
+ - xma.info report round (FW-XMA-EXCEPTIONS-UPSTREAM-1), its /simplify pass and the follow-ups.
8
+
9
+ - element: optional features (view events, `always` handler chains, plain-row diff, hydration, yielding mount) are feature slots — `create.js` installs all of them, `src/lean.js` none (the smbls embed); one chunked mount driver and one meter per task; the chunked first render costs about a third of what it did (a resumed row goes after the previous row, one `__ref` shape, the budget is read once); `whenConnected`; `onWindowLoad` after load reaches an element built off-document; a null/false row item under `childExtends` builds nothing; building an n-row list no longer scans the parent's keys per row.
10
+ - smbls: the embed is back under its 72 KiB cap and the iife is 2.6 % smaller (terser renames locals after esbuild in the two classic-script builds; maps chained); kits stay lazy in `smbls/core`, fetch is one chunk; live sync loads only when `wantsLiveSync`; a URL-loaded dependency registers in parcel builds.
11
+ - router: the newest navigation wins over one waiting on an async guard; no lazy chunk rides along a resumed route.
12
+ - default-config: accessible Dropdown writes its attributes straight to the nodes, one tab stop per list, an `active` write re-runs only the rows that change, a key-opened menu focuses its item during the reveal; Dialog and Icon clean-ups.
13
+ - styling (scratch, css, css-in-props): one compound-value resolver; CSS colour functions (`oklch()`, `color()`, `color-mix()`, `light-dark()`, `lab()`, `lch()`, `hwb()`) pass through compound values; border props read the scheme only in literal mode.
14
+ - fetch / brender: every server render starts from an empty query cache (seeds carry every request a page makes); the local adapter stays lazy; shared route loop for `smbls build` and `smbls brender`, `smbls brender --strict`.
15
+ - cli: every command that writes to the platform prints its target and needs a typed "production" or `--yes` for production; `smbls deploy --save` saves the provider, `-y/--yes` is consent; `deploy --dry-run` no longer pushes.
16
+ - frank-audit: FA205 reports only factory calls that run at module load.
17
+
3
18
  ## 3.14.837
4
19
 
5
20
  ### Patch Changes
package/README.md CHANGED
@@ -88,6 +88,53 @@ init(config, {
88
88
  })
89
89
  ```
90
90
 
91
+ ## The first render
92
+
93
+ The boot runs as short main-thread tasks: the task the entry script runs in
94
+ ends when `create()` is called, then the design system, the shell (the app
95
+ root) and the first page each start a task of their own, and the shell and the
96
+ page are built in chunks of 10 ms (`@symbo.ls/element` yielding mounts).
97
+
98
+ The first view is painted once. The root is built outside the document and
99
+ goes in with one insertion when the shell and the first page are complete, so
100
+ the first paint shows the whole first view, as when the boot was one task, and
101
+ nothing on screen moves.
102
+
103
+ ```js
104
+ create(App, { firstRender: 8 }) // chunks of 8 ms
105
+ create(App, { firstRender: { budget: 10, progressive: true } }) // show as it builds
106
+ create(App, { firstRender: false }) // the whole boot in one task
107
+ ```
108
+
109
+ `progressive: true` attaches the root at once and the page as it builds:
110
+ earlier first content, but what follows the routed content (a footer after the
111
+ router's container) can move as the page grows.
112
+
113
+ When things happen:
114
+
115
+ - The promise `create()` returns resolves after the first view is in the
116
+ document and the first page's `onRender` and `onRouteChanged` have run. A
117
+ route behind an awaited guard renders later, as before: the shell goes in,
118
+ then the page — built outside the document in the same chunks and inserted
119
+ whole.
120
+ - `DOMContentLoaded` and `load` can fire before the app is in the document
121
+ (the boot continues after the entry script's task). Code after `create()` in
122
+ the entry script runs before the design system is prepared.
123
+ - The app root's own `onCreate` … `onRenderRouter` run before the root is in
124
+ the document — every other element's hooks always ran before their element
125
+ was attached. The first page's hooks, `onRouteChanged`, the scroll and the
126
+ hash target run in the document. No `onMounted` runs before the first view
127
+ is in.
128
+ - An element whose children were built in later chunks fires `onCreate` …
129
+ `onRender` after its last child; every hook keeps the order of a one-task
130
+ build (see the element package README).
131
+ - A project's own `domqlOptions.mountYield` wins over the 10 ms budget. After
132
+ the first render, reconciles, `if:` and navigations build in one go again
133
+ unless the project set `domqlOptions.mountYield`.
134
+ - A boot over a pre-rendered (brender) page builds its shell and page in one
135
+ task over the server markup (only the entry script's task ends first); a
136
+ server render keeps the whole boot in one task.
137
+
91
138
  ## Plugins
92
139
 
93
140
  domql supports a plugin system via `context.plugins`. Plugins hook into the element lifecycle and can extend how event handlers, props, and metadata are processed.
@@ -163,6 +210,32 @@ const Button = {
163
210
 
164
211
  Also includes `@symbo.ls/cli`, `@symbo.ls/fetch`, `@symbo.ls/sync`, and `@symbo.ls/helmet`.
165
212
 
213
+ ## Entries and bundle size
214
+
215
+ | Import | File | What it is |
216
+ |--------|------|------------|
217
+ | `smbls` | `dist/smbls.esm.js` (+ `smbls.cjs`) | The full runtime: the public API **plus the platform registry** — every bundled package registered on `globalThis.__SMBLS_PKGS__` so published or fetched project code (frank-serialized functions, `smbls fetch --scope libs` libraries, raw JSON handed to `create()`) resolves its imports. One file. |
218
+ | `smbls/core` | `dist/smbls.core.esm.js` + chunks | The same public API **without the registry** (no `registerHostPackages` / `HOST_REGISTERED_PACKAGES`), no Simone client, no socket.io. Code-split: each kit and platform plugin is its own file, downloaded only when the app's configuration switches it on. |
219
+ | `smbls/iife` | `dist/smbls.iife.js` | The full runtime as one script (`window.Smbls`) — what the platform serves. |
220
+
221
+ Use `smbls/core` for an app that runs **no** published or fetched project code — that code reads the registry and gets `{}` without it. Select it for **every** importer of `smbls` at once (a bundler alias), never by importing both entries: they are two bundles, so two copies of the runtime. With the Symbols CLI and parcel, set `"smblsEntry": "core"` in `symbols.json`. With vite: `resolve: { alias: [{ find: /^smbls$/, replacement: 'smbls/core' }] }`.
222
+
223
+ What loads only when switched on (both entries share this; in `smbls/core` each is a separate file, in the single-file builds it is part of the file):
224
+
225
+ | Module | Loaded when |
226
+ |--------|-------------|
227
+ | `@symbo.ls/windows`, `@symbo.ls/dropdown`, `@symbo.ls/tooltip` | on by default; `windows: false` / `dropdown: false` / `tooltip: false` keeps each out |
228
+ | `@symbo.ls/analyze`, `@symbo.ls/shorthand`, `@symbo.ls/inspect` | `analyze`, `shorthand`, `inspect` set |
229
+ | `@symbo.ls/fetch` (with its REST adapter, one file) | `fetch` configured |
230
+ | `@symbo.ls/sync` (live sync) | a live-sync transport the page may use — a collab `socketUrl` (`editor` or `settings`; on a page the platform published, only inside an editor session: framed, or `?liveSync`) or `editor.runtime: 'runner'` — unless `sync: false`; or the toasts: `notifications: true` |
231
+ | the remote-project fetch of `createSync` / `createAsync` | an `editor` configuration with a `key` |
232
+
233
+ `create()` starts every load its configuration needs at once, in the task it is called in, and awaits each before the first render, so nothing renders twice.
234
+
235
+ In `smbls/core` an app that keeps a kit on pays one module request at boot: the kits it keeps load in parallel, after the entry has evaluated and before the first render (measured: windows 4,050 B, dropdown 5,487 B, tooltip 2,626 B gzip). Turn off the kits you do not use. A `<link rel="modulepreload">` for the kits an app keeps on — emitted by a Parcel plugin of the Symbols CLI, which has to read the app's configuration at build time — is the follow-up that takes this request off the boot's critical path.
236
+
237
+ Every dist bundle has a source map next to it (`<file>.map`, sources included). The embed's map is not linked from the file, to keep the embed's byte budget.
238
+
166
239
  ## SEO metadata
167
240
 
168
241
  Define metadata on your app or pages. Values can be static or functions:
package/core.js ADDED
@@ -0,0 +1,52 @@
1
+ 'use strict'
2
+
3
+ // The framework's public API WITHOUT the platform registry — `smbls/core`.
4
+ //
5
+ // `index.js` (the `smbls` entry, the IIFE, the cjs build) is this module
6
+ // PLUS the registration of every bundled namespace — and of `index.js`'s own
7
+ // namespace — on `globalThis.__SMBLS_PKGS__`, which frank-serialized code
8
+ // reads synchronously. Holding a namespace keeps every export it names alive,
9
+ // so no bundler can drop an unused export from a bundle that registers it
10
+ // (xma.info report item 5). An app that runs no serialized code — no
11
+ // published or fetched project/library functions, no raw JSON handed to
12
+ // create() — never reads that registry, and builds against this module
13
+ // instead: the dist ships it as `smbls/core` (dist/smbls.core.esm.js), whose
14
+ // kits and platform plugins are separate files loaded only when switched on.
15
+ //
16
+ // The export list below is index.js's, minus the registry's own surface
17
+ // (`registerHostPackages`, `HOST_REGISTERED_PACKAGES`); it is a copy, not an
18
+ // import of index.js, which would bring the registry along.
19
+ // __tests__/coreEntry.test.js keeps the two lists in step, and from source
20
+ // both entries share every module instance. Never import both PREBUILT
21
+ // entries into one app: they are two bundles, so two copies of the runtime.
22
+ // Select one for every importer of the bare `smbls` specifier (a bundler
23
+ // alias).
24
+
25
+ // v3.14 entry point - re-exports all framework packages
26
+
27
+ // Core v3.14 primitives (NEW)
28
+ export * from '@symbo.ls/signal'
29
+ export * from '@symbo.ls/css'
30
+
31
+ // Core framework
32
+ export * from '@symbo.ls/utils'
33
+ export { update, dispose, remove, REGISTRY, LIFECYCLE_EVENTS, DELEGATED_EVENTS, MIXINS, addDelegatedEvent, removeDelegatedEvent, registerEvent, cacheNode, detectTag, createHTMLNode, isValidTag, isSvgTag, SVG_TAGS, applyExtends, addMethods } from '@symbo.ls/element'
34
+ export * from '@symbo.ls/state'
35
+
36
+ // Attribute & CSS processing
37
+ export * from 'attrs-in-props'
38
+ export * from 'css-in-props'
39
+
40
+ // Design system & default components
41
+ export * from '@symbo.ls/scratch'
42
+ export * from '@symbo.ls/default-config'
43
+
44
+ // WASM acceleration (lazy-loaded)
45
+ // Wire CSS engine hook so WASM auto-accelerates CSS generation when loaded
46
+ export { loadWasm, isWasmLoaded, setCssEngineHook } from '@symbo.ls/wasm'
47
+ import { setCssEngineHook } from '@symbo.ls/wasm'
48
+ import { setWasmEngine } from '@symbo.ls/css'
49
+ setCssEngineHook(setWasmEngine)
50
+
51
+ // Main create functions
52
+ export * from './src/index.js'