aurea-eden 1.46.0 → 1.46.2

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 CHANGED
@@ -214,7 +214,10 @@ const barValues = {
214
214
  'Task_4': [
215
215
  { heightValue: 42, colorValue: 70 },
216
216
  { heightValue: 30, colorValue: 90, colorsInverted: true }
217
- ]
217
+ ],
218
+
219
+ // Clear bars explicitly (omitting the ID entirely also works)
220
+ 'Task_5': 0
218
221
  };
219
222
  </script>
220
223
  ```
@@ -357,6 +360,14 @@ diagram.addTask('a1')
357
360
 
358
361
  Colors are normalized **per slot** across all elements. All elements' first bars are normalized together, all second bars separately — so each slot independently represents a different KPI dimension.
359
362
 
363
+ #### Clearing Bars
364
+
365
+ To remove a value bar from an element that previously displayed one, you can either:
366
+ 1. Completely omit the element's ID from the `values` object in your next reactive update.
367
+ 2. Explicitly set the value to `0` or an empty array `[]`.
368
+
369
+ The Vue wrapper will automatically clean up the 3D meshes without crashing the WebGL context.
370
+
360
371
  #### Badge labels in ANALYZE mode
361
372
 
362
373
  Each bar (or combined group for 3+ bars) gets an animated floating label that counts up from zero to the final value during the rise animation. If the element has an active-task type set, the label also carries the appropriate star icon.
@@ -539,6 +550,8 @@ export { CurvedConnectorShape };
539
550
 
540
551
  ```
541
552
  aurea-eden/
553
+ ├── data/
554
+ │ └── bpmn/ # BPMN 2.0 XML templates
542
555
  ├── lib/
543
556
  │ ├── components/ # Vue component (AureaEdenBpmnDiagram.vue)
544
557
  │ ├── connectors/ # Connector base class
@@ -553,8 +566,7 @@ aurea-eden/
553
566
  │ ├── CustomNotationDemo/
554
567
  │ ├── OrderProcessingDemo/
555
568
  │ ├── ShapesDemo/
556
- ├── SimpleBPMN/
557
- │ └── VueWrapperBpmnDemo/
569
+ └── SimpleBPMN/
558
570
  ├── assets/ # Static assets (logo, demo screenshots)
559
571
  ├── dist/ # Built library (ES module + UMD)
560
572
  ├── dist-site/ # Built demo site
@@ -60172,6 +60172,9 @@ SPREAD LOG: Target ${nodeId} Port ${basePort}`);
60172
60172
  "eventBasedGateway",
60173
60173
  "complexGateway",
60174
60174
  "endEvent",
60175
+ "intermediateCatchEvent",
60176
+ "intermediateThrowEvent",
60177
+ "boundaryEvent",
60175
60178
  "subProcess",
60176
60179
  "callActivity"
60177
60180
  ];
@@ -60440,7 +60443,7 @@ SPREAD LOG: Target ${nodeId} Port ${basePort}`);
60440
60443
  return text.replace(/\n/g, "\\n").replace(/'/g, "\\'");
60441
60444
  }
60442
60445
  }
60443
- const version = "1.46.0";
60446
+ const version = "1.46.2";
60444
60447
  var Easing = Object.freeze({
60445
60448
  Linear: Object.freeze({
60446
60449
  None: function(amount) {
@@ -66403,6 +66406,11 @@ class Element extends Mesh {
66403
66406
  context.font = `Bold ${scaledFontSize}px Arial`;
66404
66407
  const worldScale = 0.4 / resolutionScale;
66405
66408
  sprite.scale.set(canvas.width * worldScale, (mainHeight + tailHeight) * worldScale, 1);
66409
+ if (sprite.material && sprite.material.map) {
66410
+ sprite.material.map.dispose();
66411
+ sprite.material.map = new CanvasTexture(canvas);
66412
+ sprite.material.map.minFilter = LinearFilter;
66413
+ }
66406
66414
  }
66407
66415
  context.clearRect(0, 0, canvas.width, canvas.height);
66408
66416
  this._drawBubblePath(context, canvas.width, mainHeight, tailHeight, scaledBorderRadius);
@@ -68071,22 +68079,24 @@ class Diagram {
68071
68079
  if (barHeight > maxBarHeight) maxBarHeight = barHeight;
68072
68080
  const rawColor = getColorForValue(colorValue, slotMin, slotMax, colorsInverted);
68073
68081
  const barColor = isDark ? new Color(65535) : rawColor;
68074
- const slotShape = totalBars === 1 ? element.shape.getOuterShape() : createRoundedBarSlotShape(elementSize.x, elementSize.y, barIndex, totalBars);
68075
- const barShape = new ValueBarShape(slotShape, barHeight, barColor, this.theme);
68076
- const barElement = new Element(`${element.elementId}_bar_${barIndex}`, barShape);
68077
- barElement.themable = false;
68078
- barElement.userData.barIndex = barIndex;
68079
- barElement.userData.barDef = barDef;
68080
- barElement.userData.slotMin = slotMin;
68081
- barElement.userData.slotMax = slotMax;
68082
- this.addElement(barElement).positionAt(element.getPosition());
68083
- element.valueBars.push({ element: barElement, positionOffset: new Vector3(0, 0, 0) });
68084
- barElement.scale.z = 0;
68085
- const animationState = { progress: 0 };
68086
- const tween = new Tween(animationState).to({ progress: 1 }, 1500).easing(Easing.Quartic.Out).onUpdate(() => {
68087
- barElement.scale.z = animationState.progress;
68088
- }).start();
68089
- this.analysisTweens.push(tween);
68082
+ if (barHeight > 0) {
68083
+ const slotShape = totalBars === 1 ? element.shape.getOuterShape() : createRoundedBarSlotShape(elementSize.x, elementSize.y, barIndex, totalBars);
68084
+ const barShape = new ValueBarShape(slotShape, barHeight, barColor, this.theme);
68085
+ const barElement = new Element(`${element.elementId}_bar_${barIndex}`, barShape);
68086
+ barElement.themable = false;
68087
+ barElement.userData.barIndex = barIndex;
68088
+ barElement.userData.barDef = barDef;
68089
+ barElement.userData.slotMin = slotMin;
68090
+ barElement.userData.slotMax = slotMax;
68091
+ this.addElement(barElement).positionAt(element.getPosition());
68092
+ element.valueBars.push({ element: barElement, positionOffset: new Vector3(0, 0, 0) });
68093
+ barElement.scale.z = 0;
68094
+ const animationState = { progress: 0 };
68095
+ const tween = new Tween(animationState).to({ progress: 1 }, 1500).easing(Easing.Quartic.Out).onUpdate(() => {
68096
+ barElement.scale.z = animationState.progress;
68097
+ }).start();
68098
+ this.analysisTweens.push(tween);
68099
+ }
68090
68100
  });
68091
68101
  const taskType = element.userData.taskType;
68092
68102
  let minZ = 0;
@@ -68726,19 +68736,29 @@ class Diagram {
68726
68736
  * Clears all elements and connectors from the diagram.
68727
68737
  */
68728
68738
  clear() {
68739
+ if (this.tween) this.tween.stop();
68740
+ if (this.analysisTweens) {
68741
+ this.analysisTweens.forEach((t2) => t2.stop());
68742
+ this.analysisTweens = [];
68743
+ }
68744
+ this.removeValueBars();
68729
68745
  if (this.elements.length > 0) {
68730
68746
  this.elements.forEach((element) => {
68731
68747
  this.scene.remove(element);
68748
+ if (element.dispose) element.dispose();
68732
68749
  });
68733
68750
  }
68734
68751
  if (this.connectors.length > 0) {
68735
68752
  this.connectors.forEach((connector) => {
68736
68753
  this.scene.remove(connector);
68754
+ if (connector.geometry) connector.geometry.dispose();
68755
+ if (connector.material) connector.material.dispose();
68737
68756
  });
68738
68757
  }
68739
68758
  this.elements = [];
68740
68759
  this.connectors = [];
68741
68760
  this.elementConnectors.clear();
68761
+ this.mode = "VIEW";
68742
68762
  }
68743
68763
  // ================================================================
68744
68764
  // Diagram JSON
@@ -69384,6 +69404,23 @@ class BpmnDiagram extends Diagram {
69384
69404
  _el.textStyle = { fontSize: BPMN_DIMS.FONT_SIZE_EVENT, align: BPMN_DIMS.TEXT_ALIGN_EVENT, offset: new Vector3(0, -(height / 2) - BPMN_DIMS.LABEL_GAP_BELOW, 3), vAlign: "top", faceCamera: BPMN_DIMS.FACE_CAMERA_EVENT };
69385
69405
  return _el;
69386
69406
  }
69407
+ addIntermediateThrowEvent(elementId, width = BPMN_DIMS.EVENT_SIZE, height = BPMN_DIMS.EVENT_SIZE) {
69408
+ const _el = this.addIntermediateEvent(elementId, width, height);
69409
+ _el.bpmnType = "bpmn:IntermediateThrowEvent";
69410
+ return _el;
69411
+ }
69412
+ addIntermediateCatchEvent(elementId, width = BPMN_DIMS.EVENT_SIZE, height = BPMN_DIMS.EVENT_SIZE) {
69413
+ const _el = this.addIntermediateEvent(elementId, width, height);
69414
+ _el.bpmnType = "bpmn:IntermediateCatchEvent";
69415
+ return _el;
69416
+ }
69417
+ addBoundaryEvent(elementId, width = BPMN_DIMS.EVENT_SIZE, height = BPMN_DIMS.EVENT_SIZE) {
69418
+ const _el = this.addElement(new Element(elementId, new CircleShape(width, height))).addIcon(intermediate, "center", BPMN_DIMS.ICON_SIZE_LARGE);
69419
+ _el.semanticType = "event";
69420
+ _el.bpmnType = "bpmn:BoundaryEvent";
69421
+ _el.textStyle = { fontSize: BPMN_DIMS.FONT_SIZE_EVENT, align: BPMN_DIMS.TEXT_ALIGN_EVENT, offset: new Vector3(0, -(height / 2) - BPMN_DIMS.LABEL_GAP_BELOW, 3), vAlign: "top", faceCamera: BPMN_DIMS.FACE_CAMERA_EVENT };
69422
+ return _el;
69423
+ }
69387
69424
  // End Events
69388
69425
  addEndEvent(elementId, width = BPMN_DIMS.EVENT_SIZE, height = BPMN_DIMS.EVENT_SIZE) {
69389
69426
  const _el = this.addElement(new Element(elementId, new CircleShape(width, height, BPMN_DIMS.END_EVENT_LINE_WIDTH)));