@bpmnkit/editor 0.0.18 → 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 +2 -0
- package/dist/dock.d.ts +9 -2
- package/dist/dock.js +36 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
[](https://www.npmjs.com/package/@bpmnkit/editor)
|
|
7
7
|
[](https://github.com/bpmnkit/monorepo/blob/main/LICENSE)
|
|
8
8
|
[](https://github.com/bpmnkit/monorepo)
|
|
9
|
+
[](https://github.com/bpmnkit/monorepo)
|
|
10
|
+
[](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
|
-
|
|
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. */
|
|
@@ -21,6 +22,8 @@ export interface SideDock {
|
|
|
21
22
|
setVisible(visible: boolean): void;
|
|
22
23
|
/** Register a callback invoked when the AI tab is clicked (after switching to it). */
|
|
23
24
|
setAiTabClickHandler(fn: () => void): void;
|
|
25
|
+
/** Show or hide the AI tab. */
|
|
26
|
+
setAiTabVisible(visible: boolean): void;
|
|
24
27
|
/** Register a callback invoked when the History tab is clicked (after switching to it). */
|
|
25
28
|
setHistoryTabClickHandler(fn: () => void): void;
|
|
26
29
|
/** Enable or disable the History tab (disable when no storage context is available). */
|
|
@@ -33,6 +36,10 @@ export interface SideDock {
|
|
|
33
36
|
setDocsTabClickHandler(fn: () => void): void;
|
|
34
37
|
/** Register a callback invoked when the Deploy tab is clicked. */
|
|
35
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;
|
|
36
43
|
}
|
|
37
44
|
export declare function createSideDock(): SideDock;
|
|
38
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() {
|
|
@@ -339,6 +351,13 @@ export function createSideDock() {
|
|
|
339
351
|
switchTab("properties");
|
|
340
352
|
}
|
|
341
353
|
}
|
|
354
|
+
function setAiTabVisible(visible) {
|
|
355
|
+
aiTab.style.display = visible ? "" : "none";
|
|
356
|
+
// If AI tab is hidden while active, fall back to properties
|
|
357
|
+
if (!visible && aiTab.classList.contains("active")) {
|
|
358
|
+
switchTab("properties");
|
|
359
|
+
}
|
|
360
|
+
}
|
|
342
361
|
function setPlayTabVisible(visible) {
|
|
343
362
|
playTab.style.display = visible ? "" : "none";
|
|
344
363
|
// If play tab is hidden while active, fall back to properties
|
|
@@ -355,6 +374,15 @@ export function createSideDock() {
|
|
|
355
374
|
function setDeployTabClickHandler(fn) {
|
|
356
375
|
_deployTabHandler = fn;
|
|
357
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
|
+
}
|
|
358
386
|
function setVisible(visible) {
|
|
359
387
|
if (visible) {
|
|
360
388
|
el.style.display = "";
|
|
@@ -387,6 +415,10 @@ export function createSideDock() {
|
|
|
387
415
|
switchTab("deploy");
|
|
388
416
|
_deployTabHandler?.();
|
|
389
417
|
});
|
|
418
|
+
testsTab.addEventListener("click", () => {
|
|
419
|
+
switchTab("tests");
|
|
420
|
+
_testsTabHandler?.();
|
|
421
|
+
});
|
|
390
422
|
collapseHandle.addEventListener("click", () => {
|
|
391
423
|
if (_collapsed)
|
|
392
424
|
expand();
|
|
@@ -429,6 +461,7 @@ export function createSideDock() {
|
|
|
429
461
|
playPane,
|
|
430
462
|
docsPane,
|
|
431
463
|
deployPane,
|
|
464
|
+
testsPane,
|
|
432
465
|
switchTab,
|
|
433
466
|
expand,
|
|
434
467
|
collapse,
|
|
@@ -437,12 +470,15 @@ export function createSideDock() {
|
|
|
437
470
|
setDiagramInfo,
|
|
438
471
|
setVisible,
|
|
439
472
|
setAiTabClickHandler,
|
|
473
|
+
setAiTabVisible,
|
|
440
474
|
setHistoryTabClickHandler,
|
|
441
475
|
setHistoryTabEnabled,
|
|
442
476
|
setPlayTabVisible,
|
|
443
477
|
setPlayTabClickHandler,
|
|
444
478
|
setDocsTabClickHandler,
|
|
445
479
|
setDeployTabClickHandler,
|
|
480
|
+
setTestsTabVisible,
|
|
481
|
+
setTestsTabClickHandler,
|
|
446
482
|
get collapsed() {
|
|
447
483
|
return _collapsed;
|
|
448
484
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bpmnkit/editor",
|
|
3
|
-
"version": "0.0.
|
|
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.
|
|
21
|
-
"@bpmnkit/core": "0.0.
|
|
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": [
|