@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.
- package/README.md +37 -105
- package/dist/chunk-25AJTPMS.js +68 -0
- package/dist/chunk-25AJTPMS.js.map +1 -0
- package/dist/chunk-64PUANNH.js +151 -0
- package/dist/chunk-64PUANNH.js.map +1 -0
- package/dist/chunk-ITDZ72JE.js +96 -0
- package/dist/chunk-ITDZ72JE.js.map +1 -0
- package/dist/{chunk-PDP5CVUL.js → chunk-LOQLNYB3.js} +2 -2
- 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-RFMUATWB.js +753 -0
- package/dist/chunk-RFMUATWB.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/{chunk-6NXADJK2.js → chunk-WO4JAAKP.js} +84 -117
- package/dist/chunk-WO4JAAKP.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-D49xVfr8.d.cts +150 -0
- package/dist/designSystem-D49xVfr8.d.ts +150 -0
- package/dist/document-BFBwn93X.d.ts +26 -0
- package/dist/document-MEJEfxl3.d.cts +26 -0
- package/dist/ideaSize-BTJu6thN.d.cts +11 -0
- package/dist/ideaSize-RKbms8K6.d.ts +11 -0
- package/dist/index-CcF0Jvmb.d.ts +99 -0
- package/dist/index-Dt--T2l8.d.cts +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 +434 -179
- 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-BO3YD5qu.d.cts +182 -0
- package/dist/mindmap-D0Of0jaZ.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 +12 -4
- 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,9 @@
|
|
|
1
1
|
// ─── Performance & Rendering Constants ───────────────────────────────────────
|
|
2
|
+
//
|
|
3
|
+
// Performance budgets and interaction thresholds. Visual values (colours,
|
|
4
|
+
// stroke widths, node size, zoom range) come from the design system tokens.
|
|
5
|
+
|
|
6
|
+
import { VIEW } from '../generated/geometry/interaction.js';
|
|
2
7
|
|
|
3
8
|
// ── FPS ───────────────────────────────────────────────────────────────────────
|
|
4
9
|
|
|
@@ -50,36 +55,12 @@ export const CULLING_QUERY_TIME_BUDGET = 5;
|
|
|
50
55
|
export const RBUSH_MAX_ENTRIES = 16;
|
|
51
56
|
export const SPATIAL_INDEX_BUILD_BUDGET = 50;
|
|
52
57
|
|
|
53
|
-
// ── Node Dimensions ───────────────────────────────────────────────────────────
|
|
54
|
-
|
|
55
|
-
export const NODE_MIN_WIDTH = 200;
|
|
56
|
-
export const NODE_HEIGHT = 80;
|
|
57
|
-
export const NODE_PADDING = 40;
|
|
58
|
-
export const CHAR_WIDTH = 8;
|
|
59
|
-
export const TITLE_MAX_LENGTH = 150;
|
|
60
|
-
|
|
61
|
-
// ── Visual Styling ────────────────────────────────────────────────────────────
|
|
62
|
-
|
|
63
|
-
export const CORNER_RADIUS = 8;
|
|
64
|
-
export const BORDER_WIDTH_NORMAL = 2;
|
|
65
|
-
export const BORDER_WIDTH_SELECTED = 3;
|
|
66
|
-
|
|
67
|
-
export const COLOR_SELECTED = '#1B2D4F';
|
|
68
|
-
export const COLOR_BORDER_LIGHT = '#4A3728';
|
|
69
|
-
export const COLOR_BORDER_DARK = '#FAF6F1';
|
|
70
|
-
export const COLOR_DEFAULT_NODE = '#FAF6F1';
|
|
71
|
-
|
|
72
58
|
// ── Zoom Constraints ──────────────────────────────────────────────────────────
|
|
73
59
|
|
|
74
|
-
|
|
75
|
-
export const
|
|
60
|
+
// Zoom limits: the design system's VIEW (geometry/interaction.ts; equal to the zoom-min / zoom-max tokens).
|
|
61
|
+
export const ZOOM_MIN = VIEW.zoomMin;
|
|
62
|
+
export const ZOOM_MAX = VIEW.zoomMax;
|
|
76
63
|
export const ZOOM_DEFAULT = 1.0;
|
|
77
|
-
export const ZOOM_STEP = 0.1;
|
|
78
|
-
export const ZOOM_WHEEL_SENSITIVITY = 0.001;
|
|
79
|
-
|
|
80
|
-
export const ZOOM_NAV_IN_THRESHOLD = 2.7;
|
|
81
|
-
export const ZOOM_NAV_OUT_THRESHOLD = 0.4;
|
|
82
|
-
export const TEXT_LABEL_HIDE_BELOW_ZOOM = 0.3;
|
|
83
64
|
|
|
84
65
|
// ── Quality Level Presets ─────────────────────────────────────────────────────
|
|
85
66
|
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Generated — do not edit
|
|
2
|
+
|
|
3
|
+
Everything here is written by `scripts/gen-design-system.mjs` from the repo's root `design-system/` folder (the
|
|
4
|
+
Visualli design system, synced from visualli.ai). `npm run build` regenerates it; `npm run check:design` fails if it's
|
|
5
|
+
stale. To change anything here, change the design system upstream.
|
|
6
|
+
|
|
7
|
+
| Here | From | What |
|
|
8
|
+
|---|---|---|
|
|
9
|
+
| `designSystem.ts` | `design-system/tokens`, `css/spec.css` | Tokens for the 8 themes, metrics, type styles, `CANVAS_STYLE` |
|
|
10
|
+
| `geometry/*.ts` | `design-system/geometry/*.ts` | The rule modules, copied verbatim (shapes, motion, sizing, colors, containers, interaction, detail) |
|
|
11
|
+
|
|
12
|
+
`@visualli/react` has its own `src/generated/specCss.ts` (the spec CSS as strings, injected at runtime).
|