@peripheries/renderer 0.23.0 → 0.23.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 (100) hide show
  1. package/README.md +45 -33
  2. package/dist/catalog.js +2 -6
  3. package/dist/chunks/{forms-CCAE7sCu.js → forms-DxA9WzCt.js} +0 -6
  4. package/dist/chunks/{load-CjPvISzH.js → load-b38vUiZM.js} +0 -4
  5. package/dist/chunks/{page-bundles-DLRIBP8g.js → page-bundles-CPj_vx-J.js} +1 -5
  6. package/dist/chunks/{persistence-DCMakM9H.js → persistence-hurkUUQ0.js} +0 -6
  7. package/dist/chunks/{projection-yvYKzMOS.js → projection-zhu32_KJ.js} +1 -15
  8. package/dist/chunks/{query-LnTbQghF.js → query-D6xQbTFK.js} +0 -6
  9. package/dist/chunks/{refs-BLUokra5.js → refs-Csgh6rXq.js} +0 -4
  10. package/dist/chunks/{structure-BrKSgzRJ.js → structure-CKBtQHJq.js} +1 -7
  11. package/dist/chunks/{validate-B_g7719l.js → validate-BcB_PA1k.js} +2 -10
  12. package/dist/core.js +9 -25
  13. package/dist/forms.js +1 -1
  14. package/dist/print.js +0 -24
  15. package/dist/react.js +4 -22
  16. package/dist/runtime.js +2 -12
  17. package/dist/styles.css +9 -15
  18. package/dist/testing.js +5 -21
  19. package/dist/theme.js +0 -10
  20. package/dist/types/catalog/check.d.ts +0 -13
  21. package/dist/types/core/actions.d.ts +0 -24
  22. package/dist/types/core/bundles/load.d.ts +0 -23
  23. package/dist/types/core/bundles/page-bundles.d.ts +0 -9
  24. package/dist/types/core/bundles/refs.d.ts +1 -28
  25. package/dist/types/core/bundles/resolve.d.ts +0 -10
  26. package/dist/types/core/cell-props.d.ts +0 -20
  27. package/dist/types/core/cells.d.ts +0 -21
  28. package/dist/types/core/data-context.d.ts +0 -22
  29. package/dist/types/core/diagnostics.d.ts +1 -3
  30. package/dist/types/core/graph.d.ts +0 -54
  31. package/dist/types/core/layout.d.ts +0 -9
  32. package/dist/types/core/load-page.d.ts +0 -111
  33. package/dist/types/core/query.d.ts +0 -64
  34. package/dist/types/core/references.d.ts +0 -21
  35. package/dist/types/core/release.d.ts +0 -10
  36. package/dist/types/core/rules.d.ts +0 -1
  37. package/dist/types/core/selected.d.ts +0 -5
  38. package/dist/types/core/sources.d.ts +5 -64
  39. package/dist/types/core/store/create-store.d.ts +0 -6
  40. package/dist/types/core/store/persistence.d.ts +0 -1
  41. package/dist/types/core/store/projection.d.ts +0 -5
  42. package/dist/types/core/store/scope-keys.d.ts +0 -1
  43. package/dist/types/core/store/types.d.ts +0 -6
  44. package/dist/types/core/structure.d.ts +0 -33
  45. package/dist/types/core/types.d.ts +0 -13
  46. package/dist/types/core/validate.d.ts +0 -12
  47. package/dist/types/core/values.d.ts +0 -6
  48. package/dist/types/forms/conditions.d.ts +0 -37
  49. package/dist/types/forms/model.d.ts +0 -44
  50. package/dist/types/forms/port.d.ts +0 -22
  51. package/dist/types/print/document-bindings.d.ts +0 -61
  52. package/dist/types/print/document-profile.d.ts +0 -137
  53. package/dist/types/print/map-staleness.d.ts +0 -66
  54. package/dist/types/print/page-map.d.ts +1 -334
  55. package/dist/types/print/paginate.d.ts +0 -190
  56. package/dist/types/print/print-layout.d.ts +0 -161
  57. package/dist/types/print/print-lint.d.ts +0 -109
  58. package/dist/types/print/print-policy.d.ts +0 -184
  59. package/dist/types/print/print-stylesheet.d.ts +0 -135
  60. package/dist/types/print/running-header.d.ts +0 -86
  61. package/dist/types/print/structure-print.d.ts +1 -243
  62. package/dist/types/react/cell-states.d.ts +0 -2
  63. package/dist/types/react/cell-view.d.ts +0 -16
  64. package/dist/types/react/page-renderer.d.ts +0 -37
  65. package/dist/types/react/structure-view.d.ts +0 -12
  66. package/dist/types/react/use-cell-store.d.ts +0 -5
  67. package/dist/types/react/use-container-size.d.ts +0 -5
  68. package/dist/types/react/use-forms-runtime.d.ts +1 -55
  69. package/dist/types/react/use-paging.d.ts +0 -9
  70. package/dist/types/runtime/boot.d.ts +0 -11
  71. package/dist/types/runtime/install.d.ts +0 -15
  72. package/dist/types/runtime/shims.d.ts +0 -8
  73. package/dist/types/runtime/store-export.d.ts +0 -7
  74. package/dist/types/testing/base-props.d.ts +0 -1
  75. package/dist/types/testing/components.d.ts +0 -8
  76. package/dist/types/testing/form-workbook.d.ts +0 -3
  77. package/dist/types/testing/golden.d.ts +0 -16
  78. package/dist/types/testing/ids.d.ts +0 -2
  79. package/dist/types/testing/sources.d.ts +0 -7
  80. package/dist/types/theme/check.d.ts +0 -2
  81. package/dist/types/theme/color.d.ts +0 -12
  82. package/dist/types/theme/derive.d.ts +0 -12
  83. package/dist/types/theme/parse.d.ts +0 -7
  84. package/package.json +2 -2
  85. package/dist/catalog.js.map +0 -1
  86. package/dist/chunks/forms-CCAE7sCu.js.map +0 -1
  87. package/dist/chunks/load-CjPvISzH.js.map +0 -1
  88. package/dist/chunks/page-bundles-DLRIBP8g.js.map +0 -1
  89. package/dist/chunks/persistence-DCMakM9H.js.map +0 -1
  90. package/dist/chunks/projection-yvYKzMOS.js.map +0 -1
  91. package/dist/chunks/query-LnTbQghF.js.map +0 -1
  92. package/dist/chunks/refs-BLUokra5.js.map +0 -1
  93. package/dist/chunks/structure-BrKSgzRJ.js.map +0 -1
  94. package/dist/chunks/validate-B_g7719l.js.map +0 -1
  95. package/dist/core.js.map +0 -1
  96. package/dist/print.js.map +0 -1
  97. package/dist/react.js.map +0 -1
  98. package/dist/runtime.js.map +0 -1
  99. package/dist/testing.js.map +0 -1
  100. package/dist/theme.js.map +0 -1
package/README.md CHANGED
@@ -1,18 +1,18 @@
1
1
  # @peripheries/renderer
2
2
 
3
- The one renderer for pages built from federated component bundles
4
- ([design/renderer.md](../../docs/plan/design/renderer.md)). The host, the
5
- component repos' harness and the agency's preview all render through it, so a
6
- page looks the same in each.
3
+ The one renderer for pages built from federated component bundles. Hosts,
4
+ component repos' harnesses and previews all render through it, so a page looks
5
+ the same in each.
7
6
 
8
7
  | Entry | Holds |
9
8
  |---|---|
10
9
  | `@peripheries/renderer/core` | Framework-free: cells and thin-ref hydration, references and conditions, the data context, walks and state names, cell props, layout, document structure, bundle refs and resolution, the shared store, `loadPageData(page, source)`, validation, `DIAGNOSTICS` and `PAGE_RULES` |
11
- | `@peripheries/renderer/catalog` | `checkCatalog`: what a component repo runs on the knowledge it emits (design/catalog.md §5). The only entry with a JSON Schema validator (ajv) |
12
- | `@peripheries/renderer/react` | `PageRenderer`, `CellView`, `StructureView`, the cell states, `useContainerSize` |
10
+ | `@peripheries/renderer/catalog` | `checkCatalog`: what a component repo runs on the knowledge it emits. The only entry with a JSON Schema validator (ajv) |
11
+ | `@peripheries/renderer/react` | `PageRenderer`, `CellView`, `StructureView`, the cell states, `useContainerSize`, `useFormsRuntime` and its `FormSlotProps` and `FormAnswer` |
13
12
  | `@peripheries/renderer/runtime` | What a page boots with: the import map and boot script, the shims, `installRuntime`, the store bundles import |
14
- | `@peripheries/renderer/theme` | The org theme pipeline (design/core-and-tokens.md §6.2): `parseTheme` (version 1 or 2 in, version 2 out, with diagnostics), `themeTokens` (semantic overrides derived in OKLCH), `themeCss` (the `theme` layer), `checkTheme` (WCAG contrast) |
13
+ | `@peripheries/renderer/theme` | The org theme pipeline: `parseTheme` (version 1 or 2 in, version 2 out, with diagnostics), `themeTokens` (semantic overrides derived in OKLCH), `themeCss` (the `theme` layer), `checkTheme` (WCAG contrast) |
15
14
  | `@peripheries/renderer/print` | The print pipeline, framework-free: `collectBlocks` (the page map), `paginate`, `buildPrintLayout` (the packer's decision as CSS), `buildPageStylesheet` (`@page` geometry and margin boxes), running headers, `@printPolicy` parsing, print lint, `resolveDocumentProfile`, region bindings, map staleness, and the `layout.structure[].print` writer |
15
+ | `@peripheries/renderer/forms` | The forms runtime, framework-free: the steps overlay and its model, conditions, modes, navigation, progress, deep links, and the persistence port (`FormsPort`); the React hook is `useFormsRuntime` in `/react` |
16
16
  | `@peripheries/renderer/testing` | The golden pages, synthetic fixtures, and sources that serve them |
17
17
  | `@peripheries/renderer/styles.css` | Page and cell containers, the responsive buckets, placeholders and notices, in the `renderer` layer |
18
18
 
@@ -32,9 +32,18 @@ const runtime = await loadPageData(page, source, { params, baseProps, viewer, co
32
32
 
33
33
  `RendererEnvironment` takes, besides `core`, `navigate` and `store`:
34
34
 
35
- - `actionsFor(cell)`: the actions a cell gets. The host has none until R2's
36
- write rule; `projectCellActions(cell.actions, pageActions)` applies the PWA's
37
- lookup rule (binding key, then registry key, then the cell's own name).
35
+ - `actionsFor(cell)`: the actions a cell gets;
36
+ `projectCellActions(cell.actions, pageActions)` applies the lookup rule
37
+ (binding key, then registry key, then the cell's own name).
38
+ - `runAction`: runs a cell's declared action (the host's write path, or a
39
+ harness's mock); without it a declared action reports `FAILED`.
40
+ - `loadPage`: loads a paged label's next page.
41
+ - `onPropSources(cell, sources)`: each rendered cell's props, leaf by leaf,
42
+ with where each value came from (for an edit layer, with `editTarget`).
43
+ - `retry()`: reads the page again, for a failed cell's "Try again".
44
+ - `cellProps(cell)`: props from the page's runtime, merged last; on a form
45
+ page, `useFormsRuntime`'s `cellProps` gives each cell `form`, `answers` and
46
+ `answer`.
38
47
  - `onCellError(cellId, error)`: a component threw. The cell shows an error
39
48
  notice either way.
40
49
  - `onUnresolvedReference(cellId, ref)`: a prop's `@ref` resolved to nothing
@@ -52,8 +61,7 @@ sharing the channel reads it.
52
61
  ## The names a bundle may rely on
53
62
 
54
63
  What the renderer writes, for a bundle's CSS and checks. These are the only
55
- names: 0.8.0 dropped the old client-prefixed twins and container names
56
- (design/core-and-tokens.md §14).
64
+ names: 0.8.0 dropped the old client-prefixed twins and container names.
57
65
 
58
66
  | Where | Name |
59
67
  |---|---|
@@ -69,9 +77,13 @@ bundle's `ThemeProvider` export.
69
77
 
70
78
  ## Versions
71
79
 
72
- - **0.23.0** (graph-model G2 · DF M1, 2026-10-15): every
73
- renderer and runtime contract change for G2–G4, in one minor.
74
- - **Main only** (versions.md §4.6, G1 · DF M0): `prepareDocument` reads
80
+ - **0.23.1** (2026-10-15): the published files carry no comments and no
81
+ source maps (declarations included); this README is the documentation.
82
+ No API change.
83
+
84
+ - **0.23.0** (2026-10-15): the
85
+ versions and forms release, in one minor.
86
+ - **Main only:** `prepareDocument` reads
75
87
  main systems and placements only, adding `version: { is: NULL }` to
76
88
  `systemCollection`, `graph_nodeCollection` and `graph_edgeCollection`
77
89
  at any depth. New diagnostics: `SYSTEM_NOT_MAIN` (a warning: a page
@@ -96,14 +108,15 @@ bundle's `ThemeProvider` export.
96
108
  which (`recorded` | `context`), and `PageRuntime.readVersionIds` the
97
109
  versions the states were read from, for print's and an embed's "Release
98
110
  N". A state row may carry `versionId`, `unversioned` and `outOfScope`.
99
- - **Render-time functions:** `RENDER_FUNCTIONS` adds G2's version reads
111
+ - **Render-time functions:** `RENDER_FUNCTIONS` adds the version reads
100
112
  (`node_states_as_of`, `node_state_view`, `version_context_for`,
101
113
  `version_scope_members`, `versions_for`, `version_diff`,
102
114
  `auto_release_status`), each with the tables it reads for
103
115
  invalidation.
104
- - **Declared ahead:** `form_answers(p_structure_nodes: [UUID!]!)` (SCH
105
- M3b) is a render function now, listed in `RENDER_FUNCTIONS_AHEAD`, so
106
- G3's workbook snapshots need no renderer release. Its JSON is a leaf:
116
+ - **Declared ahead:** `form_answers(p_structure_nodes: [UUID!]!)` is a
117
+ render function now, listed in `RENDER_FUNCTIONS_AHEAD` until the
118
+ database has it, so descriptors can read a workbook's answers without a
119
+ renderer release. Its JSON is a leaf:
107
120
  `result.path` reads into it and nothing in it is flattened. An alias on
108
121
  a render function's JSON root is refused (`DESCRIPTOR_ALIAS_JSON_ROOT`),
109
122
  since its JSON is decoded by field name.
@@ -117,7 +130,7 @@ bundle's `ThemeProvider` export.
117
130
  - **Releases:** `validateManifest(pages)` returns `ReleaseProblem[]`,
118
131
  advisory before a release; `manifestPageFrom(graphNodeId, data)` reads a
119
132
  page artifact's state data as a manifest page. The runtime adds `PageView` and
120
- `SubmissionData` for G3.
133
+ `SubmissionData`.
121
134
  - **The forms runtime** (`@peripheries/renderer/forms`): the steps
122
135
  overlay, modes, navigation, saving, progress and deep links behind
123
136
  `FormsPort { save, submit, visit, reopen }` (and, optional, `upload` and
@@ -156,10 +169,10 @@ bundle's `ThemeProvider` export.
156
169
  null, never an email or a user id;
157
170
  - a component reads `form`, `answers` and `answer` from its props on a
158
171
  form page, and puts `answer.inputId` on its control.
159
- - from G3, page ids (an embed's `page_id`, `PageScope`'s page) are
160
- anchor ids; the renderer treats them as opaque, so nothing changes.
172
+ - page ids (an embed's `page_id`, `PageScope`'s page) become anchor
173
+ ids; the renderer treats them as opaque, so nothing changes.
161
174
 
162
- - **0.10.0** (data-render M2): actions run, documents edit, pages embed.
175
+ - **0.10.0:** actions run, documents edit, pages embed.
163
176
  - Declared actions run through the environment's `runAction`; the runtime's
164
177
  `ACTION_FIELDS` takes `subjects` and `audience` on `create`, `edit` and
165
178
  `append`, and `create` needs `edge_type` only under a parent.
@@ -175,9 +188,8 @@ bundle's `ThemeProvider` export.
175
188
  - A nullable query variable whose whole reference reads `@params`,
176
189
  `@context` or `@viewer` and resolves to nothing is sent as `null`.
177
190
  - PAGE_RULES is shorter (3780 characters) and describes embed cells.
178
- - **0.9.0** (data-render M1; prerelease `0.9.0-data-render.0`): queries
179
- (design/data.md §2–§6), realtime's inputs, the host contract retired, and
180
- the renderer half of actions (§9.2).
191
+ - **0.9.0:** queries, realtime's inputs, the host contract retired, and
192
+ the renderer half of actions.
181
193
  - A label can be `{ descriptor: QueryDescriptor }`, or a node binding to a
182
194
  live `query_data` node, whose descriptor runs instead of returning its
183
195
  state. `GraphSource` gains `query(descriptor, variables)`, which returns
@@ -208,7 +220,7 @@ bundle's `ThemeProvider` export.
208
220
 
209
221
  - **0.8.1:** `BaseProps` carries the org's `locale` and `currency` (from its
210
222
  org template's metadata), which `@stack/charts` formats with.
211
- - **0.8.0:** the old names go (design/core-and-tokens.md §14). The renderer
223
+ - **0.8.0:** the old names go. The renderer
212
224
  writes only the attributes and container names above, the runtime installs
213
225
  only `__STACK_RUNTIME__` and maps only `@stack/store`, and the store has no
214
226
  second hook name. A bundle's `ThemeProvider` is no longer lifted or wrapped
@@ -216,15 +228,15 @@ bundle's `ThemeProvider` export.
216
228
  gone). `@peripheries/runtime` 0.8.0 drops `LEGACY_RUNTIME_GLOBAL` and
217
229
  `SPECIFIER_ALIASES`.
218
230
 
219
- - **0.7.3:** the page container also carries `data-page-grid`, the name
220
- design/bundles.md §6 gives the old page-grid attribute, so every attribute
231
+ - **0.7.3:** the page container also carries `data-page-grid`, the
232
+ canonical name of the old page-grid attribute, so every attribute
221
233
  the renderer writes has its canonical name (above) before the old ones go.
222
234
 
223
235
  - **0.7.2:** the package ships its LICENSE: proprietary to Peripheries Studio
224
236
  Inc., all rights reserved.
225
237
  - **0.7.1:** `bundleScope` puts the advisor org's `main` after the shared
226
238
  lineages, so an advisor org's older copy of a core component never shadows
227
- core on a client org's page (design/core-and-tokens.md §3).
239
+ core on a client org's page.
228
240
  - **0.7.0:** shared lineages and the theme. `bundleScope` appends the
229
241
  platform's shared lineages, and the loader imports them by specifier;
230
242
  `@core/` resolves from `stack/core` (`host:` is retired); `importMapFor` and
@@ -264,7 +276,7 @@ bundle's `ThemeProvider` export.
264
276
  - **0.3.0:** `@peripheries/runtime/rank`, sibling order on `graph_node.rank`
265
277
  (`compareRank`, `sortByRank`, `rankBetween` and the rest), so no one
266
278
  vendors it; the `WALK_NODE_TYPES_EMPTY` warning, because `nodeTypes: []`
267
- filters nothing here where the PWA read it as "enter nothing".
279
+ filters nothing (it doesn't mean "enter nothing").
268
280
  - **0.2.0:** the hooks above, `pageRuntimeFromValues`, action projection,
269
281
  `data-missing-component` on a missing component's notice, the theme passed
270
282
  to `ThemeProvider`, store defaults seeded.
@@ -285,7 +297,7 @@ to fix it; `Diagnostic.code` is typed from that table. Tools show the fix with
285
297
  the diagnostic, so a writer learns a rule when they break it.
286
298
 
287
299
  **`PAGE_RULES`** (from `/core`) is the host's rules for composing a page, the
288
- short text a writer reads first (design/catalog.md §3.3). It is built from the
300
+ short text a writer reads first. It is built from the
289
301
  constants the renderer and validator use, so it changes when they do.
290
302
 
291
303
  `core` imports no React at runtime and never reaches the network, and the
@@ -296,4 +308,4 @@ code; the golden pages run over fixture sources in `react/golden-pages.test.tsx`
296
308
  publishes every package whose version isn't on npm yet, built output only;
297
309
  `.github/workflows/publish-packages.yml` stages each new version from
298
310
  `develop`, and a maintainer approves it on npmjs.com. Bump the version here to
299
- release (design/renderer.md §11).
311
+ release.
package/dist/catalog.js CHANGED
@@ -1,8 +1,7 @@
1
- import { x as isEach } from "./chunks/query-LnTbQghF.js";
2
- import { i as eachFormProblems, s as validatePage } from "./chunks/validate-B_g7719l.js";
1
+ import { x as isEach } from "./chunks/query-D6xQbTFK.js";
2
+ import { i as eachFormProblems, s as validatePage } from "./chunks/validate-BcB_PA1k.js";
3
3
  import { KNOWLEDGE_BUDGETS, KNOWLEDGE_KEY } from "@peripheries/runtime";
4
4
  import Ajv2020 from "ajv/dist/2020.js";
5
- //#region packages/renderer/src/catalog/check.ts
6
5
  var ref = (kind, key) => `${kind}:${key}`;
7
6
  var size = (v) => JSON.stringify(v ?? null).length;
8
7
  var isReference = (v) => typeof v === "string" && (v.startsWith("@") || v.includes("${"));
@@ -272,7 +271,4 @@ function validateLiteral(schema, value, path, push, ajv) {
272
271
  if (!ajv.validate(schema, value)) push("error", "PROP_INVALID", path, ajv.errorsText(ajv.errors, { dataVar: "" }).replace(/^\s+/, ""));
273
272
  } catch {}
274
273
  }
275
- //#endregion
276
274
  export { checkCatalog, validatePageProps };
277
-
278
- //# sourceMappingURL=catalog.js.map
@@ -1,4 +1,3 @@
1
- //#region packages/renderer/src/forms/conditions.ts
2
1
  var CONDITION_OPS = [
3
2
  "eq",
4
3
  "ne",
@@ -188,8 +187,6 @@ function normalizeCondition(legacy) {
188
187
  problems
189
188
  };
190
189
  }
191
- //#endregion
192
- //#region packages/renderer/src/forms/model.ts
193
190
  var answered = (v) => v !== void 0 && v !== null && !(typeof v === "string" && v.trim() === "") && !(Array.isArray(v) && v.length === 0);
194
191
  function visibleSteps(model, values) {
195
192
  const shows = (when) => evaluateCondition(when ?? null, values);
@@ -336,7 +333,4 @@ function linkTo(steps, mode, at) {
336
333
  ...at.question ? { question: at.question } : {}
337
334
  };
338
335
  }
339
- //#endregion
340
336
  export { CONDITION_OPS as _, goToQuestion as a, normalizeCondition as b, missing as c, positionsOf as d, progress as f, visibleSteps as g, stepKind as h, goTo as i, move as l, settle as m, enterAdvances as n, isReadOnlyStatus as o, questionsOf as p, fromPageSteps as r, linkTo as s, defaultMode as t, positionFromLink as u, evaluateCondition as v, normalizeOperator as x, isConditionOp as y };
341
-
342
- //# sourceMappingURL=forms-CCAE7sCu.js.map
@@ -1,5 +1,4 @@
1
1
  import { READY_GLOBAL } from "@peripheries/runtime";
2
- //#region packages/renderer/src/core/bundles/load.ts
3
2
  function isComponentExport(value) {
4
3
  if (typeof value === "function") return true;
5
4
  if (!value || typeof value !== "object") return false;
@@ -66,7 +65,4 @@ async function loadBundles(rows, files) {
66
65
  function _clearBundleCache() {
67
66
  cache.clear();
68
67
  }
69
- //#endregion
70
68
  export { loadBundlesSettled as a, loadBundles as i, isComponentExport as n, projectModule as o, loadBundle as r, runtimeReady as s, _clearBundleCache as t };
71
-
72
- //# sourceMappingURL=load-CjPvISzH.js.map
@@ -1,5 +1,4 @@
1
- import { a as normalizeRef, o as refKey } from "./refs-BLUokra5.js";
2
- //#region packages/renderer/src/core/bundles/page-bundles.ts
1
+ import { a as normalizeRef, o as refKey } from "./refs-Csgh6rXq.js";
3
2
  function pageBundleRefs(scope, cells, pageOrgId) {
4
3
  const out = [...scope];
5
4
  const seen = new Set(out.map(refKey));
@@ -28,7 +27,4 @@ function pageBundles(scope, rows, loaded, pageOrgId, failed = false) {
28
27
  }
29
28
  };
30
29
  }
31
- //#endregion
32
30
  export { pageBundles as n, pageBundleRefs as t };
33
-
34
- //# sourceMappingURL=page-bundles-DLRIBP8g.js.map
@@ -1,5 +1,4 @@
1
1
  import { Store } from "@tanstack/store";
2
- //#region packages/renderer/src/core/store/create-store.ts
3
2
  function createStackStore(initial) {
4
3
  const store = new Store({
5
4
  selections: {},
@@ -89,8 +88,6 @@ function createStackStore(initial) {
89
88
  subscribe: (listener) => store.subscribe(() => listener(getState()))
90
89
  };
91
90
  }
92
- //#endregion
93
- //#region packages/renderer/src/core/store/persistence.ts
94
91
  var KEY_PREFIX = "stack.store.";
95
92
  function storageFor(mode) {
96
93
  if (typeof window === "undefined" || mode === "none") return null;
@@ -134,7 +131,4 @@ function clearAllScopes() {
134
131
  } catch {}
135
132
  }
136
133
  }
137
- //#endregion
138
134
  export { createStackStore as a, saveScope as i, clearScope as n, loadScope as r, clearAllScopes as t };
139
-
140
- //# sourceMappingURL=persistence-DCMakM9H.js.map
@@ -1,5 +1,4 @@
1
- import { t as CORE_SPECIFIER } from "./refs-BLUokra5.js";
2
- //#region packages/renderer/src/core/cells.ts
1
+ import { t as CORE_SPECIFIER } from "./refs-Csgh6rXq.js";
3
2
  var HYDRATED_CELL_FIELDS = [
4
3
  "component",
5
4
  "props",
@@ -86,8 +85,6 @@ function rootCells(cells) {
86
85
  const roots = cells.filter((c) => !nested.has(c.id));
87
86
  return roots.length ? roots : cells;
88
87
  }
89
- //#endregion
90
- //#region packages/renderer/src/core/cell-props.ts
91
88
  function projectCellData(cell, ctx) {
92
89
  if (!cell.data) return null;
93
90
  const data = { ...cell.data.static };
@@ -149,8 +146,6 @@ function assembleCellProps(i) {
149
146
  if (i.renderComponent) props.renderComponent = i.renderComponent;
150
147
  return props;
151
148
  }
152
- //#endregion
153
- //#region packages/renderer/src/core/layout.ts
154
149
  function pageContainerStyle(layout) {
155
150
  const type = layout?.type ?? "stack";
156
151
  const gap = typeof layout?.gap === "number" ? `${layout.gap}px` : typeof layout?.gap === "string" ? layout.gap : "16px";
@@ -209,8 +204,6 @@ function documentProfile(layout) {
209
204
  const profile = layout.profile;
210
205
  return typeof profile === "string" && /^[a-z][a-z0-9-]*$/.test(profile) ? profile : void 0;
211
206
  }
212
- //#endregion
213
- //#region packages/renderer/src/core/bundles/resolve.ts
214
207
  function resolveComponent(name, { cellBundle, scope, core }) {
215
208
  if (name.startsWith("@core/")) {
216
209
  const bare = name.slice(6);
@@ -239,8 +232,6 @@ function resolveComponent(name, { cellBundle, scope, core }) {
239
232
  source: "core"
240
233
  } : null;
241
234
  }
242
- //#endregion
243
- //#region packages/renderer/src/core/store/scope-keys.ts
244
235
  var pageScopeKey = (pageId) => `page:${pageId}`;
245
236
  var projectScopeKey = (projectId) => `project:${projectId}`;
246
237
  function resolveScopeId(kind, ctx) {
@@ -248,8 +239,6 @@ function resolveScopeId(kind, ctx) {
248
239
  if (kind === "project") return ctx.projectId ? projectScopeKey(ctx.projectId) : null;
249
240
  return null;
250
241
  }
251
- //#endregion
252
- //#region packages/renderer/src/core/store/projection.ts
253
242
  var setterName = (name) => "set" + name.charAt(0).toUpperCase() + name.slice(1);
254
243
  function projectSelections(decls, state, ctx) {
255
244
  if (!decls) return void 0;
@@ -315,7 +304,4 @@ function collectScopeIds(ctx, selections, viewState) {
315
304
  }
316
305
  return [...ids];
317
306
  }
318
- //#endregion
319
307
  export { normalizeCell as C, hasRef as S, rootCells as T, failedLabels as _, projectSelections as a, HYDRATED_CELL_FIELDS as b, pageScopeKey as c, resolveComponent as d, cellAttributes as f, assembleCellProps as g, pageContainerStyle as h, projectLive as i, projectScopeKey as l, documentProfile as m, attachViewStateSetters as n, projectViewState as o, cellPlacementStyle as p, collectScopeIds as r, shallowEqualBundle as s, attachSelectionSetters as t, resolveScopeId as u, projectCellData as v, resolveCell as w, STORE_FIELDS as x, CONTENT_FIELDS as y };
320
-
321
- //# sourceMappingURL=projection-yvYKzMOS.js.map
@@ -1,6 +1,5 @@
1
1
  import { DESCRIPTOR_VERSION, GRAPHQL_MAX_ROWS } from "@peripheries/runtime";
2
2
  import { Kind, parse, print, visit } from "graphql";
3
- //#region packages/renderer/src/core/references.ts
4
3
  var STRICT_REF$1 = /^@[A-Za-z0-9_$-]+(\.[A-Za-z0-9_$[\]-]+)*$/;
5
4
  var INTERPOLATION = /\$\{(?:context\.)?([^}]+)\}/g;
6
5
  var UnresolvedReference = class extends Error {
@@ -215,8 +214,6 @@ function passesConditions(conditions, ctx) {
215
214
  if (hideIf !== void 0 && hideIf !== "" && resolveReferences(hideIf, ctx)) return false;
216
215
  return true;
217
216
  }
218
- //#endregion
219
- //#region packages/renderer/src/core/query.ts
220
217
  var RENDER_FUNCTIONS = {
221
218
  walk_graph: [
222
219
  "edge",
@@ -948,7 +945,4 @@ var queryKey = (descriptor, variables) => JSON.stringify([
948
945
  descriptor.result?.path ?? null,
949
946
  descriptor.result?.flatten_connections !== false
950
947
  ]);
951
- //#endregion
952
948
  export { passesConditions as C, pageContext as S, settled as T, EACH as _, VARIABLE_NAMESPACES as a, cellResolutionContext as b, pageVariables as c, resolveDescriptorVariables as d, selectionShape as f, variableReferences as g, variableLabels as h, UnsafeDocumentError as i, prepareDocument as l, validateDescriptor as m, RENDER_FUNCTIONS as n, descriptorShape as o, shapeAt as p, RENDER_FUNCTIONS_AHEAD as r, orderByVariable as s, PAGING_VARIABLES as t, queryKey as u, EACH_DEFAULT_AS as v, resolveReferences as w, isEach as x, cellContext as y };
953
-
954
- //# sourceMappingURL=query-LnTbQghF.js.map
@@ -1,4 +1,3 @@
1
- //#region packages/renderer/src/core/bundles/refs.ts
2
1
  var CORE_SPECIFIER = "@stack/core";
3
2
  var MAIN = "main";
4
3
  var PUBLIC = "public";
@@ -65,7 +64,4 @@ function bundleScope(input) {
65
64
  });
66
65
  return out;
67
66
  }
68
- //#endregion
69
67
  export { normalizeRef as a, bundleScope as i, MAIN as n, refKey as o, PUBLIC as r, CORE_SPECIFIER as t };
70
-
71
- //# sourceMappingURL=refs-BLUokra5.js.map
@@ -1,6 +1,5 @@
1
- import { T as settled, w as resolveReferences, x as isEach } from "./query-LnTbQghF.js";
1
+ import { T as settled, w as resolveReferences, x as isEach } from "./query-D6xQbTFK.js";
2
2
  import { ACTION_FIELDS, ACTION_KINDS, SECTION_KINDS as SECTION_KINDS$1, isGraphAction } from "@peripheries/runtime";
3
- //#region packages/renderer/src/core/actions.ts
4
3
  var actionBindingKey = (registry, entityKey) => entityKey ? `${registry}#${entityKey}` : registry;
5
4
  function normalizeActionDeclaration(decl) {
6
5
  if (typeof decl === "string") return decl.trim() ? {
@@ -148,8 +147,6 @@ function declaredActions(cell, ctx, runAction) {
148
147
  }
149
148
  return Object.keys(out).length ? out : void 0;
150
149
  }
151
- //#endregion
152
- //#region packages/renderer/src/core/structure.ts
153
150
  var PAGE_DOCUMENT = "__page__";
154
151
  function normalizeStructure(nodes) {
155
152
  if (!Array.isArray(nodes)) return [];
@@ -383,7 +380,4 @@ function tableOfContents(structure, cells = []) {
383
380
  });
384
381
  return walk(normalizeStructure(structure), 1, PAGE_DOCUMENT);
385
382
  }
386
- //#endregion
387
383
  export { resolveAction as C, projectCellActions as S, actionBindingKey as _, deriveSectionReferences as a, declaredActions as b, nodePrintStyle as c, referencesFor as d, sectionAnchor as f, usesStructureLayout as g, tableOfContents as h, deriveSectionNumbering as i, normalizeStructure as l, structureIssues as m, SECTION_KINDS$1 as n, isSectionNode as o, sortByOrder as p, deriveElementReferences as r, mergeSectionReferences as s, PAGE_DOCUMENT as t, numberingFor as u, actionProblems as v, normalizeActionDeclaration as x, actionReferences as y };
388
-
389
- //# sourceMappingURL=structure-BrKSgzRJ.js.map
@@ -1,7 +1,6 @@
1
- import { _ as EACH, h as variableLabels, m as validateDescriptor, o as descriptorShape, p as shapeAt, v as EACH_DEFAULT_AS, x as isEach } from "./query-LnTbQghF.js";
2
- import { g as usesStructureLayout, m as structureIssues, v as actionProblems } from "./structure-BrKSgzRJ.js";
1
+ import { _ as EACH, h as variableLabels, m as validateDescriptor, o as descriptorShape, p as shapeAt, v as EACH_DEFAULT_AS, x as isEach } from "./query-D6xQbTFK.js";
2
+ import { g as usesStructureLayout, m as structureIssues, v as actionProblems } from "./structure-CKBtQHJq.js";
3
3
  import { DEFAULT_STATE, STATE_NAMES, WALK_DEFAULTS, isDescriptorBinding, isGraphAction, isStateName } from "@peripheries/runtime";
4
- //#region packages/renderer/src/core/graph.ts
5
4
  var TIER_OF_GRAPH_TYPE = {
6
5
  "meta-process": "meta",
7
6
  "process-eng": "eng",
@@ -223,8 +222,6 @@ function readWalk(raw, request) {
223
222
  diagnostics
224
223
  };
225
224
  }
226
- //#endregion
227
- //#region packages/renderer/src/core/selected.ts
228
225
  var STRICT_REF$1 = /^@([A-Za-z0-9_$-]+)((?:\.[A-Za-z0-9_$[\]-]+)*)$/;
229
226
  var shapes = new Map();
230
227
  function shapeOf(d) {
@@ -273,8 +270,6 @@ function selectionIssues(cell, queries, at) {
273
270
  visit(cell.conditions, `${at}.conditions`, top);
274
271
  return out;
275
272
  }
276
- //#endregion
277
- //#region packages/renderer/src/core/validate.ts
278
273
  var words = (name) => name.replace(/([a-z0-9])([A-Z])/g, "$1 $2").toLowerCase().split(/[\s_-]+/).filter(Boolean);
279
274
  function editDistance(a, b) {
280
275
  let prev = Array.from({ length: b.length + 1 }, (_, j) => j);
@@ -831,7 +826,4 @@ function slotIssues(cells, catalog) {
831
826
  });
832
827
  return out;
833
828
  }
834
- //#endregion
835
829
  export { stateValue as _, nearestNames as a, walkKey as b, selectionIssues as c, needsWalk as d, readField as f, stateNames as g, resolveWalkStart as h, eachFormProblems as i, RESERVED_LABELS as l, referencedLabels as m, STORE_SCOPES as n, validateCell as o, readWalk as p, WALK_DIRECTIONS as r, validatePage as s, RESPONSIVE_BUCKETS as t, mergeStates as u, systemsFromGraphs as v, walkRequest as x, systemsFromProcess as y };
836
-
837
- //# sourceMappingURL=validate-B_g7719l.js.map
package/dist/core.js CHANGED
@@ -1,13 +1,12 @@
1
- import { C as normalizeCell, S as hasRef, T as rootCells, a as projectSelections, b as HYDRATED_CELL_FIELDS, c as pageScopeKey, d as resolveComponent, f as cellAttributes, g as assembleCellProps, h as pageContainerStyle, i as projectLive, l as projectScopeKey, n as attachViewStateSetters, o as projectViewState, p as cellPlacementStyle, r as collectScopeIds, s as shallowEqualBundle, t as attachSelectionSetters, u as resolveScopeId, v as projectCellData, w as resolveCell, x as STORE_FIELDS, y as CONTENT_FIELDS } from "./chunks/projection-yvYKzMOS.js";
2
- import { C as passesConditions, S as pageContext, T as settled, _ as EACH, a as VARIABLE_NAMESPACES, b as cellResolutionContext, c as pageVariables, d as resolveDescriptorVariables, f as selectionShape, g as variableReferences, h as variableLabels, i as UnsafeDocumentError, l as prepareDocument, m as validateDescriptor, n as RENDER_FUNCTIONS, o as descriptorShape, p as shapeAt, r as RENDER_FUNCTIONS_AHEAD, s as orderByVariable, t as PAGING_VARIABLES, u as queryKey, v as EACH_DEFAULT_AS, w as resolveReferences, x as isEach, y as cellContext } from "./chunks/query-LnTbQghF.js";
3
- import { _ as stateValue, a as nearestNames, b as walkKey, c as selectionIssues, d as needsWalk, f as readField, g as stateNames, h as resolveWalkStart, i as eachFormProblems, l as RESERVED_LABELS, m as referencedLabels, n as STORE_SCOPES, o as validateCell, p as readWalk, r as WALK_DIRECTIONS, s as validatePage, t as RESPONSIVE_BUCKETS, u as mergeStates, v as systemsFromGraphs, x as walkRequest, y as systemsFromProcess } from "./chunks/validate-B_g7719l.js";
4
- import { C as resolveAction, S as projectCellActions, _ as actionBindingKey, a as deriveSectionReferences, b as declaredActions, c as nodePrintStyle, d as referencesFor, f as sectionAnchor, g as usesStructureLayout, h as tableOfContents, i as deriveSectionNumbering, l as normalizeStructure, m as structureIssues, n as SECTION_KINDS, r as deriveElementReferences, s as mergeSectionReferences, t as PAGE_DOCUMENT, u as numberingFor, v as actionProblems, x as normalizeActionDeclaration, y as actionReferences } from "./chunks/structure-BrKSgzRJ.js";
5
- import { a as loadBundlesSettled, i as loadBundles, n as isComponentExport, o as projectModule, r as loadBundle, s as runtimeReady, t as _clearBundleCache } from "./chunks/load-CjPvISzH.js";
6
- import { a as normalizeRef, i as bundleScope, n as MAIN, o as refKey, r as PUBLIC, t as CORE_SPECIFIER } from "./chunks/refs-BLUokra5.js";
7
- import { n as pageBundles, t as pageBundleRefs } from "./chunks/page-bundles-DLRIBP8g.js";
8
- import { a as createStackStore, i as saveScope, n as clearScope, r as loadScope } from "./chunks/persistence-DCMakM9H.js";
1
+ import { C as normalizeCell, S as hasRef, T as rootCells, a as projectSelections, b as HYDRATED_CELL_FIELDS, c as pageScopeKey, d as resolveComponent, f as cellAttributes, g as assembleCellProps, h as pageContainerStyle, i as projectLive, l as projectScopeKey, n as attachViewStateSetters, o as projectViewState, p as cellPlacementStyle, r as collectScopeIds, s as shallowEqualBundle, t as attachSelectionSetters, u as resolveScopeId, v as projectCellData, w as resolveCell, x as STORE_FIELDS, y as CONTENT_FIELDS } from "./chunks/projection-zhu32_KJ.js";
2
+ import { C as passesConditions, S as pageContext, T as settled, _ as EACH, a as VARIABLE_NAMESPACES, b as cellResolutionContext, c as pageVariables, d as resolveDescriptorVariables, f as selectionShape, g as variableReferences, h as variableLabels, i as UnsafeDocumentError, l as prepareDocument, m as validateDescriptor, n as RENDER_FUNCTIONS, o as descriptorShape, p as shapeAt, r as RENDER_FUNCTIONS_AHEAD, s as orderByVariable, t as PAGING_VARIABLES, u as queryKey, v as EACH_DEFAULT_AS, w as resolveReferences, x as isEach, y as cellContext } from "./chunks/query-D6xQbTFK.js";
3
+ import { _ as stateValue, a as nearestNames, b as walkKey, c as selectionIssues, d as needsWalk, f as readField, g as stateNames, h as resolveWalkStart, i as eachFormProblems, l as RESERVED_LABELS, m as referencedLabels, n as STORE_SCOPES, o as validateCell, p as readWalk, r as WALK_DIRECTIONS, s as validatePage, t as RESPONSIVE_BUCKETS, u as mergeStates, v as systemsFromGraphs, x as walkRequest, y as systemsFromProcess } from "./chunks/validate-BcB_PA1k.js";
4
+ import { C as resolveAction, S as projectCellActions, _ as actionBindingKey, a as deriveSectionReferences, b as declaredActions, c as nodePrintStyle, d as referencesFor, f as sectionAnchor, g as usesStructureLayout, h as tableOfContents, i as deriveSectionNumbering, l as normalizeStructure, m as structureIssues, n as SECTION_KINDS, r as deriveElementReferences, s as mergeSectionReferences, t as PAGE_DOCUMENT, u as numberingFor, v as actionProblems, x as normalizeActionDeclaration, y as actionReferences } from "./chunks/structure-CKBtQHJq.js";
5
+ import { a as loadBundlesSettled, i as loadBundles, n as isComponentExport, o as projectModule, r as loadBundle, s as runtimeReady, t as _clearBundleCache } from "./chunks/load-b38vUiZM.js";
6
+ import { a as normalizeRef, i as bundleScope, n as MAIN, o as refKey, r as PUBLIC, t as CORE_SPECIFIER } from "./chunks/refs-Csgh6rXq.js";
7
+ import { n as pageBundles, t as pageBundleRefs } from "./chunks/page-bundles-CPj_vx-J.js";
8
+ import { a as createStackStore, i as saveScope, n as clearScope, r as loadScope } from "./chunks/persistence-hurkUUQ0.js";
9
9
  import { ACTION_KINDS, QUERY_DESCRIPTOR_KEY, SECTION_KINDS as SECTION_KINDS$1, STATE_ROLES, STATE_TIERS, WALK_DEFAULTS, isDescriptorBinding, isLiveQueryState, isReadOnlyVersion } from "@peripheries/runtime";
10
- //#region packages/renderer/src/core/data-context.ts
11
10
  function resolveDeclarations(queries, systems, diagnostics = [], cellId) {
12
11
  const out = {};
13
12
  for (const [label, raw] of Object.entries(queries ?? {})) {
@@ -91,8 +90,6 @@ function buildDataContext(input) {
91
90
  }
92
91
  return ctx;
93
92
  }
94
- //#endregion
95
- //#region packages/renderer/src/core/load-page.ts
96
93
  async function resolveSystems(source, page) {
97
94
  const systems = !page.process_id ? {} : source.graphSystems ? systemsFromGraphs(await source.graphSystems(page.process_id)) : systemsFromProcess(await source.processSystems?.(page.process_id));
98
95
  if (!systems.eng_data) {
@@ -620,8 +617,6 @@ function recordsByName(found, declarations) {
620
617
  }
621
618
  return out;
622
619
  }
623
- //#endregion
624
- //#region packages/renderer/src/core/sources.ts
625
620
  var TOOL_OWNED_KEYS = ["content_index", "ref_index"];
626
621
  var STRUCTURE_FIELDS = [
627
622
  "title",
@@ -741,8 +736,6 @@ function cellPropSources(runtime, cell, env = {}) {
741
736
  }))
742
737
  };
743
738
  }
744
- //#endregion
745
- //#region packages/renderer/src/core/diagnostics.ts
746
739
  var DIAGNOSTICS = {
747
740
  PAGE_INVALID: {
748
741
  meaning: "`content.cells` is not a list.",
@@ -850,7 +843,7 @@ var DIAGNOSTICS = {
850
843
  },
851
844
  UNSUPPORTED_REGISTRY_BINDING: {
852
845
  meaning: "A binding names a registry query (`{ registry: \"x.y\" }`) from the retired host contract.",
853
- fix: "Copy the matching recipe’s descriptor into `{ descriptor }` (the component’s pattern pack has it), or bind the graph node that produces the data. docs/plan/host-contract-verdicts.md maps every id."
846
+ fix: "Copy the matching recipe’s descriptor into `{ descriptor }` (the component’s pattern pack has it), or bind the graph node that produces the data."
854
847
  },
855
848
  STATE_UNKNOWN_NAME: {
856
849
  meaning: "A state name is not `<tier>_<role>`.",
@@ -1021,8 +1014,6 @@ var DIAGNOSTICS = {
1021
1014
  fix: "Fix the snippet; it is copied far more faithfully than any rule."
1022
1015
  }
1023
1016
  };
1024
- //#endregion
1025
- //#region packages/renderer/src/core/rules.ts
1026
1017
  var LAYOUT_TYPES = [
1027
1018
  "stack",
1028
1019
  "grid",
@@ -1069,8 +1060,6 @@ The host's rules for every page. Components, kits and patterns are in the catalo
1069
1060
  ## When a check fails
1070
1061
  Every page write is validated; each diagnostic names its code, place and fix.
1071
1062
  `;
1072
- //#endregion
1073
- //#region packages/renderer/src/core/values.ts
1074
1063
  var isTraversal = (v) => !!v && typeof v === "object" && Array.isArray(v.nodes);
1075
1064
  function pageRuntimeFromValues(page, { values = {}, traversal } = {}) {
1076
1065
  const cells = (page.content?.cells ?? []).map((c) => resolveCell(normalizeCell(c).cell, null));
@@ -1108,8 +1097,6 @@ function pageRuntimeFromValues(page, { values = {}, traversal } = {}) {
1108
1097
  diagnostics: validatePage(page)
1109
1098
  };
1110
1099
  }
1111
- //#endregion
1112
- //#region packages/renderer/src/core/release.ts
1113
1100
  function validateManifest(pages, catalog) {
1114
1101
  return pages.flatMap(({ graphNodeId, page }) => validatePage(page, catalog).filter((d) => d.severity === "error").map((d) => ({
1115
1102
  graph_node_id: graphNodeId,
@@ -1129,7 +1116,4 @@ function manifestPageFrom(graphNodeId, data) {
1129
1116
  }
1130
1117
  };
1131
1118
  }
1132
- //#endregion
1133
1119
  export { CONTENT_FIELDS, CORE_SPECIFIER, DIAGNOSTICS, EACH, EACH_DEFAULT_AS, HYDRATED_CELL_FIELDS, LAYOUT_TYPES, MAIN, PAGE_DOCUMENT, PAGE_RULES, PAGING_VARIABLES, PUBLIC, RENDER_FUNCTIONS, RENDER_FUNCTIONS_AHEAD, RESERVED_LABELS, RESPONSIVE_BUCKETS, SECTION_KINDS, STORE_FIELDS, STORE_SCOPES, STRUCTURE_FIELDS, TOOL_OWNED_KEYS, UnsafeDocumentError, VARIABLE_NAMESPACES, WALK_DIRECTIONS, _clearBundleCache, actionBindingKey, actionProblems, actionReferences, assembleCellProps, attachSelectionSetters, attachViewStateSetters, buildDataContext, bundleScope, cellAttributes, cellContext, cellPlacementStyle, cellPropSources, cellResolutionContext, clearScope, collectDeclarations, collectDescriptors, collectScopeIds, collectStatic, createStackStore, declaredActions, deriveElementReferences, deriveSectionNumbering, deriveSectionReferences, descriptorShape, eachFormProblems, editTarget, hasRef, isComponentExport, isEach, loadBundle, loadBundles, loadBundlesSettled, loadPageData, loadScope, manifestPageFrom, mergeSectionReferences, mergeStates, nearestNames, needsWalk, nodePrintStyle, normalizeActionDeclaration, normalizeCell, normalizeRef, normalizeStructure, numberingFor, orderByVariable, pageBundleRefs, pageBundles, pageContainerStyle, pageContext, pageRuntimeFromValues, pageScopeKey, pageVariables, passesConditions, patchAt, prepareDocument, projectCellActions, projectCellData, projectLive, projectModule, projectScopeKey, projectSelections, projectViewState, queryKey, readField, readWalk, refKey, referencedLabels, referencesFor, resolveAction, resolveCell, resolveComponent, resolveDataSystem, resolveDeclarations, resolveDescriptorVariables, resolveReferences, resolveScopeId, resolveSystems, resolveWalkStart, rootCells, runtimeReady, saveScope, sectionAnchor, selectionIssues, selectionShape, settled, shallowEqualBundle, shapeAt, stateNames, stateValue, structureIssues, systemsFromGraphs, systemsFromProcess, tableOfContents, usesStructureLayout, validateCell, validateDescriptor, validateManifest, validatePage, variableLabels, variableReferences, walkKey, walkRequest };
1134
-
1135
- //# sourceMappingURL=core.js.map
package/dist/forms.js CHANGED
@@ -1,2 +1,2 @@
1
- import { _ as CONDITION_OPS, a as goToQuestion, b as normalizeCondition, c as missing, d as positionsOf, f as progress, g as visibleSteps, h as stepKind, i as goTo, l as move, m as settle, n as enterAdvances, o as isReadOnlyStatus, p as questionsOf, r as fromPageSteps, s as linkTo, t as defaultMode, u as positionFromLink, v as evaluateCondition, x as normalizeOperator, y as isConditionOp } from "./chunks/forms-CCAE7sCu.js";
1
+ import { _ as CONDITION_OPS, a as goToQuestion, b as normalizeCondition, c as missing, d as positionsOf, f as progress, g as visibleSteps, h as stepKind, i as goTo, l as move, m as settle, n as enterAdvances, o as isReadOnlyStatus, p as questionsOf, r as fromPageSteps, s as linkTo, t as defaultMode, u as positionFromLink, v as evaluateCondition, x as normalizeOperator, y as isConditionOp } from "./chunks/forms-DxA9WzCt.js";
2
2
  export { CONDITION_OPS, defaultMode, enterAdvances, evaluateCondition, fromPageSteps, goTo, goToQuestion, isConditionOp, isReadOnlyStatus, linkTo, missing, move, normalizeCondition, normalizeOperator, positionFromLink, positionsOf, progress, questionsOf, settle, stepKind, visibleSteps };
package/dist/print.js CHANGED
@@ -1,4 +1,3 @@
1
- //#region packages/renderer/src/print/document-profile.ts
2
1
  var bundleName = (bundle) => bundle.label ?? bundle.key ?? "(unkeyed)";
3
2
  var DEFAULTS = {
4
3
  profile: null,
@@ -73,8 +72,6 @@ function readMaxDepth(profile, bundleKey) {
73
72
  }
74
73
  return max;
75
74
  }
76
- //#endregion
77
- //#region packages/renderer/src/print/document-bindings.ts
78
75
  function asRecord(value) {
79
76
  return typeof value === "object" && value !== null && !Array.isArray(value) ? value : void 0;
80
77
  }
@@ -101,8 +98,6 @@ function resolveProfileId(page) {
101
98
  if (fromMetadata !== void 0 && fromMetadata !== fromLayout) console.warn(`[document-bindings] page declares layout.profile=${JSON.stringify(fromLayout)} and metadata.profile=${JSON.stringify(fromMetadata)}. **layout wins.** These are two copies of one fact and only one is read — delete metadata.profile rather than keeping them in step by hand.`);
102
99
  return fromLayout;
103
100
  }
104
- //#endregion
105
- //#region packages/renderer/src/print/print-policy.ts
106
101
  var BREAK_INSIDE = new Set(["avoid", "auto"]);
107
102
  function toCount(value) {
108
103
  if (!/^[1-9][0-9]*$/.test(value)) return void 0;
@@ -221,8 +216,6 @@ function deserializeConstraints(value) {
221
216
  const { constraints } = parsePrintPolicy(raw);
222
217
  return Object.keys(constraints).length > 0 ? constraints : void 0;
223
218
  }
224
- //#endregion
225
- //#region packages/renderer/src/print/page-map.ts
226
219
  function collectBlocks(root, printWidthPx, { measureRect, readConstraints, boxFor = defaultBoxFor, selector = "[data-cell-id]", sectionStart, blankBefore }) {
227
220
  if (!root) return {
228
221
  blocks: [],
@@ -444,8 +437,6 @@ function paperGeometryPx(sheet, margins, columns) {
444
437
  columnsReconcile: railPx === 0 || printWidthPx + gutterPx + railPx === pageBoxWidthPx
445
438
  };
446
439
  }
447
- //#endregion
448
- //#region packages/renderer/src/print/paginate.ts
449
440
  function mayNotSplit(c) {
450
441
  if (!c) return true;
451
442
  if (c.atomic) return true;
@@ -663,8 +654,6 @@ function paginate(blocks, { textBlockPx, keepWithNextScaleFloor = .6, sectionFil
663
654
  idealPages: textBlockPx > 0 ? Number((total / textBlockPx).toFixed(2)) : 0
664
655
  };
665
656
  }
666
- //#endregion
667
- //#region packages/renderer/src/print/running-header.ts
668
657
  function resolveRunningValues(map, bands, markers) {
669
658
  const markerByCell = new Map(markers.map((m) => [m.cellId, m]));
670
659
  const cellsOfBand = new Map(bands.map((b) => [b.id, b.members]));
@@ -711,8 +700,6 @@ function runningSlotValues(values, { continuedSuffix = " (continued)" } = {}) {
711
700
  "section-title-continued": values.continued ? `${values.sectionTitle}${continuedSuffix}` : values.sectionTitle
712
701
  };
713
702
  }
714
- //#endregion
715
- //#region packages/renderer/src/print/print-stylesheet.ts
716
703
  var warned = new Set();
717
704
  function warnOnce(key, message) {
718
705
  if (warned.has(key)) return;
@@ -862,8 +849,6 @@ function buildPageVariables(profile) {
862
849
  }
863
850
  return decls.length > 0 ? `:root {\n${decls.join("\n")}\n}` : "";
864
851
  }
865
- //#endregion
866
- //#region packages/renderer/src/print/print-layout.ts
867
852
  var SEPARATOR_MARGIN_PX = 48;
868
853
  var SEPARATOR_PADDING_PX = 16;
869
854
  var SEPARATOR_BORDER_PX = 2;
@@ -1048,8 +1033,6 @@ function round2(n) {
1048
1033
  function round4(n) {
1049
1034
  return Math.round(n * 1e4) / 1e4;
1050
1035
  }
1051
- //#endregion
1052
- //#region packages/renderer/src/print/map-staleness.ts
1053
1036
  function expectedHeightAfterTypesetting(measuredContainerPx, layout) {
1054
1037
  return measuredContainerPx - layout.scaled.reduce((sum, r) => sum + (r.heightPx - r.scaledHeightPx), 0) + layout.screenExtraPx;
1055
1038
  }
@@ -1065,8 +1048,6 @@ function mapStaleness(liveHeightPx, expectedPx, textBlockPx) {
1065
1048
  tolerancePx
1066
1049
  };
1067
1050
  }
1068
- //#endregion
1069
- //#region packages/renderer/src/print/print-lint.ts
1070
1051
  var VIEWPORT_UNIT = /(?<![\w-])(\d*\.?\d+)(v[hw]|vmin|vmax|[sld]v[hwbi]|vb|vi)(?![\w-])/gi;
1071
1052
  var IGNORED_PROPERTIES = new Set(["container-type"]);
1072
1053
  function viewportUnitsIn(cssText, where) {
@@ -1121,8 +1102,6 @@ function describe(el) {
1121
1102
  if (cls) return `${el.tagName.toLowerCase()}.${cls.trim().split(/\s+/).slice(0, 2).join(".")}`;
1122
1103
  return el.tagName.toLowerCase();
1123
1104
  }
1124
- //#endregion
1125
- //#region packages/renderer/src/print/structure-print.ts
1126
1105
  function setRowPageIntent(structure, cellId, intent) {
1127
1106
  if (!structure || !cellId) return {
1128
1107
  structure: structure ?? [],
@@ -1385,7 +1364,4 @@ function splitMarginalia(page, marginaliaCellId, hasReservedTrack) {
1385
1364
  reason: null
1386
1365
  };
1387
1366
  }
1388
- //#endregion
1389
1367
  export { BLANK_PAGE_SEPARATOR_PX, DEFAULT_MARGINS, DEFAULT_SHEET, MissingRequiredBindingError, PRINT_POLICY_ATTR, RUNNING_SLOTS, SEPARATOR_TOTAL_PX, __clearDocumentProfileWarnings, __clearPrintStylesheetWarnings, applyRowPrint, auditPrintLint, buildPageStylesheet, buildPageVariables, buildPrintLayout, checkPaginatorBindings, collectBlocks, composeConstraints, constraintsFromBox, constraintsFromComputedStyle, constraintsResolver, cssLengthToPx, cssString, cssValue, deserializeConstraints, diffRowPrint, expectedHeightAfterTypesetting, findSlottedCellIds, forcedBreaksWithin, intentOfPrintBlock, isRunningSlot, mapStaleness, mediaReachesPrint, nodePrintConstraints, paginate, paperGeometryPx, parsePrintPolicy, printBlockForIntent, printByCellId, printPolicyToStyle, resolveDocumentProfile, resolvePlacement, resolveProfileId, resolveRegionBindings, resolveRunningValues, rowHasBlankPage, rowPageIntent, runningSlotValues, serializeConstraints, setRowBlankPage, setRowPageIntent, splitMarginalia, stalenessTolerancePx, viewportUnitsIn, withForcedBreaks };
1390
-
1391
- //# sourceMappingURL=print.js.map