@pb33f/cowboy-components 0.12.0 → 0.12.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/dist/{_basePickBy-DutEHqAt.js → _basePickBy-DzbyLhrS.js} +2 -2
  2. package/dist/{_baseUniq-BaFN6LLe.js → _baseUniq-BaMlJaXC.js} +1 -1
  3. package/dist/{arc-C_BQqdHh.js → arc-CwbDNuoS.js} +1 -1
  4. package/dist/{architecture-U656AL7Q-DBJtTFqh.js → architecture-U656AL7Q-hA_jODHW.js} +1 -1
  5. package/dist/{architectureDiagram-VXUJARFQ-Duxne8BG.js → architectureDiagram-VXUJARFQ-BpOZDfV2.js} +3 -3
  6. package/dist/{blockDiagram-VD42YOAC-a8IAc1p-.js → blockDiagram-VD42YOAC-DvwLmxQa.js} +5 -5
  7. package/dist/{c4Diagram-YG6GDRKO-DKHf3S5X.js → c4Diagram-YG6GDRKO-I84KTC03.js} +2 -2
  8. package/dist/{channel-BrDRjKFM.js → channel-Czyy2YF7.js} +1 -1
  9. package/dist/{chunk-4BX2VUAB-rO4gQTSn.js → chunk-4BX2VUAB-Cax8rgH-.js} +1 -1
  10. package/dist/{chunk-55IACEB6-xU7M_-1z.js → chunk-55IACEB6-CrdTf2pk.js} +1 -1
  11. package/dist/{chunk-B4BG7PRW-CyCVBhx8.js → chunk-B4BG7PRW-DVw-G-FD.js} +4 -4
  12. package/dist/{chunk-DI55MBZ5-BVWDssHd.js → chunk-DI55MBZ5-_nf_Thmu.js} +3 -3
  13. package/dist/{chunk-FMBD7UC4-C2BHhXyD.js → chunk-FMBD7UC4-DpzzxPYV.js} +1 -1
  14. package/dist/{chunk-QN33PNHL-CF8FtUjq.js → chunk-QN33PNHL-BOcC9xla.js} +1 -1
  15. package/dist/{chunk-QZHKN3VN-C76zdhmt.js → chunk-QZHKN3VN-CmrJpkO9.js} +1 -1
  16. package/dist/{chunk-TZMSLE5B-DDfh65h7.js → chunk-TZMSLE5B-Dsr5RxRa.js} +1 -1
  17. package/dist/{classDiagram-v2-WZHVMYZB-Dqqym7_Y.js → classDiagram-2ON5EDUG-vUMqQti2.js} +2 -2
  18. package/dist/{classDiagram-2ON5EDUG-Dqqym7_Y.js → classDiagram-v2-WZHVMYZB-vUMqQti2.js} +2 -2
  19. package/dist/{clone-Ciuvzcw5.js → clone-CAtTIGp5.js} +1 -1
  20. package/dist/components/charts/beefy-chart.d.ts +4 -1
  21. package/dist/components/charts/beefy-chart.js +25 -5
  22. package/dist/components/charts/chart-colors.d.ts +7 -1
  23. package/dist/components/charts/chart-colors.js +30 -2
  24. package/dist/components/charts/doughnut-chart.js +5 -5
  25. package/dist/components/details-drawer/handlers/diagram-handler.js +11 -4
  26. package/dist/components/editor/editor.d.ts +1 -1
  27. package/dist/components/editor/editor.js +185 -19
  28. package/dist/components/mermaid/mermaid-renderer.d.ts +2 -1
  29. package/dist/components/the-doctor/settings.js +2 -3
  30. package/dist/components/the-doctor/sparks.d.ts +1 -1
  31. package/dist/components/the-doctor/sparks.js +10 -5
  32. package/dist/components/theme-switcher/theme-switcher.css.js +13 -2
  33. package/dist/components/theme-switcher/theme-switcher.d.ts +7 -1
  34. package/dist/components/theme-switcher/theme-switcher.js +62 -39
  35. package/dist/components/time-vortex/timeline-view.css.js +11 -0
  36. package/dist/components/time-vortex/timeline-view.js +0 -1
  37. package/dist/components/waiting-line/waiting-line.d.ts +1 -1
  38. package/dist/components/waiting-line/waiting-line.js +14 -4
  39. package/dist/{cose-bilkent-S5V4N54A-B6YhG0jQ.js → cose-bilkent-S5V4N54A-BEwcesj_.js} +1 -1
  40. package/dist/{cowboy-components-B-_nREEs.js → cowboy-components-Cusus7mi.js} +7238 -6897
  41. package/dist/cowboy-components.css +1 -1
  42. package/dist/cowboy-components.umd.cjs +672 -635
  43. package/dist/css/cowboy-components.css +13 -0
  44. package/dist/css/pb33f-theme.css +154 -0
  45. package/dist/{dagre-6UL2VRFP-DgD6IJ9F.js → dagre-6UL2VRFP-BEKeghI5.js} +6 -6
  46. package/dist/{diagram-PSM6KHXK-C6Ify0Ii.js → diagram-PSM6KHXK-CT125TLP.js} +4 -4
  47. package/dist/{diagram-QEK2KX5R-BZYBfJWN.js → diagram-QEK2KX5R-BsqdENWm.js} +3 -3
  48. package/dist/{diagram-S2PKOQOG-pD2aZK6J.js → diagram-S2PKOQOG-DePyu16g.js} +3 -3
  49. package/dist/{erDiagram-Q2GNP2WA-CLzSou8D.js → erDiagram-Q2GNP2WA-BjO3hLOb.js} +4 -4
  50. package/dist/events/theme.d.ts +2 -1
  51. package/dist/{flowDiagram-NV44I4VS-Dv-mV3jC.js → flowDiagram-NV44I4VS-DBFku48N.js} +5 -5
  52. package/dist/{ganttDiagram-LVOFAZNH-9caw7-W9.js → ganttDiagram-LVOFAZNH-X0DmX_SW.js} +2 -2
  53. package/dist/{gitGraph-F6HP7TQM-BXi9VWGG.js → gitGraph-F6HP7TQM-BgJEyqnq.js} +1 -1
  54. package/dist/{gitGraphDiagram-NY62KEGX-AjRVeBfh.js → gitGraphDiagram-NY62KEGX-C0pwARlH.js} +4 -4
  55. package/dist/{graph-CQfZU7JF.js → graph-DeER36N7.js} +2 -2
  56. package/dist/info-NVLQJR56-CbAh6YG1.js +5 -0
  57. package/dist/{infoDiagram-F6ZHWCRC-Db-l9t59.js → infoDiagram-F6ZHWCRC-CZA94P9L.js} +2 -2
  58. package/dist/{journeyDiagram-XKPGCS4Q-Bzsre_OA.js → journeyDiagram-XKPGCS4Q-lxw2t8ny.js} +4 -4
  59. package/dist/{kanban-definition-3W4ZIXB7-DNQ1RxWM.js → kanban-definition-3W4ZIXB7-uVaoSOMg.js} +2 -2
  60. package/dist/{layout-DWA7jiRR.js → layout-DnK6hXfH.js} +4 -4
  61. package/dist/{linear-D4cCLhR2.js → linear-B0IEARL2.js} +1 -1
  62. package/dist/{mermaid-parser.core-DVD4vgd2.js → mermaid-parser.core-BWH1OLmB.js} +11 -11
  63. package/dist/{mindmap-definition-VGOIOE7T-CCwE02s8.js → mindmap-definition-VGOIOE7T-6Txj5nPI.js} +3 -3
  64. package/dist/{packet-BFZMPI3H-BEUG4mf5.js → packet-BFZMPI3H-DgmYD-C1.js} +1 -1
  65. package/dist/pie-7BOR55EZ-WB5WTpXD.js +5 -0
  66. package/dist/{pieDiagram-ADFJNKIX-DGK58sb4.js → pieDiagram-ADFJNKIX-IUOdZwUm.js} +4 -4
  67. package/dist/{quadrantDiagram-AYHSOK5B-rVXhriiY.js → quadrantDiagram-AYHSOK5B-DdyAmAVM.js} +2 -2
  68. package/dist/radar-NHE76QYJ-CyDhShCS.js +5 -0
  69. package/dist/{requirementDiagram-UZGBJVZJ-C6FZbh4u.js → requirementDiagram-UZGBJVZJ-CZMqFmBI.js} +3 -3
  70. package/dist/{sankeyDiagram-TZEHDZUN-5wCrQhOL.js → sankeyDiagram-TZEHDZUN-BN7hCyWq.js} +1 -1
  71. package/dist/{sequenceDiagram-WL72ISMW-Da2nlEu9.js → sequenceDiagram-WL72ISMW-D6__7664.js} +3 -3
  72. package/dist/services/mermaid-config-service.d.ts +3 -1
  73. package/dist/services/mermaid-config-service.js +120 -3
  74. package/dist/{stateDiagram-FKZM4ZOC-Bq-_ilzh.js → stateDiagram-FKZM4ZOC-DcpsDD6g.js} +4 -4
  75. package/dist/{stateDiagram-v2-4FDKWEC3-BBFdw24E.js → stateDiagram-v2-4FDKWEC3-B4SCFl2k.js} +2 -2
  76. package/dist/{timeline-definition-IT6M3QCI-DOQnDEPa.js → timeline-definition-IT6M3QCI-Bhu_dDqY.js} +2 -2
  77. package/dist/{treemap-KMMF4GRG-DxIiGKv_.js → treemap-KMMF4GRG-DgXPV_Em.js} +1 -1
  78. package/dist/{xychartDiagram-PRI3JC2R-BNEydtiO.js → xychartDiagram-PRI3JC2R-2pudDsH5.js} +2 -2
  79. package/package.json +1 -1
  80. package/dist/info-NVLQJR56-DZ6YZtba.js +0 -5
  81. package/dist/pie-7BOR55EZ-BYgfM_sP.js +0 -5
  82. package/dist/radar-NHE76QYJ-paBTVy27.js +0 -5
@@ -1,5 +1,5 @@
1
- import { e as x, c as O, g as m, k as P, h as p, j as w, l as A, m as c, n as I, t as N, o as E } from "./_baseUniq-BaFN6LLe.js";
2
- import { aR as g, aA as F, aS as M, aT as T, aU as _, aV as l, aW as $, aX as B, aY as S, aZ as y } from "./cowboy-components-B-_nREEs.js";
1
+ import { e as x, c as O, g as m, k as P, h as p, j as w, l as A, m as c, n as I, t as N, o as E } from "./_baseUniq-BaMlJaXC.js";
2
+ import { aR as g, aA as F, aS as M, aT as T, aU as _, aV as l, aW as $, aX as B, aY as S, aZ as y } from "./cowboy-components-Cusus7mi.js";
3
3
  var R = /\s/;
4
4
  function G(n) {
5
5
  for (var r = n.length; r-- && R.test(n.charAt(r)); )
@@ -1,4 +1,4 @@
1
- import { be as S, bf as Rn, aW as T, bg as w, bh as xn, bi as mn, aV as sn, bj as Mn, bk as un, bl as x, aT as U, bm as Cn, bn as on, bo as Fn, bp as E, bc as gn, bq as R, aR as ln, br as Dn, bs as D, bt as Gn, bu as Un, bv as _, aZ as Bn, bw as Nn, aU as Kn, bx as X, by as jn, bz as Hn, aY as qn, aX as cn, ba as Yn, bA as M } from "./cowboy-components-B-_nREEs.js";
1
+ import { be as S, bf as Rn, aW as T, bg as w, bh as xn, bi as mn, aV as sn, bj as Mn, bk as un, bl as x, aT as U, bm as Cn, bn as on, bo as Fn, bp as E, bc as gn, bq as R, aR as ln, br as Dn, bs as D, bt as Gn, bu as Un, bv as _, aZ as Bn, bw as Nn, aU as Kn, bx as X, by as jn, bz as Hn, aY as qn, aX as cn, ba as Yn, bA as M } from "./cowboy-components-Cusus7mi.js";
2
2
  var Zn = "[object Symbol]";
3
3
  function B(n) {
4
4
  return typeof n == "symbol" || S(n) && Rn(n) == Zn;
@@ -1,4 +1,4 @@
1
- import { a0 as ln, a1 as an, a2 as y, a3 as tn, a4 as H, a5 as q, a6 as _, a7 as un, a8 as B, a9 as rn, aa as L, ab as o, ac as sn, ad as on, ae as fn } from "./cowboy-components-B-_nREEs.js";
1
+ import { a0 as ln, a1 as an, a2 as y, a3 as tn, a4 as H, a5 as q, a6 as _, a7 as un, a8 as B, a9 as rn, aa as L, ab as o, ac as sn, ad as on, ae as fn } from "./cowboy-components-Cusus7mi.js";
2
2
  function cn(l) {
3
3
  return l.innerRadius;
4
4
  }
@@ -1,4 +1,4 @@
1
- import { A as c, e as t } from "./mermaid-parser.core-DVD4vgd2.js";
1
+ import { A as c, e as t } from "./mermaid-parser.core-BWH1OLmB.js";
2
2
  export {
3
3
  c as ArchitectureModule,
4
4
  t as createArchitectureServices
@@ -1,6 +1,6 @@
1
- import { aI as ke, _ as dt, H as Ze, V as qe, l as Se, b as Qe, a as Je, p as Ke, q as je, g as _e, s as tr, y as er, D as rr, E as ir, F as ar, c as Ee, ak as me, aJ as pe, i as nr, d as or, x as sr, aK as hr, aL as lr } from "./cowboy-components-B-_nREEs.js";
2
- import { p as fr } from "./chunk-4BX2VUAB-rO4gQTSn.js";
3
- import { p as cr } from "./mermaid-parser.core-DVD4vgd2.js";
1
+ import { aI as ke, _ as dt, H as Ze, V as qe, l as Se, b as Qe, a as Je, p as Ke, q as je, g as _e, s as tr, y as er, D as rr, E as ir, F as ar, c as Ee, ak as me, aJ as pe, i as nr, d as or, x as sr, aK as hr, aL as lr } from "./cowboy-components-Cusus7mi.js";
2
+ import { p as fr } from "./chunk-4BX2VUAB-Cax8rgH-.js";
3
+ import { p as cr } from "./mermaid-parser.core-BWH1OLmB.js";
4
4
  import { c as Fe } from "./cytoscape.esm-DfdJODL8.js";
5
5
  var he = { exports: {} }, le = { exports: {} }, fe = { exports: {} }, gr = fe.exports, we;
6
6
  function ur() {
@@ -1,8 +1,8 @@
1
- import { g as oe } from "./chunk-FMBD7UC4-C2BHhXyD.js";
2
- import { _ as d, E as rt, d as O, e as he, l as L, y as de, A as ge, c as R, ai as ue, R as pe, S as fe, O as xe, aj as j, ak as Wt, al as ye, u as $, k as be, am as we, an as xt, i as yt, ao as me } from "./cowboy-components-B-_nREEs.js";
3
- import { c as Le } from "./clone-Ciuvzcw5.js";
4
- import { G as Se } from "./graph-CQfZU7JF.js";
5
- import { c as ke } from "./channel-BrDRjKFM.js";
1
+ import { g as oe } from "./chunk-FMBD7UC4-DpzzxPYV.js";
2
+ import { _ as d, E as rt, d as O, e as he, l as L, y as de, A as ge, c as R, ai as ue, R as pe, S as fe, O as xe, aj as j, ak as Wt, al as ye, u as $, k as be, am as we, an as xt, i as yt, ao as me } from "./cowboy-components-Cusus7mi.js";
3
+ import { c as Le } from "./clone-CAtTIGp5.js";
4
+ import { G as Se } from "./graph-DeER36N7.js";
5
+ import { c as ke } from "./channel-Czyy2YF7.js";
6
6
  var bt = (function() {
7
7
  var e = /* @__PURE__ */ d(function(D, y, g, f) {
8
8
  for (g = g || {}, f = D.length; f--; g[D[f]] = y) ;
@@ -1,5 +1,5 @@
1
- import { g as Se, d as De } from "./chunk-TZMSLE5B-DDfh65h7.js";
2
- import { _ as g, s as Pe, g as Be, a as Ie, b as Me, c as Bt, d as jt, l as de, e as Le, f as Ne, h as Tt, i as ge, j as Ye, w as je, k as $t, m as fe } from "./cowboy-components-B-_nREEs.js";
1
+ import { g as Se, d as De } from "./chunk-TZMSLE5B-Dsr5RxRa.js";
2
+ import { _ as g, s as Pe, g as Be, a as Ie, b as Me, c as Bt, d as jt, l as de, e as Le, f as Ne, h as Tt, i as ge, j as Ye, w as je, k as $t, m as fe } from "./cowboy-components-Cusus7mi.js";
3
3
  var Ft = (function() {
4
4
  var e = /* @__PURE__ */ g(function(_t, x, m, v) {
5
5
  for (m = m || {}, v = _t.length; v--; m[_t[v]] = x) ;
@@ -1,4 +1,4 @@
1
- import { ap as o, aq as n } from "./cowboy-components-B-_nREEs.js";
1
+ import { ap as o, aq as n } from "./cowboy-components-Cusus7mi.js";
2
2
  const t = (a, r) => o.lang.round(n.parse(a)[r]);
3
3
  export {
4
4
  t as c
@@ -1,4 +1,4 @@
1
- import { _ as i } from "./cowboy-components-B-_nREEs.js";
1
+ import { _ as i } from "./cowboy-components-Cusus7mi.js";
2
2
  function t(c, e) {
3
3
  c.accDescr && e.setAccDescription?.(c.accDescr), c.accTitle && e.setAccTitle?.(c.accTitle), c.title && e.setDiagramTitle?.(c.title);
4
4
  }
@@ -1,4 +1,4 @@
1
- import { _ as a, d as o } from "./cowboy-components-B-_nREEs.js";
1
+ import { _ as a, d as o } from "./cowboy-components-Cusus7mi.js";
2
2
  var d = /* @__PURE__ */ a((t, e) => {
3
3
  let n;
4
4
  return e === "sandbox" && (n = o("#i" + t)), (e === "sandbox" ? o(n.nodes()[0].contentDocument.body) : o("body")).select(`[id="${t}"]`);
@@ -1,7 +1,7 @@
1
- import { g as et } from "./chunk-FMBD7UC4-C2BHhXyD.js";
2
- import { g as tt } from "./chunk-55IACEB6-xU7M_-1z.js";
3
- import { s as st } from "./chunk-QN33PNHL-CF8FtUjq.js";
4
- import { _ as A, l as Oe, c as D, o as it, r as at, u as we, d as ee, b as nt, a as rt, s as ut, g as lt, p as ot, q as ct, k as v, y as ht, x as dt, i as pt, Q as R } from "./cowboy-components-B-_nREEs.js";
1
+ import { g as et } from "./chunk-FMBD7UC4-DpzzxPYV.js";
2
+ import { g as tt } from "./chunk-55IACEB6-CrdTf2pk.js";
3
+ import { s as st } from "./chunk-QN33PNHL-BOcC9xla.js";
4
+ import { _ as A, l as Oe, c as D, o as it, r as at, u as we, d as ee, b as nt, a as rt, s as ut, g as lt, p as ot, q as ct, k as v, y as ht, x as dt, i as pt, Q as R } from "./cowboy-components-Cusus7mi.js";
5
5
  var Ve = (function() {
6
6
  var s = /* @__PURE__ */ A(function(I, o, c, d) {
7
7
  for (c = c || {}, d = I.length; d--; c[I[d]] = o) ;
@@ -1,6 +1,6 @@
1
- import { g as te } from "./chunk-55IACEB6-xU7M_-1z.js";
2
- import { s as ee } from "./chunk-QN33PNHL-CF8FtUjq.js";
3
- import { _ as u, l as b, c as w, r as se, u as ie, a as re, b as ae, g as ne, s as oe, p as le, q as ce, T as he, k as U, y as ue } from "./cowboy-components-B-_nREEs.js";
1
+ import { g as te } from "./chunk-55IACEB6-CrdTf2pk.js";
2
+ import { s as ee } from "./chunk-QN33PNHL-BOcC9xla.js";
3
+ import { _ as u, l as b, c as w, r as se, u as ie, a as re, b as ae, g as ne, s as oe, p as le, q as ce, T as he, k as U, y as ue } from "./cowboy-components-Cusus7mi.js";
4
4
  var vt = (function() {
5
5
  var t = /* @__PURE__ */ u(function(Y, o, c, n) {
6
6
  for (c = c || {}, n = Y.length; n--; c[Y[n]] = o) ;
@@ -1,4 +1,4 @@
1
- import { _ as e } from "./cowboy-components-B-_nREEs.js";
1
+ import { _ as e } from "./cowboy-components-Cusus7mi.js";
2
2
  var l = /* @__PURE__ */ e(() => `
3
3
  /* Font Awesome icon styling - consolidated */
4
4
  .label-icon {
@@ -1,4 +1,4 @@
1
- import { _ as a, e as w, l as x } from "./cowboy-components-B-_nREEs.js";
1
+ import { _ as a, e as w, l as x } from "./cowboy-components-Cusus7mi.js";
2
2
  var d = /* @__PURE__ */ a((e, t, i, r) => {
3
3
  e.attr("class", i);
4
4
  const { width: o, height: h, x: n, y: c } = u(e, t);
@@ -1,4 +1,4 @@
1
- import { _ as s } from "./cowboy-components-B-_nREEs.js";
1
+ import { _ as s } from "./cowboy-components-Cusus7mi.js";
2
2
  var t, e = (t = class {
3
3
  /**
4
4
  * @param init - Function that creates the default state.
@@ -1,4 +1,4 @@
1
- import { _ as n, U as o, j as l } from "./cowboy-components-B-_nREEs.js";
1
+ import { _ as n, U as o, j as l } from "./cowboy-components-Cusus7mi.js";
2
2
  var x = /* @__PURE__ */ n((s, t) => {
3
3
  const e = s.append("rect");
4
4
  if (e.attr("x", t.x), e.attr("y", t.y), e.attr("fill", t.fill), e.attr("stroke", t.stroke), e.attr("width", t.width), e.attr("height", t.height), t.name && e.attr("name", t.name), t.rx && e.attr("rx", t.rx), t.ry && e.attr("ry", t.ry), t.attrs !== void 0)
@@ -1,5 +1,5 @@
1
- import { s as r, c as s, a as e, C as t } from "./chunk-B4BG7PRW-CyCVBhx8.js";
2
- import { _ as l } from "./cowboy-components-B-_nREEs.js";
1
+ import { s as r, c as s, a as e, C as t } from "./chunk-B4BG7PRW-DVw-G-FD.js";
2
+ import { _ as l } from "./cowboy-components-Cusus7mi.js";
3
3
  var d = {
4
4
  parser: e,
5
5
  get db() {
@@ -1,5 +1,5 @@
1
- import { s as r, c as s, a as e, C as t } from "./chunk-B4BG7PRW-CyCVBhx8.js";
2
- import { _ as l } from "./cowboy-components-B-_nREEs.js";
1
+ import { s as r, c as s, a as e, C as t } from "./chunk-B4BG7PRW-DVw-G-FD.js";
2
+ import { _ as l } from "./cowboy-components-Cusus7mi.js";
3
3
  var d = {
4
4
  parser: e,
5
5
  get db() {
@@ -1,4 +1,4 @@
1
- import { b as r } from "./_baseUniq-BaFN6LLe.js";
1
+ import { b as r } from "./_baseUniq-BaMlJaXC.js";
2
2
  var e = 4;
3
3
  function a(o) {
4
4
  return r(o, e);
@@ -12,10 +12,13 @@ export declare class BeefyChart extends Colorful {
12
12
  width: number;
13
13
  stepSize: number;
14
14
  chartType: any;
15
- chart: Chart;
15
+ chart: Chart | null;
16
16
  constructor();
17
17
  updateChart(): void;
18
18
  buildChart(): void;
19
+ connectedCallback(): void;
20
+ disconnectedCallback(): void;
21
+ resize(): void;
19
22
  firstUpdated(): void;
20
23
  updated(changedProperties: Map<string, unknown>): void;
21
24
  render(): import("lit-html").TemplateResult<1>;
@@ -14,7 +14,6 @@ let BeefyChart = class BeefyChart extends Colorful {
14
14
  this.title = 'chart';
15
15
  this.legend = false;
16
16
  this.height = 458;
17
- this.width = 800;
18
17
  this.smallTitle = false;
19
18
  this.stepSize = 1;
20
19
  this.chartType = 'line';
@@ -42,6 +41,7 @@ let BeefyChart = class BeefyChart extends Colorful {
42
41
  },
43
42
  options: {
44
43
  responsive: true,
44
+ maintainAspectRatio: false,
45
45
  elements: {
46
46
  point: {
47
47
  borderColor: this.secondary,
@@ -107,6 +107,22 @@ let BeefyChart = class BeefyChart extends Colorful {
107
107
  }
108
108
  });
109
109
  }
110
+ connectedCallback() {
111
+ super.connectedCallback();
112
+ if (!this.chart && this.hasUpdated) {
113
+ this.updateComplete.then(() => this.buildChart());
114
+ }
115
+ }
116
+ disconnectedCallback() {
117
+ super.disconnectedCallback();
118
+ if (this.chart) {
119
+ this.chart.destroy();
120
+ this.chart = null;
121
+ }
122
+ }
123
+ resize() {
124
+ this.chart?.resize();
125
+ }
110
126
  firstUpdated() {
111
127
  super.firstUpdated();
112
128
  this.buildChart();
@@ -118,16 +134,20 @@ let BeefyChart = class BeefyChart extends Colorful {
118
134
  }
119
135
  render() {
120
136
  return html `
121
- <canvas id="chart" style="width: ${this.width}px; height: ${this.height}px; "></canvas>
137
+ <div class="chart-container" style="height: ${this.height}px;${this.width ? ` max-width: ${this.width}px;` : ''}">
138
+ <canvas id="chart" style="width: 100%; height: ${this.height}px;"></canvas>
139
+ </div>
122
140
  `;
123
141
  }
124
142
  };
125
143
  BeefyChart.styles = css `
126
144
  :host {
127
- display: block; /* ensures the host takes up space */
128
- /* Optionally, set explicit dimensions if needed */
145
+ display: block;
146
+ width: 100%;
147
+ }
148
+ .chart-container {
149
+ position: relative;
129
150
  width: 100%;
130
-
131
151
  }`;
132
152
  __decorate([
133
153
  property()
@@ -1,5 +1,6 @@
1
1
  import { LitElement } from "lit";
2
2
  import { Color, FontSpec } from "chart.js/auto";
3
+ import { ThemeName } from "../../events/theme.js";
3
4
  export declare class Colorful extends LitElement {
4
5
  primary: string;
5
6
  secondary: string;
@@ -18,18 +19,23 @@ export declare class Colorful extends LitElement {
18
19
  mediumFont: FontSpec;
19
20
  fontBold: FontSpec;
20
21
  titleFont: FontSpec;
21
- protected currentTheme: string;
22
+ protected currentTheme: ThemeName;
22
23
  private _themeHandler;
23
24
  constructor();
24
25
  private readColors;
25
26
  firstUpdated(): void;
26
27
  disconnectedCallback(): void;
27
28
  }
29
+ export declare function getCurrentTheme(): ThemeName;
28
30
  export declare function isLightMode(): boolean;
31
+ export declare function isTektronixMode(): boolean;
29
32
  export declare const ChartColors: string[];
30
33
  export declare const LightChartColors: string[];
34
+ export declare const TektronixChartColors: string[];
31
35
  export declare const ChartColorsChanges: string[];
32
36
  export declare const LightChartColorsChanges: string[];
37
+ export declare const TektronixChartColorsChanges: string[];
33
38
  export declare const BinaryChartColors: string[];
34
39
  export declare const LightBinaryChartColors: string[];
40
+ export declare const TektronixBinaryChartColors: string[];
35
41
  export declare function CreateRadialGradient(context: any, c1: any, c2: any, c3: any, c4: any): any;
@@ -14,7 +14,7 @@ export class Colorful extends LitElement {
14
14
  this.currentTheme = 'dark';
15
15
  this._themeHandler = () => {
16
16
  this.readColors();
17
- this.currentTheme = isLightMode() ? 'light' : 'dark';
17
+ this.currentTheme = getCurrentTheme();
18
18
  };
19
19
  }
20
20
  readColors() {
@@ -34,7 +34,7 @@ export class Colorful extends LitElement {
34
34
  }
35
35
  firstUpdated() {
36
36
  this.readColors();
37
- this.currentTheme = isLightMode() ? 'light' : 'dark';
37
+ this.currentTheme = getCurrentTheme();
38
38
  this.font = fontSpec;
39
39
  this.smallFont = smallFont;
40
40
  this.mediumFont = mediumFont;
@@ -50,9 +50,20 @@ export class Colorful extends LitElement {
50
50
  __decorate([
51
51
  state()
52
52
  ], Colorful.prototype, "currentTheme", void 0);
53
+ export function getCurrentTheme() {
54
+ const theme = document.documentElement.getAttribute('theme');
55
+ if (theme === 'light')
56
+ return 'light';
57
+ if (theme === 'tektronix')
58
+ return 'tektronix';
59
+ return 'dark';
60
+ }
53
61
  export function isLightMode() {
54
62
  return document.documentElement.getAttribute('theme') === 'light';
55
63
  }
64
+ export function isTektronixMode() {
65
+ return document.documentElement.getAttribute('theme') === 'tektronix';
66
+ }
56
67
  export const ChartColors = [
57
68
  "#f83aff",
58
69
  "rgba(98, 196, 255, 1)",
@@ -69,6 +80,14 @@ export const LightChartColors = [
69
80
  "rgba(0, 0, 0, 0.08)",
70
81
  "rgba(0, 0, 0, 0.5)"
71
82
  ];
83
+ export const TektronixChartColors = [
84
+ "#33ff33",
85
+ "rgba(102, 255, 102, 0.8)",
86
+ "rgba(51, 255, 51, 0.47)",
87
+ "rgba(102, 255, 102, 0.6)",
88
+ "rgba(51, 255, 51, 0.25)",
89
+ "rgba(102, 255, 102, 0.4)"
90
+ ];
72
91
  export const ChartColorsChanges = [
73
92
  "#f83aff",
74
93
  "#00FF00",
@@ -79,6 +98,11 @@ export const LightChartColorsChanges = [
79
98
  "rgba(0, 0, 0, 0.35)",
80
99
  "rgba(0, 0, 0, 0.15)",
81
100
  ];
101
+ export const TektronixChartColorsChanges = [
102
+ "#33ff33",
103
+ "#66ff66",
104
+ "#1a991a",
105
+ ];
82
106
  export const BinaryChartColors = [
83
107
  "#ff246b",
84
108
  "rgba(98, 196, 255, 1)",
@@ -87,6 +111,10 @@ export const LightBinaryChartColors = [
87
111
  "rgba(0, 0, 0, 0.6)",
88
112
  "rgba(0, 0, 0, 0.25)",
89
113
  ];
114
+ export const TektronixBinaryChartColors = [
115
+ "#66ff66",
116
+ "#1a991a",
117
+ ];
90
118
  const cache = new Map();
91
119
  let width = null;
92
120
  let height = null;
@@ -7,7 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  import { customElement, property } from "lit/decorators.js";
8
8
  import { html } from "lit";
9
9
  import Chart from 'chart.js/auto';
10
- import { BinaryChartColors, ChartColors, ChartColorsChanges, Colorful, isLightMode, LightBinaryChartColors, LightChartColors, LightChartColorsChanges } from "./chart-colors";
10
+ import { BinaryChartColors, ChartColors, ChartColorsChanges, Colorful, LightBinaryChartColors, LightChartColors, LightChartColorsChanges, TektronixBinaryChartColors, TektronixChartColors, TektronixChartColorsChanges } from "./chart-colors";
11
11
  let DoughnutChart = class DoughnutChart extends Colorful {
12
12
  constructor() {
13
13
  super();
@@ -47,15 +47,15 @@ let DoughnutChart = class DoughnutChart extends Colorful {
47
47
  if (this.chart) {
48
48
  this.chart.destroy();
49
49
  }
50
- const light = isLightMode();
50
+ const theme = this.currentTheme;
51
51
  if (this.changesChart) {
52
- this.colors = light ? LightChartColorsChanges : ChartColorsChanges;
52
+ this.colors = theme === 'tektronix' ? TektronixChartColorsChanges : theme === 'light' ? LightChartColorsChanges : ChartColorsChanges;
53
53
  }
54
54
  else if (this.breakingChanges) {
55
- this.colors = light ? LightBinaryChartColors : BinaryChartColors;
55
+ this.colors = theme === 'tektronix' ? TektronixBinaryChartColors : theme === 'light' ? LightBinaryChartColors : BinaryChartColors;
56
56
  }
57
57
  else {
58
- this.colors = light ? LightChartColors : ChartColors;
58
+ this.colors = theme === 'tektronix' ? TektronixChartColors : theme === 'light' ? LightChartColors : ChartColors;
59
59
  }
60
60
  this.datasets.forEach((data) => {
61
61
  data.backgroundColor = this.colors;
@@ -25,7 +25,7 @@ export class DiagramHandler {
25
25
  if (!(event instanceof CustomEvent))
26
26
  return;
27
27
  const theme = event.detail?.theme;
28
- if (theme === 'light' || theme === 'dark') {
28
+ if (theme === 'light' || theme === 'dark' || theme === 'tektronix') {
29
29
  this.currentTheme = theme;
30
30
  }
31
31
  };
@@ -85,9 +85,16 @@ export class DiagramHandler {
85
85
  }
86
86
  detectTheme() {
87
87
  const htmlElement = document.querySelector('html');
88
- const isDark = htmlElement?.className.includes('sl-theme-dark') ||
89
- htmlElement?.getAttribute('theme') === 'dark';
90
- this.currentTheme = isDark ? 'dark' : 'light';
88
+ const theme = htmlElement?.getAttribute('theme');
89
+ if (theme === 'tektronix') {
90
+ this.currentTheme = 'tektronix';
91
+ }
92
+ else if (theme === 'dark') {
93
+ this.currentTheme = 'dark';
94
+ }
95
+ else {
96
+ this.currentTheme = 'light';
97
+ }
91
98
  }
92
99
  canHandle(event) {
93
100
  return event.type === DrawerContentType.DIAGRAM;
@@ -25,7 +25,7 @@ export declare class SpecEditor extends LitElement {
25
25
  showBreadcrumb: boolean;
26
26
  private showPlaceholder;
27
27
  private isActive;
28
- private isLightTheme;
28
+ private currentEditorTheme;
29
29
  private pendingValue;
30
30
  private linkDecorations;
31
31
  private decorationIdToLinkTarget;