@visualli/core 0.1.7 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/README.md +37 -105
  2. package/dist/chunk-25AJTPMS.js +68 -0
  3. package/dist/chunk-25AJTPMS.js.map +1 -0
  4. package/dist/chunk-64PUANNH.js +151 -0
  5. package/dist/chunk-64PUANNH.js.map +1 -0
  6. package/dist/chunk-ITDZ72JE.js +96 -0
  7. package/dist/chunk-ITDZ72JE.js.map +1 -0
  8. package/dist/{chunk-PDP5CVUL.js → chunk-LOQLNYB3.js} +2 -2
  9. package/dist/chunk-N7HCYULH.js +12 -0
  10. package/dist/chunk-N7HCYULH.js.map +1 -0
  11. package/dist/{chunk-I75TMOE4.js → chunk-P6PKWVYF.js} +2 -2
  12. package/dist/chunk-RFMUATWB.js +753 -0
  13. package/dist/chunk-RFMUATWB.js.map +1 -0
  14. package/dist/chunk-UAMEJG2C.js +267 -0
  15. package/dist/chunk-UAMEJG2C.js.map +1 -0
  16. package/dist/{chunk-LJYSKSCE.js → chunk-W2CAOOJJ.js} +6 -6
  17. package/dist/chunk-W2CAOOJJ.js.map +1 -0
  18. package/dist/{chunk-6NXADJK2.js → chunk-WO4JAAKP.js} +84 -117
  19. package/dist/chunk-WO4JAAKP.js.map +1 -0
  20. package/dist/config/index.cjs +250 -349
  21. package/dist/config/index.cjs.map +1 -1
  22. package/dist/config/index.d.cts +107 -66
  23. package/dist/config/index.d.ts +107 -66
  24. package/dist/config/index.js +52 -34
  25. package/dist/constants/index.cjs +14 -333
  26. package/dist/constants/index.cjs.map +1 -1
  27. package/dist/constants/index.d.cts +5 -243
  28. package/dist/constants/index.d.ts +5 -243
  29. package/dist/constants/index.js +5 -75
  30. package/dist/designSystem-D49xVfr8.d.cts +150 -0
  31. package/dist/designSystem-D49xVfr8.d.ts +150 -0
  32. package/dist/document-BFBwn93X.d.ts +26 -0
  33. package/dist/document-MEJEfxl3.d.cts +26 -0
  34. package/dist/ideaSize-BTJu6thN.d.cts +11 -0
  35. package/dist/ideaSize-RKbms8K6.d.ts +11 -0
  36. package/dist/index-CcF0Jvmb.d.ts +99 -0
  37. package/dist/index-Dt--T2l8.d.cts +99 -0
  38. package/dist/index.cjs +1636 -961
  39. package/dist/index.cjs.map +1 -1
  40. package/dist/index.d.cts +350 -27
  41. package/dist/index.d.ts +350 -27
  42. package/dist/index.js +434 -179
  43. package/dist/index.js.map +1 -1
  44. package/dist/{document-B3hnNr-F.d.cts → layer-B2A3Ki48.d.cts} +2 -16
  45. package/dist/{document-B3hnNr-F.d.ts → layer-B2A3Ki48.d.ts} +2 -16
  46. package/dist/layout/index.d.cts +2 -1
  47. package/dist/layout/index.d.ts +2 -1
  48. package/dist/mindmap-BO3YD5qu.d.cts +182 -0
  49. package/dist/mindmap-D0Of0jaZ.d.ts +182 -0
  50. package/dist/parser/index.cjs +745 -179
  51. package/dist/parser/index.cjs.map +1 -1
  52. package/dist/parser/index.d.cts +23 -8
  53. package/dist/parser/index.d.ts +23 -8
  54. package/dist/parser/index.js +7 -2
  55. package/dist/performance/index.cjs +13 -0
  56. package/dist/performance/index.cjs.map +1 -1
  57. package/dist/performance/index.js +2 -2
  58. package/dist/theme/index.cjs +884 -0
  59. package/dist/theme/index.cjs.map +1 -0
  60. package/dist/theme/index.d.cts +2 -0
  61. package/dist/theme/index.d.ts +2 -0
  62. package/dist/theme/index.js +53 -0
  63. package/dist/types/index.d.cts +4 -2
  64. package/dist/types/index.d.ts +4 -2
  65. package/dist/viewport/index.cjs +17 -6
  66. package/dist/viewport/index.cjs.map +1 -1
  67. package/dist/viewport/index.d.cts +6 -4
  68. package/dist/viewport/index.d.ts +6 -4
  69. package/dist/viewport/index.js +2 -2
  70. package/licenses/visualli-design-system/LICENSE +9 -0
  71. package/licenses/visualli-design-system/NOTICE.md +6 -0
  72. package/package.json +12 -4
  73. package/src/config/README.md +2 -4
  74. package/src/config/USAGE_EXAMPLES.md +0 -4
  75. package/src/config/index.ts +3 -4
  76. package/src/constants/index.ts +1 -1
  77. package/src/constants/layout.ts +11 -0
  78. package/src/constants/performanceConstants.ts +8 -27
  79. package/src/generated/README.md +12 -0
  80. package/src/generated/designSystem.ts +758 -0
  81. package/src/generated/geometry/blob.ts +99 -0
  82. package/src/generated/geometry/blobShapes.ts +4 -0
  83. package/src/generated/geometry/color.ts +37 -0
  84. package/src/generated/geometry/container.ts +84 -0
  85. package/src/generated/geometry/detail.ts +22 -0
  86. package/src/generated/geometry/idea.ts +56 -0
  87. package/src/generated/geometry/interaction.ts +122 -0
  88. package/src/generated/geometry/motion.ts +140 -0
  89. package/src/index.ts +18 -1
  90. package/src/parser/configUtils.ts +12 -19
  91. package/src/parser/visualliConverter.ts +71 -112
  92. package/src/parser/visualliParser.ts +16 -1
  93. package/src/rendering/culling.ts +16 -12
  94. package/src/rendering/ideaSize.ts +21 -0
  95. package/src/rendering/nodeGeometry.ts +97 -0
  96. package/src/theme/index.ts +136 -0
  97. package/src/types/document.ts +9 -0
  98. package/src/types/layer.ts +1 -1
  99. package/src/types/mindmap.ts +13 -0
  100. package/src/utils/navigation.ts +33 -63
  101. package/src/viewport/viewportUtils.ts +6 -4
  102. package/dist/animations/index.cjs +0 -146
  103. package/dist/animations/index.cjs.map +0 -1
  104. package/dist/animations/index.d.cts +0 -81
  105. package/dist/animations/index.d.ts +0 -81
  106. package/dist/animations/index.js +0 -35
  107. package/dist/chunk-6NXADJK2.js.map +0 -1
  108. package/dist/chunk-F36SMC3K.js +0 -106
  109. package/dist/chunk-F36SMC3K.js.map +0 -1
  110. package/dist/chunk-G5H3P4YZ.js +0 -273
  111. package/dist/chunk-G5H3P4YZ.js.map +0 -1
  112. package/dist/chunk-LDJRGT2Q.js +0 -163
  113. package/dist/chunk-LDJRGT2Q.js.map +0 -1
  114. package/dist/chunk-LJYSKSCE.js.map +0 -1
  115. package/dist/chunk-LNTJTDB2.js +0 -349
  116. package/dist/chunk-LNTJTDB2.js.map +0 -1
  117. package/dist/mindmap-DWS0WZT_.d.cts +0 -118
  118. package/dist/mindmap-DWS0WZT_.d.ts +0 -118
  119. package/src/animations/constants.ts +0 -72
  120. package/src/animations/easing.ts +0 -70
  121. package/src/animations/index.ts +0 -2
  122. package/src/config/blobShapes.ts +0 -146
  123. package/src/config/textScaling.ts +0 -54
  124. package/src/constants/design.ts +0 -281
  125. /package/dist/{chunk-PDP5CVUL.js.map → chunk-LOQLNYB3.js.map} +0 -0
  126. /package/dist/{chunk-I75TMOE4.js.map → chunk-P6PKWVYF.js.map} +0 -0
  127. /package/dist/{animations → theme}/index.js.map +0 -0
@@ -0,0 +1,758 @@
1
+ // GENERATED by scripts/gen-design-system.mjs from design-system/ (tokens/tokens.json, tokens/tokens.css). Do not edit.
2
+ // Change the design system instead; the next `npm run build` regenerates this file.
3
+
4
+ /** Version of the design system these modules were generated from. */
5
+ export const DESIGN_SYSTEM_VERSION = "0.2.1" as const;
6
+
7
+ export const THEME_NAMES = [
8
+ "light",
9
+ "dark",
10
+ "focus-light",
11
+ "focus-dark",
12
+ "colorsafe-light",
13
+ "colorsafe-dark",
14
+ "contrast-light",
15
+ "contrast-dark"
16
+ ] as const;
17
+ export type ThemeName = (typeof THEME_NAMES)[number];
18
+
19
+ /** Every token for every theme (each theme already merged over "light"). Keys match the CSS custom properties. */
20
+ export const TOKENS: Readonly<Record<ThemeName, Readonly<Record<string, string>>>> = {
21
+ "light": {
22
+ "font-display": "\"Atkinson Hyperlegible Next\", system-ui, sans-serif",
23
+ "font-ui": "\"Atkinson Hyperlegible Next\", system-ui, -apple-system, \"Segoe UI\", sans-serif",
24
+ "font-hand": "Kalam, \"Atkinson Hyperlegible Next\", cursive",
25
+ "font-note": "Caveat, Kalam, cursive",
26
+ "font-mono": "\"Atkinson Hyperlegible Mono\", ui-monospace, \"SF Mono\", Menlo, monospace",
27
+ "canvas": "#f6f3ee",
28
+ "surface": "#ffffff",
29
+ "surface-sunken": "#f0ece5",
30
+ "surface-overlay": "#ffffff",
31
+ "line": "#e4dfd6",
32
+ "line-strong": "#7a7f94",
33
+ "ink": "#182140",
34
+ "ink-muted": "#4f5671",
35
+ "ink-subtle": "#5f647c",
36
+ "action": "#182140",
37
+ "on-action": "#ffffff",
38
+ "focus": "#325e8c",
39
+ "link": "#2f5a87",
40
+ "selection": "rgba(18, 199, 211, 0.28)",
41
+ "node-ink": "#182140",
42
+ "edge": "#2a3048",
43
+ "edge-label": "#4f5671",
44
+ "topic-teal": "#87f2f8",
45
+ "topic-teal-ring": "#00cdd5",
46
+ "topic-harbor": "#bcdbff",
47
+ "topic-harbor-ring": "#76b2f5",
48
+ "topic-iris": "#e0c8fe",
49
+ "topic-iris-ring": "#bd96ea",
50
+ "topic-berry": "#ffbdc4",
51
+ "topic-berry-ring": "#f47e8f",
52
+ "topic-coral": "#ffc7b2",
53
+ "topic-coral-ring": "#f38e65",
54
+ "topic-amber": "#ffcf9d",
55
+ "topic-amber-ring": "#eb9c38",
56
+ "topic-sun": "#ffea94",
57
+ "topic-sun-ring": "#dfbd04",
58
+ "topic-stone": "#e0dacf",
59
+ "topic-stone-ring": "#bab09f",
60
+ "space-1": "4px",
61
+ "space-2": "8px",
62
+ "space-3": "12px",
63
+ "space-4": "16px",
64
+ "space-7": "48px",
65
+ "radius-sm": "10px",
66
+ "radius-md": "16px",
67
+ "radius-lg": "24px",
68
+ "radius-pill": "999px",
69
+ "shadow-float": "0 1px 2px rgba(24, 33, 64, 0.06), 0 8px 24px rgba(24, 33, 64, 0.08)",
70
+ "shadow-pop": "0 2px 4px rgba(24, 33, 64, 0.08), 0 16px 40px rgba(24, 33, 64, 0.14)",
71
+ "node-width": "200px",
72
+ "node-height": "148px",
73
+ "node-stroke": "3px",
74
+ "edge-width": "2.5px",
75
+ "edge-gap": "15px",
76
+ "edge-arc-max": "45px",
77
+ "immersion-alpha": "0.15",
78
+ "zoom-min": "0.3",
79
+ "zoom-max": "5",
80
+ "duration-instant": "100ms",
81
+ "duration-quick": "160ms",
82
+ "duration-base": "240ms",
83
+ "duration-zoom": "500ms",
84
+ "duration-reveal": "420ms",
85
+ "stagger-reveal": "70ms",
86
+ "ease-zoom": "cubic-bezier(0.2, 0.8, 0.2, 1)",
87
+ "ease-standard": "cubic-bezier(0.4, 0, 0.2, 1)",
88
+ "ease-bloom": "cubic-bezier(0.34, 1.4, 0.64, 1)",
89
+ "z-chrome": "10",
90
+ "z-card": "20",
91
+ "z-menu": "40"
92
+ },
93
+ "dark": {
94
+ "font-display": "\"Atkinson Hyperlegible Next\", system-ui, sans-serif",
95
+ "font-ui": "\"Atkinson Hyperlegible Next\", system-ui, -apple-system, \"Segoe UI\", sans-serif",
96
+ "font-hand": "Kalam, \"Atkinson Hyperlegible Next\", cursive",
97
+ "font-note": "Caveat, Kalam, cursive",
98
+ "font-mono": "\"Atkinson Hyperlegible Mono\", ui-monospace, \"SF Mono\", Menlo, monospace",
99
+ "canvas": "#0f1220",
100
+ "surface": "#171b2b",
101
+ "surface-sunken": "#0f1220",
102
+ "surface-overlay": "#212639",
103
+ "line": "#2b3148",
104
+ "line-strong": "#6c7392",
105
+ "ink": "#eef0f7",
106
+ "ink-muted": "#b3b8cc",
107
+ "ink-subtle": "#8f95ae",
108
+ "action": "#f6f3ee",
109
+ "on-action": "#182140",
110
+ "focus": "#12c7d3",
111
+ "link": "#5fd8e1",
112
+ "selection": "rgba(18, 199, 211, 0.32)",
113
+ "node-ink": "#182140",
114
+ "edge": "#c9cddc",
115
+ "edge-label": "#b3b8cc",
116
+ "topic-teal": "#87f2f8",
117
+ "topic-teal-ring": "#0fc5cd",
118
+ "topic-harbor": "#bcdbff",
119
+ "topic-harbor-ring": "#73aceb",
120
+ "topic-iris": "#e0c8fe",
121
+ "topic-iris-ring": "#b691e1",
122
+ "topic-berry": "#ffbdc4",
123
+ "topic-berry-ring": "#eb798a",
124
+ "topic-coral": "#ffc7b2",
125
+ "topic-coral-ring": "#ea8962",
126
+ "topic-amber": "#ffcf9d",
127
+ "topic-amber-ring": "#e29737",
128
+ "topic-sun": "#ffea94",
129
+ "topic-sun-ring": "#d8b70a",
130
+ "topic-stone": "#e0dacf",
131
+ "topic-stone-ring": "#b4a999",
132
+ "space-1": "4px",
133
+ "space-2": "8px",
134
+ "space-3": "12px",
135
+ "space-4": "16px",
136
+ "space-7": "48px",
137
+ "radius-sm": "10px",
138
+ "radius-md": "16px",
139
+ "radius-lg": "24px",
140
+ "radius-pill": "999px",
141
+ "shadow-float": "0 1px 2px rgba(0, 0, 0, 0.40), 0 8px 24px rgba(0, 0, 0, 0.35)",
142
+ "shadow-pop": "0 2px 4px rgba(0, 0, 0, 0.50), 0 16px 40px rgba(0, 0, 0, 0.50)",
143
+ "node-width": "200px",
144
+ "node-height": "148px",
145
+ "node-stroke": "3px",
146
+ "edge-width": "2.5px",
147
+ "edge-gap": "15px",
148
+ "edge-arc-max": "45px",
149
+ "immersion-alpha": "0.15",
150
+ "zoom-min": "0.3",
151
+ "zoom-max": "5",
152
+ "duration-instant": "100ms",
153
+ "duration-quick": "160ms",
154
+ "duration-base": "240ms",
155
+ "duration-zoom": "500ms",
156
+ "duration-reveal": "420ms",
157
+ "stagger-reveal": "70ms",
158
+ "ease-zoom": "cubic-bezier(0.2, 0.8, 0.2, 1)",
159
+ "ease-standard": "cubic-bezier(0.4, 0, 0.2, 1)",
160
+ "ease-bloom": "cubic-bezier(0.34, 1.4, 0.64, 1)",
161
+ "z-chrome": "10",
162
+ "z-card": "20",
163
+ "z-menu": "40"
164
+ },
165
+ "focus-light": {
166
+ "font-display": "\"Atkinson Hyperlegible Next\", system-ui, sans-serif",
167
+ "font-ui": "\"Atkinson Hyperlegible Next\", system-ui, -apple-system, \"Segoe UI\", sans-serif",
168
+ "font-hand": "Kalam, \"Atkinson Hyperlegible Next\", cursive",
169
+ "font-note": "Caveat, Kalam, cursive",
170
+ "font-mono": "\"Atkinson Hyperlegible Mono\", ui-monospace, \"SF Mono\", Menlo, monospace",
171
+ "canvas": "#f4f2ee",
172
+ "surface": "#ffffff",
173
+ "surface-sunken": "#f0ece5",
174
+ "surface-overlay": "#ffffff",
175
+ "line": "#e4dfd6",
176
+ "line-strong": "#7a7f94",
177
+ "ink": "#182140",
178
+ "ink-muted": "#4f5671",
179
+ "ink-subtle": "#5f647c",
180
+ "action": "#182140",
181
+ "on-action": "#ffffff",
182
+ "focus": "#325e8c",
183
+ "link": "#2f5a87",
184
+ "selection": "rgba(18, 199, 211, 0.28)",
185
+ "node-ink": "#182140",
186
+ "edge": "#5a6079",
187
+ "edge-label": "#5a6079",
188
+ "topic-teal": "#bce8ea",
189
+ "topic-teal-ring": "#67c6cb",
190
+ "topic-harbor": "#c9d9ec",
191
+ "topic-harbor-ring": "#8bb2de",
192
+ "topic-iris": "#d9cfe8",
193
+ "topic-iris-ring": "#b79ed4",
194
+ "topic-berry": "#edc6c9",
195
+ "topic-berry-ring": "#da9099",
196
+ "topic-coral": "#eecec1",
197
+ "topic-coral-ring": "#db9b82",
198
+ "topic-amber": "#eed4ba",
199
+ "topic-amber-ring": "#d6a570",
200
+ "topic-sun": "#f4eac1",
201
+ "topic-sun-ring": "#d2bf73",
202
+ "topic-stone": "#dddad5",
203
+ "topic-stone-ring": "#bab09f",
204
+ "space-1": "4px",
205
+ "space-2": "8px",
206
+ "space-3": "12px",
207
+ "space-4": "16px",
208
+ "space-7": "48px",
209
+ "radius-sm": "10px",
210
+ "radius-md": "16px",
211
+ "radius-lg": "24px",
212
+ "radius-pill": "999px",
213
+ "shadow-float": "0 1px 2px rgba(24, 33, 64, 0.06), 0 8px 24px rgba(24, 33, 64, 0.08)",
214
+ "shadow-pop": "0 2px 4px rgba(24, 33, 64, 0.08), 0 16px 40px rgba(24, 33, 64, 0.14)",
215
+ "node-width": "200px",
216
+ "node-height": "148px",
217
+ "node-stroke": "3px",
218
+ "edge-width": "2.5px",
219
+ "edge-gap": "15px",
220
+ "edge-arc-max": "45px",
221
+ "immersion-alpha": "0.15",
222
+ "zoom-min": "0.3",
223
+ "zoom-max": "5",
224
+ "duration-instant": "100ms",
225
+ "duration-quick": "160ms",
226
+ "duration-base": "240ms",
227
+ "duration-zoom": "500ms",
228
+ "duration-reveal": "420ms",
229
+ "stagger-reveal": "70ms",
230
+ "ease-zoom": "cubic-bezier(0.2, 0.8, 0.2, 1)",
231
+ "ease-standard": "cubic-bezier(0.4, 0, 0.2, 1)",
232
+ "ease-bloom": "cubic-bezier(0.34, 1.4, 0.64, 1)",
233
+ "z-chrome": "10",
234
+ "z-card": "20",
235
+ "z-menu": "40"
236
+ },
237
+ "focus-dark": {
238
+ "font-display": "\"Atkinson Hyperlegible Next\", system-ui, sans-serif",
239
+ "font-ui": "\"Atkinson Hyperlegible Next\", system-ui, -apple-system, \"Segoe UI\", sans-serif",
240
+ "font-hand": "Kalam, \"Atkinson Hyperlegible Next\", cursive",
241
+ "font-note": "Caveat, Kalam, cursive",
242
+ "font-mono": "\"Atkinson Hyperlegible Mono\", ui-monospace, \"SF Mono\", Menlo, monospace",
243
+ "canvas": "#12141c",
244
+ "surface": "#171b2b",
245
+ "surface-sunken": "#0f1220",
246
+ "surface-overlay": "#212639",
247
+ "line": "#2b3148",
248
+ "line-strong": "#6c7392",
249
+ "ink": "#eef0f7",
250
+ "ink-muted": "#b3b8cc",
251
+ "ink-subtle": "#8f95ae",
252
+ "action": "#f6f3ee",
253
+ "on-action": "#182140",
254
+ "focus": "#12c7d3",
255
+ "link": "#5fd8e1",
256
+ "selection": "rgba(18, 199, 211, 0.32)",
257
+ "node-ink": "#182140",
258
+ "edge": "#a9aec0",
259
+ "edge-label": "#b3b8cc",
260
+ "topic-teal": "#bce8ea",
261
+ "topic-teal-ring": "#71bdc1",
262
+ "topic-harbor": "#c9d9ec",
263
+ "topic-harbor-ring": "#8cabce",
264
+ "topic-iris": "#d9cfe8",
265
+ "topic-iris-ring": "#ae9bc6",
266
+ "topic-berry": "#edc6c9",
267
+ "topic-berry-ring": "#cc8e95",
268
+ "topic-coral": "#eecec1",
269
+ "topic-coral-ring": "#cd9884",
270
+ "topic-amber": "#eed4ba",
271
+ "topic-amber-ring": "#c9a176",
272
+ "topic-sun": "#f4eac1",
273
+ "topic-sun-ring": "#c9b97a",
274
+ "topic-stone": "#dddad5",
275
+ "topic-stone-ring": "#b4a999",
276
+ "space-1": "4px",
277
+ "space-2": "8px",
278
+ "space-3": "12px",
279
+ "space-4": "16px",
280
+ "space-7": "48px",
281
+ "radius-sm": "10px",
282
+ "radius-md": "16px",
283
+ "radius-lg": "24px",
284
+ "radius-pill": "999px",
285
+ "shadow-float": "0 1px 2px rgba(24, 33, 64, 0.06), 0 8px 24px rgba(24, 33, 64, 0.08)",
286
+ "shadow-pop": "0 2px 4px rgba(24, 33, 64, 0.08), 0 16px 40px rgba(24, 33, 64, 0.14)",
287
+ "node-width": "200px",
288
+ "node-height": "148px",
289
+ "node-stroke": "3px",
290
+ "edge-width": "2.5px",
291
+ "edge-gap": "15px",
292
+ "edge-arc-max": "45px",
293
+ "immersion-alpha": "0.15",
294
+ "zoom-min": "0.3",
295
+ "zoom-max": "5",
296
+ "duration-instant": "100ms",
297
+ "duration-quick": "160ms",
298
+ "duration-base": "240ms",
299
+ "duration-zoom": "500ms",
300
+ "duration-reveal": "420ms",
301
+ "stagger-reveal": "70ms",
302
+ "ease-zoom": "cubic-bezier(0.2, 0.8, 0.2, 1)",
303
+ "ease-standard": "cubic-bezier(0.4, 0, 0.2, 1)",
304
+ "ease-bloom": "cubic-bezier(0.34, 1.4, 0.64, 1)",
305
+ "z-chrome": "10",
306
+ "z-card": "20",
307
+ "z-menu": "40"
308
+ },
309
+ "colorsafe-light": {
310
+ "font-display": "\"Atkinson Hyperlegible Next\", system-ui, sans-serif",
311
+ "font-ui": "\"Atkinson Hyperlegible Next\", system-ui, -apple-system, \"Segoe UI\", sans-serif",
312
+ "font-hand": "Kalam, \"Atkinson Hyperlegible Next\", cursive",
313
+ "font-note": "Caveat, Kalam, cursive",
314
+ "font-mono": "\"Atkinson Hyperlegible Mono\", ui-monospace, \"SF Mono\", Menlo, monospace",
315
+ "canvas": "#f6f3ee",
316
+ "surface": "#ffffff",
317
+ "surface-sunken": "#f0ece5",
318
+ "surface-overlay": "#ffffff",
319
+ "line": "#e4dfd6",
320
+ "line-strong": "#7a7f94",
321
+ "ink": "#182140",
322
+ "ink-muted": "#4f5671",
323
+ "ink-subtle": "#5f647c",
324
+ "action": "#182140",
325
+ "on-action": "#ffffff",
326
+ "focus": "#325e8c",
327
+ "link": "#2f5a87",
328
+ "selection": "rgba(18, 199, 211, 0.28)",
329
+ "node-ink": "#182140",
330
+ "edge": "#2a3048",
331
+ "edge-label": "#4f5671",
332
+ "topic-teal": "#b0ecbc",
333
+ "topic-teal-ring": "#6cc982",
334
+ "topic-harbor": "#abdbfe",
335
+ "topic-harbor-ring": "#60b4ec",
336
+ "topic-iris": "#f6bde2",
337
+ "topic-iris-ring": "#dc87c0",
338
+ "topic-berry": "#feb79e",
339
+ "topic-berry-ring": "#ec7f58",
340
+ "topic-coral": "#fece96",
341
+ "topic-coral-ring": "#e49d41",
342
+ "topic-amber": "#b2e8fa",
343
+ "topic-amber-ring": "#5cc4e2",
344
+ "topic-sun": "#f6f097",
345
+ "topic-sun-ring": "#d0c637",
346
+ "topic-stone": "#dbdbdb",
347
+ "topic-stone-ring": "#b7afb1",
348
+ "space-1": "4px",
349
+ "space-2": "8px",
350
+ "space-3": "12px",
351
+ "space-4": "16px",
352
+ "space-7": "48px",
353
+ "radius-sm": "10px",
354
+ "radius-md": "16px",
355
+ "radius-lg": "24px",
356
+ "radius-pill": "999px",
357
+ "shadow-float": "0 1px 2px rgba(24, 33, 64, 0.06), 0 8px 24px rgba(24, 33, 64, 0.08)",
358
+ "shadow-pop": "0 2px 4px rgba(24, 33, 64, 0.08), 0 16px 40px rgba(24, 33, 64, 0.14)",
359
+ "node-width": "200px",
360
+ "node-height": "148px",
361
+ "node-stroke": "3px",
362
+ "edge-width": "2.5px",
363
+ "edge-gap": "15px",
364
+ "edge-arc-max": "45px",
365
+ "immersion-alpha": "0.15",
366
+ "zoom-min": "0.3",
367
+ "zoom-max": "5",
368
+ "duration-instant": "100ms",
369
+ "duration-quick": "160ms",
370
+ "duration-base": "240ms",
371
+ "duration-zoom": "500ms",
372
+ "duration-reveal": "420ms",
373
+ "stagger-reveal": "70ms",
374
+ "ease-zoom": "cubic-bezier(0.2, 0.8, 0.2, 1)",
375
+ "ease-standard": "cubic-bezier(0.4, 0, 0.2, 1)",
376
+ "ease-bloom": "cubic-bezier(0.34, 1.4, 0.64, 1)",
377
+ "z-chrome": "10",
378
+ "z-card": "20",
379
+ "z-menu": "40"
380
+ },
381
+ "colorsafe-dark": {
382
+ "font-display": "\"Atkinson Hyperlegible Next\", system-ui, sans-serif",
383
+ "font-ui": "\"Atkinson Hyperlegible Next\", system-ui, -apple-system, \"Segoe UI\", sans-serif",
384
+ "font-hand": "Kalam, \"Atkinson Hyperlegible Next\", cursive",
385
+ "font-note": "Caveat, Kalam, cursive",
386
+ "font-mono": "\"Atkinson Hyperlegible Mono\", ui-monospace, \"SF Mono\", Menlo, monospace",
387
+ "canvas": "#0f1220",
388
+ "surface": "#171b2b",
389
+ "surface-sunken": "#0f1220",
390
+ "surface-overlay": "#212639",
391
+ "line": "#2b3148",
392
+ "line-strong": "#6c7392",
393
+ "ink": "#eef0f7",
394
+ "ink-muted": "#b3b8cc",
395
+ "ink-subtle": "#8f95ae",
396
+ "action": "#f6f3ee",
397
+ "on-action": "#182140",
398
+ "focus": "#12c7d3",
399
+ "link": "#5fd8e1",
400
+ "selection": "rgba(18, 199, 211, 0.32)",
401
+ "node-ink": "#182140",
402
+ "edge": "#c9cddc",
403
+ "edge-label": "#b3b8cc",
404
+ "topic-teal": "#b0ecbc",
405
+ "topic-teal-ring": "#69c27e",
406
+ "topic-harbor": "#abdbfe",
407
+ "topic-harbor-ring": "#5eade2",
408
+ "topic-iris": "#f6bde2",
409
+ "topic-iris-ring": "#d383b9",
410
+ "topic-berry": "#feb79e",
411
+ "topic-berry-ring": "#e37a55",
412
+ "topic-coral": "#fece96",
413
+ "topic-coral-ring": "#db9840",
414
+ "topic-amber": "#b2e8fa",
415
+ "topic-amber-ring": "#5bbdda",
416
+ "topic-sun": "#f6f097",
417
+ "topic-sun-ring": "#c9bf37",
418
+ "topic-stone": "#dbdbdb",
419
+ "topic-stone-ring": "#b1a8aa",
420
+ "space-1": "4px",
421
+ "space-2": "8px",
422
+ "space-3": "12px",
423
+ "space-4": "16px",
424
+ "space-7": "48px",
425
+ "radius-sm": "10px",
426
+ "radius-md": "16px",
427
+ "radius-lg": "24px",
428
+ "radius-pill": "999px",
429
+ "shadow-float": "0 1px 2px rgba(24, 33, 64, 0.06), 0 8px 24px rgba(24, 33, 64, 0.08)",
430
+ "shadow-pop": "0 2px 4px rgba(24, 33, 64, 0.08), 0 16px 40px rgba(24, 33, 64, 0.14)",
431
+ "node-width": "200px",
432
+ "node-height": "148px",
433
+ "node-stroke": "3px",
434
+ "edge-width": "2.5px",
435
+ "edge-gap": "15px",
436
+ "edge-arc-max": "45px",
437
+ "immersion-alpha": "0.15",
438
+ "zoom-min": "0.3",
439
+ "zoom-max": "5",
440
+ "duration-instant": "100ms",
441
+ "duration-quick": "160ms",
442
+ "duration-base": "240ms",
443
+ "duration-zoom": "500ms",
444
+ "duration-reveal": "420ms",
445
+ "stagger-reveal": "70ms",
446
+ "ease-zoom": "cubic-bezier(0.2, 0.8, 0.2, 1)",
447
+ "ease-standard": "cubic-bezier(0.4, 0, 0.2, 1)",
448
+ "ease-bloom": "cubic-bezier(0.34, 1.4, 0.64, 1)",
449
+ "z-chrome": "10",
450
+ "z-card": "20",
451
+ "z-menu": "40"
452
+ },
453
+ "contrast-light": {
454
+ "font-display": "\"Atkinson Hyperlegible Next\", system-ui, sans-serif",
455
+ "font-ui": "\"Atkinson Hyperlegible Next\", system-ui, -apple-system, \"Segoe UI\", sans-serif",
456
+ "font-hand": "Kalam, \"Atkinson Hyperlegible Next\", cursive",
457
+ "font-note": "Caveat, Kalam, cursive",
458
+ "font-mono": "\"Atkinson Hyperlegible Mono\", ui-monospace, \"SF Mono\", Menlo, monospace",
459
+ "canvas": "#ffffff",
460
+ "surface": "#ffffff",
461
+ "surface-sunken": "#f2f2f2",
462
+ "surface-overlay": "#ffffff",
463
+ "line": "#5c6178",
464
+ "line-strong": "#000000",
465
+ "ink": "#000000",
466
+ "ink-muted": "#1f2433",
467
+ "ink-subtle": "#3a3f52",
468
+ "action": "#000000",
469
+ "on-action": "#ffffff",
470
+ "focus": "#0b4a8f",
471
+ "link": "#0b4a8f",
472
+ "selection": "rgba(18, 199, 211, 0.28)",
473
+ "node-ink": "#000000",
474
+ "edge": "#000000",
475
+ "edge-label": "#1f2433",
476
+ "topic-teal": "#87f2f8",
477
+ "topic-teal-ring": "#006b70",
478
+ "topic-harbor": "#bcdbff",
479
+ "topic-harbor-ring": "#0e599d",
480
+ "topic-iris": "#e0c8fe",
481
+ "topic-iris-ring": "#683b92",
482
+ "topic-berry": "#ffbdc4",
483
+ "topic-berry-ring": "#96173a",
484
+ "topic-coral": "#ffc7b2",
485
+ "topic-coral-ring": "#923400",
486
+ "topic-amber": "#ffcf9d",
487
+ "topic-amber-ring": "#7e4d00",
488
+ "topic-sun": "#ffea94",
489
+ "topic-sun-ring": "#7a6600",
490
+ "topic-stone": "#e0dacf",
491
+ "topic-stone-ring": "#63594b",
492
+ "space-1": "4px",
493
+ "space-2": "8px",
494
+ "space-3": "12px",
495
+ "space-4": "16px",
496
+ "space-7": "48px",
497
+ "radius-sm": "10px",
498
+ "radius-md": "16px",
499
+ "radius-lg": "24px",
500
+ "radius-pill": "999px",
501
+ "shadow-float": "none",
502
+ "shadow-pop": "none",
503
+ "node-width": "200px",
504
+ "node-height": "148px",
505
+ "node-stroke": "3px",
506
+ "edge-width": "2.5px",
507
+ "edge-gap": "15px",
508
+ "edge-arc-max": "45px",
509
+ "immersion-alpha": "0.15",
510
+ "zoom-min": "0.3",
511
+ "zoom-max": "5",
512
+ "duration-instant": "100ms",
513
+ "duration-quick": "160ms",
514
+ "duration-base": "240ms",
515
+ "duration-zoom": "500ms",
516
+ "duration-reveal": "420ms",
517
+ "stagger-reveal": "70ms",
518
+ "ease-zoom": "cubic-bezier(0.2, 0.8, 0.2, 1)",
519
+ "ease-standard": "cubic-bezier(0.4, 0, 0.2, 1)",
520
+ "ease-bloom": "cubic-bezier(0.34, 1.4, 0.64, 1)",
521
+ "z-chrome": "10",
522
+ "z-card": "20",
523
+ "z-menu": "40"
524
+ },
525
+ "contrast-dark": {
526
+ "font-display": "\"Atkinson Hyperlegible Next\", system-ui, sans-serif",
527
+ "font-ui": "\"Atkinson Hyperlegible Next\", system-ui, -apple-system, \"Segoe UI\", sans-serif",
528
+ "font-hand": "Kalam, \"Atkinson Hyperlegible Next\", cursive",
529
+ "font-note": "Caveat, Kalam, cursive",
530
+ "font-mono": "\"Atkinson Hyperlegible Mono\", ui-monospace, \"SF Mono\", Menlo, monospace",
531
+ "canvas": "#000000",
532
+ "surface": "#000000",
533
+ "surface-sunken": "#0d0d0d",
534
+ "surface-overlay": "#0d0d0d",
535
+ "line": "#9aa0b8",
536
+ "line-strong": "#ffffff",
537
+ "ink": "#ffffff",
538
+ "ink-muted": "#e6e8f0",
539
+ "ink-subtle": "#c8ccda",
540
+ "action": "#ffffff",
541
+ "on-action": "#000000",
542
+ "focus": "#5fe8f0",
543
+ "link": "#7ff0f5",
544
+ "selection": "rgba(18, 199, 211, 0.32)",
545
+ "node-ink": "#000000",
546
+ "edge": "#ffffff",
547
+ "edge-label": "#e6e8f0",
548
+ "topic-teal": "#87f2f8",
549
+ "topic-teal-ring": "#64eff7",
550
+ "topic-harbor": "#bcdbff",
551
+ "topic-harbor-ring": "#b0d5fe",
552
+ "topic-iris": "#e0c8fe",
553
+ "topic-iris-ring": "#dcbfff",
554
+ "topic-berry": "#ffbdc4",
555
+ "topic-berry-ring": "#feb3bb",
556
+ "topic-coral": "#ffc7b2",
557
+ "topic-coral-ring": "#ffbea5",
558
+ "topic-amber": "#ffcf9d",
559
+ "topic-amber-ring": "#ffc78a",
560
+ "topic-sun": "#ffea94",
561
+ "topic-sun-ring": "#ffe26d",
562
+ "topic-stone": "#e0dacf",
563
+ "topic-stone-ring": "#ddd3c2",
564
+ "space-1": "4px",
565
+ "space-2": "8px",
566
+ "space-3": "12px",
567
+ "space-4": "16px",
568
+ "space-7": "48px",
569
+ "radius-sm": "10px",
570
+ "radius-md": "16px",
571
+ "radius-lg": "24px",
572
+ "radius-pill": "999px",
573
+ "shadow-float": "none",
574
+ "shadow-pop": "none",
575
+ "node-width": "200px",
576
+ "node-height": "148px",
577
+ "node-stroke": "3px",
578
+ "edge-width": "2.5px",
579
+ "edge-gap": "15px",
580
+ "edge-arc-max": "45px",
581
+ "immersion-alpha": "0.15",
582
+ "zoom-min": "0.3",
583
+ "zoom-max": "5",
584
+ "duration-instant": "100ms",
585
+ "duration-quick": "160ms",
586
+ "duration-base": "240ms",
587
+ "duration-zoom": "500ms",
588
+ "duration-reveal": "420ms",
589
+ "stagger-reveal": "70ms",
590
+ "ease-zoom": "cubic-bezier(0.2, 0.8, 0.2, 1)",
591
+ "ease-standard": "cubic-bezier(0.4, 0, 0.2, 1)",
592
+ "ease-bloom": "cubic-bezier(0.34, 1.4, 0.64, 1)",
593
+ "z-chrome": "10",
594
+ "z-card": "20",
595
+ "z-menu": "40"
596
+ }
597
+ };
598
+
599
+ /** Topic palette names (token pairs `topic-<name>` / `topic-<name>-ring`). */
600
+ export const TOPICS = [
601
+ "teal",
602
+ "harbor",
603
+ "iris",
604
+ "berry",
605
+ "coral",
606
+ "amber",
607
+ "sun",
608
+ "stone"
609
+ ] as const;
610
+ export type TopicName = (typeof TOPICS)[number];
611
+
612
+ /** Numeric tokens (px / ms stripped), camel-cased: nodeWidth, nodeStroke, edgeWidth, edgeGap, durationBase, zoomMin ... */
613
+ export const METRICS = {
614
+ "space1": 4,
615
+ "space2": 8,
616
+ "space3": 12,
617
+ "space4": 16,
618
+ "space7": 48,
619
+ "radiusSm": 10,
620
+ "radiusMd": 16,
621
+ "radiusLg": 24,
622
+ "radiusPill": 999,
623
+ "nodeWidth": 200,
624
+ "nodeHeight": 148,
625
+ "nodeStroke": 3,
626
+ "edgeWidth": 2.5,
627
+ "edgeGap": 15,
628
+ "edgeArcMax": 45,
629
+ "immersionAlpha": 0.15,
630
+ "zoomMin": 0.3,
631
+ "zoomMax": 5,
632
+ "durationInstant": 100,
633
+ "durationQuick": 160,
634
+ "durationBase": 240,
635
+ "durationZoom": 500,
636
+ "durationReveal": 420,
637
+ "staggerReveal": 70,
638
+ "zChrome": 10,
639
+ "zCard": 20,
640
+ "zMenu": 40
641
+ } as const;
642
+ /** Overrides applied when motion is reduced. */
643
+ export const METRICS_REDUCED_MOTION = {
644
+ "durationInstant": 120,
645
+ "durationQuick": 0,
646
+ "durationBase": 0,
647
+ "durationZoom": 0,
648
+ "durationReveal": 0,
649
+ "staggerReveal": 0
650
+ } as const;
651
+
652
+ /** Canvas type styles (family is a token name: font-hand, font-note, font-ui ...). */
653
+ export const TYPE_STYLES = {
654
+ "heading": {
655
+ "family": "font-ui",
656
+ "size": 17,
657
+ "lineHeight": 24,
658
+ "weight": 700
659
+ },
660
+ "body": {
661
+ "family": "font-ui",
662
+ "size": 15,
663
+ "lineHeight": 22,
664
+ "weight": 400
665
+ },
666
+ "body-sm": {
667
+ "family": "font-ui",
668
+ "size": 13,
669
+ "lineHeight": 18,
670
+ "weight": 400
671
+ },
672
+ "label": {
673
+ "family": "font-ui",
674
+ "size": 13,
675
+ "lineHeight": 16,
676
+ "weight": 600,
677
+ "letterSpacing": 0.01
678
+ },
679
+ "caption": {
680
+ "family": "font-ui",
681
+ "size": 12,
682
+ "lineHeight": 16,
683
+ "weight": 400
684
+ },
685
+ "node-root": {
686
+ "family": "font-hand",
687
+ "size": 30,
688
+ "lineHeight": 34,
689
+ "weight": 700
690
+ },
691
+ "node-label": {
692
+ "family": "font-hand",
693
+ "size": 22,
694
+ "lineHeight": 26,
695
+ "weight": 700
696
+ },
697
+ "edge-label": {
698
+ "family": "font-note",
699
+ "size": 18,
700
+ "lineHeight": 20,
701
+ "weight": 500
702
+ },
703
+ "annotation": {
704
+ "family": "font-note",
705
+ "size": 24,
706
+ "lineHeight": 26,
707
+ "weight": 600
708
+ }
709
+ } as const;
710
+
711
+ /** Canvas styling extracted from css/spec.css (node labels, hover, shadows, connector dashes, group frames). */
712
+ export const CANVAS_STYLE = {
713
+ "node": {
714
+ "selectedStrokeWidth": 4,
715
+ "hoverRingsRotate": -2,
716
+ "hoverRingsScale": 1.015,
717
+ "hoverLift": -2,
718
+ "dimmedOpacity": 1,
719
+ "dimmedOpacityFocus": 0.4,
720
+ "dimmedOpacityTouch": 0.6,
721
+ "dimmedOpacityFocusTouch": 0.4,
722
+ "shadowLight": "0 6px 14px rgba(24, 33, 64, .10)",
723
+ "shadowDark": "0 0 22px rgba(255, 255, 255, .10)"
724
+ },
725
+ "edge": {
726
+ "dash": [
727
+ 7,
728
+ 7
729
+ ],
730
+ "labelWeight": 500,
731
+ "labelSize": 18,
732
+ "readableLabelSize": 14,
733
+ "readableLabelWeight": 600,
734
+ "labelHaloWidth": 5
735
+ },
736
+ "group": {
737
+ "strokeWidth": 1.5,
738
+ "dash": [
739
+ 10,
740
+ 6
741
+ ],
742
+ "labelWeight": 700,
743
+ "labelLineHeight": 1.1,
744
+ "labelSize": 26,
745
+ "labelPadding": {
746
+ "top": 6,
747
+ "x": 22,
748
+ "bottom": 8
749
+ },
750
+ "labelMaxWidth": 420,
751
+ "labelBorderWidth": 1.5,
752
+ "labelFill": "topic-stone",
753
+ "labelBorder": "topic-stone-ring",
754
+ "labelInk": "node-ink",
755
+ "contrastLabelBorderWidth": 2,
756
+ "contrastLabelBorder": "line-strong"
757
+ }
758
+ } as const;