@bpmnkit/plugins 0.0.19 → 0.0.23

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.
@@ -1,4 +1,4 @@
1
1
  export declare const CONNECTOR_CATALOG_STYLE_ID = "bpmnkit-connector-catalog-v1";
2
- export declare const CONNECTOR_CATALOG_CSS = "\n/* \u2500\u2500 Toast notifications \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\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-cc-toast {\n position: fixed;\n bottom: 20px;\n left: 50%;\n transform: translateX(-50%);\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 9px 16px;\n border-radius: 8px;\n font-family: system-ui, -apple-system, sans-serif;\n font-size: 13px;\n font-weight: 500;\n z-index: 99999;\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);\n animation: bpmnkit-cc-fadein 0.15s ease;\n max-width: 420px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n pointer-events: none;\n}\n@keyframes bpmnkit-cc-fadein {\n from { opacity: 0; transform: translateX(-50%) translateY(6px); }\n to { opacity: 1; transform: translateX(-50%) translateY(0); }\n}\n.bpmnkit-cc-toast--loading {\n background: var(--bpmnkit-surface-2, #1e1e2e);\n border: 1px solid var(--bpmnkit-border, #2a2a42);\n color: var(--bpmnkit-fg-muted, #8888a8);\n}\n.bpmnkit-cc-toast--success {\n background: rgba(22, 163, 74, 0.12);\n border: 1px solid rgba(22, 163, 74, 0.35);\n color: var(--bpmnkit-success, #22c55e);\n}\n.bpmnkit-cc-toast--error {\n background: rgba(220, 38, 38, 0.12);\n border: 1px solid rgba(220, 38, 38, 0.35);\n color: var(--bpmnkit-danger, #f87171);\n}\n/* Light theme */\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cc-toast--loading {\n background: var(--bpmnkit-surface-2, #eeeef8);\n border-color: var(--bpmnkit-border, #d0d0e8);\n color: var(--bpmnkit-fg-muted, #6666a0);\n}\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cc-toast--success {\n background: rgba(22, 163, 74, 0.07);\n border-color: rgba(22, 163, 74, 0.3);\n color: var(--bpmnkit-success, #16a34a);\n}\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cc-toast--error {\n background: rgba(220, 38, 38, 0.07);\n border-color: rgba(220, 38, 38, 0.3);\n color: var(--bpmnkit-danger, #dc2626);\n}\n";
2
+ export declare const CONNECTOR_CATALOG_CSS = "\n/* \u2500\u2500 Catalog panel overlay \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\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-cc-panel-overlay {\n position: fixed;\n inset: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n background: rgba(0, 0, 0, 0.55);\n z-index: 99990;\n animation: bpmnkit-cc-fadein 0.12s ease;\n}\n.bpmnkit-cc-panel {\n display: flex;\n flex-direction: column;\n width: min(720px, 92vw);\n max-height: 80vh;\n background: var(--bpmnkit-surface, #161626);\n border: 1px solid var(--bpmnkit-border, #2a2a42);\n border-radius: 12px;\n box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);\n overflow: hidden;\n font-family: var(--bpmnkit-font, system-ui, -apple-system, sans-serif);\n font-size: 13px;\n color: var(--bpmnkit-fg, #cdd6f4);\n}\n/* Header */\n.bpmnkit-cc-panel__header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 16px 20px 12px;\n border-bottom: 1px solid var(--bpmnkit-border, #2a2a42);\n flex-shrink: 0;\n}\n.bpmnkit-cc-panel__title {\n margin: 0;\n font-size: 15px;\n font-weight: 600;\n color: var(--bpmnkit-fg, #cdd6f4);\n}\n.bpmnkit-cc-panel__close {\n background: none;\n border: none;\n color: var(--bpmnkit-fg-muted, #8888a8);\n cursor: pointer;\n font-size: 16px;\n line-height: 1;\n padding: 4px 6px;\n border-radius: 4px;\n transition: color 0.1s, background 0.1s;\n}\n.bpmnkit-cc-panel__close:hover {\n color: var(--bpmnkit-fg, #cdd6f4);\n background: var(--bpmnkit-surface-2, #1e1e2e);\n}\n/* Search */\n.bpmnkit-cc-panel__search {\n padding: 12px 16px 0;\n flex-shrink: 0;\n}\n.bpmnkit-cc-panel__search-input {\n width: 100%;\n box-sizing: border-box;\n background: var(--bpmnkit-surface-2, #1e1e2e);\n border: 1px solid var(--bpmnkit-border, #2a2a42);\n border-radius: 6px;\n color: var(--bpmnkit-fg, #cdd6f4);\n font-family: inherit;\n font-size: 13px;\n outline: none;\n padding: 7px 10px;\n transition: border-color 0.15s;\n}\n.bpmnkit-cc-panel__search-input:focus {\n border-color: var(--bpmnkit-accent, #6b9df7);\n}\n.bpmnkit-cc-panel__search-input::placeholder {\n color: var(--bpmnkit-fg-muted, #8888a8);\n}\n/* Tabs */\n.bpmnkit-cc-panel__tabs {\n display: flex;\n gap: 2px;\n padding: 10px 16px 0;\n border-bottom: 1px solid var(--bpmnkit-border, #2a2a42);\n flex-shrink: 0;\n}\n.bpmnkit-cc-tab {\n background: none;\n border: none;\n border-bottom: 2px solid transparent;\n color: var(--bpmnkit-fg-muted, #8888a8);\n cursor: pointer;\n font-family: inherit;\n font-size: 13px;\n font-weight: 500;\n margin-bottom: -1px;\n padding: 6px 12px 8px;\n transition: color 0.1s, border-color 0.1s;\n}\n.bpmnkit-cc-tab:hover {\n color: var(--bpmnkit-fg, #cdd6f4);\n}\n.bpmnkit-cc-tab--active {\n border-bottom-color: var(--bpmnkit-accent, #6b9df7);\n color: var(--bpmnkit-accent, #6b9df7);\n}\n/* Content */\n.bpmnkit-cc-panel__content {\n flex: 1;\n overflow-y: auto;\n padding: 16px;\n}\n/* Built-in card grid */\n.bpmnkit-cc-grid {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));\n gap: 10px;\n}\n.bpmnkit-cc-card {\n display: flex;\n flex-direction: column;\n gap: 6px;\n background: var(--bpmnkit-surface-2, #1e1e2e);\n border: 1px solid var(--bpmnkit-border, #2a2a42);\n border-radius: 8px;\n cursor: pointer;\n padding: 12px;\n transition: border-color 0.15s, background 0.15s;\n}\n.bpmnkit-cc-card:hover {\n border-color: var(--bpmnkit-accent, #6b9df7);\n background: var(--bpmnkit-accent-subtle, rgba(107,157,247,0.08));\n}\n.bpmnkit-cc-card__icon {\n width: 20px;\n height: 20px;\n flex-shrink: 0;\n}\n.bpmnkit-cc-card__icon svg {\n width: 20px;\n height: 20px;\n}\n.bpmnkit-cc-card__body {\n flex: 1;\n}\n.bpmnkit-cc-card__name {\n font-weight: 600;\n font-size: 13px;\n color: var(--bpmnkit-fg, #cdd6f4);\n margin-bottom: 3px;\n}\n.bpmnkit-cc-card__desc {\n font-size: 11px;\n color: var(--bpmnkit-fg-muted, #8888a8);\n line-height: 1.4;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n}\n.bpmnkit-cc-card__use {\n align-self: flex-start;\n background: var(--bpmnkit-accent, #6b9df7);\n border: none;\n border-radius: 4px;\n color: #fff;\n cursor: pointer;\n font-family: inherit;\n font-size: 11px;\n font-weight: 600;\n padding: 4px 10px;\n transition: opacity 0.1s;\n}\n.bpmnkit-cc-card__use:hover {\n opacity: 0.85;\n}\n/* Community row list */\n.bpmnkit-cc-list {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n.bpmnkit-cc-row {\n display: flex;\n align-items: center;\n gap: 12px;\n background: var(--bpmnkit-surface-2, #1e1e2e);\n border: 1px solid var(--bpmnkit-border, #2a2a42);\n border-radius: 6px;\n cursor: pointer;\n padding: 10px 12px;\n transition: border-color 0.15s, background 0.15s;\n}\n.bpmnkit-cc-row:hover {\n border-color: var(--bpmnkit-accent, #6b9df7);\n background: var(--bpmnkit-accent-subtle, rgba(107,157,247,0.08));\n}\n.bpmnkit-cc-row__body {\n flex: 1;\n min-width: 0;\n}\n.bpmnkit-cc-row__name {\n font-weight: 600;\n color: var(--bpmnkit-fg, #cdd6f4);\n}\n.bpmnkit-cc-row__desc {\n font-size: 11px;\n color: var(--bpmnkit-fg-muted, #8888a8);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.bpmnkit-cc-row__import {\n background: none;\n border: 1px solid var(--bpmnkit-border, #2a2a42);\n border-radius: 4px;\n color: var(--bpmnkit-fg-muted, #8888a8);\n cursor: pointer;\n flex-shrink: 0;\n font-family: inherit;\n font-size: 11px;\n padding: 4px 10px;\n transition: border-color 0.1s, color 0.1s;\n white-space: nowrap;\n}\n.bpmnkit-cc-row__import:hover {\n border-color: var(--bpmnkit-accent, #6b9df7);\n color: var(--bpmnkit-accent, #6b9df7);\n}\n/* Empty state */\n.bpmnkit-cc-empty {\n color: var(--bpmnkit-fg-muted, #8888a8);\n font-size: 13px;\n padding: 32px 0;\n text-align: center;\n}\n/* Footer */\n.bpmnkit-cc-panel__footer {\n border-top: 1px solid var(--bpmnkit-border, #2a2a42);\n display: flex;\n gap: 8px;\n padding: 10px 16px;\n flex-shrink: 0;\n}\n.bpmnkit-cc-footer-btn {\n background: none;\n border: 1px solid var(--bpmnkit-border, #2a2a42);\n border-radius: 5px;\n color: var(--bpmnkit-fg-muted, #8888a8);\n cursor: pointer;\n font-family: inherit;\n font-size: 12px;\n padding: 5px 12px;\n transition: border-color 0.1s, color 0.1s;\n}\n.bpmnkit-cc-footer-btn:hover {\n border-color: var(--bpmnkit-accent, #6b9df7);\n color: var(--bpmnkit-accent, #6b9df7);\n}\n/* Light theme overrides */\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cc-panel {\n background: var(--bpmnkit-surface, #ffffff);\n border-color: var(--bpmnkit-border, #d0d0e8);\n color: var(--bpmnkit-fg, #1a1a2e);\n}\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cc-panel__header,\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cc-panel__tabs,\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cc-panel__footer {\n border-color: var(--bpmnkit-border, #d0d0e8);\n}\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cc-panel__title,\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cc-card__name,\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cc-row__name {\n color: var(--bpmnkit-fg, #1a1a2e);\n}\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cc-panel__search-input,\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cc-card,\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cc-row {\n background: var(--bpmnkit-surface-2, #eeeef8);\n border-color: var(--bpmnkit-border, #d0d0e8);\n}\n/* \u2500\u2500 Toast notifications \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\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-cc-toast {\n position: fixed;\n bottom: 20px;\n left: 50%;\n transform: translateX(-50%);\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 9px 16px;\n border-radius: 8px;\n font-family: system-ui, -apple-system, sans-serif;\n font-size: 13px;\n font-weight: 500;\n z-index: 99999;\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);\n animation: bpmnkit-cc-fadein 0.15s ease;\n max-width: 420px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n pointer-events: none;\n}\n@keyframes bpmnkit-cc-fadein {\n from { opacity: 0; transform: translateX(-50%) translateY(6px); }\n to { opacity: 1; transform: translateX(-50%) translateY(0); }\n}\n.bpmnkit-cc-toast--loading {\n background: var(--bpmnkit-surface-2, #1e1e2e);\n border: 1px solid var(--bpmnkit-border, #2a2a42);\n color: var(--bpmnkit-fg-muted, #8888a8);\n}\n.bpmnkit-cc-toast--success {\n background: rgba(22, 163, 74, 0.12);\n border: 1px solid rgba(22, 163, 74, 0.35);\n color: var(--bpmnkit-success, #22c55e);\n}\n.bpmnkit-cc-toast--error {\n background: rgba(220, 38, 38, 0.12);\n border: 1px solid rgba(220, 38, 38, 0.35);\n color: var(--bpmnkit-danger, #f87171);\n}\n/* Light theme */\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cc-toast--loading {\n background: var(--bpmnkit-surface-2, #eeeef8);\n border-color: var(--bpmnkit-border, #d0d0e8);\n color: var(--bpmnkit-fg-muted, #6666a0);\n}\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cc-toast--success {\n background: rgba(22, 163, 74, 0.07);\n border-color: rgba(22, 163, 74, 0.3);\n color: var(--bpmnkit-success, #16a34a);\n}\n[data-bpmnkit-hud-theme=\"light\"] .bpmnkit-cc-toast--error {\n background: rgba(220, 38, 38, 0.07);\n border-color: rgba(220, 38, 38, 0.3);\n color: var(--bpmnkit-danger, #dc2626);\n}\n";
3
3
  export declare function injectConnectorCatalogStyles(): void;
4
4
  //# sourceMappingURL=css.d.ts.map
@@ -1,5 +1,287 @@
1
1
  export const CONNECTOR_CATALOG_STYLE_ID = "bpmnkit-connector-catalog-v1";
2
2
  export const CONNECTOR_CATALOG_CSS = `
3
+ /* ── Catalog panel overlay ───────────────────────────────────────────────── */
4
+ .bpmnkit-cc-panel-overlay {
5
+ position: fixed;
6
+ inset: 0;
7
+ display: flex;
8
+ align-items: center;
9
+ justify-content: center;
10
+ background: rgba(0, 0, 0, 0.55);
11
+ z-index: 99990;
12
+ animation: bpmnkit-cc-fadein 0.12s ease;
13
+ }
14
+ .bpmnkit-cc-panel {
15
+ display: flex;
16
+ flex-direction: column;
17
+ width: min(720px, 92vw);
18
+ max-height: 80vh;
19
+ background: var(--bpmnkit-surface, #161626);
20
+ border: 1px solid var(--bpmnkit-border, #2a2a42);
21
+ border-radius: 12px;
22
+ box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
23
+ overflow: hidden;
24
+ font-family: var(--bpmnkit-font, system-ui, -apple-system, sans-serif);
25
+ font-size: 13px;
26
+ color: var(--bpmnkit-fg, #cdd6f4);
27
+ }
28
+ /* Header */
29
+ .bpmnkit-cc-panel__header {
30
+ display: flex;
31
+ align-items: center;
32
+ justify-content: space-between;
33
+ padding: 16px 20px 12px;
34
+ border-bottom: 1px solid var(--bpmnkit-border, #2a2a42);
35
+ flex-shrink: 0;
36
+ }
37
+ .bpmnkit-cc-panel__title {
38
+ margin: 0;
39
+ font-size: 15px;
40
+ font-weight: 600;
41
+ color: var(--bpmnkit-fg, #cdd6f4);
42
+ }
43
+ .bpmnkit-cc-panel__close {
44
+ background: none;
45
+ border: none;
46
+ color: var(--bpmnkit-fg-muted, #8888a8);
47
+ cursor: pointer;
48
+ font-size: 16px;
49
+ line-height: 1;
50
+ padding: 4px 6px;
51
+ border-radius: 4px;
52
+ transition: color 0.1s, background 0.1s;
53
+ }
54
+ .bpmnkit-cc-panel__close:hover {
55
+ color: var(--bpmnkit-fg, #cdd6f4);
56
+ background: var(--bpmnkit-surface-2, #1e1e2e);
57
+ }
58
+ /* Search */
59
+ .bpmnkit-cc-panel__search {
60
+ padding: 12px 16px 0;
61
+ flex-shrink: 0;
62
+ }
63
+ .bpmnkit-cc-panel__search-input {
64
+ width: 100%;
65
+ box-sizing: border-box;
66
+ background: var(--bpmnkit-surface-2, #1e1e2e);
67
+ border: 1px solid var(--bpmnkit-border, #2a2a42);
68
+ border-radius: 6px;
69
+ color: var(--bpmnkit-fg, #cdd6f4);
70
+ font-family: inherit;
71
+ font-size: 13px;
72
+ outline: none;
73
+ padding: 7px 10px;
74
+ transition: border-color 0.15s;
75
+ }
76
+ .bpmnkit-cc-panel__search-input:focus {
77
+ border-color: var(--bpmnkit-accent, #6b9df7);
78
+ }
79
+ .bpmnkit-cc-panel__search-input::placeholder {
80
+ color: var(--bpmnkit-fg-muted, #8888a8);
81
+ }
82
+ /* Tabs */
83
+ .bpmnkit-cc-panel__tabs {
84
+ display: flex;
85
+ gap: 2px;
86
+ padding: 10px 16px 0;
87
+ border-bottom: 1px solid var(--bpmnkit-border, #2a2a42);
88
+ flex-shrink: 0;
89
+ }
90
+ .bpmnkit-cc-tab {
91
+ background: none;
92
+ border: none;
93
+ border-bottom: 2px solid transparent;
94
+ color: var(--bpmnkit-fg-muted, #8888a8);
95
+ cursor: pointer;
96
+ font-family: inherit;
97
+ font-size: 13px;
98
+ font-weight: 500;
99
+ margin-bottom: -1px;
100
+ padding: 6px 12px 8px;
101
+ transition: color 0.1s, border-color 0.1s;
102
+ }
103
+ .bpmnkit-cc-tab:hover {
104
+ color: var(--bpmnkit-fg, #cdd6f4);
105
+ }
106
+ .bpmnkit-cc-tab--active {
107
+ border-bottom-color: var(--bpmnkit-accent, #6b9df7);
108
+ color: var(--bpmnkit-accent, #6b9df7);
109
+ }
110
+ /* Content */
111
+ .bpmnkit-cc-panel__content {
112
+ flex: 1;
113
+ overflow-y: auto;
114
+ padding: 16px;
115
+ }
116
+ /* Built-in card grid */
117
+ .bpmnkit-cc-grid {
118
+ display: grid;
119
+ grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
120
+ gap: 10px;
121
+ }
122
+ .bpmnkit-cc-card {
123
+ display: flex;
124
+ flex-direction: column;
125
+ gap: 6px;
126
+ background: var(--bpmnkit-surface-2, #1e1e2e);
127
+ border: 1px solid var(--bpmnkit-border, #2a2a42);
128
+ border-radius: 8px;
129
+ cursor: pointer;
130
+ padding: 12px;
131
+ transition: border-color 0.15s, background 0.15s;
132
+ }
133
+ .bpmnkit-cc-card:hover {
134
+ border-color: var(--bpmnkit-accent, #6b9df7);
135
+ background: var(--bpmnkit-accent-subtle, rgba(107,157,247,0.08));
136
+ }
137
+ .bpmnkit-cc-card__icon {
138
+ width: 20px;
139
+ height: 20px;
140
+ flex-shrink: 0;
141
+ }
142
+ .bpmnkit-cc-card__icon svg {
143
+ width: 20px;
144
+ height: 20px;
145
+ }
146
+ .bpmnkit-cc-card__body {
147
+ flex: 1;
148
+ }
149
+ .bpmnkit-cc-card__name {
150
+ font-weight: 600;
151
+ font-size: 13px;
152
+ color: var(--bpmnkit-fg, #cdd6f4);
153
+ margin-bottom: 3px;
154
+ }
155
+ .bpmnkit-cc-card__desc {
156
+ font-size: 11px;
157
+ color: var(--bpmnkit-fg-muted, #8888a8);
158
+ line-height: 1.4;
159
+ display: -webkit-box;
160
+ -webkit-line-clamp: 2;
161
+ -webkit-box-orient: vertical;
162
+ overflow: hidden;
163
+ }
164
+ .bpmnkit-cc-card__use {
165
+ align-self: flex-start;
166
+ background: var(--bpmnkit-accent, #6b9df7);
167
+ border: none;
168
+ border-radius: 4px;
169
+ color: #fff;
170
+ cursor: pointer;
171
+ font-family: inherit;
172
+ font-size: 11px;
173
+ font-weight: 600;
174
+ padding: 4px 10px;
175
+ transition: opacity 0.1s;
176
+ }
177
+ .bpmnkit-cc-card__use:hover {
178
+ opacity: 0.85;
179
+ }
180
+ /* Community row list */
181
+ .bpmnkit-cc-list {
182
+ display: flex;
183
+ flex-direction: column;
184
+ gap: 4px;
185
+ }
186
+ .bpmnkit-cc-row {
187
+ display: flex;
188
+ align-items: center;
189
+ gap: 12px;
190
+ background: var(--bpmnkit-surface-2, #1e1e2e);
191
+ border: 1px solid var(--bpmnkit-border, #2a2a42);
192
+ border-radius: 6px;
193
+ cursor: pointer;
194
+ padding: 10px 12px;
195
+ transition: border-color 0.15s, background 0.15s;
196
+ }
197
+ .bpmnkit-cc-row:hover {
198
+ border-color: var(--bpmnkit-accent, #6b9df7);
199
+ background: var(--bpmnkit-accent-subtle, rgba(107,157,247,0.08));
200
+ }
201
+ .bpmnkit-cc-row__body {
202
+ flex: 1;
203
+ min-width: 0;
204
+ }
205
+ .bpmnkit-cc-row__name {
206
+ font-weight: 600;
207
+ color: var(--bpmnkit-fg, #cdd6f4);
208
+ }
209
+ .bpmnkit-cc-row__desc {
210
+ font-size: 11px;
211
+ color: var(--bpmnkit-fg-muted, #8888a8);
212
+ overflow: hidden;
213
+ text-overflow: ellipsis;
214
+ white-space: nowrap;
215
+ }
216
+ .bpmnkit-cc-row__import {
217
+ background: none;
218
+ border: 1px solid var(--bpmnkit-border, #2a2a42);
219
+ border-radius: 4px;
220
+ color: var(--bpmnkit-fg-muted, #8888a8);
221
+ cursor: pointer;
222
+ flex-shrink: 0;
223
+ font-family: inherit;
224
+ font-size: 11px;
225
+ padding: 4px 10px;
226
+ transition: border-color 0.1s, color 0.1s;
227
+ white-space: nowrap;
228
+ }
229
+ .bpmnkit-cc-row__import:hover {
230
+ border-color: var(--bpmnkit-accent, #6b9df7);
231
+ color: var(--bpmnkit-accent, #6b9df7);
232
+ }
233
+ /* Empty state */
234
+ .bpmnkit-cc-empty {
235
+ color: var(--bpmnkit-fg-muted, #8888a8);
236
+ font-size: 13px;
237
+ padding: 32px 0;
238
+ text-align: center;
239
+ }
240
+ /* Footer */
241
+ .bpmnkit-cc-panel__footer {
242
+ border-top: 1px solid var(--bpmnkit-border, #2a2a42);
243
+ display: flex;
244
+ gap: 8px;
245
+ padding: 10px 16px;
246
+ flex-shrink: 0;
247
+ }
248
+ .bpmnkit-cc-footer-btn {
249
+ background: none;
250
+ border: 1px solid var(--bpmnkit-border, #2a2a42);
251
+ border-radius: 5px;
252
+ color: var(--bpmnkit-fg-muted, #8888a8);
253
+ cursor: pointer;
254
+ font-family: inherit;
255
+ font-size: 12px;
256
+ padding: 5px 12px;
257
+ transition: border-color 0.1s, color 0.1s;
258
+ }
259
+ .bpmnkit-cc-footer-btn:hover {
260
+ border-color: var(--bpmnkit-accent, #6b9df7);
261
+ color: var(--bpmnkit-accent, #6b9df7);
262
+ }
263
+ /* Light theme overrides */
264
+ [data-bpmnkit-hud-theme="light"] .bpmnkit-cc-panel {
265
+ background: var(--bpmnkit-surface, #ffffff);
266
+ border-color: var(--bpmnkit-border, #d0d0e8);
267
+ color: var(--bpmnkit-fg, #1a1a2e);
268
+ }
269
+ [data-bpmnkit-hud-theme="light"] .bpmnkit-cc-panel__header,
270
+ [data-bpmnkit-hud-theme="light"] .bpmnkit-cc-panel__tabs,
271
+ [data-bpmnkit-hud-theme="light"] .bpmnkit-cc-panel__footer {
272
+ border-color: var(--bpmnkit-border, #d0d0e8);
273
+ }
274
+ [data-bpmnkit-hud-theme="light"] .bpmnkit-cc-panel__title,
275
+ [data-bpmnkit-hud-theme="light"] .bpmnkit-cc-card__name,
276
+ [data-bpmnkit-hud-theme="light"] .bpmnkit-cc-row__name {
277
+ color: var(--bpmnkit-fg, #1a1a2e);
278
+ }
279
+ [data-bpmnkit-hud-theme="light"] .bpmnkit-cc-panel__search-input,
280
+ [data-bpmnkit-hud-theme="light"] .bpmnkit-cc-card,
281
+ [data-bpmnkit-hud-theme="light"] .bpmnkit-cc-row {
282
+ background: var(--bpmnkit-surface-2, #eeeef8);
283
+ border-color: var(--bpmnkit-border, #d0d0e8);
284
+ }
3
285
  /* ── Toast notifications ─────────────────────────────────────────────────── */
4
286
  .bpmnkit-cc-toast {
5
287
  position: fixed;
@@ -1,15 +1,13 @@
1
1
  /**
2
2
  * @bpmnkit/canvas-plugin-connector-catalog — Import API connectors from
3
- * OpenAPI specs into the BPMN editor via the command palette.
3
+ * OpenAPI specs into the BPMN editor via the command palette and a visual
4
+ * catalog panel.
4
5
  *
5
- * Exposes 30+ pre-configured APIs (GitHub, Stripe, Slack, …) as searchable
6
- * commands in Ctrl+K / ⌘K. Selecting one fetches the spec, generates connector
7
- * templates via `@bpmnkit/connector-gen`, and registers them in the
8
- * config-panel-bpmn connector selector — no restart required.
6
+ * The catalog panel (Ctrl+K "Browse connectors") shows two tabs:
7
+ * Built-in Workers bpmnkit workers, always available without a proxy
8
+ * Community APIs — 30+ pre-configured OpenAPI specs (GitHub, Stripe, …)
9
9
  *
10
- * Additional commands accept any OpenAPI 3.x spec URL ("Import from OpenAPI
11
- * URL…") or a local file upload ("Import from OpenAPI file…") for custom,
12
- * private, or CORS-restricted APIs.
10
+ * Additional commands accept any OpenAPI 3.x spec URL or a local file upload.
13
11
  *
14
12
  * ## Usage
15
13
  * ```typescript
@@ -27,24 +25,39 @@
27
25
  import type { CanvasPlugin } from "@bpmnkit/canvas";
28
26
  import type { CommandPalettePlugin } from "../command-palette/index.js";
29
27
  import type { ElementTemplate } from "../config-panel-bpmn/index.js";
28
+ import { BUILTIN_WORKER_TEMPLATES } from "./builtin-templates.js";
30
29
  import { CONNECTOR_CATALOG_CSS, CONNECTOR_CATALOG_STYLE_ID, injectConnectorCatalogStyles } from "./css.js";
31
30
  export { CONNECTOR_CATALOG_CSS, CONNECTOR_CATALOG_STYLE_ID, injectConnectorCatalogStyles };
31
+ export { BUILTIN_WORKER_TEMPLATES };
32
32
  /** Subset of the config-panel-bpmn plugin API needed by this plugin. */
33
33
  export interface TemplateRegistrar {
34
34
  registerTemplate(template: ElementTemplate): void;
35
35
  }
36
+ export interface ConnectorCatalogOptions {
37
+ /** Base URL of the bpmnkit proxy (e.g. "http://localhost:3033"). When set,
38
+ * built-in worker templates are fetched from `<proxyUrl>/worker-templates`
39
+ * and registered automatically on plugin install. */
40
+ proxyUrl?: string;
41
+ }
42
+ /** Extended plugin interface — exposes `openCatalog()` for programmatic use. */
43
+ export interface ConnectorCatalogPlugin extends CanvasPlugin {
44
+ openCatalog(): void;
45
+ }
36
46
  /**
37
47
  * Creates the connector catalog plugin.
38
48
  *
39
- * Registers one command per built-in catalog entry plus an "Import from
40
- * OpenAPI URL" command. All commands appear in the command palette (Ctrl+K /
41
- * ⌘K). Selecting a catalog entry fetches the spec, generates connector
42
- * templates, and registers them immediately in the config panel connector
43
- * selector.
49
+ * Registers a visual catalog panel (two tabs: Built-in Workers + Community
50
+ * APIs) plus command palette commands for all catalog entries. The panel is
51
+ * accessible via the "Browse connectors…" palette command.
52
+ *
53
+ * Built-in worker templates are registered immediately (static, no proxy).
54
+ * When `options.proxyUrl` is set, additional templates are fetched from the
55
+ * local proxy at startup.
44
56
  *
45
57
  * @param registrar - The config-panel-bpmn plugin (or any object with
46
58
  * `registerTemplate`).
47
59
  * @param palette - The command palette plugin.
60
+ * @param options - Optional configuration.
48
61
  */
49
- export declare function createConnectorCatalogPlugin(registrar: TemplateRegistrar, palette: CommandPalettePlugin): CanvasPlugin;
62
+ export declare function createConnectorCatalogPlugin(registrar: TemplateRegistrar, palette: CommandPalettePlugin, options?: ConnectorCatalogOptions): ConnectorCatalogPlugin;
50
63
  //# sourceMappingURL=index.d.ts.map
@@ -1,15 +1,13 @@
1
1
  /**
2
2
  * @bpmnkit/canvas-plugin-connector-catalog — Import API connectors from
3
- * OpenAPI specs into the BPMN editor via the command palette.
3
+ * OpenAPI specs into the BPMN editor via the command palette and a visual
4
+ * catalog panel.
4
5
  *
5
- * Exposes 30+ pre-configured APIs (GitHub, Stripe, Slack, …) as searchable
6
- * commands in Ctrl+K / ⌘K. Selecting one fetches the spec, generates connector
7
- * templates via `@bpmnkit/connector-gen`, and registers them in the
8
- * config-panel-bpmn connector selector — no restart required.
6
+ * The catalog panel (Ctrl+K "Browse connectors") shows two tabs:
7
+ * Built-in Workers bpmnkit workers, always available without a proxy
8
+ * Community APIs — 30+ pre-configured OpenAPI specs (GitHub, Stripe, …)
9
9
  *
10
- * Additional commands accept any OpenAPI 3.x spec URL ("Import from OpenAPI
11
- * URL…") or a local file upload ("Import from OpenAPI file…") for custom,
12
- * private, or CORS-restricted APIs.
10
+ * Additional commands accept any OpenAPI 3.x spec URL or a local file upload.
13
11
  *
14
12
  * ## Usage
15
13
  * ```typescript
@@ -25,8 +23,11 @@
25
23
  * @packageDocumentation
26
24
  */
27
25
  import { CATALOG, generate, generateFromCatalog, generateFromUrl, } from "@bpmnkit/connector-gen/browser";
26
+ import { BUILTIN_WORKER_TEMPLATES } from "./builtin-templates.js";
28
27
  import { CONNECTOR_CATALOG_CSS, CONNECTOR_CATALOG_STYLE_ID, injectConnectorCatalogStyles, } from "./css.js";
28
+ import { CatalogPanel } from "./panel.js";
29
29
  export { CONNECTOR_CATALOG_CSS, CONNECTOR_CATALOG_STYLE_ID, injectConnectorCatalogStyles };
30
+ export { BUILTIN_WORKER_TEMPLATES };
30
31
  // ── Toast helper ──────────────────────────────────────────────────────────────
31
32
  function showToast(message, variant) {
32
33
  const el = document.createElement("div");
@@ -102,8 +103,21 @@ function loadFromFile(registrar) {
102
103
  };
103
104
  input.click();
104
105
  }
106
+ async function loadBuiltinWorkers(proxyUrl, registrar) {
107
+ try {
108
+ const res = await fetch(`${proxyUrl}/worker-templates`);
109
+ if (!res.ok)
110
+ return;
111
+ const templates = (await res.json());
112
+ for (const t of templates) {
113
+ registrar.registerTemplate(t);
114
+ }
115
+ }
116
+ catch {
117
+ // proxy unavailable — built-in workers simply aren't registered
118
+ }
119
+ }
105
120
  async function loadFromUrl(url, registrar) {
106
- // Derive idPrefix and a display prefix from the hostname
107
121
  let idPrefix = "io.custom";
108
122
  let prefix = "Custom";
109
123
  try {
@@ -132,22 +146,61 @@ async function loadFromUrl(url, registrar) {
132
146
  /**
133
147
  * Creates the connector catalog plugin.
134
148
  *
135
- * Registers one command per built-in catalog entry plus an "Import from
136
- * OpenAPI URL" command. All commands appear in the command palette (Ctrl+K /
137
- * ⌘K). Selecting a catalog entry fetches the spec, generates connector
138
- * templates, and registers them immediately in the config panel connector
139
- * selector.
149
+ * Registers a visual catalog panel (two tabs: Built-in Workers + Community
150
+ * APIs) plus command palette commands for all catalog entries. The panel is
151
+ * accessible via the "Browse connectors…" palette command.
152
+ *
153
+ * Built-in worker templates are registered immediately (static, no proxy).
154
+ * When `options.proxyUrl` is set, additional templates are fetched from the
155
+ * local proxy at startup.
140
156
  *
141
157
  * @param registrar - The config-panel-bpmn plugin (or any object with
142
158
  * `registerTemplate`).
143
159
  * @param palette - The command palette plugin.
160
+ * @param options - Optional configuration.
144
161
  */
145
- export function createConnectorCatalogPlugin(registrar, palette) {
162
+ export function createConnectorCatalogPlugin(registrar, palette, options) {
146
163
  let _deregister = null;
147
- return {
164
+ let _panel = null;
165
+ const plugin = {
148
166
  name: "connector-catalog",
149
167
  install() {
150
168
  injectConnectorCatalogStyles();
169
+ // Register static built-in worker templates immediately
170
+ for (const t of BUILTIN_WORKER_TEMPLATES) {
171
+ registrar.registerTemplate(t);
172
+ }
173
+ // Also fetch from proxy if configured (may add more or updated templates)
174
+ if (options?.proxyUrl) {
175
+ void loadBuiltinWorkers(options.proxyUrl, registrar);
176
+ }
177
+ // Build the visual catalog panel (lazy — created on first open)
178
+ _panel = new CatalogPanel({
179
+ builtinTemplates: BUILTIN_WORKER_TEMPLATES,
180
+ catalogEntries: CATALOG,
181
+ onUseBuiltin(template) {
182
+ // Already registered above — just confirm to the user
183
+ const toast = showToast(`"${template.name}" ready — select a service task to apply it`, "success");
184
+ setTimeout(() => toast.remove(), 3500);
185
+ },
186
+ onLoadCatalogEntry(id) {
187
+ void loadCatalogEntry(id, registrar);
188
+ },
189
+ onLoadFromUrl(url) {
190
+ void loadFromUrl(url, registrar);
191
+ },
192
+ onLoadFromFile() {
193
+ loadFromFile(registrar);
194
+ },
195
+ });
196
+ const browseCmd = {
197
+ id: "connector-catalog:browse",
198
+ title: "Browse connectors\u2026",
199
+ description: "Open the connector catalog to pick a built-in worker or import an API",
200
+ action() {
201
+ _panel?.open();
202
+ },
203
+ };
151
204
  const catalogCmds = CATALOG.map((entry) => ({
152
205
  id: `connector-catalog:${entry.id}`,
153
206
  title: `Import API: ${entry.name}`,
@@ -177,12 +230,18 @@ export function createConnectorCatalogPlugin(registrar, palette) {
177
230
  loadFromFile(registrar);
178
231
  },
179
232
  };
180
- _deregister = palette.addCommands([...catalogCmds, urlCmd, fileCmd]);
233
+ _deregister = palette.addCommands([browseCmd, ...catalogCmds, urlCmd, fileCmd]);
181
234
  },
182
235
  uninstall() {
183
236
  _deregister?.();
184
237
  _deregister = null;
238
+ _panel?.close();
239
+ _panel = null;
240
+ },
241
+ openCatalog() {
242
+ _panel?.open();
185
243
  },
186
244
  };
245
+ return plugin;
187
246
  }
188
247
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Connector catalog panel — a visual modal with two tabs:
3
+ *
4
+ * • Built-in Workers — bpmnkit workers, always available (no proxy needed)
5
+ * • Community APIs — OpenAPI-generated connectors from the catalog
6
+ *
7
+ * Usage:
8
+ * const panel = new CatalogPanel(registrar, onLoadCatalogEntry, onLoadFromUrl)
9
+ * panel.open()
10
+ */
11
+ import type { CatalogEntry } from "@bpmnkit/connector-gen/browser";
12
+ import type { ElementTemplate } from "../config-panel-bpmn/template-types.js";
13
+ export interface CatalogPanelOptions {
14
+ builtinTemplates: ElementTemplate[];
15
+ catalogEntries: CatalogEntry[];
16
+ onUseBuiltin(template: ElementTemplate): void;
17
+ onLoadCatalogEntry(id: string): void;
18
+ onLoadFromUrl(url: string): void;
19
+ onLoadFromFile(): void;
20
+ }
21
+ export declare class CatalogPanel {
22
+ private readonly opts;
23
+ private overlay;
24
+ private activeTab;
25
+ private query;
26
+ constructor(opts: CatalogPanelOptions);
27
+ open(): void;
28
+ close(): void;
29
+ private build;
30
+ private renderContent;
31
+ private renderBuiltins;
32
+ private renderCommunity;
33
+ }
34
+ //# sourceMappingURL=panel.d.ts.map