@signal9/era-ui 13.0.0 → 14.0.1

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 (56) hide show
  1. package/dist/ai/conversations/conversations-item.svelte +5 -5
  2. package/dist/docs/button.md +1 -1
  3. package/dist/docs/component-docs-core.js +2 -2
  4. package/dist/docs/consumer-import.d.ts +37 -0
  5. package/dist/docs/consumer-import.js +42 -0
  6. package/dist/docs/css-utilities.js +11 -0
  7. package/dist/era-ui.css +1 -1
  8. package/dist/generated-docs/accordion.md +1 -1
  9. package/dist/generated-docs/alert-dialog.md +1 -1
  10. package/dist/generated-docs/avatar.md +1 -1
  11. package/dist/generated-docs/button.md +1 -1
  12. package/dist/generated-docs/calendar.md +1 -1
  13. package/dist/generated-docs/checkbox.md +1 -1
  14. package/dist/generated-docs/collapsible.md +1 -1
  15. package/dist/generated-docs/combobox.md +1 -1
  16. package/dist/generated-docs/command.md +1 -1
  17. package/dist/generated-docs/context-menu.md +1 -1
  18. package/dist/generated-docs/date-field.md +1 -1
  19. package/dist/generated-docs/date-picker.md +1 -1
  20. package/dist/generated-docs/date-range-field.md +1 -1
  21. package/dist/generated-docs/date-range-picker.md +1 -1
  22. package/dist/generated-docs/dialog.md +1 -1
  23. package/dist/generated-docs/dropdown-menu.md +1 -1
  24. package/dist/generated-docs/link-preview.md +1 -1
  25. package/dist/generated-docs/llms-full.txt +49 -38
  26. package/dist/generated-docs/manifest.json +8 -8
  27. package/dist/generated-docs/menu.md +1 -1
  28. package/dist/generated-docs/menubar.md +1 -1
  29. package/dist/generated-docs/navigation-menu.md +1 -1
  30. package/dist/generated-docs/pagination.md +1 -1
  31. package/dist/generated-docs/pin-input.md +1 -1
  32. package/dist/generated-docs/popover.md +1 -1
  33. package/dist/generated-docs/radio-group.md +1 -1
  34. package/dist/generated-docs/range-calendar.md +1 -1
  35. package/dist/generated-docs/rating-group.md +1 -1
  36. package/dist/generated-docs/scroll-area.md +1 -1
  37. package/dist/generated-docs/select.md +1 -1
  38. package/dist/generated-docs/sheet.md +1 -1
  39. package/dist/generated-docs/slider.md +1 -1
  40. package/dist/generated-docs/step.md +1 -1
  41. package/dist/generated-docs/table.md +1 -1
  42. package/dist/generated-docs/tabs.md +1 -1
  43. package/dist/generated-docs/time-field.md +1 -1
  44. package/dist/generated-docs/time-range-field.md +1 -1
  45. package/dist/generated-docs/toggle-group.md +1 -1
  46. package/dist/generated-docs/toolbar.md +1 -1
  47. package/dist/generated-docs/tooltip.md +1 -1
  48. package/dist/generated-docs/utilities.md +11 -0
  49. package/dist/ui/checkbox/checkbox.svelte +9 -1
  50. package/dist/ui/pin-input/index.d.ts +1 -0
  51. package/dist/ui/pin-input/index.js +10 -0
  52. package/dist/ui/radio-group/radio-group-item.svelte +9 -1
  53. package/package.json +4 -3
  54. package/dist/docs/package-name.d.ts +0 -18
  55. package/dist/docs/package-name.js +0 -18
  56. package/dist/docs/quickstart.md +0 -43
@@ -5,7 +5,7 @@ Segmented time input with keyboard navigation.
5
5
  ## Import
6
6
 
7
7
  ```ts
8
- import { TimeField } from "@signal9/era-ui/time-field";
8
+ import * as TimeField from "@signal9/era-ui/time-field";
9
9
  ```
10
10
 
11
11
  Composed from sub-components — compose explicitly at the call site:
@@ -5,7 +5,7 @@ Segmented start/end time input.
5
5
  ## Import
6
6
 
7
7
  ```ts
8
- import { TimeRangeField } from "@signal9/era-ui/time-range-field";
8
+ import * as TimeRangeField from "@signal9/era-ui/time-range-field";
9
9
  ```
10
10
 
11
11
  Composed from sub-components — compose explicitly at the call site:
@@ -5,7 +5,7 @@ A set of toggle buttons with single or multiple selection.
5
5
  ## Import
6
6
 
7
7
  ```ts
8
- import { ToggleGroup } from "@signal9/era-ui/toggle-group";
8
+ import * as ToggleGroup from "@signal9/era-ui/toggle-group";
9
9
  ```
10
10
 
11
11
  Composed from sub-components — compose explicitly at the call site:
@@ -5,7 +5,7 @@ Headless toolbar primitives re-exported from bits-ui.
5
5
  ## Import
6
6
 
7
7
  ```ts
8
- import { Toolbar } from "@signal9/era-ui/toolbar";
8
+ import * as Toolbar from "@signal9/era-ui/toolbar";
9
9
  ```
10
10
 
11
11
  Composed from sub-components — compose explicitly at the call site:
@@ -5,7 +5,7 @@ Supplementary info on hover or focus.
5
5
  ## Import
6
6
 
7
7
  ```ts
8
- import { Tooltip } from "@signal9/era-ui/tooltip";
8
+ import * as Tooltip from "@signal9/era-ui/tooltip";
9
9
  ```
10
10
 
11
11
  Composed from sub-components — compose explicitly at the call site:
@@ -33,6 +33,17 @@ motion):
33
33
  | `text-body` | density-derived body/control text size |
34
34
  | `p-gutter` / `gap-gutter` / `mt-gutter` / … | the spacing scale — EVERY spacing prefix works |
35
35
 
36
+ THE SPACING NAMES IN SIZE ORDER, smallest first, because the names do not
37
+ imply it and guessing gets it backwards:
38
+
39
+ gutter < panel < field < card < content
40
+
41
+ Measured at `data-mode="balanced"`: gutter 5px, field ~9px, card ~11px,
42
+ content ~22px. `gutter` is the TIGHT one — the gap between sibling controls
43
+ and a rail's own padding. `field` is a text input's side padding, not the
44
+ label-to-input gap. Reading them the other way round produces a layout whose
45
+ hierarchy is inverted and therefore reads flat.
46
+
36
47
  The spacing names (`gutter`, `card`, `panel`, `content`, `menu`, `field`, the
37
48
  `inset-*` and concentric `*-inset-*` insets, `glyph-*`) are registered as a
38
49
  Tailwind spacing scale, so every prefix derives automatically: `p-`, `px-`,
@@ -18,7 +18,15 @@
18
18
  bind:checked
19
19
  bind:indeterminate
20
20
  class={cn(
21
- 'group/checkbox flex size-icon shrink-0 era-interactive cursor-pointer items-center justify-center rounded-control bg-elevated shadow-well hover:bg-highlight',
21
+ // bg-field, not bg-elevated: this is a RECESSED control (it takes
22
+ // shadow-well), and the recessed tier's fill is --era-field-bg. Wearing the
23
+ // RAISED fill was an internal contradiction with a visible cost — on flat,
24
+ // --era-surface-bg-elevated collapses to --era-surface-bg and shadow-well
25
+ // collapses to none, so a check inside an elevated container (a Card, a
26
+ // Dialog) was the same colour as its own backdrop with no edge to find it
27
+ // by. Two consumers reported it independently as an invisible control.
28
+ // Switch had already worked around the same thing with a border.
29
+ 'group/checkbox flex size-icon shrink-0 era-interactive cursor-pointer items-center justify-center rounded-control bg-field shadow-well hover:bg-highlight',
22
30
  className
23
31
  )}
24
32
  {...restProps}
@@ -1,2 +1,3 @@
1
1
  export { default as Root } from './pin-input-root.svelte';
2
2
  export { default as Cell } from './pin-input-cell.svelte';
3
+ export { REGEXP_ONLY_DIGITS, REGEXP_ONLY_CHARS, REGEXP_ONLY_DIGITS_AND_CHARS } from 'bits-ui';
@@ -1,2 +1,12 @@
1
1
  export { default as Root } from './pin-input-root.svelte';
2
2
  export { default as Cell } from './pin-input-cell.svelte';
3
+ /*
4
+ * The `pattern` presets, re-exported.
5
+ *
6
+ * They come from bits-ui, which is era's dependency — not the consumer's. A
7
+ * consumer following the docs had to `import { REGEXP_ONLY_DIGITS } from
8
+ * 'bits-ui'`, reaching past era into a package they never declared, and one npm
9
+ * is free to hoist differently or dedupe away. Re-exporting keeps the import
10
+ * surface era's own.
11
+ */
12
+ export { REGEXP_ONLY_DIGITS, REGEXP_ONLY_CHARS, REGEXP_ONLY_DIGITS_AND_CHARS } from 'bits-ui';
@@ -8,7 +8,15 @@
8
8
  <RadioGroup.Item
9
9
  bind:ref
10
10
  class={cn(
11
- 'group/radio flex size-icon shrink-0 era-interactive cursor-pointer items-center justify-center rounded-control bg-elevated shadow-well hover:bg-highlight',
11
+ // bg-field, not bg-elevated: this is a RECESSED control (it takes
12
+ // shadow-well), and the recessed tier's fill is --era-field-bg. Wearing the
13
+ // RAISED fill was an internal contradiction with a visible cost — on flat,
14
+ // --era-surface-bg-elevated collapses to --era-surface-bg and shadow-well
15
+ // collapses to none, so a check inside an elevated container (a Card, a
16
+ // Dialog) was the same colour as its own backdrop with no edge to find it
17
+ // by. Two consumers reported it independently as an invisible control.
18
+ // Switch had already worked around the same thing with a border.
19
+ 'group/radio flex size-icon shrink-0 era-interactive cursor-pointer items-center justify-center rounded-control bg-field shadow-well hover:bg-highlight',
12
20
  className
13
21
  )}
14
22
  {...restProps}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signal9/era-ui",
3
- "version": "13.0.0",
3
+ "version": "14.0.1",
4
4
  "scripts": {
5
5
  "dev": "vite dev --host",
6
6
  "build": "vite build && npm run prepack",
@@ -22,9 +22,10 @@
22
22
  "check:canonical": "node --experimental-strip-types scripts/check-canonical.ts",
23
23
  "check:layers": "node --experimental-strip-types scripts/check-layers.ts",
24
24
  "check:themes": "node --experimental-strip-types scripts/check-themes.ts",
25
+ "check:classes": "node --experimental-strip-types scripts/check-classes.ts",
25
26
  "build:llm-docs": "node --experimental-strip-types scripts/build-llm-docs.ts",
26
- "prebuild": "npm run check:surfaces && npm run check:tokens && npm run check:routes && npm run check:canonical && npm run check:layers && npm run check:themes && npm run build:llm-docs",
27
- "validate": "npm run check && npm run lint && npm run format:check && npm run check:surfaces && npm run check:tokens && npm run check:routes && npm run check:canonical && npm run check:layers && npm run check:themes",
27
+ "prebuild": "npm run check:surfaces && npm run check:tokens && npm run check:routes && npm run check:canonical && npm run check:layers && npm run check:themes && npm run check:classes && npm run build:llm-docs",
28
+ "validate": "npm run check && npm run lint && npm run format:check && npm run check:surfaces && npm run check:tokens && npm run check:routes && npm run check:canonical && npm run check:layers && npm run check:themes && npm run check:classes",
28
29
  "test": "npm run test:visual"
29
30
  },
30
31
  "files": [
@@ -1,18 +0,0 @@
1
- /**
2
- * The specifier a CONSUMER writes.
3
- *
4
- * Not `$lib/ui/<slug>` — that is a SvelteKit alias which resolves only inside
5
- * this repo, so every doc that printed it was handing consumers an import that
6
- * cannot work anywhere else. It had reached 61 of the 73 generated component
7
- * docs and all of llms-full.txt, which is the file agents fetch, before anyone
8
- * tried to follow one.
9
- *
10
- * npm's name deliberately: the package publishes to two registries under two
11
- * names (`@sig-nine/era-ui` on GitHub Packages, where the scope must match the
12
- * repo owner) and npm's is the one a reader can install without auth.
13
- *
14
- * Its own module, with no imports of its own, because the node doc builder
15
- * loads it through --experimental-strip-types — which cannot follow the `.js`
16
- * specifiers the rest of src/lib/docs uses.
17
- */
18
- export declare const PACKAGE = "@signal9/era-ui";
@@ -1,18 +0,0 @@
1
- /**
2
- * The specifier a CONSUMER writes.
3
- *
4
- * Not `$lib/ui/<slug>` — that is a SvelteKit alias which resolves only inside
5
- * this repo, so every doc that printed it was handing consumers an import that
6
- * cannot work anywhere else. It had reached 61 of the 73 generated component
7
- * docs and all of llms-full.txt, which is the file agents fetch, before anyone
8
- * tried to follow one.
9
- *
10
- * npm's name deliberately: the package publishes to two registries under two
11
- * names (`@sig-nine/era-ui` on GitHub Packages, where the scope must match the
12
- * repo owner) and npm's is the one a reader can install without auth.
13
- *
14
- * Its own module, with no imports of its own, because the node doc builder
15
- * loads it through --experimental-strip-types — which cannot follow the `.js`
16
- * specifiers the rest of src/lib/docs uses.
17
- */
18
- export const PACKAGE = '@signal9/era-ui';
@@ -1,43 +0,0 @@
1
- ## Hero Template
2
-
3
- Use a single, pure component import from `$lib/ui` for a clean docs-friendly starter hero.
4
-
5
- ```svelte
6
- <script lang="ts">
7
- import { Badge, Bar, Button, ButtonGroup, Card, Separator } from '@signal9/era-ui';
8
- </script>
9
-
10
- <section class="mx-auto flex w-full max-w-4xl flex-col gap-content p-content">
11
- <Badge tone="accent">Now shipping v0.8</Badge>
12
-
13
- <div class="space-y-(--era-gap)">
14
- <h1 class="font-mono text-[length:calc(var(--era-text)*2)] font-semibold text-bright">
15
- Era Hero
16
- </h1>
17
- <p class="max-w-prose text-muted">
18
- Build once, then switch feel instantly with density and surface tokens.
19
- </p>
20
- </div>
21
-
22
- <Bar class="border border-[color:var(--era-border-color)] bg-[var(--era-surface-bg)]">
23
- <ButtonGroup>
24
- <Button tone="accent">Get started</Button>
25
- <Button variant="outline">Live preview</Button>
26
- </ButtonGroup>
27
- </Bar>
28
-
29
- <Separator />
30
-
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
- </div>
36
- </section>
37
- ```
38
-
39
- ### Why this template
40
-
41
- - Pure imports keep setup simple for first-time users.
42
- - Every spacing and size value comes from era tokens.
43
- - Works in all density modes without rewriting markup.