create-pixi-vn 2.0.13 → 2.0.14
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/index.mjs +36 -35
- package/package.json +1 -1
- package/template-react-vite-muijoy/components.json +1 -1
- package/template-react-vite-muijoy/package-lock.json +663 -967
- package/template-react-vite-muijoy/package.json +10 -11
- package/template-react-vite-muijoy/src/components/dev-devtools.tsx +25 -0
- package/template-react-vite-muijoy/src/components/menus/settings/menus/history.tsx +78 -62
- package/template-react-vite-muijoy/src/components/screens/narration/index.tsx +5 -2
- package/template-react-vite-muijoy/src/components/ui/alert-dialog.tsx +3 -2
- package/template-react-vite-muijoy/src/components/ui/avatar.tsx +2 -2
- package/template-react-vite-muijoy/src/components/ui/breadcrumb.tsx +5 -4
- package/template-react-vite-muijoy/src/components/ui/button-group.tsx +3 -2
- package/template-react-vite-muijoy/src/components/ui/button.tsx +2 -2
- package/template-react-vite-muijoy/src/components/ui/card.tsx +6 -10
- package/template-react-vite-muijoy/src/components/ui/carousel.tsx +10 -7
- package/template-react-vite-muijoy/src/components/ui/drawer.tsx +2 -0
- package/template-react-vite-muijoy/src/components/ui/field.tsx +8 -5
- package/template-react-vite-muijoy/src/components/ui/input-group.tsx +4 -3
- package/template-react-vite-muijoy/src/components/ui/input.tsx +1 -1
- package/template-react-vite-muijoy/src/components/ui/item.tsx +9 -8
- package/template-react-vite-muijoy/src/components/ui/label.tsx +1 -1
- package/template-react-vite-muijoy/src/components/ui/radio-group.tsx +4 -1
- package/template-react-vite-muijoy/src/components/ui/scroll-area.tsx +5 -2
- package/template-react-vite-muijoy/src/components/ui/select.tsx +3 -2
- package/template-react-vite-muijoy/src/components/ui/separator.tsx +2 -0
- package/template-react-vite-muijoy/src/components/ui/sonner.tsx +4 -4
- package/template-react-vite-muijoy/src/components/ui/spinner.tsx +2 -1
- package/template-react-vite-muijoy/src/components/ui/switch.tsx +3 -0
- package/template-react-vite-muijoy/src/components/ui/textarea.tsx +2 -1
- package/template-react-vite-muijoy/src/components/ui/tooltip.tsx +2 -0
- package/template-react-vite-muijoy/src/lib/hooks/hotkeys-hooks.ts +2 -0
- package/template-react-vite-muijoy/src/lib/hooks/narration-hooks.ts +24 -9
- package/template-react-vite-muijoy/src/lib/hooks/navigation-hooks.ts +29 -10
- package/template-react-vite-muijoy/src/main.tsx +0 -1
- package/{template-react-vite-muijoy-tauri/src/pixi-vn-keys.gen.d.ts → template-react-vite-muijoy/src/pixi-vn.keys.gen.ts} +4 -2
- package/template-react-vite-muijoy/src/routeTree.gen.ts +3 -21
- package/template-react-vite-muijoy/src/routes/__root.tsx +10 -20
- package/template-react-vite-muijoy/src/styles.css +43 -43
- package/template-react-vite-muijoy/vite.config.ts +1 -1
- package/template-react-vite-muijoy-ink/components.json +1 -1
- package/template-react-vite-muijoy-ink/package-lock.json +709 -1051
- package/template-react-vite-muijoy-ink/package.json +11 -12
- package/template-react-vite-muijoy-ink/src/components/dev-devtools.tsx +25 -0
- package/template-react-vite-muijoy-ink/src/components/menus/settings/menus/history.tsx +78 -62
- package/template-react-vite-muijoy-ink/src/components/screens/narration/index.tsx +5 -2
- package/template-react-vite-muijoy-ink/src/components/ui/alert-dialog.tsx +3 -2
- package/template-react-vite-muijoy-ink/src/components/ui/avatar.tsx +2 -2
- package/template-react-vite-muijoy-ink/src/components/ui/breadcrumb.tsx +5 -4
- package/template-react-vite-muijoy-ink/src/components/ui/button-group.tsx +3 -2
- package/template-react-vite-muijoy-ink/src/components/ui/button.tsx +2 -2
- package/template-react-vite-muijoy-ink/src/components/ui/card.tsx +6 -10
- package/template-react-vite-muijoy-ink/src/components/ui/carousel.tsx +10 -7
- package/template-react-vite-muijoy-ink/src/components/ui/drawer.tsx +2 -0
- package/template-react-vite-muijoy-ink/src/components/ui/field.tsx +8 -5
- package/template-react-vite-muijoy-ink/src/components/ui/input-group.tsx +4 -3
- package/template-react-vite-muijoy-ink/src/components/ui/input.tsx +1 -1
- package/template-react-vite-muijoy-ink/src/components/ui/item.tsx +9 -8
- package/template-react-vite-muijoy-ink/src/components/ui/label.tsx +1 -1
- package/template-react-vite-muijoy-ink/src/components/ui/radio-group.tsx +4 -1
- package/template-react-vite-muijoy-ink/src/components/ui/scroll-area.tsx +5 -2
- package/template-react-vite-muijoy-ink/src/components/ui/select.tsx +3 -2
- package/template-react-vite-muijoy-ink/src/components/ui/separator.tsx +2 -0
- package/template-react-vite-muijoy-ink/src/components/ui/sonner.tsx +4 -4
- package/template-react-vite-muijoy-ink/src/components/ui/spinner.tsx +2 -1
- package/template-react-vite-muijoy-ink/src/components/ui/switch.tsx +3 -0
- package/template-react-vite-muijoy-ink/src/components/ui/textarea.tsx +2 -1
- package/template-react-vite-muijoy-ink/src/components/ui/tooltip.tsx +2 -0
- package/template-react-vite-muijoy-ink/src/content/ink/hashtag-commands.ts +2 -1
- package/template-react-vite-muijoy-ink/src/lib/hooks/hotkeys-hooks.ts +2 -0
- package/template-react-vite-muijoy-ink/src/lib/hooks/narration-hooks.ts +24 -9
- package/template-react-vite-muijoy-ink/src/lib/hooks/navigation-hooks.ts +29 -10
- package/template-react-vite-muijoy-ink/src/main.tsx +0 -1
- package/template-react-vite-muijoy-ink/src/pixi-vn.keys.gen.ts +24 -0
- package/template-react-vite-muijoy-ink/src/routeTree.gen.ts +3 -21
- package/template-react-vite-muijoy-ink/src/routes/__root.tsx +10 -20
- package/template-react-vite-muijoy-ink/src/styles.css +43 -43
- package/template-react-vite-muijoy-ink/vite.config.ts +1 -1
- package/template-react-vite-muijoy-ink-tauri/components.json +1 -1
- package/template-react-vite-muijoy-ink-tauri/package-lock.json +709 -1051
- package/template-react-vite-muijoy-ink-tauri/package.json +11 -12
- package/template-react-vite-muijoy-ink-tauri/src/components/dev-devtools.tsx +25 -0
- package/template-react-vite-muijoy-ink-tauri/src/components/menus/settings/menus/history.tsx +78 -62
- package/template-react-vite-muijoy-ink-tauri/src/components/screens/narration/index.tsx +5 -2
- package/template-react-vite-muijoy-ink-tauri/src/components/ui/alert-dialog.tsx +3 -2
- package/template-react-vite-muijoy-ink-tauri/src/components/ui/avatar.tsx +2 -2
- package/template-react-vite-muijoy-ink-tauri/src/components/ui/breadcrumb.tsx +5 -4
- package/template-react-vite-muijoy-ink-tauri/src/components/ui/button-group.tsx +3 -2
- package/template-react-vite-muijoy-ink-tauri/src/components/ui/button.tsx +2 -2
- package/template-react-vite-muijoy-ink-tauri/src/components/ui/card.tsx +6 -10
- package/template-react-vite-muijoy-ink-tauri/src/components/ui/carousel.tsx +10 -7
- package/template-react-vite-muijoy-ink-tauri/src/components/ui/drawer.tsx +2 -0
- package/template-react-vite-muijoy-ink-tauri/src/components/ui/field.tsx +8 -5
- package/template-react-vite-muijoy-ink-tauri/src/components/ui/input-group.tsx +4 -3
- package/template-react-vite-muijoy-ink-tauri/src/components/ui/input.tsx +1 -1
- package/template-react-vite-muijoy-ink-tauri/src/components/ui/item.tsx +9 -8
- package/template-react-vite-muijoy-ink-tauri/src/components/ui/label.tsx +1 -1
- package/template-react-vite-muijoy-ink-tauri/src/components/ui/radio-group.tsx +4 -1
- package/template-react-vite-muijoy-ink-tauri/src/components/ui/scroll-area.tsx +5 -2
- package/template-react-vite-muijoy-ink-tauri/src/components/ui/select.tsx +3 -2
- package/template-react-vite-muijoy-ink-tauri/src/components/ui/separator.tsx +2 -0
- package/template-react-vite-muijoy-ink-tauri/src/components/ui/sonner.tsx +4 -4
- package/template-react-vite-muijoy-ink-tauri/src/components/ui/spinner.tsx +2 -1
- package/template-react-vite-muijoy-ink-tauri/src/components/ui/switch.tsx +3 -0
- package/template-react-vite-muijoy-ink-tauri/src/components/ui/textarea.tsx +2 -1
- package/template-react-vite-muijoy-ink-tauri/src/components/ui/tooltip.tsx +2 -0
- package/template-react-vite-muijoy-ink-tauri/src/content/ink/hashtag-commands.ts +2 -1
- package/template-react-vite-muijoy-ink-tauri/src/lib/hooks/hotkeys-hooks.ts +2 -0
- package/template-react-vite-muijoy-ink-tauri/src/lib/hooks/narration-hooks.ts +24 -9
- package/template-react-vite-muijoy-ink-tauri/src/lib/hooks/navigation-hooks.ts +29 -10
- package/template-react-vite-muijoy-ink-tauri/src/main.tsx +0 -1
- package/{template-react-vite-muijoy-ink/src/pixi-vn-keys.gen.d.ts → template-react-vite-muijoy-ink-tauri/src/pixi-vn.keys.gen.ts} +4 -2
- package/template-react-vite-muijoy-ink-tauri/src/routeTree.gen.ts +3 -21
- package/template-react-vite-muijoy-ink-tauri/src/routes/__root.tsx +10 -20
- package/template-react-vite-muijoy-ink-tauri/src/styles.css +43 -43
- package/template-react-vite-muijoy-ink-tauri/vite.config.ts +1 -1
- package/template-react-vite-muijoy-tauri/components.json +1 -1
- package/template-react-vite-muijoy-tauri/package-lock.json +663 -967
- package/template-react-vite-muijoy-tauri/package.json +10 -11
- package/template-react-vite-muijoy-tauri/src/components/dev-devtools.tsx +25 -0
- package/template-react-vite-muijoy-tauri/src/components/menus/settings/menus/history.tsx +78 -62
- package/template-react-vite-muijoy-tauri/src/components/screens/narration/index.tsx +5 -2
- package/template-react-vite-muijoy-tauri/src/components/ui/alert-dialog.tsx +3 -2
- package/template-react-vite-muijoy-tauri/src/components/ui/avatar.tsx +2 -2
- package/template-react-vite-muijoy-tauri/src/components/ui/breadcrumb.tsx +5 -4
- package/template-react-vite-muijoy-tauri/src/components/ui/button-group.tsx +3 -2
- package/template-react-vite-muijoy-tauri/src/components/ui/button.tsx +2 -2
- package/template-react-vite-muijoy-tauri/src/components/ui/card.tsx +6 -10
- package/template-react-vite-muijoy-tauri/src/components/ui/carousel.tsx +10 -7
- package/template-react-vite-muijoy-tauri/src/components/ui/drawer.tsx +2 -0
- package/template-react-vite-muijoy-tauri/src/components/ui/field.tsx +8 -5
- package/template-react-vite-muijoy-tauri/src/components/ui/input-group.tsx +4 -3
- package/template-react-vite-muijoy-tauri/src/components/ui/input.tsx +1 -1
- package/template-react-vite-muijoy-tauri/src/components/ui/item.tsx +9 -8
- package/template-react-vite-muijoy-tauri/src/components/ui/label.tsx +1 -1
- package/template-react-vite-muijoy-tauri/src/components/ui/radio-group.tsx +4 -1
- package/template-react-vite-muijoy-tauri/src/components/ui/scroll-area.tsx +5 -2
- package/template-react-vite-muijoy-tauri/src/components/ui/select.tsx +3 -2
- package/template-react-vite-muijoy-tauri/src/components/ui/separator.tsx +2 -0
- package/template-react-vite-muijoy-tauri/src/components/ui/sonner.tsx +4 -4
- package/template-react-vite-muijoy-tauri/src/components/ui/spinner.tsx +2 -1
- package/template-react-vite-muijoy-tauri/src/components/ui/switch.tsx +3 -0
- package/template-react-vite-muijoy-tauri/src/components/ui/textarea.tsx +2 -1
- package/template-react-vite-muijoy-tauri/src/components/ui/tooltip.tsx +2 -0
- package/template-react-vite-muijoy-tauri/src/lib/hooks/hotkeys-hooks.ts +2 -0
- package/template-react-vite-muijoy-tauri/src/lib/hooks/narration-hooks.ts +24 -9
- package/template-react-vite-muijoy-tauri/src/lib/hooks/navigation-hooks.ts +29 -10
- package/template-react-vite-muijoy-tauri/src/main.tsx +0 -1
- package/{template-react-vite-muijoy-ink-tauri/src/pixi-vn-keys.gen.d.ts → template-react-vite-muijoy-tauri/src/pixi-vn.keys.gen.ts} +4 -4
- package/template-react-vite-muijoy-tauri/src/routeTree.gen.ts +3 -21
- package/template-react-vite-muijoy-tauri/src/routes/__root.tsx +10 -20
- package/template-react-vite-muijoy-tauri/src/styles.css +43 -43
- package/template-react-vite-muijoy-tauri/vite.config.ts +1 -1
- package/template-react-vite-muijoy/src/pixi-vn-keys.gen.d.ts +0 -20
- package/template-react-vite-muijoy/src/routes/narration.tsx +0 -9
- package/template-react-vite-muijoy-ink/src/routes/narration.tsx +0 -9
- package/template-react-vite-muijoy-ink-tauri/src/routes/narration.tsx +0 -9
- package/template-react-vite-muijoy-tauri/src/routes/narration.tsx +0 -9
|
@@ -23,23 +23,16 @@
|
|
|
23
23
|
"ui:reinit": "npx shadcn@latest init -f -b base --reinstall && npm run format"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@base-ui/react": "^1.
|
|
27
|
-
"@drincs/pixi-vn": "^1.8.
|
|
28
|
-
"@drincs/pixi-vn-ink": "^1.0.
|
|
29
|
-
"@drincs/pixi-vn-spine": "^0.2.1",
|
|
26
|
+
"@base-ui/react": "^1.6.0",
|
|
27
|
+
"@drincs/pixi-vn": "^1.8.16",
|
|
28
|
+
"@drincs/pixi-vn-ink": "^1.0.6",
|
|
30
29
|
"@tailwindcss/vite": "^4.3.0",
|
|
31
30
|
"@tanstack/hotkeys": "^0.8.0",
|
|
32
|
-
"@tanstack/react-devtools": "^0.10.5",
|
|
33
31
|
"@tanstack/react-hotkeys": "^0.10.0",
|
|
34
|
-
"@tanstack/react-hotkeys-devtools": "^0.7.0",
|
|
35
32
|
"@tanstack/react-pacer": "^0.22.1",
|
|
36
|
-
"@tanstack/react-pacer-devtools": "^0.7.1",
|
|
37
33
|
"@tanstack/react-query": "latest",
|
|
38
|
-
"@tanstack/react-query-devtools": "latest",
|
|
39
34
|
"@tanstack/react-router": "latest",
|
|
40
|
-
"@tanstack/react-router-devtools": "latest",
|
|
41
35
|
"@tanstack/react-store": "latest",
|
|
42
|
-
"@tanstack/router-plugin": "latest",
|
|
43
36
|
"@tanstack/store": "latest",
|
|
44
37
|
"@tauri-apps/api": "^2",
|
|
45
38
|
"@tauri-apps/plugin-opener": "^2",
|
|
@@ -51,7 +44,7 @@
|
|
|
51
44
|
"i18next-browser-languagedetector": "^8.2.1",
|
|
52
45
|
"i18next-chained-backend": "^5.0.4",
|
|
53
46
|
"i18next-resources-to-backend": "^1.2.1",
|
|
54
|
-
"lucide-react": "^1.
|
|
47
|
+
"lucide-react": "^1.21.0",
|
|
55
48
|
"next-themes": "^0.4.6",
|
|
56
49
|
"react": "^19.2.6",
|
|
57
50
|
"react-color-palette": "^7.3.1",
|
|
@@ -62,7 +55,7 @@
|
|
|
62
55
|
"react-resizable-panels": "^4.11.2",
|
|
63
56
|
"rehype-raw": "^7.0.0",
|
|
64
57
|
"remark-gfm": "^4.0.1",
|
|
65
|
-
"shadcn": "^4.
|
|
58
|
+
"shadcn": "^4.11.0",
|
|
66
59
|
"shade-generator": "^1.2.7",
|
|
67
60
|
"sonner": "^2.0.7",
|
|
68
61
|
"tailwind-animations": "^1.0.1",
|
|
@@ -77,6 +70,12 @@
|
|
|
77
70
|
"@biomejs/biome": "latest",
|
|
78
71
|
"@tailwindcss/typography": "^0.5.19",
|
|
79
72
|
"@tanstack/devtools-vite": "latest",
|
|
73
|
+
"@tanstack/react-devtools": "^0.10.7",
|
|
74
|
+
"@tanstack/react-hotkeys-devtools": "^0.7.0",
|
|
75
|
+
"@tanstack/react-pacer-devtools": "^0.7.1",
|
|
76
|
+
"@tanstack/react-query-devtools": "latest",
|
|
77
|
+
"@tanstack/react-router-devtools": "latest",
|
|
78
|
+
"@tanstack/router-plugin": "latest",
|
|
80
79
|
"@tauri-apps/cli": "^2",
|
|
81
80
|
"@tauri-apps/plugin-process": "^2.3.1",
|
|
82
81
|
"@types/node": "^25.9.1",
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { TanStackDevtools } from "@tanstack/react-devtools";
|
|
2
|
+
import { hotkeysDevtoolsPlugin } from "@tanstack/react-hotkeys-devtools";
|
|
3
|
+
import { ReactQueryDevtoolsPanel } from "@tanstack/react-query-devtools";
|
|
4
|
+
import { TanStackRouterDevtoolsPanel } from "@tanstack/react-router-devtools";
|
|
5
|
+
|
|
6
|
+
export default function DevDevtools() {
|
|
7
|
+
return (
|
|
8
|
+
<TanStackDevtools
|
|
9
|
+
config={{
|
|
10
|
+
position: "bottom-right",
|
|
11
|
+
}}
|
|
12
|
+
plugins={[
|
|
13
|
+
{
|
|
14
|
+
name: "UI screens",
|
|
15
|
+
render: <TanStackRouterDevtoolsPanel />,
|
|
16
|
+
},
|
|
17
|
+
{ ...hotkeysDevtoolsPlugin(), name: "Hotkeys" },
|
|
18
|
+
{
|
|
19
|
+
name: "UI cache",
|
|
20
|
+
render: <ReactQueryDevtoolsPanel />,
|
|
21
|
+
},
|
|
22
|
+
]}
|
|
23
|
+
/>
|
|
24
|
+
);
|
|
25
|
+
}
|
package/template-react-vite-muijoy-ink-tauri/src/components/menus/settings/menus/history.tsx
CHANGED
|
@@ -15,7 +15,7 @@ import { useQueryNarrativeHistory } from "@/lib/query/narration-query";
|
|
|
15
15
|
import { cn } from "@/lib/utils";
|
|
16
16
|
import { useDebouncedValue } from "@tanstack/react-pacer";
|
|
17
17
|
import { Check, Search } from "lucide-react";
|
|
18
|
-
import { useState } from "react";
|
|
18
|
+
import { useEffect, useRef, useState } from "react";
|
|
19
19
|
import { useTranslation } from "react-i18next";
|
|
20
20
|
import Markdown from "react-markdown";
|
|
21
21
|
import rehypeRaw from "rehype-raw";
|
|
@@ -33,80 +33,96 @@ function HistoryItemAvatar({ icon, character }: { icon?: string; character: stri
|
|
|
33
33
|
|
|
34
34
|
export function HistoryList({ searchString }: { searchString?: string }) {
|
|
35
35
|
const { data = [] } = useQueryNarrativeHistory({ searchString });
|
|
36
|
+
const bottomRef = useRef<HTMLDivElement>(null);
|
|
37
|
+
|
|
38
|
+
useEffect(() => {
|
|
39
|
+
if (data.length > 0) {
|
|
40
|
+
bottomRef.current?.scrollIntoView();
|
|
41
|
+
}
|
|
42
|
+
}, [data]);
|
|
36
43
|
|
|
37
44
|
return (
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
{
|
|
44
|
-
|
|
45
|
-
<
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
<
|
|
53
|
-
|
|
54
|
-
rehypePlugins={[rehypeRaw]}
|
|
55
|
-
components={{
|
|
56
|
-
p: ({ children, id }) => (
|
|
57
|
-
<p key={id} className="m-0 text-sm text-muted-foreground">
|
|
58
|
-
{children}
|
|
59
|
-
</p>
|
|
60
|
-
),
|
|
61
|
-
}}
|
|
45
|
+
<>
|
|
46
|
+
<ItemGroup>
|
|
47
|
+
{data.map((item, index) => {
|
|
48
|
+
const key = `${item.character ?? "unknown"}-${item.text}-${index}`;
|
|
49
|
+
return (
|
|
50
|
+
<Item key={key} variant="outline">
|
|
51
|
+
{item.character && (
|
|
52
|
+
<ItemMedia variant="image">
|
|
53
|
+
<HistoryItemAvatar
|
|
54
|
+
icon={item.icon}
|
|
55
|
+
character={item.character}
|
|
56
|
+
/>
|
|
57
|
+
</ItemMedia>
|
|
58
|
+
)}
|
|
59
|
+
<ItemContent
|
|
60
|
+
className={!item.character ? "items-center text-center" : undefined}
|
|
62
61
|
>
|
|
63
|
-
{item.
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
62
|
+
{item.character && <ItemTitle>{item.character}</ItemTitle>}
|
|
63
|
+
<Markdown
|
|
64
|
+
remarkPlugins={[remarkGfm]}
|
|
65
|
+
rehypePlugins={[rehypeRaw]}
|
|
66
|
+
components={{
|
|
67
|
+
p: ({ children, id }) => (
|
|
68
|
+
<p
|
|
69
|
+
key={id}
|
|
70
|
+
className="m-0 text-sm text-muted-foreground"
|
|
71
|
+
>
|
|
72
|
+
{children}
|
|
73
|
+
</p>
|
|
74
|
+
),
|
|
75
|
+
}}
|
|
76
|
+
>
|
|
77
|
+
{item.text}
|
|
78
|
+
</Markdown>
|
|
79
|
+
</ItemContent>
|
|
80
|
+
{(item.choices?.some((c) => !c.hidden) || item.inputValue) && (
|
|
81
|
+
<ItemFooter className="flex-wrap justify-center gap-1.5">
|
|
82
|
+
{item.choices?.map((choice) => {
|
|
83
|
+
const choiceKey = `${choice.text}-${choice.isResponse ? "1" : "0"}-${choice.hidden ? "1" : "0"}`;
|
|
84
|
+
if (choice.hidden) {
|
|
85
|
+
return null;
|
|
86
|
+
}
|
|
87
|
+
if (choice.isResponse) {
|
|
88
|
+
return (
|
|
89
|
+
<Kbd
|
|
90
|
+
key={`choices-success-${choiceKey}`}
|
|
91
|
+
className={cn(
|
|
92
|
+
"h-auto border px-2 py-1",
|
|
93
|
+
"border-green-500/30 bg-green-500/10 text-green-700 dark:text-green-400",
|
|
94
|
+
)}
|
|
95
|
+
>
|
|
96
|
+
{choice.text}
|
|
97
|
+
<Check className="size-3" />
|
|
98
|
+
</Kbd>
|
|
99
|
+
);
|
|
100
|
+
}
|
|
74
101
|
return (
|
|
75
102
|
<Kbd
|
|
76
|
-
key={`choices
|
|
103
|
+
key={`choices-${choiceKey}`}
|
|
77
104
|
className={cn(
|
|
78
105
|
"h-auto border px-2 py-1",
|
|
79
|
-
"border-
|
|
106
|
+
"border-primary/30 bg-primary/10 text-primary",
|
|
80
107
|
)}
|
|
81
108
|
>
|
|
82
109
|
{choice.text}
|
|
83
|
-
<Check className="size-3" />
|
|
84
110
|
</Kbd>
|
|
85
111
|
);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
<Kbd
|
|
89
|
-
|
|
90
|
-
className={cn(
|
|
91
|
-
"h-auto border px-2 py-1",
|
|
92
|
-
"border-primary/30 bg-primary/10 text-primary",
|
|
93
|
-
)}
|
|
94
|
-
>
|
|
95
|
-
{choice.text}
|
|
112
|
+
})}
|
|
113
|
+
{item.inputValue && (
|
|
114
|
+
<Kbd className="h-auto px-2 py-1">
|
|
115
|
+
{item.inputValue.toString()}
|
|
96
116
|
</Kbd>
|
|
97
|
-
)
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
</Item>
|
|
107
|
-
);
|
|
108
|
-
})}
|
|
109
|
-
</ItemGroup>
|
|
117
|
+
)}
|
|
118
|
+
</ItemFooter>
|
|
119
|
+
)}
|
|
120
|
+
</Item>
|
|
121
|
+
);
|
|
122
|
+
})}
|
|
123
|
+
</ItemGroup>
|
|
124
|
+
<div ref={bottomRef} />
|
|
125
|
+
</>
|
|
110
126
|
);
|
|
111
127
|
}
|
|
112
128
|
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { ChoiceMenu } from "@/components/menus/choice-menus";
|
|
2
2
|
import { NarrationCards } from "@/components/screens/narration/narration-cards";
|
|
3
3
|
import { ResizableHandle, ResizablePanel, ResizablePanelGroup } from "@/components/ui/resizable";
|
|
4
|
+
import { QuickTools } from "@/components/quick-tools";
|
|
4
5
|
import { useQueryDialogue } from "@/lib/query/narration-query";
|
|
5
6
|
|
|
6
7
|
export function NarrationScreen() {
|
|
7
8
|
const { data: { animatedText, text } = {} } = useQueryDialogue();
|
|
9
|
+
const hasText = !!(animatedText || text);
|
|
8
10
|
|
|
9
11
|
return (
|
|
10
12
|
<div className="absolute flex h-full w-full flex-col">
|
|
@@ -13,17 +15,18 @@ export function NarrationScreen() {
|
|
|
13
15
|
<ResizablePanel>
|
|
14
16
|
<ChoiceMenu />
|
|
15
17
|
</ResizablePanel>
|
|
16
|
-
{
|
|
18
|
+
{hasText && (
|
|
17
19
|
<div className="mx-4">
|
|
18
20
|
<ResizableHandle />
|
|
19
21
|
</div>
|
|
20
22
|
)}
|
|
21
|
-
{
|
|
23
|
+
{hasText && (
|
|
22
24
|
<ResizablePanel defaultSize={"40%"}>
|
|
23
25
|
<NarrationCards />
|
|
24
26
|
</ResizablePanel>
|
|
25
27
|
)}
|
|
26
28
|
</ResizablePanelGroup>
|
|
29
|
+
{!hasText && <QuickTools />}
|
|
27
30
|
</div>
|
|
28
31
|
</div>
|
|
29
32
|
);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import * as React from "react";
|
|
1
2
|
import { AlertDialog as AlertDialogPrimitive } from "@base-ui/react/alert-dialog";
|
|
2
|
-
|
|
3
|
-
import { Button } from "@/components/ui/button";
|
|
3
|
+
|
|
4
4
|
import { cn } from "@/lib/utils";
|
|
5
|
+
import { Button } from "@/components/ui/button";
|
|
5
6
|
|
|
6
7
|
function AlertDialog({ ...props }: AlertDialogPrimitive.Root.Props) {
|
|
7
8
|
return <AlertDialogPrimitive.Root data-slot="alert-dialog" {...props} />;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import * as React from "react";
|
|
1
2
|
import { Avatar as AvatarPrimitive } from "@base-ui/react/avatar";
|
|
2
|
-
import type * as React from "react";
|
|
3
3
|
|
|
4
4
|
import { cn } from "@/lib/utils";
|
|
5
5
|
|
|
@@ -88,4 +88,4 @@ function AvatarGroupCount({ className, ...props }: React.ComponentProps<"div">)
|
|
|
88
88
|
);
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
export { Avatar,
|
|
91
|
+
export { Avatar, AvatarImage, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarBadge };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
3
3
|
import { useRender } from "@base-ui/react/use-render";
|
|
4
|
+
|
|
5
|
+
import { cn } from "@/lib/utils";
|
|
4
6
|
import { ChevronRightIcon, MoreHorizontalIcon } from "lucide-react";
|
|
5
|
-
import type * as React from "react";
|
|
6
7
|
|
|
7
8
|
function Breadcrumb({ className, ...props }: React.ComponentProps<"nav">) {
|
|
8
9
|
return (
|
|
@@ -93,10 +94,10 @@ function BreadcrumbEllipsis({ className, ...props }: React.ComponentProps<"span"
|
|
|
93
94
|
|
|
94
95
|
export {
|
|
95
96
|
Breadcrumb,
|
|
96
|
-
|
|
97
|
+
BreadcrumbList,
|
|
97
98
|
BreadcrumbItem,
|
|
98
99
|
BreadcrumbLink,
|
|
99
|
-
BreadcrumbList,
|
|
100
100
|
BreadcrumbPage,
|
|
101
101
|
BreadcrumbSeparator,
|
|
102
|
+
BreadcrumbEllipsis,
|
|
102
103
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { Separator } from "@/components/ui/separator";
|
|
2
|
-
import { cn } from "@/lib/utils";
|
|
3
1
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
4
2
|
import { useRender } from "@base-ui/react/use-render";
|
|
5
3
|
import { cva, type VariantProps } from "class-variance-authority";
|
|
6
4
|
|
|
5
|
+
import { cn } from "@/lib/utils";
|
|
6
|
+
import { Separator } from "@/components/ui/separator";
|
|
7
|
+
|
|
7
8
|
const buttonGroupVariants = cva(
|
|
8
9
|
"flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10 has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-lg [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",
|
|
9
10
|
{
|
|
@@ -8,11 +8,11 @@ const buttonVariants = cva(
|
|
|
8
8
|
{
|
|
9
9
|
variants: {
|
|
10
10
|
variant: {
|
|
11
|
-
default: "bg-primary text-primary-foreground
|
|
11
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/80",
|
|
12
12
|
outline:
|
|
13
13
|
"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
|
|
14
14
|
secondary:
|
|
15
|
-
"bg-secondary text-secondary-foreground hover:bg-secondary
|
|
15
|
+
"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
|
|
16
16
|
ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
|
|
17
17
|
destructive:
|
|
18
18
|
"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
|
|
3
3
|
import { cn } from "@/lib/utils";
|
|
4
4
|
|
|
@@ -12,7 +12,7 @@ function Card({
|
|
|
12
12
|
data-slot="card"
|
|
13
13
|
data-size={size}
|
|
14
14
|
className={cn(
|
|
15
|
-
"group/card flex flex-col gap-
|
|
15
|
+
"group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",
|
|
16
16
|
className,
|
|
17
17
|
)}
|
|
18
18
|
{...props}
|
|
@@ -25,7 +25,7 @@ function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
25
25
|
<div
|
|
26
26
|
data-slot="card-header"
|
|
27
27
|
className={cn(
|
|
28
|
-
"group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-
|
|
28
|
+
"group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",
|
|
29
29
|
className,
|
|
30
30
|
)}
|
|
31
31
|
{...props}
|
|
@@ -71,11 +71,7 @@ function CardAction({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
71
71
|
|
|
72
72
|
function CardContent({ className, ...props }: React.ComponentProps<"div">) {
|
|
73
73
|
return (
|
|
74
|
-
<div
|
|
75
|
-
data-slot="card-content"
|
|
76
|
-
className={cn("px-4 group-data-[size=sm]/card:px-3", className)}
|
|
77
|
-
{...props}
|
|
78
|
-
/>
|
|
74
|
+
<div data-slot="card-content" className={cn("px-(--card-spacing)", className)} {...props} />
|
|
79
75
|
);
|
|
80
76
|
}
|
|
81
77
|
|
|
@@ -84,7 +80,7 @@ function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
84
80
|
<div
|
|
85
81
|
data-slot="card-footer"
|
|
86
82
|
className={cn(
|
|
87
|
-
"flex items-center rounded-b-xl border-t bg-muted/50 p-
|
|
83
|
+
"flex items-center rounded-b-xl border-t bg-muted/50 p-(--card-spacing)",
|
|
88
84
|
className,
|
|
89
85
|
)}
|
|
90
86
|
{...props}
|
|
@@ -92,4 +88,4 @@ function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
92
88
|
);
|
|
93
89
|
}
|
|
94
90
|
|
|
95
|
-
export { Card,
|
|
91
|
+
export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent };
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
import {
|
|
4
|
+
import useEmblaCarousel, { type UseEmblaCarouselType } from "embla-carousel-react";
|
|
5
|
+
|
|
5
6
|
import { cn } from "@/lib/utils";
|
|
7
|
+
import { Button } from "@/components/ui/button";
|
|
8
|
+
import { ChevronLeftIcon, ChevronRightIcon } from "lucide-react";
|
|
6
9
|
|
|
7
10
|
type CarouselApi = UseEmblaCarouselType[1];
|
|
8
11
|
type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
|
|
@@ -177,7 +180,7 @@ function CarouselPrevious({
|
|
|
177
180
|
className={cn(
|
|
178
181
|
"absolute touch-manipulation rounded-full",
|
|
179
182
|
orientation === "horizontal"
|
|
180
|
-
? "
|
|
183
|
+
? "inset-y-0 -left-12 my-auto"
|
|
181
184
|
: "-top-12 left-1/2 -translate-x-1/2 rotate-90",
|
|
182
185
|
className,
|
|
183
186
|
)}
|
|
@@ -207,7 +210,7 @@ function CarouselNext({
|
|
|
207
210
|
className={cn(
|
|
208
211
|
"absolute touch-manipulation rounded-full",
|
|
209
212
|
orientation === "horizontal"
|
|
210
|
-
? "
|
|
213
|
+
? "inset-y-0 -right-12 my-auto"
|
|
211
214
|
: "-bottom-12 left-1/2 -translate-x-1/2 rotate-90",
|
|
212
215
|
className,
|
|
213
216
|
)}
|
|
@@ -222,11 +225,11 @@ function CarouselNext({
|
|
|
222
225
|
}
|
|
223
226
|
|
|
224
227
|
export {
|
|
225
|
-
Carousel,
|
|
226
228
|
type CarouselApi,
|
|
229
|
+
Carousel,
|
|
227
230
|
CarouselContent,
|
|
228
231
|
CarouselItem,
|
|
229
|
-
CarouselNext,
|
|
230
232
|
CarouselPrevious,
|
|
233
|
+
CarouselNext,
|
|
231
234
|
useCarousel,
|
|
232
235
|
};
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
2
3
|
import { useMemo } from "react";
|
|
4
|
+
import { cva, type VariantProps } from "class-variance-authority";
|
|
5
|
+
|
|
6
|
+
import { cn } from "@/lib/utils";
|
|
3
7
|
import { Label } from "@/components/ui/label";
|
|
4
8
|
import { Separator } from "@/components/ui/separator";
|
|
5
|
-
import { cn } from "@/lib/utils";
|
|
6
9
|
|
|
7
10
|
function FieldSet({ className, ...props }: React.ComponentProps<"fieldset">) {
|
|
8
11
|
return (
|
|
@@ -111,7 +114,7 @@ function FieldTitle({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
111
114
|
<div
|
|
112
115
|
data-slot="field-label"
|
|
113
116
|
className={cn(
|
|
114
|
-
"flex w-fit items-center gap-2 text-sm
|
|
117
|
+
"flex w-fit items-center gap-2 text-sm font-medium group-data-[disabled=true]/field:opacity-50",
|
|
115
118
|
className,
|
|
116
119
|
)}
|
|
117
120
|
{...props}
|
|
@@ -214,13 +217,13 @@ function FieldError({
|
|
|
214
217
|
|
|
215
218
|
export {
|
|
216
219
|
Field,
|
|
217
|
-
|
|
220
|
+
FieldLabel,
|
|
218
221
|
FieldDescription,
|
|
219
222
|
FieldError,
|
|
220
223
|
FieldGroup,
|
|
221
|
-
FieldLabel,
|
|
222
224
|
FieldLegend,
|
|
223
225
|
FieldSeparator,
|
|
224
226
|
FieldSet,
|
|
227
|
+
FieldContent,
|
|
225
228
|
FieldTitle,
|
|
226
229
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
1
2
|
import { cva, type VariantProps } from "class-variance-authority";
|
|
2
|
-
|
|
3
|
+
|
|
4
|
+
import { cn } from "@/lib/utils";
|
|
3
5
|
import { Button } from "@/components/ui/button";
|
|
4
6
|
import { Input } from "@/components/ui/input";
|
|
5
7
|
import { Textarea } from "@/components/ui/textarea";
|
|
6
|
-
import { cn } from "@/lib/utils";
|
|
7
8
|
|
|
8
9
|
function InputGroup({ className, ...props }: React.ComponentProps<"div">) {
|
|
9
10
|
return (
|
|
@@ -138,7 +139,7 @@ export {
|
|
|
138
139
|
InputGroup,
|
|
139
140
|
InputGroupAddon,
|
|
140
141
|
InputGroupButton,
|
|
141
|
-
InputGroupInput,
|
|
142
142
|
InputGroupText,
|
|
143
|
+
InputGroupInput,
|
|
143
144
|
InputGroupTextarea,
|
|
144
145
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { cn } from "@/lib/utils";
|
|
1
|
+
import * as React from "react";
|
|
3
2
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
4
3
|
import { useRender } from "@base-ui/react/use-render";
|
|
5
4
|
import { cva, type VariantProps } from "class-variance-authority";
|
|
6
|
-
|
|
5
|
+
|
|
6
|
+
import { cn } from "@/lib/utils";
|
|
7
|
+
import { Separator } from "@/components/ui/separator";
|
|
7
8
|
|
|
8
9
|
function ItemGroup({ className, ...props }: React.ComponentProps<"div">) {
|
|
9
10
|
return (
|
|
@@ -178,13 +179,13 @@ function ItemFooter({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
178
179
|
|
|
179
180
|
export {
|
|
180
181
|
Item,
|
|
181
|
-
|
|
182
|
+
ItemMedia,
|
|
182
183
|
ItemContent,
|
|
183
|
-
|
|
184
|
-
ItemFooter,
|
|
184
|
+
ItemActions,
|
|
185
185
|
ItemGroup,
|
|
186
|
-
ItemHeader,
|
|
187
|
-
ItemMedia,
|
|
188
186
|
ItemSeparator,
|
|
189
187
|
ItemTitle,
|
|
188
|
+
ItemDescription,
|
|
189
|
+
ItemHeader,
|
|
190
|
+
ItemFooter,
|
|
190
191
|
};
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
2
3
|
import { Radio as RadioPrimitive } from "@base-ui/react/radio";
|
|
3
4
|
import { RadioGroup as RadioGroupPrimitive } from "@base-ui/react/radio-group";
|
|
4
5
|
|
|
6
|
+
import { cn } from "@/lib/utils";
|
|
7
|
+
|
|
5
8
|
function RadioGroup({ className, ...props }: RadioGroupPrimitive.Props) {
|
|
6
9
|
return (
|
|
7
10
|
<RadioGroupPrimitive
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import * as React from "react";
|
|
1
4
|
import { ScrollArea as ScrollAreaPrimitive } from "@base-ui/react/scroll-area";
|
|
5
|
+
|
|
2
6
|
import { cn } from "@/lib/utils";
|
|
3
7
|
|
|
4
|
-
function ScrollArea({ className, children,
|
|
8
|
+
function ScrollArea({ className, children, ...props }: ScrollAreaPrimitive.Root.Props) {
|
|
5
9
|
return (
|
|
6
10
|
<ScrollAreaPrimitive.Root
|
|
7
11
|
data-slot="scroll-area"
|
|
@@ -9,7 +13,6 @@ function ScrollArea({ className, children, ref, ...props }: ScrollAreaPrimitive.
|
|
|
9
13
|
{...props}
|
|
10
14
|
>
|
|
11
15
|
<ScrollAreaPrimitive.Viewport
|
|
12
|
-
ref={ref}
|
|
13
16
|
data-slot="scroll-area-viewport"
|
|
14
17
|
className="size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1"
|
|
15
18
|
>
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import * as React from "react";
|
|
1
2
|
import { Select as SelectPrimitive } from "@base-ui/react/select";
|
|
2
|
-
|
|
3
|
-
import type * as React from "react";
|
|
3
|
+
|
|
4
4
|
import { cn } from "@/lib/utils";
|
|
5
|
+
import { ChevronDownIcon, CheckIcon, ChevronUpIcon } from "lucide-react";
|
|
5
6
|
|
|
6
7
|
const Select = SelectPrimitive.Root;
|
|
7
8
|
|