@universal-workflow/widget-react 0.1.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/README.md +59 -0
- package/dist/index.css +3 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.mts +32 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +2 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +45 -0
package/README.md
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# @universal-workflow/widget-react
|
|
2
|
+
|
|
3
|
+
React components and SDK for the Universal Workflow system.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- Full Workflow Builder UI
|
|
8
|
+
- Embeddable floating widgets
|
|
9
|
+
- Type-safe ApiClient and LicenseManager
|
|
10
|
+
- Support for CJS, ESM, and TypeScript
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npm install @universal-workflow/widget-react
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
### Workflow Builder
|
|
21
|
+
|
|
22
|
+
```tsx
|
|
23
|
+
import { WorkflowBuilder } from "@universal-workflow/widget-react";
|
|
24
|
+
import "@universal-workflow/widget-react/dist/index.css";
|
|
25
|
+
|
|
26
|
+
function App() {
|
|
27
|
+
const apiConfig = {
|
|
28
|
+
baseUrl: "https://api.your-system.com",
|
|
29
|
+
endpoints: {
|
|
30
|
+
create: "/workflows",
|
|
31
|
+
update: "/workflows/:id",
|
|
32
|
+
get: "/workflows/:id",
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
return <WorkflowBuilder licenseKey="YOUR_KEY" apiConfig={apiConfig} />;
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Embeddable Widget
|
|
41
|
+
|
|
42
|
+
```tsx
|
|
43
|
+
import { EmbeddableWidget } from "@universal-workflow/widget-react";
|
|
44
|
+
import "@universal-workflow/widget-react/dist/index.css";
|
|
45
|
+
|
|
46
|
+
function App() {
|
|
47
|
+
return (
|
|
48
|
+
<EmbeddableWidget
|
|
49
|
+
licenseKey="YOUR_KEY"
|
|
50
|
+
apiConfig={apiConfig}
|
|
51
|
+
position="bottom-right"
|
|
52
|
+
/>
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Documentation
|
|
58
|
+
|
|
59
|
+
For more details, visit our [documentation portal](https://docs.universal-workflow.com).
|
package/dist/index.css
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
@layer properties;.react-flow{direction:ltr}.react-flow__container{position:absolute;width:100%;height:100%;top:0;left:0}.react-flow__pane{z-index:1;cursor:grab}.react-flow__pane.selection{cursor:pointer}.react-flow__pane.dragging{cursor:grabbing}.react-flow__viewport{transform-origin:0 0;z-index:2;pointer-events:none}.react-flow__renderer{z-index:4}.react-flow__selection{z-index:6}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible{outline:none}.react-flow .react-flow__edges{pointer-events:none;overflow:visible}.react-flow__edge-path,.react-flow__connection-path{stroke:#b1b1b7;stroke-width:1;fill:none}.react-flow__edge{pointer-events:visibleStroke;cursor:pointer}.react-flow__edge.animated path{stroke-dasharray:5;animation:dashdraw .5s linear infinite}.react-flow__edge.animated path.react-flow__edge-interaction{stroke-dasharray:none;animation:none}.react-flow__edge.inactive{pointer-events:none}.react-flow__edge.selected,.react-flow__edge:focus,.react-flow__edge:focus-visible{outline:none}.react-flow__edge.selected .react-flow__edge-path,.react-flow__edge:focus .react-flow__edge-path,.react-flow__edge:focus-visible .react-flow__edge-path{stroke:#555}.react-flow__edge-textwrapper{pointer-events:all}.react-flow__edge-textbg{fill:#fff}.react-flow__edge .react-flow__edge-text{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__connection{pointer-events:none}.react-flow__connection .animated{stroke-dasharray:5;animation:dashdraw .5s linear infinite}.react-flow__connectionline{z-index:1001}.react-flow__nodes{pointer-events:none;transform-origin:0 0}.react-flow__node{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:grab}.react-flow__node.dragging{cursor:grabbing}.react-flow__nodesselection{z-index:3;transform-origin:left top;pointer-events:none}.react-flow__nodesselection-rect{position:absolute;pointer-events:all;cursor:grab}.react-flow__handle{position:absolute;pointer-events:none;min-width:5px;min-height:5px;width:6px;height:6px;background:#1a192b;border:1px solid white;border-radius:100%}.react-flow__handle.connectionindicator{pointer-events:all;cursor:crosshair}.react-flow__handle-bottom{top:auto;left:50%;bottom:-4px;transform:translate(-50%)}.react-flow__handle-top{left:50%;top:-4px;transform:translate(-50%)}.react-flow__handle-left{top:50%;left:-4px;transform:translateY(-50%)}.react-flow__handle-right{right:-4px;top:50%;transform:translateY(-50%)}.react-flow__edgeupdater{cursor:move;pointer-events:all}.react-flow__panel{position:absolute;z-index:5;margin:15px}.react-flow__panel.top{top:0}.react-flow__panel.bottom{bottom:0}.react-flow__panel.left{left:0}.react-flow__panel.right{right:0}.react-flow__panel.center{left:50%;transform:translate(-50%)}.react-flow__attribution{font-size:10px;background:#ffffff80;padding:2px 3px;margin:0}.react-flow__attribution a{text-decoration:none;color:#999}@keyframes dashdraw{0%{stroke-dashoffset:10}}.react-flow__edgelabel-renderer{position:absolute;width:100%;height:100%;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__edge.updating .react-flow__edge-path{stroke:#777}.react-flow__edge-text{font-size:10px}.react-flow__node.selectable:focus,.react-flow__node.selectable:focus-visible{outline:none}.react-flow__node-default,.react-flow__node-input,.react-flow__node-output,.react-flow__node-group{padding:10px;border-radius:3px;width:150px;font-size:12px;color:#222;text-align:center;border-width:1px;border-style:solid;border-color:#1a192b;background-color:#fff}.react-flow__node-default.selectable:hover,.react-flow__node-input.selectable:hover,.react-flow__node-output.selectable:hover,.react-flow__node-group.selectable:hover{box-shadow:0 1px 4px 1px #00000014}.react-flow__node-default.selectable.selected,.react-flow__node-default.selectable:focus,.react-flow__node-default.selectable:focus-visible,.react-flow__node-input.selectable.selected,.react-flow__node-input.selectable:focus,.react-flow__node-input.selectable:focus-visible,.react-flow__node-output.selectable.selected,.react-flow__node-output.selectable:focus,.react-flow__node-output.selectable:focus-visible,.react-flow__node-group.selectable.selected,.react-flow__node-group.selectable:focus,.react-flow__node-group.selectable:focus-visible{box-shadow:0 0 0 .5px #1a192b}.react-flow__node-group{background-color:#f0f0f040}.react-flow__nodesselection-rect,.react-flow__selection{background:#0059dc14;border:1px dotted rgba(0,89,220,.8)}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible,.react-flow__selection:focus,.react-flow__selection:focus-visible{outline:none}.react-flow__controls{box-shadow:0 0 2px 1px #00000014}.react-flow__controls-button{border:none;background:#fefefe;border-bottom:1px solid #eee;box-sizing:content-box;display:flex;justify-content:center;align-items:center;width:16px;height:16px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;padding:5px}.react-flow__controls-button:hover{background:#f4f4f4}.react-flow__controls-button svg{width:100%;max-width:12px;max-height:12px}.react-flow__controls-button:disabled{pointer-events:none}.react-flow__controls-button:disabled svg{fill-opacity:.4}.react-flow__minimap{background-color:#fff}.react-flow__minimap svg{display:block}.react-flow__resize-control{position:absolute}.react-flow__resize-control.left,.react-flow__resize-control.right{cursor:ew-resize}.react-flow__resize-control.top,.react-flow__resize-control.bottom{cursor:ns-resize}.react-flow__resize-control.top.left,.react-flow__resize-control.bottom.right{cursor:nwse-resize}.react-flow__resize-control.bottom.left,.react-flow__resize-control.top.right{cursor:nesw-resize}.react-flow__resize-control.handle{width:4px;height:4px;border:1px solid #fff;border-radius:1px;background-color:#3367d9;transform:translate(-50%,-50%)}.react-flow__resize-control.handle.left{left:0;top:50%}.react-flow__resize-control.handle.right{left:100%;top:50%}.react-flow__resize-control.handle.top{left:50%;top:0}.react-flow__resize-control.handle.bottom{left:50%;top:100%}.react-flow__resize-control.handle.top.left,.react-flow__resize-control.handle.bottom.left{left:0}.react-flow__resize-control.handle.top.right,.react-flow__resize-control.handle.bottom.right{left:100%}.react-flow__resize-control.line{border-color:#3367d9;border-width:0;border-style:solid}.react-flow__resize-control.line.left,.react-flow__resize-control.line.right{width:1px;transform:translate(-50%);top:0;height:100%}.react-flow__resize-control.line.left{left:0;border-left-width:1px}.react-flow__resize-control.line.right{left:100%;border-right-width:1px}.react-flow__resize-control.line.top,.react-flow__resize-control.line.bottom{height:1px;transform:translateY(-50%);left:0;width:100%}.react-flow__resize-control.line.top{top:0;border-top-width:1px}.react-flow__resize-control.line.bottom{border-bottom-width:1px;top:100%}.pointer-events-none{pointer-events:none}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.top-1\/2{top:50%}.left-1\/2{left:50%}.-z-10{z-index:-10}.z-50{z-index:50}.z-\[100\]{z-index:100}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.h-\[600px\]{height:600px}.h-\[800px\]{height:800px}.h-full{height:100%}.max-h-\[70vh\]{max-height:70vh}.w-\[600px\]{width:600px}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.max-w-\[140px\]{max-width:140px}.min-w-\[200px\]{min-width:200px}.min-w-\[240px\]{min-width:240px}.flex-1{flex:1}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.scale-95{--tw-scale-x: 95%;--tw-scale-y: 95%;--tw-scale-z: 95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-100{--tw-scale-x: 100%;--tw-scale-y: 100%;--tw-scale-z: 100%;scale:var(--tw-scale-x) var(--tw-scale-y)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.cursor-pointer{cursor:pointer}.resize-y{resize:vertical}.list-none{list-style-type:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded-full{border-radius:calc(infinity * 1px)}.\!border-2{border-style:var(--tw-border-style)!important;border-width:2px!important}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-none{--tw-border-style: none;border-style:none}.border-transparent{border-color:transparent}.border-t-transparent{border-top-color:transparent}.bg-transparent{background-color:transparent}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.text-\[10px\]{font-size:10px}.leading-none{--tw-leading: 1;line-height:1}.uppercase{text-transform:uppercase}.opacity-0{opacity:0%}.opacity-100{opacity:100%}.ring-2{--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-4{--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease, ease);transition-duration:var(--tw-duration, 0s)}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease, ease);transition-duration:var(--tw-duration, 0s)}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease, ease);transition-duration:var(--tw-duration, 0s)}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease, ease);transition-duration:var(--tw-duration, 0s)}.duration-200{--tw-duration: .2s;transition-duration:.2s}.duration-300{--tw-duration: .3s;transition-duration:.3s}.outline-none{--tw-outline-style: none;outline-style:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.group-open\:rotate-180{&:is(:where(.group):is([open],:popover-open,:open) *){rotate:180deg}}.hover\:scale-125{&:hover{@media(hover:hover){--tw-scale-x: 125%;--tw-scale-y: 125%;--tw-scale-z: 125%;scale:var(--tw-scale-x) var(--tw-scale-y)}}}.hover\:opacity-70{&:hover{@media(hover:hover){opacity:70%}}}.focus\:ring-2{&:focus{--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\:outline-none{&:focus{--tw-outline-style: none;outline-style:none}}.disabled\:cursor-not-allowed{&:disabled{cursor:not-allowed}}.disabled\:opacity-30{&:disabled{opacity:30%}}.disabled\:opacity-70{&:disabled{opacity:70%}}@property --tw-translate-x{syntax: "*"; inherits: false; initial-value: 0;}@property --tw-translate-y{syntax: "*"; inherits: false; initial-value: 0;}@property --tw-translate-z{syntax: "*"; inherits: false; initial-value: 0;}@property --tw-scale-x{syntax: "*"; inherits: false; initial-value: 1;}@property --tw-scale-y{syntax: "*"; inherits: false; initial-value: 1;}@property --tw-scale-z{syntax: "*"; inherits: false; initial-value: 1;}@property --tw-rotate-x{syntax: "*"; inherits: false;}@property --tw-rotate-y{syntax: "*"; inherits: false;}@property --tw-rotate-z{syntax: "*"; inherits: false;}@property --tw-skew-x{syntax: "*"; inherits: false;}@property --tw-skew-y{syntax: "*"; inherits: false;}@property --tw-border-style{syntax: "*"; inherits: false; initial-value: solid;}@property --tw-leading{syntax: "*"; inherits: false;}@property --tw-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: "*"; inherits: false;}@property --tw-shadow-alpha{syntax: "<percentage>"; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: "*"; inherits: false;}@property --tw-inset-shadow-alpha{syntax: "<percentage>"; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: "*"; inherits: false;}@property --tw-ring-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: "*"; inherits: false;}@property --tw-inset-ring-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: "*"; inherits: false;}@property --tw-ring-offset-width{syntax: "<length>"; inherits: false; initial-value: 0px;}@property --tw-ring-offset-color{syntax: "*"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-duration{syntax: "*"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x: 0;--tw-translate-y: 0;--tw-translate-z: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-scale-z: 1;--tw-rotate-x: initial;--tw-rotate-y: initial;--tw-rotate-z: initial;--tw-skew-x: initial;--tw-skew-y: initial;--tw-border-style: solid;--tw-leading: initial;--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000;--tw-duration: initial}}}
|
|
2
|
+
/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */
|
|
3
|
+
/*# sourceMappingURL=index.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.css"],"sourcesContent":["/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */\n@layer properties;\n.react-flow {\n direction: ltr;\n}\n.react-flow__container {\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n}\n.react-flow__pane {\n z-index: 1;\n cursor: grab;\n}\n.react-flow__pane.selection {\n cursor: pointer;\n}\n.react-flow__pane.dragging {\n cursor: grabbing;\n}\n.react-flow__viewport {\n transform-origin: 0 0;\n z-index: 2;\n pointer-events: none;\n}\n.react-flow__renderer {\n z-index: 4;\n}\n.react-flow__selection {\n z-index: 6;\n}\n.react-flow__nodesselection-rect:focus, .react-flow__nodesselection-rect:focus-visible {\n outline: none;\n}\n.react-flow .react-flow__edges {\n pointer-events: none;\n overflow: visible;\n}\n.react-flow__edge-path, .react-flow__connection-path {\n stroke: #b1b1b7;\n stroke-width: 1;\n fill: none;\n}\n.react-flow__edge {\n pointer-events: visibleStroke;\n cursor: pointer;\n}\n.react-flow__edge.animated path {\n stroke-dasharray: 5;\n animation: dashdraw 0.5s linear infinite;\n}\n.react-flow__edge.animated path.react-flow__edge-interaction {\n stroke-dasharray: none;\n animation: none;\n}\n.react-flow__edge.inactive {\n pointer-events: none;\n}\n.react-flow__edge.selected, .react-flow__edge:focus, .react-flow__edge:focus-visible {\n outline: none;\n}\n.react-flow__edge.selected .react-flow__edge-path, .react-flow__edge:focus .react-flow__edge-path, .react-flow__edge:focus-visible .react-flow__edge-path {\n stroke: #555;\n}\n.react-flow__edge-textwrapper {\n pointer-events: all;\n}\n.react-flow__edge-textbg {\n fill: white;\n}\n.react-flow__edge .react-flow__edge-text {\n pointer-events: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n.react-flow__connection {\n pointer-events: none;\n}\n.react-flow__connection .animated {\n stroke-dasharray: 5;\n animation: dashdraw 0.5s linear infinite;\n}\n.react-flow__connectionline {\n z-index: 1001;\n}\n.react-flow__nodes {\n pointer-events: none;\n transform-origin: 0 0;\n}\n.react-flow__node {\n position: absolute;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n pointer-events: all;\n transform-origin: 0 0;\n box-sizing: border-box;\n cursor: grab;\n}\n.react-flow__node.dragging {\n cursor: grabbing;\n}\n.react-flow__nodesselection {\n z-index: 3;\n transform-origin: left top;\n pointer-events: none;\n}\n.react-flow__nodesselection-rect {\n position: absolute;\n pointer-events: all;\n cursor: grab;\n}\n.react-flow__handle {\n position: absolute;\n pointer-events: none;\n min-width: 5px;\n min-height: 5px;\n width: 6px;\n height: 6px;\n background: #1a192b;\n border: 1px solid white;\n border-radius: 100%;\n}\n.react-flow__handle.connectionindicator {\n pointer-events: all;\n cursor: crosshair;\n}\n.react-flow__handle-bottom {\n top: auto;\n left: 50%;\n bottom: -4px;\n transform: translate(-50%, 0);\n}\n.react-flow__handle-top {\n left: 50%;\n top: -4px;\n transform: translate(-50%, 0);\n}\n.react-flow__handle-left {\n top: 50%;\n left: -4px;\n transform: translate(0, -50%);\n}\n.react-flow__handle-right {\n right: -4px;\n top: 50%;\n transform: translate(0, -50%);\n}\n.react-flow__edgeupdater {\n cursor: move;\n pointer-events: all;\n}\n.react-flow__panel {\n position: absolute;\n z-index: 5;\n margin: 15px;\n}\n.react-flow__panel.top {\n top: 0;\n}\n.react-flow__panel.bottom {\n bottom: 0;\n}\n.react-flow__panel.left {\n left: 0;\n}\n.react-flow__panel.right {\n right: 0;\n}\n.react-flow__panel.center {\n left: 50%;\n transform: translateX(-50%);\n}\n.react-flow__attribution {\n font-size: 10px;\n background: rgba(255, 255, 255, 0.5);\n padding: 2px 3px;\n margin: 0;\n}\n.react-flow__attribution a {\n text-decoration: none;\n color: #999;\n}\n@keyframes dashdraw {\n from {\n stroke-dashoffset: 10;\n }\n}\n.react-flow__edgelabel-renderer {\n position: absolute;\n width: 100%;\n height: 100%;\n pointer-events: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n.react-flow__edge.updating .react-flow__edge-path {\n stroke: #777;\n}\n.react-flow__edge-text {\n font-size: 10px;\n}\n.react-flow__node.selectable:focus, .react-flow__node.selectable:focus-visible {\n outline: none;\n}\n.react-flow__node-default, .react-flow__node-input, .react-flow__node-output, .react-flow__node-group {\n padding: 10px;\n border-radius: 3px;\n width: 150px;\n font-size: 12px;\n color: #222;\n text-align: center;\n border-width: 1px;\n border-style: solid;\n border-color: #1a192b;\n background-color: white;\n}\n.react-flow__node-default.selectable:hover, .react-flow__node-input.selectable:hover, .react-flow__node-output.selectable:hover, .react-flow__node-group.selectable:hover {\n box-shadow: 0 1px 4px 1px rgba(0, 0, 0, 0.08);\n}\n.react-flow__node-default.selectable.selected, .react-flow__node-default.selectable:focus, .react-flow__node-default.selectable:focus-visible, .react-flow__node-input.selectable.selected, .react-flow__node-input.selectable:focus, .react-flow__node-input.selectable:focus-visible, .react-flow__node-output.selectable.selected, .react-flow__node-output.selectable:focus, .react-flow__node-output.selectable:focus-visible, .react-flow__node-group.selectable.selected, .react-flow__node-group.selectable:focus, .react-flow__node-group.selectable:focus-visible {\n box-shadow: 0 0 0 0.5px #1a192b;\n}\n.react-flow__node-group {\n background-color: rgba(240, 240, 240, 0.25);\n}\n.react-flow__nodesselection-rect, .react-flow__selection {\n background: rgba(0, 89, 220, 0.08);\n border: 1px dotted rgba(0, 89, 220, 0.8);\n}\n.react-flow__nodesselection-rect:focus, .react-flow__nodesselection-rect:focus-visible, .react-flow__selection:focus, .react-flow__selection:focus-visible {\n outline: none;\n}\n.react-flow__controls {\n box-shadow: 0 0 2px 1px rgba(0, 0, 0, 0.08);\n}\n.react-flow__controls-button {\n border: none;\n background: #fefefe;\n border-bottom: 1px solid #eee;\n box-sizing: content-box;\n display: flex;\n justify-content: center;\n align-items: center;\n width: 16px;\n height: 16px;\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n padding: 5px;\n}\n.react-flow__controls-button:hover {\n background: #f4f4f4;\n}\n.react-flow__controls-button svg {\n width: 100%;\n max-width: 12px;\n max-height: 12px;\n}\n.react-flow__controls-button:disabled {\n pointer-events: none;\n}\n.react-flow__controls-button:disabled svg {\n fill-opacity: 0.4;\n}\n.react-flow__minimap {\n background-color: #fff;\n}\n.react-flow__minimap svg {\n display: block;\n}\n.react-flow__resize-control {\n position: absolute;\n}\n.react-flow__resize-control.left, .react-flow__resize-control.right {\n cursor: ew-resize;\n}\n.react-flow__resize-control.top, .react-flow__resize-control.bottom {\n cursor: ns-resize;\n}\n.react-flow__resize-control.top.left, .react-flow__resize-control.bottom.right {\n cursor: nwse-resize;\n}\n.react-flow__resize-control.bottom.left, .react-flow__resize-control.top.right {\n cursor: nesw-resize;\n}\n.react-flow__resize-control.handle {\n width: 4px;\n height: 4px;\n border: 1px solid #fff;\n border-radius: 1px;\n background-color: #3367d9;\n transform: translate(-50%, -50%);\n}\n.react-flow__resize-control.handle.left {\n left: 0;\n top: 50%;\n}\n.react-flow__resize-control.handle.right {\n left: 100%;\n top: 50%;\n}\n.react-flow__resize-control.handle.top {\n left: 50%;\n top: 0;\n}\n.react-flow__resize-control.handle.bottom {\n left: 50%;\n top: 100%;\n}\n.react-flow__resize-control.handle.top.left {\n left: 0;\n}\n.react-flow__resize-control.handle.bottom.left {\n left: 0;\n}\n.react-flow__resize-control.handle.top.right {\n left: 100%;\n}\n.react-flow__resize-control.handle.bottom.right {\n left: 100%;\n}\n.react-flow__resize-control.line {\n border-color: #3367d9;\n border-width: 0;\n border-style: solid;\n}\n.react-flow__resize-control.line.left, .react-flow__resize-control.line.right {\n width: 1px;\n transform: translate(-50%, 0);\n top: 0;\n height: 100%;\n}\n.react-flow__resize-control.line.left {\n left: 0;\n border-left-width: 1px;\n}\n.react-flow__resize-control.line.right {\n left: 100%;\n border-right-width: 1px;\n}\n.react-flow__resize-control.line.top, .react-flow__resize-control.line.bottom {\n height: 1px;\n transform: translate(0, -50%);\n left: 0;\n width: 100%;\n}\n.react-flow__resize-control.line.top {\n top: 0;\n border-top-width: 1px;\n}\n.react-flow__resize-control.line.bottom {\n border-bottom-width: 1px;\n top: 100%;\n}\n.pointer-events-none {\n pointer-events: none;\n}\n.absolute {\n position: absolute;\n}\n.fixed {\n position: fixed;\n}\n.relative {\n position: relative;\n}\n.top-1\\/2 {\n top: calc(1/2 * 100%);\n}\n.left-1\\/2 {\n left: calc(1/2 * 100%);\n}\n.-z-10 {\n z-index: calc(10 * -1);\n}\n.z-50 {\n z-index: 50;\n}\n.z-\\[100\\] {\n z-index: 100;\n}\n.line-clamp-2 {\n overflow: hidden;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n}\n.block {\n display: block;\n}\n.flex {\n display: flex;\n}\n.grid {\n display: grid;\n}\n.hidden {\n display: none;\n}\n.h-\\[600px\\] {\n height: 600px;\n}\n.h-\\[800px\\] {\n height: 800px;\n}\n.h-full {\n height: 100%;\n}\n.max-h-\\[70vh\\] {\n max-height: 70vh;\n}\n.w-\\[600px\\] {\n width: 600px;\n}\n.w-full {\n width: 100%;\n}\n.w-max {\n width: -moz-max-content;\n width: max-content;\n}\n.max-w-\\[140px\\] {\n max-width: 140px;\n}\n.min-w-\\[200px\\] {\n min-width: 200px;\n}\n.min-w-\\[240px\\] {\n min-width: 240px;\n}\n.flex-1 {\n flex: 1;\n}\n.-translate-x-1\\/2 {\n --tw-translate-x: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n}\n.-translate-y-1\\/2 {\n --tw-translate-y: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n}\n.scale-95 {\n --tw-scale-x: 95%;\n --tw-scale-y: 95%;\n --tw-scale-z: 95%;\n scale: var(--tw-scale-x) var(--tw-scale-y);\n}\n.scale-100 {\n --tw-scale-x: 100%;\n --tw-scale-y: 100%;\n --tw-scale-z: 100%;\n scale: var(--tw-scale-x) var(--tw-scale-y);\n}\n.transform {\n transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);\n}\n.cursor-pointer {\n cursor: pointer;\n}\n.resize-y {\n resize: vertical;\n}\n.list-none {\n list-style-type: none;\n}\n.grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n}\n.flex-col {\n flex-direction: column;\n}\n.items-center {\n align-items: center;\n}\n.items-start {\n align-items: flex-start;\n}\n.justify-between {\n justify-content: space-between;\n}\n.justify-center {\n justify-content: center;\n}\n.truncate {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.overflow-hidden {\n overflow: hidden;\n}\n.overflow-y-auto {\n overflow-y: auto;\n}\n.rounded-full {\n border-radius: calc(infinity * 1px);\n}\n.\\!border-2 {\n border-style: var(--tw-border-style) !important;\n border-width: 2px !important;\n}\n.border {\n border-style: var(--tw-border-style);\n border-width: 1px;\n}\n.border-2 {\n border-style: var(--tw-border-style);\n border-width: 2px;\n}\n.border-t {\n border-top-style: var(--tw-border-style);\n border-top-width: 1px;\n}\n.border-r {\n border-right-style: var(--tw-border-style);\n border-right-width: 1px;\n}\n.border-b {\n border-bottom-style: var(--tw-border-style);\n border-bottom-width: 1px;\n}\n.border-none {\n --tw-border-style: none;\n border-style: none;\n}\n.border-transparent {\n border-color: transparent;\n}\n.border-t-transparent {\n border-top-color: transparent;\n}\n.bg-transparent {\n background-color: transparent;\n}\n.text-center {\n text-align: center;\n}\n.text-left {\n text-align: left;\n}\n.text-right {\n text-align: right;\n}\n.text-\\[10px\\] {\n font-size: 10px;\n}\n.leading-none {\n --tw-leading: 1;\n line-height: 1;\n}\n.uppercase {\n text-transform: uppercase;\n}\n.opacity-0 {\n opacity: 0%;\n}\n.opacity-100 {\n opacity: 100%;\n}\n.ring-2 {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n}\n.ring-4 {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n}\n.transition {\n transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, backdrop-filter, display, content-visibility, overlay, pointer-events;\n transition-timing-function: var(--tw-ease, ease);\n transition-duration: var(--tw-duration, 0s);\n}\n.transition-all {\n transition-property: all;\n transition-timing-function: var(--tw-ease, ease);\n transition-duration: var(--tw-duration, 0s);\n}\n.transition-colors {\n transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;\n transition-timing-function: var(--tw-ease, ease);\n transition-duration: var(--tw-duration, 0s);\n}\n.transition-transform {\n transition-property: transform, translate, scale, rotate;\n transition-timing-function: var(--tw-ease, ease);\n transition-duration: var(--tw-duration, 0s);\n}\n.duration-200 {\n --tw-duration: 200ms;\n transition-duration: 200ms;\n}\n.duration-300 {\n --tw-duration: 300ms;\n transition-duration: 300ms;\n}\n.outline-none {\n --tw-outline-style: none;\n outline-style: none;\n}\n.select-none {\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n.group-open\\:rotate-180 {\n &:is(:where(.group):is([open], :popover-open, :open) *) {\n rotate: 180deg;\n }\n}\n.hover\\:scale-125 {\n &:hover {\n @media (hover: hover) {\n --tw-scale-x: 125%;\n --tw-scale-y: 125%;\n --tw-scale-z: 125%;\n scale: var(--tw-scale-x) var(--tw-scale-y);\n }\n }\n}\n.hover\\:opacity-70 {\n &:hover {\n @media (hover: hover) {\n opacity: 70%;\n }\n }\n}\n.focus\\:ring-2 {\n &:focus {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n}\n.focus\\:outline-none {\n &:focus {\n --tw-outline-style: none;\n outline-style: none;\n }\n}\n.disabled\\:cursor-not-allowed {\n &:disabled {\n cursor: not-allowed;\n }\n}\n.disabled\\:opacity-30 {\n &:disabled {\n opacity: 30%;\n }\n}\n.disabled\\:opacity-70 {\n &:disabled {\n opacity: 70%;\n }\n}\n@property --tw-translate-x {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-y {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-z {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-scale-x {\n syntax: \"*\";\n inherits: false;\n initial-value: 1;\n}\n@property --tw-scale-y {\n syntax: \"*\";\n inherits: false;\n initial-value: 1;\n}\n@property --tw-scale-z {\n syntax: \"*\";\n inherits: false;\n initial-value: 1;\n}\n@property --tw-rotate-x {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-rotate-y {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-rotate-z {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-skew-x {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-skew-y {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-border-style {\n syntax: \"*\";\n inherits: false;\n initial-value: solid;\n}\n@property --tw-leading {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-shadow-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-shadow-alpha {\n syntax: \"<percentage>\";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-inset-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-shadow-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-inset-shadow-alpha {\n syntax: \"<percentage>\";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-ring-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-ring-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-ring-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-inset-ring-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-ring-inset {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-ring-offset-width {\n syntax: \"<length>\";\n inherits: false;\n initial-value: 0px;\n}\n@property --tw-ring-offset-color {\n syntax: \"*\";\n inherits: false;\n initial-value: #fff;\n}\n@property --tw-ring-offset-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-duration {\n syntax: \"*\";\n inherits: false;\n}\n@layer properties {\n @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {\n *, ::before, ::after, ::backdrop {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-translate-z: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-scale-z: 1;\n --tw-rotate-x: initial;\n --tw-rotate-y: initial;\n --tw-rotate-z: initial;\n --tw-skew-x: initial;\n --tw-skew-y: initial;\n --tw-border-style: solid;\n --tw-leading: initial;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-color: initial;\n --tw-shadow-alpha: 100%;\n --tw-inset-shadow: 0 0 #0000;\n --tw-inset-shadow-color: initial;\n --tw-inset-shadow-alpha: 100%;\n --tw-ring-color: initial;\n --tw-ring-shadow: 0 0 #0000;\n --tw-inset-ring-color: initial;\n --tw-inset-ring-shadow: 0 0 #0000;\n --tw-ring-inset: initial;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-duration: initial;\n }\n }\n}\n"],"mappings":"AACA,kBACA,CAAC,WACC,UAAW,GACb,CACA,CAAC,sBACC,SAAU,SACV,MAAO,KACP,OAAQ,KACR,IAAK,EACL,KAAM,CACR,CACA,CAAC,iBACC,QAAS,EACT,OAAQ,IACV,CACA,CAJC,gBAIgB,CAAC,UAChB,OAAQ,OACV,CACA,CAPC,gBAOgB,CAAC,SAChB,OAAQ,QACV,CACA,CAAC,qBACC,iBAAkB,EAAE,EACpB,QAAS,EACT,eAAgB,IAClB,CACA,CAAC,qBACC,QAAS,CACX,CACA,CAAC,sBACC,QAAS,CACX,CACA,CAAC,+BAA+B,OAAQ,CAAvC,+BAAuE,eACtE,QAAS,IACX,CACA,CAlCC,WAkCW,CAAC,kBACX,eAAgB,KAChB,SAAU,OACZ,CACA,CAAC,sBAAuB,CAAC,4BACvB,OAAQ,QACR,aAAc,EACd,KAAM,IACR,CACA,CAAC,iBACC,eAAgB,cAChB,OAAQ,OACV,CACA,CAJC,gBAIgB,CAAC,SAAS,KACzB,iBAAkB,EAClB,UAAW,SAAS,IAAK,OAAO,QAClC,CACA,CARC,gBA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AE,KAAK,EAE1B,UAAU,aAAc,CACtB,MAAM,EAAE,GAAG,EACX,QAAQ,EAAE,KAAK,EAEjB,kBACE,UAAU,CAAC,CAAC,eAAe,EAAE,MAAM,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,UAAU,GAAG,CAAC,CAAC,WAAW,EAAE,QAAQ,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,EAAE,EAAE,MAC7H,EAAG,QAAU,OAAS,WACpB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,cAAc,EACd,eAAe,QACf,eAAe,QACf,eAAe,QACf,aAAa,QACb,aAAa,QACb,mBAAmB,MACnB,cAAc,QACd,aAAa,EAAE,EAAE,MACjB,mBAAmB,QACnB,mBAAmB,KACnB,mBAAmB,EAAE,EAAE,MACvB,yBAAyB,QACzB,yBAAyB,KACzB,iBAAiB,QACjB,kBAAkB,EAAE,EAAE,MACtB,uBAAuB,QACvB,wBAAwB,EAAE,EAAE,MAC5B,iBAAiB,QACjB,wBAAwB,IACxB,wBAAwB,KACxB,yBAAyB,EAAE,EAAE,MAC7B,eAAe,OACjB,CACF,CACF","names":[]}
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ApiConfig } from '@universal-workflow/widget-core';
|
|
3
|
+
export * from '@universal-workflow/widget-core';
|
|
4
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
interface WorkflowBuilderProps {
|
|
7
|
+
licenseKey: string;
|
|
8
|
+
apiConfig: ApiConfig;
|
|
9
|
+
className?: string;
|
|
10
|
+
style?: React.CSSProperties;
|
|
11
|
+
}
|
|
12
|
+
declare const WorkflowBuilder: React.FC<WorkflowBuilderProps>;
|
|
13
|
+
|
|
14
|
+
declare function WorkflowWidget(props: WorkflowBuilderProps): react_jsx_runtime.JSX.Element;
|
|
15
|
+
|
|
16
|
+
interface EmbeddableWidgetProps {
|
|
17
|
+
licenseKey: string;
|
|
18
|
+
apiConfig: {
|
|
19
|
+
baseUrl: string;
|
|
20
|
+
endpoints: {
|
|
21
|
+
create: string;
|
|
22
|
+
update: string;
|
|
23
|
+
get: string;
|
|
24
|
+
list?: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
position?: 'bottom-left' | 'bottom-right';
|
|
28
|
+
themeColor?: string;
|
|
29
|
+
}
|
|
30
|
+
declare function EmbeddableWidget({ licenseKey, apiConfig, position, themeColor }: EmbeddableWidgetProps): react_jsx_runtime.JSX.Element;
|
|
31
|
+
|
|
32
|
+
export { EmbeddableWidget, WorkflowBuilder, type WorkflowBuilderProps, WorkflowWidget, type WorkflowBuilderProps as WorkflowWidgetProps };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ApiConfig } from '@universal-workflow/widget-core';
|
|
3
|
+
export * from '@universal-workflow/widget-core';
|
|
4
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
interface WorkflowBuilderProps {
|
|
7
|
+
licenseKey: string;
|
|
8
|
+
apiConfig: ApiConfig;
|
|
9
|
+
className?: string;
|
|
10
|
+
style?: React.CSSProperties;
|
|
11
|
+
}
|
|
12
|
+
declare const WorkflowBuilder: React.FC<WorkflowBuilderProps>;
|
|
13
|
+
|
|
14
|
+
declare function WorkflowWidget(props: WorkflowBuilderProps): react_jsx_runtime.JSX.Element;
|
|
15
|
+
|
|
16
|
+
interface EmbeddableWidgetProps {
|
|
17
|
+
licenseKey: string;
|
|
18
|
+
apiConfig: {
|
|
19
|
+
baseUrl: string;
|
|
20
|
+
endpoints: {
|
|
21
|
+
create: string;
|
|
22
|
+
update: string;
|
|
23
|
+
get: string;
|
|
24
|
+
list?: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
position?: 'bottom-left' | 'bottom-right';
|
|
28
|
+
themeColor?: string;
|
|
29
|
+
}
|
|
30
|
+
declare function EmbeddableWidget({ licenseKey, apiConfig, position, themeColor }: EmbeddableWidgetProps): react_jsx_runtime.JSX.Element;
|
|
31
|
+
|
|
32
|
+
export { EmbeddableWidget, WorkflowBuilder, type WorkflowBuilderProps, WorkflowWidget, type WorkflowBuilderProps as WorkflowWidgetProps };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var nt=Object.create;var Q=Object.defineProperty;var st=Object.getOwnPropertyDescriptor;var lt=Object.getOwnPropertyNames;var dt=Object.getPrototypeOf,ct=Object.prototype.hasOwnProperty;var pt=(e,t)=>{for(var a in t)Q(e,a,{get:t[a],enumerable:!0})},he=(e,t,a,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of lt(t))!ct.call(e,n)&&n!==a&&Q(e,n,{get:()=>t[n],enumerable:!(i=st(t,n))||i.enumerable});return e};var fe=(e,t,a)=>(a=e!=null?nt(dt(e)):{},he(t||!e||!e.__esModule?Q(a,"default",{value:e,enumerable:!0}):a,e)),ut=e=>he(Q({},"__esModule",{value:!0}),e);var wt={};pt(wt,{ApiClient:()=>ie,EmbeddableWidget:()=>vt,LicenseManager:()=>re,WorkflowBuilder:()=>be,WorkflowSerializer:()=>ne,WorkflowWidget:()=>me,createConnectorNode:()=>de,deserialize:()=>le,getConnectorDetails:()=>ce,nodeRegistry:()=>L,registerConnector:()=>mt,serialize:()=>se,standardConnectors:()=>ee});module.exports=ut(wt);var x=require("react"),M=fe(require("reactflow")),mo=require("reactflow/dist/style.css");var bt="http://localhost:3000/api/v1/license/validate",re=class{constructor(e){this.config=e,this.validationResult=null}async validate(){if(this.validationResult)return this.validationResult;try{let e=this.config.validationEndpoint||bt,t=await(await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({licenseKey:this.config.licenseKey,widgetVersion:this.config.widgetVersion,originUrl:typeof window!="undefined"?window.location.origin:""})})).json();return this.validationResult=t,t}catch(e){return console.error("License validation failed",e),{valid:!1,reason:"Network Error"}}}isFeatureEnabled(e){var t,a;return(t=this.validationResult)!=null&&t.valid?!!((a=this.validationResult.features)!=null&&a[e]):!1}},ie=class{constructor(e){this.config=e}async request(e,t,a){let i={"Content-Type":"application/json",...this.config.headers},n=await fetch(e,{method:t,headers:i,body:a?JSON.stringify(a):void 0});if(!n.ok)throw new Error(`API Request failed: ${n.statusText}`);return n.json()}async getWorkflow(e){let t=`${this.config.baseUrl}${this.config.endpoints.get.replace(":id",e)}`;return this.request(t,"GET")}async createWorkflow(e){let t=`${this.config.baseUrl}${this.config.endpoints.create}`;return this.request(t,"POST",e)}async updateWorkflow(e,t){let a=`${this.config.baseUrl}${this.config.endpoints.update.replace(":id",e)}`;return this.request(a,"PUT",t)}},ne=class{static serialize(e,t,a){return JSON.stringify({nodes:e,edges:t,viewport:a})}static deserialize(e){try{let t=JSON.parse(e);return{nodes:t.nodes||[],edges:t.edges||[],viewport:t.viewport}}catch{return{nodes:[],edges:[]}}}},se=ne.serialize,le=ne.deserialize;function de(e){return{type:e.id,label:e.label,description:`Integration with ${e.label}`,category:e.category,icon:e.icon,color:e.color,handles:[{id:"in",type:"target"},{id:"out",type:"source"}],inputs:[{key:"auth_token",label:"API Key / Token",type:"text",placeholder:e.auth.placeholder||"Enter API Key"},{key:"operation",label:"Action",type:"select",options:e.operations.map(t=>({label:t.label,value:t.id}))}]}}var ee=[{id:"google-sheets",label:"Google Sheets",category:"utility",icon:"Sheet",color:"emerald",baseUrl:"https://sheets.googleapis.com/v4/spreadsheets",auth:{type:"bearer",placeholder:"OAuth Token"},operations:[{id:"append_row",label:"Append Row",method:"POST",path:"/{spreadsheetId}/values/{range}:append",inputs:[{key:"spreadsheetId",label:"Spreadsheet ID",type:"text"},{key:"range",label:"Range (Sheet1!A1)",type:"text"},{key:"values",label:"Row Values (JSON Array)",type:"json"}]},{id:"get_values",label:"Get Row(s)",method:"GET",path:"/{spreadsheetId}/values/{range}",inputs:[{key:"spreadsheetId",label:"Spreadsheet ID",type:"text"},{key:"range",label:"Range",type:"text"}]}]},{id:"slack-connector",label:"Slack API",category:"action",icon:"MessageSquare",color:"blue",baseUrl:"https://slack.com/api",auth:{type:"bearer",placeholder:"xoxb-..."},operations:[{id:"post_message",label:"Post Message",method:"POST",path:"/chat.postMessage",inputs:[{key:"channel",label:"Channel ID",type:"text"},{key:"text",label:"Message Text",type:"text"}]}]},{id:"openai",label:"OpenAI",category:"action",icon:"Bot",color:"zinc",baseUrl:"https://api.openai.com/v1",auth:{type:"bearer",placeholder:"sk-..."},operations:[{id:"chat_completion",label:"Chat Completion",method:"POST",path:"/chat/completions",inputs:[{key:"model",label:"Model",type:"select",options:[{label:"GPT-4o",value:"gpt-4o"},{label:"GPT-3.5",value:"gpt-3.5-turbo"}]},{key:"messages",label:"Messages (JSON)",type:"json"}]}]}];function mt(e){ee.push(e)}var gt=[{id:"triggers",nodes:[{type:"manual-trigger",label:"Manual Trigger",description:"Start flow on button click",category:"trigger",icon:"Play",color:"emerald",inputs:[]},{type:"cron-trigger",label:"Cron Schedule",description:"Trigger on a schedule",category:"trigger",icon:"Clock",color:"emerald",inputs:[{key:"expression",label:"Cron Expression",type:"text",placeholder:"0 9 * * 1 (Every Mon at 9am)"}]},{id:"github-trigger",label:"GitHub Trigger",category:"trigger",icon:"Github",color:"zinc",baseUrl:"https://api.github.com",auth:{type:"header",key:"X-GitHub-Token"},operations:[{id:"on_push",label:"On Push",method:"POST",path:"/repos/{owner}/{repo}/hooks",inputs:[{key:"owner",label:"Owner",type:"text"},{key:"repo",label:"Repository",type:"text"}]},{id:"on_star",label:"On New Star",method:"POST",path:"/repos/{owner}/{repo}/hooks",inputs:[{key:"owner",label:"Owner",type:"text"},{key:"repo",label:"Repository",type:"text"}]}]}]},{id:"logic",nodes:[{type:"switch",label:"Switch / Router",description:"Route based on value",category:"logic",icon:"GitFork",color:"orange",inputs:[{key:"property",label:"Property to Check",type:"text"},{key:"cases",label:"Cases (comma sep)",type:"text",placeholder:"marketing, sales, support"}]},{type:"ab-split",label:"A/B Split",description:"Randomly split traffic",category:"logic",icon:"Percent",color:"orange",inputs:[{key:"percentA",label:"Percentage for A",type:"text",placeholder:"50"}]},{type:"wait",label:"Wait / Delay",description:"Pause execution",category:"logic",icon:"Timer",color:"orange",inputs:[{key:"duration",label:"Duration",type:"text",placeholder:"5000"},{key:"unit",label:"Unit",type:"select",options:[{label:"Milliseconds",value:"ms"},{label:"Seconds",value:"s"}]}]}]},{id:"utilities",nodes:[{type:"text-transform",label:"Text Transform",description:"Modify text strings",category:"utility",icon:"Type",color:"zinc",inputs:[{key:"action",label:"Action",type:"select",options:[{label:"To Upper Case",value:"upper"},{label:"To Lower Case",value:"lower"},{label:"Trim",value:"trim"},{label:"Replace",value:"replace"}]},{key:"input",label:"Input Text",type:"text"}]},{type:"json-parser",label:"JSON Helper",description:"Parse or stringify JSON",category:"utility",icon:"Code",color:"zinc",inputs:[{key:"action",label:"Action",type:"select",options:[{label:"Parse (String to JSON)",value:"parse"},{label:"Stringify (JSON to String)",value:"stringify"}]},{key:"data",label:"Data",type:"json"}]},{type:"math-calc",label:"Math Calculator",description:"Perform calculations",category:"utility",icon:"Calculator",color:"zinc",inputs:[{key:"operation",label:"Operation",type:"select",options:[{label:"Add",value:"add"},{label:"Subtract",value:"sub"},{label:"Multiply",value:"mul"},{label:"Divide",value:"div"},{label:"Random Number",value:"random"}]},{key:"a",label:"Value A",type:"text"},{key:"b",label:"Value B",type:"text"}]},{type:"crypto",label:"Cryptography",description:"Hash or Encrypt data",category:"utility",icon:"Lock",color:"zinc",inputs:[{key:"algo",label:"Algorithm",type:"select",options:[{label:"MD5",value:"md5"},{label:"SHA-256",value:"sha256"},{label:"Base64 Encode",value:"base64_enc"},{label:"Base64 Decode",value:"base64_dec"}]},{key:"input",label:"value",type:"text"}]},{type:"date-time",label:"Date & Time",description:"Format or manipulate dates",category:"utility",icon:"Calendar",color:"zinc",inputs:[{key:"operation",label:"Action",type:"select",options:[{label:"Now (ISO)",value:"now"},{label:"Format Date",value:"format"},{label:"Add Time",value:"add"}]},{key:"date",label:"Date String",type:"text"},{key:"format",label:"Format Pattern",type:"text",placeholder:"YYYY-MM-DD"}]}]},{id:"integrations-productivity",nodes:[{id:"google-drive",label:"Google Drive",icon:"HardDrive",color:"blue",category:"action",baseUrl:"https://www.googleapis.com/drive/v3",auth:{type:"bearer",placeholder:"OAuth Token"},operations:[{id:"list",label:"List Files",method:"GET",path:"/files",inputs:[{key:"q",label:"Query",type:"text"}]},{id:"upload",label:"Upload File",method:"POST",path:"/files",inputs:[{key:"name",label:"Name",type:"text"},{key:"content",label:"Content",type:"text"}]}]},{id:"notion",label:"Notion",icon:"FileText",color:"zinc",category:"action",baseUrl:"https://api.notion.com/v1",auth:{type:"header",key:"Authorization",placeholder:"Bearer secret_..."},operations:[{id:"create_page",label:"Create Page",method:"POST",path:"/pages",inputs:[{key:"parent_id",label:"Parent DB ID",type:"text"},{key:"properties",label:"Properties JSON",type:"json"}]},{id:"query_db",label:"Query Database",method:"POST",path:"/databases/{id}/query",inputs:[{key:"id",label:"Database ID",type:"text"}]}]},{id:"airtable",label:"Airtable",icon:"Database",color:"amber",category:"action",baseUrl:"https://api.airtable.com/v0",auth:{type:"bearer",placeholder:"pat_..."},operations:[{id:"create_record",label:"Create Record",method:"POST",path:"/{baseId}/{tableId}",inputs:[{key:"baseId",label:"Base ID",type:"text"},{key:"tableId",label:"Table Name",type:"text"},{key:"fields",label:"Fields JSON",type:"json"}]},{id:"list_records",label:"List Records",method:"GET",path:"/{baseId}/{tableId}",inputs:[{key:"baseId",label:"Base ID",type:"text"},{key:"tableId",label:"Table Name",type:"text"}]}]}]},{id:"integrations-crm-marketing",nodes:[{id:"salesforce",label:"Salesforce",icon:"Cloud",color:"blue",category:"action",baseUrl:"https://{instance}.salesforce.com/services/data/vXX.X",auth:{type:"bearer"},operations:[{id:"create_lead",label:"Create Lead",method:"POST",path:"/sobjects/Lead",inputs:[{key:"instance",label:"Instance URL",type:"text"},{key:"LastName",label:"Last Name",type:"text"},{key:"Company",label:"Company",type:"text"}]}]},{id:"hubspot",label:"HubSpot",icon:"Users",color:"orange",category:"action",baseUrl:"https://api.hubapi.com",auth:{type:"bearer"},operations:[{id:"create_contact",label:"Create Contact",method:"POST",path:"/crm/v3/objects/contacts",inputs:[{key:"properties",label:"Properties JSON",type:"json"}]}]},{id:"mailchimp",label:"Mailchimp",icon:"Mail",color:"yellow",category:"action",baseUrl:"https://{dc}.api.mailchimp.com/3.0",auth:{type:"bearer"},operations:[{id:"add_member",label:"Add Subscriber",method:"POST",path:"/lists/{list_id}/members",inputs:[{key:"dc",label:"Data Center (usX)",type:"text"},{key:"list_id",label:"List ID",type:"text"},{key:"email_address",label:"Email",type:"text"},{key:"status",label:"Status",type:"select",options:[{label:"subscribed",value:"subscribed"}]}]}]}]},{id:"integrations-commerce",nodes:[{id:"shopify",label:"Shopify",icon:"ShoppingBag",color:"emerald",category:"action",baseUrl:"https://{shop}.myshopify.com/admin/api/2023-10",auth:{type:"header",key:"X-Shopify-Access-Token"},operations:[{id:"get_products",label:"Get Products",method:"GET",path:"/products.json",inputs:[{key:"shop",label:"Shop Name",type:"text"}]},{id:"create_order",label:"Create Order",method:"POST",path:"/orders.json",inputs:[{key:"shop",label:"Shop Name",type:"text"},{key:"order",label:"Order JSON",type:"json"}]}]},{id:"stripe",label:"Stripe",icon:"CreditCard",color:"indigo",category:"action",baseUrl:"https://api.stripe.com/v1",auth:{type:"bearer"},operations:[{id:"create_customer",label:"Create Customer",method:"POST",path:"/customers",inputs:[{key:"email",label:"Email",type:"text"}]},{id:"list_charges",label:"List Charges",method:"GET",path:"/charges",inputs:[{key:"limit",label:"Limit",type:"text"}]}]}]}];function yt(){gt.forEach(e=>{e.nodes.forEach(t=>{if(t.operations){let a={id:t.id,label:t.label,category:t.category,icon:t.icon,color:t.color,baseUrl:t.baseUrl,auth:t.auth,operations:t.operations};L[a.id]=de(a)}else{let a={type:t.type,label:t.label,description:t.description,category:t.category,icon:t.icon,color:t.color,handles:t.handles||[{id:"in",type:"target"},{id:"out",type:"source"}],inputs:t.inputs};L[a.type]=a}})})}var L={webhook:{type:"webhook",label:"Webhook",description:"Triggers when a URL is called",category:"trigger",icon:"Webhook",color:"emerald",handles:[{id:"out",type:"source"}],inputs:[{key:"method",label:"HTTP Method",type:"select",options:[{label:"GET",value:"GET"},{label:"POST",value:"POST"}]},{key:"path",label:"Path",type:"text",placeholder:"/webhook/..."}]},schedule:{type:"schedule",label:"Schedule",description:"Triggers on a specific interval",category:"trigger",icon:"Clock",color:"emerald",handles:[{id:"out",type:"source"}],inputs:[{key:"interval",label:"Interval",type:"select",options:[{label:"Every Minute",value:"1m"},{label:"Every Hour",value:"1h"},{label:"Every Day",value:"1d"}]},{key:"cron",label:"Cron Expression",type:"text",placeholder:"* * * * *"}]},"http-request":{type:"http-request",label:"HTTP Request",description:"Make an external API call",category:"action",icon:"Globe",color:"blue",handles:[{id:"in",type:"target"},{id:"out",type:"source"}],inputs:[{key:"url",label:"URL",type:"text",placeholder:"https://api.example.com"},{key:"method",label:"Method",type:"select",options:[{label:"GET",value:"GET"},{label:"POST",value:"POST"},{label:"PUT",value:"PUT"},{label:"DELETE",value:"DELETE"}]},{key:"headers",label:"Headers",type:"json"},{key:"body",label:"Body",type:"json"}]},email:{type:"email",label:"Send Email",description:"Send an email to a recipient",category:"action",icon:"Mail",color:"blue",handles:[{id:"in",type:"target"},{id:"out",type:"source"}],inputs:[{key:"to",label:"To",type:"text"},{key:"subject",label:"Subject",type:"text"},{key:"body",label:"Body",type:"text"}]},slack:{type:"slack",label:"Slack (Simple)",description:"Send a message to a channel",category:"action",icon:"MessageSquare",color:"blue",handles:[{id:"in",type:"target"},{id:"out",type:"source"}],inputs:[{key:"webhookUrl",label:"Webhook URL",type:"text"},{key:"message",label:"Message",type:"text"}]},"if-else":{type:"if-else",label:"If / Else",description:"Branch flow based on condition",category:"logic",icon:"Split",color:"orange",handles:[{id:"in",type:"target"},{id:"true",type:"source",label:"True"},{id:"false",type:"source",label:"False"}],inputs:[{key:"condition",label:"Condition",type:"code",description:"Javascript expression returning true/false"}]},merge:{type:"merge",label:"Merge",description:"Combine multiple branches",category:"logic",icon:"GitMerge",color:"orange",handles:[{id:"in-a",type:"target",label:"A"},{id:"in-b",type:"target",label:"B"},{id:"out",type:"source"}],inputs:[]}};ee.forEach(e=>{L[e.id]=de(e)});yt();function ce(e){return ee.find(t=>t.id===e)}var Ne=require("react"),_=require("reactflow"),I=require("lucide-react");var xe=require("clsx"),ve=require("tailwind-merge");function W(...e){return(0,ve.twMerge)((0,xe.clsx)(e))}var l=require("lucide-react"),K={Sheet:l.Sheet,Bot:l.Bot,Type:l.Type,Code:l.Code,Calculator:l.Calculator,Timer:l.Timer,GitFork:l.GitFork,Percent:l.Percent,HardDrive:l.HardDrive,Calendar:l.Calendar,Play:l.Play,Github:l.Github,Lock:l.Lock,FileText:l.FileText,Database:l.Database,Cloud:l.Cloud,Users:l.Users,ShoppingBag:l.ShoppingBag,CreditCard:l.CreditCard};var z=require("react/jsx-runtime"),ht={Webhook:I.Webhook,Clock:I.Clock,Globe:I.Globe,Mail:I.Mail,MessageSquare:I.MessageSquare,Split:I.Split,GitMerge:I.GitMerge,Zap:I.Zap,...K},we={emerald:"text-emerald-600 bg-emerald-50 border-emerald-200",blue:"text-blue-600 bg-blue-50 border-blue-200",orange:"text-orange-600 bg-orange-50 border-orange-200",zinc:"text-zinc-600 bg-zinc-50 border-zinc-200"},ke={emerald:"ring-emerald-500/20",blue:"ring-blue-500/20",orange:"ring-orange-500/20",zinc:"ring-zinc-500/20"},pe=(0,Ne.memo)(({data:e,selected:t,type:a})=>{let i=L[e.type||a]||L.webhook;if(!i)return(0,z.jsxs)("div",{className:"p-2 border border-red-500 rounded bg-red-50 text-red-600",children:["Unknown Node Type: ",a]});let n=ht[i.icon]||I.Zap,p=we[i.color]||we.zinc,r=ke[i.color]||ke.zinc,h=e.executionStatus,m="";return h==="running"?m="ring-4 ring-indigo-500/30 border-indigo-500 shadow-lg shadow-indigo-200 animate-pulse":h==="success"?m="ring-4 ring-emerald-500/40 border-emerald-500 shadow-lg shadow-emerald-200":h==="error"&&(m="ring-4 ring-red-500/40 border-red-500 shadow-lg shadow-red-200"),(0,z.jsxs)("div",{className:W("min-w-[240px] bg-white rounded-lg shadow-sm border-2 transition-all duration-300",t?`border-indigo-500 shadow-xl ring-2 ${r}`:"border-zinc-200 hover:border-zinc-300",m),children:[(0,z.jsxs)("div",{className:W("flex items-center justify-between p-3 border-b border-zinc-100/50 rounded-t-md bg-zinc-50/50"),children:[(0,z.jsxs)("div",{className:"flex items-center gap-3",children:[(0,z.jsx)("div",{className:W("p-1.5 rounded-md border shadow-sm",p),children:(0,z.jsx)(n,{size:16,strokeWidth:2.5})}),(0,z.jsxs)("div",{children:[(0,z.jsx)("span",{className:"block text-xs font-bold uppercase tracking-wider text-zinc-500",children:i.category}),(0,z.jsx)("span",{className:"block text-sm font-semibold text-zinc-900 leading-none mt-0.5",children:i.label})]})]}),(0,z.jsx)("button",{className:"text-zinc-400 hover:text-zinc-600 transition-colors",children:(0,z.jsx)(I.MoreHorizontal,{size:16})})]}),(0,z.jsxs)("div",{className:"p-4 bg-white rounded-b-lg",children:[i.type==="http-request"&&(0,z.jsxs)("div",{className:"flex items-center gap-2 font-mono text-xs text-zinc-600 bg-zinc-50 p-2 rounded border border-zinc-100",children:[(0,z.jsx)("span",{className:"font-bold text-blue-600",children:e.method||"GET"}),(0,z.jsx)("span",{className:"truncate max-w-[140px]",children:e.url||"https://..."})]}),i.type==="webhook"&&(0,z.jsxs)("div",{className:"flex items-center gap-2 font-mono text-xs text-zinc-600",children:[(0,z.jsx)("span",{className:"font-bold text-emerald-600",children:e.method||"POST"}),(0,z.jsx)("span",{children:e.path||"/webhook/..."})]}),i.type==="if-else"&&(0,z.jsx)("div",{className:"text-xs font-mono text-orange-600 bg-orange-50 p-2 rounded border border-orange-100 truncate",children:e.condition||"x > 0"}),!["http-request","webhook","if-else"].includes(i.type)&&(0,z.jsx)("p",{className:"text-sm text-zinc-500",children:i.description})]}),i.handles.map(o=>{let f=o.type==="target"?_.Position.Left:_.Position.Right,v={};i.type==="if-else"&&o.type;let d=o.type==="source",s=i.handles.filter(P=>P.type===o.type).indexOf(o),w=i.handles.filter(P=>P.type===o.type).length,k=w>1?`${(s+1)*100/(w+1)}%`:"50%";return(0,z.jsx)(_.Handle,{id:o.id,type:o.type,position:d?_.Position.Right:_.Position.Left,style:{top:k,...v},className:W("!w-3 !h-3 !border-2 !border-white transition-all duration-200 bg-zinc-400 group-hover:bg-indigo-500",d?"-right-1.5":"-left-1.5",o.id==="true"?"!bg-emerald-500":o.id==="false"?"!bg-red-500":""),children:o.label&&(0,z.jsx)("span",{className:W("absolute text-[10px] uppercase font-bold text-zinc-500 pointer-events-none w-max block mb-1",d?"right-4 mr-1 text-right":"left-4 ml-1 text-left","top-1/2 -translate-y-1/2"),children:o.label})},o.id)})]})});var ze=require("react"),S=require("lucide-react"),b=require("react/jsx-runtime");function Ce({onSave:e,onExport:t,onImport:a,onAddNode:i,onAutoLayout:n,onClear:p,onRun:r,isSaving:h,isRunning:m,canUndo:o,canRedo:f,onUndo:v,onRedo:d}){let s=(0,ze.useRef)(null);return(0,b.jsxs)("div",{className:"absolute top-4 left-1/2 -translate-x-1/2 z-50 flex items-center gap-1 p-1 bg-white/90 backdrop-blur-md border border-zinc-200/50 shadow-xl rounded-full",children:[(0,b.jsx)("input",{type:"file",ref:s,onChange:k=>{var J;let P=(J=k.target.files)==null?void 0:J[0];P&&a(P),s.current&&(s.current.value="")},accept:".json",className:"hidden"}),(0,b.jsxs)("div",{className:"flex items-center gap-1 px-1 border-r border-zinc-200",children:[(0,b.jsx)("button",{className:"p-2 text-zinc-500 hover:text-zinc-900 hover:bg-zinc-100 rounded-full transition-all",title:"Select",children:(0,b.jsx)(S.MousePointer2,{size:18})}),(0,b.jsx)("button",{onClick:i,className:"p-2 text-zinc-500 hover:text-zinc-900 hover:bg-zinc-100 rounded-full transition-all",title:"Add Node",children:(0,b.jsx)(S.Plus,{size:18})})]}),(0,b.jsxs)("div",{className:"flex items-center gap-1 px-1 border-r border-zinc-200",children:[(0,b.jsx)("button",{onClick:v,disabled:!o,className:"p-2 text-zinc-400 hover:text-zinc-900 hover:bg-zinc-100 rounded-full transition-all disabled:opacity-30 disabled:cursor-not-allowed",title:"Undo",children:(0,b.jsx)(S.Undo2,{size:18})}),(0,b.jsx)("button",{onClick:d,disabled:!f,className:"p-2 text-zinc-400 hover:text-zinc-900 hover:bg-zinc-100 rounded-full transition-all disabled:opacity-30 disabled:cursor-not-allowed",title:"Redo",children:(0,b.jsx)(S.Redo2,{size:18})})]}),(0,b.jsxs)("div",{className:"flex items-center gap-1 px-1 border-r border-zinc-200",children:[(0,b.jsx)("button",{onClick:n,className:"p-2 text-zinc-600 hover:text-zinc-900 hover:bg-zinc-100 rounded-full transition-all",title:"Auto Layout",children:(0,b.jsx)(S.Layout,{size:18})}),(0,b.jsx)("button",{onClick:p,className:"p-2 text-zinc-600 hover:text-red-600 hover:bg-red-50 rounded-full transition-all",title:"Clear Canvas",children:(0,b.jsx)(S.Trash2,{size:18})})]}),(0,b.jsxs)("div",{className:"flex items-center gap-1 px-1 border-r border-zinc-200",children:[(0,b.jsx)("button",{onClick:t,className:"p-2 text-zinc-600 hover:text-zinc-900 hover:bg-zinc-100 rounded-full transition-all",title:"Export JSON",children:(0,b.jsx)(S.Download,{size:18})}),(0,b.jsx)("button",{onClick:()=>{var k;return(k=s.current)==null?void 0:k.click()},className:"p-2 text-zinc-600 hover:text-zinc-900 hover:bg-zinc-100 rounded-full transition-all",title:"Import JSON",children:(0,b.jsx)(S.Upload,{size:18})})]}),(0,b.jsxs)("div",{className:"flex items-center gap-1 px-1",children:[(0,b.jsx)("button",{className:"flex items-center gap-2 px-3 py-2 bg-emerald-500 text-white rounded-full font-medium text-sm hover:bg-emerald-600 shadow-md shadow-emerald-200 transition-all mr-1",onClick:r,disabled:m,children:m?(0,b.jsx)("div",{className:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin"}):(0,b.jsx)(S.Play,{size:16,fill:"currentColor"})}),(0,b.jsxs)("button",{className:"flex items-center gap-2 px-4 py-2 bg-indigo-600 text-white rounded-full font-medium text-sm hover:bg-indigo-700 shadow-md shadow-indigo-200 transition-all disabled:opacity-70 disabled:cursor-not-allowed",onClick:e,disabled:h,children:[h?(0,b.jsx)("div",{className:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin"}):(0,b.jsx)(S.Save,{size:16}),(0,b.jsx)("span",{children:"Save"})]})]})]})}var D=require("lucide-react"),Te=require("reactflow");function Se(e){if(!e.trim().toLowerCase().startsWith("curl"))return null;let t="GET",a={},i,n="",p=e.replace(/\\\n/g," ").replace(/\n/g," "),r=p.match(/'(http[^']*)'|"(http[^"]*)"|(http\S+)/);r&&(n=r[1]||r[2]||r[3]);let h=p.match(/-X\s+([A-Z]+)/);h&&(t=h[1]);let m=/-H\s+['"]([^'"]+)['"]/g,o;for(;(o=m.exec(p))!==null;){let[v,d]=o[1].split(/:\s?(.+)/);v&&d&&(a[v]=d)}let f=p.match(/(-d|--data|--data-raw)\s+['"]([^'"]+)['"]/);return f&&(i=f[2],t==="GET"&&(t="POST")),{method:t,url:n,headers:a,body:i}}var c=require("react/jsx-runtime");function Pe({selectedNodeId:e,selectedNodeType:t,onClose:a}){var d;let{setNodes:i,getNodes:n,deleteElements:p}=(0,Te.useReactFlow)();if(!e)return null;let r=n().find(s=>s.id===e);if(!r)return null;let h=((d=r.data)==null?void 0:d.type)||r.type||t,m=L[h],o=ce(h);if(o){m=JSON.parse(JSON.stringify(m));let s=r.data.operation;if(s){let w=o.operations.find(k=>k.id===s);w&&(m.inputs=[...m.inputs,...w.inputs])}}if(!m)return(0,c.jsxs)("div",{className:"absolute top-4 right-4 w-80 bg-white p-4 rounded shadow border border-red-200 z-50",children:[(0,c.jsxs)("div",{className:"flex items-center justify-between text-red-600 mb-2",children:[(0,c.jsxs)("div",{className:"flex items-center gap-2",children:[(0,c.jsx)(D.AlertCircle,{size:16}),(0,c.jsx)("span",{className:"font-bold",children:"Unknown Node Type"})]}),(0,c.jsx)("button",{onClick:a,children:(0,c.jsx)(D.X,{size:16})})]}),(0,c.jsxs)("p",{className:"text-xs text-zinc-500 mt-1",children:["ID: ",h]})]});let f=(s,w)=>{i(k=>k.map(P=>P.id===e?{...P,data:{...P.data,[s]:w}}:P))},v=()=>{p({nodes:[{id:e}]}),a()};return(0,c.jsxs)("div",{className:"absolute top-4 right-4 bottom-4 w-80 bg-white/95 backdrop-blur-md border border-zinc-200 shadow-2xl rounded-xl z-50 flex flex-col overflow-hidden animate-in slide-in-from-right duration-200",children:[(0,c.jsxs)("div",{className:"p-4 border-b border-zinc-100 flex items-center justify-between bg-zinc-50/50",children:[(0,c.jsxs)("div",{className:"flex items-center gap-2 text-zinc-700 font-semibold",children:[(0,c.jsx)(D.Settings2,{size:16}),(0,c.jsxs)("span",{children:[m.label," Properties"]})]}),(0,c.jsxs)("div",{className:"flex items-center gap-1",children:[h==="http-request"&&(0,c.jsxs)("button",{onClick:()=>{let s=prompt("Paste your cURL command here:");if(s){let w=Se(s);w?i(k=>k.map(P=>P.id===e?{...P,data:{...P.data,method:w.method,url:w.url,headers:JSON.stringify(w.headers,null,2),body:w.body||"{}"}}:P)):alert("Could not parse cURL command.")}},className:"p-1.5 text-indigo-500 hover:text-indigo-700 hover:bg-indigo-50 rounded-md transition-colors flex items-center gap-1 text-xs font-medium mr-1",title:"Import cURL",children:[(0,c.jsx)(D.Import,{size:14}),(0,c.jsx)("span",{children:"Import cURL"})]}),(0,c.jsx)("button",{onClick:v,className:"p-1.5 text-red-400 hover:text-red-600 hover:bg-red-50 rounded-md transition-colors",title:"Delete Node",children:(0,c.jsx)(D.Trash2,{size:16})}),(0,c.jsx)("button",{onClick:a,className:"p-1.5 text-zinc-400 hover:text-zinc-700 hover:bg-zinc-100 rounded-md transition-colors",children:(0,c.jsx)(D.X,{size:16})})]})]}),(0,c.jsxs)("div",{className:"p-4 space-y-5 flex-1 overflow-y-auto",children:[(0,c.jsxs)("div",{className:"space-y-1 pb-4 border-b border-zinc-100",children:[(0,c.jsx)("label",{className:"text-xs font-bold uppercase tracking-wider text-zinc-400",children:"Description"}),(0,c.jsx)("p",{className:"text-sm text-zinc-600",children:m.description})]}),m.inputs.map(s=>{var w;return(0,c.jsxs)("div",{className:"space-y-2",children:[(0,c.jsx)("label",{className:"block text-xs font-bold uppercase tracking-wider text-zinc-500",children:s.label}),s.type==="text"&&(0,c.jsx)("input",{type:"text",value:r.data[s.key]||"",onChange:k=>f(s.key,k.target.value),placeholder:s.placeholder,className:"w-full px-3 py-2 bg-white border border-zinc-200 rounded-md text-sm text-zinc-800 focus:outline-none focus:ring-2 focus:ring-indigo-500/20 focus:border-indigo-500 transition-all"}),s.type==="select"&&(0,c.jsxs)("select",{value:r.data[s.key]||"",onChange:k=>f(s.key,k.target.value),className:"w-full px-3 py-2 bg-white border border-zinc-200 rounded-md text-sm text-zinc-800 focus:outline-none focus:ring-2 focus:ring-indigo-500/20 focus:border-indigo-500 transition-all",children:[(0,c.jsx)("option",{value:"",disabled:!0,children:"Select..."}),(w=s.options)==null?void 0:w.map(k=>(0,c.jsx)("option",{value:k.value,children:k.label},k.value))]}),(s.type==="json"||s.type==="code")&&(0,c.jsx)("textarea",{value:typeof r.data[s.key]=="object"?JSON.stringify(r.data[s.key],null,2):r.data[s.key]||"",onChange:k=>f(s.key,k.target.value),rows:5,className:"w-full px-3 py-2 bg-white border border-zinc-200 rounded-md text-sm font-mono text-zinc-800 focus:outline-none focus:ring-2 focus:ring-indigo-500/20 focus:border-indigo-500 transition-all resize-y"})]},s.key)})]})]})}var te=require("react"),T=require("lucide-react");var y=require("react/jsx-runtime"),ft={Webhook:T.Zap,Clock:T.Clock,Globe:T.Globe,Mail:T.Mail,MessageSquare:T.MessageSquare,Split:T.Split,GitMerge:T.GitMerge,Zap:T.Zap,...K};function Re({isOpen:e,onClose:t,onSelect:a}){let[i,n]=(0,te.useState)(""),p=(0,te.useMemo)(()=>{let r={};Object.values(L).forEach(o=>{if(o.label.toLowerCase().includes(i.toLowerCase())||o.description&&o.description.toLowerCase().includes(i.toLowerCase())){let v=o.category||"other";r[v]||(r[v]=[]),r[v].push(o)}});let h=["trigger","logic","action","utility","integration"],m={};return h.forEach(o=>{r[o]&&(m[o]=r[o])}),Object.keys(r).forEach(o=>{h.includes(o)||(m[o]=r[o])}),m},[i]);return e?(0,y.jsxs)("div",{className:"absolute inset-0 z-[100] bg-black/20 backdrop-blur-sm flex items-start justify-center pt-20 animate-in fade-in duration-200",children:[(0,y.jsxs)("div",{className:"w-[600px] bg-white rounded-xl shadow-2xl border border-zinc-200 overflow-hidden flex flex-col max-h-[70vh] animate-in slide-in-from-bottom-4 duration-300",children:[(0,y.jsxs)("div",{className:"p-4 border-b border-zinc-100 flex items-center gap-3 bg-zinc-50/50",children:[(0,y.jsx)(T.Search,{className:"text-zinc-400",size:20}),(0,y.jsx)("input",{autoFocus:!0,type:"text",placeholder:"Search nodes...",className:"flex-1 bg-transparent border-none outline-none text-zinc-900 placeholder:text-zinc-400 text-lg",value:i,onChange:r=>n(r.target.value)}),(0,y.jsx)("div",{className:"px-2 py-1 bg-zinc-100 border border-zinc-200 rounded text-xs text-zinc-500 font-medium",children:"ESC"}),(0,y.jsx)("button",{onClick:t,className:"text-zinc-400 hover:text-zinc-700",children:(0,y.jsx)(T.X,{size:20})})]}),(0,y.jsxs)("div",{className:"overflow-y-auto p-4 space-y-2",children:[Object.entries(p).map(([r,h])=>{if(h.length===0)return null;let m=i.length>0;return(0,y.jsxs)("details",{open:!0,className:"group border border-zinc-200 rounded-lg bg-zinc-50/30 open:bg-white transition-all duration-200",children:[(0,y.jsxs)("summary",{className:"flex items-center justify-between p-3 cursor-pointer list-none text-zinc-600 font-medium hover:bg-zinc-50 select-none",children:[(0,y.jsxs)("div",{className:"flex items-center gap-2",children:[(0,y.jsx)("span",{className:"uppercase tracking-wider text-xs font-bold text-zinc-500",children:r}),(0,y.jsx)("span",{className:"text-xs bg-zinc-100 text-zinc-400 px-1.5 py-0.5 rounded-full",children:h.length})]}),(0,y.jsx)("div",{className:"text-zinc-400 group-open:rotate-180 transition-transform",children:(0,y.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,y.jsx)("path",{d:"m6 9 6 6 6-6"})})})]}),(0,y.jsx)("div",{className:"p-3 pt-0 border-t border-transparent group-open:border-zinc-100",children:(0,y.jsx)("div",{className:"grid grid-cols-2 gap-3 pt-2",children:h.map(o=>{let f=ft[o.icon]||K[o.icon]||T.Zap;return(0,y.jsxs)("button",{onClick:()=>a(o.type),className:"flex items-start gap-3 p-3 rounded-lg border border-zinc-100 bg-white hover:border-indigo-200 hover:shadow-md hover:bg-indigo-50/30 transition-all text-left group/btn",children:[(0,y.jsx)("div",{className:W("p-2 rounded-md transition-colors",`bg-${o.color}-50 text-${o.color}-600 group-hover/btn:bg-white`),children:(0,y.jsx)(f,{size:20})}),(0,y.jsxs)("div",{children:[(0,y.jsx)("div",{className:"font-semibold text-zinc-900 text-sm",children:o.label}),(0,y.jsx)("div",{className:"text-xs text-zinc-500 line-clamp-2 leading-relaxed",children:o.description})]})]},o.type)})})})]},r)}),Object.values(p).every(r=>r.length===0)&&(0,y.jsx)("div",{className:"text-center py-12 text-zinc-400",children:(0,y.jsxs)("p",{children:['No nodes found matching "',i,'"']})})]})]}),(0,y.jsx)("div",{className:"absolute inset-0 -z-10",onClick:t})]}):null}var oe=require("react"),$=require("lucide-react");var B=require("react/jsx-runtime");function Ee({message:e,type:t,isVisible:a,onClose:i}){let[n,p]=(0,oe.useState)(!1);return(0,oe.useEffect)(()=>{if(a){p(!0);let r=setTimeout(()=>{i()},4e3);return()=>clearTimeout(r)}else setTimeout(()=>p(!1),300)},[a,i]),!n&&!a?null:(0,B.jsxs)("div",{className:W("absolute bottom-6 left-1/2 -translate-x-1/2 z-[100] flex items-center gap-3 px-4 py-3 rounded-lg shadow-xl border transition-all duration-300 transform",t==="success"?"bg-white border-emerald-100 text-emerald-800":"bg-white border-red-100 text-red-800",a?"translate-y-0 opacity-100 scale-100":"translate-y-4 opacity-0 scale-95"),children:[t==="success"?(0,B.jsx)($.CheckCircle2,{size:20,className:"text-emerald-500"}):(0,B.jsx)($.AlertCircle,{size:20,className:"text-red-500"}),(0,B.jsx)("span",{className:"font-medium text-sm",children:e}),(0,B.jsx)("button",{onClick:i,className:"ml-2 hover:opacity-70",children:(0,B.jsx)($.X,{size:16,className:"text-zinc-400"})})]})}var We=require("reactflow");var ue=fe(require("dagre")),Y=require("reactflow"),X=new ue.default.graphlib.Graph;X.setDefaultEdgeLabel(()=>({}));var Ie=240,Oe=150,Me=(e,t,a="LR")=>{let i=a==="LR";return X.setGraph({rankdir:a}),e.forEach(p=>{X.setNode(p.id,{width:Ie,height:Oe})}),t.forEach(p=>{X.setEdge(p.source,p.target)}),ue.default.layout(X),{nodes:e.map(p=>{let r=X.node(p.id);return p.targetPosition=i?Y.Position.Left:Y.Position.Top,p.sourcePosition=i?Y.Position.Right:Y.Position.Bottom,p.position={x:r.x-Ie/2,y:r.y-Oe/2},p}),edges:t}};var q=require("react");function Le(e,t,a,i){let[n,p]=(0,q.useState)([{nodes:e,edges:t}]),[r,h]=(0,q.useState)(0),m=(0,q.useCallback)((v,d)=>{p(s=>{let w=s.slice(0,r+1);return w.push({nodes:v,edges:d}),w.length>50&&w.shift(),w}),h(s=>Math.min(s+1,50))},[r]),o=(0,q.useCallback)(()=>{if(r>0){let v=r-1,d=n[v];a(d.nodes),i(d.edges),h(v)}},[r,n,a,i]),f=(0,q.useCallback)(()=>{if(r<n.length-1){let v=r+1,d=n[v];a(d.nodes),i(d.edges),h(v)}},[r,n,a,i]);return{takeSnapshot:m,undo:o,redo:f,canUndo:r>0,canRedo:r<n.length-1}}function Ue(e,t){let a=[];if(e.length===0)return a.push({nodeId:"root",message:"Workflow is empty",severity:"warning"}),a;let i=new Set;return t.forEach(n=>{i.add(n.source),i.add(n.target)}),e.forEach(n=>{!i.has(n.id)&&e.length>1&&a.push({nodeId:n.id,message:"Node is disconnected",severity:"warning"}),n.type&&L[n.type],n.type==="http-request"&&(n.data.url||a.push({nodeId:n.id,field:"url",message:"URL is required",severity:"error"})),n.type}),a}var C=require("react/jsx-runtime"),De=[{id:"1",type:"webhook",position:{x:100,y:100},data:{method:"POST",path:"/start"}},{id:"2",type:"http-request",position:{x:100,y:300},data:{method:"POST",url:"https://api.example.com/data"}},{id:"3",type:"slack",position:{x:400,y:200},data:{message:"Workflow completed",webhookUrl:"https://hooks.slack.com/..."}}],Ae=[{id:"e1-2",source:"1",target:"2",type:"smoothstep",animated:!0,style:{stroke:"#6366f1",strokeWidth:2}},{id:"e2-3",source:"2",target:"3",type:"smoothstep",animated:!0,style:{stroke:"#6366f1",strokeWidth:2}}],be=e=>(0,C.jsx)(We.ReactFlowProvider,{children:(0,C.jsx)(xt,{...e})}),xt=({licenseKey:e,apiConfig:t,className:a,style:i})=>{let[n,p]=(0,x.useState)(null),[r,h]=(0,x.useState)(""),[m]=(0,x.useState)(()=>new re({licenseKey:e,widgetVersion:"1.0.0",validationEndpoint:"http://localhost:3000/api/v1/license/validate"})),[o,f,v]=(0,M.useNodesState)(De),[d,s,w]=(0,M.useEdgesState)(Ae),[k,P]=(0,x.useState)(!1),[J,ye]=(0,x.useState)(!1),[H,j]=(0,x.useState)(null),{takeSnapshot:U,undo:je,redo:Be,canUndo:Fe,canRedo:He}=Le(De,Ae,g=>f([...g]),g=>s([...g])),kt=(0,x.useCallback)(()=>{U(o,d)},[o,d,U]),[_e,Z]=(0,x.useState)(null),qe=(0,x.useMemo)(()=>{let g={custom:pe};return Object.keys(L).forEach(u=>{g[u]=pe}),g},[]);(0,x.useEffect)(()=>{async function g(){let u=await m.validate();p(u.valid),u.valid||h(u.reason||"Invalid License")}g()},[m]);let Je=(0,x.useCallback)(g=>{s(u=>{let N=(0,M.addEdge)({...g,type:"smoothstep",animated:!0,style:{stroke:"#6366f1",strokeWidth:2}},u);return U(o,N),N})},[s,o,U]),Ve=(0,x.useCallback)((g,u)=>{Z(u.id)},[]),$e=(0,x.useCallback)(()=>{Z(null)},[]),Xe=(0,x.useRef)(null),[G,Ke]=(0,x.useState)(null),[Ye,ae]=(0,x.useState)(!1),Ze=(0,x.useCallback)(g=>{let u=`node-${Date.now()}`,N={x:250,y:250};G&&(N={x:100+Math.random()*200,y:100+Math.random()*200});let R={id:u,type:g,position:N,data:{}},E=o.concat(R);f(E),U(E,d),ae(!1),Z(u)},[G,o,d,U,f]),Qe=(0,x.useCallback)(()=>{let{nodes:g,edges:u}=Me(o,d);f([...g]),s([...u]),U([...g],[...u]),setTimeout(()=>G==null?void 0:G.fitView(),100)},[o,d,f,s,U,G]),et=(0,x.useCallback)(()=>{confirm("Are you sure you want to clear the canvas?")&&(f([]),s([]),U([],[]))},[f,s,U]),tt=(0,x.useCallback)(async()=>{if(J)return;ye(!0),j(null);let g=o.map(N=>({...N,data:{...N.data,executionStatus:void 0}}));f(g);let u=(N,R)=>{f(E=>E.map(A=>A.id===N?{...A,data:{...A.data,executionStatus:R}}:A))};try{let N={};d.forEach(E=>{N[E.source]||(N[E.source]=[]),N[E.source].push(E.target)});let R=o.filter(E=>["webhook","schedule","connector"].includes(E.type||"")||d.every(A=>A.target!==E.id)).map(E=>E.id);if(R.length===0&&o.length>0&&R.push(o[0].id),R.length===0)throw new Error("No start node found");for(let E of R){u(E,"running"),await new Promise(V=>setTimeout(V,800)),u(E,"success");let A=N[E]||[];for(let V of A)u(V,"running"),await new Promise(it=>setTimeout(it,800)),u(V,"success")}j({message:"Execution completed successfully",type:"success"})}catch(N){j({message:N.message||"Execution Success",type:"success"})}finally{ye(!1)}},[o,d,J,f]),ot=async()=>{let g=Ue(o,d),u=g.filter(V=>V.severity==="error");if(u.length>0){j({message:`Cannot save: ${u[0].message}`,type:"error"});return}g.length>0&&j({message:`Saved with warnings: ${g[0].message}`,type:"success"}),P(!0);let N=new ie(t),R={nodes:o,edges:d},A=!!await N.createWorkflow(R);P(!1),j(A?{message:"Workflow saved successfully",type:"success"}:{message:"Failed to save workflow",type:"error"})},at=()=>{let g=se(o,d),u=new Blob([g],{type:"application/json"}),N=URL.createObjectURL(u),R=document.createElement("a");R.href=N,R.download=`workflow-${Date.now()}.json`,document.body.appendChild(R),R.click(),document.body.removeChild(R)},rt=async g=>{try{let u=await g.text(),{nodes:N,edges:R}=le(u);f(N),s(R),U(N,R),setTimeout(()=>{G==null||G.fitView({padding:.2})},50)}catch(u){alert("Failed to import workflow. Invalid file."),console.error(u)}};return n===null?(0,C.jsx)("div",{className:"flex items-center justify-center h-[600px] w-full bg-zinc-50 rounded-xl border border-zinc-200",children:(0,C.jsxs)("div",{className:"flex flex-col items-center gap-3",children:[(0,C.jsx)("div",{className:"w-6 h-6 border-2 border-indigo-600 border-t-transparent rounded-full animate-spin"}),(0,C.jsx)("p",{className:"text-zinc-500 text-sm font-medium",children:"Verifying License..."})]})}):(0,C.jsxs)("div",{style:i,className:`relative w-full h-[800px] rounded-xl border border-zinc-200 shadow-sm overflow-hidden bg-zinc-50/50 group ${a||""}`,children:[!n&&(0,C.jsxs)("div",{className:"absolute inset-0 z-50 bg-white/80 backdrop-blur-md flex flex-col items-center justify-center p-8 text-center",children:[(0,C.jsx)("div",{className:"w-16 h-16 bg-red-100 rounded-full flex items-center justify-center mb-4",children:(0,C.jsx)("div",{className:"w-8 h-8 text-red-600",children:"\u26A0\uFE0F"})}),(0,C.jsx)("h2",{className:"text-2xl font-bold text-zinc-900 mb-2",children:"License Verification Failed"}),(0,C.jsxs)("p",{className:"text-zinc-600 max-w-md",children:[r,". Please update your license key to access the builder."]})]}),(0,C.jsx)(Ce,{onSave:ot,onExport:at,onImport:rt,onAddNode:()=>ae(!0),onAutoLayout:Qe,onClear:et,onRun:tt,isSaving:k,isRunning:J,canUndo:Fe,canRedo:He,onUndo:je,onRedo:Be}),(0,C.jsx)(Pe,{selectedNodeId:_e||void 0,onClose:()=>Z(null)}),(0,C.jsx)(Re,{isOpen:Ye,onClose:()=>ae(!1),onSelect:Ze}),(0,C.jsx)(Ee,{message:(H==null?void 0:H.message)||"",type:(H==null?void 0:H.type)||"success",isVisible:!!H,onClose:()=>j(null)}),(0,C.jsx)("div",{className:"w-full h-full",ref:Xe,children:(0,C.jsxs)(M.default,{nodes:o,edges:d,onNodesChange:v,onEdgesChange:w,onConnect:Je,onNodeClick:Ve,onPaneClick:$e,onInit:Ke,nodeTypes:qe,fitView:!0,className:"bg-zinc-50",children:[(0,C.jsx)(M.Background,{variant:M.BackgroundVariant.Dots,gap:20,size:1,color:"#94a3b8",className:"bg-slate-50"}),(0,C.jsx)(M.Controls,{className:"!bg-white !border-slate-200 !shadow-xl !rounded-lg overflow-hidden [&>button]:!border-b-slate-100 [&>button]:!text-slate-600 hover:[&>button]:!bg-indigo-50 hover:[&>button]:!text-indigo-600 transition-colors"}),(0,C.jsx)(M.MiniMap,{className:"!bg-white !border-slate-200 !shadow-xl !rounded-lg !mb-8 !mr-8",maskColor:"rgba(241, 245, 249, 0.7)",nodeColor:g=>{var u;return(u=g.type)!=null&&u.includes("trigger")||g.type==="webhook"?"#818cf8":g.type==="action"?"#34d399":"#cbd5e1"},zoomable:!0,pannable:!0})]})})]})};var Ge=require("react/jsx-runtime");function me(e){return(0,Ge.jsx)(be,{...e})}var ge=require("react"),F=require("lucide-react");var O=require("react/jsx-runtime");function vt({licenseKey:e,apiConfig:t,position:a="bottom-right",themeColor:i="#2563eb"}){let[n,p]=(0,ge.useState)(!1),[r,h]=(0,ge.useState)(!1),m=()=>p(!n),o=()=>h(!r),f={position:"fixed",bottom:"20px",[a==="bottom-right"?"right":"left"]:"20px",zIndex:9999,display:"flex",flexDirection:"column",alignItems:a==="bottom-right"?"flex-end":"flex-start",gap:"10px"},v=r?{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",backgroundColor:"white",zIndex:1e4,boxShadow:"0 0 20px rgba(0,0,0,0.2)",display:"flex",flexDirection:"column"}:{width:"800px",height:"600px",backgroundColor:"white",borderRadius:"12px",boxShadow:"0 4px 20px rgba(0,0,0,0.15)",border:"1px solid #e5e7eb",display:"flex",flexDirection:"column",overflow:"hidden"};return n?(0,O.jsx)("div",{style:r?{position:"fixed",top:0,left:0,zIndex:1e4}:f,children:(0,O.jsxs)("div",{style:v,children:[(0,O.jsxs)("div",{style:{padding:"12px 16px",borderBottom:"1px solid #eee",display:"flex",justifyContent:"space-between",alignItems:"center",backgroundColor:"#f9fafb",color:"black"},children:[(0,O.jsx)("h3",{style:{margin:0,fontSize:"16px",fontWeight:600},children:"Workflow Builder"}),(0,O.jsxs)("div",{style:{display:"flex",gap:"8px"},children:[(0,O.jsx)("button",{onClick:o,style:{background:"none",border:"none",cursor:"pointer",padding:4},children:r?(0,O.jsx)(F.Minimize2,{size:18}):(0,O.jsx)(F.Maximize2,{size:18})}),(0,O.jsx)("button",{onClick:m,style:{background:"none",border:"none",cursor:"pointer",padding:4},children:(0,O.jsx)(F.X,{size:18})})]})]}),(0,O.jsx)("div",{style:{flex:1,position:"relative"},children:(0,O.jsx)(me,{licenseKey:e,apiConfig:t})})]})}):(0,O.jsx)("div",{style:f,children:(0,O.jsx)("button",{onClick:m,style:{width:"60px",height:"60px",borderRadius:"50%",backgroundColor:i,color:"white",border:"none",cursor:"pointer",boxShadow:"0 4px 12px rgba(0,0,0,0.2)",display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.2s"},onMouseEnter:d=>d.currentTarget.style.transform="scale(1.05)",onMouseLeave:d=>d.currentTarget.style.transform="scale(1)",children:(0,O.jsx)(F.Settings,{size:28})})})}0&&(module.exports={ApiClient,EmbeddableWidget,LicenseManager,WorkflowBuilder,WorkflowSerializer,WorkflowWidget,createConnectorNode,deserialize,getConnectorDetails,nodeRegistry,registerConnector,serialize,standardConnectors});
|
|
2
|
+
//# sourceMappingURL=index.js.map
|