@uipath/apollo-wind 0.10.0 → 0.11.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/custom/canvas-studio.cjs +133 -0
- package/dist/components/custom/canvas-studio.d.ts +99 -0
- package/dist/components/custom/canvas-studio.js +93 -0
- package/dist/components/custom/canvas.cjs +44 -0
- package/dist/components/custom/canvas.d.ts +14 -0
- package/dist/components/custom/canvas.js +10 -0
- package/dist/components/custom/chat-composer.cjs +105 -0
- package/dist/components/custom/chat-composer.d.ts +15 -0
- package/dist/components/custom/chat-composer.js +71 -0
- package/dist/components/custom/chat-first-experience.cjs +87 -0
- package/dist/components/custom/chat-first-experience.d.ts +24 -0
- package/dist/components/custom/chat-first-experience.js +53 -0
- package/dist/components/custom/chat-prompt-suggestions.cjs +49 -0
- package/dist/components/custom/chat-prompt-suggestions.d.ts +18 -0
- package/dist/components/custom/chat-prompt-suggestions.js +15 -0
- package/dist/components/custom/chat-steps-view.cjs +308 -0
- package/dist/components/custom/chat-steps-view.d.ts +38 -0
- package/dist/components/custom/chat-steps-view.js +274 -0
- package/dist/components/custom/flow-node.cjs +76 -0
- package/dist/components/custom/flow-node.d.ts +20 -0
- package/dist/components/custom/flow-node.js +42 -0
- package/dist/components/custom/flow-properties-bar.cjs +103 -0
- package/dist/components/custom/flow-properties-bar.d.ts +21 -0
- package/dist/components/custom/flow-properties-bar.js +69 -0
- package/dist/components/custom/flow-properties-expanded.cjs +328 -0
- package/dist/components/custom/flow-properties-expanded.d.ts +21 -0
- package/dist/components/custom/flow-properties-expanded.js +294 -0
- package/dist/components/custom/flow-properties-simple.cjs +364 -0
- package/dist/components/custom/flow-properties-simple.d.ts +62 -0
- package/dist/components/custom/flow-properties-simple.js +330 -0
- package/dist/components/custom/flow-properties.cjs +56 -0
- package/dist/components/custom/flow-properties.d.ts +28 -0
- package/dist/components/custom/flow-properties.js +22 -0
- package/dist/components/custom/global-header.cjs +422 -0
- package/dist/components/custom/global-header.d.ts +38 -0
- package/dist/components/custom/global-header.js +388 -0
- package/dist/components/custom/grid-maestro.cjs +62 -0
- package/dist/components/custom/grid-maestro.d.ts +19 -0
- package/dist/components/custom/grid-maestro.js +22 -0
- package/dist/components/custom/page-header.cjs +92 -0
- package/dist/components/custom/page-header.d.ts +43 -0
- package/dist/components/custom/page-header.js +58 -0
- package/dist/components/custom/panel-delegate.cjs +285 -0
- package/dist/components/custom/panel-delegate.d.ts +34 -0
- package/dist/components/custom/panel-delegate.js +251 -0
- package/dist/components/custom/panel-flow.cjs +262 -0
- package/dist/components/custom/panel-flow.d.ts +38 -0
- package/dist/components/custom/panel-flow.js +225 -0
- package/dist/components/custom/panel-maestro.cjs +74 -0
- package/dist/components/custom/panel-maestro.d.ts +30 -0
- package/dist/components/custom/panel-maestro.js +40 -0
- package/dist/components/custom/panel-studio.cjs +122 -0
- package/dist/components/custom/panel-studio.d.ts +48 -0
- package/dist/components/custom/panel-studio.js +85 -0
- package/dist/components/custom/toolbar-canvas.cjs +124 -0
- package/dist/components/custom/toolbar-canvas.d.ts +15 -0
- package/dist/components/custom/toolbar-canvas.js +90 -0
- package/dist/components/custom/toolbar-view.cjs +121 -0
- package/dist/components/custom/toolbar-view.d.ts +14 -0
- package/dist/components/custom/toolbar-view.js +87 -0
- package/dist/components/custom/viewport-guard.cjs +92 -0
- package/dist/components/custom/viewport-guard.d.ts +23 -0
- package/dist/components/custom/viewport-guard.js +55 -0
- package/dist/components/forms/field-renderer.cjs +3 -1
- package/dist/components/forms/field-renderer.js +3 -1
- package/dist/components/forms/form-designer.cjs +13 -2
- package/dist/components/forms/form-designer.js +13 -2
- package/dist/components/forms/rules-engine.d.ts +1 -1
- package/dist/components/ui/breadcrumb.cjs +1 -2
- package/dist/components/ui/breadcrumb.js +1 -2
- package/dist/components/ui/button-group.cjs +5 -3
- package/dist/components/ui/button-group.d.ts +2 -2
- package/dist/components/ui/button-group.js +5 -3
- package/dist/components/ui/button.cjs +3 -3
- package/dist/components/ui/button.js +3 -3
- package/dist/components/ui/chart.cjs +223 -0
- package/dist/components/ui/chart.d.ts +40 -0
- package/dist/components/ui/chart.js +174 -0
- package/dist/components/ui/code-block.cjs +234 -0
- package/dist/components/ui/code-block.d.ts +48 -0
- package/dist/components/ui/code-block.js +200 -0
- package/dist/components/ui/data-table.cjs +22 -4
- package/dist/components/ui/data-table.d.ts +5 -2
- package/dist/components/ui/data-table.js +23 -5
- package/dist/components/ui/editable-cell.cjs +3 -10
- package/dist/components/ui/editable-cell.js +3 -10
- package/dist/components/ui/empty-state.cjs +17 -6
- package/dist/components/ui/empty-state.d.ts +7 -0
- package/dist/components/ui/empty-state.js +17 -6
- package/dist/components/ui/file-upload.cjs +8 -0
- package/dist/components/ui/file-upload.js +8 -0
- package/dist/components/ui/index.cjs +287 -147
- package/dist/components/ui/index.d.ts +2 -3
- package/dist/components/ui/index.js +2 -3
- package/dist/components/ui/multi-select.cjs +3 -10
- package/dist/components/ui/multi-select.js +3 -10
- package/dist/components/ui/pagination.cjs +0 -1
- package/dist/components/ui/pagination.js +0 -1
- package/dist/components/ui/resizable.d.ts +1 -1
- package/dist/components/ui/tree-view.cjs +1117 -0
- package/dist/components/ui/tree-view.d.ts +95 -0
- package/dist/components/ui/tree-view.js +1083 -0
- package/dist/foundation/Future/colors.cjs +92 -0
- package/dist/foundation/Future/colors.d.ts +132 -0
- package/dist/foundation/Future/colors.js +43 -0
- package/dist/foundation/Future/radius.cjs +46 -0
- package/dist/foundation/Future/radius.d.ts +33 -0
- package/dist/foundation/Future/radius.js +12 -0
- package/dist/foundation/Future/responsive.cjs +49 -0
- package/dist/foundation/Future/responsive.d.ts +40 -0
- package/dist/foundation/Future/responsive.js +12 -0
- package/dist/foundation/Future/shadows.cjs +48 -0
- package/dist/foundation/Future/shadows.d.ts +29 -0
- package/dist/foundation/Future/shadows.js +11 -0
- package/dist/foundation/Future/spacing.cjs +71 -0
- package/dist/foundation/Future/spacing.d.ts +80 -0
- package/dist/foundation/Future/spacing.js +31 -0
- package/dist/foundation/Future/strokes.cjs +59 -0
- package/dist/foundation/Future/strokes.d.ts +49 -0
- package/dist/foundation/Future/strokes.js +19 -0
- package/dist/foundation/Future/types.cjs +18 -0
- package/dist/foundation/Future/types.d.ts +25 -0
- package/dist/foundation/Future/types.js +0 -0
- package/dist/foundation/Future/typography.cjs +79 -0
- package/dist/foundation/Future/typography.d.ts +86 -0
- package/dist/foundation/Future/typography.js +33 -0
- package/dist/index.cjs +131 -221
- package/dist/index.d.ts +4 -3
- package/dist/index.js +3 -4
- package/dist/src/foundation/Future/themes.css +279 -0
- package/dist/styles.css +1941 -605
- package/dist/tailwind.css +874 -87
- package/dist/templates/Admin/settings-admin.d.ts +5 -0
- package/dist/templates/Admin/template-admin.d.ts +86 -0
- package/dist/templates/Delegate/template-delegate.d.ts +26 -0
- package/dist/templates/EmptyErrors/error-components.d.ts +3 -0
- package/dist/templates/Experiments/ideas-AnimatedGradientText.d.ts +23 -0
- package/dist/templates/Flow/template-flow.d.ts +57 -0
- package/dist/templates/Maestro/template-maestro.d.ts +52 -0
- package/dist/templates/Studio/template-studio.d.ts +102 -0
- package/dist/templates/{vscode-example.d.ts → VisualStudio/shell.d.ts} +1 -1
- package/package.json +12 -1
- package/dist/components/ui/menubar.cjs +0 -210
- package/dist/components/ui/menubar.d.ts +0 -28
- package/dist/components/ui/menubar.js +0 -131
- package/dist/components/ui/navigation-menu.cjs +0 -122
- package/dist/components/ui/navigation-menu.d.ts +0 -12
- package/dist/components/ui/navigation-menu.js +0 -64
- package/dist/examples/admin-layout-example.cjs +0 -490
- package/dist/examples/admin-layout-example.d.ts +0 -92
- package/dist/examples/admin-layout-example.js +0 -411
- package/dist/examples/app-shell-example.cjs +0 -452
- package/dist/examples/app-shell-example.d.ts +0 -52
- package/dist/examples/app-shell-example.js +0 -418
- package/dist/examples/dashboard-example.cjs +0 -590
- package/dist/examples/dashboard-example.d.ts +0 -11
- package/dist/examples/dashboard-example.js +0 -556
- package/dist/examples/data-management-example.cjs +0 -584
- package/dist/examples/data-management-example.d.ts +0 -1
- package/dist/examples/data-management-example.js +0 -550
- package/dist/examples/flow-editor-layout-example.cjs +0 -309
- package/dist/examples/flow-editor-layout-example.d.ts +0 -22
- package/dist/examples/flow-editor-layout-example.js +0 -269
- package/dist/examples/flow-start-example.cjs +0 -467
- package/dist/examples/flow-start-example.d.ts +0 -30
- package/dist/examples/flow-start-example.js +0 -433
- package/dist/examples/form-builder-example.cjs +0 -674
- package/dist/examples/form-builder-example.js +0 -640
- package/dist/examples/new-project-example.cjs +0 -550
- package/dist/examples/new-project-example.d.ts +0 -30
- package/dist/examples/new-project-example.js +0 -516
- package/dist/examples/settings-example.cjs +0 -864
- package/dist/examples/settings-example.d.ts +0 -1
- package/dist/examples/settings-example.js +0 -830
- package/dist/examples/vscode-example.cjs +0 -340
- package/dist/examples/vscode-example.d.ts +0 -80
- package/dist/examples/vscode-example.js +0 -270
- package/dist/templates/admin-layout-example.d.ts +0 -92
- package/dist/templates/app-shell-example.d.ts +0 -52
- package/dist/templates/dashboard-example.d.ts +0 -11
- package/dist/templates/data-management-example.d.ts +0 -1
- package/dist/templates/flow-editor-layout-example.d.ts +0 -22
- package/dist/templates/flow-start-example.d.ts +0 -30
- package/dist/templates/form-builder-example.d.ts +0 -1
- package/dist/templates/new-project-example.d.ts +0 -30
- package/dist/templates/settings-example.d.ts +0 -1
- /package/dist/{examples → templates/Forms}/form-builder-example.d.ts +0 -0
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
StudioPanelSelection: ()=>StudioPanelSelection,
|
|
28
|
+
StudioPanel: ()=>StudioPanel
|
|
29
|
+
});
|
|
30
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
31
|
+
const external_react_namespaceObject = require("react");
|
|
32
|
+
const external_lucide_react_namespaceObject = require("lucide-react");
|
|
33
|
+
const index_cjs_namespaceObject = require("../../lib/index.cjs");
|
|
34
|
+
const PANEL_DEFAULT_WIDTH = 340;
|
|
35
|
+
const PANEL_MIN_WIDTH = 200;
|
|
36
|
+
const PANEL_MAX_WIDTH = 460;
|
|
37
|
+
function StudioPanel({ side, children, className, isCollapsed: _isCollapsed = false }) {
|
|
38
|
+
const [width, setWidth] = external_react_namespaceObject.useState(PANEL_DEFAULT_WIDTH);
|
|
39
|
+
function handleMouseDown(e) {
|
|
40
|
+
e.preventDefault();
|
|
41
|
+
const startX = e.clientX;
|
|
42
|
+
const startWidth = width;
|
|
43
|
+
document.body.style.cursor = 'col-resize';
|
|
44
|
+
document.body.style.userSelect = 'none';
|
|
45
|
+
function onMouseMove(ev) {
|
|
46
|
+
const delta = 'left' === side ? ev.clientX - startX : startX - ev.clientX;
|
|
47
|
+
setWidth(Math.max(PANEL_MIN_WIDTH, Math.min(PANEL_MAX_WIDTH, startWidth + delta)));
|
|
48
|
+
}
|
|
49
|
+
function onMouseUp() {
|
|
50
|
+
document.body.style.cursor = '';
|
|
51
|
+
document.body.style.userSelect = '';
|
|
52
|
+
document.removeEventListener('mousemove', onMouseMove);
|
|
53
|
+
document.removeEventListener('mouseup', onMouseUp);
|
|
54
|
+
}
|
|
55
|
+
document.addEventListener('mousemove', onMouseMove);
|
|
56
|
+
document.addEventListener('mouseup', onMouseUp);
|
|
57
|
+
}
|
|
58
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
59
|
+
className: (0, index_cjs_namespaceObject.cn)('relative flex h-full shrink-0 flex-col overflow-hidden bg-surface', 'left' === side ? 'border-r border-border-subtle' : 'border-l border-border-subtle', className),
|
|
60
|
+
style: {
|
|
61
|
+
width
|
|
62
|
+
},
|
|
63
|
+
children: [
|
|
64
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
65
|
+
className: "flex-1 overflow-y-auto",
|
|
66
|
+
children: children
|
|
67
|
+
}),
|
|
68
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
69
|
+
role: "separator",
|
|
70
|
+
"aria-orientation": "vertical",
|
|
71
|
+
"aria-label": "Resize panel",
|
|
72
|
+
"aria-valuenow": width,
|
|
73
|
+
"aria-valuemin": PANEL_MIN_WIDTH,
|
|
74
|
+
"aria-valuemax": PANEL_MAX_WIDTH,
|
|
75
|
+
tabIndex: 0,
|
|
76
|
+
onMouseDown: handleMouseDown,
|
|
77
|
+
onKeyDown: (e)=>{
|
|
78
|
+
if ('ArrowLeft' === e.key || 'ArrowRight' === e.key) {
|
|
79
|
+
e.preventDefault();
|
|
80
|
+
const delta = 'ArrowLeft' === e.key ? -10 : 10;
|
|
81
|
+
const adjustedDelta = 'left' === side ? delta : -delta;
|
|
82
|
+
setWidth(Math.max(PANEL_MIN_WIDTH, Math.min(PANEL_MAX_WIDTH, width + adjustedDelta)));
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
className: (0, index_cjs_namespaceObject.cn)('absolute top-0 z-10 h-full w-1 cursor-col-resize transition-colors duration-150', 'hover:bg-brand/40 active:bg-brand/60', 'left' === side ? 'right-0' : 'left-0')
|
|
86
|
+
})
|
|
87
|
+
]
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
function StudioPanelSelection({ side: _side, onIconClick, activeIndex, className }) {
|
|
91
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
92
|
+
className: (0, index_cjs_namespaceObject.cn)('flex h-full w-12 shrink-0 flex-col items-center gap-6 overflow-hidden bg-surface pt-6', className),
|
|
93
|
+
children: Array.from({
|
|
94
|
+
length: 5
|
|
95
|
+
}, (_, i)=>{
|
|
96
|
+
const isActive = activeIndex === i;
|
|
97
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
|
|
98
|
+
type: "button",
|
|
99
|
+
onClick: ()=>onIconClick(i),
|
|
100
|
+
"aria-label": `Panel view ${i + 1}`,
|
|
101
|
+
"aria-pressed": isActive,
|
|
102
|
+
className: (0, index_cjs_namespaceObject.cn)('flex h-[18px] w-[18px] items-center justify-center rounded transition-colors', isActive ? 'bg-brand-subtle text-foreground-accent ring-1 ring-brand/30' : 'text-foreground-muted hover:bg-surface-hover hover:text-foreground'),
|
|
103
|
+
children: isActive ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.FolderOpen, {
|
|
104
|
+
className: "h-[18px] w-[18px]",
|
|
105
|
+
"aria-hidden": "true"
|
|
106
|
+
}) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Folder, {
|
|
107
|
+
className: "h-[18px] w-[18px]",
|
|
108
|
+
"aria-hidden": "true"
|
|
109
|
+
})
|
|
110
|
+
}, i);
|
|
111
|
+
})
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
exports.StudioPanel = __webpack_exports__.StudioPanel;
|
|
115
|
+
exports.StudioPanelSelection = __webpack_exports__.StudioPanelSelection;
|
|
116
|
+
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
117
|
+
"StudioPanel",
|
|
118
|
+
"StudioPanelSelection"
|
|
119
|
+
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
120
|
+
Object.defineProperty(exports, '__esModule', {
|
|
121
|
+
value: true
|
|
122
|
+
});
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface StudioPanelProps {
|
|
3
|
+
/** Controls which side border and resize handle are applied */
|
|
4
|
+
side: 'left' | 'right';
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
/** Reserved for future collapse behavior — not currently used for styling */
|
|
8
|
+
isCollapsed?: boolean;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Resizable panel container for the Studio template.
|
|
12
|
+
*
|
|
13
|
+
* - Default width 296px, resizable from 200px to 460px by dragging the inner edge
|
|
14
|
+
* - Applies a border on the inner edge (right for left panel, left for right panel)
|
|
15
|
+
* - No built-in toggle button — visibility is controlled by the parent template
|
|
16
|
+
*/
|
|
17
|
+
export declare function StudioPanel({ side, children, className, isCollapsed: _isCollapsed, }: StudioPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export interface StudioPanelSelectionProps {
|
|
19
|
+
/** Semantic side — not currently used for styling */
|
|
20
|
+
side: 'left' | 'right';
|
|
21
|
+
/**
|
|
22
|
+
* Called with the 0-based index of the clicked icon.
|
|
23
|
+
* Use this to switch the active panel view or toggle visibility.
|
|
24
|
+
*/
|
|
25
|
+
onIconClick: (index: number) => void;
|
|
26
|
+
/**
|
|
27
|
+
* Index of the currently active icon (0–4).
|
|
28
|
+
* That icon receives the active highlight style and `aria-pressed="true"`.
|
|
29
|
+
* Pass `undefined` (or omit) when no view is selected (panel hidden).
|
|
30
|
+
*/
|
|
31
|
+
activeIndex?: number;
|
|
32
|
+
className?: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Vertical icon rail for the Studio template.
|
|
36
|
+
*
|
|
37
|
+
* Renders 5 icon buttons stacked top-to-bottom. Each button calls
|
|
38
|
+
* `onIconClick(index)` so the parent can switch to a specific panel view
|
|
39
|
+
* or toggle visibility. The active icon is highlighted via `activeIndex`.
|
|
40
|
+
*
|
|
41
|
+
* The rail is always visible regardless of whether its paired `StudioPanel`
|
|
42
|
+
* is shown. Pass `className="border-r border-border-subtle"` for the left
|
|
43
|
+
* rail or `"border-l border-border-subtle"` for the right rail.
|
|
44
|
+
*
|
|
45
|
+
* The placeholder icon can be replaced with your `icon-panel-select.svg`
|
|
46
|
+
* by swapping `<PanelSelectIcon />` with an `<img>` pointing to that asset.
|
|
47
|
+
*/
|
|
48
|
+
export declare function StudioPanelSelection({ side: _side, onIconClick, activeIndex, className, }: StudioPanelSelectionProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { Folder, FolderOpen } from "lucide-react";
|
|
4
|
+
import { cn } from "../../lib/index.js";
|
|
5
|
+
const PANEL_DEFAULT_WIDTH = 340;
|
|
6
|
+
const PANEL_MIN_WIDTH = 200;
|
|
7
|
+
const PANEL_MAX_WIDTH = 460;
|
|
8
|
+
function StudioPanel({ side, children, className, isCollapsed: _isCollapsed = false }) {
|
|
9
|
+
const [width, setWidth] = useState(PANEL_DEFAULT_WIDTH);
|
|
10
|
+
function handleMouseDown(e) {
|
|
11
|
+
e.preventDefault();
|
|
12
|
+
const startX = e.clientX;
|
|
13
|
+
const startWidth = width;
|
|
14
|
+
document.body.style.cursor = 'col-resize';
|
|
15
|
+
document.body.style.userSelect = 'none';
|
|
16
|
+
function onMouseMove(ev) {
|
|
17
|
+
const delta = 'left' === side ? ev.clientX - startX : startX - ev.clientX;
|
|
18
|
+
setWidth(Math.max(PANEL_MIN_WIDTH, Math.min(PANEL_MAX_WIDTH, startWidth + delta)));
|
|
19
|
+
}
|
|
20
|
+
function onMouseUp() {
|
|
21
|
+
document.body.style.cursor = '';
|
|
22
|
+
document.body.style.userSelect = '';
|
|
23
|
+
document.removeEventListener('mousemove', onMouseMove);
|
|
24
|
+
document.removeEventListener('mouseup', onMouseUp);
|
|
25
|
+
}
|
|
26
|
+
document.addEventListener('mousemove', onMouseMove);
|
|
27
|
+
document.addEventListener('mouseup', onMouseUp);
|
|
28
|
+
}
|
|
29
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
30
|
+
className: cn('relative flex h-full shrink-0 flex-col overflow-hidden bg-surface', 'left' === side ? 'border-r border-border-subtle' : 'border-l border-border-subtle', className),
|
|
31
|
+
style: {
|
|
32
|
+
width
|
|
33
|
+
},
|
|
34
|
+
children: [
|
|
35
|
+
/*#__PURE__*/ jsx("div", {
|
|
36
|
+
className: "flex-1 overflow-y-auto",
|
|
37
|
+
children: children
|
|
38
|
+
}),
|
|
39
|
+
/*#__PURE__*/ jsx("div", {
|
|
40
|
+
role: "separator",
|
|
41
|
+
"aria-orientation": "vertical",
|
|
42
|
+
"aria-label": "Resize panel",
|
|
43
|
+
"aria-valuenow": width,
|
|
44
|
+
"aria-valuemin": PANEL_MIN_WIDTH,
|
|
45
|
+
"aria-valuemax": PANEL_MAX_WIDTH,
|
|
46
|
+
tabIndex: 0,
|
|
47
|
+
onMouseDown: handleMouseDown,
|
|
48
|
+
onKeyDown: (e)=>{
|
|
49
|
+
if ('ArrowLeft' === e.key || 'ArrowRight' === e.key) {
|
|
50
|
+
e.preventDefault();
|
|
51
|
+
const delta = 'ArrowLeft' === e.key ? -10 : 10;
|
|
52
|
+
const adjustedDelta = 'left' === side ? delta : -delta;
|
|
53
|
+
setWidth(Math.max(PANEL_MIN_WIDTH, Math.min(PANEL_MAX_WIDTH, width + adjustedDelta)));
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
className: cn('absolute top-0 z-10 h-full w-1 cursor-col-resize transition-colors duration-150', 'hover:bg-brand/40 active:bg-brand/60', 'left' === side ? 'right-0' : 'left-0')
|
|
57
|
+
})
|
|
58
|
+
]
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
function StudioPanelSelection({ side: _side, onIconClick, activeIndex, className }) {
|
|
62
|
+
return /*#__PURE__*/ jsx("div", {
|
|
63
|
+
className: cn('flex h-full w-12 shrink-0 flex-col items-center gap-6 overflow-hidden bg-surface pt-6', className),
|
|
64
|
+
children: Array.from({
|
|
65
|
+
length: 5
|
|
66
|
+
}, (_, i)=>{
|
|
67
|
+
const isActive = activeIndex === i;
|
|
68
|
+
return /*#__PURE__*/ jsx("button", {
|
|
69
|
+
type: "button",
|
|
70
|
+
onClick: ()=>onIconClick(i),
|
|
71
|
+
"aria-label": `Panel view ${i + 1}`,
|
|
72
|
+
"aria-pressed": isActive,
|
|
73
|
+
className: cn('flex h-[18px] w-[18px] items-center justify-center rounded transition-colors', isActive ? 'bg-brand-subtle text-foreground-accent ring-1 ring-brand/30' : 'text-foreground-muted hover:bg-surface-hover hover:text-foreground'),
|
|
74
|
+
children: isActive ? /*#__PURE__*/ jsx(FolderOpen, {
|
|
75
|
+
className: "h-[18px] w-[18px]",
|
|
76
|
+
"aria-hidden": "true"
|
|
77
|
+
}) : /*#__PURE__*/ jsx(Folder, {
|
|
78
|
+
className: "h-[18px] w-[18px]",
|
|
79
|
+
"aria-hidden": "true"
|
|
80
|
+
})
|
|
81
|
+
}, i);
|
|
82
|
+
})
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
export { StudioPanel, StudioPanelSelection };
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
FlowCanvasToolbar: ()=>FlowCanvasToolbar
|
|
28
|
+
});
|
|
29
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
30
|
+
require("react");
|
|
31
|
+
const external_lucide_react_namespaceObject = require("lucide-react");
|
|
32
|
+
const index_cjs_namespaceObject = require("../../lib/index.cjs");
|
|
33
|
+
function ToolbarSeparator() {
|
|
34
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
35
|
+
className: "h-8 w-px bg-border-subtle"
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
function ToolbarButton({ icon, label, onClick }) {
|
|
39
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
|
|
40
|
+
type: "button",
|
|
41
|
+
className: "flex h-8 w-8 items-center justify-center rounded-lg text-foreground-muted transition-colors hover:text-foreground",
|
|
42
|
+
onClick: onClick,
|
|
43
|
+
"aria-label": label,
|
|
44
|
+
children: icon
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
function FlowCanvasToolbar({ className, activeMode = 'build', onModeChange }) {
|
|
48
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
49
|
+
className: (0, index_cjs_namespaceObject.cn)('flex h-[60px] items-center gap-2 rounded-3xl border border-border bg-surface-raised px-2.5', className),
|
|
50
|
+
children: [
|
|
51
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
52
|
+
className: "flex h-10 items-center rounded-xl border border-border-deep bg-surface-overlay p-1",
|
|
53
|
+
children: [
|
|
54
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("button", {
|
|
55
|
+
type: "button",
|
|
56
|
+
className: (0, index_cjs_namespaceObject.cn)('flex h-8 items-center gap-2 rounded-[10px] px-3 py-2 text-sm font-medium leading-5 transition-colors', 'build' === activeMode ? 'border border-border bg-surface text-foreground' : 'text-foreground-subtle hover:text-foreground-hover'),
|
|
57
|
+
onClick: ()=>onModeChange?.('build'),
|
|
58
|
+
children: [
|
|
59
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Workflow, {
|
|
60
|
+
className: "h-5 w-5"
|
|
61
|
+
}),
|
|
62
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
63
|
+
children: "Build"
|
|
64
|
+
})
|
|
65
|
+
]
|
|
66
|
+
}),
|
|
67
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("button", {
|
|
68
|
+
type: "button",
|
|
69
|
+
className: (0, index_cjs_namespaceObject.cn)('flex h-8 items-center gap-2 rounded-[10px] px-3 py-2 text-sm font-medium leading-5 transition-colors', 'evaluate' === activeMode ? 'border border-border bg-surface text-foreground' : 'text-foreground-subtle hover:text-foreground-hover'),
|
|
70
|
+
onClick: ()=>onModeChange?.('evaluate'),
|
|
71
|
+
children: [
|
|
72
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ListChecks, {
|
|
73
|
+
className: "h-5 w-5"
|
|
74
|
+
}),
|
|
75
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
76
|
+
children: "Evaluate"
|
|
77
|
+
})
|
|
78
|
+
]
|
|
79
|
+
})
|
|
80
|
+
]
|
|
81
|
+
}),
|
|
82
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ToolbarSeparator, {}),
|
|
83
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ToolbarButton, {
|
|
84
|
+
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Undo2, {
|
|
85
|
+
className: "h-5 w-5"
|
|
86
|
+
}),
|
|
87
|
+
label: "Undo"
|
|
88
|
+
}),
|
|
89
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ToolbarButton, {
|
|
90
|
+
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Redo2, {
|
|
91
|
+
className: "h-5 w-5"
|
|
92
|
+
}),
|
|
93
|
+
label: "Redo"
|
|
94
|
+
}),
|
|
95
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ToolbarSeparator, {}),
|
|
96
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ToolbarButton, {
|
|
97
|
+
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Play, {
|
|
98
|
+
className: "h-5 w-5"
|
|
99
|
+
}),
|
|
100
|
+
label: "Run"
|
|
101
|
+
}),
|
|
102
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ToolbarSeparator, {}),
|
|
103
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ToolbarButton, {
|
|
104
|
+
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Plus, {
|
|
105
|
+
className: "h-5 w-5"
|
|
106
|
+
}),
|
|
107
|
+
label: "Add node"
|
|
108
|
+
}),
|
|
109
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ToolbarButton, {
|
|
110
|
+
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.StickyNote, {
|
|
111
|
+
className: "h-5 w-5"
|
|
112
|
+
}),
|
|
113
|
+
label: "Add note"
|
|
114
|
+
})
|
|
115
|
+
]
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
exports.FlowCanvasToolbar = __webpack_exports__.FlowCanvasToolbar;
|
|
119
|
+
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
120
|
+
"FlowCanvasToolbar"
|
|
121
|
+
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
122
|
+
Object.defineProperty(exports, '__esModule', {
|
|
123
|
+
value: true
|
|
124
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface CanvasToolbarProps {
|
|
2
|
+
className?: string;
|
|
3
|
+
/** Active mode: 'build' | 'evaluate' */
|
|
4
|
+
activeMode?: 'build' | 'evaluate';
|
|
5
|
+
/** Callback when mode changes */
|
|
6
|
+
onModeChange?: (mode: 'build' | 'evaluate') => void;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Bottom-center toolbar for the Flow canvas.
|
|
10
|
+
*
|
|
11
|
+
* Contains a Build/Evaluate toggle, undo/redo, play, add, and sticky note
|
|
12
|
+
* buttons. Anchored to bottom-center via absolute positioning in the
|
|
13
|
+
* parent layout.
|
|
14
|
+
*/
|
|
15
|
+
export declare function FlowCanvasToolbar({ className, activeMode, onModeChange, }: CanvasToolbarProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { ListChecks, Play, Plus, Redo2, StickyNote, Undo2, Workflow } from "lucide-react";
|
|
4
|
+
import { cn } from "../../lib/index.js";
|
|
5
|
+
function ToolbarSeparator() {
|
|
6
|
+
return /*#__PURE__*/ jsx("div", {
|
|
7
|
+
className: "h-8 w-px bg-border-subtle"
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
function ToolbarButton({ icon, label, onClick }) {
|
|
11
|
+
return /*#__PURE__*/ jsx("button", {
|
|
12
|
+
type: "button",
|
|
13
|
+
className: "flex h-8 w-8 items-center justify-center rounded-lg text-foreground-muted transition-colors hover:text-foreground",
|
|
14
|
+
onClick: onClick,
|
|
15
|
+
"aria-label": label,
|
|
16
|
+
children: icon
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
function FlowCanvasToolbar({ className, activeMode = 'build', onModeChange }) {
|
|
20
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
21
|
+
className: cn('flex h-[60px] items-center gap-2 rounded-3xl border border-border bg-surface-raised px-2.5', className),
|
|
22
|
+
children: [
|
|
23
|
+
/*#__PURE__*/ jsxs("div", {
|
|
24
|
+
className: "flex h-10 items-center rounded-xl border border-border-deep bg-surface-overlay p-1",
|
|
25
|
+
children: [
|
|
26
|
+
/*#__PURE__*/ jsxs("button", {
|
|
27
|
+
type: "button",
|
|
28
|
+
className: cn('flex h-8 items-center gap-2 rounded-[10px] px-3 py-2 text-sm font-medium leading-5 transition-colors', 'build' === activeMode ? 'border border-border bg-surface text-foreground' : 'text-foreground-subtle hover:text-foreground-hover'),
|
|
29
|
+
onClick: ()=>onModeChange?.('build'),
|
|
30
|
+
children: [
|
|
31
|
+
/*#__PURE__*/ jsx(Workflow, {
|
|
32
|
+
className: "h-5 w-5"
|
|
33
|
+
}),
|
|
34
|
+
/*#__PURE__*/ jsx("span", {
|
|
35
|
+
children: "Build"
|
|
36
|
+
})
|
|
37
|
+
]
|
|
38
|
+
}),
|
|
39
|
+
/*#__PURE__*/ jsxs("button", {
|
|
40
|
+
type: "button",
|
|
41
|
+
className: cn('flex h-8 items-center gap-2 rounded-[10px] px-3 py-2 text-sm font-medium leading-5 transition-colors', 'evaluate' === activeMode ? 'border border-border bg-surface text-foreground' : 'text-foreground-subtle hover:text-foreground-hover'),
|
|
42
|
+
onClick: ()=>onModeChange?.('evaluate'),
|
|
43
|
+
children: [
|
|
44
|
+
/*#__PURE__*/ jsx(ListChecks, {
|
|
45
|
+
className: "h-5 w-5"
|
|
46
|
+
}),
|
|
47
|
+
/*#__PURE__*/ jsx("span", {
|
|
48
|
+
children: "Evaluate"
|
|
49
|
+
})
|
|
50
|
+
]
|
|
51
|
+
})
|
|
52
|
+
]
|
|
53
|
+
}),
|
|
54
|
+
/*#__PURE__*/ jsx(ToolbarSeparator, {}),
|
|
55
|
+
/*#__PURE__*/ jsx(ToolbarButton, {
|
|
56
|
+
icon: /*#__PURE__*/ jsx(Undo2, {
|
|
57
|
+
className: "h-5 w-5"
|
|
58
|
+
}),
|
|
59
|
+
label: "Undo"
|
|
60
|
+
}),
|
|
61
|
+
/*#__PURE__*/ jsx(ToolbarButton, {
|
|
62
|
+
icon: /*#__PURE__*/ jsx(Redo2, {
|
|
63
|
+
className: "h-5 w-5"
|
|
64
|
+
}),
|
|
65
|
+
label: "Redo"
|
|
66
|
+
}),
|
|
67
|
+
/*#__PURE__*/ jsx(ToolbarSeparator, {}),
|
|
68
|
+
/*#__PURE__*/ jsx(ToolbarButton, {
|
|
69
|
+
icon: /*#__PURE__*/ jsx(Play, {
|
|
70
|
+
className: "h-5 w-5"
|
|
71
|
+
}),
|
|
72
|
+
label: "Run"
|
|
73
|
+
}),
|
|
74
|
+
/*#__PURE__*/ jsx(ToolbarSeparator, {}),
|
|
75
|
+
/*#__PURE__*/ jsx(ToolbarButton, {
|
|
76
|
+
icon: /*#__PURE__*/ jsx(Plus, {
|
|
77
|
+
className: "h-5 w-5"
|
|
78
|
+
}),
|
|
79
|
+
label: "Add node"
|
|
80
|
+
}),
|
|
81
|
+
/*#__PURE__*/ jsx(ToolbarButton, {
|
|
82
|
+
icon: /*#__PURE__*/ jsx(StickyNote, {
|
|
83
|
+
className: "h-5 w-5"
|
|
84
|
+
}),
|
|
85
|
+
label: "Add note"
|
|
86
|
+
})
|
|
87
|
+
]
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
export { FlowCanvasToolbar };
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
FlowViewToolbar: ()=>FlowViewToolbar
|
|
28
|
+
});
|
|
29
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
30
|
+
require("react");
|
|
31
|
+
const external_lucide_react_namespaceObject = require("lucide-react");
|
|
32
|
+
const index_cjs_namespaceObject = require("../../lib/index.cjs");
|
|
33
|
+
function ViewButton({ icon, label, isActive, onClick }) {
|
|
34
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
|
|
35
|
+
type: "button",
|
|
36
|
+
className: (0, index_cjs_namespaceObject.cn)('flex h-8 w-8 items-center justify-center rounded-lg text-foreground-muted transition-colors hover:text-foreground', isActive && 'rounded-2xl border border-border bg-surface text-foreground'),
|
|
37
|
+
onClick: onClick,
|
|
38
|
+
"aria-label": label,
|
|
39
|
+
children: icon
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
function NodeSizeIcon({ size, isActive }) {
|
|
43
|
+
const label = {
|
|
44
|
+
s: 'S',
|
|
45
|
+
m: 'M',
|
|
46
|
+
l: 'L'
|
|
47
|
+
}[size];
|
|
48
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
|
|
49
|
+
type: "button",
|
|
50
|
+
className: (0, index_cjs_namespaceObject.cn)('flex h-8 w-8 items-center justify-center rounded-2xl text-xs font-bold text-foreground-muted transition-colors hover:text-foreground', isActive && 'border border-border bg-surface text-foreground'),
|
|
51
|
+
"aria-label": `Node size ${label}`,
|
|
52
|
+
children: label
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
function FlowViewToolbar({ className, activeNodeSize = 's', onAction }) {
|
|
56
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
57
|
+
className: (0, index_cjs_namespaceObject.cn)('flex flex-col gap-4', className),
|
|
58
|
+
children: [
|
|
59
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
60
|
+
className: "flex w-10 flex-col items-center gap-1 rounded-xl bg-surface-raised p-1",
|
|
61
|
+
children: [
|
|
62
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ViewButton, {
|
|
63
|
+
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ZoomIn, {
|
|
64
|
+
className: "h-5 w-5"
|
|
65
|
+
}),
|
|
66
|
+
label: "Zoom in",
|
|
67
|
+
onClick: ()=>onAction?.('zoom-in')
|
|
68
|
+
}),
|
|
69
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ViewButton, {
|
|
70
|
+
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ZoomOut, {
|
|
71
|
+
className: "h-5 w-5"
|
|
72
|
+
}),
|
|
73
|
+
label: "Zoom out",
|
|
74
|
+
onClick: ()=>onAction?.('zoom-out')
|
|
75
|
+
}),
|
|
76
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
77
|
+
className: "h-px w-6 bg-border-subtle"
|
|
78
|
+
}),
|
|
79
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ViewButton, {
|
|
80
|
+
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Maximize2, {
|
|
81
|
+
className: "h-5 w-5"
|
|
82
|
+
}),
|
|
83
|
+
label: "Fit to screen",
|
|
84
|
+
onClick: ()=>onAction?.('fit')
|
|
85
|
+
}),
|
|
86
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ViewButton, {
|
|
87
|
+
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.LayoutGrid, {
|
|
88
|
+
className: "h-5 w-5"
|
|
89
|
+
}),
|
|
90
|
+
label: "Toggle grid",
|
|
91
|
+
onClick: ()=>onAction?.('grid')
|
|
92
|
+
})
|
|
93
|
+
]
|
|
94
|
+
}),
|
|
95
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
96
|
+
className: "flex w-10 flex-col items-center gap-2 rounded-[20px] border border-border-deep bg-surface-raised p-1",
|
|
97
|
+
children: [
|
|
98
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(NodeSizeIcon, {
|
|
99
|
+
size: "s",
|
|
100
|
+
isActive: 's' === activeNodeSize
|
|
101
|
+
}),
|
|
102
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(NodeSizeIcon, {
|
|
103
|
+
size: "m",
|
|
104
|
+
isActive: 'm' === activeNodeSize
|
|
105
|
+
}),
|
|
106
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(NodeSizeIcon, {
|
|
107
|
+
size: "l",
|
|
108
|
+
isActive: 'l' === activeNodeSize
|
|
109
|
+
})
|
|
110
|
+
]
|
|
111
|
+
})
|
|
112
|
+
]
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
exports.FlowViewToolbar = __webpack_exports__.FlowViewToolbar;
|
|
116
|
+
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
117
|
+
"FlowViewToolbar"
|
|
118
|
+
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
119
|
+
Object.defineProperty(exports, '__esModule', {
|
|
120
|
+
value: true
|
|
121
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface ViewToolbarProps {
|
|
2
|
+
className?: string;
|
|
3
|
+
/** Active node size: 's' | 'm' | 'l' */
|
|
4
|
+
activeNodeSize?: 's' | 'm' | 'l';
|
|
5
|
+
/** Callback for zoom/view actions */
|
|
6
|
+
onAction?: (action: string) => void;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Bottom-right view controls for the Flow canvas.
|
|
10
|
+
*
|
|
11
|
+
* Contains zoom in/out, fit-to-screen, grid toggle, and node size selector.
|
|
12
|
+
* Anchored to bottom-right via absolute positioning in the parent layout.
|
|
13
|
+
*/
|
|
14
|
+
export declare function FlowViewToolbar({ className, activeNodeSize, onAction, }: ViewToolbarProps): import("react/jsx-runtime").JSX.Element;
|