laif-ds 0.1.76 → 0.1.79
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/_virtual/prism-cpp.js +3 -0
- package/dist/_virtual/prism-cpp2.js +5 -0
- package/dist/_virtual/prism-java.js +3 -0
- package/dist/_virtual/prism-java2.js +5 -0
- package/dist/_virtual/prism-python.js +3 -0
- package/dist/_virtual/prism-python2.js +5 -0
- package/dist/_virtual/prism-rust.js +3 -0
- package/dist/_virtual/prism-rust2.js +5 -0
- package/dist/_virtual/prism-typescript.js +3 -0
- package/dist/_virtual/prism-typescript2.js +5 -0
- package/dist/_virtual/prism.js +3 -0
- package/dist/_virtual/prism2.js +5 -0
- package/dist/components/editor/context/toolbar-context.js +42 -0
- package/dist/components/editor/editor-hooks/use-modal.js +30 -0
- package/dist/components/editor/editor-hooks/use-update-toolbar.js +24 -0
- package/dist/components/editor/editor-ui/content-editable.js +26 -0
- package/dist/components/editor/plugins/actions/actions-plugin.js +7 -0
- package/dist/components/editor/plugins/actions/clear-editor-plugin.js +39 -0
- package/dist/components/editor/plugins/actions/counter-character-plugin.js +53 -0
- package/dist/components/editor/plugins/toolbar/block-format/block-format-data.js +52 -0
- package/dist/components/editor/plugins/toolbar/block-format/format-bulleted-list.js +26 -0
- package/dist/components/editor/plugins/toolbar/block-format/format-check-list.js +26 -0
- package/dist/components/editor/plugins/toolbar/block-format/format-heading.js +31 -0
- package/dist/components/editor/plugins/toolbar/block-format/format-numbered-list.js +26 -0
- package/dist/components/editor/plugins/toolbar/block-format/format-paragraph.js +23 -0
- package/dist/components/editor/plugins/toolbar/block-format/format-quote.js +24 -0
- package/dist/components/editor/plugins/toolbar/block-format-toolbar-plugin.js +56 -0
- package/dist/components/editor/plugins/toolbar/font-format-toolbar-plugin.js +50 -0
- package/dist/components/editor/plugins/toolbar/history-toolbar-plugin.js +69 -0
- package/dist/components/editor/plugins/toolbar/toolbar-plugin.js +34 -0
- package/dist/components/editor/themes/editor-theme.js +112 -0
- package/dist/components/ui/accordion.js +1 -1
- package/dist/components/ui/alert-dialog.js +3 -3
- package/dist/components/ui/alert.js +3 -3
- package/dist/components/ui/app-editor.js +150 -0
- package/dist/components/ui/app-multiple-select-dropdown.js +13 -13
- package/dist/components/ui/async-select.js +18 -18
- package/dist/components/ui/button.js +25 -24
- package/dist/components/ui/calendar.js +9 -9
- package/dist/components/ui/card.js +26 -26
- package/dist/components/ui/chat-message.js +6 -6
- package/dist/components/ui/chat.js +44 -44
- package/dist/components/ui/context-menu.js +2 -2
- package/dist/components/ui/dialog.js +46 -40
- package/dist/components/ui/drawer.js +33 -33
- package/dist/components/ui/dropdown-menu.js +20 -20
- package/dist/components/ui/file-preview.js +51 -51
- package/dist/components/ui/gantt/components/Controls/Controls.js +51 -60
- package/dist/components/ui/hover-card.js +5 -5
- package/dist/components/ui/input-selector.js +19 -19
- package/dist/components/ui/interrupt-prompt.js +6 -6
- package/dist/components/ui/markdown-renderer.js +16 -16
- package/dist/components/ui/menubar.js +26 -26
- package/dist/components/ui/message-input.js +9 -9
- package/dist/components/ui/multiple-selector.js +20 -20
- package/dist/components/ui/navigation-menu.js +5 -5
- package/dist/components/ui/popover.js +4 -4
- package/dist/components/ui/prompt-suggestions.js +11 -11
- package/dist/components/ui/resizable.js +2 -2
- package/dist/components/ui/sheet.js +16 -16
- package/dist/components/ui/sidebar.js +24 -23
- package/dist/components/ui/table-skeleton.js +36 -36
- package/dist/components/ui/table.js +25 -25
- package/dist/components/ui/toggle-group.js +15 -15
- package/dist/components/ui/weekly-calendar/appointment-card.js +24 -24
- package/dist/index.d.ts +23 -1
- package/dist/index.js +48 -44
- package/dist/laif-ds.css +1 -0
- package/dist/node_modules/@lexical/clipboard/LexicalClipboard.prod.js +159 -0
- package/dist/node_modules/@lexical/code/LexicalCode.prod.js +236 -0
- package/dist/node_modules/@lexical/dragon/LexicalDragon.prod.js +46 -0
- package/dist/node_modules/@lexical/history/LexicalHistory.prod.js +89 -0
- package/dist/node_modules/@lexical/html/LexicalHtml.prod.js +108 -0
- package/dist/node_modules/@lexical/link/LexicalLink.prod.js +187 -0
- package/dist/node_modules/@lexical/list/LexicalList.prod.js +729 -0
- package/dist/node_modules/@lexical/markdown/LexicalMarkdown.prod.js +367 -0
- package/dist/node_modules/@lexical/react/LexicalCheckListPlugin.prod.js +11 -0
- package/dist/node_modules/@lexical/react/LexicalClearEditorPlugin.prod.js +17 -0
- package/dist/node_modules/@lexical/react/LexicalComposer.prod.js +45 -0
- package/dist/node_modules/@lexical/react/LexicalComposerContext.prod.js +22 -0
- package/dist/node_modules/@lexical/react/LexicalContentEditable.prod.js +55 -0
- package/dist/node_modules/@lexical/react/LexicalErrorBoundary.prod.js +49 -0
- package/dist/node_modules/@lexical/react/LexicalHistoryPlugin.prod.js +15 -0
- package/dist/node_modules/@lexical/react/LexicalListPlugin.prod.js +17 -0
- package/dist/node_modules/@lexical/react/LexicalOnChangePlugin.prod.js +16 -0
- package/dist/node_modules/@lexical/react/LexicalRichTextPlugin.prod.js +56 -0
- package/dist/node_modules/@lexical/react/useLexicalEditable.prod.js +21 -0
- package/dist/node_modules/@lexical/rich-text/LexicalRichText.prod.js +376 -0
- package/dist/node_modules/@lexical/selection/LexicalSelection.prod.js +107 -0
- package/dist/node_modules/@lexical/table/LexicalTable.prod.js +661 -0
- package/dist/node_modules/@lexical/text/LexicalText.prod.js +37 -0
- package/dist/node_modules/@lexical/utils/LexicalUtils.prod.js +102 -0
- package/dist/node_modules/lexical/Lexical.prod.js +4901 -0
- package/dist/node_modules/prismjs/components/prism-c.js +77 -0
- package/dist/node_modules/prismjs/components/prism-clike.js +32 -0
- package/dist/node_modules/prismjs/components/prism-cpp.js +93 -0
- package/dist/node_modules/prismjs/components/prism-css.js +56 -0
- package/dist/node_modules/prismjs/components/prism-java.js +122 -0
- package/dist/node_modules/prismjs/components/prism-javascript.js +138 -0
- package/dist/node_modules/prismjs/components/prism-markdown.js +301 -0
- package/dist/node_modules/prismjs/components/prism-markup.js +174 -0
- package/dist/node_modules/prismjs/components/prism-objectivec.js +11 -0
- package/dist/node_modules/prismjs/components/prism-powershell.js +56 -0
- package/dist/node_modules/prismjs/components/prism-python.js +69 -0
- package/dist/node_modules/prismjs/components/prism-rust.js +124 -0
- package/dist/node_modules/prismjs/components/prism-sql.js +34 -0
- package/dist/node_modules/prismjs/components/prism-swift.js +114 -0
- package/dist/node_modules/prismjs/components/prism-typescript.js +53 -0
- package/dist/node_modules/prismjs/prism.js +1165 -0
- package/dist/styles.css +1 -1
- package/dist/styles.v3.css +1 -1
- package/package.json +12 -1
|
@@ -1,93 +1,84 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as d, jsx as n } from "react/jsx-runtime";
|
|
3
|
-
import { useContext as y, useState as h, useMemo as f, useCallback as
|
|
3
|
+
import { useContext as y, useState as h, useMemo as f, useCallback as r } from "react";
|
|
4
4
|
import G from "../../../../../_virtual/dayjs.min.js";
|
|
5
5
|
import { cn as P } from "../../../../../lib/utils.js";
|
|
6
6
|
import { Button as g } from "../../../button.js";
|
|
7
|
-
import { Select as S, SelectTrigger as
|
|
7
|
+
import { Select as S, SelectTrigger as x, SelectValue as v, SelectContent as b, SelectItem as C } from "../../../select.js";
|
|
8
8
|
import { GanttContext as B } from "../Gantt/GanttContext.js";
|
|
9
9
|
import { useGanttCalculate as L } from "../../hooks/useGanttCalculate.js";
|
|
10
10
|
import M from "../../../../../node_modules/lucide-react/dist/esm/icons/chevron-left.js";
|
|
11
11
|
import R from "../../../../../node_modules/lucide-react/dist/esm/icons/chevron-right.js";
|
|
12
|
-
import { GanttDimensionsSettings as
|
|
12
|
+
import { GanttDimensionsSettings as o } from "../../constants/DimensionsSettings.js";
|
|
13
13
|
import { DragStepOptions as u } from "../../constants/DragStepOptions.js";
|
|
14
14
|
const Y = ({ className: D }) => {
|
|
15
|
-
const { calculate: s } = L(), { settings:
|
|
16
|
-
Object.keys(
|
|
17
|
-
(e) => e ===
|
|
15
|
+
const { calculate: s } = L(), { settings: a, setSettings: p, currentDate: j } = y(B), [z, c] = h(a.dimension), [t, m] = h(
|
|
16
|
+
Object.keys(o).findIndex(
|
|
17
|
+
(e) => e === a.dimension
|
|
18
18
|
)
|
|
19
|
-
),
|
|
20
|
-
label:
|
|
19
|
+
), l = f(() => Object.keys(o).map((e, i) => ({
|
|
20
|
+
label: o[e].label,
|
|
21
21
|
value: e,
|
|
22
22
|
index: i
|
|
23
|
-
})), []), N =
|
|
23
|
+
})), []), N = r(
|
|
24
24
|
(e) => {
|
|
25
|
-
const i =
|
|
25
|
+
const i = l.findIndex((V) => V.value === e);
|
|
26
26
|
c(e), m(i), s(e);
|
|
27
27
|
},
|
|
28
|
-
[s,
|
|
29
|
-
), O =
|
|
30
|
-
if (t <
|
|
31
|
-
const e = Object.keys(
|
|
28
|
+
[s, l]
|
|
29
|
+
), O = r(() => {
|
|
30
|
+
if (t < l.length - 1) {
|
|
31
|
+
const e = Object.keys(o)[t + 1];
|
|
32
32
|
c(e), m(t + 1), s(e);
|
|
33
33
|
}
|
|
34
|
-
}, [s,
|
|
34
|
+
}, [s, l.length, t]), k = r(() => {
|
|
35
35
|
if (t > 0) {
|
|
36
|
-
const e = Object.keys(
|
|
36
|
+
const e = Object.keys(o)[t - 1];
|
|
37
37
|
c(e), m(t - 1), s(e);
|
|
38
38
|
}
|
|
39
39
|
}, [s, t]), I = f(() => Object.keys(u).map((e) => ({
|
|
40
40
|
label: u[e].label,
|
|
41
41
|
value: e
|
|
42
|
-
})), []), w =
|
|
42
|
+
})), []), w = r(
|
|
43
43
|
(e) => {
|
|
44
44
|
p(() => {
|
|
45
|
-
const i = { ...
|
|
46
|
-
return i.dragStepSize = e, i.gridSize = u[e].seconds /
|
|
45
|
+
const i = { ...a };
|
|
46
|
+
return i.dragStepSize = e, i.gridSize = u[e].seconds / o[i.dimension].secondsInPixel, i;
|
|
47
47
|
});
|
|
48
48
|
},
|
|
49
|
-
[p,
|
|
50
|
-
);
|
|
51
|
-
return /* @__PURE__ */ d(
|
|
52
|
-
"div",
|
|
53
|
-
{
|
|
54
|
-
className: P(
|
|
55
|
-
"border-d-border flex items-center gap-2 border-b p-4",
|
|
56
|
-
D
|
|
57
|
-
),
|
|
58
|
-
children: [
|
|
59
|
-
/* @__PURE__ */ n(
|
|
60
|
-
g,
|
|
61
|
-
{
|
|
62
|
-
variant: "outline",
|
|
63
|
-
size: "icon",
|
|
64
|
-
onClick: k,
|
|
65
|
-
disabled: t <= 0,
|
|
66
|
-
children: /* @__PURE__ */ n(M, { className: "h-4 w-4" })
|
|
67
|
-
}
|
|
68
|
-
),
|
|
69
|
-
/* @__PURE__ */ d(S, { value: z, onValueChange: N, children: [
|
|
70
|
-
/* @__PURE__ */ n(b, { className: "w-[180px]", children: /* @__PURE__ */ n(x, { placeholder: "Seleziona dimensione" }) }),
|
|
71
|
-
/* @__PURE__ */ n(v, { className: "z-100", children: o.map((e) => /* @__PURE__ */ n(C, { value: e.value, children: e.label }, e.value)) })
|
|
72
|
-
] }),
|
|
73
|
-
/* @__PURE__ */ n(
|
|
74
|
-
g,
|
|
75
|
-
{
|
|
76
|
-
variant: "outline",
|
|
77
|
-
size: "icon",
|
|
78
|
-
onClick: O,
|
|
79
|
-
disabled: t >= o.length - 1,
|
|
80
|
-
children: /* @__PURE__ */ n(R, { className: "h-4 w-4" })
|
|
81
|
-
}
|
|
82
|
-
),
|
|
83
|
-
/* @__PURE__ */ n("div", { className: "px-4 text-sm font-medium", children: G.unix(j).format("ddd, ll") }),
|
|
84
|
-
/* @__PURE__ */ d(S, { value: r.dragStepSize, onValueChange: w, children: [
|
|
85
|
-
/* @__PURE__ */ n(b, { className: "w-[180px]", children: /* @__PURE__ */ n(x, { placeholder: "Seleziona step" }) }),
|
|
86
|
-
/* @__PURE__ */ n(v, { children: I.map((e) => /* @__PURE__ */ n(C, { value: e.value, children: e.label }, e.value)) })
|
|
87
|
-
] })
|
|
88
|
-
]
|
|
89
|
-
}
|
|
49
|
+
[p, a]
|
|
90
50
|
);
|
|
51
|
+
return /* @__PURE__ */ d("div", { className: P("flex items-center gap-2 border-b p-4", D), children: [
|
|
52
|
+
/* @__PURE__ */ n(
|
|
53
|
+
g,
|
|
54
|
+
{
|
|
55
|
+
variant: "outline",
|
|
56
|
+
size: "icon",
|
|
57
|
+
onClick: k,
|
|
58
|
+
disabled: t <= 0,
|
|
59
|
+
children: /* @__PURE__ */ n(M, { className: "h-4 w-4" })
|
|
60
|
+
}
|
|
61
|
+
),
|
|
62
|
+
/* @__PURE__ */ d(S, { value: z, onValueChange: N, children: [
|
|
63
|
+
/* @__PURE__ */ n(x, { className: "w-[180px]", children: /* @__PURE__ */ n(v, { placeholder: "Seleziona dimensione" }) }),
|
|
64
|
+
/* @__PURE__ */ n(b, { className: "z-100", children: l.map((e) => /* @__PURE__ */ n(C, { value: e.value, children: e.label }, e.value)) })
|
|
65
|
+
] }),
|
|
66
|
+
/* @__PURE__ */ n(
|
|
67
|
+
g,
|
|
68
|
+
{
|
|
69
|
+
variant: "outline",
|
|
70
|
+
size: "icon",
|
|
71
|
+
onClick: O,
|
|
72
|
+
disabled: t >= l.length - 1,
|
|
73
|
+
children: /* @__PURE__ */ n(R, { className: "h-4 w-4" })
|
|
74
|
+
}
|
|
75
|
+
),
|
|
76
|
+
/* @__PURE__ */ n("div", { className: "px-4 text-sm font-medium", children: G.unix(j).format("ddd, ll") }),
|
|
77
|
+
/* @__PURE__ */ d(S, { value: a.dragStepSize, onValueChange: w, children: [
|
|
78
|
+
/* @__PURE__ */ n(x, { className: "w-[180px]", children: /* @__PURE__ */ n(v, { placeholder: "Seleziona step" }) }),
|
|
79
|
+
/* @__PURE__ */ n(b, { children: I.map((e) => /* @__PURE__ */ n(C, { value: e.value, children: e.label }, e.value)) })
|
|
80
|
+
] })
|
|
81
|
+
] });
|
|
91
82
|
};
|
|
92
83
|
export {
|
|
93
84
|
Y as default
|
|
@@ -15,20 +15,20 @@ function u({
|
|
|
15
15
|
function g({
|
|
16
16
|
className: t,
|
|
17
17
|
align: e = "center",
|
|
18
|
-
sideOffset:
|
|
19
|
-
...
|
|
18
|
+
sideOffset: a = 4,
|
|
19
|
+
...r
|
|
20
20
|
}) {
|
|
21
21
|
return /* @__PURE__ */ o(i, { "data-slot": "hover-d-card-portal", children: /* @__PURE__ */ o(
|
|
22
22
|
s,
|
|
23
23
|
{
|
|
24
24
|
"data-slot": "hover-d-card-content",
|
|
25
25
|
align: e,
|
|
26
|
-
sideOffset:
|
|
26
|
+
sideOffset: a,
|
|
27
27
|
className: m(
|
|
28
|
-
"bg-d-popover text-d-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2
|
|
28
|
+
"bg-d-popover text-d-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-(--radix-hover-d-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
|
|
29
29
|
t
|
|
30
30
|
),
|
|
31
|
-
...
|
|
31
|
+
...r
|
|
32
32
|
}
|
|
33
33
|
) });
|
|
34
34
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
2
|
+
import { jsx as e, jsxs as N } from "react/jsx-runtime";
|
|
3
3
|
import * as c from "react";
|
|
4
4
|
import { motion as s } from "framer-motion";
|
|
5
5
|
import { cn as i } from "../../lib/utils.js";
|
|
@@ -14,31 +14,31 @@ function V({
|
|
|
14
14
|
value: r = 1,
|
|
15
15
|
onChange: l,
|
|
16
16
|
min: p = 1,
|
|
17
|
-
max:
|
|
18
|
-
className:
|
|
17
|
+
max: g = 4,
|
|
18
|
+
className: b,
|
|
19
19
|
buttonClassName: d,
|
|
20
20
|
counterClassName: h
|
|
21
21
|
}) {
|
|
22
|
-
const [
|
|
22
|
+
const [t, a] = c.useState(r), [u, m] = c.useState(!1);
|
|
23
23
|
c.useEffect(() => {
|
|
24
24
|
a(r);
|
|
25
25
|
}, [r]);
|
|
26
26
|
const v = (o) => {
|
|
27
|
-
if (o.preventDefault(),
|
|
28
|
-
const n =
|
|
27
|
+
if (o.preventDefault(), t < g) {
|
|
28
|
+
const n = t + 1;
|
|
29
29
|
a(n), l?.(n);
|
|
30
30
|
} else
|
|
31
31
|
f();
|
|
32
32
|
}, y = (o) => {
|
|
33
|
-
if (o.preventDefault(),
|
|
34
|
-
const n =
|
|
33
|
+
if (o.preventDefault(), t > p) {
|
|
34
|
+
const n = t - 1;
|
|
35
35
|
a(n), l?.(n);
|
|
36
36
|
} else
|
|
37
37
|
f();
|
|
38
38
|
}, f = () => {
|
|
39
39
|
m(!0), setTimeout(() => m(!1), 300);
|
|
40
40
|
};
|
|
41
|
-
return /* @__PURE__ */
|
|
41
|
+
return /* @__PURE__ */ e(
|
|
42
42
|
s.div,
|
|
43
43
|
{
|
|
44
44
|
"data-slot": "input-selector",
|
|
@@ -48,7 +48,7 @@ function V({
|
|
|
48
48
|
exit: "exit",
|
|
49
49
|
className: i(
|
|
50
50
|
"flex w-full flex-col items-center justify-center gap-8",
|
|
51
|
-
|
|
51
|
+
b
|
|
52
52
|
),
|
|
53
53
|
children: /* @__PURE__ */ N(
|
|
54
54
|
s.div,
|
|
@@ -64,23 +64,23 @@ function V({
|
|
|
64
64
|
animate: u ? "vibrate" : "initial",
|
|
65
65
|
className: "flex items-center gap-8",
|
|
66
66
|
children: [
|
|
67
|
-
/* @__PURE__ */
|
|
67
|
+
/* @__PURE__ */ e(
|
|
68
68
|
"button",
|
|
69
69
|
{
|
|
70
70
|
type: "button",
|
|
71
71
|
onClick: y,
|
|
72
72
|
className: i(
|
|
73
|
-
"
|
|
73
|
+
"h-12 w-12 rounded-full border",
|
|
74
74
|
"bg-d-background",
|
|
75
75
|
"hover:bg-d-accent hover:text-d-accent-foreground",
|
|
76
76
|
"text-d-foreground cursor-pointer",
|
|
77
77
|
"flex items-center justify-center",
|
|
78
78
|
d
|
|
79
79
|
),
|
|
80
|
-
children: /* @__PURE__ */
|
|
80
|
+
children: /* @__PURE__ */ e("span", { className: "text-2xl font-medium", children: "-" })
|
|
81
81
|
}
|
|
82
82
|
),
|
|
83
|
-
/* @__PURE__ */
|
|
83
|
+
/* @__PURE__ */ e(
|
|
84
84
|
s.span,
|
|
85
85
|
{
|
|
86
86
|
variants: x.container,
|
|
@@ -91,24 +91,24 @@ function V({
|
|
|
91
91
|
"text-d-foreground dark:text-d-foreground text-2xl font-medium",
|
|
92
92
|
h
|
|
93
93
|
),
|
|
94
|
-
children:
|
|
94
|
+
children: t
|
|
95
95
|
},
|
|
96
|
-
|
|
96
|
+
t
|
|
97
97
|
),
|
|
98
|
-
/* @__PURE__ */
|
|
98
|
+
/* @__PURE__ */ e(
|
|
99
99
|
"button",
|
|
100
100
|
{
|
|
101
101
|
type: "button",
|
|
102
102
|
onClick: v,
|
|
103
103
|
className: i(
|
|
104
|
-
"
|
|
104
|
+
"h-12 w-12 rounded-full border",
|
|
105
105
|
"bg-d-background",
|
|
106
106
|
"hover:bg-d-accent hover:text-d-accent-foreground",
|
|
107
107
|
"text-d-foreground cursor-pointer",
|
|
108
108
|
"flex items-center justify-center",
|
|
109
109
|
d
|
|
110
110
|
),
|
|
111
|
-
children: /* @__PURE__ */
|
|
111
|
+
children: /* @__PURE__ */ e("span", { className: "text-2xl font-medium", children: "+" })
|
|
112
112
|
}
|
|
113
113
|
)
|
|
114
114
|
]
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as e, jsxs as n } from "react/jsx-runtime";
|
|
3
|
-
import { AnimatePresence as
|
|
4
|
-
import
|
|
3
|
+
import { AnimatePresence as i, motion as l } from "framer-motion";
|
|
4
|
+
import o from "../../node_modules/lucide-react/dist/esm/icons/x.js";
|
|
5
5
|
function m({ isOpen: t, close: r }) {
|
|
6
|
-
return /* @__PURE__ */ e(
|
|
7
|
-
|
|
6
|
+
return /* @__PURE__ */ e(i, { children: t && /* @__PURE__ */ n(
|
|
7
|
+
l.div,
|
|
8
8
|
{
|
|
9
9
|
initial: { top: 0, filter: "blur(5px)" },
|
|
10
10
|
animate: {
|
|
@@ -16,7 +16,7 @@ function m({ isOpen: t, close: r }) {
|
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
18
|
exit: { top: 0, filter: "blur(5px)" },
|
|
19
|
-
className: "bg-d-background text-d-secondary-foreground
|
|
19
|
+
className: "bg-d-background text-d-secondary-foreground absolute left-1/2 flex -translate-x-1/2 overflow-hidden rounded-full border py-1 text-center text-sm whitespace-nowrap",
|
|
20
20
|
children: [
|
|
21
21
|
/* @__PURE__ */ e("span", { className: "ml-2.5", children: "Press Enter again to interrupt" }),
|
|
22
22
|
/* @__PURE__ */ e(
|
|
@@ -26,7 +26,7 @@ function m({ isOpen: t, close: r }) {
|
|
|
26
26
|
type: "button",
|
|
27
27
|
onClick: r,
|
|
28
28
|
"aria-label": "Close",
|
|
29
|
-
children: /* @__PURE__ */ e(
|
|
29
|
+
children: /* @__PURE__ */ e(o, { className: "h-3 w-3" })
|
|
30
30
|
}
|
|
31
31
|
)
|
|
32
32
|
]
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as t, jsxs as p, Fragment as
|
|
2
|
+
import { jsx as t, jsxs as p, Fragment as b } from "react/jsx-runtime";
|
|
3
3
|
import y, { Suspense as x } from "react";
|
|
4
4
|
import { cn as m } from "../../lib/utils.js";
|
|
5
5
|
import { CopyButton as k } from "./copy-button.js";
|
|
@@ -10,10 +10,10 @@ function q({ children: e }) {
|
|
|
10
10
|
}
|
|
11
11
|
const g = y.memo(
|
|
12
12
|
async ({ children: e, language: o, ...n }) => {
|
|
13
|
-
const { codeToTokens:
|
|
13
|
+
const { codeToTokens: l, bundledLanguages: i } = await import("../../node_modules/shiki/dist/index.js");
|
|
14
14
|
if (!(o in i))
|
|
15
15
|
return /* @__PURE__ */ t("pre", { ...n, children: e });
|
|
16
|
-
const { tokens:
|
|
16
|
+
const { tokens: d } = await l(e, {
|
|
17
17
|
lang: o,
|
|
18
18
|
defaultColor: !1,
|
|
19
19
|
themes: {
|
|
@@ -21,20 +21,20 @@ const g = y.memo(
|
|
|
21
21
|
dark: "github-dark"
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
|
-
return /* @__PURE__ */ t("pre", { ...n, children: /* @__PURE__ */ t("code", { children:
|
|
24
|
+
return /* @__PURE__ */ t("pre", { ...n, children: /* @__PURE__ */ t("code", { children: d.map((h, c) => /* @__PURE__ */ p(b, { children: [
|
|
25
25
|
/* @__PURE__ */ t("span", { children: h.map((a, u) => {
|
|
26
|
-
const
|
|
26
|
+
const f = typeof a.htmlStyle == "string" ? void 0 : a.htmlStyle;
|
|
27
27
|
return /* @__PURE__ */ t(
|
|
28
28
|
"span",
|
|
29
29
|
{
|
|
30
30
|
className: "text-shiki-light bg-shiki-light-bg dark:text-shiki-dark dark:bg-shiki-dark-bg",
|
|
31
|
-
style:
|
|
31
|
+
style: f,
|
|
32
32
|
children: a.content
|
|
33
33
|
},
|
|
34
34
|
u
|
|
35
35
|
);
|
|
36
36
|
}) }, c),
|
|
37
|
-
c !==
|
|
37
|
+
c !== d.length - 1 && `
|
|
38
38
|
`
|
|
39
39
|
] })) }) });
|
|
40
40
|
}
|
|
@@ -44,18 +44,18 @@ const w = ({
|
|
|
44
44
|
children: e,
|
|
45
45
|
className: o,
|
|
46
46
|
language: n,
|
|
47
|
-
...
|
|
47
|
+
...l
|
|
48
48
|
}) => {
|
|
49
|
-
const i = typeof e == "string" ? e : s(e),
|
|
50
|
-
"overflow-x-scroll rounded-md border
|
|
49
|
+
const i = typeof e == "string" ? e : s(e), d = m(
|
|
50
|
+
"overflow-x-scroll rounded-md border bg-d-background/50 p-4 font-mono text-sm [scrollbar-width:none]",
|
|
51
51
|
o
|
|
52
52
|
);
|
|
53
53
|
return /* @__PURE__ */ p("div", { className: "group/code relative mb-4", children: [
|
|
54
54
|
/* @__PURE__ */ t(
|
|
55
55
|
x,
|
|
56
56
|
{
|
|
57
|
-
fallback: /* @__PURE__ */ t("pre", { className:
|
|
58
|
-
children: /* @__PURE__ */ t(g, { language: n, className:
|
|
57
|
+
fallback: /* @__PURE__ */ t("pre", { className: d, ...l, children: e }),
|
|
58
|
+
children: /* @__PURE__ */ t(g, { language: n, className: d, children: i })
|
|
59
59
|
}
|
|
60
60
|
),
|
|
61
61
|
/* @__PURE__ */ t("div", { className: "invisible absolute top-2 right-2 flex space-x-1 rounded-lg p-1 opacity-0 transition-all duration-200 group-hover/code:visible group-hover/code:opacity-100", children: /* @__PURE__ */ t(k, { content: i, copyMessage: "Copied code to clipboard" }) })
|
|
@@ -79,15 +79,15 @@ const C = {
|
|
|
79
79
|
strong: r("strong", "font-semibold"),
|
|
80
80
|
a: r("a", "text-d-primary underline underline-offset-2"),
|
|
81
81
|
blockquote: r("blockquote", "border-l-2 border-d-primary pl-4"),
|
|
82
|
-
code: ({ children: e, className: o, node: n, ...
|
|
82
|
+
code: ({ children: e, className: o, node: n, ...l }) => {
|
|
83
83
|
const i = /language-(\w+)/.exec(o || "");
|
|
84
|
-
return i ? /* @__PURE__ */ t(w, { className: o, language: i[1], ...
|
|
84
|
+
return i ? /* @__PURE__ */ t(w, { className: o, language: i[1], ...l, children: e }) : /* @__PURE__ */ t(
|
|
85
85
|
"code",
|
|
86
86
|
{
|
|
87
87
|
className: m(
|
|
88
88
|
"[:not(pre)>&]:bg-d-background/50 font-mono [:not(pre)>&]:rounded-md [:not(pre)>&]:px-1 [:not(pre)>&]:py-0.5"
|
|
89
89
|
),
|
|
90
|
-
...
|
|
90
|
+
...l,
|
|
91
91
|
children: e
|
|
92
92
|
}
|
|
93
93
|
);
|
|
@@ -113,7 +113,7 @@ const C = {
|
|
|
113
113
|
hr: r("hr", "border-foreground/20")
|
|
114
114
|
};
|
|
115
115
|
function r(e, o) {
|
|
116
|
-
const n = ({ node:
|
|
116
|
+
const n = ({ node: l, ...i }) => /* @__PURE__ */ t(e, { className: o, ...i });
|
|
117
117
|
return n.displayName = String(e), n;
|
|
118
118
|
}
|
|
119
119
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as a, jsxs as s } from "react/jsx-runtime";
|
|
3
|
-
import { Root as u, Menu as c, Trigger as l, Content as m, Item as
|
|
4
|
-
import { cn as
|
|
3
|
+
import { Root as u, Menu as c, Trigger as l, Content as m, Item as f, Separator as b, Label as p, CheckboxItem as g, ItemIndicator as d, RadioItem as x, RadioGroup as v, Portal as h, SubContent as M, SubTrigger as z, Group as N, Sub as y } from "../../node_modules/@radix-ui/react-menubar/dist/index.js";
|
|
4
|
+
import { cn as o } from "../../lib/utils.js";
|
|
5
5
|
import I from "../../node_modules/lucide-react/dist/esm/icons/check.js";
|
|
6
6
|
import S from "../../node_modules/lucide-react/dist/esm/icons/circle.js";
|
|
7
7
|
import C from "../../node_modules/lucide-react/dist/esm/icons/chevron-right.js";
|
|
@@ -13,8 +13,8 @@ function L({
|
|
|
13
13
|
u,
|
|
14
14
|
{
|
|
15
15
|
"data-slot": "menubar",
|
|
16
|
-
className:
|
|
17
|
-
"bg-d-background
|
|
16
|
+
className: o(
|
|
17
|
+
"bg-d-background flex h-9 items-center gap-1 rounded-md border p-1 shadow-xs",
|
|
18
18
|
e
|
|
19
19
|
),
|
|
20
20
|
...t
|
|
@@ -49,7 +49,7 @@ function B({
|
|
|
49
49
|
l,
|
|
50
50
|
{
|
|
51
51
|
"data-slot": "menubar-trigger",
|
|
52
|
-
className:
|
|
52
|
+
className: o(
|
|
53
53
|
"focus:bg-d-accent focus:text-d-accent-foreground data-[state=open]:bg-d-accent data-[state=open]:text-d-accent-foreground flex items-center rounded-sm px-2 py-1 text-sm font-medium outline-hidden select-none",
|
|
54
54
|
e
|
|
55
55
|
),
|
|
@@ -61,7 +61,7 @@ function D({
|
|
|
61
61
|
className: e,
|
|
62
62
|
align: t = "start",
|
|
63
63
|
alignOffset: n = -4,
|
|
64
|
-
sideOffset:
|
|
64
|
+
sideOffset: r = 8,
|
|
65
65
|
...i
|
|
66
66
|
}) {
|
|
67
67
|
return /* @__PURE__ */ a(k, { children: /* @__PURE__ */ a(
|
|
@@ -70,9 +70,9 @@ function D({
|
|
|
70
70
|
"data-slot": "menubar-content",
|
|
71
71
|
align: t,
|
|
72
72
|
alignOffset: n,
|
|
73
|
-
sideOffset:
|
|
74
|
-
className:
|
|
75
|
-
"bg-d-popover text-d-popover-foreground data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2
|
|
73
|
+
sideOffset: r,
|
|
74
|
+
className: o(
|
|
75
|
+
"bg-d-popover text-d-popover-foreground data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[12rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-md",
|
|
76
76
|
e
|
|
77
77
|
),
|
|
78
78
|
...i
|
|
@@ -83,19 +83,19 @@ function E({
|
|
|
83
83
|
className: e,
|
|
84
84
|
inset: t,
|
|
85
85
|
variant: n = "default",
|
|
86
|
-
...
|
|
86
|
+
...r
|
|
87
87
|
}) {
|
|
88
88
|
return /* @__PURE__ */ a(
|
|
89
|
-
|
|
89
|
+
f,
|
|
90
90
|
{
|
|
91
91
|
"data-slot": "menubar-item",
|
|
92
92
|
"data-inset": t,
|
|
93
93
|
"data-variant": n,
|
|
94
|
-
className:
|
|
94
|
+
className: o(
|
|
95
95
|
"focus:bg-d-accent focus:text-d-accent-foreground data-[variant=destructive]:text-d-destructive data-[variant=destructive]:focus:bg-d-destructive/10 dark:data-[variant=destructive]:focus:bg-d-destructive/20 data-[variant=destructive]:focus:text-d-destructive data-[variant=destructive]:*:[svg]:!text-d-destructive [&_svg:not([class*='text-'])]:text-d-secondary-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
96
96
|
e
|
|
97
97
|
),
|
|
98
|
-
...
|
|
98
|
+
...r
|
|
99
99
|
}
|
|
100
100
|
);
|
|
101
101
|
}
|
|
@@ -103,18 +103,18 @@ function F({
|
|
|
103
103
|
className: e,
|
|
104
104
|
children: t,
|
|
105
105
|
checked: n,
|
|
106
|
-
...
|
|
106
|
+
...r
|
|
107
107
|
}) {
|
|
108
108
|
return /* @__PURE__ */ s(
|
|
109
109
|
g,
|
|
110
110
|
{
|
|
111
111
|
"data-slot": "menubar-checkbox-item",
|
|
112
|
-
className:
|
|
112
|
+
className: o(
|
|
113
113
|
"focus:bg-d-accent focus:text-d-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
114
114
|
e
|
|
115
115
|
),
|
|
116
116
|
checked: n,
|
|
117
|
-
...
|
|
117
|
+
...r,
|
|
118
118
|
children: [
|
|
119
119
|
/* @__PURE__ */ a("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ a(d, { children: /* @__PURE__ */ a(I, { className: "size-4" }) }) }),
|
|
120
120
|
t
|
|
@@ -131,7 +131,7 @@ function H({
|
|
|
131
131
|
x,
|
|
132
132
|
{
|
|
133
133
|
"data-slot": "menubar-radio-item",
|
|
134
|
-
className:
|
|
134
|
+
className: o(
|
|
135
135
|
"focus:bg-d-accent focus:text-d-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
136
136
|
e
|
|
137
137
|
),
|
|
@@ -153,7 +153,7 @@ function J({
|
|
|
153
153
|
{
|
|
154
154
|
"data-slot": "menubar-label",
|
|
155
155
|
"data-inset": t,
|
|
156
|
-
className:
|
|
156
|
+
className: o(
|
|
157
157
|
"px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",
|
|
158
158
|
e
|
|
159
159
|
),
|
|
@@ -166,10 +166,10 @@ function K({
|
|
|
166
166
|
...t
|
|
167
167
|
}) {
|
|
168
168
|
return /* @__PURE__ */ a(
|
|
169
|
-
|
|
169
|
+
b,
|
|
170
170
|
{
|
|
171
171
|
"data-slot": "menubar-separator",
|
|
172
|
-
className:
|
|
172
|
+
className: o("bg-d-border -mx-1 my-1 h-px", e),
|
|
173
173
|
...t
|
|
174
174
|
}
|
|
175
175
|
);
|
|
@@ -182,7 +182,7 @@ function O({
|
|
|
182
182
|
"span",
|
|
183
183
|
{
|
|
184
184
|
"data-slot": "menubar-shortcut",
|
|
185
|
-
className:
|
|
185
|
+
className: o(
|
|
186
186
|
"text-d-secondary-foreground ml-auto text-xs tracking-widest",
|
|
187
187
|
e
|
|
188
188
|
),
|
|
@@ -199,18 +199,18 @@ function U({
|
|
|
199
199
|
className: e,
|
|
200
200
|
inset: t,
|
|
201
201
|
children: n,
|
|
202
|
-
...
|
|
202
|
+
...r
|
|
203
203
|
}) {
|
|
204
204
|
return /* @__PURE__ */ s(
|
|
205
205
|
z,
|
|
206
206
|
{
|
|
207
207
|
"data-slot": "menubar-sub-trigger",
|
|
208
208
|
"data-inset": t,
|
|
209
|
-
className:
|
|
209
|
+
className: o(
|
|
210
210
|
"focus:bg-d-accent focus:text-d-accent-foreground data-[state=open]:bg-d-accent data-[state=open]:text-d-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[inset]:pl-8",
|
|
211
211
|
e
|
|
212
212
|
),
|
|
213
|
-
...
|
|
213
|
+
...r,
|
|
214
214
|
children: [
|
|
215
215
|
n,
|
|
216
216
|
/* @__PURE__ */ a(C, { className: "ml-auto h-4 w-4" })
|
|
@@ -226,8 +226,8 @@ function V({
|
|
|
226
226
|
M,
|
|
227
227
|
{
|
|
228
228
|
"data-slot": "menubar-sub-content",
|
|
229
|
-
className:
|
|
230
|
-
"bg-d-popover text-d-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2
|
|
229
|
+
className: o(
|
|
230
|
+
"bg-d-popover text-d-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",
|
|
231
231
|
e
|
|
232
232
|
),
|
|
233
233
|
...t
|
|
@@ -7,7 +7,7 @@ import { cn as C } from "../../lib/utils.js";
|
|
|
7
7
|
import { useAudioRecording as Q } from "../../hooks/use-audio-recording.js";
|
|
8
8
|
import { useAutosizeTextArea as X } from "../../hooks/use-autosize-textarea.js";
|
|
9
9
|
import { AudioVisualizer as Y } from "./audio-visualizer.js";
|
|
10
|
-
import { Button as
|
|
10
|
+
import { Button as b } from "./button.js";
|
|
11
11
|
import { FilePreview as Z } from "./file-preview.js";
|
|
12
12
|
import { InterruptPrompt as _ } from "./interrupt-prompt.js";
|
|
13
13
|
import P from "../../node_modules/lucide-react/dist/esm/icons/paperclip.js";
|
|
@@ -68,8 +68,8 @@ function ie({
|
|
|
68
68
|
h([W]);
|
|
69
69
|
return;
|
|
70
70
|
}
|
|
71
|
-
const
|
|
72
|
-
r.allowAttachments &&
|
|
71
|
+
const g = Array.from(a).map((m) => m.getAsFile()).filter((m) => m !== null);
|
|
72
|
+
r.allowAttachments && g.length > 0 && h(g);
|
|
73
73
|
}, U = (t) => {
|
|
74
74
|
if (l && t.key === "Enter" && !t.shiftKey) {
|
|
75
75
|
if (t.preventDefault(), u && s && A) {
|
|
@@ -142,7 +142,7 @@ function ie({
|
|
|
142
142
|
r.setFiles((a) => {
|
|
143
143
|
if (!a) return null;
|
|
144
144
|
const c = Array.from(a).filter(
|
|
145
|
-
(
|
|
145
|
+
(g) => g !== t
|
|
146
146
|
);
|
|
147
147
|
return c.length === 0 ? null : c;
|
|
148
148
|
});
|
|
@@ -153,7 +153,7 @@ function ie({
|
|
|
153
153
|
] }) }),
|
|
154
154
|
/* @__PURE__ */ o("div", { className: "absolute top-3 right-3 z-20 flex gap-2", children: [
|
|
155
155
|
r.allowAttachments && /* @__PURE__ */ e(
|
|
156
|
-
|
|
156
|
+
b,
|
|
157
157
|
{
|
|
158
158
|
type: "button",
|
|
159
159
|
size: "icon",
|
|
@@ -168,7 +168,7 @@ function ie({
|
|
|
168
168
|
}
|
|
169
169
|
),
|
|
170
170
|
L && /* @__PURE__ */ e(
|
|
171
|
-
|
|
171
|
+
b,
|
|
172
172
|
{
|
|
173
173
|
type: "button",
|
|
174
174
|
variant: "outline",
|
|
@@ -180,7 +180,7 @@ function ie({
|
|
|
180
180
|
}
|
|
181
181
|
),
|
|
182
182
|
u && s ? /* @__PURE__ */ e(
|
|
183
|
-
|
|
183
|
+
b,
|
|
184
184
|
{
|
|
185
185
|
type: "button",
|
|
186
186
|
size: "icon",
|
|
@@ -190,7 +190,7 @@ function ie({
|
|
|
190
190
|
children: /* @__PURE__ */ e(G, { className: "h-3 w-3 animate-pulse", fill: "currentColor" })
|
|
191
191
|
}
|
|
192
192
|
) : /* @__PURE__ */ e(
|
|
193
|
-
|
|
193
|
+
b,
|
|
194
194
|
{
|
|
195
195
|
type: "submit",
|
|
196
196
|
size: "icon",
|
|
@@ -295,7 +295,7 @@ function oe({ isVisible: i, onStopRecording: n }) {
|
|
|
295
295
|
}
|
|
296
296
|
},
|
|
297
297
|
exit: { top: 0, filter: "blur(5px)" },
|
|
298
|
-
className: "bg-d-background
|
|
298
|
+
className: "bg-d-background text-d-secondary-foreground absolute left-1/2 flex -translate-x-1/2 cursor-pointer overflow-hidden rounded-full border py-1 text-center text-sm whitespace-nowrap",
|
|
299
299
|
onClick: n,
|
|
300
300
|
children: /* @__PURE__ */ o("span", { className: "mx-2.5 flex items-center", children: [
|
|
301
301
|
/* @__PURE__ */ e(te, { className: "mr-2 h-3 w-3" }),
|