nodality 1.0.165 → 1.0.166
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/nodality.js +29 -8
- package/dist/bundle.umd.js +1 -1
- package/dist/finalresult.esm.js +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/layout/animator.js +1 -1
- package/layout/audio.js +1 -1
- package/layout/audionew.js +1 -1
- package/layout/base-2.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/box.js +1 -1
- package/layout/button.js +1 -1
- package/layout/cards.js +1 -1
- package/layout/center.js +1 -1
- package/layout/checkbox.js +1 -1
- package/layout/circle.js +1 -1
- package/layout/clean-row.js +1 -1
- package/layout/code.js +1 -1
- package/layout/container.js +1 -1
- package/layout/custom.js +1 -1
- package/layout/div-image.js +1 -1
- package/layout/dropdown-2025.js +1 -1
- package/layout/dropdown.js +1 -1
- package/layout/empty-element.js +1 -1
- package/layout/external-stylesheet.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/footer.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-new.js +1 -1
- package/layout/grid-switcher.js +1 -1
- package/layout/grid.js +1 -1
- package/layout/group.js +1 -1
- package/layout/header.js +1 -1
- package/layout/horizontal-scroller.js +1 -1
- package/layout/image-old.js +1 -1
- package/layout/image.js +1 -1
- package/layout/index.js +14 -2
- package/layout/label.js +1 -1
- package/layout/link.js +1 -1
- package/layout/list-OLD.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/modernwrap.js +1 -1
- package/layout/multiswitcher.js +1 -1
- package/layout/multiswitcherBeta.js +1 -1
- package/layout/nav-bar.js +1 -1
- package/layout/nav-factor/custom-div.js +1 -1
- package/layout/navBar-OLD.js +1 -1
- package/layout/new-flat-adder.js +1 -1
- package/layout/new-nav-bar.js +1 -1
- package/layout/offset-container.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/saved-new-nav-bar.js +1 -1
- package/layout/scroll-video.js +1 -1
- package/layout/side-bar.js +1 -1
- package/layout/side-nav-bar.js +1 -1
- package/layout/simple-bar.js +1 -1
- package/layout/slider-2025.js +1 -1
- package/layout/spacer.js +1 -1
- package/layout/stack.js +1 -1
- package/layout/styler.js +1 -1
- package/layout/svg.js +1 -1
- package/layout/switcher.js +1 -1
- package/layout/table.js +1 -1
- package/layout/text-field.js +1 -1
- package/layout/text.js +1 -1
- package/layout/ulist.js +1 -1
- package/layout/video.js +1 -1
- package/layout/without-new.js +1 -1
- package/layout/wrap.js +1 -1
- package/layout/zoom-card.js +1 -1
- package/lib/card-getter.js +1 -1
- package/lib/designer.js +1 -1
- package/lib/element-mapper.js +1 -1
- package/lib/keyframe-animation.js +1 -1
- package/lib/link-getter.js +1 -1
- package/lib/scroll-video.js +1 -1
- package/lib/stacker.js +1 -1
- package/lib/theme.js +1 -1
- package/lib/transform-anim.js +1 -1
- package/package.json +1 -1
package/bin/nodality.js
CHANGED
|
@@ -386,6 +386,34 @@ async function runCompile(rawArgs) {
|
|
|
386
386
|
.map((line) => `${line};`)
|
|
387
387
|
.join("\n\n");
|
|
388
388
|
|
|
389
|
+
// Derive the import list from the actual class names used in the
|
|
390
|
+
// emitted statements rather than dumping a hardcoded superset.
|
|
391
|
+
// nodality only exports a known subset of class names; importing a
|
|
392
|
+
// non-exported name (e.g. `Form`, `Polygon`) trips ESM's named-export
|
|
393
|
+
// verification at parse time and breaks the file.
|
|
394
|
+
const NODALITY_EXPORTS = new Set([
|
|
395
|
+
"ElementMapper", "Animator",
|
|
396
|
+
"Text", "Image", "Link", "FlexRow", "UINavBar",
|
|
397
|
+
"Free", "NAudio", "Progress", "Center", "Code",
|
|
398
|
+
"Stack", "Wrapper", "Svg", "MetaAdder", "Table",
|
|
399
|
+
"Dropdown", "Modal", "TextField", "Card", "Wrap",
|
|
400
|
+
"FlexGrid", "ZoomCard", "CustomDivRenderer", "SideBar",
|
|
401
|
+
"SideNav", "SimpleBar", "DesktopBar", "MobileBar",
|
|
402
|
+
"Switcher", "Spacer", "HScroller", "Checkbox", "Base",
|
|
403
|
+
"FilePickera", "Picker", "Range", "RadioGroup", "DataList",
|
|
404
|
+
"Button", "Des", "LinkStyler", "CardGen", "KeyframeAnim",
|
|
405
|
+
"TransformAnim", "Stacker", "ScrollVideo", "Theme",
|
|
406
|
+
"AreaSwitcher", "Video", "UList", "Slider",
|
|
407
|
+
"Polygon", "Circle", "FloatingInput", "Form",
|
|
408
|
+
]);
|
|
409
|
+
const used = new Set();
|
|
410
|
+
for (const line of emitted) {
|
|
411
|
+
for (const m of line.matchAll(/\bnew\s+([A-Z]\w*)/g)) {
|
|
412
|
+
if (NODALITY_EXPORTS.has(m[1])) used.add(m[1]);
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
const importList = [...used].sort().join(", ") || "Text";
|
|
416
|
+
|
|
389
417
|
const out = `// Auto-emitted by \`nodality compile\` from ${srcRel}.
|
|
390
418
|
// This is the imperative form the Designer would have shown in the
|
|
391
419
|
// \`code: true\` panel. It is a throwaway artifact — diff it against
|
|
@@ -393,14 +421,7 @@ async function runCompile(rawArgs) {
|
|
|
393
421
|
// then refine by hand. Re-run \`nodality compile\` whenever you
|
|
394
422
|
// sketch new pieces in ${srcRel}.
|
|
395
423
|
|
|
396
|
-
import {
|
|
397
|
-
Text, Image, Link, FlexRow, FlexGrid, Wrapper, Center, Stack,
|
|
398
|
-
Card, ZoomCard, Switcher, MobileBar, DesktopBar, SideNav, UINavBar,
|
|
399
|
-
Dropdown, Modal, Table, Spacer, HScroller, Polygon, Circle, UList,
|
|
400
|
-
Free, Audio, Progress, Code, MetaAdder, TextField,
|
|
401
|
-
FloatingInput, Range, RadioGroup, Picker, FilePickera, DataList,
|
|
402
|
-
Base, Form, Button, Slider, Video, Checkbox,
|
|
403
|
-
} from "nodality";
|
|
424
|
+
import { ${importList} } from "nodality";
|
|
404
425
|
|
|
405
426
|
${body}
|
|
406
427
|
`;
|