@ponchia/ui 0.5.0 → 0.6.3

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 (196) hide show
  1. package/CHANGELOG.md +386 -4
  2. package/MIGRATIONS.json +14 -0
  3. package/README.md +29 -6
  4. package/annotations/index.d.ts +398 -276
  5. package/annotations/index.d.ts.map +1 -0
  6. package/annotations/index.js +350 -77
  7. package/behaviors/carousel.d.ts +28 -0
  8. package/behaviors/carousel.d.ts.map +1 -0
  9. package/behaviors/carousel.js +20 -16
  10. package/behaviors/combobox.d.ts +40 -0
  11. package/behaviors/combobox.d.ts.map +1 -0
  12. package/behaviors/combobox.js +111 -29
  13. package/behaviors/command.d.ts +41 -0
  14. package/behaviors/command.d.ts.map +1 -0
  15. package/behaviors/command.js +27 -15
  16. package/behaviors/connectors.d.ts +17 -0
  17. package/behaviors/connectors.d.ts.map +1 -0
  18. package/behaviors/connectors.js +7 -5
  19. package/behaviors/crosshair.d.ts +42 -0
  20. package/behaviors/crosshair.d.ts.map +1 -0
  21. package/behaviors/crosshair.js +23 -6
  22. package/behaviors/dialog.d.ts +20 -0
  23. package/behaviors/dialog.d.ts.map +1 -0
  24. package/behaviors/dialog.js +6 -2
  25. package/behaviors/disclosure.d.ts +10 -0
  26. package/behaviors/disclosure.d.ts.map +1 -0
  27. package/behaviors/disclosure.js +6 -2
  28. package/behaviors/dismissible.d.ts +10 -0
  29. package/behaviors/dismissible.d.ts.map +1 -0
  30. package/behaviors/dismissible.js +6 -2
  31. package/behaviors/forms.d.ts +27 -0
  32. package/behaviors/forms.d.ts.map +1 -0
  33. package/behaviors/forms.js +54 -13
  34. package/behaviors/glyph.d.ts +14 -0
  35. package/behaviors/glyph.d.ts.map +1 -0
  36. package/behaviors/glyph.js +28 -5
  37. package/behaviors/index.d.ts +31 -237
  38. package/behaviors/index.d.ts.map +1 -0
  39. package/behaviors/index.js +17 -0
  40. package/behaviors/inert.d.ts +20 -0
  41. package/behaviors/inert.d.ts.map +1 -0
  42. package/behaviors/inert.js +46 -0
  43. package/behaviors/internal.d.ts +25 -0
  44. package/behaviors/internal.d.ts.map +1 -0
  45. package/behaviors/internal.js +77 -1
  46. package/behaviors/legend.d.ts +35 -0
  47. package/behaviors/legend.d.ts.map +1 -0
  48. package/behaviors/legend.js +32 -2
  49. package/behaviors/menu.d.ts +16 -0
  50. package/behaviors/menu.d.ts.map +1 -0
  51. package/behaviors/menu.js +6 -2
  52. package/behaviors/modal.d.ts +41 -0
  53. package/behaviors/modal.d.ts.map +1 -0
  54. package/behaviors/modal.js +124 -0
  55. package/behaviors/popover.d.ts +28 -0
  56. package/behaviors/popover.d.ts.map +1 -0
  57. package/behaviors/popover.js +78 -7
  58. package/behaviors/spotlight.d.ts +17 -0
  59. package/behaviors/spotlight.d.ts.map +1 -0
  60. package/behaviors/spotlight.js +7 -5
  61. package/behaviors/table.d.ts +36 -0
  62. package/behaviors/table.d.ts.map +1 -0
  63. package/behaviors/table.js +84 -17
  64. package/behaviors/tabs.d.ts +20 -0
  65. package/behaviors/tabs.d.ts.map +1 -0
  66. package/behaviors/tabs.js +17 -14
  67. package/behaviors/theme.d.ts +54 -0
  68. package/behaviors/theme.d.ts.map +1 -0
  69. package/behaviors/theme.js +22 -3
  70. package/behaviors/toast.d.ts +49 -0
  71. package/behaviors/toast.d.ts.map +1 -0
  72. package/behaviors/toast.js +47 -3
  73. package/classes/classes.json +2527 -0
  74. package/classes/index.d.ts +134 -15
  75. package/classes/index.js +280 -80
  76. package/classes/vscode.css-custom-data.json +12 -0
  77. package/connectors/index.d.ts +201 -69
  78. package/connectors/index.d.ts.map +1 -0
  79. package/connectors/index.js +142 -25
  80. package/css/app.css +69 -13
  81. package/css/base.css +15 -10
  82. package/css/bullet.css +108 -0
  83. package/css/code.css +98 -0
  84. package/css/connectors.css +17 -0
  85. package/css/content.css +22 -3
  86. package/css/crosshair.css +7 -7
  87. package/css/dataviz.css +5 -1
  88. package/css/diff.css +153 -0
  89. package/css/disclosure.css +53 -7
  90. package/css/dots.css +94 -7
  91. package/css/feedback.css +97 -7
  92. package/css/forms.css +113 -4
  93. package/css/legend.css +16 -9
  94. package/css/marks.css +38 -8
  95. package/css/motion.css +98 -53
  96. package/css/navigation.css +7 -0
  97. package/css/overlay.css +90 -3
  98. package/css/primitives.css +158 -13
  99. package/css/report.css +73 -56
  100. package/css/sidenote.css +67 -0
  101. package/css/site.css +16 -2
  102. package/css/sources.css +43 -1
  103. package/css/spark.css +62 -0
  104. package/css/spotlight.css +1 -1
  105. package/css/table.css +9 -2
  106. package/css/term.css +110 -0
  107. package/css/textref.css +63 -0
  108. package/css/toc.css +91 -0
  109. package/css/tokens.css +49 -1
  110. package/css/tree.css +134 -0
  111. package/css/workbench.css +1 -1
  112. package/dist/bronto.css +1 -1
  113. package/dist/css/analytical.css +1 -1
  114. package/dist/css/app.css +1 -1
  115. package/dist/css/base.css +1 -1
  116. package/dist/css/bullet.css +1 -0
  117. package/dist/css/code.css +1 -0
  118. package/dist/css/connectors.css +1 -1
  119. package/dist/css/content.css +1 -1
  120. package/dist/css/crosshair.css +1 -1
  121. package/dist/css/diff.css +1 -0
  122. package/dist/css/disclosure.css +1 -1
  123. package/dist/css/dots.css +1 -1
  124. package/dist/css/feedback.css +1 -1
  125. package/dist/css/forms.css +1 -1
  126. package/dist/css/legend.css +1 -1
  127. package/dist/css/marks.css +1 -1
  128. package/dist/css/motion.css +1 -1
  129. package/dist/css/navigation.css +1 -1
  130. package/dist/css/overlay.css +1 -1
  131. package/dist/css/primitives.css +1 -1
  132. package/dist/css/report.css +1 -1
  133. package/dist/css/sidenote.css +1 -0
  134. package/dist/css/site.css +1 -1
  135. package/dist/css/sources.css +1 -1
  136. package/dist/css/spark.css +1 -0
  137. package/dist/css/spotlight.css +1 -1
  138. package/dist/css/table.css +1 -1
  139. package/dist/css/term.css +1 -0
  140. package/dist/css/textref.css +1 -0
  141. package/dist/css/toc.css +1 -0
  142. package/dist/css/tokens.css +1 -1
  143. package/dist/css/tree.css +1 -0
  144. package/dist/css/workbench.css +1 -1
  145. package/docs/adr/0003-theme-model.md +1 -1
  146. package/docs/annotations.md +133 -14
  147. package/docs/architecture.md +49 -6
  148. package/docs/bullet.md +78 -0
  149. package/docs/code.md +76 -0
  150. package/docs/contrast.md +116 -92
  151. package/docs/d2.md +196 -0
  152. package/docs/diff.md +146 -0
  153. package/docs/legends.md +23 -3
  154. package/docs/marks.md +9 -2
  155. package/docs/mermaid.md +169 -0
  156. package/docs/reference.md +201 -26
  157. package/docs/reporting.md +416 -57
  158. package/docs/sidenote.md +64 -0
  159. package/docs/sources.md +27 -0
  160. package/docs/spark.md +78 -0
  161. package/docs/stability.md +10 -2
  162. package/docs/term.md +81 -0
  163. package/docs/textref.md +78 -0
  164. package/docs/theming.md +44 -5
  165. package/docs/toc.md +83 -0
  166. package/docs/tree.md +74 -0
  167. package/docs/usage.md +354 -16
  168. package/docs/vega.md +244 -0
  169. package/docs/workbench.md +7 -1
  170. package/glyphs/glyphs.js +13 -5
  171. package/llms.txt +285 -14
  172. package/package.json +95 -17
  173. package/qwik/index.d.ts +44 -59
  174. package/qwik/index.d.ts.map +1 -0
  175. package/qwik/index.js +65 -3
  176. package/react/index.d.ts +41 -61
  177. package/react/index.d.ts.map +1 -0
  178. package/react/index.js +63 -3
  179. package/solid/index.d.ts +68 -61
  180. package/solid/index.d.ts.map +1 -0
  181. package/solid/index.js +66 -3
  182. package/tokens/d2.d.ts +38 -0
  183. package/tokens/d2.js +71 -0
  184. package/tokens/d2.json +43 -0
  185. package/tokens/index.d.ts +5 -5
  186. package/tokens/index.js +15 -1
  187. package/tokens/index.json +9 -0
  188. package/tokens/mermaid.d.ts +23 -0
  189. package/tokens/mermaid.js +181 -0
  190. package/tokens/mermaid.json +163 -0
  191. package/tokens/resolved.json +45 -1
  192. package/tokens/skins.js +3 -2
  193. package/tokens/tokens.dtcg.json +26 -0
  194. package/tokens/vega.d.ts +34 -0
  195. package/tokens/vega.js +155 -0
  196. package/tokens/vega.json +179 -0
package/solid/index.js CHANGED
@@ -16,12 +16,43 @@
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 {
22
52
  applyStoredTheme,
23
53
  initThemeToggle,
24
54
  dismissible,
55
+ initDisabledGuard,
25
56
  initDisclosure,
26
57
  initMenu,
27
58
  initFormValidation,
@@ -30,6 +61,7 @@ import {
30
61
  initTableSort,
31
62
  initTabs,
32
63
  initDialog,
64
+ initModal,
33
65
  initCarousel,
34
66
  initDotGlyph,
35
67
  initLegend,
@@ -53,12 +85,21 @@ function resolveRoot(root) {
53
85
  function resolveOpts(opts) {
54
86
  const value = resolveMaybe(opts);
55
87
  if (!value || typeof value !== 'object') return undefined;
88
+ // No `root` key → no scope requested; leave root out so the behavior
89
+ // delegates from `document`. A `root` key that resolves falsy means a scope
90
+ // WAS requested but the ref is not ready: emit `root: null` so the behavior
91
+ // no-ops instead of hijacking the whole document.
92
+ if (!('root' in value)) return { ...value };
56
93
  const root = resolveRoot(value.root);
57
- return root ? { ...value, root } : { ...value, root: undefined };
94
+ return { ...value, root: root || null };
58
95
  }
59
96
 
60
97
  /** 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. */
98
+ * returned cleanup on dispose). Options resolve on mount, after refs exist.
99
+ * @param {(opts?: DelegateOpts) => Cleanup | void} init
100
+ * @param {BrontoBindingOptsResolver} [opts]
101
+ * @returns {void}
102
+ */
62
103
  export function useBrontoBehavior(init, opts) {
63
104
  onMount(() => {
64
105
  const cleanup = init(resolveOpts(opts));
@@ -66,25 +107,47 @@ export function useBrontoBehavior(init, opts) {
66
107
  });
67
108
  }
68
109
 
110
+ /** @type {(opts?: BrontoBindingOptsResolver<ThemeStorageOpts & DelegateOpts>) => void} */
69
111
  export const useThemeToggle = (opts) => useBrontoBehavior(initThemeToggle, opts);
112
+ /** @type {(opts?: BrontoBindingOptsResolver) => void} */
70
113
  export const useDismissible = (opts) => useBrontoBehavior(dismissible, opts);
114
+ /** @type {(opts?: BrontoBindingOptsResolver) => void} */
115
+ export const useDisabledGuard = (opts) => useBrontoBehavior(initDisabledGuard, opts);
116
+ /** @type {(opts?: BrontoBindingOptsResolver) => void} */
71
117
  export const useDisclosure = (opts) => useBrontoBehavior(initDisclosure, opts);
118
+ /** @type {(opts?: BrontoBindingOptsResolver) => void} */
72
119
  export const useMenu = (opts) => useBrontoBehavior(initMenu, opts);
120
+ /** @type {(opts?: BrontoBindingOptsResolver) => void} */
73
121
  export const useFormValidation = (opts) => useBrontoBehavior(initFormValidation, opts);
122
+ /** @type {(opts?: BrontoBindingOptsResolver) => void} */
74
123
  export const useCombobox = (opts) => useBrontoBehavior(initCombobox, opts);
124
+ /** @type {(opts?: BrontoBindingOptsResolver) => void} */
75
125
  export const usePopover = (opts) => useBrontoBehavior(initPopover, opts);
126
+ /** @type {(opts?: BrontoBindingOptsResolver) => void} */
76
127
  export const useTableSort = (opts) => useBrontoBehavior(initTableSort, opts);
128
+ /** @type {(opts?: BrontoBindingOptsResolver) => void} */
77
129
  export const useTabs = (opts) => useBrontoBehavior(initTabs, opts);
130
+ /** @type {(opts?: BrontoBindingOptsResolver) => void} */
78
131
  export const useDialog = (opts) => useBrontoBehavior(initDialog, opts);
132
+ /** @type {(opts?: BrontoBindingOptsResolver) => void} */
133
+ export const useModal = (opts) => useBrontoBehavior(initModal, opts);
134
+ /** @type {(opts?: BrontoBindingOptsResolver) => void} */
79
135
  export const useCarousel = (opts) => useBrontoBehavior(initCarousel, opts);
136
+ /** @type {(opts?: BrontoBindingOptsResolver) => void} */
80
137
  export const useDotGlyph = (opts) => useBrontoBehavior(initDotGlyph, opts);
138
+ /** @type {(opts?: BrontoBindingOptsResolver) => void} */
81
139
  export const useLegend = (opts) => useBrontoBehavior(initLegend, opts);
140
+ /** @type {(opts?: BrontoBindingOptsResolver) => void} */
82
141
  export const useConnectors = (opts) => useBrontoBehavior(initConnectors, opts);
142
+ /** @type {(opts?: BrontoBindingOptsResolver) => void} */
83
143
  export const useSpotlight = (opts) => useBrontoBehavior(initSpotlight, opts);
144
+ /** @type {(opts?: BrontoBindingOptsResolver) => void} */
84
145
  export const useCrosshair = (opts) => useBrontoBehavior(initCrosshair, opts);
146
+ /** @type {(opts?: BrontoBindingOptsResolver) => void} */
85
147
  export const useCommand = (opts) => useBrontoBehavior(initCommand, opts);
86
148
 
87
- /** The `toast()` imperative (no lifecycle of its own). */
149
+ /** The `toast()` imperative (no lifecycle of its own).
150
+ * @type {() => (message: string, opts?: ToastOpts) => Cleanup} */
88
151
  export const useToast = () => toast;
89
152
 
90
153
  // 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;
@@ -0,0 +1,181 @@
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
+ * An on-brand Mermaid theme, resolved to static colours per theme. Mermaid
5
+ * is the consumer's renderer — this is config only, we never import it.
6
+ * Values are resolved hex/rgba on purpose: Mermaid's theming engine derives
7
+ * shades and cannot read `var(--x)`. See docs/mermaid.md. */
8
+
9
+ /** Resolved Mermaid `base` themeVariables for each bronto theme. */
10
+ export const mermaid = {
11
+ light: {
12
+ darkMode: false,
13
+ background: '#f4f4f2',
14
+ fontFamily:
15
+ "'Inter', 'SF Pro Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif",
16
+ primaryColor: '#ffffff',
17
+ primaryTextColor: '#0a0a0a',
18
+ primaryBorderColor: '#a8a8a2',
19
+ secondaryColor: '#ececea',
20
+ secondaryTextColor: '#0a0a0a',
21
+ secondaryBorderColor: '#d8d8d4',
22
+ tertiaryColor: '#fbfbfa',
23
+ tertiaryTextColor: '#0a0a0a',
24
+ tertiaryBorderColor: '#d8d8d4',
25
+ lineColor: '#a8a8a2',
26
+ textColor: '#0a0a0a',
27
+ mainBkg: '#ffffff',
28
+ nodeBorder: '#a8a8a2',
29
+ nodeTextColor: '#0a0a0a',
30
+ titleColor: '#0a0a0a',
31
+ edgeLabelBackground: '#f4f4f2',
32
+ clusterBkg: '#fbfbfa',
33
+ clusterBorder: '#d8d8d4',
34
+ labelColor: '#0a0a0a',
35
+ noteBkgColor: '#ececea',
36
+ noteTextColor: '#0a0a0a',
37
+ noteBorderColor: '#d71921',
38
+ errorBkgColor: 'rgba(192, 22, 34, 0.1)',
39
+ errorTextColor: '#c01622',
40
+ actorBkg: '#ffffff',
41
+ actorBorder: '#a8a8a2',
42
+ actorTextColor: '#0a0a0a',
43
+ actorLineColor: '#d8d8d4',
44
+ signalColor: '#0a0a0a',
45
+ signalTextColor: '#0a0a0a',
46
+ labelBoxBkgColor: '#ececea',
47
+ labelBoxBorderColor: '#d8d8d4',
48
+ labelTextColor: '#0a0a0a',
49
+ loopTextColor: '#0a0a0a',
50
+ activationBorderColor: '#a8a8a2',
51
+ activationBkgColor: '#ffffff',
52
+ sequenceNumberColor: '#ffffff',
53
+ pieTitleTextColor: '#0a0a0a',
54
+ pieSectionTextColor: '#0a0a0a',
55
+ pieLegendTextColor: '#0a0a0a',
56
+ pieStrokeColor: '#f4f4f2',
57
+ pieOuterStrokeColor: '#a8a8a2',
58
+ commitLabelColor: '#0a0a0a',
59
+ commitLabelBackground: '#fbfbfa',
60
+ tagLabelColor: '#0a0a0a',
61
+ tagLabelBackground: '#ececea',
62
+ tagLabelBorder: '#d8d8d4',
63
+ pie1: '#d71921',
64
+ pie2: '#e69f00',
65
+ pie3: '#56b4e9',
66
+ pie4: '#009e73',
67
+ pie5: '#f0e442',
68
+ pie6: '#0072b2',
69
+ pie7: '#cc79a7',
70
+ pie8: '#4d5358',
71
+ pie9: '#d71921',
72
+ pie10: '#e69f00',
73
+ pie11: '#56b4e9',
74
+ pie12: '#009e73',
75
+ git0: '#d71921',
76
+ git1: '#e69f00',
77
+ git2: '#56b4e9',
78
+ git3: '#009e73',
79
+ git4: '#f0e442',
80
+ git5: '#0072b2',
81
+ git6: '#cc79a7',
82
+ git7: '#4d5358',
83
+ fillType0: '#d71921',
84
+ fillType1: '#e69f00',
85
+ fillType2: '#56b4e9',
86
+ fillType3: '#009e73',
87
+ fillType4: '#f0e442',
88
+ fillType5: '#0072b2',
89
+ fillType6: '#cc79a7',
90
+ fillType7: '#4d5358',
91
+ },
92
+ dark: {
93
+ darkMode: true,
94
+ background: '#121212',
95
+ fontFamily:
96
+ "'Inter', 'SF Pro Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif",
97
+ primaryColor: '#1c1c1c',
98
+ primaryTextColor: '#e6e6e6',
99
+ primaryBorderColor: '#555555',
100
+ secondaryColor: '#242424',
101
+ secondaryTextColor: '#e6e6e6',
102
+ secondaryBorderColor: '#383838',
103
+ tertiaryColor: '#181818',
104
+ tertiaryTextColor: '#e6e6e6',
105
+ tertiaryBorderColor: '#383838',
106
+ lineColor: '#555555',
107
+ textColor: '#e6e6e6',
108
+ mainBkg: '#1c1c1c',
109
+ nodeBorder: '#555555',
110
+ nodeTextColor: '#e6e6e6',
111
+ titleColor: '#e6e6e6',
112
+ edgeLabelBackground: '#121212',
113
+ clusterBkg: '#181818',
114
+ clusterBorder: '#383838',
115
+ labelColor: '#e6e6e6',
116
+ noteBkgColor: '#242424',
117
+ noteTextColor: '#e6e6e6',
118
+ noteBorderColor: '#ff3b41',
119
+ errorBkgColor: 'rgba(255, 77, 84, 0.15)',
120
+ errorTextColor: '#ff4d54',
121
+ actorBkg: '#1c1c1c',
122
+ actorBorder: '#555555',
123
+ actorTextColor: '#e6e6e6',
124
+ actorLineColor: '#383838',
125
+ signalColor: '#e6e6e6',
126
+ signalTextColor: '#e6e6e6',
127
+ labelBoxBkgColor: '#242424',
128
+ labelBoxBorderColor: '#383838',
129
+ labelTextColor: '#e6e6e6',
130
+ loopTextColor: '#e6e6e6',
131
+ activationBorderColor: '#555555',
132
+ activationBkgColor: '#222222',
133
+ sequenceNumberColor: '#000000',
134
+ pieTitleTextColor: '#e6e6e6',
135
+ pieSectionTextColor: '#e6e6e6',
136
+ pieLegendTextColor: '#e6e6e6',
137
+ pieStrokeColor: '#121212',
138
+ pieOuterStrokeColor: '#555555',
139
+ commitLabelColor: '#e6e6e6',
140
+ commitLabelBackground: '#181818',
141
+ tagLabelColor: '#e6e6e6',
142
+ tagLabelBackground: '#242424',
143
+ tagLabelBorder: '#383838',
144
+ pie1: '#ff3b41',
145
+ pie2: '#e69f00',
146
+ pie3: '#56b4e9',
147
+ pie4: '#009e73',
148
+ pie5: '#f0e442',
149
+ pie6: '#0072b2',
150
+ pie7: '#cc79a7',
151
+ pie8: '#4d5358',
152
+ pie9: '#ff3b41',
153
+ pie10: '#e69f00',
154
+ pie11: '#56b4e9',
155
+ pie12: '#009e73',
156
+ git0: '#ff3b41',
157
+ git1: '#e69f00',
158
+ git2: '#56b4e9',
159
+ git3: '#009e73',
160
+ git4: '#f0e442',
161
+ git5: '#0072b2',
162
+ git6: '#cc79a7',
163
+ git7: '#4d5358',
164
+ fillType0: '#ff3b41',
165
+ fillType1: '#e69f00',
166
+ fillType2: '#56b4e9',
167
+ fillType3: '#009e73',
168
+ fillType4: '#f0e442',
169
+ fillType5: '#0072b2',
170
+ fillType6: '#cc79a7',
171
+ fillType7: '#4d5358',
172
+ },
173
+ };
174
+
175
+ /** Ready-to-spread Mermaid config for a bronto theme (default `light`):
176
+ * `mermaid.initialize(brontoMermaidTheme(document.documentElement.dataset.theme))`. */
177
+ export function brontoMermaidTheme(theme = 'light') {
178
+ return { theme: 'base', themeVariables: mermaid[theme === 'dark' ? 'dark' : 'light'] };
179
+ }
180
+
181
+ export default brontoMermaidTheme;