@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,36 +1,36 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk2JQBPU3Y_cjs = require('../../chunk-2JQBPU3Y.cjs');
|
|
4
4
|
require('../../chunk-MSRU3XBH.cjs');
|
|
5
|
-
require('../../chunk-FHY3K6PL.cjs');
|
|
6
5
|
require('../../chunk-IKMR2ADM.cjs');
|
|
6
|
+
require('../../chunk-FHY3K6PL.cjs');
|
|
7
7
|
require('../../chunk-OR5DRJCW.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
Object.defineProperty(exports, "Dropdown", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunk2JQBPU3Y_cjs.Dropdown; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "DropdownContent", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunk2JQBPU3Y_cjs.DropdownContent; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "DropdownHeader", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunk2JQBPU3Y_cjs.DropdownHeader; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "DropdownItem", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunk2JQBPU3Y_cjs.DropdownItem; }
|
|
26
26
|
});
|
|
27
27
|
Object.defineProperty(exports, "DropdownLabel", {
|
|
28
28
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunk2JQBPU3Y_cjs.DropdownLabel; }
|
|
30
30
|
});
|
|
31
31
|
Object.defineProperty(exports, "DropdownSeparator", {
|
|
32
32
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
33
|
+
get: function () { return chunk2JQBPU3Y_cjs.DropdownSeparator; }
|
|
34
34
|
});
|
|
35
35
|
//# sourceMappingURL=index.cjs.map
|
|
36
36
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { Dropdown, DropdownContent, DropdownHeader, DropdownItem, DropdownLabel, DropdownSeparator } from '../../chunk-
|
|
1
|
+
export { Dropdown, DropdownContent, DropdownHeader, DropdownItem, DropdownLabel, DropdownSeparator } from '../../chunk-GSOOPTGM.js';
|
|
2
2
|
import '../../chunk-PVUDXJAI.js';
|
|
3
|
-
import '../../chunk-T4ME7QCT.js';
|
|
4
3
|
import '../../chunk-OKBR6PX4.js';
|
|
4
|
+
import '../../chunk-T4ME7QCT.js';
|
|
5
5
|
import '../../chunk-F3SOEIN2.js';
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkGBRPZGSI_cjs = require('../../chunk-GBRPZGSI.cjs');
|
|
4
4
|
require('../../chunk-OXYFTCRW.cjs');
|
|
5
|
-
require('../../chunk-
|
|
6
|
-
require('../../chunk-A2QVQF54.cjs');
|
|
5
|
+
require('../../chunk-2JQBPU3Y.cjs');
|
|
7
6
|
require('../../chunk-MSRU3XBH.cjs');
|
|
8
|
-
require('../../chunk-
|
|
7
|
+
require('../../chunk-A2QVQF54.cjs');
|
|
9
8
|
require('../../chunk-IKMR2ADM.cjs');
|
|
9
|
+
require('../../chunk-FHY3K6PL.cjs');
|
|
10
10
|
var chunkC7RVKV25_cjs = require('../../chunk-C7RVKV25.cjs');
|
|
11
11
|
require('../../chunk-OR5DRJCW.cjs');
|
|
12
12
|
|
|
@@ -14,15 +14,15 @@ require('../../chunk-OR5DRJCW.cjs');
|
|
|
14
14
|
|
|
15
15
|
Object.defineProperty(exports, "RichTextEditor", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkGBRPZGSI_cjs.RichTextEditor; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "convertAngleBracketsToMustache", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkGBRPZGSI_cjs.convertAngleBracketsToMustache; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "processDictation", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkGBRPZGSI_cjs.processDictation; }
|
|
26
26
|
});
|
|
27
27
|
Object.defineProperty(exports, "isHtmlEmpty", {
|
|
28
28
|
enumerable: true,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { RichTextEditor, convertAngleBracketsToMustache, processDictation } from '../../chunk-
|
|
1
|
+
export { RichTextEditor, convertAngleBracketsToMustache, processDictation } from '../../chunk-FJG7KUDJ.js';
|
|
2
2
|
import '../../chunk-BX6BTDTR.js';
|
|
3
|
-
import '../../chunk-
|
|
4
|
-
import '../../chunk-ZVSW2KS6.js';
|
|
3
|
+
import '../../chunk-GSOOPTGM.js';
|
|
5
4
|
import '../../chunk-PVUDXJAI.js';
|
|
6
|
-
import '../../chunk-
|
|
5
|
+
import '../../chunk-ZVSW2KS6.js';
|
|
7
6
|
import '../../chunk-OKBR6PX4.js';
|
|
7
|
+
import '../../chunk-T4ME7QCT.js';
|
|
8
8
|
export { isHtmlEmpty } from '../../chunk-ERLPVXOV.js';
|
|
9
9
|
import '../../chunk-F3SOEIN2.js';
|
|
10
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -4,7 +4,7 @@ import * as React from 'react';
|
|
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
|
5
5
|
|
|
6
6
|
declare const skeletonVariants: (props?: ({
|
|
7
|
-
variant?: "button" | "title" | "image" | "text" | "default" | "
|
|
7
|
+
variant?: "button" | "title" | "image" | "text" | "default" | "card" | "avatar" | null | undefined;
|
|
8
8
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9
9
|
interface SkeletonProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof skeletonVariants> {
|
|
10
10
|
/** Width of the skeleton */
|
|
@@ -4,7 +4,7 @@ import * as React from 'react';
|
|
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
|
5
5
|
|
|
6
6
|
declare const skeletonVariants: (props?: ({
|
|
7
|
-
variant?: "button" | "title" | "image" | "text" | "default" | "
|
|
7
|
+
variant?: "button" | "title" | "image" | "text" | "default" | "card" | "avatar" | null | undefined;
|
|
8
8
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9
9
|
interface SkeletonProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof skeletonVariants> {
|
|
10
10
|
/** Width of the skeleton */
|
|
@@ -2,14 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
var chunkJFLC7SHM_cjs = require('../../chunk-JFLC7SHM.cjs');
|
|
4
4
|
var chunkIWDQPSJN_cjs = require('../../chunk-IWDQPSJN.cjs');
|
|
5
|
-
var
|
|
6
|
-
var
|
|
5
|
+
var chunkCB4JX5EJ_cjs = require('../../chunk-CB4JX5EJ.cjs');
|
|
6
|
+
var chunk2JQBPU3Y_cjs = require('../../chunk-2JQBPU3Y.cjs');
|
|
7
7
|
require('../../chunk-LOTMAKUG.cjs');
|
|
8
|
-
require('../../chunk-MSRU3XBH.cjs');
|
|
9
8
|
var chunkFQ3UCZUX_cjs = require('../../chunk-FQ3UCZUX.cjs');
|
|
10
|
-
|
|
11
|
-
require('../../chunk-
|
|
9
|
+
require('../../chunk-VBWRH4UW.cjs');
|
|
10
|
+
require('../../chunk-MSRU3XBH.cjs');
|
|
11
|
+
var chunkEL2RSQTJ_cjs = require('../../chunk-EL2RSQTJ.cjs');
|
|
12
12
|
require('../../chunk-IKMR2ADM.cjs');
|
|
13
|
+
require('../../chunk-FHY3K6PL.cjs');
|
|
13
14
|
var chunkOR5DRJCW_cjs = require('../../chunk-OR5DRJCW.cjs');
|
|
14
15
|
var React4 = require('react');
|
|
15
16
|
var Markdown = require('react-markdown');
|
|
@@ -126,7 +127,7 @@ function baseComponents() {
|
|
|
126
127
|
{
|
|
127
128
|
...props,
|
|
128
129
|
className: chunkOR5DRJCW_cjs.cn(
|
|
129
|
-
"text-primary-
|
|
130
|
+
"text-primary-800 hover:text-primary-900 dark:text-primary-300 underline underline-offset-2",
|
|
130
131
|
props.className
|
|
131
132
|
),
|
|
132
133
|
target: props.target ?? "_blank",
|
|
@@ -138,6 +139,7 @@ function baseComponents() {
|
|
|
138
139
|
"pre",
|
|
139
140
|
{
|
|
140
141
|
...props,
|
|
142
|
+
tabIndex: 0,
|
|
141
143
|
className: chunkOR5DRJCW_cjs.cn(
|
|
142
144
|
"overflow-x-auto rounded-lg bg-neutral-900 p-3 text-sm text-neutral-100 dark:bg-neutral-950",
|
|
143
145
|
props.className
|
|
@@ -151,12 +153,24 @@ function baseComponents() {
|
|
|
151
153
|
{
|
|
152
154
|
...props,
|
|
153
155
|
className: chunkOR5DRJCW_cjs.cn(
|
|
154
|
-
!isBlock && "rounded bg-neutral-200 px-1 py-0.5 text-[0.85em] dark:bg-neutral-700",
|
|
156
|
+
!isBlock && "rounded bg-neutral-200 px-1 py-0.5 text-[0.85em] text-neutral-800 dark:bg-neutral-700 dark:text-neutral-100",
|
|
155
157
|
props.className
|
|
156
158
|
)
|
|
157
159
|
}
|
|
158
160
|
);
|
|
159
161
|
},
|
|
162
|
+
input: ({ node: _node, ...props }) => {
|
|
163
|
+
if (props.type === "checkbox") {
|
|
164
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
165
|
+
"input",
|
|
166
|
+
{
|
|
167
|
+
...props,
|
|
168
|
+
"aria-label": props["aria-label"] ?? (props["aria-labelledby"] ? void 0 : "Task list item")
|
|
169
|
+
}
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
return /* @__PURE__ */ jsxRuntime.jsx("input", { ...props });
|
|
173
|
+
},
|
|
160
174
|
table: ({ node: _node, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "my-2 overflow-x-auto", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
161
175
|
"table",
|
|
162
176
|
{
|
|
@@ -337,6 +351,43 @@ function lastMessageByTime(thread) {
|
|
|
337
351
|
}
|
|
338
352
|
return latest;
|
|
339
353
|
}
|
|
354
|
+
function parseHexColor(value) {
|
|
355
|
+
const hex = value.trim();
|
|
356
|
+
if (!/^#([0-9a-f]{3}|[0-9a-f]{6})$/i.test(hex)) return null;
|
|
357
|
+
const normalized = hex.length === 4 ? "#" + [...hex.slice(1)].map((char) => char + char).join("") : hex;
|
|
358
|
+
return [1, 3, 5].map(
|
|
359
|
+
(start) => parseInt(normalized.slice(start, start + 2), 16)
|
|
360
|
+
);
|
|
361
|
+
}
|
|
362
|
+
function relativeLuminanceChannel(channel) {
|
|
363
|
+
const normalized = channel / 255;
|
|
364
|
+
return normalized <= 0.03928 ? normalized / 12.92 : ((normalized + 0.055) / 1.055) ** 2.4;
|
|
365
|
+
}
|
|
366
|
+
function relativeLuminance(value) {
|
|
367
|
+
const rgb = parseHexColor(value);
|
|
368
|
+
if (!rgb) return null;
|
|
369
|
+
const [red, green, blue] = rgb;
|
|
370
|
+
return 0.2126 * relativeLuminanceChannel(red) + 0.7152 * relativeLuminanceChannel(green) + 0.0722 * relativeLuminanceChannel(blue);
|
|
371
|
+
}
|
|
372
|
+
function contrastRatio(foreground, background) {
|
|
373
|
+
const foregroundLuminance = relativeLuminance(foreground);
|
|
374
|
+
const backgroundLuminance = relativeLuminance(background);
|
|
375
|
+
if (foregroundLuminance === null || backgroundLuminance === null) return null;
|
|
376
|
+
const lighter = Math.max(foregroundLuminance, backgroundLuminance);
|
|
377
|
+
const darker = Math.min(foregroundLuminance, backgroundLuminance);
|
|
378
|
+
return (lighter + 0.05) / (darker + 0.05);
|
|
379
|
+
}
|
|
380
|
+
function minimumContrastRatio(value, backgrounds) {
|
|
381
|
+
const contrasts = backgrounds.map((background) => contrastRatio(value, background)).filter((contrast) => contrast !== null);
|
|
382
|
+
if (contrasts.length !== backgrounds.length) return null;
|
|
383
|
+
return Math.min(...contrasts);
|
|
384
|
+
}
|
|
385
|
+
function accessibleAccentTextColor(value) {
|
|
386
|
+
if (!value) return void 0;
|
|
387
|
+
const contrast = minimumContrastRatio(value, ["#f5f5f5", "#262626"]);
|
|
388
|
+
if (contrast === null) return value;
|
|
389
|
+
return contrast < 4.5 ? void 0 : value;
|
|
390
|
+
}
|
|
340
391
|
function ParticipantAvatar({
|
|
341
392
|
participant
|
|
342
393
|
}) {
|
|
@@ -364,7 +415,7 @@ function ReferenceChip({
|
|
|
364
415
|
const href = linkBuilder?.(reference);
|
|
365
416
|
const content = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
366
417
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
367
|
-
|
|
418
|
+
chunkEL2RSQTJ_cjs.Badge,
|
|
368
419
|
{
|
|
369
420
|
variant: "default",
|
|
370
421
|
size: "sm",
|
|
@@ -485,7 +536,7 @@ function CopyMenu({ isSelf, markdown, getHtml, getText }) {
|
|
|
485
536
|
open ? "z-[60]" : "z-10"
|
|
486
537
|
),
|
|
487
538
|
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
488
|
-
|
|
539
|
+
chunk2JQBPU3Y_cjs.Dropdown,
|
|
489
540
|
{
|
|
490
541
|
open,
|
|
491
542
|
onOpenChange: setOpen,
|
|
@@ -501,18 +552,18 @@ function CopyMenu({ isSelf, markdown, getHtml, getText }) {
|
|
|
501
552
|
}
|
|
502
553
|
),
|
|
503
554
|
children: [
|
|
504
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
555
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunk2JQBPU3Y_cjs.DropdownItem, { onClick: () => run(writeBoth), children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex flex-col items-start", children: [
|
|
505
556
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "Copy" }),
|
|
506
557
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] font-normal text-neutral-400", children: "Rich text + Markdown" })
|
|
507
558
|
] }) }),
|
|
508
559
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
509
|
-
|
|
560
|
+
chunk2JQBPU3Y_cjs.DropdownItem,
|
|
510
561
|
{
|
|
511
562
|
onClick: () => run(() => writeText(markdown || getText())),
|
|
512
563
|
children: "Copy as Markdown"
|
|
513
564
|
}
|
|
514
565
|
),
|
|
515
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
566
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunk2JQBPU3Y_cjs.DropdownItem, { onClick: () => run(() => writeText(getText())), children: "Copy as plain text" })
|
|
516
567
|
]
|
|
517
568
|
}
|
|
518
569
|
)
|
|
@@ -578,6 +629,7 @@ var MessageRow = React4__namespace.memo(function MessageRow2({
|
|
|
578
629
|
);
|
|
579
630
|
}
|
|
580
631
|
const accent = participant?.color;
|
|
632
|
+
const accentTextColor = accessibleAccentTextColor(accent);
|
|
581
633
|
const authorName = participant?.name ?? "Unknown";
|
|
582
634
|
const canEdit = !!editable && isSelf && !streaming && typeof message.text === "string" && !message.content?.length;
|
|
583
635
|
const startEdit = () => {
|
|
@@ -658,17 +710,17 @@ ${block.text}
|
|
|
658
710
|
"span",
|
|
659
711
|
{
|
|
660
712
|
className: "text-xs font-medium",
|
|
661
|
-
style:
|
|
713
|
+
style: accentTextColor ? { color: accentTextColor } : void 0,
|
|
662
714
|
children: authorName
|
|
663
715
|
}
|
|
664
716
|
),
|
|
665
|
-
participant?.role && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-neutral-400", children: participant.role }),
|
|
666
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-neutral-400", children: formatTime(message.time) }),
|
|
717
|
+
participant?.role && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-neutral-500 dark:text-neutral-400", children: participant.role }),
|
|
718
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-neutral-500 dark:text-neutral-400", children: formatTime(message.time) }),
|
|
667
719
|
message.editedAt && /* @__PURE__ */ jsxRuntime.jsx(
|
|
668
720
|
"span",
|
|
669
721
|
{
|
|
670
722
|
"data-slot": "superchat-edited-indicator",
|
|
671
|
-
className: "text-[10px] text-neutral-400",
|
|
723
|
+
className: "text-[10px] text-neutral-500 dark:text-neutral-400",
|
|
672
724
|
title: `Edited ${formatTime(message.editedAt)}`,
|
|
673
725
|
children: "(edited)"
|
|
674
726
|
}
|
|
@@ -711,7 +763,7 @@ ${block.text}
|
|
|
711
763
|
"data-slot": "superchat-bubble",
|
|
712
764
|
variant: isSelf ? "user" : "assistant",
|
|
713
765
|
hasError: message.status === "error",
|
|
714
|
-
className: "text-sm",
|
|
766
|
+
className: "text-sm has-[[data-slot=superchat-nitro-table]]:w-full has-[[data-slot=superchat-nitro-table]]:max-w-full",
|
|
715
767
|
children: isEditing ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
716
768
|
"div",
|
|
717
769
|
{
|
|
@@ -1113,7 +1165,7 @@ function SuperChat({
|
|
|
1113
1165
|
}
|
|
1114
1166
|
),
|
|
1115
1167
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1116
|
-
|
|
1168
|
+
chunkCB4JX5EJ_cjs.MessageComposer,
|
|
1117
1169
|
{
|
|
1118
1170
|
onSend: handleComposerSend,
|
|
1119
1171
|
disabled: readOnly,
|
|
@@ -1192,7 +1244,7 @@ function SuperChatConversations({
|
|
|
1192
1244
|
children: [
|
|
1193
1245
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex-1 truncate", children: [
|
|
1194
1246
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "block truncate font-medium", children: c.title }),
|
|
1195
|
-
last?.text && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "block truncate text-xs text-neutral-400", children: last.text })
|
|
1247
|
+
last?.text && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "block truncate text-xs text-neutral-600 dark:text-neutral-400", children: last.text })
|
|
1196
1248
|
] }),
|
|
1197
1249
|
!!c.unread && /* @__PURE__ */ jsxRuntime.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: [
|
|
1198
1250
|
c.unread,
|