@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,378 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @bpmnkit/canvas-plugin-command-palette — Ctrl+K / ⌘K command palette for
|
|
3
|
+
* `@bpmnkit/canvas` and `@bpmnkit/editor`.
|
|
4
|
+
*
|
|
5
|
+
* ## Usage
|
|
6
|
+
* ```typescript
|
|
7
|
+
* import { createCommandPalettePlugin } from "@bpmnkit/canvas-plugin-command-palette";
|
|
8
|
+
*
|
|
9
|
+
* const palette = createCommandPalettePlugin({
|
|
10
|
+
* onZenModeChange: (active) => {
|
|
11
|
+
* document.querySelectorAll(".hud").forEach(
|
|
12
|
+
* (el) => { (el as HTMLElement).style.display = active ? "none" : ""; }
|
|
13
|
+
* );
|
|
14
|
+
* },
|
|
15
|
+
* });
|
|
16
|
+
*
|
|
17
|
+
* const editor = new BpmnEditor({ container, xml, plugins: [palette] });
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* @packageDocumentation
|
|
21
|
+
*/
|
|
22
|
+
import { computeDiagramBounds } from "@bpmnkit/canvas";
|
|
23
|
+
import { Bpmn } from "@bpmnkit/core";
|
|
24
|
+
import { injectCommandPaletteStyles } from "./css.js";
|
|
25
|
+
export { COMMAND_PALETTE_CSS, COMMAND_PALETTE_STYLE_ID, injectCommandPaletteStyles, } from "./css.js";
|
|
26
|
+
// ── Module-level singleton — only one palette open at a time ──────────────────
|
|
27
|
+
let _closeCurrent = null;
|
|
28
|
+
// ── Icons ─────────────────────────────────────────────────────────────────────
|
|
29
|
+
const SEARCH_ICON = '<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><circle cx="6.5" cy="6.5" r="4"/><line x1="10" y1="10" x2="14" y2="14"/></svg>';
|
|
30
|
+
// ── Theme helper ──────────────────────────────────────────────────────────────
|
|
31
|
+
function resolveTheme(theme) {
|
|
32
|
+
if (theme === "dark")
|
|
33
|
+
return "dark";
|
|
34
|
+
if (theme === "light")
|
|
35
|
+
return "light";
|
|
36
|
+
return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
37
|
+
}
|
|
38
|
+
// ── Factory ───────────────────────────────────────────────────────────────────
|
|
39
|
+
export function createCommandPalettePlugin(options = {}) {
|
|
40
|
+
let _api = null;
|
|
41
|
+
let _overlayEl = null;
|
|
42
|
+
let _inputEl = null;
|
|
43
|
+
let _listEl = null;
|
|
44
|
+
let _isOpen = false;
|
|
45
|
+
let _isZenMode = false;
|
|
46
|
+
let _focusedIndex = 0;
|
|
47
|
+
let _lastDefs = null;
|
|
48
|
+
const _extraCommands = [];
|
|
49
|
+
const _unsubs = [];
|
|
50
|
+
// ── Built-in commands (lazy — need _api set) ─────────────────────────────
|
|
51
|
+
function builtinCommands() {
|
|
52
|
+
if (!_api)
|
|
53
|
+
return [];
|
|
54
|
+
const api = _api;
|
|
55
|
+
return [
|
|
56
|
+
{
|
|
57
|
+
id: "toggle-theme",
|
|
58
|
+
title: "Toggle Theme",
|
|
59
|
+
description: "Cycle: dark → light → auto",
|
|
60
|
+
action() {
|
|
61
|
+
const cur = api.getTheme();
|
|
62
|
+
const next = cur === "dark" ? "light" : cur === "light" ? "auto" : "dark";
|
|
63
|
+
api.setTheme(next);
|
|
64
|
+
closePalette();
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
id: "zoom-100",
|
|
69
|
+
title: "Zoom to 100%",
|
|
70
|
+
action() {
|
|
71
|
+
const vp = api.getViewport();
|
|
72
|
+
const rect = api.svg.getBoundingClientRect();
|
|
73
|
+
const cx = (rect.width / 2 - vp.tx) / vp.scale;
|
|
74
|
+
const cy = (rect.height / 2 - vp.ty) / vp.scale;
|
|
75
|
+
api.setViewport({ tx: rect.width / 2 - cx, ty: rect.height / 2 - cy, scale: 1 });
|
|
76
|
+
closePalette();
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
id: "zoom-fit",
|
|
81
|
+
title: "Zoom to Fit",
|
|
82
|
+
action() {
|
|
83
|
+
if (!_lastDefs) {
|
|
84
|
+
closePalette();
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
const bounds = computeDiagramBounds(_lastDefs);
|
|
88
|
+
if (!bounds) {
|
|
89
|
+
closePalette();
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
const rect = api.svg.getBoundingClientRect();
|
|
93
|
+
const dW = bounds.maxX - bounds.minX;
|
|
94
|
+
const dH = bounds.maxY - bounds.minY;
|
|
95
|
+
if (dW === 0 || dH === 0) {
|
|
96
|
+
closePalette();
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
const padding = 40;
|
|
100
|
+
const scale = Math.min((rect.width - padding * 2) / dW, (rect.height - padding * 2) / dH);
|
|
101
|
+
const tx = (rect.width - dW * scale) / 2 - bounds.minX * scale;
|
|
102
|
+
const ty = (rect.height - dH * scale) / 2 - bounds.minY * scale;
|
|
103
|
+
api.setViewport({ tx, ty, scale });
|
|
104
|
+
closePalette();
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
id: "export-bpmn",
|
|
109
|
+
title: "Export as BPMN XML",
|
|
110
|
+
description: `Download as ${options.exportFilename ?? "diagram.bpmn"}`,
|
|
111
|
+
action() {
|
|
112
|
+
if (!_lastDefs) {
|
|
113
|
+
closePalette();
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
const xml = Bpmn.export(_lastDefs);
|
|
117
|
+
const blob = new Blob([xml], { type: "text/xml" });
|
|
118
|
+
const url = URL.createObjectURL(blob);
|
|
119
|
+
const a = document.createElement("a");
|
|
120
|
+
a.href = url;
|
|
121
|
+
a.download = options.exportFilename ?? "diagram.bpmn";
|
|
122
|
+
a.click();
|
|
123
|
+
URL.revokeObjectURL(url);
|
|
124
|
+
closePalette();
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
id: "zen-mode",
|
|
129
|
+
title: _isZenMode ? "Exit Zen Mode" : "Zen Mode",
|
|
130
|
+
description: _isZenMode ? "Restore grid and toolbars" : "Hide grid and toolbars",
|
|
131
|
+
action() {
|
|
132
|
+
toggleZenMode();
|
|
133
|
+
closePalette();
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
];
|
|
137
|
+
}
|
|
138
|
+
// ── Zen mode ─────────────────────────────────────────────────────────────
|
|
139
|
+
function toggleZenMode() {
|
|
140
|
+
if (!_api)
|
|
141
|
+
return;
|
|
142
|
+
_isZenMode = !_isZenMode;
|
|
143
|
+
_api.container.classList.toggle("bpmnkit-zen-mode", _isZenMode);
|
|
144
|
+
const gridRects = _api.svg.querySelectorAll('rect[fill^="url(#bpmnkit-grid"]');
|
|
145
|
+
for (const rect of gridRects) {
|
|
146
|
+
rect.style.visibility = _isZenMode ? "hidden" : "";
|
|
147
|
+
}
|
|
148
|
+
options.onZenModeChange?.(_isZenMode);
|
|
149
|
+
}
|
|
150
|
+
// ── Palette open / close ──────────────────────────────────────────────────
|
|
151
|
+
function openPalette() {
|
|
152
|
+
if (!_api)
|
|
153
|
+
return;
|
|
154
|
+
_closeCurrent?.();
|
|
155
|
+
_closeCurrent = closePalette;
|
|
156
|
+
_isOpen = true;
|
|
157
|
+
_focusedIndex = 0;
|
|
158
|
+
const isDark = resolveTheme(_api.getTheme()) === "dark";
|
|
159
|
+
const overlay = document.createElement("div");
|
|
160
|
+
overlay.className = isDark
|
|
161
|
+
? "bpmnkit-palette-overlay"
|
|
162
|
+
: "bpmnkit-palette-overlay bpmnkit-palette--light";
|
|
163
|
+
overlay.setAttribute("role", "dialog");
|
|
164
|
+
overlay.setAttribute("aria-modal", "true");
|
|
165
|
+
overlay.setAttribute("aria-label", "Command palette");
|
|
166
|
+
const panel = document.createElement("div");
|
|
167
|
+
panel.className = "bpmnkit-palette-panel";
|
|
168
|
+
// Search row
|
|
169
|
+
const searchRow = document.createElement("div");
|
|
170
|
+
searchRow.className = "bpmnkit-palette-search";
|
|
171
|
+
const iconEl = document.createElement("span");
|
|
172
|
+
iconEl.className = "bpmnkit-palette-search-icon";
|
|
173
|
+
iconEl.innerHTML = SEARCH_ICON;
|
|
174
|
+
searchRow.appendChild(iconEl);
|
|
175
|
+
const input = document.createElement("input");
|
|
176
|
+
input.type = "text";
|
|
177
|
+
input.className = "bpmnkit-palette-input";
|
|
178
|
+
input.placeholder = "Search commands\u2026";
|
|
179
|
+
input.setAttribute("autocomplete", "off");
|
|
180
|
+
input.setAttribute("spellcheck", "false");
|
|
181
|
+
searchRow.appendChild(input);
|
|
182
|
+
const kbdHint = document.createElement("span");
|
|
183
|
+
kbdHint.className = "bpmnkit-palette-kbd";
|
|
184
|
+
const kbdKey = document.createElement("kbd");
|
|
185
|
+
kbdKey.textContent = "Esc";
|
|
186
|
+
kbdHint.appendChild(kbdKey);
|
|
187
|
+
searchRow.appendChild(kbdHint);
|
|
188
|
+
panel.appendChild(searchRow);
|
|
189
|
+
// List
|
|
190
|
+
const list = document.createElement("div");
|
|
191
|
+
list.className = "bpmnkit-palette-list";
|
|
192
|
+
list.setAttribute("role", "listbox");
|
|
193
|
+
panel.appendChild(list);
|
|
194
|
+
overlay.appendChild(panel);
|
|
195
|
+
document.body.appendChild(overlay);
|
|
196
|
+
_overlayEl = overlay;
|
|
197
|
+
_inputEl = input;
|
|
198
|
+
_listEl = list;
|
|
199
|
+
renderList("");
|
|
200
|
+
input.focus();
|
|
201
|
+
input.addEventListener("input", () => {
|
|
202
|
+
_focusedIndex = 0;
|
|
203
|
+
renderList(input.value);
|
|
204
|
+
});
|
|
205
|
+
overlay.addEventListener("keydown", onPaletteKeyDown);
|
|
206
|
+
overlay.addEventListener("pointerdown", (e) => {
|
|
207
|
+
if (e.target === overlay)
|
|
208
|
+
closePalette();
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
function closePalette() {
|
|
212
|
+
if (!_isOpen)
|
|
213
|
+
return;
|
|
214
|
+
_isOpen = false;
|
|
215
|
+
if (_closeCurrent === closePalette)
|
|
216
|
+
_closeCurrent = null;
|
|
217
|
+
_overlayEl?.remove();
|
|
218
|
+
_overlayEl = null;
|
|
219
|
+
_inputEl = null;
|
|
220
|
+
_listEl = null;
|
|
221
|
+
}
|
|
222
|
+
// ── List rendering ────────────────────────────────────────────────────────
|
|
223
|
+
function filteredCommands(query) {
|
|
224
|
+
const all = [...builtinCommands(), ..._extraCommands];
|
|
225
|
+
if (!query)
|
|
226
|
+
return all;
|
|
227
|
+
const q = query.toLowerCase();
|
|
228
|
+
return all.filter((c) => c.title.toLowerCase().includes(q) || c.description?.toLowerCase().includes(q));
|
|
229
|
+
}
|
|
230
|
+
function renderList(query) {
|
|
231
|
+
if (!_listEl)
|
|
232
|
+
return;
|
|
233
|
+
_listEl.innerHTML = "";
|
|
234
|
+
const cmds = filteredCommands(query);
|
|
235
|
+
if (cmds.length === 0) {
|
|
236
|
+
const empty = document.createElement("div");
|
|
237
|
+
empty.className = "bpmnkit-palette-empty";
|
|
238
|
+
empty.textContent = "No commands found";
|
|
239
|
+
_listEl.appendChild(empty);
|
|
240
|
+
return;
|
|
241
|
+
}
|
|
242
|
+
if (_focusedIndex >= cmds.length)
|
|
243
|
+
_focusedIndex = 0;
|
|
244
|
+
cmds.forEach((cmd, i) => {
|
|
245
|
+
if (!_listEl)
|
|
246
|
+
return;
|
|
247
|
+
const item = document.createElement("div");
|
|
248
|
+
item.className =
|
|
249
|
+
i === _focusedIndex
|
|
250
|
+
? "bpmnkit-palette-item bpmnkit-palette-focused"
|
|
251
|
+
: "bpmnkit-palette-item";
|
|
252
|
+
item.setAttribute("role", "option");
|
|
253
|
+
item.setAttribute("aria-selected", String(i === _focusedIndex));
|
|
254
|
+
const titleEl = document.createElement("span");
|
|
255
|
+
titleEl.className = "bpmnkit-palette-item-title";
|
|
256
|
+
titleEl.textContent = cmd.title;
|
|
257
|
+
item.appendChild(titleEl);
|
|
258
|
+
if (cmd.description) {
|
|
259
|
+
const descEl = document.createElement("span");
|
|
260
|
+
descEl.className = "bpmnkit-palette-item-desc";
|
|
261
|
+
descEl.textContent = cmd.description;
|
|
262
|
+
item.appendChild(descEl);
|
|
263
|
+
}
|
|
264
|
+
item.addEventListener("pointerenter", () => {
|
|
265
|
+
_focusedIndex = i;
|
|
266
|
+
updateFocus();
|
|
267
|
+
});
|
|
268
|
+
item.addEventListener("pointerdown", (e) => {
|
|
269
|
+
e.preventDefault();
|
|
270
|
+
cmd.action();
|
|
271
|
+
});
|
|
272
|
+
_listEl.appendChild(item);
|
|
273
|
+
});
|
|
274
|
+
}
|
|
275
|
+
function updateFocus() {
|
|
276
|
+
if (!_listEl)
|
|
277
|
+
return;
|
|
278
|
+
const items = _listEl.querySelectorAll(".bpmnkit-palette-item");
|
|
279
|
+
items.forEach((item, i) => {
|
|
280
|
+
const focused = i === _focusedIndex;
|
|
281
|
+
item.classList.toggle("bpmnkit-palette-focused", focused);
|
|
282
|
+
item.setAttribute("aria-selected", String(focused));
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
function scrollFocusedIntoView() {
|
|
286
|
+
if (!_listEl)
|
|
287
|
+
return;
|
|
288
|
+
const items = _listEl.querySelectorAll(".bpmnkit-palette-item");
|
|
289
|
+
const item = items[_focusedIndex];
|
|
290
|
+
item?.scrollIntoView({ block: "nearest" });
|
|
291
|
+
}
|
|
292
|
+
// ── Keyboard handling ─────────────────────────────────────────────────────
|
|
293
|
+
function onPaletteKeyDown(e) {
|
|
294
|
+
if (!_listEl || !_inputEl)
|
|
295
|
+
return;
|
|
296
|
+
const cmds = filteredCommands(_inputEl.value);
|
|
297
|
+
const count = cmds.length;
|
|
298
|
+
if (e.key === "ArrowDown") {
|
|
299
|
+
e.preventDefault();
|
|
300
|
+
if (count > 0) {
|
|
301
|
+
_focusedIndex = (_focusedIndex + 1) % count;
|
|
302
|
+
updateFocus();
|
|
303
|
+
scrollFocusedIntoView();
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
else if (e.key === "ArrowUp") {
|
|
307
|
+
e.preventDefault();
|
|
308
|
+
if (count > 0) {
|
|
309
|
+
_focusedIndex = (_focusedIndex - 1 + count) % count;
|
|
310
|
+
updateFocus();
|
|
311
|
+
scrollFocusedIntoView();
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
else if (e.key === "Enter") {
|
|
315
|
+
e.preventDefault();
|
|
316
|
+
const cmd = cmds[_focusedIndex];
|
|
317
|
+
if (cmd)
|
|
318
|
+
cmd.action();
|
|
319
|
+
}
|
|
320
|
+
else if (e.key === "Escape") {
|
|
321
|
+
e.preventDefault();
|
|
322
|
+
closePalette();
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
const onDocKeyDown = (e) => {
|
|
326
|
+
if ((e.ctrlKey || e.metaKey) && e.key === "k") {
|
|
327
|
+
if (!_api)
|
|
328
|
+
return;
|
|
329
|
+
e.preventDefault();
|
|
330
|
+
if (_isOpen)
|
|
331
|
+
closePalette();
|
|
332
|
+
else
|
|
333
|
+
openPalette();
|
|
334
|
+
}
|
|
335
|
+
};
|
|
336
|
+
// ── Plugin ────────────────────────────────────────────────────────────────
|
|
337
|
+
return {
|
|
338
|
+
name: "command-palette",
|
|
339
|
+
install(api) {
|
|
340
|
+
injectCommandPaletteStyles();
|
|
341
|
+
_api = api;
|
|
342
|
+
_unsubs.push(api.on("diagram:load", (defs) => {
|
|
343
|
+
_lastDefs = defs;
|
|
344
|
+
}));
|
|
345
|
+
document.addEventListener("keydown", onDocKeyDown);
|
|
346
|
+
},
|
|
347
|
+
uninstall() {
|
|
348
|
+
document.removeEventListener("keydown", onDocKeyDown);
|
|
349
|
+
if (_isOpen)
|
|
350
|
+
closePalette();
|
|
351
|
+
if (_isZenMode && _api) {
|
|
352
|
+
_api.container.classList.remove("bpmnkit-zen-mode");
|
|
353
|
+
const gridRects = _api.svg.querySelectorAll('rect[fill^="url(#bpmnkit-grid"]');
|
|
354
|
+
for (const rect of gridRects) {
|
|
355
|
+
rect.style.visibility = "";
|
|
356
|
+
}
|
|
357
|
+
options.onZenModeChange?.(false);
|
|
358
|
+
_isZenMode = false;
|
|
359
|
+
}
|
|
360
|
+
for (const off of _unsubs)
|
|
361
|
+
off();
|
|
362
|
+
_unsubs.length = 0;
|
|
363
|
+
_extraCommands.length = 0;
|
|
364
|
+
_api = null;
|
|
365
|
+
},
|
|
366
|
+
addCommands(cmds) {
|
|
367
|
+
_extraCommands.push(...cmds);
|
|
368
|
+
return () => {
|
|
369
|
+
for (const cmd of cmds) {
|
|
370
|
+
const idx = _extraCommands.findIndex((c) => c.id === cmd.id);
|
|
371
|
+
if (idx !== -1)
|
|
372
|
+
_extraCommands.splice(idx, 1);
|
|
373
|
+
}
|
|
374
|
+
};
|
|
375
|
+
},
|
|
376
|
+
};
|
|
377
|
+
}
|
|
378
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @bpmnkit/canvas-plugin-command-palette-editor — editor extension for the
|
|
3
|
+
* command palette plugin. Adds one command per BPMN element type.
|
|
4
|
+
*
|
|
5
|
+
* Must be used together with `@bpmnkit/canvas-plugin-command-palette`.
|
|
6
|
+
*
|
|
7
|
+
* ## Usage
|
|
8
|
+
* ```typescript
|
|
9
|
+
* import { createCommandPalettePlugin } from "@bpmnkit/canvas-plugin-command-palette";
|
|
10
|
+
* import { createCommandPaletteEditorPlugin } from "@bpmnkit/canvas-plugin-command-palette-editor";
|
|
11
|
+
*
|
|
12
|
+
* let editorRef: BpmnEditor | null = null;
|
|
13
|
+
* const palette = createCommandPalettePlugin({ ... });
|
|
14
|
+
* const paletteEditor = createCommandPaletteEditorPlugin(palette, (tool) => {
|
|
15
|
+
* editorRef?.setTool(tool);
|
|
16
|
+
* });
|
|
17
|
+
* const editor = new BpmnEditor({ container, xml, plugins: [palette, paletteEditor] });
|
|
18
|
+
* editorRef = editor;
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* @packageDocumentation
|
|
22
|
+
*/
|
|
23
|
+
import type { CanvasPlugin } from "@bpmnkit/canvas";
|
|
24
|
+
import type { CommandPalettePlugin } from "../command-palette/index.js";
|
|
25
|
+
/**
|
|
26
|
+
* Creates the editor command palette extension plugin.
|
|
27
|
+
*
|
|
28
|
+
* @param palette - The base command palette plugin returned by
|
|
29
|
+
* `createCommandPalettePlugin`. Commands are registered into it.
|
|
30
|
+
* @param setTool - Callback that activates an element creation tool on the
|
|
31
|
+
* editor (e.g. `editor.setTool`). May reference the editor lazily — it is
|
|
32
|
+
* only called when the user executes a command, well after construction.
|
|
33
|
+
*/
|
|
34
|
+
export declare function createCommandPaletteEditorPlugin(palette: CommandPalettePlugin, setTool: (tool: string) => void): CanvasPlugin;
|
|
35
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @bpmnkit/canvas-plugin-command-palette-editor — editor extension for the
|
|
3
|
+
* command palette plugin. Adds one command per BPMN element type.
|
|
4
|
+
*
|
|
5
|
+
* Must be used together with `@bpmnkit/canvas-plugin-command-palette`.
|
|
6
|
+
*
|
|
7
|
+
* ## Usage
|
|
8
|
+
* ```typescript
|
|
9
|
+
* import { createCommandPalettePlugin } from "@bpmnkit/canvas-plugin-command-palette";
|
|
10
|
+
* import { createCommandPaletteEditorPlugin } from "@bpmnkit/canvas-plugin-command-palette-editor";
|
|
11
|
+
*
|
|
12
|
+
* let editorRef: BpmnEditor | null = null;
|
|
13
|
+
* const palette = createCommandPalettePlugin({ ... });
|
|
14
|
+
* const paletteEditor = createCommandPaletteEditorPlugin(palette, (tool) => {
|
|
15
|
+
* editorRef?.setTool(tool);
|
|
16
|
+
* });
|
|
17
|
+
* const editor = new BpmnEditor({ container, xml, plugins: [palette, paletteEditor] });
|
|
18
|
+
* editorRef = editor;
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* @packageDocumentation
|
|
22
|
+
*/
|
|
23
|
+
import { ELEMENT_GROUPS, ELEMENT_TYPE_LABELS } from "@bpmnkit/editor";
|
|
24
|
+
// ── Element catalogue ─────────────────────────────────────────────────────────
|
|
25
|
+
const ELEMENT_COMMANDS = ELEMENT_GROUPS.flatMap((group) => group.types.map((type) => ({
|
|
26
|
+
type,
|
|
27
|
+
title: `Add ${ELEMENT_TYPE_LABELS[type]}`,
|
|
28
|
+
description: group.title,
|
|
29
|
+
})));
|
|
30
|
+
// ── Factory ───────────────────────────────────────────────────────────────────
|
|
31
|
+
/**
|
|
32
|
+
* Creates the editor command palette extension plugin.
|
|
33
|
+
*
|
|
34
|
+
* @param palette - The base command palette plugin returned by
|
|
35
|
+
* `createCommandPalettePlugin`. Commands are registered into it.
|
|
36
|
+
* @param setTool - Callback that activates an element creation tool on the
|
|
37
|
+
* editor (e.g. `editor.setTool`). May reference the editor lazily — it is
|
|
38
|
+
* only called when the user executes a command, well after construction.
|
|
39
|
+
*/
|
|
40
|
+
export function createCommandPaletteEditorPlugin(palette, setTool) {
|
|
41
|
+
let _deregister = null;
|
|
42
|
+
return {
|
|
43
|
+
name: "command-palette-editor",
|
|
44
|
+
install(_api) {
|
|
45
|
+
_deregister = palette.addCommands(ELEMENT_COMMANDS.map((cmd) => ({
|
|
46
|
+
id: `create:${cmd.type}`,
|
|
47
|
+
title: cmd.title,
|
|
48
|
+
description: cmd.description,
|
|
49
|
+
action() {
|
|
50
|
+
setTool(`create:${cmd.type}`);
|
|
51
|
+
},
|
|
52
|
+
})));
|
|
53
|
+
},
|
|
54
|
+
uninstall() {
|
|
55
|
+
_deregister?.();
|
|
56
|
+
_deregister = null;
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const CONFIG_PANEL_STYLE_ID = "bpmnkit-config-panel-styles-v1";
|
|
2
|
+
export declare const CONFIG_PANEL_CSS = "\n/* \u2500\u2500 Inspector panel \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n/*\n * top: 36px matches the height of the .bpmnkit-tabs bar from canvas-plugin-tabs,\n * so the inspector panel does not overlap the tab bar.\n */\n.bpmnkit-cfg-full {\n position: fixed;\n right: 0;\n top: 36px;\n bottom: 0;\n width: 320px;\n background: var(--bpmnkit-panel-bg, rgba(13,13,22,0.92));\n backdrop-filter: blur(16px);\n border-left: 1px solid var(--bpmnkit-panel-border, rgba(255,255,255,0.08));\n box-shadow: -8px 0 40px rgba(0,0,0,0.6);\n display: flex;\n flex-direction: column;\n font-family: system-ui, -apple-system, sans-serif;\n font-size: 13px;\n color: rgba(255,255,255,0.85);\n z-index: 9999;\n transition: width 0.2s ease;\n}\n.bpmnkit-cfg-full--collapsed {\n width: 40px;\n}\n.bpmnkit-cfg-full--collapsed .bpmnkit-cfg-full-info,\n.bpmnkit-cfg-full--collapsed .bpmnkit-cfg-full-close,\n.bpmnkit-cfg-full--collapsed .bpmnkit-cfg-docs-link,\n.bpmnkit-cfg-full--collapsed .bpmnkit-cfg-search-bar,\n.bpmnkit-cfg-full--collapsed .bpmnkit-cfg-guide-bar,\n.bpmnkit-cfg-full--collapsed .bpmnkit-cfg-tabs-area,\n.bpmnkit-cfg-full--collapsed .bpmnkit-cfg-full-body,\n.bpmnkit-cfg-full--collapsed .bpmnkit-cfg-search-results {\n display: none;\n}\n.bpmnkit-cfg-full--collapsed .bpmnkit-cfg-full-header {\n justify-content: center;\n padding: 14px 0;\n}\n\n/* Hosted mode \u2014 renders inside a dock pane instead of as a fixed overlay */\n.bpmnkit-cfg-full--hosted {\n position: static !important;\n width: auto !important;\n top: auto; right: auto; bottom: auto;\n box-shadow: none; border-left: none; backdrop-filter: none;\n flex: 1; min-height: 0;\n}\n/* suppress controls that the dock replaces */\n.bpmnkit-cfg-full--hosted .bpmnkit-cfg-resize-handle,\n.bpmnkit-cfg-full--hosted .bpmnkit-cfg-collapse-btn { display: none; }\n\n/* Resize handle \u2014 a thin grab zone along the left edge */\n.bpmnkit-cfg-resize-handle {\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n width: 5px;\n cursor: ew-resize;\n z-index: 1;\n}\n.bpmnkit-cfg-resize-handle:hover {\n background: var(--bpmnkit-accent-subtle, rgba(107,157,247,0.15));\n}\n\n/* \u2500\u2500 Header \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.bpmnkit-cfg-full-header {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 12px 14px 10px;\n border-bottom: 1px solid rgba(255,255,255,0.08);\n flex-shrink: 0;\n}\n.bpmnkit-cfg-full-info {\n flex: 1;\n min-width: 0;\n}\n.bpmnkit-cfg-full-type {\n font-size: 10px;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: 0.08em;\n color: rgba(255,255,255,0.35);\n margin-bottom: 2px;\n}\n.bpmnkit-cfg-full-template {\n font-size: 11px;\n font-weight: 600;\n color: var(--bpmnkit-accent, #6b9df7);\n margin-bottom: 1px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.bpmnkit-cfg-full-name {\n font-size: 14px;\n font-weight: 600;\n color: #fff;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n/* Docs link \u2014 ? button shown when the schema has a documentationRef */\n.bpmnkit-cfg-docs-link {\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 50%;\n border: 1px solid rgba(255,255,255,0.2);\n color: rgba(255,255,255,0.45);\n font-size: 11px;\n font-weight: 700;\n text-decoration: none;\n flex-shrink: 0;\n transition: border-color 0.1s, color 0.1s, background 0.1s;\n}\n.bpmnkit-cfg-docs-link:hover {\n color: var(--bpmnkit-accent, #6b9df7);\n border-color: var(--bpmnkit-accent, #6b9df7);\n background: var(--bpmnkit-accent-subtle, rgba(107,157,247,0.15));\n}\n.bpmnkit-cfg-collapse-btn {\n width: 28px;\n height: 28px;\n background: none;\n border: none;\n color: rgba(255,255,255,0.4);\n cursor: pointer;\n padding: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 6px;\n font-size: 18px;\n line-height: 1;\n flex-shrink: 0;\n transition: background 0.1s, color 0.1s;\n}\n.bpmnkit-cfg-collapse-btn:hover { background: rgba(255,255,255,0.08); color: #fff; }\n.bpmnkit-cfg-full-close {\n width: 28px;\n height: 28px;\n background: none;\n border: none;\n color: rgba(255,255,255,0.4);\n cursor: pointer;\n padding: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 6px;\n font-size: 20px;\n line-height: 1;\n flex-shrink: 0;\n transition: background 0.1s, color 0.1s;\n}\n.bpmnkit-cfg-full-close:hover { background: rgba(255,255,255,0.08); color: #fff; }\n\n/* \u2500\u2500 Search bar \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.bpmnkit-cfg-search-bar {\n display: flex;\n align-items: center;\n gap: 4px;\n padding: 8px 12px;\n border-bottom: 1px solid rgba(255,255,255,0.06);\n flex-shrink: 0;\n}\n.bpmnkit-cfg-search-input {\n flex: 1;\n height: 28px;\n padding: 0 8px;\n background: rgba(255,255,255,0.07);\n border: 1px solid rgba(255,255,255,0.1);\n border-radius: 5px;\n color: rgba(255,255,255,0.85);\n font-size: 12px;\n font-family: system-ui, -apple-system, sans-serif;\n outline: none;\n transition: border-color 0.15s, background 0.15s;\n box-sizing: border-box;\n}\n.bpmnkit-cfg-search-input::placeholder { color: rgba(255,255,255,0.28); }\n.bpmnkit-cfg-search-input:focus {\n border-color: var(--bpmnkit-accent, #6b9df7);\n background: rgba(255,255,255,0.1);\n}\n.bpmnkit-cfg-search-clear {\n width: 22px;\n height: 22px;\n background: none;\n border: none;\n color: rgba(255,255,255,0.35);\n cursor: pointer;\n padding: 0;\n /* display toggled via JS */\n align-items: center;\n justify-content: center;\n border-radius: 4px;\n font-size: 14px;\n flex-shrink: 0;\n transition: color 0.1s, background 0.1s;\n}\n.bpmnkit-cfg-search-clear:hover { color: #fff; background: rgba(255,255,255,0.08); }\n\n/* \u2500\u2500 Guide bar (field assistant) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.bpmnkit-cfg-guide-bar {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n padding: 7px 14px;\n background: rgba(248, 113, 113, 0.09);\n border-bottom: 1px solid rgba(248, 113, 113, 0.18);\n flex-shrink: 0;\n}\n.bpmnkit-cfg-guide-info {\n display: flex;\n align-items: center;\n gap: 6px;\n min-width: 0;\n}\n.bpmnkit-cfg-guide-icon {\n width: 16px;\n height: 16px;\n background: var(--bpmnkit-danger, #f87171);\n border-radius: 50%;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n font-size: 10px;\n font-weight: 800;\n color: #fff;\n flex-shrink: 0;\n line-height: 1;\n}\n.bpmnkit-cfg-guide-text {\n font-size: 11px;\n font-weight: 500;\n color: rgba(248, 113, 113, 0.9);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.bpmnkit-cfg-guide-btn {\n flex-shrink: 0;\n padding: 3px 10px;\n border-radius: 4px;\n border: 1px solid rgba(248, 113, 113, 0.4);\n background: rgba(248, 113, 113, 0.12);\n color: var(--bpmnkit-danger, #f87171);\n font-size: 11px;\n font-weight: 600;\n cursor: pointer;\n transition: background 0.1s, border-color 0.1s;\n white-space: nowrap;\n}\n.bpmnkit-cfg-guide-btn:hover {\n background: rgba(248, 113, 113, 0.22);\n border-color: rgba(248, 113, 113, 0.6);\n}\n\n/* \u2500\u2500 Search results \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.bpmnkit-cfg-search-results {\n flex: 1;\n overflow-y: auto;\n padding: 4px 22px 32px;\n scrollbar-width: thin;\n scrollbar-color: rgba(255,255,255,0.15) transparent;\n}\n.bpmnkit-cfg-search-group-label {\n font-size: 10px;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: 0.08em;\n color: rgba(255,255,255,0.3);\n margin: 16px 0 10px;\n padding-bottom: 5px;\n border-bottom: 1px solid rgba(255,255,255,0.06);\n}\n.bpmnkit-cfg-search-group-label:first-child { margin-top: 10px; }\n.bpmnkit-cfg-search-empty {\n font-size: 12px;\n color: rgba(255,255,255,0.3);\n text-align: center;\n padding: 28px 0;\n}\n\n/* \u2500\u2500 Tabs area (wrapper + scroll buttons) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.bpmnkit-cfg-tabs-area {\n display: flex;\n align-items: stretch;\n border-bottom: 1px solid rgba(255,255,255,0.08);\n flex-shrink: 0;\n overflow: hidden;\n}\n.bpmnkit-cfg-tabs {\n flex: 1;\n min-width: 0;\n display: flex;\n align-items: flex-end;\n overflow-x: auto;\n scrollbar-width: none;\n}\n.bpmnkit-cfg-tabs::-webkit-scrollbar { display: none; }\n.bpmnkit-cfg-tab-btn {\n padding: 10px 14px;\n background: none;\n border: none;\n border-bottom: 2px solid transparent;\n color: rgba(255,255,255,0.4);\n cursor: pointer;\n font-size: 12px;\n font-weight: 500;\n white-space: nowrap;\n transition: color 0.1s, border-color 0.1s;\n margin-bottom: -1px;\n flex-shrink: 0;\n}\n.bpmnkit-cfg-tab-btn:hover { color: rgba(255,255,255,0.75); }\n.bpmnkit-cfg-tab-btn.active { color: var(--bpmnkit-accent, #6b9df7); border-bottom-color: var(--bpmnkit-accent, #6b9df7); }\n/* Red dot shown after tab label when the group has required-empty fields */\n.bpmnkit-cfg-tab-btn.has-error::after {\n content: '';\n display: inline-block;\n width: 6px;\n height: 6px;\n border-radius: 50%;\n background: var(--bpmnkit-danger, #f87171);\n margin-left: 5px;\n vertical-align: middle;\n flex-shrink: 0;\n}\n\n/* Arrow buttons for overflowing tabs */\n.bpmnkit-cfg-tabs-scroll-btn {\n flex-shrink: 0;\n width: 26px;\n background: none;\n border: none;\n border-radius: 0;\n color: rgba(255,255,255,0.5);\n cursor: pointer;\n font-size: 16px;\n line-height: 1;\n padding: 0;\n /* display toggled via JS */\n align-items: center;\n justify-content: center;\n transition: background 0.1s, color 0.1s;\n}\n.bpmnkit-cfg-tabs-scroll-btn:hover { color: #fff; background: rgba(255,255,255,0.08); }\n.bpmnkit-cfg-tabs-scroll-btn--prev { border-right: 1px solid rgba(255,255,255,0.06); }\n.bpmnkit-cfg-tabs-scroll-btn--next { border-left: 1px solid rgba(255,255,255,0.06); }\n\n/* \u2500\u2500 Scrollable body \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.bpmnkit-cfg-full-body {\n flex: 1;\n overflow-y: auto;\n padding: 22px 22px 32px;\n scrollbar-width: thin;\n scrollbar-color: rgba(255,255,255,0.15) transparent;\n}\n\n/* \u2500\u2500 Groups & Fields \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.bpmnkit-cfg-group-label {\n font-size: 10px;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: 0.08em;\n color: rgba(255,255,255,0.3);\n margin-bottom: 14px;\n padding-bottom: 6px;\n border-bottom: 1px solid rgba(255,255,255,0.06);\n}\n.bpmnkit-cfg-field {\n margin-bottom: 14px;\n}\n.bpmnkit-cfg-field-label {\n display: flex;\n align-items: center;\n gap: 6px;\n font-size: 12px;\n font-weight: 500;\n color: rgba(255,255,255,0.55);\n margin-bottom: 5px;\n cursor: default;\n}\n.bpmnkit-cfg-field-label[title] { cursor: help; }\n.bpmnkit-cfg-field-docs {\n font-size: 10px;\n color: var(--bpmnkit-accent, #6b9df7);\n text-decoration: none;\n opacity: 0.7;\n transition: opacity 0.1s;\n}\n.bpmnkit-cfg-field-docs:hover { opacity: 1; }\n.bpmnkit-cfg-required-star {\n color: var(--bpmnkit-danger, #f87171);\n font-weight: 700;\n margin-left: 2px;\n}\n.bpmnkit-cfg-field--invalid {\n border-left: 2px solid var(--bpmnkit-danger, #f87171);\n padding-left: 8px;\n}\n.bpmnkit-cfg-field--invalid .bpmnkit-cfg-input,\n.bpmnkit-cfg-field--invalid .bpmnkit-cfg-select,\n.bpmnkit-cfg-field--invalid .bpmnkit-cfg-textarea {\n border-color: var(--bpmnkit-danger, #f87171);\n}\n\n.bpmnkit-cfg-input,\n.bpmnkit-cfg-select,\n.bpmnkit-cfg-textarea {\n width: 100%;\n padding: 7px 10px;\n background: rgba(255,255,255,0.06);\n border: 1px solid rgba(255,255,255,0.1);\n border-radius: 6px;\n color: rgba(255,255,255,0.9);\n font-size: 12px;\n font-family: system-ui, -apple-system, sans-serif;\n outline: none;\n transition: border-color 0.15s, background 0.15s;\n box-sizing: border-box;\n}\n.bpmnkit-cfg-input:focus,\n.bpmnkit-cfg-select:focus,\n.bpmnkit-cfg-textarea:focus {\n border-color: var(--bpmnkit-accent, #6b9df7);\n background-color: rgba(255,255,255,0.09);\n}\n.bpmnkit-cfg-select {\n appearance: none;\n cursor: pointer;\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6' fill='none' stroke='rgba(255,255,255,0.4)' stroke-width='1.5'/%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n background-position: right 10px center;\n padding-right: 28px;\n}\n.bpmnkit-cfg-textarea {\n resize: vertical;\n min-height: 68px;\n line-height: 1.5;\n font-family: var(--bpmnkit-font-mono, ui-monospace, \"SF Mono\", monospace);\n font-size: 11px;\n}\n.bpmnkit-cfg-field-hint {\n font-size: 11px;\n color: rgba(255,255,255,0.3);\n margin-top: 4px;\n line-height: 1.4;\n}\n\n/* \u2500\u2500 Field error message \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.bpmnkit-cfg-field-error {\n font-size: 11px;\n color: var(--bpmnkit-danger, #f87171);\n margin-top: 3px;\n line-height: 1.3;\n}\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cfg-field-error { color: var(--bpmnkit-danger, #dc2626); }\n\n/* \u2500\u2500 FEEL expression field \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n/* FEEL/string mode toggle \u2014 appears at the right end of a feel-expression label row */\n.bpmnkit-cfg-feel-mode-btn {\n margin-left: auto;\n flex-shrink: 0;\n padding: 1px 6px;\n border-radius: 3px;\n border: 1px solid rgba(255,255,255,0.12);\n background: none;\n color: rgba(255,255,255,0.3);\n font-size: 10px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.05em;\n cursor: pointer;\n transition: background 0.1s, color 0.1s, border-color 0.1s;\n}\n.bpmnkit-cfg-feel-mode-btn:hover {\n background: rgba(255,255,255,0.06);\n color: rgba(255,255,255,0.55);\n}\n.bpmnkit-cfg-feel-mode-btn--active {\n border-color: var(--bpmnkit-accent-subtle, rgba(107,157,247,0.15));\n background: var(--bpmnkit-accent-subtle, rgba(107,157,247,0.15));\n color: var(--bpmnkit-accent, #6b9df7);\n}\n.bpmnkit-cfg-feel-mode-btn--active:hover { background: var(--bpmnkit-accent-subtle, rgba(107,157,247,0.15)); }\n\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cfg-feel-mode-btn {\n border-color: rgba(0,0,0,0.12);\n color: rgba(0,0,0,0.3);\n}\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cfg-feel-mode-btn:hover {\n background: rgba(0,0,0,0.05);\n color: rgba(0,0,0,0.55);\n}\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cfg-feel-mode-btn--active {\n border-color: var(--bpmnkit-accent-subtle, rgba(26,86,219,0.12));\n background: var(--bpmnkit-accent-subtle, rgba(26,86,219,0.12));\n color: var(--bpmnkit-accent, #1a56db);\n}\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cfg-feel-mode-btn--active:hover { background: var(--bpmnkit-accent-subtle, rgba(26,86,219,0.12)); }\n\n.bpmnkit-cfg-feel-ta {\n width: 100%;\n min-height: 68px;\n padding: 7px 10px;\n border: 1px solid rgba(255,255,255,0.1);\n border-radius: 6px;\n font-size: 11px;\n font-family: var(--bpmnkit-font-mono, ui-monospace, \"SF Mono\", monospace);\n line-height: 1.5;\n resize: vertical;\n outline: none;\n transition: border-color 0.15s;\n box-sizing: border-box;\n}\n\n.bpmnkit-cfg-feel-playground-btn {\n display: inline-flex;\n margin-top: 4px;\n padding: 3px 8px;\n border-radius: 4px;\n border: 1px solid rgba(255,255,255,0.12);\n background: none;\n color: var(--bpmnkit-accent, #6b9df7);\n font-size: 11px;\n cursor: pointer;\n transition: background 0.1s;\n}\n.bpmnkit-cfg-feel-playground-btn:hover { background: var(--bpmnkit-accent-subtle, rgba(107,157,247,0.15)); }\n\n/* Light theme overrides */\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cfg-feel-playground-btn {\n border-color: rgba(0,0,0,0.12);\n color: var(--bpmnkit-accent, #1a56db);\n}\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cfg-feel-playground-btn:hover { background: var(--bpmnkit-accent-subtle, rgba(26,86,219,0.12)); }\n\n/* \u2500\u2500 Toggle \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.bpmnkit-cfg-toggle-row {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n.bpmnkit-cfg-toggle-label {\n font-size: 12px;\n color: rgba(255,255,255,0.7);\n cursor: pointer;\n}\n.bpmnkit-cfg-toggle-label[title] { cursor: help; }\n.bpmnkit-cfg-toggle {\n position: relative;\n display: inline-flex;\n width: 34px;\n height: 18px;\n flex-shrink: 0;\n cursor: pointer;\n}\n.bpmnkit-cfg-toggle input {\n opacity: 0;\n width: 0;\n height: 0;\n position: absolute;\n}\n.bpmnkit-cfg-toggle-track {\n position: absolute;\n inset: 0;\n background: rgba(255,255,255,0.15);\n border-radius: 9px;\n transition: background 0.2s;\n}\n.bpmnkit-cfg-toggle input:checked + .bpmnkit-cfg-toggle-track { background: var(--bpmnkit-accent, #6b9df7); }\n.bpmnkit-cfg-toggle-thumb {\n position: absolute;\n top: 2px;\n left: 2px;\n width: 14px;\n height: 14px;\n background: #fff;\n border-radius: 50%;\n transition: transform 0.2s;\n pointer-events: none;\n}\n.bpmnkit-cfg-toggle input:checked ~ .bpmnkit-cfg-toggle-thumb { transform: translateX(16px); }\n\n/* \u2500\u2500 Action button \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.bpmnkit-cfg-action-btn {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 5px 12px;\n border-radius: 4px;\n border: 1px solid rgba(255,255,255,0.15);\n background: rgba(255,255,255,0.07);\n color: rgba(255,255,255,0.85);\n font-size: 12px;\n cursor: pointer;\n transition: background 0.15s;\n}\n.bpmnkit-cfg-action-btn:hover {\n background: rgba(255,255,255,0.13);\n border-color: rgba(255,255,255,0.25);\n}\n\n/* \u2500\u2500 Light theme overrides \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cfg-full {\n background: var(--bpmnkit-panel-bg, rgba(255,255,255,0.92));\n border-left-color: var(--bpmnkit-panel-border, rgba(0,0,0,0.08));\n box-shadow: -8px 0 40px rgba(0,0,0,0.12);\n color: rgba(0,0,0,0.85);\n}\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cfg-full-header { border-bottom-color: rgba(0,0,0,0.07); }\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cfg-full-type { color: rgba(0,0,0,0.35); }\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cfg-full-template { color: var(--bpmnkit-accent, #1a56db); }\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cfg-full-name { color: rgba(0,0,0,0.9); }\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cfg-docs-link { color: rgba(0,0,0,0.4); border-color: rgba(0,0,0,0.2); }\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cfg-docs-link:hover { color: var(--bpmnkit-accent, #1a56db); border-color: var(--bpmnkit-accent, #1a56db); background: var(--bpmnkit-accent-subtle, rgba(26,86,219,0.12)); }\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cfg-collapse-btn { color: rgba(0,0,0,0.4); }\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cfg-collapse-btn:hover { background: rgba(0,0,0,0.06); color: rgba(0,0,0,0.9); }\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cfg-full-close { color: rgba(0,0,0,0.4); }\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cfg-full-close:hover { background: rgba(0,0,0,0.06); color: rgba(0,0,0,0.9); }\n\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cfg-search-bar { border-bottom-color: rgba(0,0,0,0.06); }\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cfg-search-input {\n background: rgba(0,0,0,0.04);\n border-color: rgba(0,0,0,0.12);\n color: rgba(0,0,0,0.85);\n}\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cfg-search-input::placeholder { color: rgba(0,0,0,0.3); }\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cfg-search-clear { color: rgba(0,0,0,0.35); }\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cfg-search-clear:hover { color: rgba(0,0,0,0.9); background: rgba(0,0,0,0.06); }\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cfg-search-results { scrollbar-color: rgba(0,0,0,0.15) transparent; }\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cfg-search-group-label { color: rgba(0,0,0,0.35); border-bottom-color: rgba(0,0,0,0.06); }\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cfg-search-empty { color: rgba(0,0,0,0.35); }\n\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cfg-tabs-area { border-bottom-color: rgba(0,0,0,0.07); }\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cfg-tab-btn { color: rgba(0,0,0,0.4); }\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cfg-tab-btn:hover { color: rgba(0,0,0,0.7); }\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cfg-tabs-scroll-btn { color: rgba(0,0,0,0.4); }\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cfg-tabs-scroll-btn:hover { color: rgba(0,0,0,0.9); background: rgba(0,0,0,0.06); }\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cfg-tabs-scroll-btn--prev { border-right-color: rgba(0,0,0,0.06); }\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cfg-tabs-scroll-btn--next { border-left-color: rgba(0,0,0,0.06); }\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cfg-full-body { scrollbar-color: rgba(0,0,0,0.15) transparent; }\n\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cfg-group-label {\n color: rgba(0,0,0,0.35);\n border-bottom-color: rgba(0,0,0,0.06);\n}\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cfg-field-label { color: rgba(0,0,0,0.55); }\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cfg-field-hint { color: rgba(0,0,0,0.4); }\n\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cfg-input,\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cfg-select,\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cfg-textarea {\n background-color: rgba(0,0,0,0.04);\n border-color: rgba(0,0,0,0.12);\n color: rgba(0,0,0,0.85);\n}\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cfg-input:focus,\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cfg-select:focus,\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cfg-textarea:focus {\n background-color: rgba(0,0,0,0.06);\n}\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cfg-select {\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6' fill='none' stroke='rgba(0,0,0,0.45)' stroke-width='1.5'/%3E%3C/svg%3E\");\n}\n\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cfg-toggle-label { color: rgba(0,0,0,0.7); }\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cfg-toggle-track { background: rgba(0,0,0,0.12); }\n\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cfg-action-btn {\n border-color: rgba(0,0,0,0.15);\n background: rgba(0,0,0,0.04);\n color: rgba(0,0,0,0.75);\n}\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cfg-action-btn:hover {\n background: rgba(0,0,0,0.08);\n border-color: rgba(0,0,0,0.2);\n}\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cfg-resize-handle:hover {\n background: var(--bpmnkit-accent-subtle, rgba(26,86,219,0.12));\n}\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cfg-guide-bar {\n background: rgba(248, 113, 113, 0.06);\n border-bottom-color: rgba(248, 113, 113, 0.15);\n}\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cfg-guide-text { color: var(--bpmnkit-danger, #dc2626); }\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cfg-guide-btn {\n color: var(--bpmnkit-danger, #dc2626);\n border-color: rgba(220, 38, 38, 0.3);\n background: rgba(220, 38, 38, 0.07);\n}\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cfg-guide-btn:hover {\n background: rgba(220, 38, 38, 0.14);\n border-color: rgba(220, 38, 38, 0.5);\n}\n";
|
|
3
|
+
export declare function injectConfigPanelStyles(): void;
|
|
4
|
+
//# sourceMappingURL=css.d.ts.map
|