@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
package/src/types/document.ts
CHANGED
|
@@ -12,4 +12,13 @@ export interface VisualliDocument {
|
|
|
12
12
|
layersByLevel: Map<number, VisualliLayer[]>;
|
|
13
13
|
/** The level-0 layer */
|
|
14
14
|
rootLayer: VisualliLayer | null;
|
|
15
|
+
/** Extension payloads by extension id (e.g. 'semantic-anchors'). */
|
|
16
|
+
extensions?: Record<string, unknown[]>;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** A term with a definition (the `semantic-anchors` extension). */
|
|
20
|
+
export interface SemanticAnchor {
|
|
21
|
+
word: string;
|
|
22
|
+
description: string;
|
|
23
|
+
knowMoreUrl?: string | null;
|
|
15
24
|
}
|
package/src/types/layer.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// These types extend the auto-generated schema types from bindings.
|
|
4
4
|
// They provide stricter runtime guarantees (required arrays) and SDK-specific fields.
|
|
5
5
|
|
|
6
|
-
import type {
|
|
6
|
+
import type { Node, Connection, Container } from './schema.js';
|
|
7
7
|
|
|
8
8
|
/** Alias to schema Node type for SDK consistency */
|
|
9
9
|
export type LayerNode = Node;
|
package/src/types/mindmap.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
// ─── Mindmap Core Types ────────────────────────────────────────────────────────
|
|
2
2
|
|
|
3
|
+
import type { TopicName } from '../generated/designSystem.js';
|
|
4
|
+
import type { IdeaKind } from '../generated/geometry/idea.js';
|
|
5
|
+
|
|
3
6
|
export interface MindMapNode {
|
|
4
7
|
id: string;
|
|
5
8
|
title: string;
|
|
@@ -35,7 +38,15 @@ export interface FlatNode {
|
|
|
35
38
|
relationshipLabel?: string;
|
|
36
39
|
|
|
37
40
|
// Visual
|
|
41
|
+
/** Colour as authored in the document (any CSS colour, or a topic name); empty when the file gives none. */
|
|
38
42
|
color: string;
|
|
43
|
+
/** Design-system topic this idea is drawn with (fill + ring colour per theme): a named or missing colour. */
|
|
44
|
+
topic?: TopicName;
|
|
45
|
+
/** A colour that isn't a topic, drawn as given (the design system's customColor); `ring` null → the `edge` token. */
|
|
46
|
+
custom?: { fill: string; ring: string | null };
|
|
47
|
+
/** The idea's size kind (the design system's idea.ts): 'root' for a radial map's centre, else 'node'. */
|
|
48
|
+
kind?: IdeaKind;
|
|
49
|
+
/** The idea's size for its label (idea.ts ideaSize): the outline's half width is width / 2, half height height / 2. */
|
|
39
50
|
width: number;
|
|
40
51
|
height: number;
|
|
41
52
|
|
|
@@ -100,6 +111,8 @@ export interface MindMapConnection {
|
|
|
100
111
|
to: string;
|
|
101
112
|
level: number;
|
|
102
113
|
label?: string;
|
|
114
|
+
/** 'dashed' draws the connector dashed (design-system `is-dashed`). */
|
|
115
|
+
style?: 'solid' | 'dashed';
|
|
103
116
|
}
|
|
104
117
|
|
|
105
118
|
export interface TopLevelConnection {
|
package/src/utils/navigation.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { VisualliDocument, VisualliLayer, FlatNode, MindMapConnection } from '../types/index.js';
|
|
2
|
-
import {
|
|
2
|
+
import { fitView, layerBounds, type FrameBox } from '../generated/geometry/interaction.js';
|
|
3
|
+
import { containerHull } from '../generated/geometry/container.js';
|
|
3
4
|
|
|
4
5
|
// ── Connection helpers ────────────────────────────────────────────────────────
|
|
5
6
|
|
|
@@ -19,6 +20,7 @@ export function getConnectionsForLayer(
|
|
|
19
20
|
to: c.to,
|
|
20
21
|
level: layer.level,
|
|
21
22
|
label: c.data?.label,
|
|
23
|
+
style: c.data?.style === 'dashed' ? 'dashed' : 'solid',
|
|
22
24
|
} satisfies MindMapConnection));
|
|
23
25
|
}
|
|
24
26
|
|
|
@@ -51,7 +53,11 @@ export function getLayerForNavigation(
|
|
|
51
53
|
return getChildLayerForNode(doc, nodeId, currentLayerId);
|
|
52
54
|
}
|
|
53
55
|
|
|
54
|
-
// ──
|
|
56
|
+
// ── Fit to view ───────────────────────────────────────────────────────────────
|
|
57
|
+
//
|
|
58
|
+
// The design system's fit (geometry/interaction.ts → layerBounds / fitView): every
|
|
59
|
+
// idea at its real size with room around it, and every container hull with room for
|
|
60
|
+
// its name pill; never enlarging a layer beyond VIEW.fitMax.
|
|
55
61
|
|
|
56
62
|
export interface FitResult {
|
|
57
63
|
centerX: number;
|
|
@@ -59,65 +65,28 @@ export interface FitResult {
|
|
|
59
65
|
zoomLevel: number;
|
|
60
66
|
}
|
|
61
67
|
|
|
62
|
-
/**
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
export function calculateFitZoom(
|
|
70
|
-
nodes: FlatNode[],
|
|
71
|
-
canvasWidth: number,
|
|
72
|
-
canvasHeight: number,
|
|
73
|
-
padding = 0.15,
|
|
74
|
-
): number {
|
|
75
|
-
if (nodes.length === 0) return 1;
|
|
76
|
-
|
|
77
|
-
let minX = Infinity, minY = Infinity, maxX = -Infinity, maxY = -Infinity;
|
|
78
|
-
for (const n of nodes) {
|
|
79
|
-
// Use the actual node boundaries (center +/- half-width/height)
|
|
80
|
-
minX = Math.min(minX, n.x - n.width / 2);
|
|
81
|
-
minY = Math.min(minY, n.y - n.height / 2);
|
|
82
|
-
maxX = Math.max(maxX, n.x + n.width / 2);
|
|
83
|
-
maxY = Math.max(maxY, n.y + n.height / 2);
|
|
68
|
+
/** The box a layer is framed by: its ideas (their real sizes) and the hulls of its `containers`. */
|
|
69
|
+
export function layerFrame(nodes: ReadonlyArray<FlatNode>, containers: ReadonlyArray<{ nodeIds: string[] }> = []): FrameBox {
|
|
70
|
+
const byId = new Map(nodes.map((n) => [n.id, n]));
|
|
71
|
+
const hulls: FrameBox[] = [];
|
|
72
|
+
for (const c of containers) {
|
|
73
|
+
const hull = containerHull(c.nodeIds.flatMap((id) => { const n = byId.get(id); return n ? [{ x: n.x, y: n.y, rx: n.width / 2, ry: n.height / 2 }] : []; }));
|
|
74
|
+
if (hull) hulls.push(hull);
|
|
84
75
|
}
|
|
76
|
+
return layerBounds(nodes.map((n) => ({ x: n.x, y: n.y, rx: n.width / 2, ry: n.height / 2 })), hulls);
|
|
77
|
+
}
|
|
85
78
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
// Matches visualli.ai's spread logic for single nodes
|
|
91
|
-
const spreadW = nodes.length === 1 ? Math.max(rawW, 600) : rawW;
|
|
92
|
-
const spreadH = nodes.length === 1 ? Math.max(rawH, 400) : rawH;
|
|
93
|
-
|
|
94
|
-
const zoomX = (canvasWidth * (1 - padding)) / spreadW;
|
|
95
|
-
const zoomY = (canvasHeight * (1 - padding)) / spreadH;
|
|
96
|
-
|
|
97
|
-
const z = Math.min(zoomX, zoomY);
|
|
98
|
-
|
|
99
|
-
// Scale back 20% so nodes aren't edge-to-edge, clamp to at least
|
|
100
|
-
// ZOOM_NAV_OUT_THRESHOLD so arriving at the layer never immediately
|
|
101
|
-
// re-triggers the zoom-out transition.
|
|
102
|
-
return Math.max(z * 0.80, ZOOM_NAV_OUT_THRESHOLD);
|
|
79
|
+
/** The zoom that fits a layer's ideas (and container hulls) into a canvas of `canvasWidth` × `canvasHeight`. */
|
|
80
|
+
export function calculateFitZoom(nodes: FlatNode[], canvasWidth: number, canvasHeight: number, containers: ReadonlyArray<{ nodeIds: string[] }> = []): number {
|
|
81
|
+
if (nodes.length === 0) return 1;
|
|
82
|
+
return fitView(layerFrame(nodes, containers), canvasWidth, canvasHeight).scale;
|
|
103
83
|
}
|
|
104
84
|
|
|
105
|
-
/**
|
|
106
|
-
|
|
107
|
-
* of the viewport. Matches the visualli.ai `calculateFitCenter` approach:
|
|
108
|
-
* uses bounding-box midpoint rather than centroid so the layout is always
|
|
109
|
-
* geometrically centred.
|
|
110
|
-
*/
|
|
111
|
-
export function calculateFitCenter(nodes: FlatNode[]): { x: number; y: number } {
|
|
85
|
+
/** The world point a fitted layer is centred on: the middle of its frame. */
|
|
86
|
+
export function calculateFitCenter(nodes: FlatNode[], containers: ReadonlyArray<{ nodeIds: string[] }> = []): { x: number; y: number } {
|
|
112
87
|
if (nodes.length === 0) return { x: 0, y: 0 };
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
minX = Math.min(minX, n.x - n.width / 2);
|
|
116
|
-
minY = Math.min(minY, n.y - n.height / 2);
|
|
117
|
-
maxX = Math.max(maxX, n.x + n.width / 2);
|
|
118
|
-
maxY = Math.max(maxY, n.y + n.height / 2);
|
|
119
|
-
}
|
|
120
|
-
return { x: (minX + maxX) / 2, y: (minY + maxY) / 2 };
|
|
88
|
+
const f = layerFrame(nodes, containers);
|
|
89
|
+
return { x: (f.x0 + f.x1) / 2, y: (f.y0 + f.y1) / 2 };
|
|
121
90
|
}
|
|
122
91
|
|
|
123
92
|
// ── Container helpers ────────────────────────────────────────────────────────
|
|
@@ -131,7 +100,7 @@ export interface ContainerGroupInfo {
|
|
|
131
100
|
}
|
|
132
101
|
|
|
133
102
|
/**
|
|
134
|
-
* Returns the container groups
|
|
103
|
+
* Returns the container groups the given layer draws, normalising both the
|
|
135
104
|
* nested-data format `{data:{label,formation}}` and the flat format `{label}`.
|
|
136
105
|
*/
|
|
137
106
|
export function getContainersForLayer(
|
|
@@ -145,21 +114,22 @@ export function getContainersForLayer(
|
|
|
145
114
|
const containers = layer.containers ?? [];
|
|
146
115
|
if (!Array.isArray(containers)) return [];
|
|
147
116
|
|
|
148
|
-
|
|
117
|
+
// A container whose style is 'none' groups ideas without a hull or a name (the design system draws nothing for it).
|
|
118
|
+
return containers.filter(c => c.data?.style !== 'none').map(c => {
|
|
149
119
|
// Schema Container has nested data.label structure
|
|
150
120
|
const label = c.data?.label ?? c.id;
|
|
151
121
|
return { id: c.id, label, nodeIds: c.nodes, level: layer.level };
|
|
152
122
|
});
|
|
153
123
|
}
|
|
154
124
|
|
|
155
|
-
/**
|
|
125
|
+
/** Fit to view: centre and zoom for a layer in one call (the design system's fitView). */
|
|
156
126
|
export function calculateFitView(
|
|
157
127
|
nodes: FlatNode[],
|
|
158
128
|
canvasWidth: number,
|
|
159
129
|
canvasHeight: number,
|
|
130
|
+
containers: ReadonlyArray<{ nodeIds: string[] }> = [],
|
|
160
131
|
): FitResult {
|
|
161
|
-
|
|
162
|
-
const
|
|
163
|
-
return { centerX: center.x, centerY: center.y, zoomLevel:
|
|
132
|
+
if (nodes.length === 0) return { centerX: 0, centerY: 0, zoomLevel: 1 };
|
|
133
|
+
const { scale, center } = fitView(layerFrame(nodes, containers), canvasWidth, canvasHeight);
|
|
134
|
+
return { centerX: center.x, centerY: center.y, zoomLevel: scale };
|
|
164
135
|
}
|
|
165
|
-
|
|
@@ -91,9 +91,10 @@ export function screenToWorld(
|
|
|
91
91
|
|
|
92
92
|
// ── Pan / Zoom ────────────────────────────────────────────────────────────────
|
|
93
93
|
|
|
94
|
-
/** Clamp zoom to
|
|
95
|
-
|
|
96
|
-
|
|
94
|
+
/** Clamp zoom to the design system's limits (VIEW: ZOOM_MIN–ZOOM_MAX), which apply to the zoom relative to the
|
|
95
|
+
* layer's fit (`fit`: the fit-to-view scale), as in the design system's map (scale = fit × zoom). */
|
|
96
|
+
export function clampZoom(zoom: number, fit = 1): number {
|
|
97
|
+
return Math.min(ZOOM_MAX * fit, Math.max(ZOOM_MIN * fit, zoom));
|
|
97
98
|
}
|
|
98
99
|
|
|
99
100
|
/**
|
|
@@ -134,8 +135,9 @@ export function zoomViewport(
|
|
|
134
135
|
pivotY?: number,
|
|
135
136
|
canvasWidth = DEFAULT_CANVAS_WIDTH,
|
|
136
137
|
canvasHeight = DEFAULT_CANVAS_HEIGHT,
|
|
138
|
+
fit = 1,
|
|
137
139
|
): ViewportState {
|
|
138
|
-
const newZoom = clampZoom(viewport.zoomLevel * (1 + delta));
|
|
140
|
+
const newZoom = clampZoom(viewport.zoomLevel * (1 + delta), fit);
|
|
139
141
|
|
|
140
142
|
let cx = viewport.centerX;
|
|
141
143
|
let cy = viewport.centerY;
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/animations/index.ts
|
|
21
|
-
var animations_exports = {};
|
|
22
|
-
__export(animations_exports, {
|
|
23
|
-
ANIMATION_DURATION: () => ANIMATION_DURATION,
|
|
24
|
-
ANIMATION_PHASES: () => ANIMATION_PHASES,
|
|
25
|
-
COOLDOWN: () => COOLDOWN,
|
|
26
|
-
OPACITY: () => OPACITY,
|
|
27
|
-
TARGET_ZOOM: () => TARGET_ZOOM,
|
|
28
|
-
VIEWPORT_FRAMING: () => VIEWPORT_FRAMING,
|
|
29
|
-
ZOOM_THRESHOLDS: () => ZOOM_THRESHOLDS,
|
|
30
|
-
createCubicBezier: () => createCubicBezier,
|
|
31
|
-
easeInCubic: () => easeInCubic,
|
|
32
|
-
easeInOutCubic: () => easeInOutCubic,
|
|
33
|
-
easeInOutQuart: () => easeInOutQuart,
|
|
34
|
-
easeInOutSine: () => easeInOutSine,
|
|
35
|
-
easeOutCubic: () => easeOutCubic,
|
|
36
|
-
easeOutQuad: () => easeOutQuad,
|
|
37
|
-
easeZoomTransition: () => easeZoomTransition
|
|
38
|
-
});
|
|
39
|
-
module.exports = __toCommonJS(animations_exports);
|
|
40
|
-
|
|
41
|
-
// src/animations/easing.ts
|
|
42
|
-
var easeInOutCubic = (t) => t < 0.5 ? 4 * t * t * t : 1 - Math.pow(-2 * t + 2, 3) / 2;
|
|
43
|
-
var easeInOutQuart = (t) => t < 0.5 ? 8 * t * t * t * t : 1 - Math.pow(-2 * t + 2, 4) / 2;
|
|
44
|
-
var easeOutCubic = (t) => 1 - Math.pow(1 - t, 3);
|
|
45
|
-
var easeInCubic = (t) => t * t * t;
|
|
46
|
-
var easeOutQuad = (t) => 1 - (1 - t) * (1 - t);
|
|
47
|
-
var easeInOutSine = (t) => -(Math.cos(Math.PI * t) - 1) / 2;
|
|
48
|
-
function createCubicBezier(x1, y1, x2, y2) {
|
|
49
|
-
const N = 256;
|
|
50
|
-
const lut = new Float64Array(N + 1);
|
|
51
|
-
for (let i = 0; i <= N; i++) {
|
|
52
|
-
const target = i / N;
|
|
53
|
-
let lo = 0, hi = 1;
|
|
54
|
-
for (let j = 0; j < 20; j++) {
|
|
55
|
-
const mid = (lo + hi) / 2;
|
|
56
|
-
const om = 1 - mid;
|
|
57
|
-
const x = 3 * om * om * mid * x1 + 3 * om * mid * mid * x2 + mid * mid * mid;
|
|
58
|
-
if (x < target) lo = mid;
|
|
59
|
-
else hi = mid;
|
|
60
|
-
}
|
|
61
|
-
const u = (lo + hi) / 2;
|
|
62
|
-
const ou = 1 - u;
|
|
63
|
-
lut[i] = 3 * ou * ou * u * y1 + 3 * ou * u * u * y2 + u * u * u;
|
|
64
|
-
}
|
|
65
|
-
return (t) => {
|
|
66
|
-
if (t <= 0) return 0;
|
|
67
|
-
if (t >= 1) return 1;
|
|
68
|
-
const s = t * N;
|
|
69
|
-
const i = s | 0;
|
|
70
|
-
return lut[i] + (lut[i + 1] - lut[i]) * (s - i);
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
var easeZoomTransition = createCubicBezier(0.2, 0.8, 0.2, 1);
|
|
74
|
-
|
|
75
|
-
// src/animations/constants.ts
|
|
76
|
-
var ANIMATION_DURATION = {
|
|
77
|
-
ZOOM_IN_LAYER: 500,
|
|
78
|
-
ZOOM_OUT_LAYER: 500,
|
|
79
|
-
ZOOM_GESTURE: 500,
|
|
80
|
-
FADE_OUT: 200,
|
|
81
|
-
FADE_IN: 250,
|
|
82
|
-
COLOR_TRANSITION: 500,
|
|
83
|
-
CURSOR_CHANGE: 150,
|
|
84
|
-
LOADING_FADE: 200
|
|
85
|
-
};
|
|
86
|
-
var ANIMATION_PHASES = {
|
|
87
|
-
ZOOM_IN: {
|
|
88
|
-
ZOOM_TO_TARGET: 500,
|
|
89
|
-
FADE_OUT_START: 120,
|
|
90
|
-
FADE_OUT: 280,
|
|
91
|
-
CONTENT_SWAP: 310,
|
|
92
|
-
FADE_IN: 200,
|
|
93
|
-
TOTAL: 510
|
|
94
|
-
},
|
|
95
|
-
ZOOM_OUT: {
|
|
96
|
-
FADE_OUT: 200,
|
|
97
|
-
ZOOM_BACK: 50,
|
|
98
|
-
FADE_IN: 250,
|
|
99
|
-
TOTAL: 500
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
|
-
var ZOOM_THRESHOLDS = {
|
|
103
|
-
ENTER_LAYER: 5,
|
|
104
|
-
EXIT_LAYER: 0.5,
|
|
105
|
-
GESTURE_TRIGGER: 0.8
|
|
106
|
-
};
|
|
107
|
-
var COOLDOWN = {
|
|
108
|
-
NAVIGATION: 1e3,
|
|
109
|
-
ZOOM_GESTURE: 800,
|
|
110
|
-
DOUBLE_CLICK: 200
|
|
111
|
-
};
|
|
112
|
-
var OPACITY = {
|
|
113
|
-
VISIBLE: 1,
|
|
114
|
-
HIDDEN: 0,
|
|
115
|
-
TRANSITIONING: 0.3
|
|
116
|
-
};
|
|
117
|
-
var TARGET_ZOOM = {
|
|
118
|
-
NORMAL: 1,
|
|
119
|
-
FOCUSED: 0.8,
|
|
120
|
-
FILL_NODE: 3,
|
|
121
|
-
DETAIL: 2
|
|
122
|
-
};
|
|
123
|
-
var VIEWPORT_FRAMING = {
|
|
124
|
-
NODE_FILL_RATIO: 0.7,
|
|
125
|
-
EXIT_NODE_SIZE: 0.4,
|
|
126
|
-
PADDING_RATIO: 0.1
|
|
127
|
-
};
|
|
128
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
129
|
-
0 && (module.exports = {
|
|
130
|
-
ANIMATION_DURATION,
|
|
131
|
-
ANIMATION_PHASES,
|
|
132
|
-
COOLDOWN,
|
|
133
|
-
OPACITY,
|
|
134
|
-
TARGET_ZOOM,
|
|
135
|
-
VIEWPORT_FRAMING,
|
|
136
|
-
ZOOM_THRESHOLDS,
|
|
137
|
-
createCubicBezier,
|
|
138
|
-
easeInCubic,
|
|
139
|
-
easeInOutCubic,
|
|
140
|
-
easeInOutQuart,
|
|
141
|
-
easeInOutSine,
|
|
142
|
-
easeOutCubic,
|
|
143
|
-
easeOutQuad,
|
|
144
|
-
easeZoomTransition
|
|
145
|
-
});
|
|
146
|
-
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/animations/index.ts","../../src/animations/easing.ts","../../src/animations/constants.ts"],"sourcesContent":["export * from './easing.js';\nexport * from './constants.js';\n","// ─── Animation Easing Functions ───────────────────────────────────────────────\n//\n// Pure math easing functions for smooth, cinematic animations.\n// No DOM / RAF dependencies – usable in any runtime.\n\nexport type EasingFunction = (t: number) => number;\n\n/** Smooth cubic – slow start, fast middle, slow end. */\nexport const easeInOutCubic: EasingFunction = (t) =>\n t < 0.5 ? 4 * t * t * t : 1 - Math.pow(-2 * t + 2, 3) / 2;\n\n/** Smooth quartic – more dramatic than cubic. */\nexport const easeInOutQuart: EasingFunction = (t) =>\n t < 0.5 ? 8 * t * t * t * t : 1 - Math.pow(-2 * t + 2, 4) / 2;\n\n/** Fast start, slow end. */\nexport const easeOutCubic: EasingFunction = (t) => 1 - Math.pow(1 - t, 3);\n\n/** Slow start, fast end. */\nexport const easeInCubic: EasingFunction = (t) => t * t * t;\n\n/** Gentle ease-out (quadratic). */\nexport const easeOutQuad: EasingFunction = (t) => 1 - (1 - t) * (1 - t);\n\n/** Very smooth, organic sine easing. */\nexport const easeInOutSine: EasingFunction = (t) =>\n -(Math.cos(Math.PI * t) - 1) / 2;\n\n/**\n * Create a CSS cubic-bezier easing function from four control-point values.\n *\n * Builds a 256-entry lookup table at call time (once) so subsequent evaluations\n * are a single table lookup + linear interpolation.\n */\nexport function createCubicBezier(\n x1: number, y1: number,\n x2: number, y2: number,\n): EasingFunction {\n const N = 256;\n const lut = new Float64Array(N + 1);\n\n for (let i = 0; i <= N; i++) {\n const target = i / N;\n let lo = 0, hi = 1;\n for (let j = 0; j < 20; j++) {\n const mid = (lo + hi) / 2;\n const om = 1 - mid;\n const x = 3 * om * om * mid * x1 + 3 * om * mid * mid * x2 + mid * mid * mid;\n if (x < target) lo = mid; else hi = mid;\n }\n const u = (lo + hi) / 2;\n const ou = 1 - u;\n lut[i] = 3 * ou * ou * u * y1 + 3 * ou * u * u * y2 + u * u * u;\n }\n\n return (t: number): number => {\n if (t <= 0) return 0;\n if (t >= 1) return 1;\n const s = t * N;\n const i = s | 0;\n return lut[i] + (lut[i + 1] - lut[i]) * (s - i);\n };\n}\n\n/**\n * Zoom-transition easing — matches CSS cubic-bezier(0.2, 0.8, 0.2, 1).\n * Fast start with smooth, organic settle. Used for all layer transitions.\n * Pre-computed LUT: subsequent calls are a single table lookup + linear interpolation.\n */\nexport const easeZoomTransition: EasingFunction = createCubicBezier(0.2, 0.8, 0.2, 1);\n","// ─── Animation Constants ──────────────────────────────────────────────────────\n\n// ── Timing (ms) ───────────────────────────────────────────────────────────────\n\nexport const ANIMATION_DURATION = {\n ZOOM_IN_LAYER: 500,\n ZOOM_OUT_LAYER: 500,\n ZOOM_GESTURE: 500,\n FADE_OUT: 200,\n FADE_IN: 250,\n COLOR_TRANSITION: 500,\n CURSOR_CHANGE: 150,\n LOADING_FADE: 200,\n} as const;\n\nexport const ANIMATION_PHASES = {\n ZOOM_IN: {\n ZOOM_TO_TARGET: 500,\n FADE_OUT_START: 120,\n FADE_OUT: 280,\n CONTENT_SWAP: 310,\n FADE_IN: 200,\n TOTAL: 510,\n },\n ZOOM_OUT: {\n FADE_OUT: 200,\n ZOOM_BACK: 50,\n FADE_IN: 250,\n TOTAL: 500,\n },\n} as const;\n\n// ── Zoom Thresholds ───────────────────────────────────────────────────────────\n\nexport const ZOOM_THRESHOLDS = {\n ENTER_LAYER: 5.0,\n EXIT_LAYER: 0.5,\n GESTURE_TRIGGER: 0.8,\n} as const;\n\n// ── Cooldowns (ms) ────────────────────────────────────────────────────────────\n\nexport const COOLDOWN = {\n NAVIGATION: 1000,\n ZOOM_GESTURE: 800,\n DOUBLE_CLICK: 200,\n} as const;\n\n// ── Opacity ───────────────────────────────────────────────────────────────────\n\nexport const OPACITY = {\n VISIBLE: 1.0,\n HIDDEN: 0.0,\n TRANSITIONING: 0.3,\n} as const;\n\n// ── Target Zoom Levels ────────────────────────────────────────────────────────\n\nexport const TARGET_ZOOM = {\n NORMAL: 1.0,\n FOCUSED: 0.8,\n FILL_NODE: 3.0,\n DETAIL: 2.0,\n} as const;\n\n// ── Viewport Framing ──────────────────────────────────────────────────────────\n\nexport const VIEWPORT_FRAMING = {\n NODE_FILL_RATIO: 0.7,\n EXIT_NODE_SIZE: 0.4,\n PADDING_RATIO: 0.1,\n} as const;\n"],"mappings":"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","names":[]}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
type EasingFunction = (t: number) => number;
|
|
2
|
-
/** Smooth cubic – slow start, fast middle, slow end. */
|
|
3
|
-
declare const easeInOutCubic: EasingFunction;
|
|
4
|
-
/** Smooth quartic – more dramatic than cubic. */
|
|
5
|
-
declare const easeInOutQuart: EasingFunction;
|
|
6
|
-
/** Fast start, slow end. */
|
|
7
|
-
declare const easeOutCubic: EasingFunction;
|
|
8
|
-
/** Slow start, fast end. */
|
|
9
|
-
declare const easeInCubic: EasingFunction;
|
|
10
|
-
/** Gentle ease-out (quadratic). */
|
|
11
|
-
declare const easeOutQuad: EasingFunction;
|
|
12
|
-
/** Very smooth, organic sine easing. */
|
|
13
|
-
declare const easeInOutSine: EasingFunction;
|
|
14
|
-
/**
|
|
15
|
-
* Create a CSS cubic-bezier easing function from four control-point values.
|
|
16
|
-
*
|
|
17
|
-
* Builds a 256-entry lookup table at call time (once) so subsequent evaluations
|
|
18
|
-
* are a single table lookup + linear interpolation.
|
|
19
|
-
*/
|
|
20
|
-
declare function createCubicBezier(x1: number, y1: number, x2: number, y2: number): EasingFunction;
|
|
21
|
-
/**
|
|
22
|
-
* Zoom-transition easing — matches CSS cubic-bezier(0.2, 0.8, 0.2, 1).
|
|
23
|
-
* Fast start with smooth, organic settle. Used for all layer transitions.
|
|
24
|
-
* Pre-computed LUT: subsequent calls are a single table lookup + linear interpolation.
|
|
25
|
-
*/
|
|
26
|
-
declare const easeZoomTransition: EasingFunction;
|
|
27
|
-
|
|
28
|
-
declare const ANIMATION_DURATION: {
|
|
29
|
-
readonly ZOOM_IN_LAYER: 500;
|
|
30
|
-
readonly ZOOM_OUT_LAYER: 500;
|
|
31
|
-
readonly ZOOM_GESTURE: 500;
|
|
32
|
-
readonly FADE_OUT: 200;
|
|
33
|
-
readonly FADE_IN: 250;
|
|
34
|
-
readonly COLOR_TRANSITION: 500;
|
|
35
|
-
readonly CURSOR_CHANGE: 150;
|
|
36
|
-
readonly LOADING_FADE: 200;
|
|
37
|
-
};
|
|
38
|
-
declare const ANIMATION_PHASES: {
|
|
39
|
-
readonly ZOOM_IN: {
|
|
40
|
-
readonly ZOOM_TO_TARGET: 500;
|
|
41
|
-
readonly FADE_OUT_START: 120;
|
|
42
|
-
readonly FADE_OUT: 280;
|
|
43
|
-
readonly CONTENT_SWAP: 310;
|
|
44
|
-
readonly FADE_IN: 200;
|
|
45
|
-
readonly TOTAL: 510;
|
|
46
|
-
};
|
|
47
|
-
readonly ZOOM_OUT: {
|
|
48
|
-
readonly FADE_OUT: 200;
|
|
49
|
-
readonly ZOOM_BACK: 50;
|
|
50
|
-
readonly FADE_IN: 250;
|
|
51
|
-
readonly TOTAL: 500;
|
|
52
|
-
};
|
|
53
|
-
};
|
|
54
|
-
declare const ZOOM_THRESHOLDS: {
|
|
55
|
-
readonly ENTER_LAYER: 5;
|
|
56
|
-
readonly EXIT_LAYER: 0.5;
|
|
57
|
-
readonly GESTURE_TRIGGER: 0.8;
|
|
58
|
-
};
|
|
59
|
-
declare const COOLDOWN: {
|
|
60
|
-
readonly NAVIGATION: 1000;
|
|
61
|
-
readonly ZOOM_GESTURE: 800;
|
|
62
|
-
readonly DOUBLE_CLICK: 200;
|
|
63
|
-
};
|
|
64
|
-
declare const OPACITY: {
|
|
65
|
-
readonly VISIBLE: 1;
|
|
66
|
-
readonly HIDDEN: 0;
|
|
67
|
-
readonly TRANSITIONING: 0.3;
|
|
68
|
-
};
|
|
69
|
-
declare const TARGET_ZOOM: {
|
|
70
|
-
readonly NORMAL: 1;
|
|
71
|
-
readonly FOCUSED: 0.8;
|
|
72
|
-
readonly FILL_NODE: 3;
|
|
73
|
-
readonly DETAIL: 2;
|
|
74
|
-
};
|
|
75
|
-
declare const VIEWPORT_FRAMING: {
|
|
76
|
-
readonly NODE_FILL_RATIO: 0.7;
|
|
77
|
-
readonly EXIT_NODE_SIZE: 0.4;
|
|
78
|
-
readonly PADDING_RATIO: 0.1;
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
export { ANIMATION_DURATION, ANIMATION_PHASES, COOLDOWN, type EasingFunction, OPACITY, TARGET_ZOOM, VIEWPORT_FRAMING, ZOOM_THRESHOLDS, createCubicBezier, easeInCubic, easeInOutCubic, easeInOutQuart, easeInOutSine, easeOutCubic, easeOutQuad, easeZoomTransition };
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
type EasingFunction = (t: number) => number;
|
|
2
|
-
/** Smooth cubic – slow start, fast middle, slow end. */
|
|
3
|
-
declare const easeInOutCubic: EasingFunction;
|
|
4
|
-
/** Smooth quartic – more dramatic than cubic. */
|
|
5
|
-
declare const easeInOutQuart: EasingFunction;
|
|
6
|
-
/** Fast start, slow end. */
|
|
7
|
-
declare const easeOutCubic: EasingFunction;
|
|
8
|
-
/** Slow start, fast end. */
|
|
9
|
-
declare const easeInCubic: EasingFunction;
|
|
10
|
-
/** Gentle ease-out (quadratic). */
|
|
11
|
-
declare const easeOutQuad: EasingFunction;
|
|
12
|
-
/** Very smooth, organic sine easing. */
|
|
13
|
-
declare const easeInOutSine: EasingFunction;
|
|
14
|
-
/**
|
|
15
|
-
* Create a CSS cubic-bezier easing function from four control-point values.
|
|
16
|
-
*
|
|
17
|
-
* Builds a 256-entry lookup table at call time (once) so subsequent evaluations
|
|
18
|
-
* are a single table lookup + linear interpolation.
|
|
19
|
-
*/
|
|
20
|
-
declare function createCubicBezier(x1: number, y1: number, x2: number, y2: number): EasingFunction;
|
|
21
|
-
/**
|
|
22
|
-
* Zoom-transition easing — matches CSS cubic-bezier(0.2, 0.8, 0.2, 1).
|
|
23
|
-
* Fast start with smooth, organic settle. Used for all layer transitions.
|
|
24
|
-
* Pre-computed LUT: subsequent calls are a single table lookup + linear interpolation.
|
|
25
|
-
*/
|
|
26
|
-
declare const easeZoomTransition: EasingFunction;
|
|
27
|
-
|
|
28
|
-
declare const ANIMATION_DURATION: {
|
|
29
|
-
readonly ZOOM_IN_LAYER: 500;
|
|
30
|
-
readonly ZOOM_OUT_LAYER: 500;
|
|
31
|
-
readonly ZOOM_GESTURE: 500;
|
|
32
|
-
readonly FADE_OUT: 200;
|
|
33
|
-
readonly FADE_IN: 250;
|
|
34
|
-
readonly COLOR_TRANSITION: 500;
|
|
35
|
-
readonly CURSOR_CHANGE: 150;
|
|
36
|
-
readonly LOADING_FADE: 200;
|
|
37
|
-
};
|
|
38
|
-
declare const ANIMATION_PHASES: {
|
|
39
|
-
readonly ZOOM_IN: {
|
|
40
|
-
readonly ZOOM_TO_TARGET: 500;
|
|
41
|
-
readonly FADE_OUT_START: 120;
|
|
42
|
-
readonly FADE_OUT: 280;
|
|
43
|
-
readonly CONTENT_SWAP: 310;
|
|
44
|
-
readonly FADE_IN: 200;
|
|
45
|
-
readonly TOTAL: 510;
|
|
46
|
-
};
|
|
47
|
-
readonly ZOOM_OUT: {
|
|
48
|
-
readonly FADE_OUT: 200;
|
|
49
|
-
readonly ZOOM_BACK: 50;
|
|
50
|
-
readonly FADE_IN: 250;
|
|
51
|
-
readonly TOTAL: 500;
|
|
52
|
-
};
|
|
53
|
-
};
|
|
54
|
-
declare const ZOOM_THRESHOLDS: {
|
|
55
|
-
readonly ENTER_LAYER: 5;
|
|
56
|
-
readonly EXIT_LAYER: 0.5;
|
|
57
|
-
readonly GESTURE_TRIGGER: 0.8;
|
|
58
|
-
};
|
|
59
|
-
declare const COOLDOWN: {
|
|
60
|
-
readonly NAVIGATION: 1000;
|
|
61
|
-
readonly ZOOM_GESTURE: 800;
|
|
62
|
-
readonly DOUBLE_CLICK: 200;
|
|
63
|
-
};
|
|
64
|
-
declare const OPACITY: {
|
|
65
|
-
readonly VISIBLE: 1;
|
|
66
|
-
readonly HIDDEN: 0;
|
|
67
|
-
readonly TRANSITIONING: 0.3;
|
|
68
|
-
};
|
|
69
|
-
declare const TARGET_ZOOM: {
|
|
70
|
-
readonly NORMAL: 1;
|
|
71
|
-
readonly FOCUSED: 0.8;
|
|
72
|
-
readonly FILL_NODE: 3;
|
|
73
|
-
readonly DETAIL: 2;
|
|
74
|
-
};
|
|
75
|
-
declare const VIEWPORT_FRAMING: {
|
|
76
|
-
readonly NODE_FILL_RATIO: 0.7;
|
|
77
|
-
readonly EXIT_NODE_SIZE: 0.4;
|
|
78
|
-
readonly PADDING_RATIO: 0.1;
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
export { ANIMATION_DURATION, ANIMATION_PHASES, COOLDOWN, type EasingFunction, OPACITY, TARGET_ZOOM, VIEWPORT_FRAMING, ZOOM_THRESHOLDS, createCubicBezier, easeInCubic, easeInOutCubic, easeInOutQuart, easeInOutSine, easeOutCubic, easeOutQuad, easeZoomTransition };
|
package/dist/animations/index.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ANIMATION_DURATION,
|
|
3
|
-
ANIMATION_PHASES,
|
|
4
|
-
COOLDOWN,
|
|
5
|
-
OPACITY,
|
|
6
|
-
TARGET_ZOOM,
|
|
7
|
-
VIEWPORT_FRAMING,
|
|
8
|
-
ZOOM_THRESHOLDS,
|
|
9
|
-
createCubicBezier,
|
|
10
|
-
easeInCubic,
|
|
11
|
-
easeInOutCubic,
|
|
12
|
-
easeInOutQuart,
|
|
13
|
-
easeInOutSine,
|
|
14
|
-
easeOutCubic,
|
|
15
|
-
easeOutQuad,
|
|
16
|
-
easeZoomTransition
|
|
17
|
-
} from "../chunk-F36SMC3K.js";
|
|
18
|
-
export {
|
|
19
|
-
ANIMATION_DURATION,
|
|
20
|
-
ANIMATION_PHASES,
|
|
21
|
-
COOLDOWN,
|
|
22
|
-
OPACITY,
|
|
23
|
-
TARGET_ZOOM,
|
|
24
|
-
VIEWPORT_FRAMING,
|
|
25
|
-
ZOOM_THRESHOLDS,
|
|
26
|
-
createCubicBezier,
|
|
27
|
-
easeInCubic,
|
|
28
|
-
easeInOutCubic,
|
|
29
|
-
easeInOutQuart,
|
|
30
|
-
easeInOutSine,
|
|
31
|
-
easeOutCubic,
|
|
32
|
-
easeOutQuad,
|
|
33
|
-
easeZoomTransition
|
|
34
|
-
};
|
|
35
|
-
//# sourceMappingURL=index.js.map
|