@ponchia/ui 0.5.0 → 0.6.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 (117) hide show
  1. package/CHANGELOG.md +322 -0
  2. package/MIGRATIONS.json +14 -0
  3. package/README.md +28 -5
  4. package/annotations/index.d.ts +398 -276
  5. package/annotations/index.d.ts.map +1 -0
  6. package/annotations/index.js +315 -45
  7. package/behaviors/carousel.js +17 -16
  8. package/behaviors/combobox.js +47 -16
  9. package/behaviors/command.js +18 -15
  10. package/behaviors/connectors.js +4 -5
  11. package/behaviors/crosshair.js +4 -5
  12. package/behaviors/dialog.js +3 -2
  13. package/behaviors/disclosure.js +3 -2
  14. package/behaviors/dismissible.js +3 -2
  15. package/behaviors/forms.js +41 -13
  16. package/behaviors/glyph.js +4 -5
  17. package/behaviors/internal.js +47 -0
  18. package/behaviors/legend.js +23 -2
  19. package/behaviors/menu.js +3 -2
  20. package/behaviors/popover.js +78 -7
  21. package/behaviors/spotlight.js +4 -5
  22. package/behaviors/table.js +39 -12
  23. package/behaviors/tabs.js +14 -14
  24. package/behaviors/theme.js +5 -3
  25. package/behaviors/toast.js +13 -1
  26. package/classes/classes.json +1857 -0
  27. package/classes/index.d.ts +28 -13
  28. package/classes/index.js +34 -18
  29. package/classes/vscode.css-custom-data.json +12 -0
  30. package/connectors/index.d.ts +189 -69
  31. package/connectors/index.d.ts.map +1 -0
  32. package/connectors/index.js +120 -24
  33. package/css/app.css +43 -13
  34. package/css/base.css +15 -10
  35. package/css/connectors.css +17 -0
  36. package/css/content.css +7 -1
  37. package/css/dataviz.css +5 -1
  38. package/css/disclosure.css +38 -6
  39. package/css/dots.css +57 -0
  40. package/css/feedback.css +60 -2
  41. package/css/forms.css +42 -1
  42. package/css/legend.css +11 -7
  43. package/css/marks.css +38 -8
  44. package/css/motion.css +24 -44
  45. package/css/navigation.css +7 -0
  46. package/css/overlay.css +31 -1
  47. package/css/primitives.css +91 -5
  48. package/css/report.css +40 -63
  49. package/css/site.css +16 -2
  50. package/css/sources.css +43 -1
  51. package/css/spotlight.css +1 -1
  52. package/css/tokens.css +36 -1
  53. package/css/workbench.css +1 -1
  54. package/dist/bronto.css +1 -1
  55. package/dist/css/analytical.css +1 -1
  56. package/dist/css/app.css +1 -1
  57. package/dist/css/base.css +1 -1
  58. package/dist/css/connectors.css +1 -1
  59. package/dist/css/content.css +1 -1
  60. package/dist/css/disclosure.css +1 -1
  61. package/dist/css/dots.css +1 -1
  62. package/dist/css/feedback.css +1 -1
  63. package/dist/css/forms.css +1 -1
  64. package/dist/css/legend.css +1 -1
  65. package/dist/css/marks.css +1 -1
  66. package/dist/css/motion.css +1 -1
  67. package/dist/css/navigation.css +1 -1
  68. package/dist/css/overlay.css +1 -1
  69. package/dist/css/primitives.css +1 -1
  70. package/dist/css/report.css +1 -1
  71. package/dist/css/site.css +1 -1
  72. package/dist/css/sources.css +1 -1
  73. package/dist/css/spotlight.css +1 -1
  74. package/dist/css/tokens.css +1 -1
  75. package/dist/css/workbench.css +1 -1
  76. package/docs/adr/0003-theme-model.md +1 -1
  77. package/docs/annotations.md +94 -14
  78. package/docs/architecture.md +50 -6
  79. package/docs/contrast.md +116 -92
  80. package/docs/d2.md +195 -0
  81. package/docs/legends.md +18 -2
  82. package/docs/marks.md +9 -2
  83. package/docs/mermaid.md +152 -0
  84. package/docs/reference.md +78 -22
  85. package/docs/reporting.md +395 -57
  86. package/docs/sources.md +27 -0
  87. package/docs/stability.md +9 -2
  88. package/docs/usage.md +101 -4
  89. package/docs/vega.md +225 -0
  90. package/docs/workbench.md +7 -1
  91. package/glyphs/glyphs.js +6 -4
  92. package/llms.txt +139 -14
  93. package/package.json +50 -12
  94. package/qwik/index.d.ts +42 -59
  95. package/qwik/index.d.ts.map +1 -0
  96. package/qwik/index.js +55 -3
  97. package/react/index.d.ts +39 -61
  98. package/react/index.d.ts.map +1 -0
  99. package/react/index.js +57 -3
  100. package/solid/index.d.ts +64 -61
  101. package/solid/index.d.ts.map +1 -0
  102. package/solid/index.js +60 -3
  103. package/tokens/d2.d.ts +38 -0
  104. package/tokens/d2.js +71 -0
  105. package/tokens/d2.json +43 -0
  106. package/tokens/index.d.ts +5 -5
  107. package/tokens/index.js +15 -1
  108. package/tokens/index.json +9 -0
  109. package/tokens/mermaid.d.ts +23 -0
  110. package/tokens/mermaid.js +181 -0
  111. package/tokens/mermaid.json +163 -0
  112. package/tokens/resolved.json +45 -1
  113. package/tokens/skins.js +3 -2
  114. package/tokens/tokens.dtcg.json +26 -0
  115. package/tokens/vega.d.ts +34 -0
  116. package/tokens/vega.js +155 -0
  117. package/tokens/vega.json +179 -0
package/solid/index.d.ts CHANGED
@@ -1,62 +1,65 @@
1
- /** @ponchia/ui/solid thin Solid bindings over the SSR-safe behaviors.
2
- * Optional peer dep `solid-js`. Primitives run a delegated behavior for the
3
- * component's lifetime; they take the same options as the behavior and return
4
- * void (the cleanup is wired to dispose). See behaviors/index.d.ts. */
5
- import type {
6
- Cleanup,
7
- DelegateOpts,
8
- ThemeStorageOpts,
9
- ToastOpts,
10
- } from '../behaviors/index.js';
11
-
12
- export type BrontoBindingRoot =
13
- | Document
14
- | Element
15
- | { current: Document | Element | null | undefined }
16
- | (() => Document | Element | null | undefined)
17
- | null
18
- | undefined;
19
-
20
- export type BrontoBindingOpts<T extends DelegateOpts = DelegateOpts> = Omit<T, 'root'> & {
21
- root?: BrontoBindingRoot;
1
+ /** Run a delegated behavior for the component's lifetime (init on mount, its
2
+ * returned cleanup on dispose). Options resolve on mount, after refs exist.
3
+ * @param {(opts?: DelegateOpts) => Cleanup | void} init
4
+ * @param {BrontoBindingOptsResolver} [opts]
5
+ * @returns {void}
6
+ */
7
+ export function useBrontoBehavior(init: (opts?: DelegateOpts) => Cleanup | void, opts?: BrontoBindingOptsResolver): void;
8
+ /** @type {(opts?: BrontoBindingOptsResolver<ThemeStorageOpts & DelegateOpts>) => void} */
9
+ export const useThemeToggle: (opts?: BrontoBindingOptsResolver<ThemeStorageOpts & DelegateOpts>) => void;
10
+ /** @type {(opts?: BrontoBindingOptsResolver) => void} */
11
+ export const useDismissible: (opts?: BrontoBindingOptsResolver) => void;
12
+ /** @type {(opts?: BrontoBindingOptsResolver) => void} */
13
+ export const useDisclosure: (opts?: BrontoBindingOptsResolver) => void;
14
+ /** @type {(opts?: BrontoBindingOptsResolver) => void} */
15
+ export const useMenu: (opts?: BrontoBindingOptsResolver) => void;
16
+ /** @type {(opts?: BrontoBindingOptsResolver) => void} */
17
+ export const useFormValidation: (opts?: BrontoBindingOptsResolver) => void;
18
+ /** @type {(opts?: BrontoBindingOptsResolver) => void} */
19
+ export const useCombobox: (opts?: BrontoBindingOptsResolver) => void;
20
+ /** @type {(opts?: BrontoBindingOptsResolver) => void} */
21
+ export const usePopover: (opts?: BrontoBindingOptsResolver) => void;
22
+ /** @type {(opts?: BrontoBindingOptsResolver) => void} */
23
+ export const useTableSort: (opts?: BrontoBindingOptsResolver) => void;
24
+ /** @type {(opts?: BrontoBindingOptsResolver) => void} */
25
+ export const useTabs: (opts?: BrontoBindingOptsResolver) => void;
26
+ /** @type {(opts?: BrontoBindingOptsResolver) => void} */
27
+ export const useDialog: (opts?: BrontoBindingOptsResolver) => void;
28
+ /** @type {(opts?: BrontoBindingOptsResolver) => void} */
29
+ export const useCarousel: (opts?: BrontoBindingOptsResolver) => void;
30
+ /** @type {(opts?: BrontoBindingOptsResolver) => void} */
31
+ export const useDotGlyph: (opts?: BrontoBindingOptsResolver) => void;
32
+ /** @type {(opts?: BrontoBindingOptsResolver) => void} */
33
+ export const useLegend: (opts?: BrontoBindingOptsResolver) => void;
34
+ /** @type {(opts?: BrontoBindingOptsResolver) => void} */
35
+ export const useConnectors: (opts?: BrontoBindingOptsResolver) => void;
36
+ /** @type {(opts?: BrontoBindingOptsResolver) => void} */
37
+ export const useSpotlight: (opts?: BrontoBindingOptsResolver) => void;
38
+ /** @type {(opts?: BrontoBindingOptsResolver) => void} */
39
+ export const useCrosshair: (opts?: BrontoBindingOptsResolver) => void;
40
+ /** @type {(opts?: BrontoBindingOptsResolver) => void} */
41
+ export const useCommand: (opts?: BrontoBindingOptsResolver) => void;
42
+ /** The `toast()` imperative (no lifecycle of its own).
43
+ * @type {() => (message: string, opts?: ToastOpts) => Cleanup} */
44
+ export const useToast: () => (message: string, opts?: ToastOpts) => Cleanup;
45
+ export { applyStoredTheme };
46
+ export type Cleanup = import("../behaviors/index.js").Cleanup;
47
+ export type DelegateOpts = import("../behaviors/index.js").DelegateOpts;
48
+ export type ThemeStorageOpts = import("../behaviors/index.js").ThemeStorageOpts;
49
+ export type ToastOpts = import("../behaviors/index.js").ToastOpts;
50
+ export type BrontoBindingRoot = Document | Element | {
51
+ current: Document | Element | null | undefined;
52
+ } | (() => Document | Element | null | undefined) | null | undefined;
53
+ /**
54
+ * Behavior options with the `root` widened to accept Solid refs/resolvers.
55
+ */
56
+ export type BrontoBindingOpts<T extends DelegateOpts = import("../behaviors/index.js").DelegateOpts> = Omit<T, "root"> & {
57
+ root?: BrontoBindingRoot;
22
58
  };
23
-
24
- export type BrontoBindingOptsResolver<T extends DelegateOpts = DelegateOpts> =
25
- | BrontoBindingOpts<T>
26
- | (() => BrontoBindingOpts<T> | null | undefined)
27
- | null
28
- | undefined;
29
-
30
- /** Run any delegated behavior for the component's lifetime (init on mount,
31
- * its returned cleanup on dispose). The behavior is run once. Options resolve
32
- * on mount, so scoped roots may be refs or resolver callbacks. */
33
- export declare function useBrontoBehavior(
34
- init: (opts?: DelegateOpts) => Cleanup | void,
35
- opts?: BrontoBindingOptsResolver,
36
- ): void;
37
-
38
- export declare function useThemeToggle(
39
- opts?: BrontoBindingOptsResolver<ThemeStorageOpts & DelegateOpts>,
40
- ): void;
41
- export declare function useDismissible(opts?: BrontoBindingOptsResolver): void;
42
- export declare function useDisclosure(opts?: BrontoBindingOptsResolver): void;
43
- export declare function useMenu(opts?: BrontoBindingOptsResolver): void;
44
- export declare function useFormValidation(opts?: BrontoBindingOptsResolver): void;
45
- export declare function useCombobox(opts?: BrontoBindingOptsResolver): void;
46
- export declare function usePopover(opts?: BrontoBindingOptsResolver): void;
47
- export declare function useTableSort(opts?: BrontoBindingOptsResolver): void;
48
- export declare function useTabs(opts?: BrontoBindingOptsResolver): void;
49
- export declare function useDialog(opts?: BrontoBindingOptsResolver): void;
50
- export declare function useCarousel(opts?: BrontoBindingOptsResolver): void;
51
- export declare function useDotGlyph(opts?: BrontoBindingOptsResolver): void;
52
- export declare function useLegend(opts?: BrontoBindingOptsResolver): void;
53
- export declare function useConnectors(opts?: BrontoBindingOptsResolver): void;
54
- export declare function useSpotlight(opts?: BrontoBindingOptsResolver): void;
55
- export declare function useCrosshair(opts?: BrontoBindingOptsResolver): void;
56
- export declare function useCommand(opts?: BrontoBindingOptsResolver): void;
57
-
58
- /** The `toast()` imperative (no lifecycle of its own). */
59
- export declare function useToast(): (message: string, opts?: ToastOpts) => Cleanup;
60
-
61
- export { applyStoredTheme } from '../behaviors/index.js';
62
- export { cls, ui, cx } from '../classes/index.js';
59
+ /**
60
+ * `BrontoBindingOpts<T>`, or a callback that returns it on mount (after refs).
61
+ */
62
+ export type BrontoBindingOptsResolver<T extends DelegateOpts = import("../behaviors/index.js").DelegateOpts> = BrontoBindingOpts<T> | (() => BrontoBindingOpts<T> | null | undefined) | null | undefined;
63
+ import { applyStoredTheme } from '../behaviors/index.js';
64
+ export { cls, ui, cx } from "../classes/index.js";
65
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":"AA8FA;;;;;GAKG;AACH,wCAJW,CAAC,IAAI,CAAC,EAAE,YAAY,KAAK,OAAO,GAAG,IAAI,SACvC,yBAAyB,GACvB,IAAI,CAOhB;AAED,0FAA0F;AAC1F,6BADW,CAAC,IAAI,CAAC,EAAE,yBAAyB,CAAC,gBAAgB,GAAG,YAAY,CAAC,KAAK,IAAI,CACL;AACjF,yDAAyD;AACzD,6BADW,CAAC,IAAI,CAAC,EAAE,yBAAyB,KAAK,IAAI,CACwB;AAC7E,yDAAyD;AACzD,4BADW,CAAC,IAAI,CAAC,EAAE,yBAAyB,KAAK,IAAI,CAC0B;AAC/E,yDAAyD;AACzD,sBADW,CAAC,IAAI,CAAC,EAAE,yBAAyB,KAAK,IAAI,CACc;AACnE,yDAAyD;AACzD,gCADW,CAAC,IAAI,CAAC,EAAE,yBAAyB,KAAK,IAAI,CACkC;AACvF,yDAAyD;AACzD,0BADW,CAAC,IAAI,CAAC,EAAE,yBAAyB,KAAK,IAAI,CACsB;AAC3E,yDAAyD;AACzD,yBADW,CAAC,IAAI,CAAC,EAAE,yBAAyB,KAAK,IAAI,CACoB;AACzE,yDAAyD;AACzD,2BADW,CAAC,IAAI,CAAC,EAAE,yBAAyB,KAAK,IAAI,CACwB;AAC7E,yDAAyD;AACzD,sBADW,CAAC,IAAI,CAAC,EAAE,yBAAyB,KAAK,IAAI,CACc;AACnE,yDAAyD;AACzD,wBADW,CAAC,IAAI,CAAC,EAAE,yBAAyB,KAAK,IAAI,CACkB;AACvE,yDAAyD;AACzD,0BADW,CAAC,IAAI,CAAC,EAAE,yBAAyB,KAAK,IAAI,CACsB;AAC3E,yDAAyD;AACzD,0BADW,CAAC,IAAI,CAAC,EAAE,yBAAyB,KAAK,IAAI,CACsB;AAC3E,yDAAyD;AACzD,wBADW,CAAC,IAAI,CAAC,EAAE,yBAAyB,KAAK,IAAI,CACkB;AACvE,yDAAyD;AACzD,4BADW,CAAC,IAAI,CAAC,EAAE,yBAAyB,KAAK,IAAI,CAC0B;AAC/E,yDAAyD;AACzD,2BADW,CAAC,IAAI,CAAC,EAAE,yBAAyB,KAAK,IAAI,CACwB;AAC7E,yDAAyD;AACzD,2BADW,CAAC,IAAI,CAAC,EAAE,yBAAyB,KAAK,IAAI,CACwB;AAC7E,yDAAyD;AACzD,yBADW,CAAC,IAAI,CAAC,EAAE,yBAAyB,KAAK,IAAI,CACoB;AAEzE;kEACkE;AAClE,uBADU,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,SAAS,KAAK,OAAO,CAC1B;;sBA1HvB,OAAO,uBAAuB,EAAE,OAAO;2BACvC,OAAO,uBAAuB,EAAE,YAAY;+BAC5C,OAAO,uBAAuB,EAAE,gBAAgB;wBAChD,OAAO,uBAAuB,EAAE,SAAS;gCAEzC,QAAQ,GACd,OAAO,GACP;IAAE,OAAO,EAAE,QAAQ,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,CAAA;CAAE,GAClD,CAAC,MAAM,QAAQ,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC,GAC7C,IAAI,GACJ,SAAS;;;;8BAKa,CAAC,SAAhB,YAAa,mDACd,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,GAAG;IAAE,IAAI,CAAC,EAAE,iBAAiB,CAAA;CAAE;;;;sCAK9B,CAAC,SAAhB,YAAa,mDACd,iBAAiB,CAAC,CAAC,CAAC,GAC1B,CAAC,MAAM,iBAAiB,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC,GAC/C,IAAI,GACJ,SAAS;iCAuBT,uBAAuB"}
package/solid/index.js CHANGED
@@ -16,6 +16,36 @@
16
16
  * const toast = useToast();
17
17
  * return <button onClick={() => toast('Saved', { tone: 'success' })}>Save</button>;
18
18
  * }
19
+ *
20
+ * The public types below are JSDoc `@typedef`s; the shipped `index.d.ts` is
21
+ * generated from them (and these signatures) by `tsc --emitDeclarationOnly`.
22
+ *
23
+ * @typedef {import('../behaviors/index.js').Cleanup} Cleanup
24
+ * @typedef {import('../behaviors/index.js').DelegateOpts} DelegateOpts
25
+ * @typedef {import('../behaviors/index.js').ThemeStorageOpts} ThemeStorageOpts
26
+ * @typedef {import('../behaviors/index.js').ToastOpts} ToastOpts
27
+ *
28
+ * @typedef {Document
29
+ * | Element
30
+ * | { current: Document | Element | null | undefined }
31
+ * | (() => Document | Element | null | undefined)
32
+ * | null
33
+ * | undefined} BrontoBindingRoot
34
+ */
35
+
36
+ /**
37
+ * Behavior options with the `root` widened to accept Solid refs/resolvers.
38
+ * @template {DelegateOpts} [T=DelegateOpts]
39
+ * @typedef {Omit<T, 'root'> & { root?: BrontoBindingRoot }} BrontoBindingOpts
40
+ */
41
+
42
+ /**
43
+ * `BrontoBindingOpts<T>`, or a callback that returns it on mount (after refs).
44
+ * @template {DelegateOpts} [T=DelegateOpts]
45
+ * @typedef {BrontoBindingOpts<T>
46
+ * | (() => BrontoBindingOpts<T> | null | undefined)
47
+ * | null
48
+ * | undefined} BrontoBindingOptsResolver
19
49
  */
20
50
  import { onMount, onCleanup } from 'solid-js';
21
51
  import {
@@ -53,12 +83,21 @@ function resolveRoot(root) {
53
83
  function resolveOpts(opts) {
54
84
  const value = resolveMaybe(opts);
55
85
  if (!value || typeof value !== 'object') return undefined;
86
+ // No `root` key → no scope requested; leave root out so the behavior
87
+ // delegates from `document`. A `root` key that resolves falsy means a scope
88
+ // WAS requested but the ref is not ready: emit `root: null` so the behavior
89
+ // no-ops instead of hijacking the whole document.
90
+ if (!('root' in value)) return { ...value };
56
91
  const root = resolveRoot(value.root);
57
- return root ? { ...value, root } : { ...value, root: undefined };
92
+ return { ...value, root: root || null };
58
93
  }
59
94
 
60
95
  /** Run a delegated behavior for the component's lifetime (init on mount, its
61
- * returned cleanup on dispose). Options resolve on mount, after refs exist. */
96
+ * returned cleanup on dispose). Options resolve on mount, after refs exist.
97
+ * @param {(opts?: DelegateOpts) => Cleanup | void} init
98
+ * @param {BrontoBindingOptsResolver} [opts]
99
+ * @returns {void}
100
+ */
62
101
  export function useBrontoBehavior(init, opts) {
63
102
  onMount(() => {
64
103
  const cleanup = init(resolveOpts(opts));
@@ -66,25 +105,43 @@ export function useBrontoBehavior(init, opts) {
66
105
  });
67
106
  }
68
107
 
108
+ /** @type {(opts?: BrontoBindingOptsResolver<ThemeStorageOpts & DelegateOpts>) => void} */
69
109
  export const useThemeToggle = (opts) => useBrontoBehavior(initThemeToggle, opts);
110
+ /** @type {(opts?: BrontoBindingOptsResolver) => void} */
70
111
  export const useDismissible = (opts) => useBrontoBehavior(dismissible, opts);
112
+ /** @type {(opts?: BrontoBindingOptsResolver) => void} */
71
113
  export const useDisclosure = (opts) => useBrontoBehavior(initDisclosure, opts);
114
+ /** @type {(opts?: BrontoBindingOptsResolver) => void} */
72
115
  export const useMenu = (opts) => useBrontoBehavior(initMenu, opts);
116
+ /** @type {(opts?: BrontoBindingOptsResolver) => void} */
73
117
  export const useFormValidation = (opts) => useBrontoBehavior(initFormValidation, opts);
118
+ /** @type {(opts?: BrontoBindingOptsResolver) => void} */
74
119
  export const useCombobox = (opts) => useBrontoBehavior(initCombobox, opts);
120
+ /** @type {(opts?: BrontoBindingOptsResolver) => void} */
75
121
  export const usePopover = (opts) => useBrontoBehavior(initPopover, opts);
122
+ /** @type {(opts?: BrontoBindingOptsResolver) => void} */
76
123
  export const useTableSort = (opts) => useBrontoBehavior(initTableSort, opts);
124
+ /** @type {(opts?: BrontoBindingOptsResolver) => void} */
77
125
  export const useTabs = (opts) => useBrontoBehavior(initTabs, opts);
126
+ /** @type {(opts?: BrontoBindingOptsResolver) => void} */
78
127
  export const useDialog = (opts) => useBrontoBehavior(initDialog, opts);
128
+ /** @type {(opts?: BrontoBindingOptsResolver) => void} */
79
129
  export const useCarousel = (opts) => useBrontoBehavior(initCarousel, opts);
130
+ /** @type {(opts?: BrontoBindingOptsResolver) => void} */
80
131
  export const useDotGlyph = (opts) => useBrontoBehavior(initDotGlyph, opts);
132
+ /** @type {(opts?: BrontoBindingOptsResolver) => void} */
81
133
  export const useLegend = (opts) => useBrontoBehavior(initLegend, opts);
134
+ /** @type {(opts?: BrontoBindingOptsResolver) => void} */
82
135
  export const useConnectors = (opts) => useBrontoBehavior(initConnectors, opts);
136
+ /** @type {(opts?: BrontoBindingOptsResolver) => void} */
83
137
  export const useSpotlight = (opts) => useBrontoBehavior(initSpotlight, opts);
138
+ /** @type {(opts?: BrontoBindingOptsResolver) => void} */
84
139
  export const useCrosshair = (opts) => useBrontoBehavior(initCrosshair, opts);
140
+ /** @type {(opts?: BrontoBindingOptsResolver) => void} */
85
141
  export const useCommand = (opts) => useBrontoBehavior(initCommand, opts);
86
142
 
87
- /** The `toast()` imperative (no lifecycle of its own). */
143
+ /** The `toast()` imperative (no lifecycle of its own).
144
+ * @type {() => (message: string, opts?: ToastOpts) => Cleanup} */
88
145
  export const useToast = () => toast;
89
146
 
90
147
  // No-flash theme application must run before paint — do it in an inline head
package/tokens/d2.d.ts ADDED
@@ -0,0 +1,38 @@
1
+ /** @ponchia/ui — GENERATED from the token source by scripts/gen-d2.mjs.
2
+ * Do not edit by hand; run `npm run d2:build`. Drift-checked in CI. */
3
+
4
+ /** Resolved D2 theme colour slots (hex). See docs/d2.md for what each paints. */
5
+ export interface D2ThemeOverrides {
6
+ N1: string;
7
+ N2: string;
8
+ N3: string;
9
+ N4: string;
10
+ N5: string;
11
+ N6: string;
12
+ N7: string;
13
+ B1: string;
14
+ B2: string;
15
+ B3: string;
16
+ B4: string;
17
+ B5: string;
18
+ B6: string;
19
+ AA2: string;
20
+ AA4: string;
21
+ AA5: string;
22
+ AB4: string;
23
+ AB5: string;
24
+ }
25
+
26
+ /** Resolved D2 theme overrides for each bronto theme. */
27
+ export declare const d2: { light: D2ThemeOverrides; dark: D2ThemeOverrides };
28
+
29
+ /** A D2 source snippet (`vars: { d2-config: { theme-overrides, dark-theme-overrides } }`)
30
+ * to prepend to a diagram. */
31
+ export declare function brontoD2Vars(): string;
32
+
33
+ /** The slot → hex map for a theme (default `light`), for the render API's
34
+ * themeOverrides / darkThemeOverrides. */
35
+ export declare function brontoD2Overrides(theme?: 'light' | 'dark'): D2ThemeOverrides;
36
+
37
+ declare const _default: typeof brontoD2Vars;
38
+ export default _default;
package/tokens/d2.js ADDED
@@ -0,0 +1,71 @@
1
+ /** @ponchia/ui — GENERATED from the token source by scripts/gen-d2.mjs.
2
+ * Do not edit by hand; run `npm run d2:build`. Drift-checked in CI.
3
+ *
4
+ * On-brand D2 (d2lang.com) theme overrides, resolved to static hex per
5
+ * theme. D2 compiles to a frozen SVG and cannot read `var(--x)`. Apply via
6
+ * the D2 source vars block (brontoD2Vars) or the Go/WASM render API
7
+ * (brontoD2Overrides). See docs/d2.md. */
8
+
9
+ /** Resolved D2 theme colour slots for each bronto theme. */
10
+ export const d2 = {
11
+ light: {
12
+ N1: '#0a0a0a',
13
+ N2: '#353533',
14
+ N3: '#686863',
15
+ N4: '#a8a8a2',
16
+ N5: '#d8d8d4',
17
+ N6: '#ececea',
18
+ N7: '#f4f4f2',
19
+ B1: '#a8a8a2',
20
+ B2: '#d8d8d4',
21
+ B3: '#d8d8d4',
22
+ B4: '#ececea',
23
+ B5: '#fbfbfa',
24
+ B6: '#ffffff',
25
+ AA2: '#a8a8a2',
26
+ AA4: '#ffffff',
27
+ AA5: '#ececea',
28
+ AB4: '#ffffff',
29
+ AB5: '#ececea',
30
+ },
31
+ dark: {
32
+ N1: '#e6e6e6',
33
+ N2: '#c8c8c8',
34
+ N3: '#a0a0a0',
35
+ N4: '#555555',
36
+ N5: '#383838',
37
+ N6: '#242424',
38
+ N7: '#121212',
39
+ B1: '#555555',
40
+ B2: '#383838',
41
+ B3: '#383838',
42
+ B4: '#242424',
43
+ B5: '#181818',
44
+ B6: '#1c1c1c',
45
+ AA2: '#555555',
46
+ AA4: '#1c1c1c',
47
+ AA5: '#242424',
48
+ AB4: '#1c1c1c',
49
+ AB5: '#242424',
50
+ },
51
+ };
52
+
53
+ function block(map) {
54
+ return Object.entries(map)
55
+ .map(([slot, hex]) => ` ${slot}: "${hex}"`)
56
+ .join('\n');
57
+ }
58
+
59
+ /** A D2 source snippet to prepend to a diagram — sets the bronto palette for
60
+ * both light and dark via `vars.d2-config`. */
61
+ export function brontoD2Vars() {
62
+ return `vars: {\n d2-config: {\n theme-overrides: {\n${block(d2.light)}\n }\n dark-theme-overrides: {\n${block(d2.dark)}\n }\n }\n}\n`;
63
+ }
64
+
65
+ /** The slot → hex map for a theme (default `light`), for the Go/WASM render
66
+ * API's themeOverrides / darkThemeOverrides. */
67
+ export function brontoD2Overrides(theme = 'light') {
68
+ return d2[theme === 'dark' ? 'dark' : 'light'];
69
+ }
70
+
71
+ export default brontoD2Vars;
package/tokens/d2.json ADDED
@@ -0,0 +1,43 @@
1
+ {
2
+ "$comment": "@ponchia/ui D2 theme colour slots resolved to static hex per theme. Drop into a D2 diagram's `vars: { d2-config: { theme-overrides, dark-theme-overrides } }` (see brontoD2Vars in @ponchia/ui/d2), or pass to the Go/WASM render API. Monochrome base ramp + one rationed accent. Generated from the token source — do not edit by hand; run `npm run d2:build`. Drift-checked in CI.",
3
+ "light": {
4
+ "N1": "#0a0a0a",
5
+ "N2": "#353533",
6
+ "N3": "#686863",
7
+ "N4": "#a8a8a2",
8
+ "N5": "#d8d8d4",
9
+ "N6": "#ececea",
10
+ "N7": "#f4f4f2",
11
+ "B1": "#a8a8a2",
12
+ "B2": "#d8d8d4",
13
+ "B3": "#d8d8d4",
14
+ "B4": "#ececea",
15
+ "B5": "#fbfbfa",
16
+ "B6": "#ffffff",
17
+ "AA2": "#a8a8a2",
18
+ "AA4": "#ffffff",
19
+ "AA5": "#ececea",
20
+ "AB4": "#ffffff",
21
+ "AB5": "#ececea"
22
+ },
23
+ "dark": {
24
+ "N1": "#e6e6e6",
25
+ "N2": "#c8c8c8",
26
+ "N3": "#a0a0a0",
27
+ "N4": "#555555",
28
+ "N5": "#383838",
29
+ "N6": "#242424",
30
+ "N7": "#121212",
31
+ "B1": "#555555",
32
+ "B2": "#383838",
33
+ "B3": "#383838",
34
+ "B4": "#242424",
35
+ "B5": "#181818",
36
+ "B6": "#1c1c1c",
37
+ "AA2": "#555555",
38
+ "AA4": "#1c1c1c",
39
+ "AA5": "#242424",
40
+ "AB4": "#1c1c1c",
41
+ "AB5": "#242424"
42
+ }
43
+ }
package/tokens/index.d.ts CHANGED
@@ -3,9 +3,9 @@
3
3
 
4
4
  export type ThemeName = 'light' | 'dark';
5
5
 
6
- export type GlobalTokenName = '--radius-xl' | '--radius-lg' | '--radius-md' | '--radius-sm' | '--radius-pill' | '--space-2xs' | '--space-xs' | '--space-sm' | '--space-md' | '--space-lg' | '--space-xl' | '--space-2xl' | '--mono' | '--sans' | '--dot-font' | '--display' | '--text-2xs' | '--text-xs' | '--text-sm' | '--text-base' | '--text-lg' | '--text-xl' | '--tracking-wide' | '--tracking-wider' | '--ease-standard' | '--ease-spring' | '--ease-out' | '--duration-fast' | '--duration-base' | '--duration-slow' | '--dot-size' | '--dot-gap' | '--z-base' | '--z-raised' | '--z-sticky' | '--z-overlay' | '--z-popover' | '--z-toast' | '--accent-1' | '--accent-2' | '--accent-3' | '--accent-4' | '--accent-5' | '--accent-6' | '--surface-1' | '--surface-2' | '--surface-3' | '--surface-4' | '--surface-5' | '--surface-6' | '--bronto-color-bg' | '--bronto-color-surface' | '--bronto-color-surface-raised' | '--bronto-color-border' | '--bronto-color-border-strong' | '--bronto-color-text' | '--bronto-color-text-muted' | '--bronto-color-action' | '--bronto-color-on-action' | '--bronto-color-focus' | '--bronto-color-success' | '--bronto-color-warning' | '--bronto-color-danger' | '--bronto-color-info' | '--surface' | '--surface-raised' | '--surface-muted' | '--border' | '--border-strong';
7
- export type LightTokenName = '--bg' | '--bg-elevated' | '--bg-accent' | '--panel' | '--panel-strong' | '--panel-soft' | '--line' | '--line-strong' | '--text' | '--text-soft' | '--text-dim' | '--accent' | '--accent-ramp-end' | '--accent-strong' | '--accent-text' | '--accent-soft' | '--success' | '--success-soft' | '--warning' | '--warning-soft' | '--danger' | '--danger-soft' | '--info' | '--info-soft' | '--code-bg' | '--button-text' | '--field-dot' | '--field-dot-hot' | '--field-dot-accent' | '--focus-ring' | '--shadow' | '--shadow-raised';
8
- export type DarkTokenName = '--bg' | '--bg-elevated' | '--bg-accent' | '--panel' | '--panel-strong' | '--panel-soft' | '--line' | '--line-strong' | '--text' | '--text-soft' | '--text-dim' | '--accent' | '--accent-ramp-end' | '--accent-strong' | '--accent-text' | '--accent-soft' | '--success' | '--success-soft' | '--warning' | '--warning-soft' | '--danger' | '--danger-soft' | '--info' | '--info-soft' | '--code-bg' | '--button-text' | '--field-dot' | '--field-dot-hot' | '--field-dot-accent' | '--focus-ring' | '--shadow' | '--shadow-raised';
6
+ export type GlobalTokenName = '--radius-xl' | '--radius-lg' | '--radius-md' | '--radius-sm' | '--radius-pill' | '--space-2xs' | '--space-xs' | '--space-sm' | '--space-md' | '--space-lg' | '--space-xl' | '--space-2xl' | '--mono' | '--sans' | '--dot-font' | '--display' | '--display-weight' | '--display-weight-strong' | '--text-2xs' | '--text-xs' | '--text-sm' | '--text-base' | '--text-lg' | '--text-xl' | '--tracking-wide' | '--tracking-wider' | '--ease-standard' | '--ease-spring' | '--ease-out' | '--duration-fast' | '--duration-base' | '--duration-slow' | '--dot-size' | '--dot-gap' | '--z-base' | '--z-raised' | '--z-sticky' | '--z-overlay' | '--z-popover' | '--z-toast' | '--accent-1' | '--accent-2' | '--accent-3' | '--accent-4' | '--accent-5' | '--accent-6' | '--surface-1' | '--surface-2' | '--surface-3' | '--surface-4' | '--surface-5' | '--surface-6' | '--bronto-color-bg' | '--bronto-color-surface' | '--bronto-color-surface-raised' | '--bronto-color-border' | '--bronto-color-border-strong' | '--bronto-color-text' | '--bronto-color-text-muted' | '--bronto-color-action' | '--bronto-color-on-action' | '--bronto-color-focus' | '--bronto-color-success' | '--bronto-color-warning' | '--bronto-color-danger' | '--bronto-color-info' | '--surface' | '--surface-raised' | '--surface-muted' | '--border' | '--border-strong';
7
+ export type LightTokenName = '--bg' | '--bg-elevated' | '--bg-accent' | '--panel' | '--panel-strong' | '--panel-soft' | '--line' | '--line-strong' | '--text' | '--text-soft' | '--text-dim' | '--accent' | '--accent-ramp-end' | '--accent-strong' | '--accent-text' | '--on-accent' | '--accent-soft' | '--success' | '--success-soft' | '--warning' | '--warning-soft' | '--danger' | '--danger-soft' | '--info' | '--info-soft' | '--code-bg' | '--button-text' | '--field-dot' | '--field-dot-hot' | '--field-dot-accent' | '--focus-ring' | '--shadow' | '--shadow-raised';
8
+ export type DarkTokenName = '--bg' | '--bg-elevated' | '--bg-accent' | '--panel' | '--panel-strong' | '--panel-soft' | '--line' | '--line-strong' | '--text' | '--text-soft' | '--text-dim' | '--accent' | '--accent-ramp-end' | '--accent-strong' | '--accent-text' | '--on-accent' | '--accent-soft' | '--success' | '--success-soft' | '--warning' | '--warning-soft' | '--danger' | '--danger-soft' | '--info' | '--info-soft' | '--code-bg' | '--button-text' | '--field-dot' | '--field-dot-hot' | '--field-dot-accent' | '--focus-ring' | '--shadow' | '--shadow-raised';
9
9
 
10
10
  /** Exact mirror of the :root blocks in css/tokens.css (literal keys). */
11
11
  export declare const cssVars: {
@@ -14,8 +14,8 @@ export declare const cssVars: {
14
14
  dark: Record<DarkTokenName, string>;
15
15
  };
16
16
 
17
- export type ScaleKey = 'radius-xl' | 'radius-lg' | 'radius-md' | 'radius-sm' | 'radius-pill' | 'space-2xs' | 'space-xs' | 'space-sm' | 'space-md' | 'space-lg' | 'space-xl' | 'space-2xl' | 'mono' | 'sans' | 'dot-font' | 'display' | 'text-2xs' | 'text-xs' | 'text-sm' | 'text-base' | 'text-lg' | 'text-xl' | 'tracking-wide' | 'tracking-wider' | 'ease-standard' | 'ease-spring' | 'ease-out' | 'duration-fast' | 'duration-base' | 'duration-slow' | 'dot-size' | 'dot-gap' | 'z-base' | 'z-raised' | 'z-sticky' | 'z-overlay' | 'z-popover' | 'z-toast' | 'accent-1' | 'accent-2' | 'accent-3' | 'accent-4' | 'accent-5' | 'accent-6' | 'surface-1' | 'surface-2' | 'surface-3' | 'surface-4' | 'surface-5' | 'surface-6' | 'bronto-color-bg' | 'bronto-color-surface' | 'bronto-color-surface-raised' | 'bronto-color-border' | 'bronto-color-border-strong' | 'bronto-color-text' | 'bronto-color-text-muted' | 'bronto-color-action' | 'bronto-color-on-action' | 'bronto-color-focus' | 'bronto-color-success' | 'bronto-color-warning' | 'bronto-color-danger' | 'bronto-color-info' | 'surface' | 'surface-raised' | 'surface-muted' | 'border' | 'border-strong';
18
- export type ColorKey = 'bg' | 'bg-elevated' | 'bg-accent' | 'panel' | 'panel-strong' | 'panel-soft' | 'line' | 'line-strong' | 'text' | 'text-soft' | 'text-dim' | 'accent' | 'accent-ramp-end' | 'accent-strong' | 'accent-text' | 'accent-soft' | 'success' | 'success-soft' | 'warning' | 'warning-soft' | 'danger' | 'danger-soft' | 'info' | 'info-soft' | 'code-bg' | 'button-text' | 'field-dot' | 'field-dot-hot' | 'field-dot-accent' | 'focus-ring' | 'shadow' | 'shadow-raised';
17
+ export type ScaleKey = 'radius-xl' | 'radius-lg' | 'radius-md' | 'radius-sm' | 'radius-pill' | 'space-2xs' | 'space-xs' | 'space-sm' | 'space-md' | 'space-lg' | 'space-xl' | 'space-2xl' | 'mono' | 'sans' | 'dot-font' | 'display' | 'display-weight' | 'display-weight-strong' | 'text-2xs' | 'text-xs' | 'text-sm' | 'text-base' | 'text-lg' | 'text-xl' | 'tracking-wide' | 'tracking-wider' | 'ease-standard' | 'ease-spring' | 'ease-out' | 'duration-fast' | 'duration-base' | 'duration-slow' | 'dot-size' | 'dot-gap' | 'z-base' | 'z-raised' | 'z-sticky' | 'z-overlay' | 'z-popover' | 'z-toast' | 'accent-1' | 'accent-2' | 'accent-3' | 'accent-4' | 'accent-5' | 'accent-6' | 'surface-1' | 'surface-2' | 'surface-3' | 'surface-4' | 'surface-5' | 'surface-6' | 'bronto-color-bg' | 'bronto-color-surface' | 'bronto-color-surface-raised' | 'bronto-color-border' | 'bronto-color-border-strong' | 'bronto-color-text' | 'bronto-color-text-muted' | 'bronto-color-action' | 'bronto-color-on-action' | 'bronto-color-focus' | 'bronto-color-success' | 'bronto-color-warning' | 'bronto-color-danger' | 'bronto-color-info' | 'surface' | 'surface-raised' | 'surface-muted' | 'border' | 'border-strong';
18
+ export type ColorKey = 'bg' | 'bg-elevated' | 'bg-accent' | 'panel' | 'panel-strong' | 'panel-soft' | 'line' | 'line-strong' | 'text' | 'text-soft' | 'text-dim' | 'accent' | 'accent-ramp-end' | 'accent-strong' | 'accent-text' | 'on-accent' | 'accent-soft' | 'success' | 'success-soft' | 'warning' | 'warning-soft' | 'danger' | 'danger-soft' | 'info' | 'info-soft' | 'code-bg' | 'button-text' | 'field-dot' | 'field-dot-hot' | 'field-dot-accent' | 'focus-ring' | 'shadow' | 'shadow-raised';
19
19
 
20
20
  /** Ergonomic view derived from {@link cssVars} (`--` prefix stripped). */
21
21
  export declare const tokens: {
package/tokens/index.js CHANGED
@@ -9,7 +9,7 @@
9
9
  * :root palette blocks of css/tokens.css are GENERATED from it
10
10
  * (scripts/gen-tokens-css.mjs), so the dark palette is authored once here
11
11
  * rather than in three places (the two CSS dark blocks + a JS mirror).
12
- * scripts/check-tokens.mjs fails CI if css/tokens.css drifts from this model.
12
+ * Drift-checked by `npm run check:fresh` (scripts/check-fresh.mjs).
13
13
  *
14
14
  * `tokens` is an ergonomic view derived programmatically from `cssVars`
15
15
  * (no second hand-maintained copy, so nothing to keep in sync).
@@ -38,6 +38,8 @@ export const cssVars = {
38
38
  "'Inter', 'SF Pro Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif",
39
39
  '--dot-font': "'Doto', var(--mono)",
40
40
  '--display': 'var(--dot-font)',
41
+ '--display-weight': '700',
42
+ '--display-weight-strong': '800',
41
43
  '--text-2xs': '0.68rem',
42
44
  '--text-xs': '0.76rem',
43
45
  '--text-sm': '0.86rem',
@@ -109,6 +111,12 @@ export const cssVars = {
109
111
  '--accent-ramp-end': '#ffffff',
110
112
  '--accent-strong': 'color-mix(in srgb, var(--accent) 83%, #000)',
111
113
  '--accent-text': 'var(--accent-strong)',
114
+ // Read-only export: the resolved on-accent ink for FOREIGN renderers
115
+ // (D2/Mermaid/Vega labels on an accent fill — see tokens/*.json). In-DOM
116
+ // components paint their own on-accent ink from `--button-text`; overriding
117
+ // `--on-accent` in CSS does NOT change a button/chip. To re-ink in-DOM
118
+ // accent fills, set `--button-text`. (tokens review C7.)
119
+ '--on-accent': 'var(--button-text)',
112
120
  '--accent-soft': 'color-mix(in srgb, var(--accent) 10%, transparent)',
113
121
  '--success': '#2f7d4f',
114
122
  '--success-soft': 'rgb(47, 125, 79, 0.12)',
@@ -144,6 +152,12 @@ export const cssVars = {
144
152
  '--accent-ramp-end': '#000000',
145
153
  '--accent-strong': 'color-mix(in srgb, var(--accent) 84%, #fff)',
146
154
  '--accent-text': 'var(--accent-strong)',
155
+ // Read-only export: the resolved on-accent ink for FOREIGN renderers
156
+ // (D2/Mermaid/Vega labels on an accent fill — see tokens/*.json). In-DOM
157
+ // components paint their own on-accent ink from `--button-text`; overriding
158
+ // `--on-accent` in CSS does NOT change a button/chip. To re-ink in-DOM
159
+ // accent fills, set `--button-text`. (tokens review C7.)
160
+ '--on-accent': 'var(--button-text)',
147
161
  '--accent-soft': 'color-mix(in srgb, var(--accent) 14%, transparent)',
148
162
  '--success': '#4ec27e',
149
163
  '--success-soft': 'rgb(78, 194, 126, 0.14)',
package/tokens/index.json CHANGED
@@ -1,4 +1,5 @@
1
1
  {
2
+ "$comment": "GENERATED from tokens/index.js — do not edit by hand. Run `npm run tokens:build`; drift-checked by check:fresh. A build artifact for non-JS tooling (Style Dictionary, Figma, other languages).",
2
3
  "cssVars": {
3
4
  "global": {
4
5
  "--radius-xl": "4px",
@@ -17,6 +18,8 @@
17
18
  "--sans": "'Inter', 'SF Pro Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif",
18
19
  "--dot-font": "'Doto', var(--mono)",
19
20
  "--display": "var(--dot-font)",
21
+ "--display-weight": "700",
22
+ "--display-weight-strong": "800",
20
23
  "--text-2xs": "0.68rem",
21
24
  "--text-xs": "0.76rem",
22
25
  "--text-sm": "0.86rem",
@@ -87,6 +90,7 @@
87
90
  "--accent-ramp-end": "#ffffff",
88
91
  "--accent-strong": "color-mix(in srgb, var(--accent) 83%, #000)",
89
92
  "--accent-text": "var(--accent-strong)",
93
+ "--on-accent": "var(--button-text)",
90
94
  "--accent-soft": "color-mix(in srgb, var(--accent) 10%, transparent)",
91
95
  "--success": "#2f7d4f",
92
96
  "--success-soft": "rgb(47, 125, 79, 0.12)",
@@ -121,6 +125,7 @@
121
125
  "--accent-ramp-end": "#000000",
122
126
  "--accent-strong": "color-mix(in srgb, var(--accent) 84%, #fff)",
123
127
  "--accent-text": "var(--accent-strong)",
128
+ "--on-accent": "var(--button-text)",
124
129
  "--accent-soft": "color-mix(in srgb, var(--accent) 14%, transparent)",
125
130
  "--success": "#4ec27e",
126
131
  "--success-soft": "rgb(78, 194, 126, 0.14)",
@@ -158,6 +163,8 @@
158
163
  "sans": "'Inter', 'SF Pro Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif",
159
164
  "dot-font": "'Doto', var(--mono)",
160
165
  "display": "var(--dot-font)",
166
+ "display-weight": "700",
167
+ "display-weight-strong": "800",
161
168
  "text-2xs": "0.68rem",
162
169
  "text-xs": "0.76rem",
163
170
  "text-sm": "0.86rem",
@@ -229,6 +236,7 @@
229
236
  "accent-ramp-end": "#ffffff",
230
237
  "accent-strong": "color-mix(in srgb, var(--accent) 83%, #000)",
231
238
  "accent-text": "var(--accent-strong)",
239
+ "on-accent": "var(--button-text)",
232
240
  "accent-soft": "color-mix(in srgb, var(--accent) 10%, transparent)",
233
241
  "success": "#2f7d4f",
234
242
  "success-soft": "rgb(47, 125, 79, 0.12)",
@@ -263,6 +271,7 @@
263
271
  "accent-ramp-end": "#000000",
264
272
  "accent-strong": "color-mix(in srgb, var(--accent) 84%, #fff)",
265
273
  "accent-text": "var(--accent-strong)",
274
+ "on-accent": "var(--button-text)",
266
275
  "accent-soft": "color-mix(in srgb, var(--accent) 14%, transparent)",
267
276
  "success": "#4ec27e",
268
277
  "success-soft": "rgb(78, 194, 126, 0.14)",
@@ -0,0 +1,23 @@
1
+ /** @ponchia/ui — GENERATED from the token source by scripts/gen-mermaid.mjs.
2
+ * Do not edit by hand; run `npm run mermaid:build`. Drift-checked in CI. */
3
+
4
+ /** A resolved Mermaid `base` theme: `darkMode` plus colour-valued
5
+ * themeVariables (hex/rgba). For the per-key contract see docs/mermaid.md. */
6
+ export interface MermaidThemeVariables {
7
+ darkMode: boolean;
8
+ fontFamily: string;
9
+ [key: string]: string | boolean;
10
+ }
11
+
12
+ /** Resolved Mermaid `base` themeVariables for each bronto theme. */
13
+ export declare const mermaid: { light: MermaidThemeVariables; dark: MermaidThemeVariables };
14
+
15
+ /** Ready-to-spread Mermaid config (`{ theme: 'base', themeVariables }`) for a
16
+ * bronto theme. Unknown/omitted falls back to light. */
17
+ export declare function brontoMermaidTheme(theme?: 'light' | 'dark'): {
18
+ theme: 'base';
19
+ themeVariables: MermaidThemeVariables;
20
+ };
21
+
22
+ declare const _default: typeof brontoMermaidTheme;
23
+ export default _default;