@bpmnkit/editor 0.0.19 → 0.0.23

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
@@ -6,6 +6,8 @@
6
6
  [![npm](https://img.shields.io/npm/v/@bpmnkit/editor?style=flat-square&color=6244d7)](https://www.npmjs.com/package/@bpmnkit/editor)
7
7
  [![license](https://img.shields.io/npm/l/@bpmnkit/editor?style=flat-square)](https://github.com/bpmnkit/monorepo/blob/main/LICENSE)
8
8
  [![typescript](https://img.shields.io/badge/TypeScript-strict-6244d7?style=flat-square&logo=typescript&logoColor=white)](https://github.com/bpmnkit/monorepo)
9
+ [![ai-assisted](https://img.shields.io/badge/AI--assisted-claude-8b5cf6?style=flat-square)](https://github.com/bpmnkit/monorepo)
10
+ [![experimental](https://img.shields.io/badge/status-experimental-f59e0b?style=flat-square)](https://github.com/bpmnkit/monorepo)
9
11
 
10
12
  [Website](https://bpmnkit.com) · [Documentation](https://docs.bpmnkit.com) · [GitHub](https://github.com/bpmnkit/monorepo) · [Changelog](https://github.com/bpmnkit/monorepo/blob/main/packages/editor/CHANGELOG.md)
11
13
  </div>
package/dist/dock.d.ts CHANGED
@@ -6,11 +6,12 @@ export interface SideDock {
6
6
  playPane: HTMLDivElement;
7
7
  docsPane: HTMLDivElement;
8
8
  deployPane: HTMLDivElement;
9
- switchTab(tab: "properties" | "history" | "ai" | "play" | "docs" | "deploy"): void;
9
+ testsPane: HTMLDivElement;
10
+ switchTab(tab: "properties" | "history" | "ai" | "play" | "docs" | "deploy" | "tests"): void;
10
11
  expand(): void;
11
12
  collapse(): void;
12
13
  get collapsed(): boolean;
13
- get activeTab(): "properties" | "history" | "ai" | "play" | "docs" | "deploy";
14
+ get activeTab(): "properties" | "history" | "ai" | "play" | "docs" | "deploy" | "tests";
14
15
  /** Update the info shown in the Properties empty state. */
15
16
  setDiagramInfo(processName: string | null, fileName: string | null): void;
16
17
  /** Hide the empty state when a config panel is displayed. */
@@ -35,6 +36,10 @@ export interface SideDock {
35
36
  setDocsTabClickHandler(fn: () => void): void;
36
37
  /** Register a callback invoked when the Deploy tab is clicked. */
37
38
  setDeployTabClickHandler(fn: () => void): void;
39
+ /** Show or hide the Tests tab. */
40
+ setTestsTabVisible(visible: boolean): void;
41
+ /** Register a callback invoked when the Tests tab is clicked. */
42
+ setTestsTabClickHandler(fn: () => void): void;
38
43
  }
39
44
  export declare function createSideDock(): SideDock;
40
45
  //# sourceMappingURL=dock.d.ts.map
package/dist/dock.js CHANGED
@@ -169,12 +169,17 @@ export function createSideDock() {
169
169
  const deployTab = document.createElement("button");
170
170
  deployTab.className = "bpmnkit-side-dock__tab";
171
171
  deployTab.textContent = "Deploy";
172
+ const testsTab = document.createElement("button");
173
+ testsTab.className = "bpmnkit-side-dock__tab";
174
+ testsTab.textContent = "Tests";
175
+ testsTab.style.display = "none";
172
176
  tabStrip.appendChild(propertiesTab);
173
177
  tabStrip.appendChild(historyTab);
174
178
  tabStrip.appendChild(aiTab);
175
179
  tabStrip.appendChild(playTab);
176
180
  tabStrip.appendChild(docsTab);
177
181
  tabStrip.appendChild(deployTab);
182
+ tabStrip.appendChild(testsTab);
178
183
  // Properties pane — contains the info empty state
179
184
  const propertiesPane = document.createElement("div");
180
185
  propertiesPane.className = "bpmnkit-side-dock__pane";
@@ -223,6 +228,9 @@ export function createSideDock() {
223
228
  // Deploy pane
224
229
  const deployPane = document.createElement("div");
225
230
  deployPane.className = "bpmnkit-side-dock__pane bpmnkit-side-dock__pane--hidden";
231
+ // Tests pane
232
+ const testsPane = document.createElement("div");
233
+ testsPane.className = "bpmnkit-side-dock__pane bpmnkit-side-dock__pane--hidden";
226
234
  el.appendChild(collapseHandle);
227
235
  el.appendChild(resizeHandle);
228
236
  el.appendChild(tabStrip);
@@ -232,6 +240,7 @@ export function createSideDock() {
232
240
  el.appendChild(playPane);
233
241
  el.appendChild(docsPane);
234
242
  el.appendChild(deployPane);
243
+ el.appendChild(testsPane);
235
244
  // ── State ──
236
245
  let _collapsed = false;
237
246
  let _width = DEFAULT_WIDTH;
@@ -241,6 +250,7 @@ export function createSideDock() {
241
250
  let _playTabHandler = null;
242
251
  let _docsTabHandler = null;
243
252
  let _deployTabHandler = null;
253
+ let _testsTabHandler = null;
244
254
  function setDocWidth(w) {
245
255
  el.style.width = `${w}px`;
246
256
  document.body.style.setProperty("--bpmnkit-dock-width", `${w}px`);
@@ -281,12 +291,14 @@ export function createSideDock() {
281
291
  playTab.classList.toggle("active", tab === "play");
282
292
  docsTab.classList.toggle("active", tab === "docs");
283
293
  deployTab.classList.toggle("active", tab === "deploy");
294
+ testsTab.classList.toggle("active", tab === "tests");
284
295
  propertiesPane.classList.toggle("bpmnkit-side-dock__pane--hidden", tab !== "properties");
285
296
  historyPane.classList.toggle("bpmnkit-side-dock__pane--hidden", tab !== "history");
286
297
  aiPane.classList.toggle("bpmnkit-side-dock__pane--hidden", tab !== "ai");
287
298
  playPane.classList.toggle("bpmnkit-side-dock__pane--hidden", tab !== "play");
288
299
  docsPane.classList.toggle("bpmnkit-side-dock__pane--hidden", tab !== "docs");
289
300
  deployPane.classList.toggle("bpmnkit-side-dock__pane--hidden", tab !== "deploy");
301
+ testsPane.classList.toggle("bpmnkit-side-dock__pane--hidden", tab !== "tests");
290
302
  }
291
303
  // ── Expand / collapse ──
292
304
  function expand() {
@@ -362,6 +374,15 @@ export function createSideDock() {
362
374
  function setDeployTabClickHandler(fn) {
363
375
  _deployTabHandler = fn;
364
376
  }
377
+ function setTestsTabVisible(visible) {
378
+ testsTab.style.display = visible ? "" : "none";
379
+ if (!visible && testsTab.classList.contains("active")) {
380
+ switchTab("properties");
381
+ }
382
+ }
383
+ function setTestsTabClickHandler(fn) {
384
+ _testsTabHandler = fn;
385
+ }
365
386
  function setVisible(visible) {
366
387
  if (visible) {
367
388
  el.style.display = "";
@@ -394,6 +415,10 @@ export function createSideDock() {
394
415
  switchTab("deploy");
395
416
  _deployTabHandler?.();
396
417
  });
418
+ testsTab.addEventListener("click", () => {
419
+ switchTab("tests");
420
+ _testsTabHandler?.();
421
+ });
397
422
  collapseHandle.addEventListener("click", () => {
398
423
  if (_collapsed)
399
424
  expand();
@@ -436,6 +461,7 @@ export function createSideDock() {
436
461
  playPane,
437
462
  docsPane,
438
463
  deployPane,
464
+ testsPane,
439
465
  switchTab,
440
466
  expand,
441
467
  collapse,
@@ -451,6 +477,8 @@ export function createSideDock() {
451
477
  setPlayTabClickHandler,
452
478
  setDocsTabClickHandler,
453
479
  setDeployTabClickHandler,
480
+ setTestsTabVisible,
481
+ setTestsTabClickHandler,
454
482
  get collapsed() {
455
483
  return _collapsed;
456
484
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bpmnkit/editor",
3
- "version": "0.0.19",
3
+ "version": "0.0.23",
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.16",
21
- "@bpmnkit/core": "0.0.16"
20
+ "@bpmnkit/canvas": "0.0.20",
21
+ "@bpmnkit/core": "0.0.20"
22
22
  },
23
23
  "description": "Full-featured interactive BPMN editor with undo/redo, HUD, and side-dock UI",
24
24
  "keywords": [