Commit 786da4f
committed
feat(widgets): spec-driven inputs, practitioner theme, one-tag widgets.js
Turn the components into copy-paste widgets for non-technical site owners. Everything derives from the spec, the manifest, and the bindings, so a new endpoint or component flows through with zero widget code.
Input system v2: a param-shape registry maps every spec param to an input kind (sign tile picker with glyphs, filterable select above 12 options, boolean toggle, date, time, number, text). Required fields render visible, optional fields collapse under one Advanced disclosure, and a form whose only visible required field is an enum submits on selection. Adds lang, submit-label and attribution attributes, person-group cards, visible validation, and a sticky picker with an Edit affordance.
Perf: per-operation schema slices at dist/schemas replace the 1.5 MB runtime spec fetch, keeping the full-spec fetch as a fallback.
Security: location-search now fails closed on a secret key like every other component, via a shared key guard.
Theme: new --roxy-font-display token (defaults to sans) plus dist/styles/themes/practitioner.css, a rosewater light and dark preset. The Customise dialog gains a Presets dropdown.
widgets.js: the hardcoded 16-entry endpoint map is gone. The map is generated at build from bindings x manifest x spec (51 slugs). When every required param is present as data attributes it fetches immediately, otherwise it renders form mode. Guarded against double-defining elements when the full bundle is also on the page.
Demo: a fourth Embed tab per card, derived from the bindings mirror with zero per-card authoring.
CI: a bundle-size gate (150 KB gzip full, 30 KB gzip per component, 8 KB raw widgets.js) wired into ci.yml and lefthook, plus a taxonomy gate asserting every spec param resolves to a known input kind.
Spec reconciled with live, picking up the human-design nodeType toggle.
All changes are additive. Controlled mode, tag names, token names and event names are unchanged, so the WordPress plugin contract and every data-prop consumer stay unaffected.1 parent f32b646 commit 786da4f
150 files changed
Lines changed: 6644 additions & 537 deletions
File tree
- .github/workflows
- apps/docs
- examples/vanilla
- packages
- ui-react/src/components
- ui-vue/src/components
- ui
- src
- components
- styles
- themes
- tokens
- utils
- tests
- e2e
- scripts
- specs
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
362 | 362 | | |
363 | 363 | | |
364 | 364 | | |
365 | | - | |
| 365 | + | |
366 | 366 | | |
367 | 367 | | |
368 | 368 | | |
| |||
393 | 393 | | |
394 | 394 | | |
395 | 395 | | |
396 | | - | |
| 396 | + | |
397 | 397 | | |
398 | 398 | | |
399 | 399 | | |
| |||
403 | 403 | | |
404 | 404 | | |
405 | 405 | | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
406 | 412 | | |
407 | 413 | | |
408 | 414 | | |
| |||
490 | 496 | | |
491 | 497 | | |
492 | 498 | | |
493 | | - | |
| 499 | + | |
494 | 500 | | |
495 | 501 | | |
496 | 502 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
602 | 602 | | |
603 | 603 | | |
604 | 604 | | |
| 605 | + | |
| 606 | + | |
605 | 607 | | |
606 | 608 | | |
607 | 609 | | |
| |||
611 | 613 | | |
612 | 614 | | |
613 | 615 | | |
614 | | - | |
| 616 | + | |
| 617 | + | |
615 | 618 | | |
616 | 619 | | |
617 | 620 | | |
| |||
771 | 774 | | |
772 | 775 | | |
773 | 776 | | |
774 | | - | |
| 777 | + | |
775 | 778 | | |
776 | 779 | | |
777 | 780 | | |
| |||
895 | 898 | | |
896 | 899 | | |
897 | 900 | | |
898 | | - | |
| 901 | + | |
899 | 902 | | |
900 | 903 | | |
901 | 904 | | |
902 | | - | |
| 905 | + | |
903 | 906 | | |
904 | 907 | | |
905 | 908 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
33 | 40 | | |
34 | 41 | | |
35 | 42 | | |
36 | 43 | | |
37 | 44 | | |
38 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
39 | 96 | | |
40 | 97 | | |
41 | 98 | | |
| |||
84 | 141 | | |
85 | 142 | | |
86 | 143 | | |
| 144 | + | |
| 145 | + | |
87 | 146 | | |
88 | 147 | | |
89 | 148 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
340 | 340 | | |
341 | 341 | | |
342 | 342 | | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
343 | 364 | | |
344 | 365 | | |
345 | 366 | | |
| |||
592 | 613 | | |
593 | 614 | | |
594 | 615 | | |
595 | | - | |
| 616 | + | |
596 | 617 | | |
597 | 618 | | |
598 | 619 | | |
| |||
774 | 795 | | |
775 | 796 | | |
776 | 797 | | |
777 | | - | |
| 798 | + | |
778 | 799 | | |
779 | 800 | | |
780 | 801 | | |
| |||
787 | 808 | | |
788 | 809 | | |
789 | 810 | | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
790 | 818 | | |
791 | 819 | | |
792 | 820 | | |
| |||
796 | 824 | | |
797 | 825 | | |
798 | 826 | | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
799 | 834 | | |
800 | 835 | | |
801 | 836 | | |
| |||
0 commit comments