@uipath/apollo-wind 2.50.0 → 2.52.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/forms/field-renderer.cjs +80 -6
- package/dist/components/forms/field-renderer.js +80 -6
- package/dist/components/forms/form-designer.cjs +10 -10
- package/dist/components/forms/form-designer.js +10 -10
- package/dist/components/forms/form-schema.d.ts +38 -2
- package/dist/components/forms/index.cjs +15 -5
- package/dist/components/forms/index.d.ts +7 -6
- package/dist/components/forms/index.js +6 -5
- package/dist/components/forms/metadata-form.cjs +97 -37
- package/dist/components/forms/metadata-form.d.ts +11 -3
- package/dist/components/forms/metadata-form.js +94 -37
- package/dist/components/forms/rules-engine.cjs +14 -3
- package/dist/components/forms/rules-engine.d.ts +16 -0
- package/dist/components/forms/rules-engine.js +14 -3
- package/dist/components/forms/schema-serializer.cjs +10 -0
- package/dist/components/forms/schema-serializer.js +10 -0
- package/dist/components/forms/string-list-field.cjs +154 -0
- package/dist/components/forms/string-list-field.d.ts +29 -0
- package/dist/components/forms/string-list-field.js +117 -0
- package/dist/components/forms/validation-converter.cjs +68 -23
- package/dist/components/forms/validation-converter.d.ts +23 -2
- package/dist/components/forms/validation-converter.js +64 -22
- package/dist/components/ui/datetime-picker.cjs +3 -1
- package/dist/components/ui/datetime-picker.d.ts +4 -0
- package/dist/components/ui/datetime-picker.js +3 -1
- package/dist/components/ui/form-field.cjs +17 -2
- package/dist/components/ui/form-field.d.ts +7 -0
- package/dist/components/ui/form-field.js +17 -2
- package/dist/components/ui/index.cjs +124 -114
- package/dist/components/ui/index.d.ts +3 -2
- package/dist/components/ui/index.js +2 -1
- package/dist/components/ui/info-tooltip.cjs +61 -0
- package/dist/components/ui/info-tooltip.d.ts +10 -0
- package/dist/components/ui/info-tooltip.js +27 -0
- package/dist/components/ui/prompt-editor/components/EditorToolbar.cjs +18 -2
- package/dist/components/ui/prompt-editor/components/EditorToolbar.d.ts +3 -1
- package/dist/components/ui/prompt-editor/components/EditorToolbar.js +19 -3
- package/dist/components/ui/prompt-editor/components/MarkdownPreview.cjs +4 -2
- package/dist/components/ui/prompt-editor/components/MarkdownPreview.js +4 -2
- package/dist/components/ui/prompt-editor/plugins/ToolbarActionsPlugin.cjs +14 -4
- package/dist/components/ui/prompt-editor/plugins/ToolbarActionsPlugin.js +14 -4
- package/dist/components/ui/prompt-editor/prompt-editor-config.cjs +2 -0
- package/dist/components/ui/prompt-editor/prompt-editor-config.d.ts +2 -0
- package/dist/components/ui/prompt-editor/prompt-editor-config.js +2 -0
- package/dist/components/ui/prompt-editor/prompt-editor.cjs +10 -1
- package/dist/components/ui/prompt-editor/prompt-editor.js +10 -1
- package/dist/components/ui/prompt-editor/types.d.ts +7 -1
- package/dist/components/ui/prompt-editor/utils/rich-serialization.cjs +48 -1
- package/dist/components/ui/prompt-editor/utils/rich-serialization.d.ts +0 -14
- package/dist/components/ui/prompt-editor/utils/rich-serialization.js +50 -3
- package/dist/components/ui/select.cjs +1 -1
- package/dist/components/ui/select.js +1 -1
- package/dist/components/ui/textarea.cjs +1 -1
- package/dist/components/ui/textarea.js +1 -1
- package/dist/index.cjs +14 -0
- package/dist/index.d.ts +7 -2
- package/dist/index.js +4 -2
- package/dist/styles.css +13 -0
- package/package.json +2 -2
|
@@ -60,8 +60,9 @@ const ToolbarSeparator = ()=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
|
60
60
|
"aria-hidden": true,
|
|
61
61
|
className: "mx-1 h-4 w-px bg-border/60"
|
|
62
62
|
});
|
|
63
|
-
const EditorToolbar = ({ mode, onModeChange, disabled, error, actionsRef, onFullscreen, showModeToggle = true, trailing, strings = external_prompt_editor_config_cjs_namespaceObject.DEFAULT_PROMPT_EDITOR_STRINGS, activeFormats })=>{
|
|
63
|
+
const EditorToolbar = ({ mode, onModeChange, disabled, error, actionsRef, onFullscreen, showModeToggle = true, trailing, strings = external_prompt_editor_config_cjs_namespaceObject.DEFAULT_PROMPT_EDITOR_STRINGS, activeFormats, richText })=>{
|
|
64
64
|
const isEditMode = !showModeToggle || 'edit' === mode;
|
|
65
|
+
const trailingNeedsSeparator = showModeToggle || Boolean(onFullscreen);
|
|
65
66
|
const handleFormat = (actionName)=>()=>{
|
|
66
67
|
if (!disabled && isEditMode) {
|
|
67
68
|
const fn = actionsRef?.current?.[actionName];
|
|
@@ -84,6 +85,13 @@ const EditorToolbar = ({ mode, onModeChange, disabled, error, actionsRef, onFull
|
|
|
84
85
|
disabled: disabled || !isEditMode,
|
|
85
86
|
onClick: handleFormat('formatItalic')
|
|
86
87
|
}),
|
|
88
|
+
richText && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ToolbarButton, {
|
|
89
|
+
icon: external_lucide_react_namespaceObject.Underline,
|
|
90
|
+
pressed: activeFormats?.underline,
|
|
91
|
+
label: strings.underline,
|
|
92
|
+
disabled: disabled || !isEditMode,
|
|
93
|
+
onClick: handleFormat('formatUnderline')
|
|
94
|
+
}),
|
|
87
95
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ToolbarButton, {
|
|
88
96
|
icon: external_lucide_react_namespaceObject.Strikethrough,
|
|
89
97
|
pressed: activeFormats?.strikethrough,
|
|
@@ -105,6 +113,14 @@ const EditorToolbar = ({ mode, onModeChange, disabled, error, actionsRef, onFull
|
|
|
105
113
|
label: strings.bulletedList,
|
|
106
114
|
disabled: disabled || !isEditMode,
|
|
107
115
|
onClick: handleFormat('formatBulletedList')
|
|
116
|
+
}),
|
|
117
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ToolbarSeparator, {}),
|
|
118
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ToolbarButton, {
|
|
119
|
+
icon: external_lucide_react_namespaceObject.Code,
|
|
120
|
+
pressed: activeFormats?.code,
|
|
121
|
+
label: strings.code,
|
|
122
|
+
disabled: disabled || !isEditMode,
|
|
123
|
+
onClick: handleFormat('formatCode')
|
|
108
124
|
})
|
|
109
125
|
]
|
|
110
126
|
});
|
|
@@ -139,7 +155,7 @@ const EditorToolbar = ({ mode, onModeChange, disabled, error, actionsRef, onFull
|
|
|
139
155
|
}),
|
|
140
156
|
trailing && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
|
|
141
157
|
children: [
|
|
142
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ToolbarSeparator, {}),
|
|
158
|
+
trailingNeedsSeparator && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ToolbarSeparator, {}),
|
|
143
159
|
trailing
|
|
144
160
|
]
|
|
145
161
|
})
|
|
@@ -18,5 +18,7 @@ export interface EditorToolbarProps {
|
|
|
18
18
|
strings?: PromptEditorStrings;
|
|
19
19
|
/** Rich mode: which formats the selection carries — drives `aria-pressed` on the buttons. */
|
|
20
20
|
activeFormats?: PromptEditorToolbarActiveFormats;
|
|
21
|
+
/** WYSIWYG mode. Gates Underline, which markdown has no marker for. */
|
|
22
|
+
richText?: boolean;
|
|
21
23
|
}
|
|
22
|
-
export declare const EditorToolbar: ({ mode, onModeChange, disabled, error, actionsRef, onFullscreen, showModeToggle, trailing, strings, activeFormats, }: EditorToolbarProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare const EditorToolbar: ({ mode, onModeChange, disabled, error, actionsRef, onFullscreen, showModeToggle, trailing, strings, activeFormats, richText, }: EditorToolbarProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Bold, Italic, List, ListOrdered, Maximize2, Strikethrough } from "lucide-react";
|
|
2
|
+
import { Bold, Code, Italic, List, ListOrdered, Maximize2, Strikethrough, Underline } from "lucide-react";
|
|
3
3
|
import { Tooltip, TooltipContent, TooltipTrigger } from "../../tooltip.js";
|
|
4
4
|
import { cn } from "../../../../lib/index.js";
|
|
5
5
|
import { DEFAULT_PROMPT_EDITOR_STRINGS } from "../prompt-editor-config.js";
|
|
@@ -32,8 +32,9 @@ const ToolbarSeparator = ()=>/*#__PURE__*/ jsx("span", {
|
|
|
32
32
|
"aria-hidden": true,
|
|
33
33
|
className: "mx-1 h-4 w-px bg-border/60"
|
|
34
34
|
});
|
|
35
|
-
const EditorToolbar = ({ mode, onModeChange, disabled, error, actionsRef, onFullscreen, showModeToggle = true, trailing, strings = DEFAULT_PROMPT_EDITOR_STRINGS, activeFormats })=>{
|
|
35
|
+
const EditorToolbar = ({ mode, onModeChange, disabled, error, actionsRef, onFullscreen, showModeToggle = true, trailing, strings = DEFAULT_PROMPT_EDITOR_STRINGS, activeFormats, richText })=>{
|
|
36
36
|
const isEditMode = !showModeToggle || 'edit' === mode;
|
|
37
|
+
const trailingNeedsSeparator = showModeToggle || Boolean(onFullscreen);
|
|
37
38
|
const handleFormat = (actionName)=>()=>{
|
|
38
39
|
if (!disabled && isEditMode) {
|
|
39
40
|
const fn = actionsRef?.current?.[actionName];
|
|
@@ -56,6 +57,13 @@ const EditorToolbar = ({ mode, onModeChange, disabled, error, actionsRef, onFull
|
|
|
56
57
|
disabled: disabled || !isEditMode,
|
|
57
58
|
onClick: handleFormat('formatItalic')
|
|
58
59
|
}),
|
|
60
|
+
richText && /*#__PURE__*/ jsx(ToolbarButton, {
|
|
61
|
+
icon: Underline,
|
|
62
|
+
pressed: activeFormats?.underline,
|
|
63
|
+
label: strings.underline,
|
|
64
|
+
disabled: disabled || !isEditMode,
|
|
65
|
+
onClick: handleFormat('formatUnderline')
|
|
66
|
+
}),
|
|
59
67
|
/*#__PURE__*/ jsx(ToolbarButton, {
|
|
60
68
|
icon: Strikethrough,
|
|
61
69
|
pressed: activeFormats?.strikethrough,
|
|
@@ -77,6 +85,14 @@ const EditorToolbar = ({ mode, onModeChange, disabled, error, actionsRef, onFull
|
|
|
77
85
|
label: strings.bulletedList,
|
|
78
86
|
disabled: disabled || !isEditMode,
|
|
79
87
|
onClick: handleFormat('formatBulletedList')
|
|
88
|
+
}),
|
|
89
|
+
/*#__PURE__*/ jsx(ToolbarSeparator, {}),
|
|
90
|
+
/*#__PURE__*/ jsx(ToolbarButton, {
|
|
91
|
+
icon: Code,
|
|
92
|
+
pressed: activeFormats?.code,
|
|
93
|
+
label: strings.code,
|
|
94
|
+
disabled: disabled || !isEditMode,
|
|
95
|
+
onClick: handleFormat('formatCode')
|
|
80
96
|
})
|
|
81
97
|
]
|
|
82
98
|
});
|
|
@@ -111,7 +127,7 @@ const EditorToolbar = ({ mode, onModeChange, disabled, error, actionsRef, onFull
|
|
|
111
127
|
}),
|
|
112
128
|
trailing && /*#__PURE__*/ jsxs(Fragment, {
|
|
113
129
|
children: [
|
|
114
|
-
/*#__PURE__*/ jsx(ToolbarSeparator, {}),
|
|
130
|
+
trailingNeedsSeparator && /*#__PURE__*/ jsx(ToolbarSeparator, {}),
|
|
115
131
|
trailing
|
|
116
132
|
]
|
|
117
133
|
})
|
|
@@ -55,8 +55,10 @@ const MARKDOWN_PREVIEW_STYLES = `
|
|
|
55
55
|
.prompt-editor-preview h3 { font-size: 1.1em; font-weight: 600; margin: 0.4em 0 0.2em; line-height: 1.3; }
|
|
56
56
|
.prompt-editor-preview h4, .prompt-editor-preview h5, .prompt-editor-preview h6 { font-size: 1em; font-weight: 600; margin: 0.4em 0 0.2em; line-height: 1.3; }
|
|
57
57
|
.prompt-editor-preview p { margin: 0.25em 0; }
|
|
58
|
-
.prompt-editor-preview
|
|
59
|
-
|
|
58
|
+
.prompt-editor-preview u { text-decoration: underline; }
|
|
59
|
+
/* Chip token, not --color-muted -- see the matching note in prompt-editor.tsx. */
|
|
60
|
+
.prompt-editor-preview code { font-family: 'Fira Code', 'Consolas', monospace; font-size: 0.875em; padding: 0.15em 0.4em; border-radius: 4px; background-color: var(--color-chip-default-background); color: var(--color-foreground); }
|
|
61
|
+
.prompt-editor-preview pre { margin: 0.5em 0; padding: 0.75em 1em; border-radius: 6px; overflow-x: auto; background-color: var(--color-chip-default-background); color: var(--color-foreground); }
|
|
60
62
|
.prompt-editor-preview pre code { padding: 0; background: none; font-size: 0.85em; }
|
|
61
63
|
.prompt-editor-preview blockquote { margin: 0.5em 0; padding: 0.25em 0.75em; border-left: 3px solid var(--color-border); color: var(--color-muted-foreground); }
|
|
62
64
|
.prompt-editor-preview ul, .prompt-editor-preview ol { margin: 0.25em 0; padding-left: 1.5em; }
|
|
@@ -17,8 +17,10 @@ const MARKDOWN_PREVIEW_STYLES = `
|
|
|
17
17
|
.prompt-editor-preview h3 { font-size: 1.1em; font-weight: 600; margin: 0.4em 0 0.2em; line-height: 1.3; }
|
|
18
18
|
.prompt-editor-preview h4, .prompt-editor-preview h5, .prompt-editor-preview h6 { font-size: 1em; font-weight: 600; margin: 0.4em 0 0.2em; line-height: 1.3; }
|
|
19
19
|
.prompt-editor-preview p { margin: 0.25em 0; }
|
|
20
|
-
.prompt-editor-preview
|
|
21
|
-
|
|
20
|
+
.prompt-editor-preview u { text-decoration: underline; }
|
|
21
|
+
/* Chip token, not --color-muted -- see the matching note in prompt-editor.tsx. */
|
|
22
|
+
.prompt-editor-preview code { font-family: 'Fira Code', 'Consolas', monospace; font-size: 0.875em; padding: 0.15em 0.4em; border-radius: 4px; background-color: var(--color-chip-default-background); color: var(--color-foreground); }
|
|
23
|
+
.prompt-editor-preview pre { margin: 0.5em 0; padding: 0.75em 1em; border-radius: 6px; overflow-x: auto; background-color: var(--color-chip-default-background); color: var(--color-foreground); }
|
|
22
24
|
.prompt-editor-preview pre code { padding: 0; background: none; font-size: 0.85em; }
|
|
23
25
|
.prompt-editor-preview blockquote { margin: 0.5em 0; padding: 0.25em 0.75em; border-left: 3px solid var(--color-border); color: var(--color-muted-foreground); }
|
|
24
26
|
.prompt-editor-preview ul, .prompt-editor-preview ol { margin: 0.25em 0; padding-left: 1.5em; }
|
|
@@ -34,9 +34,11 @@ const external_react_namespaceObject = require("react");
|
|
|
34
34
|
const EMPTY_ACTIVE_FORMATS = {
|
|
35
35
|
bold: false,
|
|
36
36
|
italic: false,
|
|
37
|
+
underline: false,
|
|
37
38
|
strikethrough: false,
|
|
38
39
|
orderedList: false,
|
|
39
|
-
bulletedList: false
|
|
40
|
+
bulletedList: false,
|
|
41
|
+
code: false
|
|
40
42
|
};
|
|
41
43
|
const $readActiveFormats = ()=>{
|
|
42
44
|
const selection = (0, external_lexical_namespaceObject.$getSelection)();
|
|
@@ -46,12 +48,14 @@ const $readActiveFormats = ()=>{
|
|
|
46
48
|
return {
|
|
47
49
|
bold: selection.hasFormat('bold'),
|
|
48
50
|
italic: selection.hasFormat('italic'),
|
|
51
|
+
underline: selection.hasFormat('underline'),
|
|
49
52
|
strikethrough: selection.hasFormat('strikethrough'),
|
|
50
53
|
orderedList: 'number' === listType,
|
|
51
|
-
bulletedList: 'bullet' === listType
|
|
54
|
+
bulletedList: 'bullet' === listType,
|
|
55
|
+
code: selection.hasFormat('code')
|
|
52
56
|
};
|
|
53
57
|
};
|
|
54
|
-
const activeFormatsEqual = (a, b)=>a.bold === b.bold && a.italic === b.italic && a.strikethrough === b.strikethrough && a.orderedList === b.orderedList && a.bulletedList === b.bulletedList;
|
|
58
|
+
const activeFormatsEqual = (a, b)=>a.bold === b.bold && a.italic === b.italic && a.underline === b.underline && a.strikethrough === b.strikethrough && a.orderedList === b.orderedList && a.bulletedList === b.bulletedList && a.code === b.code;
|
|
55
59
|
const wrapSelectionWithMarkers = (startMarker, endMarker)=>{
|
|
56
60
|
const selection = (0, external_lexical_namespaceObject.$getSelection)();
|
|
57
61
|
if (!(0, external_lexical_namespaceObject.$isRangeSelection)(selection)) return;
|
|
@@ -133,9 +137,11 @@ const ToolbarActionsPlugin = ({ actionsRef, richText, onActiveFormatsChange })=>
|
|
|
133
137
|
actionsRef.current = {
|
|
134
138
|
formatBold: ()=>editor.dispatchCommand(external_lexical_namespaceObject.FORMAT_TEXT_COMMAND, 'bold'),
|
|
135
139
|
formatItalic: ()=>editor.dispatchCommand(external_lexical_namespaceObject.FORMAT_TEXT_COMMAND, 'italic'),
|
|
140
|
+
formatUnderline: ()=>editor.dispatchCommand(external_lexical_namespaceObject.FORMAT_TEXT_COMMAND, 'underline'),
|
|
136
141
|
formatStrikethrough: ()=>editor.dispatchCommand(external_lexical_namespaceObject.FORMAT_TEXT_COMMAND, 'strikethrough'),
|
|
137
142
|
formatNumberedList: ()=>toggleList('number'),
|
|
138
|
-
formatBulletedList: ()=>toggleList('bullet')
|
|
143
|
+
formatBulletedList: ()=>toggleList('bullet'),
|
|
144
|
+
formatCode: ()=>editor.dispatchCommand(external_lexical_namespaceObject.FORMAT_TEXT_COMMAND, 'code')
|
|
139
145
|
};
|
|
140
146
|
} else actionsRef.current = {
|
|
141
147
|
formatBold: ()=>{
|
|
@@ -144,6 +150,7 @@ const ToolbarActionsPlugin = ({ actionsRef, richText, onActiveFormatsChange })=>
|
|
|
144
150
|
formatItalic: ()=>{
|
|
145
151
|
editor.update(()=>wrapSelectionWithMarkers('*', '*'));
|
|
146
152
|
},
|
|
153
|
+
formatUnderline: ()=>{},
|
|
147
154
|
formatStrikethrough: ()=>{
|
|
148
155
|
editor.update(()=>wrapSelectionWithMarkers('~~', '~~'));
|
|
149
156
|
},
|
|
@@ -152,6 +159,9 @@ const ToolbarActionsPlugin = ({ actionsRef, richText, onActiveFormatsChange })=>
|
|
|
152
159
|
},
|
|
153
160
|
formatBulletedList: ()=>{
|
|
154
161
|
editor.update(()=>insertLinePrefixForSelection(()=>'- '));
|
|
162
|
+
},
|
|
163
|
+
formatCode: ()=>{
|
|
164
|
+
editor.update(()=>wrapSelectionWithMarkers('`', '`'));
|
|
155
165
|
}
|
|
156
166
|
};
|
|
157
167
|
return ()=>{
|
|
@@ -6,9 +6,11 @@ import { useEffect } from "react";
|
|
|
6
6
|
const EMPTY_ACTIVE_FORMATS = {
|
|
7
7
|
bold: false,
|
|
8
8
|
italic: false,
|
|
9
|
+
underline: false,
|
|
9
10
|
strikethrough: false,
|
|
10
11
|
orderedList: false,
|
|
11
|
-
bulletedList: false
|
|
12
|
+
bulletedList: false,
|
|
13
|
+
code: false
|
|
12
14
|
};
|
|
13
15
|
const $readActiveFormats = ()=>{
|
|
14
16
|
const selection = $getSelection();
|
|
@@ -18,12 +20,14 @@ const $readActiveFormats = ()=>{
|
|
|
18
20
|
return {
|
|
19
21
|
bold: selection.hasFormat('bold'),
|
|
20
22
|
italic: selection.hasFormat('italic'),
|
|
23
|
+
underline: selection.hasFormat('underline'),
|
|
21
24
|
strikethrough: selection.hasFormat('strikethrough'),
|
|
22
25
|
orderedList: 'number' === listType,
|
|
23
|
-
bulletedList: 'bullet' === listType
|
|
26
|
+
bulletedList: 'bullet' === listType,
|
|
27
|
+
code: selection.hasFormat('code')
|
|
24
28
|
};
|
|
25
29
|
};
|
|
26
|
-
const activeFormatsEqual = (a, b)=>a.bold === b.bold && a.italic === b.italic && a.strikethrough === b.strikethrough && a.orderedList === b.orderedList && a.bulletedList === b.bulletedList;
|
|
30
|
+
const activeFormatsEqual = (a, b)=>a.bold === b.bold && a.italic === b.italic && a.underline === b.underline && a.strikethrough === b.strikethrough && a.orderedList === b.orderedList && a.bulletedList === b.bulletedList && a.code === b.code;
|
|
27
31
|
const wrapSelectionWithMarkers = (startMarker, endMarker)=>{
|
|
28
32
|
const selection = $getSelection();
|
|
29
33
|
if (!$isRangeSelection(selection)) return;
|
|
@@ -105,9 +109,11 @@ const ToolbarActionsPlugin = ({ actionsRef, richText, onActiveFormatsChange })=>
|
|
|
105
109
|
actionsRef.current = {
|
|
106
110
|
formatBold: ()=>editor.dispatchCommand(FORMAT_TEXT_COMMAND, 'bold'),
|
|
107
111
|
formatItalic: ()=>editor.dispatchCommand(FORMAT_TEXT_COMMAND, 'italic'),
|
|
112
|
+
formatUnderline: ()=>editor.dispatchCommand(FORMAT_TEXT_COMMAND, 'underline'),
|
|
108
113
|
formatStrikethrough: ()=>editor.dispatchCommand(FORMAT_TEXT_COMMAND, 'strikethrough'),
|
|
109
114
|
formatNumberedList: ()=>toggleList('number'),
|
|
110
|
-
formatBulletedList: ()=>toggleList('bullet')
|
|
115
|
+
formatBulletedList: ()=>toggleList('bullet'),
|
|
116
|
+
formatCode: ()=>editor.dispatchCommand(FORMAT_TEXT_COMMAND, 'code')
|
|
111
117
|
};
|
|
112
118
|
} else actionsRef.current = {
|
|
113
119
|
formatBold: ()=>{
|
|
@@ -116,6 +122,7 @@ const ToolbarActionsPlugin = ({ actionsRef, richText, onActiveFormatsChange })=>
|
|
|
116
122
|
formatItalic: ()=>{
|
|
117
123
|
editor.update(()=>wrapSelectionWithMarkers('*', '*'));
|
|
118
124
|
},
|
|
125
|
+
formatUnderline: ()=>{},
|
|
119
126
|
formatStrikethrough: ()=>{
|
|
120
127
|
editor.update(()=>wrapSelectionWithMarkers('~~', '~~'));
|
|
121
128
|
},
|
|
@@ -124,6 +131,9 @@ const ToolbarActionsPlugin = ({ actionsRef, richText, onActiveFormatsChange })=>
|
|
|
124
131
|
},
|
|
125
132
|
formatBulletedList: ()=>{
|
|
126
133
|
editor.update(()=>insertLinePrefixForSelection(()=>'- '));
|
|
134
|
+
},
|
|
135
|
+
formatCode: ()=>{
|
|
136
|
+
editor.update(()=>wrapSelectionWithMarkers('`', '`'));
|
|
127
137
|
}
|
|
128
138
|
};
|
|
129
139
|
return ()=>{
|
|
@@ -34,9 +34,11 @@ const DEFAULT_PROMPT_EDITOR_STRINGS = {
|
|
|
34
34
|
preview: 'Preview',
|
|
35
35
|
bold: 'Bold',
|
|
36
36
|
italic: 'Italic',
|
|
37
|
+
underline: 'Underline',
|
|
37
38
|
strikethrough: 'Strikethrough',
|
|
38
39
|
numberedList: 'Numbered List',
|
|
39
40
|
bulletedList: 'Bulleted List',
|
|
41
|
+
code: 'Code',
|
|
40
42
|
expand: 'Expand',
|
|
41
43
|
searchVariablesPlaceholder: 'Search variables…',
|
|
42
44
|
noVariablesFound: 'No variables found.',
|
|
@@ -30,9 +30,11 @@ export interface PromptEditorStrings {
|
|
|
30
30
|
/** Formatting toolbar buttons */
|
|
31
31
|
bold: string;
|
|
32
32
|
italic: string;
|
|
33
|
+
underline: string;
|
|
33
34
|
strikethrough: string;
|
|
34
35
|
numberedList: string;
|
|
35
36
|
bulletedList: string;
|
|
37
|
+
code: string;
|
|
36
38
|
expand: string;
|
|
37
39
|
/** `$`-trigger autocomplete menu */
|
|
38
40
|
searchVariablesPlaceholder: string;
|
|
@@ -4,9 +4,11 @@ const DEFAULT_PROMPT_EDITOR_STRINGS = {
|
|
|
4
4
|
preview: 'Preview',
|
|
5
5
|
bold: 'Bold',
|
|
6
6
|
italic: 'Italic',
|
|
7
|
+
underline: 'Underline',
|
|
7
8
|
strikethrough: 'Strikethrough',
|
|
8
9
|
numberedList: 'Numbered List',
|
|
9
10
|
bulletedList: 'Bulleted List',
|
|
11
|
+
code: 'Code',
|
|
10
12
|
expand: 'Expand',
|
|
11
13
|
searchVariablesPlaceholder: 'Search variables…',
|
|
12
14
|
noVariablesFound: 'No variables found.',
|
|
@@ -228,7 +228,12 @@ const EditorInner = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)
|
|
|
228
228
|
/* Rich-mode formatting — metrics mirror MarkdownPreview so editing matches rendering. */
|
|
229
229
|
.prompt-editor-text-bold { font-weight: 700; }
|
|
230
230
|
.prompt-editor-text-italic { font-style: italic; }
|
|
231
|
+
.prompt-editor-text-underline { text-decoration: underline; }
|
|
231
232
|
.prompt-editor-text-strikethrough { text-decoration: line-through; }
|
|
233
|
+
.prompt-editor-text-underline-strikethrough { text-decoration: underline line-through; }
|
|
234
|
+
/* Chip token, not --color-muted: wind aliases --muted onto --surface-overlay in the
|
|
235
|
+
future themes, i.e. what the shell paints itself with, so a muted chip is invisible. */
|
|
236
|
+
.prompt-editor-text-code { font-family: 'Fira Code', 'Consolas', monospace; font-size: 0.875em; padding: 0.15em 0.4em; border-radius: 4px; background-color: var(--color-chip-default-background); color: var(--color-foreground); }
|
|
232
237
|
.prompt-editor-list-ul, .prompt-editor-list-ol { margin: 0.25em 0; padding-left: 1.5em; }
|
|
233
238
|
.prompt-editor-list-ul { list-style-type: disc; }
|
|
234
239
|
.prompt-editor-list-ol { list-style-type: decimal; }
|
|
@@ -376,7 +381,10 @@ const PromptEditor = ({ value: rawValue, initialValue: rawInitialValue, onChange
|
|
|
376
381
|
text: {
|
|
377
382
|
bold: 'prompt-editor-text-bold',
|
|
378
383
|
italic: 'prompt-editor-text-italic',
|
|
379
|
-
|
|
384
|
+
underline: 'prompt-editor-text-underline',
|
|
385
|
+
strikethrough: 'prompt-editor-text-strikethrough',
|
|
386
|
+
underlineStrikethrough: 'prompt-editor-text-underline-strikethrough',
|
|
387
|
+
code: 'prompt-editor-text-code'
|
|
380
388
|
},
|
|
381
389
|
list: {
|
|
382
390
|
ul: 'prompt-editor-list-ul',
|
|
@@ -461,6 +469,7 @@ const PromptEditor = ({ value: rawValue, initialValue: rawInitialValue, onChange
|
|
|
461
469
|
actionsRef: toolbarActionsRef,
|
|
462
470
|
onModeChange: handleModeChange,
|
|
463
471
|
onFullscreen: onFullscreen,
|
|
472
|
+
richText: richText,
|
|
464
473
|
showModeToggle: showModeToggle && !richText,
|
|
465
474
|
trailing: toolbarTrailing,
|
|
466
475
|
strings: strings,
|
|
@@ -200,7 +200,12 @@ const EditorInner = /*#__PURE__*/ forwardRef(({ initialValue, value, onChange, a
|
|
|
200
200
|
/* Rich-mode formatting — metrics mirror MarkdownPreview so editing matches rendering. */
|
|
201
201
|
.prompt-editor-text-bold { font-weight: 700; }
|
|
202
202
|
.prompt-editor-text-italic { font-style: italic; }
|
|
203
|
+
.prompt-editor-text-underline { text-decoration: underline; }
|
|
203
204
|
.prompt-editor-text-strikethrough { text-decoration: line-through; }
|
|
205
|
+
.prompt-editor-text-underline-strikethrough { text-decoration: underline line-through; }
|
|
206
|
+
/* Chip token, not --color-muted: wind aliases --muted onto --surface-overlay in the
|
|
207
|
+
future themes, i.e. what the shell paints itself with, so a muted chip is invisible. */
|
|
208
|
+
.prompt-editor-text-code { font-family: 'Fira Code', 'Consolas', monospace; font-size: 0.875em; padding: 0.15em 0.4em; border-radius: 4px; background-color: var(--color-chip-default-background); color: var(--color-foreground); }
|
|
204
209
|
.prompt-editor-list-ul, .prompt-editor-list-ol { margin: 0.25em 0; padding-left: 1.5em; }
|
|
205
210
|
.prompt-editor-list-ul { list-style-type: disc; }
|
|
206
211
|
.prompt-editor-list-ol { list-style-type: decimal; }
|
|
@@ -348,7 +353,10 @@ const PromptEditor = ({ value: rawValue, initialValue: rawInitialValue, onChange
|
|
|
348
353
|
text: {
|
|
349
354
|
bold: 'prompt-editor-text-bold',
|
|
350
355
|
italic: 'prompt-editor-text-italic',
|
|
351
|
-
|
|
356
|
+
underline: 'prompt-editor-text-underline',
|
|
357
|
+
strikethrough: 'prompt-editor-text-strikethrough',
|
|
358
|
+
underlineStrikethrough: 'prompt-editor-text-underline-strikethrough',
|
|
359
|
+
code: 'prompt-editor-text-code'
|
|
352
360
|
},
|
|
353
361
|
list: {
|
|
354
362
|
ul: 'prompt-editor-list-ul',
|
|
@@ -433,6 +441,7 @@ const PromptEditor = ({ value: rawValue, initialValue: rawInitialValue, onChange
|
|
|
433
441
|
actionsRef: toolbarActionsRef,
|
|
434
442
|
onModeChange: handleModeChange,
|
|
435
443
|
onFullscreen: onFullscreen,
|
|
444
|
+
richText: richText,
|
|
436
445
|
showModeToggle: showModeToggle && !richText,
|
|
437
446
|
trailing: toolbarTrailing,
|
|
438
447
|
strings: strings,
|
|
@@ -35,18 +35,24 @@ export type PromptEditorMode = 'edit' | 'preview';
|
|
|
35
35
|
export interface PromptEditorToolbarActiveFormats {
|
|
36
36
|
bold: boolean;
|
|
37
37
|
italic: boolean;
|
|
38
|
+
/** Rich mode only — markdown has no underline syntax, so plain mode never offers it. */
|
|
39
|
+
underline: boolean;
|
|
38
40
|
strikethrough: boolean;
|
|
39
41
|
orderedList: boolean;
|
|
40
42
|
bulletedList: boolean;
|
|
43
|
+
code: boolean;
|
|
41
44
|
}
|
|
42
45
|
export interface PromptEditorToolbarActionsRef {
|
|
43
46
|
formatBold: () => void;
|
|
44
47
|
formatItalic: () => void;
|
|
48
|
+
/** Rich mode only; a no-op in plain mode, where the Underline button never renders. */
|
|
49
|
+
formatUnderline: () => void;
|
|
45
50
|
formatStrikethrough: () => void;
|
|
46
51
|
formatNumberedList: () => void;
|
|
47
52
|
formatBulletedList: () => void;
|
|
53
|
+
formatCode: () => void;
|
|
48
54
|
}
|
|
49
|
-
export type PromptEditorToolbarFormatAction = 'bold' | 'bulletedList' | 'italic' | 'numberedList' | 'strikethrough';
|
|
55
|
+
export type PromptEditorToolbarFormatAction = 'bold' | 'bulletedList' | 'code' | 'italic' | 'numberedList' | 'strikethrough' | 'underline';
|
|
50
56
|
export interface PromptEditorTokenColorConfig {
|
|
51
57
|
background: string;
|
|
52
58
|
border: string;
|
|
@@ -37,6 +37,27 @@ const index_cjs_namespaceObject = require("../nodes/index.cjs");
|
|
|
37
37
|
const token_nodes_cjs_namespaceObject = require("../plugins/shared/token-nodes.cjs");
|
|
38
38
|
const external_insert_token_cjs_namespaceObject = require("./insert-token.cjs");
|
|
39
39
|
const external_serialization_cjs_namespaceObject = require("./serialization.cjs");
|
|
40
|
+
const UNDERLINE = {
|
|
41
|
+
dependencies: [],
|
|
42
|
+
importRegExp: /<u>(.*?)<\/u>/,
|
|
43
|
+
regExp: /<u>(.*?)<\/u>$/,
|
|
44
|
+
trigger: '>',
|
|
45
|
+
replace: (node, match)=>{
|
|
46
|
+
const inner = (0, external_lexical_namespaceObject.$createTextNode)(match[1]);
|
|
47
|
+
inner.setFormat(node.getFormat());
|
|
48
|
+
inner.toggleFormat('underline');
|
|
49
|
+
node.replace(inner);
|
|
50
|
+
return inner;
|
|
51
|
+
},
|
|
52
|
+
export: (node, _exportChildren, exportFormat)=>{
|
|
53
|
+
if (!(0, external_lexical_namespaceObject.$isTextNode)(node) || !node.hasFormat('underline')) return null;
|
|
54
|
+
const isUnderlined = (sibling)=>(0, external_lexical_namespaceObject.$isTextNode)(sibling) && sibling.hasFormat('underline');
|
|
55
|
+
const open = isUnderlined(node.getPreviousSibling()) ? '' : '<u>';
|
|
56
|
+
const close = isUnderlined(node.getNextSibling()) ? '' : '</u>';
|
|
57
|
+
return `${open}${exportFormat(node, node.getTextContent())}${close}`;
|
|
58
|
+
},
|
|
59
|
+
type: 'text-match'
|
|
60
|
+
};
|
|
40
61
|
const PROMPT_EDITOR_RICH_TRANSFORMERS = [
|
|
41
62
|
markdown_namespaceObject.ORDERED_LIST,
|
|
42
63
|
markdown_namespaceObject.UNORDERED_LIST,
|
|
@@ -46,7 +67,9 @@ const PROMPT_EDITOR_RICH_TRANSFORMERS = [
|
|
|
46
67
|
markdown_namespaceObject.BOLD_UNDERSCORE,
|
|
47
68
|
markdown_namespaceObject.ITALIC_STAR,
|
|
48
69
|
markdown_namespaceObject.ITALIC_UNDERSCORE,
|
|
49
|
-
markdown_namespaceObject.STRIKETHROUGH
|
|
70
|
+
markdown_namespaceObject.STRIKETHROUGH,
|
|
71
|
+
UNDERLINE,
|
|
72
|
+
markdown_namespaceObject.INLINE_CODE
|
|
50
73
|
];
|
|
51
74
|
const RICH_EDITOR_EXTRA_NODES = [
|
|
52
75
|
list_namespaceObject.ListNode,
|
|
@@ -99,6 +122,29 @@ function createPillExportTransformer(pills) {
|
|
|
99
122
|
};
|
|
100
123
|
}
|
|
101
124
|
const unescapeMarkdownLiterals = (markdown)=>markdown.replace(/\\([*_`~\\])/g, '$1');
|
|
125
|
+
function $rescuePillsFromCodeSpans(pills) {
|
|
126
|
+
for (const node of (0, external_lexical_namespaceObject.$getRoot)().getAllTextNodes()){
|
|
127
|
+
if (!node.hasFormat('code') || !PILL_SENTINEL_IMPORT.test(node.getTextContent())) continue;
|
|
128
|
+
const replacements = node.getTextContent().split(PILL_SENTINEL_SPLIT).filter((part)=>'' !== part).map((part)=>{
|
|
129
|
+
const match = PILL_SENTINEL_IMPORT.exec(part);
|
|
130
|
+
if (match && match[0] === part) {
|
|
131
|
+
const pill = pills[Number(match[1])];
|
|
132
|
+
return pill ? (0, external_insert_token_cjs_namespaceObject.createTokenNodeForOption)(pill) : (0, external_lexical_namespaceObject.$createTextNode)('');
|
|
133
|
+
}
|
|
134
|
+
const text = (0, external_lexical_namespaceObject.$createTextNode)(part);
|
|
135
|
+
text.setFormat(node.getFormat());
|
|
136
|
+
return text;
|
|
137
|
+
});
|
|
138
|
+
if (replacements.length > 0) {
|
|
139
|
+
const [first, ...rest] = replacements;
|
|
140
|
+
node.replace(first);
|
|
141
|
+
rest.reduce((prev, next)=>{
|
|
142
|
+
prev.insertAfter(next);
|
|
143
|
+
return next;
|
|
144
|
+
}, first);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
102
148
|
function $getRichEditorTokensInternal() {
|
|
103
149
|
const pills = [];
|
|
104
150
|
const markdown = (0, markdown_namespaceObject.$convertToMarkdownString)([
|
|
@@ -145,6 +191,7 @@ function $setRichEditorTokensInternal(tokens) {
|
|
|
145
191
|
...PROMPT_EDITOR_RICH_TRANSFORMERS,
|
|
146
192
|
createPillImportTransformer(pills)
|
|
147
193
|
], root, true);
|
|
194
|
+
$rescuePillsFromCodeSpans(pills);
|
|
148
195
|
}
|
|
149
196
|
function normalizeRichTextTokens(tokens) {
|
|
150
197
|
const editor = (0, external_lexical_namespaceObject.createEditor)({
|
|
@@ -1,20 +1,6 @@
|
|
|
1
1
|
import { ListItemNode, ListNode } from '@lexical/list';
|
|
2
2
|
import { type Transformer } from '@lexical/markdown';
|
|
3
3
|
import type { PromptEditorToken } from '../types';
|
|
4
|
-
/**
|
|
5
|
-
* Rich (WYSIWYG) serialization for the prompt editor: the `PromptEditorToken[]` contract is
|
|
6
|
-
* unchanged — text tokens carry markdown — but in rich mode the editor state holds real formatted
|
|
7
|
-
* nodes, converted through `@lexical/markdown` on the way in and out.
|
|
8
|
-
*
|
|
9
|
-
* Two invariants drive everything here:
|
|
10
|
-
*
|
|
11
|
-
* 1. **`\n` is a visible line break** (the plain editor's convention; previews render with
|
|
12
|
-
* `breaks: true`). Both conversions run with `shouldPreserveNewLines: true` so `a\nb` and
|
|
13
|
-
* `a\n\nb` each round-trip byte-identically instead of being rewritten into paragraph spacing.
|
|
14
|
-
* 2. **Unknown markdown stays literal.** The transformer set is exactly the toolbar's feature set
|
|
15
|
-
* (bold/italic/strikethrough + ordered/bulleted lists). Headings, quotes, code, links, tables
|
|
16
|
-
* pass through as plain text, which is the round-trip-safe behavior.
|
|
17
|
-
*/
|
|
18
4
|
/** The toolbar's feature set. Underscore emphasis variants import legacy content; export emits star forms. */
|
|
19
5
|
export declare const PROMPT_EDITOR_RICH_TRANSFORMERS: Transformer[];
|
|
20
6
|
/** Lexical node classes rich mode registers beyond the plain editor's token nodes. */
|
|
@@ -1,10 +1,31 @@
|
|
|
1
1
|
import { ListItemNode, ListNode } from "@lexical/list";
|
|
2
|
-
import { $convertFromMarkdownString, $convertToMarkdownString, BOLD_ITALIC_STAR, BOLD_ITALIC_UNDERSCORE, BOLD_STAR, BOLD_UNDERSCORE, ITALIC_STAR, ITALIC_UNDERSCORE, ORDERED_LIST, STRIKETHROUGH, UNORDERED_LIST } from "@lexical/markdown";
|
|
3
|
-
import { $getRoot, createEditor } from "lexical";
|
|
2
|
+
import { $convertFromMarkdownString, $convertToMarkdownString, BOLD_ITALIC_STAR, BOLD_ITALIC_UNDERSCORE, BOLD_STAR, BOLD_UNDERSCORE, INLINE_CODE, ITALIC_STAR, ITALIC_UNDERSCORE, ORDERED_LIST, STRIKETHROUGH, UNORDERED_LIST } from "@lexical/markdown";
|
|
3
|
+
import { $createTextNode, $getRoot, $isTextNode, createEditor } from "lexical";
|
|
4
4
|
import { InputTokenNode, OutputTokenNode, ResourceTokenNode, StateTokenNode } from "../nodes/index.js";
|
|
5
5
|
import { NODE_TYPE_TO_TOKEN_TYPE, isPromptTokenNode } from "../plugins/shared/token-nodes.js";
|
|
6
6
|
import { createTokenNodeForOption } from "./insert-token.js";
|
|
7
7
|
import { WORD_JOINER } from "./serialization.js";
|
|
8
|
+
const UNDERLINE = {
|
|
9
|
+
dependencies: [],
|
|
10
|
+
importRegExp: /<u>(.*?)<\/u>/,
|
|
11
|
+
regExp: /<u>(.*?)<\/u>$/,
|
|
12
|
+
trigger: '>',
|
|
13
|
+
replace: (node, match)=>{
|
|
14
|
+
const inner = $createTextNode(match[1]);
|
|
15
|
+
inner.setFormat(node.getFormat());
|
|
16
|
+
inner.toggleFormat('underline');
|
|
17
|
+
node.replace(inner);
|
|
18
|
+
return inner;
|
|
19
|
+
},
|
|
20
|
+
export: (node, _exportChildren, exportFormat)=>{
|
|
21
|
+
if (!$isTextNode(node) || !node.hasFormat('underline')) return null;
|
|
22
|
+
const isUnderlined = (sibling)=>$isTextNode(sibling) && sibling.hasFormat('underline');
|
|
23
|
+
const open = isUnderlined(node.getPreviousSibling()) ? '' : '<u>';
|
|
24
|
+
const close = isUnderlined(node.getNextSibling()) ? '' : '</u>';
|
|
25
|
+
return `${open}${exportFormat(node, node.getTextContent())}${close}`;
|
|
26
|
+
},
|
|
27
|
+
type: 'text-match'
|
|
28
|
+
};
|
|
8
29
|
const PROMPT_EDITOR_RICH_TRANSFORMERS = [
|
|
9
30
|
ORDERED_LIST,
|
|
10
31
|
UNORDERED_LIST,
|
|
@@ -14,7 +35,9 @@ const PROMPT_EDITOR_RICH_TRANSFORMERS = [
|
|
|
14
35
|
BOLD_UNDERSCORE,
|
|
15
36
|
ITALIC_STAR,
|
|
16
37
|
ITALIC_UNDERSCORE,
|
|
17
|
-
STRIKETHROUGH
|
|
38
|
+
STRIKETHROUGH,
|
|
39
|
+
UNDERLINE,
|
|
40
|
+
INLINE_CODE
|
|
18
41
|
];
|
|
19
42
|
const RICH_EDITOR_EXTRA_NODES = [
|
|
20
43
|
ListNode,
|
|
@@ -67,6 +90,29 @@ function createPillExportTransformer(pills) {
|
|
|
67
90
|
};
|
|
68
91
|
}
|
|
69
92
|
const unescapeMarkdownLiterals = (markdown)=>markdown.replace(/\\([*_`~\\])/g, '$1');
|
|
93
|
+
function $rescuePillsFromCodeSpans(pills) {
|
|
94
|
+
for (const node of $getRoot().getAllTextNodes()){
|
|
95
|
+
if (!node.hasFormat('code') || !PILL_SENTINEL_IMPORT.test(node.getTextContent())) continue;
|
|
96
|
+
const replacements = node.getTextContent().split(PILL_SENTINEL_SPLIT).filter((part)=>'' !== part).map((part)=>{
|
|
97
|
+
const match = PILL_SENTINEL_IMPORT.exec(part);
|
|
98
|
+
if (match && match[0] === part) {
|
|
99
|
+
const pill = pills[Number(match[1])];
|
|
100
|
+
return pill ? createTokenNodeForOption(pill) : $createTextNode('');
|
|
101
|
+
}
|
|
102
|
+
const text = $createTextNode(part);
|
|
103
|
+
text.setFormat(node.getFormat());
|
|
104
|
+
return text;
|
|
105
|
+
});
|
|
106
|
+
if (replacements.length > 0) {
|
|
107
|
+
const [first, ...rest] = replacements;
|
|
108
|
+
node.replace(first);
|
|
109
|
+
rest.reduce((prev, next)=>{
|
|
110
|
+
prev.insertAfter(next);
|
|
111
|
+
return next;
|
|
112
|
+
}, first);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
70
116
|
function $getRichEditorTokensInternal() {
|
|
71
117
|
const pills = [];
|
|
72
118
|
const markdown = $convertToMarkdownString([
|
|
@@ -113,6 +159,7 @@ function $setRichEditorTokensInternal(tokens) {
|
|
|
113
159
|
...PROMPT_EDITOR_RICH_TRANSFORMERS,
|
|
114
160
|
createPillImportTransformer(pills)
|
|
115
161
|
], root, true);
|
|
162
|
+
$rescuePillsFromCodeSpans(pills);
|
|
116
163
|
}
|
|
117
164
|
function normalizeRichTextTokens(tokens) {
|
|
118
165
|
const editor = createEditor({
|
|
@@ -62,7 +62,7 @@ SelectValue.displayName = react_select_namespaceObject.Value.displayName;
|
|
|
62
62
|
const SelectTrigger = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, children, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(react_select_namespaceObject.Trigger, {
|
|
63
63
|
ref: ref,
|
|
64
64
|
"data-slot": "select-trigger",
|
|
65
|
-
className: (0, index_cjs_namespaceObject.cn)('flex h-9 w-full cursor-pointer items-center justify-between rounded-md border border-input bg-transparent px-3 py-1 text-base transition-colors data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm [&>span]:line-clamp-1 future:h-10 future:rounded-xl future:border-0 future:bg-surface-overlay future:hover:bg-surface-hover future:px-4 future:gap-4 future:font-normal', className),
|
|
65
|
+
className: (0, index_cjs_namespaceObject.cn)('flex h-9 w-full cursor-pointer items-center justify-between rounded-md border border-input bg-transparent px-3 py-1 text-base transition-colors data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm [&>span]:line-clamp-1 future:h-10 future:rounded-xl future:border-0 future:bg-surface-overlay future:hover:bg-surface-hover future:px-4 future:gap-4 future:font-normal aria-invalid:border-error aria-invalid:focus-visible:ring-error future:aria-invalid:ring-1 future:aria-invalid:ring-error/40', className),
|
|
66
66
|
...props,
|
|
67
67
|
children: [
|
|
68
68
|
children,
|
|
@@ -25,7 +25,7 @@ SelectValue.displayName = Value.displayName;
|
|
|
25
25
|
const SelectTrigger = /*#__PURE__*/ forwardRef(({ className, children, ...props }, ref)=>/*#__PURE__*/ jsxs(Trigger, {
|
|
26
26
|
ref: ref,
|
|
27
27
|
"data-slot": "select-trigger",
|
|
28
|
-
className: cn('flex h-9 w-full cursor-pointer items-center justify-between rounded-md border border-input bg-transparent px-3 py-1 text-base transition-colors data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm [&>span]:line-clamp-1 future:h-10 future:rounded-xl future:border-0 future:bg-surface-overlay future:hover:bg-surface-hover future:px-4 future:gap-4 future:font-normal', className),
|
|
28
|
+
className: cn('flex h-9 w-full cursor-pointer items-center justify-between rounded-md border border-input bg-transparent px-3 py-1 text-base transition-colors data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm [&>span]:line-clamp-1 future:h-10 future:rounded-xl future:border-0 future:bg-surface-overlay future:hover:bg-surface-hover future:px-4 future:gap-4 future:font-normal aria-invalid:border-error aria-invalid:focus-visible:ring-error future:aria-invalid:ring-1 future:aria-invalid:ring-error/40', className),
|
|
29
29
|
...props,
|
|
30
30
|
children: [
|
|
31
31
|
children,
|
|
@@ -149,7 +149,7 @@ const Textarea = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ clas
|
|
|
149
149
|
]);
|
|
150
150
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("textarea", {
|
|
151
151
|
"data-slot": "textarea",
|
|
152
|
-
className: (0, index_cjs_namespaceObject.cn)('flex w-full rounded-md border border-input bg-transparent px-3 py-2 text-base transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm', 'future:rounded-xl future:border-0 future:bg-surface-overlay future:text-sm future:placeholder:text-foreground-muted future:placeholder:font-normal future:focus-visible:ring-offset-2 future:focus-visible:ring-offset-background', !managed && 'min-h-[80px]', managed && 'resize-y', className),
|
|
152
|
+
className: (0, index_cjs_namespaceObject.cn)('flex w-full rounded-md border border-input bg-transparent px-3 py-2 text-base transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-error future:aria-invalid:ring-1 future:aria-invalid:ring-error/40 aria-invalid:focus-visible:ring-error md:text-sm', 'future:rounded-xl future:border-0 future:bg-surface-overlay future:text-sm future:placeholder:text-foreground-muted future:placeholder:font-normal future:focus-visible:ring-offset-2 future:focus-visible:ring-offset-background', !managed && 'min-h-[80px]', managed && 'resize-y', className),
|
|
153
153
|
ref: setRef,
|
|
154
154
|
style: style,
|
|
155
155
|
onChange: (event)=>{
|
|
@@ -121,7 +121,7 @@ const Textarea = /*#__PURE__*/ forwardRef(({ className, minRows, maxRows, onChan
|
|
|
121
121
|
]);
|
|
122
122
|
return /*#__PURE__*/ jsx("textarea", {
|
|
123
123
|
"data-slot": "textarea",
|
|
124
|
-
className: cn('flex w-full rounded-md border border-input bg-transparent px-3 py-2 text-base transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm', 'future:rounded-xl future:border-0 future:bg-surface-overlay future:text-sm future:placeholder:text-foreground-muted future:placeholder:font-normal future:focus-visible:ring-offset-2 future:focus-visible:ring-offset-background', !managed && 'min-h-[80px]', managed && 'resize-y', className),
|
|
124
|
+
className: cn('flex w-full rounded-md border border-input bg-transparent px-3 py-2 text-base transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-error future:aria-invalid:ring-1 future:aria-invalid:ring-error/40 aria-invalid:focus-visible:ring-error md:text-sm', 'future:rounded-xl future:border-0 future:bg-surface-overlay future:text-sm future:placeholder:text-foreground-muted future:placeholder:font-normal future:focus-visible:ring-offset-2 future:focus-visible:ring-offset-background', !managed && 'min-h-[80px]', managed && 'resize-y', className),
|
|
125
125
|
ref: setRef,
|
|
126
126
|
style: style,
|
|
127
127
|
onChange: (event)=>{
|