@bpmnkit/plugins 0.0.8
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 +153 -0
- package/dist/ai-bridge/css.d.ts +2 -0
- package/dist/ai-bridge/css.js +366 -0
- package/dist/ai-bridge/index.d.ts +44 -0
- package/dist/ai-bridge/index.js +132 -0
- package/dist/ai-bridge/panel.d.ts +27 -0
- package/dist/ai-bridge/panel.js +715 -0
- package/dist/ascii-view/css.d.ts +4 -0
- package/dist/ascii-view/css.js +83 -0
- package/dist/ascii-view/index.d.ts +25 -0
- package/dist/ascii-view/index.js +92 -0
- package/dist/command-palette/css.d.ts +4 -0
- package/dist/command-palette/css.js +157 -0
- package/dist/command-palette/index.d.ts +53 -0
- package/dist/command-palette/index.js +378 -0
- package/dist/command-palette-editor/index.d.ts +35 -0
- package/dist/command-palette-editor/index.js +60 -0
- package/dist/config-panel/css.d.ts +4 -0
- package/dist/config-panel/css.js +719 -0
- package/dist/config-panel/index.d.ts +36 -0
- package/dist/config-panel/index.js +73 -0
- package/dist/config-panel/renderer.d.ts +127 -0
- package/dist/config-panel/renderer.js +1162 -0
- package/dist/config-panel/types.d.ts +118 -0
- package/dist/config-panel/types.js +2 -0
- package/dist/config-panel-bpmn/index.d.ts +58 -0
- package/dist/config-panel-bpmn/index.js +1320 -0
- package/dist/config-panel-bpmn/template-engine.d.ts +17 -0
- package/dist/config-panel-bpmn/template-engine.js +307 -0
- package/dist/config-panel-bpmn/template-to-service-task.d.ts +30 -0
- package/dist/config-panel-bpmn/template-to-service-task.js +92 -0
- package/dist/config-panel-bpmn/template-types.d.ts +126 -0
- package/dist/config-panel-bpmn/template-types.js +6 -0
- package/dist/config-panel-bpmn/templates/generated.d.ts +3 -0
- package/dist/config-panel-bpmn/templates/generated.js +57865 -0
- package/dist/config-panel-bpmn/util.d.ts +46 -0
- package/dist/config-panel-bpmn/util.js +195 -0
- package/dist/dmn-editor/css.d.ts +3 -0
- package/dist/dmn-editor/css.js +667 -0
- package/dist/dmn-editor/dmn-editor.d.ts +34 -0
- package/dist/dmn-editor/dmn-editor.js +646 -0
- package/dist/dmn-editor/drd-canvas.d.ts +85 -0
- package/dist/dmn-editor/drd-canvas.js +1087 -0
- package/dist/dmn-editor/index.d.ts +3 -0
- package/dist/dmn-editor/index.js +2 -0
- package/dist/dmn-viewer/css.d.ts +3 -0
- package/dist/dmn-viewer/css.js +151 -0
- package/dist/dmn-viewer/dmn-viewer.d.ts +30 -0
- package/dist/dmn-viewer/dmn-viewer.js +160 -0
- package/dist/dmn-viewer/feel.d.ts +3 -0
- package/dist/dmn-viewer/feel.js +2 -0
- package/dist/dmn-viewer/index.d.ts +14 -0
- package/dist/dmn-viewer/index.js +12 -0
- package/dist/element-docs/content.d.ts +20 -0
- package/dist/element-docs/content.js +1032 -0
- package/dist/element-docs/index.d.ts +7 -0
- package/dist/element-docs/index.js +643 -0
- package/dist/feel-playground/css.d.ts +4 -0
- package/dist/feel-playground/css.js +292 -0
- package/dist/feel-playground/index.d.ts +4 -0
- package/dist/feel-playground/index.js +3 -0
- package/dist/feel-playground/playground-plugin.d.ts +14 -0
- package/dist/feel-playground/playground-plugin.js +292 -0
- package/dist/form-editor/css.d.ts +3 -0
- package/dist/form-editor/css.js +703 -0
- package/dist/form-editor/form-editor.d.ts +48 -0
- package/dist/form-editor/form-editor.js +1039 -0
- package/dist/form-editor/index.d.ts +3 -0
- package/dist/form-editor/index.js +2 -0
- package/dist/form-viewer/css.d.ts +3 -0
- package/dist/form-viewer/css.js +303 -0
- package/dist/form-viewer/form-viewer.d.ts +29 -0
- package/dist/form-viewer/form-viewer.js +376 -0
- package/dist/form-viewer/index.d.ts +12 -0
- package/dist/form-viewer/index.js +11 -0
- package/dist/history/checkpoint.d.ts +10 -0
- package/dist/history/checkpoint.js +92 -0
- package/dist/history/css.d.ts +2 -0
- package/dist/history/css.js +130 -0
- package/dist/history/history-panel.d.ts +12 -0
- package/dist/history/history-panel.js +142 -0
- package/dist/history/index.d.ts +5 -0
- package/dist/history/index.js +3 -0
- package/dist/main-menu/css.d.ts +4 -0
- package/dist/main-menu/css.js +272 -0
- package/dist/main-menu/index.d.ts +59 -0
- package/dist/main-menu/index.js +285 -0
- package/dist/minimap/css.d.ts +10 -0
- package/dist/minimap/css.js +54 -0
- package/dist/minimap/index.d.ts +38 -0
- package/dist/minimap/index.js +69 -0
- package/dist/minimap/minimap.d.ts +35 -0
- package/dist/minimap/minimap.js +166 -0
- package/dist/optimize/index.d.ts +21 -0
- package/dist/optimize/index.js +304 -0
- package/dist/process-runner/css.d.ts +2 -0
- package/dist/process-runner/css.js +467 -0
- package/dist/process-runner/index.d.ts +56 -0
- package/dist/process-runner/index.js +549 -0
- package/dist/storage/auto-save.d.ts +11 -0
- package/dist/storage/auto-save.js +44 -0
- package/dist/storage/css.d.ts +2 -0
- package/dist/storage/css.js +2 -0
- package/dist/storage/db.d.ts +99 -0
- package/dist/storage/db.js +116 -0
- package/dist/storage/dialog.d.ts +15 -0
- package/dist/storage/dialog.js +201 -0
- package/dist/storage/export.d.ts +3 -0
- package/dist/storage/export.js +137 -0
- package/dist/storage/index.d.ts +44 -0
- package/dist/storage/index.js +201 -0
- package/dist/storage/sidebar.d.ts +2 -0
- package/dist/storage/sidebar.js +2 -0
- package/dist/storage/storage-api.d.ts +76 -0
- package/dist/storage/storage-api.js +342 -0
- package/dist/storage/types.d.ts +44 -0
- package/dist/storage/types.js +2 -0
- package/dist/storage-tabs-bridge/index.d.ts +96 -0
- package/dist/storage-tabs-bridge/index.js +502 -0
- package/dist/tabs/css.d.ts +3 -0
- package/dist/tabs/css.js +642 -0
- package/dist/tabs/file-resolver.d.ts +71 -0
- package/dist/tabs/file-resolver.js +46 -0
- package/dist/tabs/index.d.ts +15 -0
- package/dist/tabs/index.js +13 -0
- package/dist/tabs/tabs-plugin.d.ts +250 -0
- package/dist/tabs/tabs-plugin.js +1119 -0
- package/dist/token-highlight/css.d.ts +2 -0
- package/dist/token-highlight/css.js +81 -0
- package/dist/token-highlight/index.d.ts +44 -0
- package/dist/token-highlight/index.js +164 -0
- package/dist/watermark/css.d.ts +10 -0
- package/dist/watermark/css.js +54 -0
- package/dist/watermark/index.d.ts +48 -0
- package/dist/watermark/index.js +64 -0
- package/dist/zoom-controls/css.d.ts +4 -0
- package/dist/zoom-controls/css.js +48 -0
- package/dist/zoom-controls/index.d.ts +36 -0
- package/dist/zoom-controls/index.js +111 -0
- package/package.json +121 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* In-memory implementation of `FileResolver`.
|
|
3
|
+
*
|
|
4
|
+
* Register files by their IDs; tabs plugin will resolve references against this store.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```typescript
|
|
8
|
+
* const resolver = new InMemoryFileResolver();
|
|
9
|
+
* resolver.registerDmn(dmnDefs); // keyed by each decision's id
|
|
10
|
+
* resolver.registerForm(formDef); // keyed by form.id
|
|
11
|
+
* resolver.registerBpmn("proc_1", xmlString);
|
|
12
|
+
*
|
|
13
|
+
* const tabs = createTabsPlugin({ resolver });
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
export class InMemoryFileResolver {
|
|
17
|
+
_dmn = new Map();
|
|
18
|
+
_forms = new Map();
|
|
19
|
+
_bpmn = new Map();
|
|
20
|
+
/** Register a DMN definitions object. Each decision's id is indexed. */
|
|
21
|
+
registerDmn(defs) {
|
|
22
|
+
for (const decision of defs.decisions) {
|
|
23
|
+
this._dmn.set(decision.id, defs);
|
|
24
|
+
}
|
|
25
|
+
// Also index by definitions id for direct lookup
|
|
26
|
+
this._dmn.set(defs.id, defs);
|
|
27
|
+
}
|
|
28
|
+
/** Register a Camunda Form definition. */
|
|
29
|
+
registerForm(form) {
|
|
30
|
+
this._forms.set(form.id, form);
|
|
31
|
+
}
|
|
32
|
+
/** Register a BPMN XML by process/definition ID. */
|
|
33
|
+
registerBpmn(id, xml) {
|
|
34
|
+
this._bpmn.set(id, xml);
|
|
35
|
+
}
|
|
36
|
+
resolveDmn(decisionId) {
|
|
37
|
+
return this._dmn.get(decisionId) ?? null;
|
|
38
|
+
}
|
|
39
|
+
resolveForm(formId) {
|
|
40
|
+
return this._forms.get(formId) ?? null;
|
|
41
|
+
}
|
|
42
|
+
resolveBpmn(processId) {
|
|
43
|
+
return this._bpmn.get(processId) ?? null;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=file-resolver.js.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @bpmnkit/canvas-plugin-tabs — multi-tab view management for BpmnCanvas/BpmnEditor.
|
|
3
|
+
*
|
|
4
|
+
* Adds a tab bar overlay to the canvas container. Each tab can hold a BPMN,
|
|
5
|
+
* DMN, or Form view. Includes a `FileResolver` abstraction for pluggable
|
|
6
|
+
* reference resolution (in-memory by default; extensible to FS, SaaS DB, etc.).
|
|
7
|
+
*
|
|
8
|
+
* @packageDocumentation
|
|
9
|
+
*/
|
|
10
|
+
export { createTabsPlugin } from "./tabs-plugin.js";
|
|
11
|
+
export type { TabConfig, TabsPluginOptions, TabsApi, WelcomeExample, WelcomeSection, WelcomeSectionItem, WelcomeRecentItem, TabContentSnapshot, } from "./tabs-plugin.js";
|
|
12
|
+
export { InMemoryFileResolver } from "./file-resolver.js";
|
|
13
|
+
export type { FileResolver, ResolvedFile } from "./file-resolver.js";
|
|
14
|
+
export { TABS_CSS, injectTabsStyles } from "./css.js";
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @bpmnkit/canvas-plugin-tabs — multi-tab view management for BpmnCanvas/BpmnEditor.
|
|
3
|
+
*
|
|
4
|
+
* Adds a tab bar overlay to the canvas container. Each tab can hold a BPMN,
|
|
5
|
+
* DMN, or Form view. Includes a `FileResolver` abstraction for pluggable
|
|
6
|
+
* reference resolution (in-memory by default; extensible to FS, SaaS DB, etc.).
|
|
7
|
+
*
|
|
8
|
+
* @packageDocumentation
|
|
9
|
+
*/
|
|
10
|
+
export { createTabsPlugin } from "./tabs-plugin.js";
|
|
11
|
+
export { InMemoryFileResolver } from "./file-resolver.js";
|
|
12
|
+
export { TABS_CSS, injectTabsStyles } from "./css.js";
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
import type { CanvasPlugin } from "@bpmnkit/canvas";
|
|
2
|
+
import { type DmnDefinitions, type FormDefinition } from "@bpmnkit/core";
|
|
3
|
+
import type { FileResolver } from "./file-resolver.js";
|
|
4
|
+
/** A tab configuration — one of BPMN, DMN, Form, or FEEL Playground. */
|
|
5
|
+
export type TabConfig = {
|
|
6
|
+
type: "bpmn";
|
|
7
|
+
xml: string;
|
|
8
|
+
name?: string;
|
|
9
|
+
} | {
|
|
10
|
+
type: "dmn";
|
|
11
|
+
defs: DmnDefinitions;
|
|
12
|
+
name?: string;
|
|
13
|
+
} | {
|
|
14
|
+
type: "form";
|
|
15
|
+
form: FormDefinition;
|
|
16
|
+
name?: string;
|
|
17
|
+
} | {
|
|
18
|
+
type: "feel";
|
|
19
|
+
name?: string;
|
|
20
|
+
expression?: string;
|
|
21
|
+
};
|
|
22
|
+
/** A recent project item shown in the welcome screen dropdown. */
|
|
23
|
+
export interface WelcomeRecentItem {
|
|
24
|
+
label: string;
|
|
25
|
+
description?: string;
|
|
26
|
+
onOpen: () => void;
|
|
27
|
+
}
|
|
28
|
+
/** Serialized content snapshot for save/export operations. Not available for FEEL tabs. */
|
|
29
|
+
export interface TabContentSnapshot {
|
|
30
|
+
tabId: string;
|
|
31
|
+
name: string;
|
|
32
|
+
type: "bpmn" | "dmn" | "form";
|
|
33
|
+
content: string;
|
|
34
|
+
}
|
|
35
|
+
/** Options for the tabs plugin. */
|
|
36
|
+
export interface TabsPluginOptions {
|
|
37
|
+
/**
|
|
38
|
+
* File resolver used to open referenced DMN/form files by ID.
|
|
39
|
+
* Provide an `InMemoryFileResolver` (or custom implementation)
|
|
40
|
+
* to enable "Open Decision" / "Open Form" navigation.
|
|
41
|
+
*/
|
|
42
|
+
resolver?: FileResolver;
|
|
43
|
+
/**
|
|
44
|
+
* Called whenever a tab becomes active.
|
|
45
|
+
* Use this to react to tab switches — e.g. reload the BPMN editor
|
|
46
|
+
* when a BPMN tab is activated.
|
|
47
|
+
*/
|
|
48
|
+
onTabActivate?: (id: string, config: TabConfig) => void;
|
|
49
|
+
/**
|
|
50
|
+
* Called when the user confirms they want to download a tab's content
|
|
51
|
+
* before closing. Implement file serialization and browser download here.
|
|
52
|
+
* If not provided, the "Download & Close" button is hidden.
|
|
53
|
+
*/
|
|
54
|
+
onDownloadTab?: (config: TabConfig) => void;
|
|
55
|
+
/**
|
|
56
|
+
* Called when the user clicks "New diagram" on the welcome screen.
|
|
57
|
+
* Open a new BPMN tab from here.
|
|
58
|
+
*/
|
|
59
|
+
onNewDiagram?: () => void;
|
|
60
|
+
/**
|
|
61
|
+
* Called when the user clicks "Import files" on the welcome screen.
|
|
62
|
+
* Trigger your file-picker here.
|
|
63
|
+
*/
|
|
64
|
+
onImportFiles?: () => void;
|
|
65
|
+
/**
|
|
66
|
+
* Called whenever the welcome screen becomes visible (on initial install
|
|
67
|
+
* and when the last tab is closed). Use this to hide toolbars and menus
|
|
68
|
+
* that have no meaning without an open diagram.
|
|
69
|
+
*/
|
|
70
|
+
onWelcomeShow?: () => void;
|
|
71
|
+
/**
|
|
72
|
+
* Example items shown in the welcome screen. Each item has a label,
|
|
73
|
+
* optional description, optional badge (e.g. "BPMN", "MULTI"), and an
|
|
74
|
+
* `onOpen` callback that opens the relevant tab(s).
|
|
75
|
+
*/
|
|
76
|
+
examples?: WelcomeExample[];
|
|
77
|
+
/**
|
|
78
|
+
* Dynamic sections shown below the examples on the welcome screen.
|
|
79
|
+
* Each section's `getItems()` is called fresh every time the welcome screen
|
|
80
|
+
* becomes visible, so the content stays up to date.
|
|
81
|
+
*/
|
|
82
|
+
getWelcomeSections?: () => WelcomeSection[];
|
|
83
|
+
/**
|
|
84
|
+
* Called when the welcome screen becomes visible to populate the "Open recent"
|
|
85
|
+
* dropdown button. Return null or an empty array to disable the button.
|
|
86
|
+
*/
|
|
87
|
+
getRecentProjects?: () => WelcomeRecentItem[] | null;
|
|
88
|
+
/**
|
|
89
|
+
* Called whenever a DMN or Form tab's content changes (i.e. the user made an edit).
|
|
90
|
+
* Use this to trigger auto-save for the active file. Not called for BPMN tabs
|
|
91
|
+
* (use the `diagram:change` canvas event for those).
|
|
92
|
+
*/
|
|
93
|
+
onTabChange?: (tabId: string, config: TabConfig) => void;
|
|
94
|
+
/**
|
|
95
|
+
* Called when raw source view mode is toggled on or off.
|
|
96
|
+
* Use this to disable editing UI (toolbar buttons, sidebar) while raw mode is active.
|
|
97
|
+
*/
|
|
98
|
+
onRawModeChange?: (active: boolean) => void;
|
|
99
|
+
/**
|
|
100
|
+
* When true, the plugin handles file import automatically:
|
|
101
|
+
* - Creates a hidden `<input type="file">` for the "Import files" welcome screen button
|
|
102
|
+
* - Adds drag-and-drop support to the canvas container
|
|
103
|
+
* - Parses `.bpmn`, `.xml`, `.dmn`, `.form`, and `.json` files and opens them as tabs
|
|
104
|
+
*
|
|
105
|
+
* Use `tabsPlugin.api.openFilePicker()` to trigger the file picker programmatically
|
|
106
|
+
* (e.g. from a menu item). The `resolver` option must be set to register DMN/Form files.
|
|
107
|
+
*/
|
|
108
|
+
enableFileImport?: boolean;
|
|
109
|
+
/**
|
|
110
|
+
* Optional element to place in the center of the tabs bar.
|
|
111
|
+
* The element is wrapped in an absolutely-centered slot so it does not
|
|
112
|
+
* interfere with tab scrolling. Typical use: process runner toolbar.
|
|
113
|
+
*/
|
|
114
|
+
centerSlot?: HTMLElement;
|
|
115
|
+
}
|
|
116
|
+
/** A single example entry shown on the welcome screen. */
|
|
117
|
+
export interface WelcomeExample {
|
|
118
|
+
label: string;
|
|
119
|
+
description?: string;
|
|
120
|
+
/** Short badge text, e.g. "BPMN", "DMN", "FORM", "MULTI". */
|
|
121
|
+
badge?: string;
|
|
122
|
+
onOpen: () => void;
|
|
123
|
+
}
|
|
124
|
+
/** A dynamic item inside a welcome screen section. */
|
|
125
|
+
export interface WelcomeSectionItem {
|
|
126
|
+
label: string;
|
|
127
|
+
description?: string;
|
|
128
|
+
onOpen: () => void;
|
|
129
|
+
}
|
|
130
|
+
/** A dynamic section shown on the welcome screen, rebuilt on each show. */
|
|
131
|
+
export interface WelcomeSection {
|
|
132
|
+
label: string;
|
|
133
|
+
/** Called each time the welcome screen becomes visible to get fresh items. */
|
|
134
|
+
getItems: () => WelcomeSectionItem[];
|
|
135
|
+
/** Shown when `getItems` returns an empty array. */
|
|
136
|
+
emptyText?: string;
|
|
137
|
+
}
|
|
138
|
+
/** Public API for the tabs plugin, accessible via `tabsPlugin.api`. */
|
|
139
|
+
export interface TabsApi {
|
|
140
|
+
/** Open a new tab (or activate it if already open). Returns the tab ID. */
|
|
141
|
+
openTab(config: TabConfig): string;
|
|
142
|
+
/** Close a tab by ID. */
|
|
143
|
+
closeTab(id: string): void;
|
|
144
|
+
/** Close all open tabs immediately without a confirmation dialog. Shows the welcome screen. */
|
|
145
|
+
closeAllTabs(): void;
|
|
146
|
+
/** Activate a tab by ID. */
|
|
147
|
+
setActiveTab(id: string): void;
|
|
148
|
+
/** Get the active tab ID. */
|
|
149
|
+
getActiveTabId(): string | null;
|
|
150
|
+
/** Get all open tab IDs. */
|
|
151
|
+
getTabIds(): string[];
|
|
152
|
+
/**
|
|
153
|
+
* Open the DMN decision referenced by `decisionId` using the resolver.
|
|
154
|
+
* Shows a warning in the tab if the decision is not found.
|
|
155
|
+
*/
|
|
156
|
+
openDecision(decisionId: string, resultVariable?: string): void;
|
|
157
|
+
/**
|
|
158
|
+
* Open the form referenced by `formId` using the resolver.
|
|
159
|
+
* Shows a warning in the tab if the form is not found.
|
|
160
|
+
*/
|
|
161
|
+
openForm(formId: string): void;
|
|
162
|
+
/**
|
|
163
|
+
* Navigate to the BPMN tab that contains the given process ID.
|
|
164
|
+
* No-op if no open tab contains that process.
|
|
165
|
+
*/
|
|
166
|
+
navigateToProcess(processId: string): void;
|
|
167
|
+
/**
|
|
168
|
+
* Get all BPMN processes tracked across open tabs.
|
|
169
|
+
* Useful for providing a process picker in the HUD toolbar.
|
|
170
|
+
*/
|
|
171
|
+
getAvailableProcesses(): Array<{
|
|
172
|
+
id: string;
|
|
173
|
+
name?: string;
|
|
174
|
+
}>;
|
|
175
|
+
/**
|
|
176
|
+
* Get all DMN decisions from open DMN tabs.
|
|
177
|
+
* Useful for providing a decision picker in the HUD toolbar.
|
|
178
|
+
*/
|
|
179
|
+
getAvailableDecisions(): Array<{
|
|
180
|
+
id: string;
|
|
181
|
+
name?: string;
|
|
182
|
+
}>;
|
|
183
|
+
/**
|
|
184
|
+
* Get all forms from open form tabs.
|
|
185
|
+
* Useful for providing a form picker in the HUD toolbar.
|
|
186
|
+
*/
|
|
187
|
+
getAvailableForms(): Array<{
|
|
188
|
+
id: string;
|
|
189
|
+
name?: string;
|
|
190
|
+
}>;
|
|
191
|
+
/**
|
|
192
|
+
* Get serialized content for all non-FEEL open tabs.
|
|
193
|
+
* BPMN tabs return their current XML; DMN/Form tabs are serialized on demand.
|
|
194
|
+
*/
|
|
195
|
+
getAllTabContent(): TabContentSnapshot[];
|
|
196
|
+
/**
|
|
197
|
+
* Re-render the welcome screen's dynamic content (recent projects, sections).
|
|
198
|
+
* Call this after async data loads to update the welcome screen if it is visible.
|
|
199
|
+
*/
|
|
200
|
+
refreshWelcomeScreen(): void;
|
|
201
|
+
/**
|
|
202
|
+
* The raw mode toggle button element. Pass this to `initEditorHud` to place it
|
|
203
|
+
* in the bottom-left HUD panel instead of the tab bar.
|
|
204
|
+
*/
|
|
205
|
+
rawModeButton: HTMLButtonElement | null;
|
|
206
|
+
/**
|
|
207
|
+
* Enable or disable project mode.
|
|
208
|
+
* In project mode, tabs cannot be closed by the user.
|
|
209
|
+
*/
|
|
210
|
+
setProjectMode(enabled: boolean): void;
|
|
211
|
+
/**
|
|
212
|
+
* Update the display name of a tab.
|
|
213
|
+
* Used when a project file is renamed via the command palette or main menu.
|
|
214
|
+
*/
|
|
215
|
+
renameTab(id: string, name: string): void;
|
|
216
|
+
/**
|
|
217
|
+
* Programmatically open the file picker dialog.
|
|
218
|
+
* Only available when `enableFileImport: true` was passed to `createTabsPlugin`.
|
|
219
|
+
* No-op otherwise.
|
|
220
|
+
*/
|
|
221
|
+
openFilePicker(): void;
|
|
222
|
+
/**
|
|
223
|
+
* Enter or exit play mode. In play mode the tab groups are hidden so only
|
|
224
|
+
* the center slot (process runner controls) is visible in the tab bar.
|
|
225
|
+
*/
|
|
226
|
+
setPlayMode(enabled: boolean): void;
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Creates a tabs plugin instance.
|
|
230
|
+
*
|
|
231
|
+
* When installed into a `BpmnCanvas` (or `BpmnEditor`), it adds a tab bar overlay
|
|
232
|
+
* at the top of the canvas container and manages multiple BPMN/DMN/Form views.
|
|
233
|
+
*
|
|
234
|
+
* @example
|
|
235
|
+
* ```typescript
|
|
236
|
+
* const resolver = new InMemoryFileResolver();
|
|
237
|
+
* resolver.registerDmn(dmnDefs);
|
|
238
|
+
* resolver.registerForm(formDef);
|
|
239
|
+
*
|
|
240
|
+
* const tabsPlugin = createTabsPlugin({ resolver });
|
|
241
|
+
* const canvas = new BpmnCanvas({ container, xml, plugins: [tabsPlugin] });
|
|
242
|
+
*
|
|
243
|
+
* // Navigate programmatically
|
|
244
|
+
* tabsPlugin.api.openDecision("Decision_1");
|
|
245
|
+
* ```
|
|
246
|
+
*/
|
|
247
|
+
export declare function createTabsPlugin(options?: TabsPluginOptions): CanvasPlugin & {
|
|
248
|
+
api: TabsApi;
|
|
249
|
+
};
|
|
250
|
+
//# sourceMappingURL=tabs-plugin.d.ts.map
|