@sme.up/ketchup2 1.4.0 → 1.6.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/dist/_basePickBy-B6LialOA.js +151 -0
- package/dist/_basePickBy-Cp1jDLqY.cjs +1 -0
- package/dist/_baseUniq-DVDmJvCh.js +614 -0
- package/dist/_baseUniq-nmEWBwYw.cjs +1 -0
- package/dist/arc-CEU53J5p.cjs +1 -0
- package/dist/arc-DY9lVoW5.js +83 -0
- package/dist/architecture-O4VJ6CD3-D6muUqd4.js +5 -0
- package/dist/architecture-O4VJ6CD3-bJ_1C0Zf.cjs +1 -0
- package/dist/architectureDiagram-VXUJARFQ-ClJdEDO3.js +4661 -0
- package/dist/architectureDiagram-VXUJARFQ-Nn9XUh0Q.cjs +36 -0
- package/dist/assets/buttonListAssets.d.ts.map +1 -1
- package/dist/assets/svg/info_outline.svg +1 -0
- package/dist/assets/svg/more_horiz.svg +1 -0
- package/dist/assets/svg/smeup-ai.svg +4 -0
- package/dist/basic-components/autocomplete/autocomplete.d.ts.map +1 -1
- package/dist/basic-components/button/button-types.d.ts +2 -2
- package/dist/basic-components/button/button-types.d.ts.map +1 -1
- package/dist/basic-components/button/button-utils.d.ts +2 -2
- package/dist/basic-components/button/button-utils.d.ts.map +1 -1
- package/dist/basic-components/button-group/button-group.d.ts.map +1 -1
- package/dist/basic-components/cell/cell-types.d.ts +11 -0
- package/dist/basic-components/cell/cell-types.d.ts.map +1 -1
- package/dist/basic-components/cell/cell.d.ts.map +1 -1
- package/dist/basic-components/checkbox/checkbox.d.ts.map +1 -1
- package/dist/basic-components/combobox/combobox.d.ts.map +1 -1
- package/dist/basic-components/icon/icon.d.ts.map +1 -1
- package/dist/basic-components/list/list-types.d.ts +1 -0
- package/dist/basic-components/list/list-types.d.ts.map +1 -1
- package/dist/basic-components/list/list.d.ts.map +1 -1
- package/dist/basic-components/mulitple-autocomplete/multiple-autocomplete-types.d.ts +4 -0
- package/dist/basic-components/mulitple-autocomplete/multiple-autocomplete-types.d.ts.map +1 -1
- package/dist/basic-components/mulitple-autocomplete/multiple-autocomplete.d.ts.map +1 -1
- package/dist/basic-components/notification/notification-types.d.ts +5 -0
- package/dist/basic-components/notification/notification-types.d.ts.map +1 -0
- package/dist/basic-components/notification/notification.d.ts +4 -0
- package/dist/basic-components/notification/notification.d.ts.map +1 -0
- package/dist/basic-components/text/text.d.ts.map +1 -1
- package/dist/basic-components/textarea/textarea-types.d.ts +1 -0
- package/dist/basic-components/textarea/textarea-types.d.ts.map +1 -1
- package/dist/basic-components/textarea/textarea.d.ts.map +1 -1
- package/dist/basic-components/textfield/textfield.d.ts.map +1 -1
- package/dist/basic-components/tree/tree.assets.d.ts.map +1 -1
- package/dist/basic-components/typography/typography-types.d.ts +14 -1
- package/dist/basic-components/typography/typography-types.d.ts.map +1 -1
- package/dist/basic-components/typography/typography.d.ts.map +1 -1
- package/dist/blockDiagram-VD42YOAC-B44HyGVt.cjs +122 -0
- package/dist/blockDiagram-VD42YOAC-BmflobDW.js +2261 -0
- package/dist/c4Diagram-YG6GDRKO-B-P2-hDh.cjs +10 -0
- package/dist/c4Diagram-YG6GDRKO-BS1FWcjl.js +1580 -0
- package/dist/channel-BV6Uh6EZ.js +5 -0
- package/dist/channel-DzXAJtya.cjs +1 -0
- package/dist/chunk-4BX2VUAB-BJZ1vQr9.js +8 -0
- package/dist/chunk-4BX2VUAB-B_ZYGc02.cjs +1 -0
- package/dist/chunk-55IACEB6-CLxuqzmA.js +8 -0
- package/dist/chunk-55IACEB6-CZ_-WQkE.cjs +1 -0
- package/dist/chunk-B4BG7PRW-CAoVudRf.js +1375 -0
- package/dist/chunk-B4BG7PRW-DgVx49jz.cjs +165 -0
- package/dist/chunk-DI55MBZ5-CLSmi7TN.cjs +220 -0
- package/dist/chunk-DI55MBZ5-CRHiuZe8.js +1370 -0
- package/dist/chunk-FMBD7UC4-Czxrc5If.js +19 -0
- package/dist/chunk-FMBD7UC4-DKJyLwV-.cjs +15 -0
- package/dist/chunk-QN33PNHL-4MRql7R0.cjs +1 -0
- package/dist/chunk-QN33PNHL-DhcutEk3.js +19 -0
- package/dist/chunk-QZHKN3VN-BKpxOymE.cjs +1 -0
- package/dist/chunk-QZHKN3VN-DHzNcVH-.js +15 -0
- package/dist/chunk-TZMSLE5B-CUTZm_Mo.cjs +1 -0
- package/dist/chunk-TZMSLE5B-zmb3g2xE.js +64 -0
- package/dist/classDiagram-2ON5EDUG-BAv5yqTF.cjs +1 -0
- package/dist/classDiagram-2ON5EDUG-CL66znZJ.js +16 -0
- package/dist/classDiagram-v2-WZHVMYZB-BAv5yqTF.cjs +1 -0
- package/dist/classDiagram-v2-WZHVMYZB-CL66znZJ.js +16 -0
- package/dist/clone-B3Eg32bl.cjs +1 -0
- package/dist/clone-BAhCV7QZ.js +8 -0
- package/dist/components/app-bar/app-bar.d.ts.map +1 -1
- package/dist/components/app-bar/app-bar.data.d.ts +2 -0
- package/dist/components/app-bar/app-bar.data.d.ts.map +1 -1
- package/dist/components/breadcrumbs/breadcrumbs-types.d.ts +17 -0
- package/dist/components/breadcrumbs/breadcrumbs-types.d.ts.map +1 -0
- package/dist/components/breadcrumbs/breadcrumbs.d.ts +4 -0
- package/dist/components/breadcrumbs/breadcrumbs.d.ts.map +1 -0
- package/dist/components/data-table/columns/useColumnWidths.d.ts.map +1 -1
- package/dist/components/data-table/filtering/data-table-filter-utils.d.ts.map +1 -1
- package/dist/components/data-table/header/Header.d.ts.map +1 -1
- package/dist/components/echarts/echarts-graph-types.d.ts +8 -0
- package/dist/components/echarts/echarts-graph-types.d.ts.map +1 -0
- package/dist/components/echarts/echarts-graph.d.ts +4 -0
- package/dist/components/echarts/echarts-graph.d.ts.map +1 -0
- package/dist/components/field/field-types.d.ts +2 -0
- package/dist/components/field/field-types.d.ts.map +1 -1
- package/dist/components/field/field.d.ts.map +1 -1
- package/dist/components/input-panel/assets/data.d.ts +2 -0
- package/dist/components/input-panel/assets/data.d.ts.map +1 -1
- package/dist/components/input-panel/input-panel-types.d.ts +5 -0
- package/dist/components/input-panel/input-panel-types.d.ts.map +1 -1
- package/dist/components/input-panel/input-panel-utils.d.ts +17 -2
- package/dist/components/input-panel/input-panel-utils.d.ts.map +1 -1
- package/dist/components/input-panel/input-panel.d.ts.map +1 -1
- package/dist/components/mermaid/mermaid-types.d.ts +8 -0
- package/dist/components/mermaid/mermaid-types.d.ts.map +1 -0
- package/dist/components/mermaid/mermaid.d.ts +4 -0
- package/dist/components/mermaid/mermaid.d.ts.map +1 -0
- package/dist/components/notification-widget/notification-widget-types.d.ts +12 -0
- package/dist/components/notification-widget/notification-widget-types.d.ts.map +1 -0
- package/dist/components/notification-widget/notification-widget.assets.d.ts +3 -0
- package/dist/components/notification-widget/notification-widget.assets.d.ts.map +1 -0
- package/dist/components/notification-widget/notification-widget.d.ts +4 -0
- package/dist/components/notification-widget/notification-widget.d.ts.map +1 -0
- package/dist/components/path/path-node.d.ts +5 -0
- package/dist/components/path/path-node.d.ts.map +1 -0
- package/dist/components/path/path-types.d.ts +68 -0
- package/dist/components/path/path-types.d.ts.map +1 -0
- package/dist/components/path/path.d.ts +4 -0
- package/dist/components/path/path.d.ts.map +1 -0
- package/dist/components/tab-bar/tab-bar-assets.d.ts +1 -0
- package/dist/components/tab-bar/tab-bar-assets.d.ts.map +1 -1
- package/dist/components/tab-bar/tab-bar-types.d.ts +15 -0
- package/dist/components/tab-bar/tab-bar-types.d.ts.map +1 -1
- package/dist/components/tab-bar/tab-bar.d.ts.map +1 -1
- package/dist/components/toolbar/assets/data.d.ts +7 -0
- package/dist/components/toolbar/assets/data.d.ts.map +1 -0
- package/dist/components/toolbar/toolbar-node.d.ts +3 -0
- package/dist/components/toolbar/toolbar-node.d.ts.map +1 -0
- package/dist/components/toolbar/toolbar-types.d.ts +78 -0
- package/dist/components/toolbar/toolbar-types.d.ts.map +1 -0
- package/dist/components/toolbar/toolbar-utils/useKeyboardNavigation.d.ts +12 -0
- package/dist/components/toolbar/toolbar-utils/useKeyboardNavigation.d.ts.map +1 -0
- package/dist/components/toolbar/toolbar-utils/useToolbarInteractions.d.ts +8 -0
- package/dist/components/toolbar/toolbar-utils/useToolbarInteractions.d.ts.map +1 -0
- package/dist/components/toolbar/toolbar-utils/utils.d.ts +12 -0
- package/dist/components/toolbar/toolbar-utils/utils.d.ts.map +1 -0
- package/dist/components/toolbar/toolbar.d.ts +3 -0
- package/dist/components/toolbar/toolbar.d.ts.map +1 -0
- package/dist/cose-bilkent-S5V4N54A-CXUgNIhF.js +2608 -0
- package/dist/cose-bilkent-S5V4N54A-Cwq5tiLA.cjs +1 -0
- package/dist/cytoscape.esm-CamnA8MN.js +18735 -0
- package/dist/cytoscape.esm-uM8noIeE.cjs +331 -0
- package/dist/dagre-6UL2VRFP-CTbq7ORA.cjs +4 -0
- package/dist/dagre-6UL2VRFP-CsS5EFGW.js +444 -0
- package/dist/defaultLocale-D7EN2tov.js +171 -0
- package/dist/defaultLocale-DIVzfLaQ.cjs +1 -0
- package/dist/diagram-PSM6KHXK-CFcTzPF8.cjs +24 -0
- package/dist/diagram-PSM6KHXK-YKTCI_7z.js +532 -0
- package/dist/diagram-QEK2KX5R-BEClDZ4k.cjs +43 -0
- package/dist/diagram-QEK2KX5R-CcZCzLby.js +217 -0
- package/dist/diagram-S2PKOQOG-DKBRpWrK.cjs +24 -0
- package/dist/diagram-S2PKOQOG-Y83t5Da-.js +142 -0
- package/dist/erDiagram-Q2GNP2WA-5CruL17O.cjs +60 -0
- package/dist/erDiagram-Q2GNP2WA-Opu3ARB6.js +841 -0
- package/dist/flowDiagram-NV44I4VS-BbaIeVre.cjs +162 -0
- package/dist/flowDiagram-NV44I4VS-gkAKereJ.js +1620 -0
- package/dist/functional-components/filter-group/filter-builder-types.d.ts +1 -3
- package/dist/functional-components/filter-group/filter-builder-types.d.ts.map +1 -1
- package/dist/functional-components/filter-group/filter-builder.d.ts.map +1 -1
- package/dist/functional-components/helper-tooltip/helper-tooltip-types.d.ts +12 -0
- package/dist/functional-components/helper-tooltip/helper-tooltip-types.d.ts.map +1 -0
- package/dist/functional-components/helper-tooltip/helper-tooltip.d.ts +3 -0
- package/dist/functional-components/helper-tooltip/helper-tooltip.d.ts.map +1 -0
- package/dist/functional-components/label/label-types.d.ts +4 -0
- package/dist/functional-components/label/label-types.d.ts.map +1 -1
- package/dist/functional-components/label/label.d.ts.map +1 -1
- package/dist/ganttDiagram-LVOFAZNH-B2kjhiE2.cjs +267 -0
- package/dist/ganttDiagram-LVOFAZNH-C54h5Bw4.js +2505 -0
- package/dist/gitGraph-ZV4HHKMB-CBEQhdS2.js +5 -0
- package/dist/gitGraph-ZV4HHKMB-DYT2T5uG.cjs +1 -0
- package/dist/gitGraphDiagram-NY62KEGX-Bpi_cePd.cjs +65 -0
- package/dist/gitGraphDiagram-NY62KEGX-S-pRqr3b.js +699 -0
- package/dist/graph-C1g271vn.cjs +1 -0
- package/dist/graph-C_QYlmwV.js +247 -0
- package/dist/hooks/useFloating.d.ts +2 -2
- package/dist/hooks/useFloating.d.ts.map +1 -1
- package/dist/index-CrHtig09.cjs +392 -0
- package/dist/index-DWeebcIQ.js +71429 -0
- package/dist/index.d.ts +40 -16
- package/dist/index.d.ts.map +1 -1
- package/dist/info-63CPKGFF-DFJJ8WM_.js +5 -0
- package/dist/info-63CPKGFF-MtLEvjGU.cjs +1 -0
- package/dist/infoDiagram-F6ZHWCRC-CNRQyhbb.cjs +2 -0
- package/dist/infoDiagram-F6ZHWCRC-DEtOKmNB.js +24 -0
- package/dist/init-CHZsXQcr.cjs +1 -0
- package/dist/init-DjUOC4st.js +16 -0
- package/dist/journeyDiagram-XKPGCS4Q-3ZUFHmst.js +836 -0
- package/dist/journeyDiagram-XKPGCS4Q-gRYnUMxc.cjs +139 -0
- package/dist/kanban-definition-3W4ZIXB7-Bwj4VFdZ.js +719 -0
- package/dist/kanban-definition-3W4ZIXB7-Dt685GXI.cjs +89 -0
- package/dist/katex-C2g-EhzP.cjs +261 -0
- package/dist/katex-CUSbq6rG.js +11692 -0
- package/dist/ketchup2.cjs.js +1 -50
- package/dist/ketchup2.css +1 -1
- package/dist/ketchup2.es.js +27 -7643
- package/dist/layout-Bhv89T5Y.cjs +1 -0
- package/dist/layout-C1uUiR9-.js +1324 -0
- package/dist/linear-CR5ROFQD.cjs +1 -0
- package/dist/linear-DyqA-LhX.js +259 -0
- package/dist/locale/en/translation.json.d.ts +5 -0
- package/dist/locale/it/translation.json.d.ts +5 -0
- package/dist/mermaid-parser.core-DMEz4diY.cjs +128 -0
- package/dist/mermaid-parser.core-_B_M89_-.js +12966 -0
- package/dist/mindmap-definition-VGOIOE7T-DFq8jWcw.cjs +68 -0
- package/dist/mindmap-definition-VGOIOE7T-DoGzqmVl.js +758 -0
- package/dist/ordinal-CagbB1m8.cjs +1 -0
- package/dist/ordinal-DfAQgscy.js +61 -0
- package/dist/packet-HUATNLJX-Dv7JBjbi.js +5 -0
- package/dist/packet-HUATNLJX-wFxM-SlC.cjs +1 -0
- package/dist/pie-WTHONI2E-DZfhIIRd.cjs +1 -0
- package/dist/pie-WTHONI2E-gLd9fr_z.js +5 -0
- package/dist/pieDiagram-ADFJNKIX-K2lT_O-Y.js +161 -0
- package/dist/pieDiagram-ADFJNKIX-hH9aE0Q_.cjs +30 -0
- package/dist/quadrantDiagram-AYHSOK5B-AnaSBQtW.js +1022 -0
- package/dist/quadrantDiagram-AYHSOK5B-DI-PC8V-.cjs +7 -0
- package/dist/radar-NJJJXTRR-BIXqh1MI.cjs +1 -0
- package/dist/radar-NJJJXTRR-rw52LzAi.js +5 -0
- package/dist/requirementDiagram-UZGBJVZJ-BqeKS5M7.cjs +64 -0
- package/dist/requirementDiagram-UZGBJVZJ-CkGm4u8a.js +850 -0
- package/dist/sankeyDiagram-TZEHDZUN-CqdQ5OcU.js +810 -0
- package/dist/sankeyDiagram-TZEHDZUN-RiKKYqxR.cjs +10 -0
- package/dist/sequenceDiagram-WL72ISMW-Bof9txlA.cjs +145 -0
- package/dist/sequenceDiagram-WL72ISMW-CiCppIOZ.js +2511 -0
- package/dist/stateDiagram-FKZM4ZOC-Bb4kdkNA.js +263 -0
- package/dist/stateDiagram-FKZM4ZOC-CtjWXmXj.cjs +1 -0
- package/dist/stateDiagram-v2-4FDKWEC3-B4ibGBn-.js +16 -0
- package/dist/stateDiagram-v2-4FDKWEC3-CbIZTApi.cjs +1 -0
- package/dist/timeline-definition-IT6M3QCI-9g18juq0.js +797 -0
- package/dist/timeline-definition-IT6M3QCI-T3O9mr34.cjs +61 -0
- package/dist/treemap-75Q7IDZK-C3U-LE7s.js +5 -0
- package/dist/treemap-75Q7IDZK-D-aoF_HJ.cjs +1 -0
- package/dist/types/data-structures.d.ts +57 -0
- package/dist/types/data-structures.d.ts.map +1 -1
- package/dist/types/global.d.ts +2 -1
- package/dist/types/global.d.ts.map +1 -1
- package/dist/types/translation.d.ts +4 -1
- package/dist/types/translation.d.ts.map +1 -1
- package/dist/utils/data-structures.d.ts +2 -1
- package/dist/utils/data-structures.d.ts.map +1 -1
- package/dist/utils/wrapper-types/date.d.ts.map +1 -1
- package/dist/xychartDiagram-PRI3JC2R-4n3Pt2Kc.cjs +7 -0
- package/dist/xychartDiagram-PRI3JC2R-CcmXJ1KX.js +1340 -0
- package/package.json +39 -26
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const l=require("./init-CHZsXQcr.cjs");class o extends Map{constructor(n,t=p){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),n!=null)for(const[r,s]of n)this.set(r,s)}get(n){return super.get(c(this,n))}has(n){return super.has(c(this,n))}set(n,t){return super.set(g(this,n),t)}delete(n){return super.delete(h(this,n))}}function c({_intern:e,_key:n},t){const r=n(t);return e.has(r)?e.get(r):t}function g({_intern:e,_key:n},t){const r=n(t);return e.has(r)?e.get(r):(e.set(r,t),t)}function h({_intern:e,_key:n},t){const r=n(t);return e.has(r)&&(t=e.get(r),e.delete(r)),t}function p(e){return e!==null&&typeof e=="object"?e.valueOf():e}const f=Symbol("implicit");function a(){var e=new o,n=[],t=[],r=f;function s(i){let u=e.get(i);if(u===void 0){if(r!==f)return r;e.set(i,u=n.push(i)-1)}return t[u%t.length]}return s.domain=function(i){if(!arguments.length)return n.slice();n=[],e=new o;for(const u of i)e.has(u)||e.set(u,n.push(u)-1);return s},s.range=function(i){return arguments.length?(t=Array.from(i),s):t.slice()},s.unknown=function(i){return arguments.length?(r=i,s):r},s.copy=function(){return a(n,t).unknown(r)},l.initRange.apply(s,arguments),s}exports.ordinal=a;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { i as a } from "./init-DjUOC4st.js";
|
|
2
|
+
class o extends Map {
|
|
3
|
+
constructor(n, t = g) {
|
|
4
|
+
if (super(), Object.defineProperties(this, { _intern: { value: /* @__PURE__ */ new Map() }, _key: { value: t } }), n != null) for (const [r, s] of n) this.set(r, s);
|
|
5
|
+
}
|
|
6
|
+
get(n) {
|
|
7
|
+
return super.get(c(this, n));
|
|
8
|
+
}
|
|
9
|
+
has(n) {
|
|
10
|
+
return super.has(c(this, n));
|
|
11
|
+
}
|
|
12
|
+
set(n, t) {
|
|
13
|
+
return super.set(l(this, n), t);
|
|
14
|
+
}
|
|
15
|
+
delete(n) {
|
|
16
|
+
return super.delete(p(this, n));
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
function c({ _intern: e, _key: n }, t) {
|
|
20
|
+
const r = n(t);
|
|
21
|
+
return e.has(r) ? e.get(r) : t;
|
|
22
|
+
}
|
|
23
|
+
function l({ _intern: e, _key: n }, t) {
|
|
24
|
+
const r = n(t);
|
|
25
|
+
return e.has(r) ? e.get(r) : (e.set(r, t), t);
|
|
26
|
+
}
|
|
27
|
+
function p({ _intern: e, _key: n }, t) {
|
|
28
|
+
const r = n(t);
|
|
29
|
+
return e.has(r) && (t = e.get(r), e.delete(r)), t;
|
|
30
|
+
}
|
|
31
|
+
function g(e) {
|
|
32
|
+
return e !== null && typeof e == "object" ? e.valueOf() : e;
|
|
33
|
+
}
|
|
34
|
+
const f = Symbol("implicit");
|
|
35
|
+
function h() {
|
|
36
|
+
var e = new o(), n = [], t = [], r = f;
|
|
37
|
+
function s(u) {
|
|
38
|
+
let i = e.get(u);
|
|
39
|
+
if (i === void 0) {
|
|
40
|
+
if (r !== f) return r;
|
|
41
|
+
e.set(u, i = n.push(u) - 1);
|
|
42
|
+
}
|
|
43
|
+
return t[i % t.length];
|
|
44
|
+
}
|
|
45
|
+
return s.domain = function(u) {
|
|
46
|
+
if (!arguments.length) return n.slice();
|
|
47
|
+
n = [], e = new o();
|
|
48
|
+
for (const i of u)
|
|
49
|
+
e.has(i) || e.set(i, n.push(i) - 1);
|
|
50
|
+
return s;
|
|
51
|
+
}, s.range = function(u) {
|
|
52
|
+
return arguments.length ? (t = Array.from(u), s) : t.slice();
|
|
53
|
+
}, s.unknown = function(u) {
|
|
54
|
+
return arguments.length ? (r = u, s) : r;
|
|
55
|
+
}, s.copy = function() {
|
|
56
|
+
return h(n, t).unknown(r);
|
|
57
|
+
}, a.apply(s, arguments), s;
|
|
58
|
+
}
|
|
59
|
+
export {
|
|
60
|
+
h as o
|
|
61
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./mermaid-parser.core-DMEz4diY.cjs");exports.PacketModule=e.PacketModule;exports.createPacketServices=e.createPacketServices;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./mermaid-parser.core-DMEz4diY.cjs");exports.PieModule=e.PieModule;exports.createPieServices=e.createPieServices;
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { a8 as S, a3 as F, aI as j, _ as p, g as q, s as H, a as Z, b as J, q as K, p as Q, l as z, c as X, D as Y, H as ee, N as te, e as ae, y as re, F as ne } from "./index-DWeebcIQ.js";
|
|
2
|
+
import { p as ie } from "./chunk-4BX2VUAB-BJZ1vQr9.js";
|
|
3
|
+
import { p as se } from "./mermaid-parser.core-_B_M89_-.js";
|
|
4
|
+
import { d as R } from "./arc-DY9lVoW5.js";
|
|
5
|
+
import { o as le } from "./ordinal-DfAQgscy.js";
|
|
6
|
+
function oe(e, a) {
|
|
7
|
+
return a < e ? -1 : a > e ? 1 : a >= e ? 0 : NaN;
|
|
8
|
+
}
|
|
9
|
+
function ce(e) {
|
|
10
|
+
return e;
|
|
11
|
+
}
|
|
12
|
+
function ue() {
|
|
13
|
+
var e = ce, a = oe, f = null, y = S(0), s = S(F), o = S(0);
|
|
14
|
+
function l(t) {
|
|
15
|
+
var n, c = (t = j(t)).length, d, x, m = 0, u = new Array(c), i = new Array(c), v = +y.apply(this, arguments), w = Math.min(F, Math.max(-F, s.apply(this, arguments) - v)), h, C = Math.min(Math.abs(w) / c, o.apply(this, arguments)), $ = C * (w < 0 ? -1 : 1), g;
|
|
16
|
+
for (n = 0; n < c; ++n)
|
|
17
|
+
(g = i[u[n] = n] = +e(t[n], n, t)) > 0 && (m += g);
|
|
18
|
+
for (a != null ? u.sort(function(A, D) {
|
|
19
|
+
return a(i[A], i[D]);
|
|
20
|
+
}) : f != null && u.sort(function(A, D) {
|
|
21
|
+
return f(t[A], t[D]);
|
|
22
|
+
}), n = 0, x = m ? (w - c * $) / m : 0; n < c; ++n, v = h)
|
|
23
|
+
d = u[n], g = i[d], h = v + (g > 0 ? g * x : 0) + $, i[d] = {
|
|
24
|
+
data: t[d],
|
|
25
|
+
index: n,
|
|
26
|
+
value: g,
|
|
27
|
+
startAngle: v,
|
|
28
|
+
endAngle: h,
|
|
29
|
+
padAngle: C
|
|
30
|
+
};
|
|
31
|
+
return i;
|
|
32
|
+
}
|
|
33
|
+
return l.value = function(t) {
|
|
34
|
+
return arguments.length ? (e = typeof t == "function" ? t : S(+t), l) : e;
|
|
35
|
+
}, l.sortValues = function(t) {
|
|
36
|
+
return arguments.length ? (a = t, f = null, l) : a;
|
|
37
|
+
}, l.sort = function(t) {
|
|
38
|
+
return arguments.length ? (f = t, a = null, l) : f;
|
|
39
|
+
}, l.startAngle = function(t) {
|
|
40
|
+
return arguments.length ? (y = typeof t == "function" ? t : S(+t), l) : y;
|
|
41
|
+
}, l.endAngle = function(t) {
|
|
42
|
+
return arguments.length ? (s = typeof t == "function" ? t : S(+t), l) : s;
|
|
43
|
+
}, l.padAngle = function(t) {
|
|
44
|
+
return arguments.length ? (o = typeof t == "function" ? t : S(+t), l) : o;
|
|
45
|
+
}, l;
|
|
46
|
+
}
|
|
47
|
+
var pe = ne.pie, N = {
|
|
48
|
+
sections: /* @__PURE__ */ new Map(),
|
|
49
|
+
showData: !1
|
|
50
|
+
}, T = N.sections, G = N.showData, de = structuredClone(pe), ge = /* @__PURE__ */ p(() => structuredClone(de), "getConfig"), fe = /* @__PURE__ */ p(() => {
|
|
51
|
+
T = /* @__PURE__ */ new Map(), G = N.showData, re();
|
|
52
|
+
}, "clear"), he = /* @__PURE__ */ p(({ label: e, value: a }) => {
|
|
53
|
+
if (a < 0)
|
|
54
|
+
throw new Error(
|
|
55
|
+
`"${e}" has invalid value: ${a}. Negative values are not allowed in pie charts. All slice values must be >= 0.`
|
|
56
|
+
);
|
|
57
|
+
T.has(e) || (T.set(e, a), z.debug(`added new section: ${e}, with value: ${a}`));
|
|
58
|
+
}, "addSection"), me = /* @__PURE__ */ p(() => T, "getSections"), ve = /* @__PURE__ */ p((e) => {
|
|
59
|
+
G = e;
|
|
60
|
+
}, "setShowData"), Se = /* @__PURE__ */ p(() => G, "getShowData"), L = {
|
|
61
|
+
getConfig: ge,
|
|
62
|
+
clear: fe,
|
|
63
|
+
setDiagramTitle: Q,
|
|
64
|
+
getDiagramTitle: K,
|
|
65
|
+
setAccTitle: J,
|
|
66
|
+
getAccTitle: Z,
|
|
67
|
+
setAccDescription: H,
|
|
68
|
+
getAccDescription: q,
|
|
69
|
+
addSection: he,
|
|
70
|
+
getSections: me,
|
|
71
|
+
setShowData: ve,
|
|
72
|
+
getShowData: Se
|
|
73
|
+
}, ye = /* @__PURE__ */ p((e, a) => {
|
|
74
|
+
ie(e, a), a.setShowData(e.showData), e.sections.map(a.addSection);
|
|
75
|
+
}, "populateDb"), xe = {
|
|
76
|
+
parse: /* @__PURE__ */ p(async (e) => {
|
|
77
|
+
const a = await se("pie", e);
|
|
78
|
+
z.debug(a), ye(a, L);
|
|
79
|
+
}, "parse")
|
|
80
|
+
}, we = /* @__PURE__ */ p((e) => `
|
|
81
|
+
.pieCircle{
|
|
82
|
+
stroke: ${e.pieStrokeColor};
|
|
83
|
+
stroke-width : ${e.pieStrokeWidth};
|
|
84
|
+
opacity : ${e.pieOpacity};
|
|
85
|
+
}
|
|
86
|
+
.pieOuterCircle{
|
|
87
|
+
stroke: ${e.pieOuterStrokeColor};
|
|
88
|
+
stroke-width: ${e.pieOuterStrokeWidth};
|
|
89
|
+
fill: none;
|
|
90
|
+
}
|
|
91
|
+
.pieTitleText {
|
|
92
|
+
text-anchor: middle;
|
|
93
|
+
font-size: ${e.pieTitleTextSize};
|
|
94
|
+
fill: ${e.pieTitleTextColor};
|
|
95
|
+
font-family: ${e.fontFamily};
|
|
96
|
+
}
|
|
97
|
+
.slice {
|
|
98
|
+
font-family: ${e.fontFamily};
|
|
99
|
+
fill: ${e.pieSectionTextColor};
|
|
100
|
+
font-size:${e.pieSectionTextSize};
|
|
101
|
+
// fill: white;
|
|
102
|
+
}
|
|
103
|
+
.legend text {
|
|
104
|
+
fill: ${e.pieLegendTextColor};
|
|
105
|
+
font-family: ${e.fontFamily};
|
|
106
|
+
font-size: ${e.pieLegendTextSize};
|
|
107
|
+
}
|
|
108
|
+
`, "getStyles"), Ae = we, De = /* @__PURE__ */ p((e) => {
|
|
109
|
+
const a = [...e.values()].reduce((s, o) => s + o, 0), f = [...e.entries()].map(([s, o]) => ({ label: s, value: o })).filter((s) => s.value / a * 100 >= 1).sort((s, o) => o.value - s.value);
|
|
110
|
+
return ue().value((s) => s.value)(f);
|
|
111
|
+
}, "createPieArcs"), Ce = /* @__PURE__ */ p((e, a, f, y) => {
|
|
112
|
+
z.debug(`rendering pie chart
|
|
113
|
+
` + e);
|
|
114
|
+
const s = y.db, o = X(), l = Y(s.getConfig(), o.pie), t = 40, n = 18, c = 4, d = 450, x = d, m = ee(a), u = m.append("g");
|
|
115
|
+
u.attr("transform", "translate(" + x / 2 + "," + d / 2 + ")");
|
|
116
|
+
const { themeVariables: i } = o;
|
|
117
|
+
let [v] = te(i.pieOuterStrokeWidth);
|
|
118
|
+
v ??= 2;
|
|
119
|
+
const w = l.textPosition, h = Math.min(x, d) / 2 - t, C = R().innerRadius(0).outerRadius(h), $ = R().innerRadius(h * w).outerRadius(h * w);
|
|
120
|
+
u.append("circle").attr("cx", 0).attr("cy", 0).attr("r", h + v / 2).attr("class", "pieOuterCircle");
|
|
121
|
+
const g = s.getSections(), A = De(g), D = [
|
|
122
|
+
i.pie1,
|
|
123
|
+
i.pie2,
|
|
124
|
+
i.pie3,
|
|
125
|
+
i.pie4,
|
|
126
|
+
i.pie5,
|
|
127
|
+
i.pie6,
|
|
128
|
+
i.pie7,
|
|
129
|
+
i.pie8,
|
|
130
|
+
i.pie9,
|
|
131
|
+
i.pie10,
|
|
132
|
+
i.pie11,
|
|
133
|
+
i.pie12
|
|
134
|
+
];
|
|
135
|
+
let b = 0;
|
|
136
|
+
g.forEach((r) => {
|
|
137
|
+
b += r;
|
|
138
|
+
});
|
|
139
|
+
const W = A.filter((r) => (r.data.value / b * 100).toFixed(0) !== "0"), E = le(D);
|
|
140
|
+
u.selectAll("mySlices").data(W).enter().append("path").attr("d", C).attr("fill", (r) => E(r.data.label)).attr("class", "pieCircle"), u.selectAll("mySlices").data(W).enter().append("text").text((r) => (r.data.value / b * 100).toFixed(0) + "%").attr("transform", (r) => "translate(" + $.centroid(r) + ")").style("text-anchor", "middle").attr("class", "slice"), u.append("text").text(s.getDiagramTitle()).attr("x", 0).attr("y", -400 / 2).attr("class", "pieTitleText");
|
|
141
|
+
const I = [...g.entries()].map(([r, M]) => ({
|
|
142
|
+
label: r,
|
|
143
|
+
value: M
|
|
144
|
+
})), k = u.selectAll(".legend").data(I).enter().append("g").attr("class", "legend").attr("transform", (r, M) => {
|
|
145
|
+
const P = n + c, B = P * I.length / 2, V = 12 * n, U = M * P - B;
|
|
146
|
+
return "translate(" + V + "," + U + ")";
|
|
147
|
+
});
|
|
148
|
+
k.append("rect").attr("width", n).attr("height", n).style("fill", (r) => E(r.label)).style("stroke", (r) => E(r.label)), k.append("text").attr("x", n + c).attr("y", n - c).text((r) => s.getShowData() ? `${r.label} [${r.value}]` : r.label);
|
|
149
|
+
const _ = Math.max(
|
|
150
|
+
...k.selectAll("text").nodes().map((r) => r?.getBoundingClientRect().width ?? 0)
|
|
151
|
+
), O = x + t + n + c + _;
|
|
152
|
+
m.attr("viewBox", `0 0 ${O} ${d}`), ae(m, d, O, l.useMaxWidth);
|
|
153
|
+
}, "draw"), $e = { draw: Ce }, Fe = {
|
|
154
|
+
parser: xe,
|
|
155
|
+
db: L,
|
|
156
|
+
renderer: $e,
|
|
157
|
+
styles: Ae
|
|
158
|
+
};
|
|
159
|
+
export {
|
|
160
|
+
Fe as diagram
|
|
161
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-CrHtig09.cjs"),q=require("./chunk-4BX2VUAB-B_ZYGc02.cjs"),B=require("./mermaid-parser.core-DMEz4diY.cjs"),N=require("./arc-CEU53J5p.cjs"),V=require("./ordinal-CagbB1m8.cjs");function U(e,n){return n<e?-1:n>e?1:n>=e?0:NaN}function j(e){return e}function X(){var e=j,n=U,f=null,S=t.constant(0),s=t.constant(t.tau),c=t.constant(0);function o(a){var i,u=(a=t.array(a)).length,d,y,h=0,g=new Array(u),l=new Array(u),v=+S.apply(this,arguments),A=Math.min(t.tau,Math.max(-t.tau,s.apply(this,arguments)-v)),m,w=Math.min(Math.abs(A)/u,c.apply(this,arguments)),T=w*(A<0?-1:1),p;for(i=0;i<u;++i)(p=l[g[i]=i]=+e(a[i],i,a))>0&&(h+=p);for(n!=null?g.sort(function(x,D){return n(l[x],l[D])}):f!=null&&g.sort(function(x,D){return f(a[x],a[D])}),i=0,y=h?(A-u*T)/h:0;i<u;++i,v=m)d=g[i],p=l[d],m=v+(p>0?p*y:0)+T,l[d]={data:a[d],index:i,value:p,startAngle:v,endAngle:m,padAngle:w};return l}return o.value=function(a){return arguments.length?(e=typeof a=="function"?a:t.constant(+a),o):e},o.sortValues=function(a){return arguments.length?(n=a,f=null,o):n},o.sort=function(a){return arguments.length?(f=a,n=null,o):f},o.startAngle=function(a){return arguments.length?(S=typeof a=="function"?a:t.constant(+a),o):S},o.endAngle=function(a){return arguments.length?(s=typeof a=="function"?a:t.constant(+a),o):s},o.padAngle=function(a){return arguments.length?(c=typeof a=="function"?a:t.constant(+a),o):c},o}var Z=t.defaultConfig_default.pie,E={sections:new Map,showData:!1},_=E.sections,M=E.showData,H=structuredClone(Z),J=t.__name(()=>structuredClone(H),"getConfig"),K=t.__name(()=>{_=new Map,M=E.showData,t.clear()},"clear"),Q=t.__name(({label:e,value:n})=>{if(n<0)throw new Error(`"${e}" has invalid value: ${n}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);_.has(e)||(_.set(e,n),t.log.debug(`added new section: ${e}, with value: ${n}`))},"addSection"),Y=t.__name(()=>_,"getSections"),ee=t.__name(e=>{M=e},"setShowData"),te=t.__name(()=>M,"getShowData"),O={getConfig:J,clear:K,setDiagramTitle:t.setDiagramTitle,getDiagramTitle:t.getDiagramTitle,setAccTitle:t.setAccTitle,getAccTitle:t.getAccTitle,setAccDescription:t.setAccDescription,getAccDescription:t.getAccDescription,addSection:Q,getSections:Y,setShowData:ee,getShowData:te},ae=t.__name((e,n)=>{q.populateCommonDb(e,n),n.setShowData(e.showData),e.sections.map(n.addSection)},"populateDb"),ne={parse:t.__name(async e=>{const n=await B.parse("pie",e);t.log.debug(n),ae(n,O)},"parse")},re=t.__name(e=>`
|
|
2
|
+
.pieCircle{
|
|
3
|
+
stroke: ${e.pieStrokeColor};
|
|
4
|
+
stroke-width : ${e.pieStrokeWidth};
|
|
5
|
+
opacity : ${e.pieOpacity};
|
|
6
|
+
}
|
|
7
|
+
.pieOuterCircle{
|
|
8
|
+
stroke: ${e.pieOuterStrokeColor};
|
|
9
|
+
stroke-width: ${e.pieOuterStrokeWidth};
|
|
10
|
+
fill: none;
|
|
11
|
+
}
|
|
12
|
+
.pieTitleText {
|
|
13
|
+
text-anchor: middle;
|
|
14
|
+
font-size: ${e.pieTitleTextSize};
|
|
15
|
+
fill: ${e.pieTitleTextColor};
|
|
16
|
+
font-family: ${e.fontFamily};
|
|
17
|
+
}
|
|
18
|
+
.slice {
|
|
19
|
+
font-family: ${e.fontFamily};
|
|
20
|
+
fill: ${e.pieSectionTextColor};
|
|
21
|
+
font-size:${e.pieSectionTextSize};
|
|
22
|
+
// fill: white;
|
|
23
|
+
}
|
|
24
|
+
.legend text {
|
|
25
|
+
fill: ${e.pieLegendTextColor};
|
|
26
|
+
font-family: ${e.fontFamily};
|
|
27
|
+
font-size: ${e.pieLegendTextSize};
|
|
28
|
+
}
|
|
29
|
+
`,"getStyles"),ie=re,le=t.__name(e=>{const n=[...e.values()].reduce((s,c)=>s+c,0),f=[...e.entries()].map(([s,c])=>({label:s,value:c})).filter(s=>s.value/n*100>=1).sort((s,c)=>c.value-s.value);return X().value(s=>s.value)(f)},"createPieArcs"),se=t.__name((e,n,f,S)=>{t.log.debug(`rendering pie chart
|
|
30
|
+
`+e);const s=S.db,c=t.getConfig2(),o=t.cleanAndMerge(s.getConfig(),c.pie),a=40,i=18,u=4,d=450,y=d,h=t.selectSvgElement(n),g=h.append("g");g.attr("transform","translate("+y/2+","+d/2+")");const{themeVariables:l}=c;let[v]=t.parseFontSize(l.pieOuterStrokeWidth);v??=2;const A=o.textPosition,m=Math.min(y,d)/2-a,w=N.d3arc().innerRadius(0).outerRadius(m),T=N.d3arc().innerRadius(m*A).outerRadius(m*A);g.append("circle").attr("cx",0).attr("cy",0).attr("r",m+v/2).attr("class","pieOuterCircle");const p=s.getSections(),x=le(p),D=[l.pie1,l.pie2,l.pie3,l.pie4,l.pie5,l.pie6,l.pie7,l.pie8,l.pie9,l.pie10,l.pie11,l.pie12];let C=0;p.forEach(r=>{C+=r});const z=x.filter(r=>(r.data.value/C*100).toFixed(0)!=="0"),$=V.ordinal(D);g.selectAll("mySlices").data(z).enter().append("path").attr("d",w).attr("fill",r=>$(r.data.label)).attr("class","pieCircle"),g.selectAll("mySlices").data(z).enter().append("text").text(r=>(r.data.value/C*100).toFixed(0)+"%").attr("transform",r=>"translate("+T.centroid(r)+")").style("text-anchor","middle").attr("class","slice"),g.append("text").text(s.getDiagramTitle()).attr("x",0).attr("y",-400/2).attr("class","pieTitleText");const F=[...p.entries()].map(([r,k])=>({label:r,value:k})),b=g.selectAll(".legend").data(F).enter().append("g").attr("class","legend").attr("transform",(r,k)=>{const G=i+u,R=G*F.length/2,I=12*i,L=k*G-R;return"translate("+I+","+L+")"});b.append("rect").attr("width",i).attr("height",i).style("fill",r=>$(r.label)).style("stroke",r=>$(r.label)),b.append("text").attr("x",i+u).attr("y",i-u).text(r=>s.getShowData()?`${r.label} [${r.value}]`:r.label);const W=Math.max(...b.selectAll("text").nodes().map(r=>r?.getBoundingClientRect().width??0)),P=y+a+i+u+W;h.attr("viewBox",`0 0 ${P} ${d}`),t.configureSvgSize(h,d,P,o.useMaxWidth)},"draw"),oe={draw:se},ce={parser:ne,db:O,renderer:oe,styles:ie};exports.diagram=ce;
|