nodality 1.2.2 → 1.2.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 (209) hide show
  1. package/README.md +15 -15
  2. package/bin/mcp-server.mjs +17 -4
  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.LICENSE.txt +1 -1
  6. package/dist/audionew.esm.js.LICENSE.txt +1 -1
  7. package/dist/base.cjs.js.LICENSE.txt +1 -1
  8. package/dist/base.esm.js.LICENSE.txt +1 -1
  9. package/dist/beta-desktop-bar.cjs.js.LICENSE.txt +1 -1
  10. package/dist/beta-desktop-bar.esm.js.LICENSE.txt +1 -1
  11. package/dist/beta-mobile-bar.cjs.js.LICENSE.txt +1 -1
  12. package/dist/beta-mobile-bar.esm.js.LICENSE.txt +1 -1
  13. package/dist/bundle.umd.js +1 -1
  14. package/dist/bundle.umd.js.LICENSE.txt +1 -1
  15. package/dist/button.cjs.js.LICENSE.txt +1 -1
  16. package/dist/button.esm.js.LICENSE.txt +1 -1
  17. package/dist/card-getter.cjs.js.LICENSE.txt +1 -1
  18. package/dist/card-getter.esm.js.LICENSE.txt +1 -1
  19. package/dist/center.cjs.js +1 -1
  20. package/dist/center.cjs.js.LICENSE.txt +1 -1
  21. package/dist/center.esm.js +1 -1
  22. package/dist/center.esm.js.LICENSE.txt +1 -1
  23. package/dist/checkbox.cjs.js.LICENSE.txt +1 -1
  24. package/dist/checkbox.esm.js.LICENSE.txt +1 -1
  25. package/dist/code.cjs.js.LICENSE.txt +1 -1
  26. package/dist/code.esm.js.LICENSE.txt +1 -1
  27. package/dist/container.cjs.js.LICENSE.txt +1 -1
  28. package/dist/container.esm.js.LICENSE.txt +1 -1
  29. package/dist/data-list.cjs.js.LICENSE.txt +1 -1
  30. package/dist/data-list.esm.js.LICENSE.txt +1 -1
  31. package/dist/designer.cjs.js +1 -1
  32. package/dist/designer.cjs.js.LICENSE.txt +1 -1
  33. package/dist/designer.esm.js +1 -1
  34. package/dist/designer.esm.js.LICENSE.txt +1 -1
  35. package/dist/element-mapper.cjs.js +1 -1
  36. package/dist/element-mapper.cjs.js.LICENSE.txt +1 -1
  37. package/dist/element-mapper.esm.js +1 -1
  38. package/dist/element-mapper.esm.js.LICENSE.txt +1 -1
  39. package/dist/finalresult.esm.js +1 -1
  40. package/dist/finalresult.esm.js.LICENSE.txt +1 -1
  41. package/dist/flex-card.cjs.js.LICENSE.txt +1 -1
  42. package/dist/flex-card.esm.js.LICENSE.txt +1 -1
  43. package/dist/flex-grid.cjs.js.LICENSE.txt +1 -1
  44. package/dist/flex-grid.esm.js.LICENSE.txt +1 -1
  45. package/dist/flex-row.cjs.js.LICENSE.txt +1 -1
  46. package/dist/flex-row.esm.js.LICENSE.txt +1 -1
  47. package/dist/floating-input.cjs.js.LICENSE.txt +1 -1
  48. package/dist/floating-input.esm.js.LICENSE.txt +1 -1
  49. package/dist/free.cjs.js.LICENSE.txt +1 -1
  50. package/dist/free.esm.js.LICENSE.txt +1 -1
  51. package/dist/horizontal-scroller.cjs.js.LICENSE.txt +1 -1
  52. package/dist/horizontal-scroller.esm.js.LICENSE.txt +1 -1
  53. package/dist/image-picker.cjs.js +1 -1
  54. package/dist/image-picker.cjs.js.LICENSE.txt +1 -1
  55. package/dist/image-picker.esm.js +1 -1
  56. package/dist/image-picker.esm.js.LICENSE.txt +1 -1
  57. package/dist/image.cjs.js +1 -1
  58. package/dist/image.cjs.js.LICENSE.txt +1 -1
  59. package/dist/image.esm.js +1 -1
  60. package/dist/image.esm.js.LICENSE.txt +1 -1
  61. package/dist/index.cjs.js +1 -1
  62. package/dist/index.cjs.js.LICENSE.txt +1 -1
  63. package/dist/index.d.ts +1 -1
  64. package/dist/index.esm.js +1 -1
  65. package/dist/index.esm.js.LICENSE.txt +1 -1
  66. package/dist/keyframe-animation.cjs.js +1 -1
  67. package/dist/keyframe-animation.cjs.js.LICENSE.txt +1 -1
  68. package/dist/keyframe-animation.esm.js +1 -1
  69. package/dist/keyframe-animation.esm.js.LICENSE.txt +1 -1
  70. package/dist/link-getter.cjs.js.LICENSE.txt +1 -1
  71. package/dist/link-getter.esm.js.LICENSE.txt +1 -1
  72. package/dist/link.cjs.js.LICENSE.txt +1 -1
  73. package/dist/link.esm.js.LICENSE.txt +1 -1
  74. package/dist/meta-adder.cjs.js.LICENSE.txt +1 -1
  75. package/dist/meta-adder.esm.js.LICENSE.txt +1 -1
  76. package/dist/modal-2025.cjs.js.LICENSE.txt +1 -1
  77. package/dist/modal-2025.esm.js.LICENSE.txt +1 -1
  78. package/dist/multiswitcher.cjs.js.LICENSE.txt +1 -1
  79. package/dist/multiswitcher.esm.js.LICENSE.txt +1 -1
  80. package/dist/new-nav-bar.cjs.js.LICENSE.txt +1 -1
  81. package/dist/new-nav-bar.esm.js.LICENSE.txt +1 -1
  82. package/dist/picker.cjs.js.LICENSE.txt +1 -1
  83. package/dist/picker.esm.js.LICENSE.txt +1 -1
  84. package/dist/progress.cjs.js.LICENSE.txt +1 -1
  85. package/dist/progress.esm.js.LICENSE.txt +1 -1
  86. package/dist/radio.cjs.js.LICENSE.txt +1 -1
  87. package/dist/radio.esm.js.LICENSE.txt +1 -1
  88. package/dist/range.cjs.js.LICENSE.txt +1 -1
  89. package/dist/range.esm.js.LICENSE.txt +1 -1
  90. package/dist/scroll-video.cjs.js.LICENSE.txt +1 -1
  91. package/dist/scroll-video.esm.js.LICENSE.txt +1 -1
  92. package/dist/side-bar.cjs.js.LICENSE.txt +1 -1
  93. package/dist/side-bar.esm.js.LICENSE.txt +1 -1
  94. package/dist/side-nav-bar.cjs.js.LICENSE.txt +1 -1
  95. package/dist/side-nav-bar.esm.js.LICENSE.txt +1 -1
  96. package/dist/simple-bar.cjs.js.LICENSE.txt +1 -1
  97. package/dist/simple-bar.esm.js.LICENSE.txt +1 -1
  98. package/dist/slider-2025.cjs.js.LICENSE.txt +1 -1
  99. package/dist/slider-2025.esm.js.LICENSE.txt +1 -1
  100. package/dist/spacer.cjs.js.LICENSE.txt +1 -1
  101. package/dist/spacer.esm.js.LICENSE.txt +1 -1
  102. package/dist/stack.cjs.js.LICENSE.txt +1 -1
  103. package/dist/stack.esm.js.LICENSE.txt +1 -1
  104. package/dist/stacker.cjs.js.LICENSE.txt +1 -1
  105. package/dist/stacker.esm.js.LICENSE.txt +1 -1
  106. package/dist/table.cjs.js.LICENSE.txt +1 -1
  107. package/dist/table.esm.js.LICENSE.txt +1 -1
  108. package/dist/text-field.cjs.js.LICENSE.txt +1 -1
  109. package/dist/text-field.esm.js.LICENSE.txt +1 -1
  110. package/dist/text.cjs.js +1 -1
  111. package/dist/text.cjs.js.LICENSE.txt +1 -1
  112. package/dist/text.esm.js +1 -1
  113. package/dist/text.esm.js.LICENSE.txt +1 -1
  114. package/dist/theme.cjs.js.LICENSE.txt +1 -1
  115. package/dist/theme.esm.js.LICENSE.txt +1 -1
  116. package/dist/transform-anim.cjs.js.LICENSE.txt +1 -1
  117. package/dist/transform-anim.esm.js.LICENSE.txt +1 -1
  118. package/dist/ulist.cjs.js.LICENSE.txt +1 -1
  119. package/dist/ulist.esm.js.LICENSE.txt +1 -1
  120. package/dist/video.cjs.js.LICENSE.txt +1 -1
  121. package/dist/video.esm.js.LICENSE.txt +1 -1
  122. package/dist/wrap.cjs.js.LICENSE.txt +1 -1
  123. package/dist/wrap.esm.js.LICENSE.txt +1 -1
  124. package/dist/zoom-card.cjs.js.LICENSE.txt +1 -1
  125. package/dist/zoom-card.esm.js.LICENSE.txt +1 -1
  126. package/layout/animator.js +1 -1
  127. package/layout/audio.js +1 -1
  128. package/layout/audionew.js +1 -1
  129. package/layout/base.js +1 -1
  130. package/layout/beta-desktop-bar.js +1 -1
  131. package/layout/beta-mobile-bar.js +1 -1
  132. package/layout/button.js +1 -1
  133. package/layout/center.js +3 -3
  134. package/layout/checkbox.js +1 -1
  135. package/layout/circle.js +1 -1
  136. package/layout/code.js +1 -1
  137. package/layout/container.js +1 -1
  138. package/layout/dropdown-2025.js +1 -1
  139. package/layout/flex-card.js +1 -1
  140. package/layout/flex-grid.js +1 -1
  141. package/layout/flex-row.js +1 -1
  142. package/layout/form-components/custom.js +1 -1
  143. package/layout/form-components/data-list.js +1 -1
  144. package/layout/form-components/floating-input.js +1 -1
  145. package/layout/form-components/form-all.js +1 -1
  146. package/layout/form-components/form.js +1 -1
  147. package/layout/form-components/image-picker.js +2 -2
  148. package/layout/form-components/picker.js +1 -1
  149. package/layout/form-components/radio.js +1 -1
  150. package/layout/form-components/radiogroup.js +1 -1
  151. package/layout/form-components/range.js +1 -1
  152. package/layout/free.js +1 -1
  153. package/layout/grid-switcher.js +1 -1
  154. package/layout/grid.js +1 -1
  155. package/layout/horizontal-scroller.js +1 -1
  156. package/layout/image.js +2 -2
  157. package/layout/index.js +1 -1
  158. package/layout/link.js +1 -1
  159. package/layout/list.js +1 -1
  160. package/layout/meta-adder.js +1 -1
  161. package/layout/modal-2025.js +1 -1
  162. package/layout/morph.js +1 -1
  163. package/layout/multiswitcher.js +1 -1
  164. package/layout/nav-bar.js +1 -1
  165. package/layout/nav-factor/custom-div.js +1 -1
  166. package/layout/new-nav-bar.js +1 -1
  167. package/layout/polygon.js +1 -1
  168. package/layout/prerender-site.js +1 -1
  169. package/layout/prerender.js +1 -1
  170. package/layout/progress.js +1 -1
  171. package/layout/row.js +1 -1
  172. package/layout/scroll-video.js +1 -1
  173. package/layout/side-bar.js +1 -1
  174. package/layout/side-nav-bar.js +1 -1
  175. package/layout/simple-bar.js +1 -1
  176. package/layout/slider-2025.js +1 -1
  177. package/layout/spacer.js +1 -1
  178. package/layout/stack.js +1 -1
  179. package/layout/svg.js +1 -1
  180. package/layout/switcher.js +1 -1
  181. package/layout/table.js +1 -1
  182. package/layout/text-field.js +1 -1
  183. package/layout/text.js +2 -2
  184. package/layout/ulist.js +1 -1
  185. package/layout/video.js +1 -1
  186. package/layout/wrap.js +1 -1
  187. package/layout/zoom-card.js +1 -1
  188. package/lib/agent-surface.js +1 -1
  189. package/lib/card-getter.js +1 -1
  190. package/lib/codegen.js +1 -1
  191. package/lib/data.js +1 -1
  192. package/lib/designer.js +1 -1
  193. package/lib/element-mapper.js +7 -2
  194. package/lib/keyframe-animation.js +2 -2
  195. package/lib/link-getter.js +1 -1
  196. package/lib/morph-node.js +1 -1
  197. package/lib/raster-inspect.js +1 -1
  198. package/lib/raster-ops.js +1 -1
  199. package/lib/raster-presets.js +1 -1
  200. package/lib/scroll-video.js +1 -1
  201. package/lib/seo.js +1 -1
  202. package/lib/stacker.js +1 -1
  203. package/lib/suggest.js +1 -1
  204. package/lib/theme.js +1 -1
  205. package/lib/transform-anim.js +1 -1
  206. package/lib/transition.js +1 -1
  207. package/lib/validate-nodes.js +75 -4
  208. package/lib/webmcp-adapter.js +1 -1
  209. package/package.json +1 -1
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  <p align="center">
4
4
  <strong>A user interface is two arrays: what exists, and what is done to it.</strong><br>
5
- Both are plain data so the pipeline that builds your page is inspectable,
5
+ Both are plain data so the pipeline that builds your page is inspectable,
6
6
  diffable, and executable at build time <em>and</em> in the browser.
7
7
  </p>
8
8
 
@@ -32,7 +32,7 @@
32
32
  ```
33
33
 
34
34
  That is the entire source of the transitions above. The entries are
35
- **edges, not keyframes** edge two is reachable *from* the state edge one
35
+ **edges, not keyframes** edge two is reachable *from* the state edge one
36
36
  lands on, so a landed view becomes a source in its turn. Settings on the
37
37
  node are defaults each edge may override, and `back` unwinds the path the
38
38
  user actually took rather than looking up an edge.
@@ -53,7 +53,7 @@ const nodes = [
53
53
 
54
54
  Two raster nodes aimed at one element compose into a **single** shader
55
55
  pass, in array order. The source is your live DOM, not an image you
56
- exported and the links underneath still work: pointer input is inverted
56
+ exported and the links underneath still work: pointer input is inverted
57
57
  through the compiled transformation and re-dispatched, so a click lands
58
58
  where the user aimed rather than where the layout still thinks the link
59
59
  is. In the recording above, the pointer drives the warp and then clicks
@@ -65,7 +65,7 @@ is. In the recording above, the pointer drives the warp and then clicks
65
65
  npm create nodality@latest my-app
66
66
  ```
67
67
 
68
- Or drop it into a page no build step, no dependencies:
68
+ Or drop it into a page no build step, no dependencies:
69
69
 
70
70
  ```html
71
71
  <div id="mount"></div>
@@ -87,7 +87,7 @@ new Des().nodes(nodes).add(elements).set({ mount: "#mount" });
87
87
  ```
88
88
 
89
89
  `elements` says what exists. `nodes` says what is done to it. Nothing in
90
- `elements` names an effect and nothing in `nodes` names a component the
90
+ `elements` names an effect and nothing in `nodes` names a component the
91
91
  two meet only through `target`, so either can be written, stored or
92
92
  generated without the other.
93
93
 
@@ -97,7 +97,7 @@ generated without the other.
97
97
  a simulated DOM, so `npx nodality prerender` emits crawlable HTML that a
98
98
  consumer running no JavaScript can read, plus a sitemap, `hreflang`
99
99
  alternates and JSON-LD. The browser then re-reads the same pair and
100
- rebuilds on top the pair is shipped, not consumed.
100
+ rebuilds on top the pair is shipped, not consumed.
101
101
  [Docs →](https://nodalityjs.github.io/docs/ssg/prerender/)
102
102
 
103
103
  **Transitions and navigation graphs.** `{ op: "morph" }` in one hop or a
@@ -110,8 +110,8 @@ pointer, scroll or time, composed into one pass.
110
110
  [Docs →](https://nodalityjs.github.io/docs/raster/ops/)
111
111
 
112
112
  **An agent-operable surface, derived.** One node exposes your page to an
113
- AI agent as callable tools traversing views, submitting a form you
114
- allowed, reading what is on screen derived from the graph you already
113
+ AI agent as callable tools traversing views, submitting a form you
114
+ allowed, reading what is on screen derived from the graph you already
115
115
  wrote rather than authored a second time, and also written into the
116
116
  prerendered HTML as a static manifest.
117
117
  [Docs →](https://nodalityjs.github.io/docs/raster/agent-surface/)
@@ -125,7 +125,7 @@ generator writes against the real vocabulary instead of guessing at it:
125
125
  { "mcpServers": { "nodality": { "command": "npx", "args": ["nodality", "mcp"] } } }
126
126
  ```
127
127
 
128
- Three tools. `list_ops` returns the op registry as data every op with
128
+ Three tools. `list_ops` returns the op registry as data every op with
129
129
  its stage, parameters, units and defaults. `validate_nodes` checks a node
130
130
  array and returns a machine-readable report with did-you-mean
131
131
  suggestions, so `{ op: "dithr" }` comes back as `UNKNOWN_OP` suggesting
@@ -142,7 +142,7 @@ import { validateNodes, describeOps } from "nodality/validate";
142
142
 
143
143
  ## What this is not
144
144
 
145
- Nodality targets **static, content-shaped sites** marketing pages,
145
+ Nodality targets **static, content-shaped sites** marketing pages,
146
146
  storefronts, documentation, brochure sites. It is not a replacement for a
147
147
  component framework with client-side state management, and it does not
148
148
  try to be one.
@@ -151,14 +151,14 @@ Two honest caveats. The HTML-in-Canvas capture backend is **experimental
151
151
  and flag-gated**: where it is unavailable the pipeline falls back to
152
152
  snapshot capture on its own, so a page authored against it degrades to
153
153
  stills rather than breaking. And determinism is a property of the
154
- compiled artefact the same pair always produces the same output not
154
+ compiled artefact the same pair always produces the same output not
155
155
  of the pixels a particular GPU eventually paints.
156
156
 
157
157
  ## Links
158
158
 
159
- - **Docs** [nodalityjs.github.io](https://nodalityjs.github.io/)
160
- - **Live demos** [a navigation graph](http://www.gesos.cz/chain-demo.html) · [a morph in production](http://www.gesos.cz/morph.html)
161
- - **Built with it** [blue70.cz](https://www.blue70.cz) · [sls3.cz](https://www.sls3.cz) · [gesos.cz](http://www.gesos.cz) · [relays.app](https://relays.app)
162
- - **Releases** [changelog and release notes](https://github.com/nodalityjs/nodality/releases)
159
+ - **Docs** [nodalityjs.github.io](https://nodalityjs.github.io/)
160
+ - **Live demos** [a navigation graph](http://www.gesos.cz/chain-demo.html) · [a morph in production](http://www.gesos.cz/morph.html)
161
+ - **Built with it** [blue70.cz](https://www.blue70.cz) · [sls3.cz](https://www.sls3.cz) · [gesos.cz](http://www.gesos.cz) · [relays.app](https://relays.app)
162
+ - **Releases** [changelog and release notes](https://github.com/nodalityjs/nodality/releases)
163
163
 
164
164
  MIT © Filip Vabroušek
@@ -87,8 +87,14 @@ const NODES_SCHEMA = {
87
87
  "wins outright — node-level `from`/`to` are not read beside it. " +
88
88
  "Nothing in N names a component; the two arrays meet only through " +
89
89
  "`target`, `from` and `to`, each of which names an element id, written " +
90
- "either bare (\"work\") or in selector form (\"#work\"). Call list_ops " +
91
- "first for the exact vocabulary.",
90
+ "either bare (\"work\") or in selector form (\"#work\"). A fourth family, " +
91
+ "`{ op: \"agent-surface\", name, forms, exclude }`, exposes the page to an AI " +
92
+ "agent as callable tools — traversing the morph graph, submitting a form " +
93
+ "named in `forms`, and reading what is on screen — derived from the pair " +
94
+ "rather than authored separately; it is opt-in, and no form is exposed " +
95
+ "unless listed. Call list_ops first for the exact vocabulary: it returns " +
96
+ "the transition presets a morph's `effect` may name and the element types " +
97
+ "E may use, as well as the raster ops.",
92
98
  items: { type: "object" },
93
99
  };
94
100
 
@@ -102,7 +108,9 @@ const TOOLS = [
102
108
  "(target, by, side, ease...), the driver names, the easing names " +
103
109
  "and the unit names. Read this before writing nodes — it is " +
104
110
  "assembled from the live registry, so it cannot drift from what " +
105
- "the pipeline accepts.",
111
+ "the pipeline accepts. Also returns `presets` (the transition effects a " +
112
+ "morph may name) and `elementTypes` (the vocabulary of E), so both halves " +
113
+ "of the pair are discoverable from one call.",
106
114
  inputSchema: { type: "object", properties: {} },
107
115
  },
108
116
  {
@@ -115,7 +123,12 @@ const TOOLS = [
115
123
  "position — enough to repair without re-reading the docs. Pass " +
116
124
  "elements too and targets are checked against real ids, which " +
117
125
  "catches the other silent failure: a correctly spelled op aimed at " +
118
- "an element that does not exist.",
126
+ "an element that does not exist. Passing elements also validates E " +
127
+ "itself, so an element type that names nothing is reported rather than " +
128
+ "throwing at render time. Where an op is a near miss its parameters are " +
129
+ "checked against the op that was meant and reported with an `assuming` " +
130
+ "field, so one call returns every error rather than revealing them one " +
131
+ "round-trip at a time.",
119
132
  inputSchema: {
120
133
  type: "object",
121
134
  properties: { nodes: NODES_SCHEMA, elements: ELEMENTS_SCHEMA },
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * nodality v1.2.1
2
+ * nodality v1.2.2
3
3
  * (c) 2026 Filip Vabrousek
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * nodality v1.2.1
2
+ * nodality v1.2.2
3
3
  * (c) 2026 Filip Vabrousek
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * nodality v1.2.1
2
+ * nodality v1.2.2
3
3
  * (c) 2026 Filip Vabrousek
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * nodality v1.2.1
2
+ * nodality v1.2.2
3
3
  * (c) 2026 Filip Vabrousek
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * nodality v1.2.1
2
+ * nodality v1.2.2
3
3
  * (c) 2026 Filip Vabrousek
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * nodality v1.2.1
2
+ * nodality v1.2.2
3
3
  * (c) 2026 Filip Vabrousek
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * nodality v1.2.1
2
+ * nodality v1.2.2
3
3
  * (c) 2026 Filip Vabrousek
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * nodality v1.2.1
2
+ * nodality v1.2.2
3
3
  * (c) 2026 Filip Vabrousek
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * nodality v1.2.1
2
+ * nodality v1.2.2
3
3
  * (c) 2026 Filip Vabrousek
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * nodality v1.2.1
2
+ * nodality v1.2.2
3
3
  * (c) 2026 Filip Vabrousek
4
4
  * License: MIT
5
5
  */