@signal9/era-ui 3.10.0 → 3.11.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/apps/index.d.ts +19 -0
- package/dist/apps/index.js +19 -0
- package/dist/apps/notes/editor/bubble-menu.svelte.d.ts +11 -0
- package/dist/apps/notes/editor/bubble-menu.svelte.js +106 -0
- package/dist/apps/notes/editor/bubble-toolbar.svelte +42 -0
- package/dist/apps/notes/editor/bubble-toolbar.svelte.d.ts +22 -0
- package/dist/apps/notes/editor/extensions.d.ts +18 -0
- package/dist/apps/notes/editor/extensions.js +88 -0
- package/dist/apps/notes/editor/floating.d.ts +21 -0
- package/dist/apps/notes/editor/floating.js +44 -0
- package/dist/apps/notes/editor/link.d.ts +9 -0
- package/dist/apps/notes/editor/link.js +22 -0
- package/dist/apps/notes/editor/list-cleanup-rule.d.ts +14 -0
- package/dist/apps/notes/editor/list-cleanup-rule.js +47 -0
- package/dist/apps/notes/editor/slash-command.svelte.d.ts +22 -0
- package/dist/apps/notes/editor/slash-command.svelte.js +215 -0
- package/dist/apps/notes/editor/slash-menu.svelte +63 -0
- package/dist/apps/notes/editor/slash-menu.svelte.d.ts +23 -0
- package/dist/apps/notes/index.d.ts +11 -0
- package/dist/apps/notes/index.js +13 -0
- package/dist/apps/notes/markdown.d.ts +12 -0
- package/dist/apps/notes/markdown.js +165 -0
- package/dist/apps/notes/note-editor.svelte +456 -0
- package/dist/apps/notes/note-editor.svelte.d.ts +35 -0
- package/dist/apps/notes/notes-store.svelte.d.ts +64 -0
- package/dist/apps/notes/notes-store.svelte.js +234 -0
- package/dist/apps/notes/notes.svelte +377 -0
- package/dist/apps/notes/notes.svelte.d.ts +22 -0
- package/dist/apps/notes/tree.d.ts +70 -0
- package/dist/apps/notes/tree.js +185 -0
- package/dist/apps/notes/types.d.ts +49 -0
- package/dist/apps/notes/types.js +11 -0
- package/dist/docs/notes.md +82 -0
- package/dist/era-ui.css +1 -1
- package/dist/generated-docs/llms-full.txt +91 -0
- package/dist/generated-docs/llms.txt +1 -1
- package/dist/generated-docs/manifest.json +15 -0
- package/dist/generated-docs/notes.md +86 -0
- package/dist/ui/badge/badge.svelte.d.ts +17 -17
- package/dist/ui/bar/bar.svelte.d.ts +11 -11
- package/dist/ui/button/variants.d.ts +44 -44
- package/dist/ui/card/card.svelte.d.ts +20 -20
- package/dist/ui/chip/chip.svelte.d.ts +14 -14
- package/dist/ui/pane/pane-root.svelte.d.ts +1 -1
- package/dist/ui/pane/pane.svelte.d.ts +1 -1
- package/dist/ui/sheet/sheet-content.svelte.d.ts +14 -14
- package/dist/ui/skeleton/skeleton.svelte.d.ts +11 -11
- package/dist/utils/index.js +11 -0
- package/package.json +31 -5
|
@@ -590,6 +590,97 @@ Release history — every version, grouped by change type.
|
|
|
590
590
|
|
|
591
591
|
<!-- end: changelog -->
|
|
592
592
|
|
|
593
|
+
<!-- begin: notes -->
|
|
594
|
+
|
|
595
|
+
# Notes
|
|
596
|
+
|
|
597
|
+
A complete notes app — rich-text editor, slash commands, local persistence.
|
|
598
|
+
|
|
599
|
+
## Usage
|
|
600
|
+
|
|
601
|
+
Apps ship on their own subpath and are **not** re-exported from `@sig-nine/era-ui`.
|
|
602
|
+
Notes carries TipTap, and a consumer who never imports an app should never pay
|
|
603
|
+
for it.
|
|
604
|
+
|
|
605
|
+
```svelte
|
|
606
|
+
<script>
|
|
607
|
+
import { Notes } from '@sig-nine/era-ui/apps';
|
|
608
|
+
</script>
|
|
609
|
+
|
|
610
|
+
<Notes />
|
|
611
|
+
```
|
|
612
|
+
|
|
613
|
+
That is the whole integration: a sidebar with filter, pin, and delete; a TipTap
|
|
614
|
+
document with a `/` command menu and a selection toolbar; and persistence to
|
|
615
|
+
`localStorage` under `era-ui:notes`.
|
|
616
|
+
|
|
617
|
+
## Peer dependencies
|
|
618
|
+
|
|
619
|
+
Install alongside the library (they are not bundled):
|
|
620
|
+
|
|
621
|
+
```
|
|
622
|
+
@tiptap/core @tiptap/pm @tiptap/starter-kit @tiptap/suggestion
|
|
623
|
+
@tiptap/extension-code-block-lowlight @tiptap/extension-details
|
|
624
|
+
@tiptap/extension-highlight @tiptap/extension-image
|
|
625
|
+
@tiptap/extension-placeholder @tiptap/extension-table
|
|
626
|
+
@tiptap/extension-task-item @tiptap/extension-task-list
|
|
627
|
+
@tiptap/extension-typography @tiptap/extension-unique-id
|
|
628
|
+
lowlight tiptap-markdown
|
|
629
|
+
```
|
|
630
|
+
|
|
631
|
+
## Props
|
|
632
|
+
|
|
633
|
+
| Prop | Type | Default | Notes |
|
|
634
|
+
| ------------ | ---------------- | ------------------ | ----------------------------------------------------------------- |
|
|
635
|
+
| `store` | `NotesStore` | created internally | Bring your own; when set, the host owns its lifecycle. |
|
|
636
|
+
| `adapter` | `NotesAdapter` | `localStorage` | Persistence for the internally-created store. |
|
|
637
|
+
| `storageKey` | `string` | `era-ui:notes` | Key for the default adapter. |
|
|
638
|
+
| `noteId` | `string \| null` | `null` | `$bindable` — the open note, for deep-linking or session restore. |
|
|
639
|
+
| `seed` | `NoteInit[]` | — | Created only when storage comes back empty (first-run sample). |
|
|
640
|
+
|
|
641
|
+
## Persistence
|
|
642
|
+
|
|
643
|
+
Persistence is one small interface, so server-backed hosting is a drop-in swap —
|
|
644
|
+
`load`/`save` may be sync or async:
|
|
645
|
+
|
|
646
|
+
```ts
|
|
647
|
+
import { Notes, NotesStore } from '@sig-nine/era-ui/apps';
|
|
648
|
+
|
|
649
|
+
const store = new NotesStore({
|
|
650
|
+
adapter: {
|
|
651
|
+
load: () => fetch('/api/notes').then((r) => r.json()),
|
|
652
|
+
save: (notes) => fetch('/api/notes', { method: 'PUT', body: JSON.stringify(notes) })
|
|
653
|
+
}
|
|
654
|
+
});
|
|
655
|
+
```
|
|
656
|
+
|
|
657
|
+
`NotesStore` is the reactive source of truth (`notes`, `ordered`, `loading`,
|
|
658
|
+
`status`, `lastError`) with `create` / `update` / `remove` / `togglePin` /
|
|
659
|
+
`setIcon` / `search` / `toMarkdown` / `flush`. Writes are debounced and
|
|
660
|
+
coalesced, so a burst of keystrokes costs one `save`.
|
|
661
|
+
|
|
662
|
+
## The heading index
|
|
663
|
+
|
|
664
|
+
Every document is also a tree. `buildGlobalTree()` walks heading structure,
|
|
665
|
+
`treeToText()` renders it as a table of contents a model can read, and
|
|
666
|
+
`extractSection(title, doc, headingId)` returns just the requested slice as
|
|
667
|
+
structure-preserving markdown — reasoning-based retrieval rather than
|
|
668
|
+
embeddings. Heading ids are stable (`@tiptap/extension-unique-id`), so a section
|
|
669
|
+
address survives edits above it.
|
|
670
|
+
|
|
671
|
+
## Notes
|
|
672
|
+
|
|
673
|
+
- Keyboard: `/` opens the command menu, `Mod-K` links a selection, `Mod-S`
|
|
674
|
+
flushes pending writes immediately.
|
|
675
|
+
- The slash menu and selection toolbar are real Svelte components mounted into
|
|
676
|
+
the document root, so they follow every axis — density tiers, surface chrome,
|
|
677
|
+
corners, motion, font — instead of carrying their own hardcoded styling.
|
|
678
|
+
- `@tiptap/extension-mathematics` is deliberately absent: it needs KaTeX's
|
|
679
|
+
stylesheet and fonts to render. Spread `noteExtensions` and add it yourself if
|
|
680
|
+
you want math.
|
|
681
|
+
|
|
682
|
+
<!-- end: notes -->
|
|
683
|
+
|
|
593
684
|
<!-- begin: aspect-ratio -->
|
|
594
685
|
|
|
595
686
|
# Aspect Ratio
|
|
@@ -31,7 +31,7 @@ Full concatenated reference: `{{ORIGIN}}/llms-full.txt`.
|
|
|
31
31
|
|
|
32
32
|
## Components
|
|
33
33
|
|
|
34
|
-
getting-started, spacing, surfaces, measurements, text, utilities, draggable, llm-shell, os, changelog, aspect-ratio, badge, avatar, bar, button, button-group, pane, card, chip, code-block, copy-button, cycle, kv, separator, sheet, skeleton, switch, toggle, accordion, alert-dialog, calendar, checkbox, collapsible, combobox, command, command-bar, step, context-menu, date-field, date-picker, date-range-field, date-range-picker, dialog, dropdown-menu, file-upload, scroll-area, input, link-preview, label, logo, menu, menubar, meter, navigation-menu, mode, pagination, pin-input, popover, progress, range-calendar, radio-group, rating-group, select, slider, table, tabs, time-field, time-range-field, toggle-group, toolbar, video-player, tooltip
|
|
34
|
+
getting-started, spacing, surfaces, measurements, text, utilities, draggable, llm-shell, os, changelog, notes, aspect-ratio, badge, avatar, bar, button, button-group, pane, card, chip, code-block, copy-button, cycle, kv, separator, sheet, skeleton, switch, toggle, accordion, alert-dialog, calendar, checkbox, collapsible, combobox, command, command-bar, step, context-menu, date-field, date-picker, date-range-field, date-range-picker, dialog, dropdown-menu, file-upload, scroll-area, input, link-preview, label, logo, menu, menubar, meter, navigation-menu, mode, pagination, pin-input, popover, progress, range-calendar, radio-group, rating-group, select, slider, table, tabs, time-field, time-range-field, toggle-group, toolbar, video-player, tooltip
|
|
35
35
|
|
|
36
36
|
## CSS utilities
|
|
37
37
|
|
|
@@ -100,6 +100,21 @@
|
|
|
100
100
|
"sections": [],
|
|
101
101
|
"file": "changelog.md"
|
|
102
102
|
},
|
|
103
|
+
{
|
|
104
|
+
"slug": "notes",
|
|
105
|
+
"title": "Notes",
|
|
106
|
+
"summary": "A complete notes app — rich-text editor, slash commands, local persistence.",
|
|
107
|
+
"tokenEstimate": 885,
|
|
108
|
+
"sections": [
|
|
109
|
+
"Usage",
|
|
110
|
+
"Peer dependencies",
|
|
111
|
+
"Props",
|
|
112
|
+
"Persistence",
|
|
113
|
+
"The heading index",
|
|
114
|
+
"Notes"
|
|
115
|
+
],
|
|
116
|
+
"file": "notes.md"
|
|
117
|
+
},
|
|
103
118
|
{
|
|
104
119
|
"slug": "aspect-ratio",
|
|
105
120
|
"title": "Aspect Ratio",
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# Notes
|
|
2
|
+
|
|
3
|
+
A complete notes app — rich-text editor, slash commands, local persistence.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
Apps ship on their own subpath and are **not** re-exported from `@sig-nine/era-ui`.
|
|
8
|
+
Notes carries TipTap, and a consumer who never imports an app should never pay
|
|
9
|
+
for it.
|
|
10
|
+
|
|
11
|
+
```svelte
|
|
12
|
+
<script>
|
|
13
|
+
import { Notes } from '@sig-nine/era-ui/apps';
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<Notes />
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
That is the whole integration: a sidebar with filter, pin, and delete; a TipTap
|
|
20
|
+
document with a `/` command menu and a selection toolbar; and persistence to
|
|
21
|
+
`localStorage` under `era-ui:notes`.
|
|
22
|
+
|
|
23
|
+
## Peer dependencies
|
|
24
|
+
|
|
25
|
+
Install alongside the library (they are not bundled):
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
@tiptap/core @tiptap/pm @tiptap/starter-kit @tiptap/suggestion
|
|
29
|
+
@tiptap/extension-code-block-lowlight @tiptap/extension-details
|
|
30
|
+
@tiptap/extension-highlight @tiptap/extension-image
|
|
31
|
+
@tiptap/extension-placeholder @tiptap/extension-table
|
|
32
|
+
@tiptap/extension-task-item @tiptap/extension-task-list
|
|
33
|
+
@tiptap/extension-typography @tiptap/extension-unique-id
|
|
34
|
+
lowlight tiptap-markdown
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Props
|
|
38
|
+
|
|
39
|
+
| Prop | Type | Default | Notes |
|
|
40
|
+
| ------------ | ---------------- | ------------------ | ----------------------------------------------------------------- |
|
|
41
|
+
| `store` | `NotesStore` | created internally | Bring your own; when set, the host owns its lifecycle. |
|
|
42
|
+
| `adapter` | `NotesAdapter` | `localStorage` | Persistence for the internally-created store. |
|
|
43
|
+
| `storageKey` | `string` | `era-ui:notes` | Key for the default adapter. |
|
|
44
|
+
| `noteId` | `string \| null` | `null` | `$bindable` — the open note, for deep-linking or session restore. |
|
|
45
|
+
| `seed` | `NoteInit[]` | — | Created only when storage comes back empty (first-run sample). |
|
|
46
|
+
|
|
47
|
+
## Persistence
|
|
48
|
+
|
|
49
|
+
Persistence is one small interface, so server-backed hosting is a drop-in swap —
|
|
50
|
+
`load`/`save` may be sync or async:
|
|
51
|
+
|
|
52
|
+
```ts
|
|
53
|
+
import { Notes, NotesStore } from '@sig-nine/era-ui/apps';
|
|
54
|
+
|
|
55
|
+
const store = new NotesStore({
|
|
56
|
+
adapter: {
|
|
57
|
+
load: () => fetch('/api/notes').then((r) => r.json()),
|
|
58
|
+
save: (notes) => fetch('/api/notes', { method: 'PUT', body: JSON.stringify(notes) })
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
`NotesStore` is the reactive source of truth (`notes`, `ordered`, `loading`,
|
|
64
|
+
`status`, `lastError`) with `create` / `update` / `remove` / `togglePin` /
|
|
65
|
+
`setIcon` / `search` / `toMarkdown` / `flush`. Writes are debounced and
|
|
66
|
+
coalesced, so a burst of keystrokes costs one `save`.
|
|
67
|
+
|
|
68
|
+
## The heading index
|
|
69
|
+
|
|
70
|
+
Every document is also a tree. `buildGlobalTree()` walks heading structure,
|
|
71
|
+
`treeToText()` renders it as a table of contents a model can read, and
|
|
72
|
+
`extractSection(title, doc, headingId)` returns just the requested slice as
|
|
73
|
+
structure-preserving markdown — reasoning-based retrieval rather than
|
|
74
|
+
embeddings. Heading ids are stable (`@tiptap/extension-unique-id`), so a section
|
|
75
|
+
address survives edits above it.
|
|
76
|
+
|
|
77
|
+
## Notes
|
|
78
|
+
|
|
79
|
+
- Keyboard: `/` opens the command menu, `Mod-K` links a selection, `Mod-S`
|
|
80
|
+
flushes pending writes immediately.
|
|
81
|
+
- The slash menu and selection toolbar are real Svelte components mounted into
|
|
82
|
+
the document root, so they follow every axis — density tiers, surface chrome,
|
|
83
|
+
corners, motion, font — instead of carrying their own hardcoded styling.
|
|
84
|
+
- `@tiptap/extension-mathematics` is deliberately absent: it needs KaTeX's
|
|
85
|
+
stylesheet and fonts to render. Spread `noteExtensions` and add it yourself if
|
|
86
|
+
you want math.
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
export declare const badgeVariants: import("tailwind-variants").TVReturnType<{
|
|
2
2
|
tone: {
|
|
3
|
-
default:
|
|
4
|
-
accent:
|
|
5
|
-
destructive:
|
|
6
|
-
success:
|
|
7
|
-
warning:
|
|
3
|
+
default: "bg-hover text-fg";
|
|
4
|
+
accent: "bg-primary text-primary-fg";
|
|
5
|
+
destructive: "bg-destructive text-destructive-fg";
|
|
6
|
+
success: "bg-success text-success-fg";
|
|
7
|
+
warning: "bg-warning text-warning-fg";
|
|
8
8
|
};
|
|
9
9
|
}, undefined, "inline-flex h-(--era-h-xxs) min-w-(--era-h-xxs) items-center justify-center gap-(--era-gap) rounded-(--era-rd-xxs) px-(--era-pill-xxs) font-mono text-body leading-none has-[svg]:gap-(--era-inset-xxs) era-text-trim", {
|
|
10
10
|
tone: {
|
|
11
|
-
default:
|
|
12
|
-
accent:
|
|
13
|
-
destructive:
|
|
14
|
-
success:
|
|
15
|
-
warning:
|
|
11
|
+
default: "bg-hover text-fg";
|
|
12
|
+
accent: "bg-primary text-primary-fg";
|
|
13
|
+
destructive: "bg-destructive text-destructive-fg";
|
|
14
|
+
success: "bg-success text-success-fg";
|
|
15
|
+
warning: "bg-warning text-warning-fg";
|
|
16
16
|
};
|
|
17
|
-
}, undefined, import("tailwind-variants").
|
|
17
|
+
}, undefined, import("tailwind-variants").TVReturnTypeLike<{
|
|
18
18
|
tone: {
|
|
19
|
-
default:
|
|
20
|
-
accent:
|
|
21
|
-
destructive:
|
|
22
|
-
success:
|
|
23
|
-
warning:
|
|
19
|
+
default: "bg-hover text-fg";
|
|
20
|
+
accent: "bg-primary text-primary-fg";
|
|
21
|
+
destructive: "bg-destructive text-destructive-fg";
|
|
22
|
+
success: "bg-success text-success-fg";
|
|
23
|
+
warning: "bg-warning text-warning-fg";
|
|
24
24
|
};
|
|
25
|
-
}, undefined
|
|
25
|
+
}, undefined>>;
|
|
26
26
|
import type { Snippet } from 'svelte';
|
|
27
27
|
import type { HTMLAttributes } from 'svelte/elements';
|
|
28
28
|
type $$ComponentProps = HTMLAttributes<HTMLSpanElement> & {
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
export declare const barVariants: import("tailwind-variants").TVReturnType<{
|
|
2
2
|
size: {
|
|
3
|
-
sm:
|
|
4
|
-
md:
|
|
5
|
-
lg:
|
|
3
|
+
sm: "h-(--era-h-sm) rounded-(--era-rd-sm)";
|
|
4
|
+
md: "h-(--era-h-md) rounded-(--era-rd-md)";
|
|
5
|
+
lg: "h-(--era-h-lg) rounded-(--era-rd-lg)";
|
|
6
6
|
};
|
|
7
7
|
}, undefined, "flex items-center gap-(--era-xs-inset-sm) px-(--era-xs-inset-sm) era-text-trim", {
|
|
8
8
|
size: {
|
|
9
|
-
sm:
|
|
10
|
-
md:
|
|
11
|
-
lg:
|
|
9
|
+
sm: "h-(--era-h-sm) rounded-(--era-rd-sm)";
|
|
10
|
+
md: "h-(--era-h-md) rounded-(--era-rd-md)";
|
|
11
|
+
lg: "h-(--era-h-lg) rounded-(--era-rd-lg)";
|
|
12
12
|
};
|
|
13
|
-
}, undefined, import("tailwind-variants").
|
|
13
|
+
}, undefined, import("tailwind-variants").TVReturnTypeLike<{
|
|
14
14
|
size: {
|
|
15
|
-
sm:
|
|
16
|
-
md:
|
|
17
|
-
lg:
|
|
15
|
+
sm: "h-(--era-h-sm) rounded-(--era-rd-sm)";
|
|
16
|
+
md: "h-(--era-h-md) rounded-(--era-rd-md)";
|
|
17
|
+
lg: "h-(--era-h-lg) rounded-(--era-rd-lg)";
|
|
18
18
|
};
|
|
19
|
-
}, undefined
|
|
19
|
+
}, undefined>>;
|
|
20
20
|
import type { HTMLAttributes } from 'svelte/elements';
|
|
21
21
|
import type { Snippet } from 'svelte';
|
|
22
22
|
type $$ComponentProps = HTMLAttributes<HTMLDivElement> & {
|
|
@@ -1,76 +1,76 @@
|
|
|
1
1
|
export declare const buttonVariants: import("tailwind-variants").TVReturnType<{
|
|
2
2
|
variant: {
|
|
3
|
-
filled:
|
|
4
|
-
link:
|
|
3
|
+
filled: "flex justify-center shadow-(--era-shadow) hover:shadow-(--era-highlight-shadow) active:shadow-(--era-shadow-pressed) [&:active>*]:translate-x-(--era-press-sink-x) [&:active>*]:translate-y-(--era-press-sink-y)";
|
|
4
|
+
link: "inline-flex underline-offset-2 hover:underline";
|
|
5
5
|
};
|
|
6
6
|
tone: {
|
|
7
|
-
default:
|
|
8
|
-
accent:
|
|
9
|
-
destructive:
|
|
10
|
-
success:
|
|
11
|
-
warning:
|
|
7
|
+
default: "";
|
|
8
|
+
accent: "";
|
|
9
|
+
destructive: "";
|
|
10
|
+
success: "";
|
|
11
|
+
warning: "";
|
|
12
12
|
};
|
|
13
13
|
size: {
|
|
14
|
-
default:
|
|
15
|
-
sm:
|
|
16
|
-
xxs:
|
|
17
|
-
xs:
|
|
18
|
-
icon:
|
|
14
|
+
default: "";
|
|
15
|
+
sm: "";
|
|
16
|
+
xxs: "";
|
|
17
|
+
xs: "";
|
|
18
|
+
icon: "";
|
|
19
19
|
};
|
|
20
20
|
icon: {
|
|
21
|
-
true:
|
|
21
|
+
true: "";
|
|
22
22
|
};
|
|
23
23
|
active: {
|
|
24
|
-
true:
|
|
24
|
+
true: "";
|
|
25
25
|
};
|
|
26
26
|
}, undefined, "items-center gap-(--era-gap) text-body era-interactive era-text-trim", {
|
|
27
27
|
variant: {
|
|
28
|
-
filled:
|
|
29
|
-
link:
|
|
28
|
+
filled: "flex justify-center shadow-(--era-shadow) hover:shadow-(--era-highlight-shadow) active:shadow-(--era-shadow-pressed) [&:active>*]:translate-x-(--era-press-sink-x) [&:active>*]:translate-y-(--era-press-sink-y)";
|
|
29
|
+
link: "inline-flex underline-offset-2 hover:underline";
|
|
30
30
|
};
|
|
31
31
|
tone: {
|
|
32
|
-
default:
|
|
33
|
-
accent:
|
|
34
|
-
destructive:
|
|
35
|
-
success:
|
|
36
|
-
warning:
|
|
32
|
+
default: "";
|
|
33
|
+
accent: "";
|
|
34
|
+
destructive: "";
|
|
35
|
+
success: "";
|
|
36
|
+
warning: "";
|
|
37
37
|
};
|
|
38
38
|
size: {
|
|
39
|
-
default:
|
|
40
|
-
sm:
|
|
41
|
-
xxs:
|
|
42
|
-
xs:
|
|
43
|
-
icon:
|
|
39
|
+
default: "";
|
|
40
|
+
sm: "";
|
|
41
|
+
xxs: "";
|
|
42
|
+
xs: "";
|
|
43
|
+
icon: "";
|
|
44
44
|
};
|
|
45
45
|
icon: {
|
|
46
|
-
true:
|
|
46
|
+
true: "";
|
|
47
47
|
};
|
|
48
48
|
active: {
|
|
49
|
-
true:
|
|
49
|
+
true: "";
|
|
50
50
|
};
|
|
51
|
-
}, undefined, import("tailwind-variants").
|
|
51
|
+
}, undefined, import("tailwind-variants").TVReturnTypeLike<{
|
|
52
52
|
variant: {
|
|
53
|
-
filled:
|
|
54
|
-
link:
|
|
53
|
+
filled: "flex justify-center shadow-(--era-shadow) hover:shadow-(--era-highlight-shadow) active:shadow-(--era-shadow-pressed) [&:active>*]:translate-x-(--era-press-sink-x) [&:active>*]:translate-y-(--era-press-sink-y)";
|
|
54
|
+
link: "inline-flex underline-offset-2 hover:underline";
|
|
55
55
|
};
|
|
56
56
|
tone: {
|
|
57
|
-
default:
|
|
58
|
-
accent:
|
|
59
|
-
destructive:
|
|
60
|
-
success:
|
|
61
|
-
warning:
|
|
57
|
+
default: "";
|
|
58
|
+
accent: "";
|
|
59
|
+
destructive: "";
|
|
60
|
+
success: "";
|
|
61
|
+
warning: "";
|
|
62
62
|
};
|
|
63
63
|
size: {
|
|
64
|
-
default:
|
|
65
|
-
sm:
|
|
66
|
-
xxs:
|
|
67
|
-
xs:
|
|
68
|
-
icon:
|
|
64
|
+
default: "";
|
|
65
|
+
sm: "";
|
|
66
|
+
xxs: "";
|
|
67
|
+
xs: "";
|
|
68
|
+
icon: "";
|
|
69
69
|
};
|
|
70
70
|
icon: {
|
|
71
|
-
true:
|
|
71
|
+
true: "";
|
|
72
72
|
};
|
|
73
73
|
active: {
|
|
74
|
-
true:
|
|
74
|
+
true: "";
|
|
75
75
|
};
|
|
76
|
-
}, undefined
|
|
76
|
+
}, undefined>>;
|
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
export declare const cardVariants: import("tailwind-variants").TVReturnType<{
|
|
2
2
|
tone: {
|
|
3
|
-
elevated:
|
|
4
|
-
surface:
|
|
5
|
-
flat:
|
|
3
|
+
elevated: "bg-(--era-surface-bg-elevated) shadow-(--era-shadow)";
|
|
4
|
+
surface: "bg-(--era-surface-bg)";
|
|
5
|
+
flat: "";
|
|
6
6
|
};
|
|
7
7
|
sectioned: {
|
|
8
|
-
true:
|
|
9
|
-
false:
|
|
8
|
+
true: "p-0";
|
|
9
|
+
false: "px-(--era-pad-md) pt-(--era-gap) pb-(--era-pad-md)";
|
|
10
10
|
};
|
|
11
11
|
interactive: {
|
|
12
|
-
true:
|
|
12
|
+
true: "cursor-pointer hover:bg-(--era-highlight) hover:shadow-(--era-highlight-shadow) focus-visible:bg-(--era-highlight) era-interactive aria-disabled:cursor-not-allowed aria-disabled:opacity-50";
|
|
13
13
|
};
|
|
14
14
|
}, undefined, "block w-full rounded-(--era-rd-lg) text-left text-fg", {
|
|
15
15
|
tone: {
|
|
16
|
-
elevated:
|
|
17
|
-
surface:
|
|
18
|
-
flat:
|
|
16
|
+
elevated: "bg-(--era-surface-bg-elevated) shadow-(--era-shadow)";
|
|
17
|
+
surface: "bg-(--era-surface-bg)";
|
|
18
|
+
flat: "";
|
|
19
19
|
};
|
|
20
20
|
sectioned: {
|
|
21
|
-
true:
|
|
22
|
-
false:
|
|
21
|
+
true: "p-0";
|
|
22
|
+
false: "px-(--era-pad-md) pt-(--era-gap) pb-(--era-pad-md)";
|
|
23
23
|
};
|
|
24
24
|
interactive: {
|
|
25
|
-
true:
|
|
25
|
+
true: "cursor-pointer hover:bg-(--era-highlight) hover:shadow-(--era-highlight-shadow) focus-visible:bg-(--era-highlight) era-interactive aria-disabled:cursor-not-allowed aria-disabled:opacity-50";
|
|
26
26
|
};
|
|
27
|
-
}, undefined, import("tailwind-variants").
|
|
27
|
+
}, undefined, import("tailwind-variants").TVReturnTypeLike<{
|
|
28
28
|
tone: {
|
|
29
|
-
elevated:
|
|
30
|
-
surface:
|
|
31
|
-
flat:
|
|
29
|
+
elevated: "bg-(--era-surface-bg-elevated) shadow-(--era-shadow)";
|
|
30
|
+
surface: "bg-(--era-surface-bg)";
|
|
31
|
+
flat: "";
|
|
32
32
|
};
|
|
33
33
|
sectioned: {
|
|
34
|
-
true:
|
|
35
|
-
false:
|
|
34
|
+
true: "p-0";
|
|
35
|
+
false: "px-(--era-pad-md) pt-(--era-gap) pb-(--era-pad-md)";
|
|
36
36
|
};
|
|
37
37
|
interactive: {
|
|
38
|
-
true:
|
|
38
|
+
true: "cursor-pointer hover:bg-(--era-highlight) hover:shadow-(--era-highlight-shadow) focus-visible:bg-(--era-highlight) era-interactive aria-disabled:cursor-not-allowed aria-disabled:opacity-50";
|
|
39
39
|
};
|
|
40
|
-
}, undefined
|
|
40
|
+
}, undefined>>;
|
|
41
41
|
import type { Snippet } from 'svelte';
|
|
42
42
|
import type { HTMLAnchorAttributes, HTMLAttributes, HTMLButtonAttributes } from 'svelte/elements';
|
|
43
43
|
type CardElement = HTMLDivElement | HTMLAnchorElement | HTMLButtonElement;
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
export declare const chipVariants: import("tailwind-variants").TVReturnType<{
|
|
2
2
|
size: {
|
|
3
|
-
sm:
|
|
4
|
-
xxs:
|
|
3
|
+
sm: "h-(--era-h-sm) min-w-(--era-h-sm) rounded-(--era-rd-sm) pl-(--era-pill-sm)";
|
|
4
|
+
xxs: "h-(--era-h-xxs) min-w-(--era-h-xxs) rounded-(--era-rd-xxs) pl-(--era-pill-xxs)";
|
|
5
5
|
};
|
|
6
6
|
dismissible: {
|
|
7
|
-
true:
|
|
8
|
-
false:
|
|
7
|
+
true: "";
|
|
8
|
+
false: "";
|
|
9
9
|
};
|
|
10
10
|
}, undefined, "inline-flex items-center bg-hover font-mono text-body leading-none text-fg shadow-(--era-shadow) era-text-trim", {
|
|
11
11
|
size: {
|
|
12
|
-
sm:
|
|
13
|
-
xxs:
|
|
12
|
+
sm: "h-(--era-h-sm) min-w-(--era-h-sm) rounded-(--era-rd-sm) pl-(--era-pill-sm)";
|
|
13
|
+
xxs: "h-(--era-h-xxs) min-w-(--era-h-xxs) rounded-(--era-rd-xxs) pl-(--era-pill-xxs)";
|
|
14
14
|
};
|
|
15
15
|
dismissible: {
|
|
16
|
-
true:
|
|
17
|
-
false:
|
|
16
|
+
true: "";
|
|
17
|
+
false: "";
|
|
18
18
|
};
|
|
19
|
-
}, undefined, import("tailwind-variants").
|
|
19
|
+
}, undefined, import("tailwind-variants").TVReturnTypeLike<{
|
|
20
20
|
size: {
|
|
21
|
-
sm:
|
|
22
|
-
xxs:
|
|
21
|
+
sm: "h-(--era-h-sm) min-w-(--era-h-sm) rounded-(--era-rd-sm) pl-(--era-pill-sm)";
|
|
22
|
+
xxs: "h-(--era-h-xxs) min-w-(--era-h-xxs) rounded-(--era-rd-xxs) pl-(--era-pill-xxs)";
|
|
23
23
|
};
|
|
24
24
|
dismissible: {
|
|
25
|
-
true:
|
|
26
|
-
false:
|
|
25
|
+
true: "";
|
|
26
|
+
false: "";
|
|
27
27
|
};
|
|
28
|
-
}, undefined
|
|
28
|
+
}, undefined>>;
|
|
29
29
|
import type { Snippet } from 'svelte';
|
|
30
30
|
import type { HTMLAttributes } from 'svelte/elements';
|
|
31
31
|
type $$ComponentProps = HTMLAttributes<HTMLDivElement> & {
|
|
@@ -29,6 +29,6 @@ type $$ComponentProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
29
29
|
onDragEnd?: (data: DragEventData) => void;
|
|
30
30
|
children?: Snippet;
|
|
31
31
|
};
|
|
32
|
-
declare const PaneRoot: import("svelte").Component<$$ComponentProps, {}, "
|
|
32
|
+
declare const PaneRoot: import("svelte").Component<$$ComponentProps, {}, "position" | "size" | "ref">;
|
|
33
33
|
type PaneRoot = ReturnType<typeof PaneRoot>;
|
|
34
34
|
export default PaneRoot;
|
|
@@ -35,6 +35,6 @@ type $$ComponentProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
35
35
|
header?: Snippet;
|
|
36
36
|
children?: Snippet;
|
|
37
37
|
};
|
|
38
|
-
declare const Pane: Component<$$ComponentProps, {}, "
|
|
38
|
+
declare const Pane: Component<$$ComponentProps, {}, "position" | "size" | "ref">;
|
|
39
39
|
type Pane = ReturnType<typeof Pane>;
|
|
40
40
|
export default Pane;
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { type PartProps } from '../../utils/index.js';
|
|
2
2
|
export declare const sheetVariants: import("tailwind-variants").TVReturnType<{
|
|
3
3
|
side: {
|
|
4
|
-
top:
|
|
5
|
-
bottom:
|
|
6
|
-
left:
|
|
7
|
-
right:
|
|
4
|
+
top: "inset-x-0 top-0 max-h-[85dvh] rounded-b-(--era-rd-lg)";
|
|
5
|
+
bottom: "inset-x-0 bottom-0 max-h-[85dvh] rounded-t-(--era-rd-lg)";
|
|
6
|
+
left: "inset-y-0 left-0 w-[min(20rem,85vw)] rounded-r-(--era-rd-lg)";
|
|
7
|
+
right: "inset-y-0 right-0 w-[min(20rem,85vw)] rounded-l-(--era-rd-lg)";
|
|
8
8
|
};
|
|
9
9
|
}, undefined, "fixed z-50 flex flex-col gap-(--era-gap) overflow-y-auto bg-(--era-surface-bg) p-(--era-pad-md) shadow-(--era-shadow-lg) glass-blur", {
|
|
10
10
|
side: {
|
|
11
|
-
top:
|
|
12
|
-
bottom:
|
|
13
|
-
left:
|
|
14
|
-
right:
|
|
11
|
+
top: "inset-x-0 top-0 max-h-[85dvh] rounded-b-(--era-rd-lg)";
|
|
12
|
+
bottom: "inset-x-0 bottom-0 max-h-[85dvh] rounded-t-(--era-rd-lg)";
|
|
13
|
+
left: "inset-y-0 left-0 w-[min(20rem,85vw)] rounded-r-(--era-rd-lg)";
|
|
14
|
+
right: "inset-y-0 right-0 w-[min(20rem,85vw)] rounded-l-(--era-rd-lg)";
|
|
15
15
|
};
|
|
16
|
-
}, undefined, import("tailwind-variants").
|
|
16
|
+
}, undefined, import("tailwind-variants").TVReturnTypeLike<{
|
|
17
17
|
side: {
|
|
18
|
-
top:
|
|
19
|
-
bottom:
|
|
20
|
-
left:
|
|
21
|
-
right:
|
|
18
|
+
top: "inset-x-0 top-0 max-h-[85dvh] rounded-b-(--era-rd-lg)";
|
|
19
|
+
bottom: "inset-x-0 bottom-0 max-h-[85dvh] rounded-t-(--era-rd-lg)";
|
|
20
|
+
left: "inset-y-0 left-0 w-[min(20rem,85vw)] rounded-r-(--era-rd-lg)";
|
|
21
|
+
right: "inset-y-0 right-0 w-[min(20rem,85vw)] rounded-l-(--era-rd-lg)";
|
|
22
22
|
};
|
|
23
|
-
}, undefined
|
|
23
|
+
}, undefined>>;
|
|
24
24
|
import { Dialog } from 'bits-ui';
|
|
25
25
|
type $$ComponentProps = PartProps<Dialog.ContentProps> & {
|
|
26
26
|
/** Screen edge the sheet is anchored to. */
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
export declare const skeletonVariants: import("tailwind-variants").TVReturnType<{
|
|
2
2
|
variant: {
|
|
3
|
-
line:
|
|
4
|
-
circle:
|
|
5
|
-
block:
|
|
3
|
+
line: "h-(--era-text) w-full rounded-(--era-rd-md)";
|
|
4
|
+
circle: "size-(--era-h-lg) rounded-full";
|
|
5
|
+
block: "h-24 w-full rounded-(--era-rd-md)";
|
|
6
6
|
};
|
|
7
7
|
}, undefined, "animate-[skeleton-pulse_2s_ease-in-out_infinite] bg-(--era-surface-bg-elevated)", {
|
|
8
8
|
variant: {
|
|
9
|
-
line:
|
|
10
|
-
circle:
|
|
11
|
-
block:
|
|
9
|
+
line: "h-(--era-text) w-full rounded-(--era-rd-md)";
|
|
10
|
+
circle: "size-(--era-h-lg) rounded-full";
|
|
11
|
+
block: "h-24 w-full rounded-(--era-rd-md)";
|
|
12
12
|
};
|
|
13
|
-
}, undefined, import("tailwind-variants").
|
|
13
|
+
}, undefined, import("tailwind-variants").TVReturnTypeLike<{
|
|
14
14
|
variant: {
|
|
15
|
-
line:
|
|
16
|
-
circle:
|
|
17
|
-
block:
|
|
15
|
+
line: "h-(--era-text) w-full rounded-(--era-rd-md)";
|
|
16
|
+
circle: "size-(--era-h-lg) rounded-full";
|
|
17
|
+
block: "h-24 w-full rounded-(--era-rd-md)";
|
|
18
18
|
};
|
|
19
|
-
}, undefined
|
|
19
|
+
}, undefined>>;
|
|
20
20
|
import type { HTMLAttributes } from 'svelte/elements';
|
|
21
21
|
type $$ComponentProps = HTMLAttributes<HTMLDivElement> & {
|
|
22
22
|
ref?: HTMLDivElement | null;
|
package/dist/utils/index.js
CHANGED
|
@@ -13,6 +13,17 @@ import { createTV } from 'tailwind-variants';
|
|
|
13
13
|
// names tailwind-merge knows; only era's additions to those scales are listed.
|
|
14
14
|
const TIERS = ['xs', 'xxs', 'sm', 'md', 'lg'];
|
|
15
15
|
const INSETS = ['inset-xxs', 'inset-sm', 'inset-md'];
|
|
16
|
+
// DELIBERATELY UNANNOTATED — do not restore `: ConfigExtension<string, string>`.
|
|
17
|
+
// This object has to satisfy two libraries at once, and since tailwind-variants
|
|
18
|
+
// 3.3.0 they disagree: tw-variants stopped reusing tailwind-merge's
|
|
19
|
+
// ConfigExtension and declares its own, whose `extend`/`override` are
|
|
20
|
+
// Partial<AnyConfig> where tailwind-merge's are PartialConfigGroupsPart. The two
|
|
21
|
+
// differ in how deeply `theme` is optional, so annotating with either one makes
|
|
22
|
+
// it unassignable to the other and `createTV` stops type-checking.
|
|
23
|
+
//
|
|
24
|
+
// Nothing is lost by inferring: both call sites below still validate the shape,
|
|
25
|
+
// so a typo'd class group is still a compile error — it just gets reported
|
|
26
|
+
// against TWMergeConfig instead of here.
|
|
16
27
|
const twMergeConfig = {
|
|
17
28
|
extend: {
|
|
18
29
|
classGroups: {
|