@gglib/content 0.6.2 → 0.8.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/LICENSE +7 -0
- package/Readme.md +11 -7
- package/dist/bundles/content.esm.js +1050 -0
- package/dist/bundles/content.esm.js.map +1 -0
- package/dist/content/src/AssetContainer.d.ts +18 -0
- package/dist/content/src/AssetContainer.d.ts.map +1 -0
- package/dist/content/src/AssetContainer.js +30 -0
- package/dist/content/src/AssetContainer.js.map +1 -0
- package/dist/content/src/AssetLoaderRegistry.d.ts +21 -0
- package/dist/content/src/AssetLoaderRegistry.d.ts.map +1 -0
- package/dist/content/src/AssetLoaderRegistry.js +28 -0
- package/dist/content/src/AssetLoaderRegistry.js.map +1 -0
- package/dist/content/src/AssetType.d.ts +13 -0
- package/dist/content/src/AssetType.d.ts.map +1 -0
- package/dist/content/src/AssetType.js +6 -0
- package/dist/content/src/AssetType.js.map +1 -0
- package/dist/content/src/AsyncExecutor.d.ts +63 -0
- package/dist/content/src/AsyncExecutor.d.ts.map +1 -0
- package/dist/content/src/AsyncExecutor.js +166 -0
- package/dist/content/src/AsyncExecutor.js.map +1 -0
- package/dist/content/src/ContentLoader.d.ts +266 -0
- package/dist/content/src/ContentLoader.d.ts.map +1 -0
- package/dist/content/src/ContentLoader.js +341 -0
- package/dist/content/src/ContentLoader.js.map +1 -0
- package/dist/content/src/ContentType.d.ts.map +1 -1
- package/dist/content/src/ContentType.js +6 -10
- package/dist/content/src/ContentType.js.map +1 -1
- package/dist/content/src/HttpClient.d.ts +48 -0
- package/dist/content/src/HttpClient.d.ts.map +1 -0
- package/dist/content/src/HttpClient.js +139 -0
- package/dist/content/src/HttpClient.js.map +1 -0
- package/dist/content/src/MaterialRegistry.d.ts +14 -0
- package/dist/content/src/MaterialRegistry.d.ts.map +1 -0
- package/dist/content/src/MaterialRegistry.js +24 -0
- package/dist/content/src/MaterialRegistry.js.map +1 -0
- package/dist/content/src/ResourceGraph.d.ts +54 -0
- package/dist/content/src/ResourceGraph.d.ts.map +1 -0
- package/dist/content/src/ResourceGraph.js +195 -0
- package/dist/content/src/ResourceGraph.js.map +1 -0
- package/dist/content/src/TextureLoader.d.ts +14 -0
- package/dist/content/src/TextureLoader.d.ts.map +1 -0
- package/dist/content/src/TextureLoader.js +70 -0
- package/dist/content/src/TextureLoader.js.map +1 -0
- package/dist/content/src/index.d.ts +8 -7
- package/dist/content/src/index.d.ts.map +1 -1
- package/dist/content/src/index.js +8 -7
- package/dist/content/src/index.js.map +1 -1
- package/dist/content/tsconfig.build.tsbuildinfo +1 -0
- package/dist/content/tsconfig.spec.tsbuildinfo +1 -0
- package/dist/stats.html +211 -170
- package/package.json +19 -8
- package/dist/bundles/content.umd.js +0 -713
- package/dist/bundles/content.umd.js.map +0 -1
- package/dist/content/src/ContentManager.d.ts +0 -153
- package/dist/content/src/ContentManager.d.ts.map +0 -1
- package/dist/content/src/ContentManager.js +0 -361
- package/dist/content/src/ContentManager.js.map +0 -1
- package/dist/content/src/ContentType.spec.d.ts +0 -2
- package/dist/content/src/ContentType.spec.d.ts.map +0 -1
- package/dist/content/src/ContentType.spec.js +0 -27
- package/dist/content/src/ContentType.spec.js.map +0 -1
- package/dist/content/src/Data.d.ts +0 -37
- package/dist/content/src/Data.d.ts.map +0 -1
- package/dist/content/src/Data.js +0 -34
- package/dist/content/src/Data.js.map +0 -1
- package/dist/content/src/Loader.d.ts +0 -69
- package/dist/content/src/Loader.d.ts.map +0 -1
- package/dist/content/src/Loader.js +0 -16
- package/dist/content/src/Loader.js.map +0 -1
- package/dist/content/src/Pipeline.d.ts +0 -38
- package/dist/content/src/Pipeline.d.ts.map +0 -1
- package/dist/content/src/Pipeline.js +0 -182
- package/dist/content/src/Pipeline.js.map +0 -1
- package/dist/content/src/Pipeline.spec.d.ts +0 -2
- package/dist/content/src/Pipeline.spec.d.ts.map +0 -1
- package/dist/content/src/Pipeline.spec.js +0 -121
- package/dist/content/src/Pipeline.spec.js.map +0 -1
- package/dist/content/src/PipelineContext.d.ts +0 -40
- package/dist/content/src/PipelineContext.d.ts.map +0 -1
- package/dist/content/src/PipelineContext.js +0 -2
- package/dist/content/src/PipelineContext.js.map +0 -1
- package/dist/content/src/symbols.d.ts +0 -2
- package/dist/content/src/symbols.d.ts.map +0 -1
- package/dist/content/src/symbols.js +0 -2
- package/dist/content/src/symbols.js.map +0 -1
- package/dist/content/src/utils.d.ts +0 -17
- package/dist/content/src/utils.d.ts.map +0 -1
- package/dist/content/src/utils.js +0 -42
- package/dist/content/src/utils.js.map +0 -1
- package/dist/content/tsconfig.tsbuildinfo +0 -2773
package/dist/stats.html
CHANGED
|
@@ -625,7 +625,29 @@ var drawChart = (function (exports) {
|
|
|
625
625
|
|
|
626
626
|
const isModuleTree = (mod) => "children" in mod;
|
|
627
627
|
|
|
628
|
-
|
|
628
|
+
let count = 0;
|
|
629
|
+
class Id {
|
|
630
|
+
constructor(id) {
|
|
631
|
+
this._id = id;
|
|
632
|
+
const url = new URL(window.location.href);
|
|
633
|
+
url.hash = id;
|
|
634
|
+
this._href = url.toString();
|
|
635
|
+
}
|
|
636
|
+
get id() {
|
|
637
|
+
return this._id;
|
|
638
|
+
}
|
|
639
|
+
get href() {
|
|
640
|
+
return this._href;
|
|
641
|
+
}
|
|
642
|
+
toString() {
|
|
643
|
+
return `url(${this.href})`;
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
function generateUniqueId(name) {
|
|
647
|
+
count += 1;
|
|
648
|
+
const id = ["O", name, count].filter(Boolean).join("-");
|
|
649
|
+
return new Id(id);
|
|
650
|
+
}
|
|
629
651
|
|
|
630
652
|
const LABELS = {
|
|
631
653
|
renderedLength: "Rendered",
|
|
@@ -643,6 +665,8 @@ var drawChart = (function (exports) {
|
|
|
643
665
|
return availableSizeProperties;
|
|
644
666
|
};
|
|
645
667
|
|
|
668
|
+
var t,u,r,o=0,i=[],c=n.__b,f=n.__r,e=n.diffed,a=n.__c,v=n.unmount;function m(t,r){n.__h&&n.__h(u,t,o||r),o=0;var i=u.__H||(u.__H={__:[],__h:[]});return t>=i.__.length&&i.__.push({}),i.__[t]}function l(n){return o=1,p(w,n)}function p(n,r,o){var i=m(t++,2);return i.t=n,i.__c||(i.__=[o?o(r):w(void 0,r),function(n){var t=i.t(i.__[0],n);i.__[0]!==t&&(i.__=[t,i.__[1]],i.__c.setState({}));}],i.__c=u),i.__}function y(r,o){var i=m(t++,3);!n.__s&&k(i.__H,o)&&(i.__=r,i.__H=o,u.__H.__h.push(i));}function h(r,o){var i=m(t++,4);!n.__s&&k(i.__H,o)&&(i.__=r,i.__H=o,u.__h.push(i));}function s(n){return o=5,d(function(){return {current:n}},[])}function d(n,u){var r=m(t++,7);return k(r.__H,u)&&(r.__=n(),r.__H=u,r.__h=n),r.__}function F(n){var r=u.context[n.__c],o=m(t++,9);return o.__c=n,r?(null==o.__&&(o.__=!0,r.sub(u)),r.props.value):n.__}function x(){i.forEach(function(t){if(t.__P)try{t.__H.__h.forEach(g),t.__H.__h.forEach(j),t.__H.__h=[];}catch(u){t.__H.__h=[],n.__e(u,t.__v);}}),i=[];}n.__b=function(n){u=null,c&&c(n);},n.__r=function(n){f&&f(n),t=0;var r=(u=n.__c).__H;r&&(r.__h.forEach(g),r.__h.forEach(j),r.__h=[]);},n.diffed=function(t){e&&e(t);var o=t.__c;o&&o.__H&&o.__H.__h.length&&(1!==i.push(o)&&r===n.requestAnimationFrame||((r=n.requestAnimationFrame)||function(n){var t,u=function(){clearTimeout(r),b&&cancelAnimationFrame(t),setTimeout(n);},r=setTimeout(u,100);b&&(t=requestAnimationFrame(u));})(x)),u=void 0;},n.__c=function(t,u){u.some(function(t){try{t.__h.forEach(g),t.__h=t.__h.filter(function(n){return !n.__||j(n)});}catch(r){u.some(function(n){n.__h&&(n.__h=[]);}),u=[],n.__e(r,t.__v);}}),a&&a(t,u);},n.unmount=function(t){v&&v(t);var u=t.__c;if(u&&u.__H)try{u.__H.__.forEach(g);}catch(t){n.__e(t,u.__v);}};var b="function"==typeof requestAnimationFrame;function g(n){var t=u;"function"==typeof n.__c&&n.__c(),u=t;}function j(n){var t=u;n.__c=n.__(),u=t;}function k(n,t){return !n||n.length!==t.length||t.some(function(t,u){return t!==n[u]})}function w(n,t){return "function"==typeof t?t(n):t}
|
|
669
|
+
|
|
646
670
|
const SideBar = ({ availableSizeProperties, sizeProperty, setSizeProperty, onExcludeChange, onIncludeChange, }) => {
|
|
647
671
|
const [includeValue, setIncludeValue] = l("");
|
|
648
672
|
const [excludeValue, setExcludeValue] = l("");
|
|
@@ -673,6 +697,65 @@ var drawChart = (function (exports) {
|
|
|
673
697
|
o$1("input", { type: "text", id: "module-filter-include", value: includeValue, onInput: handleIncludeChange }, void 0)] }), void 0)] }), void 0)] }), void 0));
|
|
674
698
|
};
|
|
675
699
|
|
|
700
|
+
const throttleFilter = (callback, limit) => {
|
|
701
|
+
let waiting = false;
|
|
702
|
+
return (val) => {
|
|
703
|
+
if (!waiting) {
|
|
704
|
+
callback(val);
|
|
705
|
+
waiting = true;
|
|
706
|
+
setTimeout(() => {
|
|
707
|
+
waiting = false;
|
|
708
|
+
}, limit);
|
|
709
|
+
}
|
|
710
|
+
};
|
|
711
|
+
};
|
|
712
|
+
const useFilter = () => {
|
|
713
|
+
const [includeFilter, setIncludeFilter] = l("");
|
|
714
|
+
const [excludeFilter, setExcludeFilter] = l("");
|
|
715
|
+
const setIncludeFilterTrottled = d(() => throttleFilter(setIncludeFilter, 200), []);
|
|
716
|
+
const setExcludeFilterTrottled = d(() => throttleFilter(setExcludeFilter, 200), []);
|
|
717
|
+
const isModuleIncluded = d(() => {
|
|
718
|
+
if (includeFilter === "") {
|
|
719
|
+
return () => true;
|
|
720
|
+
}
|
|
721
|
+
try {
|
|
722
|
+
const re = new RegExp(includeFilter);
|
|
723
|
+
return ({ id }) => re.test(id);
|
|
724
|
+
}
|
|
725
|
+
catch (err) {
|
|
726
|
+
return () => false;
|
|
727
|
+
}
|
|
728
|
+
}, [includeFilter]);
|
|
729
|
+
const isModuleExcluded = d(() => {
|
|
730
|
+
if (excludeFilter === "") {
|
|
731
|
+
return () => false;
|
|
732
|
+
}
|
|
733
|
+
try {
|
|
734
|
+
const re = new RegExp(excludeFilter);
|
|
735
|
+
return ({ id }) => re.test(id);
|
|
736
|
+
}
|
|
737
|
+
catch (err) {
|
|
738
|
+
return () => false;
|
|
739
|
+
}
|
|
740
|
+
}, [excludeFilter]);
|
|
741
|
+
const isDefaultInclude = includeFilter === "";
|
|
742
|
+
const getModuleFilterMultiplier = d(() => {
|
|
743
|
+
return (data) => {
|
|
744
|
+
if (isDefaultInclude) {
|
|
745
|
+
return isModuleExcluded(data) ? 0 : 1;
|
|
746
|
+
}
|
|
747
|
+
return isModuleExcluded(data) && !isModuleIncluded(data) ? 0 : 1;
|
|
748
|
+
};
|
|
749
|
+
}, [isDefaultInclude, isModuleExcluded, isModuleIncluded]);
|
|
750
|
+
return {
|
|
751
|
+
getModuleFilterMultiplier,
|
|
752
|
+
includeFilter,
|
|
753
|
+
excludeFilter,
|
|
754
|
+
setExcludeFilter: setExcludeFilterTrottled,
|
|
755
|
+
setIncludeFilter: setIncludeFilterTrottled,
|
|
756
|
+
};
|
|
757
|
+
};
|
|
758
|
+
|
|
676
759
|
function ascending(a, b) {
|
|
677
760
|
return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
|
|
678
761
|
}
|
|
@@ -907,6 +990,90 @@ var drawChart = (function (exports) {
|
|
|
907
990
|
return stop < start ? -step1 : step1;
|
|
908
991
|
}
|
|
909
992
|
|
|
993
|
+
const TOP_PADDING = 20;
|
|
994
|
+
const PADDING = 2;
|
|
995
|
+
|
|
996
|
+
const Node = ({ node, onMouseOver, onClick, selected }) => {
|
|
997
|
+
const { getModuleColor } = F(StaticContext);
|
|
998
|
+
const { backgroundColor, fontColor } = getModuleColor(node);
|
|
999
|
+
const { x0, x1, y1, y0, data, children = null } = node;
|
|
1000
|
+
const textRef = s();
|
|
1001
|
+
const textRectRef = s();
|
|
1002
|
+
const width = x1 - x0;
|
|
1003
|
+
const height = y1 - y0;
|
|
1004
|
+
const textProps = {
|
|
1005
|
+
"font-size": "0.7em",
|
|
1006
|
+
"dominant-baseline": "middle",
|
|
1007
|
+
"text-anchor": "middle",
|
|
1008
|
+
x: width / 2,
|
|
1009
|
+
};
|
|
1010
|
+
if (children != null) {
|
|
1011
|
+
textProps.y = (TOP_PADDING + PADDING) / 2;
|
|
1012
|
+
}
|
|
1013
|
+
else {
|
|
1014
|
+
textProps.y = height / 2;
|
|
1015
|
+
}
|
|
1016
|
+
h(() => {
|
|
1017
|
+
if (width == 0 || height == 0) {
|
|
1018
|
+
return;
|
|
1019
|
+
}
|
|
1020
|
+
if (textRectRef.current == null) {
|
|
1021
|
+
textRectRef.current = textRef.current.getBoundingClientRect();
|
|
1022
|
+
}
|
|
1023
|
+
let scale = 1;
|
|
1024
|
+
if (children != null) {
|
|
1025
|
+
scale = Math.min((width * 0.9) / textRectRef.current.width, Math.min(height, TOP_PADDING + PADDING) / textRectRef.current.height);
|
|
1026
|
+
scale = Math.min(1, scale);
|
|
1027
|
+
textRef.current.setAttribute("y", String(Math.min(TOP_PADDING + PADDING, height) / 2 / scale));
|
|
1028
|
+
textRef.current.setAttribute("x", String(width / 2 / scale));
|
|
1029
|
+
}
|
|
1030
|
+
else {
|
|
1031
|
+
scale = Math.min((width * 0.9) / textRectRef.current.width, (height * 0.9) / textRectRef.current.height);
|
|
1032
|
+
scale = Math.min(1, scale);
|
|
1033
|
+
textRef.current.setAttribute("y", String(height / 2 / scale));
|
|
1034
|
+
textRef.current.setAttribute("x", String(width / 2 / scale));
|
|
1035
|
+
}
|
|
1036
|
+
textRef.current.setAttribute("transform", `scale(${scale.toFixed(2)})`);
|
|
1037
|
+
}, [children, height, width]);
|
|
1038
|
+
if (width == 0 || height == 0) {
|
|
1039
|
+
return null;
|
|
1040
|
+
}
|
|
1041
|
+
return (o$1("g", Object.assign({ className: "node", transform: `translate(${x0},${y0})`, onClick: (event) => {
|
|
1042
|
+
event.stopPropagation();
|
|
1043
|
+
onClick(node);
|
|
1044
|
+
}, onMouseOver: (event) => {
|
|
1045
|
+
event.stopPropagation();
|
|
1046
|
+
onMouseOver(node);
|
|
1047
|
+
} }, { children: [o$1("rect", { fill: backgroundColor, rx: 2, ry: 2, width: x1 - x0, height: y1 - y0, stroke: selected ? "#fff" : undefined, "stroke-width": selected ? 2 : undefined }, void 0),
|
|
1048
|
+
o$1("text", Object.assign({ ref: textRef, fill: fontColor, onClick: (event) => {
|
|
1049
|
+
var _a;
|
|
1050
|
+
if (((_a = window.getSelection()) === null || _a === void 0 ? void 0 : _a.toString()) !== "") {
|
|
1051
|
+
event.stopPropagation();
|
|
1052
|
+
}
|
|
1053
|
+
} }, textProps, { children: data.name }), void 0)] }), void 0));
|
|
1054
|
+
};
|
|
1055
|
+
|
|
1056
|
+
const TreeMap = ({ root, onNodeHover, selectedNode, onNodeClick }) => {
|
|
1057
|
+
const { width, height, getModuleIds } = F(StaticContext);
|
|
1058
|
+
console.time("layering");
|
|
1059
|
+
// this will make groups by height
|
|
1060
|
+
const nestedData = d(() => {
|
|
1061
|
+
const nestedDataMap = group(root.descendants(), (d) => d.height);
|
|
1062
|
+
const nestedData = Array.from(nestedDataMap, ([key, values]) => ({
|
|
1063
|
+
key,
|
|
1064
|
+
values,
|
|
1065
|
+
}));
|
|
1066
|
+
nestedData.sort((a, b) => b.key - a.key);
|
|
1067
|
+
return nestedData;
|
|
1068
|
+
}, [root]);
|
|
1069
|
+
console.timeEnd("layering");
|
|
1070
|
+
return (o$1("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: `0 0 ${width} ${height}` }, { children: nestedData.map(({ key, values }) => {
|
|
1071
|
+
return (o$1("g", Object.assign({ className: "layer" }, { children: values.map((node) => {
|
|
1072
|
+
return (o$1(Node, { node: node, onMouseOver: onNodeHover, selected: selectedNode === node, onClick: onNodeClick }, getModuleIds(node.data).nodeUid.id));
|
|
1073
|
+
}) }), key));
|
|
1074
|
+
}) }), void 0));
|
|
1075
|
+
};
|
|
1076
|
+
|
|
910
1077
|
/*!
|
|
911
1078
|
* bytes
|
|
912
1079
|
* Copyright(c) 2012-2014 TJ Holowaychuk
|
|
@@ -993,70 +1160,16 @@ var drawChart = (function (exports) {
|
|
|
993
1160
|
return str + unitSeparator + unit;
|
|
994
1161
|
}
|
|
995
1162
|
|
|
996
|
-
const Node = ({ node, onMouseOver, onClick, selected, sizeProperty }) => {
|
|
997
|
-
const { getModuleColor, getModuleIds, getModuleSize } = F(StaticContext);
|
|
998
|
-
const { backgroundColor, fontColor } = getModuleColor(node);
|
|
999
|
-
const { clipUid, nodeUid } = getModuleIds(node.data);
|
|
1000
|
-
const { x0, x1, y1, y0, data, children = null } = node;
|
|
1001
|
-
const tspan1Props = {};
|
|
1002
|
-
const tspan2Props = {};
|
|
1003
|
-
if (children != null) {
|
|
1004
|
-
tspan1Props.dx = 3;
|
|
1005
|
-
tspan2Props.dx = 3;
|
|
1006
|
-
tspan1Props.y = 13;
|
|
1007
|
-
tspan2Props.y = 13;
|
|
1008
|
-
}
|
|
1009
|
-
else {
|
|
1010
|
-
tspan1Props.x = 3;
|
|
1011
|
-
tspan2Props.x = 3;
|
|
1012
|
-
tspan1Props.y = "1.1em";
|
|
1013
|
-
tspan2Props.y = "2.3em";
|
|
1014
|
-
}
|
|
1015
|
-
const handleClickSelection = (event) => {
|
|
1016
|
-
var _a;
|
|
1017
|
-
if (((_a = window.getSelection()) === null || _a === void 0 ? void 0 : _a.toString()) !== "") {
|
|
1018
|
-
event.stopPropagation();
|
|
1019
|
-
}
|
|
1020
|
-
};
|
|
1021
|
-
return (o$1("g", Object.assign({ className: "node", transform: `translate(${x0},${y0})`, onClick: (event) => {
|
|
1022
|
-
event.stopPropagation();
|
|
1023
|
-
onClick(node);
|
|
1024
|
-
}, onMouseOver: (evt) => {
|
|
1025
|
-
evt.stopPropagation();
|
|
1026
|
-
onMouseOver(node);
|
|
1027
|
-
} }, { children: [o$1("rect", { id: nodeUid.id, fill: backgroundColor, rx: 2, ry: 2, width: x1 - x0, height: y1 - y0, stroke: selected ? "#fff" : undefined, "stroke-width": selected ? 2 : undefined }, void 0),
|
|
1028
|
-
o$1("clipPath", Object.assign({ id: clipUid.id }, { children: o$1("use", { href: nodeUid.href }, void 0) }), void 0),
|
|
1029
|
-
o$1("text", Object.assign({ "clip-path": clipUid, fill: fontColor, onClick: handleClickSelection }, { children: [o$1("tspan", Object.assign({}, tspan1Props, { "font-size": "0.7em" }, { children: data.name }), void 0),
|
|
1030
|
-
o$1("tspan", Object.assign({}, tspan2Props, { "fill-opacity": 0.7, "font-size": "0.7em" }, { children: format_1(getModuleSize(data, sizeProperty)) }), void 0)] }), void 0)] }), void 0));
|
|
1031
|
-
};
|
|
1032
|
-
|
|
1033
|
-
const TreeMap = ({ root, onNodeHover, selectedNode, onNodeClick, sizeProperty, }) => {
|
|
1034
|
-
const { width, height, getModuleIds } = F(StaticContext);
|
|
1035
|
-
// this will make groups by height
|
|
1036
|
-
const nestedData = d(() => {
|
|
1037
|
-
const nestedDataMap = group(root.descendants(), (d) => d.height);
|
|
1038
|
-
const nestedData = Array.from(nestedDataMap, ([key, values]) => ({
|
|
1039
|
-
key,
|
|
1040
|
-
values,
|
|
1041
|
-
}));
|
|
1042
|
-
nestedData.sort((a, b) => b.key - a.key);
|
|
1043
|
-
return nestedData;
|
|
1044
|
-
}, [root]);
|
|
1045
|
-
return (o$1("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: `0 0 ${width} ${height}` }, { children: nestedData.map(({ key, values }) => {
|
|
1046
|
-
return (o$1("g", Object.assign({ className: "layer" }, { children: values.map((node) => {
|
|
1047
|
-
return (o$1(Node, { node: node, onMouseOver: onNodeHover, selected: selectedNode === node, onClick: onNodeClick, sizeProperty: sizeProperty }, getModuleIds(node.data).nodeUid.id));
|
|
1048
|
-
}) }), key));
|
|
1049
|
-
}) }), void 0));
|
|
1050
|
-
};
|
|
1051
|
-
|
|
1052
1163
|
const Tooltip_marginX = 10;
|
|
1053
1164
|
const Tooltip_marginY = 30;
|
|
1165
|
+
const SOURCEMAP_RENDERED = (o$1("span", { children: [" ", o$1("b", { children: LABELS.renderedLength }, void 0), " is a number of characters in the file after individual and ", o$1("br", {}, void 0), " whole bundle transformations according to sourcemap."] }, void 0));
|
|
1166
|
+
const RENDRED = (o$1("span", { children: [o$1("b", { children: LABELS.renderedLength }, void 0), " is a byte size of individual file after transformations and treeshake."] }, void 0));
|
|
1167
|
+
const COMPRESSED = (o$1("span", { children: [o$1("b", { children: LABELS.gzipLength }, void 0), " and ", o$1("b", { children: LABELS.brotliLength }, void 0), " is a byte size of individual file after individual", " ", "transformations,", o$1("br", {}, void 0), " treeshake and compression."] }, void 0));
|
|
1054
1168
|
const Tooltip = ({ node, visible, root, sizeProperty }) => {
|
|
1055
|
-
const { availableSizeProperties, getModuleSize,
|
|
1169
|
+
const { availableSizeProperties, getModuleSize, data } = F(StaticContext);
|
|
1056
1170
|
const ref = s();
|
|
1057
1171
|
const [style, setStyle] = l({});
|
|
1058
1172
|
const content = d(() => {
|
|
1059
|
-
var _a;
|
|
1060
1173
|
if (!node)
|
|
1061
1174
|
return null;
|
|
1062
1175
|
const mainSize = getModuleSize(node.data, sizeProperty);
|
|
@@ -1068,6 +1181,11 @@ var drawChart = (function (exports) {
|
|
|
1068
1181
|
.reverse()
|
|
1069
1182
|
.map((d) => d.data.name)
|
|
1070
1183
|
.join("/");
|
|
1184
|
+
let dataNode = null;
|
|
1185
|
+
if (!isModuleTree(node.data)) {
|
|
1186
|
+
const mainUid = data.nodeParts[node.data.uid].mainUid;
|
|
1187
|
+
dataNode = data.nodeMetas[mainUid];
|
|
1188
|
+
}
|
|
1071
1189
|
return (o$1(y$1, { children: [o$1("div", { children: path }, void 0),
|
|
1072
1190
|
availableSizeProperties.map((sizeProp) => {
|
|
1073
1191
|
if (sizeProp === sizeProperty) {
|
|
@@ -1077,9 +1195,17 @@ var drawChart = (function (exports) {
|
|
|
1077
1195
|
return (o$1("div", { children: [LABELS[sizeProp], ": ", format_1(getModuleSize(node.data, sizeProp))] }, void 0));
|
|
1078
1196
|
}
|
|
1079
1197
|
}),
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1198
|
+
o$1("br", {}, void 0),
|
|
1199
|
+
dataNode && dataNode.importedBy.length > 0 && (o$1("div", { children: [o$1("div", { children: [o$1("b", { children: "Imported By" }, void 0), ":"] }, void 0),
|
|
1200
|
+
dataNode.importedBy.map(({ uid }) => {
|
|
1201
|
+
const id = data.nodeMetas[uid].id;
|
|
1202
|
+
return o$1("div", { children: id }, id);
|
|
1203
|
+
})] }, void 0)),
|
|
1204
|
+
o$1("br", {}, void 0),
|
|
1205
|
+
o$1("small", { children: data.options.sourcemap ? SOURCEMAP_RENDERED : RENDRED }, void 0),
|
|
1206
|
+
(data.options.gzip || data.options.brotli) && (o$1(y$1, { children: [o$1("br", {}, void 0),
|
|
1207
|
+
o$1("small", { children: COMPRESSED }, void 0)] }, void 0))] }, void 0));
|
|
1208
|
+
}, [availableSizeProperties, data, getModuleSize, node, root.data, sizeProperty]);
|
|
1083
1209
|
const updatePosition = (mouseCoords) => {
|
|
1084
1210
|
const pos = {
|
|
1085
1211
|
left: mouseCoords.x + Tooltip_marginX,
|
|
@@ -1128,74 +1254,16 @@ var drawChart = (function (exports) {
|
|
|
1128
1254
|
setShowTooltip(true);
|
|
1129
1255
|
}, selectedNode: selectedNode, onNodeClick: (node) => {
|
|
1130
1256
|
setSelectedNode(selectedNode === node ? undefined : node);
|
|
1131
|
-
}
|
|
1257
|
+
} }, void 0),
|
|
1132
1258
|
o$1(Tooltip, { visible: showTooltip, node: tooltipNode, root: root, sizeProperty: sizeProperty }, void 0)] }, void 0));
|
|
1133
1259
|
};
|
|
1134
1260
|
|
|
1135
|
-
const throttleFilter = (callback, limit) => {
|
|
1136
|
-
let waiting = false;
|
|
1137
|
-
return (val) => {
|
|
1138
|
-
if (!waiting) {
|
|
1139
|
-
callback(val);
|
|
1140
|
-
waiting = true;
|
|
1141
|
-
setTimeout(() => {
|
|
1142
|
-
waiting = false;
|
|
1143
|
-
}, limit);
|
|
1144
|
-
}
|
|
1145
|
-
};
|
|
1146
|
-
};
|
|
1147
|
-
const useFilter = () => {
|
|
1148
|
-
const [includeFilter, setIncludeFilter] = l("");
|
|
1149
|
-
const [excludeFilter, setExcludeFilter] = l("");
|
|
1150
|
-
const setIncludeFilterTrottled = d(() => throttleFilter(setIncludeFilter, 200), []);
|
|
1151
|
-
const setExcludeFilterTrottled = d(() => throttleFilter(setExcludeFilter, 200), []);
|
|
1152
|
-
const isModuleIncluded = d(() => {
|
|
1153
|
-
if (includeFilter === "") {
|
|
1154
|
-
return () => true;
|
|
1155
|
-
}
|
|
1156
|
-
try {
|
|
1157
|
-
const re = new RegExp(includeFilter);
|
|
1158
|
-
return ({ id }) => re.test(id);
|
|
1159
|
-
}
|
|
1160
|
-
catch (err) {
|
|
1161
|
-
return () => false;
|
|
1162
|
-
}
|
|
1163
|
-
}, [includeFilter]);
|
|
1164
|
-
const isModuleExcluded = d(() => {
|
|
1165
|
-
if (excludeFilter === "") {
|
|
1166
|
-
return () => false;
|
|
1167
|
-
}
|
|
1168
|
-
try {
|
|
1169
|
-
const re = new RegExp(excludeFilter);
|
|
1170
|
-
return ({ id }) => re.test(id);
|
|
1171
|
-
}
|
|
1172
|
-
catch (err) {
|
|
1173
|
-
return () => false;
|
|
1174
|
-
}
|
|
1175
|
-
}, [excludeFilter]);
|
|
1176
|
-
const isDefaultInclude = includeFilter === "";
|
|
1177
|
-
const getModuleFilterMultiplier = d(() => {
|
|
1178
|
-
return (data) => {
|
|
1179
|
-
if (isDefaultInclude) {
|
|
1180
|
-
return isModuleExcluded(data) ? 0 : 1;
|
|
1181
|
-
}
|
|
1182
|
-
return isModuleExcluded(data) && !isModuleIncluded(data) ? 0 : 1;
|
|
1183
|
-
};
|
|
1184
|
-
}, [isDefaultInclude, isModuleExcluded, isModuleIncluded]);
|
|
1185
|
-
return {
|
|
1186
|
-
getModuleFilterMultiplier,
|
|
1187
|
-
includeFilter,
|
|
1188
|
-
excludeFilter,
|
|
1189
|
-
setExcludeFilter: setExcludeFilterTrottled,
|
|
1190
|
-
setIncludeFilter: setIncludeFilterTrottled,
|
|
1191
|
-
};
|
|
1192
|
-
};
|
|
1193
|
-
|
|
1194
1261
|
const Main = () => {
|
|
1195
1262
|
const { availableSizeProperties, rawHierarchy, getModuleSize, layout, data } = F(StaticContext);
|
|
1196
1263
|
const [sizeProperty, setSizeProperty] = l(availableSizeProperties[0]);
|
|
1197
1264
|
const [selectedNode, setSelectedNode] = l(undefined);
|
|
1198
1265
|
const { getModuleFilterMultiplier, setExcludeFilter, setIncludeFilter } = useFilter();
|
|
1266
|
+
console.time("getNodeSizeMultiplier");
|
|
1199
1267
|
const getNodeSizeMultiplier = d(() => {
|
|
1200
1268
|
const rootSize = getModuleSize(rawHierarchy.data, sizeProperty);
|
|
1201
1269
|
const selectedSize = selectedNode ? getModuleSize(selectedNode.data, sizeProperty) : 1;
|
|
@@ -1221,6 +1289,8 @@ var drawChart = (function (exports) {
|
|
|
1221
1289
|
};
|
|
1222
1290
|
}
|
|
1223
1291
|
}, [getModuleSize, rawHierarchy.data, selectedNode, sizeProperty]);
|
|
1292
|
+
console.timeEnd("getNodeSizeMultiplier");
|
|
1293
|
+
console.time("root hierarchy compute");
|
|
1224
1294
|
// root here always be the same as rawHierarchy even after layouting
|
|
1225
1295
|
const root = d(() => {
|
|
1226
1296
|
const rootWithSizesAndSorted = rawHierarchy
|
|
@@ -1229,40 +1299,17 @@ var drawChart = (function (exports) {
|
|
|
1229
1299
|
return 0;
|
|
1230
1300
|
const ownSize = getModuleSize(node, sizeProperty);
|
|
1231
1301
|
const zoomMultiplier = getNodeSizeMultiplier(node);
|
|
1232
|
-
const filterMultiplier = getModuleFilterMultiplier(data.
|
|
1302
|
+
const filterMultiplier = getModuleFilterMultiplier(data.nodeMetas[data.nodeParts[node.uid].mainUid]);
|
|
1233
1303
|
return ownSize * zoomMultiplier * filterMultiplier;
|
|
1234
1304
|
})
|
|
1235
1305
|
.sort((a, b) => getModuleSize(a.data, sizeProperty) - getModuleSize(b.data, sizeProperty));
|
|
1236
1306
|
return layout(rootWithSizesAndSorted);
|
|
1237
|
-
}, [data
|
|
1307
|
+
}, [data, getModuleFilterMultiplier, getModuleSize, getNodeSizeMultiplier, layout, rawHierarchy, sizeProperty]);
|
|
1308
|
+
console.timeEnd("root hierarchy compute");
|
|
1238
1309
|
return (o$1(y$1, { children: [o$1(SideBar, { sizeProperty: sizeProperty, availableSizeProperties: availableSizeProperties, setSizeProperty: setSizeProperty, onExcludeChange: setExcludeFilter, onIncludeChange: setIncludeFilter }, void 0),
|
|
1239
1310
|
o$1(Chart, { root: root, sizeProperty: sizeProperty, selectedNode: selectedNode, setSelectedNode: setSelectedNode }, void 0)] }, void 0));
|
|
1240
1311
|
};
|
|
1241
1312
|
|
|
1242
|
-
let count = 0;
|
|
1243
|
-
class Id {
|
|
1244
|
-
constructor(id) {
|
|
1245
|
-
this._id = id;
|
|
1246
|
-
const url = new URL(window.location.href);
|
|
1247
|
-
url.hash = id;
|
|
1248
|
-
this._href = url.toString();
|
|
1249
|
-
}
|
|
1250
|
-
get id() {
|
|
1251
|
-
return this._id;
|
|
1252
|
-
}
|
|
1253
|
-
get href() {
|
|
1254
|
-
return this._href;
|
|
1255
|
-
}
|
|
1256
|
-
toString() {
|
|
1257
|
-
return `url(${this.href})`;
|
|
1258
|
-
}
|
|
1259
|
-
}
|
|
1260
|
-
function generateUniqueId(name) {
|
|
1261
|
-
count += 1;
|
|
1262
|
-
const id = ["O", name, count].filter(Boolean).join("-");
|
|
1263
|
-
return new Id(id);
|
|
1264
|
-
}
|
|
1265
|
-
|
|
1266
1313
|
function initRange(domain, range) {
|
|
1267
1314
|
switch (arguments.length) {
|
|
1268
1315
|
case 0: break;
|
|
@@ -3113,7 +3160,7 @@ var drawChart = (function (exports) {
|
|
|
3113
3160
|
const colorParentMap = new Map();
|
|
3114
3161
|
colorParentMap.set(root, COLOR_BASE);
|
|
3115
3162
|
if (root.children != null) {
|
|
3116
|
-
const colorScale = sequential([0, root.children.length
|
|
3163
|
+
const colorScale = sequential([0, root.children.length], (n) => hsl(360 * n, 0.6, 0.85));
|
|
3117
3164
|
root.children.forEach((c, id) => {
|
|
3118
3165
|
colorParentMap.set(c, colorScale(id).toString());
|
|
3119
3166
|
});
|
|
@@ -3143,19 +3190,23 @@ var drawChart = (function (exports) {
|
|
|
3143
3190
|
|
|
3144
3191
|
const StaticContext = q({});
|
|
3145
3192
|
const drawChart = (parentNode, data, width, height) => {
|
|
3146
|
-
var _a, _b;
|
|
3147
3193
|
const availableSizeProperties = getAvailableSizeOptions(data.options);
|
|
3194
|
+
console.time("layout create");
|
|
3148
3195
|
const layout = treemap()
|
|
3149
3196
|
.size([width, height])
|
|
3150
|
-
.paddingOuter(
|
|
3151
|
-
.paddingTop(
|
|
3152
|
-
.paddingInner(
|
|
3197
|
+
.paddingOuter(PADDING)
|
|
3198
|
+
.paddingTop(TOP_PADDING)
|
|
3199
|
+
.paddingInner(PADDING)
|
|
3153
3200
|
.round(true)
|
|
3154
3201
|
.tile(treemapResquarify);
|
|
3202
|
+
console.timeEnd("layout create");
|
|
3203
|
+
console.time("rawHierarchy create");
|
|
3155
3204
|
const rawHierarchy = hierarchy(data.tree);
|
|
3205
|
+
console.timeEnd("rawHierarchy create");
|
|
3156
3206
|
const nodeSizesCache = new Map();
|
|
3157
3207
|
const nodeIdsCache = new Map();
|
|
3158
3208
|
const getModuleSize = (node, sizeKey) => { var _a, _b; return (_b = (_a = nodeSizesCache.get(node)) === null || _a === void 0 ? void 0 : _a[sizeKey]) !== null && _b !== void 0 ? _b : 0; };
|
|
3209
|
+
console.time("rawHierarchy eachAfter cache");
|
|
3159
3210
|
rawHierarchy.eachAfter((node) => {
|
|
3160
3211
|
var _a;
|
|
3161
3212
|
const nodeData = node.data;
|
|
@@ -3163,7 +3214,7 @@ var drawChart = (function (exports) {
|
|
|
3163
3214
|
nodeUid: generateUniqueId("node"),
|
|
3164
3215
|
clipUid: generateUniqueId("clip"),
|
|
3165
3216
|
});
|
|
3166
|
-
const sizes = { renderedLength: 0 };
|
|
3217
|
+
const sizes = { renderedLength: 0, gzipLength: 0, brotliLength: 0 };
|
|
3167
3218
|
if (isModuleTree(nodeData)) {
|
|
3168
3219
|
for (const sizeKey of availableSizeProperties) {
|
|
3169
3220
|
sizes[sizeKey] = nodeData.children.reduce((acc, child) => getModuleSize(child, sizeKey) + acc, 0);
|
|
@@ -3171,25 +3222,16 @@ var drawChart = (function (exports) {
|
|
|
3171
3222
|
}
|
|
3172
3223
|
else {
|
|
3173
3224
|
for (const sizeKey of availableSizeProperties) {
|
|
3174
|
-
sizes[sizeKey] = (_a = data.
|
|
3225
|
+
sizes[sizeKey] = (_a = data.nodeParts[nodeData.uid][sizeKey]) !== null && _a !== void 0 ? _a : 0;
|
|
3175
3226
|
}
|
|
3176
3227
|
}
|
|
3177
3228
|
nodeSizesCache.set(nodeData, sizes);
|
|
3178
3229
|
});
|
|
3230
|
+
console.timeEnd("rawHierarchy eachAfter cache");
|
|
3179
3231
|
const getModuleIds = (node) => nodeIdsCache.get(node);
|
|
3232
|
+
console.time("color");
|
|
3180
3233
|
const getModuleColor = createRainbowColor(rawHierarchy);
|
|
3181
|
-
|
|
3182
|
-
const importedCache = new Map();
|
|
3183
|
-
for (const { source, target } of data.links) {
|
|
3184
|
-
if (!importedByCache.has(target)) {
|
|
3185
|
-
importedByCache.set(target, []);
|
|
3186
|
-
}
|
|
3187
|
-
if (!importedCache.has(source)) {
|
|
3188
|
-
importedCache.set(source, []);
|
|
3189
|
-
}
|
|
3190
|
-
(_a = importedByCache.get(target)) === null || _a === void 0 ? void 0 : _a.push(Object.assign({ uid: source }, data.nodes[source]));
|
|
3191
|
-
(_b = importedCache.get(source)) === null || _b === void 0 ? void 0 : _b.push(Object.assign({ uid: target }, data.nodes[target]));
|
|
3192
|
-
}
|
|
3234
|
+
console.timeEnd("color");
|
|
3193
3235
|
N(o$1(StaticContext.Provider, Object.assign({ value: {
|
|
3194
3236
|
data,
|
|
3195
3237
|
availableSizeProperties,
|
|
@@ -3200,8 +3242,6 @@ var drawChart = (function (exports) {
|
|
|
3200
3242
|
getModuleColor,
|
|
3201
3243
|
rawHierarchy,
|
|
3202
3244
|
layout,
|
|
3203
|
-
importedCache,
|
|
3204
|
-
importedByCache,
|
|
3205
3245
|
} }, { children: o$1(Main, {}, void 0) }), void 0), parentNode);
|
|
3206
3246
|
};
|
|
3207
3247
|
|
|
@@ -3213,12 +3253,13 @@ var drawChart = (function (exports) {
|
|
|
3213
3253
|
return exports;
|
|
3214
3254
|
|
|
3215
3255
|
}({}));
|
|
3256
|
+
//# sourceMappingURL=treemap.js.map
|
|
3216
3257
|
|
|
3217
3258
|
/*-->*/
|
|
3218
3259
|
</script>
|
|
3219
3260
|
<script>
|
|
3220
3261
|
/*<!--*/
|
|
3221
|
-
const data = {"version":
|
|
3262
|
+
const data = {"version":2,"tree":{"name":"root","children":[{"name":"content.esm.js","children":[{"name":"E:/glib","children":[{"name":"node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs","uid":"00a1-162"},{"name":"packages/content/dist/content/src","children":[{"uid":"00a1-164","name":"AssetType.js"},{"uid":"00a1-166","name":"AssetContainer.js"},{"uid":"00a1-168","name":"AssetLoaderRegistry.js"},{"uid":"00a1-170","name":"AsyncExecutor.js"},{"uid":"00a1-172","name":"HttpClient.js"},{"uid":"00a1-174","name":"ContentLoader.js"},{"uid":"00a1-176","name":"ContentType.js"},{"uid":"00a1-178","name":"MaterialRegistry.js"},{"uid":"00a1-180","name":"TextureLoader.js"},{"uid":"00a1-182","name":"ResourceGraph.js"},{"uid":"00a1-184","name":"index.js"}]}]}]}],"isRoot":true},"nodeParts":{"00a1-162":{"renderedLength":2094,"gzipLength":0,"brotliLength":0,"mainUid":"00a1-161"},"00a1-164":{"renderedLength":92,"gzipLength":0,"brotliLength":0,"mainUid":"00a1-163"},"00a1-166":{"renderedLength":957,"gzipLength":0,"brotliLength":0,"mainUid":"00a1-165"},"00a1-168":{"renderedLength":640,"gzipLength":0,"brotliLength":0,"mainUid":"00a1-167"},"00a1-170":{"renderedLength":5496,"gzipLength":0,"brotliLength":0,"mainUid":"00a1-169"},"00a1-172":{"renderedLength":4813,"gzipLength":0,"brotliLength":0,"mainUid":"00a1-171"},"00a1-174":{"renderedLength":12646,"gzipLength":0,"brotliLength":0,"mainUid":"00a1-173"},"00a1-176":{"renderedLength":486,"gzipLength":0,"brotliLength":0,"mainUid":"00a1-175"},"00a1-178":{"renderedLength":498,"gzipLength":0,"brotliLength":0,"mainUid":"00a1-177"},"00a1-180":{"renderedLength":2782,"gzipLength":0,"brotliLength":0,"mainUid":"00a1-179"},"00a1-182":{"renderedLength":6580,"gzipLength":0,"brotliLength":0,"mainUid":"00a1-181"},"00a1-184":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"00a1-183"}},"nodeMetas":{"00a1-161":{"id":"E:\\glib\\node_modules\\.pnpm\\tslib@2.8.1\\node_modules\\tslib\\tslib.es6.mjs","moduleParts":{"content.esm.js":"00a1-162"},"imported":[],"importedBy":[{"uid":"00a1-165"},{"uid":"00a1-169"},{"uid":"00a1-173"},{"uid":"00a1-179"},{"uid":"00a1-181"},{"uid":"00a1-171"}]},"00a1-163":{"id":"E:\\glib\\packages\\content\\dist\\content\\src\\AssetType.js","moduleParts":{"content.esm.js":"00a1-164"},"imported":[],"importedBy":[{"uid":"00a1-183"},{"uid":"00a1-165"},{"uid":"00a1-173"}]},"00a1-165":{"id":"E:\\glib\\packages\\content\\dist\\content\\src\\AssetContainer.js","moduleParts":{"content.esm.js":"00a1-166"},"imported":[{"uid":"00a1-161"},{"uid":"00a1-163"}],"importedBy":[{"uid":"00a1-183"},{"uid":"00a1-179"}]},"00a1-167":{"id":"E:\\glib\\packages\\content\\dist\\content\\src\\AssetLoaderRegistry.js","moduleParts":{"content.esm.js":"00a1-168"},"imported":[],"importedBy":[{"uid":"00a1-183"},{"uid":"00a1-173"}]},"00a1-169":{"id":"E:\\glib\\packages\\content\\dist\\content\\src\\AsyncExecutor.js","moduleParts":{"content.esm.js":"00a1-170"},"imported":[{"uid":"00a1-161"}],"importedBy":[{"uid":"00a1-183"},{"uid":"00a1-173"}]},"00a1-171":{"id":"E:\\glib\\packages\\content\\dist\\content\\src\\HttpClient.js","moduleParts":{"content.esm.js":"00a1-172"},"imported":[{"uid":"00a1-161"}],"importedBy":[{"uid":"00a1-173"}]},"00a1-173":{"id":"E:\\glib\\packages\\content\\dist\\content\\src\\ContentLoader.js","moduleParts":{"content.esm.js":"00a1-174"},"imported":[{"uid":"00a1-161"},{"uid":"00a1-185"},{"uid":"00a1-186"},{"uid":"00a1-187"},{"uid":"00a1-167"},{"uid":"00a1-163"},{"uid":"00a1-169"},{"uid":"00a1-171"}],"importedBy":[{"uid":"00a1-183"},{"uid":"00a1-179"}]},"00a1-175":{"id":"E:\\glib\\packages\\content\\dist\\content\\src\\ContentType.js","moduleParts":{"content.esm.js":"00a1-176"},"imported":[],"importedBy":[{"uid":"00a1-183"}]},"00a1-177":{"id":"E:\\glib\\packages\\content\\dist\\content\\src\\MaterialRegistry.js","moduleParts":{"content.esm.js":"00a1-178"},"imported":[],"importedBy":[{"uid":"00a1-183"}]},"00a1-179":{"id":"E:\\glib\\packages\\content\\dist\\content\\src\\TextureLoader.js","moduleParts":{"content.esm.js":"00a1-180"},"imported":[{"uid":"00a1-161"},{"uid":"00a1-185"},{"uid":"00a1-165"},{"uid":"00a1-173"}],"importedBy":[{"uid":"00a1-183"}]},"00a1-181":{"id":"E:\\glib\\packages\\content\\dist\\content\\src\\ResourceGraph.js","moduleParts":{"content.esm.js":"00a1-182"},"imported":[{"uid":"00a1-161"}],"importedBy":[{"uid":"00a1-183"}]},"00a1-183":{"id":"E:\\glib\\packages\\content\\dist\\content\\src\\index.js","moduleParts":{"content.esm.js":"00a1-184"},"imported":[{"uid":"00a1-165"},{"uid":"00a1-167"},{"uid":"00a1-169"},{"uid":"00a1-173"},{"uid":"00a1-175"},{"uid":"00a1-177"},{"uid":"00a1-179"},{"uid":"00a1-181"},{"uid":"00a1-163"}],"importedBy":[],"isEntry":true},"00a1-185":{"id":"@gglib/graphics","moduleParts":{},"imported":[],"importedBy":[{"uid":"00a1-173"},{"uid":"00a1-179"}],"isExternal":true},"00a1-186":{"id":"@gglib/model","moduleParts":{},"imported":[],"importedBy":[{"uid":"00a1-173"}],"isExternal":true},"00a1-187":{"id":"@gglib/utils","moduleParts":{},"imported":[],"importedBy":[{"uid":"00a1-173"}],"isExternal":true}},"env":{"rollup":"2.80.0"},"options":{"gzip":false,"brotli":false,"sourcemap":false}};
|
|
3222
3263
|
|
|
3223
3264
|
const run = () => {
|
|
3224
3265
|
const width = window.innerWidth;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gglib/content",
|
|
3
3
|
"description": "Part of the [G]glib project",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.8.1",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "github.com/giniedp/glib.git"
|
|
@@ -14,16 +14,27 @@
|
|
|
14
14
|
],
|
|
15
15
|
"author": "Alexander Graefenstein",
|
|
16
16
|
"license": "MIT",
|
|
17
|
-
"
|
|
18
|
-
"module": "dist
|
|
19
|
-
"typings": "dist
|
|
17
|
+
"main": "dist\\bundles\\content.esm.js",
|
|
18
|
+
"module": "dist\\bundles\\content.esm.js",
|
|
19
|
+
"typings": "dist\\content\\src\\index.d.ts",
|
|
20
|
+
"type": "module",
|
|
21
|
+
"exports": {
|
|
22
|
+
".": {
|
|
23
|
+
"import": "./dist/bundles/content.esm.js",
|
|
24
|
+
"types": "./dist/content/src/index.d.ts"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
20
27
|
"devDependencies": {
|
|
21
|
-
"@gglib/graphics": "0.
|
|
22
|
-
"@gglib/
|
|
28
|
+
"@gglib/graphics": "^0.8.1",
|
|
29
|
+
"@gglib/model": "^0.8.1",
|
|
30
|
+
"@gglib/utils": "^0.8.1",
|
|
31
|
+
"@gglib/math": "^0.8.1"
|
|
23
32
|
},
|
|
24
33
|
"peerDependencies": {
|
|
25
|
-
"@gglib/graphics": "0.
|
|
26
|
-
"@gglib/
|
|
34
|
+
"@gglib/graphics": "0.8.1",
|
|
35
|
+
"@gglib/model": "0.8.1",
|
|
36
|
+
"@gglib/utils": "0.8.1",
|
|
37
|
+
"@gglib/math": "0.8.1"
|
|
27
38
|
},
|
|
28
39
|
"files": [
|
|
29
40
|
"package.json",
|