@bpmnkit/plugins 0.0.18 → 0.0.19

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.
@@ -679,10 +679,25 @@ export class ConfigPanelRenderer {
679
679
  templateLabel.textContent = reg.schema.templateName;
680
680
  info.appendChild(templateLabel);
681
681
  }
682
- const nameLabel = document.createElement("div");
683
- nameLabel.className = "bpmnkit-cfg-full-name";
684
- nameLabel.textContent = this._elementName || "(unnamed)";
685
- info.appendChild(nameLabel);
682
+ const nameInput = document.createElement("input");
683
+ nameInput.type = "text";
684
+ nameInput.className = "bpmnkit-cfg-full-name";
685
+ nameInput.setAttribute("data-field-key", "name");
686
+ nameInput.value = this._elementName;
687
+ nameInput.placeholder = "(unnamed)";
688
+ nameInput.setAttribute("spellcheck", "false");
689
+ nameInput.setAttribute("autocomplete", "off");
690
+ if (this._readonly)
691
+ nameInput.readOnly = true;
692
+ nameInput.addEventListener("input", () => {
693
+ this._elementName = nameInput.value;
694
+ this._applyField("name", nameInput.value);
695
+ });
696
+ nameInput.addEventListener("keydown", (e) => {
697
+ if (e.key === "Enter" || e.key === "Escape")
698
+ nameInput.blur();
699
+ });
700
+ info.appendChild(nameInput);
686
701
  header.appendChild(info);
687
702
  // Docs link — shown when the schema provides a documentation URL
688
703
  if (reg.schema.docsUrl) {
@@ -0,0 +1,24 @@
1
+ import type { CanvasPlugin } from "@bpmnkit/canvas";
2
+ export interface PresentationApi {
3
+ enter(): void;
4
+ exit(): void;
5
+ }
6
+ export interface PresentationPlugin extends CanvasPlugin {
7
+ api: PresentationApi;
8
+ }
9
+ interface PaletteInput {
10
+ addCommands(cmds: Array<{
11
+ id: string;
12
+ title: string;
13
+ description?: string;
14
+ action(): void;
15
+ }>): () => void;
16
+ }
17
+ export interface PresentationOptions {
18
+ palette?: PaletteInput | null;
19
+ onEnter?: () => void;
20
+ onExit?: () => void;
21
+ }
22
+ export declare function createPresentationPlugin(options?: PresentationOptions): PresentationPlugin;
23
+ export {};
24
+ //# sourceMappingURL=index.d.ts.map