@particle-academy/fancy-3d 0.5.0 → 0.7.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/AGENTS.md +85 -0
- package/CHANGELOG.md +231 -0
- package/LICENSE +21 -0
- package/README.md +14 -15
- package/dist/canvas/index.cjs +13 -740
- package/dist/canvas/index.cjs.map +1 -1
- package/dist/canvas/index.d.cts +18 -6
- package/dist/canvas/index.d.ts +18 -6
- package/dist/canvas/index.js +2 -1
- package/dist/{chunk-NYVV72M3.js → chunk-25GMZVYQ.js} +83 -146
- package/dist/chunk-25GMZVYQ.js.map +1 -0
- package/dist/chunk-IU7B7Y63.cjs +694 -0
- package/dist/chunk-IU7B7Y63.cjs.map +1 -0
- package/dist/chunk-PBKOUAUY.cjs +319 -0
- package/dist/chunk-PBKOUAUY.cjs.map +1 -0
- package/dist/chunk-UOFTGHV6.js +312 -0
- package/dist/chunk-UOFTGHV6.js.map +1 -0
- package/dist/dom.d.cts +1 -1
- package/dist/dom.d.ts +1 -1
- package/dist/fullscreen.cjs +32 -0
- package/dist/fullscreen.cjs.map +1 -0
- package/dist/fullscreen.d.cts +85 -0
- package/dist/fullscreen.d.ts +85 -0
- package/dist/fullscreen.js +3 -0
- package/dist/fullscreen.js.map +1 -0
- package/dist/index.cjs +538 -717
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +196 -2
- package/dist/index.d.ts +196 -2
- package/dist/index.js +487 -2
- package/dist/index.js.map +1 -1
- package/dist/{scene-ChcFkvmm.d.cts → scene-C_ISwOAL.d.cts} +1 -1
- package/dist/{scene-ChcFkvmm.d.ts → scene-C_ISwOAL.d.ts} +1 -1
- package/docs/Canvas.md +5 -0
- package/docs/fullscreen.md +98 -0
- package/package.json +24 -8
- package/dist/chunk-NYVV72M3.js.map +0 -1
package/dist/canvas/index.cjs
CHANGED
|
@@ -1,748 +1,21 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
|
|
3
|
+
var chunkIU7B7Y63_cjs = require('../chunk-IU7B7Y63.cjs');
|
|
4
|
+
require('../chunk-PBKOUAUY.cjs');
|
|
5
5
|
|
|
6
|
-
// src/canvas/Canvas.tsx
|
|
7
6
|
|
|
8
|
-
// src/utils/cn.ts
|
|
9
|
-
function flatten(value) {
|
|
10
|
-
if (!value) return "";
|
|
11
|
-
if (typeof value === "string" || typeof value === "number") return String(value);
|
|
12
|
-
if (Array.isArray(value)) return value.map(flatten).filter(Boolean).join(" ");
|
|
13
|
-
if (typeof value === "object") {
|
|
14
|
-
return Object.entries(value).filter(([, v]) => Boolean(v)).map(([k]) => k).join(" ");
|
|
15
|
-
}
|
|
16
|
-
return "";
|
|
17
|
-
}
|
|
18
|
-
function cn(...inputs) {
|
|
19
|
-
return inputs.map(flatten).filter(Boolean).join(" ");
|
|
20
|
-
}
|
|
21
|
-
function useControllableState(controlledValue, defaultValue, onChange) {
|
|
22
|
-
const [uncontrolledValue, setUncontrolledValue] = react.useState(defaultValue);
|
|
23
|
-
const isControlled = controlledValue !== void 0;
|
|
24
|
-
const value = isControlled ? controlledValue : uncontrolledValue;
|
|
25
|
-
const onChangeRef = react.useRef(onChange);
|
|
26
|
-
onChangeRef.current = onChange;
|
|
27
|
-
const setValue = react.useCallback(
|
|
28
|
-
(next) => {
|
|
29
|
-
const nextValue = typeof next === "function" ? next(value) : next;
|
|
30
|
-
if (!isControlled) {
|
|
31
|
-
setUncontrolledValue(nextValue);
|
|
32
|
-
}
|
|
33
|
-
onChangeRef.current?.(nextValue);
|
|
34
|
-
},
|
|
35
|
-
[isControlled, value]
|
|
36
|
-
);
|
|
37
|
-
return [value, setValue];
|
|
38
|
-
}
|
|
39
|
-
function usePanZoom({
|
|
40
|
-
viewport,
|
|
41
|
-
setViewport,
|
|
42
|
-
minZoom,
|
|
43
|
-
maxZoom,
|
|
44
|
-
pannable,
|
|
45
|
-
zoomable,
|
|
46
|
-
containerRef
|
|
47
|
-
}) {
|
|
48
|
-
const isPanningRef = react.useRef(false);
|
|
49
|
-
const startRef = react.useRef({ x: 0, y: 0, panX: 0, panY: 0 });
|
|
50
|
-
const viewportRef = react.useRef(viewport);
|
|
51
|
-
viewportRef.current = viewport;
|
|
52
|
-
const setViewportRef = react.useRef(setViewport);
|
|
53
|
-
setViewportRef.current = setViewport;
|
|
54
|
-
const zoomableRef = react.useRef(zoomable);
|
|
55
|
-
zoomableRef.current = zoomable;
|
|
56
|
-
const minZoomRef = react.useRef(minZoom);
|
|
57
|
-
minZoomRef.current = minZoom;
|
|
58
|
-
const maxZoomRef = react.useRef(maxZoom);
|
|
59
|
-
maxZoomRef.current = maxZoom;
|
|
60
|
-
react.useEffect(() => {
|
|
61
|
-
const container = containerRef.current;
|
|
62
|
-
if (!container) return;
|
|
63
|
-
function handleWheel(e) {
|
|
64
|
-
if (!zoomableRef.current) return;
|
|
65
|
-
if (!e.ctrlKey && !e.metaKey) return;
|
|
66
|
-
e.preventDefault();
|
|
67
|
-
const rect = container.getBoundingClientRect();
|
|
68
|
-
const mouseX = e.clientX - rect.left;
|
|
69
|
-
const mouseY = e.clientY - rect.top;
|
|
70
|
-
setViewportRef.current((prev) => {
|
|
71
|
-
const factor = 1 - e.deltaY * 1e-3;
|
|
72
|
-
const newZoom = Math.min(maxZoomRef.current, Math.max(minZoomRef.current, prev.zoom * factor));
|
|
73
|
-
const ratio = newZoom / prev.zoom;
|
|
74
|
-
return {
|
|
75
|
-
zoom: newZoom,
|
|
76
|
-
panX: mouseX - (mouseX - prev.panX) * ratio,
|
|
77
|
-
panY: mouseY - (mouseY - prev.panY) * ratio
|
|
78
|
-
};
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
container.addEventListener("wheel", handleWheel, { passive: false });
|
|
82
|
-
return () => {
|
|
83
|
-
container.removeEventListener("wheel", handleWheel);
|
|
84
|
-
};
|
|
85
|
-
}, [containerRef]);
|
|
86
|
-
const onPointerDown = react.useCallback(
|
|
87
|
-
(e) => {
|
|
88
|
-
if (!pannable) return;
|
|
89
|
-
if (e.button !== 0) return;
|
|
90
|
-
const target = e.target;
|
|
91
|
-
if (target !== containerRef.current && !target.hasAttribute("data-canvas-bg")) return;
|
|
92
|
-
isPanningRef.current = true;
|
|
93
|
-
startRef.current = { x: e.clientX, y: e.clientY, panX: viewport.panX, panY: viewport.panY };
|
|
94
|
-
e.target.setPointerCapture(e.pointerId);
|
|
95
|
-
e.preventDefault();
|
|
96
|
-
},
|
|
97
|
-
[pannable, viewport.panX, viewport.panY, containerRef]
|
|
98
|
-
);
|
|
99
|
-
const onPointerMove = react.useCallback(
|
|
100
|
-
(e) => {
|
|
101
|
-
if (!isPanningRef.current) return;
|
|
102
|
-
const dx = e.clientX - startRef.current.x;
|
|
103
|
-
const dy = e.clientY - startRef.current.y;
|
|
104
|
-
setViewport((prev) => ({
|
|
105
|
-
...prev,
|
|
106
|
-
panX: startRef.current.panX + dx,
|
|
107
|
-
panY: startRef.current.panY + dy
|
|
108
|
-
}));
|
|
109
|
-
},
|
|
110
|
-
[setViewport]
|
|
111
|
-
);
|
|
112
|
-
const onPointerUp = react.useCallback(() => {
|
|
113
|
-
isPanningRef.current = false;
|
|
114
|
-
}, []);
|
|
115
|
-
return {
|
|
116
|
-
containerProps: { onPointerDown, onPointerMove, onPointerUp },
|
|
117
|
-
isPanning: isPanningRef.current
|
|
118
|
-
};
|
|
119
|
-
}
|
|
120
|
-
function useNodeRegistry() {
|
|
121
|
-
const rectsRef = react.useRef(/* @__PURE__ */ new Map());
|
|
122
|
-
const [version, setVersion] = react.useState(0);
|
|
123
|
-
const registerNode = react.useCallback((id, rect) => {
|
|
124
|
-
rectsRef.current.set(id, rect);
|
|
125
|
-
setVersion((v) => v + 1);
|
|
126
|
-
}, []);
|
|
127
|
-
const unregisterNode = react.useCallback((id) => {
|
|
128
|
-
rectsRef.current.delete(id);
|
|
129
|
-
setVersion((v) => v + 1);
|
|
130
|
-
}, []);
|
|
131
|
-
return { registerNode, unregisterNode, nodeRects: rectsRef.current, version };
|
|
132
|
-
}
|
|
133
|
-
var CanvasContext = react.createContext(null);
|
|
134
|
-
function useCanvas() {
|
|
135
|
-
const ctx = react.useContext(CanvasContext);
|
|
136
|
-
if (!ctx) throw new Error("useCanvas must be used within a Canvas component");
|
|
137
|
-
return ctx;
|
|
138
|
-
}
|
|
139
|
-
function CanvasNode({ children, id, x, y, draggable, onPositionChange, className, style }) {
|
|
140
|
-
const { registerNode, unregisterNode, viewport, gridSize, snapToGrid } = useCanvas();
|
|
141
|
-
const nodeRef = react.useRef(null);
|
|
142
|
-
const isDragging = react.useRef(false);
|
|
143
|
-
const dragStart = react.useRef({ mouseX: 0, mouseY: 0, nodeX: 0, nodeY: 0 });
|
|
144
|
-
react.useEffect(() => {
|
|
145
|
-
const el = nodeRef.current;
|
|
146
|
-
if (!el) return;
|
|
147
|
-
const updateRect = () => {
|
|
148
|
-
registerNode(id, { x, y, width: el.offsetWidth, height: el.offsetHeight });
|
|
149
|
-
};
|
|
150
|
-
updateRect();
|
|
151
|
-
const observer = new ResizeObserver(updateRect);
|
|
152
|
-
observer.observe(el);
|
|
153
|
-
return () => {
|
|
154
|
-
observer.disconnect();
|
|
155
|
-
unregisterNode(id);
|
|
156
|
-
};
|
|
157
|
-
}, [id, x, y, registerNode, unregisterNode]);
|
|
158
|
-
const handlePointerDown = react.useCallback(
|
|
159
|
-
(e) => {
|
|
160
|
-
if (!draggable || e.button !== 0) return;
|
|
161
|
-
e.stopPropagation();
|
|
162
|
-
isDragging.current = true;
|
|
163
|
-
dragStart.current = { mouseX: e.clientX, mouseY: e.clientY, nodeX: x, nodeY: y };
|
|
164
|
-
e.target.setPointerCapture(e.pointerId);
|
|
165
|
-
},
|
|
166
|
-
[draggable, x, y]
|
|
167
|
-
);
|
|
168
|
-
const handlePointerMove = react.useCallback(
|
|
169
|
-
(e) => {
|
|
170
|
-
if (!isDragging.current) return;
|
|
171
|
-
const dx = (e.clientX - dragStart.current.mouseX) / viewport.zoom;
|
|
172
|
-
const dy = (e.clientY - dragStart.current.mouseY) / viewport.zoom;
|
|
173
|
-
let nx = dragStart.current.nodeX + dx;
|
|
174
|
-
let ny = dragStart.current.nodeY + dy;
|
|
175
|
-
if (snapToGrid && gridSize > 0) {
|
|
176
|
-
nx = Math.round(nx / gridSize) * gridSize;
|
|
177
|
-
ny = Math.round(ny / gridSize) * gridSize;
|
|
178
|
-
}
|
|
179
|
-
onPositionChange?.(nx, ny);
|
|
180
|
-
},
|
|
181
|
-
[viewport.zoom, onPositionChange, snapToGrid, gridSize]
|
|
182
|
-
);
|
|
183
|
-
const handlePointerUp = react.useCallback(() => {
|
|
184
|
-
isDragging.current = false;
|
|
185
|
-
}, []);
|
|
186
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
187
|
-
"div",
|
|
188
|
-
{
|
|
189
|
-
ref: nodeRef,
|
|
190
|
-
"data-react-fancy-canvas-node": "",
|
|
191
|
-
"data-node-id": id,
|
|
192
|
-
className: cn("absolute", draggable && "cursor-grab active:cursor-grabbing", className),
|
|
193
|
-
style: { left: x, top: y, ...style },
|
|
194
|
-
onPointerDown: handlePointerDown,
|
|
195
|
-
onPointerMove: handlePointerMove,
|
|
196
|
-
onPointerUp: handlePointerUp,
|
|
197
|
-
children
|
|
198
|
-
}
|
|
199
|
-
);
|
|
200
|
-
}
|
|
201
|
-
CanvasNode.displayName = "CanvasNode";
|
|
202
7
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
}
|
|
215
|
-
return dy > 0 ? { x: cx, y: rect.y + rect.height } : { x: cx, y: rect.y };
|
|
216
|
-
}
|
|
217
|
-
switch (anchor) {
|
|
218
|
-
case "top":
|
|
219
|
-
return { x: cx, y: rect.y };
|
|
220
|
-
case "bottom":
|
|
221
|
-
return { x: cx, y: rect.y + rect.height };
|
|
222
|
-
case "left":
|
|
223
|
-
return { x: rect.x, y: cy };
|
|
224
|
-
case "right":
|
|
225
|
-
return { x: rect.x + rect.width, y: cy };
|
|
226
|
-
case "center":
|
|
227
|
-
return { x: cx, y: cy };
|
|
228
|
-
default:
|
|
229
|
-
return { x: cx, y: cy };
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
function bezierPath(from, to) {
|
|
233
|
-
const dx = Math.abs(to.x - from.x);
|
|
234
|
-
const dy = Math.abs(to.y - from.y);
|
|
235
|
-
if (dx > dy) {
|
|
236
|
-
const offset2 = dx * 0.5;
|
|
237
|
-
const cp1x = from.x + (to.x > from.x ? offset2 : -offset2);
|
|
238
|
-
const cp2x = to.x + (to.x > from.x ? -offset2 : offset2);
|
|
239
|
-
return `M${from.x},${from.y} C${cp1x},${from.y} ${cp2x},${to.y} ${to.x},${to.y}`;
|
|
240
|
-
}
|
|
241
|
-
const offset = Math.max(dy * 0.5, 30);
|
|
242
|
-
const cp1y = from.y + (to.y > from.y ? offset : -offset);
|
|
243
|
-
const cp2y = to.y + (to.y > from.y ? -offset : offset);
|
|
244
|
-
return `M${from.x},${from.y} C${from.x},${cp1y} ${to.x},${cp2y} ${to.x},${to.y}`;
|
|
245
|
-
}
|
|
246
|
-
function stepPath(from, to) {
|
|
247
|
-
const midX = (from.x + to.x) / 2;
|
|
248
|
-
return `M${from.x},${from.y} H${midX} V${to.y} H${to.x}`;
|
|
249
|
-
}
|
|
250
|
-
function straightPath(from, to) {
|
|
251
|
-
return `M${from.x},${from.y} L${to.x},${to.y}`;
|
|
252
|
-
}
|
|
253
|
-
function getEdgePath(from, to, curve = "bezier") {
|
|
254
|
-
switch (curve) {
|
|
255
|
-
case "bezier":
|
|
256
|
-
return bezierPath(from, to);
|
|
257
|
-
case "step":
|
|
258
|
-
return stepPath(from, to);
|
|
259
|
-
case "straight":
|
|
260
|
-
return straightPath(from, to);
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
function CanvasEdge({
|
|
264
|
-
from,
|
|
265
|
-
to,
|
|
266
|
-
fromAnchor = "auto",
|
|
267
|
-
toAnchor = "auto",
|
|
268
|
-
curve = "bezier",
|
|
269
|
-
color = "currentColor",
|
|
270
|
-
strokeWidth = 2,
|
|
271
|
-
dashed = false,
|
|
272
|
-
animated = false,
|
|
273
|
-
label,
|
|
274
|
-
className,
|
|
275
|
-
markerStart,
|
|
276
|
-
markerEnd
|
|
277
|
-
}) {
|
|
278
|
-
const { nodeRects, registryVersion } = useCanvas();
|
|
279
|
-
const path = react.useMemo(() => {
|
|
280
|
-
const fromRect = nodeRects.get(from);
|
|
281
|
-
const toRect = nodeRects.get(to);
|
|
282
|
-
if (!fromRect || !toRect) return null;
|
|
283
|
-
const fromPt = getAnchorPoint(fromRect, fromAnchor, toRect);
|
|
284
|
-
const toPt = getAnchorPoint(toRect, toAnchor, fromRect);
|
|
285
|
-
return {
|
|
286
|
-
d: getEdgePath(fromPt, toPt, curve),
|
|
287
|
-
midX: (fromPt.x + toPt.x) / 2,
|
|
288
|
-
midY: (fromPt.y + toPt.y) / 2
|
|
289
|
-
};
|
|
290
|
-
}, [from, to, fromAnchor, toAnchor, curve, nodeRects, registryVersion]);
|
|
291
|
-
if (!path) return null;
|
|
292
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("g", { "data-react-fancy-canvas-edge": "", className: cn("text-zinc-300 dark:text-zinc-600", className), children: [
|
|
293
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
294
|
-
"path",
|
|
295
|
-
{
|
|
296
|
-
d: path.d,
|
|
297
|
-
fill: "none",
|
|
298
|
-
stroke: color,
|
|
299
|
-
strokeWidth,
|
|
300
|
-
strokeDasharray: dashed ? "6 4" : void 0,
|
|
301
|
-
markerStart: markerStart ? `url(#${markerStart})` : void 0,
|
|
302
|
-
markerEnd: markerEnd ? `url(#${markerEnd})` : void 0,
|
|
303
|
-
className: animated ? "animate-[dash_1s_linear_infinite]" : "",
|
|
304
|
-
style: animated ? { strokeDasharray: "8 4" } : void 0
|
|
305
|
-
}
|
|
306
|
-
),
|
|
307
|
-
label && /* @__PURE__ */ jsxRuntime.jsx("foreignObject", { x: path.midX - 40, y: path.midY - 12, width: 80, height: 24, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center text-xs text-zinc-500", children: label }) })
|
|
308
|
-
] });
|
|
309
|
-
}
|
|
310
|
-
CanvasEdge.displayName = "CanvasEdge";
|
|
311
|
-
function CanvasMinimap({ width = 150, height = 100, className }) {
|
|
312
|
-
const { nodeRects, registryVersion, viewport } = useCanvas();
|
|
313
|
-
const bounds = react.useMemo(() => {
|
|
314
|
-
if (nodeRects.size === 0) return { minX: 0, minY: 0, maxX: 500, maxY: 300 };
|
|
315
|
-
let minX = Infinity, minY = Infinity, maxX = -Infinity, maxY = -Infinity;
|
|
316
|
-
nodeRects.forEach((r) => {
|
|
317
|
-
minX = Math.min(minX, r.x);
|
|
318
|
-
minY = Math.min(minY, r.y);
|
|
319
|
-
maxX = Math.max(maxX, r.x + r.width);
|
|
320
|
-
maxY = Math.max(maxY, r.y + r.height);
|
|
321
|
-
});
|
|
322
|
-
const padding = 50;
|
|
323
|
-
return { minX: minX - padding, minY: minY - padding, maxX: maxX + padding, maxY: maxY + padding };
|
|
324
|
-
}, [nodeRects, registryVersion]);
|
|
325
|
-
const scaleX = width / (bounds.maxX - bounds.minX || 1);
|
|
326
|
-
const scaleY = height / (bounds.maxY - bounds.minY || 1);
|
|
327
|
-
const scale = Math.min(scaleX, scaleY);
|
|
328
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
329
|
-
"div",
|
|
330
|
-
{
|
|
331
|
-
"data-react-fancy-canvas-minimap": "",
|
|
332
|
-
className: cn(
|
|
333
|
-
"absolute right-3 bottom-3 overflow-hidden rounded-lg border border-zinc-200 bg-white/90 dark:border-zinc-700 dark:bg-zinc-900/90",
|
|
334
|
-
className
|
|
335
|
-
),
|
|
336
|
-
style: { width, height },
|
|
337
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width, height, children: [
|
|
338
|
-
Array.from(nodeRects.entries()).map(([id, rect]) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
339
|
-
"rect",
|
|
340
|
-
{
|
|
341
|
-
x: (rect.x - bounds.minX) * scale,
|
|
342
|
-
y: (rect.y - bounds.minY) * scale,
|
|
343
|
-
width: Math.max(rect.width * scale, 4),
|
|
344
|
-
height: Math.max(rect.height * scale, 3),
|
|
345
|
-
rx: 1,
|
|
346
|
-
className: "fill-blue-400/60"
|
|
347
|
-
},
|
|
348
|
-
id
|
|
349
|
-
)),
|
|
350
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
351
|
-
"rect",
|
|
352
|
-
{
|
|
353
|
-
x: (-viewport.panX / viewport.zoom - bounds.minX) * scale,
|
|
354
|
-
y: (-viewport.panY / viewport.zoom - bounds.minY) * scale,
|
|
355
|
-
width: (width / viewport.zoom / scale > 0 ? width / viewport.zoom : width) * scale / (bounds.maxX - bounds.minX || 1) * (bounds.maxX - bounds.minX),
|
|
356
|
-
height: (height / viewport.zoom / scale > 0 ? height / viewport.zoom : height) * scale / (bounds.maxY - bounds.minY || 1) * (bounds.maxY - bounds.minY),
|
|
357
|
-
fill: "none",
|
|
358
|
-
stroke: "currentColor",
|
|
359
|
-
strokeWidth: 1,
|
|
360
|
-
className: "text-blue-500"
|
|
361
|
-
}
|
|
362
|
-
)
|
|
363
|
-
] })
|
|
364
|
-
}
|
|
365
|
-
);
|
|
366
|
-
}
|
|
367
|
-
CanvasMinimap.displayName = "CanvasMinimap";
|
|
368
|
-
|
|
369
|
-
// node_modules/lucide-react/dist/esm/shared/src/utils.js
|
|
370
|
-
var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
371
|
-
var toCamelCase = (string) => string.replace(
|
|
372
|
-
/^([A-Z])|[\s-_]+(\w)/g,
|
|
373
|
-
(match, p1, p2) => p2 ? p2.toUpperCase() : p1.toLowerCase()
|
|
374
|
-
);
|
|
375
|
-
var toPascalCase = (string) => {
|
|
376
|
-
const camelCase = toCamelCase(string);
|
|
377
|
-
return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);
|
|
378
|
-
};
|
|
379
|
-
var mergeClasses = (...classes) => classes.filter((className, index, array) => {
|
|
380
|
-
return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index;
|
|
381
|
-
}).join(" ").trim();
|
|
382
|
-
var hasA11yProp = (props) => {
|
|
383
|
-
for (const prop in props) {
|
|
384
|
-
if (prop.startsWith("aria-") || prop === "role" || prop === "title") {
|
|
385
|
-
return true;
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
};
|
|
389
|
-
|
|
390
|
-
// node_modules/lucide-react/dist/esm/defaultAttributes.js
|
|
391
|
-
var defaultAttributes = {
|
|
392
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
393
|
-
width: 24,
|
|
394
|
-
height: 24,
|
|
395
|
-
viewBox: "0 0 24 24",
|
|
396
|
-
fill: "none",
|
|
397
|
-
stroke: "currentColor",
|
|
398
|
-
strokeWidth: 2,
|
|
399
|
-
strokeLinecap: "round",
|
|
400
|
-
strokeLinejoin: "round"
|
|
401
|
-
};
|
|
402
|
-
|
|
403
|
-
// node_modules/lucide-react/dist/esm/Icon.js
|
|
404
|
-
var Icon = react.forwardRef(
|
|
405
|
-
({
|
|
406
|
-
color = "currentColor",
|
|
407
|
-
size = 24,
|
|
408
|
-
strokeWidth = 2,
|
|
409
|
-
absoluteStrokeWidth,
|
|
410
|
-
className = "",
|
|
411
|
-
children,
|
|
412
|
-
iconNode,
|
|
413
|
-
...rest
|
|
414
|
-
}, ref) => react.createElement(
|
|
415
|
-
"svg",
|
|
416
|
-
{
|
|
417
|
-
ref,
|
|
418
|
-
...defaultAttributes,
|
|
419
|
-
width: size,
|
|
420
|
-
height: size,
|
|
421
|
-
stroke: color,
|
|
422
|
-
strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth,
|
|
423
|
-
className: mergeClasses("lucide", className),
|
|
424
|
-
...!children && !hasA11yProp(rest) && { "aria-hidden": "true" },
|
|
425
|
-
...rest
|
|
426
|
-
},
|
|
427
|
-
[
|
|
428
|
-
...iconNode.map(([tag, attrs]) => react.createElement(tag, attrs)),
|
|
429
|
-
...Array.isArray(children) ? children : [children]
|
|
430
|
-
]
|
|
431
|
-
)
|
|
432
|
-
);
|
|
433
|
-
|
|
434
|
-
// node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
435
|
-
var createLucideIcon = (iconName, iconNode) => {
|
|
436
|
-
const Component = react.forwardRef(
|
|
437
|
-
({ className, ...props }, ref) => react.createElement(Icon, {
|
|
438
|
-
ref,
|
|
439
|
-
iconNode,
|
|
440
|
-
className: mergeClasses(
|
|
441
|
-
`lucide-${toKebabCase(toPascalCase(iconName))}`,
|
|
442
|
-
`lucide-${iconName}`,
|
|
443
|
-
className
|
|
444
|
-
),
|
|
445
|
-
...props
|
|
446
|
-
})
|
|
447
|
-
);
|
|
448
|
-
Component.displayName = toPascalCase(iconName);
|
|
449
|
-
return Component;
|
|
450
|
-
};
|
|
451
|
-
|
|
452
|
-
// node_modules/lucide-react/dist/esm/icons/maximize.js
|
|
453
|
-
var __iconNode = [
|
|
454
|
-
["path", { d: "M8 3H5a2 2 0 0 0-2 2v3", key: "1dcmit" }],
|
|
455
|
-
["path", { d: "M21 8V5a2 2 0 0 0-2-2h-3", key: "1e4gt3" }],
|
|
456
|
-
["path", { d: "M3 16v3a2 2 0 0 0 2 2h3", key: "wsl5sc" }],
|
|
457
|
-
["path", { d: "M16 21h3a2 2 0 0 0 2-2v-3", key: "18trek" }]
|
|
458
|
-
];
|
|
459
|
-
var Maximize = createLucideIcon("maximize", __iconNode);
|
|
460
|
-
|
|
461
|
-
// node_modules/lucide-react/dist/esm/icons/rotate-ccw.js
|
|
462
|
-
var __iconNode2 = [
|
|
463
|
-
["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "1357e3" }],
|
|
464
|
-
["path", { d: "M3 3v5h5", key: "1xhq8a" }]
|
|
465
|
-
];
|
|
466
|
-
var RotateCcw = createLucideIcon("rotate-ccw", __iconNode2);
|
|
467
|
-
|
|
468
|
-
// node_modules/lucide-react/dist/esm/icons/zoom-in.js
|
|
469
|
-
var __iconNode3 = [
|
|
470
|
-
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
|
|
471
|
-
["line", { x1: "21", x2: "16.65", y1: "21", y2: "16.65", key: "13gj7c" }],
|
|
472
|
-
["line", { x1: "11", x2: "11", y1: "8", y2: "14", key: "1vmskp" }],
|
|
473
|
-
["line", { x1: "8", x2: "14", y1: "11", y2: "11", key: "durymu" }]
|
|
474
|
-
];
|
|
475
|
-
var ZoomIn = createLucideIcon("zoom-in", __iconNode3);
|
|
476
|
-
|
|
477
|
-
// node_modules/lucide-react/dist/esm/icons/zoom-out.js
|
|
478
|
-
var __iconNode4 = [
|
|
479
|
-
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
|
|
480
|
-
["line", { x1: "21", x2: "16.65", y1: "21", y2: "16.65", key: "13gj7c" }],
|
|
481
|
-
["line", { x1: "8", x2: "14", y1: "11", y2: "11", key: "durymu" }]
|
|
482
|
-
];
|
|
483
|
-
var ZoomOut = createLucideIcon("zoom-out", __iconNode4);
|
|
484
|
-
function CanvasControls({
|
|
485
|
-
className,
|
|
486
|
-
showZoomIn = true,
|
|
487
|
-
showZoomOut = true,
|
|
488
|
-
showReset = true,
|
|
489
|
-
showFitAll = true
|
|
490
|
-
}) {
|
|
491
|
-
const { setViewport, nodeRects, containerRef } = useCanvas();
|
|
492
|
-
const zoomIn = () => setViewport((v) => ({ ...v, zoom: Math.min(3, v.zoom * 1.25) }));
|
|
493
|
-
const zoomOut = () => setViewport((v) => ({ ...v, zoom: Math.max(0.1, v.zoom / 1.25) }));
|
|
494
|
-
const reset = () => setViewport({ panX: 0, panY: 0, zoom: 1 });
|
|
495
|
-
const fitAll = () => {
|
|
496
|
-
const container = containerRef.current;
|
|
497
|
-
if (!container || nodeRects.size === 0) return reset();
|
|
498
|
-
let minX = Infinity, minY = Infinity, maxX = -Infinity, maxY = -Infinity;
|
|
499
|
-
nodeRects.forEach((r) => {
|
|
500
|
-
minX = Math.min(minX, r.x);
|
|
501
|
-
minY = Math.min(minY, r.y);
|
|
502
|
-
maxX = Math.max(maxX, r.x + r.width);
|
|
503
|
-
maxY = Math.max(maxY, r.y + r.height);
|
|
504
|
-
});
|
|
505
|
-
const padding = 40;
|
|
506
|
-
const contentW = maxX - minX + padding * 2;
|
|
507
|
-
const contentH = maxY - minY + padding * 2;
|
|
508
|
-
const cw = container.clientWidth;
|
|
509
|
-
const ch = container.clientHeight;
|
|
510
|
-
const zoom = Math.min(cw / contentW, ch / contentH, 1.5);
|
|
511
|
-
const panX = (cw - contentW * zoom) / 2 - minX * zoom + padding * zoom;
|
|
512
|
-
const panY = (ch - contentH * zoom) / 2 - minY * zoom + padding * zoom;
|
|
513
|
-
setViewport({ panX, panY, zoom });
|
|
514
|
-
};
|
|
515
|
-
const btnClass = "flex h-8 w-8 items-center justify-center rounded-md text-zinc-500 hover:bg-zinc-100 hover:text-zinc-700 dark:hover:bg-zinc-800 dark:hover:text-zinc-300 transition-colors";
|
|
516
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
517
|
-
"div",
|
|
518
|
-
{
|
|
519
|
-
"data-react-fancy-canvas-controls": "",
|
|
520
|
-
className: cn(
|
|
521
|
-
"absolute bottom-3 left-3 flex gap-1 rounded-lg border border-zinc-200 bg-white/90 p-1 shadow-sm dark:border-zinc-700 dark:bg-zinc-900/90",
|
|
522
|
-
className
|
|
523
|
-
),
|
|
524
|
-
children: [
|
|
525
|
-
showZoomIn && /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick: zoomIn, className: btnClass, "aria-label": "Zoom in", children: /* @__PURE__ */ jsxRuntime.jsx(ZoomIn, { size: 16 }) }),
|
|
526
|
-
showZoomOut && /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick: zoomOut, className: btnClass, "aria-label": "Zoom out", children: /* @__PURE__ */ jsxRuntime.jsx(ZoomOut, { size: 16 }) }),
|
|
527
|
-
showReset && /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick: reset, className: btnClass, "aria-label": "Reset view", children: /* @__PURE__ */ jsxRuntime.jsx(RotateCcw, { size: 16 }) }),
|
|
528
|
-
showFitAll && /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick: fitAll, className: btnClass, "aria-label": "Fit all", children: /* @__PURE__ */ jsxRuntime.jsx(Maximize, { size: 16 }) })
|
|
529
|
-
]
|
|
530
|
-
}
|
|
531
|
-
);
|
|
532
|
-
}
|
|
533
|
-
CanvasControls.displayName = "CanvasControls";
|
|
534
|
-
|
|
535
|
-
// src/canvas/engines/dom.ts
|
|
536
|
-
var domEngine = {
|
|
537
|
-
name: "dom",
|
|
538
|
-
mount(host, _viewport) {
|
|
539
|
-
return {
|
|
540
|
-
name: "dom",
|
|
541
|
-
root: host,
|
|
542
|
-
updateViewport: () => {
|
|
543
|
-
},
|
|
544
|
-
dispose: () => {
|
|
545
|
-
}
|
|
546
|
-
};
|
|
547
|
-
}
|
|
548
|
-
};
|
|
549
|
-
function resolveEngine(spec) {
|
|
550
|
-
if (!spec || spec === "dom") return domEngine;
|
|
551
|
-
return spec;
|
|
552
|
-
}
|
|
553
|
-
var DEFAULT_VIEWPORT = { panX: 0, panY: 0, zoom: 1 };
|
|
554
|
-
function CanvasRoot({
|
|
555
|
-
children,
|
|
556
|
-
viewport: controlledViewport,
|
|
557
|
-
defaultViewport = DEFAULT_VIEWPORT,
|
|
558
|
-
onViewportChange,
|
|
559
|
-
minZoom = 0.1,
|
|
560
|
-
maxZoom = 3,
|
|
561
|
-
pannable = true,
|
|
562
|
-
zoomable = true,
|
|
563
|
-
showGrid = false,
|
|
564
|
-
gridStyle = "dots",
|
|
565
|
-
gridSize = 20,
|
|
566
|
-
gridColor = "rgb(161 161 170 / 0.3)",
|
|
567
|
-
snapToGrid = false,
|
|
568
|
-
fitOnMount = false,
|
|
569
|
-
engine: engineSpec,
|
|
570
|
-
className,
|
|
571
|
-
style
|
|
572
|
-
}) {
|
|
573
|
-
const containerRef = react.useRef(null);
|
|
574
|
-
const [viewport, setViewport] = useControllableState(controlledViewport, defaultViewport, onViewportChange);
|
|
575
|
-
const { registerNode, unregisterNode, nodeRects, version: registryVersion } = useNodeRegistry();
|
|
576
|
-
const [engineHandle, setEngineHandle] = react.useState(null);
|
|
577
|
-
react.useEffect(() => {
|
|
578
|
-
const host = containerRef.current;
|
|
579
|
-
if (!host) return;
|
|
580
|
-
const resolved = resolveEngine(engineSpec);
|
|
581
|
-
let handle = null;
|
|
582
|
-
try {
|
|
583
|
-
handle = resolved.mount(host, viewport);
|
|
584
|
-
setEngineHandle(handle);
|
|
585
|
-
} catch (err) {
|
|
586
|
-
console.error(`[fancy-3d] Canvas engine "${resolved.name}" failed to mount:`, err);
|
|
587
|
-
setEngineHandle(null);
|
|
588
|
-
}
|
|
589
|
-
return () => {
|
|
590
|
-
try {
|
|
591
|
-
handle?.dispose();
|
|
592
|
-
} catch (err) {
|
|
593
|
-
console.error(`[fancy-3d] Canvas engine "${handle?.name}" failed to dispose:`, err);
|
|
594
|
-
}
|
|
595
|
-
setEngineHandle(null);
|
|
596
|
-
};
|
|
597
|
-
}, [engineSpec]);
|
|
598
|
-
react.useEffect(() => {
|
|
599
|
-
engineHandle?.updateViewport(viewport);
|
|
600
|
-
}, [engineHandle, viewport]);
|
|
601
|
-
const { containerProps } = usePanZoom({
|
|
602
|
-
viewport,
|
|
603
|
-
setViewport,
|
|
604
|
-
minZoom,
|
|
605
|
-
maxZoom,
|
|
606
|
-
pannable,
|
|
607
|
-
zoomable,
|
|
608
|
-
containerRef
|
|
609
|
-
});
|
|
610
|
-
const ctx = react.useMemo(
|
|
611
|
-
() => ({ viewport, setViewport, registerNode, unregisterNode, nodeRects, registryVersion, containerRef, gridSize, snapToGrid, engine: engineHandle }),
|
|
612
|
-
[viewport, setViewport, registerNode, unregisterNode, nodeRects, registryVersion, gridSize, snapToGrid, engineHandle]
|
|
613
|
-
);
|
|
614
|
-
const hasFitted = react.useRef(false);
|
|
615
|
-
react.useEffect(() => {
|
|
616
|
-
if (!fitOnMount || hasFitted.current || nodeRects.size === 0) return;
|
|
617
|
-
const container = containerRef.current;
|
|
618
|
-
if (!container || container.clientWidth === 0) return;
|
|
619
|
-
hasFitted.current = true;
|
|
620
|
-
requestAnimationFrame(() => {
|
|
621
|
-
let minX = Infinity, minY = Infinity, maxX = -Infinity, maxY = -Infinity;
|
|
622
|
-
nodeRects.forEach((r) => {
|
|
623
|
-
minX = Math.min(minX, r.x);
|
|
624
|
-
minY = Math.min(minY, r.y);
|
|
625
|
-
maxX = Math.max(maxX, r.x + r.width);
|
|
626
|
-
maxY = Math.max(maxY, r.y + r.height);
|
|
627
|
-
});
|
|
628
|
-
const padding = 40;
|
|
629
|
-
const contentW = maxX - minX + padding * 2;
|
|
630
|
-
const contentH = maxY - minY + padding * 2;
|
|
631
|
-
const cw = container.clientWidth;
|
|
632
|
-
const ch = container.clientHeight;
|
|
633
|
-
const zoom = Math.min(cw / contentW, ch / contentH, 1.5);
|
|
634
|
-
const panX = (cw - contentW * zoom) / 2 - minX * zoom + padding * zoom;
|
|
635
|
-
const panY = (ch - contentH * zoom) / 2 - minY * zoom + padding * zoom;
|
|
636
|
-
setViewport({ panX, panY, zoom });
|
|
637
|
-
});
|
|
638
|
-
}, [fitOnMount, nodeRects, registryVersion, setViewport]);
|
|
639
|
-
const edges = [];
|
|
640
|
-
const others = [];
|
|
641
|
-
const overlays = [];
|
|
642
|
-
react.Children.forEach(children, (child) => {
|
|
643
|
-
const el = child;
|
|
644
|
-
if (!el || !el.type) return;
|
|
645
|
-
const elType = el.type;
|
|
646
|
-
if (elType === CanvasEdge || elType?._isCanvasEdge) {
|
|
647
|
-
edges.push(el);
|
|
648
|
-
} else if (elType === CanvasMinimap || elType === CanvasControls) {
|
|
649
|
-
overlays.push(el);
|
|
650
|
-
} else {
|
|
651
|
-
others.push(el);
|
|
652
|
-
}
|
|
653
|
-
});
|
|
654
|
-
return /* @__PURE__ */ jsxRuntime.jsx(CanvasContext.Provider, { value: ctx, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
655
|
-
"div",
|
|
656
|
-
{
|
|
657
|
-
ref: containerRef,
|
|
658
|
-
"data-react-fancy-canvas": "",
|
|
659
|
-
className: cn("relative overflow-hidden", className),
|
|
660
|
-
style: { touchAction: "none", ...style },
|
|
661
|
-
...containerProps,
|
|
662
|
-
children: [
|
|
663
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
664
|
-
"div",
|
|
665
|
-
{
|
|
666
|
-
"data-canvas-bg": "",
|
|
667
|
-
className: "absolute inset-0",
|
|
668
|
-
style: showGrid && gridStyle !== "none" ? gridStyle === "lines" ? {
|
|
669
|
-
backgroundImage: `linear-gradient(to right, ${gridColor} 1px, transparent 1px), linear-gradient(to bottom, ${gridColor} 1px, transparent 1px)`,
|
|
670
|
-
backgroundSize: `${gridSize * viewport.zoom}px ${gridSize * viewport.zoom}px`,
|
|
671
|
-
backgroundPosition: `${viewport.panX}px ${viewport.panY}px`
|
|
672
|
-
} : {
|
|
673
|
-
backgroundImage: `radial-gradient(circle, ${gridColor} 1px, transparent 1px)`,
|
|
674
|
-
backgroundSize: `${gridSize * viewport.zoom}px ${gridSize * viewport.zoom}px`,
|
|
675
|
-
backgroundPosition: `${viewport.panX}px ${viewport.panY}px`
|
|
676
|
-
} : void 0
|
|
677
|
-
}
|
|
678
|
-
),
|
|
679
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
680
|
-
"div",
|
|
681
|
-
{
|
|
682
|
-
className: "absolute origin-top-left",
|
|
683
|
-
style: {
|
|
684
|
-
transform: `translate(${viewport.panX}px, ${viewport.panY}px) scale(${viewport.zoom})`
|
|
685
|
-
},
|
|
686
|
-
children: others
|
|
687
|
-
}
|
|
688
|
-
),
|
|
689
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
690
|
-
"svg",
|
|
691
|
-
{
|
|
692
|
-
className: "pointer-events-none absolute inset-0 h-full w-full",
|
|
693
|
-
style: {
|
|
694
|
-
transform: `translate(${viewport.panX}px, ${viewport.panY}px) scale(${viewport.zoom})`,
|
|
695
|
-
transformOrigin: "0 0"
|
|
696
|
-
},
|
|
697
|
-
children: [
|
|
698
|
-
/* @__PURE__ */ jsxRuntime.jsxs("defs", { children: [
|
|
699
|
-
/* @__PURE__ */ jsxRuntime.jsx("marker", { id: "canvas-arrow", viewBox: "0 0 10 10", refX: "10", refY: "5", markerWidth: "8", markerHeight: "8", orient: "auto", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M0,0 L10,5 L0,10 Z", fill: "#71717a" }) }),
|
|
700
|
-
/* @__PURE__ */ jsxRuntime.jsx("marker", { id: "canvas-circle", viewBox: "0 0 10 10", refX: "5", refY: "5", markerWidth: "8", markerHeight: "8", orient: "auto", children: /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "5", cy: "5", r: "3.5", fill: "#71717a" }) }),
|
|
701
|
-
/* @__PURE__ */ jsxRuntime.jsx("marker", { id: "canvas-diamond", viewBox: "0 0 12 12", refX: "6", refY: "6", markerWidth: "10", markerHeight: "10", orient: "auto", children: /* @__PURE__ */ jsxRuntime.jsx("polygon", { points: "6,0 12,6 6,12 0,6", fill: "none", stroke: "#71717a", strokeWidth: "1.5" }) }),
|
|
702
|
-
/* @__PURE__ */ jsxRuntime.jsx("marker", { id: "canvas-one", viewBox: "0 0 2 16", refX: "1", refY: "8", markerWidth: "2", markerHeight: "14", orient: "auto", children: /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "1", y1: "0", x2: "1", y2: "16", stroke: "#71717a", strokeWidth: "2" }) }),
|
|
703
|
-
/* @__PURE__ */ jsxRuntime.jsxs("marker", { id: "canvas-crow-foot", viewBox: "0 0 16 16", refX: "16", refY: "8", markerWidth: "14", markerHeight: "14", orient: "auto", children: [
|
|
704
|
-
/* @__PURE__ */ jsxRuntime.jsx("line", { x1: "16", y1: "8", x2: "0", y2: "0", stroke: "#71717a", strokeWidth: "2", strokeLinecap: "round" }),
|
|
705
|
-
/* @__PURE__ */ jsxRuntime.jsx("line", { x1: "16", y1: "8", x2: "0", y2: "8", stroke: "#71717a", strokeWidth: "2", strokeLinecap: "round" }),
|
|
706
|
-
/* @__PURE__ */ jsxRuntime.jsx("line", { x1: "16", y1: "8", x2: "0", y2: "16", stroke: "#71717a", strokeWidth: "2", strokeLinecap: "round" }),
|
|
707
|
-
/* @__PURE__ */ jsxRuntime.jsx("line", { x1: "16", y1: "0", x2: "16", y2: "16", stroke: "#71717a", strokeWidth: "2", strokeLinecap: "round" })
|
|
708
|
-
] })
|
|
709
|
-
] }),
|
|
710
|
-
edges
|
|
711
|
-
]
|
|
712
|
-
}
|
|
713
|
-
),
|
|
714
|
-
overlays
|
|
715
|
-
]
|
|
716
|
-
}
|
|
717
|
-
) });
|
|
718
|
-
}
|
|
719
|
-
var Canvas = Object.assign(CanvasRoot, {
|
|
720
|
-
Node: CanvasNode,
|
|
721
|
-
Edge: CanvasEdge,
|
|
722
|
-
Minimap: CanvasMinimap,
|
|
723
|
-
Controls: CanvasControls
|
|
8
|
+
Object.defineProperty(exports, "Canvas", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return chunkIU7B7Y63_cjs.Canvas; }
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "domEngine", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () { return chunkIU7B7Y63_cjs.domEngine; }
|
|
15
|
+
});
|
|
16
|
+
Object.defineProperty(exports, "useCanvas", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () { return chunkIU7B7Y63_cjs.useCanvas; }
|
|
724
19
|
});
|
|
725
|
-
/*! Bundled license information:
|
|
726
|
-
|
|
727
|
-
lucide-react/dist/esm/shared/src/utils.js:
|
|
728
|
-
lucide-react/dist/esm/defaultAttributes.js:
|
|
729
|
-
lucide-react/dist/esm/Icon.js:
|
|
730
|
-
lucide-react/dist/esm/createLucideIcon.js:
|
|
731
|
-
lucide-react/dist/esm/icons/maximize.js:
|
|
732
|
-
lucide-react/dist/esm/icons/rotate-ccw.js:
|
|
733
|
-
lucide-react/dist/esm/icons/zoom-in.js:
|
|
734
|
-
lucide-react/dist/esm/icons/zoom-out.js:
|
|
735
|
-
lucide-react/dist/esm/lucide-react.js:
|
|
736
|
-
(**
|
|
737
|
-
* @license lucide-react v0.511.0 - ISC
|
|
738
|
-
*
|
|
739
|
-
* This source code is licensed under the ISC license.
|
|
740
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
741
|
-
*)
|
|
742
|
-
*/
|
|
743
|
-
|
|
744
|
-
exports.Canvas = Canvas;
|
|
745
|
-
exports.domEngine = domEngine;
|
|
746
|
-
exports.useCanvas = useCanvas;
|
|
747
20
|
//# sourceMappingURL=index.cjs.map
|
|
748
21
|
//# sourceMappingURL=index.cjs.map
|