@bpmnkit/plugins 0.0.15 → 0.0.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -154,6 +154,8 @@ const ai = createAiBridgePlugin({
154
154
  | [`@bpmnkit/cli-sdk`](https://www.npmjs.com/package/@bpmnkit/cli-sdk) | Plugin authoring SDK for the casen CLI |
155
155
  | [`@bpmnkit/create-casen-plugin`](https://www.npmjs.com/package/@bpmnkit/create-casen-plugin) | Scaffold a new casen CLI plugin in seconds |
156
156
  | [`@bpmnkit/casen-report`](https://www.npmjs.com/package/@bpmnkit/casen-report) | HTML reports from Camunda 8 incident and SLA data |
157
+ | [`@bpmnkit/casen-worker-http`](https://www.npmjs.com/package/@bpmnkit/casen-worker-http) | Example HTTP worker plugin — completes jobs with live JSONPlaceholder API data |
158
+ | [`@bpmnkit/casen-worker-ai`](https://www.npmjs.com/package/@bpmnkit/casen-worker-ai) | AI task worker — classify, summarize, extract, and decide using Claude |
157
159
 
158
160
  ## License
159
161
 
@@ -360,6 +360,83 @@ export function injectAiBridgeStyles() {
360
360
  border-color: rgba(0,80,200,0.25); background: rgba(0,80,200,0.07); color: rgba(0,60,180,0.85);
361
361
  }
362
362
  [data-bpmnkit-hud-theme="light"] .ai-companion-create:hover:not(:disabled) { background: rgba(0,80,200,0.13); }
363
+ /* ── Neon theme ── */
364
+ [data-bpmnkit-hud-theme="neon"] .ai-panel {
365
+ background: oklch(5% 0.025 270 / 0.97);
366
+ border-left-color: oklch(65% 0.28 280 / 0.18);
367
+ box-shadow: -8px 0 32px oklch(0% 0 0 / 0.6);
368
+ }
369
+ [data-bpmnkit-hud-theme="neon"] .ai-panel-header { border-bottom-color: oklch(65% 0.28 280 / 0.12); }
370
+ [data-bpmnkit-hud-theme="neon"] .ai-panel-status { border-bottom-color: oklch(65% 0.28 280 / 0.08); }
371
+ [data-bpmnkit-hud-theme="neon"] .ai-msg-user {
372
+ background: oklch(65% 0.28 280 / 0.18);
373
+ border-color: oklch(65% 0.28 280 / 0.3);
374
+ }
375
+ [data-bpmnkit-hud-theme="neon"] .ai-msg-ai {
376
+ background: oklch(65% 0.28 280 / 0.05);
377
+ border-color: oklch(65% 0.28 280 / 0.1);
378
+ }
379
+ [data-bpmnkit-hud-theme="neon"] .ai-msg-copy { border-color: oklch(65% 0.28 280 / 0.15); }
380
+ [data-bpmnkit-hud-theme="neon"] .ai-msg-copy:hover { border-color: oklch(65% 0.28 280 / 0.35); }
381
+ [data-bpmnkit-hud-theme="neon"] .ai-msg-preview { border-color: oklch(65% 0.28 280 / 0.12); }
382
+ [data-bpmnkit-hud-theme="neon"] .ai-welcome-example {
383
+ background: oklch(65% 0.28 280 / 0.04); border-color: oklch(65% 0.28 280 / 0.1);
384
+ }
385
+ [data-bpmnkit-hud-theme="neon"] .ai-welcome-example:hover {
386
+ background: oklch(65% 0.28 280 / 0.1); color: oklch(88% 0.02 270);
387
+ }
388
+ [data-bpmnkit-hud-theme="neon"] .ai-quick-actions { border-top-color: oklch(65% 0.28 280 / 0.08); }
389
+ [data-bpmnkit-hud-theme="neon"] .ai-quick-btn {
390
+ background: oklch(65% 0.28 280 / 0.06); border-color: oklch(65% 0.28 280 / 0.14);
391
+ color: oklch(65% 0.1 280);
392
+ }
393
+ [data-bpmnkit-hud-theme="neon"] .ai-quick-btn:hover:not(:disabled) {
394
+ background: oklch(65% 0.28 280 / 0.13); color: oklch(88% 0.02 270);
395
+ }
396
+ [data-bpmnkit-hud-theme="neon"] .ai-context-refs { border-top-color: oklch(65% 0.28 280 / 0.08); }
397
+ [data-bpmnkit-hud-theme="neon"] .ai-context-badge {
398
+ background: oklch(65% 0.28 280 / 0.12); border-color: oklch(65% 0.28 280 / 0.28);
399
+ color: oklch(75% 0.16 280);
400
+ }
401
+ [data-bpmnkit-hud-theme="neon"] .ai-context-badge__remove { color: oklch(65% 0.1 280 / 0.55); }
402
+ [data-bpmnkit-hud-theme="neon"] .ai-context-badge__remove:hover { color: oklch(88% 0.02 270); }
403
+ [data-bpmnkit-hud-theme="neon"] .ai-msg-context-chip {
404
+ background: oklch(65% 0.28 280 / 0.12); border-color: oklch(65% 0.28 280 / 0.25);
405
+ color: oklch(75% 0.16 280);
406
+ }
407
+ [data-bpmnkit-hud-theme="neon"] .ai-input-area { border-top-color: oklch(65% 0.28 280 / 0.1); }
408
+ [data-bpmnkit-hud-theme="neon"] .ai-textarea {
409
+ background: oklch(65% 0.28 280 / 0.05); border-color: oklch(65% 0.28 280 / 0.15);
410
+ }
411
+ [data-bpmnkit-hud-theme="neon"] .ai-textarea:focus { border-color: oklch(65% 0.28 280 / 0.45); }
412
+ [data-bpmnkit-hud-theme="neon"] .ai-send-btn {
413
+ background: oklch(65% 0.28 280 / 0.45); border-color: oklch(65% 0.28 280 / 0.65);
414
+ }
415
+ [data-bpmnkit-hud-theme="neon"] .ai-send-btn:hover:not(:disabled) { background: oklch(65% 0.28 280 / 0.6); }
416
+ [data-bpmnkit-hud-theme="neon"] .ai-hdr-btn {
417
+ background: oklch(65% 0.28 280 / 0.06); border-color: oklch(65% 0.28 280 / 0.12);
418
+ color: oklch(65% 0.1 280);
419
+ }
420
+ [data-bpmnkit-hud-theme="neon"] .ai-hdr-btn:hover { color: oklch(88% 0.02 270); }
421
+ [data-bpmnkit-hud-theme="neon"] .ai-backend-select {
422
+ background: oklch(65% 0.28 280 / 0.06); border-color: oklch(65% 0.28 280 / 0.12);
423
+ color: oklch(65% 0.1 280);
424
+ }
425
+ [data-bpmnkit-hud-theme="neon"] .ai-backend-select:hover { background: oklch(65% 0.28 280 / 0.12); }
426
+ [data-bpmnkit-hud-theme="neon"] .ai-hist-panel {
427
+ background: oklch(5% 0.025 270 / 0.97); border-color: oklch(65% 0.28 280 / 0.15);
428
+ }
429
+ [data-bpmnkit-hud-theme="neon"] .ai-hist-header { border-bottom-color: oklch(65% 0.28 280 / 0.1); }
430
+ [data-bpmnkit-hud-theme="neon"] .ai-hist-item { border-bottom-color: oklch(65% 0.28 280 / 0.07); }
431
+ [data-bpmnkit-hud-theme="neon"] .ai-hist-item:hover { background: oklch(65% 0.28 280 / 0.05); }
432
+ [data-bpmnkit-hud-theme="neon"] .ai-companion-offer {
433
+ background: oklch(65% 0.28 280 / 0.05); border-color: oklch(65% 0.28 280 / 0.15);
434
+ }
435
+ [data-bpmnkit-hud-theme="neon"] .ai-companion-create {
436
+ border-color: oklch(65% 0.28 280 / 0.25); background: oklch(65% 0.28 280 / 0.1);
437
+ color: oklch(75% 0.16 280);
438
+ }
439
+ [data-bpmnkit-hud-theme="neon"] .ai-companion-create:hover:not(:disabled) { background: oklch(65% 0.28 280 / 0.2); }
363
440
  `;
364
441
  document.head.appendChild(style);
365
442
  }
@@ -1,5 +1,5 @@
1
1
  import { BpmnCanvas } from "@bpmnkit/canvas";
2
- import { Bpmn, Dmn, Form, compactify } from "@bpmnkit/core";
2
+ import { Bpmn, Dmn, Form, compactify, optimize } from "@bpmnkit/core";
3
3
  import { saveCheckpoint } from "../history/index.js";
4
4
  import { injectAiBridgeStyles } from "./css.js";
5
5
  const DEFAULT_SERVER = "http://localhost:3033";
@@ -181,6 +181,32 @@ const EXAMPLE_PROMPTS = [
181
181
  "Explain what this process does in plain language",
182
182
  "Optimize and simplify this diagram — remove redundant elements",
183
183
  ];
184
+ // ── Variable flow context builder ─────────────────────────────────────────────
185
+ function buildVariableFlowContext(defs) {
186
+ const report = optimize(defs, { categories: ["data-flow"] });
187
+ const byElement = {};
188
+ const undefinedVars = [];
189
+ const deadOutputs = [];
190
+ for (const f of report.findings) {
191
+ const elId = f.elementIds[0];
192
+ if (f.id.startsWith("data-flow/role:") && elId !== undefined) {
193
+ byElement[elId] = {
194
+ ...(f.produces?.length ? { produces: f.produces } : {}),
195
+ ...(f.consumes?.length ? { consumes: f.consumes } : {}),
196
+ };
197
+ }
198
+ else if (f.id.startsWith("data-flow/undefined-variable:") && f.consumes?.[0] !== undefined) {
199
+ undefinedVars.push(f.consumes[0]);
200
+ }
201
+ else if (f.id.startsWith("data-flow/dead-output:") && f.produces?.[0] !== undefined) {
202
+ deadOutputs.push(f.produces[0]);
203
+ }
204
+ }
205
+ return { byElement, undefinedVars, deadOutputs };
206
+ }
207
+ function buildContext(defs) {
208
+ return { ...compactify(defs), variableFlow: buildVariableFlowContext(defs) };
209
+ }
184
210
  export function createAiPanel(options) {
185
211
  injectAiBridgeStyles();
186
212
  const panel = document.createElement("div");
@@ -654,7 +680,7 @@ export function createAiPanel(options) {
654
680
  const aiMsgEl = addMessage("ai", "");
655
681
  aiMsgEl.classList.add("ai-msg-cursor");
656
682
  const defs = options.getDefinitions();
657
- const diagramContext = defs ? compactify(defs) : null;
683
+ const diagramContext = defs ? buildContext(defs) : null;
658
684
  const { fullText, resultXml } = await runStream(history, diagramContext, undefined, signal, aiMsgEl);
659
685
  finalizeAiMessage(aiMsgEl, fullText, resultXml);
660
686
  history.push({ role: "ai", content: fullText });
@@ -681,7 +707,7 @@ export function createAiPanel(options) {
681
707
  addMessage("user", label, contextNodes.length > 0 ? contextNodes : undefined);
682
708
  const aiMsgEl = addMessage("ai", "");
683
709
  aiMsgEl.classList.add("ai-msg-cursor");
684
- const context = compactify(defs);
710
+ const context = buildContext(defs);
685
711
  const { fullText, resultXml } = await runStream(history, context, action, signal, aiMsgEl);
686
712
  finalizeAiMessage(aiMsgEl, fullText, resultXml);
687
713
  history.push({ role: "ai", content: fullText });
@@ -0,0 +1,4 @@
1
+ export declare const DEPLOY_STYLE_ID = "bpmnkit-deploy-plugin-styles-v1";
2
+ export declare const DEPLOY_CSS = "\n.dp-root {\n display: flex; flex-direction: column; height: 100%; overflow-y: auto;\n padding: 14px 16px; gap: 16px;\n font-family: system-ui, -apple-system, sans-serif;\n font-size: 13px; color: rgba(255,255,255,0.82);\n box-sizing: border-box;\n}\n.dp-section {\n display: flex; flex-direction: column; gap: 8px;\n}\n.dp-section-title {\n font-size: 10px; font-weight: 700; text-transform: uppercase;\n letter-spacing: 0.08em; color: rgba(255,255,255,0.3);\n margin-bottom: 2px;\n}\n.dp-row {\n display: flex; align-items: center; gap: 8px;\n}\n.dp-select {\n flex: 1; background: rgba(30,30,46,0.95); border: 1px solid rgba(255,255,255,0.12);\n border-radius: 5px; color: rgba(255,255,255,0.85); padding: 5px 8px;\n font-size: 12px; font-family: inherit; outline: none;\n appearance: none; -webkit-appearance: none;\n}\n.dp-select:focus { border-color: rgba(107,157,247,0.6); }\n.dp-btn {\n width: 100%; padding: 7px 12px; border-radius: 5px; border: none;\n font-size: 12px; font-weight: 600; font-family: inherit; cursor: pointer;\n transition: opacity 0.15s;\n}\n.dp-btn:disabled { opacity: 0.35; cursor: default; }\n.dp-btn-primary {\n background: var(--bpmnkit-accent, #1a56db); color: #fff;\n}\n.dp-btn-primary:hover:not(:disabled) { opacity: 0.88; }\n.dp-btn-secondary {\n background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.75);\n border: 1px solid rgba(255,255,255,0.12);\n}\n.dp-btn-secondary:hover:not(:disabled) { background: rgba(255,255,255,0.11); }\n.dp-status {\n display: flex; align-items: center; gap: 6px;\n padding: 6px 10px; border-radius: 5px; font-size: 12px;\n}\n.dp-status-ok { background: rgba(34,197,94,0.12); color: #4ade80; }\n.dp-status-warn { background: rgba(245,158,11,0.12); color: #fbbf24; }\n.dp-status-err { background: rgba(248,113,113,0.14); color: #f87171; }\n.dp-status-info { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.5); }\n.dp-dot {\n width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;\n}\n.dp-dot-ok { background: #4ade80; }\n.dp-dot-warn { background: #fbbf24; }\n.dp-dot-err { background: #f87171; }\n.dp-dot-info { background: rgba(255,255,255,0.3); }\n.dp-finding-list {\n display: flex; flex-direction: column; gap: 4px;\n}\n.dp-finding {\n display: flex; align-items: flex-start; gap: 6px;\n padding: 5px 8px; border-radius: 4px;\n background: rgba(248,113,113,0.08); font-size: 12px; color: rgba(255,255,255,0.7);\n}\n.dp-finding-badge {\n flex-shrink: 0; font-size: 10px; font-weight: 700; text-transform: uppercase;\n padding: 1px 5px; border-radius: 3px; margin-top: 1px;\n background: rgba(248,113,113,0.25); color: #f87171;\n}\n.dp-result-box {\n padding: 8px 10px; border-radius: 5px;\n background: rgba(34,197,94,0.08); border: 1px solid rgba(34,197,94,0.2);\n font-size: 12px; color: rgba(255,255,255,0.75); line-height: 1.5;\n}\n.dp-result-key {\n font-family: ui-monospace, monospace; font-size: 11px;\n color: rgba(107,157,247,0.9); word-break: break-all;\n}\n.dp-textarea {\n width: 100%; min-height: 72px; resize: vertical;\n background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12);\n border-radius: 5px; color: rgba(255,255,255,0.82); padding: 6px 8px;\n font-size: 12px; font-family: ui-monospace, monospace; outline: none;\n box-sizing: border-box;\n}\n.dp-textarea:focus { border-color: rgba(107,157,247,0.6); }\n.dp-link {\n color: var(--bpmnkit-accent-bright, #89b4fa); text-decoration: none; font-size: 12px;\n}\n.dp-link:hover { text-decoration: underline; }\n.dp-divider {\n border: none; border-top: 1px solid rgba(255,255,255,0.07); margin: 0;\n}\n.dp-offline {\n display: flex; flex-direction: column; align-items: center; justify-content: center;\n flex: 1; gap: 10px; padding: 24px 16px; text-align: center;\n}\n.dp-offline-icon { font-size: 28px; opacity: 0.4; }\n.dp-offline-title { font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.6); }\n.dp-offline-hint {\n font-size: 12px; color: rgba(255,255,255,0.3); line-height: 1.5;\n}\n.dp-offline-code {\n font-family: ui-monospace, monospace; font-size: 11px;\n background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);\n border-radius: 4px; padding: 4px 8px; color: rgba(255,255,255,0.5);\n white-space: pre;\n}\n/* Neon theme */\n[data-bpmnkit-hud-theme=\"neon\"] .dp-root { color: oklch(73% 0.16 280); }\n[data-bpmnkit-hud-theme=\"neon\"] .dp-section-title { color: oklch(50% 0.1 280); }\n[data-bpmnkit-hud-theme=\"neon\"] .dp-select {\n background: oklch(8% 0.04 280 / 0.98); border-color: oklch(65% 0.28 280 / 0.2);\n color: oklch(80% 0.14 280);\n}\n[data-bpmnkit-hud-theme=\"neon\"] .dp-select:focus { border-color: oklch(65% 0.28 280 / 0.55); }\n[data-bpmnkit-hud-theme=\"neon\"] .dp-btn-secondary {\n background: oklch(65% 0.28 280 / 0.07); border-color: oklch(65% 0.28 280 / 0.2);\n color: oklch(65% 0.1 280);\n}\n[data-bpmnkit-hud-theme=\"neon\"] .dp-btn-secondary:hover:not(:disabled) { background: oklch(65% 0.28 280 / 0.14); }\n[data-bpmnkit-hud-theme=\"neon\"] .dp-status-info { background: oklch(65% 0.28 280 / 0.05); color: oklch(55% 0.08 280); }\n[data-bpmnkit-hud-theme=\"neon\"] .dp-dot-info { background: oklch(50% 0.1 280); }\n[data-bpmnkit-hud-theme=\"neon\"] .dp-finding { background: oklch(55% 0.28 20 / 0.1); color: oklch(73% 0.1 280); }\n[data-bpmnkit-hud-theme=\"neon\"] .dp-result-box { border-color: oklch(55% 0.18 150 / 0.3); color: oklch(73% 0.1 280); }\n[data-bpmnkit-hud-theme=\"neon\"] .dp-result-key { color: oklch(72% 0.18 185); }\n[data-bpmnkit-hud-theme=\"neon\"] .dp-textarea {\n background: oklch(65% 0.28 280 / 0.04); border-color: oklch(65% 0.28 280 / 0.15);\n color: oklch(73% 0.16 280);\n}\n[data-bpmnkit-hud-theme=\"neon\"] .dp-textarea:focus { border-color: oklch(65% 0.28 280 / 0.45); }\n[data-bpmnkit-hud-theme=\"neon\"] .dp-link { color: oklch(72% 0.18 185); }\n[data-bpmnkit-hud-theme=\"neon\"] .dp-divider { border-top-color: oklch(65% 0.28 280 / 0.1); }\n[data-bpmnkit-hud-theme=\"neon\"] .dp-offline-title { color: oklch(55% 0.1 280); }\n[data-bpmnkit-hud-theme=\"neon\"] .dp-offline-hint { color: oklch(40% 0.06 280); }\n[data-bpmnkit-hud-theme=\"neon\"] .dp-offline-code {\n background: oklch(65% 0.28 280 / 0.05); border-color: oklch(65% 0.28 280 / 0.12);\n color: oklch(55% 0.1 280);\n}\n";
3
+ export declare function injectDeployStyles(): void;
4
+ //# sourceMappingURL=css.d.ts.map
@@ -0,0 +1,150 @@
1
+ export const DEPLOY_STYLE_ID = "bpmnkit-deploy-plugin-styles-v1";
2
+ export const DEPLOY_CSS = `
3
+ .dp-root {
4
+ display: flex; flex-direction: column; height: 100%; overflow-y: auto;
5
+ padding: 14px 16px; gap: 16px;
6
+ font-family: system-ui, -apple-system, sans-serif;
7
+ font-size: 13px; color: rgba(255,255,255,0.82);
8
+ box-sizing: border-box;
9
+ }
10
+ .dp-section {
11
+ display: flex; flex-direction: column; gap: 8px;
12
+ }
13
+ .dp-section-title {
14
+ font-size: 10px; font-weight: 700; text-transform: uppercase;
15
+ letter-spacing: 0.08em; color: rgba(255,255,255,0.3);
16
+ margin-bottom: 2px;
17
+ }
18
+ .dp-row {
19
+ display: flex; align-items: center; gap: 8px;
20
+ }
21
+ .dp-select {
22
+ flex: 1; background: rgba(30,30,46,0.95); border: 1px solid rgba(255,255,255,0.12);
23
+ border-radius: 5px; color: rgba(255,255,255,0.85); padding: 5px 8px;
24
+ font-size: 12px; font-family: inherit; outline: none;
25
+ appearance: none; -webkit-appearance: none;
26
+ }
27
+ .dp-select:focus { border-color: rgba(107,157,247,0.6); }
28
+ .dp-btn {
29
+ width: 100%; padding: 7px 12px; border-radius: 5px; border: none;
30
+ font-size: 12px; font-weight: 600; font-family: inherit; cursor: pointer;
31
+ transition: opacity 0.15s;
32
+ }
33
+ .dp-btn:disabled { opacity: 0.35; cursor: default; }
34
+ .dp-btn-primary {
35
+ background: var(--bpmnkit-accent, #1a56db); color: #fff;
36
+ }
37
+ .dp-btn-primary:hover:not(:disabled) { opacity: 0.88; }
38
+ .dp-btn-secondary {
39
+ background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.75);
40
+ border: 1px solid rgba(255,255,255,0.12);
41
+ }
42
+ .dp-btn-secondary:hover:not(:disabled) { background: rgba(255,255,255,0.11); }
43
+ .dp-status {
44
+ display: flex; align-items: center; gap: 6px;
45
+ padding: 6px 10px; border-radius: 5px; font-size: 12px;
46
+ }
47
+ .dp-status-ok { background: rgba(34,197,94,0.12); color: #4ade80; }
48
+ .dp-status-warn { background: rgba(245,158,11,0.12); color: #fbbf24; }
49
+ .dp-status-err { background: rgba(248,113,113,0.14); color: #f87171; }
50
+ .dp-status-info { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.5); }
51
+ .dp-dot {
52
+ width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
53
+ }
54
+ .dp-dot-ok { background: #4ade80; }
55
+ .dp-dot-warn { background: #fbbf24; }
56
+ .dp-dot-err { background: #f87171; }
57
+ .dp-dot-info { background: rgba(255,255,255,0.3); }
58
+ .dp-finding-list {
59
+ display: flex; flex-direction: column; gap: 4px;
60
+ }
61
+ .dp-finding {
62
+ display: flex; align-items: flex-start; gap: 6px;
63
+ padding: 5px 8px; border-radius: 4px;
64
+ background: rgba(248,113,113,0.08); font-size: 12px; color: rgba(255,255,255,0.7);
65
+ }
66
+ .dp-finding-badge {
67
+ flex-shrink: 0; font-size: 10px; font-weight: 700; text-transform: uppercase;
68
+ padding: 1px 5px; border-radius: 3px; margin-top: 1px;
69
+ background: rgba(248,113,113,0.25); color: #f87171;
70
+ }
71
+ .dp-result-box {
72
+ padding: 8px 10px; border-radius: 5px;
73
+ background: rgba(34,197,94,0.08); border: 1px solid rgba(34,197,94,0.2);
74
+ font-size: 12px; color: rgba(255,255,255,0.75); line-height: 1.5;
75
+ }
76
+ .dp-result-key {
77
+ font-family: ui-monospace, monospace; font-size: 11px;
78
+ color: rgba(107,157,247,0.9); word-break: break-all;
79
+ }
80
+ .dp-textarea {
81
+ width: 100%; min-height: 72px; resize: vertical;
82
+ background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12);
83
+ border-radius: 5px; color: rgba(255,255,255,0.82); padding: 6px 8px;
84
+ font-size: 12px; font-family: ui-monospace, monospace; outline: none;
85
+ box-sizing: border-box;
86
+ }
87
+ .dp-textarea:focus { border-color: rgba(107,157,247,0.6); }
88
+ .dp-link {
89
+ color: var(--bpmnkit-accent-bright, #89b4fa); text-decoration: none; font-size: 12px;
90
+ }
91
+ .dp-link:hover { text-decoration: underline; }
92
+ .dp-divider {
93
+ border: none; border-top: 1px solid rgba(255,255,255,0.07); margin: 0;
94
+ }
95
+ .dp-offline {
96
+ display: flex; flex-direction: column; align-items: center; justify-content: center;
97
+ flex: 1; gap: 10px; padding: 24px 16px; text-align: center;
98
+ }
99
+ .dp-offline-icon { font-size: 28px; opacity: 0.4; }
100
+ .dp-offline-title { font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.6); }
101
+ .dp-offline-hint {
102
+ font-size: 12px; color: rgba(255,255,255,0.3); line-height: 1.5;
103
+ }
104
+ .dp-offline-code {
105
+ font-family: ui-monospace, monospace; font-size: 11px;
106
+ background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
107
+ border-radius: 4px; padding: 4px 8px; color: rgba(255,255,255,0.5);
108
+ white-space: pre;
109
+ }
110
+ /* Neon theme */
111
+ [data-bpmnkit-hud-theme="neon"] .dp-root { color: oklch(73% 0.16 280); }
112
+ [data-bpmnkit-hud-theme="neon"] .dp-section-title { color: oklch(50% 0.1 280); }
113
+ [data-bpmnkit-hud-theme="neon"] .dp-select {
114
+ background: oklch(8% 0.04 280 / 0.98); border-color: oklch(65% 0.28 280 / 0.2);
115
+ color: oklch(80% 0.14 280);
116
+ }
117
+ [data-bpmnkit-hud-theme="neon"] .dp-select:focus { border-color: oklch(65% 0.28 280 / 0.55); }
118
+ [data-bpmnkit-hud-theme="neon"] .dp-btn-secondary {
119
+ background: oklch(65% 0.28 280 / 0.07); border-color: oklch(65% 0.28 280 / 0.2);
120
+ color: oklch(65% 0.1 280);
121
+ }
122
+ [data-bpmnkit-hud-theme="neon"] .dp-btn-secondary:hover:not(:disabled) { background: oklch(65% 0.28 280 / 0.14); }
123
+ [data-bpmnkit-hud-theme="neon"] .dp-status-info { background: oklch(65% 0.28 280 / 0.05); color: oklch(55% 0.08 280); }
124
+ [data-bpmnkit-hud-theme="neon"] .dp-dot-info { background: oklch(50% 0.1 280); }
125
+ [data-bpmnkit-hud-theme="neon"] .dp-finding { background: oklch(55% 0.28 20 / 0.1); color: oklch(73% 0.1 280); }
126
+ [data-bpmnkit-hud-theme="neon"] .dp-result-box { border-color: oklch(55% 0.18 150 / 0.3); color: oklch(73% 0.1 280); }
127
+ [data-bpmnkit-hud-theme="neon"] .dp-result-key { color: oklch(72% 0.18 185); }
128
+ [data-bpmnkit-hud-theme="neon"] .dp-textarea {
129
+ background: oklch(65% 0.28 280 / 0.04); border-color: oklch(65% 0.28 280 / 0.15);
130
+ color: oklch(73% 0.16 280);
131
+ }
132
+ [data-bpmnkit-hud-theme="neon"] .dp-textarea:focus { border-color: oklch(65% 0.28 280 / 0.45); }
133
+ [data-bpmnkit-hud-theme="neon"] .dp-link { color: oklch(72% 0.18 185); }
134
+ [data-bpmnkit-hud-theme="neon"] .dp-divider { border-top-color: oklch(65% 0.28 280 / 0.1); }
135
+ [data-bpmnkit-hud-theme="neon"] .dp-offline-title { color: oklch(55% 0.1 280); }
136
+ [data-bpmnkit-hud-theme="neon"] .dp-offline-hint { color: oklch(40% 0.06 280); }
137
+ [data-bpmnkit-hud-theme="neon"] .dp-offline-code {
138
+ background: oklch(65% 0.28 280 / 0.05); border-color: oklch(65% 0.28 280 / 0.12);
139
+ color: oklch(55% 0.1 280);
140
+ }
141
+ `;
142
+ export function injectDeployStyles() {
143
+ if (document.getElementById(DEPLOY_STYLE_ID))
144
+ return;
145
+ const style = document.createElement("style");
146
+ style.id = DEPLOY_STYLE_ID;
147
+ style.textContent = DEPLOY_CSS;
148
+ document.head.appendChild(style);
149
+ }
150
+ //# sourceMappingURL=css.js.map
@@ -0,0 +1,25 @@
1
+ import type { CanvasPlugin } from "@bpmnkit/canvas";
2
+ import type { BpmnDefinitions } from "@bpmnkit/core";
3
+ import { DEPLOY_CSS, DEPLOY_STYLE_ID, injectDeployStyles } from "./css.js";
4
+ export { DEPLOY_CSS, DEPLOY_STYLE_ID, injectDeployStyles };
5
+ export interface DeployPluginOptions {
6
+ /** Base URL of the proxy server. Defaults to `http://localhost:3033`. */
7
+ proxyUrl?: string;
8
+ /** Base URL of the operate app, used to build "View in Operate" links. */
9
+ operateUrl?: string;
10
+ /** Return current BPMN definitions (for optimizer check and process ID extraction). */
11
+ getDefinitions(): BpmnDefinitions | null;
12
+ /** Return the raw BPMN XML to deploy. */
13
+ getXml(): string | null;
14
+ /** Return the filename for the deployed resource (e.g. "my-process.bpmn"). */
15
+ getFileName?(): string | null;
16
+ }
17
+ export interface DeployPlugin extends CanvasPlugin {
18
+ readonly name: "deploy";
19
+ /** Wire the plugin's UI into a container element (e.g. the SideDock deploy pane). */
20
+ mount(container: HTMLElement): void;
21
+ /** Call when the Deploy tab becomes active — refreshes proxy status. */
22
+ onTabActivated(): void;
23
+ }
24
+ export declare function createDeployPlugin(options: DeployPluginOptions): DeployPlugin;
25
+ //# sourceMappingURL=index.d.ts.map