@kineviz/gl 0.4.0 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +17 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +17 -3
- package/dist/index.mjs.map +1 -1
- package/dist/kineviz-gl.umd.js +42 -23
- package/package.json +8 -3
package/dist/kineviz-gl.umd.js
CHANGED
|
@@ -55818,7 +55818,7 @@ void main() {
|
|
|
55818
55818
|
// src/react/layers/TextLayer.tsx
|
|
55819
55819
|
var import_react = __toESM(require_react());
|
|
55820
55820
|
|
|
55821
|
-
// node_modules/@mapbox/tiny-sdf/index.js
|
|
55821
|
+
// ../node_modules/@mapbox/tiny-sdf/index.js
|
|
55822
55822
|
var INF = 1e20;
|
|
55823
55823
|
var alphaTable = new Float64Array(256);
|
|
55824
55824
|
for (let i = 0; i < 256; i++) {
|
|
@@ -55871,7 +55871,7 @@ void main() {
|
|
|
55871
55871
|
actualBoundingBoxRight
|
|
55872
55872
|
} = this.ctx.measureText(char);
|
|
55873
55873
|
const glyphTop = Math.ceil(actualBoundingBoxAscent);
|
|
55874
|
-
const glyphLeft = Math.floor(
|
|
55874
|
+
const glyphLeft = Math.floor(actualBoundingBoxLeft);
|
|
55875
55875
|
const glyphWidth = Math.max(0, Math.min(this.size - this.buffer, Math.ceil(actualBoundingBoxRight) - glyphLeft));
|
|
55876
55876
|
const glyphHeight = Math.max(0, Math.min(this.size - this.buffer, glyphTop + Math.ceil(actualBoundingBoxDescent)));
|
|
55877
55877
|
const width = glyphWidth + 2 * this.buffer;
|
|
@@ -55899,8 +55899,7 @@ void main() {
|
|
|
55899
55899
|
}
|
|
55900
55900
|
}
|
|
55901
55901
|
edt(gridOuter, 0, 0, width, height, width, this.f, this.v, this.z);
|
|
55902
|
-
|
|
55903
|
-
edt(gridInner, buffer - pad, buffer - pad, glyphWidth + 2 * pad, glyphHeight + 2 * pad, width, this.f, this.v, this.z);
|
|
55902
|
+
edt(gridInner, buffer, buffer, glyphWidth, glyphHeight, width, this.f, this.v, this.z);
|
|
55904
55903
|
const scale = 255 / this.radius;
|
|
55905
55904
|
const base = 255 * (1 - this.cutoff);
|
|
55906
55905
|
for (let i = 0; i < len; i++) {
|
|
@@ -63000,7 +62999,7 @@ void main() {
|
|
|
63000
62999
|
// src/react/toolbar/Toolbar.tsx
|
|
63001
63000
|
var import_react28 = __toESM(require_react());
|
|
63002
63001
|
|
|
63003
|
-
// node_modules/@radix-ui/react-tooltip/dist/index.mjs
|
|
63002
|
+
// ../node_modules/@radix-ui/react-tooltip/dist/index.mjs
|
|
63004
63003
|
var React29 = __toESM(require_react(), 1);
|
|
63005
63004
|
|
|
63006
63005
|
// ../node_modules/@radix-ui/primitive/dist/index.mjs
|
|
@@ -65993,7 +65992,7 @@ void main() {
|
|
|
65993
65992
|
return typeof value === "function";
|
|
65994
65993
|
}
|
|
65995
65994
|
|
|
65996
|
-
// node_modules/@radix-ui/react-visually-hidden/dist/index.mjs
|
|
65995
|
+
// ../node_modules/@radix-ui/react-visually-hidden/dist/index.mjs
|
|
65997
65996
|
var React28 = __toESM(require_react(), 1);
|
|
65998
65997
|
var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
|
|
65999
65998
|
var VISUALLY_HIDDEN_STYLES = Object.freeze({
|
|
@@ -66025,7 +66024,7 @@ void main() {
|
|
|
66025
66024
|
VisuallyHidden.displayName = NAME2;
|
|
66026
66025
|
var Root3 = VisuallyHidden;
|
|
66027
66026
|
|
|
66028
|
-
// node_modules/@radix-ui/react-tooltip/dist/index.mjs
|
|
66027
|
+
// ../node_modules/@radix-ui/react-tooltip/dist/index.mjs
|
|
66029
66028
|
var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
|
|
66030
66029
|
var [createTooltipContext, createTooltipScope] = createContextScope("Tooltip", [
|
|
66031
66030
|
createPopperScope
|
|
@@ -66564,10 +66563,10 @@ void main() {
|
|
|
66564
66563
|
// src/react/toolbar/items/OverflowMenu.tsx
|
|
66565
66564
|
var import_react18 = __toESM(require_react());
|
|
66566
66565
|
|
|
66567
|
-
// node_modules/@radix-ui/react-popover/dist/index.mjs
|
|
66566
|
+
// ../node_modules/@radix-ui/react-popover/dist/index.mjs
|
|
66568
66567
|
var React41 = __toESM(require_react(), 1);
|
|
66569
66568
|
|
|
66570
|
-
// node_modules/@radix-ui/react-focus-guards/dist/index.mjs
|
|
66569
|
+
// ../node_modules/@radix-ui/react-focus-guards/dist/index.mjs
|
|
66571
66570
|
var React31 = __toESM(require_react(), 1);
|
|
66572
66571
|
var count3 = 0;
|
|
66573
66572
|
function useFocusGuards() {
|
|
@@ -66964,10 +66963,10 @@ void main() {
|
|
|
66964
66963
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
66965
66964
|
}
|
|
66966
66965
|
|
|
66967
|
-
// node_modules/react-remove-scroll/dist/es2015/Combination.js
|
|
66966
|
+
// ../node_modules/react-remove-scroll/dist/es2015/Combination.js
|
|
66968
66967
|
var React40 = __toESM(require_react());
|
|
66969
66968
|
|
|
66970
|
-
// node_modules/react-remove-scroll/dist/es2015/UI.js
|
|
66969
|
+
// ../node_modules/react-remove-scroll/dist/es2015/UI.js
|
|
66971
66970
|
var React36 = __toESM(require_react());
|
|
66972
66971
|
|
|
66973
66972
|
// ../node_modules/react-remove-scroll-bar/dist/es2015/constants.js
|
|
@@ -67151,10 +67150,10 @@ void main() {
|
|
|
67151
67150
|
return SideCar;
|
|
67152
67151
|
}
|
|
67153
67152
|
|
|
67154
|
-
// node_modules/react-remove-scroll/dist/es2015/medium.js
|
|
67153
|
+
// ../node_modules/react-remove-scroll/dist/es2015/medium.js
|
|
67155
67154
|
var effectCar = createSidecarMedium();
|
|
67156
67155
|
|
|
67157
|
-
// node_modules/react-remove-scroll/dist/es2015/UI.js
|
|
67156
|
+
// ../node_modules/react-remove-scroll/dist/es2015/UI.js
|
|
67158
67157
|
var nothing = function() {
|
|
67159
67158
|
return;
|
|
67160
67159
|
};
|
|
@@ -67186,7 +67185,7 @@ void main() {
|
|
|
67186
67185
|
zeroRight: zeroRightClassName
|
|
67187
67186
|
};
|
|
67188
67187
|
|
|
67189
|
-
// node_modules/react-remove-scroll/dist/es2015/SideEffect.js
|
|
67188
|
+
// ../node_modules/react-remove-scroll/dist/es2015/SideEffect.js
|
|
67190
67189
|
var React39 = __toESM(require_react());
|
|
67191
67190
|
|
|
67192
67191
|
// ../node_modules/react-remove-scroll-bar/dist/es2015/component.js
|
|
@@ -67352,7 +67351,7 @@ void main() {
|
|
|
67352
67351
|
return React38.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? "!important" : "") });
|
|
67353
67352
|
};
|
|
67354
67353
|
|
|
67355
|
-
// node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js
|
|
67354
|
+
// ../node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js
|
|
67356
67355
|
var passiveSupported = false;
|
|
67357
67356
|
if (typeof window !== "undefined") {
|
|
67358
67357
|
try {
|
|
@@ -67371,7 +67370,7 @@ void main() {
|
|
|
67371
67370
|
var options;
|
|
67372
67371
|
var nonPassive = passiveSupported ? { passive: false } : false;
|
|
67373
67372
|
|
|
67374
|
-
// node_modules/react-remove-scroll/dist/es2015/handleScroll.js
|
|
67373
|
+
// ../node_modules/react-remove-scroll/dist/es2015/handleScroll.js
|
|
67375
67374
|
var alwaysContainsScroll = function(node) {
|
|
67376
67375
|
return node.tagName === "TEXTAREA";
|
|
67377
67376
|
};
|
|
@@ -67471,7 +67470,7 @@ void main() {
|
|
|
67471
67470
|
return shouldCancelScroll;
|
|
67472
67471
|
};
|
|
67473
67472
|
|
|
67474
|
-
// node_modules/react-remove-scroll/dist/es2015/SideEffect.js
|
|
67473
|
+
// ../node_modules/react-remove-scroll/dist/es2015/SideEffect.js
|
|
67475
67474
|
var getTouchXY = function(event) {
|
|
67476
67475
|
return "changedTouches" in event ? [event.changedTouches[0].clientX, event.changedTouches[0].clientY] : [0, 0];
|
|
67477
67476
|
};
|
|
@@ -67529,6 +67528,12 @@ void main() {
|
|
|
67529
67528
|
if ("touches" in event && moveDirection === "h" && target.type === "range") {
|
|
67530
67529
|
return false;
|
|
67531
67530
|
}
|
|
67531
|
+
var selection2 = window.getSelection();
|
|
67532
|
+
var anchorNode = selection2 && selection2.anchorNode;
|
|
67533
|
+
var isTouchingSelection = anchorNode ? anchorNode === target || anchorNode.contains(target) : false;
|
|
67534
|
+
if (isTouchingSelection) {
|
|
67535
|
+
return false;
|
|
67536
|
+
}
|
|
67532
67537
|
var canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
|
|
67533
67538
|
if (!canBeScrolledInMainDirection) {
|
|
67534
67539
|
return true;
|
|
@@ -67636,17 +67641,17 @@ void main() {
|
|
|
67636
67641
|
return shadowParent;
|
|
67637
67642
|
}
|
|
67638
67643
|
|
|
67639
|
-
// node_modules/react-remove-scroll/dist/es2015/sidecar.js
|
|
67644
|
+
// ../node_modules/react-remove-scroll/dist/es2015/sidecar.js
|
|
67640
67645
|
var sidecar_default = exportSidecar(effectCar, RemoveScrollSideCar);
|
|
67641
67646
|
|
|
67642
|
-
// node_modules/react-remove-scroll/dist/es2015/Combination.js
|
|
67647
|
+
// ../node_modules/react-remove-scroll/dist/es2015/Combination.js
|
|
67643
67648
|
var ReactRemoveScroll = React40.forwardRef(function(props, ref) {
|
|
67644
67649
|
return React40.createElement(RemoveScroll, __assign({}, props, { ref, sideCar: sidecar_default }));
|
|
67645
67650
|
});
|
|
67646
67651
|
ReactRemoveScroll.classNames = RemoveScroll.classNames;
|
|
67647
67652
|
var Combination_default = ReactRemoveScroll;
|
|
67648
67653
|
|
|
67649
|
-
// node_modules/@radix-ui/react-popover/dist/index.mjs
|
|
67654
|
+
// ../node_modules/@radix-ui/react-popover/dist/index.mjs
|
|
67650
67655
|
var import_jsx_runtime21 = __toESM(require_jsx_runtime(), 1);
|
|
67651
67656
|
var POPOVER_NAME = "Popover";
|
|
67652
67657
|
var [createPopoverContext, createPopoverScope] = createContextScope(POPOVER_NAME, [
|
|
@@ -84844,9 +84849,23 @@ void main() {
|
|
|
84844
84849
|
sz += posArray[gidx * 3 + 2];
|
|
84845
84850
|
}
|
|
84846
84851
|
const n = neighbors.length;
|
|
84847
|
-
|
|
84848
|
-
|
|
84849
|
-
|
|
84852
|
+
let cx = sx / n, cy = sy / n, cz = sz / n;
|
|
84853
|
+
if (!isPlanar) {
|
|
84854
|
+
const len = Math.hypot(cx, cy, cz);
|
|
84855
|
+
if (len > 1e-6) {
|
|
84856
|
+
const s = radius / len;
|
|
84857
|
+
cx *= s;
|
|
84858
|
+
cy *= s;
|
|
84859
|
+
cz *= s;
|
|
84860
|
+
} else {
|
|
84861
|
+
cx = 0;
|
|
84862
|
+
cy = 0;
|
|
84863
|
+
cz = radius;
|
|
84864
|
+
}
|
|
84865
|
+
}
|
|
84866
|
+
posArray[idx * 3] = cx + (Math.random() - 0.5) * 2 * jitter;
|
|
84867
|
+
posArray[idx * 3 + 1] = cy + (Math.random() - 0.5) * 2 * jitter;
|
|
84868
|
+
posArray[idx * 3 + 2] = isPlanar ? 0 : cz + (Math.random() - 0.5) * 2 * jitter;
|
|
84850
84869
|
} else if (isPlanar) {
|
|
84851
84870
|
posArray[idx * 3 + 2] = 0;
|
|
84852
84871
|
}
|
package/package.json
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kineviz/gl",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "Complete 3D graph visualization engine",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
|
-
"files": [
|
|
8
|
+
"files": [
|
|
9
|
+
"dist",
|
|
10
|
+
"assets"
|
|
11
|
+
],
|
|
9
12
|
"publishConfig": {
|
|
10
13
|
"registry": "https://registry.npmjs.org/",
|
|
11
14
|
"access": "restricted"
|
|
@@ -35,7 +38,9 @@
|
|
|
35
38
|
"react-dom": "^18.0.0"
|
|
36
39
|
},
|
|
37
40
|
"peerDependenciesMeta": {
|
|
38
|
-
"@kineviz/ontology": {
|
|
41
|
+
"@kineviz/ontology": {
|
|
42
|
+
"optional": true
|
|
43
|
+
}
|
|
39
44
|
},
|
|
40
45
|
"devDependencies": {
|
|
41
46
|
"tsup": "^8.0.0",
|