@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.
- package/dist/MedicationEditor-Bp4NLy7y.d.cts +352 -0
- package/dist/MedicationEditor-Bp4NLy7y.d.ts +352 -0
- package/dist/ag-grid.cjs +5 -5
- package/dist/ag-grid.js +1 -1
- package/dist/{chunk-H4T5T65N.cjs → chunk-2JQBPU3Y.cjs} +3 -3
- package/dist/{chunk-H4T5T65N.cjs.map → chunk-2JQBPU3Y.cjs.map} +1 -1
- package/dist/{chunk-6555OYRU.js → chunk-5BQE6BEL.js} +2 -2
- package/dist/{chunk-6555OYRU.js.map → chunk-5BQE6BEL.js.map} +1 -1
- package/dist/chunk-67CEEDAP.cjs +1605 -0
- package/dist/chunk-67CEEDAP.cjs.map +1 -0
- package/dist/{chunk-ULF4PWHW.cjs → chunk-7BARESXI.cjs} +3 -3
- package/dist/{chunk-ULF4PWHW.cjs.map → chunk-7BARESXI.cjs.map} +1 -1
- package/dist/{chunk-UHPQYBXQ.js → chunk-7QZSJFYT.js} +3 -6
- package/dist/chunk-7QZSJFYT.js.map +1 -0
- package/dist/chunk-7ZVTLTJF.js +109 -0
- package/dist/chunk-7ZVTLTJF.js.map +1 -0
- package/dist/{chunk-2T4JU5RH.cjs → chunk-CB4JX5EJ.cjs} +3 -6
- package/dist/chunk-CB4JX5EJ.cjs.map +1 -0
- package/dist/{chunk-FADQVM4M.cjs → chunk-CDMWZBDD.cjs} +6 -6
- package/dist/{chunk-FADQVM4M.cjs.map → chunk-CDMWZBDD.cjs.map} +1 -1
- package/dist/chunk-DHKYGVP7.js +3 -0
- package/dist/{chunk-LEMY57MI.js.map → chunk-DHKYGVP7.js.map} +1 -1
- package/dist/{chunk-FSBFQBNE.cjs → chunk-DKGUOMBC.cjs} +2 -2
- package/dist/{chunk-FSBFQBNE.cjs.map → chunk-DKGUOMBC.cjs.map} +1 -1
- package/dist/{chunk-4FALCEJI.cjs → chunk-EL2RSQTJ.cjs} +2 -2
- package/dist/{chunk-4FALCEJI.cjs.map → chunk-EL2RSQTJ.cjs.map} +1 -1
- package/dist/{chunk-ASLZUFH4.js → chunk-ETGZ5DSA.js} +4 -4
- package/dist/{chunk-ASLZUFH4.js.map → chunk-ETGZ5DSA.js.map} +1 -1
- package/dist/{chunk-TXYTMU3K.js → chunk-FJG7KUDJ.js} +4 -4
- package/dist/{chunk-TXYTMU3K.js.map → chunk-FJG7KUDJ.js.map} +1 -1
- package/dist/{chunk-6R2ZPDN7.cjs → chunk-GBRPZGSI.cjs} +8 -8
- package/dist/{chunk-6R2ZPDN7.cjs.map → chunk-GBRPZGSI.cjs.map} +1 -1
- package/dist/{chunk-M7BLVBL4.js → chunk-GSOOPTGM.js} +3 -3
- package/dist/{chunk-M7BLVBL4.js.map → chunk-GSOOPTGM.js.map} +1 -1
- package/dist/chunk-HUXOASEB.js +1568 -0
- package/dist/chunk-HUXOASEB.js.map +1 -0
- package/dist/chunk-IQ4KQJAO.js +3 -0
- package/dist/{chunk-4ZU53GNR.cjs.map → chunk-IQ4KQJAO.js.map} +1 -1
- package/dist/{chunk-RXY5SD3O.js → chunk-NBD236EH.js} +50 -2
- package/dist/chunk-NBD236EH.js.map +1 -0
- package/dist/chunk-OF7NTZ2I.js +3 -0
- package/dist/chunk-OF7NTZ2I.js.map +1 -0
- package/dist/chunk-RHNPILZQ.cjs +4 -0
- package/dist/chunk-RHNPILZQ.cjs.map +1 -0
- package/dist/chunk-RI56YPED.cjs +201 -0
- package/dist/chunk-RI56YPED.cjs.map +1 -0
- package/dist/{chunk-DCER2QQB.js → chunk-T42BCIUA.js} +2 -2
- package/dist/{chunk-DCER2QQB.js.map → chunk-T42BCIUA.js.map} +1 -1
- package/dist/{chunk-4ZU53GNR.cjs → chunk-UTYUT5YY.cjs} +62 -2
- package/dist/chunk-UTYUT5YY.cjs.map +1 -0
- package/dist/{chunk-Q7NBJFEB.js → chunk-UVQEHZRF.js} +2 -2
- package/dist/{chunk-Q7NBJFEB.js.map → chunk-UVQEHZRF.js.map} +1 -1
- package/dist/chunk-VBWRH4UW.cjs +4 -0
- package/dist/chunk-VBWRH4UW.cjs.map +1 -0
- package/dist/{chunk-LZPPH5BW.cjs → chunk-VJOVJTFP.cjs} +14 -12
- package/dist/chunk-VJOVJTFP.cjs.map +1 -0
- package/dist/{chunk-OVQKCUTZ.js → chunk-WFS6R2F5.js} +3 -3
- package/dist/{chunk-OVQKCUTZ.js.map → chunk-WFS6R2F5.js.map} +1 -1
- package/dist/chunk-Y5KEFV5O.js +192 -0
- package/dist/chunk-Y5KEFV5O.js.map +1 -0
- package/dist/{chunk-3SSXDWD7.js → chunk-YBLIDESO.js} +14 -12
- package/dist/chunk-YBLIDESO.js.map +1 -0
- package/dist/chunk-YVPC65ZJ.cjs +134 -0
- package/dist/chunk-YVPC65ZJ.cjs.map +1 -0
- package/dist/{chunk-7PA26KBF.cjs → chunk-YYDW3ZZS.cjs} +50 -2
- package/dist/chunk-YYDW3ZZS.cjs.map +1 -0
- package/dist/{chunk-3M4P2KMG.cjs → chunk-ZHBANUBI.cjs} +2 -2
- package/dist/{chunk-3M4P2KMG.cjs.map → chunk-ZHBANUBI.cjs.map} +1 -1
- package/dist/components/Badge/index.cjs +4 -3
- package/dist/components/Badge/index.js +2 -1
- package/dist/components/Card/index.cjs +16 -15
- package/dist/components/Card/index.js +2 -1
- package/dist/components/CountryCodeDropdown/index.cjs +5 -5
- package/dist/components/CountryCodeDropdown/index.js +2 -2
- package/dist/components/Dropdown/index.cjs +8 -8
- package/dist/components/Dropdown/index.js +2 -2
- package/dist/components/RichTextEditor/index.cjs +7 -7
- package/dist/components/RichTextEditor/index.js +4 -4
- package/dist/components/Skeleton/index.d.cts +1 -1
- package/dist/components/Skeleton/index.d.ts +1 -1
- package/dist/components/SuperChat/index.cjs +71 -19
- package/dist/components/SuperChat/index.cjs.map +1 -1
- package/dist/components/SuperChat/index.js +65 -13
- package/dist/components/SuperChat/index.js.map +1 -1
- package/dist/components/SuperChat/plugins/index.cjs +7 -4
- package/dist/components/SuperChat/plugins/index.cjs.map +1 -1
- package/dist/components/SuperChat/plugins/index.js +6 -3
- package/dist/components/SuperChat/plugins/index.js.map +1 -1
- package/dist/datavis.cjs +273 -5
- package/dist/datavis.cjs.map +1 -1
- package/dist/datavis.d.cts +62 -1
- package/dist/datavis.d.ts +62 -1
- package/dist/datavis.js +251 -1
- package/dist/datavis.js.map +1 -1
- package/dist/esheet.cjs +182 -0
- package/dist/esheet.cjs.map +1 -1
- package/dist/esheet.d.cts +117 -0
- package/dist/esheet.d.ts +117 -0
- package/dist/esheet.js +161 -0
- package/dist/esheet.js.map +1 -1
- package/dist/hooks/index.cjs +33 -16
- package/dist/hooks/index.d.cts +62 -1
- package/dist/hooks/index.d.ts +62 -1
- package/dist/hooks/index.js +3 -2
- package/dist/index.cjs +3937 -952
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +981 -2
- package/dist/index.d.ts +981 -2
- package/dist/index.js +3316 -455
- package/dist/index.js.map +1 -1
- package/dist/kerebron.cjs +15 -0
- package/dist/kerebron.cjs.map +1 -1
- package/dist/kerebron.js +15 -0
- package/dist/kerebron.js.map +1 -1
- package/dist/{nitroTableGrid-J7F6D2QA.cjs → nitroTableGrid-3J2GY6CK.cjs} +14 -11
- package/dist/nitroTableGrid-3J2GY6CK.cjs.map +1 -0
- package/dist/nitroTableGrid-SIMT7635.js +25 -0
- package/dist/nitroTableGrid-SIMT7635.js.map +1 -0
- package/dist/orderRows-BUJYgSc7.d.cts +221 -0
- package/dist/orderRows-BUJYgSc7.d.ts +221 -0
- package/dist/styles.css +1 -1
- package/dist/tailwind-preset.cjs +4 -4
- package/dist/tailwind-preset.js +1 -1
- package/package.json +4 -4
- package/dist/chunk-2T4JU5RH.cjs.map +0 -1
- package/dist/chunk-3SSXDWD7.js.map +0 -1
- package/dist/chunk-7PA26KBF.cjs.map +0 -1
- package/dist/chunk-LEMY57MI.js +0 -3
- package/dist/chunk-LZPPH5BW.cjs.map +0 -1
- package/dist/chunk-RXY5SD3O.js.map +0 -1
- package/dist/chunk-UHPQYBXQ.js.map +0 -1
- package/dist/nitroTableGrid-GKJAX3J4.js +0 -22
- package/dist/nitroTableGrid-GKJAX3J4.js.map +0 -1
- 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-
|
|
5
|
-
import { Dropdown, DropdownItem } from '../../chunk-
|
|
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
|
|
10
|
-
import '../../chunk-
|
|
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-
|
|
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:
|
|
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,
|