@visualli/core 0.1.4 → 0.1.6
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/dist/animations/index.cjs +146 -0
- package/dist/animations/index.cjs.map +1 -0
- package/dist/animations/index.d.cts +81 -0
- package/dist/animations/index.d.ts +81 -0
- package/dist/animations/index.js +35 -0
- package/dist/animations/index.js.map +1 -0
- package/dist/chunk-6NXADJK2.js +562 -0
- package/dist/chunk-6NXADJK2.js.map +1 -0
- package/dist/chunk-F36SMC3K.js +106 -0
- package/dist/chunk-F36SMC3K.js.map +1 -0
- package/dist/chunk-G5H3P4YZ.js +273 -0
- package/dist/chunk-G5H3P4YZ.js.map +1 -0
- package/dist/chunk-GQMFBYLK.js +81 -0
- package/dist/chunk-GQMFBYLK.js.map +1 -0
- package/dist/chunk-I75TMOE4.js +108 -0
- package/dist/chunk-I75TMOE4.js.map +1 -0
- package/dist/chunk-LDJRGT2Q.js +163 -0
- package/dist/chunk-LDJRGT2Q.js.map +1 -0
- package/dist/chunk-LI3BVD6H.js +98 -0
- package/dist/chunk-LI3BVD6H.js.map +1 -0
- package/dist/chunk-LJYSKSCE.js +95 -0
- package/dist/chunk-LJYSKSCE.js.map +1 -0
- package/dist/chunk-LNTJTDB2.js +349 -0
- package/dist/chunk-LNTJTDB2.js.map +1 -0
- package/dist/chunk-PDP5CVUL.js +139 -0
- package/dist/chunk-PDP5CVUL.js.map +1 -0
- package/dist/chunk-VLGR5PZX.js +1 -0
- package/dist/chunk-VLGR5PZX.js.map +1 -0
- package/dist/config/index.cjs +391 -0
- package/dist/config/index.cjs.map +1 -0
- package/dist/config/index.d.cts +77 -0
- package/dist/config/index.d.ts +77 -0
- package/dist/config/index.js +38 -0
- package/dist/config/index.js.map +1 -0
- package/dist/constants/index.cjs +642 -0
- package/dist/constants/index.cjs.map +1 -0
- package/dist/constants/index.d.cts +448 -0
- package/dist/constants/index.d.ts +448 -0
- package/dist/constants/index.js +183 -0
- package/dist/constants/index.js.map +1 -0
- package/dist/document-B3hnNr-F.d.cts +73 -0
- package/dist/document-B3hnNr-F.d.ts +73 -0
- package/dist/index.cjs +32 -32
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -1044
- package/dist/index.d.ts +15 -1044
- package/dist/index.js +179 -1747
- package/dist/index.js.map +1 -1
- package/dist/layout/index.cjs +210 -0
- package/dist/layout/index.cjs.map +1 -0
- package/dist/layout/index.d.cts +80 -0
- package/dist/layout/index.d.ts +80 -0
- package/dist/layout/index.js +25 -0
- package/dist/layout/index.js.map +1 -0
- package/dist/mindmap-DWS0WZT_.d.cts +118 -0
- package/dist/mindmap-DWS0WZT_.d.ts +118 -0
- package/dist/parser/index.cjs +739 -0
- package/dist/parser/index.cjs.map +1 -0
- package/dist/parser/index.d.cts +87 -0
- package/dist/parser/index.d.ts +87 -0
- package/dist/parser/index.js +43 -0
- package/dist/parser/index.js.map +1 -0
- package/dist/performance/index.cjs +167 -0
- package/dist/performance/index.cjs.map +1 -0
- package/dist/performance/index.d.cts +40 -0
- package/dist/performance/index.d.ts +40 -0
- package/dist/performance/index.js +12 -0
- package/dist/performance/index.js.map +1 -0
- package/dist/types/index.cjs +19 -0
- package/dist/types/index.cjs.map +1 -0
- package/dist/types/index.d.cts +8 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -0
- package/dist/viewport/index.cjs +131 -0
- package/dist/viewport/index.cjs.map +1 -0
- package/dist/viewport/index.d.cts +56 -0
- package/dist/viewport/index.d.ts +56 -0
- package/dist/viewport/index.js +26 -0
- package/dist/viewport/index.js.map +1 -0
- package/package.json +6 -1
- package/src/config/README.md +59 -0
- package/src/config/USAGE_EXAMPLES.md +285 -0
- package/src/config/index.ts +7 -0
- package/src/index.ts +1 -2
|
@@ -0,0 +1,448 @@
|
|
|
1
|
+
import { R as RenderConfig } from '../mindmap-DWS0WZT_.js';
|
|
2
|
+
|
|
3
|
+
declare const FPS_TARGET = 60;
|
|
4
|
+
declare const FPS_WARNING_THRESHOLD = 45;
|
|
5
|
+
declare const FPS_CRITICAL_THRESHOLD = 30;
|
|
6
|
+
declare const TARGET_FRAME_TIME: number;
|
|
7
|
+
declare const MAX_FRAME_TIME = 18;
|
|
8
|
+
/** Legacy frame-rate targets kept for backward compatibility. */
|
|
9
|
+
declare const FPS_TARGETS: {
|
|
10
|
+
readonly PAN_MIN: 30;
|
|
11
|
+
readonly ZOOM_TARGET: 60;
|
|
12
|
+
readonly WARNING_THRESHOLD: 20;
|
|
13
|
+
};
|
|
14
|
+
declare const TIMING_THRESHOLDS: {
|
|
15
|
+
readonly VIEWPORT_QUERY_MAX: 5;
|
|
16
|
+
readonly SPATIAL_UPDATE_MAX: 10;
|
|
17
|
+
readonly DRAG_RESPONSE_MAX: 16;
|
|
18
|
+
readonly LOAD_5K_TARGET: 2000;
|
|
19
|
+
readonly LOAD_10K_TARGET: 3000;
|
|
20
|
+
readonly VIEWPORT_DEBOUNCE: 100;
|
|
21
|
+
readonly SPATIAL_INDEX_BUILD: 50;
|
|
22
|
+
};
|
|
23
|
+
declare const MEMORY_TARGET_MB = 500;
|
|
24
|
+
declare const MEMORY_WARNING_MB = 600;
|
|
25
|
+
declare const MEMORY_CRITICAL_MB = 800;
|
|
26
|
+
declare const MEMORY_LIMITS: {
|
|
27
|
+
readonly MAX_10K_NODES: 500;
|
|
28
|
+
readonly MAX_GROWTH_PERCENT: 20;
|
|
29
|
+
readonly WARNING_THRESHOLD: 400;
|
|
30
|
+
};
|
|
31
|
+
declare const VIEWPORT_MARGIN = 0.1;
|
|
32
|
+
declare const MAX_VISIBLE_NODES = 800;
|
|
33
|
+
declare const CULLING_QUERY_TIME_BUDGET = 5;
|
|
34
|
+
declare const RBUSH_MAX_ENTRIES = 16;
|
|
35
|
+
declare const SPATIAL_INDEX_BUILD_BUDGET = 50;
|
|
36
|
+
declare const NODE_MIN_WIDTH = 200;
|
|
37
|
+
declare const NODE_HEIGHT = 80;
|
|
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;
|
|
50
|
+
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
|
+
declare const QUALITY_HIGH: {
|
|
57
|
+
shadows: boolean;
|
|
58
|
+
bezierCurves: boolean;
|
|
59
|
+
animations: boolean;
|
|
60
|
+
textQuality: "high";
|
|
61
|
+
antialiasing: boolean;
|
|
62
|
+
};
|
|
63
|
+
declare const QUALITY_MEDIUM: {
|
|
64
|
+
shadows: boolean;
|
|
65
|
+
bezierCurves: boolean;
|
|
66
|
+
animations: boolean;
|
|
67
|
+
textQuality: "medium";
|
|
68
|
+
antialiasing: boolean;
|
|
69
|
+
};
|
|
70
|
+
declare const QUALITY_LOW: {
|
|
71
|
+
shadows: boolean;
|
|
72
|
+
bezierCurves: boolean;
|
|
73
|
+
animations: boolean;
|
|
74
|
+
textQuality: "low";
|
|
75
|
+
antialiasing: boolean;
|
|
76
|
+
};
|
|
77
|
+
declare const FPS_SAMPLE_WINDOW = 60;
|
|
78
|
+
declare const FPS_UPDATE_INTERVAL = 1000;
|
|
79
|
+
declare const MEMORY_CHECK_INTERVAL = 5000;
|
|
80
|
+
declare const PERFORMANCE_TOAST_COOLDOWN = 10000;
|
|
81
|
+
declare const FPS_DOWNGRADE_THRESHOLD = 45;
|
|
82
|
+
declare const FPS_UPGRADE_THRESHOLD = 58;
|
|
83
|
+
declare const FPS_STABILIZATION_FRAMES = 180;
|
|
84
|
+
declare const DEFAULT_CANVAS_WIDTH = 1920;
|
|
85
|
+
declare const DEFAULT_CANVAS_HEIGHT = 1080;
|
|
86
|
+
declare const CLICK_THRESHOLD = 5;
|
|
87
|
+
declare const DOUBLE_CLICK_DELAY = 300;
|
|
88
|
+
declare const DRAG_START_DISTANCE = 10;
|
|
89
|
+
declare const MAX_NODES = 20000;
|
|
90
|
+
declare const CIRCULAR_REFERENCE_MAX_DEPTH = 1000;
|
|
91
|
+
declare const RESIZE_DEBOUNCE = 300;
|
|
92
|
+
declare const SCROLL_THROTTLE = 16;
|
|
93
|
+
declare const SEARCH_DEBOUNCE = 500;
|
|
94
|
+
/** Node count thresholds that gate optimisation strategies. */
|
|
95
|
+
declare const NODE_COUNT_THRESHOLDS: {
|
|
96
|
+
readonly SPATIAL_INDEX_MIN: 100;
|
|
97
|
+
readonly VIEWPORT_CULLING_MIN: 500;
|
|
98
|
+
readonly CANVAS_RENDERING_MIN: 2000;
|
|
99
|
+
readonly DOM_RENDERING_MAX: 5000;
|
|
100
|
+
};
|
|
101
|
+
/** Viewport buffer configuration. */
|
|
102
|
+
declare const VIEWPORT_CONFIG: {
|
|
103
|
+
readonly BUFFER_PERCENT: 0.2;
|
|
104
|
+
readonly MIN_VISIBLE_NODES: 10;
|
|
105
|
+
};
|
|
106
|
+
|
|
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
|
+
declare const LAYOUT_SPACING: {
|
|
304
|
+
readonly nodeSpacing: 200;
|
|
305
|
+
readonly levelSpacing: 150;
|
|
306
|
+
readonly containerPadding: 20;
|
|
307
|
+
readonly gridSize: 50;
|
|
308
|
+
};
|
|
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
|
+
|
|
336
|
+
declare const DEFAULT_RENDER_CONFIG: RenderConfig;
|
|
337
|
+
declare const SIMPLIFIED_RENDER_CONFIG: RenderConfig;
|
|
338
|
+
declare const QUALITY_SETTINGS: {
|
|
339
|
+
readonly high: {
|
|
340
|
+
shadows: boolean;
|
|
341
|
+
bezierCurves: boolean;
|
|
342
|
+
animations: boolean;
|
|
343
|
+
textQuality: "high";
|
|
344
|
+
antialiasing: boolean;
|
|
345
|
+
};
|
|
346
|
+
readonly medium: {
|
|
347
|
+
shadows: boolean;
|
|
348
|
+
bezierCurves: boolean;
|
|
349
|
+
animations: boolean;
|
|
350
|
+
textQuality: "medium";
|
|
351
|
+
antialiasing: boolean;
|
|
352
|
+
};
|
|
353
|
+
readonly low: {
|
|
354
|
+
shadows: boolean;
|
|
355
|
+
bezierCurves: boolean;
|
|
356
|
+
animations: boolean;
|
|
357
|
+
textQuality: "low";
|
|
358
|
+
antialiasing: boolean;
|
|
359
|
+
};
|
|
360
|
+
};
|
|
361
|
+
declare const FEATURE_FLAGS: {
|
|
362
|
+
readonly viewportCulling: true;
|
|
363
|
+
readonly spatialIndexing: true;
|
|
364
|
+
readonly shadows: true;
|
|
365
|
+
readonly bezierCurves: true;
|
|
366
|
+
readonly animations: true;
|
|
367
|
+
readonly branchBadges: true;
|
|
368
|
+
readonly autoQualityAdjustment: true;
|
|
369
|
+
readonly performanceMonitoring: true;
|
|
370
|
+
readonly performanceToasts: true;
|
|
371
|
+
readonly debugOverlay: false;
|
|
372
|
+
readonly showFPS: false;
|
|
373
|
+
readonly showMemory: false;
|
|
374
|
+
readonly showVisibleCount: false;
|
|
375
|
+
};
|
|
376
|
+
type RenderMode = RenderConfig['renderMode'];
|
|
377
|
+
type QualityLevel = RenderConfig['qualityLevel'];
|
|
378
|
+
declare const RENDER_MODES: {
|
|
379
|
+
readonly canvas: {
|
|
380
|
+
readonly name: "Canvas";
|
|
381
|
+
readonly description: "Full Konva canvas rendering with all features";
|
|
382
|
+
readonly features: {
|
|
383
|
+
readonly culling: true;
|
|
384
|
+
readonly shadows: true;
|
|
385
|
+
readonly bezierCurves: true;
|
|
386
|
+
readonly animations: true;
|
|
387
|
+
};
|
|
388
|
+
};
|
|
389
|
+
readonly simplified: {
|
|
390
|
+
readonly name: "Simplified";
|
|
391
|
+
readonly description: "Reduced feature set for low-end devices";
|
|
392
|
+
readonly features: {
|
|
393
|
+
readonly culling: true;
|
|
394
|
+
readonly shadows: false;
|
|
395
|
+
readonly bezierCurves: false;
|
|
396
|
+
readonly animations: false;
|
|
397
|
+
};
|
|
398
|
+
};
|
|
399
|
+
};
|
|
400
|
+
declare const QUALITY_LEVELS: {
|
|
401
|
+
readonly high: {
|
|
402
|
+
readonly name: "High";
|
|
403
|
+
readonly description: "All visual features enabled";
|
|
404
|
+
readonly targetFPS: 60;
|
|
405
|
+
readonly features: {
|
|
406
|
+
shadows: boolean;
|
|
407
|
+
bezierCurves: boolean;
|
|
408
|
+
animations: boolean;
|
|
409
|
+
textQuality: "high";
|
|
410
|
+
antialiasing: boolean;
|
|
411
|
+
};
|
|
412
|
+
};
|
|
413
|
+
readonly medium: {
|
|
414
|
+
readonly name: "Medium";
|
|
415
|
+
readonly description: "Shadows disabled, other features enabled";
|
|
416
|
+
readonly targetFPS: 60;
|
|
417
|
+
readonly features: {
|
|
418
|
+
shadows: boolean;
|
|
419
|
+
bezierCurves: boolean;
|
|
420
|
+
animations: boolean;
|
|
421
|
+
textQuality: "medium";
|
|
422
|
+
antialiasing: boolean;
|
|
423
|
+
};
|
|
424
|
+
};
|
|
425
|
+
readonly low: {
|
|
426
|
+
readonly name: "Low";
|
|
427
|
+
readonly description: "Minimal visual features, max performance";
|
|
428
|
+
readonly targetFPS: 30;
|
|
429
|
+
readonly features: {
|
|
430
|
+
shadows: boolean;
|
|
431
|
+
bezierCurves: boolean;
|
|
432
|
+
animations: boolean;
|
|
433
|
+
textQuality: "low";
|
|
434
|
+
antialiasing: boolean;
|
|
435
|
+
};
|
|
436
|
+
};
|
|
437
|
+
};
|
|
438
|
+
declare function getOptimalQualityLevel(currentFPS: number, currentQuality: QualityLevel): QualityLevel;
|
|
439
|
+
declare function getRenderConfigForQuality(quality: QualityLevel): Partial<RenderConfig>;
|
|
440
|
+
declare function isFeatureEnabled(featureName: keyof typeof FEATURE_FLAGS, config: RenderConfig): boolean;
|
|
441
|
+
/**
|
|
442
|
+
* Recommend a render config based on detected device memory (browser only).
|
|
443
|
+
* Falls back to SIMPLIFIED_RENDER_CONFIG when the Performance Memory API is
|
|
444
|
+
* unavailable or memory is constrained.
|
|
445
|
+
*/
|
|
446
|
+
declare function getRecommendedRenderConfig(): RenderConfig;
|
|
447
|
+
|
|
448
|
+
export { BORDER_WIDTH_NORMAL, BORDER_WIDTH_SELECTED, BRAND_COLORS, CANVAS_COLORS, CHAR_WIDTH, CIRCULAR_REFERENCE_MAX_DEPTH, CLICK_THRESHOLD, COLOR_BORDER_DARK, COLOR_BORDER_LIGHT, COLOR_DEFAULT_NODE, COLOR_SELECTED, CORNER_RADIUS, CULLING_QUERY_TIME_BUDGET, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_WIDTH, DEFAULT_RENDER_CONFIG, DOUBLE_CLICK_DELAY, DRAG_START_DISTANCE, DS_COLORS, DS_RADII, DS_TYPOGRAPHY, FEATURE_FLAGS, FONTS, FONT_SIZES, 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, LEVEL_COLORS, LEVEL_COLOR_ARRAY, 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, NODE_HEIGHT, NODE_MIN_WIDTH, NODE_PADDING, PARENT_FALLBACK_COLORS, 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, SEMANTIC_COLORS, SIMPLIFIED_RENDER_CONFIG, SPACING, SPATIAL_INDEX_BUILD_BUDGET, TARGET_FRAME_TIME, TEXT_LABEL_HIDE_BELOW_ZOOM, THEME_COLORS, TIMING_THRESHOLDS, TITLE_MAX_LENGTH, VIEWPORT_CONFIG, VIEWPORT_MARGIN, ZOOM_DEFAULT, ZOOM_MAX, ZOOM_MIN, ZOOM_NAV_IN_THRESHOLD, ZOOM_NAV_OUT_THRESHOLD, ZOOM_STEP, ZOOM_WHEEL_SENSITIVITY, darkenHexColor, getColorForLevel, getOptimalQualityLevel, getRecommendedRenderConfig, getRenderConfigForQuality, getThemeBackground, getThemeBorder, getThemeText, isFeatureEnabled };
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DEFAULT_RENDER_CONFIG,
|
|
3
|
+
FEATURE_FLAGS,
|
|
4
|
+
QUALITY_LEVELS,
|
|
5
|
+
QUALITY_SETTINGS,
|
|
6
|
+
RENDER_MODES,
|
|
7
|
+
SIMPLIFIED_RENDER_CONFIG,
|
|
8
|
+
getOptimalQualityLevel,
|
|
9
|
+
getRecommendedRenderConfig,
|
|
10
|
+
getRenderConfigForQuality,
|
|
11
|
+
isFeatureEnabled
|
|
12
|
+
} from "../chunk-I75TMOE4.js";
|
|
13
|
+
import {
|
|
14
|
+
BRAND_COLORS,
|
|
15
|
+
CANVAS_COLORS,
|
|
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";
|
|
34
|
+
import {
|
|
35
|
+
BORDER_WIDTH_NORMAL,
|
|
36
|
+
BORDER_WIDTH_SELECTED,
|
|
37
|
+
CHAR_WIDTH,
|
|
38
|
+
CIRCULAR_REFERENCE_MAX_DEPTH,
|
|
39
|
+
CLICK_THRESHOLD,
|
|
40
|
+
COLOR_BORDER_DARK,
|
|
41
|
+
COLOR_BORDER_LIGHT,
|
|
42
|
+
COLOR_DEFAULT_NODE,
|
|
43
|
+
COLOR_SELECTED,
|
|
44
|
+
CORNER_RADIUS,
|
|
45
|
+
CULLING_QUERY_TIME_BUDGET,
|
|
46
|
+
DEFAULT_CANVAS_HEIGHT,
|
|
47
|
+
DEFAULT_CANVAS_WIDTH,
|
|
48
|
+
DOUBLE_CLICK_DELAY,
|
|
49
|
+
DRAG_START_DISTANCE,
|
|
50
|
+
FPS_CRITICAL_THRESHOLD,
|
|
51
|
+
FPS_DOWNGRADE_THRESHOLD,
|
|
52
|
+
FPS_SAMPLE_WINDOW,
|
|
53
|
+
FPS_STABILIZATION_FRAMES,
|
|
54
|
+
FPS_TARGET,
|
|
55
|
+
FPS_TARGETS,
|
|
56
|
+
FPS_UPDATE_INTERVAL,
|
|
57
|
+
FPS_UPGRADE_THRESHOLD,
|
|
58
|
+
FPS_WARNING_THRESHOLD,
|
|
59
|
+
MAX_FRAME_TIME,
|
|
60
|
+
MAX_NODES,
|
|
61
|
+
MAX_VISIBLE_NODES,
|
|
62
|
+
MEMORY_CHECK_INTERVAL,
|
|
63
|
+
MEMORY_CRITICAL_MB,
|
|
64
|
+
MEMORY_LIMITS,
|
|
65
|
+
MEMORY_TARGET_MB,
|
|
66
|
+
MEMORY_WARNING_MB,
|
|
67
|
+
NODE_COUNT_THRESHOLDS,
|
|
68
|
+
NODE_HEIGHT,
|
|
69
|
+
NODE_MIN_WIDTH,
|
|
70
|
+
NODE_PADDING,
|
|
71
|
+
PERFORMANCE_TOAST_COOLDOWN,
|
|
72
|
+
QUALITY_HIGH,
|
|
73
|
+
QUALITY_LOW,
|
|
74
|
+
QUALITY_MEDIUM,
|
|
75
|
+
RBUSH_MAX_ENTRIES,
|
|
76
|
+
RESIZE_DEBOUNCE,
|
|
77
|
+
SCROLL_THROTTLE,
|
|
78
|
+
SEARCH_DEBOUNCE,
|
|
79
|
+
SPATIAL_INDEX_BUILD_BUDGET,
|
|
80
|
+
TARGET_FRAME_TIME,
|
|
81
|
+
TEXT_LABEL_HIDE_BELOW_ZOOM,
|
|
82
|
+
TIMING_THRESHOLDS,
|
|
83
|
+
TITLE_MAX_LENGTH,
|
|
84
|
+
VIEWPORT_CONFIG,
|
|
85
|
+
VIEWPORT_MARGIN,
|
|
86
|
+
ZOOM_DEFAULT,
|
|
87
|
+
ZOOM_MAX,
|
|
88
|
+
ZOOM_MIN,
|
|
89
|
+
ZOOM_NAV_IN_THRESHOLD,
|
|
90
|
+
ZOOM_NAV_OUT_THRESHOLD,
|
|
91
|
+
ZOOM_STEP,
|
|
92
|
+
ZOOM_WHEEL_SENSITIVITY
|
|
93
|
+
} from "../chunk-LDJRGT2Q.js";
|
|
94
|
+
export {
|
|
95
|
+
BORDER_WIDTH_NORMAL,
|
|
96
|
+
BORDER_WIDTH_SELECTED,
|
|
97
|
+
BRAND_COLORS,
|
|
98
|
+
CANVAS_COLORS,
|
|
99
|
+
CHAR_WIDTH,
|
|
100
|
+
CIRCULAR_REFERENCE_MAX_DEPTH,
|
|
101
|
+
CLICK_THRESHOLD,
|
|
102
|
+
COLOR_BORDER_DARK,
|
|
103
|
+
COLOR_BORDER_LIGHT,
|
|
104
|
+
COLOR_DEFAULT_NODE,
|
|
105
|
+
COLOR_SELECTED,
|
|
106
|
+
CORNER_RADIUS,
|
|
107
|
+
CULLING_QUERY_TIME_BUDGET,
|
|
108
|
+
DEFAULT_CANVAS_HEIGHT,
|
|
109
|
+
DEFAULT_CANVAS_WIDTH,
|
|
110
|
+
DEFAULT_RENDER_CONFIG,
|
|
111
|
+
DOUBLE_CLICK_DELAY,
|
|
112
|
+
DRAG_START_DISTANCE,
|
|
113
|
+
DS_COLORS,
|
|
114
|
+
DS_RADII,
|
|
115
|
+
DS_TYPOGRAPHY,
|
|
116
|
+
FEATURE_FLAGS,
|
|
117
|
+
FONTS,
|
|
118
|
+
FONT_SIZES,
|
|
119
|
+
FPS_CRITICAL_THRESHOLD,
|
|
120
|
+
FPS_DOWNGRADE_THRESHOLD,
|
|
121
|
+
FPS_SAMPLE_WINDOW,
|
|
122
|
+
FPS_STABILIZATION_FRAMES,
|
|
123
|
+
FPS_TARGET,
|
|
124
|
+
FPS_TARGETS,
|
|
125
|
+
FPS_UPDATE_INTERVAL,
|
|
126
|
+
FPS_UPGRADE_THRESHOLD,
|
|
127
|
+
FPS_WARNING_THRESHOLD,
|
|
128
|
+
LAYOUT_SPACING,
|
|
129
|
+
LEVEL_COLORS,
|
|
130
|
+
LEVEL_COLOR_ARRAY,
|
|
131
|
+
MAX_FRAME_TIME,
|
|
132
|
+
MAX_NODES,
|
|
133
|
+
MAX_VISIBLE_NODES,
|
|
134
|
+
MEMORY_CHECK_INTERVAL,
|
|
135
|
+
MEMORY_CRITICAL_MB,
|
|
136
|
+
MEMORY_LIMITS,
|
|
137
|
+
MEMORY_TARGET_MB,
|
|
138
|
+
MEMORY_WARNING_MB,
|
|
139
|
+
NODE_COUNT_THRESHOLDS,
|
|
140
|
+
NODE_HEIGHT,
|
|
141
|
+
NODE_MIN_WIDTH,
|
|
142
|
+
NODE_PADDING,
|
|
143
|
+
PARENT_FALLBACK_COLORS,
|
|
144
|
+
PERFORMANCE_TOAST_COOLDOWN,
|
|
145
|
+
QUALITY_HIGH,
|
|
146
|
+
QUALITY_LEVELS,
|
|
147
|
+
QUALITY_LOW,
|
|
148
|
+
QUALITY_MEDIUM,
|
|
149
|
+
QUALITY_SETTINGS,
|
|
150
|
+
RBUSH_MAX_ENTRIES,
|
|
151
|
+
RENDER_MODES,
|
|
152
|
+
RESIZE_DEBOUNCE,
|
|
153
|
+
SCROLL_THROTTLE,
|
|
154
|
+
SEARCH_DEBOUNCE,
|
|
155
|
+
SEMANTIC_COLORS,
|
|
156
|
+
SIMPLIFIED_RENDER_CONFIG,
|
|
157
|
+
SPACING,
|
|
158
|
+
SPATIAL_INDEX_BUILD_BUDGET,
|
|
159
|
+
TARGET_FRAME_TIME,
|
|
160
|
+
TEXT_LABEL_HIDE_BELOW_ZOOM,
|
|
161
|
+
THEME_COLORS,
|
|
162
|
+
TIMING_THRESHOLDS,
|
|
163
|
+
TITLE_MAX_LENGTH,
|
|
164
|
+
VIEWPORT_CONFIG,
|
|
165
|
+
VIEWPORT_MARGIN,
|
|
166
|
+
ZOOM_DEFAULT,
|
|
167
|
+
ZOOM_MAX,
|
|
168
|
+
ZOOM_MIN,
|
|
169
|
+
ZOOM_NAV_IN_THRESHOLD,
|
|
170
|
+
ZOOM_NAV_OUT_THRESHOLD,
|
|
171
|
+
ZOOM_STEP,
|
|
172
|
+
ZOOM_WHEEL_SENSITIVITY,
|
|
173
|
+
darkenHexColor,
|
|
174
|
+
getColorForLevel,
|
|
175
|
+
getOptimalQualityLevel,
|
|
176
|
+
getRecommendedRenderConfig,
|
|
177
|
+
getRenderConfigForQuality,
|
|
178
|
+
getThemeBackground,
|
|
179
|
+
getThemeBorder,
|
|
180
|
+
getThemeText,
|
|
181
|
+
isFeatureEnabled
|
|
182
|
+
};
|
|
183
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { Connection, Container, Node, Meta } from '@visualli/bindings';
|
|
2
|
+
|
|
3
|
+
/** Alias to schema Node type for SDK consistency */
|
|
4
|
+
type LayerNode = Node;
|
|
5
|
+
/** Alias to schema Connection type for SDK consistency */
|
|
6
|
+
type LayerConnection = Connection;
|
|
7
|
+
/** Alias to schema Container type for SDK consistency */
|
|
8
|
+
type LayerContainer = Container;
|
|
9
|
+
/**
|
|
10
|
+
* SDK's stricter version of schema Layer.
|
|
11
|
+
* - Makes nodes/connections/containers required (always arrays, even if empty)
|
|
12
|
+
* - Adds SDK-specific `description` field
|
|
13
|
+
* - Explicitly types key fields to avoid 'unknown' from schema's index signature
|
|
14
|
+
*/
|
|
15
|
+
interface VisualliLayer {
|
|
16
|
+
type: 'layer';
|
|
17
|
+
/** UUID of the layer */
|
|
18
|
+
id: string;
|
|
19
|
+
/** Hierarchy level (0 = root) */
|
|
20
|
+
level: number;
|
|
21
|
+
/** UUID of the parent layer */
|
|
22
|
+
parentLayerId?: string;
|
|
23
|
+
/** UUID of the specific node in parent layer */
|
|
24
|
+
parentNodeId?: string;
|
|
25
|
+
/** SDK-specific description field (not in schema) */
|
|
26
|
+
description?: string;
|
|
27
|
+
/** Spatial arrangement (inherits from schema) */
|
|
28
|
+
layout?: 'radial' | 'linear-horizontal' | 'linear-vertical';
|
|
29
|
+
/** Required array of nodes (schema has optional) */
|
|
30
|
+
nodes: LayerNode[];
|
|
31
|
+
/** Required array of connections (schema has optional) */
|
|
32
|
+
connections: LayerConnection[];
|
|
33
|
+
/** Required array of containers (schema has optional) */
|
|
34
|
+
containers: LayerContainer[];
|
|
35
|
+
}
|
|
36
|
+
/** Intermediate format for rendering – converts VisualliLayer to flat nodes. */
|
|
37
|
+
interface VisualliRenderNode {
|
|
38
|
+
id: string;
|
|
39
|
+
x: number;
|
|
40
|
+
y: number;
|
|
41
|
+
title: string;
|
|
42
|
+
summary: string;
|
|
43
|
+
level: number;
|
|
44
|
+
layerId: string;
|
|
45
|
+
layerLevel: number;
|
|
46
|
+
color: string;
|
|
47
|
+
width: number;
|
|
48
|
+
height: number;
|
|
49
|
+
branchCount: number;
|
|
50
|
+
}
|
|
51
|
+
interface VisualliRenderConnection {
|
|
52
|
+
id: string;
|
|
53
|
+
from: string;
|
|
54
|
+
to: string;
|
|
55
|
+
label?: string;
|
|
56
|
+
style?: 'dashed' | 'solid';
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/** Alias to schema Meta type for SDK consistency */
|
|
60
|
+
type VisualliMeta = Meta;
|
|
61
|
+
|
|
62
|
+
/** Parsed .visualli document structure. */
|
|
63
|
+
interface VisualliDocument {
|
|
64
|
+
meta: VisualliMeta;
|
|
65
|
+
/** Keyed by layer ID */
|
|
66
|
+
layers: Map<string, VisualliLayer>;
|
|
67
|
+
/** Quick lookup by level */
|
|
68
|
+
layersByLevel: Map<number, VisualliLayer[]>;
|
|
69
|
+
/** The level-0 layer */
|
|
70
|
+
rootLayer: VisualliLayer | null;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export type { LayerConnection as L, VisualliDocument as V, VisualliLayer as a, LayerContainer as b, LayerNode as c, VisualliMeta as d, VisualliRenderConnection as e, VisualliRenderNode as f };
|