@signal9/era-ui 26.1.0 → 27.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.
Files changed (34) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/docs/consumer-import.d.ts +28 -0
  3. package/dist/docs/consumer-import.js +28 -0
  4. package/dist/era-ui.css +1 -1
  5. package/dist/generated-docs/accordion.md +1 -1
  6. package/dist/generated-docs/alert-dialog.md +11 -1
  7. package/dist/generated-docs/combobox.md +1 -1
  8. package/dist/generated-docs/context-menu.md +13 -3
  9. package/dist/generated-docs/date-picker.md +1 -1
  10. package/dist/generated-docs/date-range-picker.md +1 -1
  11. package/dist/generated-docs/dialog.md +11 -1
  12. package/dist/generated-docs/dropdown-menu.md +14 -4
  13. package/dist/generated-docs/link-preview.md +11 -1
  14. package/dist/generated-docs/llms-full.txt +246 -25
  15. package/dist/generated-docs/llms.txt +2 -2
  16. package/dist/generated-docs/manifest.json +72 -18
  17. package/dist/generated-docs/menubar.md +4 -3
  18. package/dist/generated-docs/meter.md +6 -0
  19. package/dist/generated-docs/nav.md +61 -0
  20. package/dist/generated-docs/select.md +2 -2
  21. package/dist/generated-docs/step.md +2 -2
  22. package/dist/generated-docs/timeline.md +32 -0
  23. package/dist/generated-docs/todo.md +3 -0
  24. package/dist/generated-docs/toggle-group.md +1 -0
  25. package/dist/generated-docs/tooltip.md +11 -1
  26. package/dist/generated-docs/tree.md +36 -0
  27. package/dist/generated-docs/utilities.json +5 -1
  28. package/dist/generated-docs/utilities.md +3 -2
  29. package/dist/ui/nav/nav-item.svelte +13 -1
  30. package/dist/ui/nav/nav-item.svelte.d.ts +15 -3
  31. package/package.json +6 -5
  32. package/skill/SKILL.md +13 -4
  33. package/dist/docs/llms-txt.d.ts +0 -2
  34. package/dist/docs/llms-txt.js +0 -100
package/skill/SKILL.md CHANGED
@@ -181,10 +181,19 @@ a component into the role. Full reference (including every named scale above):
181
181
 
182
182
  ## Composing the library
183
183
 
184
+ One entry point per component — nothing re-exports them together, so an import
185
+ can never pull in a component you did not ask for. The ROOT is the system layer
186
+ (`cn`, `tv`, the axis registry, `ModeProvider`) and holds no components.
187
+
184
188
  ```svelte
185
189
  <script lang="ts">
186
- import { Button, Badge, OS, AI } from '@signal9/era-ui';
187
- import * as Select from '@signal9/era-ui'; // namespaced parts: Select.Root…
190
+ import { Button } from '@signal9/era-ui/button';
191
+ import { Badge } from '@signal9/era-ui/badge';
192
+ import * as Select from '@signal9/era-ui/select'; // namespaced parts: Select.Root…
193
+ import { Desktop } from '@signal9/era-ui/os';
194
+ import { Conversation } from '@signal9/era-ui/ai/conversation';
195
+
196
+ import { cn } from '@signal9/era-ui'; // the root: system only
188
197
  </script>
189
198
  ```
190
199
 
@@ -192,8 +201,8 @@ a component into the role. Full reference (including every named scale above):
192
201
  through; style via `class` (merged with tailwind-merge, consumer wins — the
193
202
  named classes conflict-resolve against internals, so `class="h-bar"` on a
194
203
  control-tier control just works).
195
- - `OS` (or `@signal9/era-ui/os`): WindowManager + workspaces, Desktop,
196
- Window, Taskbar (built-in command bar). `AI` (or `/ai`): Conversation,
204
+ - `@signal9/era-ui/os`: WindowManager + workspaces, Desktop, Pane, Taskbar
205
+ (built-in command bar), Toaster. `@signal9/era-ui/ai/<part>`: Conversation,
197
206
  Message, Response, PromptInput, Tool/Reasoning/Task over the Step primitive.
198
207
  - List-item keyboard highlight is `data-[highlighted]:bg-hover` — never
199
208
  `hover:text-bright` on items.
@@ -1,2 +0,0 @@
1
- export declare function buildLlmsTxt(origin?: string): string;
2
- export declare function buildLlmsFullTxt(): string;
@@ -1,100 +0,0 @@
1
- import { docs, hasDoc, listEntries } from './index.js';
2
- import { buildUtilitiesIndex } from './css-utilities.js';
3
- import { utilities } from './utilities.js';
4
- import { modes, defaultMode, surfaces, defaultSurface, corners, defaultCorners, fonts, defaultFont, motions, defaultMotion } from '../ui/provider/index.js';
5
- const H1 = '# era-ui';
6
- const MISSION = '> A Svelte 5 + Bits UI component library. Every surface — heights, paddings, radii, gaps — derives from a single spacing atom, so density is a one-attribute override at any scope.';
7
- function orientation(origin) {
8
- const axisList = (arr, dflt) => arr.map((v) => (v === dflt ? `**${v}** (default)` : v)).join(' · ');
9
- return [
10
- '## Using the library',
11
- '',
12
- '```ts',
13
- 'import { Button, Table, Select } from "@signal9/era-ui";',
14
- 'import "@signal9/era-ui/css";',
15
- '```',
16
- '',
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.',
18
- '',
19
- '## Scoped overrides',
20
- '',
21
- 'Five orthogonal axes are exposed as HTML attributes on any ancestor. The entire subtree re-tiers through CSS inheritance — no JS, no context provider.',
22
- '',
23
- `- \`data-mode\`: ${axisList(modes, defaultMode)} — adjusts the spacing atom (\`--era-sp\`).`,
24
- `- \`data-surface\`: ${axisList(surfaces, defaultSurface)} — swaps the background treatment.`,
25
- `- \`data-corners\`: ${axisList(corners, defaultCorners)} — scales all radii toward 0.`,
26
- `- \`data-font\`: ${axisList(fonts, defaultFont)} — switches the font stack.`,
27
- `- \`data-motion\`: ${axisList(motions, defaultMotion)} — sets animation speed (\`--era-duration\` / \`--era-ease\`), independent of density.`,
28
- '',
29
- 'The `Mode` component is a thin wrapper that applies these attributes plus optional `primary` / `primaryFg` color overrides to a subtree.',
30
- '',
31
- '## Spacing system',
32
- '',
33
- 'One atom, `--era-sp` (8px dense / 10px balanced / 12px spacious), drives everything. The tier ladder is:',
34
- '',
35
- '```',
36
- 'xs = sp + 6 icons, tight affordances 14 / 16 / 18 px',
37
- 'xxs = sp + 10 nested pill (badge, chip) 18 / 20 / 22 px',
38
- 'sm = 2·sp + 6 standalone pill (kv) 22 / 26 / 30 px',
39
- 'md = 3·sp buttons, inputs, triggers 24 / 30 / 36 px',
40
- 'lg = 4·sp bars, top-level containers 32 / 40 / 48 px',
41
- '```',
42
- '',
43
- 'Heights (`--era-h-*`), insets (`--era-inset-*`), radii (`--era-rd-*`), and concentric gaps (`--era-icon-inset-chip`, `--era-pill-inset-control`, …) are all `calc()` chains off `--era-sp`. Never hard-code pixel values — setting `data-mode` on any ancestor re-derives the whole subtree. Type is the second density input (12 px at dense, 14 px above); the spacing atom moves with it.',
44
- '',
45
- '## Per-component docs',
46
- '',
47
- `Every component has a passive markdown doc at \`${origin}/<slug>.md\`.`,
48
- `Examples: \`${origin}/button.md\`, \`${origin}/select.md\`, \`${origin}/table.md\`.`,
49
- `Full concatenated reference: \`${origin}/llms-full.txt\`.`,
50
- '',
51
- 'Each page is generated from the component source, so props/variants/defaults stay in sync with the code automatically.'
52
- ].join('\n');
53
- }
54
- function utilitiesSection(origin) {
55
- return [
56
- '## CSS utilities',
57
- '',
58
- 'Classes, not components — they need no import beyond the stylesheet. Reach for one of these before hand-rolling the same styling or bending a component into the role.',
59
- '',
60
- ...buildUtilitiesIndex(utilities),
61
- '',
62
- `Full reference (what each emits, when to use it): \`${origin}/utilities.md\`. Machine-readable list: \`${origin}/utilities.json\`.`
63
- ].join('\n');
64
- }
65
- export function buildLlmsTxt(origin = '') {
66
- const entries = listEntries();
67
- const lines = [H1, '', MISSION, '', orientation(origin), ''];
68
- if (entries.length) {
69
- lines.push('## Components', '');
70
- lines.push(entries.map((e) => e.slug).join(', '), '');
71
- }
72
- lines.push(utilitiesSection(origin), '');
73
- return lines.join('\n');
74
- }
75
- // Module-init-cached: the concatenated reference has no request-dependent
76
- // inputs, so we pay its ~80 KB assembly cost once per worker instance instead
77
- // of on every request.
78
- let llmsFullTxtCache;
79
- export function buildLlmsFullTxt() {
80
- if (llmsFullTxtCache !== undefined)
81
- return llmsFullTxtCache;
82
- const entries = listEntries().filter((e) => hasDoc(e.slug));
83
- const parts = [
84
- H1,
85
- '',
86
- MISSION,
87
- '',
88
- orientation(''),
89
- '',
90
- utilitiesSection(''),
91
- '',
92
- '<!-- Full component documentation, concatenated. The utilities page below carries the CSS each utility emits. -->',
93
- ''
94
- ];
95
- for (const e of entries) {
96
- parts.push(`<!-- begin: ${e.slug} -->`, '', docs[e.slug].trim(), '', `<!-- end: ${e.slug} -->`, '');
97
- }
98
- llmsFullTxtCache = parts.join('\n');
99
- return llmsFullTxtCache;
100
- }