Commit 58f1789
committed
fix(bindings,snippets): honour declaration order for the default binding, and generate the copy-paste snippet once
The first binding per component is the DEFAULT everywhere it matters: the widget
map, the one-tag div, the demo Embed tab and the hosted /embed shell all take
endpoints[0]. sync-bindings sorted those by path, which picked the default
alphabetically and had nothing to do with what a reader wants. Twelve components
were affected: moon-phase opened a year-and-month calendar form instead of
today's phase, forecast-timeline defaulted to significant-dates rather than the
timeline it is named after, numerology-card to birth-day over life-path,
tarot-spread to a raw draw over three-card, hd-type-card to profile over type,
biorhythm-chart to critical-days over daily. UI_BINDINGS already lists each
component's endpoints in the order a reader wants them, so declaration order is
the intent; only the tag keys are sorted now, and those are never read
positionally.
The copy-paste snippet had two implementations, one here and one on the
roxyapi.com /widgets page, and they had drifted: this repo shipped the
practitioner theme commented out and labelled optional, the other emitted the
link live, so a site owner copying from the marketing page got a restyle they
never chose. It is now built once in scripts/widget-snippets.ts, written into
components-catalog.json and mirrored to the demo, so every surface renders the
same string rather than deriving its own.1 parent 84d5662 commit 58f1789
9 files changed
Lines changed: 976 additions & 401 deletions
File tree
- apps/docs
- packages/ui
- src/generated
- tests
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
| |||
62 | 64 | | |
63 | 65 | | |
64 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
65 | 77 | | |
66 | | - | |
67 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
68 | 81 | | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | 82 | | |
88 | 83 | | |
89 | 84 | | |
90 | | - | |
| 85 | + | |
91 | 86 | | |
92 | 87 | | |
93 | 88 | | |
| |||
99 | 94 | | |
100 | 95 | | |
101 | 96 | | |
102 | | - | |
| 97 | + | |
103 | 98 | | |
104 | | - | |
| 99 | + | |
105 | 100 | | |
106 | 101 | | |
107 | 102 | | |
| |||
0 commit comments