@visualli/core 0.1.6 → 0.2.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.
- package/README.md +37 -105
- package/dist/chunk-25AJTPMS.js +68 -0
- package/dist/chunk-25AJTPMS.js.map +1 -0
- package/dist/{chunk-6NXADJK2.js → chunk-7NJWM7ZE.js} +84 -117
- package/dist/chunk-7NJWM7ZE.js.map +1 -0
- package/dist/chunk-KVSM3APM.js +96 -0
- package/dist/chunk-KVSM3APM.js.map +1 -0
- package/dist/{chunk-PDP5CVUL.js → chunk-LOQLNYB3.js} +2 -2
- package/dist/chunk-LV3EXUQY.js +753 -0
- package/dist/chunk-LV3EXUQY.js.map +1 -0
- package/dist/chunk-N7HCYULH.js +12 -0
- package/dist/chunk-N7HCYULH.js.map +1 -0
- package/dist/{chunk-I75TMOE4.js → chunk-P6PKWVYF.js} +2 -2
- package/dist/chunk-TPLJJKAU.js +151 -0
- package/dist/chunk-TPLJJKAU.js.map +1 -0
- package/dist/chunk-UAMEJG2C.js +267 -0
- package/dist/chunk-UAMEJG2C.js.map +1 -0
- package/dist/{chunk-LJYSKSCE.js → chunk-W2CAOOJJ.js} +6 -6
- package/dist/chunk-W2CAOOJJ.js.map +1 -0
- package/dist/config/index.cjs +250 -349
- package/dist/config/index.cjs.map +1 -1
- package/dist/config/index.d.cts +107 -66
- package/dist/config/index.d.ts +107 -66
- package/dist/config/index.js +52 -34
- package/dist/constants/index.cjs +14 -333
- package/dist/constants/index.cjs.map +1 -1
- package/dist/constants/index.d.cts +5 -243
- package/dist/constants/index.d.ts +5 -243
- package/dist/constants/index.js +5 -75
- package/dist/designSystem-BOrZHfEq.d.cts +150 -0
- package/dist/designSystem-BOrZHfEq.d.ts +150 -0
- package/dist/document-BFBwn93X.d.ts +26 -0
- package/dist/document-MEJEfxl3.d.cts +26 -0
- package/dist/ideaSize-CLDKeyqD.d.cts +11 -0
- package/dist/ideaSize-DxxGy2E8.d.ts +11 -0
- package/dist/index-BmILeKj6.d.cts +99 -0
- package/dist/index-CcPRwVUL.d.ts +99 -0
- package/dist/index.cjs +1636 -961
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +350 -27
- package/dist/index.d.ts +350 -27
- package/dist/index.js +445 -190
- package/dist/index.js.map +1 -1
- package/dist/{document-B3hnNr-F.d.cts → layer-B2A3Ki48.d.cts} +2 -16
- package/dist/{document-B3hnNr-F.d.ts → layer-B2A3Ki48.d.ts} +2 -16
- package/dist/layout/index.d.cts +2 -1
- package/dist/layout/index.d.ts +2 -1
- package/dist/mindmap-C3Qr0qKW.d.cts +182 -0
- package/dist/mindmap-DHeVa86G.d.ts +182 -0
- package/dist/parser/index.cjs +745 -179
- package/dist/parser/index.cjs.map +1 -1
- package/dist/parser/index.d.cts +23 -8
- package/dist/parser/index.d.ts +23 -8
- package/dist/parser/index.js +7 -2
- package/dist/performance/index.cjs +13 -0
- package/dist/performance/index.cjs.map +1 -1
- package/dist/performance/index.js +2 -2
- package/dist/theme/index.cjs +884 -0
- package/dist/theme/index.cjs.map +1 -0
- package/dist/theme/index.d.cts +2 -0
- package/dist/theme/index.d.ts +2 -0
- package/dist/theme/index.js +53 -0
- package/dist/types/index.d.cts +4 -2
- package/dist/types/index.d.ts +4 -2
- package/dist/viewport/index.cjs +17 -6
- package/dist/viewport/index.cjs.map +1 -1
- package/dist/viewport/index.d.cts +6 -4
- package/dist/viewport/index.d.ts +6 -4
- package/dist/viewport/index.js +2 -2
- package/licenses/visualli-design-system/LICENSE +9 -0
- package/licenses/visualli-design-system/NOTICE.md +6 -0
- package/package.json +13 -5
- package/src/config/README.md +2 -4
- package/src/config/USAGE_EXAMPLES.md +0 -4
- package/src/config/index.ts +3 -4
- package/src/constants/index.ts +1 -1
- package/src/constants/layout.ts +11 -0
- package/src/constants/performanceConstants.ts +8 -27
- package/src/generated/README.md +12 -0
- package/src/generated/designSystem.ts +758 -0
- package/src/generated/geometry/blob.ts +99 -0
- package/src/generated/geometry/blobShapes.ts +4 -0
- package/src/generated/geometry/color.ts +37 -0
- package/src/generated/geometry/container.ts +84 -0
- package/src/generated/geometry/detail.ts +22 -0
- package/src/generated/geometry/idea.ts +56 -0
- package/src/generated/geometry/interaction.ts +122 -0
- package/src/generated/geometry/motion.ts +140 -0
- package/src/index.ts +18 -1
- package/src/parser/configUtils.ts +12 -19
- package/src/parser/visualliConverter.ts +71 -112
- package/src/parser/visualliParser.ts +16 -1
- package/src/rendering/culling.ts +16 -12
- package/src/rendering/ideaSize.ts +21 -0
- package/src/rendering/nodeGeometry.ts +97 -0
- package/src/theme/index.ts +136 -0
- package/src/types/document.ts +9 -0
- package/src/types/layer.ts +1 -1
- package/src/types/mindmap.ts +13 -0
- package/src/utils/navigation.ts +33 -63
- package/src/viewport/viewportUtils.ts +6 -4
- package/dist/animations/index.cjs +0 -146
- package/dist/animations/index.cjs.map +0 -1
- package/dist/animations/index.d.cts +0 -81
- package/dist/animations/index.d.ts +0 -81
- package/dist/animations/index.js +0 -35
- package/dist/chunk-6NXADJK2.js.map +0 -1
- package/dist/chunk-F36SMC3K.js +0 -106
- package/dist/chunk-F36SMC3K.js.map +0 -1
- package/dist/chunk-G5H3P4YZ.js +0 -273
- package/dist/chunk-G5H3P4YZ.js.map +0 -1
- package/dist/chunk-LDJRGT2Q.js +0 -163
- package/dist/chunk-LDJRGT2Q.js.map +0 -1
- package/dist/chunk-LJYSKSCE.js.map +0 -1
- package/dist/chunk-LNTJTDB2.js +0 -349
- package/dist/chunk-LNTJTDB2.js.map +0 -1
- package/dist/mindmap-DWS0WZT_.d.cts +0 -118
- package/dist/mindmap-DWS0WZT_.d.ts +0 -118
- package/src/animations/constants.ts +0 -72
- package/src/animations/easing.ts +0 -70
- package/src/animations/index.ts +0 -2
- package/src/config/blobShapes.ts +0 -146
- package/src/config/textScaling.ts +0 -54
- package/src/constants/design.ts +0 -281
- /package/dist/{chunk-PDP5CVUL.js.map → chunk-LOQLNYB3.js.map} +0 -0
- /package/dist/{chunk-I75TMOE4.js.map → chunk-P6PKWVYF.js.map} +0 -0
- /package/dist/{animations → theme}/index.js.map +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { R as RenderConfig } from '../mindmap-
|
|
1
|
+
import { R as RenderConfig } from '../mindmap-DHeVa86G.js';
|
|
2
|
+
import '../designSystem-BOrZHfEq.js';
|
|
2
3
|
|
|
3
4
|
declare const FPS_TARGET = 60;
|
|
4
5
|
declare const FPS_WARNING_THRESHOLD = 45;
|
|
@@ -33,26 +34,9 @@ declare const MAX_VISIBLE_NODES = 800;
|
|
|
33
34
|
declare const CULLING_QUERY_TIME_BUDGET = 5;
|
|
34
35
|
declare const RBUSH_MAX_ENTRIES = 16;
|
|
35
36
|
declare const SPATIAL_INDEX_BUILD_BUDGET = 50;
|
|
36
|
-
declare const
|
|
37
|
-
declare const
|
|
38
|
-
declare const NODE_PADDING = 40;
|
|
39
|
-
declare const CHAR_WIDTH = 8;
|
|
40
|
-
declare const TITLE_MAX_LENGTH = 150;
|
|
41
|
-
declare const CORNER_RADIUS = 8;
|
|
42
|
-
declare const BORDER_WIDTH_NORMAL = 2;
|
|
43
|
-
declare const BORDER_WIDTH_SELECTED = 3;
|
|
44
|
-
declare const COLOR_SELECTED = "#1B2D4F";
|
|
45
|
-
declare const COLOR_BORDER_LIGHT = "#4A3728";
|
|
46
|
-
declare const COLOR_BORDER_DARK = "#FAF6F1";
|
|
47
|
-
declare const COLOR_DEFAULT_NODE = "#FAF6F1";
|
|
48
|
-
declare const ZOOM_MIN = 0.05;
|
|
49
|
-
declare const ZOOM_MAX = 5;
|
|
37
|
+
declare const ZOOM_MIN: 0.3;
|
|
38
|
+
declare const ZOOM_MAX: 5;
|
|
50
39
|
declare const ZOOM_DEFAULT = 1;
|
|
51
|
-
declare const ZOOM_STEP = 0.1;
|
|
52
|
-
declare const ZOOM_WHEEL_SENSITIVITY = 0.001;
|
|
53
|
-
declare const ZOOM_NAV_IN_THRESHOLD = 2.7;
|
|
54
|
-
declare const ZOOM_NAV_OUT_THRESHOLD = 0.4;
|
|
55
|
-
declare const TEXT_LABEL_HIDE_BELOW_ZOOM = 0.3;
|
|
56
40
|
declare const QUALITY_HIGH: {
|
|
57
41
|
shadows: boolean;
|
|
58
42
|
bezierCurves: boolean;
|
|
@@ -104,234 +88,12 @@ declare const VIEWPORT_CONFIG: {
|
|
|
104
88
|
readonly MIN_VISIBLE_NODES: 10;
|
|
105
89
|
};
|
|
106
90
|
|
|
107
|
-
declare const DS_COLORS: {
|
|
108
|
-
readonly light: {
|
|
109
|
-
readonly bgApp: "#F0EDE6";
|
|
110
|
-
readonly bgSurface: "#FAF8F4";
|
|
111
|
-
readonly bgInput: "#FFFFFF";
|
|
112
|
-
readonly border: "#DDD9D0";
|
|
113
|
-
readonly borderDivider: "#E8E4DC";
|
|
114
|
-
readonly primary: "#1B2D4F";
|
|
115
|
-
readonly primaryHover: "#243B68";
|
|
116
|
-
readonly textPrimary: "#1A1A18";
|
|
117
|
-
readonly textSecondary: "#6B6860";
|
|
118
|
-
readonly textMuted: "#747270";
|
|
119
|
-
readonly textOnPrimary: "#FAF8F4";
|
|
120
|
-
readonly hoverItem: "rgba(27,45,79,0.07)";
|
|
121
|
-
readonly focusRing: "rgba(27,45,79,0.40)";
|
|
122
|
-
readonly btnMuted: "#8E8C88";
|
|
123
|
-
};
|
|
124
|
-
readonly dark: {
|
|
125
|
-
readonly bgApp: "#141412";
|
|
126
|
-
readonly bgSurface: "#1C1C1A";
|
|
127
|
-
readonly bgInput: "#262622";
|
|
128
|
-
readonly border: "#333330";
|
|
129
|
-
readonly borderDivider: "#2A2A28";
|
|
130
|
-
readonly primary: "#BB532D";
|
|
131
|
-
readonly primaryHover: "#CC6440";
|
|
132
|
-
readonly textPrimary: "#F0EDE6";
|
|
133
|
-
readonly textSecondary: "#B0ABA3";
|
|
134
|
-
readonly textMuted: "#8E8C88";
|
|
135
|
-
readonly textOnPrimary: "#FAF8F4";
|
|
136
|
-
readonly hoverItem: "rgba(198,94,56,0.12)";
|
|
137
|
-
readonly focusRing: "rgba(198,94,56,0.50)";
|
|
138
|
-
readonly btnMuted: "#4A4845";
|
|
139
|
-
};
|
|
140
|
-
};
|
|
141
|
-
declare const DS_TYPOGRAPHY: {
|
|
142
|
-
readonly fontDisplay: "'Nunito', sans-serif";
|
|
143
|
-
readonly fontBody: "'Nunito Sans', sans-serif";
|
|
144
|
-
readonly logo: {
|
|
145
|
-
readonly size: "20px";
|
|
146
|
-
readonly weight: 800;
|
|
147
|
-
readonly letterSpacing: "0.04em";
|
|
148
|
-
};
|
|
149
|
-
readonly heading: {
|
|
150
|
-
readonly size: "16px";
|
|
151
|
-
readonly weight: 700;
|
|
152
|
-
readonly letterSpacing: "-0.2px";
|
|
153
|
-
};
|
|
154
|
-
readonly cta: {
|
|
155
|
-
readonly size: "11px";
|
|
156
|
-
readonly weight: 800;
|
|
157
|
-
readonly letterSpacing: "0.12em";
|
|
158
|
-
readonly transform: "uppercase";
|
|
159
|
-
};
|
|
160
|
-
readonly body: {
|
|
161
|
-
readonly size: "13px";
|
|
162
|
-
readonly weight: 400;
|
|
163
|
-
};
|
|
164
|
-
readonly input: {
|
|
165
|
-
readonly size: "13px";
|
|
166
|
-
readonly weight: 300;
|
|
167
|
-
readonly style: "italic";
|
|
168
|
-
};
|
|
169
|
-
readonly search: {
|
|
170
|
-
readonly size: "12px";
|
|
171
|
-
readonly weight: 400;
|
|
172
|
-
};
|
|
173
|
-
readonly username: {
|
|
174
|
-
readonly size: "13px";
|
|
175
|
-
readonly weight: 600;
|
|
176
|
-
};
|
|
177
|
-
readonly avatar: {
|
|
178
|
-
readonly size: "11px";
|
|
179
|
-
readonly weight: 700;
|
|
180
|
-
};
|
|
181
|
-
readonly footer: {
|
|
182
|
-
readonly size: "12px";
|
|
183
|
-
readonly weight: 400;
|
|
184
|
-
};
|
|
185
|
-
readonly empty: {
|
|
186
|
-
readonly size: "11px";
|
|
187
|
-
readonly weight: 300;
|
|
188
|
-
readonly style: "italic";
|
|
189
|
-
};
|
|
190
|
-
};
|
|
191
|
-
declare const DS_RADII: {
|
|
192
|
-
readonly sidebar: 16;
|
|
193
|
-
readonly input: 8;
|
|
194
|
-
readonly cta: 7;
|
|
195
|
-
readonly item: 6;
|
|
196
|
-
readonly swatch: 10;
|
|
197
|
-
};
|
|
198
|
-
declare const BRAND_COLORS: {
|
|
199
|
-
readonly primary: {
|
|
200
|
-
readonly 50: "#EFF6FF";
|
|
201
|
-
readonly 100: "#DBEAFE";
|
|
202
|
-
readonly 200: "#BFDBFE";
|
|
203
|
-
readonly 300: "#93C5FD";
|
|
204
|
-
readonly 400: "#60A5FA";
|
|
205
|
-
readonly 500: "#3B82F6";
|
|
206
|
-
readonly 600: "#2563EB";
|
|
207
|
-
readonly 700: "#1D4ED8";
|
|
208
|
-
readonly 800: "#1E40AF";
|
|
209
|
-
readonly 900: "#1E3A8A";
|
|
210
|
-
};
|
|
211
|
-
readonly secondary: {
|
|
212
|
-
readonly 50: "#F0FDF4";
|
|
213
|
-
readonly 100: "#DCFCE7";
|
|
214
|
-
readonly 200: "#BBF7D0";
|
|
215
|
-
readonly 300: "#86EFAC";
|
|
216
|
-
readonly 400: "#4ADE80";
|
|
217
|
-
readonly 500: "#10B981";
|
|
218
|
-
readonly 600: "#059669";
|
|
219
|
-
readonly 700: "#047857";
|
|
220
|
-
readonly 800: "#065F46";
|
|
221
|
-
readonly 900: "#064E3B";
|
|
222
|
-
};
|
|
223
|
-
readonly accent: {
|
|
224
|
-
readonly purple: "#8B5CF6";
|
|
225
|
-
readonly cyan: "#06B6D4";
|
|
226
|
-
readonly sky: "#0EA5E9";
|
|
227
|
-
readonly lime: "#84CC16";
|
|
228
|
-
readonly amber: "#F59E0B";
|
|
229
|
-
readonly red: "#EF4444";
|
|
230
|
-
};
|
|
231
|
-
};
|
|
232
|
-
declare const LEVEL_COLORS: {
|
|
233
|
-
readonly level0: "#3B82F6";
|
|
234
|
-
readonly level1: "#60A5FA";
|
|
235
|
-
readonly level2: "#93C5FD";
|
|
236
|
-
readonly level3: "#BFDBFE";
|
|
237
|
-
readonly level4: "#93C5FD";
|
|
238
|
-
readonly level5: "#60A5FA";
|
|
239
|
-
readonly level6: "#3B82F6";
|
|
240
|
-
readonly level7: "#2563EB";
|
|
241
|
-
readonly level8: "#1D4ED8";
|
|
242
|
-
};
|
|
243
|
-
declare const LEVEL_COLOR_ARRAY: readonly ["#3B82F6", "#60A5FA", "#93C5FD", "#BFDBFE", "#93C5FD", "#60A5FA", "#3B82F6", "#2563EB", "#1D4ED8"];
|
|
244
|
-
declare const PARENT_FALLBACK_COLORS: readonly ["#12C7D3", "#325E8C", "#8A70A6", "#F54A57", "#FF6C4D", "#F28C16", "#FFD347", "#7F7F7F", "#8D8D8D"];
|
|
245
|
-
declare const SEMANTIC_COLORS: {
|
|
246
|
-
readonly success: "#10B981";
|
|
247
|
-
readonly error: "#EF4444";
|
|
248
|
-
readonly warning: "#F59E0B";
|
|
249
|
-
readonly info: "#3B82F6";
|
|
250
|
-
};
|
|
251
|
-
declare const THEME_COLORS: {
|
|
252
|
-
readonly light: {
|
|
253
|
-
readonly background: {
|
|
254
|
-
readonly primary: "#FAF8F4";
|
|
255
|
-
readonly secondary: "#F0EDE6";
|
|
256
|
-
readonly tertiary: "#FFFFFF";
|
|
257
|
-
};
|
|
258
|
-
readonly text: {
|
|
259
|
-
readonly primary: "#1A1A18";
|
|
260
|
-
readonly secondary: "#6B6860";
|
|
261
|
-
readonly tertiary: "#747270";
|
|
262
|
-
};
|
|
263
|
-
readonly border: {
|
|
264
|
-
readonly primary: "#DDD9D0";
|
|
265
|
-
readonly secondary: "#E8E4DC";
|
|
266
|
-
};
|
|
267
|
-
};
|
|
268
|
-
readonly dark: {
|
|
269
|
-
readonly background: {
|
|
270
|
-
readonly primary: "#1C1C1A";
|
|
271
|
-
readonly secondary: "#141412";
|
|
272
|
-
readonly tertiary: "#262622";
|
|
273
|
-
};
|
|
274
|
-
readonly text: {
|
|
275
|
-
readonly primary: "#F0EDE6";
|
|
276
|
-
readonly secondary: "#B0ABA3";
|
|
277
|
-
readonly tertiary: "#8E8C88";
|
|
278
|
-
};
|
|
279
|
-
readonly border: {
|
|
280
|
-
readonly primary: "#333330";
|
|
281
|
-
readonly secondary: "#2A2A28";
|
|
282
|
-
};
|
|
283
|
-
};
|
|
284
|
-
};
|
|
285
|
-
declare const CANVAS_COLORS: {
|
|
286
|
-
readonly node: {
|
|
287
|
-
readonly border: "#FFFFFF";
|
|
288
|
-
readonly titleColor: "#1e1b4b";
|
|
289
|
-
readonly badgeBackground: "#FFC107";
|
|
290
|
-
readonly badgeStroke: "#fcd34d";
|
|
291
|
-
};
|
|
292
|
-
};
|
|
293
|
-
declare const SPACING: {
|
|
294
|
-
readonly xs: 4;
|
|
295
|
-
readonly sm: 8;
|
|
296
|
-
readonly md: 16;
|
|
297
|
-
readonly lg: 24;
|
|
298
|
-
readonly xl: 32;
|
|
299
|
-
readonly '2xl': 48;
|
|
300
|
-
readonly '3xl': 64;
|
|
301
|
-
readonly '4xl': 96;
|
|
302
|
-
};
|
|
303
91
|
declare const LAYOUT_SPACING: {
|
|
304
92
|
readonly nodeSpacing: 200;
|
|
305
93
|
readonly levelSpacing: 150;
|
|
306
94
|
readonly containerPadding: 20;
|
|
307
95
|
readonly gridSize: 50;
|
|
308
96
|
};
|
|
309
|
-
declare const FONTS: {
|
|
310
|
-
readonly primary: "'Inter', sans-serif";
|
|
311
|
-
readonly secondary: "'Poppins', sans-serif";
|
|
312
|
-
readonly mono: "'Roboto Mono', monospace";
|
|
313
|
-
};
|
|
314
|
-
declare const FONT_SIZES: {
|
|
315
|
-
readonly xs: "0.75rem";
|
|
316
|
-
readonly sm: "0.875rem";
|
|
317
|
-
readonly base: "1rem";
|
|
318
|
-
readonly lg: "1.125rem";
|
|
319
|
-
readonly xl: "1.25rem";
|
|
320
|
-
readonly '2xl': "1.5rem";
|
|
321
|
-
readonly '3xl': "1.875rem";
|
|
322
|
-
readonly '4xl': "2.25rem";
|
|
323
|
-
};
|
|
324
|
-
/** Get a level color, cycling back to level 0 for levels > 8. */
|
|
325
|
-
declare function getColorForLevel(level: number): string;
|
|
326
|
-
/**
|
|
327
|
-
* Darken a hex color by reducing HSL lightness.
|
|
328
|
-
* Returns a monochromatic darker version — used for border/stroke colors.
|
|
329
|
-
* Falls back to the original string if parsing fails.
|
|
330
|
-
*/
|
|
331
|
-
declare function darkenHexColor(hex: string, amount?: number): string;
|
|
332
|
-
declare function getThemeBackground(isDark: boolean, variant?: 'primary' | 'secondary' | 'tertiary'): string;
|
|
333
|
-
declare function getThemeText(isDark: boolean, variant?: 'primary' | 'secondary' | 'tertiary'): string;
|
|
334
|
-
declare function getThemeBorder(isDark: boolean, variant?: 'primary' | 'secondary'): string;
|
|
335
97
|
|
|
336
98
|
declare const DEFAULT_RENDER_CONFIG: RenderConfig;
|
|
337
99
|
declare const SIMPLIFIED_RENDER_CONFIG: RenderConfig;
|
|
@@ -445,4 +207,4 @@ declare function isFeatureEnabled(featureName: keyof typeof FEATURE_FLAGS, confi
|
|
|
445
207
|
*/
|
|
446
208
|
declare function getRecommendedRenderConfig(): RenderConfig;
|
|
447
209
|
|
|
448
|
-
export {
|
|
210
|
+
export { CIRCULAR_REFERENCE_MAX_DEPTH, CLICK_THRESHOLD, CULLING_QUERY_TIME_BUDGET, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_WIDTH, DEFAULT_RENDER_CONFIG, DOUBLE_CLICK_DELAY, DRAG_START_DISTANCE, FEATURE_FLAGS, FPS_CRITICAL_THRESHOLD, FPS_DOWNGRADE_THRESHOLD, FPS_SAMPLE_WINDOW, FPS_STABILIZATION_FRAMES, FPS_TARGET, FPS_TARGETS, FPS_UPDATE_INTERVAL, FPS_UPGRADE_THRESHOLD, FPS_WARNING_THRESHOLD, LAYOUT_SPACING, MAX_FRAME_TIME, MAX_NODES, MAX_VISIBLE_NODES, MEMORY_CHECK_INTERVAL, MEMORY_CRITICAL_MB, MEMORY_LIMITS, MEMORY_TARGET_MB, MEMORY_WARNING_MB, NODE_COUNT_THRESHOLDS, PERFORMANCE_TOAST_COOLDOWN, QUALITY_HIGH, QUALITY_LEVELS, QUALITY_LOW, QUALITY_MEDIUM, QUALITY_SETTINGS, type QualityLevel, RBUSH_MAX_ENTRIES, RENDER_MODES, RESIZE_DEBOUNCE, type RenderMode, SCROLL_THROTTLE, SEARCH_DEBOUNCE, SIMPLIFIED_RENDER_CONFIG, SPATIAL_INDEX_BUILD_BUDGET, TARGET_FRAME_TIME, TIMING_THRESHOLDS, VIEWPORT_CONFIG, VIEWPORT_MARGIN, ZOOM_DEFAULT, ZOOM_MAX, ZOOM_MIN, getOptimalQualityLevel, getRecommendedRenderConfig, getRenderConfigForQuality, isFeatureEnabled };
|
package/dist/constants/index.js
CHANGED
|
@@ -9,39 +9,13 @@ import {
|
|
|
9
9
|
getRecommendedRenderConfig,
|
|
10
10
|
getRenderConfigForQuality,
|
|
11
11
|
isFeatureEnabled
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-P6PKWVYF.js";
|
|
13
13
|
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
DS_COLORS,
|
|
17
|
-
DS_RADII,
|
|
18
|
-
DS_TYPOGRAPHY,
|
|
19
|
-
FONTS,
|
|
20
|
-
FONT_SIZES,
|
|
21
|
-
LAYOUT_SPACING,
|
|
22
|
-
LEVEL_COLORS,
|
|
23
|
-
LEVEL_COLOR_ARRAY,
|
|
24
|
-
PARENT_FALLBACK_COLORS,
|
|
25
|
-
SEMANTIC_COLORS,
|
|
26
|
-
SPACING,
|
|
27
|
-
THEME_COLORS,
|
|
28
|
-
darkenHexColor,
|
|
29
|
-
getColorForLevel,
|
|
30
|
-
getThemeBackground,
|
|
31
|
-
getThemeBorder,
|
|
32
|
-
getThemeText
|
|
33
|
-
} from "../chunk-G5H3P4YZ.js";
|
|
14
|
+
LAYOUT_SPACING
|
|
15
|
+
} from "../chunk-N7HCYULH.js";
|
|
34
16
|
import {
|
|
35
|
-
BORDER_WIDTH_NORMAL,
|
|
36
|
-
BORDER_WIDTH_SELECTED,
|
|
37
|
-
CHAR_WIDTH,
|
|
38
17
|
CIRCULAR_REFERENCE_MAX_DEPTH,
|
|
39
18
|
CLICK_THRESHOLD,
|
|
40
|
-
COLOR_BORDER_DARK,
|
|
41
|
-
COLOR_BORDER_LIGHT,
|
|
42
|
-
COLOR_DEFAULT_NODE,
|
|
43
|
-
COLOR_SELECTED,
|
|
44
|
-
CORNER_RADIUS,
|
|
45
19
|
CULLING_QUERY_TIME_BUDGET,
|
|
46
20
|
DEFAULT_CANVAS_HEIGHT,
|
|
47
21
|
DEFAULT_CANVAS_WIDTH,
|
|
@@ -65,9 +39,6 @@ import {
|
|
|
65
39
|
MEMORY_TARGET_MB,
|
|
66
40
|
MEMORY_WARNING_MB,
|
|
67
41
|
NODE_COUNT_THRESHOLDS,
|
|
68
|
-
NODE_HEIGHT,
|
|
69
|
-
NODE_MIN_WIDTH,
|
|
70
|
-
NODE_PADDING,
|
|
71
42
|
PERFORMANCE_TOAST_COOLDOWN,
|
|
72
43
|
QUALITY_HIGH,
|
|
73
44
|
QUALITY_LOW,
|
|
@@ -78,44 +49,23 @@ import {
|
|
|
78
49
|
SEARCH_DEBOUNCE,
|
|
79
50
|
SPATIAL_INDEX_BUILD_BUDGET,
|
|
80
51
|
TARGET_FRAME_TIME,
|
|
81
|
-
TEXT_LABEL_HIDE_BELOW_ZOOM,
|
|
82
52
|
TIMING_THRESHOLDS,
|
|
83
|
-
TITLE_MAX_LENGTH,
|
|
84
53
|
VIEWPORT_CONFIG,
|
|
85
54
|
VIEWPORT_MARGIN,
|
|
86
55
|
ZOOM_DEFAULT,
|
|
87
56
|
ZOOM_MAX,
|
|
88
|
-
ZOOM_MIN
|
|
89
|
-
|
|
90
|
-
ZOOM_NAV_OUT_THRESHOLD,
|
|
91
|
-
ZOOM_STEP,
|
|
92
|
-
ZOOM_WHEEL_SENSITIVITY
|
|
93
|
-
} from "../chunk-LDJRGT2Q.js";
|
|
57
|
+
ZOOM_MIN
|
|
58
|
+
} from "../chunk-UAMEJG2C.js";
|
|
94
59
|
export {
|
|
95
|
-
BORDER_WIDTH_NORMAL,
|
|
96
|
-
BORDER_WIDTH_SELECTED,
|
|
97
|
-
BRAND_COLORS,
|
|
98
|
-
CANVAS_COLORS,
|
|
99
|
-
CHAR_WIDTH,
|
|
100
60
|
CIRCULAR_REFERENCE_MAX_DEPTH,
|
|
101
61
|
CLICK_THRESHOLD,
|
|
102
|
-
COLOR_BORDER_DARK,
|
|
103
|
-
COLOR_BORDER_LIGHT,
|
|
104
|
-
COLOR_DEFAULT_NODE,
|
|
105
|
-
COLOR_SELECTED,
|
|
106
|
-
CORNER_RADIUS,
|
|
107
62
|
CULLING_QUERY_TIME_BUDGET,
|
|
108
63
|
DEFAULT_CANVAS_HEIGHT,
|
|
109
64
|
DEFAULT_CANVAS_WIDTH,
|
|
110
65
|
DEFAULT_RENDER_CONFIG,
|
|
111
66
|
DOUBLE_CLICK_DELAY,
|
|
112
67
|
DRAG_START_DISTANCE,
|
|
113
|
-
DS_COLORS,
|
|
114
|
-
DS_RADII,
|
|
115
|
-
DS_TYPOGRAPHY,
|
|
116
68
|
FEATURE_FLAGS,
|
|
117
|
-
FONTS,
|
|
118
|
-
FONT_SIZES,
|
|
119
69
|
FPS_CRITICAL_THRESHOLD,
|
|
120
70
|
FPS_DOWNGRADE_THRESHOLD,
|
|
121
71
|
FPS_SAMPLE_WINDOW,
|
|
@@ -126,8 +76,6 @@ export {
|
|
|
126
76
|
FPS_UPGRADE_THRESHOLD,
|
|
127
77
|
FPS_WARNING_THRESHOLD,
|
|
128
78
|
LAYOUT_SPACING,
|
|
129
|
-
LEVEL_COLORS,
|
|
130
|
-
LEVEL_COLOR_ARRAY,
|
|
131
79
|
MAX_FRAME_TIME,
|
|
132
80
|
MAX_NODES,
|
|
133
81
|
MAX_VISIBLE_NODES,
|
|
@@ -137,10 +85,6 @@ export {
|
|
|
137
85
|
MEMORY_TARGET_MB,
|
|
138
86
|
MEMORY_WARNING_MB,
|
|
139
87
|
NODE_COUNT_THRESHOLDS,
|
|
140
|
-
NODE_HEIGHT,
|
|
141
|
-
NODE_MIN_WIDTH,
|
|
142
|
-
NODE_PADDING,
|
|
143
|
-
PARENT_FALLBACK_COLORS,
|
|
144
88
|
PERFORMANCE_TOAST_COOLDOWN,
|
|
145
89
|
QUALITY_HIGH,
|
|
146
90
|
QUALITY_LEVELS,
|
|
@@ -152,32 +96,18 @@ export {
|
|
|
152
96
|
RESIZE_DEBOUNCE,
|
|
153
97
|
SCROLL_THROTTLE,
|
|
154
98
|
SEARCH_DEBOUNCE,
|
|
155
|
-
SEMANTIC_COLORS,
|
|
156
99
|
SIMPLIFIED_RENDER_CONFIG,
|
|
157
|
-
SPACING,
|
|
158
100
|
SPATIAL_INDEX_BUILD_BUDGET,
|
|
159
101
|
TARGET_FRAME_TIME,
|
|
160
|
-
TEXT_LABEL_HIDE_BELOW_ZOOM,
|
|
161
|
-
THEME_COLORS,
|
|
162
102
|
TIMING_THRESHOLDS,
|
|
163
|
-
TITLE_MAX_LENGTH,
|
|
164
103
|
VIEWPORT_CONFIG,
|
|
165
104
|
VIEWPORT_MARGIN,
|
|
166
105
|
ZOOM_DEFAULT,
|
|
167
106
|
ZOOM_MAX,
|
|
168
107
|
ZOOM_MIN,
|
|
169
|
-
ZOOM_NAV_IN_THRESHOLD,
|
|
170
|
-
ZOOM_NAV_OUT_THRESHOLD,
|
|
171
|
-
ZOOM_STEP,
|
|
172
|
-
ZOOM_WHEEL_SENSITIVITY,
|
|
173
|
-
darkenHexColor,
|
|
174
|
-
getColorForLevel,
|
|
175
108
|
getOptimalQualityLevel,
|
|
176
109
|
getRecommendedRenderConfig,
|
|
177
110
|
getRenderConfigForQuality,
|
|
178
|
-
getThemeBackground,
|
|
179
|
-
getThemeBorder,
|
|
180
|
-
getThemeText,
|
|
181
111
|
isFeatureEnabled
|
|
182
112
|
};
|
|
183
113
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/** Version of the design system these modules were generated from. */
|
|
2
|
+
declare const DESIGN_SYSTEM_VERSION: "0.2.0";
|
|
3
|
+
declare const THEME_NAMES: readonly ["light", "dark", "focus-light", "focus-dark", "colorsafe-light", "colorsafe-dark", "contrast-light", "contrast-dark"];
|
|
4
|
+
type ThemeName = (typeof THEME_NAMES)[number];
|
|
5
|
+
/** Every token for every theme (each theme already merged over "light"). Keys match the CSS custom properties. */
|
|
6
|
+
declare const TOKENS: Readonly<Record<ThemeName, Readonly<Record<string, string>>>>;
|
|
7
|
+
/** Topic palette names (token pairs `topic-<name>` / `topic-<name>-ring`). */
|
|
8
|
+
declare const TOPICS: readonly ["teal", "harbor", "iris", "berry", "coral", "amber", "sun", "stone"];
|
|
9
|
+
type TopicName = (typeof TOPICS)[number];
|
|
10
|
+
/** Numeric tokens (px / ms stripped), camel-cased: nodeWidth, nodeStroke, edgeWidth, edgeGap, durationBase, zoomMin ... */
|
|
11
|
+
declare const METRICS: {
|
|
12
|
+
readonly space1: 4;
|
|
13
|
+
readonly space2: 8;
|
|
14
|
+
readonly space3: 12;
|
|
15
|
+
readonly space4: 16;
|
|
16
|
+
readonly space7: 48;
|
|
17
|
+
readonly radiusSm: 10;
|
|
18
|
+
readonly radiusMd: 16;
|
|
19
|
+
readonly radiusLg: 24;
|
|
20
|
+
readonly radiusPill: 999;
|
|
21
|
+
readonly nodeWidth: 200;
|
|
22
|
+
readonly nodeHeight: 148;
|
|
23
|
+
readonly nodeStroke: 3;
|
|
24
|
+
readonly edgeWidth: 2.5;
|
|
25
|
+
readonly edgeGap: 15;
|
|
26
|
+
readonly edgeArcMax: 45;
|
|
27
|
+
readonly immersionAlpha: 0.15;
|
|
28
|
+
readonly zoomMin: 0.3;
|
|
29
|
+
readonly zoomMax: 5;
|
|
30
|
+
readonly durationInstant: 100;
|
|
31
|
+
readonly durationQuick: 160;
|
|
32
|
+
readonly durationBase: 240;
|
|
33
|
+
readonly durationZoom: 500;
|
|
34
|
+
readonly durationReveal: 420;
|
|
35
|
+
readonly staggerReveal: 70;
|
|
36
|
+
readonly zChrome: 10;
|
|
37
|
+
readonly zCard: 20;
|
|
38
|
+
readonly zMenu: 40;
|
|
39
|
+
};
|
|
40
|
+
/** Overrides applied when motion is reduced. */
|
|
41
|
+
declare const METRICS_REDUCED_MOTION: {
|
|
42
|
+
readonly durationInstant: 120;
|
|
43
|
+
readonly durationQuick: 0;
|
|
44
|
+
readonly durationBase: 0;
|
|
45
|
+
readonly durationZoom: 0;
|
|
46
|
+
readonly durationReveal: 0;
|
|
47
|
+
readonly staggerReveal: 0;
|
|
48
|
+
};
|
|
49
|
+
/** Canvas type styles (family is a token name: font-hand, font-note, font-ui ...). */
|
|
50
|
+
declare const TYPE_STYLES: {
|
|
51
|
+
readonly heading: {
|
|
52
|
+
readonly family: "font-ui";
|
|
53
|
+
readonly size: 17;
|
|
54
|
+
readonly lineHeight: 24;
|
|
55
|
+
readonly weight: 700;
|
|
56
|
+
};
|
|
57
|
+
readonly body: {
|
|
58
|
+
readonly family: "font-ui";
|
|
59
|
+
readonly size: 15;
|
|
60
|
+
readonly lineHeight: 22;
|
|
61
|
+
readonly weight: 400;
|
|
62
|
+
};
|
|
63
|
+
readonly "body-sm": {
|
|
64
|
+
readonly family: "font-ui";
|
|
65
|
+
readonly size: 13;
|
|
66
|
+
readonly lineHeight: 18;
|
|
67
|
+
readonly weight: 400;
|
|
68
|
+
};
|
|
69
|
+
readonly label: {
|
|
70
|
+
readonly family: "font-ui";
|
|
71
|
+
readonly size: 13;
|
|
72
|
+
readonly lineHeight: 16;
|
|
73
|
+
readonly weight: 600;
|
|
74
|
+
readonly letterSpacing: 0.01;
|
|
75
|
+
};
|
|
76
|
+
readonly caption: {
|
|
77
|
+
readonly family: "font-ui";
|
|
78
|
+
readonly size: 12;
|
|
79
|
+
readonly lineHeight: 16;
|
|
80
|
+
readonly weight: 400;
|
|
81
|
+
};
|
|
82
|
+
readonly "node-root": {
|
|
83
|
+
readonly family: "font-hand";
|
|
84
|
+
readonly size: 30;
|
|
85
|
+
readonly lineHeight: 34;
|
|
86
|
+
readonly weight: 700;
|
|
87
|
+
};
|
|
88
|
+
readonly "node-label": {
|
|
89
|
+
readonly family: "font-hand";
|
|
90
|
+
readonly size: 22;
|
|
91
|
+
readonly lineHeight: 26;
|
|
92
|
+
readonly weight: 700;
|
|
93
|
+
};
|
|
94
|
+
readonly "edge-label": {
|
|
95
|
+
readonly family: "font-note";
|
|
96
|
+
readonly size: 18;
|
|
97
|
+
readonly lineHeight: 20;
|
|
98
|
+
readonly weight: 500;
|
|
99
|
+
};
|
|
100
|
+
readonly annotation: {
|
|
101
|
+
readonly family: "font-note";
|
|
102
|
+
readonly size: 24;
|
|
103
|
+
readonly lineHeight: 26;
|
|
104
|
+
readonly weight: 600;
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
/** Canvas styling extracted from css/spec.css (node labels, hover, shadows, connector dashes, group frames). */
|
|
108
|
+
declare const CANVAS_STYLE: {
|
|
109
|
+
readonly node: {
|
|
110
|
+
readonly selectedStrokeWidth: 4;
|
|
111
|
+
readonly hoverRingsRotate: -2;
|
|
112
|
+
readonly hoverRingsScale: 1.015;
|
|
113
|
+
readonly hoverLift: -2;
|
|
114
|
+
readonly dimmedOpacity: 1;
|
|
115
|
+
readonly dimmedOpacityFocus: 0.4;
|
|
116
|
+
readonly dimmedOpacityTouch: 0.6;
|
|
117
|
+
readonly dimmedOpacityFocusTouch: 0.4;
|
|
118
|
+
readonly shadowLight: "0 6px 14px rgba(24, 33, 64, .10)";
|
|
119
|
+
readonly shadowDark: "0 0 22px rgba(255, 255, 255, .10)";
|
|
120
|
+
};
|
|
121
|
+
readonly edge: {
|
|
122
|
+
readonly dash: readonly [7, 7];
|
|
123
|
+
readonly labelWeight: 500;
|
|
124
|
+
readonly labelSize: 18;
|
|
125
|
+
readonly readableLabelSize: 14;
|
|
126
|
+
readonly readableLabelWeight: 600;
|
|
127
|
+
readonly labelHaloWidth: 5;
|
|
128
|
+
};
|
|
129
|
+
readonly group: {
|
|
130
|
+
readonly strokeWidth: 1.5;
|
|
131
|
+
readonly dash: readonly [10, 6];
|
|
132
|
+
readonly labelWeight: 700;
|
|
133
|
+
readonly labelLineHeight: 1.1;
|
|
134
|
+
readonly labelSize: 26;
|
|
135
|
+
readonly labelPadding: {
|
|
136
|
+
readonly top: 6;
|
|
137
|
+
readonly x: 22;
|
|
138
|
+
readonly bottom: 8;
|
|
139
|
+
};
|
|
140
|
+
readonly labelMaxWidth: 420;
|
|
141
|
+
readonly labelBorderWidth: 1.5;
|
|
142
|
+
readonly labelFill: "topic-stone";
|
|
143
|
+
readonly labelBorder: "topic-stone-ring";
|
|
144
|
+
readonly labelInk: "node-ink";
|
|
145
|
+
readonly contrastLabelBorderWidth: 2;
|
|
146
|
+
readonly contrastLabelBorder: "line-strong";
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
export { CANVAS_STYLE as C, DESIGN_SYSTEM_VERSION as D, METRICS as M, type TopicName as T, type ThemeName as a, METRICS_REDUCED_MOTION as b, THEME_NAMES as c, TOKENS as d, TOPICS as e, TYPE_STYLES as f };
|