@bpmnkit/editor 0.0.17 → 0.0.19

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/dock.d.ts CHANGED
@@ -21,6 +21,8 @@ export interface SideDock {
21
21
  setVisible(visible: boolean): void;
22
22
  /** Register a callback invoked when the AI tab is clicked (after switching to it). */
23
23
  setAiTabClickHandler(fn: () => void): void;
24
+ /** Show or hide the AI tab. */
25
+ setAiTabVisible(visible: boolean): void;
24
26
  /** Register a callback invoked when the History tab is clicked (after switching to it). */
25
27
  setHistoryTabClickHandler(fn: () => void): void;
26
28
  /** Enable or disable the History tab (disable when no storage context is available). */
package/dist/dock.js CHANGED
@@ -339,6 +339,13 @@ export function createSideDock() {
339
339
  switchTab("properties");
340
340
  }
341
341
  }
342
+ function setAiTabVisible(visible) {
343
+ aiTab.style.display = visible ? "" : "none";
344
+ // If AI tab is hidden while active, fall back to properties
345
+ if (!visible && aiTab.classList.contains("active")) {
346
+ switchTab("properties");
347
+ }
348
+ }
342
349
  function setPlayTabVisible(visible) {
343
350
  playTab.style.display = visible ? "" : "none";
344
351
  // If play tab is hidden while active, fall back to properties
@@ -437,6 +444,7 @@ export function createSideDock() {
437
444
  setDiagramInfo,
438
445
  setVisible,
439
446
  setAiTabClickHandler,
447
+ setAiTabVisible,
440
448
  setHistoryTabClickHandler,
441
449
  setHistoryTabEnabled,
442
450
  setPlayTabVisible,
package/dist/editor.js CHANGED
@@ -442,7 +442,8 @@ export class BpmnEditor {
442
442
  this.loadDefinitions(createEmptyDefinitions());
443
443
  }
444
444
  this._ro = new ResizeObserver(() => {
445
- if (this._defs)
445
+ // When fit:"none", the caller manages zoom explicitly — never auto-fit on resize.
446
+ if (this._defs && this._fit !== "none")
446
447
  this.fitView();
447
448
  });
448
449
  this._ro.observe(this._host);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bpmnkit/editor",
3
- "version": "0.0.17",
3
+ "version": "0.0.19",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -17,8 +17,8 @@
17
17
  "dist/**/*.d.ts"
18
18
  ],
19
19
  "dependencies": {
20
- "@bpmnkit/canvas": "0.0.15",
21
- "@bpmnkit/core": "0.0.15"
20
+ "@bpmnkit/canvas": "0.0.16",
21
+ "@bpmnkit/core": "0.0.16"
22
22
  },
23
23
  "description": "Full-featured interactive BPMN editor with undo/redo, HUD, and side-dock UI",
24
24
  "keywords": [