nodality 1.5.2 → 1.5.4

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 (245) hide show
  1. package/README.md +2 -22
  2. package/bin/mcp-server.mjs +3 -1
  3. package/dist/animator.cjs.js.LICENSE.txt +1 -1
  4. package/dist/animator.esm.js.LICENSE.txt +1 -1
  5. package/dist/audionew.cjs.js +1 -1
  6. package/dist/audionew.cjs.js.LICENSE.txt +1 -1
  7. package/dist/audionew.esm.js +1 -1
  8. package/dist/audionew.esm.js.LICENSE.txt +1 -1
  9. package/dist/base.cjs.js.LICENSE.txt +1 -1
  10. package/dist/base.esm.js.LICENSE.txt +1 -1
  11. package/dist/beta-desktop-bar.cjs.js.LICENSE.txt +1 -1
  12. package/dist/beta-desktop-bar.esm.js.LICENSE.txt +1 -1
  13. package/dist/beta-mobile-bar.cjs.js.LICENSE.txt +1 -1
  14. package/dist/beta-mobile-bar.esm.js.LICENSE.txt +1 -1
  15. package/dist/bundle.umd.js +1 -1
  16. package/dist/bundle.umd.js.LICENSE.txt +28 -1
  17. package/dist/button.cjs.js +1 -1
  18. package/dist/button.cjs.js.LICENSE.txt +1 -1
  19. package/dist/button.esm.js +1 -1
  20. package/dist/button.esm.js.LICENSE.txt +1 -1
  21. package/dist/card-getter.cjs.js.LICENSE.txt +1 -1
  22. package/dist/card-getter.esm.js.LICENSE.txt +1 -1
  23. package/dist/center.cjs.js.LICENSE.txt +1 -1
  24. package/dist/center.esm.js.LICENSE.txt +1 -1
  25. package/dist/checkbox.cjs.js +1 -1
  26. package/dist/checkbox.cjs.js.LICENSE.txt +1 -1
  27. package/dist/checkbox.esm.js +1 -1
  28. package/dist/checkbox.esm.js.LICENSE.txt +1 -1
  29. package/dist/code.cjs.js +1 -1
  30. package/dist/code.cjs.js.LICENSE.txt +1 -1
  31. package/dist/code.esm.js +1 -1
  32. package/dist/code.esm.js.LICENSE.txt +1 -1
  33. package/dist/container.cjs.js +1 -1
  34. package/dist/container.cjs.js.LICENSE.txt +1 -1
  35. package/dist/container.esm.js +1 -1
  36. package/dist/container.esm.js.LICENSE.txt +1 -1
  37. package/dist/data-list.cjs.js.LICENSE.txt +1 -1
  38. package/dist/data-list.esm.js.LICENSE.txt +1 -1
  39. package/dist/designer.cjs.js +1 -1
  40. package/dist/designer.cjs.js.LICENSE.txt +28 -1
  41. package/dist/designer.esm.js +1 -1
  42. package/dist/designer.esm.js.LICENSE.txt +28 -1
  43. package/dist/element-mapper.cjs.js +1 -1
  44. package/dist/element-mapper.cjs.js.LICENSE.txt +1 -1
  45. package/dist/element-mapper.esm.js +1 -1
  46. package/dist/element-mapper.esm.js.LICENSE.txt +1 -1
  47. package/dist/finalresult.esm.js +1 -1
  48. package/dist/finalresult.esm.js.LICENSE.txt +28 -1
  49. package/dist/flex-card.cjs.js.LICENSE.txt +1 -1
  50. package/dist/flex-card.esm.js.LICENSE.txt +1 -1
  51. package/dist/flex-grid.cjs.js +1 -1
  52. package/dist/flex-grid.cjs.js.LICENSE.txt +1 -1
  53. package/dist/flex-grid.esm.js +1 -1
  54. package/dist/flex-grid.esm.js.LICENSE.txt +1 -1
  55. package/dist/flex-row.cjs.js +1 -1
  56. package/dist/flex-row.cjs.js.LICENSE.txt +1 -1
  57. package/dist/flex-row.esm.js +1 -1
  58. package/dist/flex-row.esm.js.LICENSE.txt +1 -1
  59. package/dist/floating-input.cjs.js.LICENSE.txt +1 -1
  60. package/dist/floating-input.esm.js.LICENSE.txt +1 -1
  61. package/dist/free.cjs.js.LICENSE.txt +1 -1
  62. package/dist/free.esm.js.LICENSE.txt +1 -1
  63. package/dist/horizontal-scroller.cjs.js.LICENSE.txt +1 -1
  64. package/dist/horizontal-scroller.esm.js.LICENSE.txt +1 -1
  65. package/dist/image-picker.cjs.js.LICENSE.txt +1 -1
  66. package/dist/image-picker.esm.js.LICENSE.txt +1 -1
  67. package/dist/image.cjs.js +1 -1
  68. package/dist/image.cjs.js.LICENSE.txt +1 -1
  69. package/dist/image.esm.js +1 -1
  70. package/dist/image.esm.js.LICENSE.txt +1 -1
  71. package/dist/index.cjs.js +1 -1
  72. package/dist/index.cjs.js.LICENSE.txt +28 -1
  73. package/dist/index.d.ts +1 -1
  74. package/dist/index.esm.js +1 -1
  75. package/dist/index.esm.js.LICENSE.txt +28 -1
  76. package/dist/keyframe-animation.cjs.js.LICENSE.txt +1 -1
  77. package/dist/keyframe-animation.esm.js.LICENSE.txt +1 -1
  78. package/dist/link-getter.cjs.js +1 -1
  79. package/dist/link-getter.cjs.js.LICENSE.txt +1 -1
  80. package/dist/link-getter.esm.js +1 -1
  81. package/dist/link-getter.esm.js.LICENSE.txt +1 -1
  82. package/dist/link.cjs.js +1 -1
  83. package/dist/link.cjs.js.LICENSE.txt +1 -1
  84. package/dist/link.esm.js +1 -1
  85. package/dist/link.esm.js.LICENSE.txt +1 -1
  86. package/dist/meta-adder.cjs.js.LICENSE.txt +1 -1
  87. package/dist/meta-adder.esm.js.LICENSE.txt +1 -1
  88. package/dist/modal-2025.cjs.js.LICENSE.txt +1 -1
  89. package/dist/modal-2025.esm.js.LICENSE.txt +1 -1
  90. package/dist/multiswitcher.cjs.js +1 -1
  91. package/dist/multiswitcher.cjs.js.LICENSE.txt +1 -1
  92. package/dist/multiswitcher.esm.js +1 -1
  93. package/dist/multiswitcher.esm.js.LICENSE.txt +1 -1
  94. package/dist/new-nav-bar.cjs.js.LICENSE.txt +1 -1
  95. package/dist/new-nav-bar.esm.js.LICENSE.txt +1 -1
  96. package/dist/picker.cjs.js.LICENSE.txt +1 -1
  97. package/dist/picker.esm.js.LICENSE.txt +1 -1
  98. package/dist/progress.cjs.js.LICENSE.txt +1 -1
  99. package/dist/progress.esm.js.LICENSE.txt +1 -1
  100. package/dist/radio.cjs.js.LICENSE.txt +1 -1
  101. package/dist/radio.esm.js.LICENSE.txt +1 -1
  102. package/dist/range.cjs.js.LICENSE.txt +1 -1
  103. package/dist/range.esm.js.LICENSE.txt +1 -1
  104. package/dist/scroll-video.cjs.js.LICENSE.txt +1 -1
  105. package/dist/scroll-video.esm.js.LICENSE.txt +1 -1
  106. package/dist/side-bar.cjs.js.LICENSE.txt +1 -1
  107. package/dist/side-bar.esm.js.LICENSE.txt +1 -1
  108. package/dist/side-nav-bar.cjs.js.LICENSE.txt +1 -1
  109. package/dist/side-nav-bar.esm.js.LICENSE.txt +1 -1
  110. package/dist/simple-bar.cjs.js.LICENSE.txt +1 -1
  111. package/dist/simple-bar.esm.js.LICENSE.txt +1 -1
  112. package/dist/slider-2025.cjs.js +1 -1
  113. package/dist/slider-2025.cjs.js.LICENSE.txt +1 -1
  114. package/dist/slider-2025.esm.js +1 -1
  115. package/dist/slider-2025.esm.js.LICENSE.txt +1 -1
  116. package/dist/spacer.cjs.js.LICENSE.txt +1 -1
  117. package/dist/spacer.esm.js.LICENSE.txt +1 -1
  118. package/dist/stack.cjs.js.LICENSE.txt +1 -1
  119. package/dist/stack.esm.js.LICENSE.txt +1 -1
  120. package/dist/stacker.cjs.js.LICENSE.txt +1 -1
  121. package/dist/stacker.esm.js.LICENSE.txt +1 -1
  122. package/dist/table.cjs.js.LICENSE.txt +1 -1
  123. package/dist/table.esm.js.LICENSE.txt +1 -1
  124. package/dist/text-field.cjs.js.LICENSE.txt +1 -1
  125. package/dist/text-field.esm.js.LICENSE.txt +1 -1
  126. package/dist/text.cjs.js +1 -1
  127. package/dist/text.cjs.js.LICENSE.txt +1 -1
  128. package/dist/text.esm.js +1 -1
  129. package/dist/text.esm.js.LICENSE.txt +1 -1
  130. package/dist/theme.cjs.js.LICENSE.txt +1 -1
  131. package/dist/theme.esm.js.LICENSE.txt +1 -1
  132. package/dist/transform-anim.cjs.js.LICENSE.txt +1 -1
  133. package/dist/transform-anim.esm.js.LICENSE.txt +1 -1
  134. package/dist/ulist.cjs.js +1 -1
  135. package/dist/ulist.cjs.js.LICENSE.txt +1 -1
  136. package/dist/ulist.esm.js +1 -1
  137. package/dist/ulist.esm.js.LICENSE.txt +1 -1
  138. package/dist/video.cjs.js +1 -1
  139. package/dist/video.cjs.js.LICENSE.txt +1 -1
  140. package/dist/video.esm.js +1 -1
  141. package/dist/video.esm.js.LICENSE.txt +1 -1
  142. package/dist/wrap.cjs.js.LICENSE.txt +1 -1
  143. package/dist/wrap.esm.js.LICENSE.txt +1 -1
  144. package/dist/zoom-card.cjs.js.LICENSE.txt +1 -1
  145. package/dist/zoom-card.esm.js.LICENSE.txt +1 -1
  146. package/layout/animator.js +1 -1
  147. package/layout/audio.js +1 -1
  148. package/layout/audionew.js +3 -2
  149. package/layout/base.js +1 -1
  150. package/layout/beta-desktop-bar.js +1 -1
  151. package/layout/beta-mobile-bar.js +1 -1
  152. package/layout/button.js +9 -7
  153. package/layout/center.js +1 -1
  154. package/layout/checkbox.js +3 -2
  155. package/layout/circle.js +1 -1
  156. package/layout/code.js +5 -11
  157. package/layout/container.js +14 -14
  158. package/layout/dropdown-2025.js +3 -2
  159. package/layout/flex-card.js +1 -1
  160. package/layout/flex-grid.js +4 -3
  161. package/layout/flex-row.js +3 -9
  162. package/layout/form-components/custom.js +1 -1
  163. package/layout/form-components/data-list.js +1 -1
  164. package/layout/form-components/floating-input.js +1 -1
  165. package/layout/form-components/form-all.js +1 -1
  166. package/layout/form-components/form.js +1 -1
  167. package/layout/form-components/image-picker.js +1 -1
  168. package/layout/form-components/picker.js +1 -1
  169. package/layout/form-components/radio.js +1 -1
  170. package/layout/form-components/radiogroup.js +1 -1
  171. package/layout/form-components/range.js +1 -1
  172. package/layout/free.js +1 -1
  173. package/layout/grid-overlay.js +1 -1
  174. package/layout/grid-switcher.js +1 -1
  175. package/layout/grid.js +1 -1
  176. package/layout/horizontal-scroller.js +1 -1
  177. package/layout/image.js +18 -17
  178. package/layout/index.js +1 -1
  179. package/layout/link.js +12 -12
  180. package/layout/list.js +1 -1
  181. package/layout/meta-adder.js +1 -1
  182. package/layout/modal-2025.js +1 -1
  183. package/layout/morph.js +1 -1
  184. package/layout/multiswitcher.js +3 -2
  185. package/layout/nav-bar.js +1 -1
  186. package/layout/nav-factor/custom-div.js +1 -1
  187. package/layout/new-nav-bar.js +1 -1
  188. package/layout/polygon.js +1 -1
  189. package/layout/prerender-site.js +1 -1
  190. package/layout/prerender.js +1 -1
  191. package/layout/progress.js +1 -1
  192. package/layout/row.js +1 -1
  193. package/layout/scroll-video.js +1 -1
  194. package/layout/shop.js +1 -1
  195. package/layout/side-bar.js +1 -1
  196. package/layout/side-nav-bar.js +1 -1
  197. package/layout/simple-bar.js +1 -1
  198. package/layout/slider-2025.js +1 -1
  199. package/layout/spacer.js +1 -1
  200. package/layout/stack.js +1 -1
  201. package/layout/svg.js +1 -1
  202. package/layout/switcher.js +3 -2
  203. package/layout/table.js +1 -1
  204. package/layout/text-field.js +1 -1
  205. package/layout/text.js +21 -13
  206. package/layout/ulist.js +3 -2
  207. package/layout/video.js +3 -3
  208. package/layout/wrap.js +1 -1
  209. package/layout/zoom-card.js +1 -1
  210. package/lib/agent-surface.js +1 -1
  211. package/lib/card-getter.js +1 -1
  212. package/lib/check-page.js +1 -1
  213. package/lib/codegen.js +11 -2
  214. package/lib/data.js +1 -1
  215. package/lib/designer.js +5 -4
  216. package/lib/element-mapper.js +3 -2
  217. package/lib/element-params.generated.js +1 -1
  218. package/lib/grid-geometry.js +1 -1
  219. package/lib/keyframe-animation.js +1 -1
  220. package/lib/known-inert.js +1 -1
  221. package/lib/link-getter.js +1 -1
  222. package/lib/morph-node.js +1 -1
  223. package/lib/normalize-spec.js +1 -1
  224. package/lib/op-semantics.js +178 -0
  225. package/lib/parse-html.js +60 -6
  226. package/lib/raster-inspect.js +1 -1
  227. package/lib/raster-ops.js +1 -1
  228. package/lib/raster-presets.js +1 -1
  229. package/lib/react.js +1 -1
  230. package/lib/resolve-refs.js +1 -1
  231. package/lib/responsive.js +41 -1
  232. package/lib/scroll-video.js +1 -1
  233. package/lib/seo.js +1 -1
  234. package/lib/stacker.js +1 -1
  235. package/lib/suggest.js +1 -1
  236. package/lib/theme.js +1 -1
  237. package/lib/transform-anim.js +1 -1
  238. package/lib/transition.js +1 -1
  239. package/lib/validate-nodes.js +13 -2
  240. package/lib/view-transition.js +1 -1
  241. package/lib/webmcp-adapter.js +1 -1
  242. package/package.json +1 -1
  243. package/skills/nodality/SKILL.md +3 -5
  244. package/skills/nodality/references/editing.md +8 -6
  245. package/skills/nodality-edit-page/SKILL.md +3 -1
package/lib/responsive.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * nodality v1.5.2
2
+ * nodality v1.5.4
3
3
  * (c) 2026 Filip Vabrousek
4
4
  * License: MIT
5
5
  */
@@ -489,6 +489,10 @@ export async function respond(page, spec, renderAt, opts = {}) {
489
489
  const groups = eligibleGroups(elements);
490
490
  const maxPasses = opts.maxPasses || 4;
491
491
  let measurements = 0;
492
+ // Cell certification (see solveLevel): renders spent, and the cells whose
493
+ // fit was not affine and were split.
494
+ let certifyRenders = 0;
495
+ const nonAffine = [];
492
496
 
493
497
  // Solve one depth level, with `others` (the current nodes of every group
494
498
  // not in the level) in force. Returns each group's narrow intervals and
@@ -535,6 +539,41 @@ export async function respond(page, spec, renderAt, opts = {}) {
535
539
  }
536
540
  };
537
541
  for (const w of grid) await measureAt(w, level);
542
+ // Certify every grid cell before bracketing. A bracket needs the two
543
+ // sides of a switch on different samples, so a fit that turns and turns
544
+ // back inside one cell would be missed. Each cell is measured at its
545
+ // midpoint; where any group's fit (g or gn) is more than `tolerance` px
546
+ // off the line through the cell's ends, sizes are not affine in the
547
+ // width there, and the cell is split and checked again.
548
+ if (opts.certify !== false) {
549
+ const tol = opts.tolerance ?? 1;
550
+ const minCell = opts.minCell ?? 8;
551
+ const cap = opts.maxCertify ?? 64;
552
+ const at = (list, v) => list.find((x) => x.v === v);
553
+ const offLine = (a, m, b, key) => {
554
+ if (![a, m, b].every((x) => x && typeof x[key] === "number")) return false;
555
+ const t = (m.v - a.v) / (b.v - a.v);
556
+ return Math.abs(m[key] - (a[key] + t * (b[key] - a[key]))) > tol;
557
+ };
558
+ let cells = grid.slice(1).map((b, i) => [grid[i], b]);
559
+ let spent = 0;
560
+ while (cells.length && spent < cap) {
561
+ const next = [];
562
+ for (const [a, b] of cells) {
563
+ if (b - a <= minCell || spent >= cap) continue;
564
+ const m = Math.floor((a + b) / 2);
565
+ await measureAt(m, level);
566
+ spent++;
567
+ certifyRenders++;
568
+ const bent = level.some((g) => {
569
+ const list = samples.get(g.id);
570
+ return ["g", "gn"].some((k) => offLine(at(list, a), at(list, m), at(list, b), k));
571
+ });
572
+ if (bent) { next.push([a, m], [m, b]); nonAffine.push([a, b]); }
573
+ }
574
+ cells = next;
575
+ }
576
+ }
538
577
  const solved = new Map();
539
578
  const reports = new Map();
540
579
  for (const g of level) {
@@ -621,6 +660,7 @@ export async function respond(page, spec, renderAt, opts = {}) {
621
660
  synthesized,
622
661
  report,
623
662
  measurements,
663
+ certification: opts.certify === false ? null : { renders: certifyRenders, nonAffine },
624
664
  passes,
625
665
  converged,
626
666
  skipped: findGroups(elements).filter((g) => g.authored || g.members < 2).map((g) => ({ id: g.id, kind: g.kind, reason: g.authored ? "authored" : "fewer than two members" })),
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * nodality v1.5.2
2
+ * nodality v1.5.4
3
3
  * (c) 2026 Filip Vabrousek
4
4
  * License: MIT
5
5
  */
package/lib/seo.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * nodality v1.5.2
2
+ * nodality v1.5.4
3
3
  * (c) 2026 Filip Vabrousek
4
4
  * License: MIT
5
5
  */
package/lib/stacker.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * nodality v1.5.2
2
+ * nodality v1.5.4
3
3
  * (c) 2026 Filip Vabrousek
4
4
  * License: MIT
5
5
  */
package/lib/suggest.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * nodality v1.5.2
2
+ * nodality v1.5.4
3
3
  * (c) 2026 Filip Vabrousek
4
4
  * License: MIT
5
5
  */
package/lib/theme.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * nodality v1.5.2
2
+ * nodality v1.5.4
3
3
  * (c) 2026 Filip Vabrousek
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * nodality v1.5.2
2
+ * nodality v1.5.4
3
3
  * (c) 2026 Filip Vabrousek
4
4
  * License: MIT
5
5
  */
package/lib/transition.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * nodality v1.5.2
2
+ * nodality v1.5.4
3
3
  * (c) 2026 Filip Vabrousek
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * nodality v1.5.2
2
+ * nodality v1.5.4
3
3
  * (c) 2026 Filip Vabrousek
4
4
  * License: MIT
5
5
  */
@@ -29,6 +29,7 @@ import {
29
29
  REGISTRY, RASTER_OP_NAMES, DRIVER_NAMES, DRIVER_DOCS, RASTER_UNITS,
30
30
  FRAMEWORK_DOC, EASING_NAMES,
31
31
  } from "./raster-ops.js";
32
+ import { OP_SEMANTICS, shadowedNodes } from "./op-semantics.js";
32
33
  import { presetNames, presetInfo } from "./raster-presets.js";
33
34
  import { collectRefs, isRef, resolveRefs } from "./resolve-refs.js";
34
35
  import { normalizeSpec, aliasConflicts, ALIASES } from "./normalize-spec.js";
@@ -194,7 +195,7 @@ const BARE_DESIGN_OPS = [
194
195
  * node that works, and `preview` refuses to render an invalid pair, so
195
196
  * over-reporting costs more than under-reporting.
196
197
  */
197
- const DESIGN_OP_NAMES = [
198
+ export const DESIGN_OP_NAMES = [
198
199
  "animation", "arrange", "background", "blast", "card-style", "filter", "gradient",
199
200
  "layout", "link-style", "margin", "navStyle", "shadow", "slayout",
200
201
  "span", "transform",
@@ -1080,6 +1081,13 @@ export function validateNodes(nodes, elements, defs) {
1080
1081
  seen.set(key, have);
1081
1082
  });
1082
1083
 
1084
+ // Nodes that can never apply under the declared combine rules
1085
+ // (lib/op-semantics.js): a later node an earlier one shadows, and ops no
1086
+ // renderer code reads. Warnings, because the page still renders.
1087
+ for (const f of shadowedNodes(nodes)) {
1088
+ warn(f.code, `nodes[${f.index}]`, f.lost, [], [], f.detail);
1089
+ }
1090
+
1083
1091
  return { ok: errors.length === 0, errors, warnings };
1084
1092
  }
1085
1093
 
@@ -1132,6 +1140,9 @@ export function describeOps() {
1132
1140
  driverDocs: DRIVER_NAMES.map((name) => ({ name, summary: DRIVER_DOCS[name] || "" })),
1133
1141
  easings: EASING_NAMES,
1134
1142
  units: RASTER_UNITS,
1143
+ // How the nodes of each op combine: first (later ones ignored),
1144
+ // sequence (all apply in order) or inert. See lib/op-semantics.js.
1145
+ semantics: OP_SEMANTICS,
1135
1146
  };
1136
1147
  }
1137
1148
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * nodality v1.5.2
2
+ * nodality v1.5.4
3
3
  * (c) 2026 Filip Vabrousek
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * nodality v1.5.2
2
+ * nodality v1.5.4
3
3
  * (c) 2026 Filip Vabrousek
4
4
  * License: MIT
5
5
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodality",
3
- "version": "1.5.2",
3
+ "version": "1.5.4",
4
4
  "description": "A UI is two arrays: what exists, and what is done to it. Zero-dependency declarative UI library with build-time prerendering, composable WebGL effects, and an MCP server and validator for coding agents.",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -82,6 +82,8 @@ does not do what you wrote:
82
82
  | `BAD_PARAM_VALUE` | the value is not the shape the parameter takes — `width: 7` is not a CSS length, `mar: 7` is not `[{a: 7}]`. As an *error* where the value is provably inert; as a warning otherwise. |
83
83
  | `PARAM_NOT_ON_TYPE` | a real parameter name that THIS type does not read, so it is accepted and dropped — `keySet` on a `table`. |
84
84
  | `PARAM_INERT` | a parameter the type DOES list, and is known to ignore (the library's conformance baseline) — `size` on a `p`, `color` on a `checkbox`. The hint says what to use instead. |
85
+ | `SHADOWED_NODE` | an earlier node with the same op already decides this element (or the page), so this one does nothing there; `got` lists where it loses. Edit the earlier node instead of appending a new one. `list_ops` → `semantics` says which ops keep the first node (`first`) and which apply all in order (`sequence`). |
86
+ | `INERT_OP` | an op the validator accepts but nothing renders (`navStyle`). |
85
87
  | `STORE_AFTER_PRODUCT` / `NO_STORE` | a commerce `product` placed before the page's `store`, or with none: it renders empty. |
86
88
 
87
89
  `get_schema <type>` carries a `unit` on every parameter whose shape the
@@ -145,16 +147,12 @@ Read only what the task needs. Each file is short and stands alone.
145
147
  | checking a page before you call it done | `references/verifying.md` |
146
148
  | prerendering a static site | `references/prerender.md` |
147
149
 
148
- Four task skills sit beside this one and carry the step-by-step procedure:
150
+ Two task skills sit beside this one and carry the step-by-step procedure:
149
151
 
150
152
  - **`nodality-new-page`**: building a page from a brief, in small validated
151
153
  steps.
152
154
  - **`nodality-edit-page`**: changing one thing on a rendered page without
153
155
  regenerating it.
154
- - **`nodality-current`**: finding the element the person means by "this":
155
- what they picked in `npx nodality dev`, read fresh every turn.
156
- - **`nodality-apply-comments`**: applying the notes they left on the page
157
- in `npx nodality dev`, by element id, then resolving them.
158
156
 
159
157
  ## When NOT to use Nodality
160
158
 
@@ -10,16 +10,18 @@ regenerating. Read the page back to data, change the one thing, render
10
10
  again:
11
11
 
12
12
  ```js
13
- import { parseHTML } from "nodality/parse";
13
+ import { parseSpec } from "nodality/parse";
14
14
 
15
- const spec = parseHTML(html); // or the parse_html MCP tool
16
- spec[0].items[1].title = "Gamma"; // change one card
17
- new Des().nodes([]).add(spec).set({ mount: "#mount", annotate: true });
15
+ const { elements, nodes } = parseSpec(html); // or the parse_html MCP tool
16
+ elements[0].items[1].title = "Gamma"; // change one card
17
+ new Des().nodes(nodes).add(elements).set({ mount: "#mount", annotate: true });
18
18
  ```
19
19
 
20
20
  **Render with `{annotate: true}` if the page will ever be edited.** It
21
21
  writes each descriptor onto the node it produced, and that is what makes
22
- the read exact – every type, every option, nothing inferred. It is
22
+ the read exact – every type, every option, nothing inferred. It also
23
+ appends the page's nodes as one `<script type="application/json"
24
+ data-nod-nodes>` after the elements, so they come back too (`nodesExact`). It is
23
25
  opt-in and off by default because it puts attributes in the output.
24
26
 
25
27
  Without annotation only what the tag settles comes back: headings,
@@ -30,7 +32,7 @@ become a different page. Use `parseReport` (or the `parse_html` tool)
30
32
  rather than `parseHTML` when you need to know which you got:
31
33
 
32
34
  ```js
33
- const { ok, exact, spec, unrecovered, errors } = parseReport(html);
35
+ const { ok, exact, spec, nodes, nodesExact, unrecovered, errors } = parseReport(html);
34
36
  ```
35
37
 
36
38
  `ok` is false if anything was unrecovered *or* the recovered spec fails
@@ -18,7 +18,9 @@ Editing does not mean regenerating. The full background is in the
18
18
  not empty, the page was not rendered with `{annotate: true}` and some
19
19
  composites came back as bare `<div>`s. Say so and ask for the source
20
20
  rather than guessing those parts: a wrong guess silently becomes a
21
- different page.
21
+ different page. If `nodesExact` is false the page carried no nodes:
22
+ you can change elements, but ask for the source before changing or
23
+ relying on any node.
22
24
  3. **Find the target by `id`.** The id is the address. Change that element
23
25
  or the nodes whose `target` names it, and nothing else. Keep ids as they
24
26
  are: other nodes, generated code and the agent surface point at them.