nodality 1.3.24 → 1.3.26
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/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.LICENSE.txt +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-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 +1 -1
- 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.d.ts +30 -0
- package/lib/react.js +173 -0
- package/lib/resolve-refs.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/webmcp-adapter.js +1 -1
- package/package.json +18 -3
package/layout/simple-bar.js
CHANGED
package/layout/slider-2025.js
CHANGED
package/layout/spacer.js
CHANGED
package/layout/stack.js
CHANGED
package/layout/svg.js
CHANGED
package/layout/switcher.js
CHANGED
package/layout/table.js
CHANGED
package/layout/text-field.js
CHANGED
package/layout/text.js
CHANGED
package/layout/ulist.js
CHANGED
package/layout/video.js
CHANGED
package/layout/wrap.js
CHANGED
package/layout/zoom-card.js
CHANGED
package/lib/agent-surface.js
CHANGED
package/lib/card-getter.js
CHANGED
package/lib/check-page.js
CHANGED
package/lib/codegen.js
CHANGED
package/lib/data.js
CHANGED
package/lib/designer.js
CHANGED
package/lib/element-mapper.js
CHANGED
package/lib/grid-geometry.js
CHANGED
package/lib/known-inert.js
CHANGED
package/lib/link-getter.js
CHANGED
package/lib/morph-node.js
CHANGED
package/lib/normalize-spec.js
CHANGED
package/lib/parse-html.js
CHANGED
package/lib/raster-inspect.js
CHANGED
package/lib/raster-ops.js
CHANGED
package/lib/raster-presets.js
CHANGED
package/lib/react.d.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// Types for nodality/react. Hand-written: scripts/generate-types.mjs covers
|
|
2
|
+
// the main bundle (dist/index.d.ts), not the lib/ subpaths.
|
|
3
|
+
|
|
4
|
+
import type { CSSProperties, ReactElement } from "react";
|
|
5
|
+
|
|
6
|
+
/** Anything with Nodality's render(): every component class, e.g. Wrapper or Text. */
|
|
7
|
+
export interface NodalityRenderable {
|
|
8
|
+
render(): Node;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface NodalityProps {
|
|
12
|
+
/** Regime 1 — the specification's elements (E). */
|
|
13
|
+
elements?: Array<Record<string, unknown>>;
|
|
14
|
+
/** Regime 1 — its nodes (N). */
|
|
15
|
+
nodes?: Array<Record<string, unknown>>;
|
|
16
|
+
/** Regime 1 — definitions, passed to Des.defs(). */
|
|
17
|
+
defs?: Record<string, unknown>;
|
|
18
|
+
/**
|
|
19
|
+
* Regime 2 — a factory returning a Nodality component. A factory rather than
|
|
20
|
+
* an instance so it is not rebuilt on every parent render; client-side only.
|
|
21
|
+
*/
|
|
22
|
+
view?: () => NodalityRenderable;
|
|
23
|
+
/** When to rebuild `view` — same meaning as useEffect's dependency array. */
|
|
24
|
+
deps?: ReadonlyArray<unknown>;
|
|
25
|
+
className?: string;
|
|
26
|
+
style?: CSSProperties;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export declare function Nodality(props: NodalityProps): ReactElement;
|
|
30
|
+
export default Nodality;
|
package/lib/react.js
ADDED
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* nodality v1.3.26
|
|
3
|
+
* (c) 2026 Filip Vabrousek
|
|
4
|
+
* License: MIT
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
"use client";
|
|
8
|
+
|
|
9
|
+
/*!
|
|
10
|
+
* nodality/react — host a Nodality render inside a React tree.
|
|
11
|
+
*
|
|
12
|
+
* import Nodality from "nodality/react";
|
|
13
|
+
*
|
|
14
|
+
* <Nodality elements={E} nodes={N} /> // a specification
|
|
15
|
+
* <Nodality view={() => new Wrapper()...} deps={[x]} /> // component code you own
|
|
16
|
+
*
|
|
17
|
+
* Both of the library's regimes are first-class. The pair is what a
|
|
18
|
+
* generator emits and what the compiler consumes; the component classes are
|
|
19
|
+
* what the compiler EMITS, and what a developer takes ownership of
|
|
20
|
+
* afterwards. A React binding that supported only one of them would be
|
|
21
|
+
* describing half the library.
|
|
22
|
+
*
|
|
23
|
+
* They differ in exactly one respect: only the specification survives the
|
|
24
|
+
* build boundary. A specification is data, so a prerenderer can find it in
|
|
25
|
+
* the page (the <script data-nodality-for> this emits) and render it to HTML
|
|
26
|
+
* at build time. A `view` is a closure over your module graph — it cannot be
|
|
27
|
+
* serialised into the document, so it renders on the client only.
|
|
28
|
+
*
|
|
29
|
+
* Moved here from create-nodality-react's template (src/Nodality.jsx) so
|
|
30
|
+
* every React app imports one maintained copy. The markup it emits is
|
|
31
|
+
* unchanged, so that template's prerender.mjs keeps working.
|
|
32
|
+
*
|
|
33
|
+
* Plain JavaScript rather than JSX: bundlers do not compile JSX inside
|
|
34
|
+
* node_modules. "use client" marks it as a client component for the Next.js
|
|
35
|
+
* App Router; other bundlers ignore it. `Des` comes from "nodality" itself
|
|
36
|
+
* rather than ../layout, so an app that also imports "nodality" loads ONE
|
|
37
|
+
* copy of the library — two copies would mean two Theme singletons and two
|
|
38
|
+
* element registries.
|
|
39
|
+
*
|
|
40
|
+
* React 18 or later (useId). React is an optional peer dependency: nothing
|
|
41
|
+
* else in nodality needs it.
|
|
42
|
+
*/
|
|
43
|
+
|
|
44
|
+
import { createElement, Fragment, useEffect, useId, useMemo, useRef } from "react";
|
|
45
|
+
import { Des } from "nodality";
|
|
46
|
+
|
|
47
|
+
// One object for every render, on purpose. React 19.0–19.2 re-apply
|
|
48
|
+
// dangerouslySetInnerHTML whenever the prop OBJECT differs from the last
|
|
49
|
+
// render's, not its __html string, so a literal `{ __html: "" }` (a new
|
|
50
|
+
// object each time) set innerHTML = "" on every parent re-render and wiped
|
|
51
|
+
// the built view — typing into a field whose value the parent kept in state
|
|
52
|
+
// emptied the whole host, and with `deps` unchanged nothing rebuilt it.
|
|
53
|
+
// React 18 and 19.3+ compare the string, so they never showed it.
|
|
54
|
+
const EMPTY_HTML = Object.freeze({ __html: "" });
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* @param {object} props
|
|
58
|
+
* @param {Array<object>} [props.elements] Regime 1: the specification's elements (E).
|
|
59
|
+
* @param {Array<object>} [props.nodes] Regime 1: its nodes (N).
|
|
60
|
+
* @param {object} [props.defs] Regime 1: definitions, passed to Des.defs().
|
|
61
|
+
* @param {() => {render(): Node}} [props.view]
|
|
62
|
+
* Regime 2: a factory returning a Nodality component. A factory rather
|
|
63
|
+
* than an instance so it is not rebuilt on every parent render.
|
|
64
|
+
* @param {Array<unknown>} [props.deps] When to rebuild `view` — same meaning as useEffect's.
|
|
65
|
+
* @param {string} [props.className]
|
|
66
|
+
* @param {object} [props.style]
|
|
67
|
+
*/
|
|
68
|
+
export function Nodality({
|
|
69
|
+
elements,
|
|
70
|
+
nodes = [],
|
|
71
|
+
defs,
|
|
72
|
+
view,
|
|
73
|
+
deps = [],
|
|
74
|
+
className,
|
|
75
|
+
style,
|
|
76
|
+
}) {
|
|
77
|
+
const host = useRef(null);
|
|
78
|
+
|
|
79
|
+
// Des mounts by CSS selector, and React's useId contains ':' — invalid in a
|
|
80
|
+
// selector. Strip it. useId is stable across server and client, so the id
|
|
81
|
+
// still matches whatever a prerenderer wrote into the document.
|
|
82
|
+
const domId = "nod-" + useId().replace(/:/g, "");
|
|
83
|
+
|
|
84
|
+
// Key the effect on the SPECIFICATION by value, not on prop identity. A
|
|
85
|
+
// parent re-render creates fresh object literals every time; depending on
|
|
86
|
+
// those rebuilt the whole subtree on every keystroke, losing focus, scroll
|
|
87
|
+
// position and animation state.
|
|
88
|
+
const spec = useMemo(
|
|
89
|
+
() => (elements ? JSON.stringify({ elements, nodes, defs }) : null),
|
|
90
|
+
[elements, nodes, defs],
|
|
91
|
+
);
|
|
92
|
+
|
|
93
|
+
// Same problem, different shape: an inline `view={() => …}` is a new
|
|
94
|
+
// function every render. Hold the latest in a ref and rebuild only when the
|
|
95
|
+
// caller's own `deps` say to. Serialised rather than spread, because a
|
|
96
|
+
// dependency array that changes length between renders is a React error.
|
|
97
|
+
const viewRef = useRef(view);
|
|
98
|
+
viewRef.current = view;
|
|
99
|
+
const depsKey = useMemo(() => {
|
|
100
|
+
try { return JSON.stringify(deps); } catch { return String(deps); }
|
|
101
|
+
}, [deps]);
|
|
102
|
+
|
|
103
|
+
useEffect(() => {
|
|
104
|
+
const el = host.current;
|
|
105
|
+
if (!el) return;
|
|
106
|
+
|
|
107
|
+
// Prerendered markup is static: it exists for crawlers and for first
|
|
108
|
+
// paint. The builder still has to run to attach behaviour, so replace it
|
|
109
|
+
// rather than adopt it.
|
|
110
|
+
el.innerHTML = "";
|
|
111
|
+
|
|
112
|
+
if (viewRef.current) {
|
|
113
|
+
// render() with no argument returns a detached node rather than
|
|
114
|
+
// mounting, so nothing escapes this host.
|
|
115
|
+
el.appendChild(viewRef.current().render());
|
|
116
|
+
} else if (elements) {
|
|
117
|
+
const d = new Des();
|
|
118
|
+
if (defs) d.defs(defs);
|
|
119
|
+
d.nodes(nodes)
|
|
120
|
+
.add(elements)
|
|
121
|
+
.set({ mount: "#" + domId, code: false, elements: false, layout: false });
|
|
122
|
+
|
|
123
|
+
// Des.set() appends a <pre> and a <textarea id="elements"> to
|
|
124
|
+
// document.body — the on-page code panel. `code: false` only hides them,
|
|
125
|
+
// so without this every mount leaks two nodes and every instance after
|
|
126
|
+
// the first duplicates id="elements". Reaching for the instance's own
|
|
127
|
+
// handles removes exactly what this render created, rather than querying
|
|
128
|
+
// the page for the first match.
|
|
129
|
+
d._preEl?.remove();
|
|
130
|
+
d._codeEl?.remove();
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
return () => {
|
|
134
|
+
el.innerHTML = "";
|
|
135
|
+
};
|
|
136
|
+
// `spec` and `depsKey` cover the inputs by value; that is the point.
|
|
137
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
138
|
+
}, [spec, depsKey, domId]);
|
|
139
|
+
|
|
140
|
+
return createElement(
|
|
141
|
+
Fragment,
|
|
142
|
+
null,
|
|
143
|
+
// A prerenderer writes HTML into this div AFTER React has rendered it, so
|
|
144
|
+
// React's virtual tree says "empty" while the DOM says otherwise.
|
|
145
|
+
// suppressHydrationWarning is not enough — it covers attributes and text,
|
|
146
|
+
// not extra element children, and hydration fails with React #418/#423
|
|
147
|
+
// and silently re-renders the whole root on the client. An empty
|
|
148
|
+
// dangerouslySetInnerHTML is the documented escape for externally-managed
|
|
149
|
+
// DOM: React stops reconciling this subtree entirely, which is exactly
|
|
150
|
+
// the contract wanted. It also means the built output survives every
|
|
151
|
+
// subsequent React render, since the prop value never changes.
|
|
152
|
+
createElement("div", {
|
|
153
|
+
id: domId,
|
|
154
|
+
ref: host,
|
|
155
|
+
className,
|
|
156
|
+
style,
|
|
157
|
+
suppressHydrationWarning: true,
|
|
158
|
+
dangerouslySetInnerHTML: EMPTY_HTML,
|
|
159
|
+
}),
|
|
160
|
+
// A specification travels with the page so a prerenderer can find it
|
|
161
|
+
// without knowing anything about the app's component tree. A `view` has
|
|
162
|
+
// nothing to emit here — code does not cross the build boundary. '<' is
|
|
163
|
+
// escaped so a string containing </script> cannot close it.
|
|
164
|
+
spec &&
|
|
165
|
+
createElement("script", {
|
|
166
|
+
type: "application/json",
|
|
167
|
+
"data-nodality-for": domId,
|
|
168
|
+
dangerouslySetInnerHTML: { __html: spec.replace(/</g, "\\u003c") },
|
|
169
|
+
}),
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export default Nodality;
|
package/lib/resolve-refs.js
CHANGED
package/lib/scroll-video.js
CHANGED
package/lib/seo.js
CHANGED
package/lib/stacker.js
CHANGED
package/lib/suggest.js
CHANGED
package/lib/theme.js
CHANGED
package/lib/transform-anim.js
CHANGED
package/lib/transition.js
CHANGED
package/lib/validate-nodes.js
CHANGED
package/lib/webmcp-adapter.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nodality",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.26",
|
|
4
4
|
"description": "A lightweight library for declarative UI elements.",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -39,7 +39,12 @@
|
|
|
39
39
|
"./inspect": "./lib/raster-inspect.js",
|
|
40
40
|
"./examples/*": "./examples/*.js",
|
|
41
41
|
"./transition": "./lib/transition.js",
|
|
42
|
-
"./designer": "./lib/designer.js"
|
|
42
|
+
"./designer": "./lib/designer.js",
|
|
43
|
+
"./react": {
|
|
44
|
+
"types": "./lib/react.d.ts",
|
|
45
|
+
"import": "./lib/react.js",
|
|
46
|
+
"default": "./lib/react.js"
|
|
47
|
+
}
|
|
43
48
|
},
|
|
44
49
|
"publishConfig": {
|
|
45
50
|
"access": "public",
|
|
@@ -91,8 +96,18 @@
|
|
|
91
96
|
"babel-loader": "^10.0.0",
|
|
92
97
|
"jsdom": "^29.1.1",
|
|
93
98
|
"playwright": "^1.54.1",
|
|
99
|
+
"react": "19.2.4",
|
|
100
|
+
"react-dom": "19.2.4",
|
|
94
101
|
"serve": "^14.2.6",
|
|
95
102
|
"webpack-cli": "^6.0.1"
|
|
96
103
|
},
|
|
97
|
-
"types": "dist/index.d.ts"
|
|
104
|
+
"types": "dist/index.d.ts",
|
|
105
|
+
"peerDependencies": {
|
|
106
|
+
"react": ">=18"
|
|
107
|
+
},
|
|
108
|
+
"peerDependenciesMeta": {
|
|
109
|
+
"react": {
|
|
110
|
+
"optional": true
|
|
111
|
+
}
|
|
112
|
+
}
|
|
98
113
|
}
|