@object-ui/plugin-designer 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/dist/index.js ADDED
@@ -0,0 +1,1166 @@
1
+ import { ComponentRegistry as G } from "@object-ui/core";
2
+ import xe, { useState as A, useMemo as Z, useCallback as P, createContext as fe } from "react";
3
+ import { Plus as K, Undo2 as be, Redo2 as ge, Eye as ye, GripVertical as ve, Trash2 as L, Layers as we, Database as le, Link2 as je, GitBranch as Ne, Play as Ee, Square as oe, Diamond as ke, FileText as Re, Type as Te, ImageIcon as _e, BarChart3 as Se, Table2 as Ae } from "lucide-react";
4
+ import { clsx as M } from "clsx";
5
+ import { twMerge as Y } from "tailwind-merge";
6
+ var F = { exports: {} }, $ = {};
7
+ var ne;
8
+ function Pe() {
9
+ if (ne) return $;
10
+ ne = 1;
11
+ var l = /* @__PURE__ */ Symbol.for("react.transitional.element"), u = /* @__PURE__ */ Symbol.for("react.fragment");
12
+ function p(w, i, d) {
13
+ var x = null;
14
+ if (d !== void 0 && (x = "" + d), i.key !== void 0 && (x = "" + i.key), "key" in i) {
15
+ d = {};
16
+ for (var E in i)
17
+ E !== "key" && (d[E] = i[E]);
18
+ } else d = i;
19
+ return i = d.ref, {
20
+ $$typeof: l,
21
+ type: w,
22
+ key: x,
23
+ ref: i !== void 0 ? i : null,
24
+ props: d
25
+ };
26
+ }
27
+ return $.Fragment = u, $.jsx = p, $.jsxs = p, $;
28
+ }
29
+ var z = {};
30
+ var ie;
31
+ function Ce() {
32
+ return ie || (ie = 1, process.env.NODE_ENV !== "production" && (function() {
33
+ function l(t) {
34
+ if (t == null) return null;
35
+ if (typeof t == "function")
36
+ return t.$$typeof === pe ? null : t.displayName || t.name || null;
37
+ if (typeof t == "string") return t;
38
+ switch (t) {
39
+ case o:
40
+ return "Fragment";
41
+ case c:
42
+ return "Profiler";
43
+ case r:
44
+ return "StrictMode";
45
+ case h:
46
+ return "Suspense";
47
+ case f:
48
+ return "SuspenseList";
49
+ case V:
50
+ return "Activity";
51
+ }
52
+ if (typeof t == "object")
53
+ switch (typeof t.tag == "number" && console.error(
54
+ "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
55
+ ), t.$$typeof) {
56
+ case S:
57
+ return "Portal";
58
+ case T:
59
+ return t.displayName || "Context";
60
+ case s:
61
+ return (t._context.displayName || "Context") + ".Consumer";
62
+ case m:
63
+ var a = t.render;
64
+ return t = t.displayName, t || (t = a.displayName || a.name || "", t = t !== "" ? "ForwardRef(" + t + ")" : "ForwardRef"), t;
65
+ case C:
66
+ return a = t.displayName || null, a !== null ? a : l(t.type) || "Memo";
67
+ case D:
68
+ a = t._payload, t = t._init;
69
+ try {
70
+ return l(t(a));
71
+ } catch {
72
+ }
73
+ }
74
+ return null;
75
+ }
76
+ function u(t) {
77
+ return "" + t;
78
+ }
79
+ function p(t) {
80
+ try {
81
+ u(t);
82
+ var a = !1;
83
+ } catch {
84
+ a = !0;
85
+ }
86
+ if (a) {
87
+ a = console;
88
+ var y = a.error, j = typeof Symbol == "function" && Symbol.toStringTag && t[Symbol.toStringTag] || t.constructor.name || "Object";
89
+ return y.call(
90
+ a,
91
+ "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
92
+ j
93
+ ), u(t);
94
+ }
95
+ }
96
+ function w(t) {
97
+ if (t === o) return "<>";
98
+ if (typeof t == "object" && t !== null && t.$$typeof === D)
99
+ return "<...>";
100
+ try {
101
+ var a = l(t);
102
+ return a ? "<" + a + ">" : "<...>";
103
+ } catch {
104
+ return "<...>";
105
+ }
106
+ }
107
+ function i() {
108
+ var t = U.A;
109
+ return t === null ? null : t.getOwner();
110
+ }
111
+ function d() {
112
+ return Error("react-stack-top-frame");
113
+ }
114
+ function x(t) {
115
+ if (Q.call(t, "key")) {
116
+ var a = Object.getOwnPropertyDescriptor(t, "key").get;
117
+ if (a && a.isReactWarning) return !1;
118
+ }
119
+ return t.key !== void 0;
120
+ }
121
+ function E(t, a) {
122
+ function y() {
123
+ ee || (ee = !0, console.error(
124
+ "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
125
+ a
126
+ ));
127
+ }
128
+ y.isReactWarning = !0, Object.defineProperty(t, "key", {
129
+ get: y,
130
+ configurable: !0
131
+ });
132
+ }
133
+ function n() {
134
+ var t = l(this.type);
135
+ return te[t] || (te[t] = !0, console.error(
136
+ "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
137
+ )), t = this.props.ref, t !== void 0 ? t : null;
138
+ }
139
+ function _(t, a, y, j, I, q) {
140
+ var N = y.ref;
141
+ return t = {
142
+ $$typeof: v,
143
+ type: t,
144
+ key: a,
145
+ props: y,
146
+ _owner: j
147
+ }, (N !== void 0 ? N : null) !== null ? Object.defineProperty(t, "ref", {
148
+ enumerable: !1,
149
+ get: n
150
+ }) : Object.defineProperty(t, "ref", { enumerable: !1, value: null }), t._store = {}, Object.defineProperty(t._store, "validated", {
151
+ configurable: !1,
152
+ enumerable: !1,
153
+ writable: !0,
154
+ value: 0
155
+ }), Object.defineProperty(t, "_debugInfo", {
156
+ configurable: !1,
157
+ enumerable: !1,
158
+ writable: !0,
159
+ value: null
160
+ }), Object.defineProperty(t, "_debugStack", {
161
+ configurable: !1,
162
+ enumerable: !1,
163
+ writable: !0,
164
+ value: I
165
+ }), Object.defineProperty(t, "_debugTask", {
166
+ configurable: !1,
167
+ enumerable: !1,
168
+ writable: !0,
169
+ value: q
170
+ }), Object.freeze && (Object.freeze(t.props), Object.freeze(t)), t;
171
+ }
172
+ function b(t, a, y, j, I, q) {
173
+ var N = a.children;
174
+ if (N !== void 0)
175
+ if (j)
176
+ if (he(N)) {
177
+ for (j = 0; j < N.length; j++)
178
+ k(N[j]);
179
+ Object.freeze && Object.freeze(N);
180
+ } else
181
+ console.error(
182
+ "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
183
+ );
184
+ else k(N);
185
+ if (Q.call(a, "key")) {
186
+ N = l(t);
187
+ var O = Object.keys(a).filter(function(me) {
188
+ return me !== "key";
189
+ });
190
+ j = 0 < O.length ? "{key: someKey, " + O.join(": ..., ") + ": ...}" : "{key: someKey}", ae[N + j] || (O = 0 < O.length ? "{" + O.join(": ..., ") + ": ...}" : "{}", console.error(
191
+ `A props object containing a "key" prop is being spread into JSX:
192
+ let props = %s;
193
+ <%s {...props} />
194
+ React keys must be passed directly to JSX without using spread:
195
+ let props = %s;
196
+ <%s key={someKey} {...props} />`,
197
+ j,
198
+ N,
199
+ O,
200
+ N
201
+ ), ae[N + j] = !0);
202
+ }
203
+ if (N = null, y !== void 0 && (p(y), N = "" + y), x(a) && (p(a.key), N = "" + a.key), "key" in a) {
204
+ y = {};
205
+ for (var H in a)
206
+ H !== "key" && (y[H] = a[H]);
207
+ } else y = a;
208
+ return N && E(
209
+ y,
210
+ typeof t == "function" ? t.displayName || t.name || "Unknown" : t
211
+ ), _(
212
+ t,
213
+ N,
214
+ y,
215
+ i(),
216
+ I,
217
+ q
218
+ );
219
+ }
220
+ function k(t) {
221
+ g(t) ? t._store && (t._store.validated = 1) : typeof t == "object" && t !== null && t.$$typeof === D && (t._payload.status === "fulfilled" ? g(t._payload.value) && t._payload.value._store && (t._payload.value._store.validated = 1) : t._store && (t._store.validated = 1));
222
+ }
223
+ function g(t) {
224
+ return typeof t == "object" && t !== null && t.$$typeof === v;
225
+ }
226
+ var R = xe, v = /* @__PURE__ */ Symbol.for("react.transitional.element"), S = /* @__PURE__ */ Symbol.for("react.portal"), o = /* @__PURE__ */ Symbol.for("react.fragment"), r = /* @__PURE__ */ Symbol.for("react.strict_mode"), c = /* @__PURE__ */ Symbol.for("react.profiler"), s = /* @__PURE__ */ Symbol.for("react.consumer"), T = /* @__PURE__ */ Symbol.for("react.context"), m = /* @__PURE__ */ Symbol.for("react.forward_ref"), h = /* @__PURE__ */ Symbol.for("react.suspense"), f = /* @__PURE__ */ Symbol.for("react.suspense_list"), C = /* @__PURE__ */ Symbol.for("react.memo"), D = /* @__PURE__ */ Symbol.for("react.lazy"), V = /* @__PURE__ */ Symbol.for("react.activity"), pe = /* @__PURE__ */ Symbol.for("react.client.reference"), U = R.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Q = Object.prototype.hasOwnProperty, he = Array.isArray, W = console.createTask ? console.createTask : function() {
227
+ return null;
228
+ };
229
+ R = {
230
+ react_stack_bottom_frame: function(t) {
231
+ return t();
232
+ }
233
+ };
234
+ var ee, te = {}, re = R.react_stack_bottom_frame.bind(
235
+ R,
236
+ d
237
+ )(), se = W(w(d)), ae = {};
238
+ z.Fragment = o, z.jsx = function(t, a, y) {
239
+ var j = 1e4 > U.recentlyCreatedOwnerStacks++;
240
+ return b(
241
+ t,
242
+ a,
243
+ y,
244
+ !1,
245
+ j ? Error("react-stack-top-frame") : re,
246
+ j ? W(w(t)) : se
247
+ );
248
+ }, z.jsxs = function(t, a, y) {
249
+ var j = 1e4 > U.recentlyCreatedOwnerStacks++;
250
+ return b(
251
+ t,
252
+ a,
253
+ y,
254
+ !0,
255
+ j ? Error("react-stack-top-frame") : re,
256
+ j ? W(w(t)) : se
257
+ );
258
+ };
259
+ })()), z;
260
+ }
261
+ var de;
262
+ function De() {
263
+ return de || (de = 1, process.env.NODE_ENV === "production" ? F.exports = Pe() : F.exports = Ce()), F.exports;
264
+ }
265
+ var e = De();
266
+ function J(...l) {
267
+ return Y(M(l));
268
+ }
269
+ function Oe({
270
+ canvas: l = { width: 1200, height: 800, gridSize: 8, showGrid: !0, snapToGrid: !0 },
271
+ components: u = [],
272
+ palette: p = $e,
273
+ showComponentTree: w = !0,
274
+ undoRedo: i = !0,
275
+ readOnly: d = !1,
276
+ onChange: x,
277
+ className: E
278
+ }) {
279
+ const [n, _] = A(u), [b, k] = A(null), [g, R] = A(l.zoom ?? 1), v = Z(
280
+ () => n.find((r) => r.id === b),
281
+ [n, b]
282
+ ), S = P(
283
+ (r, c) => {
284
+ if (d) return;
285
+ const s = {
286
+ id: `comp-${Date.now()}`,
287
+ type: r,
288
+ label: c,
289
+ position: { x: 100, y: 100, width: 200, height: 100 },
290
+ props: {}
291
+ }, T = [...n, s];
292
+ _(T), k(s.id), x?.(T);
293
+ },
294
+ [n, d, x]
295
+ ), o = P(
296
+ (r) => {
297
+ if (d) return;
298
+ const c = n.filter((s) => s.id !== r);
299
+ _(c), b === r && k(null), x?.(c);
300
+ },
301
+ [n, b, d, x]
302
+ );
303
+ return /* @__PURE__ */ e.jsxs("div", { className: J("flex h-full w-full border rounded-lg overflow-hidden bg-background", E), children: [
304
+ !d && /* @__PURE__ */ e.jsxs("div", { className: "w-60 border-r bg-muted/30 flex flex-col", children: [
305
+ /* @__PURE__ */ e.jsx("div", { className: "p-3 border-b font-medium text-sm", children: "Components" }),
306
+ /* @__PURE__ */ e.jsx("div", { className: "flex-1 overflow-y-auto p-2", children: p.map((r) => /* @__PURE__ */ e.jsxs("div", { className: "mb-3", children: [
307
+ /* @__PURE__ */ e.jsx("div", { className: "text-xs font-medium text-muted-foreground px-2 py-1 uppercase", children: r.label }),
308
+ r.items.map((c) => /* @__PURE__ */ e.jsxs(
309
+ "button",
310
+ {
311
+ onClick: () => S(c.type, c.label),
312
+ className: "w-full flex items-center gap-2 px-2 py-1.5 text-sm rounded hover:bg-accent text-left",
313
+ children: [
314
+ /* @__PURE__ */ e.jsx(K, { className: "h-3 w-3" }),
315
+ c.label
316
+ ]
317
+ },
318
+ c.type
319
+ ))
320
+ ] }, r.name)) })
321
+ ] }),
322
+ /* @__PURE__ */ e.jsxs("div", { className: "flex-1 flex flex-col", children: [
323
+ /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 p-2 border-b bg-muted/20", children: [
324
+ i && !d && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
325
+ /* @__PURE__ */ e.jsx("button", { className: "p-1.5 rounded hover:bg-accent", title: "Undo", children: /* @__PURE__ */ e.jsx(be, { className: "h-4 w-4" }) }),
326
+ /* @__PURE__ */ e.jsx("button", { className: "p-1.5 rounded hover:bg-accent", title: "Redo", children: /* @__PURE__ */ e.jsx(ge, { className: "h-4 w-4" }) }),
327
+ /* @__PURE__ */ e.jsx("div", { className: "w-px h-5 bg-border mx-1" })
328
+ ] }),
329
+ /* @__PURE__ */ e.jsx("button", { className: "p-1.5 rounded hover:bg-accent", title: "Preview", children: /* @__PURE__ */ e.jsx(ye, { className: "h-4 w-4" }) }),
330
+ /* @__PURE__ */ e.jsx("div", { className: "flex-1" }),
331
+ /* @__PURE__ */ e.jsxs("span", { className: "text-xs text-muted-foreground", children: [
332
+ Math.round(g * 100),
333
+ "%"
334
+ ] })
335
+ ] }),
336
+ /* @__PURE__ */ e.jsx("div", { className: "flex-1 overflow-auto bg-muted/10 p-4", children: /* @__PURE__ */ e.jsx(
337
+ "div",
338
+ {
339
+ className: "relative bg-background border rounded shadow-sm mx-auto",
340
+ style: {
341
+ width: l.width * g,
342
+ height: l.height * g,
343
+ backgroundImage: l.showGrid ? "radial-gradient(circle, hsl(var(--border)) 1px, transparent 1px)" : void 0,
344
+ backgroundSize: l.showGrid && l.gridSize ? `${l.gridSize * g}px ${l.gridSize * g}px` : void 0
345
+ },
346
+ children: n.map((r) => /* @__PURE__ */ e.jsxs(
347
+ "div",
348
+ {
349
+ className: J(
350
+ "absolute border rounded cursor-move select-none transition-shadow",
351
+ b === r.id ? "border-primary ring-2 ring-primary/20 shadow-md" : "border-border hover:border-primary/50"
352
+ ),
353
+ style: {
354
+ left: r.position.x * g,
355
+ top: r.position.y * g,
356
+ width: typeof r.position.width == "number" ? r.position.width * g : r.position.width,
357
+ height: typeof r.position.height == "number" ? r.position.height * g : r.position.height
358
+ },
359
+ onClick: () => k(r.id),
360
+ children: [
361
+ /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-1 px-2 py-1 bg-muted/50 text-xs border-b", children: [
362
+ /* @__PURE__ */ e.jsx(ve, { className: "h-3 w-3 text-muted-foreground" }),
363
+ /* @__PURE__ */ e.jsx("span", { className: "truncate", children: r.label ?? r.type }),
364
+ !d && /* @__PURE__ */ e.jsx(
365
+ "button",
366
+ {
367
+ onClick: (c) => {
368
+ c.stopPropagation(), o(r.id);
369
+ },
370
+ className: "ml-auto p-0.5 rounded hover:bg-destructive/10",
371
+ children: /* @__PURE__ */ e.jsx(L, { className: "h-3 w-3 text-destructive" })
372
+ }
373
+ )
374
+ ] }),
375
+ /* @__PURE__ */ e.jsx("div", { className: "p-2 text-xs text-muted-foreground", children: r.type })
376
+ ]
377
+ },
378
+ r.id
379
+ ))
380
+ }
381
+ ) })
382
+ ] }),
383
+ w && /* @__PURE__ */ e.jsxs("div", { className: "w-60 border-l bg-muted/30 flex flex-col", children: [
384
+ /* @__PURE__ */ e.jsxs("div", { className: "p-3 border-b font-medium text-sm flex items-center gap-2", children: [
385
+ /* @__PURE__ */ e.jsx(we, { className: "h-4 w-4" }),
386
+ "Component Tree"
387
+ ] }),
388
+ /* @__PURE__ */ e.jsx("div", { className: "flex-1 overflow-y-auto p-2", children: n.length === 0 ? /* @__PURE__ */ e.jsx("div", { className: "text-xs text-muted-foreground text-center py-4", children: "No components added yet" }) : n.map((r) => /* @__PURE__ */ e.jsx(
389
+ "button",
390
+ {
391
+ onClick: () => k(r.id),
392
+ className: J(
393
+ "w-full flex items-center gap-2 px-2 py-1.5 text-sm rounded text-left",
394
+ b === r.id ? "bg-accent" : "hover:bg-accent/50"
395
+ ),
396
+ children: /* @__PURE__ */ e.jsx("span", { className: "truncate", children: r.label ?? r.type })
397
+ },
398
+ r.id
399
+ )) }),
400
+ v && /* @__PURE__ */ e.jsxs("div", { className: "border-t p-3", children: [
401
+ /* @__PURE__ */ e.jsx("div", { className: "text-xs font-medium mb-2", children: "Properties" }),
402
+ /* @__PURE__ */ e.jsxs("div", { className: "text-xs text-muted-foreground space-y-1", children: [
403
+ /* @__PURE__ */ e.jsxs("div", { children: [
404
+ "Type: ",
405
+ v.type
406
+ ] }),
407
+ /* @__PURE__ */ e.jsxs("div", { children: [
408
+ "ID: ",
409
+ v.id
410
+ ] }),
411
+ /* @__PURE__ */ e.jsxs("div", { children: [
412
+ "Position: ",
413
+ v.position.x,
414
+ ", ",
415
+ v.position.y
416
+ ] }),
417
+ /* @__PURE__ */ e.jsxs("div", { children: [
418
+ "Size: ",
419
+ v.position.width,
420
+ " × ",
421
+ v.position.height
422
+ ] })
423
+ ] })
424
+ ] })
425
+ ] })
426
+ ] });
427
+ }
428
+ const $e = [
429
+ {
430
+ name: "layout",
431
+ label: "Layout",
432
+ items: [
433
+ { type: "container", label: "Container", defaultSize: { width: 400, height: 300 } },
434
+ { type: "flex", label: "Flex", defaultSize: { width: 400, height: 200 } },
435
+ { type: "grid", label: "Grid", defaultSize: { width: 400, height: 300 } },
436
+ { type: "card", label: "Card", defaultSize: { width: 300, height: 200 } },
437
+ { type: "tabs", label: "Tabs", defaultSize: { width: 400, height: 300 } }
438
+ ]
439
+ },
440
+ {
441
+ name: "form",
442
+ label: "Form",
443
+ items: [
444
+ { type: "input", label: "Input", defaultSize: { width: 300, height: 60 } },
445
+ { type: "textarea", label: "Textarea", defaultSize: { width: 300, height: 120 } },
446
+ { type: "select", label: "Select", defaultSize: { width: 300, height: 60 } },
447
+ { type: "checkbox", label: "Checkbox", defaultSize: { width: 200, height: 40 } },
448
+ { type: "button", label: "Button", defaultSize: { width: 120, height: 40 } }
449
+ ]
450
+ },
451
+ {
452
+ name: "data",
453
+ label: "Data",
454
+ items: [
455
+ { type: "table", label: "Table", defaultSize: { width: 600, height: 400 } },
456
+ { type: "chart", label: "Chart", defaultSize: { width: 400, height: 300 } },
457
+ { type: "list", label: "List", defaultSize: { width: 300, height: 400 } },
458
+ { type: "statistic", label: "Statistic", defaultSize: { width: 200, height: 100 } }
459
+ ]
460
+ }
461
+ ];
462
+ function B(...l) {
463
+ return Y(M(l));
464
+ }
465
+ function ze({
466
+ entities: l = [],
467
+ relationships: u = [],
468
+ canvas: p = { width: 1200, height: 800, showGrid: !0 },
469
+ showRelationshipLabels: w = !0,
470
+ readOnly: i = !1,
471
+ onEntitiesChange: d,
472
+ onRelationshipsChange: x,
473
+ className: E
474
+ }) {
475
+ const [n, _] = A(l), [b, k] = A(u), [g, R] = A(null), v = P(() => {
476
+ if (i) return;
477
+ const o = {
478
+ id: `entity-${Date.now()}`,
479
+ name: `new_entity_${n.length + 1}`,
480
+ label: `New Entity ${n.length + 1}`,
481
+ fields: [
482
+ { name: "id", type: "uuid", primaryKey: !0, required: !0 },
483
+ { name: "created_at", type: "datetime", required: !0 },
484
+ { name: "updated_at", type: "datetime", required: !0 }
485
+ ],
486
+ position: { x: 50 + n.length % 4 * 280, y: 50 + Math.floor(n.length / 4) * 250 }
487
+ }, r = [...n, o];
488
+ _(r), R(o.id), d?.(r);
489
+ }, [n, i, d]), S = P(
490
+ (o) => {
491
+ if (i) return;
492
+ const r = n.filter((s) => s.id !== o), c = b.filter(
493
+ (s) => s.sourceEntity !== o && s.targetEntity !== o
494
+ );
495
+ _(r), k(c), g === o && R(null), d?.(r), x?.(c);
496
+ },
497
+ [n, b, g, i, d, x]
498
+ );
499
+ return /* @__PURE__ */ e.jsx("div", { className: B("flex h-full w-full border rounded-lg overflow-hidden bg-background", E), children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col w-full", children: [
500
+ /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 p-2 border-b bg-muted/20", children: [
501
+ /* @__PURE__ */ e.jsx(le, { className: "h-4 w-4" }),
502
+ /* @__PURE__ */ e.jsx("span", { className: "font-medium text-sm", children: "Data Model Designer" }),
503
+ /* @__PURE__ */ e.jsx("div", { className: "flex-1" }),
504
+ !i && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
505
+ /* @__PURE__ */ e.jsxs(
506
+ "button",
507
+ {
508
+ onClick: v,
509
+ className: "flex items-center gap-1 px-2 py-1 text-xs rounded bg-primary text-primary-foreground hover:bg-primary/90",
510
+ children: [
511
+ /* @__PURE__ */ e.jsx(K, { className: "h-3 w-3" }),
512
+ " Add Entity"
513
+ ]
514
+ }
515
+ ),
516
+ /* @__PURE__ */ e.jsxs(
517
+ "button",
518
+ {
519
+ className: "flex items-center gap-1 px-2 py-1 text-xs rounded bg-secondary text-secondary-foreground hover:bg-secondary/80",
520
+ children: [
521
+ /* @__PURE__ */ e.jsx(je, { className: "h-3 w-3" }),
522
+ " Add Relationship"
523
+ ]
524
+ }
525
+ )
526
+ ] })
527
+ ] }),
528
+ /* @__PURE__ */ e.jsx("div", { className: "flex-1 overflow-auto bg-muted/10 p-4", children: /* @__PURE__ */ e.jsxs(
529
+ "div",
530
+ {
531
+ className: "relative",
532
+ style: {
533
+ width: p.width,
534
+ minHeight: p.height,
535
+ backgroundImage: p.showGrid ? "radial-gradient(circle, hsl(var(--border)) 1px, transparent 1px)" : void 0,
536
+ backgroundSize: p.showGrid ? "20px 20px" : void 0
537
+ },
538
+ children: [
539
+ /* @__PURE__ */ e.jsx(
540
+ "svg",
541
+ {
542
+ className: "absolute inset-0 pointer-events-none",
543
+ width: p.width,
544
+ height: p.height,
545
+ children: b.map((o) => {
546
+ const r = n.find((s) => s.id === o.sourceEntity), c = n.find((s) => s.id === o.targetEntity);
547
+ return !r || !c ? null : /* @__PURE__ */ e.jsxs("g", { children: [
548
+ /* @__PURE__ */ e.jsx(
549
+ "line",
550
+ {
551
+ x1: r.position.x + 120,
552
+ y1: r.position.y + 50,
553
+ x2: c.position.x + 120,
554
+ y2: c.position.y + 50,
555
+ stroke: "hsl(var(--primary))",
556
+ strokeWidth: "2",
557
+ strokeDasharray: o.type === "many-to-many" ? "5,5" : void 0
558
+ }
559
+ ),
560
+ w && o.label && /* @__PURE__ */ e.jsx(
561
+ "text",
562
+ {
563
+ x: (r.position.x + c.position.x) / 2 + 120,
564
+ y: (r.position.y + c.position.y) / 2 + 50 - 8,
565
+ textAnchor: "middle",
566
+ className: "text-xs fill-muted-foreground",
567
+ children: o.label
568
+ }
569
+ )
570
+ ] }, o.id);
571
+ })
572
+ }
573
+ ),
574
+ n.map((o) => /* @__PURE__ */ e.jsxs(
575
+ "div",
576
+ {
577
+ className: B(
578
+ "absolute rounded-lg border-2 bg-background shadow-sm w-60 select-none",
579
+ g === o.id ? "border-primary ring-2 ring-primary/20" : "border-border hover:border-primary/50"
580
+ ),
581
+ style: {
582
+ left: o.position.x,
583
+ top: o.position.y
584
+ },
585
+ onClick: () => R(o.id),
586
+ children: [
587
+ /* @__PURE__ */ e.jsxs(
588
+ "div",
589
+ {
590
+ className: "flex items-center gap-2 px-3 py-2 rounded-t-lg font-medium text-sm",
591
+ style: { backgroundColor: o.color ?? "hsl(var(--primary) / 0.1)" },
592
+ children: [
593
+ /* @__PURE__ */ e.jsx(le, { className: "h-3.5 w-3.5" }),
594
+ /* @__PURE__ */ e.jsx("span", { className: "truncate", children: o.label }),
595
+ !i && /* @__PURE__ */ e.jsx(
596
+ "button",
597
+ {
598
+ onClick: (r) => {
599
+ r.stopPropagation(), S(o.id);
600
+ },
601
+ className: "ml-auto p-0.5 rounded hover:bg-destructive/20",
602
+ children: /* @__PURE__ */ e.jsx(L, { className: "h-3 w-3 text-destructive" })
603
+ }
604
+ )
605
+ ]
606
+ }
607
+ ),
608
+ /* @__PURE__ */ e.jsx("div", { className: "px-3 py-1 divide-y", children: o.fields.map((r) => /* @__PURE__ */ e.jsxs(
609
+ "div",
610
+ {
611
+ className: "flex items-center gap-2 py-1 text-xs",
612
+ children: [
613
+ /* @__PURE__ */ e.jsxs("span", { className: B("font-mono", r.primaryKey && "font-bold text-primary"), children: [
614
+ r.primaryKey ? "🔑 " : "",
615
+ r.name
616
+ ] }),
617
+ /* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground ml-auto", children: r.type }),
618
+ r.required && /* @__PURE__ */ e.jsx("span", { className: "text-destructive", children: "*" })
619
+ ]
620
+ },
621
+ r.name
622
+ )) })
623
+ ]
624
+ },
625
+ o.id
626
+ ))
627
+ ]
628
+ }
629
+ ) })
630
+ ] }) });
631
+ }
632
+ function X(...l) {
633
+ return Y(M(l));
634
+ }
635
+ function Ie({
636
+ processName: l = "New Process",
637
+ nodes: u = [],
638
+ edges: p = [],
639
+ lanes: w,
640
+ canvas: i = { width: 1400, height: 800, showGrid: !0 },
641
+ showToolbar: d = !0,
642
+ readOnly: x = !1,
643
+ onNodesChange: E,
644
+ onEdgesChange: n,
645
+ className: _
646
+ }) {
647
+ const [b, k] = A(u), [g, R] = A(p), [v, S] = A(null), o = P(
648
+ (s, T) => {
649
+ if (x) return;
650
+ const m = {
651
+ id: `node-${Date.now()}`,
652
+ type: s,
653
+ label: T,
654
+ position: { x: 200 + b.length * 160, y: 200 }
655
+ }, h = [...b, m];
656
+ k(h), S(m.id), E?.(h);
657
+ },
658
+ [b, x, E]
659
+ ), r = P(
660
+ (s) => {
661
+ if (x) return;
662
+ const T = b.filter((h) => h.id !== s), m = g.filter((h) => h.source !== s && h.target !== s);
663
+ k(T), R(m), v === s && S(null), E?.(T), n?.(m);
664
+ },
665
+ [b, g, v, x, E, n]
666
+ ), c = (s) => {
667
+ switch (s) {
668
+ case "start-event":
669
+ return "rounded-full bg-green-100 border-green-500 text-green-700";
670
+ case "end-event":
671
+ return "rounded-full bg-red-100 border-red-500 text-red-700";
672
+ case "exclusive-gateway":
673
+ case "parallel-gateway":
674
+ case "inclusive-gateway":
675
+ case "event-based-gateway":
676
+ return "rotate-45 bg-yellow-100 border-yellow-500 text-yellow-700";
677
+ case "user-task":
678
+ return "rounded bg-blue-100 border-blue-500 text-blue-700";
679
+ case "service-task":
680
+ case "script-task":
681
+ return "rounded bg-purple-100 border-purple-500 text-purple-700";
682
+ default:
683
+ return "rounded bg-gray-100 border-gray-500 text-gray-700";
684
+ }
685
+ };
686
+ return /* @__PURE__ */ e.jsxs("div", { className: X("flex flex-col h-full w-full border rounded-lg overflow-hidden bg-background", _), children: [
687
+ d && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 p-2 border-b bg-muted/20", children: [
688
+ /* @__PURE__ */ e.jsx(Ne, { className: "h-4 w-4" }),
689
+ /* @__PURE__ */ e.jsx("span", { className: "font-medium text-sm", children: l }),
690
+ /* @__PURE__ */ e.jsx("div", { className: "flex-1" }),
691
+ !x && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-1", children: [
692
+ /* @__PURE__ */ e.jsxs(
693
+ "button",
694
+ {
695
+ onClick: () => o("start-event", "Start"),
696
+ className: "flex items-center gap-1 px-2 py-1 text-xs rounded hover:bg-accent",
697
+ title: "Add Start Event",
698
+ children: [
699
+ /* @__PURE__ */ e.jsx(Ee, { className: "h-3 w-3 text-green-600" }),
700
+ " Start"
701
+ ]
702
+ }
703
+ ),
704
+ /* @__PURE__ */ e.jsxs(
705
+ "button",
706
+ {
707
+ onClick: () => o("user-task", "User Task"),
708
+ className: "flex items-center gap-1 px-2 py-1 text-xs rounded hover:bg-accent",
709
+ title: "Add User Task",
710
+ children: [
711
+ /* @__PURE__ */ e.jsx(oe, { className: "h-3 w-3 text-blue-600" }),
712
+ " Task"
713
+ ]
714
+ }
715
+ ),
716
+ /* @__PURE__ */ e.jsxs(
717
+ "button",
718
+ {
719
+ onClick: () => o("exclusive-gateway", "Decision"),
720
+ className: "flex items-center gap-1 px-2 py-1 text-xs rounded hover:bg-accent",
721
+ title: "Add Gateway",
722
+ children: [
723
+ /* @__PURE__ */ e.jsx(ke, { className: "h-3 w-3 text-yellow-600" }),
724
+ " Gateway"
725
+ ]
726
+ }
727
+ ),
728
+ /* @__PURE__ */ e.jsxs(
729
+ "button",
730
+ {
731
+ onClick: () => o("end-event", "End"),
732
+ className: "flex items-center gap-1 px-2 py-1 text-xs rounded hover:bg-accent",
733
+ title: "Add End Event",
734
+ children: [
735
+ /* @__PURE__ */ e.jsx(oe, { className: "h-3 w-3 text-red-600" }),
736
+ " End"
737
+ ]
738
+ }
739
+ )
740
+ ] })
741
+ ] }),
742
+ /* @__PURE__ */ e.jsx("div", { className: "flex-1 overflow-auto bg-muted/10 p-4", children: /* @__PURE__ */ e.jsxs(
743
+ "div",
744
+ {
745
+ className: "relative",
746
+ style: {
747
+ width: i.width,
748
+ minHeight: i.height,
749
+ backgroundImage: i.showGrid ? "radial-gradient(circle, hsl(var(--border)) 1px, transparent 1px)" : void 0,
750
+ backgroundSize: i.showGrid ? "20px 20px" : void 0
751
+ },
752
+ children: [
753
+ /* @__PURE__ */ e.jsxs(
754
+ "svg",
755
+ {
756
+ className: "absolute inset-0 pointer-events-none",
757
+ width: i.width,
758
+ height: i.height,
759
+ children: [
760
+ /* @__PURE__ */ e.jsx("defs", { children: /* @__PURE__ */ e.jsx(
761
+ "marker",
762
+ {
763
+ id: "arrowhead",
764
+ markerWidth: "10",
765
+ markerHeight: "7",
766
+ refX: "10",
767
+ refY: "3.5",
768
+ orient: "auto",
769
+ children: /* @__PURE__ */ e.jsx("polygon", { points: "0 0, 10 3.5, 0 7", fill: "hsl(var(--foreground))" })
770
+ }
771
+ ) }),
772
+ g.map((s) => {
773
+ const T = b.find((h) => h.id === s.source), m = b.find((h) => h.id === s.target);
774
+ return !T || !m ? null : /* @__PURE__ */ e.jsx(
775
+ "line",
776
+ {
777
+ x1: T.position.x + 60,
778
+ y1: T.position.y + 25,
779
+ x2: m.position.x,
780
+ y2: m.position.y + 25,
781
+ stroke: "hsl(var(--foreground) / 0.5)",
782
+ strokeWidth: "2",
783
+ markerEnd: "url(#arrowhead)"
784
+ },
785
+ s.id
786
+ );
787
+ })
788
+ ]
789
+ }
790
+ ),
791
+ b.map((s) => /* @__PURE__ */ e.jsxs(
792
+ "div",
793
+ {
794
+ className: "absolute select-none",
795
+ style: {
796
+ left: s.position.x,
797
+ top: s.position.y
798
+ },
799
+ onClick: () => S(s.id),
800
+ children: [
801
+ /* @__PURE__ */ e.jsx(
802
+ "div",
803
+ {
804
+ className: X(
805
+ "flex items-center justify-center border-2 min-w-[120px] min-h-[50px] px-3 py-2",
806
+ c(s.type),
807
+ v === s.id && "ring-2 ring-primary shadow-md"
808
+ ),
809
+ children: /* @__PURE__ */ e.jsx("span", { className: X(
810
+ "text-xs font-medium",
811
+ (s.type === "exclusive-gateway" || s.type === "parallel-gateway") && "-rotate-45"
812
+ ), children: s.label })
813
+ }
814
+ ),
815
+ !x && v === s.id && /* @__PURE__ */ e.jsx(
816
+ "button",
817
+ {
818
+ onClick: (T) => {
819
+ T.stopPropagation(), r(s.id);
820
+ },
821
+ className: "absolute -top-2 -right-2 p-0.5 rounded-full bg-destructive text-destructive-foreground shadow",
822
+ children: /* @__PURE__ */ e.jsx(L, { className: "h-3 w-3" })
823
+ }
824
+ )
825
+ ]
826
+ },
827
+ s.id
828
+ ))
829
+ ]
830
+ }
831
+ ) })
832
+ ] });
833
+ }
834
+ function ce(...l) {
835
+ return Y(M(l));
836
+ }
837
+ const Fe = {
838
+ A4: { width: 595, height: 842 },
839
+ A3: { width: 842, height: 1191 },
840
+ Letter: { width: 612, height: 792 },
841
+ Legal: { width: 612, height: 1008 },
842
+ Tabloid: { width: 792, height: 1224 }
843
+ };
844
+ function Ge({
845
+ reportName: l = "Untitled Report",
846
+ objectName: u,
847
+ pageSize: p = "A4",
848
+ orientation: w = "portrait",
849
+ margins: i = { top: 40, right: 40, bottom: 40, left: 40 },
850
+ sections: d = [],
851
+ showToolbar: x = !0,
852
+ showPropertyPanel: E = !0,
853
+ readOnly: n = !1,
854
+ onSectionsChange: _,
855
+ className: b
856
+ }) {
857
+ const [k, g] = A(
858
+ d.length > 0 ? d : [
859
+ { type: "header", height: 80, elements: [] },
860
+ { type: "detail", height: 400, elements: [], repeat: !0 },
861
+ { type: "footer", height: 60, elements: [] }
862
+ ]
863
+ ), [R, v] = A(null), S = Fe[p], o = w === "landscape" ? S.height : S.width, r = w === "landscape" ? S.width : S.height, c = P(
864
+ (m, h) => {
865
+ if (n) return;
866
+ const f = {
867
+ id: `elem-${Date.now()}`,
868
+ type: h,
869
+ position: { x: i.left, y: 10, width: 200, height: 30 },
870
+ properties: {
871
+ text: h === "text" ? "New Text" : void 0,
872
+ field: h === "field" ? "field_name" : void 0
873
+ }
874
+ }, C = k.map(
875
+ (D, V) => V === m ? { ...D, elements: [...D.elements, f] } : D
876
+ );
877
+ g(C), v(f.id), _?.(C);
878
+ },
879
+ [k, i.left, n, _]
880
+ ), s = P(
881
+ (m) => {
882
+ if (n) return;
883
+ const h = k.map((f) => ({
884
+ ...f,
885
+ elements: f.elements.filter((C) => C.id !== m)
886
+ }));
887
+ g(h), R === m && v(null), _?.(h);
888
+ },
889
+ [k, R, n, _]
890
+ ), T = (m) => {
891
+ switch (m) {
892
+ case "header":
893
+ return "Report Header";
894
+ case "page-header":
895
+ return "Page Header";
896
+ case "group-header":
897
+ return "Group Header";
898
+ case "detail":
899
+ return "Detail";
900
+ case "group-footer":
901
+ return "Group Footer";
902
+ case "page-footer":
903
+ return "Page Footer";
904
+ case "footer":
905
+ return "Report Footer";
906
+ default:
907
+ return m;
908
+ }
909
+ };
910
+ return /* @__PURE__ */ e.jsxs("div", { className: ce("flex h-full w-full border rounded-lg overflow-hidden bg-background", b), children: [
911
+ /* @__PURE__ */ e.jsxs("div", { className: "flex-1 flex flex-col", children: [
912
+ x && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 p-2 border-b bg-muted/20", children: [
913
+ /* @__PURE__ */ e.jsx(Re, { className: "h-4 w-4" }),
914
+ /* @__PURE__ */ e.jsx("span", { className: "font-medium text-sm", children: l }),
915
+ u && /* @__PURE__ */ e.jsxs("span", { className: "text-xs text-muted-foreground", children: [
916
+ "(",
917
+ u,
918
+ ")"
919
+ ] }),
920
+ /* @__PURE__ */ e.jsx("div", { className: "flex-1" }),
921
+ /* @__PURE__ */ e.jsxs("span", { className: "text-xs text-muted-foreground", children: [
922
+ p,
923
+ " ",
924
+ w
925
+ ] })
926
+ ] }),
927
+ /* @__PURE__ */ e.jsx("div", { className: "flex-1 overflow-auto bg-muted/10 p-4 flex justify-center", children: /* @__PURE__ */ e.jsx(
928
+ "div",
929
+ {
930
+ className: "bg-white shadow-lg border",
931
+ style: {
932
+ width: o,
933
+ minHeight: r
934
+ },
935
+ children: k.map((m, h) => /* @__PURE__ */ e.jsxs(
936
+ "div",
937
+ {
938
+ className: "relative border-b border-dashed border-gray-300",
939
+ style: { minHeight: m.height },
940
+ children: [
941
+ /* @__PURE__ */ e.jsxs("div", { className: "absolute left-0 top-0 px-2 py-0.5 bg-muted text-xs text-muted-foreground border-r border-b rounded-br", children: [
942
+ T(m.type),
943
+ m.repeat && " ↻"
944
+ ] }),
945
+ !n && /* @__PURE__ */ e.jsxs("div", { className: "absolute right-1 top-0 flex items-center gap-0.5", children: [
946
+ /* @__PURE__ */ e.jsx(
947
+ "button",
948
+ {
949
+ onClick: () => c(h, "text"),
950
+ className: "p-0.5 rounded hover:bg-accent",
951
+ title: "Add Text",
952
+ children: /* @__PURE__ */ e.jsx(Te, { className: "h-3 w-3" })
953
+ }
954
+ ),
955
+ /* @__PURE__ */ e.jsx(
956
+ "button",
957
+ {
958
+ onClick: () => c(h, "field"),
959
+ className: "p-0.5 rounded hover:bg-accent",
960
+ title: "Add Field",
961
+ children: /* @__PURE__ */ e.jsx(K, { className: "h-3 w-3" })
962
+ }
963
+ ),
964
+ /* @__PURE__ */ e.jsx(
965
+ "button",
966
+ {
967
+ onClick: () => c(h, "image"),
968
+ className: "p-0.5 rounded hover:bg-accent",
969
+ title: "Add Image",
970
+ children: /* @__PURE__ */ e.jsx(_e, { className: "h-3 w-3" })
971
+ }
972
+ ),
973
+ /* @__PURE__ */ e.jsx(
974
+ "button",
975
+ {
976
+ onClick: () => c(h, "chart"),
977
+ className: "p-0.5 rounded hover:bg-accent",
978
+ title: "Add Chart",
979
+ children: /* @__PURE__ */ e.jsx(Se, { className: "h-3 w-3" })
980
+ }
981
+ ),
982
+ /* @__PURE__ */ e.jsx(
983
+ "button",
984
+ {
985
+ onClick: () => c(h, "table"),
986
+ className: "p-0.5 rounded hover:bg-accent",
987
+ title: "Add Table",
988
+ children: /* @__PURE__ */ e.jsx(Ae, { className: "h-3 w-3" })
989
+ }
990
+ )
991
+ ] }),
992
+ /* @__PURE__ */ e.jsx("div", { className: "relative", style: { minHeight: m.height, paddingTop: 24 }, children: m.elements.map((f) => /* @__PURE__ */ e.jsxs(
993
+ "div",
994
+ {
995
+ className: ce(
996
+ "absolute border rounded px-2 py-1 text-xs cursor-pointer",
997
+ R === f.id ? "border-primary ring-1 ring-primary/30 bg-primary/5" : "border-dashed border-gray-400 hover:border-primary/50"
998
+ ),
999
+ style: {
1000
+ left: f.position.x,
1001
+ top: (typeof f.position.y == "number" ? f.position.y : 0) + 24,
1002
+ width: f.position.width,
1003
+ height: f.position.height
1004
+ },
1005
+ onClick: () => v(f.id),
1006
+ children: [
1007
+ /* @__PURE__ */ e.jsxs("span", { className: "text-muted-foreground", children: [
1008
+ f.type === "text" && (f.properties.text ?? "Text"),
1009
+ f.type === "field" && `{${f.properties.field ?? "field"}}`,
1010
+ f.type === "image" && "🖼 Image",
1011
+ f.type === "chart" && "📊 Chart",
1012
+ f.type === "table" && "📋 Table"
1013
+ ] }),
1014
+ !n && R === f.id && /* @__PURE__ */ e.jsx(
1015
+ "button",
1016
+ {
1017
+ onClick: (C) => {
1018
+ C.stopPropagation(), s(f.id);
1019
+ },
1020
+ className: "absolute -top-2 -right-2 p-0.5 rounded-full bg-destructive text-destructive-foreground shadow",
1021
+ children: /* @__PURE__ */ e.jsx(L, { className: "h-2.5 w-2.5" })
1022
+ }
1023
+ )
1024
+ ]
1025
+ },
1026
+ f.id
1027
+ )) })
1028
+ ]
1029
+ },
1030
+ `${m.type}-${h}`
1031
+ ))
1032
+ }
1033
+ ) })
1034
+ ] }),
1035
+ E && /* @__PURE__ */ e.jsxs("div", { className: "w-56 border-l bg-muted/30 flex flex-col", children: [
1036
+ /* @__PURE__ */ e.jsx("div", { className: "p-3 border-b font-medium text-sm", children: "Properties" }),
1037
+ /* @__PURE__ */ e.jsx("div", { className: "flex-1 overflow-y-auto p-3", children: R ? /* @__PURE__ */ e.jsx("div", { className: "space-y-2 text-xs", children: /* @__PURE__ */ e.jsxs("div", { className: "text-muted-foreground", children: [
1038
+ "Element ID: ",
1039
+ R
1040
+ ] }) }) : /* @__PURE__ */ e.jsx("div", { className: "text-xs text-muted-foreground text-center py-4", children: "Select an element to view properties" }) })
1041
+ ] })
1042
+ ] });
1043
+ }
1044
+ const ue = fe(null);
1045
+ ue.displayName = "CollaborationContext";
1046
+ function qe({
1047
+ config: l,
1048
+ user: u,
1049
+ onOperation: p,
1050
+ children: w
1051
+ }) {
1052
+ const i = Z(() => !l.enabled || !u ? [] : [{
1053
+ userId: u.id,
1054
+ userName: u.name,
1055
+ avatar: u.avatar,
1056
+ color: Le(u.id),
1057
+ status: "active",
1058
+ lastActivity: (/* @__PURE__ */ new Date()).toISOString()
1059
+ }], [l.enabled, u]), d = l.enabled && !!u, x = P(
1060
+ (n) => {
1061
+ if (!d || !u) return;
1062
+ const _ = {
1063
+ ...n,
1064
+ id: `op-${Date.now()}`,
1065
+ userId: u.id,
1066
+ timestamp: (/* @__PURE__ */ new Date()).toISOString(),
1067
+ version: Date.now()
1068
+ };
1069
+ p?.(_);
1070
+ },
1071
+ [d, u, p]
1072
+ ), E = Z(
1073
+ () => ({
1074
+ users: i,
1075
+ isConnected: d,
1076
+ sendOperation: x,
1077
+ currentUserId: u?.id
1078
+ }),
1079
+ [i, d, x, u?.id]
1080
+ );
1081
+ return /* @__PURE__ */ e.jsx(ue.Provider, { value: E, children: w });
1082
+ }
1083
+ function Le(l) {
1084
+ const u = [
1085
+ "#3b82f6",
1086
+ "#ef4444",
1087
+ "#22c55e",
1088
+ "#f59e0b",
1089
+ "#8b5cf6",
1090
+ "#ec4899",
1091
+ "#06b6d4",
1092
+ "#f97316"
1093
+ ];
1094
+ let p = 0;
1095
+ for (let w = 0; w < l.length; w++)
1096
+ p = (p << 5) - p + l.charCodeAt(w) | 0;
1097
+ return u[Math.abs(p) % u.length];
1098
+ }
1099
+ G.register(
1100
+ "page-designer",
1101
+ Oe,
1102
+ {
1103
+ label: "Page Designer",
1104
+ category: "Designer",
1105
+ inputs: [
1106
+ { name: "canvas", type: "code", label: "Canvas Configuration" },
1107
+ { name: "components", type: "code", label: "Components" },
1108
+ { name: "showComponentTree", type: "boolean", label: "Show Component Tree", defaultValue: !0 },
1109
+ { name: "undoRedo", type: "boolean", label: "Undo/Redo", defaultValue: !0 },
1110
+ { name: "readOnly", type: "boolean", label: "Read Only", defaultValue: !1 }
1111
+ ]
1112
+ }
1113
+ );
1114
+ G.register(
1115
+ "data-model-designer",
1116
+ ze,
1117
+ {
1118
+ label: "Data Model Designer",
1119
+ category: "Designer",
1120
+ inputs: [
1121
+ { name: "entities", type: "code", label: "Entities" },
1122
+ { name: "relationships", type: "code", label: "Relationships" },
1123
+ { name: "autoLayout", type: "boolean", label: "Auto Layout", defaultValue: !1 },
1124
+ { name: "readOnly", type: "boolean", label: "Read Only", defaultValue: !1 }
1125
+ ]
1126
+ }
1127
+ );
1128
+ G.register(
1129
+ "process-designer",
1130
+ Ie,
1131
+ {
1132
+ label: "Process Designer (BPMN)",
1133
+ category: "Designer",
1134
+ inputs: [
1135
+ { name: "processName", type: "string", label: "Process Name" },
1136
+ { name: "nodes", type: "code", label: "Nodes" },
1137
+ { name: "edges", type: "code", label: "Edges" },
1138
+ { name: "showMinimap", type: "boolean", label: "Show Minimap", defaultValue: !1 },
1139
+ { name: "showToolbar", type: "boolean", label: "Show Toolbar", defaultValue: !0 },
1140
+ { name: "readOnly", type: "boolean", label: "Read Only", defaultValue: !1 }
1141
+ ]
1142
+ }
1143
+ );
1144
+ G.register(
1145
+ "report-designer",
1146
+ Ge,
1147
+ {
1148
+ label: "Report Designer",
1149
+ category: "Designer",
1150
+ inputs: [
1151
+ { name: "reportName", type: "string", label: "Report Name" },
1152
+ { name: "objectName", type: "string", label: "Data Source Object" },
1153
+ { name: "sections", type: "code", label: "Sections" },
1154
+ { name: "showToolbar", type: "boolean", label: "Show Toolbar", defaultValue: !0 },
1155
+ { name: "showPropertyPanel", type: "boolean", label: "Show Property Panel", defaultValue: !0 },
1156
+ { name: "readOnly", type: "boolean", label: "Read Only", defaultValue: !1 }
1157
+ ]
1158
+ }
1159
+ );
1160
+ export {
1161
+ qe as CollaborationProvider,
1162
+ ze as DataModelDesigner,
1163
+ Oe as PageDesigner,
1164
+ Ie as ProcessDesigner,
1165
+ Ge as ReportDesigner
1166
+ };