@uipath/apollo-wind 2.51.0 → 2.52.1
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/index.cjs +22 -22
- 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/resizable.cjs +3 -3
- package/dist/components/ui/resizable.d.ts +1 -1
- package/dist/components/ui/resizable.js +3 -3
- package/dist/styles.css +67 -8
- package/dist/tailwind.css +14 -0
- package/package.json +2 -2
|
@@ -27,7 +27,7 @@ var __webpack_modules__ = {
|
|
|
27
27
|
"@/components/ui/button" (module) {
|
|
28
28
|
module.exports = require("./button.cjs");
|
|
29
29
|
},
|
|
30
|
-
"
|
|
30
|
+
"./calendar" (module) {
|
|
31
31
|
module.exports = require("./calendar.cjs");
|
|
32
32
|
},
|
|
33
33
|
"./card" (module) {
|
|
@@ -36,10 +36,10 @@ var __webpack_modules__ = {
|
|
|
36
36
|
"./chart" (module) {
|
|
37
37
|
module.exports = require("./chart.cjs");
|
|
38
38
|
},
|
|
39
|
-
"
|
|
39
|
+
"./checkbox" (module) {
|
|
40
40
|
module.exports = require("./checkbox.cjs");
|
|
41
41
|
},
|
|
42
|
-
"
|
|
42
|
+
"./collapsible" (module) {
|
|
43
43
|
module.exports = require("./collapsible.cjs");
|
|
44
44
|
},
|
|
45
45
|
"./combobox" (module) {
|
|
@@ -48,7 +48,7 @@ var __webpack_modules__ = {
|
|
|
48
48
|
"@/components/ui/command" (module) {
|
|
49
49
|
module.exports = require("./command.cjs");
|
|
50
50
|
},
|
|
51
|
-
"
|
|
51
|
+
"./context-menu" (module) {
|
|
52
52
|
module.exports = require("./context-menu.cjs");
|
|
53
53
|
},
|
|
54
54
|
"./data-table" (module) {
|
|
@@ -60,13 +60,13 @@ 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
|
+
"./dropdown-menu" (module) {
|
|
70
70
|
module.exports = require("./dropdown-menu.cjs");
|
|
71
71
|
},
|
|
72
72
|
"@/components/ui/editable-cell" (module) {
|
|
@@ -84,16 +84,16 @@ var __webpack_modules__ = {
|
|
|
84
84
|
"@/components/ui/hover-card" (module) {
|
|
85
85
|
module.exports = require("./hover-card.cjs");
|
|
86
86
|
},
|
|
87
|
-
"
|
|
87
|
+
"./info-tooltip" (module) {
|
|
88
88
|
module.exports = require("./info-tooltip.cjs");
|
|
89
89
|
},
|
|
90
90
|
"@/components/ui/input-group" (module) {
|
|
91
91
|
module.exports = require("./input-group.cjs");
|
|
92
92
|
},
|
|
93
|
-
"
|
|
93
|
+
"./input" (module) {
|
|
94
94
|
module.exports = require("./input.cjs");
|
|
95
95
|
},
|
|
96
|
-
"
|
|
96
|
+
"./label" (module) {
|
|
97
97
|
module.exports = require("./label.cjs");
|
|
98
98
|
},
|
|
99
99
|
"./layout" (module) {
|
|
@@ -108,7 +108,7 @@ var __webpack_modules__ = {
|
|
|
108
108
|
"./pagination" (module) {
|
|
109
109
|
module.exports = require("./pagination.cjs");
|
|
110
110
|
},
|
|
111
|
-
"
|
|
111
|
+
"./popover" (module) {
|
|
112
112
|
module.exports = require("./popover.cjs");
|
|
113
113
|
},
|
|
114
114
|
"@/components/ui/portal-container" (module) {
|
|
@@ -174,7 +174,7 @@ var __webpack_modules__ = {
|
|
|
174
174
|
"./toggle-group" (module) {
|
|
175
175
|
module.exports = require("./toggle-group.cjs");
|
|
176
176
|
},
|
|
177
|
-
"
|
|
177
|
+
"./toggle" (module) {
|
|
178
178
|
module.exports = require("./toggle.cjs");
|
|
179
179
|
},
|
|
180
180
|
"@/components/ui/tooltip" (module) {
|
|
@@ -296,7 +296,7 @@ var __webpack_exports__ = {};
|
|
|
296
296
|
"default"
|
|
297
297
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_button_group__rspack_import_8[__rspack_import_key];
|
|
298
298
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
299
|
-
var _calendar__rspack_import_9 = __webpack_require__("
|
|
299
|
+
var _calendar__rspack_import_9 = __webpack_require__("./calendar");
|
|
300
300
|
var __rspack_reexport = {};
|
|
301
301
|
for(const __rspack_import_key in _calendar__rspack_import_9)if ([
|
|
302
302
|
"TreeView",
|
|
@@ -317,14 +317,14 @@ var __webpack_exports__ = {};
|
|
|
317
317
|
"default"
|
|
318
318
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_chart__rspack_import_11[__rspack_import_key];
|
|
319
319
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
320
|
-
var _checkbox__rspack_import_12 = __webpack_require__("
|
|
320
|
+
var _checkbox__rspack_import_12 = __webpack_require__("./checkbox");
|
|
321
321
|
var __rspack_reexport = {};
|
|
322
322
|
for(const __rspack_import_key in _checkbox__rspack_import_12)if ([
|
|
323
323
|
"TreeView",
|
|
324
324
|
"default"
|
|
325
325
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_checkbox__rspack_import_12[__rspack_import_key];
|
|
326
326
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
327
|
-
var _collapsible__rspack_import_13 = __webpack_require__("
|
|
327
|
+
var _collapsible__rspack_import_13 = __webpack_require__("./collapsible");
|
|
328
328
|
var __rspack_reexport = {};
|
|
329
329
|
for(const __rspack_import_key in _collapsible__rspack_import_13)if ([
|
|
330
330
|
"TreeView",
|
|
@@ -345,7 +345,7 @@ var __webpack_exports__ = {};
|
|
|
345
345
|
"default"
|
|
346
346
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_command__rspack_import_15[__rspack_import_key];
|
|
347
347
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
348
|
-
var _context_menu__rspack_import_16 = __webpack_require__("
|
|
348
|
+
var _context_menu__rspack_import_16 = __webpack_require__("./context-menu");
|
|
349
349
|
var __rspack_reexport = {};
|
|
350
350
|
for(const __rspack_import_key in _context_menu__rspack_import_16)if ([
|
|
351
351
|
"TreeView",
|
|
@@ -373,7 +373,7 @@ var __webpack_exports__ = {};
|
|
|
373
373
|
"default"
|
|
374
374
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_datetime_picker__rspack_import_19[__rspack_import_key];
|
|
375
375
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
376
|
-
var _dialog__rspack_import_20 = __webpack_require__("
|
|
376
|
+
var _dialog__rspack_import_20 = __webpack_require__("@/components/ui/dialog");
|
|
377
377
|
var __rspack_reexport = {};
|
|
378
378
|
for(const __rspack_import_key in _dialog__rspack_import_20)if ([
|
|
379
379
|
"TreeView",
|
|
@@ -387,7 +387,7 @@ var __webpack_exports__ = {};
|
|
|
387
387
|
"default"
|
|
388
388
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_drawer__rspack_import_21[__rspack_import_key];
|
|
389
389
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
390
|
-
var _dropdown_menu__rspack_import_22 = __webpack_require__("
|
|
390
|
+
var _dropdown_menu__rspack_import_22 = __webpack_require__("./dropdown-menu");
|
|
391
391
|
var __rspack_reexport = {};
|
|
392
392
|
for(const __rspack_import_key in _dropdown_menu__rspack_import_22)if ([
|
|
393
393
|
"TreeView",
|
|
@@ -429,14 +429,14 @@ var __webpack_exports__ = {};
|
|
|
429
429
|
"default"
|
|
430
430
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_hover_card__rspack_import_27[__rspack_import_key];
|
|
431
431
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
432
|
-
var _info_tooltip__rspack_import_28 = __webpack_require__("
|
|
432
|
+
var _info_tooltip__rspack_import_28 = __webpack_require__("./info-tooltip");
|
|
433
433
|
var __rspack_reexport = {};
|
|
434
434
|
for(const __rspack_import_key in _info_tooltip__rspack_import_28)if ([
|
|
435
435
|
"TreeView",
|
|
436
436
|
"default"
|
|
437
437
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_info_tooltip__rspack_import_28[__rspack_import_key];
|
|
438
438
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
439
|
-
var _input__rspack_import_29 = __webpack_require__("
|
|
439
|
+
var _input__rspack_import_29 = __webpack_require__("./input");
|
|
440
440
|
var __rspack_reexport = {};
|
|
441
441
|
for(const __rspack_import_key in _input__rspack_import_29)if ([
|
|
442
442
|
"TreeView",
|
|
@@ -450,7 +450,7 @@ var __webpack_exports__ = {};
|
|
|
450
450
|
"default"
|
|
451
451
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_input_group__rspack_import_30[__rspack_import_key];
|
|
452
452
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
453
|
-
var _label__rspack_import_31 = __webpack_require__("
|
|
453
|
+
var _label__rspack_import_31 = __webpack_require__("./label");
|
|
454
454
|
var __rspack_reexport = {};
|
|
455
455
|
for(const __rspack_import_key in _label__rspack_import_31)if ([
|
|
456
456
|
"TreeView",
|
|
@@ -485,7 +485,7 @@ var __webpack_exports__ = {};
|
|
|
485
485
|
"default"
|
|
486
486
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_pagination__rspack_import_35[__rspack_import_key];
|
|
487
487
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
488
|
-
var _popover__rspack_import_36 = __webpack_require__("
|
|
488
|
+
var _popover__rspack_import_36 = __webpack_require__("./popover");
|
|
489
489
|
var __rspack_reexport = {};
|
|
490
490
|
for(const __rspack_import_key in _popover__rspack_import_36)if ([
|
|
491
491
|
"TreeView",
|
|
@@ -632,7 +632,7 @@ var __webpack_exports__ = {};
|
|
|
632
632
|
"default"
|
|
633
633
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_textarea__rspack_import_56[__rspack_import_key];
|
|
634
634
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
635
|
-
var _toggle__rspack_import_57 = __webpack_require__("
|
|
635
|
+
var _toggle__rspack_import_57 = __webpack_require__("./toggle");
|
|
636
636
|
var __rspack_reexport = {};
|
|
637
637
|
for(const __rspack_import_key in _toggle__rspack_import_57)if ([
|
|
638
638
|
"TreeView",
|
|
@@ -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({
|
|
@@ -40,12 +40,12 @@ const ResizablePanelGroup = ({ className, ...props })=>/*#__PURE__*/ (0, jsx_run
|
|
|
40
40
|
const ResizablePanel = external_react_resizable_panels_namespaceObject.Panel;
|
|
41
41
|
const ResizableHandle = ({ withHandle, className, ...props })=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_react_resizable_panels_namespaceObject.Separator, {
|
|
42
42
|
"data-slot": "resizable-handle",
|
|
43
|
-
className: (0, index_cjs_namespaceObject.cn)('group relative flex w-px items-center justify-center bg-border transition-colors data-[separator=hover]:bg-primary data-[separator=active]:bg-primary after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:-translate-y-1/2 aria-[orientation=horizontal]:after:translate-x-0 [&[aria-orientation=horizontal]>div]:rotate-90', className),
|
|
43
|
+
className: (0, index_cjs_namespaceObject.cn)('group relative flex w-px items-center justify-center bg-[var(--resizable-handle-divider-bg,var(--ap-wind-border))] transition-colors data-[separator=hover]:bg-primary! data-[separator=active]:bg-primary! after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:-translate-y-1/2 aria-[orientation=horizontal]:after:translate-x-0 [&[aria-orientation=horizontal]>div]:rotate-90', className),
|
|
44
44
|
...props,
|
|
45
45
|
children: withHandle && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
46
|
-
className: "z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border transition-colors group-data-[separator=hover]:bg-primary group-data-[separator=active]:bg-primary",
|
|
46
|
+
className: "z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border transition-colors group-data-[separator=hover]:bg-primary! group-data-[separator=active]:bg-primary! [.light:not(.react-flow)_&]:bg-border-subtle [.dark:not(.react-flow)_&]:bg-foreground-subtle [.light:not(.react-flow)_&]:border-border-subtle [.light-hc_&]:border-border-subtle [.dark:not(.react-flow)_&]:border-border-subtle [.dark-hc_&]:border-border-subtle",
|
|
47
47
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.GripVertical, {
|
|
48
|
-
className: "h-2.5 w-2.5"
|
|
48
|
+
className: "h-2.5 w-2.5 [.light:not(.react-flow)_&]:text-foreground-emp [.light-hc_&]:text-foreground-inverse [.dark:not(.react-flow)_&]:text-foreground-inverse [.dark-hc_&]:text-foreground-inverse"
|
|
49
49
|
})
|
|
50
50
|
})
|
|
51
51
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Group, Panel, Separator } from 'react-resizable-panels';
|
|
2
1
|
import type { PanelImperativeHandle } from 'react-resizable-panels';
|
|
2
|
+
import { Group, Panel, Separator } from 'react-resizable-panels';
|
|
3
3
|
declare const ResizablePanelGroup: ({ className, ...props }: React.ComponentProps<typeof Group>) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare const ResizablePanel: typeof Panel;
|
|
5
5
|
declare const ResizableHandle: ({ withHandle, className, ...props }: React.ComponentProps<typeof Separator> & {
|
|
@@ -10,12 +10,12 @@ const ResizablePanelGroup = ({ className, ...props })=>/*#__PURE__*/ jsx(Group,
|
|
|
10
10
|
const ResizablePanel = Panel;
|
|
11
11
|
const ResizableHandle = ({ withHandle, className, ...props })=>/*#__PURE__*/ jsx(Separator, {
|
|
12
12
|
"data-slot": "resizable-handle",
|
|
13
|
-
className: cn('group relative flex w-px items-center justify-center bg-border transition-colors data-[separator=hover]:bg-primary data-[separator=active]:bg-primary after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:-translate-y-1/2 aria-[orientation=horizontal]:after:translate-x-0 [&[aria-orientation=horizontal]>div]:rotate-90', className),
|
|
13
|
+
className: cn('group relative flex w-px items-center justify-center bg-[var(--resizable-handle-divider-bg,var(--ap-wind-border))] transition-colors data-[separator=hover]:bg-primary! data-[separator=active]:bg-primary! after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:-translate-y-1/2 aria-[orientation=horizontal]:after:translate-x-0 [&[aria-orientation=horizontal]>div]:rotate-90', className),
|
|
14
14
|
...props,
|
|
15
15
|
children: withHandle && /*#__PURE__*/ jsx("div", {
|
|
16
|
-
className: "z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border transition-colors group-data-[separator=hover]:bg-primary group-data-[separator=active]:bg-primary",
|
|
16
|
+
className: "z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border transition-colors group-data-[separator=hover]:bg-primary! group-data-[separator=active]:bg-primary! [.light:not(.react-flow)_&]:bg-border-subtle [.dark:not(.react-flow)_&]:bg-foreground-subtle [.light:not(.react-flow)_&]:border-border-subtle [.light-hc_&]:border-border-subtle [.dark:not(.react-flow)_&]:border-border-subtle [.dark-hc_&]:border-border-subtle",
|
|
17
17
|
children: /*#__PURE__*/ jsx(GripVertical, {
|
|
18
|
-
className: "h-2.5 w-2.5"
|
|
18
|
+
className: "h-2.5 w-2.5 [.light:not(.react-flow)_&]:text-foreground-emp [.light-hc_&]:text-foreground-inverse [.dark:not(.react-flow)_&]:text-foreground-inverse [.dark-hc_&]:text-foreground-inverse"
|
|
19
19
|
})
|
|
20
20
|
})
|
|
21
21
|
});
|
package/dist/styles.css
CHANGED
|
@@ -2482,6 +2482,12 @@
|
|
|
2482
2482
|
.bg-\[\#ff0000\] {
|
|
2483
2483
|
background-color: #ff0000;
|
|
2484
2484
|
}
|
|
2485
|
+
.bg-\[var\(--resizable-handle-divider-bg\,var\(--ap-wind-border\)\)\] {
|
|
2486
|
+
background-color: var(--resizable-handle-divider-bg,var(--ap-wind-border));
|
|
2487
|
+
}
|
|
2488
|
+
.bg-\[var\(\.\.\.\)\] {
|
|
2489
|
+
background-color: var(...);
|
|
2490
|
+
}
|
|
2485
2491
|
.bg-accent {
|
|
2486
2492
|
background-color: var(--accent);
|
|
2487
2493
|
}
|
|
@@ -4600,14 +4606,14 @@
|
|
|
4600
4606
|
opacity: 100%;
|
|
4601
4607
|
}
|
|
4602
4608
|
}
|
|
4603
|
-
.group-data-\[separator\=active\]\:bg-primary {
|
|
4609
|
+
.group-data-\[separator\=active\]\:bg-primary\! {
|
|
4604
4610
|
&:is(:where(.group)[data-separator="active"] *) {
|
|
4605
|
-
background-color: var(--primary);
|
|
4611
|
+
background-color: var(--primary) !important;
|
|
4606
4612
|
}
|
|
4607
4613
|
}
|
|
4608
|
-
.group-data-\[separator\=hover\]\:bg-primary {
|
|
4614
|
+
.group-data-\[separator\=hover\]\:bg-primary\! {
|
|
4609
4615
|
&:is(:where(.group)[data-separator="hover"] *) {
|
|
4610
|
-
background-color: var(--primary);
|
|
4616
|
+
background-color: var(--primary) !important;
|
|
4611
4617
|
}
|
|
4612
4618
|
}
|
|
4613
4619
|
.group-data-\[state\=open\]\/section\:rotate-90 {
|
|
@@ -5786,14 +5792,14 @@
|
|
|
5786
5792
|
color: var(--foreground);
|
|
5787
5793
|
}
|
|
5788
5794
|
}
|
|
5789
|
-
.data-\[separator\=active\]\:bg-primary {
|
|
5795
|
+
.data-\[separator\=active\]\:bg-primary\! {
|
|
5790
5796
|
&[data-separator="active"] {
|
|
5791
|
-
background-color: var(--primary);
|
|
5797
|
+
background-color: var(--primary) !important;
|
|
5792
5798
|
}
|
|
5793
5799
|
}
|
|
5794
|
-
.data-\[separator\=hover\]\:bg-primary {
|
|
5800
|
+
.data-\[separator\=hover\]\:bg-primary\! {
|
|
5795
5801
|
&[data-separator="hover"] {
|
|
5796
|
-
background-color: var(--primary);
|
|
5802
|
+
background-color: var(--primary) !important;
|
|
5797
5803
|
}
|
|
5798
5804
|
}
|
|
5799
5805
|
.data-\[side\=bottom\]\:translate-y-1 {
|
|
@@ -7149,6 +7155,56 @@
|
|
|
7149
7155
|
rotate: 180deg;
|
|
7150
7156
|
}
|
|
7151
7157
|
}
|
|
7158
|
+
.\[\.dark-hc_\&\]\:border-border-subtle {
|
|
7159
|
+
.dark-hc & {
|
|
7160
|
+
border-color: var(--border-subtle);
|
|
7161
|
+
}
|
|
7162
|
+
}
|
|
7163
|
+
.\[\.dark-hc_\&\]\:text-foreground-inverse {
|
|
7164
|
+
.dark-hc & {
|
|
7165
|
+
color: var(--foreground-inverse);
|
|
7166
|
+
}
|
|
7167
|
+
}
|
|
7168
|
+
.\[\.dark\:not\(\.react-flow\)_\&\]\:border-border-subtle {
|
|
7169
|
+
.dark:not(.react-flow) & {
|
|
7170
|
+
border-color: var(--border-subtle);
|
|
7171
|
+
}
|
|
7172
|
+
}
|
|
7173
|
+
.\[\.dark\:not\(\.react-flow\)_\&\]\:bg-foreground-subtle {
|
|
7174
|
+
.dark:not(.react-flow) & {
|
|
7175
|
+
background-color: var(--foreground-subtle);
|
|
7176
|
+
}
|
|
7177
|
+
}
|
|
7178
|
+
.\[\.dark\:not\(\.react-flow\)_\&\]\:text-foreground-inverse {
|
|
7179
|
+
.dark:not(.react-flow) & {
|
|
7180
|
+
color: var(--foreground-inverse);
|
|
7181
|
+
}
|
|
7182
|
+
}
|
|
7183
|
+
.\[\.light-hc_\&\]\:border-border-subtle {
|
|
7184
|
+
.light-hc & {
|
|
7185
|
+
border-color: var(--border-subtle);
|
|
7186
|
+
}
|
|
7187
|
+
}
|
|
7188
|
+
.\[\.light-hc_\&\]\:text-foreground-inverse {
|
|
7189
|
+
.light-hc & {
|
|
7190
|
+
color: var(--foreground-inverse);
|
|
7191
|
+
}
|
|
7192
|
+
}
|
|
7193
|
+
.\[\.light\:not\(\.react-flow\)_\&\]\:border-border-subtle {
|
|
7194
|
+
.light:not(.react-flow) & {
|
|
7195
|
+
border-color: var(--border-subtle);
|
|
7196
|
+
}
|
|
7197
|
+
}
|
|
7198
|
+
.\[\.light\:not\(\.react-flow\)_\&\]\:bg-border-subtle {
|
|
7199
|
+
.light:not(.react-flow) & {
|
|
7200
|
+
background-color: var(--border-subtle);
|
|
7201
|
+
}
|
|
7202
|
+
}
|
|
7203
|
+
.\[\.light\:not\(\.react-flow\)_\&\]\:text-foreground-emp {
|
|
7204
|
+
.light:not(.react-flow) & {
|
|
7205
|
+
color: var(--foreground-emp);
|
|
7206
|
+
}
|
|
7207
|
+
}
|
|
7152
7208
|
.\[\[data-slot\=card-content\]_\&\]\:bg-transparent {
|
|
7153
7209
|
[data-slot=card-content] & {
|
|
7154
7210
|
background-color: transparent;
|
|
@@ -10066,6 +10122,9 @@ body.dark, .dark:not(.react-flow), body.dark-hc, .dark-hc {
|
|
|
10066
10122
|
--surface-hover: var(--color-background-gray);
|
|
10067
10123
|
color-scheme: dark;
|
|
10068
10124
|
}
|
|
10125
|
+
body.light, .light:not(.react-flow), body.light-hc, .light-hc, body.dark, .dark:not(.react-flow), body.dark-hc, .dark-hc {
|
|
10126
|
+
--resizable-handle-divider-bg: var(--border-subtle);
|
|
10127
|
+
}
|
|
10069
10128
|
body.future-dark, .future-dark, body.future-light, .future-light {
|
|
10070
10129
|
--brand-darker: var(--color-primary-darker);
|
|
10071
10130
|
--ring: var(--color-focus-indicator);
|
package/dist/tailwind.css
CHANGED
|
@@ -171,6 +171,20 @@ body.dark-hc, .dark-hc {
|
|
|
171
171
|
color-scheme: dark;
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
+
/* ResizableHandle's divider needs a resting background that matches its own
|
|
175
|
+
border-subtle-toned box in classic themes (see resizable.tsx). Exposed as a
|
|
176
|
+
variable, with an unset default falling back to --ap-wind-border, so a
|
|
177
|
+
consumer's own bg-* override (e.g. bg-transparent) still wins: cn()/
|
|
178
|
+
tailwind-merge can't dedupe a plain bg-* class against one scoped to an
|
|
179
|
+
arbitrary theme variant, so the variant class must stay a single, unvaried
|
|
180
|
+
bg-[var(...)] utility for consumer overrides to keep working. */
|
|
181
|
+
body.light, .light:not(.react-flow),
|
|
182
|
+
body.light-hc, .light-hc,
|
|
183
|
+
body.dark, .dark:not(.react-flow),
|
|
184
|
+
body.dark-hc, .dark-hc {
|
|
185
|
+
--resizable-handle-divider-bg: var(--border-subtle);
|
|
186
|
+
}
|
|
187
|
+
|
|
174
188
|
/* ── Future family — mapping divergences (color-scheme comes from core) ──── */
|
|
175
189
|
body.future-dark, .future-dark,
|
|
176
190
|
body.future-light, .future-light {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/apollo-wind",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.52.1",
|
|
4
4
|
"description": "UiPath wind design system - A Tailwind CSS based React component library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
"tailwindcss": "^4.1.17",
|
|
128
128
|
"vaul": "^1.1.2",
|
|
129
129
|
"zod": "^4.3.5",
|
|
130
|
-
"@uipath/apollo-core": "5.14.
|
|
130
|
+
"@uipath/apollo-core": "5.14.1"
|
|
131
131
|
},
|
|
132
132
|
"devDependencies": {
|
|
133
133
|
"@codemirror/lang-javascript": "^6.2.5",
|