@dorsk/tsumikit 0.78.0 → 0.80.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/components/atoms/Artwork.svelte +5 -3
- package/dist/components/atoms/Badge.svelte +2 -5
- package/dist/components/atoms/Button.svelte +327 -17
- package/dist/components/atoms/Button.svelte.d.ts +4 -1
- package/dist/components/atoms/Card.svelte +160 -12
- package/dist/components/atoms/Checkbox.svelte +181 -3
- package/dist/components/atoms/Gauge.svelte +2 -2
- package/dist/components/atoms/Input.svelte +41 -3
- package/dist/components/atoms/Kbd.svelte +1 -1
- package/dist/components/atoms/Link.svelte +61 -0
- package/dist/components/atoms/Progress.svelte +75 -2
- package/dist/components/atoms/Progress.svelte.d.ts +1 -0
- package/dist/components/atoms/SegmentedProgress.svelte +2 -2
- package/dist/components/atoms/Select.svelte +39 -3
- package/dist/components/atoms/Skeleton.svelte +54 -3
- package/dist/components/atoms/Skeleton.svelte.d.ts +1 -0
- package/dist/components/atoms/Slider.svelte +8 -6
- package/dist/components/atoms/Spinner.svelte +152 -3
- package/dist/components/atoms/Spinner.svelte.d.ts +1 -1
- package/dist/components/atoms/Swatch.svelte +1 -1
- package/dist/components/atoms/Switch.svelte +138 -2
- package/dist/components/atoms/Textarea.svelte +42 -3
- package/dist/components/atoms/Thinking.svelte +130 -0
- package/dist/components/atoms/Thinking.svelte.d.ts +15 -0
- package/dist/components/layouts/AppShell.svelte +6 -6
- package/dist/components/layouts/MasterDetail.svelte +3 -3
- package/dist/components/layouts/NavBar.svelte +4 -4
- package/dist/components/layouts/NavSection.svelte +1 -1
- package/dist/components/layouts/ResizablePanel.svelte +7 -7
- package/dist/components/layouts/TabBar.svelte +2 -2
- package/dist/components/molecules/Accordion.svelte +2 -2
- package/dist/components/molecules/AttachmentList.svelte +2 -2
- package/dist/components/molecules/CapBar.svelte +2 -2
- package/dist/components/molecules/CodeBlock.svelte +5 -5
- package/dist/components/molecules/Combobox.svelte +3 -3
- package/dist/components/molecules/CopyButton.svelte +146 -5
- package/dist/components/molecules/Drawer.svelte +8 -8
- package/dist/components/molecules/EmojiPicker.svelte +1 -1
- package/dist/components/molecules/Field.svelte +55 -1
- package/dist/components/molecules/FileButton.svelte +20 -6
- package/dist/components/molecules/FilterInput.svelte +4 -4
- package/dist/components/molecules/GitRef.svelte +2 -2
- package/dist/components/molecules/GlyphStack.svelte +21 -3
- package/dist/components/molecules/InputGroup.svelte +3 -3
- package/dist/components/molecules/LookPicker.svelte +87 -0
- package/dist/components/molecules/LookPicker.svelte.d.ts +17 -0
- package/dist/components/molecules/Modal.svelte +5 -5
- package/dist/components/molecules/MotionSettings.svelte +166 -0
- package/dist/components/molecules/MotionSettings.svelte.d.ts +18 -0
- package/dist/components/molecules/OptionButton.svelte +8 -3
- package/dist/components/molecules/Pagination.svelte +3 -1
- package/dist/components/molecules/Popover.svelte +18 -11
- package/dist/components/molecules/Prose.svelte +6 -6
- package/dist/components/molecules/RadialMenu.svelte +3 -3
- package/dist/components/molecules/RadioGroup.svelte +67 -4
- package/dist/components/molecules/RichSelect.svelte +6 -4
- package/dist/components/molecules/SectionHeader.svelte +1 -1
- package/dist/components/molecules/SeekSlider.svelte +6 -6
- package/dist/components/molecules/SegmentedControl.svelte +7 -7
- package/dist/components/molecules/SortableList.svelte +2 -2
- package/dist/components/molecules/SplitButton.svelte +1 -1
- package/dist/components/molecules/Tabs.svelte +160 -7
- package/dist/components/molecules/ThemePicker.svelte +1 -1
- package/dist/components/molecules/Timestamp.svelte +1 -1
- package/dist/components/molecules/Toggle.svelte +5 -3
- package/dist/components/molecules/Tooltip.svelte +2 -2
- package/dist/components/molecules/VolumeSlider.svelte +3 -3
- package/dist/components/organisms/ConversationFeed.svelte +1 -1
- package/dist/components/organisms/ConversationPanel.svelte +3 -3
- package/dist/components/organisms/DataTable.svelte +18 -16
- package/dist/fx.d.ts +149 -0
- package/dist/fx.js +111 -0
- package/dist/fx.md +58 -0
- package/dist/index.d.ts +8 -2
- package/dist/index.js +8 -2
- package/dist/looks/README.md +101 -0
- package/dist/looks/depth.css +939 -0
- package/dist/looks/editorial.css +545 -0
- package/dist/looks/tactile.css +871 -0
- package/dist/pointer.d.ts +3 -0
- package/dist/pointer.js +40 -0
- package/dist/stores/fx.svelte.d.ts +17 -0
- package/dist/stores/fx.svelte.js +64 -0
- package/dist/stores/theme.svelte.d.ts +8 -2
- package/dist/stores/theme.svelte.js +33 -7
- package/dist/styles/themes.css +249 -249
- package/dist/styles/tokens.css +37 -2
- package/dist/theme-mode.d.ts +31 -0
- package/dist/theme-mode.js +19 -0
- package/package.json +3 -2
package/dist/styles/tokens.css
CHANGED
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
--c-bg-elev-2: #1f232c;
|
|
20
20
|
--c-surface: #21262f;
|
|
21
21
|
--c-border: #2c323d;
|
|
22
|
-
--c-border-strong: #
|
|
22
|
+
--c-border-strong: #757d8b;
|
|
23
23
|
--c-text: #e6e9ef;
|
|
24
24
|
--c-text-muted: #9aa3b2;
|
|
25
|
-
--c-text-faint: #
|
|
25
|
+
--c-text-faint: #929bad;
|
|
26
26
|
|
|
27
27
|
--c-accent: #5ad6a0;
|
|
28
28
|
--c-accent-ink: #04130c;
|
|
@@ -267,6 +267,7 @@
|
|
|
267
267
|
|
|
268
268
|
--dur-instant: 0ms;
|
|
269
269
|
--dur-press: 100ms;
|
|
270
|
+
--dur-release: 150ms;
|
|
270
271
|
--dur-fast: 120ms;
|
|
271
272
|
--dur-base: 180ms;
|
|
272
273
|
--dur-slow: 240ms;
|
|
@@ -285,6 +286,40 @@
|
|
|
285
286
|
--shift-xs: 2px;
|
|
286
287
|
--shift-sm: 4px;
|
|
287
288
|
--shift-md: 8px;
|
|
289
|
+
|
|
290
|
+
/* Structural look. Components read these instead of hardcoding borders,
|
|
291
|
+
fills and shadows, so a theme can restyle the kit's surfaces from tokens. */
|
|
292
|
+
--edge-width: 1px;
|
|
293
|
+
--surface-fill: var(--bg-elevated);
|
|
294
|
+
--surface-fill-2: var(--bg-elevated-2);
|
|
295
|
+
--surface-edge: var(--border);
|
|
296
|
+
--surface-edge-strong: var(--border-strong);
|
|
297
|
+
--surface-shadow: 0 0 0 0 transparent;
|
|
298
|
+
--surface-shadow-hover: var(--surface-shadow);
|
|
299
|
+
--raised-fill: var(--bg-elevated);
|
|
300
|
+
--raised-edge: var(--border-strong);
|
|
301
|
+
--raised-shadow: var(--shadow-md);
|
|
302
|
+
--overlay-fill: var(--bg-elevated);
|
|
303
|
+
--overlay-edge: var(--border);
|
|
304
|
+
--overlay-shadow: var(--shadow-lg);
|
|
305
|
+
--control-fill: var(--bg);
|
|
306
|
+
--control-edge: var(--border-strong);
|
|
307
|
+
--control-edge-hover: var(--text-faint);
|
|
308
|
+
--control-shadow: 0 0 0 0 transparent;
|
|
309
|
+
--track-fill: var(--bg-elevated-2);
|
|
310
|
+
--track-edge: var(--control-edge);
|
|
311
|
+
--thumb-fill: var(--bg);
|
|
312
|
+
--thumb-shadow: var(--shadow-sm);
|
|
313
|
+
--btn-fill: var(--surface);
|
|
314
|
+
--btn-edge: var(--border-strong);
|
|
315
|
+
--btn-shadow: 0 0 0 0 transparent;
|
|
316
|
+
--btn-shadow-hover: var(--btn-shadow);
|
|
317
|
+
--btn-primary-fill: var(--accent);
|
|
318
|
+
--btn-primary-edge: var(--accent);
|
|
319
|
+
--btn-primary-shadow: 0 0 0 0 transparent;
|
|
320
|
+
--btn-primary-shadow-hover: var(--btn-primary-shadow);
|
|
321
|
+
--hover-lift: 0px;
|
|
322
|
+
--focus-glow: 0 0 0 0 transparent;
|
|
288
323
|
}
|
|
289
324
|
|
|
290
325
|
@supports (animation-timing-function: linear(0, 1)) {
|
package/dist/theme-mode.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ export interface ThemePreference {
|
|
|
7
7
|
light: string;
|
|
8
8
|
/** Last dark theme the user picked. */
|
|
9
9
|
dark: string;
|
|
10
|
+
/** Structural look; absent means the default look. */
|
|
11
|
+
look?: string;
|
|
10
12
|
}
|
|
11
13
|
/** The picker value that means "follow the system". Never a theme id. */
|
|
12
14
|
export declare const AUTO_THEME = "auto";
|
|
@@ -31,3 +33,32 @@ export declare function preferenceFrom(raw: {
|
|
|
31
33
|
}, slotOf: SlotOf, defaults?: ThemePreference): ThemePreference;
|
|
32
34
|
/** The picker's current value: `auto`, or the pinned slot's theme id. */
|
|
33
35
|
export declare function pickerValue(pref: ThemePreference): string;
|
|
36
|
+
export type LookStatus = 'stable' | 'experimental';
|
|
37
|
+
/** Structural looks, an axis independent of the theme. Each non-default look
|
|
38
|
+
* ships as `@dorsk/tsumikit/looks/<id>.css`, scoped to `:root[data-look="<id>"]`. */
|
|
39
|
+
export declare const LOOKS: readonly [{
|
|
40
|
+
readonly id: "default";
|
|
41
|
+
readonly label: "Polished";
|
|
42
|
+
readonly status: "stable";
|
|
43
|
+
}, {
|
|
44
|
+
readonly id: "depth";
|
|
45
|
+
readonly label: "Depth";
|
|
46
|
+
readonly status: "stable";
|
|
47
|
+
}, {
|
|
48
|
+
readonly id: "tactile";
|
|
49
|
+
readonly label: "Tactile";
|
|
50
|
+
readonly status: "stable";
|
|
51
|
+
}, {
|
|
52
|
+
readonly id: "editorial";
|
|
53
|
+
readonly label: "Editorial";
|
|
54
|
+
readonly status: "experimental";
|
|
55
|
+
}];
|
|
56
|
+
export type LookId = (typeof LOOKS)[number]['id'];
|
|
57
|
+
export declare const DEFAULT_LOOK: LookId;
|
|
58
|
+
export declare function parseLook(v: unknown): LookId;
|
|
59
|
+
/** Inline script that paints `data-theme`, `data-mode` and `data-look` from the
|
|
60
|
+
* persisted blob before first paint. `themes` resolves a legacy lone theme id. */
|
|
61
|
+
export declare function themePrepaint(key: string, themes: readonly {
|
|
62
|
+
id: string;
|
|
63
|
+
mode: ThemeSlot;
|
|
64
|
+
}[]): string;
|
package/dist/theme-mode.js
CHANGED
|
@@ -43,3 +43,22 @@ export function preferenceFrom(raw, slotOf, defaults = DEFAULT_THEME_PREFERENCE)
|
|
|
43
43
|
export function pickerValue(pref) {
|
|
44
44
|
return pref.mode === 'auto' ? AUTO_THEME : pref.mode === 'dark' ? pref.dark : pref.light;
|
|
45
45
|
}
|
|
46
|
+
/** Structural looks, an axis independent of the theme. Each non-default look
|
|
47
|
+
* ships as `@dorsk/tsumikit/looks/<id>.css`, scoped to `:root[data-look="<id>"]`. */
|
|
48
|
+
export const LOOKS = [
|
|
49
|
+
{ id: 'default', label: 'Polished', status: 'stable' },
|
|
50
|
+
{ id: 'depth', label: 'Depth', status: 'stable' },
|
|
51
|
+
{ id: 'tactile', label: 'Tactile', status: 'stable' },
|
|
52
|
+
{ id: 'editorial', label: 'Editorial', status: 'experimental' },
|
|
53
|
+
];
|
|
54
|
+
export const DEFAULT_LOOK = 'default';
|
|
55
|
+
export function parseLook(v) {
|
|
56
|
+
return LOOKS.find((l) => l.id === v)?.id ?? DEFAULT_LOOK;
|
|
57
|
+
}
|
|
58
|
+
/** Inline script that paints `data-theme`, `data-mode` and `data-look` from the
|
|
59
|
+
* persisted blob before first paint. `themes` resolves a legacy lone theme id. */
|
|
60
|
+
export function themePrepaint(key, themes) {
|
|
61
|
+
const looks = LOOKS.filter((l) => l.id !== DEFAULT_LOOK).map((l) => l.id);
|
|
62
|
+
const modes = Object.fromEntries(themes.map((t) => [t.id, t.mode]));
|
|
63
|
+
return `(function(){try{var d=document.documentElement,s=localStorage.getItem(${JSON.stringify(key)});if(!s)return;var b,t,m;try{b=JSON.parse(s)}catch(e){}if(b&&typeof b==='object'){m=b.mode==='auto'?(matchMedia('(prefers-color-scheme: dark)').matches?'dark':'light'):b.mode==='light'?'light':'dark';t=b[m];if(${JSON.stringify(looks)}.indexOf(b.look)>=0)d.setAttribute('data-look',b.look)}else{var k=${JSON.stringify(modes)};if(!Object.prototype.hasOwnProperty.call(k,s))return;t=s;m=k[s]}if(typeof t==='string'&&t)d.setAttribute('data-theme',t);d.setAttribute('data-mode',m)}catch(e){}})();`;
|
|
64
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dorsk/tsumikit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.80.0",
|
|
4
4
|
"description": "Minimal, dependency-free Svelte 5 + pure-CSS UI kit. Token-driven atoms, molecules & layouts with theming out of the box.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -40,7 +40,8 @@
|
|
|
40
40
|
"./styles/themes.css": "./dist/styles/themes.css",
|
|
41
41
|
"./styles/reset.css": "./dist/styles/reset.css",
|
|
42
42
|
"./styles/utilities.css": "./dist/styles/utilities.css",
|
|
43
|
-
"./styles/syntax.css": "./dist/styles/syntax.css"
|
|
43
|
+
"./styles/syntax.css": "./dist/styles/syntax.css",
|
|
44
|
+
"./looks/*.css": "./dist/looks/*.css"
|
|
44
45
|
},
|
|
45
46
|
"publishConfig": {
|
|
46
47
|
"access": "public",
|