dssoca 0.10.0 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/components/Accordion.svelte +35 -15
  2. package/dist/components/Accordion.svelte.d.ts +7 -0
  3. package/dist/components/Avatar.svelte +5 -9
  4. package/dist/components/Badge.svelte +27 -53
  5. package/dist/components/Badge.svelte.d.ts +2 -5
  6. package/dist/components/BottomNav.svelte +2 -2
  7. package/dist/components/BoxPlot.svelte +421 -0
  8. package/dist/components/BoxPlot.svelte.d.ts +36 -0
  9. package/dist/components/BumpChart.svelte +345 -0
  10. package/dist/components/BumpChart.svelte.d.ts +32 -0
  11. package/dist/components/Button.svelte +50 -34
  12. package/dist/components/Button.svelte.d.ts +8 -2
  13. package/dist/components/Chart.svelte +2 -8
  14. package/dist/components/DateField.svelte +1 -1
  15. package/dist/components/FileDrop.svelte +1 -1
  16. package/dist/components/Heatmap.svelte +333 -0
  17. package/dist/components/Heatmap.svelte.d.ts +30 -0
  18. package/dist/components/Icon.svelte +29 -7
  19. package/dist/components/Icon.svelte.d.ts +14 -2
  20. package/dist/components/Input.svelte +1 -1
  21. package/dist/components/LogStream.svelte +3 -3
  22. package/dist/components/Menu.svelte +1 -1
  23. package/dist/components/NumberField.svelte +1 -1
  24. package/dist/components/ScatterPlot.svelte +395 -0
  25. package/dist/components/ScatterPlot.svelte.d.ts +55 -0
  26. package/dist/components/Select.svelte +1 -1
  27. package/dist/components/ServiceCard.svelte +13 -2
  28. package/dist/components/Sidebar.svelte +1 -1
  29. package/dist/components/Spinner.svelte +26 -19
  30. package/dist/components/Spinner.svelte.d.ts +14 -4
  31. package/dist/components/Textarea.svelte +1 -1
  32. package/dist/components/Topbar.svelte +2 -2
  33. package/dist/config.d.ts +44 -3
  34. package/dist/config.js +52 -3
  35. package/dist/dssoca.config.d.ts +38 -1
  36. package/dist/dssoca.config.js +47 -0
  37. package/dist/index.d.ts +10 -5
  38. package/dist/index.js +11 -4
  39. package/dist/palette.d.ts +10 -0
  40. package/dist/palette.js +17 -0
  41. package/dist/theme.css +158 -158
  42. package/dist/tokens.css +158 -158
  43. package/package.json +3 -2
package/dist/config.d.ts CHANGED
@@ -12,9 +12,10 @@
12
12
  * 2. `componentsSize[Name]` (per-component default)
13
13
  * 3. `sizeVariant` on an ancestor (global default; `md` out of the box)
14
14
  */
15
- import { dssocaConfig, type ColorTheme, type Size, type ComponentName, type ComponentsSize } from './dssoca.config.js';
16
- export { dssocaConfig };
17
- export type { ColorTheme, Size, ComponentName, ComponentsSize };
15
+ import { dssocaConfig, PALETTE_SLOTS, type ColorTheme, type Size, type ComponentName, type ComponentsSize, type SpinnerVariant, type Palette, type ThemePalette, type PaletteSlot } from './dssoca.config.js';
16
+ export { dssocaConfig, PALETTE_SLOTS };
17
+ export type { ColorTheme, Size, ComponentName, ComponentsSize, SpinnerVariant };
18
+ export type { Palette, ThemePalette, PaletteSlot };
18
19
  export type { DssocaConfig, DesignAxis } from './dssoca.config.js';
19
20
  export interface DesignConfig {
20
21
  theme: ColorTheme;
@@ -22,9 +23,28 @@ export interface DesignConfig {
22
23
  sizeVariant: Size;
23
24
  /** Per-component default sizes; components not listed inherit `sizeVariant`. */
24
25
  componentsSize: ComponentsSize;
26
+ /**
27
+ * Global default Spinner glyph (DS-0108). Unlike `theme`/`sizeVariant` this is
28
+ * NOT a CSS axis — it is never painted as a `data-*` attribute (see
29
+ * `designAttributes`, which intentionally omits it). It threads to the Spinner
30
+ * component through `resolveSpinnerVariant`; a per-usage `variant` prop wins.
31
+ */
32
+ spinnerVariant: SpinnerVariant;
33
+ /**
34
+ * Custom root palette (color rework) — both themes' 19 slot values, e.g.
35
+ * generated by the docs Theme Builder. `null` = the built-in palette.
36
+ * Tri-state in `applyDesignConfig` partials: omit to keep the current
37
+ * palette, pass a `Palette` to set one, pass `null` to clear back to the
38
+ * stylesheet values. Applied as inline custom properties for the ACTIVE
39
+ * theme only, and re-written on every call so a theme flip never gets
40
+ * masked by stale inline values.
41
+ */
42
+ palette: Palette | null;
25
43
  }
26
44
  /** Defaults derived from the manifest — change them in `dssoca.config.ts`. */
27
45
  export declare const defaultDesignConfig: DesignConfig;
46
+ /** camelCase slot → its CSS custom property ('brightBlack' → '--ss-bright-black'). */
47
+ export declare const paletteSlotVar: (slot: PaletteSlot) => string;
28
48
  /** Current resolved config (last applied, or defaults). */
29
49
  export declare function getDesignConfig(): DesignConfig;
30
50
  /**
@@ -32,6 +52,10 @@ export declare function getDesignConfig(): DesignConfig;
32
52
  * correct theme + size paint on the first frame with no flash.
33
53
  *
34
54
  * <html {...designAttributes({ sizeVariant: 'sm' })}> … </html>
55
+ *
56
+ * Only the CSS axes (`theme`, `sizeVariant`) appear here. `spinnerVariant` is a
57
+ * default-prop axis, not a CSS one, so it is deliberately omitted (DS-0108) — it
58
+ * is consumed via `resolveSpinnerVariant`, never as a `data-*` attribute.
35
59
  */
36
60
  export declare function designAttributes(config?: Partial<DesignConfig>): {
37
61
  'data-theme': ColorTheme;
@@ -43,6 +67,15 @@ export declare function designAttributes(config?: Partial<DesignConfig>): {
43
67
  * merged key-by-key). SSR-safe: no-op when no document and no explicit target.
44
68
  */
45
69
  export declare function applyDesignConfig(config?: Partial<DesignConfig>, target?: HTMLElement): DesignConfig;
70
+ /**
71
+ * Emit a custom palette as a CSS override block — the zero-JS / SSR path. Ship
72
+ * it AFTER `dssoca/theme.css` in source order (equal specificity, order wins):
73
+ *
74
+ * <style>{paletteToCss(palette)}</style>
75
+ *
76
+ * The docs Theme Builder's "CSS" export is exactly this output.
77
+ */
78
+ export declare function paletteToCss(palette: Palette): string;
46
79
  /**
47
80
  * Resolve the size a component should APPLY on its own root (as
48
81
  * `data-size-variant`), or `undefined` to inherit the global `sizeVariant`
@@ -50,3 +83,11 @@ export declare function applyDesignConfig(config?: Partial<DesignConfig>, target
50
83
  * `componentsSize[name]` → inherit.
51
84
  */
52
85
  export declare function resolveComponentSize(name: ComponentName, size?: Size): Size | undefined;
86
+ /**
87
+ * Resolve the Spinner glyph a component should render: an explicit `variant`
88
+ * wins, else the configured global `spinnerVariant` (DS-0108). Mirrors
89
+ * `resolveComponentSize`, but ALWAYS returns a concrete variant (never
90
+ * `undefined`) — there is no CSS cascade for the glyph, so the component needs a
91
+ * definite value to pick frames.
92
+ */
93
+ export declare function resolveSpinnerVariant(variant?: SpinnerVariant): SpinnerVariant;
package/dist/config.js CHANGED
@@ -12,28 +12,41 @@
12
12
  * 2. `componentsSize[Name]` (per-component default)
13
13
  * 3. `sizeVariant` on an ancestor (global default; `md` out of the box)
14
14
  */
15
- import { dssocaConfig, } from './dssoca.config.js';
15
+ import { dssocaConfig, PALETTE_SLOTS, } from './dssoca.config.js';
16
16
  // Re-exported so the `dssoca` / `./config` import paths expose the config vocab.
17
- export { dssocaConfig };
17
+ export { dssocaConfig, PALETTE_SLOTS };
18
18
  /** Defaults derived from the manifest — change them in `dssoca.config.ts`. */
19
19
  export const defaultDesignConfig = {
20
20
  theme: dssocaConfig.theme.default,
21
21
  sizeVariant: dssocaConfig.size.default,
22
22
  componentsSize: {},
23
+ spinnerVariant: dssocaConfig.spinner.default,
24
+ palette: null,
23
25
  };
24
26
  let current = {
25
27
  ...defaultDesignConfig,
26
28
  componentsSize: { ...defaultDesignConfig.componentsSize },
27
29
  };
30
+ const copyPalette = (p) => p === null ? null : { dark: { ...p.dark }, light: { ...p.light } };
31
+ /** camelCase slot → its CSS custom property ('brightBlack' → '--ss-bright-black'). */
32
+ export const paletteSlotVar = (slot) => '--ss-' + slot.replace(/[A-Z]/g, (m) => '-' + m.toLowerCase());
28
33
  /** Current resolved config (last applied, or defaults). */
29
34
  export function getDesignConfig() {
30
- return { ...current, componentsSize: { ...current.componentsSize } };
35
+ return {
36
+ ...current,
37
+ componentsSize: { ...current.componentsSize },
38
+ palette: copyPalette(current.palette),
39
+ };
31
40
  }
32
41
  /**
33
42
  * Build the `data-*` attribute map for a config — handy for SSR / markup so the
34
43
  * correct theme + size paint on the first frame with no flash.
35
44
  *
36
45
  * <html {...designAttributes({ sizeVariant: 'sm' })}> … </html>
46
+ *
47
+ * Only the CSS axes (`theme`, `sizeVariant`) appear here. `spinnerVariant` is a
48
+ * default-prop axis, not a CSS one, so it is deliberately omitted (DS-0108) — it
49
+ * is consumed via `resolveSpinnerVariant`, never as a `data-*` attribute.
37
50
  */
38
51
  export function designAttributes(config = {}) {
39
52
  const merged = { ...defaultDesignConfig, ...config };
@@ -49,14 +62,40 @@ export function applyDesignConfig(config = {}, target) {
49
62
  ...current,
50
63
  ...config,
51
64
  componentsSize: { ...current.componentsSize, ...(config.componentsSize ?? {}) },
65
+ // Tri-state: absent = keep, Palette = set (defensive copy), null = clear.
66
+ palette: config.palette === undefined ? current.palette : copyPalette(config.palette),
52
67
  };
53
68
  const el = target ?? (typeof document !== 'undefined' ? document.documentElement : undefined);
54
69
  if (el) {
55
70
  el.setAttribute('data-theme', current.theme);
56
71
  el.setAttribute('data-size-variant', current.sizeVariant);
72
+ // Palette runs on EVERY call: inline slot values always track the active
73
+ // theme (a later theme flip re-writes the other set), and clearing removes
74
+ // them so the stylesheet palette resumes.
75
+ for (const slot of PALETTE_SLOTS) {
76
+ if (current.palette)
77
+ el.style.setProperty(paletteSlotVar(slot), current.palette[current.theme][slot]);
78
+ else
79
+ el.style.removeProperty(paletteSlotVar(slot));
80
+ }
57
81
  }
58
82
  return getDesignConfig();
59
83
  }
84
+ /**
85
+ * Emit a custom palette as a CSS override block — the zero-JS / SSR path. Ship
86
+ * it AFTER `dssoca/theme.css` in source order (equal specificity, order wins):
87
+ *
88
+ * <style>{paletteToCss(palette)}</style>
89
+ *
90
+ * The docs Theme Builder's "CSS" export is exactly this output.
91
+ */
92
+ export function paletteToCss(palette) {
93
+ const block = (selector, theme) => `${selector} {\n${PALETTE_SLOTS.map((s) => ` ${paletteSlotVar(s)}: ${theme[s]};`).join('\n')}\n}`;
94
+ return [
95
+ block(`:root,\n[data-theme='dark']`, palette.dark),
96
+ block(`[data-theme='light']`, palette.light),
97
+ ].join('\n\n');
98
+ }
60
99
  /**
61
100
  * Resolve the size a component should APPLY on its own root (as
62
101
  * `data-size-variant`), or `undefined` to inherit the global `sizeVariant`
@@ -66,3 +105,13 @@ export function applyDesignConfig(config = {}, target) {
66
105
  export function resolveComponentSize(name, size) {
67
106
  return size ?? current.componentsSize[name];
68
107
  }
108
+ /**
109
+ * Resolve the Spinner glyph a component should render: an explicit `variant`
110
+ * wins, else the configured global `spinnerVariant` (DS-0108). Mirrors
111
+ * `resolveComponentSize`, but ALWAYS returns a concrete variant (never
112
+ * `undefined`) — there is no CSS cascade for the glyph, so the component needs a
113
+ * definite value to pick frames.
114
+ */
115
+ export function resolveSpinnerVariant(variant) {
116
+ return variant ?? current.spinnerVariant;
117
+ }
@@ -20,11 +20,27 @@ export interface DesignAxis<Values extends readonly string[] = readonly string[]
20
20
  /** The value applied when a consumer sets nothing. */
21
21
  readonly default: Values[number];
22
22
  }
23
- /** Shape of the manifest — one entry per axis the design system understands. */
23
+ /**
24
+ * Shape of the manifest — one entry per axis the design system understands.
25
+ *
26
+ * Note the asymmetry: `theme` and `size` are *CSS axes* (painted as
27
+ * `data-theme` / `data-size-variant`); `spinner` is a plain default-prop axis
28
+ * (the chosen Spinner glyph) with no `data-*` attribute — it threads through the
29
+ * config to `resolveSpinnerVariant`, not the cascade (DS-0108).
30
+ */
24
31
  export interface DssocaConfig {
25
32
  readonly theme: DesignAxis;
26
33
  readonly size: DesignAxis;
34
+ readonly spinner: DesignAxis;
27
35
  }
36
+ /**
37
+ * Single source of truth for the Spinner *variant names* (DS-0108). The frame
38
+ * data lives in `Spinner.svelte`'s `SPINNER_VARIANTS`, but its keys are pinned
39
+ * to this list (`satisfies Record<SpinnerVariant, …>`) so the two cannot drift.
40
+ */
41
+ export declare const SPINNER_VARIANT_NAMES: readonly ["boxBounce2", "boxBounce", "squareCorners", "toggle2", "toggle3", "toggle4", "pipe", "line", "growVertical", "growHorizontal"];
42
+ /** Spinner variant names — derived from the manifest's `spinner` axis. */
43
+ export type SpinnerVariant = (typeof dssocaConfig)['spinner']['values'][number];
28
44
  /**
29
45
  * The manifest. `as const` preserves the value/default literals so the unions
30
46
  * below can be derived from it; `satisfies` validates the shape without widening.
@@ -38,9 +54,30 @@ export declare const dssocaConfig: {
38
54
  readonly values: readonly ["sm", "md", "lg"];
39
55
  readonly default: "md";
40
56
  };
57
+ readonly spinner: {
58
+ readonly values: readonly ["boxBounce2", "boxBounce", "squareCorners", "toggle2", "toggle3", "toggle4", "pipe", "line", "growVertical", "growHorizontal"];
59
+ readonly default: "boxBounce2";
60
+ };
41
61
  };
42
62
  /** Color axis values — derived from the manifest (`'dark' | 'light'`). */
43
63
  export type ColorTheme = (typeof dssocaConfig)['theme']['values'][number];
64
+ /**
65
+ * The 19 root palette slots (color rework): the 16 ANSI terminal colors plus
66
+ * `bg`, `fg`, and the one vivid `accent`. Every semantic `--ss-*` token derives
67
+ * from these, so overriding them — via `applyDesignConfig({ palette })` or a
68
+ * CSS block from `paletteToCss` — recolors the whole system. camelCase here;
69
+ * the CSS custom property is the kebab-cased `--ss-` name
70
+ * (`brightBlack` → `--ss-bright-black`).
71
+ */
72
+ export declare const PALETTE_SLOTS: readonly ["bg", "fg", "accent", "black", "red", "green", "yellow", "blue", "magenta", "cyan", "white", "brightBlack", "brightRed", "brightGreen", "brightYellow", "brightBlue", "brightMagenta", "brightCyan", "brightWhite"];
73
+ export type PaletteSlot = (typeof PALETTE_SLOTS)[number];
74
+ /** One theme's palette — any CSS `<color>` string per slot (hex, oklch(), …). */
75
+ export type ThemePalette = Record<PaletteSlot, string>;
76
+ /** A full custom palette: both themes, e.g. generated by the docs Theme Builder. */
77
+ export interface Palette {
78
+ dark: ThemePalette;
79
+ light: ThemePalette;
80
+ }
44
81
  /** Size axis values — derived from the manifest (`'sm' | 'md' | 'lg'`). */
45
82
  export type Size = (typeof dssocaConfig)['size']['values'][number];
46
83
  /** Names of the components that accept a `size` prop / `componentsSize` entry. */
@@ -13,6 +13,23 @@
13
13
  * `sizeVariant`; per-component defaults by `componentsSize`; per instance by a
14
14
  * component's `size` prop.
15
15
  */
16
+ /**
17
+ * Single source of truth for the Spinner *variant names* (DS-0108). The frame
18
+ * data lives in `Spinner.svelte`'s `SPINNER_VARIANTS`, but its keys are pinned
19
+ * to this list (`satisfies Record<SpinnerVariant, …>`) so the two cannot drift.
20
+ */
21
+ export const SPINNER_VARIANT_NAMES = [
22
+ 'boxBounce2',
23
+ 'boxBounce',
24
+ 'squareCorners',
25
+ 'toggle2',
26
+ 'toggle3',
27
+ 'toggle4',
28
+ 'pipe',
29
+ 'line',
30
+ 'growVertical',
31
+ 'growHorizontal',
32
+ ];
16
33
  /**
17
34
  * The manifest. `as const` preserves the value/default literals so the unions
18
35
  * below can be derived from it; `satisfies` validates the shape without widening.
@@ -20,7 +37,37 @@
20
37
  export const dssocaConfig = {
21
38
  theme: { values: ['dark', 'light'], default: 'dark' },
22
39
  size: { values: ['sm', 'md', 'lg'], default: 'md' },
40
+ spinner: { values: SPINNER_VARIANT_NAMES, default: 'boxBounce2' },
23
41
  };
42
+ /**
43
+ * The 19 root palette slots (color rework): the 16 ANSI terminal colors plus
44
+ * `bg`, `fg`, and the one vivid `accent`. Every semantic `--ss-*` token derives
45
+ * from these, so overriding them — via `applyDesignConfig({ palette })` or a
46
+ * CSS block from `paletteToCss` — recolors the whole system. camelCase here;
47
+ * the CSS custom property is the kebab-cased `--ss-` name
48
+ * (`brightBlack` → `--ss-bright-black`).
49
+ */
50
+ export const PALETTE_SLOTS = [
51
+ 'bg',
52
+ 'fg',
53
+ 'accent',
54
+ 'black',
55
+ 'red',
56
+ 'green',
57
+ 'yellow',
58
+ 'blue',
59
+ 'magenta',
60
+ 'cyan',
61
+ 'white',
62
+ 'brightBlack',
63
+ 'brightRed',
64
+ 'brightGreen',
65
+ 'brightYellow',
66
+ 'brightBlue',
67
+ 'brightMagenta',
68
+ 'brightCyan',
69
+ 'brightWhite',
70
+ ];
24
71
  /** Names of the components that accept a `size` prop / `componentsSize` entry. */
25
72
  export const COMPONENT_NAMES = [
26
73
  'Accordion',
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
- export { type ColorTheme, type Size, type DesignConfig, defaultDesignConfig, getDesignConfig, designAttributes, applyDesignConfig, resolveComponentSize, } from './config.js';
2
- export { dssocaConfig, type DssocaConfig, type DesignAxis, type ComponentName, type ComponentsSize, } from './dssoca.config.js';
3
- export { default as Icon, registerIcon, type IconName } from './components/Icon.svelte';
1
+ export { type ColorTheme, type Size, type DesignConfig, defaultDesignConfig, getDesignConfig, designAttributes, applyDesignConfig, paletteToCss, paletteSlotVar, resolveComponentSize, resolveSpinnerVariant, } from './config.js';
2
+ export { dssocaConfig, SPINNER_VARIANT_NAMES, PALETTE_SLOTS, type DssocaConfig, type DesignAxis, type ComponentName, type ComponentsSize, type SpinnerVariant, type Palette, type ThemePalette, type PaletteSlot, } from './dssoca.config.js';
3
+ export { CHART_PALETTE } from './palette.js';
4
+ export { default as Icon, registerIcon, type IconName, type IconSize, } from './components/Icon.svelte';
4
5
  export { default as Badge } from './components/Badge.svelte';
5
6
  export { default as Button } from './components/Button.svelte';
6
7
  export { default as Input } from './components/Input.svelte';
@@ -24,8 +25,8 @@ export { default as Image, type ImageSource } from './components/Image.svelte';
24
25
  export { default as Heading } from './components/Heading.svelte';
25
26
  export { default as Container } from './components/Container.svelte';
26
27
  export { default as Textarea } from './components/Textarea.svelte';
27
- export { default as Spinner, SPINNER_VARIANTS, SPINNER_VARIANT_NAMES, } from './components/Spinner.svelte';
28
- export type { SpinnerVariant, SpinnerFrames } from './components/Spinner.svelte';
28
+ export { default as Spinner, SPINNER_VARIANTS } from './components/Spinner.svelte';
29
+ export type { SpinnerFrames } from './components/Spinner.svelte';
29
30
  export { default as Chart, type ChartSeries, type ChartPoint } from './components/Chart.svelte';
30
31
  export { default as Table, type TableColumn, type TableSort } from './components/Table.svelte';
31
32
  export { default as Select } from './components/Select.svelte';
@@ -38,4 +39,8 @@ export { default as Tooltip } from './components/Tooltip.svelte';
38
39
  export { default as Avatar } from './components/Avatar.svelte';
39
40
  export { default as Pagination } from './components/Pagination.svelte';
40
41
  export { default as Switch } from './components/Switch.svelte';
42
+ export { default as ScatterPlot, type ScatterPoint } from './components/ScatterPlot.svelte';
43
+ export { default as BoxPlot, type BoxGroup } from './components/BoxPlot.svelte';
44
+ export { default as BumpChart, type BumpSeries } from './components/BumpChart.svelte';
45
+ export { default as Heatmap } from './components/Heatmap.svelte';
41
46
  export { toast, toasts, type Toast, type ToastKind, type ToastAction, type ToastOptions, type ToastPatch, type PromiseMessages, } from './toast.svelte.js';
package/dist/index.js CHANGED
@@ -1,6 +1,8 @@
1
- export { defaultDesignConfig, getDesignConfig, designAttributes, applyDesignConfig, resolveComponentSize, } from './config.js';
2
- export { dssocaConfig, } from './dssoca.config.js';
3
- export { default as Icon, registerIcon } from './components/Icon.svelte';
1
+ export { defaultDesignConfig, getDesignConfig, designAttributes, applyDesignConfig, paletteToCss, paletteSlotVar, resolveComponentSize, resolveSpinnerVariant, } from './config.js';
2
+ export { dssocaConfig, SPINNER_VARIANT_NAMES, PALETTE_SLOTS, } from './dssoca.config.js';
3
+ // Categorical palette shared by the chart family + Avatar (stable order/length).
4
+ export { CHART_PALETTE } from './palette.js';
5
+ export { default as Icon, registerIcon, } from './components/Icon.svelte';
4
6
  export { default as Badge } from './components/Badge.svelte';
5
7
  export { default as Button } from './components/Button.svelte';
6
8
  export { default as Input } from './components/Input.svelte';
@@ -28,7 +30,7 @@ export { default as Image } from './components/Image.svelte';
28
30
  export { default as Heading } from './components/Heading.svelte';
29
31
  export { default as Container } from './components/Container.svelte';
30
32
  export { default as Textarea } from './components/Textarea.svelte';
31
- export { default as Spinner, SPINNER_VARIANTS, SPINNER_VARIANT_NAMES, } from './components/Spinner.svelte';
33
+ export { default as Spinner, SPINNER_VARIANTS } from './components/Spinner.svelte';
32
34
  // geossoca component gaps (DS-0090).
33
35
  export { default as Chart } from './components/Chart.svelte';
34
36
  export { default as Table } from './components/Table.svelte';
@@ -41,4 +43,9 @@ export { default as Tooltip } from './components/Tooltip.svelte';
41
43
  export { default as Avatar } from './components/Avatar.svelte';
42
44
  export { default as Pagination } from './components/Pagination.svelte';
43
45
  export { default as Switch } from './components/Switch.svelte';
46
+ // geossoca stats-dashboard charts (DS-0102).
47
+ export { default as ScatterPlot } from './components/ScatterPlot.svelte';
48
+ export { default as BoxPlot } from './components/BoxPlot.svelte';
49
+ export { default as BumpChart } from './components/BumpChart.svelte';
50
+ export { default as Heatmap } from './components/Heatmap.svelte';
44
51
  export { toast, toasts, } from './toast.svelte.js';
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Categorical palette shared by the chart family (Chart, ScatterPlot, BoxPlot,
3
+ * BumpChart) and Avatar. Built entirely from the terminal root slots so a
4
+ * theme flip — or an imported custom palette — recolors every series.
5
+ *
6
+ * Order and length are stable API: Avatar's name-hash → index mapping depends
7
+ * on them (a given name must keep its colour across releases), and chart
8
+ * series keep their assigned colour by index.
9
+ */
10
+ export declare const CHART_PALETTE: readonly ["var(--ss-accent)", "var(--ss-blue)", "var(--ss-magenta)", "var(--ss-cyan)", "var(--ss-yellow)", "var(--ss-green)"];
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Categorical palette shared by the chart family (Chart, ScatterPlot, BoxPlot,
3
+ * BumpChart) and Avatar. Built entirely from the terminal root slots so a
4
+ * theme flip — or an imported custom palette — recolors every series.
5
+ *
6
+ * Order and length are stable API: Avatar's name-hash → index mapping depends
7
+ * on them (a given name must keep its colour across releases), and chart
8
+ * series keep their assigned colour by index.
9
+ */
10
+ export const CHART_PALETTE = [
11
+ 'var(--ss-accent)',
12
+ 'var(--ss-blue)',
13
+ 'var(--ss-magenta)',
14
+ 'var(--ss-cyan)',
15
+ 'var(--ss-yellow)',
16
+ 'var(--ss-green)',
17
+ ];