@burdenoff/fe-libs 2026.1006.1 → 2026.1006.2

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 +1 @@
1
- {"version":3,"file":"ConnectionDialogPanel.d.ts","sourceRoot":"","sources":["../../src/connections/ConnectionDialogPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAML,KAAK,EAAE,EAEP,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAKf,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAE3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAW5C,OAAO,KAAK,EACV,qBAAqB,EAErB,iBAAiB,EAElB,MAAM,SAAS,CAAC;AAKjB,MAAM,WAAW,0BAA0B;IACzC,GAAG,EAAE,cAAc,CAAC;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,UAAU,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,cAAc,EAAE,WAAW,GAAG,SAAS,CAAC;IACxC,YAAY,EAAE,OAAO,CAAC;IACtB,cAAc,EAAE,OAAO,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,cAAc,EAAE,OAAO,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC;IACnD,mBAAmB,CAAC,EAAE,CAAC,UAAU,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC9D,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAA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EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC9D,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI,CAAC;IACjD,mBAAmB,CAAC,EAAE,CAAC,UAAU,EAAE,iBAAiB,KAAK,SAAS,CAAC;CACpE;AAUD,eAAO,MAAM,qBAAqB,EAAE,EAAE,CAAC,0BAA0B,CAoXhE,CAAC"}
@@ -1,85 +1,91 @@
1
1
  import { cn as e } from "../lib/utils.js";
2
2
  import { initialValuesFromSchema as t } from "../credentials/schema.js";
3
- import { resolveFlow as n, resolveMethod as r, resolveSchema as i, selectableMethods as ee } from "./connectionFlow.js";
4
- import { authTypeLabel as a } from "./labels.js";
5
- import { ProviderIcon as o } from "./ProviderIcon.js";
6
- import { ConnectionDetailsTab as te, ConnectionSharingTab as ne } from "./ConnectionDetailsTab.js";
7
- import { EMPTY_STORAGE as re } from "./storage.js";
8
- import { TITLE_ID as ie } from "./frame.js";
9
- import { parseScopeOptions as ae, requestedScopes as oe } from "./scopes.js";
10
- import { ConnectionFormTab as se } from "./ConnectionFormTab.js";
11
- import { DialogHeading as ce } from "./DialogHeading.js";
12
- import { ProviderPickerPanel as le } from "./ProviderPickerPanel.js";
13
- import { useConnectionSubmit as ue } from "./useConnectionSubmit.js";
14
- import { useCallback as s, useEffect as de, useId as fe, useMemo as c, useState as l } from "react";
15
- import { AlertCircle as u, Check as pe, CheckCircle2 as me, Info as he, Link2 as ge, Loader2 as d, Share2 as _e, X as ve } from "lucide-react";
16
- import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
17
- import * as h from "@radix-ui/react-dialog";
3
+ import { normalizeStorageMode as n, resolveFlow as r, resolveMethod as i, resolveSchema as a, selectableMethods as ee, supportedStorageModes as o } from "./connectionFlow.js";
4
+ import { authTypeLabel as te } from "./labels.js";
5
+ import { ProviderIcon as ne } from "./ProviderIcon.js";
6
+ import { ConnectionDetailsTab as re, ConnectionSharingTab as ie } from "./ConnectionDetailsTab.js";
7
+ import { EMPTY_STORAGE as s } from "./storage.js";
8
+ import { TITLE_ID as ae } from "./frame.js";
9
+ import { parseScopeOptions as oe, requestedScopes as se } from "./scopes.js";
10
+ import { ConnectionFormTab as ce } from "./ConnectionFormTab.js";
11
+ import { DialogHeading as le } from "./DialogHeading.js";
12
+ import { ProviderPickerPanel as ue } from "./ProviderPickerPanel.js";
13
+ import { useConnectionSubmit as de } from "./useConnectionSubmit.js";
14
+ import { useCallback as c, useEffect as fe, useId as pe, useMemo as l, useState as u } from "react";
15
+ import { AlertCircle as me, Check as he, CheckCircle2 as ge, Info as _e, Link2 as ve, Loader2 as d, Share2 as f, X as ye } from "lucide-react";
16
+ import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
17
+ import * as g from "@radix-ui/react-dialog";
18
18
  //#region src/connections/ConnectionDialogPanel.tsx
19
- function g(e, n) {
20
- return t(i(e, r(e, n)));
19
+ function _(e, n) {
20
+ return t(a(e, i(e, n)));
21
21
  }
22
- var _ = ({ api: t, onClose: _, callbackUrl: v, translate: y, providerId: b, providerKey: x, providerSource: ye, requireVault: S, canCreateVault: be, defaultName: C, extraConfig: xe, showSharingTab: Se, pickerTitle: Ce, searchInputRef: we, onConnectionCreated: Te, onError: w, onEvent: T, renderSuccessAction: E }) => {
23
- let D = !!(b || x), [O, Ee] = l(null), [k, De] = l(D), [A, j] = l("connection"), [M, N] = l(C ?? ""), [P, Oe] = l(""), [ke, F] = l(null), [I, L] = l({}), [R, z] = l(null), [B, Ae] = l(re), V = fe(), H = s((e) => `${V}-${e}`, [V]), { submit: je, busy: U, oauthWaiting: Me, errorMessage: Ne, setErrorMessage: W, created: G } = ue({
22
+ var v = ({ api: t, onClose: v, callbackUrl: y, translate: b, providerId: x, providerKey: S, providerSource: be, requireVault: C, canCreateVault: xe, defaultName: w, extraConfig: Se, showSharingTab: Ce, pickerTitle: we, searchInputRef: Te, onConnectionCreated: Ee, onError: De, onEvent: Oe, renderSuccessAction: T }) => {
23
+ let E = !!(x || S), [D, ke] = u(null), [O, k] = u(E), [A, j] = u("connection"), [M, N] = u(w ?? ""), [P, Ae] = u(""), [je, F] = u(null), [I, L] = u({}), [R, z] = u(null), [B, V] = u(s), H = pe(), U = c((e) => `${H}-${e}`, [H]), { submit: Me, busy: W, oauthWaiting: Ne, errorMessage: Pe, setErrorMessage: G, created: K } = de({
24
24
  api: t,
25
- callbackUrl: v,
26
- translate: y,
27
- onConnectionCreated: Te,
28
- onError: w,
29
- onEvent: T
30
- }), K = s((e) => {
31
- Ee(e), N(C ?? `${e.name} Connection`), F(null), L(g(e, null)), z(null), W("");
32
- }, [C, W]), q = s((e) => {
33
- O && (F(e), L(g(O, e)), z(null), W(""));
34
- }, [O, W]);
35
- de(() => {
25
+ callbackUrl: y,
26
+ translate: b,
27
+ onConnectionCreated: Ee,
28
+ onError: De,
29
+ onEvent: Oe
30
+ }), q = c((e) => {
31
+ ke(e), N(w ?? `${e.name} Connection`), F(null), L(_(e, null)), V(n(s, o(e, i(e, null)))), z(null), G("");
32
+ }, [w, G]), Fe = c((e) => {
36
33
  if (!D) return;
34
+ F(e), L(_(D, e));
35
+ let t = o(D, i(D, e));
36
+ V((e) => ({
37
+ ...n(e, t),
38
+ secretId: ""
39
+ })), z(null), G("");
40
+ }, [D, G]);
41
+ fe(() => {
42
+ if (!E) return;
37
43
  let e = !1;
38
44
  return t.getProvider({
39
- id: b ?? void 0,
40
- key: x ?? void 0
45
+ id: x ?? void 0,
46
+ key: S ?? void 0
41
47
  }).then((t) => {
42
- !e && t && K(t);
48
+ !e && t && q(t);
43
49
  }).catch(() => void 0).finally(() => {
44
- e || De(!1);
50
+ e || k(!1);
45
51
  }), () => {
46
52
  e = !0;
47
53
  };
48
54
  }, [
49
- D,
50
- b,
55
+ E,
51
56
  x,
57
+ S,
52
58
  t,
53
- K
59
+ q
54
60
  ]);
55
- let J = O ? r(O, ke) : null, Pe = O ? n(O, J) : "fields", Fe = c(() => O ? i(O, J) : null, [O, J]), Y = c(() => ae(J?.availableScopes ?? O?.availableScopes), [J, O]), Ie = J && J.defaultScopes.length > 0 ? J.defaultScopes : O?.defaultScopes ?? [], Le = () => {
56
- O && je({
57
- provider: O,
61
+ let J = D ? i(D, je) : null, Ie = D ? r(D, J) : "fields", Le = l(() => D ? a(D, J) : null, [D, J]), Y = l(() => oe(J?.availableScopes ?? D?.availableScopes), [J, D]), Re = J && J.defaultScopes.length > 0 ? J.defaultScopes : D?.defaultScopes ?? [], ze = () => {
62
+ D && Me({
63
+ provider: D,
58
64
  method: J,
59
65
  name: M,
60
66
  description: P,
61
67
  values: I,
62
68
  storage: B,
63
- requireVault: S,
64
- extraConfig: xe
65
- }, oe(R, Y));
69
+ requireVault: C,
70
+ extraConfig: Se
71
+ }, se(R, Y));
66
72
  }, X = [
67
73
  {
68
74
  key: "connection",
69
- label: y("integrations.addConnection.tabs.connection", "Connection"),
70
- icon: ge
75
+ label: b("integrations.addConnection.tabs.connection", "Connection"),
76
+ icon: ve
71
77
  },
72
- ...Se ? [{
78
+ ...Ce ? [{
73
79
  key: "sharing",
74
- label: y("integrations.addConnection.tabs.sharing", "Sharing"),
75
- icon: _e
80
+ label: b("integrations.addConnection.tabs.sharing", "Sharing"),
81
+ icon: f
76
82
  }] : [],
77
83
  {
78
84
  key: "details",
79
- label: y("integrations.addConnection.tabs.details", "Details"),
80
- icon: he
85
+ label: b("integrations.addConnection.tabs.details", "Details"),
86
+ icon: _e
81
87
  }
82
- ], Z = (e) => H(`tab-${e}`), Q = H("tabpanel"), Re = (e) => {
88
+ ], Z = (e) => U(`tab-${e}`), Q = U("tabpanel"), Be = (e) => {
83
89
  let t = X.map((e) => e.key), n = t.indexOf(A), r = {
84
90
  ArrowRight: n + 1,
85
91
  ArrowDown: n + 1,
@@ -91,98 +97,98 @@ var _ = ({ api: t, onClose: _, callbackUrl: v, translate: y, providerId: b, prov
91
97
  if (r === void 0) return;
92
98
  let i = t[(r + t.length) % t.length];
93
99
  e.preventDefault(), j(i), document.getElementById(Z(i))?.focus();
94
- }, $ = !!O && !G;
95
- return /* @__PURE__ */ m(f, { children: [
96
- /* @__PURE__ */ m("div", {
100
+ }, $ = !!D && !K;
101
+ return /* @__PURE__ */ h(p, { children: [
102
+ /* @__PURE__ */ h("div", {
97
103
  className: "flex flex-shrink-0 items-center justify-between border-b border-border-subtle px-5 py-4",
98
- children: [/* @__PURE__ */ m("div", {
104
+ children: [/* @__PURE__ */ h("div", {
99
105
  className: "flex min-w-0 items-center gap-3",
100
- children: [O && /* @__PURE__ */ p(o, {
101
- provider: O,
106
+ children: [D && /* @__PURE__ */ m(ne, {
107
+ provider: D,
102
108
  size: 32
103
- }), /* @__PURE__ */ m("div", {
109
+ }), /* @__PURE__ */ h("div", {
104
110
  className: "min-w-0",
105
- children: [/* @__PURE__ */ p(ce, {
106
- id: ie,
107
- className: e("text-base font-semibold text-text-primary", O && "truncate"),
108
- children: O ? y("integrations.addConnection.dialog.accountTitle", "{{provider}} account", { provider: O.name }) : Ce ?? y("integrations.addConnection.dialog.title", "Add new credential")
109
- }), /* @__PURE__ */ p(h.Description, {
111
+ children: [/* @__PURE__ */ m(le, {
112
+ id: ae,
113
+ className: e("text-base font-semibold text-text-primary", D && "truncate"),
114
+ children: D ? b("integrations.addConnection.dialog.accountTitle", "{{provider}} account", { provider: D.name }) : we ?? b("integrations.addConnection.dialog.title", "Add new credential")
115
+ }), /* @__PURE__ */ m(g.Description, {
110
116
  className: "text-xs text-text-secondary",
111
- children: O ? a(J?.authType ?? O.authType, y) : y("integrations.addConnection.dialog.subtitle", "Select an app or service to connect to")
117
+ children: D ? te(J?.authType ?? D.authType, b) : b("integrations.addConnection.dialog.subtitle", "Select an app or service to connect to")
112
118
  })]
113
119
  })]
114
- }), /* @__PURE__ */ p(h.Close, {
120
+ }), /* @__PURE__ */ m(g.Close, {
115
121
  asChild: !0,
116
- children: /* @__PURE__ */ p("button", {
122
+ children: /* @__PURE__ */ m("button", {
117
123
  type: "button",
118
124
  className: "flex-shrink-0 rounded-md p-1.5 text-text-secondary transition-colors hover:bg-accent hover:text-text-primary",
119
- "aria-label": y("integrations.addConnection.actions.close", "Close dialog"),
120
- children: /* @__PURE__ */ p(ve, { size: 20 })
125
+ "aria-label": b("integrations.addConnection.actions.close", "Close dialog"),
126
+ children: /* @__PURE__ */ m(ye, { size: 20 })
121
127
  })
122
128
  })]
123
129
  }),
124
- /* @__PURE__ */ m("div", {
130
+ /* @__PURE__ */ h("div", {
125
131
  "data-testid": "add-connection-body",
126
132
  className: "flex min-h-0 flex-1 flex-col overflow-hidden sm:flex-row",
127
133
  children: [
128
- !D && !O && /* @__PURE__ */ p(le, {
134
+ !E && !D && /* @__PURE__ */ m(ue, {
129
135
  api: t,
130
- source: ye,
131
- translate: y,
132
- searchInputRef: we,
133
- onSelect: K
136
+ source: be,
137
+ translate: b,
138
+ searchInputRef: Te,
139
+ onSelect: q
134
140
  }),
135
- D && !O && k && /* @__PURE__ */ p("div", {
141
+ E && !D && O && /* @__PURE__ */ m("div", {
136
142
  className: "flex flex-1 items-center justify-center p-8",
137
- children: /* @__PURE__ */ p(d, {
143
+ children: /* @__PURE__ */ m(d, {
138
144
  size: 32,
139
145
  className: "animate-spin text-text-secondary"
140
146
  })
141
147
  }),
142
- D && !O && !k && /* @__PURE__ */ m("div", {
148
+ E && !D && !O && /* @__PURE__ */ h("div", {
143
149
  className: "flex flex-1 flex-col items-center justify-center p-8 text-center",
144
- children: [/* @__PURE__ */ p(u, {
150
+ children: [/* @__PURE__ */ m(me, {
145
151
  size: 32,
146
152
  className: "mb-3 text-text-secondary"
147
- }), /* @__PURE__ */ p("p", {
153
+ }), /* @__PURE__ */ m("p", {
148
154
  className: "text-sm text-text-secondary",
149
- children: y("integrations.addConnection.providerUnavailable", "This provider isn't available.")
155
+ children: b("integrations.addConnection.providerUnavailable", "This provider isn't available.")
150
156
  })]
151
157
  }),
152
- O && G && /* @__PURE__ */ m("div", {
158
+ D && K && /* @__PURE__ */ h("div", {
153
159
  className: "flex flex-1 flex-col items-center justify-center p-8 text-center",
154
160
  children: [
155
- /* @__PURE__ */ p("div", {
161
+ /* @__PURE__ */ m("div", {
156
162
  className: "mb-4 rounded-full bg-status-success-bg-subtle p-3",
157
- children: /* @__PURE__ */ p(me, {
163
+ children: /* @__PURE__ */ m(ge, {
158
164
  size: 48,
159
165
  className: "text-status-success-text"
160
166
  })
161
167
  }),
162
- /* @__PURE__ */ p("h3", {
168
+ /* @__PURE__ */ m("h3", {
163
169
  className: "mb-1 text-lg font-semibold text-text-primary",
164
- children: y("integrations.addConnection.success.title", "Connection Created!")
170
+ children: b("integrations.addConnection.success.title", "Connection Created!")
165
171
  }),
166
- /* @__PURE__ */ p("p", {
172
+ /* @__PURE__ */ m("p", {
167
173
  className: "mb-6 text-sm text-text-secondary",
168
- children: y("integrations.addConnection.success.description", "Your {{provider}} connection has been set up successfully.", { provider: O.name })
174
+ children: b("integrations.addConnection.success.description", "Your {{provider}} connection has been set up successfully.", { provider: D.name })
169
175
  }),
170
- E ? E(G) : /* @__PURE__ */ p("button", {
176
+ T ? T(K) : /* @__PURE__ */ m("button", {
171
177
  type: "button",
172
- onClick: _,
178
+ onClick: v,
173
179
  className: "rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text transition-colors hover:bg-action-primary-bg/90",
174
- children: y("integrations.addConnection.actions.done", "Done")
180
+ children: b("integrations.addConnection.actions.done", "Done")
175
181
  })
176
182
  ]
177
183
  }),
178
- O && $ && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("div", {
184
+ D && $ && /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m("div", {
179
185
  role: "tablist",
180
186
  "aria-labelledby": "add-connection-dialog-title",
181
187
  "data-testid": "add-connection-tabs",
182
188
  className: "flex flex-shrink-0 overflow-x-auto border-b border-border-subtle sm:block sm:w-40 sm:overflow-x-visible sm:border-b-0 sm:border-r sm:py-3",
183
189
  children: X.map((t) => {
184
190
  let n = t.icon, r = A === t.key;
185
- return /* @__PURE__ */ m("button", {
191
+ return /* @__PURE__ */ h("button", {
186
192
  id: Z(t.key),
187
193
  type: "button",
188
194
  role: "tab",
@@ -190,83 +196,84 @@ var _ = ({ api: t, onClose: _, callbackUrl: v, translate: y, providerId: b, prov
190
196
  "aria-controls": Q,
191
197
  tabIndex: r ? 0 : -1,
192
198
  onClick: () => j(t.key),
193
- onKeyDown: Re,
199
+ onKeyDown: Be,
194
200
  className: e("flex min-w-max items-center gap-2 border-b-2 px-4 py-2 text-sm font-medium transition-colors sm:w-full sm:border-b-0 sm:border-l-2", r ? "border-primary bg-accent/50 text-text-primary" : "border-transparent text-text-secondary hover:bg-accent/30 hover:text-text-primary"),
195
- children: [/* @__PURE__ */ p(n, {
201
+ children: [/* @__PURE__ */ m(n, {
196
202
  size: 16,
197
203
  "aria-hidden": "true"
198
204
  }), t.label]
199
205
  }, t.key);
200
206
  })
201
- }), /* @__PURE__ */ m("div", {
207
+ }), /* @__PURE__ */ h("div", {
202
208
  id: Q,
203
209
  role: "tabpanel",
204
210
  "aria-labelledby": Z(A),
205
211
  "data-testid": "add-connection-pane",
206
212
  className: "min-h-0 min-w-0 flex-1 overflow-y-auto p-5",
207
213
  children: [
208
- A === "connection" && /* @__PURE__ */ p(se, {
214
+ A === "connection" && /* @__PURE__ */ m(ce, {
209
215
  api: t,
210
- provider: O,
211
- methods: ee(O),
216
+ provider: D,
217
+ methods: ee(D),
212
218
  method: J,
213
- flow: Pe,
214
- schema: Fe,
219
+ flow: Ie,
220
+ schema: Le,
215
221
  name: M,
216
222
  onNameChange: N,
217
223
  description: P,
218
- onDescriptionChange: Oe,
224
+ onDescriptionChange: Ae,
219
225
  values: I,
220
226
  setValues: L,
221
- onMethodChange: q,
227
+ onMethodChange: Fe,
222
228
  storage: B,
223
- setStorage: Ae,
229
+ setStorage: V,
230
+ supportedStorageModes: o(D, J),
224
231
  scopeOptions: Y,
225
- defaultScopes: Ie,
232
+ defaultScopes: Re,
226
233
  scopeSelection: R,
227
234
  setScopeSelection: z,
228
- callbackUrl: v,
229
- requireVault: S,
230
- canCreateVault: be,
231
- errorMessage: Ne,
232
- busy: U,
233
- translate: y,
234
- fieldId: H
235
+ callbackUrl: y,
236
+ requireVault: C,
237
+ canCreateVault: xe,
238
+ errorMessage: Pe,
239
+ busy: W,
240
+ translate: b,
241
+ fieldId: U
235
242
  }),
236
- A === "sharing" && /* @__PURE__ */ p(ne, { translate: y }),
237
- A === "details" && /* @__PURE__ */ p(te, {
238
- provider: O,
239
- translate: y
243
+ A === "sharing" && /* @__PURE__ */ m(ie, { translate: b }),
244
+ A === "details" && /* @__PURE__ */ m(re, {
245
+ provider: D,
246
+ translate: b
240
247
  })
241
248
  ]
242
249
  })] })
243
250
  ]
244
251
  }),
245
- O && $ && /* @__PURE__ */ m("div", {
252
+ D && $ && /* @__PURE__ */ h("div", {
246
253
  "data-testid": "add-connection-footer",
247
254
  className: "flex flex-shrink-0 items-center justify-end gap-2 border-t border-border-subtle px-5 py-3",
248
- children: [/* @__PURE__ */ p("button", {
255
+ children: [/* @__PURE__ */ m("button", {
249
256
  type: "button",
250
- onClick: _,
257
+ onClick: v,
251
258
  className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-accent",
252
- children: y("integrations.addConnection.actions.cancel", "Cancel")
253
- }), /* @__PURE__ */ m("button", {
259
+ children: b("integrations.addConnection.actions.cancel", "Cancel")
260
+ }), /* @__PURE__ */ h("button", {
254
261
  type: "button",
255
262
  "data-testid": "add-connection-submit",
256
- onClick: Le,
257
- disabled: U || !M.trim(),
263
+ onClick: ze,
264
+ disabled: W || !M.trim(),
258
265
  className: "inline-flex items-center gap-1.5 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text transition-colors hover:bg-action-primary-bg/90 disabled:opacity-50",
259
- children: [U ? /* @__PURE__ */ p(d, {
266
+ children: [W ? /* @__PURE__ */ m(d, {
260
267
  size: 14,
261
268
  className: "animate-spin",
262
269
  "aria-hidden": "true"
263
- }) : /* @__PURE__ */ p(pe, {
270
+ }) : /* @__PURE__ */ m(he, {
264
271
  size: 14,
265
272
  "aria-hidden": "true"
266
- }), Me ? y("integrations.addConnection.actions.waiting", "Waiting...") : y("integrations.addConnection.actions.connect", "Connect")]
273
+ }), Ne ? b("integrations.addConnection.actions.waiting", "Waiting...") : b("integrations.addConnection.actions.connect", "Connect")]
267
274
  })]
268
275
  })
269
276
  ] });
270
277
  };
271
278
  //#endregion
272
- export { _ as ConnectionDialogPanel };
279
+ export { v as ConnectionDialogPanel };
@@ -3,7 +3,7 @@ import { Translator } from '../credentials/translate';
3
3
  import { AuthMethodFlow, FormSchema } from '../credentials/types';
4
4
  import { ConnectionsApi } from './api';
5
5
  import { ScopeOption, ScopeSelection } from './scopes';
6
- import { ConnectionAuthMethod, ConnectionProvider, CredentialStorageState } from './types';
6
+ import { ConnectionAuthMethod, ConnectionProvider, CredentialStorageMode, CredentialStorageState } from './types';
7
7
  export interface ConnectionFormTabProps {
8
8
  api: ConnectionsApi;
9
9
  provider: ConnectionProvider;
@@ -20,6 +20,7 @@ export interface ConnectionFormTabProps {
20
20
  onMethodChange: (key: string) => void;
21
21
  storage: CredentialStorageState;
22
22
  setStorage: (update: (current: CredentialStorageState) => CredentialStorageState) => void;
23
+ supportedStorageModes: readonly CredentialStorageMode[];
23
24
  scopeOptions: ScopeOption[];
24
25
  defaultScopes: string[];
25
26
  scopeSelection: ScopeSelection;
@@ -1 +1 @@
1
- {"version":3,"file":"ConnectionFormTab.d.ts","sourceRoot":"","sources":["../../src/connections/ConnectionFormTab.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAMhC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,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AAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;IACrD,cAAc,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,OAAO,EAAE,sBAAsB,CAAC;IAChC,UAAU,EAAE,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,sBAAsB,KAAK,sBAAsB,KAAK,IAAI,CAAC;IAC1F,qBAAqB,EAAE,SAAS,qBAAqB,EAAE,CAAC;IACxD,YAAY,EAAE,WAAW,EAAE,CAAC;IAC5B,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,cAAc,EAAE,cAAc,CAAC;IAC/B,iBAAiB,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACjD,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,cAAc,EAAE,OAAO,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,OAAO,CAAC;IACd,SAAS,EAAE,UAAU,CAAC;IACtB,0CAA0C;IAC1C,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;CACpC;AAED,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CAmPxD,CAAC"}
@@ -9,12 +9,12 @@ import { useState as l } from "react";
9
9
  import { AlertCircle as u, Copy as d, ExternalLink as f, Shield as p } from "lucide-react";
10
10
  import { jsx as m, jsxs as h } from "react/jsx-runtime";
11
11
  //#region src/connections/ConnectionFormTab.tsx
12
- var g = ({ api: g, provider: _, methods: v, method: y, flow: b, schema: x, name: S, onNameChange: C, description: w, onDescriptionChange: T, values: E, setValues: D, onMethodChange: O, storage: k, setStorage: A, scopeOptions: j, defaultScopes: M, scopeSelection: N, setScopeSelection: P, callbackUrl: F, requireVault: I, canCreateVault: L, errorMessage: R, busy: z, translate: B, fieldId: V }) => {
13
- let [H, U] = l(!1);
12
+ var g = ({ api: g, provider: _, methods: v, method: y, flow: b, schema: x, name: S, onNameChange: C, description: w, onDescriptionChange: T, values: E, setValues: D, onMethodChange: O, storage: k, setStorage: A, supportedStorageModes: j, scopeOptions: M, defaultScopes: N, scopeSelection: P, setScopeSelection: F, callbackUrl: I, requireVault: L, canCreateVault: R, errorMessage: z, busy: B, translate: V, fieldId: H }) => {
13
+ let [U, W] = l(!1);
14
14
  return /* @__PURE__ */ h("div", {
15
15
  className: "space-y-5",
16
16
  children: [
17
- R && /* @__PURE__ */ h("div", {
17
+ z && /* @__PURE__ */ h("div", {
18
18
  role: "alert",
19
19
  className: "flex items-start gap-2 rounded-md border border-status-error-border/20 bg-status-error-bg/10 px-3 py-2",
20
20
  children: [/* @__PURE__ */ m(u, {
@@ -22,14 +22,14 @@ var g = ({ api: g, provider: _, methods: v, method: y, flow: b, schema: x, name:
22
22
  className: "mt-0.5 flex-shrink-0 text-status-error-text"
23
23
  }), /* @__PURE__ */ m("span", {
24
24
  className: "text-sm text-status-error-text",
25
- children: R
25
+ children: z
26
26
  })]
27
27
  }),
28
28
  /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ h("label", {
29
- htmlFor: V("name"),
29
+ htmlFor: H("name"),
30
30
  className: "mb-1.5 block text-sm font-medium text-text-primary",
31
31
  children: [
32
- B("integrations.addConnection.fields.connectionName", "Connection Name"),
32
+ V("integrations.addConnection.fields.connectionName", "Connection Name"),
33
33
  " ",
34
34
  /* @__PURE__ */ m("span", {
35
35
  className: "text-status-error-text",
@@ -37,36 +37,37 @@ var g = ({ api: g, provider: _, methods: v, method: y, flow: b, schema: x, name:
37
37
  })
38
38
  ]
39
39
  }), /* @__PURE__ */ m("input", {
40
- id: V("name"),
40
+ id: H("name"),
41
41
  type: "text",
42
42
  value: S,
43
43
  onChange: (e) => C(e.target.value),
44
- placeholder: B("integrations.addConnection.fields.connectionNamePlaceholder", "e.g., My {{provider}} Connection", { provider: _.name }),
45
- disabled: z,
44
+ placeholder: V("integrations.addConnection.fields.connectionNamePlaceholder", "e.g., My {{provider}} Connection", { provider: _.name }),
45
+ disabled: B,
46
46
  className: s
47
47
  })] }),
48
48
  /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
49
- htmlFor: V("description"),
49
+ htmlFor: H("description"),
50
50
  className: "mb-1.5 block text-sm font-medium text-text-primary",
51
- children: B("integrations.addConnection.fields.description", "Description")
51
+ children: V("integrations.addConnection.fields.description", "Description")
52
52
  }), /* @__PURE__ */ m("input", {
53
- id: V("description"),
53
+ id: H("description"),
54
54
  type: "text",
55
55
  value: w,
56
56
  onChange: (e) => T(e.target.value),
57
- placeholder: B("integrations.addConnection.fields.descriptionPlaceholder", "Optional description..."),
58
- disabled: z,
57
+ placeholder: V("integrations.addConnection.fields.descriptionPlaceholder", "Optional description..."),
58
+ disabled: B,
59
59
  className: s
60
60
  })] }),
61
61
  i(b, _) && /* @__PURE__ */ m(o, {
62
62
  api: g,
63
63
  value: k,
64
64
  onChange: A,
65
+ supportedStorageModes: j,
65
66
  authType: y?.authType ?? _.authType,
66
- requireVault: I,
67
- canCreateVault: L,
68
- translate: B,
69
- disabled: z
67
+ requireVault: L,
68
+ canCreateVault: R,
69
+ translate: V,
70
+ disabled: B
70
71
  }),
71
72
  /* @__PURE__ */ h("div", {
72
73
  className: "space-y-3 rounded-md border border-border-subtle/50 bg-bg-surface p-4",
@@ -80,19 +81,19 @@ var g = ({ api: g, provider: _, methods: v, method: y, flow: b, schema: x, name:
80
81
  size: 16,
81
82
  className: "text-primary"
82
83
  }),
83
- B("integrations.addConnection.authentication.title", "Authentication"),
84
+ V("integrations.addConnection.authentication.title", "Authentication"),
84
85
  v.length <= 1 && /* @__PURE__ */ h("span", {
85
86
  className: "font-normal text-text-secondary",
86
- children: ["· ", y?.displayName ?? a(_.authType, B)]
87
+ children: ["· ", y?.displayName ?? a(_.authType, V)]
87
88
  })
88
89
  ]
89
90
  }), /* @__PURE__ */ m(n, {
90
91
  methods: v,
91
92
  selectedKey: y?.key ?? null,
92
93
  onSelect: O,
93
- disabled: z,
94
- idPrefix: V("auth-method"),
95
- translate: B,
94
+ disabled: B,
95
+ idPrefix: H("auth-method"),
96
+ translate: V,
96
97
  compact: !0
97
98
  })]
98
99
  }),
@@ -100,7 +101,7 @@ var g = ({ api: g, provider: _, methods: v, method: y, flow: b, schema: x, name:
100
101
  className: "space-y-2",
101
102
  children: /* @__PURE__ */ m(t, {
102
103
  method: y,
103
- translate: B
104
+ translate: V
104
105
  })
105
106
  }),
106
107
  b === "fields" && !x && /* @__PURE__ */ h("div", {
@@ -110,20 +111,20 @@ var g = ({ api: g, provider: _, methods: v, method: y, flow: b, schema: x, name:
110
111
  className: "flex-shrink-0 text-status-error-text"
111
112
  }), /* @__PURE__ */ m("span", {
112
113
  className: "text-sm text-status-error-text",
113
- children: B("integrations.addConnection.authentication.noForm", "This authentication method does not declare a configuration form.")
114
+ children: V("integrations.addConnection.authentication.noForm", "This authentication method does not declare a configuration form.")
114
115
  })]
115
116
  }),
116
117
  b === "fields" && x && /* @__PURE__ */ m("p", {
117
118
  className: "text-xs text-text-secondary",
118
- children: B("integrations.addConnection.authentication.secretsEncrypted", "Secret values are stored encrypted and never shown again.")
119
+ children: V("integrations.addConnection.authentication.secretsEncrypted", "Secret values are stored encrypted and never shown again.")
119
120
  }),
120
121
  b !== "minted" && x && /* @__PURE__ */ m(e, {
121
122
  schema: x,
122
123
  values: E,
123
124
  onChange: D,
124
- disabled: z,
125
- idPrefix: V("credential"),
126
- translate: B
125
+ disabled: B,
126
+ idPrefix: H("credential"),
127
+ translate: V
127
128
  }),
128
129
  b === "oauth2" && r(x) && /* @__PURE__ */ h("div", {
129
130
  className: "space-y-1.5 rounded-md border border-border-subtle bg-bg-surface px-3 py-2",
@@ -131,30 +132,30 @@ var g = ({ api: g, provider: _, methods: v, method: y, flow: b, schema: x, name:
131
132
  className: "flex items-center justify-between gap-2",
132
133
  children: [/* @__PURE__ */ m("span", {
133
134
  className: "text-xs font-medium text-text-primary",
134
- children: B("integrations.addConnection.authentication.redirectUriLabel", "Redirect URL to register in your app")
135
+ children: V("integrations.addConnection.authentication.redirectUriLabel", "Redirect URL to register in your app")
135
136
  }), /* @__PURE__ */ h("button", {
136
137
  type: "button",
137
138
  onClick: () => {
138
- navigator.clipboard?.writeText(F).then(() => {
139
- U(!0), window.setTimeout(() => U(!1), 2e3);
139
+ navigator.clipboard?.writeText(I).then(() => {
140
+ W(!0), window.setTimeout(() => W(!1), 2e3);
140
141
  }).catch(() => void 0);
141
142
  },
142
143
  className: "inline-flex items-center gap-1 text-xs font-medium text-primary hover:underline",
143
- children: [/* @__PURE__ */ m(d, { size: 12 }), H ? B("integrations.addConnection.authentication.copied", "Copied") : B("integrations.addConnection.authentication.copy", "Copy")]
144
+ children: [/* @__PURE__ */ m(d, { size: 12 }), U ? V("integrations.addConnection.authentication.copied", "Copied") : V("integrations.addConnection.authentication.copy", "Copy")]
144
145
  })]
145
146
  }), /* @__PURE__ */ m("code", {
146
147
  "data-testid": "oauth-redirect-url",
147
148
  className: "block break-all text-xs text-text-secondary",
148
- children: F
149
+ children: I
149
150
  })]
150
151
  }),
151
152
  b !== "fields" && /* @__PURE__ */ m(c, {
152
- options: j,
153
- defaultScopes: M,
154
- selection: N,
155
- onChange: P,
156
- translate: B,
157
- disabled: z
153
+ options: M,
154
+ defaultScopes: N,
155
+ selection: P,
156
+ onChange: F,
157
+ translate: V,
158
+ disabled: B
158
159
  }),
159
160
  b === "oauth2" && /* @__PURE__ */ h("div", {
160
161
  className: "flex items-center gap-2 rounded-md border border-border-default bg-status-info-bg-subtle px-3 py-2",
@@ -163,7 +164,7 @@ var g = ({ api: g, provider: _, methods: v, method: y, flow: b, schema: x, name:
163
164
  className: "flex-shrink-0 text-status-info-text"
164
165
  }), /* @__PURE__ */ m("span", {
165
166
  className: "text-xs text-status-info-text",
166
- children: B("integrations.addConnection.authentication.oauthPopupInfo", "A popup window will open for {{provider}} sign-in", { provider: _.name })
167
+ children: V("integrations.addConnection.authentication.oauthPopupInfo", "A popup window will open for {{provider}} sign-in", { provider: _.name })
167
168
  })]
168
169
  }),
169
170
  b === "minted" && /* @__PURE__ */ h("div", {
@@ -173,7 +174,7 @@ var g = ({ api: g, provider: _, methods: v, method: y, flow: b, schema: x, name:
173
174
  className: "flex-shrink-0 text-status-info-text"
174
175
  }), /* @__PURE__ */ m("span", {
175
176
  className: "text-xs text-status-info-text",
176
- children: B("integrations.addConnection.authentication.serviceAccount.description", "No credentials to enter — access is granted on your behalf and tokens are issued per use.")
177
+ children: V("integrations.addConnection.authentication.serviceAccount.description", "No credentials to enter — access is granted on your behalf and tokens are issued per use.")
177
178
  })]
178
179
  })
179
180
  ]
@@ -1,11 +1,13 @@
1
1
  import { FC } from 'react';
2
2
  import { Translator } from '../credentials/translate';
3
3
  import { ConnectionsApi } from './api';
4
- import { CredentialStorageState, ProviderAuthType } from './types';
4
+ import { CredentialStorageMode, CredentialStorageState, ProviderAuthType } from './types';
5
5
  interface CredentialStorageSelectorProps {
6
6
  api: ConnectionsApi;
7
7
  value: CredentialStorageState;
8
8
  onChange: (update: (current: CredentialStorageState) => CredentialStorageState) => void;
9
+ /** Existing direct consumers omit this; the shared dialog always passes the provider policy. */
10
+ supportedStorageModes?: readonly CredentialStorageMode[];
9
11
  authType: ProviderAuthType;
10
12
  /** False lets the integrations service hold the secret when no vault is picked. */
11
13
  requireVault: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"CredentialStorageSelector.d.ts","sourceRoot":"","sources":["../../src/connections/CredentialStorageSelector.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAA2C,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAGzE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,KAAK,EACV,sBAAsB,EAC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AS,EAAE,UAAU,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAWD,eAAO,MAAM,yBAAyB,EAAE,EAAE,CAAC,8BAA8B,CA+WxE,CAAC"}
@@ -3,57 +3,66 @@ import { useCallback as t, useEffect as n, useId as r, useState as i } from "rea
3
3
  import { AlertCircle as a, Database as o, FolderKey as s, KeyRound as c, Loader2 as l, Plus as u, X as d } from "lucide-react";
4
4
  import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
5
5
  //#region src/connections/CredentialStorageSelector.tsx
6
- var h = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary disabled:opacity-60", g = `${h} scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary`, _ = ({ api: a, value: d, onChange: _, authType: y, requireVault: b, canCreateVault: x, translate: S, disabled: C }) => {
7
- let [w, T] = i([]), [E, D] = i(!0), [O, k] = i([]), [A, j] = i(!1), [M, N] = i(!1), P = r(), F = t(async () => {
8
- D(!0);
6
+ var h = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary disabled:opacity-60", g = `${h} scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary`, _ = ({ api: a, value: d, onChange: _, supportedStorageModes: y = ["managed", "existing"], authType: b, requireVault: x, canCreateVault: S, translate: C, disabled: w }) => {
7
+ let [T, E] = i([]), [D, O] = i(!0), [k, A] = i([]), [j, M] = i(!1), [N, P] = i(!1), F = r(), I = y.includes("managed"), L = y.includes("existing"), R = x || !I, z = t(async () => {
8
+ O(!0);
9
9
  try {
10
- T(await a.listVaults());
10
+ E(await a.listVaults());
11
11
  } catch {
12
- T([]);
12
+ E([]);
13
13
  } finally {
14
- D(!1);
14
+ O(!1);
15
15
  }
16
16
  }, [a]);
17
17
  n(() => {
18
- F();
19
- }, [F]), n(() => {
20
- if (d.mode !== "existing" || !d.vaultId) {
21
- k([]);
18
+ z();
19
+ }, [z]), n(() => {
20
+ if (!L || d.mode !== "existing" || !d.vaultId) {
21
+ A([]), M(!1);
22
22
  return;
23
23
  }
24
24
  let t = !1;
25
- return j(!0), a.listVaultSecrets(d.vaultId).then((n) => {
26
- t || k(e(n, y));
25
+ return M(!0), a.listVaultSecrets(d.vaultId).then((n) => {
26
+ t || A(e(n, b));
27
27
  }).catch(() => {
28
- t || k([]);
28
+ t || A([]);
29
29
  }).finally(() => {
30
- t || j(!1);
30
+ t || M(!1);
31
31
  }), () => {
32
32
  t = !0;
33
33
  };
34
34
  }, [
35
35
  a,
36
- y,
36
+ b,
37
+ L,
37
38
  d.mode,
38
39
  d.vaultId
39
40
  ]);
40
- let I = async (e) => {
41
- await F(), _((t) => ({
41
+ let B = async (e) => {
42
+ await z(), _((t) => ({
42
43
  ...t,
43
44
  vaultId: e,
44
45
  secretId: ""
45
- })), N(!1);
46
- }, L = `${P}-vault`, R = `${P}-managed-name`, z = `${P}-existing-secret`, B = b ? S("integrations.addConnection.credentialStorage.selectVault", "Select a vault") : S("integrations.addConnection.credentialStorage.noVault", "No vault — stored encrypted by the integrations service"), V = (e, t, n, r) => {
46
+ })), P(!1);
47
+ }, V = `${F}-vault`, H = `${F}-managed-name`, U = `${F}-existing-secret`, W = R ? C("integrations.addConnection.credentialStorage.selectVault", "Select a vault") : C("integrations.addConnection.credentialStorage.noVault", "No vault — stored encrypted by the integrations service");
48
+ if (!I && !L) return /* @__PURE__ */ p("div", {
49
+ role: "alert",
50
+ className: "rounded-md border border-border-default bg-status-error-bg-subtle px-3 py-2 text-sm text-status-error-text",
51
+ children: C("integrations.addConnection.credentialStorage.noCompatibleMode", "This authentication method has no compatible credential storage mode. Ask an administrator to correct its configuration.")
52
+ });
53
+ let G = (e, t, n, r) => {
47
54
  let i = t, a = d.mode === e;
48
55
  return /* @__PURE__ */ m("button", {
49
56
  type: "button",
50
- disabled: C,
57
+ disabled: w,
51
58
  "aria-pressed": a,
52
- onClick: () => _((t) => ({
53
- ...t,
54
- mode: e,
55
- ...e === "managed" ? { secretId: "" } : {}
56
- })),
59
+ onClick: () => {
60
+ y.includes(e) && _((t) => ({
61
+ ...t,
62
+ mode: e,
63
+ ...e === "managed" ? { secretId: "" } : {}
64
+ }));
65
+ },
57
66
  className: `rounded-xl border px-4 py-3 text-left transition-colors disabled:opacity-60 ${a ? "border-primary bg-action-primary-bg/5" : "border-border-subtle hover:border-primary/40 hover:bg-accent/30"}`,
58
67
  children: [/* @__PURE__ */ m("span", {
59
68
  className: "flex items-center gap-2 text-sm font-medium text-text-primary",
@@ -75,45 +84,45 @@ var h = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5
75
84
  children: [/* @__PURE__ */ p(o, {
76
85
  size: 16,
77
86
  className: "text-primary"
78
- }), S("integrations.addConnection.credentialStorage.title", "Credential Storage")]
87
+ }), C("integrations.addConnection.credentialStorage.title", "Credential Storage")]
79
88
  }), /* @__PURE__ */ p("p", {
80
89
  className: "mt-1 text-xs text-text-secondary",
81
- children: b ? S("integrations.addConnection.credentialStorage.description", "Connections use vault-managed secrets by default. You can also reuse an existing compatible secret.") : S("integrations.addConnection.credentialStorage.optionalDescription", "Optional. Without a vault, the integrations service stores the credential encrypted. Pick a vault to manage it yourself, or reuse an existing secret.")
90
+ children: I && L ? R ? C("integrations.addConnection.credentialStorage.description", "Connections use vault-managed secrets by default. You can also reuse an existing compatible secret.") : C("integrations.addConnection.credentialStorage.optionalDescription", "Optional. Without a vault, the integrations service stores the credential encrypted. Pick a vault to manage it yourself, or reuse an existing secret.") : I ? R ? C("integrations.addConnection.credentialStorage.managedOnlyDescription", "Choose a vault to create a dedicated secret for this connection.") : C("integrations.addConnection.credentialStorage.managedOnlyOptionalDescription", "Without a vault, the integrations service stores the credential encrypted. You can choose a vault for a dedicated secret.") : C("integrations.addConnection.credentialStorage.existingOnlyDescription", "Choose a vault and an existing compatible secret.")
82
91
  })] }),
83
92
  /* @__PURE__ */ m("div", {
84
- className: "grid grid-cols-1 gap-3 sm:grid-cols-2",
85
- children: [V("managed", s, S("integrations.addConnection.credentialStorage.dedicatedSecret", "Dedicated secret"), S("integrations.addConnection.credentialStorage.dedicatedSecretDescription", "Create and own a vault secret for this connection.")), V("existing", c, S("integrations.addConnection.credentialStorage.existingSecret", "Existing secret"), S("integrations.addConnection.credentialStorage.existingSecretDescription", "Reference an already stored secret from the vault."))]
93
+ className: `grid grid-cols-1 gap-3 ${I && L ? "sm:grid-cols-2" : ""}`,
94
+ children: [I && G("managed", s, C("integrations.addConnection.credentialStorage.dedicatedSecret", "Dedicated secret"), C("integrations.addConnection.credentialStorage.dedicatedSecretDescription", "Create and own a vault secret for this connection.")), L && G("existing", c, C("integrations.addConnection.credentialStorage.existingSecret", "Existing secret"), C("integrations.addConnection.credentialStorage.existingSecretDescription", "Reference an already stored secret from the vault."))]
86
95
  }),
87
96
  /* @__PURE__ */ m("div", {
88
97
  className: "space-y-2",
89
98
  children: [/* @__PURE__ */ m("div", {
90
99
  className: "flex items-center justify-between gap-2",
91
100
  children: [/* @__PURE__ */ p("label", {
92
- htmlFor: L,
101
+ htmlFor: V,
93
102
  className: "block text-xs font-semibold uppercase tracking-wide text-text-primary",
94
- children: S("integrations.addConnection.credentialStorage.vaultLabel", "Vault")
95
- }), !M && x && /* @__PURE__ */ m("button", {
103
+ children: C("integrations.addConnection.credentialStorage.vaultLabel", "Vault")
104
+ }), !N && S && /* @__PURE__ */ m("button", {
96
105
  type: "button",
97
- disabled: C,
98
- onClick: () => N(!0),
106
+ disabled: w,
107
+ onClick: () => P(!0),
99
108
  className: "inline-flex items-center gap-1 text-xs font-medium text-primary hover:underline",
100
109
  children: [
101
110
  /* @__PURE__ */ p(u, { size: 13 }),
102
111
  " ",
103
- S("integrations.addConnection.credentialStorage.newVault", "New vault")
112
+ C("integrations.addConnection.credentialStorage.newVault", "New vault")
104
113
  ]
105
114
  })]
106
- }), M ? /* @__PURE__ */ p(v, {
115
+ }), N ? /* @__PURE__ */ p(v, {
107
116
  api: a,
108
- translate: S,
109
- onCreated: (e) => void I(e),
110
- onCancel: () => N(!1)
117
+ translate: C,
118
+ onCreated: (e) => void B(e),
119
+ onCancel: () => P(!1)
111
120
  }) : /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ m("div", {
112
121
  className: "relative",
113
122
  children: [/* @__PURE__ */ m("select", {
114
- id: L,
123
+ id: V,
115
124
  value: d.vaultId,
116
- disabled: C,
125
+ disabled: w,
117
126
  onChange: (e) => _((t) => ({
118
127
  ...t,
119
128
  vaultId: e.target.value,
@@ -122,8 +131,8 @@ var h = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5
122
131
  className: g,
123
132
  children: [/* @__PURE__ */ p("option", {
124
133
  value: "",
125
- children: B
126
- }), w.map((e) => /* @__PURE__ */ m("option", {
134
+ children: W
135
+ }), T.map((e) => /* @__PURE__ */ m("option", {
127
136
  value: e.id,
128
137
  children: [
129
138
  e.name,
@@ -132,75 +141,75 @@ var h = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5
132
141
  ")"
133
142
  ]
134
143
  }, e.id))]
135
- }), E && /* @__PURE__ */ p(l, {
144
+ }), D && /* @__PURE__ */ p(l, {
136
145
  size: 16,
137
146
  className: "absolute right-3 top-3 animate-spin text-text-secondary"
138
147
  })]
139
- }), b && !E && w.length === 0 && (x ? /* @__PURE__ */ m("p", {
148
+ }), R && !D && T.length === 0 && (S ? /* @__PURE__ */ m("p", {
140
149
  className: "text-xs text-text-secondary",
141
150
  children: [
142
- S("integrations.addConnection.credentialStorage.noVaults.canCreate", "No vaults yet. Create one to store this connection's credentials."),
151
+ C("integrations.addConnection.credentialStorage.noVaults.canCreate", "No vaults yet. Create one to store this connection's credentials."),
143
152
  " ",
144
153
  /* @__PURE__ */ p("button", {
145
154
  type: "button",
146
- onClick: () => N(!0),
155
+ onClick: () => P(!0),
147
156
  className: "font-medium text-primary hover:underline",
148
- children: S("integrations.addConnection.credentialStorage.noVaults.createOne", "Create one")
157
+ children: C("integrations.addConnection.credentialStorage.noVaults.createOne", "Create one")
149
158
  })
150
159
  ]
151
160
  }) : /* @__PURE__ */ p("p", {
152
161
  className: "text-xs text-text-secondary",
153
- children: S("integrations.addConnection.credentialStorage.noVaults.readOnly", "No vaults yet. Ask an administrator to create one — a connection needs a vault to store its credentials.")
162
+ children: C("integrations.addConnection.credentialStorage.noVaults.readOnly", "No vaults yet. Ask an administrator to create one — a connection needs a vault to store its credentials.")
154
163
  }))] })]
155
164
  }),
156
- d.mode === "managed" ? d.vaultId ? /* @__PURE__ */ m("div", {
165
+ d.mode === "managed" || !L ? I && d.vaultId ? /* @__PURE__ */ m("div", {
157
166
  className: "space-y-2",
158
167
  children: [
159
168
  /* @__PURE__ */ p("label", {
160
- htmlFor: R,
169
+ htmlFor: H,
161
170
  className: "block text-xs font-semibold uppercase tracking-wide text-text-primary",
162
- children: S("integrations.addConnection.credentialStorage.managedSecretName", "Managed secret name")
171
+ children: C("integrations.addConnection.credentialStorage.managedSecretName", "Managed secret name")
163
172
  }),
164
173
  /* @__PURE__ */ p("input", {
165
- id: R,
174
+ id: H,
166
175
  type: "text",
167
176
  value: d.managedSecretName,
168
- disabled: C,
177
+ disabled: w,
169
178
  onChange: (e) => _((t) => ({
170
179
  ...t,
171
180
  managedSecretName: e.target.value
172
181
  })),
173
- placeholder: S("integrations.addConnection.credentialStorage.managedSecretPlaceholder", "Optional custom vault secret name"),
182
+ placeholder: C("integrations.addConnection.credentialStorage.managedSecretPlaceholder", "Optional custom vault secret name"),
174
183
  className: h
175
184
  }),
176
185
  /* @__PURE__ */ p("p", {
177
186
  className: "text-xs text-text-secondary",
178
- children: S("integrations.addConnection.credentialStorage.managedSecretHint", "Leave empty to auto-generate a secret name from the connection and provider.")
187
+ children: C("integrations.addConnection.credentialStorage.managedSecretHint", "Leave empty to auto-generate a secret name from the connection and provider.")
179
188
  })
180
189
  ]
181
190
  }) : null : /* @__PURE__ */ m("div", {
182
191
  className: "space-y-2",
183
192
  children: [
184
193
  /* @__PURE__ */ p("label", {
185
- htmlFor: z,
194
+ htmlFor: U,
186
195
  className: "block text-xs font-semibold uppercase tracking-wide text-text-primary",
187
- children: S("integrations.addConnection.credentialStorage.existingSecretLabel", "Existing secret")
196
+ children: C("integrations.addConnection.credentialStorage.existingSecretLabel", "Existing secret")
188
197
  }),
189
198
  /* @__PURE__ */ m("div", {
190
199
  className: "relative",
191
200
  children: [/* @__PURE__ */ m("select", {
192
- id: z,
201
+ id: U,
193
202
  value: d.secretId,
194
203
  onChange: (e) => _((t) => ({
195
204
  ...t,
196
205
  secretId: e.target.value
197
206
  })),
198
- disabled: C || !d.vaultId,
207
+ disabled: w || !d.vaultId,
199
208
  className: g,
200
209
  children: [/* @__PURE__ */ p("option", {
201
210
  value: "",
202
- children: S("integrations.addConnection.credentialStorage.selectExistingSecret", "Select an existing secret")
203
- }), O.map((e) => /* @__PURE__ */ m("option", {
211
+ children: C("integrations.addConnection.credentialStorage.selectExistingSecret", "Select an existing secret")
212
+ }), k.map((e) => /* @__PURE__ */ m("option", {
204
213
  value: e.id,
205
214
  children: [
206
215
  e.name,
@@ -208,14 +217,14 @@ var h = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5
208
217
  e.type
209
218
  ]
210
219
  }, e.id))]
211
- }), A && /* @__PURE__ */ p(l, {
220
+ }), j && /* @__PURE__ */ p(l, {
212
221
  size: 16,
213
222
  className: "absolute right-3 top-3 animate-spin text-text-secondary"
214
223
  })]
215
224
  }),
216
225
  /* @__PURE__ */ p("p", {
217
226
  className: "text-xs text-text-secondary",
218
- children: S("integrations.addConnection.credentialStorage.existingSecretHint", "For OAuth and basic auth, choose a structured credential secret created for integrations.")
227
+ children: C("integrations.addConnection.credentialStorage.existingSecretHint", "For OAuth and basic auth, choose a structured credential secret created for integrations.")
219
228
  })
220
229
  ]
221
230
  })
@@ -1,7 +1,7 @@
1
1
  import { Translator } from '../credentials/translate';
2
2
  import { AuthMethodFlow, FormSchema } from '../credentials/types';
3
3
  import { ConnectionRecord, ConnectionsApi, CreateConnectionInput } from './api';
4
- import { ConnectionAuthMethod, ConnectionProvider, CredentialStorageState, ProviderAuthType } from './types';
4
+ import { ConnectionAuthMethod, ConnectionProvider, CredentialStorageMode, CredentialStorageState, ProviderAuthType } from './types';
5
5
  /** Providers whose methods were never backfilled fall back to their type. */
6
6
  export declare function flowForAuthType(authType: ProviderAuthType): AuthMethodFlow;
7
7
  /** The methods a user may pick: enabled ones, in display order. */
@@ -17,6 +17,9 @@ export declare function selectableMethods(provider: ConnectionProvider): Connect
17
17
  export declare function resolveMethod(provider: ConnectionProvider, selectedKey: string | null): ConnectionAuthMethod | null;
18
18
  export declare function resolveFlow(provider: ConnectionProvider, method: ConnectionAuthMethod | null): AuthMethodFlow;
19
19
  export declare function resolveSchema(provider: ConnectionProvider, method: ConnectionAuthMethod | null): FormSchema | null;
20
+ export declare function supportedStorageModes(provider: ConnectionProvider, method: ConnectionAuthMethod | null): readonly CredentialStorageMode[];
21
+ /** Keep a vault selection when changing methods, but never reuse a forbidden secret. */
22
+ export declare function normalizeStorageMode(storage: CredentialStorageState, modes: readonly CredentialStorageMode[]): CredentialStorageState;
20
23
  /**
21
24
  * A method that asks for a client id is bring-your-own-app: the user must
22
25
  * register the callback URL in their provider app. Derived from the schema, not
@@ -1 +1 @@
1
- {"version":3,"file":"connectionFlow.d.ts","sourceRoot":"","sources":["../../src/connections/connectionFlow.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,OAAO,CAAC;AACrF,OAAO,KAAK,EACV,oBAAoB,EACpB,kBAAkB,EAClB,sBAAsB,EACtB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CAAC;IACtB,yEAAyE;IACzE,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACvC;AAED,wEAAwE;AACxE,wBAAgB,aAAa,CAAC,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,UAAU,GAAG,MAAM,GAAG,IAAI,CAkD1F;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,UAAU,GAAG,IAAI,EACzB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC9B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAWzB;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,eAAe,GAAG,qBAAqB,CA2C9E;AAED,6CAA6C;AAC7C,MAAM,MAAM,QAAQ,GAChB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,gBAAgB,CAAA;CAAE,GAC9C;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,UAAU,EAAE,gBAAgB,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAAC;AAEzE;;;;GAIG;AACH,wBAAsB,gBAAgB,CACpC,GAAG,EAAE,cAAc,EACnB,KAAK,EAAE,eAAe,EACtB,OAAO,EAAE;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,GAClD,OAAO,CAAC,QAAQ,CAAC,CAoCnB"}
@@ -14,19 +14,44 @@ function o(e, t) {
14
14
  return t?.flow ?? r(e.authType);
15
15
  }
16
16
  function s(e, n) {
17
- return t(n?.configSchema ?? e.configSchema);
17
+ let r = t(n?.configSchema);
18
+ return r && Object.keys(r.properties).length > 0 ? r : t(e.configSchema) ?? r;
18
19
  }
19
- function c(e) {
20
+ var c = ["managed", "existing"], l = [];
21
+ function u(e) {
22
+ if (!e || !Object.prototype.hasOwnProperty.call(e, "supportedStorageModes")) return null;
23
+ let t = e.supportedStorageModes;
24
+ if (!Array.isArray(t) || t.length === 0) return l;
25
+ let n = [];
26
+ for (let e of t) {
27
+ if (e !== "managed" && e !== "existing" || n.includes(e)) return l;
28
+ n.push(e);
29
+ }
30
+ return n;
31
+ }
32
+ function d(e, t) {
33
+ let n = u(e.configSchema), r = u(t?.configSchema);
34
+ return n ? r ? r.filter((e) => n.includes(e)) : n : r ?? c;
35
+ }
36
+ function f(e, t) {
37
+ return t.includes(e.mode) ? e : {
38
+ ...e,
39
+ mode: t[0] ?? "managed",
40
+ secretId: ""
41
+ };
42
+ }
43
+ function p(e) {
20
44
  return !!(e && Object.prototype.hasOwnProperty.call(e.properties, "clientId"));
21
45
  }
22
- function l(e, t) {
46
+ function m(e, t) {
23
47
  return e !== "minted" && t.authType !== "service_account";
24
48
  }
25
- function u(t, n) {
49
+ function h(t, n) {
26
50
  let r = o(t.provider, t.method), i = s(t.provider, t.method);
27
51
  if (!t.name.trim()) return n("integrations.addConnection.errors.nameRequired", "Connection name is required");
28
52
  if (t.method && !t.method.isConfigured) return n("integrations.addConnection.authentication.methodNotConfigured", "This authentication method is not configured in this environment. Ask an administrator to add its credentials, or pick another method.");
29
- if (l(r, t.provider)) {
53
+ if (m(r, t.provider)) {
54
+ if (!d(t.provider, t.method).includes(t.storage.mode)) return n("integrations.addConnection.errors.storageModeUnsupported", "This authentication method does not support the selected credential storage mode.");
30
55
  if (t.storage.mode === "existing") {
31
56
  if (!t.storage.vaultId) return n("integrations.addConnection.errors.vaultRequired", "Please select a vault for storing or referencing credentials");
32
57
  if (!t.storage.secretId) return n("integrations.addConnection.errors.secretRequired", "Please select an existing vault secret to reuse");
@@ -34,7 +59,7 @@ function u(t, n) {
34
59
  }
35
60
  return r !== "minted" && i && !e(i, t.values) ? n("integrations.addConnection.errors.fieldsRequired", "Please fill in all required fields") : null;
36
61
  }
37
- function d(e, t) {
62
+ function g(e, t) {
38
63
  let r = {};
39
64
  for (let [i, a] of Object.entries(n(e, t))) if (typeof a == "string") {
40
65
  let e = a.trim();
@@ -42,27 +67,34 @@ function d(e, t) {
42
67
  } else a != null && (r[i] = a);
43
68
  return r;
44
69
  }
45
- function f(e) {
46
- let t = o(e.provider, e.method), n = s(e.provider, e.method), r = t === "oauth2" ? d(n, e.values) : {}, i = {
70
+ function _(e) {
71
+ let t = o(e.provider, e.method), n = s(e.provider, e.method), r = t === "oauth2" ? g(n, e.values) : {}, i = {
47
72
  ...e.extraConfig ?? {},
48
73
  ...r
49
74
  }, a = {
50
75
  name: e.name.trim(),
51
76
  providerId: e.provider.id
52
77
  }, c = e.description.trim();
53
- if (c && (a.description = c), e.method && (a.authMethodKey = e.method.key), Object.keys(i).length > 0 && (a.config = i), l(t, e.provider)) {
78
+ if (c && (a.description = c), e.method && (a.authMethodKey = e.method.key), Object.keys(i).length > 0 && (a.config = i), m(t, e.provider)) {
54
79
  let { storage: t } = e;
55
- if (t.mode === "existing" && t.secretId) a.credentialSecretId = t.secretId;
56
- else if (t.mode === "managed" && t.vaultId) {
57
- a.vaultId = t.vaultId;
58
- let e = t.managedSecretName.trim();
59
- e && (a.managedSecretName = e);
80
+ if (!d(e.provider, e.method).includes(t.mode)) throw Error("This authentication method does not support the selected credential storage mode.");
81
+ if (t.mode === "existing") {
82
+ if (!t.vaultId) throw Error("Please select a vault for storing or referencing credentials");
83
+ if (!t.secretId) throw Error("Please select an existing vault secret to reuse");
84
+ a.credentialSecretId = t.secretId;
85
+ } else {
86
+ if (e.requireVault && !t.vaultId) throw Error("Please select a vault for storing or referencing credentials");
87
+ if (t.vaultId) {
88
+ a.vaultId = t.vaultId;
89
+ let e = t.managedSecretName.trim();
90
+ e && (a.managedSecretName = e);
91
+ }
60
92
  }
61
93
  }
62
94
  return a;
63
95
  }
64
- async function p(e, t, n) {
65
- let r = o(t.provider, t.method), i = await e.createConnection(f(t));
96
+ async function v(e, t, n) {
97
+ let r = o(t.provider, t.method), i = await e.createConnection(_(t));
66
98
  switch (r) {
67
99
  case "oauth2": {
68
100
  let { redirectUrl: t } = await e.initiateOAuth({
@@ -92,10 +124,10 @@ async function p(e, t, n) {
92
124
  connection: await e.authenticateConnection({
93
125
  connectionId: i.id,
94
126
  ...t.method ? { authMethodKey: t.method.key } : {},
95
- values: d(s(t.provider, t.method), t.values)
127
+ values: g(s(t.provider, t.method), t.values)
96
128
  }) ?? i
97
129
  };
98
130
  }
99
131
  }
100
132
  //#endregion
101
- export { f as buildCreateInput, c as collectsOwnClientId, r as flowForAuthType, l as needsCredentialStorage, o as resolveFlow, a as resolveMethod, s as resolveSchema, i as selectableMethods, p as submitConnection, d as submittedValues, u as validateDraft };
133
+ export { _ as buildCreateInput, p as collectsOwnClientId, r as flowForAuthType, m as needsCredentialStorage, f as normalizeStorageMode, o as resolveFlow, a as resolveMethod, s as resolveSchema, i as selectableMethods, v as submitConnection, g as submittedValues, d as supportedStorageModes, h as validateDraft };
@@ -43,13 +43,15 @@ export interface CreatedConnection {
43
43
  status: string;
44
44
  provider: ConnectionProvider;
45
45
  }
46
+ /** Storage modes a method permits for its credential. */
47
+ export type CredentialStorageMode = 'managed' | 'existing';
46
48
  /** Where a new connection's credential is kept. */
47
49
  export interface CredentialStorageState {
48
50
  /**
49
51
  * `managed` — a new secret, in `vaultId` when one is chosen, otherwise held
50
52
  * by the integrations service itself. `existing` — reference `secretId`.
51
53
  */
52
- mode: 'managed' | 'existing';
54
+ mode: CredentialStorageMode;
53
55
  vaultId: string;
54
56
  secretId: string;
55
57
  managedSecretName: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/connections/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,MAAM,MAAM,gBAAgB,GACxB,eAAe,GACf,oBAAoB,GACpB,eAAe,GACf,KAAK,GACL,WAAW,GACX,iBAAiB,GACjB,WAAW,GACX,SAAS,GACT,IAAI,GACJ,SAAS,GACT,QAAQ,GACR,I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7C,WAAW,EAAE,oBAAoB,EAAE,CAAC;CACrC;AAED,8DAA8D;AAC9D,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,gDAAgD;IAChD,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,kBAAkB,CAAC;CAC9B;AAED,yDAAyD;AACzD,MAAM,MAAM,qBAAqB,GAAG,SAAS,GAAG,UAAU,CAAC;AAE3D,mDAAmD;AACnD,MAAM,WAAW,sBAAsB;IACrC;;;OAGG;IACH,IAAI,EAAE,qBAAqB,CAAC;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,yEAAyE;AACzE,MAAM,MAAM,qBAAqB,GAC7B;IAAE,IAAI,EAAE,oBAAoB,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,GACzE;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,GACpE;IACE,IAAI,EAAE,cAAc,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/fe-libs",
3
- "version": "2026.1006.1",
3
+ "version": "2026.1006.2",
4
4
  "description": "Burdenoff frontend primitives and domain libraries",
5
5
  "type": "module",
6
6
  "bin": {