@mieweb/ui 0.6.1-dev.158 → 0.6.1-dev.164

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 (134) hide show
  1. package/dist/MedicationEditor-Bp4NLy7y.d.cts +352 -0
  2. package/dist/MedicationEditor-Bp4NLy7y.d.ts +352 -0
  3. package/dist/ag-grid.cjs +5 -5
  4. package/dist/ag-grid.js +1 -1
  5. package/dist/{chunk-H4T5T65N.cjs → chunk-2JQBPU3Y.cjs} +3 -3
  6. package/dist/{chunk-H4T5T65N.cjs.map → chunk-2JQBPU3Y.cjs.map} +1 -1
  7. package/dist/{chunk-6555OYRU.js → chunk-5BQE6BEL.js} +2 -2
  8. package/dist/{chunk-6555OYRU.js.map → chunk-5BQE6BEL.js.map} +1 -1
  9. package/dist/chunk-67CEEDAP.cjs +1605 -0
  10. package/dist/chunk-67CEEDAP.cjs.map +1 -0
  11. package/dist/{chunk-ULF4PWHW.cjs → chunk-7BARESXI.cjs} +3 -3
  12. package/dist/{chunk-ULF4PWHW.cjs.map → chunk-7BARESXI.cjs.map} +1 -1
  13. package/dist/{chunk-UHPQYBXQ.js → chunk-7QZSJFYT.js} +3 -6
  14. package/dist/chunk-7QZSJFYT.js.map +1 -0
  15. package/dist/chunk-7ZVTLTJF.js +109 -0
  16. package/dist/chunk-7ZVTLTJF.js.map +1 -0
  17. package/dist/{chunk-2T4JU5RH.cjs → chunk-CB4JX5EJ.cjs} +3 -6
  18. package/dist/chunk-CB4JX5EJ.cjs.map +1 -0
  19. package/dist/{chunk-FADQVM4M.cjs → chunk-CDMWZBDD.cjs} +6 -6
  20. package/dist/{chunk-FADQVM4M.cjs.map → chunk-CDMWZBDD.cjs.map} +1 -1
  21. package/dist/chunk-DHKYGVP7.js +3 -0
  22. package/dist/{chunk-LEMY57MI.js.map → chunk-DHKYGVP7.js.map} +1 -1
  23. package/dist/{chunk-FSBFQBNE.cjs → chunk-DKGUOMBC.cjs} +2 -2
  24. package/dist/{chunk-FSBFQBNE.cjs.map → chunk-DKGUOMBC.cjs.map} +1 -1
  25. package/dist/{chunk-4FALCEJI.cjs → chunk-EL2RSQTJ.cjs} +2 -2
  26. package/dist/{chunk-4FALCEJI.cjs.map → chunk-EL2RSQTJ.cjs.map} +1 -1
  27. package/dist/{chunk-ASLZUFH4.js → chunk-ETGZ5DSA.js} +4 -4
  28. package/dist/{chunk-ASLZUFH4.js.map → chunk-ETGZ5DSA.js.map} +1 -1
  29. package/dist/{chunk-TXYTMU3K.js → chunk-FJG7KUDJ.js} +4 -4
  30. package/dist/{chunk-TXYTMU3K.js.map → chunk-FJG7KUDJ.js.map} +1 -1
  31. package/dist/{chunk-6R2ZPDN7.cjs → chunk-GBRPZGSI.cjs} +8 -8
  32. package/dist/{chunk-6R2ZPDN7.cjs.map → chunk-GBRPZGSI.cjs.map} +1 -1
  33. package/dist/{chunk-M7BLVBL4.js → chunk-GSOOPTGM.js} +3 -3
  34. package/dist/{chunk-M7BLVBL4.js.map → chunk-GSOOPTGM.js.map} +1 -1
  35. package/dist/chunk-HUXOASEB.js +1568 -0
  36. package/dist/chunk-HUXOASEB.js.map +1 -0
  37. package/dist/chunk-IQ4KQJAO.js +3 -0
  38. package/dist/{chunk-4ZU53GNR.cjs.map → chunk-IQ4KQJAO.js.map} +1 -1
  39. package/dist/{chunk-RXY5SD3O.js → chunk-NBD236EH.js} +50 -2
  40. package/dist/chunk-NBD236EH.js.map +1 -0
  41. package/dist/chunk-OF7NTZ2I.js +3 -0
  42. package/dist/chunk-OF7NTZ2I.js.map +1 -0
  43. package/dist/chunk-RHNPILZQ.cjs +4 -0
  44. package/dist/chunk-RHNPILZQ.cjs.map +1 -0
  45. package/dist/chunk-RI56YPED.cjs +201 -0
  46. package/dist/chunk-RI56YPED.cjs.map +1 -0
  47. package/dist/{chunk-DCER2QQB.js → chunk-T42BCIUA.js} +2 -2
  48. package/dist/{chunk-DCER2QQB.js.map → chunk-T42BCIUA.js.map} +1 -1
  49. package/dist/{chunk-4ZU53GNR.cjs → chunk-UTYUT5YY.cjs} +62 -2
  50. package/dist/chunk-UTYUT5YY.cjs.map +1 -0
  51. package/dist/{chunk-Q7NBJFEB.js → chunk-UVQEHZRF.js} +2 -2
  52. package/dist/{chunk-Q7NBJFEB.js.map → chunk-UVQEHZRF.js.map} +1 -1
  53. package/dist/chunk-VBWRH4UW.cjs +4 -0
  54. package/dist/chunk-VBWRH4UW.cjs.map +1 -0
  55. package/dist/{chunk-LZPPH5BW.cjs → chunk-VJOVJTFP.cjs} +14 -12
  56. package/dist/chunk-VJOVJTFP.cjs.map +1 -0
  57. package/dist/{chunk-OVQKCUTZ.js → chunk-WFS6R2F5.js} +3 -3
  58. package/dist/{chunk-OVQKCUTZ.js.map → chunk-WFS6R2F5.js.map} +1 -1
  59. package/dist/chunk-Y5KEFV5O.js +192 -0
  60. package/dist/chunk-Y5KEFV5O.js.map +1 -0
  61. package/dist/{chunk-3SSXDWD7.js → chunk-YBLIDESO.js} +14 -12
  62. package/dist/chunk-YBLIDESO.js.map +1 -0
  63. package/dist/chunk-YVPC65ZJ.cjs +134 -0
  64. package/dist/chunk-YVPC65ZJ.cjs.map +1 -0
  65. package/dist/{chunk-7PA26KBF.cjs → chunk-YYDW3ZZS.cjs} +50 -2
  66. package/dist/chunk-YYDW3ZZS.cjs.map +1 -0
  67. package/dist/{chunk-3M4P2KMG.cjs → chunk-ZHBANUBI.cjs} +2 -2
  68. package/dist/{chunk-3M4P2KMG.cjs.map → chunk-ZHBANUBI.cjs.map} +1 -1
  69. package/dist/components/Badge/index.cjs +4 -3
  70. package/dist/components/Badge/index.js +2 -1
  71. package/dist/components/Card/index.cjs +16 -15
  72. package/dist/components/Card/index.js +2 -1
  73. package/dist/components/CountryCodeDropdown/index.cjs +5 -5
  74. package/dist/components/CountryCodeDropdown/index.js +2 -2
  75. package/dist/components/Dropdown/index.cjs +8 -8
  76. package/dist/components/Dropdown/index.js +2 -2
  77. package/dist/components/RichTextEditor/index.cjs +7 -7
  78. package/dist/components/RichTextEditor/index.js +4 -4
  79. package/dist/components/Skeleton/index.d.cts +1 -1
  80. package/dist/components/Skeleton/index.d.ts +1 -1
  81. package/dist/components/SuperChat/index.cjs +71 -19
  82. package/dist/components/SuperChat/index.cjs.map +1 -1
  83. package/dist/components/SuperChat/index.js +65 -13
  84. package/dist/components/SuperChat/index.js.map +1 -1
  85. package/dist/components/SuperChat/plugins/index.cjs +7 -4
  86. package/dist/components/SuperChat/plugins/index.cjs.map +1 -1
  87. package/dist/components/SuperChat/plugins/index.js +6 -3
  88. package/dist/components/SuperChat/plugins/index.js.map +1 -1
  89. package/dist/datavis.cjs +273 -5
  90. package/dist/datavis.cjs.map +1 -1
  91. package/dist/datavis.d.cts +62 -1
  92. package/dist/datavis.d.ts +62 -1
  93. package/dist/datavis.js +251 -1
  94. package/dist/datavis.js.map +1 -1
  95. package/dist/esheet.cjs +182 -0
  96. package/dist/esheet.cjs.map +1 -1
  97. package/dist/esheet.d.cts +117 -0
  98. package/dist/esheet.d.ts +117 -0
  99. package/dist/esheet.js +161 -0
  100. package/dist/esheet.js.map +1 -1
  101. package/dist/hooks/index.cjs +33 -16
  102. package/dist/hooks/index.d.cts +62 -1
  103. package/dist/hooks/index.d.ts +62 -1
  104. package/dist/hooks/index.js +3 -2
  105. package/dist/index.cjs +3937 -952
  106. package/dist/index.cjs.map +1 -1
  107. package/dist/index.d.cts +981 -2
  108. package/dist/index.d.ts +981 -2
  109. package/dist/index.js +3316 -455
  110. package/dist/index.js.map +1 -1
  111. package/dist/kerebron.cjs +15 -0
  112. package/dist/kerebron.cjs.map +1 -1
  113. package/dist/kerebron.js +15 -0
  114. package/dist/kerebron.js.map +1 -1
  115. package/dist/{nitroTableGrid-J7F6D2QA.cjs → nitroTableGrid-3J2GY6CK.cjs} +14 -11
  116. package/dist/nitroTableGrid-3J2GY6CK.cjs.map +1 -0
  117. package/dist/nitroTableGrid-SIMT7635.js +25 -0
  118. package/dist/nitroTableGrid-SIMT7635.js.map +1 -0
  119. package/dist/orderRows-BUJYgSc7.d.cts +221 -0
  120. package/dist/orderRows-BUJYgSc7.d.ts +221 -0
  121. package/dist/styles.css +1 -1
  122. package/dist/tailwind-preset.cjs +4 -4
  123. package/dist/tailwind-preset.js +1 -1
  124. package/package.json +4 -4
  125. package/dist/chunk-2T4JU5RH.cjs.map +0 -1
  126. package/dist/chunk-3SSXDWD7.js.map +0 -1
  127. package/dist/chunk-7PA26KBF.cjs.map +0 -1
  128. package/dist/chunk-LEMY57MI.js +0 -3
  129. package/dist/chunk-LZPPH5BW.cjs.map +0 -1
  130. package/dist/chunk-RXY5SD3O.js.map +0 -1
  131. package/dist/chunk-UHPQYBXQ.js.map +0 -1
  132. package/dist/nitroTableGrid-GKJAX3J4.js +0 -22
  133. package/dist/nitroTableGrid-GKJAX3J4.js.map +0 -1
  134. package/dist/nitroTableGrid-J7F6D2QA.cjs.map +0 -1
@@ -1,14 +1,15 @@
1
1
  import { TextRenderContext } from '../../chunk-I6CY5C6A.js';
2
2
  export { TextRenderContext, useTextRenderContext } from '../../chunk-I6CY5C6A.js';
3
3
  import { ChatBubble, MCPToolCallDisplay, AITypingIndicator, SparklesIcon, CloseIcon } from '../../chunk-NQME7MCK.js';
4
- import { MessageComposer } from '../../chunk-UHPQYBXQ.js';
5
- import { Dropdown, DropdownItem } from '../../chunk-M7BLVBL4.js';
4
+ import { MessageComposer } from '../../chunk-7QZSJFYT.js';
5
+ import { Dropdown, DropdownItem } from '../../chunk-GSOOPTGM.js';
6
6
  import '../../chunk-KAKH2UZA.js';
7
- import '../../chunk-PVUDXJAI.js';
8
7
  import { Avatar } from '../../chunk-WO5CAOAN.js';
9
- import { Badge } from '../../chunk-DCER2QQB.js';
10
- import '../../chunk-T4ME7QCT.js';
8
+ import '../../chunk-IQ4KQJAO.js';
9
+ import '../../chunk-PVUDXJAI.js';
10
+ import { Badge } from '../../chunk-T42BCIUA.js';
11
11
  import '../../chunk-OKBR6PX4.js';
12
+ import '../../chunk-T4ME7QCT.js';
12
13
  import { cn } from '../../chunk-F3SOEIN2.js';
13
14
  import * as React4 from 'react';
14
15
  import Markdown, { defaultUrlTransform } from 'react-markdown';
@@ -100,7 +101,7 @@ function baseComponents() {
100
101
  {
101
102
  ...props,
102
103
  className: cn(
103
- "text-primary-700 hover:text-primary-800 dark:text-primary-300 underline underline-offset-2",
104
+ "text-primary-800 hover:text-primary-900 dark:text-primary-300 underline underline-offset-2",
104
105
  props.className
105
106
  ),
106
107
  target: props.target ?? "_blank",
@@ -112,6 +113,7 @@ function baseComponents() {
112
113
  "pre",
113
114
  {
114
115
  ...props,
116
+ tabIndex: 0,
115
117
  className: cn(
116
118
  "overflow-x-auto rounded-lg bg-neutral-900 p-3 text-sm text-neutral-100 dark:bg-neutral-950",
117
119
  props.className
@@ -125,12 +127,24 @@ function baseComponents() {
125
127
  {
126
128
  ...props,
127
129
  className: cn(
128
- !isBlock && "rounded bg-neutral-200 px-1 py-0.5 text-[0.85em] dark:bg-neutral-700",
130
+ !isBlock && "rounded bg-neutral-200 px-1 py-0.5 text-[0.85em] text-neutral-800 dark:bg-neutral-700 dark:text-neutral-100",
129
131
  props.className
130
132
  )
131
133
  }
132
134
  );
133
135
  },
136
+ input: ({ node: _node, ...props }) => {
137
+ if (props.type === "checkbox") {
138
+ return /* @__PURE__ */ jsx(
139
+ "input",
140
+ {
141
+ ...props,
142
+ "aria-label": props["aria-label"] ?? (props["aria-labelledby"] ? void 0 : "Task list item")
143
+ }
144
+ );
145
+ }
146
+ return /* @__PURE__ */ jsx("input", { ...props });
147
+ },
134
148
  table: ({ node: _node, ...props }) => /* @__PURE__ */ jsx("div", { className: "my-2 overflow-x-auto", children: /* @__PURE__ */ jsx(
135
149
  "table",
136
150
  {
@@ -311,6 +325,43 @@ function lastMessageByTime(thread) {
311
325
  }
312
326
  return latest;
313
327
  }
328
+ function parseHexColor(value) {
329
+ const hex = value.trim();
330
+ if (!/^#([0-9a-f]{3}|[0-9a-f]{6})$/i.test(hex)) return null;
331
+ const normalized = hex.length === 4 ? "#" + [...hex.slice(1)].map((char) => char + char).join("") : hex;
332
+ return [1, 3, 5].map(
333
+ (start) => parseInt(normalized.slice(start, start + 2), 16)
334
+ );
335
+ }
336
+ function relativeLuminanceChannel(channel) {
337
+ const normalized = channel / 255;
338
+ return normalized <= 0.03928 ? normalized / 12.92 : ((normalized + 0.055) / 1.055) ** 2.4;
339
+ }
340
+ function relativeLuminance(value) {
341
+ const rgb = parseHexColor(value);
342
+ if (!rgb) return null;
343
+ const [red, green, blue] = rgb;
344
+ return 0.2126 * relativeLuminanceChannel(red) + 0.7152 * relativeLuminanceChannel(green) + 0.0722 * relativeLuminanceChannel(blue);
345
+ }
346
+ function contrastRatio(foreground, background) {
347
+ const foregroundLuminance = relativeLuminance(foreground);
348
+ const backgroundLuminance = relativeLuminance(background);
349
+ if (foregroundLuminance === null || backgroundLuminance === null) return null;
350
+ const lighter = Math.max(foregroundLuminance, backgroundLuminance);
351
+ const darker = Math.min(foregroundLuminance, backgroundLuminance);
352
+ return (lighter + 0.05) / (darker + 0.05);
353
+ }
354
+ function minimumContrastRatio(value, backgrounds) {
355
+ const contrasts = backgrounds.map((background) => contrastRatio(value, background)).filter((contrast) => contrast !== null);
356
+ if (contrasts.length !== backgrounds.length) return null;
357
+ return Math.min(...contrasts);
358
+ }
359
+ function accessibleAccentTextColor(value) {
360
+ if (!value) return void 0;
361
+ const contrast = minimumContrastRatio(value, ["#f5f5f5", "#262626"]);
362
+ if (contrast === null) return value;
363
+ return contrast < 4.5 ? void 0 : value;
364
+ }
314
365
  function ParticipantAvatar({
315
366
  participant
316
367
  }) {
@@ -552,6 +603,7 @@ var MessageRow = React4.memo(function MessageRow2({
552
603
  );
553
604
  }
554
605
  const accent = participant?.color;
606
+ const accentTextColor = accessibleAccentTextColor(accent);
555
607
  const authorName = participant?.name ?? "Unknown";
556
608
  const canEdit = !!editable && isSelf && !streaming && typeof message.text === "string" && !message.content?.length;
557
609
  const startEdit = () => {
@@ -632,17 +684,17 @@ ${block.text}
632
684
  "span",
633
685
  {
634
686
  className: "text-xs font-medium",
635
- style: accent ? { color: accent } : void 0,
687
+ style: accentTextColor ? { color: accentTextColor } : void 0,
636
688
  children: authorName
637
689
  }
638
690
  ),
639
- participant?.role && /* @__PURE__ */ jsx("span", { className: "text-[10px] text-neutral-400", children: participant.role }),
640
- /* @__PURE__ */ jsx("span", { className: "text-[10px] text-neutral-400", children: formatTime(message.time) }),
691
+ participant?.role && /* @__PURE__ */ jsx("span", { className: "text-[10px] text-neutral-500 dark:text-neutral-400", children: participant.role }),
692
+ /* @__PURE__ */ jsx("span", { className: "text-[10px] text-neutral-500 dark:text-neutral-400", children: formatTime(message.time) }),
641
693
  message.editedAt && /* @__PURE__ */ jsx(
642
694
  "span",
643
695
  {
644
696
  "data-slot": "superchat-edited-indicator",
645
- className: "text-[10px] text-neutral-400",
697
+ className: "text-[10px] text-neutral-500 dark:text-neutral-400",
646
698
  title: `Edited ${formatTime(message.editedAt)}`,
647
699
  children: "(edited)"
648
700
  }
@@ -685,7 +737,7 @@ ${block.text}
685
737
  "data-slot": "superchat-bubble",
686
738
  variant: isSelf ? "user" : "assistant",
687
739
  hasError: message.status === "error",
688
- className: "text-sm",
740
+ className: "text-sm has-[[data-slot=superchat-nitro-table]]:w-full has-[[data-slot=superchat-nitro-table]]:max-w-full",
689
741
  children: isEditing ? /* @__PURE__ */ jsxs(
690
742
  "div",
691
743
  {
@@ -1166,7 +1218,7 @@ function SuperChatConversations({
1166
1218
  children: [
1167
1219
  /* @__PURE__ */ jsxs("span", { className: "flex-1 truncate", children: [
1168
1220
  /* @__PURE__ */ jsx("span", { className: "block truncate font-medium", children: c.title }),
1169
- last?.text && /* @__PURE__ */ jsx("span", { className: "block truncate text-xs text-neutral-400", children: last.text })
1221
+ last?.text && /* @__PURE__ */ jsx("span", { className: "block truncate text-xs text-neutral-600 dark:text-neutral-400", children: last.text })
1170
1222
  ] }),
1171
1223
  !!c.unread && /* @__PURE__ */ jsxs("span", { className: "bg-primary-600 ml-1 inline-flex h-5 min-w-5 items-center justify-center rounded-full px-1.5 text-[10px] font-semibold text-white", children: [
1172
1224
  c.unread,