@uipath/apollo-wind 2.45.1 → 2.47.0
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/components/ui/avatar.d.ts +1 -1
- package/dist/components/ui/badge.d.ts +1 -1
- package/dist/components/ui/button.cjs +2 -1
- package/dist/components/ui/button.d.ts +2 -2
- package/dist/components/ui/button.js +2 -1
- package/dist/components/ui/command.d.ts +13 -13
- package/dist/components/ui/index.cjs +28 -28
- package/dist/components/ui/prompt-editor/components/EditorToolbar.cjs +101 -68
- package/dist/components/ui/prompt-editor/components/EditorToolbar.d.ts +16 -2
- package/dist/components/ui/prompt-editor/components/EditorToolbar.js +101 -68
- package/dist/components/ui/prompt-editor/components/MarkdownPreview.cjs +13 -8
- package/dist/components/ui/prompt-editor/components/MarkdownPreview.d.ts +13 -1
- package/dist/components/ui/prompt-editor/components/MarkdownPreview.js +13 -8
- package/dist/components/ui/prompt-editor/components/PromptEditorAutocompleteMenu.cjs +22 -11
- package/dist/components/ui/prompt-editor/components/PromptEditorAutocompleteMenu.js +23 -12
- package/dist/components/ui/prompt-editor/components/TokenPill.cjs +4 -2
- package/dist/components/ui/prompt-editor/components/TokenPill.js +4 -2
- package/dist/components/ui/prompt-editor/components/TokenPillSlot.cjs +58 -0
- package/dist/components/ui/prompt-editor/components/TokenPillSlot.d.ts +7 -0
- package/dist/components/ui/prompt-editor/components/TokenPillSlot.js +24 -0
- package/dist/components/ui/prompt-editor/components/TokenPillWithTooltip.cjs +8 -9
- package/dist/components/ui/prompt-editor/components/TokenPillWithTooltip.js +8 -9
- package/dist/components/ui/prompt-editor/index.cjs +152 -9
- package/dist/components/ui/prompt-editor/index.d.ts +13 -1
- package/dist/components/ui/prompt-editor/index.js +11 -1
- package/dist/components/ui/prompt-editor/nodes/InputTokenNode.cjs +2 -2
- package/dist/components/ui/prompt-editor/nodes/InputTokenNode.d.ts +1 -1
- package/dist/components/ui/prompt-editor/nodes/InputTokenNode.js +2 -2
- package/dist/components/ui/prompt-editor/nodes/OutputTokenNode.cjs +2 -2
- package/dist/components/ui/prompt-editor/nodes/OutputTokenNode.d.ts +1 -1
- package/dist/components/ui/prompt-editor/nodes/OutputTokenNode.js +2 -2
- package/dist/components/ui/prompt-editor/nodes/ResourceTokenNode.cjs +2 -2
- package/dist/components/ui/prompt-editor/nodes/ResourceTokenNode.d.ts +1 -1
- package/dist/components/ui/prompt-editor/nodes/ResourceTokenNode.js +2 -2
- package/dist/components/ui/prompt-editor/nodes/StateTokenNode.cjs +2 -2
- package/dist/components/ui/prompt-editor/nodes/StateTokenNode.d.ts +1 -1
- package/dist/components/ui/prompt-editor/nodes/StateTokenNode.js +2 -2
- package/dist/components/ui/prompt-editor/nodes/index.cjs +1 -1
- package/dist/components/ui/prompt-editor/nodes/index.d.ts +5 -5
- package/dist/components/ui/prompt-editor/nodes/index.js +1 -1
- package/dist/components/ui/prompt-editor/plugins/AutocompletePlugin.cjs +11 -5
- package/dist/components/ui/prompt-editor/plugins/AutocompletePlugin.d.ts +8 -1
- package/dist/components/ui/prompt-editor/plugins/AutocompletePlugin.js +12 -6
- package/dist/components/ui/prompt-editor/plugins/CopyPastePlugin.cjs +1 -1
- package/dist/components/ui/prompt-editor/plugins/CopyPastePlugin.js +1 -1
- package/dist/components/ui/prompt-editor/plugins/EditorRefPlugin.cjs +1 -1
- package/dist/components/ui/prompt-editor/plugins/EditorRefPlugin.js +1 -1
- package/dist/components/ui/prompt-editor/plugins/MultilinePlugin.cjs +1 -1
- package/dist/components/ui/prompt-editor/plugins/MultilinePlugin.js +1 -1
- package/dist/components/ui/prompt-editor/plugins/NodeSelectionFixPlugin.cjs +12 -6
- package/dist/components/ui/prompt-editor/plugins/NodeSelectionFixPlugin.js +13 -7
- package/dist/components/ui/prompt-editor/plugins/ToolbarActionsPlugin.cjs +64 -3
- package/dist/components/ui/prompt-editor/plugins/ToolbarActionsPlugin.d.ts +6 -2
- package/dist/components/ui/prompt-editor/plugins/ToolbarActionsPlugin.js +65 -4
- package/dist/components/ui/prompt-editor/plugins/ValidateTokensPlugin.cjs +4 -9
- package/dist/components/ui/prompt-editor/plugins/ValidateTokensPlugin.js +4 -9
- package/dist/components/ui/prompt-editor/plugins/ValueSyncPlugin.cjs +10 -5
- package/dist/components/ui/prompt-editor/plugins/ValueSyncPlugin.d.ts +3 -1
- package/dist/components/ui/prompt-editor/plugins/ValueSyncPlugin.js +10 -5
- package/dist/components/ui/prompt-editor/plugins/VariableDropPlugin.cjs +1 -1
- package/dist/components/ui/prompt-editor/plugins/VariableDropPlugin.js +2 -2
- package/dist/components/ui/prompt-editor/plugins/shared/token-nodes.cjs +10 -1
- package/dist/components/ui/prompt-editor/plugins/shared/token-nodes.d.ts +4 -1
- package/dist/components/ui/prompt-editor/plugins/shared/token-nodes.js +8 -2
- package/dist/components/ui/prompt-editor/prompt-editor-config.cjs +69 -0
- package/dist/components/ui/prompt-editor/prompt-editor-config.d.ts +70 -0
- package/dist/components/ui/prompt-editor/prompt-editor-config.js +29 -0
- package/dist/components/ui/prompt-editor/prompt-editor.cjs +198 -88
- package/dist/components/ui/prompt-editor/prompt-editor.d.ts +46 -1
- package/dist/components/ui/prompt-editor/prompt-editor.js +199 -89
- package/dist/components/ui/prompt-editor/types.cjs +5 -5
- package/dist/components/ui/prompt-editor/types.d.ts +18 -2
- package/dist/components/ui/prompt-editor/types.js +5 -5
- package/dist/components/ui/prompt-editor/utils/autocomplete-segments.cjs +10 -5
- package/dist/components/ui/prompt-editor/utils/autocomplete-segments.d.ts +13 -0
- package/dist/components/ui/prompt-editor/utils/autocomplete-segments.js +8 -6
- package/dist/components/ui/prompt-editor/utils/index.cjs +1 -1
- package/dist/components/ui/prompt-editor/utils/index.d.ts +1 -1
- package/dist/components/ui/prompt-editor/utils/index.js +1 -1
- package/dist/components/ui/prompt-editor/utils/insert-token.d.ts +1 -1
- package/dist/components/ui/prompt-editor/utils/rich-serialization.cjs +186 -0
- package/dist/components/ui/prompt-editor/utils/rich-serialization.d.ts +38 -0
- package/dist/components/ui/prompt-editor/utils/rich-serialization.js +140 -0
- package/dist/components/ui/prompt-editor/utils/serialization.cjs +13 -5
- package/dist/components/ui/prompt-editor/utils/serialization.js +14 -6
- package/dist/components/ui/sheet.d.ts +1 -1
- package/dist/components/ui/spinner.d.ts +1 -1
- package/dist/components/ui/switch.d.ts +2 -2
- package/dist/components/ui/toggle-group.d.ts +2 -2
- package/dist/components/ui/toggle.d.ts +2 -2
- package/dist/index.cjs +136 -61
- package/dist/index.d.ts +89 -89
- package/dist/index.js +61 -61
- package/dist/styles.css +22 -24
- package/package.json +3 -1
|
@@ -2,7 +2,7 @@ import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
|
2
2
|
import { type VariantProps } from 'class-variance-authority';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
declare const avatarVariants: (props?: ({
|
|
5
|
-
size?: "
|
|
5
|
+
size?: "sm" | "lg" | "default" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
export interface AvatarProps extends React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>, VariantProps<typeof avatarVariants> {
|
|
8
8
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type VariantProps } from 'class-variance-authority';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
declare const badgeVariants: (props?: ({
|
|
4
|
-
variant?: "default" | "
|
|
4
|
+
variant?: "default" | "secondary" | "destructive" | "outline" | "error" | "warning" | "info" | "success" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
6
|
export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
7
7
|
}
|
|
@@ -40,7 +40,8 @@ const buttonVariants = (0, external_class_variance_authority_namespaceObject.cva
|
|
|
40
40
|
outline: 'border border-input bg-background hover:bg-accent hover:text-accent-foreground future:border-border-subtle future:text-muted-foreground future:hover:text-foreground',
|
|
41
41
|
secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80 future:text-muted-foreground future:hover:text-foreground',
|
|
42
42
|
ghost: 'hover:bg-accent hover:text-accent-foreground future:text-muted-foreground future:hover:text-foreground',
|
|
43
|
-
link: 'text-primary underline-offset-4 hover:underline future:text-muted-foreground future:hover:text-foreground'
|
|
43
|
+
link: 'text-primary underline-offset-4 hover:underline future:text-muted-foreground future:hover:text-foreground',
|
|
44
|
+
text: 'text-primary hover:text-primary-hover'
|
|
44
45
|
},
|
|
45
46
|
size: {
|
|
46
47
|
lg: 'h-11 px-8',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type VariantProps } from 'class-variance-authority';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
declare const buttonVariants: (props?: ({
|
|
4
|
-
variant?: "
|
|
5
|
-
size?: "
|
|
4
|
+
variant?: "text" | "default" | "secondary" | "destructive" | "outline" | "ghost" | "link" | null | undefined;
|
|
5
|
+
size?: "sm" | "lg" | "default" | "xs" | "2xs" | "3xs" | "4xs" | "icon" | null | undefined;
|
|
6
6
|
icon?: boolean | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
8
|
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
@@ -11,7 +11,8 @@ const buttonVariants = cva('inline-flex items-center justify-center gap-2 whites
|
|
|
11
11
|
outline: 'border border-input bg-background hover:bg-accent hover:text-accent-foreground future:border-border-subtle future:text-muted-foreground future:hover:text-foreground',
|
|
12
12
|
secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80 future:text-muted-foreground future:hover:text-foreground',
|
|
13
13
|
ghost: 'hover:bg-accent hover:text-accent-foreground future:text-muted-foreground future:hover:text-foreground',
|
|
14
|
-
link: 'text-primary underline-offset-4 hover:underline future:text-muted-foreground future:hover:text-foreground'
|
|
14
|
+
link: 'text-primary underline-offset-4 hover:underline future:text-muted-foreground future:hover:text-foreground',
|
|
15
|
+
text: 'text-primary hover:text-primary-hover'
|
|
15
16
|
},
|
|
16
17
|
size: {
|
|
17
18
|
lg: 'h-11 px-8',
|
|
@@ -2,11 +2,11 @@ import { type DialogProps } from '@radix-ui/react-dialog';
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
declare const Command: React.ForwardRefExoticComponent<Omit<{
|
|
4
4
|
children?: React.ReactNode;
|
|
5
|
-
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HTMLAttributes<HTMLDivElement
|
|
5
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
6
6
|
ref?: React.Ref<HTMLDivElement>;
|
|
7
7
|
} & {
|
|
8
8
|
asChild?: boolean;
|
|
9
|
-
},
|
|
9
|
+
}, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
10
10
|
label?: string;
|
|
11
11
|
shouldFilter?: boolean;
|
|
12
12
|
filter?: (value: string, search: string, keywords?: string[]) => number;
|
|
@@ -22,51 +22,51 @@ declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<
|
|
|
22
22
|
ref?: React.Ref<HTMLInputElement>;
|
|
23
23
|
} & {
|
|
24
24
|
asChild?: boolean;
|
|
25
|
-
}, "
|
|
25
|
+
}, "key" | "asChild" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "type" | "onChange" | "value"> & {
|
|
26
26
|
value?: string;
|
|
27
27
|
onValueChange?: (search: string) => void;
|
|
28
28
|
} & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
29
29
|
declare const CommandList: React.ForwardRefExoticComponent<Omit<{
|
|
30
30
|
children?: React.ReactNode;
|
|
31
|
-
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HTMLAttributes<HTMLDivElement
|
|
31
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
32
32
|
ref?: React.Ref<HTMLDivElement>;
|
|
33
33
|
} & {
|
|
34
34
|
asChild?: boolean;
|
|
35
|
-
},
|
|
35
|
+
}, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
36
36
|
label?: string;
|
|
37
37
|
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
38
38
|
declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
|
|
39
39
|
children?: React.ReactNode;
|
|
40
|
-
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HTMLAttributes<HTMLDivElement
|
|
40
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
41
41
|
ref?: React.Ref<HTMLDivElement>;
|
|
42
42
|
} & {
|
|
43
43
|
asChild?: boolean;
|
|
44
|
-
},
|
|
44
|
+
}, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
45
45
|
declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
|
|
46
46
|
children?: React.ReactNode;
|
|
47
|
-
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HTMLAttributes<HTMLDivElement
|
|
47
|
+
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
48
48
|
ref?: React.Ref<HTMLDivElement>;
|
|
49
49
|
} & {
|
|
50
50
|
asChild?: boolean;
|
|
51
|
-
},
|
|
51
|
+
}, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>>, "value" | "heading"> & {
|
|
52
52
|
heading?: React.ReactNode;
|
|
53
53
|
value?: string;
|
|
54
54
|
forceMount?: boolean;
|
|
55
55
|
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
56
|
-
declare const CommandSeparator: React.ForwardRefExoticComponent<Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HTMLAttributes<HTMLDivElement
|
|
56
|
+
declare const CommandSeparator: React.ForwardRefExoticComponent<Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
57
57
|
ref?: React.Ref<HTMLDivElement>;
|
|
58
58
|
} & {
|
|
59
59
|
asChild?: boolean;
|
|
60
|
-
},
|
|
60
|
+
}, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
61
61
|
alwaysRender?: boolean;
|
|
62
62
|
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
63
63
|
declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
|
|
64
64
|
children?: React.ReactNode;
|
|
65
|
-
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HTMLAttributes<HTMLDivElement
|
|
65
|
+
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
66
66
|
ref?: React.Ref<HTMLDivElement>;
|
|
67
67
|
} & {
|
|
68
68
|
asChild?: boolean;
|
|
69
|
-
},
|
|
69
|
+
}, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>>, "value" | "disabled" | "onSelect"> & {
|
|
70
70
|
disabled?: boolean;
|
|
71
71
|
onSelect?: (value: string) => void;
|
|
72
72
|
value?: string;
|
|
@@ -15,7 +15,7 @@ var __webpack_modules__ = {
|
|
|
15
15
|
"./avatar" (module) {
|
|
16
16
|
module.exports = require("./avatar.cjs");
|
|
17
17
|
},
|
|
18
|
-
"
|
|
18
|
+
"@/components/ui/badge" (module) {
|
|
19
19
|
module.exports = require("./badge.cjs");
|
|
20
20
|
},
|
|
21
21
|
"./breadcrumb" (module) {
|
|
@@ -24,7 +24,7 @@ var __webpack_modules__ = {
|
|
|
24
24
|
"./button-group" (module) {
|
|
25
25
|
module.exports = require("./button-group.cjs");
|
|
26
26
|
},
|
|
27
|
-
"
|
|
27
|
+
"@/components/ui/button" (module) {
|
|
28
28
|
module.exports = require("./button.cjs");
|
|
29
29
|
},
|
|
30
30
|
"./calendar" (module) {
|
|
@@ -36,19 +36,19 @@ var __webpack_modules__ = {
|
|
|
36
36
|
"./chart" (module) {
|
|
37
37
|
module.exports = require("./chart.cjs");
|
|
38
38
|
},
|
|
39
|
-
"
|
|
39
|
+
"@/components/ui/checkbox" (module) {
|
|
40
40
|
module.exports = require("./checkbox.cjs");
|
|
41
41
|
},
|
|
42
|
-
"
|
|
42
|
+
"@/components/ui/collapsible" (module) {
|
|
43
43
|
module.exports = require("./collapsible.cjs");
|
|
44
44
|
},
|
|
45
45
|
"./combobox" (module) {
|
|
46
46
|
module.exports = require("./combobox.cjs");
|
|
47
47
|
},
|
|
48
|
-
"
|
|
48
|
+
"@/components/ui/command" (module) {
|
|
49
49
|
module.exports = require("./command.cjs");
|
|
50
50
|
},
|
|
51
|
-
"
|
|
51
|
+
"@/components/ui/context-menu" (module) {
|
|
52
52
|
module.exports = require("./context-menu.cjs");
|
|
53
53
|
},
|
|
54
54
|
"./data-table" (module) {
|
|
@@ -60,16 +60,16 @@ var __webpack_modules__ = {
|
|
|
60
60
|
"./datetime-picker" (module) {
|
|
61
61
|
module.exports = require("./datetime-picker.cjs");
|
|
62
62
|
},
|
|
63
|
-
"
|
|
63
|
+
"@/components/ui/dialog" (module) {
|
|
64
64
|
module.exports = require("./dialog.cjs");
|
|
65
65
|
},
|
|
66
66
|
"./drawer" (module) {
|
|
67
67
|
module.exports = require("./drawer.cjs");
|
|
68
68
|
},
|
|
69
|
-
"
|
|
69
|
+
"@/components/ui/dropdown-menu" (module) {
|
|
70
70
|
module.exports = require("./dropdown-menu.cjs");
|
|
71
71
|
},
|
|
72
|
-
"
|
|
72
|
+
"@/components/ui/editable-cell" (module) {
|
|
73
73
|
module.exports = require("./editable-cell.cjs");
|
|
74
74
|
},
|
|
75
75
|
"./empty-state" (module) {
|
|
@@ -81,10 +81,10 @@ var __webpack_modules__ = {
|
|
|
81
81
|
"./form-field" (module) {
|
|
82
82
|
module.exports = require("./form-field.cjs");
|
|
83
83
|
},
|
|
84
|
-
"
|
|
84
|
+
"@/components/ui/hover-card" (module) {
|
|
85
85
|
module.exports = require("./hover-card.cjs");
|
|
86
86
|
},
|
|
87
|
-
"
|
|
87
|
+
"@/components/ui/input-group" (module) {
|
|
88
88
|
module.exports = require("./input-group.cjs");
|
|
89
89
|
},
|
|
90
90
|
"./input" (module) {
|
|
@@ -105,7 +105,7 @@ var __webpack_modules__ = {
|
|
|
105
105
|
"./pagination" (module) {
|
|
106
106
|
module.exports = require("./pagination.cjs");
|
|
107
107
|
},
|
|
108
|
-
"
|
|
108
|
+
"@/components/ui/popover" (module) {
|
|
109
109
|
module.exports = require("./popover.cjs");
|
|
110
110
|
},
|
|
111
111
|
"@/components/ui/portal-container" (module) {
|
|
@@ -114,7 +114,7 @@ var __webpack_modules__ = {
|
|
|
114
114
|
"./progress" (module) {
|
|
115
115
|
module.exports = require("./progress.cjs");
|
|
116
116
|
},
|
|
117
|
-
"./prompt-editor" (module) {
|
|
117
|
+
"./prompt-editor?2bb4" (module) {
|
|
118
118
|
module.exports = require("./prompt-editor/index.cjs");
|
|
119
119
|
},
|
|
120
120
|
"./radio-group" (module) {
|
|
@@ -165,7 +165,7 @@ var __webpack_modules__ = {
|
|
|
165
165
|
"./tabs" (module) {
|
|
166
166
|
module.exports = require("./tabs.cjs");
|
|
167
167
|
},
|
|
168
|
-
"
|
|
168
|
+
"./textarea" (module) {
|
|
169
169
|
module.exports = require("./textarea.cjs");
|
|
170
170
|
},
|
|
171
171
|
"./toggle-group" (module) {
|
|
@@ -265,7 +265,7 @@ var __webpack_exports__ = {};
|
|
|
265
265
|
"default"
|
|
266
266
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_avatar__rspack_import_4[__rspack_import_key];
|
|
267
267
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
268
|
-
var _badge__rspack_import_5 = __webpack_require__("
|
|
268
|
+
var _badge__rspack_import_5 = __webpack_require__("@/components/ui/badge");
|
|
269
269
|
var __rspack_reexport = {};
|
|
270
270
|
for(const __rspack_import_key in _badge__rspack_import_5)if ([
|
|
271
271
|
"TreeView",
|
|
@@ -279,7 +279,7 @@ var __webpack_exports__ = {};
|
|
|
279
279
|
"default"
|
|
280
280
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_breadcrumb__rspack_import_6[__rspack_import_key];
|
|
281
281
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
282
|
-
var _button__rspack_import_7 = __webpack_require__("
|
|
282
|
+
var _button__rspack_import_7 = __webpack_require__("@/components/ui/button");
|
|
283
283
|
var __rspack_reexport = {};
|
|
284
284
|
for(const __rspack_import_key in _button__rspack_import_7)if ([
|
|
285
285
|
"TreeView",
|
|
@@ -314,14 +314,14 @@ var __webpack_exports__ = {};
|
|
|
314
314
|
"default"
|
|
315
315
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_chart__rspack_import_11[__rspack_import_key];
|
|
316
316
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
317
|
-
var _checkbox__rspack_import_12 = __webpack_require__("
|
|
317
|
+
var _checkbox__rspack_import_12 = __webpack_require__("@/components/ui/checkbox");
|
|
318
318
|
var __rspack_reexport = {};
|
|
319
319
|
for(const __rspack_import_key in _checkbox__rspack_import_12)if ([
|
|
320
320
|
"TreeView",
|
|
321
321
|
"default"
|
|
322
322
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_checkbox__rspack_import_12[__rspack_import_key];
|
|
323
323
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
324
|
-
var _collapsible__rspack_import_13 = __webpack_require__("
|
|
324
|
+
var _collapsible__rspack_import_13 = __webpack_require__("@/components/ui/collapsible");
|
|
325
325
|
var __rspack_reexport = {};
|
|
326
326
|
for(const __rspack_import_key in _collapsible__rspack_import_13)if ([
|
|
327
327
|
"TreeView",
|
|
@@ -335,14 +335,14 @@ var __webpack_exports__ = {};
|
|
|
335
335
|
"default"
|
|
336
336
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_combobox__rspack_import_14[__rspack_import_key];
|
|
337
337
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
338
|
-
var _command__rspack_import_15 = __webpack_require__("
|
|
338
|
+
var _command__rspack_import_15 = __webpack_require__("@/components/ui/command");
|
|
339
339
|
var __rspack_reexport = {};
|
|
340
340
|
for(const __rspack_import_key in _command__rspack_import_15)if ([
|
|
341
341
|
"TreeView",
|
|
342
342
|
"default"
|
|
343
343
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_command__rspack_import_15[__rspack_import_key];
|
|
344
344
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
345
|
-
var _context_menu__rspack_import_16 = __webpack_require__("
|
|
345
|
+
var _context_menu__rspack_import_16 = __webpack_require__("@/components/ui/context-menu");
|
|
346
346
|
var __rspack_reexport = {};
|
|
347
347
|
for(const __rspack_import_key in _context_menu__rspack_import_16)if ([
|
|
348
348
|
"TreeView",
|
|
@@ -370,7 +370,7 @@ var __webpack_exports__ = {};
|
|
|
370
370
|
"default"
|
|
371
371
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_datetime_picker__rspack_import_19[__rspack_import_key];
|
|
372
372
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
373
|
-
var _dialog__rspack_import_20 = __webpack_require__("
|
|
373
|
+
var _dialog__rspack_import_20 = __webpack_require__("@/components/ui/dialog");
|
|
374
374
|
var __rspack_reexport = {};
|
|
375
375
|
for(const __rspack_import_key in _dialog__rspack_import_20)if ([
|
|
376
376
|
"TreeView",
|
|
@@ -384,14 +384,14 @@ var __webpack_exports__ = {};
|
|
|
384
384
|
"default"
|
|
385
385
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_drawer__rspack_import_21[__rspack_import_key];
|
|
386
386
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
387
|
-
var _dropdown_menu__rspack_import_22 = __webpack_require__("
|
|
387
|
+
var _dropdown_menu__rspack_import_22 = __webpack_require__("@/components/ui/dropdown-menu");
|
|
388
388
|
var __rspack_reexport = {};
|
|
389
389
|
for(const __rspack_import_key in _dropdown_menu__rspack_import_22)if ([
|
|
390
390
|
"TreeView",
|
|
391
391
|
"default"
|
|
392
392
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_dropdown_menu__rspack_import_22[__rspack_import_key];
|
|
393
393
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
394
|
-
var _editable_cell__rspack_import_23 = __webpack_require__("
|
|
394
|
+
var _editable_cell__rspack_import_23 = __webpack_require__("@/components/ui/editable-cell");
|
|
395
395
|
var __rspack_reexport = {};
|
|
396
396
|
for(const __rspack_import_key in _editable_cell__rspack_import_23)if ([
|
|
397
397
|
"TreeView",
|
|
@@ -419,7 +419,7 @@ var __webpack_exports__ = {};
|
|
|
419
419
|
"default"
|
|
420
420
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_file_upload__rspack_import_26[__rspack_import_key];
|
|
421
421
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
422
|
-
var _hover_card__rspack_import_27 = __webpack_require__("
|
|
422
|
+
var _hover_card__rspack_import_27 = __webpack_require__("@/components/ui/hover-card");
|
|
423
423
|
var __rspack_reexport = {};
|
|
424
424
|
for(const __rspack_import_key in _hover_card__rspack_import_27)if ([
|
|
425
425
|
"TreeView",
|
|
@@ -433,7 +433,7 @@ var __webpack_exports__ = {};
|
|
|
433
433
|
"default"
|
|
434
434
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_input__rspack_import_28[__rspack_import_key];
|
|
435
435
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
436
|
-
var _input_group__rspack_import_29 = __webpack_require__("
|
|
436
|
+
var _input_group__rspack_import_29 = __webpack_require__("@/components/ui/input-group");
|
|
437
437
|
var __rspack_reexport = {};
|
|
438
438
|
for(const __rspack_import_key in _input_group__rspack_import_29)if ([
|
|
439
439
|
"TreeView",
|
|
@@ -475,7 +475,7 @@ var __webpack_exports__ = {};
|
|
|
475
475
|
"default"
|
|
476
476
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_pagination__rspack_import_34[__rspack_import_key];
|
|
477
477
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
478
|
-
var _popover__rspack_import_35 = __webpack_require__("
|
|
478
|
+
var _popover__rspack_import_35 = __webpack_require__("@/components/ui/popover");
|
|
479
479
|
var __rspack_reexport = {};
|
|
480
480
|
for(const __rspack_import_key in _popover__rspack_import_35)if ([
|
|
481
481
|
"TreeView",
|
|
@@ -496,7 +496,7 @@ var __webpack_exports__ = {};
|
|
|
496
496
|
"default"
|
|
497
497
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_progress__rspack_import_37[__rspack_import_key];
|
|
498
498
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
499
|
-
var _prompt_editor__rspack_import_38 = __webpack_require__("./prompt-editor");
|
|
499
|
+
var _prompt_editor__rspack_import_38 = __webpack_require__("./prompt-editor?2bb4");
|
|
500
500
|
var __rspack_reexport = {};
|
|
501
501
|
for(const __rspack_import_key in _prompt_editor__rspack_import_38)if ([
|
|
502
502
|
"TreeView",
|
|
@@ -615,7 +615,7 @@ var __webpack_exports__ = {};
|
|
|
615
615
|
"default"
|
|
616
616
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_tabs__rspack_import_54[__rspack_import_key];
|
|
617
617
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
618
|
-
var _textarea__rspack_import_55 = __webpack_require__("
|
|
618
|
+
var _textarea__rspack_import_55 = __webpack_require__("./textarea");
|
|
619
619
|
var __rspack_reexport = {};
|
|
620
620
|
for(const __rspack_import_key in _textarea__rspack_import_55)if ([
|
|
621
621
|
"TreeView",
|
|
@@ -30,16 +30,18 @@ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
|
30
30
|
const external_lucide_react_namespaceObject = require("lucide-react");
|
|
31
31
|
const external_tooltip_cjs_namespaceObject = require("../../tooltip.cjs");
|
|
32
32
|
const index_cjs_namespaceObject = require("../../../../lib/index.cjs");
|
|
33
|
-
const
|
|
33
|
+
const external_prompt_editor_config_cjs_namespaceObject = require("../prompt-editor-config.cjs");
|
|
34
|
+
const ToolbarButton = ({ icon: Icon, label, disabled, onClick, pressed })=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_tooltip_cjs_namespaceObject.Tooltip, {
|
|
34
35
|
children: [
|
|
35
36
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_tooltip_cjs_namespaceObject.TooltipTrigger, {
|
|
36
37
|
asChild: true,
|
|
37
38
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
|
|
38
39
|
type: "button",
|
|
39
40
|
"aria-label": label,
|
|
41
|
+
"aria-pressed": pressed,
|
|
40
42
|
disabled: disabled,
|
|
41
43
|
onClick: onClick,
|
|
42
|
-
className: (0, index_cjs_namespaceObject.cn)('inline-flex h-7 w-7 items-center justify-center rounded text-muted-foreground', 'hover:bg-accent hover:text-accent-foreground', 'disabled:opacity-50 disabled:pointer-events-none'),
|
|
44
|
+
className: (0, index_cjs_namespaceObject.cn)('inline-flex h-7 w-7 cursor-pointer items-center justify-center rounded text-muted-foreground', 'hover:bg-accent hover:text-accent-foreground', 'disabled:opacity-50 disabled:pointer-events-none', pressed && 'bg-accent text-accent-foreground'),
|
|
43
45
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Icon, {
|
|
44
46
|
className: "h-3.5 w-3.5"
|
|
45
47
|
})
|
|
@@ -58,14 +60,65 @@ const ToolbarSeparator = ()=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
|
58
60
|
"aria-hidden": true,
|
|
59
61
|
className: "mx-1 h-4 w-px bg-border/60"
|
|
60
62
|
});
|
|
61
|
-
const EditorToolbar = ({ mode, onModeChange, disabled, error, actionsRef, onFullscreen })=>{
|
|
62
|
-
const isEditMode = 'edit' === mode;
|
|
63
|
+
const EditorToolbar = ({ mode, onModeChange, disabled, error, actionsRef, onFullscreen, showModeToggle = true, trailing, strings = external_prompt_editor_config_cjs_namespaceObject.DEFAULT_PROMPT_EDITOR_STRINGS, activeFormats })=>{
|
|
64
|
+
const isEditMode = !showModeToggle || 'edit' === mode;
|
|
63
65
|
const handleFormat = (actionName)=>()=>{
|
|
64
66
|
if (!disabled && isEditMode) {
|
|
65
67
|
const fn = actionsRef?.current?.[actionName];
|
|
66
68
|
if ('function' == typeof fn) fn();
|
|
67
69
|
}
|
|
68
70
|
};
|
|
71
|
+
const formattingCluster = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
|
|
72
|
+
children: [
|
|
73
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ToolbarButton, {
|
|
74
|
+
icon: external_lucide_react_namespaceObject.Bold,
|
|
75
|
+
pressed: activeFormats?.bold,
|
|
76
|
+
label: strings.bold,
|
|
77
|
+
disabled: disabled || !isEditMode,
|
|
78
|
+
onClick: handleFormat('formatBold')
|
|
79
|
+
}),
|
|
80
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ToolbarButton, {
|
|
81
|
+
icon: external_lucide_react_namespaceObject.Italic,
|
|
82
|
+
pressed: activeFormats?.italic,
|
|
83
|
+
label: strings.italic,
|
|
84
|
+
disabled: disabled || !isEditMode,
|
|
85
|
+
onClick: handleFormat('formatItalic')
|
|
86
|
+
}),
|
|
87
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ToolbarButton, {
|
|
88
|
+
icon: external_lucide_react_namespaceObject.Strikethrough,
|
|
89
|
+
pressed: activeFormats?.strikethrough,
|
|
90
|
+
label: strings.strikethrough,
|
|
91
|
+
disabled: disabled || !isEditMode,
|
|
92
|
+
onClick: handleFormat('formatStrikethrough')
|
|
93
|
+
}),
|
|
94
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ToolbarSeparator, {}),
|
|
95
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ToolbarButton, {
|
|
96
|
+
icon: external_lucide_react_namespaceObject.ListOrdered,
|
|
97
|
+
pressed: activeFormats?.orderedList,
|
|
98
|
+
label: strings.numberedList,
|
|
99
|
+
disabled: disabled || !isEditMode,
|
|
100
|
+
onClick: handleFormat('formatNumberedList')
|
|
101
|
+
}),
|
|
102
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ToolbarButton, {
|
|
103
|
+
icon: external_lucide_react_namespaceObject.List,
|
|
104
|
+
pressed: activeFormats?.bulletedList,
|
|
105
|
+
label: strings.bulletedList,
|
|
106
|
+
disabled: disabled || !isEditMode,
|
|
107
|
+
onClick: handleFormat('formatBulletedList')
|
|
108
|
+
}),
|
|
109
|
+
onFullscreen && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
|
|
110
|
+
children: [
|
|
111
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ToolbarSeparator, {}),
|
|
112
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ToolbarButton, {
|
|
113
|
+
icon: external_lucide_react_namespaceObject.Maximize2,
|
|
114
|
+
label: strings.expand,
|
|
115
|
+
disabled: disabled,
|
|
116
|
+
onClick: onFullscreen
|
|
117
|
+
})
|
|
118
|
+
]
|
|
119
|
+
})
|
|
120
|
+
]
|
|
121
|
+
});
|
|
69
122
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
70
123
|
className: (0, index_cjs_namespaceObject.cn)('relative flex items-center justify-between gap-1 overflow-hidden rounded-t-md border border-b-0 bg-background px-2 py-1 future:rounded-t-xl future:border-0 future:bg-surface-overlay', error && 'border-error ring-1 ring-error/20 future:ring-error/40'),
|
|
71
124
|
"data-testid": "editor-toolbar",
|
|
@@ -75,77 +128,57 @@ const EditorToolbar = ({ mode, onModeChange, disabled, error, actionsRef, onFull
|
|
|
75
128
|
"data-testid": "editor-toolbar-separator",
|
|
76
129
|
className: "pointer-events-none absolute bottom-0 left-0 h-px w-full bg-border/40"
|
|
77
130
|
}),
|
|
78
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.
|
|
79
|
-
className: "flex items-center gap-1 shrink-0",
|
|
80
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("fieldset", {
|
|
81
|
-
"aria-label": "Editor mode",
|
|
82
|
-
className: "m-0 flex items-center rounded-md border-0 bg-muted p-0.5",
|
|
83
|
-
children: [
|
|
84
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
|
|
85
|
-
type: "button",
|
|
86
|
-
"aria-pressed": 'edit' === mode,
|
|
87
|
-
className: (0, index_cjs_namespaceObject.cn)('rounded px-2 py-0.5 text-[11px] font-semibold transition-colors', 'edit' === mode ? 'bg-primary/20 text-primary' : 'text-foreground hover:bg-accent'),
|
|
88
|
-
disabled: disabled,
|
|
89
|
-
onClick: ()=>onModeChange('edit'),
|
|
90
|
-
children: "Edit"
|
|
91
|
-
}),
|
|
92
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
|
|
93
|
-
type: "button",
|
|
94
|
-
"aria-pressed": 'preview' === mode,
|
|
95
|
-
className: (0, index_cjs_namespaceObject.cn)('rounded px-2 py-0.5 text-[11px] font-semibold transition-colors', 'preview' === mode ? 'bg-primary/20 text-primary' : 'text-foreground hover:bg-accent'),
|
|
96
|
-
disabled: disabled,
|
|
97
|
-
onClick: ()=>onModeChange('preview'),
|
|
98
|
-
children: "Preview"
|
|
99
|
-
})
|
|
100
|
-
]
|
|
101
|
-
})
|
|
102
|
-
}),
|
|
103
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
104
|
-
className: "flex items-center gap-0.5 overflow-hidden",
|
|
131
|
+
showModeToggle ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
|
|
105
132
|
children: [
|
|
106
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
}),
|
|
131
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ToolbarButton, {
|
|
132
|
-
icon: external_lucide_react_namespaceObject.List,
|
|
133
|
-
label: "Bulleted List",
|
|
134
|
-
disabled: disabled || !isEditMode,
|
|
135
|
-
onClick: handleFormat('formatBulletedList')
|
|
133
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
134
|
+
className: "flex items-center gap-1 shrink-0",
|
|
135
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("fieldset", {
|
|
136
|
+
"aria-label": strings.editorModeLabel,
|
|
137
|
+
className: "m-0 flex items-center rounded-md border-0 bg-muted p-0.5",
|
|
138
|
+
children: [
|
|
139
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
|
|
140
|
+
type: "button",
|
|
141
|
+
"aria-pressed": 'edit' === mode,
|
|
142
|
+
className: (0, index_cjs_namespaceObject.cn)('cursor-pointer rounded px-2 py-0.5 text-[11px] font-semibold transition-colors', 'edit' === mode ? 'bg-primary/20 text-primary' : 'text-foreground hover:bg-accent'),
|
|
143
|
+
disabled: disabled,
|
|
144
|
+
onClick: ()=>onModeChange('edit'),
|
|
145
|
+
children: strings.edit
|
|
146
|
+
}),
|
|
147
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
|
|
148
|
+
type: "button",
|
|
149
|
+
"aria-pressed": 'preview' === mode,
|
|
150
|
+
className: (0, index_cjs_namespaceObject.cn)('cursor-pointer rounded px-2 py-0.5 text-[11px] font-semibold transition-colors', 'preview' === mode ? 'bg-primary/20 text-primary' : 'text-foreground hover:bg-accent'),
|
|
151
|
+
disabled: disabled,
|
|
152
|
+
onClick: ()=>onModeChange('preview'),
|
|
153
|
+
children: strings.preview
|
|
154
|
+
})
|
|
155
|
+
]
|
|
156
|
+
})
|
|
136
157
|
}),
|
|
137
|
-
|
|
158
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
159
|
+
className: "flex items-center gap-0.5 overflow-hidden",
|
|
138
160
|
children: [
|
|
139
|
-
|
|
140
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
161
|
+
formattingCluster,
|
|
162
|
+
trailing && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
|
|
163
|
+
children: [
|
|
164
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ToolbarSeparator, {}),
|
|
165
|
+
trailing
|
|
166
|
+
]
|
|
145
167
|
})
|
|
146
168
|
]
|
|
147
169
|
})
|
|
148
170
|
]
|
|
171
|
+
}) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
|
|
172
|
+
children: [
|
|
173
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
174
|
+
className: "flex items-center gap-0.5 overflow-hidden",
|
|
175
|
+
children: formattingCluster
|
|
176
|
+
}),
|
|
177
|
+
trailing && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
178
|
+
className: "flex items-center gap-0.5 shrink-0",
|
|
179
|
+
children: trailing
|
|
180
|
+
})
|
|
181
|
+
]
|
|
149
182
|
})
|
|
150
183
|
]
|
|
151
184
|
});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type PromptEditorStrings } from '../prompt-editor-config';
|
|
2
|
+
import type { PromptEditorMode, PromptEditorToolbarActionsRef, PromptEditorToolbarActiveFormats } from '../types';
|
|
2
3
|
export interface EditorToolbarProps {
|
|
3
4
|
mode: PromptEditorMode;
|
|
4
5
|
onModeChange: (mode: PromptEditorMode) => void;
|
|
@@ -6,5 +7,18 @@ export interface EditorToolbarProps {
|
|
|
6
7
|
error?: boolean;
|
|
7
8
|
actionsRef?: React.RefObject<PromptEditorToolbarActionsRef | null>;
|
|
8
9
|
onFullscreen?: () => void;
|
|
10
|
+
/**
|
|
11
|
+
* Whether the Edit/Preview switcher renders. When hidden, the formatting cluster moves to the
|
|
12
|
+
* left edge (there is no preview mode to guard, so buttons follow `disabled` alone) and
|
|
13
|
+
* `trailing` right-aligns — the layout used by value-mode fields whose mode menu lives in
|
|
14
|
+
* `trailing`. Defaults to true.
|
|
15
|
+
*/
|
|
16
|
+
showModeToggle?: boolean;
|
|
17
|
+
/** Consumer-supplied node rendered at the toolbar's right end (e.g. a value-mode menu). */
|
|
18
|
+
trailing?: React.ReactNode;
|
|
19
|
+
/** Overridable labels; every key defaults to the built-in English. */
|
|
20
|
+
strings?: PromptEditorStrings;
|
|
21
|
+
/** Rich mode: which formats the selection carries — drives `aria-pressed` on the buttons. */
|
|
22
|
+
activeFormats?: PromptEditorToolbarActiveFormats;
|
|
9
23
|
}
|
|
10
|
-
export declare const EditorToolbar: ({ mode, onModeChange, disabled, error, actionsRef, onFullscreen, }: EditorToolbarProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare const EditorToolbar: ({ mode, onModeChange, disabled, error, actionsRef, onFullscreen, showModeToggle, trailing, strings, activeFormats, }: EditorToolbarProps) => import("react/jsx-runtime").JSX.Element;
|