@lostgradient/cinder 0.25.1 → 0.26.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.
- package/CHANGELOG.md +237 -0
- package/components.json +13 -6
- package/dist/components/alert-dialog/index.js +2 -2
- package/dist/components/approval-card/index.js +2 -2
- package/dist/components/area-chart/area-chart.css +23 -0
- package/dist/components/area-chart/index.js +2 -2
- package/dist/components/autocomplete/index.js +2 -2
- package/dist/components/avatar-group/index.js +2 -2
- package/dist/components/backdrop/index.js +2 -2
- package/dist/components/bar-chart/bar-chart.css +23 -0
- package/dist/components/bar-chart/index.js +2 -2
- package/dist/components/button/button.css +1 -1
- package/dist/components/checkbox/index.js +2 -2
- package/dist/components/code-block/index.js +2 -2
- package/dist/components/color-field/index.js +2 -2
- package/dist/components/combobox/index.js +2 -2
- package/dist/components/command-menu/index.js +2 -2
- package/dist/components/command-palette/command-palette.css +50 -46
- package/dist/components/command-palette/index.js +2 -2
- package/dist/components/confirm-dialog/index.js +2 -2
- package/dist/components/context-menu/index.js +2 -2
- package/dist/components/data-table/index.js +2 -2
- package/dist/components/date-picker/index.js +2 -2
- package/dist/components/date-range-field/index.js +2 -2
- package/dist/components/drawer/index.js +2 -2
- package/dist/components/dropdown/index.js +2 -2
- package/dist/components/dropdown-menu/index.js +2 -2
- package/dist/components/find-bar/find-bar.css +9 -1
- package/dist/components/focus-trap/index.js +2 -2
- package/dist/components/form-field/index.js +2 -2
- package/dist/components/guidance-region/index.css +1 -1
- package/dist/components/hover-card/index.js +2 -2
- package/dist/components/inline-confirm/index.js +2 -2
- package/dist/components/input/index.js +2 -2
- package/dist/components/input/input.css +95 -6
- package/dist/components/invocation-rule-builder/index.js +2 -2
- package/dist/components/json-editor/index.js +2 -2
- package/dist/components/json-schema-editor/index.js +4 -4
- package/dist/components/key-value-editor/index.css +1 -1
- package/dist/components/line-chart/index.js +2 -2
- package/dist/components/line-chart/line-chart.css +23 -0
- package/dist/components/matrix-chart/index.js +2 -2
- package/dist/components/mega-menu/mega-menu.css +7 -1
- package/dist/components/menu-bar/index.js +3 -3
- package/dist/components/modal/index.js +2 -2
- package/dist/components/modal-region/index.css +1 -1
- package/dist/components/multi-select/index.js +2 -2
- package/dist/components/navigation-bar/index.js +2 -2
- package/dist/components/parameter-field/index.js +2 -2
- package/dist/components/parameter-field/parameter-field.css +7 -1
- package/dist/components/permission-matrix/index.js +2 -2
- package/dist/components/policy-lock/index.js +2 -2
- package/dist/components/popover/index.js +2 -2
- package/dist/components/popover/popover.css +86 -0
- package/dist/components/radio-group/index.js +2 -2
- package/dist/components/resizable-panels/resizable-panels.css +10 -7
- package/dist/components/schedule-builder/index.js +2 -2
- package/dist/components/schema-form/index.js +2 -2
- package/dist/components/scroll-area/index.js +2 -2
- package/dist/components/select/index.js +2 -2
- package/dist/components/select/select.css +12 -2
- package/dist/components/selection-popover/index.js +2 -2
- package/dist/components/share-card/index.js +2 -2
- package/dist/components/sidebar/index.js +2 -2
- package/dist/components/slider/slider.css +7 -1
- package/dist/components/sortable-list/sortable-list.css +11 -7
- package/dist/components/speed-dial/index.js +2 -2
- package/dist/components/statistic-group/index.js +2 -2
- package/dist/components/statistic-group/statistic-group.css +116 -66
- package/dist/components/table/index.js +2 -2
- package/dist/components/textarea/index.js +2 -2
- package/dist/components/time-field/index.js +2 -2
- package/dist/components/time-field/time-field.css +9 -8
- package/dist/components/toast-region/index.js +2 -2
- package/dist/components/tooltip/index.js +2 -2
- package/dist/components/transfer-list/index.js +2 -2
- package/dist/components/virtual-list/_internal/adaptive-overscan.d.ts +87 -0
- package/dist/components/virtual-list/_internal/edge-proximity.d.ts +75 -0
- package/dist/components/virtual-list/_internal/frame-scheduler.d.ts +76 -0
- package/dist/components/virtual-list/_internal/geometry.d.ts +170 -0
- package/dist/components/virtual-list/_internal/list-semantics.d.ts +93 -0
- package/dist/components/virtual-list/_internal/measurement-window.d.ts +125 -0
- package/dist/components/virtual-list/_internal/reverse-order.d.ts +87 -0
- package/dist/components/virtual-list/_internal/scroll-restoration.d.ts +98 -0
- package/dist/components/virtual-list/_internal/sticky-items.d.ts +48 -0
- package/dist/components/virtual-list/_internal/virtual-list-measurement-store.svelte.d.ts +69 -0
- package/dist/components/virtual-list/index.d.ts +1 -1
- package/dist/components/virtual-list/index.js +2 -2
- package/dist/components/virtual-list/virtual-list.css +153 -0
- package/dist/components/virtual-list/virtual-list.schema.js +69 -6
- package/dist/components/virtual-list/virtual-list.svelte.d.ts +11 -8
- package/dist/components/virtual-list/virtual-list.types.d.ts +177 -4
- package/dist/index.browser.css +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +18 -18
- package/dist/server/components/alert-dialog/index.js +1 -1
- package/dist/server/components/approval-card/index.js +1 -1
- package/dist/server/components/area-chart/index.js +1 -1
- package/dist/server/components/autocomplete/index.js +1 -1
- package/dist/server/components/avatar-group/index.js +1 -1
- package/dist/server/components/backdrop/index.js +1 -1
- package/dist/server/components/bar-chart/index.js +1 -1
- package/dist/server/components/checkbox/index.js +1 -1
- package/dist/server/components/code-block/index.js +1 -1
- package/dist/server/components/color-field/index.js +1 -1
- package/dist/server/components/combobox/index.js +1 -1
- package/dist/server/components/command-menu/index.js +1 -1
- package/dist/server/components/command-palette/index.js +2 -2
- package/dist/server/components/confirm-dialog/index.js +1 -1
- package/dist/server/components/context-menu/index.js +1 -1
- package/dist/server/components/data-table/index.js +1 -1
- package/dist/server/components/date-picker/index.js +1 -1
- package/dist/server/components/date-range-field/index.js +1 -1
- package/dist/server/components/drawer/index.js +1 -1
- package/dist/server/components/dropdown/index.js +1 -1
- package/dist/server/components/dropdown-menu/index.js +2 -2
- package/dist/server/components/focus-trap/index.js +1 -1
- package/dist/server/components/form-field/index.js +1 -1
- package/dist/server/components/hover-card/index.js +1 -1
- package/dist/server/components/inline-confirm/index.js +1 -1
- package/dist/server/components/input/index.js +1 -1
- package/dist/server/components/invocation-rule-builder/index.js +1 -1
- package/dist/server/components/json-editor/index.js +1 -1
- package/dist/server/components/json-schema-editor/index.js +1 -1
- package/dist/server/components/line-chart/index.js +1 -1
- package/dist/server/components/matrix-chart/index.js +1 -1
- package/dist/server/components/menu-bar/index.js +2 -2
- package/dist/server/components/modal/index.js +1 -1
- package/dist/server/components/multi-select/index.js +1 -1
- package/dist/server/components/navigation-bar/index.js +2 -2
- package/dist/server/components/parameter-field/index.js +1 -1
- package/dist/server/components/permission-matrix/index.js +1 -1
- package/dist/server/components/policy-lock/index.js +1 -1
- package/dist/server/components/popover/index.js +1 -1
- package/dist/server/components/radio-group/index.js +1 -1
- package/dist/server/components/schedule-builder/index.js +1 -1
- package/dist/server/components/schema-form/index.js +1 -1
- package/dist/server/components/scroll-area/index.js +1 -1
- package/dist/server/components/select/index.js +1 -1
- package/dist/server/components/selection-popover/index.js +1 -1
- package/dist/server/components/share-card/index.js +1 -1
- package/dist/server/components/sidebar/index.js +1 -1
- package/dist/server/components/speed-dial/index.js +2 -2
- package/dist/server/components/statistic-group/index.js +1 -1
- package/dist/server/components/table/index.js +1 -1
- package/dist/server/components/textarea/index.js +1 -1
- package/dist/server/components/time-field/index.js +1 -1
- package/dist/server/components/toast-region/index.js +1 -1
- package/dist/server/components/tooltip/index.js +1 -1
- package/dist/server/components/transfer-list/index.js +1 -1
- package/dist/server/components/virtual-list/index.js +2 -2
- package/dist/server/index.js +2 -2
- package/dist/server/{index.server-skq0f5sr.js → index.server-0jw25w9w.js} +1 -1
- package/dist/server/index.server-0kk20wvp.js +4 -0
- package/dist/server/{index.server-fzsqdajc.js → index.server-2awq6q9m.js} +1 -1
- package/dist/server/{index.server-e4hmhaeh.js → index.server-3xwvw6w2.js} +3 -3
- package/dist/server/{index.server-95h7xy01.js → index.server-428dh2t9.js} +2 -2
- package/dist/server/{index.server-jd88r74m.js → index.server-5dq66aja.js} +2 -2
- package/dist/server/{index.server-dvwfhf77.js → index.server-5s94r0kk.js} +2 -2
- package/dist/server/{index.server-qv6z5ta3.js → index.server-80qgcjnm.js} +1 -1
- package/dist/server/{index.server-7k2732ky.js → index.server-81abtrsw.js} +1 -1
- package/dist/server/{index.server-csmqnx5w.js → index.server-83q1gv2c.js} +1 -1
- package/dist/server/{index.server-qw8k9rjg.js → index.server-8fyav10d.js} +1 -1
- package/dist/server/{index.server-4dgjj4k1.js → index.server-8h5caecr.js} +2 -2
- package/dist/server/{index.server-emyqytmm.js → index.server-90n8sd9e.js} +1 -1
- package/dist/server/{index.server-0xrdyzvh.js → index.server-99penx1m.js} +1 -1
- package/dist/server/{index.server-p94j3jah.js → index.server-9g9d15z1.js} +1 -1
- package/dist/server/{index.server-xp9hkc81.js → index.server-9kbdx511.js} +1 -1
- package/dist/server/index.server-a2yhk45s.js +3 -0
- package/dist/server/{index.server-g8d2m2tk.js → index.server-acq55gjs.js} +1 -1
- package/dist/server/{index.server-ewze54tv.js → index.server-afjftjmr.js} +1 -1
- package/dist/server/{index.server-ejyye4gv.js → index.server-bfed6a8a.js} +1 -1
- package/dist/server/{index.server-z5ng08q2.js → index.server-c1746s0z.js} +1 -1
- package/dist/server/{index.server-gt1tfc1w.js → index.server-dmeztywe.js} +1 -1
- package/dist/server/{index.server-kzsppq0n.js → index.server-dyj3jdx9.js} +1 -1
- package/dist/server/index.server-dz92zvx6.js +4 -0
- package/dist/server/{index.server-3md8kdcr.js → index.server-e6682k08.js} +1 -1
- package/dist/server/{index.server-t1pshh65.js → index.server-ewkv461x.js} +1 -1
- package/dist/server/{index.server-zfgwhtmp.js → index.server-fa449wd3.js} +1 -1
- package/dist/server/{index.server-1kgwayct.js → index.server-fhfypmgw.js} +1 -1
- package/dist/server/{index.server-s4z8hsby.js → index.server-ge4adxs2.js} +1 -1
- package/dist/server/{index.server-68xyfsg3.js → index.server-gggkq22y.js} +2 -2
- package/dist/server/{index.server-acgwdamx.js → index.server-j52rbk57.js} +1 -1
- package/dist/server/{index.server-z0nwftx6.js → index.server-jm89hxfb.js} +1 -1
- package/dist/server/{index.server-xa98r8p2.js → index.server-jw0v64se.js} +1 -1
- package/dist/server/index.server-m321p69g.js +3 -0
- package/dist/server/{index.server-xyervw3d.js → index.server-m7q2tc41.js} +1 -1
- package/dist/server/{index.server-tnrxy86j.js → index.server-mak7dmj2.js} +1 -1
- package/dist/server/{index.server-n5g5h5k1.js → index.server-mw5r2524.js} +1 -1
- package/dist/server/{index.server-caf7s6m7.js → index.server-nwq1cg55.js} +1 -1
- package/dist/server/{index.server-3wdvs0wr.js → index.server-p423fy4q.js} +2 -2
- package/dist/server/{index.server-ks7fvwxt.js → index.server-prk5syj2.js} +1 -1
- package/dist/server/{index.server-6w9fp018.js → index.server-q4hytsq3.js} +1 -1
- package/dist/server/{index.server-5w2qw8fm.js → index.server-q597a1ck.js} +1 -1
- package/dist/server/{index.server-fz1pkvda.js → index.server-qgne9v2w.js} +1 -1
- package/dist/server/{index.server-1f2app32.js → index.server-rvdavf92.js} +1 -1
- package/dist/server/index.server-rwq20a22.js +3 -0
- package/dist/server/{index.server-0rvmnrw2.js → index.server-s9tjs45r.js} +1 -1
- package/dist/server/{index.server-cm2prec7.js → index.server-sqgxyfsw.js} +1 -1
- package/dist/server/{index.server-v6777tgn.js → index.server-t761nwvb.js} +1 -1
- package/dist/server/index.server-tbds8nwq.js +4 -0
- package/dist/server/index.server-tyhta5n3.js +3 -0
- package/dist/server/{index.server-yw7rah51.js → index.server-v5dxham4.js} +1 -1
- package/dist/server/index.server-va98cpyf.js +3 -0
- package/dist/server/index.server-vq1k69xt.js +3 -0
- package/dist/server/{index.server-egd355s6.js → index.server-wnf9btp7.js} +2 -2
- package/dist/server/{index.server-sjcbaztf.js → index.server-y3zgdtbv.js} +1 -1
- package/dist/server/{index.server-4tjtgzf9.js → index.server-y6vtbmyj.js} +1 -1
- package/dist/server/{index.server-2p2mjzzb.js → index.server-zff2qp1v.js} +1 -1
- package/dist/server/tokens/registry.generated.js +2 -2
- package/dist/tokens/registry.generated.js +2 -2
- package/package.json +2 -2
- package/src/_internal/form-field-frame.svelte +5 -0
- package/src/_internal/overlay.ts +14 -1
- package/src/components/_internal/create-command-list-state.svelte.ts +4 -0
- package/src/components/area-chart/area-chart.css +23 -0
- package/src/components/bar-chart/bar-chart.css +23 -0
- package/src/components/button/button.css +1 -1
- package/src/components/command-menu/command-menu.svelte +63 -7
- package/src/components/command-palette/command-palette.css +50 -46
- package/src/components/command-palette/command-palette.svelte +68 -78
- package/src/components/dropdown/dropdown.svelte +73 -18
- package/src/components/dropdown-menu/dropdown-menu.svelte +63 -7
- package/src/components/find-bar/find-bar.css +9 -1
- package/src/components/hover-card/hover-card.examples.json +11 -4
- package/src/components/input/input.css +95 -6
- package/src/components/input/input.svelte +44 -81
- package/src/components/line-chart/line-chart.css +23 -0
- package/src/components/mega-menu/mega-menu.css +7 -1
- package/src/components/menu-bar/menu-bar.svelte +12 -1
- package/src/components/multi-select/multi-select.svelte +7 -0
- package/src/components/navigation-bar/navigation-bar.svelte +82 -6
- package/src/components/parameter-field/parameter-field.css +7 -1
- package/src/components/popover/popover.css +86 -0
- package/src/components/resizable-panels/resizable-panels.css +10 -7
- package/src/components/select/select.css +12 -2
- package/src/components/selection-popover/selection-popover.svelte +24 -10
- package/src/components/share-card/share-card.svelte +24 -44
- package/src/components/slider/slider.css +7 -1
- package/src/components/sortable-list/sortable-list.css +11 -7
- package/src/components/speed-dial/speed-dial.svelte +23 -5
- package/src/components/statistic-group/statistic-group.css +116 -66
- package/src/components/statistic-group/statistic-group.examples.json +6 -0
- package/src/components/statistic-group/statistic-group.svelte +13 -1
- package/src/components/time-field/time-field.css +9 -8
- package/src/components/toast-region/toast-region.svelte +9 -0
- package/src/components/virtual-list/_internal/adaptive-overscan.ts +248 -0
- package/src/components/virtual-list/_internal/edge-proximity.ts +130 -0
- package/src/components/virtual-list/_internal/frame-scheduler.ts +136 -0
- package/src/components/virtual-list/_internal/geometry.ts +236 -0
- package/src/components/virtual-list/_internal/list-semantics.ts +151 -0
- package/src/components/virtual-list/_internal/measurement-window.ts +300 -0
- package/src/components/virtual-list/_internal/reverse-order.ts +146 -0
- package/src/components/virtual-list/_internal/scroll-restoration.ts +209 -0
- package/src/components/virtual-list/_internal/sticky-items.ts +111 -0
- package/src/components/virtual-list/_internal/virtual-list-measurement-store.svelte.ts +145 -0
- package/src/components/virtual-list/index.ts +7 -1
- package/src/components/virtual-list/virtual-list.css +153 -0
- package/src/components/virtual-list/virtual-list.examples.json +42 -0
- package/src/components/virtual-list/virtual-list.schema.json +53 -3
- package/src/components/virtual-list/virtual-list.schema.ts +64 -3
- package/src/components/virtual-list/virtual-list.svelte +1527 -36
- package/src/components/virtual-list/virtual-list.types.ts +181 -4
- package/src/index.ts +3 -0
- package/src/styles/tokens-base.css +29 -21
- package/src/tokens/cinder.resolver.json +8 -0
- package/src/tokens/index.json +1 -1
- package/src/tokens/registry.generated.json +29 -3
- package/src/tokens/registry.generated.ts +31 -3
- package/src/tokens/resolved/dark-reduced-motion.json +46 -16
- package/src/tokens/resolved/dark.json +46 -16
- package/src/tokens/resolved/light-reduced-motion.json +47 -17
- package/src/tokens/resolved/light.json +47 -17
- package/src/tokens/sets/semantic.tokens.json +120 -30
- package/src/tokens/themes/dark.tokens.json +115 -19
- package/src/tokens/themes/light.tokens.json +51 -3
- package/dist/server/index.server-191cnacw.js +0 -3
- package/dist/server/index.server-25dqx151.js +0 -3
- package/dist/server/index.server-77jyqvbv.js +0 -4
- package/dist/server/index.server-bgjrzr70.js +0 -3
- package/dist/server/index.server-khsp90vh.js +0 -3
- package/dist/server/index.server-ryk2pgbe.js +0 -4
- package/dist/server/index.server-tajr81bm.js +0 -3
- package/dist/server/index.server-vjzcrw3d.js +0 -4
- package/dist/server/index.server-zg3fx1n1.js +0 -3
|
@@ -2,6 +2,9 @@ import type { Snippet } from 'svelte';
|
|
|
2
2
|
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
3
|
|
|
4
4
|
import type { VirtualListKey } from '../../utilities/fixed-virtual-window.ts';
|
|
5
|
+
import type { VirtualListScrollAlign } from './_internal/measurement-window.ts';
|
|
6
|
+
|
|
7
|
+
export type { VirtualListScrollAlign };
|
|
5
8
|
|
|
6
9
|
export type VirtualListRowContext = {
|
|
7
10
|
/** Zero-based index of the item in the full items array. */
|
|
@@ -10,10 +13,34 @@ export type VirtualListRowContext = {
|
|
|
10
13
|
key: VirtualListKey;
|
|
11
14
|
/** Pixel offset from the top of the full virtual list. */
|
|
12
15
|
start: number;
|
|
13
|
-
/** Pixel height of this
|
|
16
|
+
/** Pixel height of this row: the measured size under `dynamicSize`, otherwise `itemHeight`. */
|
|
14
17
|
size: number;
|
|
15
18
|
};
|
|
16
19
|
|
|
20
|
+
/** Options for `VirtualListRef.scrollToIndex`. */
|
|
21
|
+
export type VirtualListScrollToIndexOptions = {
|
|
22
|
+
/**
|
|
23
|
+
* Where the target row lands in the viewport. Defaults to `'auto'`, which
|
|
24
|
+
* leaves the scroll position alone when the row is already fully visible.
|
|
25
|
+
*/
|
|
26
|
+
align?: VirtualListScrollAlign;
|
|
27
|
+
/** Scroll behavior. Defaults to `'auto'`. */
|
|
28
|
+
behavior?: ScrollBehavior;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Programmatic VirtualList handle exposed through `bind:ref`.
|
|
33
|
+
*/
|
|
34
|
+
export type VirtualListRef = {
|
|
35
|
+
/**
|
|
36
|
+
* Scrolls the item at `index` into view. Under `dynamicSize` this accounts for
|
|
37
|
+
* the measured size of every row before the target, and re-settles if rows
|
|
38
|
+
* above it are measured for the first time mid-scroll. Out-of-range indexes
|
|
39
|
+
* are clamped to the list's bounds.
|
|
40
|
+
*/
|
|
41
|
+
scrollToIndex: (index: number, options?: VirtualListScrollToIndexOptions) => void;
|
|
42
|
+
};
|
|
43
|
+
|
|
17
44
|
export type VirtualListProps<Item = unknown> = Omit<
|
|
18
45
|
HTMLAttributes<HTMLDivElement>,
|
|
19
46
|
'class' | 'tabindex'
|
|
@@ -21,17 +48,49 @@ export type VirtualListProps<Item = unknown> = Omit<
|
|
|
21
48
|
/** Items in full logical order. Only the visible window is mounted. */
|
|
22
49
|
items: readonly Item[];
|
|
23
50
|
/**
|
|
24
|
-
*
|
|
25
|
-
*
|
|
51
|
+
* Each item's extent in pixels along the axis being scrolled: its height by
|
|
52
|
+
* default, or its width under `horizontal`. By default every row is assumed to
|
|
53
|
+
* be exactly this size. When `dynamicSize` is true this becomes the initial
|
|
54
|
+
* estimate for rows that have not been measured yet.
|
|
26
55
|
*/
|
|
27
56
|
itemHeight: number;
|
|
57
|
+
/**
|
|
58
|
+
* Measure each rendered row with `ResizeObserver` and cache the result,
|
|
59
|
+
* instead of assuming every row is exactly `itemHeight` along the scrolled
|
|
60
|
+
* axis. Use this when rows wrap, contain images, or otherwise vary in size.
|
|
61
|
+
* Composes with `horizontal`, where each row is measured by its width.
|
|
62
|
+
*
|
|
63
|
+
* Defaults to `false`. While false, no row is measured, no size is cached,
|
|
64
|
+
* and no scroll correction runs — the fixed-height path stays the fast path.
|
|
65
|
+
* The component still observes its own scroll container to track viewport
|
|
66
|
+
* size, as it always has; that is independent of this prop.
|
|
67
|
+
*/
|
|
68
|
+
dynamicSize?: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Scrolls and lays rows out along the inline axis instead of the block axis.
|
|
71
|
+
*
|
|
72
|
+
* `itemHeight` and `height` are REINTERPRETED rather than renamed: `itemHeight`
|
|
73
|
+
* becomes each item's width in pixels along the main axis, and `height` becomes
|
|
74
|
+
* the container's inline-size. The `--cinder-virtual-list-height` custom property
|
|
75
|
+
* keeps its name too and switches to driving `inline-size`, so an existing theme
|
|
76
|
+
* override keeps working when this is turned on.
|
|
77
|
+
*
|
|
78
|
+
* Right-to-left is handled: the writing direction is resolved from the container's
|
|
79
|
+
* computed style at mount, and the scroll offset is read from the start (right)
|
|
80
|
+
* edge in that case.
|
|
81
|
+
*
|
|
82
|
+
* Defaults to false.
|
|
83
|
+
*/
|
|
84
|
+
horizontal?: boolean;
|
|
85
|
+
|
|
28
86
|
/**
|
|
29
87
|
* Extra rows rendered before and after the visible window.
|
|
30
88
|
* Defaults to 5.
|
|
31
89
|
*/
|
|
32
90
|
overscan?: number;
|
|
33
91
|
/**
|
|
34
|
-
* CSS
|
|
92
|
+
* CSS extent of the native scroll container across the axis it scrolls: its
|
|
93
|
+
* block-size by default, or its inline-size under `horizontal`.
|
|
35
94
|
* Defaults to `"20rem"`.
|
|
36
95
|
*/
|
|
37
96
|
height?: string;
|
|
@@ -41,6 +100,119 @@ export type VirtualListProps<Item = unknown> = Omit<
|
|
|
41
100
|
* scroll position unchanged.
|
|
42
101
|
*/
|
|
43
102
|
stickToBottom?: boolean;
|
|
103
|
+
/**
|
|
104
|
+
* Chat-transcript behaviour: the list starts at its end and returns there on
|
|
105
|
+
* every append.
|
|
106
|
+
*
|
|
107
|
+
* Items stay in their natural order — oldest at index 0, newest last. `reverse`
|
|
108
|
+
* names the anchoring, not the ordering, and the array is never flipped.
|
|
109
|
+
*
|
|
110
|
+
* Deliberately distinct from `stickToBottom`, which pins only when the reader is
|
|
111
|
+
* already at the bottom. `reverse` pins on every append regardless of where the
|
|
112
|
+
* reader is. When both are set, `reverse` wins.
|
|
113
|
+
*
|
|
114
|
+
* Prepending — loading a page of older history — never moves the reader: the row
|
|
115
|
+
* they were looking at stays put while the list grows above it.
|
|
116
|
+
*
|
|
117
|
+
* That last guarantee REQUIRES `getKey`. Telling a prepend from an append means
|
|
118
|
+
* comparing key sequences, and without `getKey` the keys are array indexes: a
|
|
119
|
+
* prepend turns `[0, 1, 2]` into `[0, 1, 2, 3, 4]`, which is indistinguishable
|
|
120
|
+
* from an append and pins the reader to the end instead of holding their place.
|
|
121
|
+
* Pass `getKey` whenever the list can grow at the front.
|
|
122
|
+
*
|
|
123
|
+
* Defaults to false.
|
|
124
|
+
*/
|
|
125
|
+
reverse?: boolean;
|
|
126
|
+
/**
|
|
127
|
+
* Called when the reader scrolls within `overscan` items of the end of the list.
|
|
128
|
+
*
|
|
129
|
+
* Explicitly `| undefined` rather than merely optional: this package compiles with
|
|
130
|
+
* `exactOptionalPropertyTypes`, under which the two differ, and a consumer writing
|
|
131
|
+
* `onEndReached={enabled ? load : undefined}` would otherwise fail to typecheck.
|
|
132
|
+
*
|
|
133
|
+
* Fires once per approach, not once per scroll event, and re-arms when the item
|
|
134
|
+
* count changes — so appending in response to it allows the next approach to fire
|
|
135
|
+
* while a source that returns nothing does not spin.
|
|
136
|
+
*/
|
|
137
|
+
onEndReached?: (() => void) | undefined;
|
|
138
|
+
/**
|
|
139
|
+
* Called when the reader scrolls within `overscan` items of the start of the
|
|
140
|
+
* list. Pair with `onEndReached` for bi-directional infinite scroll.
|
|
141
|
+
*
|
|
142
|
+
* Latched the same way as `onEndReached`. Prepending in response preserves the
|
|
143
|
+
* reader's position rather than jumping to the new start — but only with `getKey`,
|
|
144
|
+
* since index-derived keys make a prepend look exactly like an append.
|
|
145
|
+
*/
|
|
146
|
+
onStartReached?: (() => void) | undefined;
|
|
147
|
+
/**
|
|
148
|
+
* Remember the scroll position across navigation, keyed by
|
|
149
|
+
* `scrollRestorationId`.
|
|
150
|
+
*
|
|
151
|
+
* The position is written to `sessionStorage` when the list tears down, and read
|
|
152
|
+
* back when it mounts. Deliberately not on every scroll: that would mean a
|
|
153
|
+
* storage write per frame during a fling, and teardown is the last moment the
|
|
154
|
+
* position is knowable anyway. The consequence is that a tab closed by a crash,
|
|
155
|
+
* rather than by navigating away, will not have saved.
|
|
156
|
+
*
|
|
157
|
+
* Storage failures are swallowed: a browser in private mode or at its quota throws
|
|
158
|
+
* on write — and on read — and losing a remembered offset must not break the list.
|
|
159
|
+
*
|
|
160
|
+
* Has no effect without a `scrollRestorationId` — see that prop for why.
|
|
161
|
+
*
|
|
162
|
+
* Explicitly `| undefined`, like the other conditionally-supplied props: this
|
|
163
|
+
* package compiles with `exactOptionalPropertyTypes`, under which optional and
|
|
164
|
+
* undefined-valued differ, and `scrollRestoration={enabled ? true : undefined}`
|
|
165
|
+
* would otherwise fail to typecheck.
|
|
166
|
+
*
|
|
167
|
+
* Defaults to false.
|
|
168
|
+
*/
|
|
169
|
+
scrollRestoration?: boolean | undefined;
|
|
170
|
+
/**
|
|
171
|
+
* Item indexes that stay visible at the leading edge while the reader scrolls
|
|
172
|
+
* past them — section headers in a grouped list, most often.
|
|
173
|
+
*
|
|
174
|
+
* A sticky row is kept mounted even after its own index leaves the rendered
|
|
175
|
+
* window, which is the part virtualization would otherwise break: unmounting it
|
|
176
|
+
* would make the heading vanish exactly when it is meant to be pinned.
|
|
177
|
+
*
|
|
178
|
+
* Indexes outside the list, duplicates, and non-integers are dropped rather than
|
|
179
|
+
* throwing — a bad sticky index is a cosmetic problem, not a correctness one.
|
|
180
|
+
*/
|
|
181
|
+
stickyItems?: number[];
|
|
182
|
+
/**
|
|
183
|
+
* Animate `scrollToIndex` by default instead of jumping.
|
|
184
|
+
*
|
|
185
|
+
* Equivalent to passing `behavior: 'smooth'` on every call; an explicit
|
|
186
|
+
* `behavior` in the call's options still wins. Scroll corrections under
|
|
187
|
+
* `dynamicSize` are never animated whatever this is set to — a smooth
|
|
188
|
+
* correction would visibly perform the jump it exists to hide.
|
|
189
|
+
*
|
|
190
|
+
* Defaults to false.
|
|
191
|
+
*/
|
|
192
|
+
smoothScroll?: boolean;
|
|
193
|
+
/**
|
|
194
|
+
* Grow `overscan` while the reader is scrolling fast, and shrink it back when
|
|
195
|
+
* they slow down.
|
|
196
|
+
*
|
|
197
|
+
* `overscan` becomes a floor rather than a fixed value: a fast fling renders
|
|
198
|
+
* further ahead to cut pop-in, and a stationary list falls back to exactly what
|
|
199
|
+
* was configured so the DOM stays small. The growth is bounded, because an
|
|
200
|
+
* unbounded overscan during a fling would mount thousands of rows and defeat the
|
|
201
|
+
* point of virtualizing at all.
|
|
202
|
+
*
|
|
203
|
+
* Defaults to false.
|
|
204
|
+
*/
|
|
205
|
+
adaptiveOverscan?: boolean;
|
|
206
|
+
/**
|
|
207
|
+
* Stable id under which `scrollRestoration` saves this list's position.
|
|
208
|
+
*
|
|
209
|
+
* Required for restoration to do anything. There is deliberately no default:
|
|
210
|
+
* an implicit key derived from position or order would silently hand one
|
|
211
|
+
* list's remembered offset to a different list after a refactor, and two lists
|
|
212
|
+
* on one page would overwrite each other. Choose something tied to what the
|
|
213
|
+
* list shows, such as a route or collection name.
|
|
214
|
+
*/
|
|
215
|
+
scrollRestorationId?: string | undefined;
|
|
44
216
|
/**
|
|
45
217
|
* Override the default focus behavior. The component sets `tabindex="0"`
|
|
46
218
|
* by default so keyboard users can reach the native scroll container for
|
|
@@ -51,10 +223,15 @@ export type VirtualListProps<Item = unknown> = Omit<
|
|
|
51
223
|
/**
|
|
52
224
|
* Stable key extractor. Omit only when items are append-only and never
|
|
53
225
|
* reordered; the component will fall back to full-array indexes.
|
|
226
|
+
*
|
|
227
|
+
* Required in practice under `dynamicSize`: measured sizes are cached by key,
|
|
228
|
+
* so index-derived keys will mis-attribute cached sizes if items ever reorder.
|
|
54
229
|
*/
|
|
55
230
|
getKey?: (item: Item, index: number) => VirtualListKey;
|
|
56
231
|
/** Rendered row snippet. Receives the item and its virtual row context. */
|
|
57
232
|
row: Snippet<[Item, VirtualListRowContext]>;
|
|
58
233
|
/** Additional class names merged with `.cinder-virtual-list`. */
|
|
59
234
|
class?: string;
|
|
235
|
+
/** Typed programmatic handle. Use `bind:ref` to receive it. */
|
|
236
|
+
ref?: VirtualListRef | undefined;
|
|
60
237
|
};
|
package/src/index.ts
CHANGED
|
@@ -1059,7 +1059,10 @@ export type {
|
|
|
1059
1059
|
FixedVirtualWindow,
|
|
1060
1060
|
FixedVirtualWindowItem,
|
|
1061
1061
|
VirtualListProps,
|
|
1062
|
+
VirtualListRef,
|
|
1062
1063
|
VirtualListRowContext,
|
|
1064
|
+
VirtualListScrollAlign,
|
|
1065
|
+
VirtualListScrollToIndexOptions,
|
|
1063
1066
|
} from './components/virtual-list/index.ts';
|
|
1064
1067
|
|
|
1065
1068
|
export { default as VisuallyHidden } from './components/visually-hidden/index.ts';
|
|
@@ -229,14 +229,18 @@
|
|
|
229
229
|
--cinder-surface-upcoming-marker: light-dark(var(--cinder-surface-inset), var(--cinder-surface));
|
|
230
230
|
/* Page canvas background, distinct from `surface.base` (a card body). Sits on the surface ramp that runs inset -> bg -> surface -> raised. Light mode anchors that ramp at white (0.960 -> 0.984 -> 0.994 -> 1.000); dark mode runs the same ordering at low lightness. */
|
|
231
231
|
--cinder-surface-canvas: light-dark(oklch(98.4% 0.003 255), oklch(15% 0.035 245));
|
|
232
|
-
/*
|
|
233
|
-
--cinder-
|
|
232
|
+
/* The neutral ink that contrasts with the current theme's surfaces: black in light mode, white in dark mode. It is a complete color value, not a bare component triplet, so it can be assigned directly to any color-valued property and mixed with `color-mix()` to build a wash at any alpha. The scrollbar washes (track, thumb, thumb-hover) derive from this one token, so overriding it at :root or in a [data-theme] block re-polarizes them together; a subtree override does not reach them, because the washes are declared at :root and descendants inherit the already-resolved values. The shadow tokens are NOT derived from it and do not follow an override: shadow.small/medium/large carry independently tuned per-arm alphas (0.10 light against 0.09 dark, and so on) that one ink cannot express without changing what they paint. */
|
|
233
|
+
--cinder-polarity-ink: light-dark(oklch(0% 0 0), oklch(100% 0 0));
|
|
234
|
+
/* The single polarity-aware ink every neutral structural border tier is mixed from: a dark cool ink in light mode, a light cool ink in dark mode. `border.muted`, `border.control`, and `border.strong` are alpha steps over it, so each tier tracks the surface underneath it instead of being tuned per surface -- which is what holds each tier's contrast spread across the four legal surface tiers under 15% in both arms, against 29% for the opaque dark values it replaces. Overriding this one token at :root or in a [data-theme] block re-tints all three together; a subtree override does not reach them, because the tiers are declared at :root and descendants inherit the already-resolved values. The four HUED status borders (info, success, warning, danger) are deliberately NOT derived from it and stay opaque, because a translucent status border would take its hue from whatever it happened to sit on. Two neutral aliases do follow it and become translucent with it: status.neutral.border aliases border.control, and border.inverse's dark arm aliases border.strong. */
|
|
235
|
+
--cinder-border-ink: light-dark(oklch(20% 0.02 255), oklch(86% 0.065 250));
|
|
236
|
+
/* Functional control boundary that clears WCAG 1.4.11's 3:1 floor against every supported surface. It is the border of the secondary Button, whose fill is `surface.raised` -- white in light mode, a raised dark surface in dark mode -- so in both themes it is the only thing making that control read as a control. Composed as a 48% alpha step over `border.ink` rather than authored per arm, so it can no longer drift out of step with the other two tiers. */
|
|
237
|
+
--cinder-border: color-mix(in oklch, var(--cinder-border-ink), transparent 52%);
|
|
234
238
|
/* Decorative-only hairline. Never use as a control boundary: it is intentionally below the WCAG 1.4.11 3:1 non-text threshold. */
|
|
235
239
|
--cinder-border-faint: light-dark(oklch(92% 0.003 255), oklch(33% 0.03 245));
|
|
236
|
-
/* Decorative divider that wants less weight than `border.control`. Clears a separate 1.4:1 floor against its backdrop. */
|
|
237
|
-
--cinder-border-muted:
|
|
238
|
-
/* Stronger control boundary. Clears WCAG 1.4.11's 3:1 floor against every supported surface, like `border.control`. */
|
|
239
|
-
--cinder-border-strong:
|
|
240
|
+
/* Decorative divider that wants less weight than `border.control`. Clears a separate 1.4:1 floor against its backdrop. Composed as a 19% alpha step over `border.ink`. */
|
|
241
|
+
--cinder-border-muted: color-mix(in oklch, var(--cinder-border-ink), transparent 81%);
|
|
242
|
+
/* Stronger control boundary. Clears WCAG 1.4.11's 3:1 floor against every supported surface, like `border.control`, with more weight. Composed as a 58% alpha step over `border.ink`. */
|
|
243
|
+
--cinder-border-strong: color-mix(in oklch, var(--cinder-border-ink), transparent 42%);
|
|
240
244
|
/* Border for surfaces using `surface.inverse` (Tooltip). Transparent in light mode; adds a 1px delineation in dark mode only. */
|
|
241
245
|
--cinder-border-inverse: light-dark(transparent, var(--cinder-border-strong));
|
|
242
246
|
/* Muted (secondary) text color. */
|
|
@@ -289,11 +293,11 @@
|
|
|
289
293
|
/* Scrollbar thickness. */
|
|
290
294
|
--cinder-scrollbar-size: 0.625rem;
|
|
291
295
|
/* Scrollbar track color. */
|
|
292
|
-
--cinder-scrollbar-track:
|
|
296
|
+
--cinder-scrollbar-track: color-mix(in oklch, var(--cinder-polarity-ink), transparent 96%);
|
|
293
297
|
/* Scrollbar thumb color. */
|
|
294
|
-
--cinder-scrollbar-thumb:
|
|
298
|
+
--cinder-scrollbar-thumb: color-mix(in oklch, var(--cinder-polarity-ink), transparent 55%);
|
|
295
299
|
/* Scrollbar thumb hover color. */
|
|
296
|
-
--cinder-scrollbar-thumb-hover:
|
|
300
|
+
--cinder-scrollbar-thumb-hover: color-mix(in oklch, var(--cinder-polarity-ink), transparent 35%);
|
|
297
301
|
/* Overlay backdrop scrim color. */
|
|
298
302
|
--cinder-overlay-backdrop: light-dark(oklch(20% 0.03 245 / 0.5), oklch(8% 0.02 245 / 0.65));
|
|
299
303
|
/* Overlay backdrop blur radius. */
|
|
@@ -703,10 +707,12 @@
|
|
|
703
707
|
--cinder-surface-inverse: var(--cinder-surface-raised);
|
|
704
708
|
--cinder-surface-upcoming-marker: var(--cinder-surface);
|
|
705
709
|
--cinder-surface-canvas: oklch(15% 0.035 245);
|
|
706
|
-
--cinder-
|
|
710
|
+
--cinder-polarity-ink: oklch(100% 0 0);
|
|
711
|
+
--cinder-border-ink: oklch(86% 0.065 250);
|
|
712
|
+
--cinder-border: color-mix(in oklch, var(--cinder-border-ink), transparent 52%);
|
|
707
713
|
--cinder-border-faint: oklch(33% 0.03 245);
|
|
708
|
-
--cinder-border-muted: oklch(
|
|
709
|
-
--cinder-border-strong: oklch(
|
|
714
|
+
--cinder-border-muted: color-mix(in oklch, var(--cinder-border-ink), transparent 81%);
|
|
715
|
+
--cinder-border-strong: color-mix(in oklch, var(--cinder-border-ink), transparent 42%);
|
|
710
716
|
--cinder-border-inverse: var(--cinder-border-strong);
|
|
711
717
|
--cinder-text-muted: oklch(82% 0.02 245);
|
|
712
718
|
--cinder-text-subtle: oklch(72% 0.02 245);
|
|
@@ -730,9 +736,9 @@
|
|
|
730
736
|
--cinder-ring-color: oklch(from var(--cinder-accent-solid) 0.7 0.14 h);
|
|
731
737
|
--cinder-ring-offset-color: var(--cinder-surface-raised);
|
|
732
738
|
--cinder-ring-on-accent: oklch(100% 0 0);
|
|
733
|
-
--cinder-scrollbar-track:
|
|
734
|
-
--cinder-scrollbar-thumb:
|
|
735
|
-
--cinder-scrollbar-thumb-hover:
|
|
739
|
+
--cinder-scrollbar-track: color-mix(in oklch, var(--cinder-polarity-ink), transparent 96%);
|
|
740
|
+
--cinder-scrollbar-thumb: color-mix(in oklch, var(--cinder-polarity-ink), transparent 55%);
|
|
741
|
+
--cinder-scrollbar-thumb-hover: color-mix(in oklch, var(--cinder-polarity-ink), transparent 35%);
|
|
736
742
|
--cinder-overlay-backdrop: oklch(8% 0.02 245 / 0.65);
|
|
737
743
|
--cinder-shadow-sm: 0 1px 2px oklch(100% 0 0 / 0.09), 0 1px 1px oklch(100% 0 0 / 0.05);
|
|
738
744
|
--cinder-shadow-md: 0 4px 6px -1px oklch(100% 0 0 / 0.09), 0 2px 4px -2px oklch(100% 0 0 / 0.06);
|
|
@@ -867,10 +873,12 @@
|
|
|
867
873
|
--cinder-surface-inverse: var(--cinder-text-default);
|
|
868
874
|
--cinder-surface-upcoming-marker: var(--cinder-surface-inset);
|
|
869
875
|
--cinder-surface-canvas: oklch(98.4% 0.003 255);
|
|
870
|
-
--cinder-
|
|
876
|
+
--cinder-polarity-ink: oklch(0% 0 0);
|
|
877
|
+
--cinder-border-ink: oklch(20% 0.02 255);
|
|
878
|
+
--cinder-border: color-mix(in oklch, var(--cinder-border-ink), transparent 52%);
|
|
871
879
|
--cinder-border-faint: oklch(92% 0.003 255);
|
|
872
|
-
--cinder-border-muted: oklch(
|
|
873
|
-
--cinder-border-strong: oklch(
|
|
880
|
+
--cinder-border-muted: color-mix(in oklch, var(--cinder-border-ink), transparent 81%);
|
|
881
|
+
--cinder-border-strong: color-mix(in oklch, var(--cinder-border-ink), transparent 42%);
|
|
874
882
|
--cinder-border-inverse: transparent;
|
|
875
883
|
--cinder-text-muted: oklch(32% 0.014 245);
|
|
876
884
|
--cinder-text-subtle: oklch(42% 0.012 245);
|
|
@@ -894,9 +902,9 @@
|
|
|
894
902
|
--cinder-ring-color: oklch(from var(--cinder-accent-solid) 0.55 0.16 h);
|
|
895
903
|
--cinder-ring-offset-color: var(--cinder-surface-raised);
|
|
896
904
|
--cinder-ring-on-accent: oklch(15% 0.035 245);
|
|
897
|
-
--cinder-scrollbar-track:
|
|
898
|
-
--cinder-scrollbar-thumb:
|
|
899
|
-
--cinder-scrollbar-thumb-hover:
|
|
905
|
+
--cinder-scrollbar-track: color-mix(in oklch, var(--cinder-polarity-ink), transparent 96%);
|
|
906
|
+
--cinder-scrollbar-thumb: color-mix(in oklch, var(--cinder-polarity-ink), transparent 55%);
|
|
907
|
+
--cinder-scrollbar-thumb-hover: color-mix(in oklch, var(--cinder-polarity-ink), transparent 35%);
|
|
900
908
|
--cinder-overlay-backdrop: oklch(20% 0.03 245 / 0.5);
|
|
901
909
|
--cinder-shadow-sm: 0 1px 2px oklch(0% 0 0 / 0.1), 0 1px 1px oklch(0% 0 0 / 0.06);
|
|
902
910
|
--cinder-shadow-md: 0 4px 6px -1px oklch(0% 0 0 / 0.12), 0 2px 4px -2px oklch(0% 0 0 / 0.1);
|
|
@@ -307,6 +307,10 @@
|
|
|
307
307
|
{
|
|
308
308
|
"cssProperty": "--cinder-surface-inverse",
|
|
309
309
|
"label": "Inverse surface"
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
"cssProperty": "--cinder-polarity-ink",
|
|
313
|
+
"label": "Polarity ink"
|
|
310
314
|
}
|
|
311
315
|
]
|
|
312
316
|
},
|
|
@@ -344,6 +348,10 @@
|
|
|
344
348
|
"id": "borders",
|
|
345
349
|
"label": "Borders",
|
|
346
350
|
"members": [
|
|
351
|
+
{
|
|
352
|
+
"cssProperty": "--cinder-border-ink",
|
|
353
|
+
"label": "Border ink"
|
|
354
|
+
},
|
|
347
355
|
{
|
|
348
356
|
"cssProperty": "--cinder-border",
|
|
349
357
|
"label": "Border"
|
package/src/tokens/index.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$comment": "GENERATED FILE. Do not edit by hand. Regenerate: bun run --filter=@lostgradient/cinder tokens:generate",
|
|
3
3
|
"version": "2025.10",
|
|
4
|
-
"tokenCount":
|
|
4
|
+
"tokenCount": 310,
|
|
5
5
|
"resolver": "@lostgradient/cinder/tokens/resolver",
|
|
6
6
|
"registry": "@lostgradient/cinder/tokens/registry",
|
|
7
7
|
"sources": [
|
|
@@ -891,6 +891,24 @@
|
|
|
891
891
|
"deprecated": false,
|
|
892
892
|
"description": "Page canvas background, distinct from `surface.base` (a card body). Sits on the surface ramp that runs inset -> bg -> surface -> raised. Light mode anchors that ramp at white (0.960 -> 0.984 -> 0.994 -> 1.000); dark mode runs the same ordering at low lightness."
|
|
893
893
|
},
|
|
894
|
+
{
|
|
895
|
+
"path": "polarity.ink",
|
|
896
|
+
"cssProperty": "--cinder-polarity-ink",
|
|
897
|
+
"category": "color",
|
|
898
|
+
"public": true,
|
|
899
|
+
"themeAware": true,
|
|
900
|
+
"deprecated": false,
|
|
901
|
+
"description": "The neutral ink that contrasts with the current theme's surfaces: black in light mode, white in dark mode. It is a complete color value, not a bare component triplet, so it can be assigned directly to any color-valued property and mixed with `color-mix()` to build a wash at any alpha. The scrollbar washes (track, thumb, thumb-hover) derive from this one token, so overriding it at :root or in a [data-theme] block re-polarizes them together; a subtree override does not reach them, because the washes are declared at :root and descendants inherit the already-resolved values. The shadow tokens are NOT derived from it and do not follow an override: shadow.small/medium/large carry independently tuned per-arm alphas (0.10 light against 0.09 dark, and so on) that one ink cannot express without changing what they paint."
|
|
902
|
+
},
|
|
903
|
+
{
|
|
904
|
+
"path": "border.ink",
|
|
905
|
+
"cssProperty": "--cinder-border-ink",
|
|
906
|
+
"category": "color",
|
|
907
|
+
"public": true,
|
|
908
|
+
"themeAware": true,
|
|
909
|
+
"deprecated": false,
|
|
910
|
+
"description": "The single polarity-aware ink every neutral structural border tier is mixed from: a dark cool ink in light mode, a light cool ink in dark mode. `border.muted`, `border.control`, and `border.strong` are alpha steps over it, so each tier tracks the surface underneath it instead of being tuned per surface -- which is what holds each tier's contrast spread across the four legal surface tiers under 15% in both arms, against 29% for the opaque dark values it replaces. Overriding this one token at :root or in a [data-theme] block re-tints all three together; a subtree override does not reach them, because the tiers are declared at :root and descendants inherit the already-resolved values. The four HUED status borders (info, success, warning, danger) are deliberately NOT derived from it and stay opaque, because a translucent status border would take its hue from whatever it happened to sit on. Two neutral aliases do follow it and become translucent with it: status.neutral.border aliases border.control, and border.inverse's dark arm aliases border.strong."
|
|
911
|
+
},
|
|
894
912
|
{
|
|
895
913
|
"path": "border.control",
|
|
896
914
|
"cssProperty": "--cinder-border",
|
|
@@ -898,7 +916,7 @@
|
|
|
898
916
|
"public": true,
|
|
899
917
|
"themeAware": true,
|
|
900
918
|
"deprecated": false,
|
|
901
|
-
"description": "Functional control boundary that clears 3:1 against supported
|
|
919
|
+
"description": "Functional control boundary that clears WCAG 1.4.11's 3:1 floor against every supported surface. It is the border of the secondary Button, whose fill is `surface.raised` -- white in light mode, a raised dark surface in dark mode -- so in both themes it is the only thing making that control read as a control. Composed as a 48% alpha step over `border.ink` rather than authored per arm, so it can no longer drift out of step with the other two tiers."
|
|
902
920
|
},
|
|
903
921
|
{
|
|
904
922
|
"path": "border.faint",
|
|
@@ -916,7 +934,7 @@
|
|
|
916
934
|
"public": true,
|
|
917
935
|
"themeAware": true,
|
|
918
936
|
"deprecated": false,
|
|
919
|
-
"description": "Decorative divider that wants less weight than `border.control`. Clears a separate 1.4:1 floor against its backdrop."
|
|
937
|
+
"description": "Decorative divider that wants less weight than `border.control`. Clears a separate 1.4:1 floor against its backdrop. Composed as a 19% alpha step over `border.ink`."
|
|
920
938
|
},
|
|
921
939
|
{
|
|
922
940
|
"path": "border.strong",
|
|
@@ -925,7 +943,7 @@
|
|
|
925
943
|
"public": true,
|
|
926
944
|
"themeAware": true,
|
|
927
945
|
"deprecated": false,
|
|
928
|
-
"description": "Stronger control boundary. Clears WCAG 1.4.11's 3:1 floor against every supported surface, like `border.control`."
|
|
946
|
+
"description": "Stronger control boundary. Clears WCAG 1.4.11's 3:1 floor against every supported surface, like `border.control`, with more weight. Composed as a 58% alpha step over `border.ink`."
|
|
929
947
|
},
|
|
930
948
|
{
|
|
931
949
|
"path": "border.inverse",
|
|
@@ -2962,6 +2980,8 @@
|
|
|
2962
2980
|
"surface.inverse": "--cinder-surface-inverse",
|
|
2963
2981
|
"surface.upcoming-marker": "--cinder-surface-upcoming-marker",
|
|
2964
2982
|
"surface.canvas": "--cinder-surface-canvas",
|
|
2983
|
+
"polarity.ink": "--cinder-polarity-ink",
|
|
2984
|
+
"border.ink": "--cinder-border-ink",
|
|
2965
2985
|
"border.control": "--cinder-border",
|
|
2966
2986
|
"border.faint": "--cinder-border-faint",
|
|
2967
2987
|
"border.muted": "--cinder-border-muted",
|
|
@@ -3272,6 +3292,8 @@
|
|
|
3272
3292
|
"--cinder-surface-inverse": "surface.inverse",
|
|
3273
3293
|
"--cinder-surface-upcoming-marker": "surface.upcoming-marker",
|
|
3274
3294
|
"--cinder-surface-canvas": "surface.canvas",
|
|
3295
|
+
"--cinder-polarity-ink": "polarity.ink",
|
|
3296
|
+
"--cinder-border-ink": "border.ink",
|
|
3275
3297
|
"--cinder-border": "border.control",
|
|
3276
3298
|
"--cinder-border-faint": "border.faint",
|
|
3277
3299
|
"--cinder-border-muted": "border.muted",
|
|
@@ -3582,6 +3604,8 @@
|
|
|
3582
3604
|
"--cinder-surface-inverse": ["surface.inverse"],
|
|
3583
3605
|
"--cinder-surface-upcoming-marker": ["surface.upcoming-marker"],
|
|
3584
3606
|
"--cinder-surface-canvas": ["surface.canvas"],
|
|
3607
|
+
"--cinder-polarity-ink": ["polarity.ink"],
|
|
3608
|
+
"--cinder-border-ink": ["border.ink"],
|
|
3585
3609
|
"--cinder-border": ["border.control"],
|
|
3586
3610
|
"--cinder-border-faint": ["border.faint"],
|
|
3587
3611
|
"--cinder-border-muted": ["border.muted"],
|
|
@@ -3998,6 +4022,8 @@
|
|
|
3998
4022
|
"surface.inverse",
|
|
3999
4023
|
"surface.upcoming-marker",
|
|
4000
4024
|
"surface.canvas",
|
|
4025
|
+
"polarity.ink",
|
|
4026
|
+
"border.ink",
|
|
4001
4027
|
"border.control",
|
|
4002
4028
|
"border.faint",
|
|
4003
4029
|
"border.muted",
|
|
@@ -960,6 +960,26 @@ export const TOKEN_REGISTRY: TokenRegistry = {
|
|
|
960
960
|
description:
|
|
961
961
|
'Page canvas background, distinct from `surface.base` (a card body). Sits on the surface ramp that runs inset -> bg -> surface -> raised. Light mode anchors that ramp at white (0.960 -> 0.984 -> 0.994 -> 1.000); dark mode runs the same ordering at low lightness.',
|
|
962
962
|
},
|
|
963
|
+
{
|
|
964
|
+
path: 'polarity.ink',
|
|
965
|
+
cssProperty: '--cinder-polarity-ink',
|
|
966
|
+
category: 'color',
|
|
967
|
+
public: true,
|
|
968
|
+
themeAware: true,
|
|
969
|
+
deprecated: false,
|
|
970
|
+
description:
|
|
971
|
+
"The neutral ink that contrasts with the current theme's surfaces: black in light mode, white in dark mode. It is a complete color value, not a bare component triplet, so it can be assigned directly to any color-valued property and mixed with `color-mix()` to build a wash at any alpha. The scrollbar washes (track, thumb, thumb-hover) derive from this one token, so overriding it at :root or in a [data-theme] block re-polarizes them together; a subtree override does not reach them, because the washes are declared at :root and descendants inherit the already-resolved values. The shadow tokens are NOT derived from it and do not follow an override: shadow.small/medium/large carry independently tuned per-arm alphas (0.10 light against 0.09 dark, and so on) that one ink cannot express without changing what they paint.",
|
|
972
|
+
},
|
|
973
|
+
{
|
|
974
|
+
path: 'border.ink',
|
|
975
|
+
cssProperty: '--cinder-border-ink',
|
|
976
|
+
category: 'color',
|
|
977
|
+
public: true,
|
|
978
|
+
themeAware: true,
|
|
979
|
+
deprecated: false,
|
|
980
|
+
description:
|
|
981
|
+
"The single polarity-aware ink every neutral structural border tier is mixed from: a dark cool ink in light mode, a light cool ink in dark mode. `border.muted`, `border.control`, and `border.strong` are alpha steps over it, so each tier tracks the surface underneath it instead of being tuned per surface -- which is what holds each tier's contrast spread across the four legal surface tiers under 15% in both arms, against 29% for the opaque dark values it replaces. Overriding this one token at :root or in a [data-theme] block re-tints all three together; a subtree override does not reach them, because the tiers are declared at :root and descendants inherit the already-resolved values. The four HUED status borders (info, success, warning, danger) are deliberately NOT derived from it and stay opaque, because a translucent status border would take its hue from whatever it happened to sit on. Two neutral aliases do follow it and become translucent with it: status.neutral.border aliases border.control, and border.inverse's dark arm aliases border.strong.",
|
|
982
|
+
},
|
|
963
983
|
{
|
|
964
984
|
path: 'border.control',
|
|
965
985
|
cssProperty: '--cinder-border',
|
|
@@ -968,7 +988,7 @@ export const TOKEN_REGISTRY: TokenRegistry = {
|
|
|
968
988
|
themeAware: true,
|
|
969
989
|
deprecated: false,
|
|
970
990
|
description:
|
|
971
|
-
|
|
991
|
+
"Functional control boundary that clears WCAG 1.4.11's 3:1 floor against every supported surface. It is the border of the secondary Button, whose fill is `surface.raised` -- white in light mode, a raised dark surface in dark mode -- so in both themes it is the only thing making that control read as a control. Composed as a 48% alpha step over `border.ink` rather than authored per arm, so it can no longer drift out of step with the other two tiers.",
|
|
972
992
|
},
|
|
973
993
|
{
|
|
974
994
|
path: 'border.faint',
|
|
@@ -988,7 +1008,7 @@ export const TOKEN_REGISTRY: TokenRegistry = {
|
|
|
988
1008
|
themeAware: true,
|
|
989
1009
|
deprecated: false,
|
|
990
1010
|
description:
|
|
991
|
-
'Decorative divider that wants less weight than `border.control`. Clears a separate 1.4:1 floor against its backdrop.',
|
|
1011
|
+
'Decorative divider that wants less weight than `border.control`. Clears a separate 1.4:1 floor against its backdrop. Composed as a 19% alpha step over `border.ink`.',
|
|
992
1012
|
},
|
|
993
1013
|
{
|
|
994
1014
|
path: 'border.strong',
|
|
@@ -998,7 +1018,7 @@ export const TOKEN_REGISTRY: TokenRegistry = {
|
|
|
998
1018
|
themeAware: true,
|
|
999
1019
|
deprecated: false,
|
|
1000
1020
|
description:
|
|
1001
|
-
"Stronger control boundary. Clears WCAG 1.4.11's 3:1 floor against every supported surface, like `border.control`.",
|
|
1021
|
+
"Stronger control boundary. Clears WCAG 1.4.11's 3:1 floor against every supported surface, like `border.control`, with more weight. Composed as a 58% alpha step over `border.ink`.",
|
|
1002
1022
|
},
|
|
1003
1023
|
{
|
|
1004
1024
|
path: 'border.inverse',
|
|
@@ -3072,6 +3092,8 @@ export const TOKEN_REGISTRY: TokenRegistry = {
|
|
|
3072
3092
|
'surface.inverse': '--cinder-surface-inverse',
|
|
3073
3093
|
'surface.upcoming-marker': '--cinder-surface-upcoming-marker',
|
|
3074
3094
|
'surface.canvas': '--cinder-surface-canvas',
|
|
3095
|
+
'polarity.ink': '--cinder-polarity-ink',
|
|
3096
|
+
'border.ink': '--cinder-border-ink',
|
|
3075
3097
|
'border.control': '--cinder-border',
|
|
3076
3098
|
'border.faint': '--cinder-border-faint',
|
|
3077
3099
|
'border.muted': '--cinder-border-muted',
|
|
@@ -3385,6 +3407,8 @@ export const TOKEN_REGISTRY: TokenRegistry = {
|
|
|
3385
3407
|
'--cinder-surface-inverse': 'surface.inverse',
|
|
3386
3408
|
'--cinder-surface-upcoming-marker': 'surface.upcoming-marker',
|
|
3387
3409
|
'--cinder-surface-canvas': 'surface.canvas',
|
|
3410
|
+
'--cinder-polarity-ink': 'polarity.ink',
|
|
3411
|
+
'--cinder-border-ink': 'border.ink',
|
|
3388
3412
|
'--cinder-border': 'border.control',
|
|
3389
3413
|
'--cinder-border-faint': 'border.faint',
|
|
3390
3414
|
'--cinder-border-muted': 'border.muted',
|
|
@@ -3698,6 +3722,8 @@ export const TOKEN_REGISTRY: TokenRegistry = {
|
|
|
3698
3722
|
'--cinder-surface-inverse': ['surface.inverse'],
|
|
3699
3723
|
'--cinder-surface-upcoming-marker': ['surface.upcoming-marker'],
|
|
3700
3724
|
'--cinder-surface-canvas': ['surface.canvas'],
|
|
3725
|
+
'--cinder-polarity-ink': ['polarity.ink'],
|
|
3726
|
+
'--cinder-border-ink': ['border.ink'],
|
|
3701
3727
|
'--cinder-border': ['border.control'],
|
|
3702
3728
|
'--cinder-border-faint': ['border.faint'],
|
|
3703
3729
|
'--cinder-border-muted': ['border.muted'],
|
|
@@ -4114,6 +4140,8 @@ export const TOKEN_REGISTRY: TokenRegistry = {
|
|
|
4114
4140
|
'surface.inverse',
|
|
4115
4141
|
'surface.upcoming-marker',
|
|
4116
4142
|
'surface.canvas',
|
|
4143
|
+
'polarity.ink',
|
|
4144
|
+
'border.ink',
|
|
4117
4145
|
'border.control',
|
|
4118
4146
|
'border.faint',
|
|
4119
4147
|
'border.muted',
|