@signal9/era-ui 10.1.0 → 12.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/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 +5 -10
- 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 +2 -2
- 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 +2 -2
- 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/llm-shell/llm-shell.svelte +4 -4
- package/dist/apps/notes/notes.svelte +8 -8
- package/dist/dev/audit/audits/even-container-padding.js +2 -2
- package/dist/dev/audit/audits/single-glyph-square.js +2 -2
- package/dist/dev/audit-overlay.svelte +7 -7
- package/dist/docs/css-utilities.d.ts +31 -0
- package/dist/docs/css-utilities.js +141 -7
- package/dist/docs/quickstart.md +5 -5
- package/dist/era-ui.css +1 -1
- package/dist/generated-docs/llms-full.txt +359 -94
- package/dist/generated-docs/llms.txt +18 -7
- package/dist/generated-docs/manifest.json +355 -49
- package/dist/generated-docs/utilities.json +336 -41
- package/dist/generated-docs/utilities.md +341 -87
- 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 +117 -79
- package/dist/styles/themes.css +49 -42
- 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 +7 -7
- package/dist/ui/bar/bar.svelte.d.ts +15 -15
- package/dist/ui/button/button.svelte +1 -1
- 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 +7 -9
- 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/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
|
@@ -15,19 +15,14 @@
|
|
|
15
15
|
let nonce = $state(0);
|
|
16
16
|
</script>
|
|
17
17
|
|
|
18
|
-
<div
|
|
19
|
-
class=
|
|
20
|
-
'flex min-h-0 flex-col overflow-hidden rounded-(--era-rd-bar) bg-(--era-surface-bg) shadow-(--era-shadow-lg)',
|
|
21
|
-
className
|
|
22
|
-
)}
|
|
23
|
-
>
|
|
24
|
-
<Bar size="control" class="shrink-0 gap-(--era-gap) rounded-none">
|
|
18
|
+
<div class={cn('flex min-h-0 flex-col overflow-hidden rounded-bar bg-well shadow-lg', className)}>
|
|
19
|
+
<Bar size="control" class="shrink-0 gap-gutter rounded-none">
|
|
25
20
|
<Button icon size="chip" aria-label="Reload" onclick={() => (nonce += 1)}>
|
|
26
|
-
<RotateCw class="size-
|
|
21
|
+
<RotateCw class="size-icon" />
|
|
27
22
|
</Button>
|
|
28
23
|
<Input
|
|
29
24
|
bind:value={draft}
|
|
30
|
-
class="h-
|
|
25
|
+
class="h-chip flex-1"
|
|
31
26
|
placeholder="https://…"
|
|
32
27
|
onkeydown={(e: KeyboardEvent) => {
|
|
33
28
|
if (e.key === 'Enter') {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
<!-- Thin era skin over Svelte Flow — the graph engine is xyflow's. This file
|
|
14
14
|
lives on its own subpath so the dependency stays opt-in. -->
|
|
15
|
-
<SvelteFlow bind:nodes bind:edges fitView class="rounded-
|
|
15
|
+
<SvelteFlow bind:nodes bind:edges fitView class="rounded-bar shadow-sm">
|
|
16
16
|
<Background bgColor="var(--color-1)" />
|
|
17
17
|
<Controls />
|
|
18
18
|
{@render children?.()}
|
|
@@ -12,18 +12,18 @@
|
|
|
12
12
|
|
|
13
13
|
<div
|
|
14
14
|
class={cn(
|
|
15
|
-
'flex w-56 flex-col overflow-hidden rounded-
|
|
15
|
+
'flex w-56 flex-col overflow-hidden rounded-control bg-elevated text-body shadow-lg',
|
|
16
16
|
className
|
|
17
17
|
)}
|
|
18
18
|
>
|
|
19
19
|
<Handle type="target" position={Position.Left} />
|
|
20
20
|
{#if title}
|
|
21
21
|
<div
|
|
22
|
-
class="flex h-
|
|
22
|
+
class="flex h-control items-center border-b border-divider-faded px-inset-control font-medium text-bright"
|
|
23
23
|
>
|
|
24
24
|
{title}
|
|
25
25
|
</div>
|
|
26
26
|
{/if}
|
|
27
|
-
<div class="p-
|
|
27
|
+
<div class="p-inset-control text-fg">{@render children?.()}</div>
|
|
28
28
|
<Handle type="source" position={Position.Right} />
|
|
29
29
|
</div>
|
|
@@ -143,7 +143,7 @@
|
|
|
143
143
|
<!-- Thread -->
|
|
144
144
|
<div class="flex min-w-0 flex-1 flex-col">
|
|
145
145
|
{#if runStatus !== 'idle'}
|
|
146
|
-
<div class="shrink-0 border-b border-divider px-
|
|
146
|
+
<div class="shrink-0 border-b border-divider px-card py-gutter">
|
|
147
147
|
<AI.RunStatus.Root
|
|
148
148
|
status={runStatus}
|
|
149
149
|
tools={{
|
|
@@ -187,9 +187,9 @@
|
|
|
187
187
|
<AI.Conversation.ScrollButton />
|
|
188
188
|
</AI.Conversation.Root>
|
|
189
189
|
|
|
190
|
-
<div class="mx-auto w-full max-w-2xl shrink-0 p-
|
|
190
|
+
<div class="mx-auto w-full max-w-2xl shrink-0 p-card pt-0">
|
|
191
191
|
{#if active && active.messages.length === 0 && suggestions.length > 0}
|
|
192
|
-
<div class="pb-
|
|
192
|
+
<div class="pb-gutter">
|
|
193
193
|
<AI.Suggestions.Root>
|
|
194
194
|
{#each suggestions as s (s)}
|
|
195
195
|
<AI.Suggestions.Suggestion suggestion={s} onSelect={(t) => onSend?.(t)} />
|
|
@@ -265,7 +265,7 @@
|
|
|
265
265
|
{#snippet expanded()}
|
|
266
266
|
{@const tool = block.tools.find((t) => t.id === openChip)}
|
|
267
267
|
{#if tool}
|
|
268
|
-
<Card tone="well" class="flex min-w-0 flex-col gap-
|
|
268
|
+
<Card tone="well" class="flex min-w-0 flex-col gap-panel p-panel">
|
|
269
269
|
<AI.Tool.Input input={tool.input} />
|
|
270
270
|
<AI.Tool.Output output={tool.output} />
|
|
271
271
|
</Card>
|
|
@@ -239,13 +239,13 @@
|
|
|
239
239
|
|
|
240
240
|
{#snippet paneHeader()}
|
|
241
241
|
{#if selected}
|
|
242
|
-
<div class="relative flex min-w-0 items-center gap-
|
|
242
|
+
<div class="relative flex min-w-0 items-center gap-gutter" data-pane-control>
|
|
243
243
|
{@render iconPicker(selected)}
|
|
244
244
|
{@render titleField(selected, 'field-sizing-content max-w-56 min-w-0 text-center')}
|
|
245
245
|
<!-- Absolutely positioned, so the badge appearing never nudges the
|
|
246
246
|
centred title; empty when the status is quiet, which costs
|
|
247
247
|
nothing off-flow. -->
|
|
248
|
-
<span class="absolute top-1/2 left-full ml-
|
|
248
|
+
<span class="absolute top-1/2 left-full ml-gutter -translate-y-1/2">
|
|
249
249
|
{@render statusBadge()}
|
|
250
250
|
</span>
|
|
251
251
|
</div>
|
|
@@ -303,7 +303,7 @@
|
|
|
303
303
|
one, and the bar's + is always within reach. Two competing CTAs for
|
|
304
304
|
an empty list reads as indecision. -->
|
|
305
305
|
<div
|
|
306
|
-
class="flex flex-1 flex-col items-center justify-center gap-gutter p-
|
|
306
|
+
class="flex flex-1 flex-col items-center justify-center gap-gutter p-section text-center"
|
|
307
307
|
>
|
|
308
308
|
<p class="text-muted">{query ? 'No matches' : 'No notes yet'}</p>
|
|
309
309
|
</div>
|
|
@@ -331,8 +331,8 @@
|
|
|
331
331
|
{#snippet child({ props })}
|
|
332
332
|
<div
|
|
333
333
|
{...props}
|
|
334
|
-
class="group/row flex h-control cursor-pointer items-center gap-
|
|
335
|
-
? 'bg-hover text-bright shadow-
|
|
334
|
+
class="group/row flex h-control cursor-pointer items-center gap-pill-inset-control rounded-control px-pill-inset-control leading-none {current
|
|
335
|
+
? 'bg-hover text-bright shadow-pressed'
|
|
336
336
|
: 'hover:bg-highlight hover:shadow-highlight'}"
|
|
337
337
|
role="option"
|
|
338
338
|
aria-selected={current}
|
|
@@ -351,7 +351,7 @@
|
|
|
351
351
|
{#if note.icon}
|
|
352
352
|
{note.icon}
|
|
353
353
|
{:else}
|
|
354
|
-
<FileText class="size-
|
|
354
|
+
<FileText class="size-glyph-pill text-muted" />
|
|
355
355
|
{/if}
|
|
356
356
|
</span>
|
|
357
357
|
|
|
@@ -370,7 +370,7 @@
|
|
|
370
370
|
{formatAge(note.updatedAt)}
|
|
371
371
|
</span>
|
|
372
372
|
<span
|
|
373
|
-
class="hidden shrink-0 items-center gap-
|
|
373
|
+
class="hidden shrink-0 items-center gap-pill-inset-control group-hover/row:flex"
|
|
374
374
|
>
|
|
375
375
|
<Button
|
|
376
376
|
icon
|
|
@@ -467,7 +467,7 @@
|
|
|
467
467
|
{/key}
|
|
468
468
|
</div>
|
|
469
469
|
{:else}
|
|
470
|
-
<div class="flex flex-1 flex-col items-center justify-center gap-gutter p-
|
|
470
|
+
<div class="flex flex-1 flex-col items-center justify-center gap-gutter p-section">
|
|
471
471
|
<p class="text-muted">
|
|
472
472
|
{store.notes.length === 0 ? 'Create a note to get started' : 'Select a note'}
|
|
473
473
|
</p>
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* its copy button — so flagging it would be noise. Nothing has a reason to sit
|
|
17
17
|
* closer to its top edge than its bottom.
|
|
18
18
|
*
|
|
19
|
-
* `p-
|
|
19
|
+
* `p-section` is the one earned exception and is exempt by construction rather
|
|
20
20
|
* than by name: it subtracts the heading ROW's own slack from its top padding,
|
|
21
21
|
* so it only ever appears on a full-bleed section with no radius, and this
|
|
22
22
|
* audit looks only at rounded boxes — the ones that read as a container.
|
|
@@ -34,7 +34,7 @@ export const evenContainerPadding = {
|
|
|
34
34
|
const s = getComputedStyle(el);
|
|
35
35
|
// Rounded boxes only: a radius is what makes a box read as a container
|
|
36
36
|
// with edges, and it also excludes the full-bleed page sections whose
|
|
37
|
-
// top padding is legitimately reduced (see p-
|
|
37
|
+
// top padding is legitimately reduced (see p-section).
|
|
38
38
|
if (parseFloat(s.borderTopLeftRadius) <= 0)
|
|
39
39
|
return null;
|
|
40
40
|
const top = parseFloat(s.paddingTop) || 0;
|
|
@@ -5,8 +5,8 @@ import { BOUNDED_TIER_MAX } from '../../measure.js';
|
|
|
5
5
|
*
|
|
6
6
|
* Rule 5: every element that can hold a single glyph carries a min-width equal to
|
|
7
7
|
* its tier height, so one character renders as a perfect square (or circle, once
|
|
8
|
-
* rounded) instead of a skinny vertical pill. Icon buttons take min-w-
|
|
9
|
-
* Badge, Chip and the KV value cell take min-w-
|
|
8
|
+
* rounded) instead of a skinny vertical pill. Icon buttons take min-w-control;
|
|
9
|
+
* Badge, Chip and the KV value cell take min-w-pill.
|
|
10
10
|
*
|
|
11
11
|
* Drop the min-width and nothing looks wrong until content happens to BE one
|
|
12
12
|
* character — a badge showing "1", a count that ticks from 10 down to 9 — and the
|
|
@@ -59,10 +59,10 @@
|
|
|
59
59
|
|
|
60
60
|
{#if dev && open}
|
|
61
61
|
<div
|
|
62
|
-
class="fixed right-4 bottom-4 z-50 flex max-h-[70vh] w-96 flex-col overflow-hidden rounded-
|
|
62
|
+
class="fixed right-4 bottom-4 z-50 flex max-h-[70vh] w-96 flex-col overflow-hidden rounded-control bg-surface font-mono text-body shadow-[inset_0_0_0_0.5px_var(--color-border),var(--era-shadow)]"
|
|
63
63
|
>
|
|
64
64
|
<header
|
|
65
|
-
class="flex items-center gap-
|
|
65
|
+
class="flex items-center gap-icon-inset-chip px-inset-chip py-gutter shadow-[inset_0_-0.5px_0_0_var(--color-border)]"
|
|
66
66
|
>
|
|
67
67
|
<strong class="text-bright">audits</strong>
|
|
68
68
|
<span class="text-muted">
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
{@const enabled = registry.isEnabled(r.audit.id)}
|
|
82
82
|
<details open={r.issues.length > 0}>
|
|
83
83
|
<summary
|
|
84
|
-
class="flex cursor-pointer items-center gap-
|
|
84
|
+
class="flex cursor-pointer items-center gap-icon-inset-chip px-inset-chip py-gutter hover:bg-highlight"
|
|
85
85
|
>
|
|
86
86
|
<input
|
|
87
87
|
type="checkbox"
|
|
@@ -95,13 +95,13 @@
|
|
|
95
95
|
</span>
|
|
96
96
|
</summary>
|
|
97
97
|
{#if r.issues.length === 0}
|
|
98
|
-
<p class="px-
|
|
98
|
+
<p class="px-inset-chip py-gutter text-muted">
|
|
99
99
|
{r.audit.description}
|
|
100
100
|
</p>
|
|
101
101
|
{:else}
|
|
102
102
|
{#each r.issues as issue, i (i)}
|
|
103
103
|
<button
|
|
104
|
-
class="flex w-full items-start gap-
|
|
104
|
+
class="flex w-full items-start gap-icon-inset-chip px-inset-chip py-gutter text-left hover:bg-highlight"
|
|
105
105
|
onclick={() => highlight(issue.element)}
|
|
106
106
|
>
|
|
107
107
|
<span class="text-destructive">●</span>
|
|
@@ -114,9 +114,9 @@
|
|
|
114
114
|
</div>
|
|
115
115
|
|
|
116
116
|
<footer
|
|
117
|
-
class="flex items-center gap-
|
|
117
|
+
class="flex items-center gap-gutter px-inset-chip py-gutter text-muted shadow-[inset_0_0.5px_0_0_var(--color-border)]"
|
|
118
118
|
>
|
|
119
|
-
<kbd class="rounded-
|
|
119
|
+
<kbd class="rounded-icon bg-hover px-inset-chip text-fg">
|
|
120
120
|
{isMac ? '⌘' : 'ctrl'}⇧{key.toUpperCase()}
|
|
121
121
|
</kbd>
|
|
122
122
|
<span>toggle</span>
|
|
@@ -16,6 +16,37 @@ export interface CssUtility {
|
|
|
16
16
|
/** The `@utility` block verbatim, as authored. */
|
|
17
17
|
css: string;
|
|
18
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* `@theme` namespace → the utility prefixes it generates.
|
|
21
|
+
*
|
|
22
|
+
* Half of era's public class API is registered this way rather than as
|
|
23
|
+
* `@utility` blocks — `rounded-control` from `--radius-control`, `shadow-lg`,
|
|
24
|
+
* `bg-highlight`, `text-body`, and the whole spacing scale. They are classes a
|
|
25
|
+
* consumer writes exactly like the others, and until this table existed the
|
|
26
|
+
* doc pipeline could not see any of them: `@utility` was the only thing it
|
|
27
|
+
* parsed, so era's most-used names were also its least-documented.
|
|
28
|
+
*
|
|
29
|
+
* The list per namespace is the SPELLINGS WORTH DOCUMENTING, not everything
|
|
30
|
+
* Tailwind derives — a spacing token really does generate `mt-`, `gap-x-`,
|
|
31
|
+
* `inset-`, `translate-` and a dozen more, and printing all of them per name
|
|
32
|
+
* would bury the point. The prose says the rest.
|
|
33
|
+
*/
|
|
34
|
+
export declare const THEME_CLASS_PREFIXES: Record<string, string[]>;
|
|
35
|
+
/** Every prefix a namespace really generates — the map the codemod needs. */
|
|
36
|
+
export declare const THEME_ALL_PREFIXES: Record<string, string[]>;
|
|
37
|
+
/**
|
|
38
|
+
* The classes one `@theme` key generates, each with the utility PREFIX that
|
|
39
|
+
* generated it — `--spacing-inset-control` → `{ prefix: 'px', name:
|
|
40
|
+
* 'px-inset-control' }`. The prefix cannot be recovered from the name (both
|
|
41
|
+
* `px` and `px-inset` are hyphen-splits of `px-inset-control`), and the codemod
|
|
42
|
+
* matches on it, so it is returned rather than re-derived.
|
|
43
|
+
*/
|
|
44
|
+
export declare function themeKeyClassEntries(themeKey: string, prefixes?: Record<string, string[]>): {
|
|
45
|
+
prefix: string;
|
|
46
|
+
name: string;
|
|
47
|
+
}[];
|
|
48
|
+
/** The class names one `@theme` key generates, e.g. `--radius-control` → `rounded-control`. */
|
|
49
|
+
export declare function themeKeyClasses(themeKey: string, prefixes?: Record<string, string[]>): string[];
|
|
19
50
|
/**
|
|
20
51
|
* @param sources stylesheet text keyed by path relative to src/lib/styles
|
|
21
52
|
* (e.g. `index.css`, `surfaces/glass.css`).
|
|
@@ -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`,",
|
|
@@ -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/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
|
```
|