nodality 1.3.14 → 1.3.16
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/bin/install-skill.mjs +3 -3
- package/bin/mcp-server.mjs +46 -1
- package/bin/nodality.mjs +104 -1
- 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 +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 +2 -2
- 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 +20 -1
- package/dist/index.esm.js +2 -2
- 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 +1 -1
- package/dist/link-getter.cjs.js.LICENSE.txt +1 -1
- package/dist/link-getter.esm.js +1 -1
- package/dist/link-getter.esm.js.LICENSE.txt +1 -1
- package/dist/link.cjs.js +1 -1
- package/dist/link.cjs.js.LICENSE.txt +1 -1
- package/dist/link.esm.js +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 +1 -1
- package/dist/text-field.cjs.js.LICENSE.txt +1 -1
- package/dist/text-field.esm.js +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 +9 -2
- 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 +5 -1
- package/layout/link.js +6 -3
- 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 +261 -0
- 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 +4 -2
- 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 +24 -2
- package/lib/card-getter.js +1 -1
- package/lib/check-page.js +37 -5
- package/lib/codegen.js +1 -1
- package/lib/data.js +1 -1
- package/lib/designer.js +3 -2
- package/lib/element-mapper.js +118 -1
- package/lib/element-params.generated.js +4 -4
- package/lib/grid-geometry.js +1 -1
- package/lib/keyframe-animation.js +1 -1
- package/lib/known-inert.js +85 -0
- 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/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 +55 -4
- package/lib/webmcp-adapter.js +36 -1
- package/package.json +1 -1
- package/schema.json +3477 -816
- package/scripts/generate-schema.mjs +7 -0
- package/skills/nodality/SKILL.md +11 -1
package/lib/check-page.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* nodality v1.3.
|
|
2
|
+
* nodality v1.3.16
|
|
3
3
|
* (c) 2026 Filip Vabrousek
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -223,14 +223,29 @@ const IN_PAGE = () => {
|
|
|
223
223
|
});
|
|
224
224
|
return 0.2126 * r + 0.7152 * g + 0.0722 * b;
|
|
225
225
|
};
|
|
226
|
-
const
|
|
226
|
+
const bgColour = (el) => {
|
|
227
227
|
for (let n = el; n && n !== document.documentElement; n = n.parentElement) {
|
|
228
228
|
const cs = getComputedStyle(n);
|
|
229
229
|
if (cs.backgroundImage && cs.backgroundImage !== "none") return null;
|
|
230
|
-
|
|
231
|
-
if (l !== null) return l;
|
|
230
|
+
if (lum(cs.backgroundColor) !== null) return cs.backgroundColor;
|
|
232
231
|
}
|
|
233
|
-
|
|
232
|
+
const body = getComputedStyle(document.body).backgroundColor;
|
|
233
|
+
return lum(body) !== null ? body : null;
|
|
234
|
+
};
|
|
235
|
+
const bgOf = (el) => { const c = bgColour(el); return c === null ? null : lum(c); };
|
|
236
|
+
// APCA (0.0.98G-4g): perceived contrast, which accounts for polarity and
|
|
237
|
+
// for how mid-tone grounds compress it. WCAG 2 ratios pass thin small text
|
|
238
|
+
// on a mid-tone that people find hard to read — 11:1 on a turquoise that
|
|
239
|
+
// APCA put at Lc 72 for 13.8px mono. Reported alongside, not instead.
|
|
240
|
+
const apca = (fgc, bgc) => {
|
|
241
|
+
const rgb = (c) => c.match(/[\d.]+/g).slice(0, 3).map(Number);
|
|
242
|
+
const Y = ([r, g, b]) => {
|
|
243
|
+
let y = 0.2126729 * (r / 255) ** 2.4 + 0.7151522 * (g / 255) ** 2.4 + 0.0721750 * (b / 255) ** 2.4;
|
|
244
|
+
return y < 0.022 ? y + (0.022 - y) ** 1.414 : y;
|
|
245
|
+
};
|
|
246
|
+
const t = Y(rgb(fgc)), b = Y(rgb(bgc));
|
|
247
|
+
if (b > t) { const v = (b ** 0.56 - t ** 0.57) * 1.14; return v < 0.1 ? 0 : (v - 0.027) * 100; }
|
|
248
|
+
const v = (b ** 0.65 - t ** 0.62) * 1.14; return v > -0.1 ? 0 : -(v + 0.027) * 100;
|
|
234
249
|
};
|
|
235
250
|
for (const el of all) {
|
|
236
251
|
const own = [...el.childNodes].some((n) => n.nodeType === 3 && n.textContent.trim());
|
|
@@ -246,6 +261,17 @@ const IN_PAGE = () => {
|
|
|
246
261
|
if (ratio < need) {
|
|
247
262
|
add("LOW_CONTRAST", el, `${ratio.toFixed(2)}:1`,
|
|
248
263
|
`needs ${need}:1 at ${Math.round(size)}px`);
|
|
264
|
+
} else if (size < 24) {
|
|
265
|
+
// Passes WCAG, may still read faint. Lc 75 is APCA's floor for
|
|
266
|
+
// body text, 60 for larger content text; heavier type is allowed
|
|
267
|
+
// a little less.
|
|
268
|
+
const lc = Math.abs(apca(cs.color, bgColour(el)));
|
|
269
|
+
const heavy = Number(cs.fontWeight) >= 600;
|
|
270
|
+
const floor = (size < 16 ? 75 : 60) - (heavy ? 10 : 0);
|
|
271
|
+
if (lc < floor) {
|
|
272
|
+
add("FAINT_TEXT", el, `APCA Lc ${Math.round(lc)}`,
|
|
273
|
+
`passes WCAG (${ratio.toFixed(1)}:1) but reads faint at ${Math.round(size)}px weight ${cs.fontWeight}; aim for Lc ${floor}+`);
|
|
274
|
+
}
|
|
249
275
|
}
|
|
250
276
|
}
|
|
251
277
|
return out;
|
|
@@ -290,6 +316,12 @@ const REPAIRS = {
|
|
|
290
316
|
`background: "<a background with more separation>"`],
|
|
291
317
|
valid: ["4.5:1 for body text, 3:1 at 24px or at 18.66px bold"],
|
|
292
318
|
},
|
|
319
|
+
FAINT_TEXT: {
|
|
320
|
+
suggestions: [`keySet: [{ key: "fontWeight", value: "500" }]`,
|
|
321
|
+
`a lighter background tint, or text closer to black/white`,
|
|
322
|
+
`a larger size`],
|
|
323
|
+
valid: ["APCA Lc 75+ under 16px, 60+ up to 24px (10 less at weight 600+). A mid-tone ground caps the contrast any text can reach."],
|
|
324
|
+
},
|
|
293
325
|
HEADING_LEVEL_SKIPPED: {
|
|
294
326
|
suggestions: [`tag: "h<the next level down>"`],
|
|
295
327
|
valid: ["`tag` sets the heading level independently of the size scale, " +
|
package/lib/codegen.js
CHANGED
package/lib/data.js
CHANGED
package/lib/designer.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* nodality v1.3.
|
|
2
|
+
* nodality v1.3.16
|
|
3
3
|
* (c) 2026 Filip Vabrousek
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -76,6 +76,7 @@ import { AreaSwitcher } from "../layout/grid-switcher.js";
|
|
|
76
76
|
import { Polygon } from "../layout/polygon.js";
|
|
77
77
|
import { Circle } from "../layout/circle.js";
|
|
78
78
|
import { GridOverlay } from "../layout/grid-overlay.js";
|
|
79
|
+
import { Shop } from "../layout/shop.js";
|
|
79
80
|
|
|
80
81
|
|
|
81
82
|
|
|
@@ -1446,7 +1447,7 @@ new Slider(texts, null, { tintColor: "#e74c3c", inactiveColor: "#ccc" })
|
|
|
1446
1447
|
Text, Image, Link, FlexRow, UINavBar, Free, Audio, Progress, Center, Code,
|
|
1447
1448
|
Stack, Wrapper, MetaAdder, Table, Dropdown, Modal, TextField, Card,
|
|
1448
1449
|
Wrap, FlexGrid, ZoomCard, Switcher, MobileBar, DesktopBar, SideNav, Spacer, HScroller, Polygon, Circle, UList,
|
|
1449
|
-
GridOverlay
|
|
1450
|
+
GridOverlay, Shop
|
|
1450
1451
|
};
|
|
1451
1452
|
|
|
1452
1453
|
const formComponents = {
|
package/lib/element-mapper.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* nodality v1.3.
|
|
2
|
+
* nodality v1.3.16
|
|
3
3
|
* (c) 2026 Filip Vabrousek
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -71,6 +71,7 @@ import { AreaSwitcher } from "../layout/grid-switcher.js";
|
|
|
71
71
|
import { Polygon } from "../layout/polygon.js";
|
|
72
72
|
import { Circle } from "../layout/circle.js";
|
|
73
73
|
import { GridOverlay } from "../layout/grid-overlay.js";
|
|
74
|
+
import { Shop } from "../layout/shop.js";
|
|
74
75
|
|
|
75
76
|
|
|
76
77
|
// The closed set of `type:` values mapType understands, in the order it
|
|
@@ -83,6 +84,7 @@ const ELEMENT_TYPES = [
|
|
|
83
84
|
"audio", "multiswitcher", "button", "form", "checkbox", "stack",
|
|
84
85
|
"simple", "copy", "wrap", "circle", "polygon", "code", "table", "ulist",
|
|
85
86
|
"gridOverlay",
|
|
87
|
+
"store", "product", "price", "productData", "productMedia", "variantPicker", "buy", "cart",
|
|
86
88
|
];
|
|
87
89
|
|
|
88
90
|
// A nav entry is {title, link}. A bare string is accepted as the title: that
|
|
@@ -157,6 +159,7 @@ const CONTENT_SLOT = Object.freeze({
|
|
|
157
159
|
nav: "items", sideNav: "items",
|
|
158
160
|
dropdown: "items", picker: "items", radio: "items",
|
|
159
161
|
row: "children", form: "children", stack: "children", wrap: "children",
|
|
162
|
+
product: "children",
|
|
160
163
|
});
|
|
161
164
|
|
|
162
165
|
/** Warn when content was declared in the slot this type does not read. */
|
|
@@ -299,6 +302,22 @@ class ElementMapper { // 22:09:58 04/11/2024
|
|
|
299
302
|
return this.mapUList(obj);
|
|
300
303
|
} else if (obj.el.type === "gridOverlay"){
|
|
301
304
|
return this.mapGridOverlay(obj);
|
|
305
|
+
} else if (obj.el.type === "store"){
|
|
306
|
+
return this.mapStore(obj);
|
|
307
|
+
} else if (obj.el.type === "product"){
|
|
308
|
+
return this.mapProduct(obj);
|
|
309
|
+
} else if (obj.el.type === "price"){
|
|
310
|
+
return this.mapPrice(obj);
|
|
311
|
+
} else if (obj.el.type === "productData"){
|
|
312
|
+
return this.mapProductData(obj);
|
|
313
|
+
} else if (obj.el.type === "productMedia"){
|
|
314
|
+
return this.mapProductMedia(obj);
|
|
315
|
+
} else if (obj.el.type === "variantPicker"){
|
|
316
|
+
return this.mapVariantPicker(obj);
|
|
317
|
+
} else if (obj.el.type === "buy"){
|
|
318
|
+
return this.mapBuy(obj);
|
|
319
|
+
} else if (obj.el.type === "cart"){
|
|
320
|
+
return this.mapCart(obj);
|
|
302
321
|
}
|
|
303
322
|
|
|
304
323
|
// Everything above returned. Falling through used to return
|
|
@@ -782,6 +801,102 @@ animation: {
|
|
|
782
801
|
|
|
783
802
|
|
|
784
803
|
|
|
804
|
+
// ── Commerce: Shopify Storefront Web Components (layout/shop.js) ──────
|
|
805
|
+
//
|
|
806
|
+
// One method per type, each reading its own fields by name, so the
|
|
807
|
+
// schema credits each type with exactly what it reads. All of them build
|
|
808
|
+
// a Shop of the matching kind; style options (font, color, keySet) apply
|
|
809
|
+
// to every kind. Placed above `dropdown` for the reason mapGridOverlay
|
|
810
|
+
// gives.
|
|
811
|
+
|
|
812
|
+
static shop(kind, el, fields, obj) {
|
|
813
|
+
const options = { kind, id: el.id, font: el.font, color: el.color, keySet: el.keySet, ...fields };
|
|
814
|
+
// Inside a product's placeholder every commerce element renders its
|
|
815
|
+
// static form; the flag rides along through nested children.
|
|
816
|
+
if (obj.shopFallback) options.fallback = true;
|
|
817
|
+
for (const k of Object.keys(options)) if (options[k] == null) delete options[k];
|
|
818
|
+
return new Shop().set(options);
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
static mapStore(obj) {
|
|
822
|
+
const el = obj.el;
|
|
823
|
+
//@ store.domain {url}: The shop, e.g. "https://shop.example.com" or "https://mock.shop" for development. Place one store per page.
|
|
824
|
+
//@ store.token {text}: Storefront API public access token. Only needed for inventory and custom data; public product data works without one.
|
|
825
|
+
//@ store.country {text}: Market for prices and availability, ISO code such as "DE". Omit to use the shop's default.
|
|
826
|
+
//@ store.language {text}: Content language, ISO code such as "EN".
|
|
827
|
+
return this.shop("store", el, { domain: el.domain, token: el.token, country: el.country, language: el.language }, obj);
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
static mapProduct(obj) {
|
|
831
|
+
const el = obj.el;
|
|
832
|
+
//@ product.handle {text}: The product's handle in the shop — its URL name, e.g. "suitcase-n01".
|
|
833
|
+
//@ product.children: What to show for the product: price, variantPicker, buy, productData, productMedia, and any other element. Rendered live from the shop, and statically (from each element's `text`/`url`) until the data arrives and in the prerendered HTML.
|
|
834
|
+
// Its own layout options (background, pad, width, …) style the
|
|
835
|
+
// product box, as on a wrap.
|
|
836
|
+
const product = this.shop("product", el, { ...this.elOpts(el), handle: el.handle }, obj);
|
|
837
|
+
const kids = Array.isArray(el.children) ? el.children : [];
|
|
838
|
+
product.add(kids.map((child) => this.mapType({ ...obj, el: child, shopFallback: false })));
|
|
839
|
+
// The static copy carries different ids: once Shopify stamps the
|
|
840
|
+
// template, both copies are in the document at the same time.
|
|
841
|
+
const staticIds = (spec) => {
|
|
842
|
+
if (!spec || typeof spec !== "object") return spec;
|
|
843
|
+
const out = { ...spec };
|
|
844
|
+
if (out.id) out.id = `${String(out.id).replace(/^#/, "")}-static`;
|
|
845
|
+
if (Array.isArray(out.children)) out.children = out.children.map(staticIds);
|
|
846
|
+
return out;
|
|
847
|
+
};
|
|
848
|
+
product.fallback(kids.map((child) => this.mapType({ ...obj, el: staticIds(child), shopFallback: true })));
|
|
849
|
+
return product;
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
static mapPrice(obj) {
|
|
853
|
+
const el = obj.el;
|
|
854
|
+
//@ price.text {text}: The price as text, shown before the shop answers and in the prerendered HTML — e.g. from build-time data.
|
|
855
|
+
//@ price.query {text}: Storefront API field to show. Default "product.selectedOrFirstAvailableVariant.price".
|
|
856
|
+
return this.shop("price", el, { text: el.text, query: el.query }, obj);
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
static mapProductData(obj) {
|
|
860
|
+
const el = obj.el;
|
|
861
|
+
//@ productData.query {text}: Storefront API field to show, e.g. "product.title" or "product.selectedOrFirstAvailableVariant.quantityAvailable" (needs a store token).
|
|
862
|
+
//@ productData.text {text}: The value as text before the shop answers and in the prerendered HTML.
|
|
863
|
+
return this.shop("productData", el, { query: el.query, text: el.text }, obj);
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
static mapProductMedia(obj) {
|
|
867
|
+
const el = obj.el;
|
|
868
|
+
//@ productMedia.query {text}: Storefront API image field. Default "product.selectedOrFirstAvailableVariant.image", which follows the chosen options.
|
|
869
|
+
//@ productMedia.url {url}: Image shown before the shop answers and in the prerendered HTML.
|
|
870
|
+
//@ productMedia.alt {text}: Description of the static image.
|
|
871
|
+
//@ productMedia.width {count}: Requested width in px.
|
|
872
|
+
//@ productMedia.height {count}: Requested height in px.
|
|
873
|
+
return this.shop("productMedia", el, { query: el.query, url: el.url, alt: el.alt, width: el.width, height: el.height }, obj);
|
|
874
|
+
}
|
|
875
|
+
|
|
876
|
+
static mapVariantPicker(obj) {
|
|
877
|
+
const el = obj.el;
|
|
878
|
+
//@ variantPicker.text {text}: The options as text before the shop answers and in the prerendered HTML, e.g. "Size: Cabin · Check-in".
|
|
879
|
+
return this.shop("variantPicker", el, { text: el.text }, obj);
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
static mapBuy(obj) {
|
|
883
|
+
const el = obj.el;
|
|
884
|
+
//@ buy.text {text}: The button's label. Default "Add to cart".
|
|
885
|
+
//@ buy.mode {enum(cart|buyNow)}: "cart" adds the chosen variant and opens the cart; "buyNow" goes straight to checkout. Default "cart".
|
|
886
|
+
//@ buy.cart {text}: Id of the cart element to add to. Default "cart".
|
|
887
|
+
//@ buy.store {text}: Id of the store element, for buyNow. Default "store".
|
|
888
|
+
//@ buy.url {url}: Where the static link goes before the script loads and without JavaScript — the product on the shop.
|
|
889
|
+
return this.shop("buy", el, { text: el.text, mode: el.mode, cart: el.cart, store: el.store, url: el.url }, obj);
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
static mapCart(obj) {
|
|
893
|
+
const el = obj.el;
|
|
894
|
+
//@ cart.theme {object}: Styles for the cart dialog: {background, color, font, headingFont, accent, accentText, radius, buttonRadius}. Applied through the parts Shopify exposes.
|
|
895
|
+
//@ cart.target {text}: Where checkout opens. Default "_top".
|
|
896
|
+
//@ cart.discountCodes {text}: Comma-separated discount codes applied automatically.
|
|
897
|
+
return this.shop("cart", el, { theme: el.theme, target: el.target, discountCodes: el.discountCodes }, obj);
|
|
898
|
+
}
|
|
899
|
+
|
|
785
900
|
static dropdown(obj){
|
|
786
901
|
// A label for the trigger, which is what makes every declared option
|
|
787
902
|
// selectable. Without one the first item becomes the label and is
|
|
@@ -2318,6 +2433,8 @@ static form(obj){
|
|
|
2318
2433
|
action: el.action ?? "",
|
|
2319
2434
|
...(el.method !== undefined ? { method: el.method } : {}),
|
|
2320
2435
|
...(el.id !== undefined ? { id: el.id } : {}),
|
|
2436
|
+
//@ form.title {text}: What the form is for, in a sentence. Its accessible name, and the description of the tool the agent surface derives from it.
|
|
2437
|
+
...(el.title !== undefined ? { title: el.title } : {}),
|
|
2321
2438
|
});
|
|
2322
2439
|
const kids = Array.isArray(el.children) ? el.children : null;
|
|
2323
2440
|
if (kids) form.add(kids.map((child) => this.mapType({ ...obj, el: child })));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* nodality v1.3.
|
|
2
|
+
* nodality v1.3.16
|
|
3
3
|
* (c) 2026 Filip Vabrousek
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -8,15 +8,15 @@
|
|
|
8
8
|
// Every parameter name any element type reads, recovered from source.
|
|
9
9
|
// Used for near-miss typo detection in validate-nodes.js. A drift test
|
|
10
10
|
// regenerates this and fails if it differs, so it cannot rot silently.
|
|
11
|
-
export const ELEMENT_PARAM_NAMES = ["absolute","accept","action","align","alignItems","alignIts","alignTo","aligns","alt","animate","animation","area","ariaLabel","arrayMargin","arrayPadding","as","aspectRatio","at","auto","autoplay","backTo","background","backgroundCard","backgroundColor","backgroundOp","barPad","behaviour","blast","blastData","block","bold","border","borderBottom","borderObj","borderObja","brand","breakWord","breakpoint","breakpoints","center","centerColumn","centerSelf","centered","checkedBackgroundColor","child","children","clampc","class","clipPath","colat","color","column","columns","contentWidth","controls","cursor","customAlign","customJustify","customStyle","data","decoding","decorative","desktopSize","diameter","disp","dropdown","els","em","exact","fetchPriority","filter","filtera","fitContent","fixMobileTap","fixed","flex","flexCenter","flexDir","fluid","fluidc","font","fontSize","frame","ga","gap","gpos","gradient","hamColour","hamburgerColour","hamburgerInset","height","hideField","hideOverflow","hover","icon","id","img","index","initLetter","inline","inpad","inputType","inset","isBackground","isFull","isHidden","isLink","isNavA","isSide","italic","items","justifo","justify","keySet","kind","label","layout","lazy","left","length","letterSpacing","lineOpacity","lineWidth","link","loading","loop","map","mar","margin","marginOp","markSize","marks","maxHeight","maxWidth","mboth","menuId","menuLabel","method","minHeight","mobile","mobileSize","multiple","muted","name","new","nowrap","objectFit","objectPosition","offcanvas","okayColor","onScroll","onTap","opacity","openColor","overflow","owrap","pad","padding","placeholder","playsinline","position","positions","poster","preffersId","preload","radius","ranges","raster","react","readouts","removeDecoration","required","resmar","respad","responsive","resprop","reveal","rounded","rows","scale","sequence","shadow","sides","simpleBorder","simpleCenter","size","sizes","sources","spacing","span","srcset","sticky","stretch","stroke","stype","svg","tag","tags","templateCols","text","theme","tint","title","toColumn","top","transform","transition","type","uppercase","url","useBrightness","value","vtn","weight","width","wrap","x","y","zIndex"];
|
|
11
|
+
export const ELEMENT_PARAM_NAMES = ["absolute","accept","action","align","alignItems","alignIts","alignTo","aligns","alt","animate","animation","area","ariaLabel","arrayMargin","arrayPadding","as","aspectRatio","at","auto","autoplay","backTo","background","backgroundCard","backgroundColor","backgroundOp","barPad","behaviour","blast","blastData","block","bold","border","borderBottom","borderObj","borderObja","brand","breakWord","breakpoint","breakpoints","cart","center","centerColumn","centerSelf","centered","checkedBackgroundColor","child","children","clampc","class","clipPath","colat","color","column","columns","contentWidth","controls","country","cursor","customAlign","customJustify","customStyle","data","decoding","decorative","desktopSize","diameter","discountCodes","disp","domain","dropdown","els","em","exact","fetchPriority","filter","filtera","fitContent","fixMobileTap","fixed","flex","flexCenter","flexDir","fluid","fluidc","font","fontSize","frame","ga","gap","gpos","gradient","hamColour","hamburgerColour","hamburgerInset","handle","height","hideField","hideOverflow","hover","icon","id","img","index","initLetter","inline","inpad","inputType","inset","isBackground","isFull","isHidden","isLink","isNavA","isSide","italic","items","justifo","justify","keySet","kind","label","language","layout","lazy","left","length","letterSpacing","lineOpacity","lineWidth","link","loading","loop","map","mar","margin","marginOp","markSize","marks","maxHeight","maxWidth","mboth","menuId","menuLabel","method","minHeight","mobile","mobileSize","mode","multiple","muted","name","new","nowrap","objectFit","objectPosition","offcanvas","okayColor","onScroll","onTap","opacity","openColor","overflow","owrap","pad","padding","placeholder","playsinline","position","positions","poster","preffersId","preload","query","radius","ranges","raster","react","readouts","removeDecoration","required","resmar","respad","responsive","resprop","reveal","rounded","rows","scale","sequence","shadow","sides","simpleBorder","simpleCenter","size","sizes","sources","spacing","span","srcset","sticky","store","stretch","stroke","stype","svg","tag","tags","target","templateCols","text","theme","tint","title","toColumn","token","top","transform","transition","type","uppercase","url","useBrightness","value","vtn","weight","width","wrap","x","y","zIndex"];
|
|
12
12
|
|
|
13
13
|
// Per-type vocabulary. The union above answers "is this a real parameter
|
|
14
14
|
// anywhere"; this answers "does THIS type accept it", which is what a page
|
|
15
15
|
// actually needs to know — writing `keySet` on a `table` is a name the
|
|
16
16
|
// union knows and the type ignores.
|
|
17
|
-
export const ELEMENT_PARAMS_BY_TYPE = {"h1":["absolute","align","alt","animation","area","background","backgroundOp","block","border","borderObj","breakWord","center","clampc","class","color","cursor","em","filtera","flex","fluid","fluidc","font","gpos","gradient","height","icon","id","index","initLetter","italic","keySet","layout","left","mar","marginOp","maxWidth","onScroll","onTap","preffersId","raster","removeDecoration","responsive","resprop","shadow","size","span","stroke","tag","text","top","transform","type","url","value","vtn","width"],"h2":["absolute","align","alt","animation","area","background","backgroundOp","block","border","borderObj","breakWord","center","clampc","class","color","cursor","em","filtera","flex","fluid","fluidc","font","gpos","gradient","height","icon","id","index","initLetter","italic","keySet","layout","left","mar","marginOp","maxWidth","onScroll","onTap","preffersId","raster","removeDecoration","responsive","resprop","shadow","size","span","stroke","tag","text","top","transform","type","url","value","vtn","width"],"h3":["absolute","align","alt","animation","area","background","backgroundOp","block","border","borderObj","breakWord","center","clampc","class","color","cursor","em","filtera","flex","fluid","fluidc","font","gpos","gradient","height","icon","id","index","initLetter","italic","keySet","layout","left","mar","marginOp","maxWidth","onScroll","onTap","preffersId","raster","removeDecoration","responsive","resprop","shadow","size","span","stroke","tag","text","top","transform","type","url","value","vtn","width"],"h4":["absolute","align","alt","animation","area","background","backgroundOp","block","border","borderObj","breakWord","center","clampc","class","color","cursor","em","filtera","flex","fluid","fluidc","font","gpos","gradient","height","icon","id","index","initLetter","italic","keySet","layout","left","mar","marginOp","maxWidth","onScroll","onTap","preffersId","raster","removeDecoration","responsive","resprop","shadow","size","span","stroke","tag","text","top","transform","type","url","value","vtn","width"],"h5":["absolute","align","alt","animation","area","background","backgroundOp","block","border","borderObj","breakWord","center","clampc","class","color","cursor","em","filtera","flex","fluid","fluidc","font","gpos","gradient","height","icon","id","index","initLetter","italic","keySet","layout","left","mar","marginOp","maxWidth","onScroll","onTap","preffersId","raster","removeDecoration","responsive","resprop","shadow","size","span","stroke","tag","text","top","transform","type","url","value","vtn","width"],"h6":["absolute","align","alt","animation","area","background","backgroundOp","block","border","borderObj","breakWord","center","clampc","class","color","cursor","em","filtera","flex","fluid","fluidc","font","gpos","gradient","height","icon","id","index","initLetter","italic","keySet","layout","left","mar","marginOp","maxWidth","onScroll","onTap","preffersId","raster","removeDecoration","responsive","resprop","shadow","size","span","stroke","tag","text","top","transform","type","url","value","vtn","width"],"p":["absolute","align","alt","animation","area","background","backgroundOp","block","border","borderObj","breakWord","center","clampc","class","color","cursor","em","filtera","flex","fluid","fluidc","font","gpos","gradient","height","icon","id","index","initLetter","italic","keySet","layout","left","mar","marginOp","maxWidth","onScroll","onTap","preffersId","raster","removeDecoration","responsive","resprop","shadow","size","span","stroke","tag","text","top","transform","type","url","value","vtn","width"],"img":["alt","animation","area","as","at","backgroundOp","centerSelf","class","clipPath","color","decoding","fetchPriority","filtera","fitContent","gpos","gradient","height","id","index","isBackground","isFull","keySet","layout","loading","marginOp","maxWidth","minHeight","objectFit","objectPosition","onScroll","onTap","opacity","radius","resprop","reveal","shadow","sizes","span","srcset","stroke","stype","type","url","vtn","width","x","y","zIndex"],"a":["align","animation","background","backgroundOp","blast","blastData","block","bold","border","borderObj","clampc","class","color","data","fixMobileTap","flex","fluidc","font","gradient","hover","icon","id","isNavA","link","mar","marginOp","maxWidth","new","nowrap","onTap","pad","padding","preffersId","radius","rounded","shadow","span","stroke","tags","text","transform","type","url","width"],"cards":["absolute","action","align","alignIts","alt","animation","area","as","at","backTo","background","backgroundCard","backgroundColor","backgroundOp","blast","blastData","block","bold","border","borderObj","borderObja","breakWord","center","centerColumn","centerSelf","checkedBackgroundColor","child","children","clampc","class","clipPath","colat","color","column","cursor","customAlign","customJustify","customStyle","data","decoding","disp","em","fetchPriority","filter","filtera","fitContent","fixMobileTap","flex","flexCenter","flexDir","fluid","fluidc","font","ga","gap","gpos","gradient","height","hideOverflow","hover","icon","id","index","initLetter","inpad","isBackground","isFull","isHidden","isLink","isNavA","italic","items","keySet","kind","label","layout","left","loading","map","mar","marginOp","maxHeight","maxWidth","mboth","method","minHeight","name","new","nowrap","objectFit","objectPosition","onScroll","onTap","opacity","overflow","pad","padding","position","preffersId","radius","ranges","raster","react","removeDecoration","resmar","respad","responsive","resprop","reveal","rounded","scale","sequence","shadow","simpleBorder","simpleCenter","size","sizes","span","srcset","sticky","stretch","stroke","stype","tag","tags","text","title","top","transform","transition","type","url","useBrightness","vtn","weight","width","wrap","x","y","zIndex"],"free":["els","id","type"],"nav":["absolute","action","align","alignItems","alignIts","alt","animate","animation","area","ariaLabel","as","at","backTo","background","backgroundCard","backgroundColor","backgroundOp","barPad","behaviour","blast","blastData","block","bold","border","borderBottom","borderObj","borderObja","brand","breakWord","breakpoint","breakpoints","center","centerColumn","centerSelf","checkedBackgroundColor","child","children","clampc","class","clipPath","colat","color","column","contentWidth","cursor","customAlign","customJustify","customStyle","data","decoding","desktopSize","diameter","disp","dropdown","els","em","fetchPriority","filter","filtera","fitContent","fixMobileTap","fixed","flex","flexCenter","flexDir","fluid","fluidc","font","ga","gap","gpos","gradient","hamColour","hamburgerColour","hamburgerInset","height","hideOverflow","hover","icon","id","index","initLetter","inline","inpad","isBackground","isFull","isHidden","isLink","isNavA","isSide","italic","items","justify","keySet","kind","label","layout","left","link","loading","map","mar","margin","marginOp","maxHeight","maxWidth","mboth","menuId","menuLabel","method","minHeight","mobileSize","name","new","nowrap","objectFit","objectPosition","offcanvas","onScroll","onTap","opacity","openColor","overflow","pad","padding","position","positions","preffersId","radius","ranges","raster","react","removeDecoration","resmar","respad","responsive","resprop","reveal","rounded","scale","sequence","shadow","sides","simpleBorder","simpleCenter","size","sizes","spacing","span","srcset","sticky","stretch","stroke","stype","tag","tags","templateCols","text","title","top","transform","transition","type","url","useBrightness","value","vtn","weight","width","wrap","x","y","zIndex"],"sideNav":["absolute","action","align","alignIts","alt","animate","animation","area","as","at","backTo","background","backgroundCard","backgroundColor","backgroundOp","behaviour","blast","blastData","block","bold","border","borderObj","borderObja","breakWord","center","centerColumn","centerSelf","checkedBackgroundColor","child","children","clampc","class","clipPath","colat","color","column","contentWidth","cursor","customAlign","customJustify","customStyle","data","decoding","diameter","disp","dropdown","els","em","fetchPriority","filter","filtera","fitContent","fixMobileTap","fixed","flex","flexCenter","flexDir","fluid","fluidc","font","ga","gap","gpos","gradient","hamColour","height","hideOverflow","hover","icon","id","index","initLetter","inline","inpad","isBackground","isFull","isHidden","isLink","isNavA","italic","items","keySet","kind","label","layout","left","link","loading","map","mar","margin","marginOp","maxHeight","maxWidth","mboth","method","minHeight","name","new","nowrap","objectFit","objectPosition","offcanvas","onScroll","onTap","opacity","overflow","pad","padding","position","positions","preffersId","radius","ranges","raster","react","removeDecoration","resmar","respad","responsive","resprop","reveal","rounded","scale","sequence","shadow","sides","simpleBorder","simpleCenter","size","sizes","span","srcset","sticky","stretch","stroke","stype","tag","tags","templateCols","text","title","top","transform","transition","type","url","useBrightness","value","vtn","weight","width","wrap","x","y","zIndex"],"row":["absolute","align","alignIts","alignTo","aligns","alt","animation","area","background","backgroundOp","block","border","borderObj","breakWord","center","children","clampc","class","colat","color","column","cursor","em","filtera","flex","fluid","fluidc","font","gap","gpos","gradient","height","icon","id","index","initLetter","italic","justifo","justify","keySet","layout","left","mar","marginOp","maxWidth","mobile","onScroll","onTap","owrap","padding","position","preffersId","radius","raster","removeDecoration","responsive","shadow","size","span","stroke","tag","toColumn","top","transform","type","url","vtn","width","wrap"],"dropdown":["id","items","label","title","type"],"radio":["color","exact","font","id","items","length","multiple","tint","type"],"input":["background","bold","color","exact","font","id","inputType","label","mar","maxWidth","name","pad","placeholder","radius","required","theme","title","type","weight"],"labelInput":["color","exact","font","id","inputType","label","mar","name","pad","text","title","type"],"filePicker":["accept","background","color","font","hideField","id","index","name","okayColor","radius","title","type"],"picker":["arrayMargin","arrayPadding","background","id","items","label","mar","name","pad","radius","title","type"],"video":["aspectRatio","autoplay","background","controls","decorative","height","id","label","lazy","loop","maxWidth","muted","objectFit","opacity","playsinline","poster","preload","radius","raster","sources","type","url","width"],"audio":["id","type","url"],"multiswitcher":["area","breakpoints","id","type"],"button":["align","auto","background","bold","border","centered","class","color","exact","fluidc","frame","height","id","img","keySet","margin","onTap","padding","radius","resmar","respad","svg","text","type","url","weight","width"],"form":["action","children","id","method","type"],"checkbox":["absolute","align","alt","animation","area","background","backgroundColor","backgroundOp","block","border","borderObj","breakWord","center","checkedBackgroundColor","clampc","class","clipPath","color","cursor","customStyle","em","filtera","flex","fluid","fluidc","font","gpos","gradient","height","icon","id","index","initLetter","italic","keySet","label","layout","left","mar","marginOp","maxWidth","name","onScroll","onTap","pad","preffersId","raster","removeDecoration","resmar","respad","responsive","shadow","size","span","stroke","tag","title","top","transform","type","url","vtn","width"],"stack":["children","height","id","sticky","type"],"simple":["children","gap","height","id","react","type"],"copy":["id","type"],"wrap":["absolute","align","alignIts","alt","animation","area","at","backTo","background","backgroundOp","blast","block","border","borderObj","borderObja","breakWord","center","centerColumn","child","children","clampc","class","color","column","cursor","customAlign","customJustify","disp","em","filter","filtera","flex","flexCenter","flexDir","fluid","fluidc","font","ga","gpos","gradient","height","hideOverflow","icon","id","index","initLetter","isHidden","isLink","italic","keySet","kind","layout","left","mar","marginOp","maxHeight","maxWidth","mboth","name","onScroll","onTap","opacity","overflow","pad","position","preffersId","radius","ranges","raster","removeDecoration","responsive","resprop","scale","sequence","shadow","simpleBorder","simpleCenter","size","span","sticky","stretch","stroke","tag","top","transform","transition","type","url","vtn","weight","width","zIndex"],"circle":["id","transform","type"],"polygon":["id","sides","transform","type"],"code":["id","transform","type"],"table":["id","items","transform","type"],"ulist":["absolute","align","alt","animation","area","background","backgroundOp","block","border","borderObj","breakWord","center","clampc","class","color","cursor","em","filtera","flex","fluid","fluidc","font","gpos","gradient","height","icon","id","index","initLetter","italic","items","keySet","kind","layout","left","mar","marginOp","maxWidth","onScroll","onTap","pad","preffersId","raster","removeDecoration","responsive","shadow","size","span","stroke","tag","top","transform","type","url","vtn","width"],"gridOverlay":["breakpoint","color","columns","font","fontSize","id","inset","letterSpacing","lineOpacity","lineWidth","markSize","marks","mobile","position","readouts","rows","type","uppercase","zIndex"]};
|
|
17
|
+
export const ELEMENT_PARAMS_BY_TYPE = {"h1":["absolute","align","alt","animation","area","background","backgroundOp","block","border","borderObj","breakWord","center","clampc","class","color","cursor","em","filtera","flex","fluid","fluidc","font","gpos","gradient","height","icon","id","index","initLetter","italic","keySet","layout","left","mar","marginOp","maxWidth","onScroll","onTap","preffersId","raster","removeDecoration","responsive","resprop","shadow","size","span","stroke","tag","text","top","transform","type","url","value","vtn","width"],"h2":["absolute","align","alt","animation","area","background","backgroundOp","block","border","borderObj","breakWord","center","clampc","class","color","cursor","em","filtera","flex","fluid","fluidc","font","gpos","gradient","height","icon","id","index","initLetter","italic","keySet","layout","left","mar","marginOp","maxWidth","onScroll","onTap","preffersId","raster","removeDecoration","responsive","resprop","shadow","size","span","stroke","tag","text","top","transform","type","url","value","vtn","width"],"h3":["absolute","align","alt","animation","area","background","backgroundOp","block","border","borderObj","breakWord","center","clampc","class","color","cursor","em","filtera","flex","fluid","fluidc","font","gpos","gradient","height","icon","id","index","initLetter","italic","keySet","layout","left","mar","marginOp","maxWidth","onScroll","onTap","preffersId","raster","removeDecoration","responsive","resprop","shadow","size","span","stroke","tag","text","top","transform","type","url","value","vtn","width"],"h4":["absolute","align","alt","animation","area","background","backgroundOp","block","border","borderObj","breakWord","center","clampc","class","color","cursor","em","filtera","flex","fluid","fluidc","font","gpos","gradient","height","icon","id","index","initLetter","italic","keySet","layout","left","mar","marginOp","maxWidth","onScroll","onTap","preffersId","raster","removeDecoration","responsive","resprop","shadow","size","span","stroke","tag","text","top","transform","type","url","value","vtn","width"],"h5":["absolute","align","alt","animation","area","background","backgroundOp","block","border","borderObj","breakWord","center","clampc","class","color","cursor","em","filtera","flex","fluid","fluidc","font","gpos","gradient","height","icon","id","index","initLetter","italic","keySet","layout","left","mar","marginOp","maxWidth","onScroll","onTap","preffersId","raster","removeDecoration","responsive","resprop","shadow","size","span","stroke","tag","text","top","transform","type","url","value","vtn","width"],"h6":["absolute","align","alt","animation","area","background","backgroundOp","block","border","borderObj","breakWord","center","clampc","class","color","cursor","em","filtera","flex","fluid","fluidc","font","gpos","gradient","height","icon","id","index","initLetter","italic","keySet","layout","left","mar","marginOp","maxWidth","onScroll","onTap","preffersId","raster","removeDecoration","responsive","resprop","shadow","size","span","stroke","tag","text","top","transform","type","url","value","vtn","width"],"p":["absolute","align","alt","animation","area","background","backgroundOp","block","border","borderObj","breakWord","center","clampc","class","color","cursor","em","filtera","flex","fluid","fluidc","font","gpos","gradient","height","icon","id","index","initLetter","italic","keySet","layout","left","mar","marginOp","maxWidth","onScroll","onTap","preffersId","raster","removeDecoration","responsive","resprop","shadow","size","span","stroke","tag","text","top","transform","type","url","value","vtn","width"],"img":["alt","animation","area","as","at","backgroundOp","centerSelf","class","clipPath","color","decoding","fetchPriority","filtera","fitContent","gpos","gradient","height","id","index","isBackground","isFull","keySet","layout","loading","marginOp","maxWidth","minHeight","objectFit","objectPosition","onScroll","onTap","opacity","radius","resprop","reveal","shadow","sizes","span","srcset","stroke","stype","type","url","vtn","width","x","y","zIndex"],"a":["align","animation","background","backgroundOp","blast","blastData","block","bold","border","borderObj","clampc","class","color","data","fixMobileTap","flex","fluidc","font","gradient","hover","icon","id","isNavA","link","mar","marginOp","maxWidth","new","nowrap","onTap","pad","padding","preffersId","radius","rounded","shadow","span","stroke","tags","text","transform","type","url","width"],"cards":["absolute","action","align","alignIts","alt","animation","area","as","at","backTo","background","backgroundCard","backgroundColor","backgroundOp","blast","blastData","block","bold","border","borderObj","borderObja","breakWord","center","centerColumn","centerSelf","checkedBackgroundColor","child","children","clampc","class","clipPath","colat","color","column","cursor","customAlign","customJustify","customStyle","data","decoding","disp","em","fetchPriority","filter","filtera","fitContent","fixMobileTap","flex","flexCenter","flexDir","fluid","fluidc","font","ga","gap","gpos","gradient","height","hideOverflow","hover","icon","id","index","initLetter","inpad","isBackground","isFull","isHidden","isLink","isNavA","italic","items","keySet","kind","label","layout","left","loading","map","mar","marginOp","maxHeight","maxWidth","mboth","method","minHeight","name","new","nowrap","objectFit","objectPosition","onScroll","onTap","opacity","overflow","pad","padding","position","preffersId","radius","ranges","raster","react","removeDecoration","resmar","respad","responsive","resprop","reveal","rounded","scale","sequence","shadow","simpleBorder","simpleCenter","size","sizes","span","srcset","sticky","stretch","stroke","stype","tag","tags","text","title","top","transform","transition","type","url","useBrightness","vtn","weight","width","wrap","x","y","zIndex"],"free":["els","id","type"],"nav":["absolute","action","align","alignItems","alignIts","alt","animate","animation","area","ariaLabel","as","at","backTo","background","backgroundCard","backgroundColor","backgroundOp","barPad","behaviour","blast","blastData","block","bold","border","borderBottom","borderObj","borderObja","brand","breakWord","breakpoint","breakpoints","center","centerColumn","centerSelf","checkedBackgroundColor","child","children","clampc","class","clipPath","colat","color","column","contentWidth","cursor","customAlign","customJustify","customStyle","data","decoding","desktopSize","diameter","disp","dropdown","els","em","fetchPriority","filter","filtera","fitContent","fixMobileTap","fixed","flex","flexCenter","flexDir","fluid","fluidc","font","ga","gap","gpos","gradient","hamColour","hamburgerColour","hamburgerInset","height","hideOverflow","hover","icon","id","index","initLetter","inline","inpad","isBackground","isFull","isHidden","isLink","isNavA","isSide","italic","items","justify","keySet","kind","label","layout","left","link","loading","map","mar","margin","marginOp","maxHeight","maxWidth","mboth","menuId","menuLabel","method","minHeight","mobileSize","name","new","nowrap","objectFit","objectPosition","offcanvas","onScroll","onTap","opacity","openColor","overflow","pad","padding","position","positions","preffersId","radius","ranges","raster","react","removeDecoration","resmar","respad","responsive","resprop","reveal","rounded","scale","sequence","shadow","sides","simpleBorder","simpleCenter","size","sizes","spacing","span","srcset","sticky","stretch","stroke","stype","tag","tags","templateCols","text","title","top","transform","transition","type","url","useBrightness","value","vtn","weight","width","wrap","x","y","zIndex"],"sideNav":["absolute","action","align","alignIts","alt","animate","animation","area","as","at","backTo","background","backgroundCard","backgroundColor","backgroundOp","behaviour","blast","blastData","block","bold","border","borderObj","borderObja","breakWord","center","centerColumn","centerSelf","checkedBackgroundColor","child","children","clampc","class","clipPath","colat","color","column","contentWidth","cursor","customAlign","customJustify","customStyle","data","decoding","diameter","disp","dropdown","els","em","fetchPriority","filter","filtera","fitContent","fixMobileTap","fixed","flex","flexCenter","flexDir","fluid","fluidc","font","ga","gap","gpos","gradient","hamColour","height","hideOverflow","hover","icon","id","index","initLetter","inline","inpad","isBackground","isFull","isHidden","isLink","isNavA","italic","items","keySet","kind","label","layout","left","link","loading","map","mar","margin","marginOp","maxHeight","maxWidth","mboth","method","minHeight","name","new","nowrap","objectFit","objectPosition","offcanvas","onScroll","onTap","opacity","overflow","pad","padding","position","positions","preffersId","radius","ranges","raster","react","removeDecoration","resmar","respad","responsive","resprop","reveal","rounded","scale","sequence","shadow","sides","simpleBorder","simpleCenter","size","sizes","span","srcset","sticky","stretch","stroke","stype","tag","tags","templateCols","text","title","top","transform","transition","type","url","useBrightness","value","vtn","weight","width","wrap","x","y","zIndex"],"row":["absolute","align","alignIts","alignTo","aligns","alt","animation","area","background","backgroundOp","block","border","borderObj","breakWord","center","children","clampc","class","colat","color","column","cursor","em","filtera","flex","fluid","fluidc","font","gap","gpos","gradient","height","icon","id","index","initLetter","italic","justifo","justify","keySet","layout","left","mar","marginOp","maxWidth","mobile","onScroll","onTap","owrap","padding","position","preffersId","radius","raster","removeDecoration","responsive","shadow","size","span","stroke","tag","toColumn","top","transform","type","url","vtn","width","wrap"],"dropdown":["id","items","label","title","type"],"radio":["color","exact","font","id","items","length","multiple","tint","type"],"input":["background","bold","color","exact","font","id","inputType","label","mar","maxWidth","name","pad","placeholder","radius","required","theme","title","type","weight"],"labelInput":["color","exact","font","id","inputType","label","mar","name","pad","text","title","type"],"filePicker":["accept","background","color","font","hideField","id","index","name","okayColor","radius","title","type"],"picker":["arrayMargin","arrayPadding","background","id","items","label","mar","name","pad","radius","title","type"],"video":["aspectRatio","autoplay","background","controls","decorative","height","id","label","lazy","loop","maxWidth","muted","objectFit","opacity","playsinline","poster","preload","radius","raster","sources","type","url","width"],"audio":["id","type","url"],"multiswitcher":["area","breakpoints","id","type"],"button":["align","auto","background","bold","border","centered","class","color","exact","fluidc","frame","height","id","img","keySet","margin","onTap","padding","radius","resmar","respad","svg","text","type","url","weight","width"],"form":["action","children","id","method","title","type"],"checkbox":["absolute","align","alt","animation","area","background","backgroundColor","backgroundOp","block","border","borderObj","breakWord","center","checkedBackgroundColor","clampc","class","clipPath","color","cursor","customStyle","em","filtera","flex","fluid","fluidc","font","gpos","gradient","height","icon","id","index","initLetter","italic","keySet","label","layout","left","mar","marginOp","maxWidth","name","onScroll","onTap","pad","preffersId","raster","removeDecoration","resmar","respad","responsive","shadow","size","span","stroke","tag","title","top","transform","type","url","vtn","width"],"stack":["children","height","id","sticky","type"],"simple":["children","gap","height","id","react","type"],"copy":["id","type"],"wrap":["absolute","align","alignIts","alt","animation","area","at","backTo","background","backgroundOp","blast","block","border","borderObj","borderObja","breakWord","center","centerColumn","child","children","clampc","class","color","column","cursor","customAlign","customJustify","disp","em","filter","filtera","flex","flexCenter","flexDir","fluid","fluidc","font","ga","gpos","gradient","height","hideOverflow","icon","id","index","initLetter","isHidden","isLink","italic","keySet","kind","layout","left","mar","marginOp","maxHeight","maxWidth","mboth","name","onScroll","onTap","opacity","overflow","pad","position","preffersId","radius","ranges","raster","removeDecoration","responsive","resprop","scale","sequence","shadow","simpleBorder","simpleCenter","size","span","sticky","stretch","stroke","tag","top","transform","transition","type","url","vtn","weight","width","zIndex"],"circle":["id","transform","type"],"polygon":["id","sides","transform","type"],"code":["id","transform","type"],"table":["id","items","transform","type"],"ulist":["absolute","align","alt","animation","area","background","backgroundOp","block","border","borderObj","breakWord","center","clampc","class","color","cursor","em","filtera","flex","fluid","fluidc","font","gpos","gradient","height","icon","id","index","initLetter","italic","items","keySet","kind","layout","left","mar","marginOp","maxWidth","onScroll","onTap","pad","preffersId","raster","removeDecoration","responsive","shadow","size","span","stroke","tag","top","transform","type","url","vtn","width"],"gridOverlay":["breakpoint","color","columns","font","fontSize","id","inset","letterSpacing","lineOpacity","lineWidth","markSize","marks","mobile","position","readouts","rows","type","uppercase","zIndex"],"store":["color","country","domain","font","id","keySet","language","token","type"],"product":["absolute","action","align","alignItems","alignIts","alignTo","aligns","alt","animate","animation","area","ariaLabel","as","at","backTo","background","backgroundCard","backgroundColor","backgroundOp","barPad","behaviour","blast","blastData","block","bold","border","borderBottom","borderObj","borderObja","brand","breakWord","breakpoint","breakpoints","cart","center","centerColumn","centerSelf","checkedBackgroundColor","child","children","clampc","class","clipPath","colat","color","column","contentWidth","cursor","customAlign","customJustify","customStyle","data","decoding","desktopSize","diameter","discountCodes","disp","dropdown","els","em","fetchPriority","filter","filtera","fitContent","fixMobileTap","fixed","flex","flexCenter","flexDir","fluid","fluidc","font","ga","gap","gpos","gradient","hamColour","hamburgerColour","hamburgerInset","handle","height","hideOverflow","hover","icon","id","index","initLetter","inline","inpad","isBackground","isFull","isHidden","isLink","isNavA","isSide","italic","items","justifo","justify","keySet","kind","label","layout","left","link","loading","map","mar","margin","marginOp","maxHeight","maxWidth","mboth","menuId","menuLabel","method","minHeight","mobile","mobileSize","mode","name","new","nowrap","objectFit","objectPosition","offcanvas","onScroll","onTap","opacity","openColor","overflow","owrap","pad","padding","position","positions","preffersId","query","radius","ranges","raster","react","removeDecoration","resmar","respad","responsive","resprop","reveal","rounded","scale","sequence","shadow","sides","simpleBorder","simpleCenter","size","sizes","spacing","span","srcset","sticky","store","stretch","stroke","stype","tag","tags","target","templateCols","text","theme","title","toColumn","top","transform","transition","type","url","useBrightness","value","vtn","weight","width","wrap","x","y","zIndex"],"price":["color","font","id","keySet","query","text","type"],"productData":["color","font","id","keySet","query","text","type"],"productMedia":["alt","color","font","height","id","keySet","query","type","url","width"],"variantPicker":["color","font","id","keySet","text","type"],"buy":["cart","color","font","id","keySet","mode","store","text","type","url"],"cart":["color","discountCodes","font","id","keySet","target","theme","type"]};
|
|
18
18
|
|
|
19
19
|
// Declared value shapes, keyed "type.param". Only parameters whose source
|
|
20
20
|
// carries a `//@ name {unit}:` annotation appear, so this grows as the
|
|
21
21
|
// library documents itself and never claims a shape it was not told.
|
|
22
|
-
export const ELEMENT_PARAM_UNITS = {"h1.area":"text","h1.background":"color","h1.borderObj":"object","h1.color":"color","h1.cursor":"css-cursor","h1.height":"css-length","h1.keySet":"keyset","h1.mar":"sides","h1.maxWidth":"css-length","h1.raster":"nodes","h1.resprop":"breakpoints","h1.size":"scale-step","h1.transform":"css-transform","h1.width":"css-length","h2.area":"text","h2.background":"color","h2.borderObj":"object","h2.color":"color","h2.cursor":"css-cursor","h2.height":"css-length","h2.keySet":"keyset","h2.mar":"sides","h2.maxWidth":"css-length","h2.raster":"nodes","h2.resprop":"breakpoints","h2.size":"scale-step","h2.transform":"css-transform","h2.width":"css-length","h3.area":"text","h3.background":"color","h3.borderObj":"object","h3.color":"color","h3.cursor":"css-cursor","h3.height":"css-length","h3.keySet":"keyset","h3.mar":"sides","h3.maxWidth":"css-length","h3.raster":"nodes","h3.resprop":"breakpoints","h3.size":"scale-step","h3.transform":"css-transform","h3.width":"css-length","h4.area":"text","h4.background":"color","h4.borderObj":"object","h4.color":"color","h4.cursor":"css-cursor","h4.height":"css-length","h4.keySet":"keyset","h4.mar":"sides","h4.maxWidth":"css-length","h4.raster":"nodes","h4.resprop":"breakpoints","h4.size":"scale-step","h4.transform":"css-transform","h4.width":"css-length","h5.area":"text","h5.background":"color","h5.borderObj":"object","h5.color":"color","h5.cursor":"css-cursor","h5.height":"css-length","h5.keySet":"keyset","h5.mar":"sides","h5.maxWidth":"css-length","h5.raster":"nodes","h5.resprop":"breakpoints","h5.size":"scale-step","h5.transform":"css-transform","h5.width":"css-length","h6.area":"text","h6.background":"color","h6.borderObj":"object","h6.color":"color","h6.cursor":"css-cursor","h6.height":"css-length","h6.keySet":"keyset","h6.mar":"sides","h6.maxWidth":"css-length","h6.raster":"nodes","h6.resprop":"breakpoints","h6.size":"scale-step","h6.transform":"css-transform","h6.width":"css-length","p.area":"text","p.background":"color","p.borderObj":"object","p.color":"color","p.cursor":"css-cursor","p.height":"css-length","p.keySet":"keyset","p.mar":"sides","p.maxWidth":"css-length","p.raster":"nodes","p.resprop":"breakpoints","p.size":"scale-step","p.transform":"css-transform","p.width":"css-length","img.area":"text","img.color":"color","img.height":"css-length","img.keySet":"keyset","img.maxWidth":"css-length","img.opacity":"ratio","img.radius":"px-or-length","img.resprop":"breakpoints","img.reveal":"object","img.width":"css-length","img.zIndex":"count","a.background":"color","a.borderObj":"object","a.color":"color","a.hover":"object","a.mar":"sides","a.maxWidth":"css-length","a.pad":"sides","a.radius":"px-or-length","a.transform":"css-transform","a.width":"css-length","cards.area":"text","cards.background":"color","cards.borderObj":"object","cards.color":"color","cards.cursor":"css-cursor","cards.height":"css-length","cards.hover":"object","cards.keySet":"keyset","cards.mar":"sides","cards.maxHeight":"css-length","cards.maxWidth":"css-length","cards.opacity":"ratio","cards.pad":"sides","cards.radius":"px-or-length","cards.raster":"nodes","cards.resmar":"breakpoints","cards.respad":"breakpoints","cards.resprop":"breakpoints","cards.size":"scale-step","cards.transform":"css-transform","cards.width":"css-length","cards.zIndex":"count","nav.area":"text","nav.background":"color","nav.borderObj":"object","nav.breakpoint":"px-or-length","nav.color":"color","nav.cursor":"css-cursor","nav.font":"text","nav.hamburgerColour":"color","nav.height":"css-length","nav.hover":"object","nav.keySet":"keyset","nav.mar":"sides","nav.maxHeight":"css-length","nav.maxWidth":"css-length","nav.menuLabel":"text","nav.opacity":"ratio","nav.pad":"sides","nav.radius":"px-or-length","nav.raster":"nodes","nav.resmar":"breakpoints","nav.respad":"breakpoints","nav.resprop":"breakpoints","nav.size":"scale-step","nav.transform":"css-transform","nav.width":"css-length","nav.zIndex":"count","sideNav.area":"text","sideNav.background":"color","sideNav.borderObj":"object","sideNav.color":"color","sideNav.cursor":"css-cursor","sideNav.height":"css-length","sideNav.hover":"object","sideNav.keySet":"keyset","sideNav.mar":"sides","sideNav.maxHeight":"css-length","sideNav.maxWidth":"css-length","sideNav.opacity":"ratio","sideNav.pad":"sides","sideNav.radius":"px-or-length","sideNav.raster":"nodes","sideNav.resmar":"breakpoints","sideNav.respad":"breakpoints","sideNav.resprop":"breakpoints","sideNav.size":"scale-step","sideNav.transform":"css-transform","sideNav.width":"css-length","sideNav.zIndex":"count","row.area":"text","row.background":"color","row.borderObj":"object","row.color":"color","row.cursor":"css-cursor","row.height":"css-length","row.keySet":"keyset","row.mar":"sides","row.maxWidth":"css-length","row.radius":"px-or-length","row.raster":"nodes","row.size":"scale-step","row.transform":"css-transform","row.width":"css-length","radio.color":"color","radio.exact":"css-length","input.background":"color","input.color":"color","input.exact":"css-length","input.mar":"sides","input.maxWidth":"css-length","input.pad":"sides","input.radius":"px-or-length","input.theme":"object","labelInput.color":"color","labelInput.exact":"css-length","labelInput.mar":"sides","labelInput.pad":"sides","filePicker.background":"color","filePicker.color":"color","filePicker.radius":"px-or-length","picker.background":"color","picker.mar":"sides","picker.pad":"sides","picker.radius":"px-or-length","video.aspectRatio":"css-aspect-ratio","video.autoplay":"bool","video.background":"color","video.controls":"bool","video.decorative":"bool","video.height":"css-length","video.id":"text","video.label":"text","video.lazy":"bool","video.loop":"bool","video.maxWidth":"css-length","video.muted":"bool","video.objectFit":"enum(cover|contain|fill|none|scale-down)","video.opacity":"ratio","video.playsinline":"bool","video.poster":"url","video.preload":"enum(none|metadata|auto)","video.radius":"px-or-length","video.raster":"nodes","video.sources":"array","video.width":"css-length","multiswitcher.area":"text","button.background":"color","button.color":"color","button.exact":"css-length","button.height":"css-length","button.keySet":"keyset","button.radius":"px-or-length","button.resmar":"breakpoints","button.respad":"breakpoints","button.width":"css-length","checkbox.area":"text","checkbox.background":"color","checkbox.borderObj":"object","checkbox.color":"color","checkbox.cursor":"css-cursor","checkbox.height":"css-length","checkbox.keySet":"keyset","checkbox.mar":"sides","checkbox.maxWidth":"css-length","checkbox.pad":"sides","checkbox.raster":"nodes","checkbox.resmar":"breakpoints","checkbox.respad":"breakpoints","checkbox.size":"scale-step","checkbox.transform":"css-transform","checkbox.width":"css-length","stack.height":"css-length","simple.height":"css-length","wrap.area":"text","wrap.background":"color","wrap.borderObj":"object","wrap.color":"color","wrap.cursor":"css-cursor","wrap.height":"css-length","wrap.keySet":"keyset","wrap.mar":"sides","wrap.maxHeight":"css-length","wrap.maxWidth":"css-length","wrap.opacity":"ratio","wrap.pad":"sides","wrap.radius":"px-or-length","wrap.raster":"nodes","wrap.resprop":"breakpoints","wrap.size":"scale-step","wrap.transform":"css-transform","wrap.width":"css-length","wrap.zIndex":"count","circle.transform":"css-transform","polygon.transform":"css-transform","code.transform":"css-transform","table.transform":"css-transform","ulist.area":"text","ulist.background":"color","ulist.borderObj":"object","ulist.color":"color","ulist.cursor":"css-cursor","ulist.height":"css-length","ulist.keySet":"keyset","ulist.mar":"sides","ulist.maxWidth":"css-length","ulist.pad":"sides","ulist.raster":"nodes","ulist.size":"scale-step","ulist.transform":"css-transform","ulist.width":"css-length","gridOverlay.breakpoint":"px-number","gridOverlay.color":"color","gridOverlay.columns":"count","gridOverlay.font":"text","gridOverlay.fontSize":"px-number","gridOverlay.inset":"px-number","gridOverlay.letterSpacing":"text","gridOverlay.lineOpacity":"ratio","gridOverlay.lineWidth":"px-number","gridOverlay.markSize":"px-number","gridOverlay.marks":"enum(square|cross|none)","gridOverlay.mobile":"object","gridOverlay.position":"enum(fixed|absolute)","gridOverlay.readouts":"array","gridOverlay.rows":"count","gridOverlay.uppercase":"bool","gridOverlay.zIndex":"count"};
|
|
22
|
+
export const ELEMENT_PARAM_UNITS = {"h1.area":"text","h1.background":"color","h1.borderObj":"object","h1.color":"color","h1.cursor":"css-cursor","h1.height":"css-length","h1.keySet":"keyset","h1.mar":"sides","h1.maxWidth":"css-length","h1.raster":"nodes","h1.resprop":"breakpoints","h1.size":"scale-step","h1.transform":"css-transform","h1.width":"css-length","h2.area":"text","h2.background":"color","h2.borderObj":"object","h2.color":"color","h2.cursor":"css-cursor","h2.height":"css-length","h2.keySet":"keyset","h2.mar":"sides","h2.maxWidth":"css-length","h2.raster":"nodes","h2.resprop":"breakpoints","h2.size":"scale-step","h2.transform":"css-transform","h2.width":"css-length","h3.area":"text","h3.background":"color","h3.borderObj":"object","h3.color":"color","h3.cursor":"css-cursor","h3.height":"css-length","h3.keySet":"keyset","h3.mar":"sides","h3.maxWidth":"css-length","h3.raster":"nodes","h3.resprop":"breakpoints","h3.size":"scale-step","h3.transform":"css-transform","h3.width":"css-length","h4.area":"text","h4.background":"color","h4.borderObj":"object","h4.color":"color","h4.cursor":"css-cursor","h4.height":"css-length","h4.keySet":"keyset","h4.mar":"sides","h4.maxWidth":"css-length","h4.raster":"nodes","h4.resprop":"breakpoints","h4.size":"scale-step","h4.transform":"css-transform","h4.width":"css-length","h5.area":"text","h5.background":"color","h5.borderObj":"object","h5.color":"color","h5.cursor":"css-cursor","h5.height":"css-length","h5.keySet":"keyset","h5.mar":"sides","h5.maxWidth":"css-length","h5.raster":"nodes","h5.resprop":"breakpoints","h5.size":"scale-step","h5.transform":"css-transform","h5.width":"css-length","h6.area":"text","h6.background":"color","h6.borderObj":"object","h6.color":"color","h6.cursor":"css-cursor","h6.height":"css-length","h6.keySet":"keyset","h6.mar":"sides","h6.maxWidth":"css-length","h6.raster":"nodes","h6.resprop":"breakpoints","h6.size":"scale-step","h6.transform":"css-transform","h6.width":"css-length","p.area":"text","p.background":"color","p.borderObj":"object","p.color":"color","p.cursor":"css-cursor","p.height":"css-length","p.keySet":"keyset","p.mar":"sides","p.maxWidth":"css-length","p.raster":"nodes","p.resprop":"breakpoints","p.size":"scale-step","p.transform":"css-transform","p.width":"css-length","img.area":"text","img.color":"color","img.height":"css-length","img.keySet":"keyset","img.maxWidth":"css-length","img.opacity":"ratio","img.radius":"px-or-length","img.resprop":"breakpoints","img.reveal":"object","img.width":"css-length","img.zIndex":"count","a.background":"color","a.borderObj":"object","a.color":"color","a.hover":"object","a.mar":"sides","a.maxWidth":"css-length","a.pad":"sides","a.radius":"px-or-length","a.transform":"css-transform","a.width":"css-length","cards.area":"text","cards.background":"color","cards.borderObj":"object","cards.color":"color","cards.cursor":"css-cursor","cards.height":"css-length","cards.hover":"object","cards.keySet":"keyset","cards.mar":"sides","cards.maxHeight":"css-length","cards.maxWidth":"css-length","cards.opacity":"ratio","cards.pad":"sides","cards.radius":"px-or-length","cards.raster":"nodes","cards.resmar":"breakpoints","cards.respad":"breakpoints","cards.resprop":"breakpoints","cards.size":"scale-step","cards.transform":"css-transform","cards.width":"css-length","cards.zIndex":"count","nav.area":"text","nav.background":"color","nav.borderObj":"object","nav.breakpoint":"px-or-length","nav.color":"color","nav.cursor":"css-cursor","nav.font":"text","nav.hamburgerColour":"color","nav.height":"css-length","nav.hover":"object","nav.keySet":"keyset","nav.mar":"sides","nav.maxHeight":"css-length","nav.maxWidth":"css-length","nav.menuLabel":"text","nav.opacity":"ratio","nav.pad":"sides","nav.radius":"px-or-length","nav.raster":"nodes","nav.resmar":"breakpoints","nav.respad":"breakpoints","nav.resprop":"breakpoints","nav.size":"scale-step","nav.transform":"css-transform","nav.width":"css-length","nav.zIndex":"count","sideNav.area":"text","sideNav.background":"color","sideNav.borderObj":"object","sideNav.color":"color","sideNav.cursor":"css-cursor","sideNav.height":"css-length","sideNav.hover":"object","sideNav.keySet":"keyset","sideNav.mar":"sides","sideNav.maxHeight":"css-length","sideNav.maxWidth":"css-length","sideNav.opacity":"ratio","sideNav.pad":"sides","sideNav.radius":"px-or-length","sideNav.raster":"nodes","sideNav.resmar":"breakpoints","sideNav.respad":"breakpoints","sideNav.resprop":"breakpoints","sideNav.size":"scale-step","sideNav.transform":"css-transform","sideNav.width":"css-length","sideNav.zIndex":"count","row.area":"text","row.background":"color","row.borderObj":"object","row.color":"color","row.cursor":"css-cursor","row.height":"css-length","row.keySet":"keyset","row.mar":"sides","row.maxWidth":"css-length","row.radius":"px-or-length","row.raster":"nodes","row.size":"scale-step","row.transform":"css-transform","row.width":"css-length","radio.color":"color","radio.exact":"css-length","input.background":"color","input.color":"color","input.exact":"css-length","input.mar":"sides","input.maxWidth":"css-length","input.pad":"sides","input.radius":"px-or-length","input.theme":"object","labelInput.color":"color","labelInput.exact":"css-length","labelInput.mar":"sides","labelInput.pad":"sides","filePicker.background":"color","filePicker.color":"color","filePicker.radius":"px-or-length","picker.background":"color","picker.mar":"sides","picker.pad":"sides","picker.radius":"px-or-length","video.aspectRatio":"css-aspect-ratio","video.autoplay":"bool","video.background":"color","video.controls":"bool","video.decorative":"bool","video.height":"css-length","video.id":"text","video.label":"text","video.lazy":"bool","video.loop":"bool","video.maxWidth":"css-length","video.muted":"bool","video.objectFit":"enum(cover|contain|fill|none|scale-down)","video.opacity":"ratio","video.playsinline":"bool","video.poster":"url","video.preload":"enum(none|metadata|auto)","video.radius":"px-or-length","video.raster":"nodes","video.sources":"array","video.width":"css-length","multiswitcher.area":"text","button.background":"color","button.color":"color","button.exact":"css-length","button.height":"css-length","button.keySet":"keyset","button.radius":"px-or-length","button.resmar":"breakpoints","button.respad":"breakpoints","button.width":"css-length","form.title":"text","checkbox.area":"text","checkbox.background":"color","checkbox.borderObj":"object","checkbox.color":"color","checkbox.cursor":"css-cursor","checkbox.height":"css-length","checkbox.keySet":"keyset","checkbox.mar":"sides","checkbox.maxWidth":"css-length","checkbox.pad":"sides","checkbox.raster":"nodes","checkbox.resmar":"breakpoints","checkbox.respad":"breakpoints","checkbox.size":"scale-step","checkbox.transform":"css-transform","checkbox.width":"css-length","stack.height":"css-length","simple.height":"css-length","wrap.area":"text","wrap.background":"color","wrap.borderObj":"object","wrap.color":"color","wrap.cursor":"css-cursor","wrap.height":"css-length","wrap.keySet":"keyset","wrap.mar":"sides","wrap.maxHeight":"css-length","wrap.maxWidth":"css-length","wrap.opacity":"ratio","wrap.pad":"sides","wrap.radius":"px-or-length","wrap.raster":"nodes","wrap.resprop":"breakpoints","wrap.size":"scale-step","wrap.transform":"css-transform","wrap.width":"css-length","wrap.zIndex":"count","circle.transform":"css-transform","polygon.transform":"css-transform","code.transform":"css-transform","table.transform":"css-transform","ulist.area":"text","ulist.background":"color","ulist.borderObj":"object","ulist.color":"color","ulist.cursor":"css-cursor","ulist.height":"css-length","ulist.keySet":"keyset","ulist.mar":"sides","ulist.maxWidth":"css-length","ulist.pad":"sides","ulist.raster":"nodes","ulist.size":"scale-step","ulist.transform":"css-transform","ulist.width":"css-length","gridOverlay.breakpoint":"px-number","gridOverlay.color":"color","gridOverlay.columns":"count","gridOverlay.font":"text","gridOverlay.fontSize":"px-number","gridOverlay.inset":"px-number","gridOverlay.letterSpacing":"text","gridOverlay.lineOpacity":"ratio","gridOverlay.lineWidth":"px-number","gridOverlay.markSize":"px-number","gridOverlay.marks":"enum(square|cross|none)","gridOverlay.mobile":"object","gridOverlay.position":"enum(fixed|absolute)","gridOverlay.readouts":"array","gridOverlay.rows":"count","gridOverlay.uppercase":"bool","gridOverlay.zIndex":"count","store.color":"color","store.country":"text","store.domain":"url","store.keySet":"keyset","store.language":"text","store.token":"text","product.area":"text","product.background":"color","product.borderObj":"object","product.color":"color","product.cursor":"css-cursor","product.handle":"text","product.height":"css-length","product.hover":"object","product.keySet":"keyset","product.mar":"sides","product.maxHeight":"css-length","product.maxWidth":"css-length","product.opacity":"ratio","product.pad":"sides","product.radius":"px-or-length","product.raster":"nodes","product.resmar":"breakpoints","product.respad":"breakpoints","product.resprop":"breakpoints","product.size":"scale-step","product.theme":"object","product.transform":"css-transform","product.width":"css-length","product.zIndex":"count","price.color":"color","price.keySet":"keyset","price.query":"text","price.text":"text","productData.color":"color","productData.keySet":"keyset","productData.query":"text","productData.text":"text","productMedia.alt":"text","productMedia.color":"color","productMedia.height":"count","productMedia.keySet":"keyset","productMedia.query":"text","productMedia.url":"url","productMedia.width":"count","variantPicker.color":"color","variantPicker.keySet":"keyset","variantPicker.text":"text","buy.cart":"text","buy.color":"color","buy.keySet":"keyset","buy.mode":"enum(cart|buyNow)","buy.store":"text","buy.text":"text","buy.url":"url","cart.color":"color","cart.discountCodes":"text","cart.keySet":"keyset","cart.target":"text","cart.theme":"object"};
|
package/lib/grid-geometry.js
CHANGED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* nodality v1.3.16
|
|
3
|
+
* (c) 2026 Filip Vabrousek
|
|
4
|
+
* License: MIT
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
// known-inert.js — parameters the schema advertises for a type and the type
|
|
8
|
+
// ignores.
|
|
9
|
+
//
|
|
10
|
+
// One list, read by two things: the conformance test (which fails if a new
|
|
11
|
+
// inert parameter appears, or if one listed here starts working) and
|
|
12
|
+
// validate_nodes (which warns a page author who uses one, as PARAM_INERT).
|
|
13
|
+
// It used to live only in the test, so the suite knew a parameter did nothing
|
|
14
|
+
// while the validator told the author the page was fine.
|
|
15
|
+
//
|
|
16
|
+
// A baseline, not an allowlist: each entry is a known defect.
|
|
17
|
+
|
|
18
|
+
export const KNOWN_INERT = new Set([
|
|
19
|
+
// The mapper builds its own options and never consults the element, so
|
|
20
|
+
// the component's vocabulary is unreachable however faithfully it reads.
|
|
21
|
+
// Fixing one means changing how every existing page of that type renders,
|
|
22
|
+
// so each is recorded here rather than quietly patched.
|
|
23
|
+
// Text elements: the element TYPE picks the fluid step, because in Text
|
|
24
|
+
// the step also picks the tag — honouring `size` here turned an h2 into an
|
|
25
|
+
// h3 and changed the document outline. `tag` is the settable option.
|
|
26
|
+
"h1.size", "h2.size", "h3.size", "h4.size", "h5.size", "h6.size", "p.size",
|
|
27
|
+
// a
|
|
28
|
+
"a.transform",
|
|
29
|
+
// checkbox
|
|
30
|
+
"checkbox.area",
|
|
31
|
+
"checkbox.background",
|
|
32
|
+
"checkbox.color",
|
|
33
|
+
"checkbox.cursor",
|
|
34
|
+
"checkbox.height",
|
|
35
|
+
"checkbox.keySet",
|
|
36
|
+
"checkbox.mar",
|
|
37
|
+
"checkbox.maxWidth",
|
|
38
|
+
"checkbox.pad",
|
|
39
|
+
"checkbox.transform",
|
|
40
|
+
"checkbox.width",
|
|
41
|
+
// circle
|
|
42
|
+
"circle.transform",
|
|
43
|
+
// code
|
|
44
|
+
"code.transform",
|
|
45
|
+
// filePicker
|
|
46
|
+
"filePicker.radius",
|
|
47
|
+
// labelInput
|
|
48
|
+
"labelInput.color",
|
|
49
|
+
"labelInput.exact",
|
|
50
|
+
// nav
|
|
51
|
+
"nav.area",
|
|
52
|
+
"nav.cursor",
|
|
53
|
+
"nav.height",
|
|
54
|
+
"nav.maxHeight",
|
|
55
|
+
"nav.maxWidth",
|
|
56
|
+
"nav.opacity",
|
|
57
|
+
"nav.size",
|
|
58
|
+
"nav.transform",
|
|
59
|
+
"nav.width",
|
|
60
|
+
"nav.zIndex",
|
|
61
|
+
// polygon
|
|
62
|
+
"polygon.transform",
|
|
63
|
+
// radio
|
|
64
|
+
"radio.color",
|
|
65
|
+
"radio.exact",
|
|
66
|
+
// sideNav
|
|
67
|
+
"sideNav.area",
|
|
68
|
+
"sideNav.background",
|
|
69
|
+
"sideNav.color",
|
|
70
|
+
"sideNav.cursor",
|
|
71
|
+
"sideNav.height",
|
|
72
|
+
"sideNav.keySet",
|
|
73
|
+
"sideNav.mar",
|
|
74
|
+
"sideNav.maxHeight",
|
|
75
|
+
"sideNav.maxWidth",
|
|
76
|
+
"sideNav.opacity",
|
|
77
|
+
"sideNav.pad",
|
|
78
|
+
"sideNav.radius",
|
|
79
|
+
"sideNav.size",
|
|
80
|
+
"sideNav.transform",
|
|
81
|
+
"sideNav.width",
|
|
82
|
+
"sideNav.zIndex",
|
|
83
|
+
// table
|
|
84
|
+
"table.transform",
|
|
85
|
+
]);
|