@bpmnkit/plugins 0.0.11 → 0.0.12
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 +5 -1
- package/dist/ai-bridge/index.d.ts +2 -0
- package/dist/ai-bridge/index.js +5 -0
- package/dist/ai-bridge/panel.d.ts +1 -0
- package/dist/ai-bridge/panel.js +8 -1
- package/dist/command-palette/css.d.ts +1 -1
- package/dist/command-palette/css.js +69 -0
- package/dist/command-palette/index.d.ts +29 -0
- package/dist/command-palette/index.js +382 -52
- package/dist/command-palette-editor/index.d.ts +15 -10
- package/dist/command-palette-editor/index.js +96 -12
- package/dist/main-menu/css.d.ts +1 -1
- package/dist/main-menu/css.js +31 -0
- package/dist/main-menu/index.js +2 -0
- package/dist/tabs/css.js +67 -0
- package/dist/tabs/tabs-plugin.js +10 -8
- package/dist/token-highlight/css.js +4 -0
- package/dist/token-highlight/index.js +56 -15
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<div align="center">
|
|
2
|
-
<img src="https://
|
|
2
|
+
<a href="https://bpmnkit.com"><img src="https://bpmnkit.com/favicon.svg" width="72" height="72" alt="BPMN Kit logo"></a>
|
|
3
3
|
<h1>@bpmnkit/plugins</h1>
|
|
4
4
|
<p>22 composable canvas plugins — minimap, AI chat, process simulation, storage, and more</p>
|
|
5
5
|
|
|
@@ -155,3 +155,7 @@ const ai = createAiBridgePlugin({
|
|
|
155
155
|
## License
|
|
156
156
|
|
|
157
157
|
[MIT](https://github.com/bpmnkit/monorepo/blob/main/LICENSE) © BPMN Kit — made by [u11g](https://u11g.com)
|
|
158
|
+
|
|
159
|
+
<div align="center">
|
|
160
|
+
<a href="https://bpmnkit.com"><img src="https://bpmnkit.com/favicon.svg" width="32" height="32" alt="BPMN Kit"></a>
|
|
161
|
+
</div>
|
|
@@ -40,5 +40,7 @@ export declare function createAiBridgePlugin(options: AiBridgePluginOptions): {
|
|
|
40
40
|
openPanel(): void;
|
|
41
41
|
/** Set the node context shown as a badge above the chat input. Pass null to clear. */
|
|
42
42
|
setContext(node: NodeContext | null): void;
|
|
43
|
+
/** Open the AI panel, pre-fill `prompt`, and submit it immediately. */
|
|
44
|
+
ask(prompt: string): void;
|
|
43
45
|
};
|
|
44
46
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/ai-bridge/index.js
CHANGED
|
@@ -121,12 +121,17 @@ export function createAiBridgePlugin(options) {
|
|
|
121
121
|
setContext(findElementById(options.getDefinitions(), id));
|
|
122
122
|
});
|
|
123
123
|
}
|
|
124
|
+
function ask(prompt) {
|
|
125
|
+
openPanel();
|
|
126
|
+
getOrCreatePanel().submit(prompt);
|
|
127
|
+
}
|
|
124
128
|
return {
|
|
125
129
|
name: "ai-bridge",
|
|
126
130
|
install,
|
|
127
131
|
button,
|
|
128
132
|
openPanel,
|
|
129
133
|
setContext,
|
|
134
|
+
ask,
|
|
130
135
|
};
|
|
131
136
|
}
|
|
132
137
|
//# sourceMappingURL=index.js.map
|
package/dist/ai-bridge/panel.js
CHANGED
|
@@ -709,7 +709,14 @@ export function createAiPanel(options) {
|
|
|
709
709
|
function close() {
|
|
710
710
|
panel.classList.remove("ai-panel-open");
|
|
711
711
|
}
|
|
712
|
-
|
|
712
|
+
/** Open the panel, pre-fill the given prompt, and submit it immediately. */
|
|
713
|
+
function submit(prompt) {
|
|
714
|
+
open();
|
|
715
|
+
textarea.value = prompt;
|
|
716
|
+
autoGrow();
|
|
717
|
+
void send();
|
|
718
|
+
}
|
|
719
|
+
return { panel, open, close, setContext, submit };
|
|
713
720
|
}
|
|
714
721
|
export { DEFAULT_SERVER };
|
|
715
722
|
//# sourceMappingURL=panel.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const COMMAND_PALETTE_STYLE_ID = "bpmnkit-command-palette-styles-v1";
|
|
2
|
-
export declare const COMMAND_PALETTE_CSS = "\n/* \u2500\u2500 Overlay backdrop \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\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-palette-overlay {\n position: fixed;\n inset: 0;\n background: rgba(0, 0, 0, 0.45);\n backdrop-filter: blur(3px);\n z-index: 9999;\n display: flex;\n align-items: flex-start;\n justify-content: center;\n padding-top: 15vh;\n font-family: system-ui, -apple-system, sans-serif;\n}\n\n/* \u2500\u2500 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\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.bpmnkit-palette-panel {\n width: min(560px, calc(100vw - 32px));\n background: var(--bpmnkit-panel-bg, rgba(13,13,22,0.92));\n border: 1px solid var(--bpmnkit-panel-border, rgba(255,255,255,0.08));\n border-radius: 12px;\n box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);\n overflow: hidden;\n display: flex;\n flex-direction: column;\n}\n\n/* \u2500\u2500 Search row \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\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-palette-search {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 0 16px;\n border-bottom: 1px solid rgba(255, 255, 255, 0.08);\n flex-shrink: 0;\n}\n.bpmnkit-palette-search-icon {\n display: flex;\n align-items: center;\n width: 16px;\n height: 16px;\n flex-shrink: 0;\n color: rgba(255, 255, 255, 0.35);\n pointer-events: none;\n}\n.bpmnkit-palette-search-icon svg { width: 16px; height: 16px; }\n.bpmnkit-palette-input {\n flex: 1;\n height: 48px;\n background: transparent;\n border: none;\n outline: none;\n color: rgba(255, 255, 255, 0.9);\n font-size: 14px;\n caret-color: var(--bpmnkit-accent, #6b9df7);\n}\n.bpmnkit-palette-input::placeholder { color: rgba(255, 255, 255, 0.3); }\n\n/* \u2500\u2500 Keyboard hint \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\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-palette-kbd {\n display: flex;\n align-items: center;\n gap: 3px;\n flex-shrink: 0;\n}\n.bpmnkit-palette-kbd kbd {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n padding: 2px 5px;\n background: rgba(255, 255, 255, 0.07);\n border: 1px solid rgba(255, 255, 255, 0.12);\n border-radius: 4px;\n font-family: system-ui, sans-serif;\n font-size: 11px;\n color: rgba(255, 255, 255, 0.4);\n line-height: 1;\n}\n\n/* \u2500\u2500 Commands list \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\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-palette-list {\n max-height: 360px;\n overflow-y: auto;\n padding: 4px;\n}\n.bpmnkit-palette-empty {\n padding: 20px 16px;\n text-align: center;\n color: rgba(255, 255, 255, 0.3);\n font-size: 13px;\n}\n.bpmnkit-palette-item {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 9px 12px;\n border-radius: 7px;\n cursor: pointer;\n color: rgba(255, 255, 255, 0.75);\n font-size: 13px;\n user-select: none;\n}\n.bpmnkit-palette-item:hover,\n.bpmnkit-palette-item.bpmnkit-palette-focused {\n background: rgba(255, 255, 255, 0.08);\n color: rgba(255, 255, 255, 0.95);\n}\n.bpmnkit-palette-item-title { flex: 1; }\n.bpmnkit-palette-item-desc {\n font-size: 11px;\n color: rgba(255, 255, 255, 0.35);\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.bpmnkit-palette--light .bpmnkit-palette-panel {\n background: rgba(250, 250, 252, 0.98);\n border-color: var(--bpmnkit-panel-border, rgba(0, 0, 0, 0.08));\n box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);\n}\n.bpmnkit-palette--light .bpmnkit-palette-search {\n border-bottom-color: var(--bpmnkit-panel-border, rgba(0, 0, 0, 0.08));\n}\n.bpmnkit-palette--light .bpmnkit-palette-search-icon { color: rgba(0, 0, 0, 0.35); }\n.bpmnkit-palette--light .bpmnkit-palette-input { color: rgba(0, 0, 0, 0.9); caret-color: var(--bpmnkit-accent, #1a56db); }\n.bpmnkit-palette--light .bpmnkit-palette-input::placeholder { color: rgba(0, 0, 0, 0.3); }\n.bpmnkit-palette--light .bpmnkit-palette-kbd kbd {\n background: rgba(0, 0, 0, 0.05);\n border-color: rgba(0, 0, 0, 0.12);\n color: rgba(0, 0, 0, 0.4);\n}\n.bpmnkit-palette--light .bpmnkit-palette-empty { color: rgba(0, 0, 0, 0.3); }\n.bpmnkit-palette--light .bpmnkit-palette-item { color: rgba(0, 0, 0, 0.75); }\n.bpmnkit-palette--light .bpmnkit-palette-item:hover,\n.bpmnkit-palette--light .bpmnkit-palette-item.bpmnkit-palette-focused {\n background: rgba(0, 0, 0, 0.06);\n color: rgba(0, 0, 0, 0.95);\n}\n.bpmnkit-palette--light .bpmnkit-palette-item-desc { color: rgba(0, 0, 0, 0.4); }\n\n/* \u2500\u2500 Zen mode: hide internal canvas controls \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\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-zen-mode .bpmnkit-zoom-controls,\n.bpmnkit-zen-mode .bpmnkit-main-menu-panel {\n display: none !important;\n}\n";
|
|
2
|
+
export declare const COMMAND_PALETTE_CSS = "\n/* \u2500\u2500 Overlay backdrop \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\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-palette-overlay {\n position: fixed;\n inset: 0;\n background: rgba(0, 0, 0, 0.45);\n backdrop-filter: blur(3px);\n z-index: 9999;\n display: flex;\n align-items: flex-start;\n justify-content: center;\n padding-top: 15vh;\n font-family: system-ui, -apple-system, sans-serif;\n}\n\n/* \u2500\u2500 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\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.bpmnkit-palette-panel {\n width: min(560px, calc(100vw - 32px));\n background: var(--bpmnkit-panel-bg, rgba(13,13,22,0.92));\n border: 1px solid var(--bpmnkit-panel-border, rgba(255,255,255,0.08));\n border-radius: 12px;\n box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);\n overflow: hidden;\n display: flex;\n flex-direction: column;\n}\n\n/* \u2500\u2500 Search row \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\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-palette-search {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 0 16px;\n border-bottom: 1px solid rgba(255, 255, 255, 0.08);\n flex-shrink: 0;\n}\n.bpmnkit-palette-search-icon {\n display: flex;\n align-items: center;\n width: 16px;\n height: 16px;\n flex-shrink: 0;\n color: rgba(255, 255, 255, 0.35);\n pointer-events: none;\n}\n.bpmnkit-palette-search-icon svg { width: 16px; height: 16px; }\n.bpmnkit-palette-input {\n flex: 1;\n height: 48px;\n background: transparent;\n border: none;\n outline: none;\n color: rgba(255, 255, 255, 0.9);\n font-size: 14px;\n caret-color: var(--bpmnkit-accent, #6b9df7);\n}\n.bpmnkit-palette-input::placeholder { color: rgba(255, 255, 255, 0.3); }\n\n/* \u2500\u2500 Keyboard hint \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\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-palette-kbd {\n display: flex;\n align-items: center;\n gap: 3px;\n flex-shrink: 0;\n}\n.bpmnkit-palette-kbd kbd {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n padding: 2px 5px;\n background: rgba(255, 255, 255, 0.07);\n border: 1px solid rgba(255, 255, 255, 0.12);\n border-radius: 4px;\n font-family: system-ui, sans-serif;\n font-size: 11px;\n color: rgba(255, 255, 255, 0.4);\n line-height: 1;\n}\n\n/* \u2500\u2500 Commands list \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\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-palette-list {\n max-height: 360px;\n overflow-y: auto;\n padding: 4px;\n}\n.bpmnkit-palette-empty {\n padding: 20px 16px;\n text-align: center;\n color: rgba(255, 255, 255, 0.3);\n font-size: 13px;\n}\n.bpmnkit-palette-item {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 9px 12px;\n border-radius: 7px;\n cursor: pointer;\n color: rgba(255, 255, 255, 0.75);\n font-size: 13px;\n user-select: none;\n}\n.bpmnkit-palette-item:hover,\n.bpmnkit-palette-item.bpmnkit-palette-focused {\n background: rgba(255, 255, 255, 0.08);\n color: rgba(255, 255, 255, 0.95);\n}\n.bpmnkit-palette-item-title { flex: 1; }\n.bpmnkit-palette-item-desc {\n font-size: 11px;\n color: rgba(255, 255, 255, 0.35);\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.bpmnkit-palette--light .bpmnkit-palette-panel {\n background: rgba(250, 250, 252, 0.98);\n border-color: var(--bpmnkit-panel-border, rgba(0, 0, 0, 0.08));\n box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);\n}\n.bpmnkit-palette--light .bpmnkit-palette-search {\n border-bottom-color: var(--bpmnkit-panel-border, rgba(0, 0, 0, 0.08));\n}\n.bpmnkit-palette--light .bpmnkit-palette-search-icon { color: rgba(0, 0, 0, 0.35); }\n.bpmnkit-palette--light .bpmnkit-palette-input { color: rgba(0, 0, 0, 0.9); caret-color: var(--bpmnkit-accent, #1a56db); }\n.bpmnkit-palette--light .bpmnkit-palette-input::placeholder { color: rgba(0, 0, 0, 0.3); }\n.bpmnkit-palette--light .bpmnkit-palette-kbd kbd {\n background: rgba(0, 0, 0, 0.05);\n border-color: rgba(0, 0, 0, 0.12);\n color: rgba(0, 0, 0, 0.4);\n}\n.bpmnkit-palette--light .bpmnkit-palette-empty { color: rgba(0, 0, 0, 0.3); }\n.bpmnkit-palette--light .bpmnkit-palette-item { color: rgba(0, 0, 0, 0.75); }\n.bpmnkit-palette--light .bpmnkit-palette-item:hover,\n.bpmnkit-palette--light .bpmnkit-palette-item.bpmnkit-palette-focused {\n background: rgba(0, 0, 0, 0.06);\n color: rgba(0, 0, 0, 0.95);\n}\n.bpmnkit-palette--light .bpmnkit-palette-item-desc { color: rgba(0, 0, 0, 0.4); }\n\n/* \u2500\u2500 Section labels \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\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-palette-section {\n padding: 6px 12px 3px;\n font-size: 10px;\n font-weight: 600;\n letter-spacing: 0.06em;\n text-transform: uppercase;\n color: rgba(255, 255, 255, 0.28);\n user-select: none;\n}\n\n/* \u2500\u2500 Item leading icon (doc / ai) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\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-palette-item-icon {\n display: flex;\n align-items: center;\n flex-shrink: 0;\n width: 14px;\n height: 14px;\n opacity: 0.55;\n}\n.bpmnkit-palette-item-icon svg { width: 14px; height: 14px; }\n\n/* \u2500\u2500 Doc items \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\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-palette-item--doc .bpmnkit-palette-item-title {\n color: var(--bpmnkit-accent-bright, #89b4fa);\n}\n.bpmnkit-palette-item--doc:hover .bpmnkit-palette-item-icon,\n.bpmnkit-palette-item--doc.bpmnkit-palette-focused .bpmnkit-palette-item-icon {\n opacity: 0.85;\n}\n\n/* \u2500\u2500 AI item \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\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-palette-item--ai .bpmnkit-palette-item-icon {\n color: var(--bpmnkit-accent, #6b9df7);\n opacity: 0.8;\n}\n.bpmnkit-palette-item--ai .bpmnkit-palette-item-title {\n color: var(--bpmnkit-accent, #6b9df7);\n font-style: italic;\n}\n.bpmnkit-palette-item--ai:not(.bpmnkit-palette-item--disabled):hover .bpmnkit-palette-item-icon,\n.bpmnkit-palette-item--ai:not(.bpmnkit-palette-item--disabled).bpmnkit-palette-focused .bpmnkit-palette-item-icon {\n opacity: 1;\n}\n\n/* \u2500\u2500 Disabled items \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\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-palette-item--disabled {\n opacity: 0.45;\n cursor: default;\n}\n.bpmnkit-palette-item--disabled:hover,\n.bpmnkit-palette-item--disabled.bpmnkit-palette-focused {\n background: rgba(255, 255, 255, 0.04);\n}\n\n/* \u2500\u2500 Light overrides for new additions \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\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-palette--light .bpmnkit-palette-section { color: rgba(0, 0, 0, 0.3); }\n.bpmnkit-palette--light .bpmnkit-palette-item--doc .bpmnkit-palette-item-title {\n color: var(--bpmnkit-accent-bright, #3b82f6);\n}\n.bpmnkit-palette--light .bpmnkit-palette-item--ai .bpmnkit-palette-item-icon,\n.bpmnkit-palette--light .bpmnkit-palette-item--ai .bpmnkit-palette-item-title {\n color: var(--bpmnkit-accent, #1a56db);\n}\n.bpmnkit-palette--light .bpmnkit-palette-item--disabled:hover,\n.bpmnkit-palette--light .bpmnkit-palette-item--disabled.bpmnkit-palette-focused {\n background: rgba(0, 0, 0, 0.03);\n}\n\n/* \u2500\u2500 Zen mode: hide internal canvas controls \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\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-zen-mode .bpmnkit-zoom-controls,\n.bpmnkit-zen-mode .bpmnkit-main-menu-panel {\n display: none !important;\n}\n";
|
|
3
3
|
export declare function injectCommandPaletteStyles(): void;
|
|
4
4
|
//# sourceMappingURL=css.d.ts.map
|
|
@@ -138,6 +138,75 @@ export const COMMAND_PALETTE_CSS = `
|
|
|
138
138
|
}
|
|
139
139
|
.bpmnkit-palette--light .bpmnkit-palette-item-desc { color: rgba(0, 0, 0, 0.4); }
|
|
140
140
|
|
|
141
|
+
/* ── Section labels ───────────────────────────────────────────────────────── */
|
|
142
|
+
.bpmnkit-palette-section {
|
|
143
|
+
padding: 6px 12px 3px;
|
|
144
|
+
font-size: 10px;
|
|
145
|
+
font-weight: 600;
|
|
146
|
+
letter-spacing: 0.06em;
|
|
147
|
+
text-transform: uppercase;
|
|
148
|
+
color: rgba(255, 255, 255, 0.28);
|
|
149
|
+
user-select: none;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/* ── Item leading icon (doc / ai) ─────────────────────────────────────────── */
|
|
153
|
+
.bpmnkit-palette-item-icon {
|
|
154
|
+
display: flex;
|
|
155
|
+
align-items: center;
|
|
156
|
+
flex-shrink: 0;
|
|
157
|
+
width: 14px;
|
|
158
|
+
height: 14px;
|
|
159
|
+
opacity: 0.55;
|
|
160
|
+
}
|
|
161
|
+
.bpmnkit-palette-item-icon svg { width: 14px; height: 14px; }
|
|
162
|
+
|
|
163
|
+
/* ── Doc items ────────────────────────────────────────────────────────────── */
|
|
164
|
+
.bpmnkit-palette-item--doc .bpmnkit-palette-item-title {
|
|
165
|
+
color: var(--bpmnkit-accent-bright, #89b4fa);
|
|
166
|
+
}
|
|
167
|
+
.bpmnkit-palette-item--doc:hover .bpmnkit-palette-item-icon,
|
|
168
|
+
.bpmnkit-palette-item--doc.bpmnkit-palette-focused .bpmnkit-palette-item-icon {
|
|
169
|
+
opacity: 0.85;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/* ── AI item ──────────────────────────────────────────────────────────────── */
|
|
173
|
+
.bpmnkit-palette-item--ai .bpmnkit-palette-item-icon {
|
|
174
|
+
color: var(--bpmnkit-accent, #6b9df7);
|
|
175
|
+
opacity: 0.8;
|
|
176
|
+
}
|
|
177
|
+
.bpmnkit-palette-item--ai .bpmnkit-palette-item-title {
|
|
178
|
+
color: var(--bpmnkit-accent, #6b9df7);
|
|
179
|
+
font-style: italic;
|
|
180
|
+
}
|
|
181
|
+
.bpmnkit-palette-item--ai:not(.bpmnkit-palette-item--disabled):hover .bpmnkit-palette-item-icon,
|
|
182
|
+
.bpmnkit-palette-item--ai:not(.bpmnkit-palette-item--disabled).bpmnkit-palette-focused .bpmnkit-palette-item-icon {
|
|
183
|
+
opacity: 1;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/* ── Disabled items ───────────────────────────────────────────────────────── */
|
|
187
|
+
.bpmnkit-palette-item--disabled {
|
|
188
|
+
opacity: 0.45;
|
|
189
|
+
cursor: default;
|
|
190
|
+
}
|
|
191
|
+
.bpmnkit-palette-item--disabled:hover,
|
|
192
|
+
.bpmnkit-palette-item--disabled.bpmnkit-palette-focused {
|
|
193
|
+
background: rgba(255, 255, 255, 0.04);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/* ── Light overrides for new additions ───────────────────────────────────── */
|
|
197
|
+
.bpmnkit-palette--light .bpmnkit-palette-section { color: rgba(0, 0, 0, 0.3); }
|
|
198
|
+
.bpmnkit-palette--light .bpmnkit-palette-item--doc .bpmnkit-palette-item-title {
|
|
199
|
+
color: var(--bpmnkit-accent-bright, #3b82f6);
|
|
200
|
+
}
|
|
201
|
+
.bpmnkit-palette--light .bpmnkit-palette-item--ai .bpmnkit-palette-item-icon,
|
|
202
|
+
.bpmnkit-palette--light .bpmnkit-palette-item--ai .bpmnkit-palette-item-title {
|
|
203
|
+
color: var(--bpmnkit-accent, #1a56db);
|
|
204
|
+
}
|
|
205
|
+
.bpmnkit-palette--light .bpmnkit-palette-item--disabled:hover,
|
|
206
|
+
.bpmnkit-palette--light .bpmnkit-palette-item--disabled.bpmnkit-palette-focused {
|
|
207
|
+
background: rgba(0, 0, 0, 0.03);
|
|
208
|
+
}
|
|
209
|
+
|
|
141
210
|
/* ── Zen mode: hide internal canvas controls ──────────────────────────────── */
|
|
142
211
|
.bpmnkit-zen-mode .bpmnkit-zoom-controls,
|
|
143
212
|
.bpmnkit-zen-mode .bpmnkit-main-menu-panel {
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
* (el) => { (el as HTMLElement).style.display = active ? "none" : ""; }
|
|
13
13
|
* );
|
|
14
14
|
* },
|
|
15
|
+
* onAskAI: (query) => aiBridgePlugin.ask(query),
|
|
15
16
|
* });
|
|
16
17
|
*
|
|
17
18
|
* const editor = new BpmnEditor({ container, xml, plugins: [palette] });
|
|
@@ -37,6 +38,21 @@ export interface CommandPaletteOptions {
|
|
|
37
38
|
onZenModeChange?: (active: boolean) => void;
|
|
38
39
|
/** Filename for exported BPMN XML downloads. Defaults to `"diagram.bpmn"`. */
|
|
39
40
|
exportFilename?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Called when the user submits a free-text AI query from the palette.
|
|
43
|
+
* If not provided, the "Ask AI" item is hidden.
|
|
44
|
+
*/
|
|
45
|
+
onAskAI?: (query: string) => void;
|
|
46
|
+
/**
|
|
47
|
+
* URL of the proxy / AI server used to check whether the AI feature is
|
|
48
|
+
* available. Defaults to `http://localhost:3033`.
|
|
49
|
+
*/
|
|
50
|
+
aiServerUrl?: string;
|
|
51
|
+
/**
|
|
52
|
+
* Base URL for documentation links.
|
|
53
|
+
* Defaults to `https://docs.bpmnkit.com`.
|
|
54
|
+
*/
|
|
55
|
+
docsBaseUrl?: string;
|
|
40
56
|
}
|
|
41
57
|
/**
|
|
42
58
|
* The command palette plugin extends `CanvasPlugin` with an `addCommands`
|
|
@@ -48,6 +64,19 @@ export interface CommandPalettePlugin extends CanvasPlugin {
|
|
|
48
64
|
* Returns a function that, when called, deregisters those commands.
|
|
49
65
|
*/
|
|
50
66
|
addCommands(cmds: Command[]): () => void;
|
|
67
|
+
/**
|
|
68
|
+
* Pushes a new view onto the palette's navigation stack.
|
|
69
|
+
* Pressing Escape pops back to the previous view (or closes if at root).
|
|
70
|
+
* Calling this while the palette is closed is a no-op.
|
|
71
|
+
*
|
|
72
|
+
* When `onConfirm` is provided the view acts as a free-text input step:
|
|
73
|
+
* the item list is empty and pressing Enter calls `onConfirm(inputValue)`
|
|
74
|
+
* then closes the palette.
|
|
75
|
+
*/
|
|
76
|
+
pushView(cmds: Command[], opts?: {
|
|
77
|
+
placeholder?: string;
|
|
78
|
+
onConfirm?: (value: string) => void;
|
|
79
|
+
}): void;
|
|
51
80
|
}
|
|
52
81
|
export declare function createCommandPalettePlugin(options?: CommandPaletteOptions): CommandPalettePlugin;
|
|
53
82
|
//# sourceMappingURL=index.d.ts.map
|