@alfadocs/ui-kit-debug 0.58.0 → 0.60.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.
Files changed (145) hide show
  1. package/dist/_chunks/{bishop-score-CMQxsdy4.js → bishop-score-B9tvgoIq.js} +2 -2
  2. package/dist/_chunks/{bishop-score-CMQxsdy4.js.map → bishop-score-B9tvgoIq.js.map} +1 -1
  3. package/dist/_chunks/{bmi-calculator-DuUneHuZ.js → bmi-calculator-DA2NGmVK.js} +2 -2
  4. package/dist/_chunks/{bmi-calculator-DuUneHuZ.js.map → bmi-calculator-DA2NGmVK.js.map} +1 -1
  5. package/dist/_chunks/{calendar-oYWOCrnf.js → calendar-CkuJIg3s.js} +1 -1
  6. package/dist/_chunks/{calendar-oYWOCrnf.js.map → calendar-CkuJIg3s.js.map} +1 -1
  7. package/dist/_chunks/{cycle-calculator-vTtZZAmn.js → cycle-calculator-C_t1Hs8V.js} +2 -2
  8. package/dist/_chunks/{cycle-calculator-vTtZZAmn.js.map → cycle-calculator-C_t1Hs8V.js.map} +1 -1
  9. package/dist/_chunks/date-picker-variants-CXEAx3O_.js.map +1 -1
  10. package/dist/_chunks/{due-date-calculator-CUm5KJbf.js → due-date-calculator-Q8MIwEVV.js} +2 -2
  11. package/dist/_chunks/{due-date-calculator-CUm5KJbf.js.map → due-date-calculator-Q8MIwEVV.js.map} +1 -1
  12. package/dist/_chunks/{fetal-weight-Xf8-ZoDy.js → fetal-weight-D1a6BmM-.js} +2 -2
  13. package/dist/_chunks/{fetal-weight-Xf8-ZoDy.js.map → fetal-weight-D1a6BmM-.js.map} +1 -1
  14. package/dist/_chunks/{gestational-age-calculator-830KJql3.js → gestational-age-calculator-AkNFfZYs.js} +2 -2
  15. package/dist/_chunks/{gestational-age-calculator-830KJql3.js.map → gestational-age-calculator-AkNFfZYs.js.map} +1 -1
  16. package/dist/_chunks/{hcg-doubling-kVOpDfny.js → hcg-doubling-Dg0Hr7ey.js} +2 -2
  17. package/dist/_chunks/{hcg-doubling-kVOpDfny.js.map → hcg-doubling-Dg0Hr7ey.js.map} +1 -1
  18. package/dist/_chunks/{insert-result-njqBthzT.js → insert-result-C1SYdueh.js} +125 -115
  19. package/dist/_chunks/insert-result-C1SYdueh.js.map +1 -0
  20. package/dist/_chunks/{pregnancy-dating-BA37LSkF.js → pregnancy-dating-Dg6dTe1p.js} +2 -2
  21. package/dist/_chunks/{pregnancy-dating-BA37LSkF.js.map → pregnancy-dating-Dg6dTe1p.js.map} +1 -1
  22. package/dist/_chunks/{pregnancy-weight-gain-BMRBeA8V.js → pregnancy-weight-gain-DI7X-0JX.js} +2 -2
  23. package/dist/_chunks/{pregnancy-weight-gain-BMRBeA8V.js.map → pregnancy-weight-gain-DI7X-0JX.js.map} +1 -1
  24. package/dist/_chunks/rich-text-editor-B03qM22-.js +334 -0
  25. package/dist/_chunks/rich-text-editor-B03qM22-.js.map +1 -0
  26. package/dist/_chunks/{unit-converter-BQ6lEYvd.js → unit-converter-3sINXO3m.js} +2 -2
  27. package/dist/_chunks/{unit-converter-BQ6lEYvd.js.map → unit-converter-3sINXO3m.js.map} +1 -1
  28. package/dist/agent-catalog.json +2 -2
  29. package/dist/components/_shared/safe-html.d.ts +1 -1
  30. package/dist/components/bishop-score/index.js +1 -1
  31. package/dist/components/bmi-calculator/index.js +1 -1
  32. package/dist/components/calendar/index.js +1 -1
  33. package/dist/components/cycle-calculator/index.js +1 -1
  34. package/dist/components/due-date-calculator/index.js +1 -1
  35. package/dist/components/fetal-weight/index.js +1 -1
  36. package/dist/components/gestational-age-calculator/index.js +1 -1
  37. package/dist/components/hcg-doubling/index.js +1 -1
  38. package/dist/components/pregnancy-dating/index.js +1 -1
  39. package/dist/components/pregnancy-weight-gain/index.js +1 -1
  40. package/dist/components/rich-text-editor/index.d.ts +2 -2
  41. package/dist/components/rich-text-editor/index.d.ts.map +1 -1
  42. package/dist/components/rich-text-editor/index.js +4 -7
  43. package/dist/components/rich-text-editor/rich-text-editor.agent.d.ts.map +1 -1
  44. package/dist/components/rich-text-editor/rich-text-editor.d.ts +21 -15
  45. package/dist/components/rich-text-editor/rich-text-editor.d.ts.map +1 -1
  46. package/dist/components/unit-converter/index.js +1 -1
  47. package/dist/i18n/locales/ar.d.ts +1 -0
  48. package/dist/i18n/locales/ar.d.ts.map +1 -1
  49. package/dist/i18n/locales/ar.js +1 -0
  50. package/dist/i18n/locales/ar.js.map +1 -1
  51. package/dist/i18n/locales/de.d.ts +1 -0
  52. package/dist/i18n/locales/de.d.ts.map +1 -1
  53. package/dist/i18n/locales/de.js +1 -0
  54. package/dist/i18n/locales/de.js.map +1 -1
  55. package/dist/i18n/locales/el.d.ts +1 -0
  56. package/dist/i18n/locales/el.d.ts.map +1 -1
  57. package/dist/i18n/locales/el.js +1 -0
  58. package/dist/i18n/locales/el.js.map +1 -1
  59. package/dist/i18n/locales/en.d.ts +1 -0
  60. package/dist/i18n/locales/en.d.ts.map +1 -1
  61. package/dist/i18n/locales/en.js +1 -0
  62. package/dist/i18n/locales/en.js.map +1 -1
  63. package/dist/i18n/locales/es.d.ts +1 -0
  64. package/dist/i18n/locales/es.d.ts.map +1 -1
  65. package/dist/i18n/locales/es.js +1 -0
  66. package/dist/i18n/locales/es.js.map +1 -1
  67. package/dist/i18n/locales/fr.d.ts +1 -0
  68. package/dist/i18n/locales/fr.d.ts.map +1 -1
  69. package/dist/i18n/locales/fr.js +1 -0
  70. package/dist/i18n/locales/fr.js.map +1 -1
  71. package/dist/i18n/locales/hi.d.ts +1 -0
  72. package/dist/i18n/locales/hi.d.ts.map +1 -1
  73. package/dist/i18n/locales/hi.js +1 -0
  74. package/dist/i18n/locales/hi.js.map +1 -1
  75. package/dist/i18n/locales/it.d.ts +1 -0
  76. package/dist/i18n/locales/it.d.ts.map +1 -1
  77. package/dist/i18n/locales/it.js +1 -0
  78. package/dist/i18n/locales/it.js.map +1 -1
  79. package/dist/i18n/locales/ja.d.ts +1 -0
  80. package/dist/i18n/locales/ja.d.ts.map +1 -1
  81. package/dist/i18n/locales/ja.js +1 -0
  82. package/dist/i18n/locales/ja.js.map +1 -1
  83. package/dist/i18n/locales/nl.d.ts +1 -0
  84. package/dist/i18n/locales/nl.d.ts.map +1 -1
  85. package/dist/i18n/locales/nl.js +1 -0
  86. package/dist/i18n/locales/nl.js.map +1 -1
  87. package/dist/i18n/locales/pl.d.ts +1 -0
  88. package/dist/i18n/locales/pl.d.ts.map +1 -1
  89. package/dist/i18n/locales/pl.js +1 -0
  90. package/dist/i18n/locales/pl.js.map +1 -1
  91. package/dist/i18n/locales/pt.d.ts +1 -0
  92. package/dist/i18n/locales/pt.d.ts.map +1 -1
  93. package/dist/i18n/locales/pt.js +1 -0
  94. package/dist/i18n/locales/pt.js.map +1 -1
  95. package/dist/i18n/locales/ro.d.ts +1 -0
  96. package/dist/i18n/locales/ro.d.ts.map +1 -1
  97. package/dist/i18n/locales/ro.js +1 -0
  98. package/dist/i18n/locales/ro.js.map +1 -1
  99. package/dist/i18n/locales/ru.d.ts +1 -0
  100. package/dist/i18n/locales/ru.d.ts.map +1 -1
  101. package/dist/i18n/locales/ru.js +1 -0
  102. package/dist/i18n/locales/ru.js.map +1 -1
  103. package/dist/i18n/locales/sq.d.ts +1 -0
  104. package/dist/i18n/locales/sq.d.ts.map +1 -1
  105. package/dist/i18n/locales/sq.js +1 -0
  106. package/dist/i18n/locales/sq.js.map +1 -1
  107. package/dist/i18n/locales/sv.d.ts +1 -0
  108. package/dist/i18n/locales/sv.d.ts.map +1 -1
  109. package/dist/i18n/locales/sv.js +1 -0
  110. package/dist/i18n/locales/sv.js.map +1 -1
  111. package/dist/i18n/locales/tr.d.ts +1 -0
  112. package/dist/i18n/locales/tr.d.ts.map +1 -1
  113. package/dist/i18n/locales/tr.js +1 -0
  114. package/dist/i18n/locales/tr.js.map +1 -1
  115. package/dist/i18n/locales/zh.d.ts +1 -0
  116. package/dist/i18n/locales/zh.d.ts.map +1 -1
  117. package/dist/i18n/locales/zh.js +1 -0
  118. package/dist/i18n/locales/zh.js.map +1 -1
  119. package/dist/index.js +143 -146
  120. package/dist/locales/ar.json +1 -0
  121. package/dist/locales/de.json +1 -0
  122. package/dist/locales/el.json +1 -0
  123. package/dist/locales/en.json +1 -0
  124. package/dist/locales/es.json +1 -0
  125. package/dist/locales/fr.json +1 -0
  126. package/dist/locales/hi.json +1 -0
  127. package/dist/locales/it.json +1 -0
  128. package/dist/locales/ja.json +1 -0
  129. package/dist/locales/nl.json +1 -0
  130. package/dist/locales/pl.json +1 -0
  131. package/dist/locales/pt.json +1 -0
  132. package/dist/locales/ro.json +1 -0
  133. package/dist/locales/ru.json +1 -0
  134. package/dist/locales/sq.json +1 -0
  135. package/dist/locales/sv.json +1 -0
  136. package/dist/locales/tr.json +1 -0
  137. package/dist/locales/zh.json +1 -0
  138. package/dist/safe-html/index.js.map +1 -1
  139. package/dist/tokens.css +23 -25
  140. package/package.json +2 -52
  141. package/dist/_chunks/image-C6RM5hfF.js +0 -16
  142. package/dist/_chunks/image-C6RM5hfF.js.map +0 -1
  143. package/dist/_chunks/insert-result-njqBthzT.js.map +0 -1
  144. package/dist/_chunks/rich-text-editor-DhGIBd4a.js +0 -921
  145. package/dist/_chunks/rich-text-editor-DhGIBd4a.js.map +0 -1
@@ -1,22 +1,32 @@
1
1
  import { jsxs as P, jsx as g } from "react/jsx-runtime";
2
- import { forwardRef as ht, useRef as St } from "react";
3
- import { useTranslation as Dt } from "react-i18next";
4
- import { c as Nt } from "./index-D2ZczOXr.js";
5
- import { B as Gt } from "./button-DD_0Xdmr.js";
6
- import { L as Ht } from "./layers-pzGcbLPj.js";
7
- import { I as Rt } from "./image-C6RM5hfF.js";
8
- import { c as Pt } from "./createLucideIcon-CrFbzy84.js";
2
+ import { forwardRef as ht, useRef as Dt } from "react";
3
+ import { useTranslation as Nt } from "react-i18next";
4
+ import { c as Gt } from "./index-D2ZczOXr.js";
5
+ import { B as Ht } from "./button-DD_0Xdmr.js";
6
+ import { L as Rt } from "./layers-pzGcbLPj.js";
7
+ import { c as pt } from "./createLucideIcon-CrFbzy84.js";
9
8
  /**
10
9
  * @license lucide-react v1.8.0 - ISC
11
10
  *
12
11
  * This source code is licensed under the ISC license.
13
12
  * See the LICENSE file in the root directory of this source tree.
14
13
  */
15
- const Ft = [
14
+ const Pt = [
15
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
16
+ ["circle", { cx: "9", cy: "9", r: "2", key: "af1f0g" }],
17
+ ["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21", key: "1xmnt7" }]
18
+ ], Ft = pt("image", Pt);
19
+ /**
20
+ * @license lucide-react v1.8.0 - ISC
21
+ *
22
+ * This source code is licensed under the ISC license.
23
+ * See the LICENSE file in the root directory of this source tree.
24
+ */
25
+ const Ot = [
16
26
  ["path", { d: "M12 4v16", key: "1654pz" }],
17
27
  ["path", { d: "M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2", key: "e0r10z" }],
18
28
  ["path", { d: "M9 20h6", key: "s66wpe" }]
19
- ], Ot = Pt("type", Ft), Ut = 15, at = 40, zt = [18.5, 25, 30];
29
+ ], Ut = pt("type", Ot), zt = 15, at = 40, Wt = [18.5, 25, 30];
20
30
  function Mn() {
21
31
  return {
22
32
  bands: [
@@ -25,19 +35,19 @@ function Mn() {
25
35
  { upTo: 30, colorToken: "--warning-readable" },
26
36
  { upTo: at, colorToken: "--destructive" }
27
37
  ],
28
- min: Ut,
38
+ min: zt,
29
39
  max: at,
30
- ticks: [...zt]
40
+ ticks: [...Wt]
31
41
  };
32
42
  }
33
- const V = 14, j = 12, Wt = j / 2, ot = 18, Xt = 12, Vt = 16;
43
+ const V = 14, j = 12, Xt = j / 2, ot = 18, Vt = 12, jt = 16;
34
44
  function N(t, n, i, a, o) {
35
45
  if (i <= n) return a;
36
46
  const r = (t - n) / (i - n);
37
47
  return a + r * (o - a);
38
48
  }
39
- function pt(t, { width: n, height: i }) {
40
- const a = V, o = n - V, r = ot + Xt, e = ot, c = r + j + Vt;
49
+ function bt(t, { width: n, height: i }) {
50
+ const a = V, o = n - V, r = ot + Vt, e = ot, c = r + j + jt;
41
51
  let u = t.min;
42
52
  const d = t.bands.map((l) => {
43
53
  const T = Math.max(t.min, Math.min(u, t.max)), y = Math.max(t.min, Math.min(l.upTo, t.max));
@@ -55,7 +65,7 @@ function pt(t, { width: n, height: i }) {
55
65
  barEnd: o,
56
66
  barY: r,
57
67
  barH: j,
58
- barRadius: Wt,
68
+ barRadius: Xt,
59
69
  bands: d,
60
70
  marker: {
61
71
  x: k,
@@ -72,23 +82,23 @@ function pt(t, { width: n, height: i }) {
72
82
  };
73
83
  }
74
84
  const s = (t) => Math.round(t * 100) / 100, M = (t) => t.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
75
- function bt(t, n, i, a, o, r) {
85
+ function mt(t, n, i, a, o, r) {
76
86
  const e = t + i, c = n + a, u = r > 0 ? `A${r} ${r} 0 0 1 ${s(e)} ${s(n + r)}` : "", d = r > 0 ? `A${r} ${r} 0 0 1 ${s(e - r)} ${s(c)}` : "", f = o > 0 ? `A${o} ${o} 0 0 1 ${s(t)} ${s(c - o)}` : "", b = o > 0 ? `A${o} ${o} 0 0 1 ${s(t + o)} ${s(n)}` : "";
77
87
  return `M${s(t + o)} ${s(n)} H${s(e - r)} ${u} V${s(
78
88
  c - r
79
89
  )} ${d} H${s(t + o)} ${f} V${s(n + o)} ${b} Z`;
80
90
  }
81
- function jt(t, n) {
91
+ function Kt(t, n) {
82
92
  const { resolve: i, font: a, fg: o, muted: r, track: e } = n, c = M(a), u = `<rect x="${s(t.barStart)}" y="${s(
83
93
  t.barY
84
94
  )}" width="${s(t.barEnd - t.barStart)}" height="${t.barH}" rx="${t.barRadius}" fill="${e}"/>`, d = t.bands.length, f = t.bands.map((m, x) => {
85
- const C = i(m.colorToken), I = x === 0 ? t.barRadius : 0, U = x === d - 1 ? t.barRadius : 0;
86
- return `<path d="${bt(
95
+ const C = i(m.colorToken), _ = x === 0 ? t.barRadius : 0, U = x === d - 1 ? t.barRadius : 0;
96
+ return `<path d="${mt(
87
97
  m.x,
88
98
  t.barY,
89
99
  m.w,
90
100
  t.barH,
91
- I,
101
+ _,
92
102
  U
93
103
  )}" fill="${C}"/>`;
94
104
  }).join(""), b = t.barY + t.barH, k = b + 4, h = t.ticks.map((m) => {
@@ -137,13 +147,13 @@ function jt(t, n) {
137
147
  t.ariaLabel
138
148
  )}">${D}${u}${f}${h}${y}${E}${w}${B}${S}</g>`;
139
149
  }
140
- const Kt = 260, Q = 64;
141
- function Zt(t) {
150
+ const Zt = 260, Q = 64;
151
+ function qt(t) {
142
152
  return `var(${t})`;
143
153
  }
144
- const qt = ht(
145
- function({ model: n, width: i = Kt, height: a = Q, className: o }, r) {
146
- const e = pt(n, { width: i, height: a }), c = e.barY + e.barH, u = c + 4, d = e.barY - 3, f = e.barY + e.barH + 3, b = e.barY - 4, k = e.bands.length, h = e.barY + e.barH / 2;
154
+ const Jt = ht(
155
+ function({ model: n, width: i = Zt, height: a = Q, className: o }, r) {
156
+ const e = bt(n, { width: i, height: a }), c = e.barY + e.barH, u = c + 4, d = e.barY - 3, f = e.barY + e.barH + 3, b = e.barY - 4, k = e.bands.length, h = e.barY + e.barH / 2;
147
157
  return /* @__PURE__ */ P(
148
158
  "svg",
149
159
  {
@@ -172,7 +182,7 @@ const qt = ht(
172
182
  e.bands.map(($, l) => /* @__PURE__ */ g(
173
183
  "path",
174
184
  {
175
- d: bt(
185
+ d: mt(
176
186
  $.x,
177
187
  e.barY,
178
188
  $.w,
@@ -180,7 +190,7 @@ const qt = ht(
180
190
  l === 0 ? e.barRadius : 0,
181
191
  l === k - 1 ? e.barRadius : 0
182
192
  ),
183
- fill: Zt($.colorToken)
193
+ fill: qt($.colorToken)
184
194
  },
185
195
  `${$.colorToken}-${l}`
186
196
  )),
@@ -282,8 +292,8 @@ const qt = ht(
282
292
  );
283
293
  }
284
294
  );
285
- qt.displayName = "BandedGauge";
286
- const Jt = 24, mt = 18, G = 12, gt = {
295
+ Jt.displayName = "BandedGauge";
296
+ const Qt = 24, gt = 18, G = 12, xt = {
287
297
  activity: '<path d="M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2"/>',
288
298
  scale: '<path d="M12 3v18"/><path d="m19 8 3 8a5 5 0 0 1-6 0zV7"/><path d="M3 7h1a17 17 0 0 0 8-2 17 17 0 0 0 8 2h1"/><path d="m5 8 3 8a5 5 0 0 1-6 0zV7"/><path d="M7 21h10"/>',
289
299
  ruler: '<path d="M21.3 15.3a2.4 2.4 0 0 1 0 3.4l-2.6 2.6a2.4 2.4 0 0 1-3.4 0L2.7 8.7a2.41 2.41 0 0 1 0-3.4l2.6-2.6a2.41 2.41 0 0 1 3.4 0Z"/><path d="m14.5 12.5 2-2"/><path d="m11.5 9.5 2-2"/><path d="m8.5 6.5 2-2"/><path d="m17.5 15.5 2-2"/>',
@@ -297,22 +307,22 @@ const Jt = 24, mt = 18, G = 12, gt = {
297
307
  "trending-up": '<path d="M16 7h6v6"/><path d="m22 7-8.5 8.5-5-5L2 17"/>',
298
308
  percent: '<line x1="19" x2="5" y1="5" y2="19"/><circle cx="6.5" cy="6.5" r="2.5"/><circle cx="17.5" cy="17.5" r="2.5"/>'
299
309
  };
300
- function xt(t) {
301
- return Object.prototype.hasOwnProperty.call(gt, t);
310
+ function vt(t) {
311
+ return Object.prototype.hasOwnProperty.call(xt, t);
302
312
  }
303
313
  function rt(t, n, i, a, o) {
304
- if (!xt(t)) return "";
305
- const r = o / Jt;
306
- return `<g transform="translate(${i} ${a}) scale(${r})" fill="none" color="${n}" stroke="${n}" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">${gt[t]}</g>`;
314
+ if (!vt(t)) return "";
315
+ const r = o / Qt;
316
+ return `<g transform="translate(${i} ${a}) scale(${r})" fill="none" color="${n}" stroke="${n}" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">${xt[t]}</g>`;
307
317
  }
308
318
  function Y(t) {
309
319
  return t.variant === "banded";
310
320
  }
311
- const Qt = ["fg", "muted", "accent", "border", "bg"], tt = "--primary", F = 380, vt = (t) => t.trim().replace(/^--/, "");
312
- function tn(t) {
321
+ const tn = ["fg", "muted", "accent", "border", "bg"], tt = "--primary", F = 380, kt = (t) => t.trim().replace(/^--/, "");
322
+ function nn(t) {
313
323
  return `ds:text-[color:var(${t})]`;
314
324
  }
315
- function kt(t) {
325
+ function yt(t) {
316
326
  return t.highlightToken ?? tt;
317
327
  }
318
328
  function W(t) {
@@ -321,7 +331,7 @@ function W(t) {
321
331
  const a = t.highlightToken ?? tt;
322
332
  n.add(a), n.add(`${a}-foreground`);
323
333
  }
324
- const i = kt(t);
334
+ const i = yt(t);
325
335
  if (n.add(i), t.gauge)
326
336
  if (Y(t.gauge))
327
337
  for (const a of t.gauge.bands) n.add(a.colorToken);
@@ -346,7 +356,7 @@ function K(t, n = []) {
346
356
  }, o = {};
347
357
  for (const r of n) {
348
358
  const e = t.querySelector(
349
- `[data-token="${vt(r)}"]`
359
+ `[data-token="${kt(r)}"]`
350
360
  );
351
361
  if (e) {
352
362
  const c = getComputedStyle(e).color;
@@ -368,19 +378,19 @@ function O(t, n, i) {
368
378
  return n ? ((a = t.tokens) == null ? void 0 : a[n]) ?? i : i;
369
379
  }
370
380
  const v = (t) => t.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
371
- function yt(t) {
381
+ function Lt(t) {
372
382
  const n = [t.title];
373
383
  t.highlight && n.push(t.highlight);
374
384
  for (const i of t.fields) n.push(`• ${i.label}: ${i.value}`);
375
385
  return n.join(`
376
386
  `);
377
387
  }
378
- function Lt(t) {
388
+ function wt(t) {
379
389
  const n = t.fields.map((a) => `<li>${v(a.label)}: ${v(a.value)}</li>`).join(""), i = t.highlight ? `<p><strong>${v(t.highlight)}</strong></p>` : "";
380
390
  return `<p><strong>${v(t.title)}</strong></p>${i}<ul>${n}</ul>`;
381
391
  }
382
- const L = 20, _ = L + 18, H = 22, nn = 10, wt = 22, st = 16, it = 12, en = 12, Tt = 34, Z = 9, q = (Tt + Z) * 2, an = 16, lt = mt, on = 6, R = L + G + on, X = F - L - R, ct = 13, Et = 14, It = 13, J = 16;
383
- function rn(t) {
392
+ const L = 20, I = L + 18, H = 22, en = 10, Tt = 22, st = 16, it = 12, an = 12, Et = 34, Z = 9, q = (Et + Z) * 2, on = 16, lt = gt, rn = 6, R = L + G + rn, X = F - L - R, ct = 13, _t = 14, Mt = 13, J = 16;
393
+ function sn(t) {
384
394
  return t >= 4352 && t <= 4447 || // Hangul Jamo
385
395
  t >= 11904 && t <= 42191 || // CJK radicals … Yi
386
396
  t >= 44032 && t <= 55203 || // Hangul syllables
@@ -392,10 +402,10 @@ function rn(t) {
392
402
  function A(t, n) {
393
403
  let i = 0;
394
404
  for (const a of t)
395
- i += rn(a.codePointAt(0) ?? 0) ? 1 : 0.62;
405
+ i += sn(a.codePointAt(0) ?? 0) ? 1 : 0.62;
396
406
  return i * n;
397
407
  }
398
- function sn(t, n, i) {
408
+ function ln(t, n, i) {
399
409
  const a = [];
400
410
  let o = "";
401
411
  for (const r of t)
@@ -406,7 +416,7 @@ function ut(t, n, i) {
406
416
  const a = [];
407
417
  let o = "";
408
418
  const r = (e) => {
409
- const c = sn(e, n, i);
419
+ const c = ln(e, n, i);
410
420
  for (let u = 0; u < c.length - 1; u += 1) a.push(c[u]);
411
421
  o = c[c.length - 1];
412
422
  };
@@ -416,11 +426,11 @@ function ut(t, n, i) {
416
426
  }
417
427
  return o && a.push(o), a.length ? a : [""];
418
428
  }
419
- function Mt(t) {
429
+ function It(t) {
420
430
  const n = [];
421
431
  let i = 0;
422
432
  t.fields.forEach((r, e) => {
423
- const c = e === 0 ? Et : It, d = A(`${r.label}: `, ct) + A(r.value, c) <= X ? [{ kind: "inline", text: "" }] : [
433
+ const c = e === 0 ? _t : Mt, d = A(`${r.label}: `, ct) + A(r.value, c) <= X ? [{ kind: "inline", text: "" }] : [
424
434
  ...ut(
425
435
  `${r.label}:`,
426
436
  ct,
@@ -430,7 +440,7 @@ function Mt(t) {
430
440
  (f) => ({ kind: "value", text: f })
431
441
  )
432
442
  ];
433
- n.push({ field: r, index: e, firstLineDy: i, lines: d }), i += wt + (d.length - 1) * J;
443
+ n.push({ field: r, index: e, firstLineDy: i, lines: d }), i += Tt + (d.length - 1) * J;
434
444
  });
435
445
  const a = n[n.length - 1], o = a ? a.firstLineDy + (a.lines.length - 1) * J : 0;
436
446
  return { placements: n, endDy: o };
@@ -439,14 +449,14 @@ function nt(t, n) {
439
449
  const i = n !== void 0 ? n : t.brand;
440
450
  return typeof i == "string" ? i : !1;
441
451
  }
442
- function ln(t) {
452
+ function cn(t) {
443
453
  if (typeof t.fraction == "number")
444
454
  return Math.min(1, Math.max(0, t.fraction));
445
455
  const n = parseFloat(t.value);
446
456
  return Number.isFinite(n) && typeof t.max == "number" && t.max > 0 ? Math.min(1, Math.max(0, n / t.max)) : 1;
447
457
  }
448
- function _t(t, n) {
449
- const i = !!t.highlight, a = _ + nn, o = (i ? a + H + st : _ + st) + wt - 6, r = o + Mt(t).endDy, e = t.gauge && Y(t.gauge), d = t.gauge && !Y(t.gauge) ? (i ? a : _) + q : 0, f = e ? r + an : null, b = f !== null ? f + Q : 0, k = Math.max(r, d, b), h = n ? k + it + en - 4 : k, $ = Math.round(h + (n ? it : L));
458
+ function At(t, n) {
459
+ const i = !!t.highlight, a = I + en, o = (i ? a + H + st : I + st) + Tt - 6, r = o + It(t).endDy, e = t.gauge && Y(t.gauge), d = t.gauge && !Y(t.gauge) ? (i ? a : I) + q : 0, f = e ? r + on : null, b = f !== null ? f + Q : 0, k = Math.max(r, d, b), h = n ? k + it + an - 4 : k, $ = Math.round(h + (n ? it : L));
450
460
  return {
451
461
  hasChip: i,
452
462
  chipY: a,
@@ -457,11 +467,11 @@ function _t(t, n) {
457
467
  height: $
458
468
  };
459
469
  }
460
- function At(t, n) {
461
- return _t(t, n !== !1).height;
470
+ function Bt(t, n) {
471
+ return At(t, n !== !1).height;
462
472
  }
463
- function cn(t, n, i, a, o) {
464
- const r = Tt, e = 2 * Math.PI * r, c = ln(t), u = O(n, t.colorToken, n.accent), d = typeof t.segments == "number" && t.segments > 1 ? t.segments : 0, f = d ? 3 : 0, b = d ? e / d - f : e, k = d ? `${b} ${f}` : "", h = `${e * c} ${e}`, $ = `transform="rotate(-90 ${a} ${o})"`, l = v(
473
+ function un(t, n, i, a, o) {
474
+ const r = Et, e = 2 * Math.PI * r, c = cn(t), u = O(n, t.colorToken, n.accent), d = typeof t.segments == "number" && t.segments > 1 ? t.segments : 0, f = d ? 3 : 0, b = d ? e / d - f : e, k = d ? `${b} ${f}` : "", h = `${e * c} ${e}`, $ = `transform="rotate(-90 ${a} ${o})"`, l = v(
465
475
  t.label ? `${t.value} — ${t.label}` : t.value
466
476
  ), T = `<circle cx="${a}" cy="${o}" r="${r}" fill="none" stroke="${n.border}" stroke-width="${Z}"${k ? ` stroke-dasharray="${k}"` : ""} ${$}/>`, y = `<circle cx="${a}" cy="${o}" r="${r}" fill="none" stroke="${u}" stroke-width="${Z}" stroke-linecap="round" stroke-dasharray="${h}" ${$}/>`, p = `<text x="${a}" y="${o + 1}" text-anchor="middle" dominant-baseline="middle" font-family="${i}" font-size="16" font-weight="700" fill="${n.fg}">${v(
467
477
  t.value
@@ -470,8 +480,8 @@ function cn(t, n, i, a, o) {
470
480
  )}</text>` : "";
471
481
  return `<g role="img" aria-label="${l}"><title>${l}</title>${T}${y}${p}${E}</g>`;
472
482
  }
473
- function un(t, n, i, a) {
474
- const o = L - V, r = i - 2 * o, e = pt(
483
+ function dn(t, n, i, a) {
484
+ const o = L - V, r = i - 2 * o, e = bt(
475
485
  {
476
486
  value: t.value,
477
487
  bands: t.bands,
@@ -484,7 +494,7 @@ function un(t, n, i, a) {
484
494
  ticks: t.ticks
485
495
  },
486
496
  { width: r, height: Q }
487
- ), c = jt(e, {
497
+ ), c = Kt(e, {
488
498
  resolve: (u) => O(n, u, n.accent),
489
499
  // Raw theme font — buildBandedGaugeSvgString escapes it once. Passing the
490
500
  // card's already-escaped `font` here would double-escape and break it.
@@ -506,71 +516,71 @@ function ft([t, n, i]) {
506
516
  };
507
517
  return 0.2126 * a(t) + 0.7152 * a(n) + 0.0722 * a(i);
508
518
  }
509
- function dn(t, n) {
519
+ function fn(t, n) {
510
520
  const i = dt(t), a = dt(n);
511
521
  if (!i || !a) return 0;
512
522
  const o = ft(i), r = ft(a);
513
523
  return (Math.max(o, r) + 0.05) / (Math.min(o, r) + 0.05);
514
524
  }
515
- function fn(t, n, i, a) {
516
- const o = t.highlight, r = t.highlightToken ?? tt, e = O(n, r, n.accent), c = dn(n.bg, e) >= 3 ? n.bg : n.fg, u = Math.round(o.length * 7.2 + 28), d = L + u / 2, f = a + H / 2 + 1;
525
+ function $n(t, n, i, a) {
526
+ const o = t.highlight, r = t.highlightToken ?? tt, e = O(n, r, n.accent), c = fn(n.bg, e) >= 3 ? n.bg : n.fg, u = Math.round(o.length * 7.2 + 28), d = L + u / 2, f = a + H / 2 + 1;
517
527
  return `<rect x="${L}" y="${a}" width="${u}" height="${H}" rx="${H / 2}" fill="${e}"/><text x="${d}" y="${f}" text-anchor="middle" dominant-baseline="middle" font-family="${i}" font-size="12" font-weight="600" fill="${c}">${v(
518
528
  o
519
529
  )}</text>`;
520
530
  }
521
531
  function et(t, n, i = !1) {
522
- const a = F, o = _t(t, i !== !1), r = o.height, e = v(n.font), c = kt(t), u = O(n, c, n.accent), d = t.icon ? rt(
532
+ const a = F, o = At(t, i !== !1), r = o.height, e = v(n.font), c = yt(t), u = O(n, c, n.accent), d = t.icon ? rt(
523
533
  t.icon,
524
534
  u,
525
535
  a - L - lt,
526
- _ - lt + 2,
527
- mt
528
- ) : "", { placements: f } = Mt(t), b = f.map((p) => {
529
- const E = o.firstFieldY + p.firstLineDy, w = p.index === 0, B = w ? Et : It, S = w ? 700 : 500, D = w ? u : n.fg, m = E - 4;
536
+ I - lt + 2,
537
+ gt
538
+ ) : "", { placements: f } = It(t), b = f.map((p) => {
539
+ const E = o.firstFieldY + p.firstLineDy, w = p.index === 0, B = w ? _t : Mt, S = w ? 700 : 500, D = w ? u : n.fg, m = E - 4;
530
540
  let x;
531
- p.field.icon && xt(p.field.icon) ? x = rt(
541
+ p.field.icon && vt(p.field.icon) ? x = rt(
532
542
  p.field.icon,
533
543
  u,
534
544
  L,
535
545
  m - G / 2,
536
546
  G
537
547
  ) : x = `<circle cx="${L + G / 2}" cy="${m}" r="2" fill="${n.muted}"/>`;
538
- const C = p.lines.map((I, U) => {
548
+ const C = p.lines.map((_, U) => {
539
549
  const z = E + U * J;
540
- return I.kind === "inline" ? `<text x="${R}" y="${z}" font-family="${e}" font-size="13"><tspan fill="${n.muted}">${v(
550
+ return _.kind === "inline" ? `<text x="${R}" y="${z}" font-family="${e}" font-size="13"><tspan fill="${n.muted}">${v(
541
551
  p.field.label
542
552
  )}: </tspan><tspan font-size="${B}" font-weight="${S}" fill="${D}">${v(
543
553
  p.field.value
544
- )}</tspan></text>` : I.kind === "label" ? `<text x="${R}" y="${z}" font-family="${e}" font-size="13" fill="${n.muted}">${v(
545
- I.text
554
+ )}</tspan></text>` : _.kind === "label" ? `<text x="${R}" y="${z}" font-family="${e}" font-size="13" fill="${n.muted}">${v(
555
+ _.text
546
556
  )}</text>` : `<text x="${R}" y="${z}" font-family="${e}" font-size="${B}" font-weight="${S}" fill="${D}">${v(
547
- I.text
557
+ _.text
548
558
  )}</text>`;
549
559
  }).join("");
550
560
  return `${x}${C}`;
551
- }).join(""), k = o.hasChip ? fn(t, n, e, o.chipY) : "";
561
+ }).join(""), k = o.hasChip ? $n(t, n, e, o.chipY) : "";
552
562
  let h = "";
553
- t.gauge && (Y(t.gauge) && o.bandedGaugeY !== null ? h = un(t.gauge, n, a, o.bandedGaugeY) : Y(t.gauge) || (h = cn(
563
+ t.gauge && (Y(t.gauge) && o.bandedGaugeY !== null ? h = dn(t.gauge, n, a, o.bandedGaugeY) : Y(t.gauge) || (h = un(
554
564
  t.gauge,
555
565
  n,
556
566
  e,
557
567
  a - L - q / 2,
558
- (o.hasChip ? o.chipY : _) + q / 2
568
+ (o.hasChip ? o.chipY : I) + q / 2
559
569
  )));
560
570
  const $ = i !== !1 ? `<text x="${L}" y="${o.footerY}" font-family="${e}" font-size="10" font-weight="500" fill="${n.muted}">${v(
561
571
  i
562
- )}</text>` : "", l = `<text x="${L}" y="${_}" font-family="${e}" font-size="16" font-weight="700" fill="${n.fg}">${v(
572
+ )}</text>` : "", l = `<text x="${L}" y="${I}" font-family="${e}" font-size="16" font-weight="700" fill="${n.fg}">${v(
563
573
  t.title
564
574
  )}</text>`, T = `<rect x="0.5" y="0.5" width="${a - 1}" height="${r - 1}" rx="12" fill="${n.bg}"/>`, y = `<rect x="0.5" y="0.5" width="${a - 1}" height="${r - 1}" rx="12" fill="none" stroke="${n.border}"/>`;
565
575
  return `<svg xmlns="http://www.w3.org/2000/svg" width="${a}" height="${r}" viewBox="0 0 ${a} ${r}" role="img" aria-label="${v(
566
576
  t.title
567
577
  )}">${T}${l}${d}${k}${h}${b}${$}${y}</svg>`;
568
578
  }
569
- function $n() {
579
+ function hn() {
570
580
  var t;
571
581
  return typeof navigator < "u" && typeof ((t = navigator.clipboard) == null ? void 0 : t.write) == "function" && typeof ClipboardItem < "u";
572
582
  }
573
- function Bt(t, n, i) {
583
+ function Ct(t, n, i) {
574
584
  return new Promise((a, o) => {
575
585
  const r = new Image();
576
586
  r.decoding = "async", r.onload = () => {
@@ -587,46 +597,46 @@ function Bt(t, n, i) {
587
597
  }, r.onerror = () => o(new Error("SVG failed to decode as an image")), r.src = t;
588
598
  });
589
599
  }
590
- function Ct() {
600
+ function Yt() {
591
601
  const t = typeof window < "u" && typeof window.devicePixelRatio == "number" ? window.devicePixelRatio : 1;
592
602
  return Math.max(2, t);
593
603
  }
594
- async function _n(t, n = {}) {
595
- return (await Yt(t, n)).dataUri;
604
+ async function In(t, n = {}) {
605
+ return (await St(t, n)).dataUri;
596
606
  }
597
- async function Yt(t, n = {}) {
598
- const { colours: i, scale: a = Ct() } = n, o = i ?? K(null), r = nt(t, n.brand), e = et(t, o, r), c = `data:image/svg+xml,${encodeURIComponent(e)}`, u = F, d = At(t, r), f = await Bt(
607
+ async function St(t, n = {}) {
608
+ const { colours: i, scale: a = Yt() } = n, o = i ?? K(null), r = nt(t, n.brand), e = et(t, o, r), c = `data:image/svg+xml,${encodeURIComponent(e)}`, u = F, d = Bt(t, r), f = await Ct(
599
609
  c,
600
610
  Math.round(u * a),
601
611
  Math.round(d * a)
602
612
  );
603
- return { dataUri: await hn(f), width: u, height: d };
613
+ return { dataUri: await pn(f), width: u, height: d };
604
614
  }
605
- function hn(t) {
615
+ function pn(t) {
606
616
  return new Promise((n, i) => {
607
617
  const a = new FileReader();
608
618
  a.onload = () => n(String(a.result)), a.onerror = () => i(a.error ?? new Error("FileReader error")), a.readAsDataURL(t);
609
619
  });
610
620
  }
611
- async function pn(t, n, i) {
612
- const a = yt(n), o = new Blob([a], { type: "text/plain" });
621
+ async function bn(t, n, i) {
622
+ const a = Lt(n), o = new Blob([a], { type: "text/plain" });
613
623
  if (t === "text")
614
624
  return new ClipboardItem({ "text/plain": o });
615
- const r = nt(n, void 0), e = et(n, i, r), c = `data:image/svg+xml,${encodeURIComponent(e)}`, u = Ct(), d = await Bt(
625
+ const r = nt(n, void 0), e = et(n, i, r), c = `data:image/svg+xml,${encodeURIComponent(e)}`, u = Yt(), d = await Ct(
616
626
  c,
617
627
  Math.round(F * u),
618
- Math.round(At(n, r) * u)
628
+ Math.round(Bt(n, r) * u)
619
629
  );
620
630
  if (t === "image")
621
631
  return new ClipboardItem({ "image/png": d, "text/plain": o });
622
- const f = new Blob([Lt(n)], { type: "text/html" });
632
+ const f = new Blob([wt(n)], { type: "text/html" });
623
633
  return new ClipboardItem({
624
634
  "text/html": f,
625
635
  "image/png": d,
626
636
  "text/plain": o
627
637
  });
628
638
  }
629
- const bn = Nt(
639
+ const mn = Gt(
630
640
  "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]",
631
641
  {
632
642
  variants: {
@@ -637,10 +647,10 @@ const bn = Nt(
637
647
  },
638
648
  defaultVariants: { variant: "insert" }
639
649
  }
640
- ), mn = ["text", "image", "text-image"], gn = {
641
- text: /* @__PURE__ */ g(Ot, { "aria-hidden": !0 }),
642
- image: /* @__PURE__ */ g(Rt, { "aria-hidden": !0 }),
643
- "text-image": /* @__PURE__ */ g(Ht, { "aria-hidden": !0 })
650
+ ), gn = ["text", "image", "text-image"], xn = {
651
+ text: /* @__PURE__ */ g(Ut, { "aria-hidden": !0 }),
652
+ image: /* @__PURE__ */ g(Ft, { "aria-hidden": !0 }),
653
+ "text-image": /* @__PURE__ */ g(Rt, { "aria-hidden": !0 })
644
654
  }, $t = {
645
655
  insert: {
646
656
  text: "insert.text",
@@ -652,7 +662,7 @@ const bn = Nt(
652
662
  image: "insert.copyImage",
653
663
  "text-image": "insert.copyTextImage"
654
664
  }
655
- }, xn = ht(
665
+ }, vn = ht(
656
666
  function({
657
667
  card: n,
658
668
  variant: i = "insert",
@@ -662,13 +672,13 @@ const bn = Nt(
662
672
  size: e = "sm",
663
673
  intent: c = "primary"
664
674
  }, u) {
665
- const { t: d } = Dt(), f = St(null), b = (l) => {
666
- const T = yt(n), y = Lt(n);
675
+ const { t: d } = Nt(), f = Dt(null), b = (l) => {
676
+ const T = Lt(n), y = wt(n);
667
677
  let p = "", E = "";
668
678
  const w = l === "text" ? null : K(f.current, W(n));
669
- return w && (p = et(n, w, nt(n, void 0)), E = `data:image/svg+xml,${encodeURIComponent(p)}`), { mode: l, text: T, html: y, svg: p, imageDataUri: E, pngDataUri: () => w ? Yt(n, { colours: w }) : Promise.resolve({ dataUri: "", width: 0, height: 0 }) };
679
+ return w && (p = et(n, w, nt(n, void 0)), E = `data:image/svg+xml,${encodeURIComponent(p)}`), { mode: l, text: T, html: y, svg: p, imageDataUri: E, pngDataUri: () => w ? St(n, { colours: w }) : Promise.resolve({ dataUri: "", width: 0, height: 0 }) };
670
680
  }, $ = i === "copy" ? (l) => {
671
- if (!$n()) {
681
+ if (!hn()) {
672
682
  r == null || r(new Error("Clipboard write unavailable in this context"));
673
683
  return;
674
684
  }
@@ -678,7 +688,7 @@ const bn = Nt(
678
688
  );
679
689
  (async () => {
680
690
  try {
681
- const y = await pn(l, n, T);
691
+ const y = await bn(l, n, T);
682
692
  await navigator.clipboard.write([y]), o == null || o(l);
683
693
  } catch (y) {
684
694
  r == null || r(y);
@@ -693,10 +703,10 @@ const bn = Nt(
693
703
  ref: u,
694
704
  "data-component": "insert-result",
695
705
  "data-variant": i,
696
- className: bn({ variant: i }),
706
+ className: mn({ variant: i }),
697
707
  children: [
698
708
  /* @__PURE__ */ P("span", { ref: f, "aria-hidden": !0, className: "ds:sr-only", children: [
699
- Qt.map((l) => /* @__PURE__ */ g(
709
+ tn.map((l) => /* @__PURE__ */ g(
700
710
  "span",
701
711
  {
702
712
  "data-k": l,
@@ -707,19 +717,19 @@ const bn = Nt(
707
717
  W(n).map((l) => /* @__PURE__ */ g(
708
718
  "span",
709
719
  {
710
- "data-token": vt(l),
711
- className: tn(l)
720
+ "data-token": kt(l),
721
+ className: nn(l)
712
722
  },
713
723
  l
714
724
  ))
715
725
  ] }),
716
- mn.map((l) => /* @__PURE__ */ g(
717
- Gt,
726
+ gn.map((l) => /* @__PURE__ */ g(
727
+ Ht,
718
728
  {
719
729
  type: "button",
720
730
  intent: c,
721
731
  size: e,
722
- startIcon: gn[l],
732
+ startIcon: xn[l],
723
733
  "aria-label": d($t[i][l]),
724
734
  onClick: () => $(l),
725
735
  children: d($t[i][l])
@@ -731,12 +741,12 @@ const bn = Nt(
731
741
  );
732
742
  }
733
743
  );
734
- xn.displayName = "InsertButton";
744
+ vn.displayName = "InsertButton";
735
745
  export {
736
- qt as B,
737
- xn as I,
738
- _n as a,
746
+ Jt as B,
747
+ vn as I,
748
+ In as a,
739
749
  Mn as b,
740
- Yt as s
750
+ St as s
741
751
  };
742
- //# sourceMappingURL=insert-result-njqBthzT.js.map
752
+ //# sourceMappingURL=insert-result-C1SYdueh.js.map