pptx-react-viewer 4.1.6 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/{AiChatPanel-Y2RKSHOO.mjs → AiChatPanel-SEIRQ3XP.mjs} +3 -3
- package/dist/AiChatPanel-SEIRQ3XP.mjs.br +0 -0
- package/dist/AiChatPanel-SEIRQ3XP.mjs.gz +0 -0
- package/dist/{AiChatPanel-DRCY3T2Z.js → AiChatPanel-VVTLQXQ5.js} +27 -27
- package/dist/AiChatPanel-VVTLQXQ5.js.br +0 -0
- package/dist/AiChatPanel-VVTLQXQ5.js.gz +0 -0
- package/dist/{Model3DScene-ITHRMCLT.mjs → Model3DScene-DCTVSK2F.mjs} +1 -1
- package/dist/Model3DScene-DCTVSK2F.mjs.br +0 -0
- package/dist/Model3DScene-DCTVSK2F.mjs.gz +0 -0
- package/dist/{Model3DScene-VJZS726S.js → Model3DScene-SCWQXMEA.js} +2 -2
- package/dist/Model3DScene-SCWQXMEA.js.br +0 -0
- package/dist/Model3DScene-SCWQXMEA.js.gz +0 -0
- package/dist/{chunk-IXS7DALE.js → OrbitControls-4TDJCTBA.js} +1 -0
- package/dist/OrbitControls-4TDJCTBA.js.br +0 -0
- package/dist/OrbitControls-4TDJCTBA.js.gz +0 -0
- package/dist/{chunk-MV2GCDBR.mjs → OrbitControls-WCOIJFFL.mjs} +1 -0
- package/dist/OrbitControls-WCOIJFFL.mjs.br +0 -0
- package/dist/OrbitControls-WCOIJFFL.mjs.gz +0 -0
- package/dist/{chunk-2O66VMWK.js → chunk-3WYNGYB6.js} +5 -5
- package/dist/chunk-3WYNGYB6.js.br +0 -0
- package/dist/chunk-3WYNGYB6.js.gz +0 -0
- package/dist/{chunk-OFSKGB3W.mjs → chunk-4GTDG2FH.mjs} +157 -579
- package/dist/chunk-4GTDG2FH.mjs.br +0 -0
- package/dist/chunk-4GTDG2FH.mjs.gz +0 -0
- package/dist/{chunk-P5LF34BT.js → chunk-5MRNT4V6.js} +173 -173
- package/dist/chunk-5MRNT4V6.js.br +0 -0
- package/dist/chunk-5MRNT4V6.js.gz +0 -0
- package/dist/{chunk-KDTE5JOW.mjs → chunk-B5YZABYX.mjs} +1 -1
- package/dist/chunk-B5YZABYX.mjs.br +0 -0
- package/dist/chunk-B5YZABYX.mjs.gz +0 -0
- package/dist/{chunk-LNSYROED.js → chunk-KTSDPBQZ.js} +1309 -1210
- package/dist/chunk-KTSDPBQZ.js.br +0 -0
- package/dist/chunk-KTSDPBQZ.js.gz +0 -0
- package/dist/{chunk-QEYWSHNE.mjs → chunk-L4XBWL7J.mjs} +1 -1
- package/dist/chunk-L4XBWL7J.mjs.br +0 -0
- package/dist/chunk-L4XBWL7J.mjs.gz +0 -0
- package/dist/{chunk-VWGJXNMR.js → chunk-P2SBIMYF.js} +1645 -2073
- package/dist/chunk-P2SBIMYF.js.br +0 -0
- package/dist/chunk-P2SBIMYF.js.gz +0 -0
- package/dist/{chunk-QMSSDBKN.js → chunk-S65QSO6T.js} +26522 -22546
- package/dist/chunk-S65QSO6T.js.br +0 -0
- package/dist/chunk-S65QSO6T.js.gz +0 -0
- package/dist/{chunk-FT3MMIXW.mjs → chunk-VPJOJJ36.mjs} +26518 -22532
- package/dist/chunk-VPJOJJ36.mjs.br +0 -0
- package/dist/chunk-VPJOJJ36.mjs.gz +0 -0
- package/dist/{chunk-YHTDDCSC.mjs → chunk-ZYIJODUR.mjs} +254 -155
- package/dist/chunk-ZYIJODUR.mjs.br +0 -0
- package/dist/chunk-ZYIJODUR.mjs.gz +0 -0
- package/dist/index.d.ts +65 -18
- package/dist/index.js +47 -47
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +5 -5
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.d.ts +65 -18
- package/dist/internals.js +104 -104
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/internals.mjs +3 -3
- package/dist/internals.mjs.br +0 -0
- package/dist/internals.mjs.gz +0 -0
- package/dist/pptx-viewer.css +1 -1
- package/dist/pptx-viewer.css.br +0 -0
- package/dist/pptx-viewer.css.gz +0 -0
- package/dist/viewer/index.d.ts +48 -1
- package/dist/viewer/index.js +26 -26
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +5 -5
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +1 -1
- package/dist/AiChatPanel-DRCY3T2Z.js.br +0 -0
- package/dist/AiChatPanel-DRCY3T2Z.js.gz +0 -0
- package/dist/AiChatPanel-Y2RKSHOO.mjs.br +0 -0
- package/dist/AiChatPanel-Y2RKSHOO.mjs.gz +0 -0
- package/dist/Area3DChartScene-J4LMNSGM.js +0 -64
- package/dist/Area3DChartScene-J4LMNSGM.js.br +0 -0
- package/dist/Area3DChartScene-J4LMNSGM.js.gz +0 -0
- package/dist/Area3DChartScene-TDACCSOI.mjs +0 -62
- package/dist/Area3DChartScene-TDACCSOI.mjs.br +0 -0
- package/dist/Area3DChartScene-TDACCSOI.mjs.gz +0 -0
- package/dist/Bar3DChartScene-AD72DLBJ.mjs +0 -62
- package/dist/Bar3DChartScene-AD72DLBJ.mjs.br +0 -0
- package/dist/Bar3DChartScene-AD72DLBJ.mjs.gz +0 -0
- package/dist/Bar3DChartScene-T7334CTK.js +0 -64
- package/dist/Bar3DChartScene-T7334CTK.js.br +0 -0
- package/dist/Bar3DChartScene-T7334CTK.js.gz +0 -0
- package/dist/Line3DChartScene-2ZQSCHK3.mjs +0 -62
- package/dist/Line3DChartScene-2ZQSCHK3.mjs.br +0 -0
- package/dist/Line3DChartScene-2ZQSCHK3.mjs.gz +0 -0
- package/dist/Line3DChartScene-ELVKCFJZ.js +0 -64
- package/dist/Line3DChartScene-ELVKCFJZ.js.br +0 -0
- package/dist/Line3DChartScene-ELVKCFJZ.js.gz +0 -0
- package/dist/Model3DScene-ITHRMCLT.mjs.br +0 -0
- package/dist/Model3DScene-ITHRMCLT.mjs.gz +0 -0
- package/dist/Model3DScene-VJZS726S.js.br +0 -0
- package/dist/Model3DScene-VJZS726S.js.gz +0 -0
- package/dist/OrbitControls-2XOMWUVE.mjs +0 -3
- package/dist/OrbitControls-2XOMWUVE.mjs.br +0 -0
- package/dist/OrbitControls-2XOMWUVE.mjs.gz +0 -0
- package/dist/OrbitControls-CGYUF3BY.js +0 -12
- package/dist/OrbitControls-CGYUF3BY.js.br +0 -0
- package/dist/OrbitControls-CGYUF3BY.js.gz +0 -0
- package/dist/PieChart3DScene-N3DM33FW.js +0 -58
- package/dist/PieChart3DScene-N3DM33FW.js.br +0 -0
- package/dist/PieChart3DScene-N3DM33FW.js.gz +0 -0
- package/dist/PieChart3DScene-PYHOA7BO.mjs +0 -56
- package/dist/PieChart3DScene-PYHOA7BO.mjs.br +0 -0
- package/dist/PieChart3DScene-PYHOA7BO.mjs.gz +0 -0
- package/dist/SmartArt3DScene-D4VNNPHS.mjs +0 -500
- package/dist/SmartArt3DScene-D4VNNPHS.mjs.br +0 -0
- package/dist/SmartArt3DScene-D4VNNPHS.mjs.gz +0 -0
- package/dist/SmartArt3DScene-NHD7CZJ5.js +0 -502
- package/dist/SmartArt3DScene-NHD7CZJ5.js.br +0 -0
- package/dist/SmartArt3DScene-NHD7CZJ5.js.gz +0 -0
- package/dist/SurfaceChart3DScene-IFBUOLNB.mjs +0 -62
- package/dist/SurfaceChart3DScene-IFBUOLNB.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-IFBUOLNB.mjs.gz +0 -0
- package/dist/SurfaceChart3DScene-PUWIMT7V.js +0 -64
- package/dist/SurfaceChart3DScene-PUWIMT7V.js.br +0 -0
- package/dist/SurfaceChart3DScene-PUWIMT7V.js.gz +0 -0
- package/dist/chunk-2O66VMWK.js.br +0 -0
- package/dist/chunk-2O66VMWK.js.gz +0 -0
- package/dist/chunk-DNR6CH6I.js +0 -30
- package/dist/chunk-DNR6CH6I.js.br +0 -0
- package/dist/chunk-DNR6CH6I.js.gz +0 -0
- package/dist/chunk-FT3MMIXW.mjs.br +0 -0
- package/dist/chunk-FT3MMIXW.mjs.gz +0 -0
- package/dist/chunk-IXS7DALE.js.br +0 -0
- package/dist/chunk-IXS7DALE.js.gz +0 -0
- package/dist/chunk-KDTE5JOW.mjs.br +0 -0
- package/dist/chunk-KDTE5JOW.mjs.gz +0 -0
- package/dist/chunk-LNSYROED.js.br +0 -0
- package/dist/chunk-LNSYROED.js.gz +0 -0
- package/dist/chunk-MV2GCDBR.mjs.br +0 -0
- package/dist/chunk-MV2GCDBR.mjs.gz +0 -0
- package/dist/chunk-OFSKGB3W.mjs.br +0 -0
- package/dist/chunk-OFSKGB3W.mjs.gz +0 -0
- package/dist/chunk-P5LF34BT.js.br +0 -0
- package/dist/chunk-P5LF34BT.js.gz +0 -0
- package/dist/chunk-QEYWSHNE.mjs.br +0 -0
- package/dist/chunk-QEYWSHNE.mjs.gz +0 -0
- package/dist/chunk-QMSSDBKN.js.br +0 -0
- package/dist/chunk-QMSSDBKN.js.gz +0 -0
- package/dist/chunk-T6GFCLSM.mjs +0 -27
- package/dist/chunk-T6GFCLSM.mjs.br +0 -4
- package/dist/chunk-T6GFCLSM.mjs.gz +0 -0
- package/dist/chunk-VWGJXNMR.js.br +0 -0
- package/dist/chunk-VWGJXNMR.js.gz +0 -0
- package/dist/chunk-YHTDDCSC.mjs.br +0 -0
- package/dist/chunk-YHTDDCSC.mjs.gz +0 -0
|
@@ -1,502 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunkDNR6CH6I_js = require('./chunk-DNR6CH6I.js');
|
|
4
|
-
var chunkIXS7DALE_js = require('./chunk-IXS7DALE.js');
|
|
5
|
-
var chunk3N6AC4HA_js = require('./chunk-3N6AC4HA.js');
|
|
6
|
-
require('./chunk-4VNS5WPM.js');
|
|
7
|
-
var react = require('react');
|
|
8
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
9
|
-
|
|
10
|
-
// ../shared/dist/smartart-3d/index.mjs
|
|
11
|
-
var SUPERSAMPLE = 4;
|
|
12
|
-
var FILL = 0.86;
|
|
13
|
-
function wrapLines(ctx, text, maxWidth) {
|
|
14
|
-
const words = text.split(/\s+/u).filter(Boolean);
|
|
15
|
-
if (words.length === 0) {
|
|
16
|
-
return [];
|
|
17
|
-
}
|
|
18
|
-
const lines = [];
|
|
19
|
-
let line = words[0];
|
|
20
|
-
for (let i = 1; i < words.length; i++) {
|
|
21
|
-
const candidate = `${line} ${words[i]}`;
|
|
22
|
-
if (ctx.measureText(candidate).width <= maxWidth) {
|
|
23
|
-
line = candidate;
|
|
24
|
-
} else {
|
|
25
|
-
lines.push(line);
|
|
26
|
-
line = words[i];
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
lines.push(line);
|
|
30
|
-
return lines;
|
|
31
|
-
}
|
|
32
|
-
function resolveEmphasisFont(color, emphasis) {
|
|
33
|
-
const weight = emphasis?.bold === void 0 ? "600" : emphasis.bold ? "700" : "400";
|
|
34
|
-
const italic = emphasis?.italic ? "italic " : "";
|
|
35
|
-
const scale = typeof emphasis?.fontScale === "number" && Number.isFinite(emphasis.fontScale) && emphasis.fontScale > 0 ? emphasis.fontScale : 1;
|
|
36
|
-
return { weight, italic, color: emphasis?.color ?? color, scale };
|
|
37
|
-
}
|
|
38
|
-
function makeTextTexture(text, color, fontSize, footW, footH, emphasis) {
|
|
39
|
-
if (typeof document === "undefined" || !text.trim() || footW <= 0 || footH <= 0) {
|
|
40
|
-
return null;
|
|
41
|
-
}
|
|
42
|
-
const { weight, italic, color: effectiveColor, scale } = resolveEmphasisFont(color, emphasis);
|
|
43
|
-
const worldWidth = footW * FILL;
|
|
44
|
-
const worldHeight = footH * FILL;
|
|
45
|
-
const canvas = document.createElement("canvas");
|
|
46
|
-
canvas.width = Math.max(8, Math.round(worldWidth * SUPERSAMPLE));
|
|
47
|
-
canvas.height = Math.max(8, Math.round(worldHeight * SUPERSAMPLE));
|
|
48
|
-
const ctx = canvas.getContext("2d");
|
|
49
|
-
if (!ctx) {
|
|
50
|
-
return null;
|
|
51
|
-
}
|
|
52
|
-
const family = "system-ui, -apple-system, Segoe UI, Roboto, sans-serif";
|
|
53
|
-
const maxTextWidth = canvas.width * 0.94;
|
|
54
|
-
const fontString = (px2) => `${italic}${weight} ${px2}px ${family}`;
|
|
55
|
-
let px = Math.max(6, fontSize) * scale * SUPERSAMPLE;
|
|
56
|
-
let lines = [];
|
|
57
|
-
for (let attempt = 0; attempt < 12; attempt++) {
|
|
58
|
-
ctx.font = fontString(px);
|
|
59
|
-
lines = wrapLines(ctx, text, maxTextWidth);
|
|
60
|
-
const lineHeight2 = px * 1.2;
|
|
61
|
-
if (lines.length * lineHeight2 <= canvas.height * 0.96 || px <= 6 * SUPERSAMPLE) {
|
|
62
|
-
break;
|
|
63
|
-
}
|
|
64
|
-
px *= 0.88;
|
|
65
|
-
}
|
|
66
|
-
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
|
67
|
-
ctx.fillStyle = effectiveColor;
|
|
68
|
-
ctx.textAlign = "center";
|
|
69
|
-
ctx.textBaseline = "middle";
|
|
70
|
-
ctx.font = fontString(px);
|
|
71
|
-
const lineHeight = px * 1.2;
|
|
72
|
-
const blockHeight = lines.length * lineHeight;
|
|
73
|
-
const startY = canvas.height / 2 - blockHeight / 2 + lineHeight / 2;
|
|
74
|
-
for (let i = 0; i < lines.length; i++) {
|
|
75
|
-
const y = startY + i * lineHeight;
|
|
76
|
-
ctx.fillText(lines[i], canvas.width / 2, y);
|
|
77
|
-
if (emphasis?.underline) {
|
|
78
|
-
const w = ctx.measureText(lines[i]).width;
|
|
79
|
-
ctx.strokeStyle = effectiveColor;
|
|
80
|
-
ctx.lineWidth = Math.max(1, px * 0.06);
|
|
81
|
-
ctx.beginPath();
|
|
82
|
-
ctx.moveTo(canvas.width / 2 - w / 2, y + px * 0.32);
|
|
83
|
-
ctx.lineTo(canvas.width / 2 + w / 2, y + px * 0.32);
|
|
84
|
-
ctx.stroke();
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
const texture = new chunk3N6AC4HA_js.CanvasTexture(canvas);
|
|
88
|
-
texture.colorSpace = chunk3N6AC4HA_js.SRGBColorSpace;
|
|
89
|
-
texture.minFilter = chunk3N6AC4HA_js.LinearFilter;
|
|
90
|
-
texture.magFilter = chunk3N6AC4HA_js.LinearFilter;
|
|
91
|
-
texture.flipY = false;
|
|
92
|
-
texture.premultiplyAlpha = false;
|
|
93
|
-
texture.wrapT = chunk3N6AC4HA_js.RepeatWrapping;
|
|
94
|
-
texture.repeat.set(1, -1);
|
|
95
|
-
texture.offset.set(0, 1);
|
|
96
|
-
texture.needsUpdate = true;
|
|
97
|
-
return { texture, worldWidth, worldHeight };
|
|
98
|
-
}
|
|
99
|
-
function extrudeGeometry(m) {
|
|
100
|
-
const shape = new chunk3N6AC4HA_js.Shape();
|
|
101
|
-
m.outline.forEach((p, i) => {
|
|
102
|
-
if (i === 0) {
|
|
103
|
-
shape.moveTo(p.x, p.y);
|
|
104
|
-
} else {
|
|
105
|
-
shape.lineTo(p.x, p.y);
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
shape.closePath();
|
|
109
|
-
const bevelEnabled = m.bevel > 0;
|
|
110
|
-
return new chunk3N6AC4HA_js.ExtrudeGeometry(shape, {
|
|
111
|
-
depth: m.depth,
|
|
112
|
-
bevelEnabled,
|
|
113
|
-
bevelThickness: m.bevel,
|
|
114
|
-
bevelSize: m.bevel,
|
|
115
|
-
bevelSegments: 2,
|
|
116
|
-
curveSegments: m.rounded ? 24 : 1,
|
|
117
|
-
steps: 1
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
function addBlock(group, disposables, m) {
|
|
121
|
-
const geo = extrudeGeometry(m);
|
|
122
|
-
const material = new chunk3N6AC4HA_js.MeshStandardMaterial({
|
|
123
|
-
color: new chunk3N6AC4HA_js.Color(m.fill),
|
|
124
|
-
metalness: 0.12,
|
|
125
|
-
roughness: 0.52,
|
|
126
|
-
transparent: m.opacity < 1,
|
|
127
|
-
opacity: m.opacity
|
|
128
|
-
});
|
|
129
|
-
const mesh = new chunk3N6AC4HA_js.Mesh(geo, material);
|
|
130
|
-
mesh.position.set(m.position.x, m.position.y, m.position.z);
|
|
131
|
-
mesh.rotation.set(m.rotation.x, m.rotation.y, m.rotation.z);
|
|
132
|
-
group.add(mesh);
|
|
133
|
-
disposables.push(geo, material);
|
|
134
|
-
if (m.strokeWidth > 0) {
|
|
135
|
-
const edges = new chunk3N6AC4HA_js.EdgesGeometry(geo, 30);
|
|
136
|
-
const lineMaterial = new chunk3N6AC4HA_js.LineBasicMaterial({ color: new chunk3N6AC4HA_js.Color(m.stroke) });
|
|
137
|
-
const line = new chunk3N6AC4HA_js.LineSegments(edges, lineMaterial);
|
|
138
|
-
line.position.copy(mesh.position);
|
|
139
|
-
line.rotation.copy(mesh.rotation);
|
|
140
|
-
group.add(line);
|
|
141
|
-
disposables.push(edges, lineMaterial);
|
|
142
|
-
}
|
|
143
|
-
return geo;
|
|
144
|
-
}
|
|
145
|
-
function buildLabelPlane(m, textStyle) {
|
|
146
|
-
if (!m.text) {
|
|
147
|
-
return null;
|
|
148
|
-
}
|
|
149
|
-
const tex = makeTextTexture(
|
|
150
|
-
m.text,
|
|
151
|
-
m.textColor,
|
|
152
|
-
m.fontSize,
|
|
153
|
-
m.halfWidth * 2,
|
|
154
|
-
m.halfHeight * 2,
|
|
155
|
-
textStyle
|
|
156
|
-
);
|
|
157
|
-
if (!tex) {
|
|
158
|
-
return null;
|
|
159
|
-
}
|
|
160
|
-
const planeGeo = new chunk3N6AC4HA_js.PlaneGeometry(tex.worldWidth, tex.worldHeight);
|
|
161
|
-
const planeMaterial = new chunk3N6AC4HA_js.MeshBasicMaterial({
|
|
162
|
-
map: tex.texture,
|
|
163
|
-
transparent: true,
|
|
164
|
-
depthWrite: false,
|
|
165
|
-
depthTest: false,
|
|
166
|
-
side: chunk3N6AC4HA_js.DoubleSide
|
|
167
|
-
});
|
|
168
|
-
const plane = new chunk3N6AC4HA_js.Mesh(planeGeo, planeMaterial);
|
|
169
|
-
plane.renderOrder = 1;
|
|
170
|
-
const euler = new chunk3N6AC4HA_js.Euler(m.rotation.x, m.rotation.y, m.rotation.z);
|
|
171
|
-
const offset = new chunk3N6AC4HA_js.Vector3(0, 0, m.depth + m.bevel + 0.4).applyEuler(euler);
|
|
172
|
-
plane.position.set(m.position.x + offset.x, m.position.y + offset.y, m.position.z + offset.z);
|
|
173
|
-
plane.rotation.copy(euler);
|
|
174
|
-
return { plane, disposables: [planeGeo, planeMaterial, tex.texture] };
|
|
175
|
-
}
|
|
176
|
-
function addConnectors(group, disposables, model) {
|
|
177
|
-
for (const c of model.connectors) {
|
|
178
|
-
if (c.points.length < 2) {
|
|
179
|
-
continue;
|
|
180
|
-
}
|
|
181
|
-
const geo = new chunk3N6AC4HA_js.BufferGeometry().setFromPoints(c.points.map((p) => new chunk3N6AC4HA_js.Vector3(p.x, p.y, p.z)));
|
|
182
|
-
const material = new chunk3N6AC4HA_js.LineBasicMaterial({
|
|
183
|
-
color: new chunk3N6AC4HA_js.Color(c.color),
|
|
184
|
-
transparent: true,
|
|
185
|
-
opacity: 0.7
|
|
186
|
-
});
|
|
187
|
-
group.add(new chunk3N6AC4HA_js.Line(geo, material));
|
|
188
|
-
disposables.push(geo, material);
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
function clearLabel(group, entry) {
|
|
192
|
-
if (entry.plane) {
|
|
193
|
-
group.remove(entry.plane);
|
|
194
|
-
}
|
|
195
|
-
for (const d of entry.disposables) {
|
|
196
|
-
d.dispose();
|
|
197
|
-
}
|
|
198
|
-
entry.plane = null;
|
|
199
|
-
entry.disposables = [];
|
|
200
|
-
}
|
|
201
|
-
function buildMeshGroup(model, textStyle) {
|
|
202
|
-
const group = new chunk3N6AC4HA_js.Group();
|
|
203
|
-
const blockDisposables = [];
|
|
204
|
-
const labelEntries = model.meshes.map((m) => {
|
|
205
|
-
addBlock(group, blockDisposables, m);
|
|
206
|
-
const built = buildLabelPlane(m, textStyle);
|
|
207
|
-
if (built) {
|
|
208
|
-
group.add(built.plane);
|
|
209
|
-
}
|
|
210
|
-
return { node: m, plane: built?.plane ?? null, disposables: built?.disposables ?? [] };
|
|
211
|
-
});
|
|
212
|
-
addConnectors(group, blockDisposables, model);
|
|
213
|
-
return {
|
|
214
|
-
group,
|
|
215
|
-
setTextStyle(style) {
|
|
216
|
-
for (const entry of labelEntries) {
|
|
217
|
-
clearLabel(group, entry);
|
|
218
|
-
const built = buildLabelPlane(entry.node, style);
|
|
219
|
-
if (built) {
|
|
220
|
-
group.add(built.plane);
|
|
221
|
-
entry.plane = built.plane;
|
|
222
|
-
entry.disposables = built.disposables;
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
},
|
|
226
|
-
forEachLabelPlane(fn) {
|
|
227
|
-
for (const entry of labelEntries) {
|
|
228
|
-
if (entry.plane) {
|
|
229
|
-
fn(entry.plane);
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
},
|
|
233
|
-
dispose() {
|
|
234
|
-
for (const d of blockDisposables) {
|
|
235
|
-
d.dispose();
|
|
236
|
-
}
|
|
237
|
-
for (const entry of labelEntries) {
|
|
238
|
-
clearLabel(group, entry);
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
};
|
|
242
|
-
}
|
|
243
|
-
var FOV = 42;
|
|
244
|
-
function expandForMesh(expand, m) {
|
|
245
|
-
const hx = m.halfWidth + m.bevel;
|
|
246
|
-
const hy = m.halfHeight + m.bevel;
|
|
247
|
-
const hz = m.depth / 2 + m.bevel;
|
|
248
|
-
const midZ = m.position.z + m.depth / 2;
|
|
249
|
-
const cosY = Math.cos(m.rotation.y);
|
|
250
|
-
const sinY = Math.sin(m.rotation.y);
|
|
251
|
-
const worldHalfX = Math.abs(hx * cosY) + Math.abs(hz * sinY);
|
|
252
|
-
const worldHalfZ = Math.abs(hx * sinY) + Math.abs(hz * cosY);
|
|
253
|
-
expand(m.position.x, m.position.y, midZ, worldHalfX, hy, worldHalfZ);
|
|
254
|
-
}
|
|
255
|
-
function contentSphere(model) {
|
|
256
|
-
let minX = Infinity;
|
|
257
|
-
let minY = Infinity;
|
|
258
|
-
let minZ = Infinity;
|
|
259
|
-
let maxX = -Infinity;
|
|
260
|
-
let maxY = -Infinity;
|
|
261
|
-
let maxZ = -Infinity;
|
|
262
|
-
const expand = (x, y, z, rx, ry, rz) => {
|
|
263
|
-
minX = Math.min(minX, x - rx);
|
|
264
|
-
minY = Math.min(minY, y - ry);
|
|
265
|
-
minZ = Math.min(minZ, z - rz);
|
|
266
|
-
maxX = Math.max(maxX, x + rx);
|
|
267
|
-
maxY = Math.max(maxY, y + ry);
|
|
268
|
-
maxZ = Math.max(maxZ, z + rz);
|
|
269
|
-
};
|
|
270
|
-
for (const m of model.meshes) {
|
|
271
|
-
expandForMesh(expand, m);
|
|
272
|
-
}
|
|
273
|
-
for (const c of model.connectors) {
|
|
274
|
-
for (const p of c.points) {
|
|
275
|
-
expand(p.x, p.y, p.z, 1, 1, 1);
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
if (!Number.isFinite(minX)) {
|
|
279
|
-
const halfW = model.bounds.width / 2 || 1;
|
|
280
|
-
const halfH = model.bounds.height / 2 || 1;
|
|
281
|
-
const fallback = Math.max(halfW, halfH);
|
|
282
|
-
return { cx: 0, cy: 0, cz: 0, radius: fallback, halfW, halfH, halfD: 1 };
|
|
283
|
-
}
|
|
284
|
-
return {
|
|
285
|
-
cx: (minX + maxX) / 2,
|
|
286
|
-
cy: (minY + maxY) / 2,
|
|
287
|
-
cz: (minZ + maxZ) / 2,
|
|
288
|
-
radius: 0.5 * Math.hypot(maxX - minX, maxY - minY, maxZ - minZ) || 1,
|
|
289
|
-
halfW: (maxX - minX) / 2,
|
|
290
|
-
halfH: (maxY - minY) / 2,
|
|
291
|
-
halfD: (maxZ - minZ) / 2
|
|
292
|
-
};
|
|
293
|
-
}
|
|
294
|
-
function frameDistance(radius, aspect) {
|
|
295
|
-
const vFov = FOV * Math.PI / 180;
|
|
296
|
-
const hFov = 2 * Math.atan(Math.tan(vFov / 2) * aspect);
|
|
297
|
-
const minFov = Math.min(vFov, hFov);
|
|
298
|
-
return radius / Math.sin(minFov / 2) * 1.1;
|
|
299
|
-
}
|
|
300
|
-
var FRAME_FILL = 0.92;
|
|
301
|
-
function placeCamera(bounds, family, dist) {
|
|
302
|
-
const { cx, cy, cz, radius } = bounds;
|
|
303
|
-
const elevation = cameraElevation(family, radius, dist);
|
|
304
|
-
return {
|
|
305
|
-
position: [cx + radius * 0.25, cy + elevation, cz + dist],
|
|
306
|
-
target: [cx, cy, cz],
|
|
307
|
-
dist
|
|
308
|
-
};
|
|
309
|
-
}
|
|
310
|
-
function projectedFill(bounds, placement, aspect) {
|
|
311
|
-
const vFov = FOV * Math.PI / 180;
|
|
312
|
-
const tanV = Math.tan(vFov / 2);
|
|
313
|
-
const tanH = tanV * aspect;
|
|
314
|
-
const [px, py, pz] = placement.position;
|
|
315
|
-
const [tx, ty, tz] = placement.target;
|
|
316
|
-
let fx = tx - px, fy = ty - py, fz = tz - pz;
|
|
317
|
-
const fl = Math.hypot(fx, fy, fz) || 1;
|
|
318
|
-
fx /= fl;
|
|
319
|
-
fy /= fl;
|
|
320
|
-
fz /= fl;
|
|
321
|
-
let rx = -fz, rz = fx;
|
|
322
|
-
const rl = Math.hypot(rx, rz) || 1;
|
|
323
|
-
rx /= rl;
|
|
324
|
-
rz /= rl;
|
|
325
|
-
const ux = -rz * fy, uy = rz * fx - rx * fz, uz = rx * fy;
|
|
326
|
-
let worst = 0;
|
|
327
|
-
for (const sx of [-1, 1]) {
|
|
328
|
-
for (const sy of [-1, 1]) {
|
|
329
|
-
for (const sz of [-1, 1]) {
|
|
330
|
-
const dx = bounds.cx + sx * bounds.halfW - px;
|
|
331
|
-
const dy = bounds.cy + sy * bounds.halfH - py;
|
|
332
|
-
const dz = bounds.cz + sz * bounds.halfD - pz;
|
|
333
|
-
const depth = dx * fx + dy * fy + dz * fz;
|
|
334
|
-
if (depth <= 1e-6) {
|
|
335
|
-
return Infinity;
|
|
336
|
-
}
|
|
337
|
-
const x = Math.abs(dx * rx + dz * rz) / (depth * tanH);
|
|
338
|
-
const y = Math.abs(dx * ux + dy * uy + dz * uz) / (depth * tanV);
|
|
339
|
-
worst = Math.max(worst, x, y);
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
return worst;
|
|
344
|
-
}
|
|
345
|
-
function fitCamera(bounds, family, aspect) {
|
|
346
|
-
let dist = frameDistance(bounds.radius, aspect);
|
|
347
|
-
let placement = placeCamera(bounds, family, dist);
|
|
348
|
-
for (let step = 0; step < 8; step++) {
|
|
349
|
-
const fill = projectedFill(bounds, placement, aspect);
|
|
350
|
-
if (!Number.isFinite(fill)) {
|
|
351
|
-
dist *= 2;
|
|
352
|
-
} else {
|
|
353
|
-
const ratio = fill / FRAME_FILL;
|
|
354
|
-
if (Math.abs(ratio - 1) < 0.01) {
|
|
355
|
-
break;
|
|
356
|
-
}
|
|
357
|
-
dist *= ratio;
|
|
358
|
-
}
|
|
359
|
-
placement = placeCamera(bounds, family, dist);
|
|
360
|
-
}
|
|
361
|
-
return placement;
|
|
362
|
-
}
|
|
363
|
-
var CAROUSEL_ELEVATION_DEG = 34;
|
|
364
|
-
function cameraElevation(family, radius, dist) {
|
|
365
|
-
if (family === "cycle" || family === "radial") {
|
|
366
|
-
return dist * Math.tan(CAROUSEL_ELEVATION_DEG * Math.PI / 180);
|
|
367
|
-
}
|
|
368
|
-
return radius * 0.3;
|
|
369
|
-
}
|
|
370
|
-
function billboardLabels(built, camera) {
|
|
371
|
-
built.forEachLabelPlane((plane) => {
|
|
372
|
-
const dx = camera.position.x - plane.position.x;
|
|
373
|
-
const dz = camera.position.z - plane.position.z;
|
|
374
|
-
plane.rotation.set(0, Math.atan2(dx, dz), 0);
|
|
375
|
-
});
|
|
376
|
-
}
|
|
377
|
-
function mountSmartArt3D(canvas, model, width, height, options = {}) {
|
|
378
|
-
const renderer = new chunk3N6AC4HA_js.WebGLRenderer({ canvas, antialias: true, alpha: !options.background });
|
|
379
|
-
renderer.setPixelRatio(
|
|
380
|
-
Math.min(
|
|
381
|
-
typeof window === "undefined" ? 1 : window.devicePixelRatio || 1,
|
|
382
|
-
options.maxPixelRatio ?? 2
|
|
383
|
-
)
|
|
384
|
-
);
|
|
385
|
-
renderer.setSize(width, height, false);
|
|
386
|
-
const scene = new chunk3N6AC4HA_js.Scene();
|
|
387
|
-
if (options.background) {
|
|
388
|
-
scene.background = new chunk3N6AC4HA_js.Color(options.background);
|
|
389
|
-
}
|
|
390
|
-
const bounds = contentSphere(model);
|
|
391
|
-
const { cx, cy, cz, radius } = bounds;
|
|
392
|
-
const aspect = width / Math.max(1, height);
|
|
393
|
-
const placement = fitCamera(bounds, model.family, aspect);
|
|
394
|
-
const { dist } = placement;
|
|
395
|
-
const camera = new chunk3N6AC4HA_js.PerspectiveCamera(FOV, aspect, 0.1, dist * 8 + radius * 4);
|
|
396
|
-
camera.position.set(...placement.position);
|
|
397
|
-
camera.lookAt(...placement.target);
|
|
398
|
-
scene.add(new chunk3N6AC4HA_js.AmbientLight(16777215, 0.62));
|
|
399
|
-
const key = new chunk3N6AC4HA_js.DirectionalLight(16777215, 0.95);
|
|
400
|
-
key.position.set(cx + radius, cy + radius * 1.4, cz + dist);
|
|
401
|
-
scene.add(key);
|
|
402
|
-
const fill = new chunk3N6AC4HA_js.DirectionalLight(16777215, 0.3);
|
|
403
|
-
fill.position.set(cx - radius, cy - radius * 0.6, cz + dist * 0.6);
|
|
404
|
-
scene.add(fill);
|
|
405
|
-
const built = buildMeshGroup(model, options.textStyle);
|
|
406
|
-
scene.add(built.group);
|
|
407
|
-
let controls = null;
|
|
408
|
-
const enableControls = (on) => {
|
|
409
|
-
if (on && !controls) {
|
|
410
|
-
controls = new chunkIXS7DALE_js.OrbitControls(camera, canvas);
|
|
411
|
-
controls.enablePan = false;
|
|
412
|
-
controls.target.set(cx, cy, cz);
|
|
413
|
-
controls.minDistance = dist * 0.4;
|
|
414
|
-
controls.maxDistance = dist * 3;
|
|
415
|
-
controls.update();
|
|
416
|
-
} else if (!on && controls) {
|
|
417
|
-
controls.dispose();
|
|
418
|
-
controls = null;
|
|
419
|
-
}
|
|
420
|
-
if (controls) {
|
|
421
|
-
controls.autoRotate = Boolean(options.autoRotate);
|
|
422
|
-
controls.autoRotateSpeed = 1.2;
|
|
423
|
-
}
|
|
424
|
-
};
|
|
425
|
-
enableControls(Boolean(options.interactive));
|
|
426
|
-
let frame = 0;
|
|
427
|
-
let disposed = false;
|
|
428
|
-
const renderLoop = () => {
|
|
429
|
-
if (disposed) {
|
|
430
|
-
return;
|
|
431
|
-
}
|
|
432
|
-
frame = requestAnimationFrame(renderLoop);
|
|
433
|
-
billboardLabels(built, camera);
|
|
434
|
-
controls?.update();
|
|
435
|
-
renderer.render(scene, camera);
|
|
436
|
-
};
|
|
437
|
-
frame = requestAnimationFrame(renderLoop);
|
|
438
|
-
return {
|
|
439
|
-
resize(w, h) {
|
|
440
|
-
camera.aspect = w / Math.max(1, h);
|
|
441
|
-
camera.updateProjectionMatrix();
|
|
442
|
-
renderer.setSize(w, h, false);
|
|
443
|
-
},
|
|
444
|
-
setInteractive(on) {
|
|
445
|
-
enableControls(on);
|
|
446
|
-
},
|
|
447
|
-
setTextStyle(style) {
|
|
448
|
-
built.setTextStyle(style);
|
|
449
|
-
},
|
|
450
|
-
dispose() {
|
|
451
|
-
disposed = true;
|
|
452
|
-
cancelAnimationFrame(frame);
|
|
453
|
-
controls?.dispose();
|
|
454
|
-
built.dispose();
|
|
455
|
-
renderer.dispose();
|
|
456
|
-
}
|
|
457
|
-
};
|
|
458
|
-
}
|
|
459
|
-
function SmartArt3DScene({
|
|
460
|
-
model,
|
|
461
|
-
width,
|
|
462
|
-
height,
|
|
463
|
-
interactive,
|
|
464
|
-
textStyle
|
|
465
|
-
}) {
|
|
466
|
-
const canvasRef = react.useRef(null);
|
|
467
|
-
const handleRef = react.useRef(null);
|
|
468
|
-
const textStyleRef = chunkDNR6CH6I_js.useLatestRef(textStyle);
|
|
469
|
-
react.useEffect(() => {
|
|
470
|
-
const canvas = canvasRef.current;
|
|
471
|
-
if (!canvas) {
|
|
472
|
-
return;
|
|
473
|
-
}
|
|
474
|
-
const handle = mountSmartArt3D(canvas, model, width, height, {
|
|
475
|
-
interactive,
|
|
476
|
-
textStyle: textStyleRef.current
|
|
477
|
-
});
|
|
478
|
-
handleRef.current = handle;
|
|
479
|
-
return () => {
|
|
480
|
-
handle.dispose();
|
|
481
|
-
handleRef.current = null;
|
|
482
|
-
};
|
|
483
|
-
}, [model]);
|
|
484
|
-
react.useEffect(() => {
|
|
485
|
-
handleRef.current?.resize(width, height);
|
|
486
|
-
}, [width, height]);
|
|
487
|
-
react.useEffect(() => {
|
|
488
|
-
handleRef.current?.setInteractive(interactive);
|
|
489
|
-
}, [interactive]);
|
|
490
|
-
react.useEffect(() => {
|
|
491
|
-
handleRef.current?.setTextStyle(textStyle);
|
|
492
|
-
}, [textStyle]);
|
|
493
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
494
|
-
"canvas",
|
|
495
|
-
{
|
|
496
|
-
ref: canvasRef,
|
|
497
|
-
style: { width, height, display: "block", pointerEvents: interactive ? "auto" : "none" }
|
|
498
|
-
}
|
|
499
|
-
);
|
|
500
|
-
}
|
|
501
|
-
|
|
502
|
-
module.exports = SmartArt3DScene;
|
|
Binary file
|
|
Binary file
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { useStableChart3DInteraction, useLatestRef } from './chunk-T6GFCLSM.mjs';
|
|
2
|
-
import { mountSurfaceChart3D } from './chunk-FT3MMIXW.mjs';
|
|
3
|
-
import './chunk-XGB3TDIC.mjs';
|
|
4
|
-
import { useRef, useEffect } from 'react';
|
|
5
|
-
import { jsx } from 'react/jsx-runtime';
|
|
6
|
-
|
|
7
|
-
function SurfaceChart3DScene({
|
|
8
|
-
options,
|
|
9
|
-
interaction,
|
|
10
|
-
selectedPart = null,
|
|
11
|
-
textStyle
|
|
12
|
-
}) {
|
|
13
|
-
const containerRef = useRef(null);
|
|
14
|
-
const handleRef = useRef(null);
|
|
15
|
-
const stableInteraction = useStableChart3DInteraction(interaction);
|
|
16
|
-
const selectedPartRef = useLatestRef(selectedPart);
|
|
17
|
-
const textStyleRef = useLatestRef(textStyle);
|
|
18
|
-
useEffect(() => {
|
|
19
|
-
const container = containerRef.current;
|
|
20
|
-
if (!container) {
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
let disposed = false;
|
|
24
|
-
void mountSurfaceChart3D(container, options, stableInteraction).then((handle) => {
|
|
25
|
-
if (disposed) {
|
|
26
|
-
handle.dispose();
|
|
27
|
-
} else {
|
|
28
|
-
handleRef.current = handle;
|
|
29
|
-
handle.setSelectedPart(selectedPartRef.current);
|
|
30
|
-
handle.setTextStyle(textStyleRef.current);
|
|
31
|
-
}
|
|
32
|
-
return void 0;
|
|
33
|
-
});
|
|
34
|
-
return () => {
|
|
35
|
-
disposed = true;
|
|
36
|
-
handleRef.current?.dispose();
|
|
37
|
-
handleRef.current = null;
|
|
38
|
-
};
|
|
39
|
-
}, [options, stableInteraction]);
|
|
40
|
-
useEffect(() => {
|
|
41
|
-
handleRef.current?.resize(options.width, options.height);
|
|
42
|
-
}, [options.width, options.height]);
|
|
43
|
-
useEffect(() => {
|
|
44
|
-
handleRef.current?.setSelectedPart(selectedPart);
|
|
45
|
-
}, [selectedPart]);
|
|
46
|
-
useEffect(() => {
|
|
47
|
-
handleRef.current?.setTextStyle(textStyle);
|
|
48
|
-
}, [textStyle]);
|
|
49
|
-
return /* @__PURE__ */ jsx(
|
|
50
|
-
"div",
|
|
51
|
-
{
|
|
52
|
-
ref: containerRef,
|
|
53
|
-
style: {
|
|
54
|
-
width: options.width,
|
|
55
|
-
height: options.height,
|
|
56
|
-
willChange: "transform"
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export { SurfaceChart3DScene as default };
|
|
Binary file
|
|
Binary file
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunkDNR6CH6I_js = require('./chunk-DNR6CH6I.js');
|
|
4
|
-
var chunkQMSSDBKN_js = require('./chunk-QMSSDBKN.js');
|
|
5
|
-
require('./chunk-4VNS5WPM.js');
|
|
6
|
-
var react = require('react');
|
|
7
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
8
|
-
|
|
9
|
-
function SurfaceChart3DScene({
|
|
10
|
-
options,
|
|
11
|
-
interaction,
|
|
12
|
-
selectedPart = null,
|
|
13
|
-
textStyle
|
|
14
|
-
}) {
|
|
15
|
-
const containerRef = react.useRef(null);
|
|
16
|
-
const handleRef = react.useRef(null);
|
|
17
|
-
const stableInteraction = chunkDNR6CH6I_js.useStableChart3DInteraction(interaction);
|
|
18
|
-
const selectedPartRef = chunkDNR6CH6I_js.useLatestRef(selectedPart);
|
|
19
|
-
const textStyleRef = chunkDNR6CH6I_js.useLatestRef(textStyle);
|
|
20
|
-
react.useEffect(() => {
|
|
21
|
-
const container = containerRef.current;
|
|
22
|
-
if (!container) {
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
let disposed = false;
|
|
26
|
-
void chunkQMSSDBKN_js.mountSurfaceChart3D(container, options, stableInteraction).then((handle) => {
|
|
27
|
-
if (disposed) {
|
|
28
|
-
handle.dispose();
|
|
29
|
-
} else {
|
|
30
|
-
handleRef.current = handle;
|
|
31
|
-
handle.setSelectedPart(selectedPartRef.current);
|
|
32
|
-
handle.setTextStyle(textStyleRef.current);
|
|
33
|
-
}
|
|
34
|
-
return void 0;
|
|
35
|
-
});
|
|
36
|
-
return () => {
|
|
37
|
-
disposed = true;
|
|
38
|
-
handleRef.current?.dispose();
|
|
39
|
-
handleRef.current = null;
|
|
40
|
-
};
|
|
41
|
-
}, [options, stableInteraction]);
|
|
42
|
-
react.useEffect(() => {
|
|
43
|
-
handleRef.current?.resize(options.width, options.height);
|
|
44
|
-
}, [options.width, options.height]);
|
|
45
|
-
react.useEffect(() => {
|
|
46
|
-
handleRef.current?.setSelectedPart(selectedPart);
|
|
47
|
-
}, [selectedPart]);
|
|
48
|
-
react.useEffect(() => {
|
|
49
|
-
handleRef.current?.setTextStyle(textStyle);
|
|
50
|
-
}, [textStyle]);
|
|
51
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
52
|
-
"div",
|
|
53
|
-
{
|
|
54
|
-
ref: containerRef,
|
|
55
|
-
style: {
|
|
56
|
-
width: options.width,
|
|
57
|
-
height: options.height,
|
|
58
|
-
willChange: "transform"
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
module.exports = SurfaceChart3DScene;
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/chunk-DNR6CH6I.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var react = require('react');
|
|
4
|
-
|
|
5
|
-
// src/viewer/components/elements/chart3d-interaction-hooks.ts
|
|
6
|
-
function useStableChart3DInteraction(interaction) {
|
|
7
|
-
const ref = react.useRef(interaction);
|
|
8
|
-
ref.current = interaction;
|
|
9
|
-
const onSelect = react.useCallback((part) => {
|
|
10
|
-
ref.current?.onSelect?.(part);
|
|
11
|
-
}, []);
|
|
12
|
-
const onValueDragPreview = react.useCallback((part, value) => {
|
|
13
|
-
ref.current?.onValueDragPreview?.(part, value);
|
|
14
|
-
}, []);
|
|
15
|
-
const onValueDragCommit = react.useCallback((part, value) => {
|
|
16
|
-
ref.current?.onValueDragCommit?.(part, value);
|
|
17
|
-
}, []);
|
|
18
|
-
return react.useMemo(
|
|
19
|
-
() => ({ onSelect, onValueDragPreview, onValueDragCommit }),
|
|
20
|
-
[onSelect, onValueDragPreview, onValueDragCommit]
|
|
21
|
-
);
|
|
22
|
-
}
|
|
23
|
-
function useLatestRef(value) {
|
|
24
|
-
const ref = react.useRef(value);
|
|
25
|
-
ref.current = value;
|
|
26
|
-
return ref;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
exports.useLatestRef = useLatestRef;
|
|
30
|
-
exports.useStableChart3DInteraction = useStableChart3DInteraction;
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|