@signal9/era-ui 10.0.0 → 11.0.0
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/dist/ai/actions/actions.svelte +1 -1
- package/dist/ai/artifact/artifact-actions.svelte +1 -1
- package/dist/ai/artifact/artifact-close.svelte +1 -1
- package/dist/ai/artifact/artifact-content.svelte +1 -1
- package/dist/ai/artifact/artifact-header.svelte +1 -1
- package/dist/ai/artifact/artifact.svelte +1 -4
- package/dist/ai/chain-of-thought/chain-of-thought-step.svelte +3 -3
- package/dist/ai/chain-of-thought/chain-of-thought.svelte +1 -1
- package/dist/ai/checkpoint.svelte +2 -2
- package/dist/ai/confirmation/confirmation-actions.svelte +1 -1
- package/dist/ai/confirmation/confirmation-args.svelte +4 -4
- package/dist/ai/confirmation/confirmation.svelte +5 -8
- package/dist/ai/context/context.svelte +3 -3
- package/dist/ai/conversation/conversation-content.svelte +1 -4
- package/dist/ai/conversation/conversation-empty-state.svelte +1 -1
- package/dist/ai/conversation/conversation-scroll-button.svelte +3 -3
- package/dist/ai/conversations/conversations-group.svelte +2 -2
- package/dist/ai/conversations/conversations-item.svelte +8 -8
- package/dist/ai/conversations/conversations-root.svelte +2 -2
- package/dist/ai/error-panel/error-panel.svelte +7 -7
- package/dist/ai/image.svelte +1 -1
- package/dist/ai/index.js +1 -1
- package/dist/ai/inline-citation/inline-citation.svelte +5 -5
- package/dist/ai/loader.svelte +1 -4
- package/dist/ai/message/message-branch-selector.svelte +3 -3
- package/dist/ai/message/message-branch.svelte +1 -1
- package/dist/ai/message/message-content.svelte +1 -1
- package/dist/ai/message/message-toolbar.svelte +1 -1
- package/dist/ai/message/message-usage.svelte +5 -7
- package/dist/ai/message/message.svelte +1 -1
- package/dist/ai/model-selector/model-selector.svelte +2 -2
- package/dist/ai/open-in-chat/open-in-chat.svelte +2 -2
- package/dist/ai/plan/plan-content.svelte +1 -1
- package/dist/ai/plan/plan-header.svelte +2 -2
- package/dist/ai/plan/plan.svelte +1 -4
- package/dist/ai/prompt-input/prompt-input-add-attachments.svelte +1 -1
- package/dist/ai/prompt-input/prompt-input-attachments.svelte +5 -5
- package/dist/ai/prompt-input/prompt-input-submit.svelte +2 -2
- package/dist/ai/prompt-input/prompt-input-textarea.svelte +2 -2
- package/dist/ai/prompt-input/prompt-input-toolbar.svelte +1 -1
- package/dist/ai/prompt-input/prompt-input.svelte +1 -1
- package/dist/ai/queue/queue-item.svelte +1 -1
- package/dist/ai/queue/queue.svelte +1 -1
- package/dist/ai/reasoning/reasoning-trigger.svelte +1 -1
- package/dist/ai/response/response.svelte +1 -1
- package/dist/ai/run-status/run-status.svelte +7 -11
- package/dist/ai/runtime-feed/runtime-feed-item.svelte +1 -4
- package/dist/ai/runtime-feed/runtime-feed-root.svelte +1 -1
- package/dist/ai/sources/source.svelte +2 -2
- package/dist/ai/sources/sources-trigger.svelte +1 -1
- package/dist/ai/structured-value/structured-value.svelte +4 -4
- package/dist/ai/suggestion/suggestion.svelte +1 -1
- package/dist/ai/suggestion/suggestions.svelte +1 -1
- package/dist/ai/swarm/swarm-agent.svelte +3 -3
- package/dist/ai/swarm/swarm-artifact.svelte +2 -2
- package/dist/ai/swarm/swarm-barrier.svelte +3 -3
- package/dist/ai/swarm/swarm-barriers.svelte +1 -4
- package/dist/ai/swarm/swarm-counts.svelte +2 -2
- package/dist/ai/swarm/swarm-footer.svelte +4 -3
- package/dist/ai/swarm/swarm-grid.svelte +2 -2
- package/dist/ai/swarm/swarm-header.svelte +2 -2
- package/dist/ai/swarm/swarm-node.svelte +7 -9
- package/dist/ai/swarm/swarm-role.svelte +6 -3
- package/dist/ai/swarm/swarm-root.svelte +1 -4
- package/dist/ai/swarm/swarm-sandbox.svelte +4 -7
- package/dist/ai/swarm/swarm-tree.svelte +2 -2
- package/dist/ai/task/task-content.svelte +1 -4
- package/dist/ai/task/task-trigger.svelte +1 -1
- package/dist/ai/tool/tool-chip.svelte +3 -3
- package/dist/ai/tool/tool-chips.svelte +3 -3
- package/dist/ai/tool/tool-exec.svelte +4 -4
- package/dist/ai/tool/tool-header.svelte +1 -1
- package/dist/ai/web-preview/web-preview.svelte +4 -9
- package/dist/ai/workflow/canvas.svelte +1 -1
- package/dist/ai/workflow/node.svelte +3 -3
- package/dist/apps/index.d.ts +3 -3
- package/dist/apps/index.js +3 -3
- package/dist/apps/llm-shell/llm-shell.svelte +4 -4
- package/dist/apps/notes/editor/slash-menu.svelte +2 -4
- package/dist/apps/notes/notes.svelte +8 -8
- package/dist/dev/audit/audits/anonymous-text.d.ts +2 -0
- package/dist/dev/audit/audits/anonymous-text.js +73 -0
- package/dist/dev/audit/audits/even-container-padding.js +2 -2
- package/dist/dev/audit/audits/index.d.ts +2 -1
- package/dist/dev/audit/audits/index.js +3 -1
- package/dist/dev/audit/audits/single-glyph-square.js +2 -2
- package/dist/dev/audit/types.d.ts +1 -1
- package/dist/dev/audit-overlay.svelte +7 -7
- package/dist/docs/css-utilities.d.ts +31 -0
- package/dist/docs/css-utilities.js +142 -8
- package/dist/docs/llms-txt.js +2 -2
- package/dist/docs/notes.md +3 -3
- package/dist/docs/quickstart.md +5 -5
- package/dist/era-ui.css +1 -1
- package/dist/generated-docs/llms-full.txt +455 -110
- package/dist/generated-docs/llms.txt +29 -14
- package/dist/generated-docs/manifest.json +382 -55
- package/dist/generated-docs/notes.md +3 -3
- package/dist/generated-docs/utilities.json +359 -45
- package/dist/generated-docs/utilities.md +423 -93
- package/dist/os/notification-center.svelte +11 -17
- package/dist/os/pane-manager.svelte.d.ts +1 -1
- package/dist/os/pane.svelte +4 -6
- package/dist/os/taskbar.svelte +13 -18
- package/dist/os/toast.svelte +6 -11
- package/dist/os/toaster.svelte +1 -1
- package/dist/styles/density.css +0 -2
- package/dist/styles/index.css +160 -84
- package/dist/ui/accordion/accordion-content.svelte +1 -1
- package/dist/ui/accordion/accordion-trigger.svelte +2 -2
- package/dist/ui/alert-dialog/alert-dialog-content.svelte +2 -2
- package/dist/ui/alert-dialog/alert-dialog-overlay.svelte +1 -1
- package/dist/ui/aspect-ratio/aspect-ratio.svelte +1 -5
- package/dist/ui/avatar/avatar-fallback.svelte +1 -1
- package/dist/ui/avatar/avatar-root.svelte +1 -1
- package/dist/ui/badge/badge.svelte +1 -1
- package/dist/ui/badge/badge.svelte.d.ts +1 -1
- package/dist/ui/bar/bar.svelte +8 -8
- package/dist/ui/bar/bar.svelte.d.ts +16 -16
- package/dist/ui/button/button.svelte +13 -2
- package/dist/ui/button/variants.d.ts +4 -4
- package/dist/ui/button/variants.js +18 -18
- package/dist/ui/button-group/button-group.svelte +2 -2
- package/dist/ui/calendar/calendar-day.svelte +1 -1
- package/dist/ui/calendar/calendar-grid-row.svelte +1 -1
- package/dist/ui/calendar/calendar-grid.svelte +1 -1
- package/dist/ui/calendar/calendar-head-cell.svelte +1 -1
- package/dist/ui/calendar/calendar-header.svelte +1 -1
- package/dist/ui/calendar/calendar-next-button.svelte +1 -1
- package/dist/ui/calendar/calendar-prev-button.svelte +1 -1
- package/dist/ui/calendar/calendar-root.svelte +1 -1
- package/dist/ui/card/card.svelte +10 -10
- package/dist/ui/card/card.svelte.d.ts +16 -16
- package/dist/ui/checkbox/checkbox-group.svelte +1 -1
- package/dist/ui/checkbox/checkbox.svelte +1 -1
- package/dist/ui/chip/chip.svelte +15 -7
- package/dist/ui/chip/chip.svelte.d.ts +7 -7
- package/dist/ui/code-block/code-block.svelte +3 -9
- package/dist/ui/collapsible/collapsible-trigger.svelte +1 -1
- package/dist/ui/combobox/combobox-content.svelte +1 -1
- package/dist/ui/combobox/combobox-empty.svelte +1 -6
- package/dist/ui/combobox/combobox-group-heading.svelte +1 -4
- package/dist/ui/combobox/combobox-input.svelte +1 -1
- package/dist/ui/combobox/combobox-item.svelte +1 -1
- package/dist/ui/combobox/combobox-trigger.svelte +2 -2
- package/dist/ui/command/command-group-heading.svelte +1 -4
- package/dist/ui/command/command-group-items.svelte +1 -5
- package/dist/ui/command/command-item.svelte +1 -1
- package/dist/ui/command/command-link-item.svelte +1 -1
- package/dist/ui/command/command-root.svelte +2 -2
- package/dist/ui/command/command-viewport.svelte +1 -1
- package/dist/ui/command-bar/command-bar.svelte +9 -13
- package/dist/ui/context-menu/context-menu-checkbox-item.svelte +1 -1
- package/dist/ui/context-menu/context-menu-content.svelte +2 -2
- package/dist/ui/context-menu/context-menu-group-heading.svelte +1 -4
- package/dist/ui/context-menu/context-menu-item.svelte +1 -1
- package/dist/ui/context-menu/context-menu-radio-item.svelte +1 -1
- package/dist/ui/context-menu/context-menu-sub-content.svelte +1 -1
- package/dist/ui/context-menu/context-menu-sub-trigger.svelte +2 -2
- package/dist/ui/copy-button/copy-button.svelte +2 -2
- package/dist/ui/cycle/cycle.svelte +2 -2
- package/dist/ui/date-field/date-field-segment.svelte +1 -1
- package/dist/ui/date-picker/date-picker-calendar.svelte +1 -1
- package/dist/ui/date-picker/date-picker-content.svelte +1 -4
- package/dist/ui/date-picker/date-picker-day.svelte +1 -1
- package/dist/ui/date-picker/date-picker-grid-row.svelte +1 -1
- package/dist/ui/date-picker/date-picker-grid.svelte +1 -1
- package/dist/ui/date-picker/date-picker-head-cell.svelte +1 -1
- package/dist/ui/date-picker/date-picker-header.svelte +1 -1
- package/dist/ui/date-picker/date-picker-next-button.svelte +1 -1
- package/dist/ui/date-picker/date-picker-prev-button.svelte +1 -1
- package/dist/ui/date-picker/date-picker-segment.svelte +1 -1
- package/dist/ui/date-picker/date-picker-trigger.svelte +2 -2
- package/dist/ui/date-range-field/date-range-field-segment.svelte +1 -1
- package/dist/ui/date-range-picker/date-range-picker-calendar.svelte +1 -1
- package/dist/ui/date-range-picker/date-range-picker-content.svelte +1 -4
- package/dist/ui/date-range-picker/date-range-picker-day.svelte +1 -1
- package/dist/ui/date-range-picker/date-range-picker-grid-row.svelte +1 -1
- package/dist/ui/date-range-picker/date-range-picker-grid.svelte +1 -5
- package/dist/ui/date-range-picker/date-range-picker-head-cell.svelte +1 -1
- package/dist/ui/date-range-picker/date-range-picker-header.svelte +1 -1
- package/dist/ui/date-range-picker/date-range-picker-next-button.svelte +1 -1
- package/dist/ui/date-range-picker/date-range-picker-prev-button.svelte +1 -1
- package/dist/ui/date-range-picker/date-range-picker-segment.svelte +1 -1
- package/dist/ui/date-range-picker/date-range-picker-trigger.svelte +2 -2
- package/dist/ui/dialog/dialog-content.svelte +3 -5
- package/dist/ui/dialog/dialog-header.svelte +1 -6
- package/dist/ui/dialog/dialog-overlay.svelte +1 -5
- package/dist/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte +1 -1
- package/dist/ui/dropdown-menu/dropdown-menu-content.svelte +2 -2
- package/dist/ui/dropdown-menu/dropdown-menu-group-heading.svelte +1 -4
- package/dist/ui/dropdown-menu/dropdown-menu-item.svelte +1 -1
- package/dist/ui/dropdown-menu/dropdown-menu-radio-item.svelte +1 -1
- package/dist/ui/dropdown-menu/dropdown-menu-sub-content.svelte +1 -1
- package/dist/ui/dropdown-menu/dropdown-menu-sub-trigger.svelte +2 -2
- package/dist/ui/dropdown-menu/dropdown-menu-trigger.svelte +2 -2
- package/dist/ui/file-upload/file-upload.svelte +2 -2
- package/dist/ui/index.js +1 -1
- package/dist/ui/input/input.svelte +2 -2
- package/dist/ui/input/textarea.svelte +1 -1
- package/dist/ui/input/variants.d.ts +18 -18
- package/dist/ui/input/variants.js +6 -6
- package/dist/ui/kv/kv.svelte +2 -3
- package/dist/ui/link-preview/link-preview-content.svelte +1 -1
- package/dist/ui/menubar/menubar-checkbox-item.svelte +1 -1
- package/dist/ui/menubar/menubar-content.svelte +2 -2
- package/dist/ui/menubar/menubar-group-heading.svelte +1 -4
- package/dist/ui/menubar/menubar-item.svelte +1 -1
- package/dist/ui/menubar/menubar-radio-item.svelte +1 -1
- package/dist/ui/menubar/menubar-root.svelte +1 -4
- package/dist/ui/menubar/menubar-sub-content.svelte +1 -1
- package/dist/ui/menubar/menubar-sub-trigger.svelte +2 -2
- package/dist/ui/menubar/menubar-trigger.svelte +1 -1
- package/dist/ui/meter/meter.svelte +2 -2
- package/dist/ui/pagination/pagination-next-button.svelte +1 -1
- package/dist/ui/pagination/pagination-prev-button.svelte +1 -1
- package/dist/ui/pagination/pagination-root.svelte +1 -1
- package/dist/ui/pane/pane-content.svelte +1 -1
- package/dist/ui/pane/pane-root.svelte +1 -1
- package/dist/ui/pane/pane-tab-list.svelte +1 -1
- package/dist/ui/pane/pane-tab-panel.svelte +1 -1
- package/dist/ui/pane/pane-tab.svelte +1 -1
- package/dist/ui/pane/pane.svelte +1 -1
- package/dist/ui/pin-input/pin-input-cell.svelte +1 -1
- package/dist/ui/popover/popover-content.svelte +1 -1
- package/dist/ui/popover/popover-trigger.svelte +1 -4
- package/dist/ui/progress/progress.svelte +2 -2
- package/dist/ui/radio-group/radio-group-item.svelte +2 -2
- package/dist/ui/radio-group/radio-group-root.svelte +1 -1
- package/dist/ui/rating-group/rating-group-item.svelte +1 -1
- package/dist/ui/rating-group/rating-group-root.svelte +1 -1
- package/dist/ui/scroll-area/scroll-area-scrollbar.svelte +1 -1
- package/dist/ui/scroll-area/scroll-area-thumb.svelte +1 -1
- package/dist/ui/scroll-area/scroll-area.svelte +1 -1
- package/dist/ui/select/select-content.svelte +7 -6
- package/dist/ui/select/select-group-heading.svelte +1 -4
- package/dist/ui/select/select-item.svelte +1 -1
- package/dist/ui/select/select-trigger.svelte +2 -2
- package/dist/ui/select/select-value.svelte +1 -1
- package/dist/ui/separator/separator.svelte +1 -1
- package/dist/ui/sheet/sheet-content.svelte +3 -3
- package/dist/ui/sheet/sheet-content.svelte.d.ts +4 -4
- package/dist/ui/skeleton/skeleton.svelte +4 -4
- package/dist/ui/skeleton/skeleton.svelte.d.ts +10 -10
- package/dist/ui/slider/slider-range.svelte +1 -1
- package/dist/ui/slider/slider-thumb.svelte +1 -1
- package/dist/ui/slider/slider-tick.svelte +1 -1
- package/dist/ui/step/step-content.svelte +1 -1
- package/dist/ui/step/step-section.svelte +1 -1
- package/dist/ui/step/step-summary.svelte +7 -7
- package/dist/ui/switch/switch.svelte +2 -2
- package/dist/ui/table/table-cell.svelte +1 -1
- package/dist/ui/table/table-head-cell.svelte +1 -1
- package/dist/ui/table/table-row.svelte +1 -1
- package/dist/ui/time-field/time-field-segment.svelte +1 -1
- package/dist/ui/time-range-field/time-range-field-segment.svelte +1 -1
- package/dist/ui/toggle-group/toggle-group-item.svelte +1 -1
- package/dist/ui/toggle-group/toggle-group-root.svelte +1 -1
- package/dist/ui/tooltip/tooltip-content.svelte +1 -1
- package/dist/ui/video-player/video-player.svelte +44 -47
- package/dist/utils/index.js +1 -1
- package/package.json +4 -3
|
@@ -19,6 +19,64 @@
|
|
|
19
19
|
*/
|
|
20
20
|
/** Files whose utilities are library API. Order fixes the doc's order. */
|
|
21
21
|
const FILE_ORDER = ['index.css', 'surfaces/glass.css'];
|
|
22
|
+
/**
|
|
23
|
+
* `@theme` namespace → the utility prefixes it generates.
|
|
24
|
+
*
|
|
25
|
+
* Half of era's public class API is registered this way rather than as
|
|
26
|
+
* `@utility` blocks — `rounded-control` from `--radius-control`, `shadow-lg`,
|
|
27
|
+
* `bg-highlight`, `text-body`, and the whole spacing scale. They are classes a
|
|
28
|
+
* consumer writes exactly like the others, and until this table existed the
|
|
29
|
+
* doc pipeline could not see any of them: `@utility` was the only thing it
|
|
30
|
+
* parsed, so era's most-used names were also its least-documented.
|
|
31
|
+
*
|
|
32
|
+
* The list per namespace is the SPELLINGS WORTH DOCUMENTING, not everything
|
|
33
|
+
* Tailwind derives — a spacing token really does generate `mt-`, `gap-x-`,
|
|
34
|
+
* `inset-`, `translate-` and a dozen more, and printing all of them per name
|
|
35
|
+
* would bury the point. The prose says the rest.
|
|
36
|
+
*/
|
|
37
|
+
export const THEME_CLASS_PREFIXES = {
|
|
38
|
+
radius: ['rounded'],
|
|
39
|
+
shadow: ['shadow'],
|
|
40
|
+
text: ['text'],
|
|
41
|
+
leading: ['leading'],
|
|
42
|
+
ease: ['ease'],
|
|
43
|
+
color: ['bg', 'text', 'border'],
|
|
44
|
+
spacing: ['p', 'px', 'py', 'gap']
|
|
45
|
+
};
|
|
46
|
+
/** Every prefix a namespace really generates — the map the codemod needs. */
|
|
47
|
+
export const THEME_ALL_PREFIXES = {
|
|
48
|
+
...THEME_CLASS_PREFIXES,
|
|
49
|
+
radius: [
|
|
50
|
+
'rounded',
|
|
51
|
+
...'t,r,b,l,tl,tr,bl,br,s,e,ss,se,es,ee'.split(',').map((s) => `rounded-${s}`)
|
|
52
|
+
],
|
|
53
|
+
color: [
|
|
54
|
+
'bg',
|
|
55
|
+
'text',
|
|
56
|
+
'border',
|
|
57
|
+
'fill',
|
|
58
|
+
'stroke',
|
|
59
|
+
'ring',
|
|
60
|
+
'outline',
|
|
61
|
+
'divide',
|
|
62
|
+
'decoration',
|
|
63
|
+
'caret',
|
|
64
|
+
'accent',
|
|
65
|
+
'from',
|
|
66
|
+
'via',
|
|
67
|
+
'to'
|
|
68
|
+
],
|
|
69
|
+
spacing: [
|
|
70
|
+
'p,px,py,pt,pr,pb,pl,ps,pe',
|
|
71
|
+
'm,mx,my,mt,mr,mb,ml,ms,me',
|
|
72
|
+
'gap,gap-x,gap-y',
|
|
73
|
+
'w,h,size,min-w,min-h,max-w,max-h',
|
|
74
|
+
'inset,inset-x,inset-y,top,right,bottom,left,start,end',
|
|
75
|
+
'translate,translate-x,translate-y,scroll-m,scroll-p,basis,indent'
|
|
76
|
+
]
|
|
77
|
+
.join(',')
|
|
78
|
+
.split(',')
|
|
79
|
+
};
|
|
22
80
|
function cleanComment(raw) {
|
|
23
81
|
return raw
|
|
24
82
|
.split('\n')
|
|
@@ -86,6 +144,62 @@ function parseFile(file, source) {
|
|
|
86
144
|
}
|
|
87
145
|
return out;
|
|
88
146
|
}
|
|
147
|
+
/**
|
|
148
|
+
* The classes one `@theme` key generates, each with the utility PREFIX that
|
|
149
|
+
* generated it — `--spacing-inset-control` → `{ prefix: 'px', name:
|
|
150
|
+
* 'px-inset-control' }`. The prefix cannot be recovered from the name (both
|
|
151
|
+
* `px` and `px-inset` are hyphen-splits of `px-inset-control`), and the codemod
|
|
152
|
+
* matches on it, so it is returned rather than re-derived.
|
|
153
|
+
*/
|
|
154
|
+
export function themeKeyClassEntries(themeKey, prefixes = THEME_CLASS_PREFIXES) {
|
|
155
|
+
const bare = themeKey.replace(/^--/, '');
|
|
156
|
+
// `--shadow: …` IS the bare `shadow` class — a namespace with no suffix.
|
|
157
|
+
if (prefixes[bare])
|
|
158
|
+
return [{ prefix: bare, name: bare }];
|
|
159
|
+
const cut = bare.indexOf('-');
|
|
160
|
+
if (cut === -1)
|
|
161
|
+
return [];
|
|
162
|
+
const namespace = bare.slice(0, cut);
|
|
163
|
+
const suffix = bare.slice(cut + 1);
|
|
164
|
+
return (prefixes[namespace] ?? []).map((p) => ({ prefix: p, name: `${p}-${suffix}` }));
|
|
165
|
+
}
|
|
166
|
+
/** The class names one `@theme` key generates, e.g. `--radius-control` → `rounded-control`. */
|
|
167
|
+
export function themeKeyClasses(themeKey, prefixes = THEME_CLASS_PREFIXES) {
|
|
168
|
+
return themeKeyClassEntries(themeKey, prefixes).map((e) => e.name);
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Named theme scales — the other half of the public class API.
|
|
172
|
+
*
|
|
173
|
+
* Shape parsed: a doc comment followed by a RUN of `--key: var(…)` lines inside
|
|
174
|
+
* `@theme`, exactly like the `@utility` ladder rule above. One comment governs
|
|
175
|
+
* the whole run, so the radius ladder or the spacing scale documents once.
|
|
176
|
+
*/
|
|
177
|
+
function parseTheme(file, source) {
|
|
178
|
+
const theme = source.match(/@theme[^{]*\{([\s\S]*?)\n\}/);
|
|
179
|
+
if (!theme)
|
|
180
|
+
return [];
|
|
181
|
+
const body = theme[1];
|
|
182
|
+
const out = [];
|
|
183
|
+
const pattern = /\/\*((?:(?!\*\/)[\s\S])*)\*\/\s*((?:\s*--[\w-]+\s*:[^;]+;\n?)+)/g;
|
|
184
|
+
for (const match of body.matchAll(pattern)) {
|
|
185
|
+
const decls = [...match[2].matchAll(/--[\w-]+\s*:[^;]+;/g)].map((m) => m[0]);
|
|
186
|
+
const names = decls.flatMap((d) => themeKeyClasses(d.slice(0, d.indexOf(':')).trim()));
|
|
187
|
+
// A comment governing only non-class keys (--default-transition-*) has
|
|
188
|
+
// nothing to document — it is internal wiring, not API.
|
|
189
|
+
if (!names.length)
|
|
190
|
+
continue;
|
|
191
|
+
const { useCase, description } = splitUseCase(cleanComment(match[1]));
|
|
192
|
+
out.push({
|
|
193
|
+
name: names[0],
|
|
194
|
+
names,
|
|
195
|
+
file,
|
|
196
|
+
useCase,
|
|
197
|
+
description,
|
|
198
|
+
css: `@theme inline {\n${decls.map((d) => `\t${d}`).join('\n')}\n}`
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
return out;
|
|
202
|
+
}
|
|
89
203
|
/**
|
|
90
204
|
* @param sources stylesheet text keyed by path relative to src/lib/styles
|
|
91
205
|
* (e.g. `index.css`, `surfaces/glass.css`).
|
|
@@ -97,7 +211,7 @@ export function parseUtilities(sources) {
|
|
|
97
211
|
};
|
|
98
212
|
return Object.entries(sources)
|
|
99
213
|
.sort(([a], [b]) => rank(a) - rank(b) || a.localeCompare(b))
|
|
100
|
-
.flatMap(([file, source]) => parseFile(file, source));
|
|
214
|
+
.flatMap(([file, source]) => [...parseFile(file, source), ...parseTheme(file, source)]);
|
|
101
215
|
}
|
|
102
216
|
const INTRO = [
|
|
103
217
|
"era's styling API is pure class names — write `h-control rounded-control px-gutter shadow`,",
|
|
@@ -105,7 +219,7 @@ const INTRO = [
|
|
|
105
219
|
'with the stylesheet and needs no import:',
|
|
106
220
|
'',
|
|
107
221
|
'```ts',
|
|
108
|
-
'import "@
|
|
222
|
+
'import "@signal9/era-ui/css";',
|
|
109
223
|
'```',
|
|
110
224
|
'',
|
|
111
225
|
'```svelte',
|
|
@@ -119,7 +233,7 @@ const INTRO = [
|
|
|
119
233
|
'',
|
|
120
234
|
'| Stock-looking class | What it resolves to |',
|
|
121
235
|
'|---|---|',
|
|
122
|
-
'| `rounded-icon/
|
|
236
|
+
'| `rounded-icon/pill/chip/control/bar` | the concentric radius ladder (collapses on `data-corners="square"`) |',
|
|
123
237
|
'| `rounded-menu-item` | menu-row radius, concentric inside a `rounded-control` panel |',
|
|
124
238
|
'| `shadow` / `shadow-lg` | resting control edge / floating panel chrome, per surface |',
|
|
125
239
|
'| `shadow-well` / `shadow-pressed` / `shadow-highlight` | recessed, pressed/latched, hover-material chrome |',
|
|
@@ -127,13 +241,33 @@ const INTRO = [
|
|
|
127
241
|
'| `transition-*` (bare) | duration + easing default to the motion axis |',
|
|
128
242
|
'| `ease-base` / `duration-base` | the motion axis, named explicitly |',
|
|
129
243
|
'| `text-body` | density-derived body/control text size |',
|
|
244
|
+
'| `p-gutter` / `gap-gutter` / `mt-gutter` / … | the spacing scale — EVERY spacing prefix works |',
|
|
245
|
+
'',
|
|
246
|
+
'The spacing names (`gutter`, `card`, `panel`, `content`, `menu`, `field`, the',
|
|
247
|
+
'`inset-*` and concentric `*-inset-*` insets, `glyph-*`) are registered as a',
|
|
248
|
+
'Tailwind spacing scale, so every prefix derives automatically: `p-`, `px-`,',
|
|
249
|
+
'`pt-`, `mt-`, `gap-`, `gap-x-`, `inset-`, `translate-`, and the rest. The TIER',
|
|
250
|
+
'names (`icon`, `pill`, `chip`, `control`, `bar`) are heights, not spacing, so',
|
|
251
|
+
'they are registered per prefix instead — `h-`, `w-`, `min-h-`, `min-w-` and',
|
|
252
|
+
'`size-` — and the two vocabularies deliberately share no word. Putting a tier',
|
|
253
|
+
'in the spacing scale would silently make `px-control` mean 24px of padding.',
|
|
130
254
|
'',
|
|
131
|
-
|
|
132
|
-
'
|
|
133
|
-
'
|
|
255
|
+
'The var form (`h-(--era-h-control)`) still works and is the escape hatch for a',
|
|
256
|
+
'token with no registered name — `--era-sp`, the press-sink offsets, anything',
|
|
257
|
+
'a component reaches for once. `scripts/check-canonical.ts` fails the build if',
|
|
258
|
+
'source uses it where a name exists.'
|
|
134
259
|
].join('\n');
|
|
135
|
-
/**
|
|
136
|
-
|
|
260
|
+
/**
|
|
261
|
+
* `h-icon` for a single class, `h-icon · h-pill · … · h-bar` for a ladder.
|
|
262
|
+
*
|
|
263
|
+
* Capped, because a theme scale can govern a LOT of spellings: the colour block
|
|
264
|
+
* generates bg-/text-/border- for every token, which is ~60 names and reads as
|
|
265
|
+
* noise in a heading. The prose under each entry states the full rule.
|
|
266
|
+
*/
|
|
267
|
+
const LABEL_CAP = 8;
|
|
268
|
+
const label = (u) => u.names.length > LABEL_CAP
|
|
269
|
+
? `${u.names.slice(0, LABEL_CAP).join(' · ')} · … (${u.names.length} in all)`
|
|
270
|
+
: u.names.join(' · ');
|
|
137
271
|
/** Renders the utilities reference — the generated `utilities.md` body. */
|
|
138
272
|
export function buildUtilitiesDoc(utilities) {
|
|
139
273
|
const lines = ['## Overview', '', INTRO, '', '| Utility | Use it for |', '|---|---|'];
|
package/dist/docs/llms-txt.js
CHANGED
|
@@ -10,8 +10,8 @@ function orientation(origin) {
|
|
|
10
10
|
'## Using the library',
|
|
11
11
|
'',
|
|
12
12
|
'```ts',
|
|
13
|
-
'import { Button, Table, Select } from "@
|
|
14
|
-
'import "@
|
|
13
|
+
'import { Button, Table, Select } from "@signal9/era-ui";',
|
|
14
|
+
'import "@signal9/era-ui/css";',
|
|
15
15
|
'```',
|
|
16
16
|
'',
|
|
17
17
|
'Named exports wrap a single primitive (`Button`, `Badge`, `Chip`, `Input`, …). Namespace exports compose primitives via sub-components (`Table.Root`, `Table.Row`, `Select.Trigger`, `Dialog.Content`, …). Every wrapper forwards unknown props to its underlying element or bits-ui primitive, so standard HTML attributes (`class`, `style`, event handlers, `aria-*`, `data-*`) work without ceremony.',
|
package/dist/docs/notes.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
## Usage
|
|
2
2
|
|
|
3
|
-
Apps ship on their own subpath and are **not** re-exported from `@
|
|
3
|
+
Apps ship on their own subpath and are **not** re-exported from `@signal9/era-ui`.
|
|
4
4
|
Notes carries TipTap, and a consumer who never imports an app should never pay
|
|
5
5
|
for it.
|
|
6
6
|
|
|
7
7
|
```svelte
|
|
8
8
|
<script>
|
|
9
|
-
import { Notes } from '@
|
|
9
|
+
import { Notes } from '@signal9/era-ui/apps';
|
|
10
10
|
</script>
|
|
11
11
|
|
|
12
12
|
<Notes />
|
|
@@ -46,7 +46,7 @@ Persistence is one small interface, so server-backed hosting is a drop-in swap
|
|
|
46
46
|
`load`/`save` may be sync or async:
|
|
47
47
|
|
|
48
48
|
```ts
|
|
49
|
-
import { Notes, NotesStore } from '@
|
|
49
|
+
import { Notes, NotesStore } from '@signal9/era-ui/apps';
|
|
50
50
|
|
|
51
51
|
const store = new NotesStore({
|
|
52
52
|
adapter: {
|
package/dist/docs/quickstart.md
CHANGED
|
@@ -7,7 +7,7 @@ Use a single, pure component import from `$lib/ui` for a clean docs-friendly sta
|
|
|
7
7
|
import { Badge, Bar, Button, ButtonGroup, Card, Separator } from '$lib/ui';
|
|
8
8
|
</script>
|
|
9
9
|
|
|
10
|
-
<section class="mx-auto flex w-full max-w-4xl flex-col gap-
|
|
10
|
+
<section class="mx-auto flex w-full max-w-4xl flex-col gap-content p-content">
|
|
11
11
|
<Badge tone="accent">Now shipping v0.8</Badge>
|
|
12
12
|
|
|
13
13
|
<div class="space-y-(--era-gap)">
|
|
@@ -28,10 +28,10 @@ Use a single, pure component import from `$lib/ui` for a clean docs-friendly sta
|
|
|
28
28
|
|
|
29
29
|
<Separator />
|
|
30
30
|
|
|
31
|
-
<div class="grid gap-
|
|
32
|
-
<Card class="p-
|
|
33
|
-
<Card class="p-
|
|
34
|
-
<Card class="p-
|
|
31
|
+
<div class="grid gap-gutter md:grid-cols-3">
|
|
32
|
+
<Card class="p-gutter">Dense-ready</Card>
|
|
33
|
+
<Card class="p-gutter">Balanced defaults</Card>
|
|
34
|
+
<Card class="p-gutter">Spacious polish</Card>
|
|
35
35
|
</div>
|
|
36
36
|
</section>
|
|
37
37
|
```
|