@aranzatech/diagrams-bpmn 0.1.3 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/README.md +121 -0
- package/dist/catalog-OVnBDD8R.d.ts +9 -0
- package/dist/catalog-OWfI_yHU.d.cts +9 -0
- package/dist/{chunk-W3ROOC6E.js → chunk-33AR3PXF.js} +177 -40
- package/dist/chunk-33AR3PXF.js.map +1 -0
- package/dist/{chunk-3AFZDIMQ.js → chunk-ECTJRD7Z.js} +3 -3
- package/dist/{chunk-3AFZDIMQ.js.map → chunk-ECTJRD7Z.js.map} +1 -1
- package/dist/{chunk-NXMUX67A.js → chunk-H3YMTGFG.js} +79 -38
- package/dist/chunk-H3YMTGFG.js.map +1 -0
- package/dist/chunk-KALSGH4D.js +36 -0
- package/dist/chunk-KALSGH4D.js.map +1 -0
- package/dist/{chunk-DNR5WBQH.js → chunk-L5Z22RLX.js} +81 -20
- package/dist/chunk-L5Z22RLX.js.map +1 -0
- package/dist/chunk-OZKTOILD.js +3 -0
- package/dist/chunk-OZKTOILD.js.map +1 -0
- package/dist/{chunk-4AX573IV.js → chunk-RLAJNRF2.js} +3 -3
- package/dist/{chunk-4AX573IV.js.map → chunk-RLAJNRF2.js.map} +1 -1
- package/dist/chunk-YQTIODXH.js +532 -0
- package/dist/chunk-YQTIODXH.js.map +1 -0
- package/dist/chunk-ZFGQVLHB.js +226 -0
- package/dist/chunk-ZFGQVLHB.js.map +1 -0
- package/dist/edges/index.cjs +1 -1
- package/dist/edges/index.cjs.map +1 -1
- package/dist/edges/index.js +2 -2
- package/dist/elements/index.cjs +81 -17
- package/dist/elements/index.cjs.map +1 -1
- package/dist/elements/index.d.cts +4 -6
- package/dist/elements/index.d.ts +4 -6
- package/dist/elements/index.js +3 -2
- package/dist/index.cjs +1120 -118
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -63
- package/dist/index.d.ts +10 -63
- package/dist/index.js +9 -42
- package/dist/index.js.map +1 -1
- package/dist/modeling/index.cjs +1241 -0
- package/dist/modeling/index.cjs.map +1 -0
- package/dist/modeling/index.d.cts +146 -0
- package/dist/modeling/index.d.ts +146 -0
- package/dist/modeling/index.js +5 -0
- package/dist/modeling/index.js.map +1 -0
- package/dist/nodes/index.cjs +91 -38
- package/dist/nodes/index.cjs.map +1 -1
- package/dist/nodes/index.js +2 -2
- package/dist/types-BxjCV2oX.d.ts +20 -0
- package/dist/{types-C78d_Kdh.d.cts → types-DznxZxpV.d.cts} +17 -19
- package/dist/{types-C78d_Kdh.d.ts → types-DznxZxpV.d.ts} +17 -19
- package/dist/types-vVi5T7qj.d.cts +20 -0
- package/dist/validation/index.cjs +848 -0
- package/dist/validation/index.cjs.map +1 -0
- package/dist/validation/index.d.cts +25 -0
- package/dist/validation/index.d.ts +25 -0
- package/dist/validation/index.js +5 -0
- package/dist/validation/index.js.map +1 -0
- package/dist/xml/index.cjs +215 -54
- package/dist/xml/index.cjs.map +1 -1
- package/dist/xml/index.d.cts +4 -19
- package/dist/xml/index.d.ts +4 -19
- package/dist/xml/index.js +2 -2
- package/package.json +16 -4
- package/dist/chunk-23B2IGK5.js +0 -24
- package/dist/chunk-23B2IGK5.js.map +0 -1
- package/dist/chunk-DNR5WBQH.js.map +0 -1
- package/dist/chunk-NXMUX67A.js.map +0 -1
- package/dist/chunk-W3ROOC6E.js.map +0 -1
package/dist/nodes/index.cjs
CHANGED
|
@@ -46,13 +46,19 @@ function BpmnHandles({ variant = "all" }) {
|
|
|
46
46
|
// src/nodes/shared/theme.ts
|
|
47
47
|
var BPMN_THEME = {
|
|
48
48
|
fill: "#ffffff",
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
fillSoft: "#f8fbff",
|
|
50
|
+
fillSubtle: "#eef6ff",
|
|
51
|
+
stroke: "#334155",
|
|
52
|
+
strokeSelected: "#2563eb",
|
|
51
53
|
strokeWidth: 1.5,
|
|
52
54
|
strokeWidthSelected: 2.5,
|
|
53
55
|
fontFamily: "Inter, system-ui, sans-serif",
|
|
54
56
|
fontSize: 11,
|
|
55
|
-
labelColor: "#
|
|
57
|
+
labelColor: "#0f172a",
|
|
58
|
+
shadow: "0 4px 12px rgba(15, 23, 42, 0.08)",
|
|
59
|
+
shadowSelected: "0 0 0 4px rgba(37, 99, 235, 0.14), 0 8px 18px rgba(15, 23, 42, 0.12)",
|
|
60
|
+
transition: "box-shadow 140ms ease, filter 140ms ease, transform 140ms ease"
|
|
61
|
+
};
|
|
56
62
|
function resolveStroke(selected, override) {
|
|
57
63
|
if (selected) return BPMN_THEME.strokeSelected;
|
|
58
64
|
return override ?? BPMN_THEME.stroke;
|
|
@@ -60,6 +66,12 @@ function resolveStroke(selected, override) {
|
|
|
60
66
|
function resolveStrokeWidth(selected) {
|
|
61
67
|
return selected ? BPMN_THEME.strokeWidthSelected : BPMN_THEME.strokeWidth;
|
|
62
68
|
}
|
|
69
|
+
function resolveShapeFilter(selected) {
|
|
70
|
+
return selected ? "drop-shadow(0 0 0 rgba(37,99,235,0.2)) drop-shadow(0 8px 14px rgba(15,23,42,0.12))" : "drop-shadow(0 4px 10px rgba(15,23,42,0.08))";
|
|
71
|
+
}
|
|
72
|
+
function resolveNodeShadow(selected) {
|
|
73
|
+
return selected ? BPMN_THEME.shadowSelected : BPMN_THEME.shadow;
|
|
74
|
+
}
|
|
63
75
|
var EXTERNAL_STYLE = {
|
|
64
76
|
position: "absolute",
|
|
65
77
|
top: "100%",
|
|
@@ -212,7 +224,7 @@ function StartEventNode({ data, selected }) {
|
|
|
212
224
|
const trigger = d.trigger ?? "none";
|
|
213
225
|
const dashArray = d.isNonInterrupting ? "4 2" : void 0;
|
|
214
226
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { width: SIZE, height: SIZE, position: "relative" }, children: [
|
|
215
|
-
/* @__PURE__ */ jsxRuntime.jsxs("svg", { width: SIZE, height: SIZE, style: { overflow: "visible", display: "block" }, children: [
|
|
227
|
+
/* @__PURE__ */ jsxRuntime.jsxs("svg", { width: SIZE, height: SIZE, style: { overflow: "visible", display: "block", filter: resolveShapeFilter(selected) }, children: [
|
|
216
228
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
217
229
|
"circle",
|
|
218
230
|
{
|
|
@@ -241,7 +253,7 @@ function EndEventNode({ data, selected }) {
|
|
|
241
253
|
const fill = d.color?.fill ?? BPMN_THEME.fill;
|
|
242
254
|
const trigger = d.trigger ?? "none";
|
|
243
255
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { width: SIZE2, height: SIZE2, position: "relative" }, children: [
|
|
244
|
-
/* @__PURE__ */ jsxRuntime.jsxs("svg", { width: SIZE2, height: SIZE2, style: { overflow: "visible", display: "block" }, children: [
|
|
256
|
+
/* @__PURE__ */ jsxRuntime.jsxs("svg", { width: SIZE2, height: SIZE2, style: { overflow: "visible", display: "block", filter: resolveShapeFilter(selected) }, children: [
|
|
245
257
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
246
258
|
"circle",
|
|
247
259
|
{
|
|
@@ -269,9 +281,9 @@ function IntermediateCatchEventNode({ data, selected }) {
|
|
|
269
281
|
const stroke = resolveStroke(selected, d.color?.stroke);
|
|
270
282
|
const sw = resolveStrokeWidth(selected);
|
|
271
283
|
const fill = d.color?.fill ?? BPMN_THEME.fill;
|
|
272
|
-
const trigger = d.trigger
|
|
284
|
+
const trigger = d.trigger && d.trigger !== "none" ? d.trigger : "timer";
|
|
273
285
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { width: SIZE3, height: SIZE3, position: "relative" }, children: [
|
|
274
|
-
/* @__PURE__ */ jsxRuntime.jsxs("svg", { width: SIZE3, height: SIZE3, style: { overflow: "visible", display: "block" }, children: [
|
|
286
|
+
/* @__PURE__ */ jsxRuntime.jsxs("svg", { width: SIZE3, height: SIZE3, style: { overflow: "visible", display: "block", filter: resolveShapeFilter(selected) }, children: [
|
|
275
287
|
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: CX3, cy: CX3, r: R_OUTER, fill, stroke, strokeWidth: sw }),
|
|
276
288
|
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: CX3, cy: CX3, r: R_INNER, fill: "none", stroke, strokeWidth: sw }),
|
|
277
289
|
/* @__PURE__ */ jsxRuntime.jsx(EventMarker, { cx: CX3, cy: CX3, trigger, filled: false, stroke, bg: fill, r: ICON_R })
|
|
@@ -285,9 +297,9 @@ function IntermediateThrowEventNode({ data, selected }) {
|
|
|
285
297
|
const stroke = resolveStroke(selected, d.color?.stroke);
|
|
286
298
|
const sw = resolveStrokeWidth(selected);
|
|
287
299
|
const fill = d.color?.fill ?? BPMN_THEME.fill;
|
|
288
|
-
const trigger = d.trigger
|
|
300
|
+
const trigger = d.trigger && d.trigger !== "none" ? d.trigger : "message";
|
|
289
301
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { width: SIZE3, height: SIZE3, position: "relative" }, children: [
|
|
290
|
-
/* @__PURE__ */ jsxRuntime.jsxs("svg", { width: SIZE3, height: SIZE3, style: { overflow: "visible", display: "block" }, children: [
|
|
302
|
+
/* @__PURE__ */ jsxRuntime.jsxs("svg", { width: SIZE3, height: SIZE3, style: { overflow: "visible", display: "block", filter: resolveShapeFilter(selected) }, children: [
|
|
291
303
|
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: CX3, cy: CX3, r: R_OUTER, fill, stroke, strokeWidth: sw }),
|
|
292
304
|
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: CX3, cy: CX3, r: R_INNER, fill: stroke, stroke, strokeWidth: sw }),
|
|
293
305
|
/* @__PURE__ */ jsxRuntime.jsx(EventMarker, { cx: CX3, cy: CX3, trigger, filled: true, stroke: fill, bg: stroke, r: ICON_R })
|
|
@@ -301,10 +313,10 @@ function BoundaryEventNode({ data, selected }) {
|
|
|
301
313
|
const stroke = resolveStroke(selected, d.color?.stroke);
|
|
302
314
|
const sw = resolveStrokeWidth(selected);
|
|
303
315
|
const fill = d.color?.fill ?? BPMN_THEME.fill;
|
|
304
|
-
const trigger = d.trigger
|
|
316
|
+
const trigger = d.trigger && d.trigger !== "none" ? d.trigger : "timer";
|
|
305
317
|
const dashArray = d.isNonInterrupting ? "4 2" : void 0;
|
|
306
318
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { width: SIZE3, height: SIZE3, position: "relative" }, children: [
|
|
307
|
-
/* @__PURE__ */ jsxRuntime.jsxs("svg", { width: SIZE3, height: SIZE3, style: { overflow: "visible", display: "block" }, children: [
|
|
319
|
+
/* @__PURE__ */ jsxRuntime.jsxs("svg", { width: SIZE3, height: SIZE3, style: { overflow: "visible", display: "block", filter: resolveShapeFilter(selected) }, children: [
|
|
308
320
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
309
321
|
"circle",
|
|
310
322
|
{
|
|
@@ -339,6 +351,11 @@ function TaskIcon({ type, size = 14, color = "#404040" }) {
|
|
|
339
351
|
const s = size;
|
|
340
352
|
const c = color;
|
|
341
353
|
switch (type) {
|
|
354
|
+
case "Task":
|
|
355
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: s, height: s, viewBox: "0 0 16 16", fill: "none", children: [
|
|
356
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: "3", y: "3", width: "10", height: "10", rx: "1.5", stroke: c, strokeWidth: "1.5" }),
|
|
357
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M5.5 8.2 7.2 10 10.8 6", stroke: c, strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
358
|
+
] });
|
|
342
359
|
case "UserTask":
|
|
343
360
|
return /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: s, height: s, viewBox: "0 0 16 16", fill: "none", children: [
|
|
344
361
|
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "8", cy: "5", r: "3", stroke: c, strokeWidth: "1.5" }),
|
|
@@ -481,20 +498,22 @@ function TaskNode({ data, selected }) {
|
|
|
481
498
|
style: {
|
|
482
499
|
width: "100%",
|
|
483
500
|
height: "100%",
|
|
484
|
-
background: d.color?.fill ?? BPMN_THEME.fill
|
|
501
|
+
background: d.color?.fill ?? `linear-gradient(180deg, ${BPMN_THEME.fill} 0%, ${BPMN_THEME.fillSoft} 100%)`,
|
|
485
502
|
border: `${borderWidth}px solid ${stroke}`,
|
|
486
|
-
borderRadius:
|
|
503
|
+
borderRadius: 7,
|
|
487
504
|
boxSizing: "border-box",
|
|
505
|
+
boxShadow: resolveNodeShadow(selected),
|
|
488
506
|
display: "flex",
|
|
489
507
|
flexDirection: "column",
|
|
490
508
|
alignItems: "center",
|
|
491
509
|
justifyContent: "center",
|
|
492
510
|
padding: hasMarkers ? "4px 8px 22px" : "4px 8px",
|
|
493
511
|
position: "relative",
|
|
494
|
-
fontFamily: BPMN_THEME.fontFamily
|
|
512
|
+
fontFamily: BPMN_THEME.fontFamily,
|
|
513
|
+
transition: BPMN_THEME.transition
|
|
495
514
|
},
|
|
496
515
|
children: [
|
|
497
|
-
d.elementType &&
|
|
516
|
+
d.elementType && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { position: "absolute", top: 5, left: 5 }, children: /* @__PURE__ */ jsxRuntime.jsx(TaskIcon, { type: d.elementType, size: 14, color: stroke }) }),
|
|
498
517
|
/* @__PURE__ */ jsxRuntime.jsx(BpmnLabel, { style: { width: "100%" }, children: d.label ?? d.elementType }),
|
|
499
518
|
d.priority && /* @__PURE__ */ jsxRuntime.jsx(
|
|
500
519
|
"div",
|
|
@@ -572,7 +591,7 @@ function GatewayNode({ data, selected }) {
|
|
|
572
591
|
const stroke = resolveStroke(selected, d.color?.stroke);
|
|
573
592
|
const sw = resolveStrokeWidth(selected);
|
|
574
593
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { width: SIZE4, height: SIZE4, position: "relative" }, children: [
|
|
575
|
-
/* @__PURE__ */ jsxRuntime.jsxs("svg", { width: SIZE4, height: SIZE4, style: { overflow: "visible", display: "block" }, children: [
|
|
594
|
+
/* @__PURE__ */ jsxRuntime.jsxs("svg", { width: SIZE4, height: SIZE4, style: { overflow: "visible", display: "block", filter: resolveShapeFilter(selected) }, children: [
|
|
576
595
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
577
596
|
"polygon",
|
|
578
597
|
{
|
|
@@ -588,11 +607,24 @@ function GatewayNode({ data, selected }) {
|
|
|
588
607
|
/* @__PURE__ */ jsxRuntime.jsx(BpmnLabel, { external: true, children: d.label })
|
|
589
608
|
] });
|
|
590
609
|
}
|
|
610
|
+
function resolveVariant(d) {
|
|
611
|
+
if (d.subProcessVariant) return d.subProcessVariant;
|
|
612
|
+
switch (d.elementType) {
|
|
613
|
+
case "Transaction":
|
|
614
|
+
return "transaction";
|
|
615
|
+
case "EventSubProcess":
|
|
616
|
+
return "event";
|
|
617
|
+
case "AdHocSubProcess":
|
|
618
|
+
return "adhoc";
|
|
619
|
+
default:
|
|
620
|
+
return "embedded";
|
|
621
|
+
}
|
|
622
|
+
}
|
|
591
623
|
function SubProcessNode({ data, selected }) {
|
|
592
624
|
const d = data;
|
|
593
625
|
const stroke = resolveStroke(selected, d.color?.stroke);
|
|
594
626
|
const sw = resolveStrokeWidth(selected);
|
|
595
|
-
const variant = d
|
|
627
|
+
const variant = resolveVariant(d);
|
|
596
628
|
const isExpanded = d.isExpanded ?? true;
|
|
597
629
|
const hasMarkers = d.markers && d.markers.length > 0;
|
|
598
630
|
const borderStyle = variant === "event" ? "dashed" : "solid";
|
|
@@ -602,12 +634,14 @@ function SubProcessNode({ data, selected }) {
|
|
|
602
634
|
style: {
|
|
603
635
|
width: "100%",
|
|
604
636
|
height: "100%",
|
|
605
|
-
background: d.color?.fill ??
|
|
637
|
+
background: d.color?.fill ?? `linear-gradient(180deg, ${BPMN_THEME.fill} 0%, ${BPMN_THEME.fillSubtle} 100%)`,
|
|
606
638
|
border: `${sw}px ${borderStyle} ${stroke}`,
|
|
607
639
|
borderRadius: 6,
|
|
608
640
|
boxSizing: "border-box",
|
|
641
|
+
boxShadow: resolveNodeShadow(selected),
|
|
609
642
|
position: "relative",
|
|
610
|
-
fontFamily: BPMN_THEME.fontFamily
|
|
643
|
+
fontFamily: BPMN_THEME.fontFamily,
|
|
644
|
+
transition: BPMN_THEME.transition
|
|
611
645
|
},
|
|
612
646
|
children: [
|
|
613
647
|
variant === "transaction" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -661,8 +695,8 @@ function PoolNode({ data, selected }) {
|
|
|
661
695
|
const stroke = resolveStroke(selected, d.color?.stroke);
|
|
662
696
|
const sw = resolveStrokeWidth(selected);
|
|
663
697
|
const orientation = d.orientation ?? "horizontal";
|
|
664
|
-
const fill = d.color?.fill ?? "#
|
|
665
|
-
const headerFill = d.color?.fill ?? "#
|
|
698
|
+
const fill = d.color?.fill ?? "#f8fbff";
|
|
699
|
+
const headerFill = d.color?.fill ?? "#eaf2ff";
|
|
666
700
|
if (orientation === "vertical") {
|
|
667
701
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
668
702
|
"div",
|
|
@@ -676,14 +710,17 @@ function PoolNode({ data, selected }) {
|
|
|
676
710
|
borderRadius: 4,
|
|
677
711
|
boxSizing: "border-box",
|
|
678
712
|
background: fill,
|
|
713
|
+
boxShadow: resolveNodeShadow(selected),
|
|
679
714
|
overflow: "hidden",
|
|
680
|
-
fontFamily: BPMN_THEME.fontFamily
|
|
715
|
+
fontFamily: BPMN_THEME.fontFamily,
|
|
716
|
+
transition: BPMN_THEME.transition
|
|
681
717
|
},
|
|
682
718
|
children: [
|
|
683
719
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
684
720
|
"div",
|
|
685
721
|
{
|
|
686
722
|
"aria-label": "pool-header",
|
|
723
|
+
className: "pool-drag-handle",
|
|
687
724
|
style: {
|
|
688
725
|
height: HEADER_HEIGHT,
|
|
689
726
|
minHeight: HEADER_HEIGHT,
|
|
@@ -692,7 +729,8 @@ function PoolNode({ data, selected }) {
|
|
|
692
729
|
alignItems: "center",
|
|
693
730
|
justifyContent: "center",
|
|
694
731
|
background: headerFill,
|
|
695
|
-
padding: "0 8px"
|
|
732
|
+
padding: "0 8px",
|
|
733
|
+
cursor: "grab"
|
|
696
734
|
},
|
|
697
735
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
698
736
|
"span",
|
|
@@ -726,14 +764,17 @@ function PoolNode({ data, selected }) {
|
|
|
726
764
|
borderRadius: 4,
|
|
727
765
|
boxSizing: "border-box",
|
|
728
766
|
background: fill,
|
|
767
|
+
boxShadow: resolveNodeShadow(selected),
|
|
729
768
|
overflow: "hidden",
|
|
730
|
-
fontFamily: BPMN_THEME.fontFamily
|
|
769
|
+
fontFamily: BPMN_THEME.fontFamily,
|
|
770
|
+
transition: BPMN_THEME.transition
|
|
731
771
|
},
|
|
732
772
|
children: [
|
|
733
773
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
734
774
|
"div",
|
|
735
775
|
{
|
|
736
776
|
"aria-label": "pool-header",
|
|
777
|
+
className: "pool-drag-handle",
|
|
737
778
|
style: {
|
|
738
779
|
width: HEADER_WIDTH,
|
|
739
780
|
minWidth: HEADER_WIDTH,
|
|
@@ -741,7 +782,8 @@ function PoolNode({ data, selected }) {
|
|
|
741
782
|
display: "flex",
|
|
742
783
|
alignItems: "center",
|
|
743
784
|
justifyContent: "center",
|
|
744
|
-
background: headerFill
|
|
785
|
+
background: headerFill,
|
|
786
|
+
cursor: "grab"
|
|
745
787
|
},
|
|
746
788
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
747
789
|
"span",
|
|
@@ -774,8 +816,8 @@ function LaneNode({ data, selected }) {
|
|
|
774
816
|
const stroke = resolveStroke(selected, d.color?.stroke);
|
|
775
817
|
const sw = resolveStrokeWidth(selected);
|
|
776
818
|
const orientation = d.orientation ?? "horizontal";
|
|
777
|
-
const fill = d.color?.fill ?? "#
|
|
778
|
-
const headerFill = d.color?.fill ?? "#
|
|
819
|
+
const fill = d.color?.fill ?? "#fbfdff";
|
|
820
|
+
const headerFill = d.color?.fill ?? "#eef6ff";
|
|
779
821
|
if (orientation === "vertical") {
|
|
780
822
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
781
823
|
"div",
|
|
@@ -788,14 +830,17 @@ function LaneNode({ data, selected }) {
|
|
|
788
830
|
borderRadius: 2,
|
|
789
831
|
boxSizing: "border-box",
|
|
790
832
|
background: fill,
|
|
833
|
+
boxShadow: resolveNodeShadow(selected),
|
|
791
834
|
overflow: "hidden",
|
|
792
|
-
fontFamily: BPMN_THEME.fontFamily
|
|
835
|
+
fontFamily: BPMN_THEME.fontFamily,
|
|
836
|
+
transition: BPMN_THEME.transition
|
|
793
837
|
},
|
|
794
838
|
children: [
|
|
795
839
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
796
840
|
"div",
|
|
797
841
|
{
|
|
798
842
|
"aria-label": "lane-header",
|
|
843
|
+
className: "lane-drag-handle",
|
|
799
844
|
style: {
|
|
800
845
|
width: HEADER_WIDTH2,
|
|
801
846
|
minWidth: HEADER_WIDTH2,
|
|
@@ -804,7 +849,8 @@ function LaneNode({ data, selected }) {
|
|
|
804
849
|
alignItems: "center",
|
|
805
850
|
justifyContent: "center",
|
|
806
851
|
background: headerFill,
|
|
807
|
-
padding: "6px 0"
|
|
852
|
+
padding: "6px 0",
|
|
853
|
+
cursor: "grab"
|
|
808
854
|
},
|
|
809
855
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
810
856
|
"span",
|
|
@@ -842,14 +888,17 @@ function LaneNode({ data, selected }) {
|
|
|
842
888
|
borderRadius: 2,
|
|
843
889
|
boxSizing: "border-box",
|
|
844
890
|
background: fill,
|
|
891
|
+
boxShadow: resolveNodeShadow(selected),
|
|
845
892
|
overflow: "hidden",
|
|
846
|
-
fontFamily: BPMN_THEME.fontFamily
|
|
893
|
+
fontFamily: BPMN_THEME.fontFamily,
|
|
894
|
+
transition: BPMN_THEME.transition
|
|
847
895
|
},
|
|
848
896
|
children: [
|
|
849
897
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
850
898
|
"div",
|
|
851
899
|
{
|
|
852
900
|
"aria-label": "lane-header",
|
|
901
|
+
className: "lane-drag-handle",
|
|
853
902
|
style: {
|
|
854
903
|
height: HEADER_HEIGHT2,
|
|
855
904
|
minHeight: HEADER_HEIGHT2,
|
|
@@ -860,7 +909,8 @@ function LaneNode({ data, selected }) {
|
|
|
860
909
|
background: headerFill,
|
|
861
910
|
fontSize: BPMN_THEME.fontSize,
|
|
862
911
|
fontWeight: 500,
|
|
863
|
-
color: BPMN_THEME.labelColor
|
|
912
|
+
color: BPMN_THEME.labelColor,
|
|
913
|
+
cursor: "grab"
|
|
864
914
|
},
|
|
865
915
|
children: d.label
|
|
866
916
|
}
|
|
@@ -977,7 +1027,7 @@ function DataObjectNode({ data, selected }) {
|
|
|
977
1027
|
`L ${W} ${FOLD}`
|
|
978
1028
|
].join(" ");
|
|
979
1029
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { width: W, height: H2, position: "relative" }, children: [
|
|
980
|
-
/* @__PURE__ */ jsxRuntime.jsxs("svg", { width: W, height: H2, style: { overflow: "visible", display: "block" }, children: [
|
|
1030
|
+
/* @__PURE__ */ jsxRuntime.jsxs("svg", { width: W, height: H2, style: { overflow: "visible", display: "block", filter: resolveShapeFilter(selected) }, children: [
|
|
981
1031
|
/* @__PURE__ */ jsxRuntime.jsx("path", { d: path, fill, stroke, strokeWidth: sw }),
|
|
982
1032
|
/* @__PURE__ */ jsxRuntime.jsx("path", { d: foldPath2, fill: "none", stroke, strokeWidth: sw })
|
|
983
1033
|
] }),
|
|
@@ -995,7 +1045,7 @@ function DataStoreNode({ data, selected }) {
|
|
|
995
1045
|
const sw = resolveStrokeWidth(selected);
|
|
996
1046
|
const fill = d.color?.fill ?? BPMN_THEME.fill;
|
|
997
1047
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { width: DS_W, height: DS_H, position: "relative" }, children: [
|
|
998
|
-
/* @__PURE__ */ jsxRuntime.jsxs("svg", { width: DS_W, height: DS_H, style: { overflow: "visible", display: "block" }, children: [
|
|
1048
|
+
/* @__PURE__ */ jsxRuntime.jsxs("svg", { width: DS_W, height: DS_H, style: { overflow: "visible", display: "block", filter: resolveShapeFilter(selected) }, children: [
|
|
999
1049
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1000
1050
|
"path",
|
|
1001
1051
|
{
|
|
@@ -1041,7 +1091,7 @@ function DataObjectReferenceNode({ data, selected }) {
|
|
|
1041
1091
|
const sw = resolveStrokeWidth(selected);
|
|
1042
1092
|
const fill = d.color?.fill ?? BPMN_THEME.fill;
|
|
1043
1093
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { width: W2, height: H3, position: "relative" }, children: [
|
|
1044
|
-
/* @__PURE__ */ jsxRuntime.jsxs("svg", { width: W2, height: H3, style: { overflow: "visible", display: "block" }, children: [
|
|
1094
|
+
/* @__PURE__ */ jsxRuntime.jsxs("svg", { width: W2, height: H3, style: { overflow: "visible", display: "block", filter: resolveShapeFilter(selected) }, children: [
|
|
1045
1095
|
/* @__PURE__ */ jsxRuntime.jsx("path", { d: documentPath(), fill, stroke, strokeWidth: sw }),
|
|
1046
1096
|
/* @__PURE__ */ jsxRuntime.jsx("path", { d: foldPath(), fill: "none", stroke, strokeWidth: sw }),
|
|
1047
1097
|
d.isCollection && collectionLines(stroke, sw)
|
|
@@ -1056,7 +1106,7 @@ function DataInputNode({ data, selected }) {
|
|
|
1056
1106
|
const sw = resolveStrokeWidth(selected);
|
|
1057
1107
|
const fill = d.color?.fill ?? BPMN_THEME.fill;
|
|
1058
1108
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { width: W2, height: H3, position: "relative" }, children: [
|
|
1059
|
-
/* @__PURE__ */ jsxRuntime.jsxs("svg", { width: W2, height: H3, style: { overflow: "visible", display: "block" }, children: [
|
|
1109
|
+
/* @__PURE__ */ jsxRuntime.jsxs("svg", { width: W2, height: H3, style: { overflow: "visible", display: "block", filter: resolveShapeFilter(selected) }, children: [
|
|
1060
1110
|
/* @__PURE__ */ jsxRuntime.jsx("path", { d: documentPath(), fill, stroke, strokeWidth: sw }),
|
|
1061
1111
|
/* @__PURE__ */ jsxRuntime.jsx("path", { d: foldPath(), fill: "none", stroke, strokeWidth: sw }),
|
|
1062
1112
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1080,7 +1130,7 @@ function DataOutputNode({ data, selected }) {
|
|
|
1080
1130
|
const sw = resolveStrokeWidth(selected);
|
|
1081
1131
|
const fill = d.color?.fill ?? BPMN_THEME.fill;
|
|
1082
1132
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { width: W2, height: H3, position: "relative" }, children: [
|
|
1083
|
-
/* @__PURE__ */ jsxRuntime.jsxs("svg", { width: W2, height: H3, style: { overflow: "visible", display: "block" }, children: [
|
|
1133
|
+
/* @__PURE__ */ jsxRuntime.jsxs("svg", { width: W2, height: H3, style: { overflow: "visible", display: "block", filter: resolveShapeFilter(selected) }, children: [
|
|
1084
1134
|
/* @__PURE__ */ jsxRuntime.jsx("path", { d: documentPath(), fill, stroke, strokeWidth: sw }),
|
|
1085
1135
|
/* @__PURE__ */ jsxRuntime.jsx("path", { d: foldPath(), fill: "none", stroke, strokeWidth: sw }),
|
|
1086
1136
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1108,7 +1158,7 @@ function DataStoreReferenceNode({ data, selected }) {
|
|
|
1108
1158
|
const sw = resolveStrokeWidth(selected);
|
|
1109
1159
|
const fill = d.color?.fill ?? BPMN_THEME.fill;
|
|
1110
1160
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { width: DS_W2, height: DS_H2, position: "relative" }, children: [
|
|
1111
|
-
/* @__PURE__ */ jsxRuntime.jsxs("svg", { width: DS_W2, height: DS_H2, style: { overflow: "visible", display: "block" }, children: [
|
|
1161
|
+
/* @__PURE__ */ jsxRuntime.jsxs("svg", { width: DS_W2, height: DS_H2, style: { overflow: "visible", display: "block", filter: resolveShapeFilter(selected) }, children: [
|
|
1112
1162
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1113
1163
|
"path",
|
|
1114
1164
|
{
|
|
@@ -1434,8 +1484,11 @@ var BPMN_NODE_TYPES = {
|
|
|
1434
1484
|
ParallelGateway: GatewayNode,
|
|
1435
1485
|
EventBasedGateway: GatewayNode,
|
|
1436
1486
|
ComplexGateway: GatewayNode,
|
|
1437
|
-
// Containers
|
|
1487
|
+
// Containers — Transaction, EventSubProcess, AdHocSubProcess derive their visual variant from elementType
|
|
1438
1488
|
SubProcess: SubProcessNode,
|
|
1489
|
+
Transaction: SubProcessNode,
|
|
1490
|
+
EventSubProcess: SubProcessNode,
|
|
1491
|
+
AdHocSubProcess: SubProcessNode,
|
|
1439
1492
|
Pool: PoolNode,
|
|
1440
1493
|
Lane: LaneNode,
|
|
1441
1494
|
// Artifacts
|