@uipath/apollo-wind 2.23.0 → 2.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ui/index.cjs +87 -77
- package/dist/components/ui/index.d.ts +1 -0
- package/dist/components/ui/index.js +1 -0
- package/dist/components/ui/prompt-editor/components/EditorToolbar.cjs +156 -0
- package/dist/components/ui/prompt-editor/components/EditorToolbar.d.ts +9 -0
- package/dist/components/ui/prompt-editor/components/EditorToolbar.js +122 -0
- package/dist/components/ui/prompt-editor/components/MarkdownPreview.cjs +205 -0
- package/dist/components/ui/prompt-editor/components/MarkdownPreview.d.ts +14 -0
- package/dist/components/ui/prompt-editor/components/MarkdownPreview.js +161 -0
- package/dist/components/ui/prompt-editor/components/PromptEditorAutocompleteMenu.cjs +194 -0
- package/dist/components/ui/prompt-editor/components/PromptEditorAutocompleteMenu.d.ts +28 -0
- package/dist/components/ui/prompt-editor/components/PromptEditorAutocompleteMenu.js +160 -0
- package/dist/components/ui/prompt-editor/components/TokenPill.cjs +119 -0
- package/dist/components/ui/prompt-editor/components/TokenPill.d.ts +15 -0
- package/dist/components/ui/prompt-editor/components/TokenPill.js +85 -0
- package/dist/components/ui/prompt-editor/components/TokenPillWithTooltip.cjs +138 -0
- package/dist/components/ui/prompt-editor/components/TokenPillWithTooltip.d.ts +13 -0
- package/dist/components/ui/prompt-editor/components/TokenPillWithTooltip.js +104 -0
- package/dist/components/ui/prompt-editor/components/token-icon-markup.cjs +138 -0
- package/dist/components/ui/prompt-editor/components/token-icon-markup.d.ts +16 -0
- package/dist/components/ui/prompt-editor/components/token-icon-markup.js +104 -0
- package/dist/components/ui/prompt-editor/index.cjs +40 -0
- package/dist/components/ui/prompt-editor/index.d.ts +4 -0
- package/dist/components/ui/prompt-editor/index.js +3 -0
- package/dist/components/ui/prompt-editor/nodes/InputTokenNode.cjs +145 -0
- package/dist/components/ui/prompt-editor/nodes/InputTokenNode.d.ts +30 -0
- package/dist/components/ui/prompt-editor/nodes/InputTokenNode.js +105 -0
- package/dist/components/ui/prompt-editor/nodes/OutputTokenNode.cjs +145 -0
- package/dist/components/ui/prompt-editor/nodes/OutputTokenNode.d.ts +30 -0
- package/dist/components/ui/prompt-editor/nodes/OutputTokenNode.js +105 -0
- package/dist/components/ui/prompt-editor/nodes/ResourceTokenNode.cjs +145 -0
- package/dist/components/ui/prompt-editor/nodes/ResourceTokenNode.d.ts +30 -0
- package/dist/components/ui/prompt-editor/nodes/ResourceTokenNode.js +105 -0
- package/dist/components/ui/prompt-editor/nodes/StateTokenNode.cjs +145 -0
- package/dist/components/ui/prompt-editor/nodes/StateTokenNode.d.ts +30 -0
- package/dist/components/ui/prompt-editor/nodes/StateTokenNode.js +105 -0
- package/dist/components/ui/prompt-editor/nodes/index.cjs +72 -0
- package/dist/components/ui/prompt-editor/nodes/index.d.ts +8 -0
- package/dist/components/ui/prompt-editor/nodes/index.js +5 -0
- package/dist/components/ui/prompt-editor/plugins/AutocompletePlugin.cjs +242 -0
- package/dist/components/ui/prompt-editor/plugins/AutocompletePlugin.d.ts +15 -0
- package/dist/components/ui/prompt-editor/plugins/AutocompletePlugin.js +208 -0
- package/dist/components/ui/prompt-editor/plugins/CopyPastePlugin.cjs +164 -0
- package/dist/components/ui/prompt-editor/plugins/CopyPastePlugin.d.ts +1 -0
- package/dist/components/ui/prompt-editor/plugins/CopyPastePlugin.js +130 -0
- package/dist/components/ui/prompt-editor/plugins/EditorRefPlugin.cjs +50 -0
- package/dist/components/ui/prompt-editor/plugins/EditorRefPlugin.d.ts +4 -0
- package/dist/components/ui/prompt-editor/plugins/EditorRefPlugin.js +16 -0
- package/dist/components/ui/prompt-editor/plugins/MultilinePlugin.cjs +108 -0
- package/dist/components/ui/prompt-editor/plugins/MultilinePlugin.d.ts +3 -0
- package/dist/components/ui/prompt-editor/plugins/MultilinePlugin.js +74 -0
- package/dist/components/ui/prompt-editor/plugins/NodeSelectionFixPlugin.cjs +313 -0
- package/dist/components/ui/prompt-editor/plugins/NodeSelectionFixPlugin.d.ts +7 -0
- package/dist/components/ui/prompt-editor/plugins/NodeSelectionFixPlugin.js +276 -0
- package/dist/components/ui/prompt-editor/plugins/RenameTokensPlugin.cjs +186 -0
- package/dist/components/ui/prompt-editor/plugins/RenameTokensPlugin.d.ts +7 -0
- package/dist/components/ui/prompt-editor/plugins/RenameTokensPlugin.js +152 -0
- package/dist/components/ui/prompt-editor/plugins/ToolbarActionsPlugin.cjs +132 -0
- package/dist/components/ui/prompt-editor/plugins/ToolbarActionsPlugin.d.ts +7 -0
- package/dist/components/ui/prompt-editor/plugins/ToolbarActionsPlugin.js +98 -0
- package/dist/components/ui/prompt-editor/plugins/ValidateTokensPlugin.cjs +85 -0
- package/dist/components/ui/prompt-editor/plugins/ValidateTokensPlugin.d.ts +4 -0
- package/dist/components/ui/prompt-editor/plugins/ValidateTokensPlugin.js +51 -0
- package/dist/components/ui/prompt-editor/plugins/ValueSyncPlugin.cjs +98 -0
- package/dist/components/ui/prompt-editor/plugins/ValueSyncPlugin.d.ts +8 -0
- package/dist/components/ui/prompt-editor/plugins/ValueSyncPlugin.js +64 -0
- package/dist/components/ui/prompt-editor/plugins/VariableDropPlugin.cjs +137 -0
- package/dist/components/ui/prompt-editor/plugins/VariableDropPlugin.d.ts +19 -0
- package/dist/components/ui/prompt-editor/plugins/VariableDropPlugin.js +100 -0
- package/dist/components/ui/prompt-editor/plugins/shared/token-nodes.cjs +49 -0
- package/dist/components/ui/prompt-editor/plugins/shared/token-nodes.d.ts +8 -0
- package/dist/components/ui/prompt-editor/plugins/shared/token-nodes.js +12 -0
- package/dist/components/ui/prompt-editor/prompt-editor.cjs +402 -0
- package/dist/components/ui/prompt-editor/prompt-editor.d.ts +35 -0
- package/dist/components/ui/prompt-editor/prompt-editor.js +368 -0
- package/dist/components/ui/prompt-editor/types.cjs +74 -0
- package/dist/components/ui/prompt-editor/types.d.ts +58 -0
- package/dist/components/ui/prompt-editor/types.js +31 -0
- package/dist/components/ui/prompt-editor/utils/autocomplete-segments.cjs +60 -0
- package/dist/components/ui/prompt-editor/utils/autocomplete-segments.d.ts +29 -0
- package/dist/components/ui/prompt-editor/utils/autocomplete-segments.js +20 -0
- package/dist/components/ui/prompt-editor/utils/comparison.cjs +39 -0
- package/dist/components/ui/prompt-editor/utils/comparison.d.ts +3 -0
- package/dist/components/ui/prompt-editor/utils/comparison.js +5 -0
- package/dist/components/ui/prompt-editor/utils/index.cjs +68 -0
- package/dist/components/ui/prompt-editor/utils/index.d.ts +3 -0
- package/dist/components/ui/prompt-editor/utils/index.js +4 -0
- package/dist/components/ui/prompt-editor/utils/insert-token.cjs +103 -0
- package/dist/components/ui/prompt-editor/utils/insert-token.d.ts +12 -0
- package/dist/components/ui/prompt-editor/utils/insert-token.js +66 -0
- package/dist/components/ui/prompt-editor/utils/serialization.cjs +255 -0
- package/dist/components/ui/prompt-editor/utils/serialization.d.ts +16 -0
- package/dist/components/ui/prompt-editor/utils/serialization.js +200 -0
- package/dist/components/ui/tabs.cjs +125 -0
- package/dist/components/ui/tabs.d.ts +9 -1
- package/dist/components/ui/tabs.js +125 -3
- package/dist/index.cjs +11 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +3 -2
- package/dist/styles.css +50 -0
- package/dist/tailwind.utilities.css +1 -1
- package/package.json +7 -1
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import { $createLineBreakNode, $createParagraphNode, $createTextNode, $getRoot, $isLineBreakNode, $isParagraphNode, $isRangeSelection, $isTextNode } from "lexical";
|
|
2
|
+
import { createInputTokenNode, createOutputTokenNode, createResourceTokenNode, createStateTokenNode, isInputTokenNode, isOutputTokenNode, isResourceTokenNode, isStateTokenNode } from "../nodes/index.js";
|
|
3
|
+
const WORD_JOINER = '\u2060';
|
|
4
|
+
const appendTextToken = (tokens, raw)=>{
|
|
5
|
+
const text = raw.split(WORD_JOINER).join('');
|
|
6
|
+
if (!text) return;
|
|
7
|
+
const lastToken = tokens[tokens.length - 1];
|
|
8
|
+
if (lastToken && 'text' === lastToken.type) lastToken.value += text;
|
|
9
|
+
else tokens.push({
|
|
10
|
+
type: 'text',
|
|
11
|
+
value: text
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
const $getEditorTokensInternal = ()=>{
|
|
15
|
+
const root = $getRoot();
|
|
16
|
+
const tokens = [];
|
|
17
|
+
const addText = (raw)=>appendTextToken(tokens, raw);
|
|
18
|
+
const traverseChildren = (children)=>{
|
|
19
|
+
for (const node of children)if ($isTextNode(node)) addText(node.getTextContent());
|
|
20
|
+
else if ($isLineBreakNode(node)) addText('\n');
|
|
21
|
+
else if (isInputTokenNode(node)) tokens.push({
|
|
22
|
+
type: 'input',
|
|
23
|
+
value: node.getValue()
|
|
24
|
+
});
|
|
25
|
+
else if (isOutputTokenNode(node)) tokens.push({
|
|
26
|
+
type: 'output',
|
|
27
|
+
value: node.getValue()
|
|
28
|
+
});
|
|
29
|
+
else if (isStateTokenNode(node)) tokens.push({
|
|
30
|
+
type: 'state',
|
|
31
|
+
value: node.getValue()
|
|
32
|
+
});
|
|
33
|
+
else if (isResourceTokenNode(node)) tokens.push({
|
|
34
|
+
type: 'resource',
|
|
35
|
+
value: node.getValue()
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
const paragraphs = root.getChildren();
|
|
39
|
+
for(let i = 0; i < paragraphs.length; i++){
|
|
40
|
+
const paragraph = paragraphs[i];
|
|
41
|
+
if ($isParagraphNode(paragraph)) {
|
|
42
|
+
traverseChildren(paragraph.getChildren());
|
|
43
|
+
if (i < paragraphs.length - 1) addText('\n');
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return tokens;
|
|
47
|
+
};
|
|
48
|
+
const $setEditorTokensInternal = (tokens)=>{
|
|
49
|
+
if (!Array.isArray(tokens)) throw new TypeError('setEditorTokensInternal: tokens must be an array');
|
|
50
|
+
const root = $getRoot();
|
|
51
|
+
root.clear();
|
|
52
|
+
const currentParagraph = $createParagraphNode();
|
|
53
|
+
for (const token of tokens)if ('text' === token.type) {
|
|
54
|
+
const lines = token.value.split('\n');
|
|
55
|
+
for(let i = 0; i < lines.length; i++){
|
|
56
|
+
if (lines[i]) currentParagraph.append($createTextNode(lines[i]));
|
|
57
|
+
if (i < lines.length - 1) currentParagraph.append($createLineBreakNode());
|
|
58
|
+
}
|
|
59
|
+
} else {
|
|
60
|
+
let node;
|
|
61
|
+
switch(token.type){
|
|
62
|
+
case 'input':
|
|
63
|
+
node = createInputTokenNode(token.value);
|
|
64
|
+
break;
|
|
65
|
+
case 'output':
|
|
66
|
+
node = createOutputTokenNode(token.value);
|
|
67
|
+
break;
|
|
68
|
+
case 'state':
|
|
69
|
+
node = createStateTokenNode(token.value);
|
|
70
|
+
break;
|
|
71
|
+
case 'resource':
|
|
72
|
+
node = createResourceTokenNode(token.value);
|
|
73
|
+
break;
|
|
74
|
+
default:
|
|
75
|
+
throw new Error(`Unknown token type: ${token.type}`);
|
|
76
|
+
}
|
|
77
|
+
currentParagraph.append(node);
|
|
78
|
+
}
|
|
79
|
+
root.append(currentParagraph);
|
|
80
|
+
};
|
|
81
|
+
const getEditorTokens = (editor)=>{
|
|
82
|
+
let tokens = [];
|
|
83
|
+
editor.getEditorState().read(()=>{
|
|
84
|
+
tokens = $getEditorTokensInternal();
|
|
85
|
+
});
|
|
86
|
+
return tokens;
|
|
87
|
+
};
|
|
88
|
+
const setEditorTokens = (editor, tokens)=>{
|
|
89
|
+
editor.update(()=>$setEditorTokensInternal(tokens), {
|
|
90
|
+
discrete: true
|
|
91
|
+
});
|
|
92
|
+
};
|
|
93
|
+
const tokensToClipboardString = (tokens)=>{
|
|
94
|
+
let result = '';
|
|
95
|
+
for (const token of tokens)if ('text' === token.type) result += token.value;
|
|
96
|
+
else result += `{{ ${token.value} }}`;
|
|
97
|
+
return result;
|
|
98
|
+
};
|
|
99
|
+
const clipboardStringToTokens = (str)=>{
|
|
100
|
+
const tokens = [];
|
|
101
|
+
let currentText = '';
|
|
102
|
+
let i = 0;
|
|
103
|
+
const flushText = ()=>{
|
|
104
|
+
if (currentText.length > 0) {
|
|
105
|
+
tokens.push({
|
|
106
|
+
type: 'text',
|
|
107
|
+
value: currentText
|
|
108
|
+
});
|
|
109
|
+
currentText = '';
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
while(i < str.length){
|
|
113
|
+
if ('{' === str[i] && i + 1 < str.length && '{' === str[i + 1]) {
|
|
114
|
+
flushText();
|
|
115
|
+
i += 2;
|
|
116
|
+
let inner = '';
|
|
117
|
+
let foundClosing = false;
|
|
118
|
+
while(i < str.length){
|
|
119
|
+
if ('}' === str[i] && i + 1 < str.length && '}' === str[i + 1]) {
|
|
120
|
+
i += 2;
|
|
121
|
+
foundClosing = true;
|
|
122
|
+
break;
|
|
123
|
+
}
|
|
124
|
+
inner += str[i];
|
|
125
|
+
i++;
|
|
126
|
+
}
|
|
127
|
+
if (foundClosing && inner.trim()) tokens.push({
|
|
128
|
+
type: 'input',
|
|
129
|
+
value: inner.trim()
|
|
130
|
+
});
|
|
131
|
+
else if (foundClosing) currentText += '{{}}';
|
|
132
|
+
else currentText += `{{${inner}`;
|
|
133
|
+
continue;
|
|
134
|
+
}
|
|
135
|
+
currentText += str[i];
|
|
136
|
+
i++;
|
|
137
|
+
}
|
|
138
|
+
flushText();
|
|
139
|
+
return tokens;
|
|
140
|
+
};
|
|
141
|
+
const getEditorTokensFromSelection = (selection)=>{
|
|
142
|
+
if (!$isRangeSelection(selection)) return [];
|
|
143
|
+
if (selection.isCollapsed()) return [];
|
|
144
|
+
const tokens = [];
|
|
145
|
+
const addText = (raw)=>appendTextToken(tokens, raw);
|
|
146
|
+
const selectedNodes = selection.getNodes();
|
|
147
|
+
const anchorKey = selection.anchor.key;
|
|
148
|
+
const focusKey = selection.focus.key;
|
|
149
|
+
const anchorOffset = selection.anchor.offset;
|
|
150
|
+
const focusOffset = selection.focus.offset;
|
|
151
|
+
const anchorNode = selection.anchor.getNode();
|
|
152
|
+
const nodeKeys = new Set(selectedNodes.map((n)=>n.getKey()));
|
|
153
|
+
const nodesToProcess = [];
|
|
154
|
+
if ($isTextNode(anchorNode) && !nodeKeys.has(anchorKey)) nodesToProcess.push(anchorNode);
|
|
155
|
+
nodesToProcess.push(...selectedNodes);
|
|
156
|
+
if (0 === nodesToProcess.length) return [];
|
|
157
|
+
const firstSelectedNode = nodesToProcess[0];
|
|
158
|
+
const isForward = 1 === nodesToProcess.length ? anchorOffset <= focusOffset : firstSelectedNode.getKey() === anchorKey || firstSelectedNode.getParent()?.getKey() === anchorKey;
|
|
159
|
+
let prevNodeParagraph = null;
|
|
160
|
+
for (const node of nodesToProcess){
|
|
161
|
+
const nodeKey = node.getKey();
|
|
162
|
+
const nodeType = node.getType();
|
|
163
|
+
const nodeParagraph = $isParagraphNode(node) ? node : node.getParent();
|
|
164
|
+
if (prevNodeParagraph && nodeParagraph && prevNodeParagraph !== nodeParagraph) addText('\n');
|
|
165
|
+
prevNodeParagraph = nodeParagraph;
|
|
166
|
+
if (!$isParagraphNode(node)) {
|
|
167
|
+
if ('input-token' === nodeType) tokens.push({
|
|
168
|
+
type: 'input',
|
|
169
|
+
value: node.getValue()
|
|
170
|
+
});
|
|
171
|
+
else if ('output-token' === nodeType) tokens.push({
|
|
172
|
+
type: 'output',
|
|
173
|
+
value: node.getValue()
|
|
174
|
+
});
|
|
175
|
+
else if ('state-token' === nodeType) tokens.push({
|
|
176
|
+
type: 'state',
|
|
177
|
+
value: node.getValue()
|
|
178
|
+
});
|
|
179
|
+
else if ('resource-token' === nodeType) tokens.push({
|
|
180
|
+
type: 'resource',
|
|
181
|
+
value: node.getValue()
|
|
182
|
+
});
|
|
183
|
+
else if ($isTextNode(node)) {
|
|
184
|
+
const textContent = node.getTextContent();
|
|
185
|
+
let selectedText = textContent;
|
|
186
|
+
const isAnchorNode = nodeKey === anchorKey;
|
|
187
|
+
const isFocusNode = nodeKey === focusKey;
|
|
188
|
+
if (isAnchorNode && isFocusNode) {
|
|
189
|
+
const start = Math.min(anchorOffset, focusOffset);
|
|
190
|
+
const end = Math.max(anchorOffset, focusOffset);
|
|
191
|
+
selectedText = textContent.slice(start, end);
|
|
192
|
+
} else if (isAnchorNode) selectedText = isForward ? textContent.slice(anchorOffset) : textContent.slice(0, anchorOffset);
|
|
193
|
+
else if (isFocusNode) selectedText = isForward ? textContent.slice(0, focusOffset) : textContent.slice(focusOffset);
|
|
194
|
+
if (selectedText) addText(selectedText);
|
|
195
|
+
} else if ($isLineBreakNode(node)) addText('\n');
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
return tokens;
|
|
199
|
+
};
|
|
200
|
+
export { $getEditorTokensInternal, $setEditorTokensInternal, WORD_JOINER, clipboardStringToTokens, getEditorTokens, getEditorTokensFromSelection, setEditorTokens, tokensToClipboardString };
|
|
@@ -24,6 +24,7 @@ var __webpack_require__ = {};
|
|
|
24
24
|
var __webpack_exports__ = {};
|
|
25
25
|
__webpack_require__.r(__webpack_exports__);
|
|
26
26
|
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
ScrollableTabsList: ()=>ScrollableTabsList,
|
|
27
28
|
TabsList: ()=>TabsList,
|
|
28
29
|
Tabs: ()=>Tabs,
|
|
29
30
|
TabsTrigger: ()=>TabsTrigger,
|
|
@@ -31,6 +32,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
31
32
|
});
|
|
32
33
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
33
34
|
const react_tabs_namespaceObject = require("@radix-ui/react-tabs");
|
|
35
|
+
const external_lucide_react_namespaceObject = require("lucide-react");
|
|
34
36
|
const external_react_namespaceObject = require("react");
|
|
35
37
|
const index_cjs_namespaceObject = require("../../lib/index.cjs");
|
|
36
38
|
const Tabs = react_tabs_namespaceObject.Root;
|
|
@@ -40,6 +42,127 @@ const TabsList = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ clas
|
|
|
40
42
|
...props
|
|
41
43
|
}));
|
|
42
44
|
TabsList.displayName = react_tabs_namespaceObject.List.displayName;
|
|
45
|
+
const ScrollableTabsList = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, containerClassName, scrollButtonClassName, previousButtonLabel = 'Scroll tabs left', nextButtonLabel = 'Scroll tabs right', ...props }, forwardedRef)=>{
|
|
46
|
+
const listRef = external_react_namespaceObject.useRef(null);
|
|
47
|
+
const [hasOverflow, setHasOverflow] = external_react_namespaceObject.useState(false);
|
|
48
|
+
const [canScrollLeft, setCanScrollLeft] = external_react_namespaceObject.useState(false);
|
|
49
|
+
const [canScrollRight, setCanScrollRight] = external_react_namespaceObject.useState(false);
|
|
50
|
+
const animationFrameRef = external_react_namespaceObject.useRef(null);
|
|
51
|
+
const revealOnNextFrameRef = external_react_namespaceObject.useRef(false);
|
|
52
|
+
external_react_namespaceObject.useImperativeHandle(forwardedRef, ()=>listRef.current);
|
|
53
|
+
const updateScrollState = external_react_namespaceObject.useCallback(()=>{
|
|
54
|
+
const list = listRef.current;
|
|
55
|
+
if (!list) return;
|
|
56
|
+
const maxScrollLeft = list.scrollWidth - list.clientWidth;
|
|
57
|
+
setHasOverflow(maxScrollLeft > 1);
|
|
58
|
+
setCanScrollLeft(list.scrollLeft > 1);
|
|
59
|
+
setCanScrollRight(list.scrollLeft < maxScrollLeft - 1);
|
|
60
|
+
}, []);
|
|
61
|
+
const revealActiveTab = external_react_namespaceObject.useCallback(()=>{
|
|
62
|
+
const list = listRef.current;
|
|
63
|
+
const activeTab = list?.querySelector('[role="tab"][data-state="active"]');
|
|
64
|
+
if (!list || !activeTab) return;
|
|
65
|
+
const listRect = list.getBoundingClientRect();
|
|
66
|
+
const activeTabRect = activeTab.getBoundingClientRect();
|
|
67
|
+
if (activeTabRect.left < listRect.left) list.scrollBy({
|
|
68
|
+
left: activeTabRect.left - listRect.left,
|
|
69
|
+
behavior: 'smooth'
|
|
70
|
+
});
|
|
71
|
+
else if (activeTabRect.right > listRect.right) list.scrollBy({
|
|
72
|
+
left: activeTabRect.right - listRect.right,
|
|
73
|
+
behavior: 'smooth'
|
|
74
|
+
});
|
|
75
|
+
}, []);
|
|
76
|
+
const scheduleLayoutUpdate = external_react_namespaceObject.useCallback((revealActive = false)=>{
|
|
77
|
+
revealOnNextFrameRef.current ||= revealActive;
|
|
78
|
+
if (null !== animationFrameRef.current) return;
|
|
79
|
+
animationFrameRef.current = requestAnimationFrame(()=>{
|
|
80
|
+
animationFrameRef.current = null;
|
|
81
|
+
updateScrollState();
|
|
82
|
+
if (revealOnNextFrameRef.current) {
|
|
83
|
+
revealOnNextFrameRef.current = false;
|
|
84
|
+
revealActiveTab();
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
}, [
|
|
88
|
+
revealActiveTab,
|
|
89
|
+
updateScrollState
|
|
90
|
+
]);
|
|
91
|
+
external_react_namespaceObject.useEffect(()=>{
|
|
92
|
+
const list = listRef.current;
|
|
93
|
+
if (!list) return;
|
|
94
|
+
list.scrollLeft = 0;
|
|
95
|
+
scheduleLayoutUpdate(true);
|
|
96
|
+
const handleScroll = ()=>scheduleLayoutUpdate();
|
|
97
|
+
list.addEventListener('scroll', handleScroll);
|
|
98
|
+
const resizeObserver = new ResizeObserver(()=>scheduleLayoutUpdate(true));
|
|
99
|
+
resizeObserver.observe(list);
|
|
100
|
+
const mutationObserver = new MutationObserver((mutations)=>{
|
|
101
|
+
if (mutations.some((mutation)=>'childList' === mutation.type || 'data-state' === mutation.attributeName)) scheduleLayoutUpdate(true);
|
|
102
|
+
});
|
|
103
|
+
mutationObserver.observe(list, {
|
|
104
|
+
attributes: true,
|
|
105
|
+
attributeFilter: [
|
|
106
|
+
'data-state'
|
|
107
|
+
],
|
|
108
|
+
childList: true,
|
|
109
|
+
subtree: true
|
|
110
|
+
});
|
|
111
|
+
return ()=>{
|
|
112
|
+
list.removeEventListener('scroll', handleScroll);
|
|
113
|
+
resizeObserver.disconnect();
|
|
114
|
+
mutationObserver.disconnect();
|
|
115
|
+
if (null !== animationFrameRef.current) {
|
|
116
|
+
cancelAnimationFrame(animationFrameRef.current);
|
|
117
|
+
animationFrameRef.current = null;
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
}, [
|
|
121
|
+
scheduleLayoutUpdate
|
|
122
|
+
]);
|
|
123
|
+
const scroll = (direction)=>{
|
|
124
|
+
const list = listRef.current;
|
|
125
|
+
if (!list) return;
|
|
126
|
+
list.scrollBy({
|
|
127
|
+
left: 'left' === direction ? -list.clientWidth : list.clientWidth,
|
|
128
|
+
behavior: 'smooth'
|
|
129
|
+
});
|
|
130
|
+
};
|
|
131
|
+
const scrollButtonClass = (0, index_cjs_namespaceObject.cn)('grid size-8 shrink-0 place-items-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:pointer-events-none disabled:opacity-30', scrollButtonClassName);
|
|
132
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
133
|
+
className: (0, index_cjs_namespaceObject.cn)('flex w-full min-w-0 items-center gap-1', containerClassName),
|
|
134
|
+
children: [
|
|
135
|
+
hasOverflow && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
|
|
136
|
+
type: "button",
|
|
137
|
+
"aria-label": previousButtonLabel,
|
|
138
|
+
title: previousButtonLabel,
|
|
139
|
+
disabled: !canScrollLeft,
|
|
140
|
+
onClick: ()=>scroll('left'),
|
|
141
|
+
className: scrollButtonClass,
|
|
142
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronLeft, {
|
|
143
|
+
className: "size-4 rtl:rotate-180"
|
|
144
|
+
})
|
|
145
|
+
}),
|
|
146
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(TabsList, {
|
|
147
|
+
ref: listRef,
|
|
148
|
+
className: (0, index_cjs_namespaceObject.cn)('min-w-0 flex-1 justify-start overflow-x-auto [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden', className),
|
|
149
|
+
...props
|
|
150
|
+
}),
|
|
151
|
+
hasOverflow && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
|
|
152
|
+
type: "button",
|
|
153
|
+
"aria-label": nextButtonLabel,
|
|
154
|
+
title: nextButtonLabel,
|
|
155
|
+
disabled: !canScrollRight,
|
|
156
|
+
onClick: ()=>scroll('right'),
|
|
157
|
+
className: scrollButtonClass,
|
|
158
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronRight, {
|
|
159
|
+
className: "size-4 rtl:rotate-180"
|
|
160
|
+
})
|
|
161
|
+
})
|
|
162
|
+
]
|
|
163
|
+
});
|
|
164
|
+
});
|
|
165
|
+
ScrollableTabsList.displayName = 'ScrollableTabsList';
|
|
43
166
|
const TabsTrigger = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_tabs_namespaceObject.Trigger, {
|
|
44
167
|
ref: ref,
|
|
45
168
|
className: (0, index_cjs_namespaceObject.cn)('inline-flex cursor-pointer items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm', className),
|
|
@@ -52,11 +175,13 @@ const TabsContent = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ c
|
|
|
52
175
|
...props
|
|
53
176
|
}));
|
|
54
177
|
TabsContent.displayName = react_tabs_namespaceObject.Content.displayName;
|
|
178
|
+
exports.ScrollableTabsList = __webpack_exports__.ScrollableTabsList;
|
|
55
179
|
exports.Tabs = __webpack_exports__.Tabs;
|
|
56
180
|
exports.TabsContent = __webpack_exports__.TabsContent;
|
|
57
181
|
exports.TabsList = __webpack_exports__.TabsList;
|
|
58
182
|
exports.TabsTrigger = __webpack_exports__.TabsTrigger;
|
|
59
183
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
184
|
+
"ScrollableTabsList",
|
|
60
185
|
"Tabs",
|
|
61
186
|
"TabsContent",
|
|
62
187
|
"TabsList",
|
|
@@ -2,6 +2,14 @@ import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
declare const Tabs: React.ForwardRefExoticComponent<TabsPrimitive.TabsProps & React.RefAttributes<HTMLDivElement>>;
|
|
4
4
|
declare const TabsList: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
interface ScrollableTabsListProps extends React.ComponentPropsWithoutRef<typeof TabsPrimitive.List> {
|
|
6
|
+
containerClassName?: string;
|
|
7
|
+
scrollButtonClassName?: string;
|
|
8
|
+
previousButtonLabel?: string;
|
|
9
|
+
nextButtonLabel?: string;
|
|
10
|
+
}
|
|
11
|
+
declare const ScrollableTabsList: React.ForwardRefExoticComponent<ScrollableTabsListProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
12
|
declare const TabsTrigger: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
6
13
|
declare const TabsContent: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
-
export { Tabs, TabsList, TabsTrigger
|
|
14
|
+
export { ScrollableTabsList, Tabs, TabsContent, TabsList, TabsTrigger };
|
|
15
|
+
export type { ScrollableTabsListProps };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Content, List, Root, Trigger } from "@radix-ui/react-tabs";
|
|
3
|
-
import {
|
|
3
|
+
import { ChevronLeft, ChevronRight } from "lucide-react";
|
|
4
|
+
import { forwardRef, useCallback, useEffect, useImperativeHandle, useRef, useState } from "react";
|
|
4
5
|
import { cn } from "../../lib/index.js";
|
|
5
6
|
const Tabs = Root;
|
|
6
7
|
const TabsList = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(List, {
|
|
@@ -9,6 +10,127 @@ const TabsList = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__P
|
|
|
9
10
|
...props
|
|
10
11
|
}));
|
|
11
12
|
TabsList.displayName = List.displayName;
|
|
13
|
+
const ScrollableTabsList = /*#__PURE__*/ forwardRef(({ className, containerClassName, scrollButtonClassName, previousButtonLabel = 'Scroll tabs left', nextButtonLabel = 'Scroll tabs right', ...props }, forwardedRef)=>{
|
|
14
|
+
const listRef = useRef(null);
|
|
15
|
+
const [hasOverflow, setHasOverflow] = useState(false);
|
|
16
|
+
const [canScrollLeft, setCanScrollLeft] = useState(false);
|
|
17
|
+
const [canScrollRight, setCanScrollRight] = useState(false);
|
|
18
|
+
const animationFrameRef = useRef(null);
|
|
19
|
+
const revealOnNextFrameRef = useRef(false);
|
|
20
|
+
useImperativeHandle(forwardedRef, ()=>listRef.current);
|
|
21
|
+
const updateScrollState = useCallback(()=>{
|
|
22
|
+
const list = listRef.current;
|
|
23
|
+
if (!list) return;
|
|
24
|
+
const maxScrollLeft = list.scrollWidth - list.clientWidth;
|
|
25
|
+
setHasOverflow(maxScrollLeft > 1);
|
|
26
|
+
setCanScrollLeft(list.scrollLeft > 1);
|
|
27
|
+
setCanScrollRight(list.scrollLeft < maxScrollLeft - 1);
|
|
28
|
+
}, []);
|
|
29
|
+
const revealActiveTab = useCallback(()=>{
|
|
30
|
+
const list = listRef.current;
|
|
31
|
+
const activeTab = list?.querySelector('[role="tab"][data-state="active"]');
|
|
32
|
+
if (!list || !activeTab) return;
|
|
33
|
+
const listRect = list.getBoundingClientRect();
|
|
34
|
+
const activeTabRect = activeTab.getBoundingClientRect();
|
|
35
|
+
if (activeTabRect.left < listRect.left) list.scrollBy({
|
|
36
|
+
left: activeTabRect.left - listRect.left,
|
|
37
|
+
behavior: 'smooth'
|
|
38
|
+
});
|
|
39
|
+
else if (activeTabRect.right > listRect.right) list.scrollBy({
|
|
40
|
+
left: activeTabRect.right - listRect.right,
|
|
41
|
+
behavior: 'smooth'
|
|
42
|
+
});
|
|
43
|
+
}, []);
|
|
44
|
+
const scheduleLayoutUpdate = useCallback((revealActive = false)=>{
|
|
45
|
+
revealOnNextFrameRef.current ||= revealActive;
|
|
46
|
+
if (null !== animationFrameRef.current) return;
|
|
47
|
+
animationFrameRef.current = requestAnimationFrame(()=>{
|
|
48
|
+
animationFrameRef.current = null;
|
|
49
|
+
updateScrollState();
|
|
50
|
+
if (revealOnNextFrameRef.current) {
|
|
51
|
+
revealOnNextFrameRef.current = false;
|
|
52
|
+
revealActiveTab();
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
}, [
|
|
56
|
+
revealActiveTab,
|
|
57
|
+
updateScrollState
|
|
58
|
+
]);
|
|
59
|
+
useEffect(()=>{
|
|
60
|
+
const list = listRef.current;
|
|
61
|
+
if (!list) return;
|
|
62
|
+
list.scrollLeft = 0;
|
|
63
|
+
scheduleLayoutUpdate(true);
|
|
64
|
+
const handleScroll = ()=>scheduleLayoutUpdate();
|
|
65
|
+
list.addEventListener('scroll', handleScroll);
|
|
66
|
+
const resizeObserver = new ResizeObserver(()=>scheduleLayoutUpdate(true));
|
|
67
|
+
resizeObserver.observe(list);
|
|
68
|
+
const mutationObserver = new MutationObserver((mutations)=>{
|
|
69
|
+
if (mutations.some((mutation)=>'childList' === mutation.type || 'data-state' === mutation.attributeName)) scheduleLayoutUpdate(true);
|
|
70
|
+
});
|
|
71
|
+
mutationObserver.observe(list, {
|
|
72
|
+
attributes: true,
|
|
73
|
+
attributeFilter: [
|
|
74
|
+
'data-state'
|
|
75
|
+
],
|
|
76
|
+
childList: true,
|
|
77
|
+
subtree: true
|
|
78
|
+
});
|
|
79
|
+
return ()=>{
|
|
80
|
+
list.removeEventListener('scroll', handleScroll);
|
|
81
|
+
resizeObserver.disconnect();
|
|
82
|
+
mutationObserver.disconnect();
|
|
83
|
+
if (null !== animationFrameRef.current) {
|
|
84
|
+
cancelAnimationFrame(animationFrameRef.current);
|
|
85
|
+
animationFrameRef.current = null;
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
}, [
|
|
89
|
+
scheduleLayoutUpdate
|
|
90
|
+
]);
|
|
91
|
+
const scroll = (direction)=>{
|
|
92
|
+
const list = listRef.current;
|
|
93
|
+
if (!list) return;
|
|
94
|
+
list.scrollBy({
|
|
95
|
+
left: 'left' === direction ? -list.clientWidth : list.clientWidth,
|
|
96
|
+
behavior: 'smooth'
|
|
97
|
+
});
|
|
98
|
+
};
|
|
99
|
+
const scrollButtonClass = cn('grid size-8 shrink-0 place-items-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:pointer-events-none disabled:opacity-30', scrollButtonClassName);
|
|
100
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
101
|
+
className: cn('flex w-full min-w-0 items-center gap-1', containerClassName),
|
|
102
|
+
children: [
|
|
103
|
+
hasOverflow && /*#__PURE__*/ jsx("button", {
|
|
104
|
+
type: "button",
|
|
105
|
+
"aria-label": previousButtonLabel,
|
|
106
|
+
title: previousButtonLabel,
|
|
107
|
+
disabled: !canScrollLeft,
|
|
108
|
+
onClick: ()=>scroll('left'),
|
|
109
|
+
className: scrollButtonClass,
|
|
110
|
+
children: /*#__PURE__*/ jsx(ChevronLeft, {
|
|
111
|
+
className: "size-4 rtl:rotate-180"
|
|
112
|
+
})
|
|
113
|
+
}),
|
|
114
|
+
/*#__PURE__*/ jsx(TabsList, {
|
|
115
|
+
ref: listRef,
|
|
116
|
+
className: cn('min-w-0 flex-1 justify-start overflow-x-auto [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden', className),
|
|
117
|
+
...props
|
|
118
|
+
}),
|
|
119
|
+
hasOverflow && /*#__PURE__*/ jsx("button", {
|
|
120
|
+
type: "button",
|
|
121
|
+
"aria-label": nextButtonLabel,
|
|
122
|
+
title: nextButtonLabel,
|
|
123
|
+
disabled: !canScrollRight,
|
|
124
|
+
onClick: ()=>scroll('right'),
|
|
125
|
+
className: scrollButtonClass,
|
|
126
|
+
children: /*#__PURE__*/ jsx(ChevronRight, {
|
|
127
|
+
className: "size-4 rtl:rotate-180"
|
|
128
|
+
})
|
|
129
|
+
})
|
|
130
|
+
]
|
|
131
|
+
});
|
|
132
|
+
});
|
|
133
|
+
ScrollableTabsList.displayName = 'ScrollableTabsList';
|
|
12
134
|
const TabsTrigger = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(Trigger, {
|
|
13
135
|
ref: ref,
|
|
14
136
|
className: cn('inline-flex cursor-pointer items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm', className),
|
|
@@ -21,4 +143,4 @@ const TabsContent = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#
|
|
|
21
143
|
...props
|
|
22
144
|
}));
|
|
23
145
|
TabsContent.displayName = Content.displayName;
|
|
24
|
-
export { Tabs, TabsContent, TabsList, TabsTrigger };
|
|
146
|
+
export { ScrollableTabsList, Tabs, TabsContent, TabsList, TabsTrigger };
|
package/dist/index.cjs
CHANGED
|
@@ -67,8 +67,9 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
67
67
|
CommandSeparator: ()=>command_cjs_namespaceObject.CommandSeparator,
|
|
68
68
|
FormFieldRenderer: ()=>field_renderer_cjs_namespaceObject.FormFieldRenderer,
|
|
69
69
|
EditableCell: ()=>editable_cell_cjs_namespaceObject.EditableCell,
|
|
70
|
+
PromptEditor: ()=>index_cjs_namespaceObject.PromptEditor,
|
|
71
|
+
ScrollableTabsList: ()=>tabs_cjs_namespaceObject.ScrollableTabsList,
|
|
70
72
|
Spinner: ()=>spinner_cjs_namespaceObject.Spinner,
|
|
71
|
-
buttonVariants: ()=>button_cjs_namespaceObject.buttonVariants,
|
|
72
73
|
SheetOverlay: ()=>sheet_cjs_namespaceObject.SheetOverlay,
|
|
73
74
|
AlertDialogPortal: ()=>alert_dialog_cjs_namespaceObject.AlertDialogPortal,
|
|
74
75
|
DropdownMenuGroup: ()=>dropdown_menu_cjs_namespaceObject.DropdownMenuGroup,
|
|
@@ -76,6 +77,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
76
77
|
TabsList: ()=>tabs_cjs_namespaceObject.TabsList,
|
|
77
78
|
ContextMenuItem: ()=>context_menu_cjs_namespaceObject.ContextMenuItem,
|
|
78
79
|
TooltipContent: ()=>tooltip_cjs_namespaceObject.TooltipContent,
|
|
80
|
+
buttonVariants: ()=>button_cjs_namespaceObject.buttonVariants,
|
|
79
81
|
TableBody: ()=>table_cjs_namespaceObject.TableBody,
|
|
80
82
|
AvatarImage: ()=>avatar_cjs_namespaceObject.AvatarImage,
|
|
81
83
|
RuleBuilder: ()=>rules_engine_cjs_namespaceObject.RuleBuilder,
|
|
@@ -129,6 +131,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
129
131
|
TooltipProvider: ()=>tooltip_cjs_namespaceObject.TooltipProvider,
|
|
130
132
|
DataFetcher: ()=>data_fetcher_cjs_namespaceObject.DataFetcher,
|
|
131
133
|
DialogPortal: ()=>dialog_cjs_namespaceObject.DialogPortal,
|
|
134
|
+
VARIABLE_DRAG_MIME: ()=>index_cjs_namespaceObject.VARIABLE_DRAG_MIME,
|
|
132
135
|
analyticsPlugin: ()=>form_plugins_cjs_namespaceObject.analyticsPlugin,
|
|
133
136
|
cn: ()=>utils_cjs_namespaceObject.cn,
|
|
134
137
|
DropdownMenuSub: ()=>dropdown_menu_cjs_namespaceObject.DropdownMenuSub,
|
|
@@ -276,6 +279,7 @@ const table_cjs_namespaceObject = require("./components/ui/table.cjs");
|
|
|
276
279
|
const data_table_cjs_namespaceObject = require("./components/ui/data-table.cjs");
|
|
277
280
|
const editable_cell_cjs_namespaceObject = require("./components/ui/editable-cell.cjs");
|
|
278
281
|
const progress_cjs_namespaceObject = require("./components/ui/progress.cjs");
|
|
282
|
+
const index_cjs_namespaceObject = require("./components/ui/prompt-editor/index.cjs");
|
|
279
283
|
const skeleton_cjs_namespaceObject = require("./components/ui/skeleton.cjs");
|
|
280
284
|
const spinner_cjs_namespaceObject = require("./components/ui/spinner.cjs");
|
|
281
285
|
const empty_state_cjs_namespaceObject = require("./components/ui/empty-state.cjs");
|
|
@@ -442,6 +446,7 @@ exports.PopoverAnchor = __webpack_exports__.PopoverAnchor;
|
|
|
442
446
|
exports.PopoverContent = __webpack_exports__.PopoverContent;
|
|
443
447
|
exports.PopoverTrigger = __webpack_exports__.PopoverTrigger;
|
|
444
448
|
exports.Progress = __webpack_exports__.Progress;
|
|
449
|
+
exports.PromptEditor = __webpack_exports__.PromptEditor;
|
|
445
450
|
exports.RadioGroup = __webpack_exports__.RadioGroup;
|
|
446
451
|
exports.RadioGroupItem = __webpack_exports__.RadioGroupItem;
|
|
447
452
|
exports.ResizableHandle = __webpack_exports__.ResizableHandle;
|
|
@@ -452,6 +457,7 @@ exports.RuleBuilder = __webpack_exports__.RuleBuilder;
|
|
|
452
457
|
exports.RulesEngine = __webpack_exports__.RulesEngine;
|
|
453
458
|
exports.ScrollArea = __webpack_exports__.ScrollArea;
|
|
454
459
|
exports.ScrollBar = __webpack_exports__.ScrollBar;
|
|
460
|
+
exports.ScrollableTabsList = __webpack_exports__.ScrollableTabsList;
|
|
455
461
|
exports.Search = __webpack_exports__.Search;
|
|
456
462
|
exports.SearchWithSuggestions = __webpack_exports__.SearchWithSuggestions;
|
|
457
463
|
exports.Select = __webpack_exports__.Select;
|
|
@@ -504,6 +510,7 @@ exports.TooltipPortal = __webpack_exports__.TooltipPortal;
|
|
|
504
510
|
exports.TooltipProvider = __webpack_exports__.TooltipProvider;
|
|
505
511
|
exports.TooltipTrigger = __webpack_exports__.TooltipTrigger;
|
|
506
512
|
exports.TreeView = __webpack_exports__.TreeView;
|
|
513
|
+
exports.VARIABLE_DRAG_MIME = __webpack_exports__.VARIABLE_DRAG_MIME;
|
|
507
514
|
exports.analyticsPlugin = __webpack_exports__.analyticsPlugin;
|
|
508
515
|
exports.auditPlugin = __webpack_exports__.auditPlugin;
|
|
509
516
|
exports.autoSavePlugin = __webpack_exports__.autoSavePlugin;
|
|
@@ -654,6 +661,7 @@ for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
|
654
661
|
"PopoverContent",
|
|
655
662
|
"PopoverTrigger",
|
|
656
663
|
"Progress",
|
|
664
|
+
"PromptEditor",
|
|
657
665
|
"RadioGroup",
|
|
658
666
|
"RadioGroupItem",
|
|
659
667
|
"ResizableHandle",
|
|
@@ -664,6 +672,7 @@ for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
|
664
672
|
"RulesEngine",
|
|
665
673
|
"ScrollArea",
|
|
666
674
|
"ScrollBar",
|
|
675
|
+
"ScrollableTabsList",
|
|
667
676
|
"Search",
|
|
668
677
|
"SearchWithSuggestions",
|
|
669
678
|
"Select",
|
|
@@ -716,6 +725,7 @@ for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
|
716
725
|
"TooltipProvider",
|
|
717
726
|
"TooltipTrigger",
|
|
718
727
|
"TreeView",
|
|
728
|
+
"VARIABLE_DRAG_MIME",
|
|
719
729
|
"analyticsPlugin",
|
|
720
730
|
"auditPlugin",
|
|
721
731
|
"autoSavePlugin",
|
package/dist/index.d.ts
CHANGED
|
@@ -44,6 +44,8 @@ export type { DataTableProps } from './components/ui/data-table';
|
|
|
44
44
|
export { EditableCell, createEditableColumn, } from './components/ui/editable-cell';
|
|
45
45
|
export type { EditableCellMeta, EditableCellType, } from './components/ui/editable-cell';
|
|
46
46
|
export { Progress } from './components/ui/progress';
|
|
47
|
+
export { PromptEditor, VARIABLE_DRAG_MIME } from './components/ui/prompt-editor';
|
|
48
|
+
export type { PromptEditorAutoCompleteOption, PromptEditorMode, PromptEditorProps, PromptEditorRef, PromptEditorToken, PromptEditorTokenType, } from './components/ui/prompt-editor';
|
|
47
49
|
export { Skeleton } from './components/ui/skeleton';
|
|
48
50
|
export { Spinner, spinnerVariants } from './components/ui/spinner';
|
|
49
51
|
export type { SpinnerProps } from './components/ui/spinner';
|
|
@@ -59,7 +61,8 @@ export { Tooltip, TooltipContent, TooltipPortal, TooltipProvider, TooltipTrigger
|
|
|
59
61
|
export { HoverCard, HoverCardContent, HoverCardTrigger, } from './components/ui/hover-card';
|
|
60
62
|
export { Alert, AlertDescription, AlertTitle } from './components/ui/alert';
|
|
61
63
|
export { toast, Toaster } from './components/ui/sonner';
|
|
62
|
-
export { Tabs, TabsContent, TabsList, TabsTrigger } from './components/ui/tabs';
|
|
64
|
+
export { ScrollableTabsList, Tabs, TabsContent, TabsList, TabsTrigger, } from './components/ui/tabs';
|
|
65
|
+
export type { ScrollableTabsListProps } from './components/ui/tabs';
|
|
63
66
|
export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, } from './components/ui/breadcrumb';
|
|
64
67
|
export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, } from './components/ui/pagination';
|
|
65
68
|
export { Stepper } from './components/ui/stepper';
|
package/dist/index.js
CHANGED
|
@@ -29,6 +29,7 @@ import { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, Tabl
|
|
|
29
29
|
import { DataTable, DataTableColumnHeader, DataTableSelectColumn } from "./components/ui/data-table.js";
|
|
30
30
|
import { EditableCell, createEditableColumn } from "./components/ui/editable-cell.js";
|
|
31
31
|
import { Progress } from "./components/ui/progress.js";
|
|
32
|
+
import { PromptEditor, VARIABLE_DRAG_MIME } from "./components/ui/prompt-editor/index.js";
|
|
32
33
|
import { Skeleton } from "./components/ui/skeleton.js";
|
|
33
34
|
import { Spinner, spinnerVariants } from "./components/ui/spinner.js";
|
|
34
35
|
import { EmptyState } from "./components/ui/empty-state.js";
|
|
@@ -41,7 +42,7 @@ import { Tooltip, TooltipContent, TooltipPortal, TooltipProvider, TooltipTrigger
|
|
|
41
42
|
import { HoverCard, HoverCardContent, HoverCardTrigger } from "./components/ui/hover-card.js";
|
|
42
43
|
import { Alert, AlertDescription, AlertTitle } from "./components/ui/alert.js";
|
|
43
44
|
import { Toaster, toast } from "./components/ui/sonner.js";
|
|
44
|
-
import { Tabs, TabsContent, TabsList, TabsTrigger } from "./components/ui/tabs.js";
|
|
45
|
+
import { ScrollableTabsList, Tabs, TabsContent, TabsList, TabsTrigger } from "./components/ui/tabs.js";
|
|
45
46
|
import { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator } from "./components/ui/breadcrumb.js";
|
|
46
47
|
import { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious } from "./components/ui/pagination.js";
|
|
47
48
|
import { Stepper } from "./components/ui/stepper.js";
|
|
@@ -62,4 +63,4 @@ import { ExpressionBuilder, RuleBuilder, RulesEngine } from "./components/forms/
|
|
|
62
63
|
import { DataFetcher, DataSourceBuilder, DataTransformers, FetchAdapter } from "./components/forms/data-fetcher.js";
|
|
63
64
|
import { analyticsPlugin, auditPlugin, autoSavePlugin, formattingPlugin, validationPlugin, workflowPlugin } from "./components/forms/form-plugins.js";
|
|
64
65
|
import { hasMinMaxStep, hasOptions, isCustomField, isFileField } from "./components/forms/form-schema.js";
|
|
65
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Column, Combobox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DataFetcher, DataSourceBuilder, DataTable, DataTableColumnHeader, DataTableSelectColumn, DataTransformers, DatePicker, DateTimePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EditableCell, EmptyState, ExpressionBuilder, FetchAdapter, FileUpload, FormDesigner, FormFieldRenderer, FormStateViewer, Grid, HoverCard, HoverCardContent, HoverCardTrigger, Input, Label, MetadataForm, MultiSelect, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, Row, RuleBuilder, RulesEngine, ScrollArea, ScrollBar, Search, SearchWithSuggestions, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, Slider, Spinner, StatsCard, Stepper, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipPortal, TooltipProvider, TooltipTrigger, tree_view as TreeView, analyticsPlugin, auditPlugin, autoSavePlugin, badgeVariants, buttonVariants, cn, createEditableColumn, formattingPlugin, hasMinMaxStep, hasOptions, isCustomField, isFileField, spinnerVariants, toast, toggleVariants, validationPlugin, workflowPlugin };
|
|
66
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Column, Combobox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DataFetcher, DataSourceBuilder, DataTable, DataTableColumnHeader, DataTableSelectColumn, DataTransformers, DatePicker, DateTimePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EditableCell, EmptyState, ExpressionBuilder, FetchAdapter, FileUpload, FormDesigner, FormFieldRenderer, FormStateViewer, Grid, HoverCard, HoverCardContent, HoverCardTrigger, Input, Label, MetadataForm, MultiSelect, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, PromptEditor, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, Row, RuleBuilder, RulesEngine, ScrollArea, ScrollBar, ScrollableTabsList, Search, SearchWithSuggestions, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, Slider, Spinner, StatsCard, Stepper, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipPortal, TooltipProvider, TooltipTrigger, tree_view as TreeView, VARIABLE_DRAG_MIME, analyticsPlugin, auditPlugin, autoSavePlugin, badgeVariants, buttonVariants, cn, createEditableColumn, formattingPlugin, hasMinMaxStep, hasOptions, isCustomField, isFileField, spinnerVariants, toast, toggleVariants, validationPlugin, workflowPlugin };
|