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.
- package/API.md +39 -20
- package/README.md +75 -25
- package/dist/animator.cjs.js.LICENSE.txt +1 -1
- package/dist/animator.esm.js.LICENSE.txt +1 -1
- package/dist/audionew.cjs.js.LICENSE.txt +1 -1
- package/dist/audionew.esm.js.LICENSE.txt +1 -1
- package/dist/base.cjs.js.LICENSE.txt +1 -1
- package/dist/base.esm.js.LICENSE.txt +1 -1
- package/dist/beta-desktop-bar.cjs.js.LICENSE.txt +1 -1
- package/dist/beta-desktop-bar.esm.js.LICENSE.txt +1 -1
- package/dist/beta-mobile-bar.cjs.js.LICENSE.txt +1 -1
- package/dist/beta-mobile-bar.esm.js.LICENSE.txt +1 -1
- package/dist/bundle.umd.js +1 -1
- package/dist/bundle.umd.js.LICENSE.txt +1 -1
- package/dist/button.cjs.js.LICENSE.txt +1 -1
- package/dist/button.esm.js.LICENSE.txt +1 -1
- package/dist/card-getter.cjs.js.LICENSE.txt +1 -1
- package/dist/card-getter.esm.js.LICENSE.txt +1 -1
- package/dist/center.cjs.js.LICENSE.txt +1 -1
- package/dist/center.esm.js.LICENSE.txt +1 -1
- package/dist/checkbox.cjs.js.LICENSE.txt +1 -1
- package/dist/checkbox.esm.js.LICENSE.txt +1 -1
- package/dist/code.cjs.js.LICENSE.txt +1 -1
- package/dist/code.esm.js.LICENSE.txt +1 -1
- package/dist/container.cjs.js.LICENSE.txt +1 -1
- package/dist/container.esm.js.LICENSE.txt +1 -1
- package/dist/data-list.cjs.js.LICENSE.txt +1 -1
- package/dist/data-list.esm.js.LICENSE.txt +1 -1
- package/dist/designer.cjs.js +1 -1
- package/dist/designer.cjs.js.LICENSE.txt +1 -1
- package/dist/designer.esm.js +1 -1
- package/dist/designer.esm.js.LICENSE.txt +1 -1
- package/dist/element-mapper.cjs.js.LICENSE.txt +1 -1
- package/dist/element-mapper.esm.js.LICENSE.txt +1 -1
- package/dist/finalresult.esm.js +1 -1
- package/dist/finalresult.esm.js.LICENSE.txt +1 -1
- package/dist/flex-card.cjs.js.LICENSE.txt +1 -1
- package/dist/flex-card.esm.js.LICENSE.txt +1 -1
- package/dist/flex-grid.cjs.js.LICENSE.txt +1 -1
- package/dist/flex-grid.esm.js.LICENSE.txt +1 -1
- package/dist/flex-row.cjs.js.LICENSE.txt +1 -1
- package/dist/flex-row.esm.js.LICENSE.txt +1 -1
- package/dist/floating-input.cjs.js.LICENSE.txt +1 -1
- package/dist/floating-input.esm.js.LICENSE.txt +1 -1
- package/dist/free.cjs.js.LICENSE.txt +1 -1
- package/dist/free.esm.js.LICENSE.txt +1 -1
- package/dist/horizontal-scroller.cjs.js.LICENSE.txt +1 -1
- package/dist/horizontal-scroller.esm.js.LICENSE.txt +1 -1
- package/dist/image-picker.cjs.js.LICENSE.txt +1 -1
- package/dist/image-picker.esm.js.LICENSE.txt +1 -1
- package/dist/image.cjs.js.LICENSE.txt +1 -1
- package/dist/image.esm.js.LICENSE.txt +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.LICENSE.txt +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.LICENSE.txt +1 -1
- package/dist/keyframe-animation.cjs.js.LICENSE.txt +1 -1
- package/dist/keyframe-animation.esm.js.LICENSE.txt +1 -1
- package/dist/link-getter.cjs.js.LICENSE.txt +1 -1
- package/dist/link-getter.esm.js.LICENSE.txt +1 -1
- package/dist/link.cjs.js.LICENSE.txt +1 -1
- package/dist/link.esm.js.LICENSE.txt +1 -1
- package/dist/meta-adder.cjs.js.LICENSE.txt +1 -1
- package/dist/meta-adder.esm.js.LICENSE.txt +1 -1
- package/dist/modal-2025.cjs.js.LICENSE.txt +1 -1
- package/dist/modal-2025.esm.js.LICENSE.txt +1 -1
- package/dist/multiswitcher.cjs.js.LICENSE.txt +1 -1
- package/dist/multiswitcher.esm.js.LICENSE.txt +1 -1
- package/dist/new-nav-bar.cjs.js.LICENSE.txt +1 -1
- package/dist/new-nav-bar.esm.js.LICENSE.txt +1 -1
- package/dist/picker.cjs.js.LICENSE.txt +1 -1
- package/dist/picker.esm.js.LICENSE.txt +1 -1
- package/dist/progress.cjs.js.LICENSE.txt +1 -1
- package/dist/progress.esm.js.LICENSE.txt +1 -1
- package/dist/radio.cjs.js.LICENSE.txt +1 -1
- package/dist/radio.esm.js.LICENSE.txt +1 -1
- package/dist/range.cjs.js.LICENSE.txt +1 -1
- package/dist/range.esm.js.LICENSE.txt +1 -1
- package/dist/scroll-video.cjs.js.LICENSE.txt +1 -1
- package/dist/scroll-video.esm.js.LICENSE.txt +1 -1
- package/dist/side-bar.cjs.js.LICENSE.txt +1 -1
- package/dist/side-bar.esm.js.LICENSE.txt +1 -1
- package/dist/side-nav-bar.cjs.js.LICENSE.txt +1 -1
- package/dist/side-nav-bar.esm.js.LICENSE.txt +1 -1
- package/dist/simple-bar.cjs.js.LICENSE.txt +1 -1
- package/dist/simple-bar.esm.js.LICENSE.txt +1 -1
- package/dist/slider-2025.cjs.js.LICENSE.txt +1 -1
- package/dist/slider-2025.esm.js.LICENSE.txt +1 -1
- package/dist/spacer.cjs.js.LICENSE.txt +1 -1
- package/dist/spacer.esm.js.LICENSE.txt +1 -1
- package/dist/stack.cjs.js.LICENSE.txt +1 -1
- package/dist/stack.esm.js.LICENSE.txt +1 -1
- package/dist/stacker.cjs.js.LICENSE.txt +1 -1
- package/dist/stacker.esm.js.LICENSE.txt +1 -1
- package/dist/table.cjs.js.LICENSE.txt +1 -1
- package/dist/table.esm.js.LICENSE.txt +1 -1
- package/dist/text-field.cjs.js.LICENSE.txt +1 -1
- package/dist/text-field.esm.js.LICENSE.txt +1 -1
- package/dist/text.cjs.js.LICENSE.txt +1 -1
- package/dist/text.esm.js.LICENSE.txt +1 -1
- package/dist/theme.cjs.js.LICENSE.txt +1 -1
- package/dist/theme.esm.js.LICENSE.txt +1 -1
- package/dist/transform-anim.cjs.js.LICENSE.txt +1 -1
- package/dist/transform-anim.esm.js.LICENSE.txt +1 -1
- package/dist/ulist.cjs.js.LICENSE.txt +1 -1
- package/dist/ulist.esm.js.LICENSE.txt +1 -1
- package/dist/video.cjs.js.LICENSE.txt +1 -1
- package/dist/video.esm.js.LICENSE.txt +1 -1
- package/dist/wrap.cjs.js.LICENSE.txt +1 -1
- package/dist/wrap.esm.js.LICENSE.txt +1 -1
- package/dist/zoom-card.cjs.js.LICENSE.txt +1 -1
- package/dist/zoom-card.esm.js.LICENSE.txt +1 -1
- package/layout/animator.js +1 -1
- package/layout/audio.js +1 -1
- package/layout/audionew.js +1 -1
- package/layout/base.js +1 -1
- package/layout/beta-desktop-bar.js +1 -1
- package/layout/beta-mobile-bar.js +1 -1
- package/layout/button.js +1 -1
- package/layout/center.js +1 -1
- package/layout/checkbox.js +1 -1
- package/layout/circle.js +1 -1
- package/layout/code.js +1 -1
- package/layout/container.js +1 -1
- package/layout/dropdown-2025.js +1 -1
- package/layout/flex-card.js +1 -1
- package/layout/flex-grid.js +1 -1
- package/layout/flex-row.js +1 -1
- package/layout/form-components/custom.js +1 -1
- package/layout/form-components/data-list.js +1 -1
- package/layout/form-components/floating-input.js +1 -1
- package/layout/form-components/form-all.js +1 -1
- package/layout/form-components/form.js +1 -1
- package/layout/form-components/image-picker.js +1 -1
- package/layout/form-components/picker.js +1 -1
- package/layout/form-components/radio.js +1 -1
- package/layout/form-components/radiogroup.js +1 -1
- package/layout/form-components/range.js +1 -1
- package/layout/free.js +1 -1
- package/layout/grid-overlay.js +1 -1
- package/layout/grid-switcher.js +1 -1
- package/layout/grid.js +1 -1
- package/layout/horizontal-scroller.js +1 -1
- package/layout/image.js +1 -1
- package/layout/index.js +1 -1
- package/layout/link.js +1 -1
- package/layout/list.js +1 -1
- package/layout/meta-adder.js +1 -1
- package/layout/modal-2025.js +1 -1
- package/layout/morph.js +1 -1
- package/layout/multiswitcher.js +1 -1
- package/layout/nav-bar.js +1 -1
- package/layout/nav-factor/custom-div.js +1 -1
- package/layout/new-nav-bar.js +1 -1
- package/layout/polygon.js +1 -1
- package/layout/prerender-site.js +1 -1
- package/layout/prerender.js +1 -1
- package/layout/progress.js +1 -1
- package/layout/row.js +1 -1
- package/layout/scroll-video.js +1 -1
- package/layout/shop.js +1 -1
- package/layout/side-bar.js +1 -1
- package/layout/side-nav-bar.js +1 -1
- package/layout/simple-bar.js +1 -1
- package/layout/slider-2025.js +1 -1
- package/layout/spacer.js +1 -1
- package/layout/stack.js +1 -1
- package/layout/svg.js +1 -1
- package/layout/switcher.js +1 -1
- package/layout/table.js +1 -1
- package/layout/text-field.js +1 -1
- package/layout/text.js +1 -1
- package/layout/ulist.js +1 -1
- package/layout/video.js +1 -1
- package/layout/wrap.js +1 -1
- package/layout/zoom-card.js +1 -1
- package/lib/agent-surface.js +1 -1
- package/lib/card-getter.js +1 -1
- package/lib/check-page.js +1 -1
- package/lib/codegen.js +1 -1
- package/lib/data.js +1 -1
- package/lib/designer.js +1 -1
- package/lib/element-mapper.js +1 -1
- package/lib/element-params.generated.js +1 -1
- package/lib/grid-geometry.js +1 -1
- package/lib/keyframe-animation.js +1 -1
- package/lib/known-inert.js +1 -1
- package/lib/link-getter.js +1 -1
- package/lib/morph-node.js +10 -3
- package/lib/normalize-spec.js +1 -1
- package/lib/parse-html.js +1 -1
- package/lib/raster-inspect.js +1 -1
- package/lib/raster-ops.js +1 -1
- package/lib/raster-presets.js +1 -1
- package/lib/react.js +1 -1
- package/lib/resolve-refs.js +1 -1
- package/lib/responsive.js +1 -1
- package/lib/scroll-video.js +1 -1
- package/lib/seo.js +1 -1
- package/lib/stacker.js +1 -1
- package/lib/suggest.js +1 -1
- package/lib/theme.js +1 -1
- package/lib/transform-anim.js +1 -1
- package/lib/transition.js +1 -1
- package/lib/validate-nodes.js +1 -1
- package/lib/view-transition.js +1 -1
- package/lib/webmcp-adapter.js +57 -5
- 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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
1
|
+
<h1>Nodality</h1>
|
|
2
2
|
|
|
3
|
-
<
|
|
4
|
-
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
136
|
-
|
|
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
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
`
|
|
147
|
-
`(E, N)` pair to a self-contained HTML file
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
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
|
|
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.
|