nodality 1.4.0 → 1.4.2

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/API.md +39 -20
  2. package/README.md +75 -25
  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.LICENSE.txt +1 -1
  20. package/dist/center.esm.js.LICENSE.txt +1 -1
  21. package/dist/checkbox.cjs.js.LICENSE.txt +1 -1
  22. package/dist/checkbox.esm.js.LICENSE.txt +1 -1
  23. package/dist/code.cjs.js.LICENSE.txt +1 -1
  24. package/dist/code.esm.js.LICENSE.txt +1 -1
  25. package/dist/container.cjs.js.LICENSE.txt +1 -1
  26. package/dist/container.esm.js.LICENSE.txt +1 -1
  27. package/dist/data-list.cjs.js.LICENSE.txt +1 -1
  28. package/dist/data-list.esm.js.LICENSE.txt +1 -1
  29. package/dist/designer.cjs.js +1 -1
  30. package/dist/designer.cjs.js.LICENSE.txt +1 -1
  31. package/dist/designer.esm.js +1 -1
  32. package/dist/designer.esm.js.LICENSE.txt +1 -1
  33. package/dist/element-mapper.cjs.js.LICENSE.txt +1 -1
  34. package/dist/element-mapper.esm.js.LICENSE.txt +1 -1
  35. package/dist/finalresult.esm.js +1 -1
  36. package/dist/finalresult.esm.js.LICENSE.txt +1 -1
  37. package/dist/flex-card.cjs.js.LICENSE.txt +1 -1
  38. package/dist/flex-card.esm.js.LICENSE.txt +1 -1
  39. package/dist/flex-grid.cjs.js.LICENSE.txt +1 -1
  40. package/dist/flex-grid.esm.js.LICENSE.txt +1 -1
  41. package/dist/flex-row.cjs.js.LICENSE.txt +1 -1
  42. package/dist/flex-row.esm.js.LICENSE.txt +1 -1
  43. package/dist/floating-input.cjs.js.LICENSE.txt +1 -1
  44. package/dist/floating-input.esm.js.LICENSE.txt +1 -1
  45. package/dist/free.cjs.js.LICENSE.txt +1 -1
  46. package/dist/free.esm.js.LICENSE.txt +1 -1
  47. package/dist/horizontal-scroller.cjs.js.LICENSE.txt +1 -1
  48. package/dist/horizontal-scroller.esm.js.LICENSE.txt +1 -1
  49. package/dist/image-picker.cjs.js.LICENSE.txt +1 -1
  50. package/dist/image-picker.esm.js.LICENSE.txt +1 -1
  51. package/dist/image.cjs.js.LICENSE.txt +1 -1
  52. package/dist/image.esm.js.LICENSE.txt +1 -1
  53. package/dist/index.cjs.js +1 -1
  54. package/dist/index.cjs.js.LICENSE.txt +1 -1
  55. package/dist/index.d.ts +1 -1
  56. package/dist/index.esm.js +1 -1
  57. package/dist/index.esm.js.LICENSE.txt +1 -1
  58. package/dist/keyframe-animation.cjs.js.LICENSE.txt +1 -1
  59. package/dist/keyframe-animation.esm.js.LICENSE.txt +1 -1
  60. package/dist/link-getter.cjs.js.LICENSE.txt +1 -1
  61. package/dist/link-getter.esm.js.LICENSE.txt +1 -1
  62. package/dist/link.cjs.js.LICENSE.txt +1 -1
  63. package/dist/link.esm.js.LICENSE.txt +1 -1
  64. package/dist/meta-adder.cjs.js.LICENSE.txt +1 -1
  65. package/dist/meta-adder.esm.js.LICENSE.txt +1 -1
  66. package/dist/modal-2025.cjs.js.LICENSE.txt +1 -1
  67. package/dist/modal-2025.esm.js.LICENSE.txt +1 -1
  68. package/dist/multiswitcher.cjs.js.LICENSE.txt +1 -1
  69. package/dist/multiswitcher.esm.js.LICENSE.txt +1 -1
  70. package/dist/new-nav-bar.cjs.js.LICENSE.txt +1 -1
  71. package/dist/new-nav-bar.esm.js.LICENSE.txt +1 -1
  72. package/dist/picker.cjs.js.LICENSE.txt +1 -1
  73. package/dist/picker.esm.js.LICENSE.txt +1 -1
  74. package/dist/progress.cjs.js.LICENSE.txt +1 -1
  75. package/dist/progress.esm.js.LICENSE.txt +1 -1
  76. package/dist/radio.cjs.js.LICENSE.txt +1 -1
  77. package/dist/radio.esm.js.LICENSE.txt +1 -1
  78. package/dist/range.cjs.js.LICENSE.txt +1 -1
  79. package/dist/range.esm.js.LICENSE.txt +1 -1
  80. package/dist/scroll-video.cjs.js.LICENSE.txt +1 -1
  81. package/dist/scroll-video.esm.js.LICENSE.txt +1 -1
  82. package/dist/side-bar.cjs.js.LICENSE.txt +1 -1
  83. package/dist/side-bar.esm.js.LICENSE.txt +1 -1
  84. package/dist/side-nav-bar.cjs.js.LICENSE.txt +1 -1
  85. package/dist/side-nav-bar.esm.js.LICENSE.txt +1 -1
  86. package/dist/simple-bar.cjs.js.LICENSE.txt +1 -1
  87. package/dist/simple-bar.esm.js.LICENSE.txt +1 -1
  88. package/dist/slider-2025.cjs.js.LICENSE.txt +1 -1
  89. package/dist/slider-2025.esm.js.LICENSE.txt +1 -1
  90. package/dist/spacer.cjs.js.LICENSE.txt +1 -1
  91. package/dist/spacer.esm.js.LICENSE.txt +1 -1
  92. package/dist/stack.cjs.js.LICENSE.txt +1 -1
  93. package/dist/stack.esm.js.LICENSE.txt +1 -1
  94. package/dist/stacker.cjs.js.LICENSE.txt +1 -1
  95. package/dist/stacker.esm.js.LICENSE.txt +1 -1
  96. package/dist/table.cjs.js.LICENSE.txt +1 -1
  97. package/dist/table.esm.js.LICENSE.txt +1 -1
  98. package/dist/text-field.cjs.js.LICENSE.txt +1 -1
  99. package/dist/text-field.esm.js.LICENSE.txt +1 -1
  100. package/dist/text.cjs.js.LICENSE.txt +1 -1
  101. package/dist/text.esm.js.LICENSE.txt +1 -1
  102. package/dist/theme.cjs.js.LICENSE.txt +1 -1
  103. package/dist/theme.esm.js.LICENSE.txt +1 -1
  104. package/dist/transform-anim.cjs.js.LICENSE.txt +1 -1
  105. package/dist/transform-anim.esm.js.LICENSE.txt +1 -1
  106. package/dist/ulist.cjs.js.LICENSE.txt +1 -1
  107. package/dist/ulist.esm.js.LICENSE.txt +1 -1
  108. package/dist/video.cjs.js.LICENSE.txt +1 -1
  109. package/dist/video.esm.js.LICENSE.txt +1 -1
  110. package/dist/wrap.cjs.js.LICENSE.txt +1 -1
  111. package/dist/wrap.esm.js.LICENSE.txt +1 -1
  112. package/dist/zoom-card.cjs.js.LICENSE.txt +1 -1
  113. package/dist/zoom-card.esm.js.LICENSE.txt +1 -1
  114. package/layout/animator.js +1 -1
  115. package/layout/audio.js +1 -1
  116. package/layout/audionew.js +1 -1
  117. package/layout/base.js +1 -1
  118. package/layout/beta-desktop-bar.js +1 -1
  119. package/layout/beta-mobile-bar.js +1 -1
  120. package/layout/button.js +1 -1
  121. package/layout/center.js +1 -1
  122. package/layout/checkbox.js +1 -1
  123. package/layout/circle.js +1 -1
  124. package/layout/code.js +1 -1
  125. package/layout/container.js +1 -1
  126. package/layout/dropdown-2025.js +1 -1
  127. package/layout/flex-card.js +1 -1
  128. package/layout/flex-grid.js +1 -1
  129. package/layout/flex-row.js +1 -1
  130. package/layout/form-components/custom.js +1 -1
  131. package/layout/form-components/data-list.js +1 -1
  132. package/layout/form-components/floating-input.js +1 -1
  133. package/layout/form-components/form-all.js +1 -1
  134. package/layout/form-components/form.js +1 -1
  135. package/layout/form-components/image-picker.js +1 -1
  136. package/layout/form-components/picker.js +1 -1
  137. package/layout/form-components/radio.js +1 -1
  138. package/layout/form-components/radiogroup.js +1 -1
  139. package/layout/form-components/range.js +1 -1
  140. package/layout/free.js +1 -1
  141. package/layout/grid-overlay.js +1 -1
  142. package/layout/grid-switcher.js +1 -1
  143. package/layout/grid.js +1 -1
  144. package/layout/horizontal-scroller.js +1 -1
  145. package/layout/image.js +1 -1
  146. package/layout/index.js +1 -1
  147. package/layout/link.js +1 -1
  148. package/layout/list.js +1 -1
  149. package/layout/meta-adder.js +1 -1
  150. package/layout/modal-2025.js +1 -1
  151. package/layout/morph.js +1 -1
  152. package/layout/multiswitcher.js +1 -1
  153. package/layout/nav-bar.js +1 -1
  154. package/layout/nav-factor/custom-div.js +1 -1
  155. package/layout/new-nav-bar.js +1 -1
  156. package/layout/polygon.js +1 -1
  157. package/layout/prerender-site.js +1 -1
  158. package/layout/prerender.js +1 -1
  159. package/layout/progress.js +1 -1
  160. package/layout/row.js +1 -1
  161. package/layout/scroll-video.js +1 -1
  162. package/layout/shop.js +1 -1
  163. package/layout/side-bar.js +1 -1
  164. package/layout/side-nav-bar.js +1 -1
  165. package/layout/simple-bar.js +1 -1
  166. package/layout/slider-2025.js +1 -1
  167. package/layout/spacer.js +1 -1
  168. package/layout/stack.js +1 -1
  169. package/layout/svg.js +1 -1
  170. package/layout/switcher.js +1 -1
  171. package/layout/table.js +1 -1
  172. package/layout/text-field.js +1 -1
  173. package/layout/text.js +1 -1
  174. package/layout/ulist.js +1 -1
  175. package/layout/video.js +1 -1
  176. package/layout/wrap.js +1 -1
  177. package/layout/zoom-card.js +1 -1
  178. package/lib/agent-surface.js +1 -1
  179. package/lib/card-getter.js +1 -1
  180. package/lib/check-page.js +1 -1
  181. package/lib/codegen.js +1 -1
  182. package/lib/data.js +1 -1
  183. package/lib/designer.js +1 -1
  184. package/lib/element-mapper.js +1 -1
  185. package/lib/element-params.generated.js +1 -1
  186. package/lib/grid-geometry.js +1 -1
  187. package/lib/keyframe-animation.js +1 -1
  188. package/lib/known-inert.js +1 -1
  189. package/lib/link-getter.js +1 -1
  190. package/lib/morph-node.js +10 -3
  191. package/lib/normalize-spec.js +1 -1
  192. package/lib/parse-html.js +1 -1
  193. package/lib/raster-inspect.js +1 -1
  194. package/lib/raster-ops.js +1 -1
  195. package/lib/raster-presets.js +1 -1
  196. package/lib/react.js +1 -1
  197. package/lib/resolve-refs.js +1 -1
  198. package/lib/responsive.js +1 -1
  199. package/lib/scroll-video.js +1 -1
  200. package/lib/seo.js +1 -1
  201. package/lib/stacker.js +1 -1
  202. package/lib/suggest.js +1 -1
  203. package/lib/theme.js +1 -1
  204. package/lib/transform-anim.js +1 -1
  205. package/lib/transition.js +1 -1
  206. package/lib/validate-nodes.js +1 -1
  207. package/lib/view-transition.js +1 -1
  208. package/lib/webmcp-adapter.js +57 -5
  209. package/package.json +11 -3
package/API.md CHANGED
@@ -28,8 +28,25 @@ new Des()
28
28
  Full documentation: https://nodalityjs.github.io
29
29
  Machine-readable index: https://nodalityjs.github.io/llms.txt
30
30
 
31
+ ## For coding agents
32
+
33
+ Read the vocabulary instead of guessing it: `npx nodality mcp` serves
34
+ `list_ops` (nodes) and `get_schema` (elements), and `validate_nodes`
35
+ checks a pair before it renders. Without MCP: `schema.json` next to this
36
+ file, and `validateNodes` from `nodality/validate`.
37
+ Guide: https://nodalityjs.github.io/docs/agents/start
38
+
31
39
  ## Pages
32
40
 
41
+ ### agents
42
+
43
+ - **Agents – getting started** — Nodality is written by people and by coding agents.
44
+ https://nodalityjs.github.io/docs/agents/start
45
+ - **MCP tools** — `npx nodality mcp` runs a Model Context Protocol server over stdio with six tools.
46
+ https://nodalityjs.github.io/docs/agents/tools
47
+ - **Validation** — A misspelled op does not throw – it renders nothing.
48
+ https://nodalityjs.github.io/docs/agents/validation
49
+
33
50
  ### api
34
51
 
35
52
  - **Button** — `button.js`
@@ -63,7 +80,7 @@ Machine-readable index: https://nodalityjs.github.io/llms.txt
63
80
  https://nodalityjs.github.io/docs/basics/animation
64
81
  - **CDN** — To use Nodality with CDN, use this code:
65
82
  https://nodalityjs.github.io/docs/basics/cdn
66
- - **Custom elements** — To create a custom element using Nodality library, you extend the class.
83
+ - **Custom elements** — To create a custom element using Nodality library, you extend the `Base` class.
67
84
  https://nodalityjs.github.io/docs/basics/customElements
68
85
  - **Designer** — Designer instance accepts nodes and elements arrays.
69
86
  https://nodalityjs.github.io/docs/basics/designer
@@ -74,11 +91,11 @@ Machine-readable index: https://nodalityjs.github.io/llms.txt
74
91
 
75
92
  ### elements
76
93
 
77
- - **Card** — Create elements containing , and elements.
94
+ - **Card** — Create `Card` elements containing `Image`, `Text` and `Link` elements.
78
95
  https://nodalityjs.github.io/docs/elements/cards
79
- - **Circle** — You can use the element to display a simple circle.
96
+ - **Circle** — You can use the `circle` element to display a simple circle.
80
97
  https://nodalityjs.github.io/docs/elements/circle
81
- - **Code** — You can use the element to display a block of code.
98
+ - **Code** — You can use the `code` element to display a block of code.
82
99
  https://nodalityjs.github.io/docs/elements/code
83
100
  - **Dropdown** — Dropdown is used to create expand area upon click or hover.
84
101
  https://nodalityjs.github.io/docs/elements/dropdown
@@ -86,7 +103,7 @@ Machine-readable index: https://nodalityjs.github.io/llms.txt
86
103
  https://nodalityjs.github.io/docs/elements/free
87
104
  - **AreaGrid** — The `grid` creates an instance of the `AreaGrid` element, designed to organize child elements in a grid layout.
88
105
  https://nodalityjs.github.io/docs/elements/grid
89
- - **HScroller** — You can use the to make a horizontally scrolling gallery.
106
+ - **HScroller** — You can use the `HScroller` to make a horizontally scrolling gallery.
90
107
  https://nodalityjs.github.io/docs/elements/hscroller
91
108
  - **Image** — Image allows you to create simple image
92
109
  https://nodalityjs.github.io/docs/elements/image
@@ -96,11 +113,11 @@ Machine-readable index: https://nodalityjs.github.io/llms.txt
96
113
  https://nodalityjs.github.io/docs/elements/link
97
114
  - **Modal** — To create a simple modal.
98
115
  https://nodalityjs.github.io/docs/elements/modal
99
- - **Navigation** — To create a simple navigation use element
116
+ - **Navigation** — To create a site navigation use the `nav` element.
100
117
  https://nodalityjs.github.io/docs/elements/navigation
101
- - **Offcanvas** — To create a simple navigation use element.
118
+ - **Offcanvas** — To create a simple navigation use `sideNav` element.
102
119
  https://nodalityjs.github.io/docs/elements/offcanvas
103
- - **Polygon** — You can use the element to display a block of code.
120
+ - **Polygon** — You can use the `polygon` element to display a block of code.
104
121
  https://nodalityjs.github.io/docs/elements/polygon
105
122
  - **Elements** — Elements are used to create UI.
106
123
  https://nodalityjs.github.io/docs/elements/readme
@@ -108,13 +125,13 @@ Machine-readable index: https://nodalityjs.github.io/llms.txt
108
125
  https://nodalityjs.github.io/docs/elements/responsive-wrapper
109
126
  - **Complex** — The `Wrapper` class allows you to create a responsive element that can dynamically switch its layout between row and column orientations based on specified…
110
127
  https://nodalityjs.github.io/docs/elements/responsive
111
- - **Row** — Row creates a simple element to allow you to organise children in a row.
128
+ - **Row** — Row creates a simple `FlexRow` element to allow you to organise children in a row.
112
129
  https://nodalityjs.github.io/docs/elements/row
113
- - **SideNavigation** — To create side navigation use the structure.
130
+ - **SideNavigation** — To create side navigation use the `SideNav` structure.
114
131
  https://nodalityjs.github.io/docs/elements/sidenavigation
115
- - **Slider** — To create a simple slider, use structure
132
+ - **Slider** — To create a simple slider, use `slider` structure
116
133
  https://nodalityjs.github.io/docs/elements/slider
117
- - **Stack** — To create a simple stack, use object.
134
+ - **Stack** — To create a simple stack, use `stack` object.
118
135
  https://nodalityjs.github.io/docs/elements/stack
119
136
  - **Switcher** — Switcher allows you to display different views at different breakpoints.
120
137
  https://nodalityjs.github.io/docs/elements/switcher
@@ -122,13 +139,13 @@ Machine-readable index: https://nodalityjs.github.io/llms.txt
122
139
  https://nodalityjs.github.io/docs/elements/table
123
140
  - **Text** — Headers are used to display text.
124
141
  https://nodalityjs.github.io/docs/elements/text
125
- - **UList** — You can use the element to display a list of items.
142
+ - **UList** — You can use the `UList` element to display a list of items.
126
143
  https://nodalityjs.github.io/docs/elements/ulist
127
- - **WeightLayout** — WeightLayout allows you to create flexible layout using attraction weights inside element.
144
+ - **WeightLayout** — WeightLayout allows you to create flexible layout using attraction weights inside `Free` element.
128
145
  https://nodalityjs.github.io/docs/elements/weightLayout
129
146
  - **Wrap** — Creates a simple wrapper that wraps other elements.
130
147
  https://nodalityjs.github.io/docs/elements/wrap
131
- - **ZoomCard** — To use image as background for the entire card use the element with a background.
148
+ - **ZoomCard** — To use image as background for the entire card use the `ZoomCard` element with a background.
132
149
  https://nodalityjs.github.io/docs/elements/zoom-card
133
150
 
134
151
  ### forms
@@ -143,13 +160,13 @@ Machine-readable index: https://nodalityjs.github.io/llms.txt
143
160
  https://nodalityjs.github.io/docs/forms/filepicker
144
161
  - **LabelField** — LabelField allows you to create textfield that turns placeholder text into a label.
145
162
  https://nodalityjs.github.io/docs/forms/labelfield
146
- - **Picker** — To create the picker, use the the delcaration in the elements array.
163
+ - **Picker** — To create the picker, use the the `picker` delcaration in the elements array.
147
164
  https://nodalityjs.github.io/docs/forms/picker
148
165
  - **Radio** — The `radio` element creates a group of radio buttons for user selection.
149
166
  https://nodalityjs.github.io/docs/forms/radio
150
167
  - **Basics** — You can create forms easily with this library.
151
168
  https://nodalityjs.github.io/docs/forms/readme
152
- - **TextField** — To create a simple textfield, use the element.
169
+ - **TextField** — To create a simple textfield, use the `input` element.
153
170
  https://nodalityjs.github.io/docs/forms/textfield
154
171
  - **Usage with PHP** — You can use the form with PHP.
155
172
  https://nodalityjs.github.io/docs/forms/usewithphp
@@ -173,6 +190,8 @@ Machine-readable index: https://nodalityjs.github.io/llms.txt
173
190
 
174
191
  - **Animation** — Animation allows you to animate elements.
175
192
  https://nodalityjs.github.io/docs/nodes/animation
193
+ - **Responsive – breakpoints from content** — A row of three headings fits side by side on a laptop and overflows on a phone.
194
+ https://nodalityjs.github.io/docs/nodes/arrange
176
195
  - **Blast** — Blast allows user to create outline around element contents.
177
196
  https://nodalityjs.github.io/docs/nodes/blast
178
197
  - **Copy** — To use the copy operation, we use these nodes:
@@ -183,11 +202,11 @@ Machine-readable index: https://nodalityjs.github.io/llms.txt
183
202
  https://nodalityjs.github.io/docs/nodes/gradient
184
203
  - **Layout** — To quickly generate common layout variation, we can use the following:
185
204
  https://nodalityjs.github.io/docs/nodes/layout
186
- - **LinkStyle** — Link style operation allows you to style links ( elements.).
205
+ - **LinkStyle** — Link style operation allows you to style links (`<a>` elements.).
187
206
  https://nodalityjs.github.io/docs/nodes/linkStyle
188
207
  - **Nodes** — Nodes allow you to edit design of the elements.
189
208
  https://nodalityjs.github.io/docs/nodes/nodes
190
- - **Shadow** — To use the default shadow, we use the op.
209
+ - **Shadow** — To use the default shadow, we use the `shadow` op.
191
210
  https://nodalityjs.github.io/docs/nodes/shadow
192
211
  - **Span** — Span is a part of text that can have different contents and design from the rest of your text.
193
212
  https://nodalityjs.github.io/docs/nodes/span
@@ -215,7 +234,7 @@ Machine-readable index: https://nodalityjs.github.io/llms.txt
215
234
  https://nodalityjs.github.io/docs/scrollanimation/index
216
235
  - **ScrollVideo** — Play video as you scroll.
217
236
  https://nodalityjs.github.io/docs/scrollanimation/scrollvideo
218
- - **Together** — Here is how you can combine the elements using the element.
237
+ - **Together** — Here is how you can combine the elements using the `Stacker` element.
219
238
  https://nodalityjs.github.io/docs/scrollanimation/together
220
239
  - **TransformAnimation** — Transform element as you scroll down.
221
240
  https://nodalityjs.github.io/docs/scrollanimation/transformanimation
package/README.md CHANGED
@@ -1,12 +1,18 @@
1
- <h1 align="center">Nodality</h1>
1
+ <h1>Nodality</h1>
2
2
 
3
- <p align="center">
4
- <strong>A user interface is two arrays: what exists, and what is done to it.</strong><br>
3
+ <h3>
4
+ A user interface is two arrays: what exists, and what is done to it.<br>
5
+ Built for agents and people alike.
6
+ </h3>
7
+
8
+ <p>
5
9
  Both are plain data – so the pipeline that builds your page is inspectable,
6
- diffable, and executable at build time <em>and</em> in the browser.
10
+ diffable, and executable at build time and in the browser.<br>
11
+ Plain data is also what a coding agent writes well, and what a validator
12
+ can check before anything renders.
7
13
  </p>
8
14
 
9
- <p align="center">
15
+ <p>
10
16
  <a href="https://www.npmjs.com/package/nodality"><img alt="npm" src="https://img.shields.io/npm/v/nodality?color=0f53a8"></a>
11
17
  <img alt="dependencies" src="https://img.shields.io/badge/dependencies-0-0f53a8">
12
18
  <a href="https://github.com/nodalityjs/nodality/blob/main/LICENSE"><img alt="license" src="https://img.shields.io/npm/l/nodality?color=0f53a8"></a>
@@ -106,18 +112,22 @@ whole chain, with per-edge effects, history-based `back`, and two capture
106
112
  backends chosen automatically.
107
113
  [Docs →](https://nodalityjs.github.io/docs/raster/morph/)
108
114
 
115
+ **Breakpoints from content** *(experimental)*. Instead of guessing device
116
+ widths, `respond()` from `nodality/responsive` measures each row, card grid
117
+ and nav in a browser and switches it exactly where its content stops
118
+ fitting – emitted as ordinary `arrange` nodes you can read and edit.
119
+ [Docs →](https://nodalityjs.github.io/docs/nodes/arrange/)
120
+
109
121
  **Composable GPU effects.** Fifteen first-party raster ops, driveable by
110
122
  pointer, scroll or time, composed into one pass.
111
123
  [Docs →](https://nodalityjs.github.io/docs/raster/ops/)
112
124
 
113
- **An agent-operable surface, derived.** One node exposes your page to an
114
- AI agent as callable tools – traversing views, submitting a form you
115
- allowed, reading what is on screen – derived from the graph you already
116
- wrote rather than authored a second time, and also written into the
117
- prerendered HTML as a static manifest.
118
- [Docs →](https://nodalityjs.github.io/docs/raster/agent-surface/)
125
+ ## Built for agents
119
126
 
120
- ## For AI agents
127
+ Nodality is written by people and by coding agents, and a page can be
128
+ operated by an agent once it is built. Both use the same `(E, N)` pair.
129
+
130
+ ### Agents that write pages
121
131
 
122
132
  One command sets up an agent IDE end to end:
123
133
 
@@ -132,28 +142,60 @@ the MCP server below in the project's config. Flags: `--claude`,
132
142
  `--cursor`, `--global`, `--dir=<path>` for any other agent, `--no-mcp`.
133
143
  Re-run it after upgrading nodality to refresh the skill in place.
134
144
 
135
- `nodality mcp` runs a Model Context Protocol server over stdio, so a
136
- generator writes against the real vocabulary instead of guessing at it:
145
+ `nodality mcp` runs a Model Context Protocol server over stdio, so an
146
+ agent writes against the real vocabulary instead of guessing at it:
137
147
 
138
148
  ```json
139
149
  { "mcpServers": { "nodality": { "command": "npx", "args": ["nodality", "mcp"] } } }
140
150
  ```
141
151
 
142
- Three tools. `list_ops` returns the op registry as data – every op with
143
- its stage, parameters, units and defaults. `validate_nodes` checks a node
144
- array and returns a machine-readable report with did-you-mean
145
- suggestions, so `{ op: "dithr" }` comes back as `UNKNOWN_OP` suggesting
146
- `dither` rather than rendering nothing at all. `preview` renders an
147
- `(E, N)` pair to a self-contained HTML file (needs `jsdom` in your
148
- project; it is required only for prerendering, so the library does not
149
- bundle it).
150
-
151
- The validator is available directly too:
152
+ | Tool | What it returns |
153
+ |---|---|
154
+ | `list_ops` | The vocabulary of `N` as data: every op with its stage, parameters, units and defaults, plus the transition presets and the element types. Built from the live registry, so it cannot drift. |
155
+ | `get_schema` | One element type's parameters, on demand – the vocabulary of `E`. Ask for the type you are about to write instead of carrying the whole schema in context. |
156
+ | `validate_nodes` | A machine-readable report for a node array (and its elements): a code, the failing path, the value, did-you-mean suggestions. Never throws. |
157
+ | `preview` | The `(E, N)` pair rendered to a self-contained HTML file through the build-time prerenderer. |
158
+ | `check_page` | What the rendered page actually does, at a phone and a desktop width: overflow, clipped text, missing alt text, small tap targets, contrast, skipped headings. Facts, not taste. |
159
+ | `parse_html` | A rendered page read back into an `E` array, so a page can be edited rather than regenerated. |
160
+
161
+ Together they close a generate → check → repair loop: `{ op: "dithr" }`
162
+ comes back as `UNKNOWN_OP` suggesting `dither` rather than rendering
163
+ nothing at all, and content placed in the wrong slot of a composite comes
164
+ back as `WRONG_CONTENT_SLOT` rather than as placeholder cards. The
165
+ validator and the page checker are available without MCP too:
152
166
 
153
167
  ```js
154
168
  import { validateNodes, describeOps } from "nodality/validate";
169
+ import { checkPage } from "nodality/check"; // needs Playwright in your project
155
170
  ```
156
171
 
172
+ `schema.json` and `API.md` ship inside the package, so an agent reading
173
+ `node_modules/nodality/` has the vocabulary without fetching a website,
174
+ and [`llms.txt`](https://nodalityjs.github.io/llms.txt) indexes the docs.
175
+
176
+ **What this buys, measured.** On 24 UI briefs, the same model (Claude
177
+ Sonnet 5) writing Nodality instead of React with Tailwind produced a
178
+ layout or accessibility defect on 1 page against 6, and React needed a
179
+ median of 2.1–4.2× as many output tokens, depending on how the
180
+ specification is serialised. With one repair turn using only the
181
+ library's own reports, two models reached 24 of 24 defect-free pages.
182
+ Method and limits are in the FLLM 2026 paper (see [Citing](#citing)).
183
+
184
+ ### Agents that use pages
185
+
186
+ One node exposes a finished page to an AI agent as callable tools –
187
+ moving between views, submitting a form you allowed, reading what is on
188
+ screen – derived from the graph you already wrote rather than authored a
189
+ second time, and also written into the prerendered HTML as a static
190
+ manifest. It is opt-in: no node, no surface, and no form is exposed
191
+ unless you name it.
192
+
193
+ ```js
194
+ { op: "agent-surface", name: "studio", forms: ["contact-form"] }
195
+ ```
196
+
197
+ [Docs →](https://nodalityjs.github.io/docs/raster/agent-surface/)
198
+
157
199
  ## What this is not
158
200
 
159
201
  Nodality targets **static, content-shaped sites** – marketing pages,
@@ -198,7 +240,10 @@ The published measurements were produced on Node.js v25.6.0.
198
240
  | `layout/` | Element definitions — the *what exists* half of the pair. |
199
241
  | `lib/` | Transformation nodes and the pipeline — the *what is done to it* half. |
200
242
  | `dist/` | Built bundles: `index.cjs.js` (CommonJS), `index.esm.js` (ES module), `index.d.ts`. |
201
- | `bin/` | The command-line entry points, including `prerender`. |
243
+ | `bin/` | The command-line entry points: `prerender`, `skill` (agent setup) and `mcp` (the MCP server). |
244
+ | `skills/` | The `/nodality` agent skill that `npx nodality skill` installs. |
245
+ | `schema.json` | The element schema, generated from the source – what `get_schema` serves. |
246
+ | `evals/` | The 24 UI briefs, cached agent generations and the scripts that run, score and repair them. |
202
247
  | `__tests__/` | Playwright regression tests that assert deterministic output. |
203
248
  | `examples/` | Runnable pairs, smallest first. |
204
249
  | `API.md` | Full API reference. |
@@ -238,6 +283,11 @@ repository:
238
283
  > Vabroušek, F. Nodality: a node-based declarative transformation pipeline for
239
284
  > static UI generation. *PeerJ Computer Science*. (Under review.)
240
285
 
286
+ For agent generation (the generate → check → repair loop and the token counts):
287
+
288
+ > Vabroušek, F., Jašek, R., Vala, R. Token-Optimal Declarative UI Generation
289
+ > for AI-Assisted Software Engineering. *IEEE FLLM 2026*. (To appear.)
290
+
241
291
  For the measurements specifically, cite the data deposit:
242
292
 
243
293
  > Vabroušek, F. 2026. *Nodality benchmarks*. Zenodo. DOI 10.5281/zenodo.21610251.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * nodality v1.3.26
2
+ * nodality v1.4.1
3
3
  * (c) 2026 Filip Vabrousek
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * nodality v1.3.26
2
+ * nodality v1.4.1
3
3
  * (c) 2026 Filip Vabrousek
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * nodality v1.3.26
2
+ * nodality v1.4.1
3
3
  * (c) 2026 Filip Vabrousek
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * nodality v1.3.26
2
+ * nodality v1.4.1
3
3
  * (c) 2026 Filip Vabrousek
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * nodality v1.3.26
2
+ * nodality v1.4.1
3
3
  * (c) 2026 Filip Vabrousek
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * nodality v1.3.26
2
+ * nodality v1.4.1
3
3
  * (c) 2026 Filip Vabrousek
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * nodality v1.3.26
2
+ * nodality v1.4.1
3
3
  * (c) 2026 Filip Vabrousek
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * nodality v1.3.26
2
+ * nodality v1.4.1
3
3
  * (c) 2026 Filip Vabrousek
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * nodality v1.3.26
2
+ * nodality v1.4.1
3
3
  * (c) 2026 Filip Vabrousek
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * nodality v1.3.26
2
+ * nodality v1.4.1
3
3
  * (c) 2026 Filip Vabrousek
4
4
  * License: MIT
5
5
  */