@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.
- package/dist/dev/audit-overlay.svelte +1 -1
- package/dist/docs/component-docs-core.js +2 -2
- package/dist/docs/consumer-import.d.ts +37 -0
- package/dist/docs/consumer-import.js +42 -0
- package/dist/docs/css-utilities.js +17 -1
- package/dist/docs/notes.md +12 -11
- package/dist/era-ui.css +1 -1
- package/dist/generated-docs/accordion.md +1 -1
- package/dist/generated-docs/alert-dialog.md +1 -1
- package/dist/generated-docs/avatar.md +1 -1
- package/dist/generated-docs/badge.md +3 -0
- package/dist/generated-docs/button.md +4 -0
- package/dist/generated-docs/calendar.md +1 -1
- package/dist/generated-docs/checkbox.md +1 -1
- package/dist/generated-docs/chip.md +3 -0
- package/dist/generated-docs/collapsible.md +1 -1
- package/dist/generated-docs/combobox.md +1 -1
- package/dist/generated-docs/command.md +1 -1
- package/dist/generated-docs/context-menu.md +1 -1
- package/dist/generated-docs/date-field.md +1 -1
- package/dist/generated-docs/date-picker.md +1 -1
- package/dist/generated-docs/date-range-field.md +1 -1
- package/dist/generated-docs/date-range-picker.md +1 -1
- package/dist/generated-docs/dialog.md +1 -1
- package/dist/generated-docs/dropdown-menu.md +1 -1
- package/dist/generated-docs/link-preview.md +1 -1
- package/dist/generated-docs/llms-full.txt +101 -68
- package/dist/generated-docs/llms.txt +1 -1
- package/dist/generated-docs/manifest.json +24 -24
- package/dist/generated-docs/menu.md +1 -1
- package/dist/generated-docs/menubar.md +1 -1
- package/dist/generated-docs/navigation-menu.md +1 -1
- package/dist/generated-docs/notes.md +12 -11
- package/dist/generated-docs/pagination.md +1 -1
- package/dist/generated-docs/pin-input.md +1 -1
- package/dist/generated-docs/popover.md +1 -1
- package/dist/generated-docs/radio-group.md +1 -1
- package/dist/generated-docs/range-calendar.md +1 -1
- package/dist/generated-docs/rating-group.md +1 -1
- package/dist/generated-docs/scroll-area.md +1 -1
- package/dist/generated-docs/select.md +1 -1
- package/dist/generated-docs/sheet.md +1 -1
- package/dist/generated-docs/slider.md +1 -1
- package/dist/generated-docs/step.md +1 -1
- package/dist/generated-docs/table.md +1 -1
- package/dist/generated-docs/tabs.md +1 -1
- package/dist/generated-docs/time-field.md +1 -1
- package/dist/generated-docs/time-range-field.md +1 -1
- package/dist/generated-docs/toggle-group.md +1 -1
- package/dist/generated-docs/toolbar.md +1 -1
- package/dist/generated-docs/tooltip.md +1 -1
- package/dist/generated-docs/utilities.json +10 -10
- package/dist/generated-docs/utilities.md +41 -19
- package/dist/os/index.d.ts +0 -1
- package/dist/os/index.js +0 -1
- package/dist/os/notification-center.svelte +1 -2
- package/dist/os/taskbar.svelte +2 -3
- package/dist/os/toaster.svelte +2 -3
- package/dist/styles/index.css +77 -12
- package/dist/styles/layers.css +48 -0
- package/dist/styles/surfaces/base.css +4 -2
- package/dist/styles/surfaces/glass.css +0 -13
- package/dist/theme/index.d.ts +87 -0
- package/dist/theme/index.js +86 -0
- 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/badge/badge.svelte +14 -1
- package/dist/ui/badge/badge.svelte.d.ts +4 -0
- package/dist/ui/button/button.svelte +37 -7
- package/dist/ui/button/button.svelte.d.ts +6 -0
- package/dist/ui/chip/chip.svelte +14 -1
- package/dist/ui/chip/chip.svelte.d.ts +4 -0
- package/dist/ui/combobox/combobox-content.svelte +1 -1
- package/dist/ui/command-bar/command-bar.svelte +1 -1
- package/dist/ui/context-menu/context-menu-content.svelte +1 -1
- package/dist/ui/context-menu/context-menu-sub-content.svelte +1 -1
- package/dist/ui/date-picker/date-picker-content.svelte +1 -1
- package/dist/ui/date-range-picker/date-range-picker-content.svelte +1 -1
- package/dist/ui/dialog/dialog-content.svelte +1 -1
- package/dist/ui/dialog/dialog-overlay.svelte +5 -1
- package/dist/ui/dropdown-menu/dropdown-menu-content.svelte +1 -1
- package/dist/ui/dropdown-menu/dropdown-menu-sub-content.svelte +1 -1
- package/dist/ui/link-preview/link-preview-content.svelte +1 -1
- package/dist/ui/menubar/menubar-content.svelte +1 -1
- package/dist/ui/menubar/menubar-sub-content.svelte +1 -1
- package/dist/ui/pin-input/index.d.ts +1 -0
- package/dist/ui/pin-input/index.js +10 -0
- package/dist/ui/popover/popover-content.svelte +1 -1
- package/dist/ui/select/select-content.svelte +1 -1
- package/dist/ui/sheet/sheet-content.svelte +1 -1
- package/dist/ui/sheet/sheet-content.svelte.d.ts +1 -1
- package/dist/ui/tooltip/tooltip-content.svelte +1 -1
- package/package.json +9 -12
- package/dist/apps/index.d.ts +0 -20
- package/dist/apps/index.js +0 -20
- package/dist/apps/llm-shell/index.d.ts +0 -2
- package/dist/apps/llm-shell/index.js +0 -1
- package/dist/apps/llm-shell/llm-shell.svelte +0 -334
- package/dist/apps/llm-shell/llm-shell.svelte.d.ts +0 -57
- package/dist/apps/llm-shell/llm-swarm.svelte +0 -79
- package/dist/apps/llm-shell/llm-swarm.svelte.d.ts +0 -25
- package/dist/apps/llm-shell/types.d.ts +0 -103
- package/dist/apps/llm-shell/types.js +0 -1
- package/dist/apps/notes/editor/bubble-menu.svelte.d.ts +0 -11
- package/dist/apps/notes/editor/bubble-menu.svelte.js +0 -165
- package/dist/apps/notes/editor/bubble-toolbar.svelte +0 -55
- package/dist/apps/notes/editor/bubble-toolbar.svelte.d.ts +0 -22
- package/dist/apps/notes/editor/extensions.d.ts +0 -18
- package/dist/apps/notes/editor/extensions.js +0 -88
- package/dist/apps/notes/editor/floating.d.ts +0 -25
- package/dist/apps/notes/editor/floating.js +0 -54
- package/dist/apps/notes/editor/link.d.ts +0 -9
- package/dist/apps/notes/editor/link.js +0 -22
- package/dist/apps/notes/editor/list-cleanup-rule.d.ts +0 -14
- package/dist/apps/notes/editor/list-cleanup-rule.js +0 -47
- package/dist/apps/notes/editor/slash-command.svelte.d.ts +0 -22
- package/dist/apps/notes/editor/slash-command.svelte.js +0 -215
- package/dist/apps/notes/editor/slash-menu.svelte +0 -82
- package/dist/apps/notes/editor/slash-menu.svelte.d.ts +0 -23
- package/dist/apps/notes/index.d.ts +0 -11
- package/dist/apps/notes/index.js +0 -13
- package/dist/apps/notes/markdown.d.ts +0 -12
- package/dist/apps/notes/markdown.js +0 -165
- package/dist/apps/notes/note-editor.svelte +0 -176
- package/dist/apps/notes/note-editor.svelte.d.ts +0 -36
- package/dist/apps/notes/notes-store.svelte.d.ts +0 -64
- package/dist/apps/notes/notes-store.svelte.js +0 -234
- package/dist/apps/notes/notes.svelte +0 -501
- package/dist/apps/notes/notes.svelte.d.ts +0 -53
- package/dist/apps/notes/tree.d.ts +0 -70
- package/dist/apps/notes/tree.js +0 -185
- package/dist/apps/notes/types.d.ts +0 -49
- package/dist/apps/notes/types.js +0 -11
- package/dist/docs/package-name.d.ts +0 -18
- package/dist/docs/package-name.js +0 -18
- package/dist/docs/quickstart.md +0 -43
- package/dist/os/layers.d.ts +0 -23
- 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-
|
|
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 './
|
|
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',
|
|
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
|
-
|
|
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-`,',
|
package/dist/docs/notes.md
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
## Usage
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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 '
|
|
50
|
+
import { Notes, NotesStore } from '$apps/index.js'; // in-repo; not published
|
|
50
51
|
|
|
51
52
|
const store = new NotesStore({
|
|
52
53
|
adapter: {
|