@signal9/era-ui 12.1.2 → 14.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 (138) hide show
  1. package/dist/dev/audit-overlay.svelte +1 -1
  2. package/dist/docs/component-docs-core.js +2 -2
  3. package/dist/docs/consumer-import.d.ts +37 -0
  4. package/dist/docs/consumer-import.js +42 -0
  5. package/dist/docs/css-utilities.js +17 -1
  6. package/dist/docs/notes.md +12 -11
  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/badge.md +3 -0
  12. package/dist/generated-docs/button.md +4 -0
  13. package/dist/generated-docs/calendar.md +1 -1
  14. package/dist/generated-docs/checkbox.md +1 -1
  15. package/dist/generated-docs/chip.md +3 -0
  16. package/dist/generated-docs/collapsible.md +1 -1
  17. package/dist/generated-docs/combobox.md +1 -1
  18. package/dist/generated-docs/command.md +1 -1
  19. package/dist/generated-docs/context-menu.md +1 -1
  20. package/dist/generated-docs/date-field.md +1 -1
  21. package/dist/generated-docs/date-picker.md +1 -1
  22. package/dist/generated-docs/date-range-field.md +1 -1
  23. package/dist/generated-docs/date-range-picker.md +1 -1
  24. package/dist/generated-docs/dialog.md +1 -1
  25. package/dist/generated-docs/dropdown-menu.md +1 -1
  26. package/dist/generated-docs/link-preview.md +1 -1
  27. package/dist/generated-docs/llms-full.txt +101 -68
  28. package/dist/generated-docs/llms.txt +1 -1
  29. package/dist/generated-docs/manifest.json +24 -24
  30. package/dist/generated-docs/menu.md +1 -1
  31. package/dist/generated-docs/menubar.md +1 -1
  32. package/dist/generated-docs/navigation-menu.md +1 -1
  33. package/dist/generated-docs/notes.md +12 -11
  34. package/dist/generated-docs/pagination.md +1 -1
  35. package/dist/generated-docs/pin-input.md +1 -1
  36. package/dist/generated-docs/popover.md +1 -1
  37. package/dist/generated-docs/radio-group.md +1 -1
  38. package/dist/generated-docs/range-calendar.md +1 -1
  39. package/dist/generated-docs/rating-group.md +1 -1
  40. package/dist/generated-docs/scroll-area.md +1 -1
  41. package/dist/generated-docs/select.md +1 -1
  42. package/dist/generated-docs/sheet.md +1 -1
  43. package/dist/generated-docs/slider.md +1 -1
  44. package/dist/generated-docs/step.md +1 -1
  45. package/dist/generated-docs/table.md +1 -1
  46. package/dist/generated-docs/tabs.md +1 -1
  47. package/dist/generated-docs/time-field.md +1 -1
  48. package/dist/generated-docs/time-range-field.md +1 -1
  49. package/dist/generated-docs/toggle-group.md +1 -1
  50. package/dist/generated-docs/toolbar.md +1 -1
  51. package/dist/generated-docs/tooltip.md +1 -1
  52. package/dist/generated-docs/utilities.json +10 -10
  53. package/dist/generated-docs/utilities.md +41 -19
  54. package/dist/os/index.d.ts +0 -1
  55. package/dist/os/index.js +0 -1
  56. package/dist/os/notification-center.svelte +1 -2
  57. package/dist/os/taskbar.svelte +2 -3
  58. package/dist/os/toaster.svelte +2 -3
  59. package/dist/styles/index.css +77 -12
  60. package/dist/styles/layers.css +48 -0
  61. package/dist/styles/surfaces/base.css +4 -2
  62. package/dist/styles/surfaces/glass.css +0 -13
  63. package/dist/theme/index.d.ts +87 -0
  64. package/dist/theme/index.js +86 -0
  65. package/dist/ui/alert-dialog/alert-dialog-content.svelte +2 -2
  66. package/dist/ui/alert-dialog/alert-dialog-overlay.svelte +1 -1
  67. package/dist/ui/badge/badge.svelte +14 -1
  68. package/dist/ui/badge/badge.svelte.d.ts +4 -0
  69. package/dist/ui/button/button.svelte +37 -7
  70. package/dist/ui/button/button.svelte.d.ts +6 -0
  71. package/dist/ui/chip/chip.svelte +14 -1
  72. package/dist/ui/chip/chip.svelte.d.ts +4 -0
  73. package/dist/ui/combobox/combobox-content.svelte +1 -1
  74. package/dist/ui/command-bar/command-bar.svelte +1 -1
  75. package/dist/ui/context-menu/context-menu-content.svelte +1 -1
  76. package/dist/ui/context-menu/context-menu-sub-content.svelte +1 -1
  77. package/dist/ui/date-picker/date-picker-content.svelte +1 -1
  78. package/dist/ui/date-range-picker/date-range-picker-content.svelte +1 -1
  79. package/dist/ui/dialog/dialog-content.svelte +1 -1
  80. package/dist/ui/dialog/dialog-overlay.svelte +5 -1
  81. package/dist/ui/dropdown-menu/dropdown-menu-content.svelte +1 -1
  82. package/dist/ui/dropdown-menu/dropdown-menu-sub-content.svelte +1 -1
  83. package/dist/ui/link-preview/link-preview-content.svelte +1 -1
  84. package/dist/ui/menubar/menubar-content.svelte +1 -1
  85. package/dist/ui/menubar/menubar-sub-content.svelte +1 -1
  86. package/dist/ui/pin-input/index.d.ts +1 -0
  87. package/dist/ui/pin-input/index.js +10 -0
  88. package/dist/ui/popover/popover-content.svelte +1 -1
  89. package/dist/ui/select/select-content.svelte +1 -1
  90. package/dist/ui/sheet/sheet-content.svelte +1 -1
  91. package/dist/ui/sheet/sheet-content.svelte.d.ts +1 -1
  92. package/dist/ui/tooltip/tooltip-content.svelte +1 -1
  93. package/package.json +9 -12
  94. package/dist/apps/index.d.ts +0 -20
  95. package/dist/apps/index.js +0 -20
  96. package/dist/apps/llm-shell/index.d.ts +0 -2
  97. package/dist/apps/llm-shell/index.js +0 -1
  98. package/dist/apps/llm-shell/llm-shell.svelte +0 -334
  99. package/dist/apps/llm-shell/llm-shell.svelte.d.ts +0 -57
  100. package/dist/apps/llm-shell/llm-swarm.svelte +0 -79
  101. package/dist/apps/llm-shell/llm-swarm.svelte.d.ts +0 -25
  102. package/dist/apps/llm-shell/types.d.ts +0 -103
  103. package/dist/apps/llm-shell/types.js +0 -1
  104. package/dist/apps/notes/editor/bubble-menu.svelte.d.ts +0 -11
  105. package/dist/apps/notes/editor/bubble-menu.svelte.js +0 -165
  106. package/dist/apps/notes/editor/bubble-toolbar.svelte +0 -55
  107. package/dist/apps/notes/editor/bubble-toolbar.svelte.d.ts +0 -22
  108. package/dist/apps/notes/editor/extensions.d.ts +0 -18
  109. package/dist/apps/notes/editor/extensions.js +0 -88
  110. package/dist/apps/notes/editor/floating.d.ts +0 -25
  111. package/dist/apps/notes/editor/floating.js +0 -54
  112. package/dist/apps/notes/editor/link.d.ts +0 -9
  113. package/dist/apps/notes/editor/link.js +0 -22
  114. package/dist/apps/notes/editor/list-cleanup-rule.d.ts +0 -14
  115. package/dist/apps/notes/editor/list-cleanup-rule.js +0 -47
  116. package/dist/apps/notes/editor/slash-command.svelte.d.ts +0 -22
  117. package/dist/apps/notes/editor/slash-command.svelte.js +0 -215
  118. package/dist/apps/notes/editor/slash-menu.svelte +0 -82
  119. package/dist/apps/notes/editor/slash-menu.svelte.d.ts +0 -23
  120. package/dist/apps/notes/index.d.ts +0 -11
  121. package/dist/apps/notes/index.js +0 -13
  122. package/dist/apps/notes/markdown.d.ts +0 -12
  123. package/dist/apps/notes/markdown.js +0 -165
  124. package/dist/apps/notes/note-editor.svelte +0 -176
  125. package/dist/apps/notes/note-editor.svelte.d.ts +0 -36
  126. package/dist/apps/notes/notes-store.svelte.d.ts +0 -64
  127. package/dist/apps/notes/notes-store.svelte.js +0 -234
  128. package/dist/apps/notes/notes.svelte +0 -501
  129. package/dist/apps/notes/notes.svelte.d.ts +0 -53
  130. package/dist/apps/notes/tree.d.ts +0 -70
  131. package/dist/apps/notes/tree.js +0 -185
  132. package/dist/apps/notes/types.d.ts +0 -49
  133. package/dist/apps/notes/types.js +0 -11
  134. package/dist/docs/package-name.d.ts +0 -18
  135. package/dist/docs/package-name.js +0 -18
  136. package/dist/docs/quickstart.md +0 -43
  137. package/dist/os/layers.d.ts +0 -23
  138. package/dist/os/layers.js +0 -23
@@ -59,7 +59,7 @@
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-control bg-surface font-mono text-body shadow-[inset_0_0_0_0.5px_var(--color-border),var(--era-shadow)]"
62
+ class="fixed right-4 bottom-4 z-debug 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
65
  class="flex items-center gap-icon-inset-chip px-inset-chip py-gutter shadow-[inset_0_-0.5px_0_0_var(--color-border)]"
@@ -1,4 +1,4 @@
1
- import { PACKAGE } from './package-name.js';
1
+ import { PACKAGE, importLine } from './consumer-import.js';
2
2
  import { extractProps } from './extract-props.js';
3
3
  export function buildComponentDocFromSources(entry, sources, appendix) {
4
4
  const { slug, name, description } = entry;
@@ -12,7 +12,7 @@ export function buildComponentDocFromSources(entry, sources, appendix) {
12
12
  }
13
13
  return lines.join('\n');
14
14
  }
15
- lines.push('## Import', '', '```ts', `import { ${root.alias} } from "${PACKAGE}/${slug}";`, '```', '');
15
+ lines.push('## Import', '', '```ts', importLine(root.kind, root.alias, slug), '```', '');
16
16
  const subs = sources.subExportsBySlug[slug] ?? [];
17
17
  const files = sources.svelteBySlug[slug] ?? {};
18
18
  if (root.kind === 'namespace') {
@@ -0,0 +1,37 @@
1
+ /**
2
+ * The import line a CONSUMER writes, and the two ways it has been wrong.
3
+ *
4
+ * WRONG ONCE (fixed in 12.1.1): the docs printed `$lib/ui/<slug>`, a SvelteKit
5
+ * alias that resolves inside this repo and nowhere else.
6
+ *
7
+ * WRONG AGAIN, and this one survived that fix because it is a different
8
+ * mistake: every component was documented with NAMED import syntax. That is
9
+ * right for `export { Button }` and silently wrong for `export * as PinInput`,
10
+ * where the component's own index exports `Root` and `Cell` and no `PinInput`
11
+ * at all. `import { PinInput } from '@signal9/era-ui/pin-input'` therefore
12
+ * type-checks, builds, and evaluates to `undefined` — it fails at RENDER, and
13
+ * the docs are the only place a consumer could have learned otherwise.
14
+ *
15
+ * The shape is decided by how src/lib/ui/index.ts re-exports the component,
16
+ * which is a barrel consumers cannot import — so the two spellings have to be
17
+ * translated here rather than copied from it.
18
+ *
19
+ * npm's name deliberately: the package publishes under two names
20
+ * (`@sig-nine/era-ui` on GitHub Packages, where the scope must match the repo
21
+ * owner) and npm's is the one a reader can install without auth.
22
+ *
23
+ * Its own module, with no imports of its own, because the node doc builder
24
+ * loads it through --experimental-strip-types — which cannot follow the `.js`
25
+ * specifiers the rest of src/lib/docs uses.
26
+ */
27
+ export declare const PACKAGE = "@signal9/era-ui";
28
+ /** How a component is re-exported by the internal barrel. */
29
+ export type ImportKind = 'named' | 'namespace';
30
+ /** The import statement, in the spelling that actually resolves. */
31
+ export declare function importLine(kind: ImportKind, alias: string, slug: string): string;
32
+ /**
33
+ * The symbol a consumer must be able to reach, given the documented import.
34
+ * For a namespace import that is nothing — `import * as X` always binds — so
35
+ * only named imports can be checked against the component's own exports.
36
+ */
37
+ export declare function requiredExport(kind: ImportKind, alias: string): string | null;
@@ -0,0 +1,42 @@
1
+ /**
2
+ * The import line a CONSUMER writes, and the two ways it has been wrong.
3
+ *
4
+ * WRONG ONCE (fixed in 12.1.1): the docs printed `$lib/ui/<slug>`, a SvelteKit
5
+ * alias that resolves inside this repo and nowhere else.
6
+ *
7
+ * WRONG AGAIN, and this one survived that fix because it is a different
8
+ * mistake: every component was documented with NAMED import syntax. That is
9
+ * right for `export { Button }` and silently wrong for `export * as PinInput`,
10
+ * where the component's own index exports `Root` and `Cell` and no `PinInput`
11
+ * at all. `import { PinInput } from '@signal9/era-ui/pin-input'` therefore
12
+ * type-checks, builds, and evaluates to `undefined` — it fails at RENDER, and
13
+ * the docs are the only place a consumer could have learned otherwise.
14
+ *
15
+ * The shape is decided by how src/lib/ui/index.ts re-exports the component,
16
+ * which is a barrel consumers cannot import — so the two spellings have to be
17
+ * translated here rather than copied from it.
18
+ *
19
+ * npm's name deliberately: the package publishes under two names
20
+ * (`@sig-nine/era-ui` on GitHub Packages, where the scope must match the repo
21
+ * owner) and npm's is the one a reader can install without auth.
22
+ *
23
+ * Its own module, with no imports of its own, because the node doc builder
24
+ * loads it through --experimental-strip-types — which cannot follow the `.js`
25
+ * specifiers the rest of src/lib/docs uses.
26
+ */
27
+ export const PACKAGE = '@signal9/era-ui';
28
+ /** The import statement, in the spelling that actually resolves. */
29
+ export function importLine(kind, alias, slug) {
30
+ const spec = `"${PACKAGE}/${slug}"`;
31
+ return kind === 'namespace'
32
+ ? `import * as ${alias} from ${spec};`
33
+ : `import { ${alias} } from ${spec};`;
34
+ }
35
+ /**
36
+ * The symbol a consumer must be able to reach, given the documented import.
37
+ * For a namespace import that is nothing — `import * as X` always binds — so
38
+ * only named imports can be checked against the component's own exports.
39
+ */
40
+ export function requiredExport(kind, alias) {
41
+ return kind === 'named' ? alias : null;
42
+ }
@@ -175,7 +175,12 @@ export function themeKeyClasses(themeKey, prefixes = THEME_CLASS_PREFIXES) {
175
175
  * the whole run, so the radius ladder or the spacing scale documents once.
176
176
  */
177
177
  function parseTheme(file, source) {
178
- const theme = source.match(/@theme[^{]*\{([\s\S]*?)\n\}/);
178
+ // Anchored to the start of a line: `@theme` also appears in PROSE (the layering
179
+ // comment in index.css explains that @utility and @theme are Tailwind's to
180
+ // place), and an unanchored match happily started inside that comment, ran to
181
+ // the next `{` it found, and returned garbage — silently dropping every
182
+ // theme-derived class from the docs.
183
+ const theme = source.match(/^@theme[^{]*\{([\s\S]*?)\n\}/m);
179
184
  if (!theme)
180
185
  return [];
181
186
  const body = theme[1];
@@ -243,6 +248,17 @@ const INTRO = [
243
248
  '| `text-body` | density-derived body/control text size |',
244
249
  '| `p-gutter` / `gap-gutter` / `mt-gutter` / … | the spacing scale — EVERY spacing prefix works |',
245
250
  '',
251
+ 'THE SPACING NAMES IN SIZE ORDER, smallest first, because the names do not',
252
+ 'imply it and guessing gets it backwards:',
253
+ '',
254
+ ' gutter < panel < field < card < content',
255
+ '',
256
+ 'Measured at `data-mode="balanced"`: gutter 5px, field ~9px, card ~11px,',
257
+ 'content ~22px. `gutter` is the TIGHT one — the gap between sibling controls',
258
+ "and a rail's own padding. `field` is a text input's side padding, not the",
259
+ 'label-to-input gap. Reading them the other way round produces a layout whose',
260
+ 'hierarchy is inverted and therefore reads flat.',
261
+ '',
246
262
  'The spacing names (`gutter`, `card`, `panel`, `content`, `menu`, `field`, the',
247
263
  '`inset-*` and concentric `*-inset-*` insets, `glyph-*`) are registered as a',
248
264
  'Tailwind spacing scale, so every prefix derives automatically: `p-`, `px-`,',
@@ -1,18 +1,19 @@
1
1
  ## Usage
2
2
 
3
- Apps ship on their own subpath and are **not** re-exported from `@signal9/era-ui`.
4
- Notes carries TipTap, and a consumer who never imports an app should never pay
5
- for it.
3
+ **Notes is not published.** It lives in `src/apps/` in the era-ui repository,
4
+ outside the packaged `src/lib`, so there is no import path that reaches it — the
5
+ `@signal9/era-ui/apps` subpath was removed in v13.
6
6
 
7
- ```svelte
8
- <script>
9
- import { Notes } from '@signal9/era-ui/apps';
10
- </script>
7
+ A design system that also ships a note-taking application is two products in one
8
+ package: Notes alone brings fifteen TipTap packages, and its release cadence and
9
+ support expectations are nothing like a primitive's. It stays in the repo as a
10
+ reference implementation and a demo — read it, copy it, or lift it into the
11
+ product that renders it.
11
12
 
12
- <Notes />
13
- ```
13
+ What era DOES publish is the part that generalises: `@signal9/era-ui/styles/prose`
14
+ is the document typography Notes uses, available to anyone building an editor.
14
15
 
15
- That is the whole integration: a sidebar with filter, pin, and delete; a TipTap
16
+ Read as a reference, the integration is: a sidebar with filter, pin, and delete; a TipTap
16
17
  document with a `/` command menu and a selection toolbar; and persistence to
17
18
  `localStorage` under `era-ui:notes`.
18
19
 
@@ -46,7 +47,7 @@ Persistence is one small interface, so server-backed hosting is a drop-in swap
46
47
  `load`/`save` may be sync or async:
47
48
 
48
49
  ```ts
49
- import { Notes, NotesStore } from '@signal9/era-ui/apps';
50
+ import { Notes, NotesStore } from '$apps/index.js'; // in-repo; not published
50
51
 
51
52
  const store = new NotesStore({
52
53
  adapter: {