nodality 1.3.19 → 1.3.21
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/mcp-server.mjs +8 -3
- package/bin/nodality.mjs +41 -0
- package/dist/animator.cjs.js +1 -1
- package/dist/animator.cjs.js.LICENSE.txt +1 -1
- package/dist/animator.esm.js +1 -1
- package/dist/animator.esm.js.LICENSE.txt +1 -1
- package/dist/audionew.cjs.js +1 -1
- package/dist/audionew.cjs.js.LICENSE.txt +1 -1
- package/dist/audionew.esm.js +1 -1
- package/dist/audionew.esm.js.LICENSE.txt +1 -1
- package/dist/base.cjs.js +1 -1
- package/dist/base.cjs.js.LICENSE.txt +1 -1
- package/dist/base.esm.js +1 -1
- package/dist/base.esm.js.LICENSE.txt +1 -1
- package/dist/beta-desktop-bar.cjs.js +1 -1
- package/dist/beta-desktop-bar.cjs.js.LICENSE.txt +1 -1
- package/dist/beta-desktop-bar.esm.js +1 -1
- package/dist/beta-desktop-bar.esm.js.LICENSE.txt +1 -1
- package/dist/beta-mobile-bar.cjs.js +1 -1
- package/dist/beta-mobile-bar.cjs.js.LICENSE.txt +1 -1
- package/dist/beta-mobile-bar.esm.js +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 +1 -1
- package/dist/button.cjs.js.LICENSE.txt +1 -1
- package/dist/button.esm.js +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 +1 -1
- package/dist/center.cjs.js.LICENSE.txt +1 -1
- package/dist/center.esm.js +1 -1
- package/dist/center.esm.js.LICENSE.txt +1 -1
- package/dist/checkbox.cjs.js +1 -1
- package/dist/checkbox.cjs.js.LICENSE.txt +1 -1
- package/dist/checkbox.esm.js +1 -1
- package/dist/checkbox.esm.js.LICENSE.txt +1 -1
- package/dist/code.cjs.js +1 -1
- package/dist/code.cjs.js.LICENSE.txt +1 -1
- package/dist/code.esm.js +1 -1
- package/dist/code.esm.js.LICENSE.txt +1 -1
- package/dist/container.cjs.js +1 -1
- package/dist/container.cjs.js.LICENSE.txt +1 -1
- package/dist/container.esm.js +1 -1
- package/dist/container.esm.js.LICENSE.txt +1 -1
- package/dist/data-list.cjs.js +1 -1
- package/dist/data-list.cjs.js.LICENSE.txt +1 -1
- package/dist/data-list.esm.js +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 +1 -1
- package/dist/finalresult.esm.js.LICENSE.txt +1 -1
- package/dist/flex-card.cjs.js +1 -1
- package/dist/flex-card.cjs.js.LICENSE.txt +1 -1
- package/dist/flex-card.esm.js +1 -1
- package/dist/flex-card.esm.js.LICENSE.txt +1 -1
- package/dist/flex-grid.cjs.js +1 -1
- package/dist/flex-grid.cjs.js.LICENSE.txt +1 -1
- package/dist/flex-grid.esm.js +1 -1
- package/dist/flex-grid.esm.js.LICENSE.txt +1 -1
- package/dist/flex-row.cjs.js +1 -1
- package/dist/flex-row.cjs.js.LICENSE.txt +1 -1
- package/dist/flex-row.esm.js +1 -1
- package/dist/flex-row.esm.js.LICENSE.txt +1 -1
- package/dist/floating-input.cjs.js +1 -1
- package/dist/floating-input.cjs.js.LICENSE.txt +1 -1
- package/dist/floating-input.esm.js +1 -1
- package/dist/floating-input.esm.js.LICENSE.txt +1 -1
- package/dist/free.cjs.js +1 -1
- package/dist/free.cjs.js.LICENSE.txt +1 -1
- package/dist/free.esm.js +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 +1 -1
- package/dist/image-picker.cjs.js.LICENSE.txt +1 -1
- package/dist/image-picker.esm.js +1 -1
- package/dist/image-picker.esm.js.LICENSE.txt +1 -1
- package/dist/image.cjs.js +1 -1
- package/dist/image.cjs.js.LICENSE.txt +1 -1
- package/dist/image.esm.js +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 +3 -2
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.LICENSE.txt +1 -1
- package/dist/keyframe-animation.cjs.js.LICENSE.txt +1 -1
- package/dist/keyframe-animation.esm.js.LICENSE.txt +1 -1
- package/dist/link-getter.cjs.js +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 +1 -1
- package/dist/meta-adder.cjs.js.LICENSE.txt +1 -1
- package/dist/meta-adder.esm.js +1 -1
- package/dist/meta-adder.esm.js.LICENSE.txt +1 -1
- package/dist/modal-2025.cjs.js +1 -1
- package/dist/modal-2025.cjs.js.LICENSE.txt +1 -1
- package/dist/modal-2025.esm.js +1 -1
- package/dist/modal-2025.esm.js.LICENSE.txt +1 -1
- package/dist/multiswitcher.cjs.js +1 -1
- package/dist/multiswitcher.cjs.js.LICENSE.txt +1 -1
- package/dist/multiswitcher.esm.js +1 -1
- package/dist/multiswitcher.esm.js.LICENSE.txt +1 -1
- package/dist/new-nav-bar.cjs.js +1 -1
- package/dist/new-nav-bar.cjs.js.LICENSE.txt +1 -1
- package/dist/new-nav-bar.esm.js +1 -1
- package/dist/new-nav-bar.esm.js.LICENSE.txt +1 -1
- package/dist/picker.cjs.js +1 -1
- package/dist/picker.cjs.js.LICENSE.txt +1 -1
- package/dist/picker.esm.js +1 -1
- package/dist/picker.esm.js.LICENSE.txt +1 -1
- package/dist/progress.cjs.js +1 -1
- package/dist/progress.cjs.js.LICENSE.txt +1 -1
- package/dist/progress.esm.js +1 -1
- package/dist/progress.esm.js.LICENSE.txt +1 -1
- package/dist/radio.cjs.js +1 -1
- package/dist/radio.cjs.js.LICENSE.txt +1 -1
- package/dist/radio.esm.js +1 -1
- package/dist/radio.esm.js.LICENSE.txt +1 -1
- package/dist/range.cjs.js +1 -1
- package/dist/range.cjs.js.LICENSE.txt +1 -1
- package/dist/range.esm.js +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 +1 -1
- package/dist/side-bar.cjs.js.LICENSE.txt +1 -1
- package/dist/side-bar.esm.js +1 -1
- package/dist/side-bar.esm.js.LICENSE.txt +1 -1
- package/dist/side-nav-bar.cjs.js +1 -1
- package/dist/side-nav-bar.cjs.js.LICENSE.txt +1 -1
- package/dist/side-nav-bar.esm.js +1 -1
- package/dist/side-nav-bar.esm.js.LICENSE.txt +1 -1
- package/dist/simple-bar.cjs.js +1 -1
- package/dist/simple-bar.cjs.js.LICENSE.txt +1 -1
- package/dist/simple-bar.esm.js +1 -1
- package/dist/simple-bar.esm.js.LICENSE.txt +1 -1
- package/dist/slider-2025.cjs.js +1 -1
- package/dist/slider-2025.cjs.js.LICENSE.txt +1 -1
- package/dist/slider-2025.esm.js +1 -1
- package/dist/slider-2025.esm.js.LICENSE.txt +1 -1
- package/dist/spacer.cjs.js +1 -1
- package/dist/spacer.cjs.js.LICENSE.txt +1 -1
- package/dist/spacer.esm.js +1 -1
- package/dist/spacer.esm.js.LICENSE.txt +1 -1
- package/dist/stack.cjs.js +1 -1
- package/dist/stack.cjs.js.LICENSE.txt +1 -1
- package/dist/stack.esm.js +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 +1 -1
- package/dist/table.cjs.js.LICENSE.txt +1 -1
- package/dist/table.esm.js +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 +1 -1
- package/dist/text.cjs.js.LICENSE.txt +1 -1
- package/dist/text.esm.js +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 +1 -1
- package/dist/ulist.cjs.js.LICENSE.txt +1 -1
- package/dist/ulist.esm.js +1 -1
- package/dist/ulist.esm.js.LICENSE.txt +1 -1
- package/dist/video.cjs.js +1 -1
- package/dist/video.cjs.js.LICENSE.txt +1 -1
- package/dist/video.esm.js +1 -1
- package/dist/video.esm.js.LICENSE.txt +1 -1
- package/dist/wrap.cjs.js +1 -1
- package/dist/wrap.cjs.js.LICENSE.txt +1 -1
- package/dist/wrap.esm.js +1 -1
- package/dist/wrap.esm.js.LICENSE.txt +1 -1
- package/dist/zoom-card.cjs.js +1 -1
- package/dist/zoom-card.cjs.js.LICENSE.txt +1 -1
- package/dist/zoom-card.esm.js +1 -1
- package/dist/zoom-card.esm.js.LICENSE.txt +1 -1
- package/layout/animator.js +191 -135
- package/layout/audio.js +1 -1
- package/layout/audionew.js +1 -1
- package/layout/base.js +1 -1
- package/layout/beta-desktop-bar.js +7 -1
- package/layout/beta-mobile-bar.js +13 -3
- 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 +9 -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 +7 -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 +14 -2
- package/lib/codegen.js +1 -1
- package/lib/data.js +1 -1
- package/lib/designer.js +1 -1
- package/lib/element-mapper.js +23 -8
- 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 +8 -9
- 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 +9 -2
- package/lib/webmcp-adapter.js +1 -1
- package/package.json +2 -1
- package/schema.json +10100 -2535
- package/scripts/generate-schema.mjs +83 -2
- package/skills/nodality/SKILL.md +16 -3
|
@@ -273,6 +273,34 @@ function annotationFor(table, name, from, type, qualified) {
|
|
|
273
273
|
return (qualified ? DESC_GLOBAL : DEPR_GLOBAL)[name];
|
|
274
274
|
}
|
|
275
275
|
|
|
276
|
+
// ── 6b. what commonMethods applies ───────────────────────────────────
|
|
277
|
+
// Read from animator.js itself, so the list cannot drift from the code.
|
|
278
|
+
const ANIMATOR = join(ROOT, "layout", "animator.js");
|
|
279
|
+
const ANIMATOR_SRC = readFileSync(ANIMATOR, "utf8");
|
|
280
|
+
const STYLE_MAP = (() => {
|
|
281
|
+
const m = ANIMATOR_SRC.match(/const STYLE_OPTIONS = \{([\s\S]*?)\n\};/);
|
|
282
|
+
const map = {};
|
|
283
|
+
if (m) for (const e of m[1].matchAll(/^\s*([A-Za-z][A-Za-z0-9]*)\s*:\s*"([A-Za-z]+)"/gm)) map[e[1]] = e[2];
|
|
284
|
+
return map;
|
|
285
|
+
})();
|
|
286
|
+
const STYLE_OPTIONS = Object.keys(STYLE_MAP);
|
|
287
|
+
const PIXELS_WHEN_BARE = new Set((ANIMATOR_SRC.match(/const PIXELS_WHEN_BARE = new Set\(\[([\s\S]*?)\]\)/) || [, ""])[1]
|
|
288
|
+
.match(/"([A-Za-z]+)"/g)?.map((s) => s.slice(1, -1)) || []);
|
|
289
|
+
// Of the options commonMethods reads by name, the ones it applies to the
|
|
290
|
+
// element itself on every component. The rest (theme, noTheme, hide, size,
|
|
291
|
+
// center, raster, …) depend on the component or on a theme being set, and are
|
|
292
|
+
// credited where a component reads them, if at all.
|
|
293
|
+
const COMMON_CREDITED = ["pad", "mar", "weight", "bold", "borderObj", "respad", "resmar"];
|
|
294
|
+
const COMMON_READS = (() => {
|
|
295
|
+
const start = ANIMATOR_SRC.search(/\bcommonMethods\s*\(\s*obj\s*\)\s*\{/);
|
|
296
|
+
if (start < 0) return [];
|
|
297
|
+
// The method ends at the first line that closes it at its own indentation.
|
|
298
|
+
const rest = ANIMATOR_SRC.slice(start);
|
|
299
|
+
const end = rest.search(/\n\t\t\}\s*\n/);
|
|
300
|
+
const body = end > 0 ? rest.slice(0, end) : rest.slice(0, 20000);
|
|
301
|
+
return [...new Set([...body.matchAll(/\bobj\.([a-zA-Z][a-zA-Z0-9]*)/g)].map((x) => x[1]))];
|
|
302
|
+
})();
|
|
303
|
+
|
|
276
304
|
// ── 7. assemble ──────────────────────────────────────────────────────
|
|
277
305
|
const schema = { generated: "scripts/generate-schema.mjs", types: {} };
|
|
278
306
|
let resolved = 0;
|
|
@@ -365,11 +393,60 @@ for (const type of TYPES) {
|
|
|
365
393
|
// component's own set() — currently `loop`. Component scans never see them,
|
|
366
394
|
// because they are read in animator.js. Credited only where the type has no
|
|
367
395
|
// parameter of that name already: `video` has its own boolean `loop`.
|
|
368
|
-
const ANIMATOR = join(ROOT, "layout", "animator.js");
|
|
369
396
|
const onAnimator = files.some((f) => { try { return /extends\s+Animator\b/.test(readFileSync(f, "utf8")); } catch { return false; } });
|
|
370
397
|
// And only where the element's options reach the component at all.
|
|
371
398
|
if (onAnimator && forwardsElement) for (const p of ["loop"]) if (!params.has(p)) contributed(p, ANIMATOR);
|
|
372
399
|
|
|
400
|
+
// Options commonMethods applies, for every component that runs it. Two
|
|
401
|
+
// kinds, both read in animator.js where no component scan looks: the
|
|
402
|
+
// CSS-named options of STYLE_OPTIONS (lineHeight, gap, exact, weight, …),
|
|
403
|
+
// read through a map rather than by name, and the ones commonMethods reads
|
|
404
|
+
// by name (pad, mar, hover, borderObj, …). Missing them made the schema
|
|
405
|
+
// omit working options and the validator report them as PARAM_NOT_ON_TYPE —
|
|
406
|
+
// "accepted and ignored" — so pages used keySet for options the library
|
|
407
|
+
// had. Until 1.3.21.
|
|
408
|
+
//
|
|
409
|
+
// Credited only through the component that RECEIVES the element's options:
|
|
410
|
+
// a type is often built from several classes, and the one that runs
|
|
411
|
+
// commonMethods may be a helper — checkbox renders its label with Text,
|
|
412
|
+
// which runs it, while the element's options go to Checkbox, which does not.
|
|
413
|
+
// Crediting by "some component runs it" claimed working options for a
|
|
414
|
+
// checkbox that ignores every one of them. Where the receiving class cannot
|
|
415
|
+
// be identified, nothing is credited.
|
|
416
|
+
// Each `new X(` owns the code up to the next one; X receives the element's
|
|
417
|
+
// options if that stretch hands them over (elOpts, a spread, or an alias).
|
|
418
|
+
// Looked for in the mapper's OWN body, not in the helpers it calls: sideNav
|
|
419
|
+
// hands the element's options to a Link inside a helper while its root,
|
|
420
|
+
// SideNav, takes none, and crediting through the helper claimed every
|
|
421
|
+
// style option for a component that applies not one. A mapper whose own
|
|
422
|
+
// body constructs nothing is a delegate, and its helpers are its body.
|
|
423
|
+
// Capped at the next static declaration: methodBody's brace matcher loses
|
|
424
|
+
// its place in sideNav's 300-line body and returned 52 kB — the rest of the
|
|
425
|
+
// file — so every later mapper's construction counted as sideNav's own.
|
|
426
|
+
const ownRaw = method ? methodBody(method) : "";
|
|
427
|
+
const nextStatic = ownRaw.search(/\n\s{4}static\s+[A-Za-z_]\w*\s*\(/);
|
|
428
|
+
const ownBody = nextStatic > 0 ? ownRaw.slice(0, nextStatic) : ownRaw;
|
|
429
|
+
const scope = /\bnew\s+[A-Z]/.test(ownBody) ? ownBody : body;
|
|
430
|
+
const news = [...scope.matchAll(/\bnew\s+([A-Z]\w*)\s*\(/g)];
|
|
431
|
+
const receivers = news.filter((h, i) => {
|
|
432
|
+
const seg = scope.slice(h.index, i + 1 < news.length ? news[i + 1].index : h.index + 3000);
|
|
433
|
+
return /\.set\s*\(/.test(seg) && (/\belOpts\s*\(/.test(seg) || /\.\.\.el\b/.test(seg)
|
|
434
|
+
|| aliases.some((a) => new RegExp(`\\.set\\(\\s*${a}\\s*[,)]`).test(seg)));
|
|
435
|
+
}).map((h) => h[1]);
|
|
436
|
+
const runsCommon = receivers.some((c) => {
|
|
437
|
+
const f = fileFor(c);
|
|
438
|
+
try { return !!f && /\bcommonMethods\s*\(/.test(readFileSync(f, "utf8")); } catch { return false; }
|
|
439
|
+
});
|
|
440
|
+
if (runsCommon && forwardsElement) {
|
|
441
|
+
for (const p of [...STYLE_OPTIONS, ...COMMON_CREDITED]) if (!params.has(p)) contributed(p, ANIMATOR);
|
|
442
|
+
}
|
|
443
|
+
// A mapper that builds its own options but forwards the element's style
|
|
444
|
+
// options with styleOptionsOf(el) (nav, the commerce types) is credited
|
|
445
|
+
// with exactly those.
|
|
446
|
+
if (/\bstyleOptionsOf\s*\(/.test(body)) {
|
|
447
|
+
for (const p of STYLE_OPTIONS) if (!params.has(p)) contributed(p, ANIMATOR);
|
|
448
|
+
}
|
|
449
|
+
|
|
373
450
|
// NOTE. A `settable` flag was attempted here and removed. The question it
|
|
374
451
|
// was meant to answer -- which of these parameters an AUTHOR can set on the
|
|
375
452
|
// element, as opposed to which the components READ -- is real and still
|
|
@@ -389,7 +466,11 @@ for (const type of TYPES) {
|
|
|
389
466
|
components: classes,
|
|
390
467
|
params: [...params].sort().map((name) => {
|
|
391
468
|
const where = from.get(name) || [];
|
|
392
|
-
const description = annotationFor(DESC_BY_FILE, name, where, type, true)
|
|
469
|
+
const description = annotationFor(DESC_BY_FILE, name, where, type, true)
|
|
470
|
+
|| (where.includes(ANIMATOR) && STYLE_MAP[name]
|
|
471
|
+
? `CSS ${STYLE_MAP[name].replace(/[A-Z]/g, (c) => "-" + c.toLowerCase())}, written verbatim.`
|
|
472
|
+
+ (PIXELS_WHEN_BARE.has(name) ? " A bare number is read as px." : "")
|
|
473
|
+
: undefined);
|
|
393
474
|
const deprecated = annotationFor(DEPR_BY_FILE, name, where, type, false);
|
|
394
475
|
const unit = (UNIT_BY_TYPE[type] && UNIT_BY_TYPE[type][name])
|
|
395
476
|
|| where.map((f) => (UNIT_BY_FILE.get(f) || {})[name]).find(Boolean)
|
package/skills/nodality/SKILL.md
CHANGED
|
@@ -202,9 +202,16 @@ A complete navigation graph is one node:
|
|
|
202
202
|
- **Never touch the DOM to style or fix a Nodality page.** No
|
|
203
203
|
`el.style.*`, no `createElement` in page code, no post-render DOM
|
|
204
204
|
patching. If the library cannot express something, the fix is a custom
|
|
205
|
-
element/op (extend the library)
|
|
206
|
-
|
|
207
|
-
|
|
205
|
+
element/op (extend the library).
|
|
206
|
+
- **Style with options, not keySet.** Elements take styling as options:
|
|
207
|
+
the library's own names (`exact` for font size, `weight`, `pad`, `mar`,
|
|
208
|
+
`radius`, `gpos`, `borderObj`) and the CSS-named options every element
|
|
209
|
+
accepts (`lineHeight`, `letterSpacing`, `textTransform`, `gap`,
|
|
210
|
+
`alignContent`, `justifyContent`, `boxShadow`, `backdropFilter`,
|
|
211
|
+
`borderTop`, …). `get_schema <type>` lists them. Responsive values go in
|
|
212
|
+
`resprop`, which takes CSS names. `keySet: [{ key, value }]` is the escape
|
|
213
|
+
hatch for a property no option names — reach for it last, and if the same
|
|
214
|
+
property keeps needing it, extend the library instead.
|
|
208
215
|
- **No CSS in the page either.** No `<style>` rules, no `@keyframes`, no
|
|
209
216
|
stylesheet files. Anything that moves on its own takes `loop` on the element —
|
|
210
217
|
`loop: { keyframes: [{…}, {…}], duration }` runs forever through the Web
|
|
@@ -326,6 +333,12 @@ document is untrusted input.
|
|
|
326
333
|
|
|
327
334
|
## Verifying your work
|
|
328
335
|
|
|
336
|
+
- **`check_page` works without the MCP too:** `npx nodality check
|
|
337
|
+
upload/*.html --base=http://localhost:4000/` (or `import { checkPage }
|
|
338
|
+
from "nodality/check"`). Pass `--base` for a prerendered site, or its fonts
|
|
339
|
+
and `/assets/` do not load and text is measured in a fallback face. It exits
|
|
340
|
+
1 on findings, and on a shop page reports `LOADING_LAYOUT_SHIFT` when the
|
|
341
|
+
product's loading copy sits somewhere other than the loaded element.
|
|
329
342
|
- **Read `FAINT_TEXT` from `check_page`.** It reports small text that passes
|
|
330
343
|
WCAG and still reads faint (APCA), the usual case on mid-tone backgrounds.
|
|
331
344
|
Fix with weight, a lighter or darker ground, or size; not by ignoring it.
|