@diagrammo/dgmo 0.92.0 → 0.93.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/advanced.d.ts +85 -21
- package/dist/advanced.js +455 -422
- package/dist/block.d.ts +2 -2
- package/dist/block.js +75 -70
- package/dist/{chart-meta-BBqLnv5q.d.ts → chart-meta-BbjsRY7o.d.ts} +2 -2
- package/dist/chart-meta.d.ts +3 -3
- package/dist/chart-meta.js +25 -19
- package/dist/{chart-types-CbXlZFLd.d.ts → chart-types-Cppnp31G.d.ts} +173 -4
- package/dist/{charts-d3-QUUDVETP.js → charts-d3-ERYYVGP6.js} +7 -6
- package/dist/{chunk-HIWHIYLD.js → chunk-2TFXRBCD.js} +19 -19
- package/dist/{chunk-F7326NVM.js → chunk-3GCASUWA.js} +58 -25
- package/dist/{chunk-ZJAK6C7Y.js → chunk-3PP746YM.js} +6 -1
- package/dist/{chunk-WLLO3PZ3.js → chunk-472EOHVW.js} +17 -17
- package/dist/{chunk-LMP6Y7QO.js → chunk-4WQX55VX.js} +56 -24
- package/dist/{chunk-JLU52ZDT.js → chunk-5CBX66KB.js} +10 -10
- package/dist/{chunk-DEFBUZWV.js → chunk-5HAYT43L.js} +70 -54
- package/dist/{chunk-S7W75MIM.js → chunk-65GPEV5V.js} +21 -3
- package/dist/{chunk-Q6W2K33N.js → chunk-6XLMTAEX.js} +1 -1
- package/dist/{chunk-JKST4RTT.js → chunk-7OWK5K5C.js} +6 -6
- package/dist/{chunk-73EYNV4O.js → chunk-A5WIAMCT.js} +4 -6
- package/dist/{chunk-X5BUX2GK.js → chunk-ADVGV3P7.js} +1 -1
- package/dist/{chunk-45QUTYPD.js → chunk-CYDM2XII.js} +17 -17
- package/dist/chunk-CYTFO2LF.js +209 -0
- package/dist/{chunk-JRWUHLRP.js → chunk-D6PVMUCX.js} +51 -8
- package/dist/{chunk-BRSM6Z34.js → chunk-DAHQL57W.js} +14 -14
- package/dist/{chunk-RBFJT23E.js → chunk-EQWC76GQ.js} +6 -6
- package/dist/{chunk-ADNIO3XY.js → chunk-FIYW7JW4.js} +5 -5
- package/dist/{chunk-7ENDOHAA.js → chunk-FMAVHTYB.js} +919 -927
- package/dist/{chunk-3PFMGNOM.js → chunk-GJXMG4S3.js} +26 -11
- package/dist/chunk-GXCDD6NG.js +24 -0
- package/dist/{chunk-RJ2JW3FG.js → chunk-IESUM4N5.js} +2331 -2236
- package/dist/{chunk-62BP7AJU.js → chunk-IIV4SMJL.js} +18 -18
- package/dist/{chunk-5EBYPETE.js → chunk-J43OCO22.js} +3 -5
- package/dist/{chunk-L5NW3PVL.js → chunk-J6AEKIRQ.js} +1 -1
- package/dist/{chunk-2BJW7FSF.js → chunk-KBEWVCK3.js} +1 -1
- package/dist/{chunk-LRP5FXST.js → chunk-KCHQVED5.js} +18 -17
- package/dist/{chunk-Q6ZQX2HX.js → chunk-KCMGIYPO.js} +4 -6
- package/dist/{chunk-MDVJYRJT.js → chunk-KPGPK4SK.js} +22 -22
- package/dist/{chunk-Q2UFOKPB.js → chunk-KPSSNGAE.js} +22 -22
- package/dist/{chunk-V4D2ZQBE.js → chunk-KRPLP5LP.js} +6 -1
- package/dist/{chunk-BZX7QCXJ.js → chunk-KRU2LCIP.js} +15 -15
- package/dist/{chunk-HXULJZA2.js → chunk-LDDDKWL6.js} +6 -1
- package/dist/{chunk-NREU4JFE.js → chunk-LNVB75QU.js} +6 -8
- package/dist/{chunk-MX4SZLSV.js → chunk-LUDUDBO6.js} +16 -8
- package/dist/{chunk-2YAFDND3.js → chunk-M4NV5PPU.js} +4 -6
- package/dist/{chunk-26BBJUBW.js → chunk-M6ZQAFPD.js} +4 -6
- package/dist/{chunk-NPWVOFB3.js → chunk-MB2SQF7N.js} +1 -1
- package/dist/{chunk-6ZL2XYM7.js → chunk-MLY5ALOV.js} +6 -6
- package/dist/chunk-NJJCTEBM.js +416 -0
- package/dist/{chunk-OQW4ETJX.js → chunk-NM5V5EKY.js} +6 -1
- package/dist/{chunk-ONYO5WJW.js → chunk-NMK7KJZZ.js} +21 -21
- package/dist/{chunk-6BNNLVAR.js → chunk-NPDVWFAQ.js} +6 -1
- package/dist/{chunk-FTUMRSGT.js → chunk-P5FUWXPW.js} +4 -286
- package/dist/chunk-P7TRFL4P.js +54 -0
- package/dist/{chunk-A4PNWAUW.js → chunk-PGSGJLUR.js} +6 -1
- package/dist/{chunk-DRFGIOZ6.js → chunk-Q7Y6JQ3R.js} +4 -6
- package/dist/{chunk-J2E7EUER.js → chunk-QDRCWVV3.js} +17 -17
- package/dist/{chunk-MXAP37W6.js → chunk-TNV4F5WA.js} +16 -7
- package/dist/{chunk-EBSFSOJC.js → chunk-U7U64UUN.js} +22 -22
- package/dist/chunk-UCHZJJIT.js +421 -0
- package/dist/{chunk-FSJ3ZA6N.js → chunk-UG7AQQNR.js} +12 -12
- package/dist/{chunk-WFA6IULY.js → chunk-URRAWU5D.js} +5 -0
- package/dist/{chunk-VOR32OHN.js → chunk-USAGHYRD.js} +13 -15
- package/dist/{chunk-QUGC7GWB.js → chunk-UVX3IYXF.js} +15 -15
- package/dist/{chunk-B5PEKSRH.js → chunk-VSAKEMDD.js} +6 -1
- package/dist/{chunk-YRYKTYMQ.js → chunk-VSOZZYLK.js} +106 -12
- package/dist/{chunk-5SSTVFPX.js → chunk-WK5QEYFA.js} +5 -7
- package/dist/{chunk-KTGZDMDX.js → chunk-XUTR7GNT.js} +76 -28
- package/dist/{chunk-6WVX4KNP.js → chunk-YDZIVDVR.js} +97 -297
- package/dist/{chunk-URQIWIKX.js → chunk-YXXIRM4C.js} +3 -3
- package/dist/{chunk-H5UEVW6Q.js → chunk-ZD3QCNB7.js} +1 -1
- package/dist/{chunk-DUPZ2BBY.js → chunk-ZTLMEBAC.js} +66 -4
- package/dist/clock.js +168 -0
- package/dist/completion-registry.js +3 -1
- package/dist/countdown.js +36 -395
- package/dist/{dgmo-router-4UAPPIKN.js → dgmo-router-CZN36TR3.js} +50 -43
- package/dist/{dimensions-SCNVYLRF.js → dimensions-7HHKO5BS.js} +3 -3
- package/dist/{d3-BThYBTQk.d.ts → export-context-Ceh3wr0E.d.ts} +2 -8
- package/dist/{flowchart-parser-NA75YQ77.js → flowchart-parser-4MZPWYK6.js} +8 -3
- package/dist/{flowchart-renderer-6MGGX4RC.js → flowchart-renderer-5XDN575E.js} +13 -17
- package/dist/index.d.ts +8 -7
- package/dist/index.js +80 -74
- package/dist/{layout-S3RLVPH4.js → layout-33FHGDEV.js} +10 -12
- package/dist/{layout-MBVBAMPA.js → layout-3TSVAGWH.js} +2 -2
- package/dist/{layout-WRG4APSJ.js → layout-5GHV7HNM.js} +9 -13
- package/dist/layout-FTOGDNUL.js +23 -0
- package/dist/{layout-BNLFQHSB.js → layout-QXGPY7KA.js} +7 -9
- package/dist/{layout-search-PMYL3VWS.js → layout-search-EMTCDC3C.js} +8 -10
- package/dist/{palettes-IN7ZFRJM.js → palettes-4Y7CL2QL.js} +4 -2
- package/dist/{parser-3MK56JZC.js → parser-4Y6PODW6.js} +2 -2
- package/dist/{parser-2NWH5JUS.js → parser-A3AN76RQ.js} +2 -1
- package/dist/{parser-LCJ76UXS.js → parser-BT4NI6JY.js} +5 -1
- package/dist/{parser-FXDS4JDK.js → parser-F7NDRPMA.js} +2 -2
- package/dist/{parser-BES6LV3G.js → parser-GDLKUBTO.js} +5 -1
- package/dist/{parser-SEUTXN6U.js → parser-KJPPUN4D.js} +2 -2
- package/dist/{parser-SIKL4PLF.js → parser-KMKVFET2.js} +5 -1
- package/dist/{parser-5LW5JDYG.js → parser-NL73FSFI.js} +5 -1
- package/dist/{parser-VA7ZQQTA.js → parser-NUU3DVW4.js} +5 -1
- package/dist/{parser-L6RWDXQN.js → parser-OGF2CDA6.js} +8 -3
- package/dist/{parser-XZUKNZPB.js → parser-R3LPEQIT.js} +7 -1
- package/dist/{parser-X23GRTQJ.js → parser-RCIEKN7Y.js} +5 -1
- package/dist/{parser-GX5YLRIP.js → parser-VKYUAT4Y.js} +8 -3
- package/dist/{parser-QYISOAGR.js → parser-YX72VLDZ.js} +8 -3
- package/dist/redraw-MSXU4ZD2.js +73 -0
- package/dist/redraw-T324XAF3.js +1698 -0
- package/dist/{renderer-5VKPB4LL.js → renderer-37PLQHVB.js} +5 -5
- package/dist/{renderer-ISSDGK54.js → renderer-3F47TPZ2.js} +3 -3
- package/dist/{renderer-3QAFDXEY.js → renderer-5ITLW7MX.js} +14 -12
- package/dist/{renderer-ZZ6MWVB7.js → renderer-6GJWADLO.js} +4 -4
- package/dist/{renderer-MM27BSBO.js → renderer-7Y3LR4R2.js} +3 -4
- package/dist/{renderer-2FVUPBGV.js → renderer-AM7P4LN7.js} +1 -1
- package/dist/{renderer-ZHGHTSNG.js → renderer-BO73LSVT.js} +13 -12
- package/dist/{renderer-3IHQI4A4.js → renderer-CNRQFIEI.js} +11 -10
- package/dist/{renderer-OAR5VPH4.js → renderer-DAZWHNLI.js} +2 -2
- package/dist/{renderer-NDA2FFYB.js → renderer-DD6T3C4J.js} +5 -5
- package/dist/{renderer-WIU5BJUK.js → renderer-DDWDCM2K.js} +2 -2
- package/dist/{renderer-7ZZG5HR3.js → renderer-EVKWGUGT.js} +8 -9
- package/dist/{renderer-3JY6JAQJ.js → renderer-FL7EOSBU.js} +5 -6
- package/dist/{renderer-NIE5IW24.js → renderer-GFALLIYT.js} +8 -7
- package/dist/{renderer-O6DY46AV.js → renderer-GFGFHYWY.js} +7 -7
- package/dist/{renderer-5TZVFQ7K.js → renderer-GOXAP2IE.js} +7 -8
- package/dist/{renderer-NHTR7IRR.js → renderer-GPAVVUET.js} +4 -5
- package/dist/{renderer-TO2NVJP3.js → renderer-HJ54YXT3.js} +50 -45
- package/dist/{renderer-LM4ICK6I.js → renderer-HYGTMBHT.js} +4 -5
- package/dist/{renderer-S3YCLJKL.js → renderer-IHCWBFPI.js} +17 -20
- package/dist/{renderer-XO57LTU4.js → renderer-ISDKO3DI.js} +5 -5
- package/dist/{renderer-LQP3AGEJ.js → renderer-J3QWK6IM.js} +3 -4
- package/dist/{renderer-J666LZXJ.js → renderer-J6H4Q3RM.js} +7 -8
- package/dist/{renderer-ALWVK3EJ.js → renderer-JJ4QW3SK.js} +6 -6
- package/dist/{renderer-DC7C5Q3G.js → renderer-NOYLNVTI.js} +2 -2
- package/dist/{renderer-ZGY7P4BM.js → renderer-PBKTAWQV.js} +16 -20
- package/dist/{renderer-XGG2UNXT.js → renderer-POBGKIUT.js} +3 -4
- package/dist/{renderer-QGIHLZOJ.js → renderer-RDI2RYUP.js} +9 -10
- package/dist/{renderer-JEJT3YET.js → renderer-TSCSZ6CL.js} +2 -3
- package/dist/{renderer-VPIELEE5.js → renderer-VDBNC7A6.js} +8 -9
- package/dist/{renderer-J67LMOD5.js → renderer-VI34SD5V.js} +15 -15
- package/dist/{renderer-J5FKF423.js → renderer-W4MUMXJE.js} +7 -4
- package/dist/{renderer-RSK6QFWN.js → renderer-XJMVG2WJ.js} +7 -9
- package/dist/{state-parser-TIR2ORJY.js → state-parser-NPYTMRXP.js} +8 -3
- package/dist/{state-renderer-G6SUXU4J.js → state-renderer-44K2KDX7.js} +15 -19
- package/dist/{tag-groups-DsoVpAY-.d.ts → tag-groups-DydewK3D.d.ts} +2 -173
- package/dist/{themes-DRNjxX7Q.d.ts → themes-DzIH3Hjv.d.ts} +3 -2
- package/docs/ai-integration.md +1 -1
- package/docs/language-reference.md +23 -2
- package/gallery/fixtures/map-undirected-edges.dgmo +5 -5
- package/gallery/fixtures/whiteboard.dgmo +3 -0
- package/package.json +4 -6
- package/dist/chunk-3Y63RFJL.js +0 -75
- package/dist/chunk-5DH3KYFH.js +0 -20
- package/dist/chunk-O753JUEZ.js +0 -67
- package/dist/chunk-RJNZHFNG.js +0 -51
- package/dist/chunk-Z6DXWULM.js +0 -23
- package/dist/layout-5USEVQBY.js +0 -25
- package/dist/{chunk-YITHYQCL.js → chunk-4FT5KQ7H.js} +7 -7
- package/dist/{chunk-GE7ICBX6.js → chunk-4RY5D5RE.js} +4 -4
- package/dist/{chunk-DGUGE67L.js → chunk-CDYV46JE.js} +3 -3
- package/dist/{chunk-IGKFOHBG.js → chunk-CQYFZOUC.js} +13 -13
- package/dist/{chunk-TKAB3FTK.js → chunk-DRQSB72S.js} +11 -11
- package/dist/{chunk-ZKP77MB3.js → chunk-FVTYJUXR.js} +5 -5
- package/dist/{chunk-MA42PIGJ.js → chunk-H5NVCOEJ.js} +4 -4
- package/dist/{chunk-BEA4D7OS.js → chunk-IXHWS2HI.js} +3 -3
- package/dist/{chunk-QKY6W4NA.js → chunk-KHL652SX.js} +25 -25
- package/dist/{chunk-6OIMUSDX.js → chunk-MUJVNSEW.js} +9 -9
- package/dist/{chunk-YO6AQU4A.js → chunk-QJOVZ4TC.js} +12 -12
- package/dist/{chunk-SOHZDW6N.js → chunk-UXNA2H2V.js} +3 -3
- package/dist/{chunk-NO3UX6AP.js → chunk-V2NQV7VL.js} +4 -4
|
@@ -1,17 +1,27 @@
|
|
|
1
1
|
import {
|
|
2
2
|
drawCylinderCard,
|
|
3
3
|
drawQueueCard
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-KRU2LCIP.js";
|
|
5
5
|
import {
|
|
6
6
|
CYLINDER_RY,
|
|
7
7
|
QUEUE_CAP
|
|
8
8
|
} from "./chunk-5KKZXA44.js";
|
|
9
|
+
import {
|
|
10
|
+
WHITEBOARD_COLORS,
|
|
11
|
+
WHITEBOARD_NOTE_COLOR
|
|
12
|
+
} from "./chunk-P7TRFL4P.js";
|
|
9
13
|
import {
|
|
10
14
|
renderChartTitle
|
|
11
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-6XLMTAEX.js";
|
|
12
16
|
import {
|
|
13
17
|
TITLE_FONT_SIZE
|
|
14
18
|
} from "./chunk-VLC6WNRD.js";
|
|
19
|
+
import {
|
|
20
|
+
renderIntegratedLegend
|
|
21
|
+
} from "./chunk-NMS5XSLX.js";
|
|
22
|
+
import {
|
|
23
|
+
getMaxLegendReservedHeight
|
|
24
|
+
} from "./chunk-JILEYZ2V.js";
|
|
15
25
|
import {
|
|
16
26
|
FONT_FAMILY
|
|
17
27
|
} from "./chunk-ICLB27PZ.js";
|
|
@@ -420,6 +430,33 @@ function visibleWhiteboardElements(parsed, options = {}) {
|
|
|
420
430
|
}
|
|
421
431
|
var WHITEBOARD_MARGIN = 24;
|
|
422
432
|
var TITLE_BAND = 40;
|
|
433
|
+
var LEGEND_GAP = 8;
|
|
434
|
+
var LEGEND_FAINT_OPACITY = 0.4;
|
|
435
|
+
var LEGEND_DEFAULT_GROUP = "Meaning";
|
|
436
|
+
function whiteboardLegend(parsed, elements, colorOf) {
|
|
437
|
+
const used = /* @__PURE__ */ new Set();
|
|
438
|
+
for (const el of elements) {
|
|
439
|
+
const c = legendColor(el);
|
|
440
|
+
if (c) used.add(c);
|
|
441
|
+
}
|
|
442
|
+
if (used.size < 2) return null;
|
|
443
|
+
const tags = parsed.tagGroups[0];
|
|
444
|
+
const nameOf = (c) => tags?.entries.find((e) => e.color === c)?.value ?? "";
|
|
445
|
+
const entries = WHITEBOARD_COLORS.filter((c) => used.has(c)).map((c) => ({
|
|
446
|
+
value: nameOf(c),
|
|
447
|
+
color: colorOf(c)
|
|
448
|
+
}));
|
|
449
|
+
return {
|
|
450
|
+
group: { name: tags?.name ?? LEGEND_DEFAULT_GROUP, entries },
|
|
451
|
+
named: entries.some((e) => e.value !== ""),
|
|
452
|
+
entryOf: new Map([...used].map((c) => [c, nameOf(c)]))
|
|
453
|
+
};
|
|
454
|
+
}
|
|
455
|
+
function legendColor(el) {
|
|
456
|
+
if (!("color" in el) || el.color === "ink") return null;
|
|
457
|
+
if (el.kind === "note" && el.color === WHITEBOARD_NOTE_COLOR) return null;
|
|
458
|
+
return el.color;
|
|
459
|
+
}
|
|
423
460
|
var SHAPE_STROKE = 2;
|
|
424
461
|
var ARROW_STROKE = 2;
|
|
425
462
|
var ARROW_HEAD_LEN = 12;
|
|
@@ -632,9 +669,21 @@ function renderWhiteboard(container, parsed, palette, isDark, options = {}) {
|
|
|
632
669
|
const contentH = b.maxY - b.minY;
|
|
633
670
|
const titleW = showTitle ? measureText(parsed.title, TITLE_FONT_SIZE, { bold: true }) : 0;
|
|
634
671
|
const width = Math.ceil(Math.max(contentW, titleW) + 2 * WHITEBOARD_MARGIN);
|
|
635
|
-
const
|
|
672
|
+
const legend = whiteboardLegend(parsed, elements, colorOf);
|
|
673
|
+
const legendConfig = legend && {
|
|
674
|
+
groups: [legend.group],
|
|
675
|
+
position: {
|
|
676
|
+
placement: "top-center",
|
|
677
|
+
titleRelation: "below-title"
|
|
678
|
+
},
|
|
679
|
+
mode: "export"
|
|
680
|
+
};
|
|
681
|
+
const legendOffset = legendConfig ? getMaxLegendReservedHeight(legendConfig, width) + LEGEND_GAP : 0;
|
|
682
|
+
const height = Math.ceil(
|
|
683
|
+
contentH + 2 * WHITEBOARD_MARGIN + titleOffset + legendOffset
|
|
684
|
+
);
|
|
636
685
|
const tx = WHITEBOARD_MARGIN - b.minX + (width - 2 * WHITEBOARD_MARGIN - contentW) / 2;
|
|
637
|
-
const ty = WHITEBOARD_MARGIN + titleOffset - b.minY;
|
|
686
|
+
const ty = WHITEBOARD_MARGIN + titleOffset + legendOffset - b.minY;
|
|
638
687
|
d3.select(container).selectAll("*").remove();
|
|
639
688
|
const svg = d3.select(container).append("svg").attr("width", width).attr("height", height).attr("viewBox", `0 0 ${width} ${height}`).style("font-family", FONT_FAMILY);
|
|
640
689
|
if (showTitle) {
|
|
@@ -646,6 +695,17 @@ function renderWhiteboard(container, parsed, palette, isDark, options = {}) {
|
|
|
646
695
|
palette.text
|
|
647
696
|
);
|
|
648
697
|
}
|
|
698
|
+
if (legend && legendConfig) {
|
|
699
|
+
const legendG = svg.append("g").attr("class", "whiteboard-legend").attr("transform", `translate(0,${titleOffset + WHITEBOARD_MARGIN / 2})`);
|
|
700
|
+
if (!legend.named) legendG.attr("opacity", LEGEND_FAINT_OPACITY);
|
|
701
|
+
renderIntegratedLegend(legendG, {
|
|
702
|
+
...legendConfig,
|
|
703
|
+
activeGroup: legend.group.name,
|
|
704
|
+
palette,
|
|
705
|
+
isDark,
|
|
706
|
+
width
|
|
707
|
+
});
|
|
708
|
+
}
|
|
649
709
|
const canvas = svg.append("g").attr("class", "whiteboard-canvas").attr("transform", `translate(${round2(tx)},${round2(ty)})`);
|
|
650
710
|
const halo = palette.bg;
|
|
651
711
|
const centredLabel = (g, { lines, font }, cx, cy, color, ground) => {
|
|
@@ -671,6 +731,8 @@ function renderWhiteboard(container, parsed, palette, isDark, options = {}) {
|
|
|
671
731
|
};
|
|
672
732
|
const drawElement = (el) => {
|
|
673
733
|
const g = canvas.append("g").attr("class", `whiteboard-${el.kind === "shape" ? el.shape : el.kind}`).attr("data-line-number", el.lineNumber);
|
|
734
|
+
const lc = legend && legendColor(el);
|
|
735
|
+
if (lc) g.attr("data-wb-meaning", legend.entryOf.get(lc) ?? "");
|
|
674
736
|
switch (el.kind) {
|
|
675
737
|
case "shape": {
|
|
676
738
|
const hue = colorOf(el.color);
|
package/dist/clock.js
CHANGED
|
@@ -196,6 +196,174 @@ function handAngles(h, m, s) {
|
|
|
196
196
|
};
|
|
197
197
|
}
|
|
198
198
|
|
|
199
|
+
// src/colors.ts
|
|
200
|
+
var nord = {
|
|
201
|
+
// Polar Night (dark)
|
|
202
|
+
nord0: "#2e3440",
|
|
203
|
+
nord1: "#3b4252",
|
|
204
|
+
nord2: "#434c5e",
|
|
205
|
+
nord3: "#4c566a",
|
|
206
|
+
// Snow Storm (light)
|
|
207
|
+
nord4: "#d8dee9",
|
|
208
|
+
nord5: "#e5e9f0",
|
|
209
|
+
nord6: "#eceff4",
|
|
210
|
+
// Frost (accent blues)
|
|
211
|
+
nord7: "#8fbcbb",
|
|
212
|
+
nord8: "#88c0d0",
|
|
213
|
+
nord9: "#81a1c1",
|
|
214
|
+
nord10: "#5e81ac",
|
|
215
|
+
// Aurora (colors)
|
|
216
|
+
nord11: "#bf616a",
|
|
217
|
+
// red
|
|
218
|
+
nord12: "#d08770",
|
|
219
|
+
// orange
|
|
220
|
+
nord13: "#ebcb8b",
|
|
221
|
+
// yellow
|
|
222
|
+
nord14: "#a3be8c",
|
|
223
|
+
// green
|
|
224
|
+
nord15: "#b48ead"
|
|
225
|
+
// purple
|
|
226
|
+
};
|
|
227
|
+
var colorNames = {
|
|
228
|
+
red: nord.nord11,
|
|
229
|
+
orange: nord.nord12,
|
|
230
|
+
yellow: nord.nord13,
|
|
231
|
+
green: nord.nord14,
|
|
232
|
+
blue: nord.nord10,
|
|
233
|
+
purple: nord.nord15,
|
|
234
|
+
teal: nord.nord7,
|
|
235
|
+
cyan: nord.nord8,
|
|
236
|
+
gray: nord.nord3,
|
|
237
|
+
black: nord.nord0,
|
|
238
|
+
white: nord.nord6
|
|
239
|
+
};
|
|
240
|
+
var RECOGNIZED_COLOR_NAMES = Object.freeze([
|
|
241
|
+
"red",
|
|
242
|
+
"orange",
|
|
243
|
+
"yellow",
|
|
244
|
+
"green",
|
|
245
|
+
"blue",
|
|
246
|
+
"purple",
|
|
247
|
+
"teal",
|
|
248
|
+
"cyan",
|
|
249
|
+
"gray",
|
|
250
|
+
"black",
|
|
251
|
+
"white"
|
|
252
|
+
]);
|
|
253
|
+
var CATEGORICAL_COLOR_ORDER = Object.freeze([
|
|
254
|
+
"red",
|
|
255
|
+
"green",
|
|
256
|
+
"blue",
|
|
257
|
+
"yellow",
|
|
258
|
+
"teal",
|
|
259
|
+
"purple",
|
|
260
|
+
"orange",
|
|
261
|
+
"cyan"
|
|
262
|
+
]);
|
|
263
|
+
var INVALID_CSS_COLOR_HEX = Object.freeze({
|
|
264
|
+
pink: "#ffc0cb",
|
|
265
|
+
hotpink: "#ff69b4",
|
|
266
|
+
deeppink: "#ff1493",
|
|
267
|
+
lightpink: "#ffb6c1",
|
|
268
|
+
palevioletred: "#db7093",
|
|
269
|
+
crimson: "#dc143c",
|
|
270
|
+
scarlet: "#ff2400",
|
|
271
|
+
firebrick: "#b22222",
|
|
272
|
+
darkred: "#8b0000",
|
|
273
|
+
maroon: "#800000",
|
|
274
|
+
salmon: "#fa8072",
|
|
275
|
+
lightsalmon: "#ffa07a",
|
|
276
|
+
darksalmon: "#e9967a",
|
|
277
|
+
coral: "#ff7f50",
|
|
278
|
+
lightcoral: "#f08080",
|
|
279
|
+
tomato: "#ff6347",
|
|
280
|
+
orangered: "#ff4500",
|
|
281
|
+
darkorange: "#ff8c00",
|
|
282
|
+
gold: "#ffd700",
|
|
283
|
+
goldenrod: "#daa520",
|
|
284
|
+
darkgoldenrod: "#b8860b",
|
|
285
|
+
khaki: "#f0e68c",
|
|
286
|
+
darkkhaki: "#bdb76b",
|
|
287
|
+
amber: "#ffbf00",
|
|
288
|
+
lavender: "#e6e6fa",
|
|
289
|
+
violet: "#ee82ee",
|
|
290
|
+
magenta: "#ff00ff",
|
|
291
|
+
fuchsia: "#ff00ff",
|
|
292
|
+
orchid: "#da70d6",
|
|
293
|
+
plum: "#dda0dd",
|
|
294
|
+
indigo: "#4b0082",
|
|
295
|
+
navy: "#000080",
|
|
296
|
+
midnightblue: "#191970",
|
|
297
|
+
darkblue: "#00008b",
|
|
298
|
+
mediumblue: "#0000cd",
|
|
299
|
+
royalblue: "#4169e1",
|
|
300
|
+
cornflowerblue: "#6495ed",
|
|
301
|
+
dodgerblue: "#1e90ff",
|
|
302
|
+
deepskyblue: "#00bfff",
|
|
303
|
+
skyblue: "#87ceeb",
|
|
304
|
+
lightskyblue: "#87cefa",
|
|
305
|
+
lightblue: "#add8e6",
|
|
306
|
+
powderblue: "#b0e0e6",
|
|
307
|
+
steelblue: "#4682b4",
|
|
308
|
+
slateblue: "#6a5acd",
|
|
309
|
+
cadetblue: "#5f9ea0",
|
|
310
|
+
turquoise: "#40e0d0",
|
|
311
|
+
aqua: "#00ffff",
|
|
312
|
+
aquamarine: "#7fffd4",
|
|
313
|
+
lime: "#00ff00",
|
|
314
|
+
limegreen: "#32cd32",
|
|
315
|
+
lightgreen: "#90ee90",
|
|
316
|
+
palegreen: "#98fb98",
|
|
317
|
+
seagreen: "#2e8b57",
|
|
318
|
+
mediumseagreen: "#3cb371",
|
|
319
|
+
forestgreen: "#228b22",
|
|
320
|
+
darkgreen: "#006400",
|
|
321
|
+
olive: "#808000",
|
|
322
|
+
olivedrab: "#6b8e23",
|
|
323
|
+
darkolivegreen: "#556b2f",
|
|
324
|
+
chartreuse: "#7fff00",
|
|
325
|
+
lawngreen: "#7cfc00",
|
|
326
|
+
springgreen: "#00ff7f",
|
|
327
|
+
greenyellow: "#adff2f",
|
|
328
|
+
brown: "#a52a2a",
|
|
329
|
+
sienna: "#a0522d",
|
|
330
|
+
chocolate: "#d2691e",
|
|
331
|
+
peru: "#cd853f",
|
|
332
|
+
tan: "#d2b48c",
|
|
333
|
+
beige: "#f5f5dc",
|
|
334
|
+
wheat: "#f5deb3",
|
|
335
|
+
ivory: "#fffff0",
|
|
336
|
+
silver: "#c0c0c0",
|
|
337
|
+
lightgray: "#d3d3d3",
|
|
338
|
+
lightgrey: "#d3d3d3",
|
|
339
|
+
darkgray: "#a9a9a9",
|
|
340
|
+
darkgrey: "#a9a9a9",
|
|
341
|
+
dimgray: "#696969",
|
|
342
|
+
dimgrey: "#696969",
|
|
343
|
+
slategray: "#708090",
|
|
344
|
+
slategrey: "#708090",
|
|
345
|
+
gainsboro: "#dcdcdc",
|
|
346
|
+
grey: "#808080"
|
|
347
|
+
});
|
|
348
|
+
var seriesColors = [
|
|
349
|
+
nord.nord10,
|
|
350
|
+
// blue
|
|
351
|
+
nord.nord14,
|
|
352
|
+
// green
|
|
353
|
+
nord.nord13,
|
|
354
|
+
// yellow
|
|
355
|
+
nord.nord12,
|
|
356
|
+
// orange
|
|
357
|
+
nord.nord15,
|
|
358
|
+
// purple
|
|
359
|
+
nord.nord11,
|
|
360
|
+
// red
|
|
361
|
+
nord.nord7,
|
|
362
|
+
// teal
|
|
363
|
+
nord.nord8
|
|
364
|
+
// light blue
|
|
365
|
+
];
|
|
366
|
+
|
|
199
367
|
// src/palettes/color-utils.ts
|
|
200
368
|
var MIX_CACHE = /* @__PURE__ */ new Map();
|
|
201
369
|
var MIX_CACHE_MAX = 5e3;
|