nodality 1.2.2 → 1.2.3
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/README.md +15 -15
- package/bin/mcp-server.mjs +17 -4
- 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.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.LICENSE.txt +1 -1
- package/dist/designer.esm.js.LICENSE.txt +1 -1
- package/dist/element-mapper.cjs.js +1 -1
- package/dist/element-mapper.cjs.js.LICENSE.txt +1 -1
- package/dist/element-mapper.esm.js +1 -1
- package/dist/element-mapper.esm.js.LICENSE.txt +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.LICENSE.txt +1 -1
- package/dist/index.d.ts +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-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/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/codegen.js +1 -1
- package/lib/data.js +1 -1
- package/lib/designer.js +1 -1
- package/lib/element-mapper.js +7 -2
- package/lib/keyframe-animation.js +1 -1
- package/lib/link-getter.js +1 -1
- package/lib/morph-node.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/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 +75 -4
- package/lib/webmcp-adapter.js +1 -1
- 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
|
|
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**
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
114
|
-
allowed, reading what is on screen
|
|
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
|
|
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**
|
|
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
|
|
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**
|
|
160
|
-
- **Live demos**
|
|
161
|
-
- **Built with it**
|
|
162
|
-
- **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
|
package/bin/mcp-server.mjs
CHANGED
|
@@ -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\").
|
|
91
|
-
"
|
|
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 },
|