@altimateai/ui-components 0.0.77-beta.4 → 0.0.77-beta.6
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/CoachForm.css +1 -1
- package/dist/CoachForm.js +62488 -24049
- package/dist/DbtDocsRenderer.js +1 -1
- package/dist/Stack.js +2826 -2276
- package/dist/Switch.js +128 -87
- package/dist/ToggleGroup.js +5956 -4781
- package/dist/_basePickBy.js +60 -60
- package/dist/_baseUniq.js +152 -152
- package/dist/abap.js +6 -0
- package/dist/actionscript-3.js +6 -0
- package/dist/ada.js +6 -0
- package/dist/andromeeda.js +4 -0
- package/dist/angular-html.js +32 -0
- package/dist/angular-ts.js +21 -0
- package/dist/apache.js +6 -0
- package/dist/apex.js +6 -0
- package/dist/apl.js +16 -0
- package/dist/applescript.js +6 -0
- package/dist/ara.js +6 -0
- package/dist/arc.js +53 -53
- package/dist/architectureDiagram-VXUJARFQ.js +480 -4315
- package/dist/architectureDiagram-VXUJARFQ2.js +831 -0
- package/dist/asciidoc.js +6 -0
- package/dist/asm.js +6 -0
- package/dist/assets/icons/index.js +1 -1
- package/dist/astro.js +18 -0
- package/dist/aurora-x.js +4 -0
- package/dist/awk.js +6 -0
- package/dist/ayu-dark.js +4 -0
- package/dist/ballerina.js +6 -0
- package/dist/band.js +46 -0
- package/dist/bat.js +6 -0
- package/dist/beancount.js +6 -0
- package/dist/berry.js +6 -0
- package/dist/bibtex.js +6 -0
- package/dist/bicep.js +6 -0
- package/dist/blade.js +20 -0
- package/dist/blockDiagram-VD42YOAC.js +1 -1
- package/dist/blockDiagram-VD42YOAC2.js +2266 -0
- package/dist/bsl.js +8 -0
- package/dist/c.js +6 -0
- package/dist/c3.js +6 -0
- package/dist/c4Diagram-YG6GDRKO.js +22 -22
- package/dist/c4Diagram-YG6GDRKO2.js +1582 -0
- package/dist/cadence.js +6 -0
- package/dist/cairo.js +8 -0
- package/dist/catppuccin-frappe.js +4 -0
- package/dist/catppuccin-latte.js +4 -0
- package/dist/catppuccin-macchiato.js +4 -0
- package/dist/catppuccin-mocha.js +4 -0
- package/dist/channel.js +2 -2
- package/dist/chatbotV2/index.d.ts +57 -19
- package/dist/chatbotV2/index.js +120 -56
- package/dist/chunk-4BX2VUAB.js +1 -1
- package/dist/chunk-4BX2VUAB2.js +9 -0
- package/dist/chunk-55IACEB6.js +2 -2
- package/dist/chunk-55IACEB62.js +9 -0
- package/dist/chunk-B4BG7PRW.js +1 -1
- package/dist/chunk-B4BG7PRW2.js +1377 -0
- package/dist/chunk-DI55MBZ5.js +14 -14
- package/dist/chunk-DI55MBZ52.js +1382 -0
- package/dist/chunk-FMBD7UC4.js +1 -1
- package/dist/chunk-FMBD7UC42.js +19 -0
- package/dist/chunk-QN33PNHL.js +5 -5
- package/dist/chunk-QN33PNHL2.js +20 -0
- package/dist/chunk-QZHKN3VN.js +1 -1
- package/dist/chunk-QZHKN3VN2.js +15 -0
- package/dist/chunk-TZMSLE5B.js +1 -1
- package/dist/chunk-TZMSLE5B2.js +64 -0
- package/dist/clarity.js +6 -0
- package/dist/classDiagram-2ON5EDUG.js +1 -1
- package/dist/classDiagram-2ON5EDUG2.js +17 -0
- package/dist/classDiagram-v2-WZHVMYZB.js +1 -1
- package/dist/classDiagram-v2-WZHVMYZB2.js +17 -0
- package/dist/clojure.js +6 -0
- package/dist/cmake.js +6 -0
- package/dist/cobol.js +10 -0
- package/dist/code-block-37QAKDTI.js +27 -0
- package/dist/codeowners.js +6 -0
- package/dist/codeql.js +6 -0
- package/dist/coffee.js +8 -0
- package/dist/common-lisp.js +6 -0
- package/dist/coq.js +6 -0
- package/dist/cose-bilkent-S5V4N54A.js +160 -2535
- package/dist/cose-bilkent-S5V4N54A2.js +231 -0
- package/dist/cpp.js +18 -0
- package/dist/crystal.js +18 -0
- package/dist/csharp.js +6 -0
- package/dist/css.js +6 -0
- package/dist/csv.js +6 -0
- package/dist/cue.js +6 -0
- package/dist/cypher.js +6 -0
- package/dist/cytoscape-cose-bilkent.js +2380 -0
- package/dist/cytoscape-fcose.js +3840 -0
- package/dist/d.js +6 -0
- package/dist/dagre-6UL2VRFP.js +44 -44
- package/dist/dagre-6UL2VRFP2.js +447 -0
- package/dist/dark-plus.js +4 -0
- package/dist/dart.js +6 -0
- package/dist/dax.js +6 -0
- package/dist/dayjs.min.js +2 -2
- package/dist/defaultLocale.js +3 -3
- package/dist/desktop.js +6 -0
- package/dist/diagram-PSM6KHXK.js +198 -414
- package/dist/diagram-PSM6KHXK2.js +319 -0
- package/dist/diagram-QEK2KX5R.js +26 -26
- package/dist/diagram-QEK2KX5R2.js +221 -0
- package/dist/diagram-S2PKOQOG.js +12 -12
- package/dist/diagram-S2PKOQOG2.js +143 -0
- package/dist/diff.js +6 -0
- package/dist/docker.js +6 -0
- package/dist/dotenv.js +6 -0
- package/dist/dracula-soft.js +4 -0
- package/dist/dracula.js +4 -0
- package/dist/dream-maker.js +6 -0
- package/dist/edge.js +12 -0
- package/dist/elixir.js +8 -0
- package/dist/elm.js +8 -0
- package/dist/emacs-lisp.js +6 -0
- package/dist/erDiagram-Q2GNP2WA.js +1 -1
- package/dist/erDiagram-Q2GNP2WA2.js +843 -0
- package/dist/erb.js +10 -0
- package/dist/erlang.js +8 -0
- package/dist/everforest-dark.js +4 -0
- package/dist/everforest-light.js +4 -0
- package/dist/fennel.js +6 -0
- package/dist/fish.js +6 -0
- package/dist/flowDiagram-NV44I4VS.js +6 -6
- package/dist/flowDiagram-NV44I4VS2.js +1628 -0
- package/dist/fluent.js +6 -0
- package/dist/fortran-fixed-form.js +8 -0
- package/dist/fortran-free-form.js +6 -0
- package/dist/fsharp.js +8 -0
- package/dist/ganttDiagram-JELNMOA3.js +1788 -0
- package/dist/ganttDiagram-LVOFAZNH.js +843 -1718
- package/dist/gdresource.js +10 -0
- package/dist/gdscript.js +6 -0
- package/dist/gdshader.js +6 -0
- package/dist/genie.js +6 -0
- package/dist/gherkin.js +6 -0
- package/dist/git-commit.js +8 -0
- package/dist/git-rebase.js +8 -0
- package/dist/gitGraphDiagram-NY62KEGX.js +13 -13
- package/dist/gitGraphDiagram-NY62KEGX2.js +713 -0
- package/dist/github-dark-default.js +4 -0
- package/dist/github-dark-dimmed.js +4 -0
- package/dist/github-dark-high-contrast.js +4 -0
- package/dist/github-dark.js +4 -0
- package/dist/github-light-default.js +4 -0
- package/dist/github-light-high-contrast.js +4 -0
- package/dist/github-light.js +4 -0
- package/dist/gleam.js +6 -0
- package/dist/glimmer-js.js +14 -0
- package/dist/glimmer-ts.js +14 -0
- package/dist/glsl.js +8 -0
- package/dist/gn.js +6 -0
- package/dist/gnuplot.js +6 -0
- package/dist/go.js +6 -0
- package/dist/graph.js +17 -18
- package/dist/graph2.js +246 -0
- package/dist/graphql.js +14 -0
- package/dist/groovy.js +6 -0
- package/dist/gruvbox-dark-hard.js +4 -0
- package/dist/gruvbox-dark-medium.js +4 -0
- package/dist/gruvbox-dark-soft.js +4 -0
- package/dist/gruvbox-light-hard.js +4 -0
- package/dist/gruvbox-light-medium.js +4 -0
- package/dist/gruvbox-light-soft.js +4 -0
- package/dist/hack.js +10 -0
- package/dist/haml.js +10 -0
- package/dist/handlebars.js +14 -0
- package/dist/haskell.js +6 -0
- package/dist/haxe.js +6 -0
- package/dist/hcl.js +6 -0
- package/dist/hjson.js +6 -0
- package/dist/hlsl.js +6 -0
- package/dist/houston.js +4 -0
- package/dist/html-derivative.js +8 -0
- package/dist/html.js +10 -0
- package/dist/http.js +14 -0
- package/dist/hurl.js +12 -0
- package/dist/hxml.js +8 -0
- package/dist/hy.js +6 -0
- package/dist/imba.js +6 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +37 -37
- package/dist/index2.js +216 -684
- package/dist/index3.js +689 -0
- package/dist/infoDiagram-F6ZHWCRC.js +14 -14
- package/dist/infoDiagram-WHAUD3N6.js +24 -0
- package/dist/ini.js +6 -0
- package/dist/java.js +6 -0
- package/dist/javascript.js +6 -0
- package/dist/jinja.js +11 -0
- package/dist/jison.js +8 -0
- package/dist/journeyDiagram-XKPGCS4Q.js +1 -1
- package/dist/journeyDiagram-XKPGCS4Q2.js +837 -0
- package/dist/json.js +6 -0
- package/dist/json5.js +6 -0
- package/dist/jsonc.js +6 -0
- package/dist/jsonl.js +6 -0
- package/dist/jsonnet.js +6 -0
- package/dist/jssm.js +6 -0
- package/dist/jsx.js +6 -0
- package/dist/julia.js +16 -0
- package/dist/kanagawa-dragon.js +4 -0
- package/dist/kanagawa-lotus.js +4 -0
- package/dist/kanagawa-wave.js +4 -0
- package/dist/kanban-definition-3W4ZIXB7.js +42 -42
- package/dist/kanban-definition-3W4ZIXB72.js +720 -0
- package/dist/katex2.js +11691 -0
- package/dist/kdl.js +6 -0
- package/dist/kotlin.js +6 -0
- package/dist/kusto.js +6 -0
- package/dist/laserwave.js +4 -0
- package/dist/latex.js +8 -0
- package/dist/layout.js +567 -678
- package/dist/layout2.js +1224 -0
- package/dist/lean.js +6 -0
- package/dist/less.js +6 -0
- package/dist/light-plus.js +4 -0
- package/dist/lineage/index.js +1234 -1241
- package/dist/linear.js +1 -1
- package/dist/liquid.js +14 -0
- package/dist/llvm.js +6 -0
- package/dist/log.js +6 -0
- package/dist/logo.js +6 -0
- package/dist/lua.js +8 -0
- package/dist/luau.js +6 -0
- package/dist/main.css +1 -1
- package/dist/main.js +82 -82
- package/dist/make.js +6 -0
- package/dist/markdown.js +6 -0
- package/dist/marko.js +14 -0
- package/dist/material-theme-darker.js +4 -0
- package/dist/material-theme-lighter.js +4 -0
- package/dist/material-theme-ocean.js +4 -0
- package/dist/material-theme-palenight.js +4 -0
- package/dist/material-theme.js +4 -0
- package/dist/matlab.js +6 -0
- package/dist/mdc.js +12 -0
- package/dist/mdx.js +6 -0
- package/dist/mermaid-4DMBBIKO.js +4 -0
- package/dist/mermaid-parser.core.js +155 -155
- package/dist/mermaid.js +6 -0
- package/dist/min-dark.js +4 -0
- package/dist/min-light.js +4 -0
- package/dist/mindmap-definition-VGOIOE7T.js +28 -28
- package/dist/mindmap-definition-VGOIOE7T2.js +786 -0
- package/dist/mipsasm.js +6 -0
- package/dist/mojo.js +6 -0
- package/dist/monokai.js +4 -0
- package/dist/moonbit.js +6 -0
- package/dist/move.js +6 -0
- package/dist/narrat.js +6 -0
- package/dist/nextflow.js +6 -0
- package/dist/nginx.js +8 -0
- package/dist/night-owl.js +4 -0
- package/dist/nim.js +20 -0
- package/dist/nix.js +9 -0
- package/dist/nord.js +4 -0
- package/dist/nushell.js +6 -0
- package/dist/objective-c.js +6 -0
- package/dist/objective-cpp.js +6 -0
- package/dist/ocaml.js +6 -0
- package/dist/one-dark-pro.js +4 -0
- package/dist/one-light.js +4 -0
- package/dist/openscad.js +6 -0
- package/dist/pascal.js +6 -0
- package/dist/perl.js +16 -0
- package/dist/php.js +18 -0
- package/dist/pie.js +45 -0
- package/dist/pieDiagram-ADFJNKIX.js +68 -108
- package/dist/pieDiagram-ADFJNKIX2.js +123 -0
- package/dist/pkl.js +6 -0
- package/dist/plastic.js +4 -0
- package/dist/plsql.js +6 -0
- package/dist/po.js +6 -0
- package/dist/poimandres.js +4 -0
- package/dist/polar.js +6 -0
- package/dist/postcss.js +6 -0
- package/dist/powerquery.js +6 -0
- package/dist/powershell.js +6 -0
- package/dist/prisma.js +6 -0
- package/dist/prolog.js +6 -0
- package/dist/proto.js +6 -0
- package/dist/pug.js +12 -0
- package/dist/puppet.js +6 -0
- package/dist/purescript.js +6 -0
- package/dist/python.js +6 -0
- package/dist/qml.js +8 -0
- package/dist/qmldir.js +6 -0
- package/dist/qss.js +6 -0
- package/dist/quadrantDiagram-AYHSOK5B.js +1 -1
- package/dist/quadrantDiagram-AYHSOK5B2.js +1025 -0
- package/dist/r.js +6 -0
- package/dist/racket.js +6 -0
- package/dist/raku.js +6 -0
- package/dist/razor.js +10 -0
- package/dist/red.js +4 -0
- package/dist/redux-toolkit.modern.js +563 -555
- package/dist/reg.js +6 -0
- package/dist/regexp.js +6 -0
- package/dist/rel.js +6 -0
- package/dist/requirementDiagram-UZGBJVZJ.js +14 -14
- package/dist/requirementDiagram-UZGBJVZJ2.js +852 -0
- package/dist/riscv.js +6 -0
- package/dist/rose-pine-dawn.js +4 -0
- package/dist/rose-pine-moon.js +4 -0
- package/dist/rose-pine.js +4 -0
- package/dist/rosmsg.js +6 -0
- package/dist/rst.js +22 -0
- package/dist/ruby.js +30 -0
- package/dist/rust.js +6 -0
- package/dist/sankeyDiagram-TZEHDZUN.js +229 -622
- package/dist/sankeyDiagram-TZEHDZUN2.js +418 -0
- package/dist/sankeyLinkHorizontal.js +403 -0
- package/dist/sas.js +8 -0
- package/dist/sass.js +6 -0
- package/dist/scala.js +6 -0
- package/dist/scheme.js +6 -0
- package/dist/scss.js +8 -0
- package/dist/sdbl.js +6 -0
- package/dist/sequenceDiagram-WL72ISMW.js +1 -1
- package/dist/sequenceDiagram-WL72ISMW2.js +2523 -0
- package/dist/shadcn/index.d.ts +24 -40
- package/dist/shadcn/index.js +7330 -5516
- package/dist/shaderlab.js +8 -0
- package/dist/shellscript.js +6 -0
- package/dist/shellsession.js +8 -0
- package/dist/slack-dark.js +4 -0
- package/dist/slack-ochin.js +4 -0
- package/dist/smalltalk.js +6 -0
- package/dist/snazzy-light.js +4 -0
- package/dist/solarized-dark.js +4 -0
- package/dist/solarized-light.js +4 -0
- package/dist/solidity.js +6 -0
- package/dist/soy.js +8 -0
- package/dist/sparql.js +8 -0
- package/dist/splunk.js +6 -0
- package/dist/sql.js +6 -0
- package/dist/ssh-config.js +6 -0
- package/dist/stata.js +8 -0
- package/dist/stateDiagram-FKZM4ZOC.js +33 -33
- package/dist/stateDiagram-FKZM4ZOC2.js +264 -0
- package/dist/stateDiagram-v2-4FDKWEC3.js +6 -6
- package/dist/stateDiagram-v2-4FDKWEC32.js +17 -0
- package/dist/storybook/Typography.stories.tsx +93 -120
- package/dist/stylus.js +6 -0
- package/dist/svelte.js +14 -0
- package/dist/swift.js +6 -0
- package/dist/synthwave-84.js +4 -0
- package/dist/system-verilog.js +6 -0
- package/dist/systemd.js +6 -0
- package/dist/talonscript.js +6 -0
- package/dist/tasl.js +6 -0
- package/dist/tcl.js +6 -0
- package/dist/templ.js +12 -0
- package/dist/terraform.js +6 -0
- package/dist/tex.js +8 -0
- package/dist/time.js +900 -0
- package/dist/timeline-definition-IT6M3QCI.js +63 -63
- package/dist/timeline-definition-IT6M3QCI2.js +802 -0
- package/dist/tokyo-night.js +4 -0
- package/dist/toml.js +6 -0
- package/dist/ts-tags.js +41 -0
- package/dist/tsv.js +6 -0
- package/dist/tsx.js +6 -0
- package/dist/turtle.js +6 -0
- package/dist/twig.js +18 -0
- package/dist/{types-ByRPUpXR.d.ts → types-BZH4Xw79.d.ts} +1 -1
- package/dist/typescript.js +6 -0
- package/dist/typespec.js +6 -0
- package/dist/typst.js +6 -0
- package/dist/union.js +8 -0
- package/dist/v.js +6 -0
- package/dist/vala.js +6 -0
- package/dist/vb.js +6 -0
- package/dist/verilog.js +6 -0
- package/dist/vesper.js +4 -0
- package/dist/vhdl.js +6 -0
- package/dist/viml.js +6 -0
- package/dist/vitesse-black.js +4 -0
- package/dist/vitesse-dark.js +4 -0
- package/dist/vitesse-light.js +4 -0
- package/dist/vue-html.js +8 -0
- package/dist/vue-vine.js +18 -0
- package/dist/vue.js +31 -0
- package/dist/vyper.js +6 -0
- package/dist/wasm.js +6 -0
- package/dist/wasm2.js +7 -0
- package/dist/wenyan.js +6 -0
- package/dist/wgsl.js +6 -0
- package/dist/wikitext.js +6 -0
- package/dist/wit.js +6 -0
- package/dist/wolfram.js +6 -0
- package/dist/xml.js +8 -0
- package/dist/xsl.js +8 -0
- package/dist/xychartDiagram-PRI3JC2R.js +449 -491
- package/dist/xychartDiagram-PRI3JC2R2.js +1299 -0
- package/dist/yaml.js +6 -0
- package/dist/zenscript.js +6 -0
- package/dist/zig.js +6 -0
- package/dist/zipObject.js +128 -0
- package/package.json +1 -1
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
import { aI as ne, aJ as oe, aV as ie, aW as ce, aK as pe, aL as de, aG as h, b8 as J, b7 as K, bC as he, b0 as ue, b6 as me, aS as I, bb as fe, aT as ye, bD as L } from "./CoachForm.js";
|
|
2
|
+
import { s as ge } from "./chunk-QN33PNHL2.js";
|
|
3
|
+
import { p as Se } from "./chunk-4BX2VUAB2.js";
|
|
4
|
+
import { p as xe } from "./mermaid-parser.core.js";
|
|
5
|
+
import { s as _ } from "./redux-toolkit.modern.js";
|
|
6
|
+
import { o as B } from "./ordinal.js";
|
|
7
|
+
import { h as be, t as ve } from "./index2.js";
|
|
8
|
+
import { f as P } from "./defaultLocale.js";
|
|
9
|
+
var F, U = (F = class {
|
|
10
|
+
constructor() {
|
|
11
|
+
this.nodes = [], this.levels = /* @__PURE__ */ new Map(), this.outerNodes = [], this.classes = /* @__PURE__ */ new Map(), this.setAccTitle = ne, this.getAccTitle = oe, this.setDiagramTitle = ie, this.getDiagramTitle = ce, this.getAccDescription = pe, this.setAccDescription = de;
|
|
12
|
+
}
|
|
13
|
+
getNodes() {
|
|
14
|
+
return this.nodes;
|
|
15
|
+
}
|
|
16
|
+
getConfig() {
|
|
17
|
+
const a = me, o = J();
|
|
18
|
+
return K({
|
|
19
|
+
...a.treemap,
|
|
20
|
+
...o.treemap ?? {}
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
addNode(a, o) {
|
|
24
|
+
this.nodes.push(a), this.levels.set(a, o), o === 0 && (this.outerNodes.push(a), this.root ?? (this.root = a));
|
|
25
|
+
}
|
|
26
|
+
getRoot() {
|
|
27
|
+
return { name: "", children: this.outerNodes };
|
|
28
|
+
}
|
|
29
|
+
addClass(a, o) {
|
|
30
|
+
const s = this.classes.get(a) ?? { id: a, styles: [], textStyles: [] }, c = o.replace(/\\,/g, "§§§").replace(/,/g, ";").replace(/§§§/g, ",").split(";");
|
|
31
|
+
c && c.forEach((r) => {
|
|
32
|
+
he(r) && (s != null && s.textStyles ? s.textStyles.push(r) : s.textStyles = [r]), s != null && s.styles ? s.styles.push(r) : s.styles = [r];
|
|
33
|
+
}), this.classes.set(a, s);
|
|
34
|
+
}
|
|
35
|
+
getClasses() {
|
|
36
|
+
return this.classes;
|
|
37
|
+
}
|
|
38
|
+
getStylesForClass(a) {
|
|
39
|
+
var o;
|
|
40
|
+
return ((o = this.classes.get(a)) == null ? void 0 : o.styles) ?? [];
|
|
41
|
+
}
|
|
42
|
+
clear() {
|
|
43
|
+
ue(), this.nodes = [], this.levels = /* @__PURE__ */ new Map(), this.outerNodes = [], this.classes = /* @__PURE__ */ new Map(), this.root = void 0;
|
|
44
|
+
}
|
|
45
|
+
}, h(F, "TreeMapDB"), F);
|
|
46
|
+
function q(p) {
|
|
47
|
+
if (!p.length)
|
|
48
|
+
return [];
|
|
49
|
+
const a = [], o = [];
|
|
50
|
+
return p.forEach((s) => {
|
|
51
|
+
const c = {
|
|
52
|
+
name: s.name,
|
|
53
|
+
children: s.type === "Leaf" ? void 0 : []
|
|
54
|
+
};
|
|
55
|
+
for (c.classSelector = s == null ? void 0 : s.classSelector, s != null && s.cssCompiledStyles && (c.cssCompiledStyles = [s.cssCompiledStyles]), s.type === "Leaf" && s.value !== void 0 && (c.value = s.value); o.length > 0 && o[o.length - 1].level >= s.level; )
|
|
56
|
+
o.pop();
|
|
57
|
+
if (o.length === 0)
|
|
58
|
+
a.push(c);
|
|
59
|
+
else {
|
|
60
|
+
const r = o[o.length - 1].node;
|
|
61
|
+
r.children ? r.children.push(c) : r.children = [c];
|
|
62
|
+
}
|
|
63
|
+
s.type !== "Leaf" && o.push({ node: c, level: s.level });
|
|
64
|
+
}), a;
|
|
65
|
+
}
|
|
66
|
+
h(q, "buildHierarchy");
|
|
67
|
+
var Ce = /* @__PURE__ */ h((p, a) => {
|
|
68
|
+
Se(p, a);
|
|
69
|
+
const o = [];
|
|
70
|
+
for (const r of p.TreemapRows ?? [])
|
|
71
|
+
r.$type === "ClassDefStatement" && a.addClass(r.className ?? "", r.styleText ?? "");
|
|
72
|
+
for (const r of p.TreemapRows ?? []) {
|
|
73
|
+
const d = r.item;
|
|
74
|
+
if (!d)
|
|
75
|
+
continue;
|
|
76
|
+
const f = r.indent ? parseInt(r.indent) : 0, M = we(d), l = d.classSelector ? a.getStylesForClass(d.classSelector) : [], z = l.length > 0 ? l.join(";") : void 0, b = {
|
|
77
|
+
level: f,
|
|
78
|
+
name: M,
|
|
79
|
+
type: d.$type,
|
|
80
|
+
value: d.value,
|
|
81
|
+
classSelector: d.classSelector,
|
|
82
|
+
cssCompiledStyles: z
|
|
83
|
+
};
|
|
84
|
+
o.push(b);
|
|
85
|
+
}
|
|
86
|
+
const s = q(o), c = /* @__PURE__ */ h((r, d) => {
|
|
87
|
+
for (const f of r)
|
|
88
|
+
a.addNode(f, d), f.children && f.children.length > 0 && c(f.children, d + 1);
|
|
89
|
+
}, "addNodesRecursively");
|
|
90
|
+
c(s, 0);
|
|
91
|
+
}, "populate"), we = /* @__PURE__ */ h((p) => p.name ? String(p.name) : "", "getItemName"), Q = {
|
|
92
|
+
// @ts-expect-error - TreeMapDB is not assignable to DiagramDB
|
|
93
|
+
parser: { yy: void 0 },
|
|
94
|
+
parse: /* @__PURE__ */ h(async (p) => {
|
|
95
|
+
var a;
|
|
96
|
+
try {
|
|
97
|
+
const s = await xe("treemap", p);
|
|
98
|
+
I.debug("Treemap AST:", s);
|
|
99
|
+
const c = (a = Q.parser) == null ? void 0 : a.yy;
|
|
100
|
+
if (!(c instanceof U))
|
|
101
|
+
throw new Error(
|
|
102
|
+
"parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues."
|
|
103
|
+
);
|
|
104
|
+
Ce(s, c);
|
|
105
|
+
} catch (o) {
|
|
106
|
+
throw I.error("Error parsing treemap:", o), o;
|
|
107
|
+
}
|
|
108
|
+
}, "parse")
|
|
109
|
+
}, Te = 10, $ = 10, V = 25, Le = /* @__PURE__ */ h((p, a, o, s) => {
|
|
110
|
+
const c = s.db, r = c.getConfig(), d = r.padding ?? Te, f = c.getDiagramTitle(), M = c.getRoot(), { themeVariables: l } = J();
|
|
111
|
+
if (!M)
|
|
112
|
+
return;
|
|
113
|
+
const z = f ? 30 : 0, b = fe(a), G = r.nodeWidth ? r.nodeWidth * $ : 960, O = r.nodeHeight ? r.nodeHeight * $ : 500, H = G, X = O + z;
|
|
114
|
+
b.attr("viewBox", `0 0 ${H} ${X}`), ye(b, X, H, r.useMaxWidth);
|
|
115
|
+
let v;
|
|
116
|
+
try {
|
|
117
|
+
const e = r.valueFormat || ",";
|
|
118
|
+
if (e === "$0,0")
|
|
119
|
+
v = /* @__PURE__ */ h((t) => "$" + P(",")(t), "valueFormat");
|
|
120
|
+
else if (e.startsWith("$") && e.includes(",")) {
|
|
121
|
+
const t = /\.\d+/.exec(e), n = t ? t[0] : "";
|
|
122
|
+
v = /* @__PURE__ */ h((u) => "$" + P("," + n)(u), "valueFormat");
|
|
123
|
+
} else if (e.startsWith("$")) {
|
|
124
|
+
const t = e.substring(1);
|
|
125
|
+
v = /* @__PURE__ */ h((n) => "$" + P(t || "")(n), "valueFormat");
|
|
126
|
+
} else
|
|
127
|
+
v = P(e);
|
|
128
|
+
} catch (e) {
|
|
129
|
+
I.error("Error creating format function:", e), v = P(",");
|
|
130
|
+
}
|
|
131
|
+
const N = B().range([
|
|
132
|
+
"transparent",
|
|
133
|
+
l.cScale0,
|
|
134
|
+
l.cScale1,
|
|
135
|
+
l.cScale2,
|
|
136
|
+
l.cScale3,
|
|
137
|
+
l.cScale4,
|
|
138
|
+
l.cScale5,
|
|
139
|
+
l.cScale6,
|
|
140
|
+
l.cScale7,
|
|
141
|
+
l.cScale8,
|
|
142
|
+
l.cScale9,
|
|
143
|
+
l.cScale10,
|
|
144
|
+
l.cScale11
|
|
145
|
+
]), Z = B().range([
|
|
146
|
+
"transparent",
|
|
147
|
+
l.cScalePeer0,
|
|
148
|
+
l.cScalePeer1,
|
|
149
|
+
l.cScalePeer2,
|
|
150
|
+
l.cScalePeer3,
|
|
151
|
+
l.cScalePeer4,
|
|
152
|
+
l.cScalePeer5,
|
|
153
|
+
l.cScalePeer6,
|
|
154
|
+
l.cScalePeer7,
|
|
155
|
+
l.cScalePeer8,
|
|
156
|
+
l.cScalePeer9,
|
|
157
|
+
l.cScalePeer10,
|
|
158
|
+
l.cScalePeer11
|
|
159
|
+
]), W = B().range([
|
|
160
|
+
l.cScaleLabel0,
|
|
161
|
+
l.cScaleLabel1,
|
|
162
|
+
l.cScaleLabel2,
|
|
163
|
+
l.cScaleLabel3,
|
|
164
|
+
l.cScaleLabel4,
|
|
165
|
+
l.cScaleLabel5,
|
|
166
|
+
l.cScaleLabel6,
|
|
167
|
+
l.cScaleLabel7,
|
|
168
|
+
l.cScaleLabel8,
|
|
169
|
+
l.cScaleLabel9,
|
|
170
|
+
l.cScaleLabel10,
|
|
171
|
+
l.cScaleLabel11
|
|
172
|
+
]);
|
|
173
|
+
f && b.append("text").attr("x", H / 2).attr("y", z / 2).attr("class", "treemapTitle").attr("text-anchor", "middle").attr("dominant-baseline", "middle").text(f);
|
|
174
|
+
const Y = b.append("g").attr("transform", `translate(0, ${z})`).attr("class", "treemapContainer"), ee = be(M).sum((e) => e.value ?? 0).sort((e, t) => (t.value ?? 0) - (e.value ?? 0)), j = ve().size([G, O]).paddingTop(
|
|
175
|
+
(e) => e.children && e.children.length > 0 ? V + $ : 0
|
|
176
|
+
).paddingInner(d).paddingLeft((e) => e.children && e.children.length > 0 ? $ : 0).paddingRight((e) => e.children && e.children.length > 0 ? $ : 0).paddingBottom((e) => e.children && e.children.length > 0 ? $ : 0).round(!0)(ee), te = j.descendants().filter((e) => e.children && e.children.length > 0), A = Y.selectAll(".treemapSection").data(te).enter().append("g").attr("class", "treemapSection").attr("transform", (e) => `translate(${e.x0},${e.y0})`);
|
|
177
|
+
A.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", V).attr("class", "treemapSectionHeader").attr("fill", "none").attr("fill-opacity", 0.6).attr("stroke-width", 0.6).attr("style", (e) => e.depth === 0 ? "display: none;" : ""), A.append("clipPath").attr("id", (e, t) => `clip-section-${a}-${t}`).append("rect").attr("width", (e) => Math.max(0, e.x1 - e.x0 - 12)).attr("height", V), A.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", (e) => e.y1 - e.y0).attr("class", (e, t) => `treemapSection section${t}`).attr("fill", (e) => N(e.data.name)).attr("fill-opacity", 0.6).attr("stroke", (e) => Z(e.data.name)).attr("stroke-width", 2).attr("stroke-opacity", 0.4).attr("style", (e) => {
|
|
178
|
+
if (e.depth === 0)
|
|
179
|
+
return "display: none;";
|
|
180
|
+
const t = L({ cssCompiledStyles: e.data.cssCompiledStyles });
|
|
181
|
+
return t.nodeStyles + ";" + t.borderStyles.join(";");
|
|
182
|
+
}), A.append("text").attr("class", "treemapSectionLabel").attr("x", 6).attr("y", V / 2).attr("dominant-baseline", "middle").text((e) => e.depth === 0 ? "" : e.data.name).attr("font-weight", "bold").attr("style", (e) => {
|
|
183
|
+
if (e.depth === 0)
|
|
184
|
+
return "display: none;";
|
|
185
|
+
const t = "dominant-baseline: middle; font-size: 12px; fill:" + W(e.data.name) + "; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;", n = L({ cssCompiledStyles: e.data.cssCompiledStyles });
|
|
186
|
+
return t + n.labelStyles.replace("color:", "fill:");
|
|
187
|
+
}).each(function(e) {
|
|
188
|
+
if (e.depth === 0)
|
|
189
|
+
return;
|
|
190
|
+
const t = _(this), n = e.data.name;
|
|
191
|
+
t.text(n);
|
|
192
|
+
const u = e.x1 - e.x0, g = 6;
|
|
193
|
+
let S;
|
|
194
|
+
r.showValues !== !1 && e.value ? S = u - 10 - 30 - 10 - g : S = u - g - 6;
|
|
195
|
+
const x = Math.max(15, S), i = t.node();
|
|
196
|
+
if (i.getComputedTextLength() > x) {
|
|
197
|
+
const m = "...";
|
|
198
|
+
let y = n;
|
|
199
|
+
for (; y.length > 0; ) {
|
|
200
|
+
if (y = n.substring(0, y.length - 1), y.length === 0) {
|
|
201
|
+
t.text(m), i.getComputedTextLength() > x && t.text("");
|
|
202
|
+
break;
|
|
203
|
+
}
|
|
204
|
+
if (t.text(y + m), i.getComputedTextLength() <= x)
|
|
205
|
+
break;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}), r.showValues !== !1 && A.append("text").attr("class", "treemapSectionValue").attr("x", (e) => e.x1 - e.x0 - 10).attr("y", V / 2).attr("text-anchor", "end").attr("dominant-baseline", "middle").text((e) => e.value ? v(e.value) : "").attr("font-style", "italic").attr("style", (e) => {
|
|
209
|
+
if (e.depth === 0)
|
|
210
|
+
return "display: none;";
|
|
211
|
+
const t = "text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:" + W(e.data.name) + "; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;", n = L({ cssCompiledStyles: e.data.cssCompiledStyles });
|
|
212
|
+
return t + n.labelStyles.replace("color:", "fill:");
|
|
213
|
+
});
|
|
214
|
+
const ae = j.leaves(), E = Y.selectAll(".treemapLeafGroup").data(ae).enter().append("g").attr("class", (e, t) => `treemapNode treemapLeafGroup leaf${t}${e.data.classSelector ? ` ${e.data.classSelector}` : ""}x`).attr("transform", (e) => `translate(${e.x0},${e.y0})`);
|
|
215
|
+
E.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", (e) => e.y1 - e.y0).attr("class", "treemapLeaf").attr("fill", (e) => e.parent ? N(e.parent.data.name) : N(e.data.name)).attr("style", (e) => L({ cssCompiledStyles: e.data.cssCompiledStyles }).nodeStyles).attr("fill-opacity", 0.3).attr("stroke", (e) => e.parent ? N(e.parent.data.name) : N(e.data.name)).attr("stroke-width", 3), E.append("clipPath").attr("id", (e, t) => `clip-${a}-${t}`).append("rect").attr("width", (e) => Math.max(0, e.x1 - e.x0 - 4)).attr("height", (e) => Math.max(0, e.y1 - e.y0 - 4)), E.append("text").attr("class", "treemapLabel").attr("x", (e) => (e.x1 - e.x0) / 2).attr("y", (e) => (e.y1 - e.y0) / 2).attr("style", (e) => {
|
|
216
|
+
const t = "text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:" + W(e.data.name) + ";", n = L({ cssCompiledStyles: e.data.cssCompiledStyles });
|
|
217
|
+
return t + n.labelStyles.replace("color:", "fill:");
|
|
218
|
+
}).attr("clip-path", (e, t) => `url(#clip-${a}-${t})`).text((e) => e.data.name).each(function(e) {
|
|
219
|
+
const t = _(this), n = e.x1 - e.x0, u = e.y1 - e.y0, g = t.node(), S = 4, T = n - 2 * S, x = u - 2 * S;
|
|
220
|
+
if (T < 10 || x < 10) {
|
|
221
|
+
t.style("display", "none");
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
let i = parseInt(t.style("font-size"), 10);
|
|
225
|
+
const C = 8, m = 28, y = 0.6, w = 6, k = 2;
|
|
226
|
+
for (; g.getComputedTextLength() > T && i > C; )
|
|
227
|
+
i--, t.style("font-size", `${i}px`);
|
|
228
|
+
let D = Math.max(
|
|
229
|
+
w,
|
|
230
|
+
Math.min(m, Math.round(i * y))
|
|
231
|
+
), R = i + k + D;
|
|
232
|
+
for (; R > x && i > C && (i--, D = Math.max(
|
|
233
|
+
w,
|
|
234
|
+
Math.min(m, Math.round(i * y))
|
|
235
|
+
), !(D < w && i === C)); )
|
|
236
|
+
t.style("font-size", `${i}px`), R = i + k + D;
|
|
237
|
+
t.style("font-size", `${i}px`), (g.getComputedTextLength() > T || i < C || x < i) && t.style("display", "none");
|
|
238
|
+
}), r.showValues !== !1 && E.append("text").attr("class", "treemapValue").attr("x", (t) => (t.x1 - t.x0) / 2).attr("y", function(t) {
|
|
239
|
+
return (t.y1 - t.y0) / 2;
|
|
240
|
+
}).attr("style", (t) => {
|
|
241
|
+
const n = "text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:" + W(t.data.name) + ";", u = L({ cssCompiledStyles: t.data.cssCompiledStyles });
|
|
242
|
+
return n + u.labelStyles.replace("color:", "fill:");
|
|
243
|
+
}).attr("clip-path", (t, n) => `url(#clip-${a}-${n})`).text((t) => t.value ? v(t.value) : "").each(function(t) {
|
|
244
|
+
const n = _(this), u = this.parentNode;
|
|
245
|
+
if (!u) {
|
|
246
|
+
n.style("display", "none");
|
|
247
|
+
return;
|
|
248
|
+
}
|
|
249
|
+
const g = _(u).select(".treemapLabel");
|
|
250
|
+
if (g.empty() || g.style("display") === "none") {
|
|
251
|
+
n.style("display", "none");
|
|
252
|
+
return;
|
|
253
|
+
}
|
|
254
|
+
const S = parseFloat(g.style("font-size")), T = 28, x = 0.6, i = 6, C = 2, m = Math.max(
|
|
255
|
+
i,
|
|
256
|
+
Math.min(T, Math.round(S * x))
|
|
257
|
+
);
|
|
258
|
+
n.style("font-size", `${m}px`);
|
|
259
|
+
const w = (t.y1 - t.y0) / 2 + S / 2 + C;
|
|
260
|
+
n.attr("y", w);
|
|
261
|
+
const k = t.x1 - t.x0, se = t.y1 - t.y0 - 4, re = k - 2 * 4;
|
|
262
|
+
n.node().getComputedTextLength() > re || w + m > se || m < i ? n.style("display", "none") : n.style("display", null);
|
|
263
|
+
});
|
|
264
|
+
const le = r.diagramPadding ?? 8;
|
|
265
|
+
ge(b, le, "flowchart", (r == null ? void 0 : r.useMaxWidth) || !1);
|
|
266
|
+
}, "draw"), $e = /* @__PURE__ */ h(function(p, a) {
|
|
267
|
+
return a.db.getClasses();
|
|
268
|
+
}, "getClasses"), Fe = { draw: Le, getClasses: $e }, ze = {
|
|
269
|
+
sectionStrokeColor: "black",
|
|
270
|
+
sectionStrokeWidth: "1",
|
|
271
|
+
sectionFillColor: "#efefef",
|
|
272
|
+
leafStrokeColor: "black",
|
|
273
|
+
leafStrokeWidth: "1",
|
|
274
|
+
leafFillColor: "#efefef",
|
|
275
|
+
labelColor: "black",
|
|
276
|
+
labelFontSize: "12px",
|
|
277
|
+
valueFontSize: "10px",
|
|
278
|
+
valueColor: "black",
|
|
279
|
+
titleColor: "black",
|
|
280
|
+
titleFontSize: "14px"
|
|
281
|
+
}, Ne = /* @__PURE__ */ h(({
|
|
282
|
+
treemap: p
|
|
283
|
+
} = {}) => {
|
|
284
|
+
const a = K(ze, p);
|
|
285
|
+
return `
|
|
286
|
+
.treemapNode.section {
|
|
287
|
+
stroke: ${a.sectionStrokeColor};
|
|
288
|
+
stroke-width: ${a.sectionStrokeWidth};
|
|
289
|
+
fill: ${a.sectionFillColor};
|
|
290
|
+
}
|
|
291
|
+
.treemapNode.leaf {
|
|
292
|
+
stroke: ${a.leafStrokeColor};
|
|
293
|
+
stroke-width: ${a.leafStrokeWidth};
|
|
294
|
+
fill: ${a.leafFillColor};
|
|
295
|
+
}
|
|
296
|
+
.treemapLabel {
|
|
297
|
+
fill: ${a.labelColor};
|
|
298
|
+
font-size: ${a.labelFontSize};
|
|
299
|
+
}
|
|
300
|
+
.treemapValue {
|
|
301
|
+
fill: ${a.valueColor};
|
|
302
|
+
font-size: ${a.valueFontSize};
|
|
303
|
+
}
|
|
304
|
+
.treemapTitle {
|
|
305
|
+
fill: ${a.titleColor};
|
|
306
|
+
font-size: ${a.titleFontSize};
|
|
307
|
+
}
|
|
308
|
+
`;
|
|
309
|
+
}, "getStyles"), Ae = Ne, Be = {
|
|
310
|
+
parser: Q,
|
|
311
|
+
get db() {
|
|
312
|
+
return new U();
|
|
313
|
+
},
|
|
314
|
+
renderer: Fe,
|
|
315
|
+
styles: Ae
|
|
316
|
+
};
|
|
317
|
+
export {
|
|
318
|
+
Be as diagram
|
|
319
|
+
};
|
package/dist/diagram-QEK2KX5R.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { C as k, _ as l, s as R, g as E, m as I, n as _, b as D, c as F, l as G, D as y, E as C, r as P, H as z, L as H } from "./CoachForm.js";
|
|
2
2
|
import { p as V } from "./chunk-4BX2VUAB.js";
|
|
3
3
|
import { p as W } from "./mermaid-parser.core.js";
|
|
4
|
-
var
|
|
4
|
+
var m = {
|
|
5
5
|
showLegend: !0,
|
|
6
6
|
ticks: 5,
|
|
7
7
|
max: null,
|
|
8
8
|
min: 0,
|
|
9
9
|
graticule: "circle"
|
|
10
|
-
},
|
|
10
|
+
}, w = {
|
|
11
11
|
axes: [],
|
|
12
12
|
curves: [],
|
|
13
|
-
options:
|
|
14
|
-
}, h = structuredClone(
|
|
15
|
-
...
|
|
16
|
-
...
|
|
13
|
+
options: m
|
|
14
|
+
}, h = structuredClone(w), B = k.radar, j = /* @__PURE__ */ l(() => y({
|
|
15
|
+
...B,
|
|
16
|
+
...C().radar
|
|
17
17
|
}), "getConfig"), b = /* @__PURE__ */ l(() => h.axes, "getAxes"), N = /* @__PURE__ */ l(() => h.curves, "getCurves"), U = /* @__PURE__ */ l(() => h.options, "getOptions"), X = /* @__PURE__ */ l((a) => {
|
|
18
18
|
h.axes = a.map((t) => ({
|
|
19
19
|
name: t.name,
|
|
@@ -47,14 +47,14 @@ var x = {
|
|
|
47
47
|
{}
|
|
48
48
|
);
|
|
49
49
|
h.options = {
|
|
50
|
-
showLegend: ((e = t.showLegend) == null ? void 0 : e.value) ??
|
|
51
|
-
ticks: ((r = t.ticks) == null ? void 0 : r.value) ??
|
|
52
|
-
max: ((s = t.max) == null ? void 0 : s.value) ??
|
|
53
|
-
min: ((o = t.min) == null ? void 0 : o.value) ??
|
|
54
|
-
graticule: ((i = t.graticule) == null ? void 0 : i.value) ??
|
|
50
|
+
showLegend: ((e = t.showLegend) == null ? void 0 : e.value) ?? m.showLegend,
|
|
51
|
+
ticks: ((r = t.ticks) == null ? void 0 : r.value) ?? m.ticks,
|
|
52
|
+
max: ((s = t.max) == null ? void 0 : s.value) ?? m.max,
|
|
53
|
+
min: ((o = t.min) == null ? void 0 : o.value) ?? m.min,
|
|
54
|
+
graticule: ((i = t.graticule) == null ? void 0 : i.value) ?? m.graticule
|
|
55
55
|
};
|
|
56
56
|
}, "setOptions"), J = /* @__PURE__ */ l(() => {
|
|
57
|
-
|
|
57
|
+
P(), h = structuredClone(w);
|
|
58
58
|
}, "clear"), $ = {
|
|
59
59
|
getAxes: b,
|
|
60
60
|
getCurves: N,
|
|
@@ -65,11 +65,11 @@ var x = {
|
|
|
65
65
|
getConfig: j,
|
|
66
66
|
clear: J,
|
|
67
67
|
setAccTitle: R,
|
|
68
|
-
getAccTitle:
|
|
69
|
-
setDiagramTitle:
|
|
70
|
-
getDiagramTitle:
|
|
71
|
-
getAccDescription:
|
|
72
|
-
setAccDescription:
|
|
68
|
+
getAccTitle: E,
|
|
69
|
+
setDiagramTitle: I,
|
|
70
|
+
getDiagramTitle: _,
|
|
71
|
+
getAccDescription: D,
|
|
72
|
+
setAccDescription: F
|
|
73
73
|
}, K = /* @__PURE__ */ l((a) => {
|
|
74
74
|
V(a, $);
|
|
75
75
|
const { axes: t, curves: e, options: r } = a;
|
|
@@ -77,11 +77,11 @@ var x = {
|
|
|
77
77
|
}, "populate"), Q = {
|
|
78
78
|
parse: /* @__PURE__ */ l(async (a) => {
|
|
79
79
|
const t = await W("radar", a);
|
|
80
|
-
|
|
80
|
+
G.debug(t), K(t);
|
|
81
81
|
}, "parse")
|
|
82
82
|
}, tt = /* @__PURE__ */ l((a, t, e, r) => {
|
|
83
|
-
const s = r.db, o = s.getAxes(), i = s.getCurves(), n = s.getOptions(), c = s.getConfig(), d = s.getDiagramTitle(), p =
|
|
84
|
-
at(u, o, v, n.ticks, n.graticule), rt(u, o, v, c), M(u, o, i,
|
|
83
|
+
const s = r.db, o = s.getAxes(), i = s.getCurves(), n = s.getOptions(), c = s.getConfig(), d = s.getDiagramTitle(), p = z(t), u = et(p, c), g = n.max ?? Math.max(...i.map((f) => Math.max(...f.entries))), x = n.min, v = Math.min(c.width, c.height) / 2;
|
|
84
|
+
at(u, o, v, n.ticks, n.graticule), rt(u, o, v, c), M(u, o, i, x, g, n.graticule, c), T(u, i, n.showLegend, c), u.append("text").attr("class", "radarTitle").text(d).attr("x", 0).attr("y", -c.height / 2 - c.marginTop);
|
|
85
85
|
}, "draw"), et = /* @__PURE__ */ l((a, t) => {
|
|
86
86
|
const e = t.width + t.marginLeft + t.marginRight, r = t.height + t.marginTop + t.marginBottom, s = {
|
|
87
87
|
x: t.marginLeft + t.width / 2,
|
|
@@ -98,8 +98,8 @@ var x = {
|
|
|
98
98
|
const o = t.length;
|
|
99
99
|
for (let i = 0; i < r; i++) {
|
|
100
100
|
const n = e * (i + 1) / r, c = t.map((d, p) => {
|
|
101
|
-
const u = 2 * p * Math.PI / o - Math.PI / 2, g = n * Math.cos(u),
|
|
102
|
-
return `${g},${
|
|
101
|
+
const u = 2 * p * Math.PI / o - Math.PI / 2, g = n * Math.cos(u), x = n * Math.sin(u);
|
|
102
|
+
return `${g},${x}`;
|
|
103
103
|
}).join(" ");
|
|
104
104
|
a.append("polygon").attr("points", c).attr("class", "radarGraticule");
|
|
105
105
|
}
|
|
@@ -116,8 +116,8 @@ function M(a, t, e, r, s, o, i) {
|
|
|
116
116
|
e.forEach((d, p) => {
|
|
117
117
|
if (d.entries.length !== n)
|
|
118
118
|
return;
|
|
119
|
-
const u = d.entries.map((g,
|
|
120
|
-
const v = 2 * Math.PI *
|
|
119
|
+
const u = d.entries.map((g, x) => {
|
|
120
|
+
const v = 2 * Math.PI * x / n - Math.PI / 2, f = A(g, r, s, c), O = f * Math.cos(v), S = f * Math.sin(v);
|
|
121
121
|
return { x: O, y: S };
|
|
122
122
|
});
|
|
123
123
|
o === "circle" ? a.append("path").attr("d", L(u, i.curveTension)).attr("class", `radarCurve-${p}`) : o === "polygon" && a.append("polygon").attr("points", u.map((g) => `${g.x},${g.y}`).join(" ")).attr("class", `radarCurve-${p}`);
|
|
@@ -176,7 +176,7 @@ var st = { draw: tt }, nt = /* @__PURE__ */ l((a, t) => {
|
|
|
176
176
|
}
|
|
177
177
|
return e;
|
|
178
178
|
}, "genIndexStyles"), ot = /* @__PURE__ */ l((a) => {
|
|
179
|
-
const t =
|
|
179
|
+
const t = H(), e = C(), r = y(t, e.themeVariables), s = y(r.radar, a);
|
|
180
180
|
return { themeVariables: r, radarOptions: s };
|
|
181
181
|
}, "buildRadarStyleOptions"), it = /* @__PURE__ */ l(({ radar: a } = {}) => {
|
|
182
182
|
const { themeVariables: t, radarOptions: e } = ot(a);
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import { b6 as k, aG as l, aI as I, aJ as R, aV as E, aW as F, aK as _, aL as D, aS as G, b7 as y, b8 as b, b0 as P, bb as z, be as V } from "./CoachForm.js";
|
|
2
|
+
import { p as W } from "./chunk-4BX2VUAB2.js";
|
|
3
|
+
import { p as B } from "./mermaid-parser.core.js";
|
|
4
|
+
var x = {
|
|
5
|
+
showLegend: !0,
|
|
6
|
+
ticks: 5,
|
|
7
|
+
max: null,
|
|
8
|
+
min: 0,
|
|
9
|
+
graticule: "circle"
|
|
10
|
+
}, C = {
|
|
11
|
+
axes: [],
|
|
12
|
+
curves: [],
|
|
13
|
+
options: x
|
|
14
|
+
}, h = structuredClone(C), H = k.radar, j = /* @__PURE__ */ l(() => y({
|
|
15
|
+
...H,
|
|
16
|
+
...b().radar
|
|
17
|
+
}), "getConfig"), w = /* @__PURE__ */ l(() => h.axes, "getAxes"), J = /* @__PURE__ */ l(() => h.curves, "getCurves"), K = /* @__PURE__ */ l(() => h.options, "getOptions"), N = /* @__PURE__ */ l((a) => {
|
|
18
|
+
h.axes = a.map((t) => ({
|
|
19
|
+
name: t.name,
|
|
20
|
+
label: t.label ?? t.name
|
|
21
|
+
}));
|
|
22
|
+
}, "setAxes"), U = /* @__PURE__ */ l((a) => {
|
|
23
|
+
h.curves = a.map((t) => ({
|
|
24
|
+
name: t.name,
|
|
25
|
+
label: t.label ?? t.name,
|
|
26
|
+
entries: X(t.entries)
|
|
27
|
+
}));
|
|
28
|
+
}, "setCurves"), X = /* @__PURE__ */ l((a) => {
|
|
29
|
+
if (a[0].axis == null)
|
|
30
|
+
return a.map((e) => e.value);
|
|
31
|
+
const t = w();
|
|
32
|
+
if (t.length === 0)
|
|
33
|
+
throw new Error("Axes must be populated before curves for reference entries");
|
|
34
|
+
return t.map((e) => {
|
|
35
|
+
const r = a.find((s) => {
|
|
36
|
+
var o;
|
|
37
|
+
return ((o = s.axis) == null ? void 0 : o.$refText) === e.name;
|
|
38
|
+
});
|
|
39
|
+
if (r === void 0)
|
|
40
|
+
throw new Error("Missing entry for axis " + e.label);
|
|
41
|
+
return r.value;
|
|
42
|
+
});
|
|
43
|
+
}, "computeCurveEntries"), Y = /* @__PURE__ */ l((a) => {
|
|
44
|
+
var e, r, s, o, i;
|
|
45
|
+
const t = a.reduce(
|
|
46
|
+
(n, c) => (n[c.name] = c, n),
|
|
47
|
+
{}
|
|
48
|
+
);
|
|
49
|
+
h.options = {
|
|
50
|
+
showLegend: ((e = t.showLegend) == null ? void 0 : e.value) ?? x.showLegend,
|
|
51
|
+
ticks: ((r = t.ticks) == null ? void 0 : r.value) ?? x.ticks,
|
|
52
|
+
max: ((s = t.max) == null ? void 0 : s.value) ?? x.max,
|
|
53
|
+
min: ((o = t.min) == null ? void 0 : o.value) ?? x.min,
|
|
54
|
+
graticule: ((i = t.graticule) == null ? void 0 : i.value) ?? x.graticule
|
|
55
|
+
};
|
|
56
|
+
}, "setOptions"), Z = /* @__PURE__ */ l(() => {
|
|
57
|
+
P(), h = structuredClone(C);
|
|
58
|
+
}, "clear"), $ = {
|
|
59
|
+
getAxes: w,
|
|
60
|
+
getCurves: J,
|
|
61
|
+
getOptions: K,
|
|
62
|
+
setAxes: N,
|
|
63
|
+
setCurves: U,
|
|
64
|
+
setOptions: Y,
|
|
65
|
+
getConfig: j,
|
|
66
|
+
clear: Z,
|
|
67
|
+
setAccTitle: I,
|
|
68
|
+
getAccTitle: R,
|
|
69
|
+
setDiagramTitle: E,
|
|
70
|
+
getDiagramTitle: F,
|
|
71
|
+
getAccDescription: _,
|
|
72
|
+
setAccDescription: D
|
|
73
|
+
}, q = /* @__PURE__ */ l((a) => {
|
|
74
|
+
W(a, $);
|
|
75
|
+
const { axes: t, curves: e, options: r } = a;
|
|
76
|
+
$.setAxes(t), $.setCurves(e), $.setOptions(r);
|
|
77
|
+
}, "populate"), Q = {
|
|
78
|
+
parse: /* @__PURE__ */ l(async (a) => {
|
|
79
|
+
const t = await B("radar", a);
|
|
80
|
+
G.debug(t), q(t);
|
|
81
|
+
}, "parse")
|
|
82
|
+
}, tt = /* @__PURE__ */ l((a, t, e, r) => {
|
|
83
|
+
const s = r.db, o = s.getAxes(), i = s.getCurves(), n = s.getOptions(), c = s.getConfig(), d = s.getDiagramTitle(), p = z(t), u = et(p, c), g = n.max ?? Math.max(...i.map((f) => Math.max(...f.entries))), m = n.min, v = Math.min(c.width, c.height) / 2;
|
|
84
|
+
at(u, o, v, n.ticks, n.graticule), rt(u, o, v, c), M(u, o, i, m, g, n.graticule, c), T(u, i, n.showLegend, c), u.append("text").attr("class", "radarTitle").text(d).attr("x", 0).attr("y", -c.height / 2 - c.marginTop);
|
|
85
|
+
}, "draw"), et = /* @__PURE__ */ l((a, t) => {
|
|
86
|
+
const e = t.width + t.marginLeft + t.marginRight, r = t.height + t.marginTop + t.marginBottom, s = {
|
|
87
|
+
x: t.marginLeft + t.width / 2,
|
|
88
|
+
y: t.marginTop + t.height / 2
|
|
89
|
+
};
|
|
90
|
+
return a.attr("viewbox", `0 0 ${e} ${r}`).attr("width", e).attr("height", r), a.append("g").attr("transform", `translate(${s.x}, ${s.y})`);
|
|
91
|
+
}, "drawFrame"), at = /* @__PURE__ */ l((a, t, e, r, s) => {
|
|
92
|
+
if (s === "circle")
|
|
93
|
+
for (let o = 0; o < r; o++) {
|
|
94
|
+
const i = e * (o + 1) / r;
|
|
95
|
+
a.append("circle").attr("r", i).attr("class", "radarGraticule");
|
|
96
|
+
}
|
|
97
|
+
else if (s === "polygon") {
|
|
98
|
+
const o = t.length;
|
|
99
|
+
for (let i = 0; i < r; i++) {
|
|
100
|
+
const n = e * (i + 1) / r, c = t.map((d, p) => {
|
|
101
|
+
const u = 2 * p * Math.PI / o - Math.PI / 2, g = n * Math.cos(u), m = n * Math.sin(u);
|
|
102
|
+
return `${g},${m}`;
|
|
103
|
+
}).join(" ");
|
|
104
|
+
a.append("polygon").attr("points", c).attr("class", "radarGraticule");
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}, "drawGraticule"), rt = /* @__PURE__ */ l((a, t, e, r) => {
|
|
108
|
+
const s = t.length;
|
|
109
|
+
for (let o = 0; o < s; o++) {
|
|
110
|
+
const i = t[o].label, n = 2 * o * Math.PI / s - Math.PI / 2;
|
|
111
|
+
a.append("line").attr("x1", 0).attr("y1", 0).attr("x2", e * r.axisScaleFactor * Math.cos(n)).attr("y2", e * r.axisScaleFactor * Math.sin(n)).attr("class", "radarAxisLine"), a.append("text").text(i).attr("x", e * r.axisLabelFactor * Math.cos(n)).attr("y", e * r.axisLabelFactor * Math.sin(n)).attr("class", "radarAxisLabel");
|
|
112
|
+
}
|
|
113
|
+
}, "drawAxes");
|
|
114
|
+
function M(a, t, e, r, s, o, i) {
|
|
115
|
+
const n = t.length, c = Math.min(i.width, i.height) / 2;
|
|
116
|
+
e.forEach((d, p) => {
|
|
117
|
+
if (d.entries.length !== n)
|
|
118
|
+
return;
|
|
119
|
+
const u = d.entries.map((g, m) => {
|
|
120
|
+
const v = 2 * Math.PI * m / n - Math.PI / 2, f = A(g, r, s, c), O = f * Math.cos(v), S = f * Math.sin(v);
|
|
121
|
+
return { x: O, y: S };
|
|
122
|
+
});
|
|
123
|
+
o === "circle" ? a.append("path").attr("d", L(u, i.curveTension)).attr("class", `radarCurve-${p}`) : o === "polygon" && a.append("polygon").attr("points", u.map((g) => `${g.x},${g.y}`).join(" ")).attr("class", `radarCurve-${p}`);
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
l(M, "drawCurves");
|
|
127
|
+
function A(a, t, e, r) {
|
|
128
|
+
const s = Math.min(Math.max(a, t), e);
|
|
129
|
+
return r * (s - t) / (e - t);
|
|
130
|
+
}
|
|
131
|
+
l(A, "relativeRadius");
|
|
132
|
+
function L(a, t) {
|
|
133
|
+
const e = a.length;
|
|
134
|
+
let r = `M${a[0].x},${a[0].y}`;
|
|
135
|
+
for (let s = 0; s < e; s++) {
|
|
136
|
+
const o = a[(s - 1 + e) % e], i = a[s], n = a[(s + 1) % e], c = a[(s + 2) % e], d = {
|
|
137
|
+
x: i.x + (n.x - o.x) * t,
|
|
138
|
+
y: i.y + (n.y - o.y) * t
|
|
139
|
+
}, p = {
|
|
140
|
+
x: n.x - (c.x - i.x) * t,
|
|
141
|
+
y: n.y - (c.y - i.y) * t
|
|
142
|
+
};
|
|
143
|
+
r += ` C${d.x},${d.y} ${p.x},${p.y} ${n.x},${n.y}`;
|
|
144
|
+
}
|
|
145
|
+
return `${r} Z`;
|
|
146
|
+
}
|
|
147
|
+
l(L, "closedRoundCurve");
|
|
148
|
+
function T(a, t, e, r) {
|
|
149
|
+
if (!e)
|
|
150
|
+
return;
|
|
151
|
+
const s = (r.width / 2 + r.marginRight) * 3 / 4, o = -(r.height / 2 + r.marginTop) * 3 / 4, i = 20;
|
|
152
|
+
t.forEach((n, c) => {
|
|
153
|
+
const d = a.append("g").attr("transform", `translate(${s}, ${o + c * i})`);
|
|
154
|
+
d.append("rect").attr("width", 12).attr("height", 12).attr("class", `radarLegendBox-${c}`), d.append("text").attr("x", 16).attr("y", 0).attr("class", "radarLegendText").text(n.label);
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
l(T, "drawLegend");
|
|
158
|
+
var st = { draw: tt }, nt = /* @__PURE__ */ l((a, t) => {
|
|
159
|
+
let e = "";
|
|
160
|
+
for (let r = 0; r < a.THEME_COLOR_LIMIT; r++) {
|
|
161
|
+
const s = a[`cScale${r}`];
|
|
162
|
+
e += `
|
|
163
|
+
.radarCurve-${r} {
|
|
164
|
+
color: ${s};
|
|
165
|
+
fill: ${s};
|
|
166
|
+
fill-opacity: ${t.curveOpacity};
|
|
167
|
+
stroke: ${s};
|
|
168
|
+
stroke-width: ${t.curveStrokeWidth};
|
|
169
|
+
}
|
|
170
|
+
.radarLegendBox-${r} {
|
|
171
|
+
fill: ${s};
|
|
172
|
+
fill-opacity: ${t.curveOpacity};
|
|
173
|
+
stroke: ${s};
|
|
174
|
+
}
|
|
175
|
+
`;
|
|
176
|
+
}
|
|
177
|
+
return e;
|
|
178
|
+
}, "genIndexStyles"), ot = /* @__PURE__ */ l((a) => {
|
|
179
|
+
const t = V(), e = b(), r = y(t, e.themeVariables), s = y(r.radar, a);
|
|
180
|
+
return { themeVariables: r, radarOptions: s };
|
|
181
|
+
}, "buildRadarStyleOptions"), it = /* @__PURE__ */ l(({ radar: a } = {}) => {
|
|
182
|
+
const { themeVariables: t, radarOptions: e } = ot(a);
|
|
183
|
+
return `
|
|
184
|
+
.radarTitle {
|
|
185
|
+
font-size: ${t.fontSize};
|
|
186
|
+
color: ${t.titleColor};
|
|
187
|
+
dominant-baseline: hanging;
|
|
188
|
+
text-anchor: middle;
|
|
189
|
+
}
|
|
190
|
+
.radarAxisLine {
|
|
191
|
+
stroke: ${e.axisColor};
|
|
192
|
+
stroke-width: ${e.axisStrokeWidth};
|
|
193
|
+
}
|
|
194
|
+
.radarAxisLabel {
|
|
195
|
+
dominant-baseline: middle;
|
|
196
|
+
text-anchor: middle;
|
|
197
|
+
font-size: ${e.axisLabelFontSize}px;
|
|
198
|
+
color: ${e.axisColor};
|
|
199
|
+
}
|
|
200
|
+
.radarGraticule {
|
|
201
|
+
fill: ${e.graticuleColor};
|
|
202
|
+
fill-opacity: ${e.graticuleOpacity};
|
|
203
|
+
stroke: ${e.graticuleColor};
|
|
204
|
+
stroke-width: ${e.graticuleStrokeWidth};
|
|
205
|
+
}
|
|
206
|
+
.radarLegendText {
|
|
207
|
+
text-anchor: start;
|
|
208
|
+
font-size: ${e.legendFontSize}px;
|
|
209
|
+
dominant-baseline: hanging;
|
|
210
|
+
}
|
|
211
|
+
${nt(t, e)}
|
|
212
|
+
`;
|
|
213
|
+
}, "styles"), ut = {
|
|
214
|
+
parser: Q,
|
|
215
|
+
db: $,
|
|
216
|
+
renderer: st,
|
|
217
|
+
styles: it
|
|
218
|
+
};
|
|
219
|
+
export {
|
|
220
|
+
ut as diagram
|
|
221
|
+
};
|