@burdenoff/fe-libs 2026.1113.6 → 2026.1113.7

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.
Files changed (35) hide show
  1. package/dist/connections/ConnectionDialog.d.ts +13 -1
  2. package/dist/connections/ConnectionDialog.js +13 -11
  3. package/dist/connections/ConnectionDialogPanel.d.ts +5 -1
  4. package/dist/connections/ConnectionDialogPanel.js +230 -150
  5. package/dist/connections/ConnectionFormTab.d.ts +15 -0
  6. package/dist/connections/ConnectionFormTab.js +192 -189
  7. package/dist/connections/CredentialStorageSelector.d.ts +9 -0
  8. package/dist/connections/CredentialStorageSelector.js +145 -137
  9. package/dist/connections/OneScreenConnectionForm.d.ts +22 -0
  10. package/dist/connections/OneScreenConnectionForm.js +231 -0
  11. package/dist/connections/ProviderPickerPanel.d.ts +6 -0
  12. package/dist/connections/ProviderPickerPanel.js +98 -45
  13. package/dist/connections/api.d.ts +3 -0
  14. package/dist/connections/api.js +4 -2
  15. package/dist/connections/connectionFlow.d.ts +18 -0
  16. package/dist/connections/connectionFlow.js +3 -3
  17. package/dist/connections/index.d.ts +4 -3
  18. package/dist/connections/picker.d.ts +18 -0
  19. package/dist/connections/picker.js +35 -6
  20. package/dist/connections/scopes.d.ts +8 -0
  21. package/dist/connections/scopes.js +9 -1
  22. package/dist/connections/storage.d.ts +9 -1
  23. package/dist/connections/storage.js +13 -1
  24. package/dist/connections/types.d.ts +16 -0
  25. package/dist/connections/useConnectionSubmit.d.ts +38 -2
  26. package/dist/connections/useConnectionSubmit.js +115 -71
  27. package/dist/connections.js +11 -10
  28. package/dist/credentials/SchemaForm.d.ts +7 -1
  29. package/dist/credentials/SchemaForm.js +64 -64
  30. package/dist/credentials/index.d.ts +2 -2
  31. package/dist/credentials/schema.d.ts +11 -1
  32. package/dist/credentials/schema.js +13 -5
  33. package/dist/credentials/types.d.ts +9 -0
  34. package/dist/credentials.js +5 -5
  35. package/package.json +1 -1
@@ -1,138 +1,146 @@
1
- import { compatibleSecrets as e } from "./storage.js";
2
- import { useCallback as t, useEffect as n, useId as r, useState as i } from "react";
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
- import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
1
+ import { compatibleSecrets as e, withDefaultVault as t } from "./storage.js";
2
+ import { useCallback as n, useEffect as r, useEffectEvent as i, useId as a, useState as o } from "react";
3
+ import { AlertCircle as s, Database as c, FolderKey as l, KeyRound as u, Loader2 as d, Plus as f, X as p } from "lucide-react";
4
+ import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
5
5
  // 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: _, 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);
6
+ var _ = "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", v = `${_} scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary`, y = ({ api: s, value: p, onChange: y, supportedStorageModes: x = ["managed", "existing"], authType: S, requireVault: C, canCreateVault: w, translate: T, disabled: E, autoSelectVault: D = !1, onVaultsLoaded: O }) => {
7
+ let [k, A] = o([]), [j, M] = o(!0), [N, P] = o([]), [F, I] = o(!1), [L, R] = o(!1), z = a(), B = x.includes("managed"), V = x.includes("existing"), H = C || !B, U = n(async () => {
8
+ M(!0);
9
9
  try {
10
- E(await a.listVaults());
10
+ let e = await s.listVaults();
11
+ return A(e), e;
11
12
  } catch {
12
- E([]);
13
+ return A([]), [];
13
14
  } finally {
14
- O(!1);
15
+ M(!1);
15
16
  }
16
- }, [a]);
17
- n(() => {
18
- z();
19
- }, [z]), n(() => {
20
- if (!L || d.mode !== "existing" || !d.vaultId) {
21
- A([]), M(!1);
17
+ }, [s]), W = i((e) => {
18
+ O?.(e.length), D && H && y((n) => t(n, e));
19
+ });
20
+ r(() => {
21
+ let e = !1;
22
+ return U().then((t) => {
23
+ e || W(t);
24
+ }), () => {
25
+ e = !0;
26
+ };
27
+ }, [U]), r(() => {
28
+ if (!V || p.mode !== "existing" || !p.vaultId) {
29
+ P([]), I(!1);
22
30
  return;
23
31
  }
24
32
  let t = !1;
25
- return M(!0), a.listVaultSecrets(d.vaultId).then((n) => {
26
- t || A(e(n, b));
33
+ return I(!0), s.listVaultSecrets(p.vaultId).then((n) => {
34
+ t || P(e(n, S));
27
35
  }).catch(() => {
28
- t || A([]);
36
+ t || P([]);
29
37
  }).finally(() => {
30
- t || M(!1);
38
+ t || I(!1);
31
39
  }), () => {
32
40
  t = !0;
33
41
  };
34
42
  }, [
35
- a,
36
- b,
37
- L,
38
- d.mode,
39
- d.vaultId
43
+ s,
44
+ S,
45
+ V,
46
+ p.mode,
47
+ p.vaultId
40
48
  ]);
41
- let B = async (e) => {
42
- await z(), _((t) => ({
49
+ let G = async (e) => {
50
+ await U(), y((t) => ({
43
51
  ...t,
44
52
  vaultId: e,
45
53
  secretId: ""
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", {
54
+ })), R(!1);
55
+ }, K = `${z}-vault`, q = `${z}-managed-name`, J = `${z}-existing-secret`, Y = H ? T("integrations.addConnection.credentialStorage.selectVault", "Select a vault") : T("integrations.addConnection.credentialStorage.noVault", "No vault — stored encrypted by the integrations service");
56
+ if (!B && !V) return /* @__PURE__ */ h("div", {
49
57
  role: "alert",
50
58
  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.")
59
+ children: T("integrations.addConnection.credentialStorage.noCompatibleMode", "This authentication method has no compatible credential storage mode. Ask an administrator to correct its configuration.")
52
60
  });
53
- let G = (e, t, n, r) => {
54
- let i = t, a = d.mode === e;
55
- return /* @__PURE__ */ m("button", {
61
+ let X = (e, t, n, r) => {
62
+ let i = t, a = p.mode === e;
63
+ return /* @__PURE__ */ g("button", {
56
64
  type: "button",
57
- disabled: w,
65
+ disabled: E,
58
66
  "aria-pressed": a,
59
67
  onClick: () => {
60
- y.includes(e) && _((t) => ({
68
+ x.includes(e) && y((t) => ({
61
69
  ...t,
62
70
  mode: e,
63
71
  ...e === "managed" ? { secretId: "" } : {}
64
72
  }));
65
73
  },
66
74
  className: `rounded-xl border px-4 py-3 text-start transition-colors disabled:opacity-60 ${a ? "border-primary bg-action-primary-bg/5" : "border-border-subtle hover:border-primary/40 hover:bg-accent/30"}`,
67
- children: [/* @__PURE__ */ m("span", {
75
+ children: [/* @__PURE__ */ g("span", {
68
76
  className: "flex items-center gap-2 text-sm font-medium text-text-primary",
69
- children: [/* @__PURE__ */ p(i, {
77
+ children: [/* @__PURE__ */ h(i, {
70
78
  size: 16,
71
79
  className: "text-primary"
72
80
  }), n]
73
- }), /* @__PURE__ */ p("span", {
81
+ }), /* @__PURE__ */ h("span", {
74
82
  className: "mt-1 block text-xs text-text-secondary",
75
83
  children: r
76
84
  })]
77
85
  });
78
86
  };
79
- return /* @__PURE__ */ m("div", {
87
+ return /* @__PURE__ */ g("div", {
80
88
  className: "space-y-4 rounded-xl border border-border-subtle/50 bg-bg-surface p-4",
81
89
  children: [
82
- /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ m("h3", {
90
+ /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ g("h3", {
83
91
  className: "flex items-center gap-2 text-sm font-semibold text-text-primary",
84
- children: [/* @__PURE__ */ p(o, {
92
+ children: [/* @__PURE__ */ h(c, {
85
93
  size: 16,
86
94
  className: "text-primary"
87
- }), C("integrations.addConnection.credentialStorage.title", "Credential Storage")]
88
- }), /* @__PURE__ */ p("p", {
95
+ }), T("integrations.addConnection.credentialStorage.title", "Credential Storage")]
96
+ }), /* @__PURE__ */ h("p", {
89
97
  className: "mt-1 text-xs text-text-secondary",
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.")
98
+ children: B && V ? H ? T("integrations.addConnection.credentialStorage.description", "Connections use vault-managed secrets by default. You can also reuse an existing compatible secret.") : T("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.") : B ? H ? T("integrations.addConnection.credentialStorage.managedOnlyDescription", "Choose a vault to create a dedicated secret for this connection.") : T("integrations.addConnection.credentialStorage.managedOnlyOptionalDescription", "Without a vault, the integrations service stores the credential encrypted. You can choose a vault for a dedicated secret.") : T("integrations.addConnection.credentialStorage.existingOnlyDescription", "Choose a vault and an existing compatible secret.")
91
99
  })] }),
92
- /* @__PURE__ */ m("div", {
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."))]
100
+ /* @__PURE__ */ g("div", {
101
+ className: `grid grid-cols-1 gap-3 ${B && V ? "sm:grid-cols-2" : ""}`,
102
+ children: [B && X("managed", l, T("integrations.addConnection.credentialStorage.dedicatedSecret", "Dedicated secret"), T("integrations.addConnection.credentialStorage.dedicatedSecretDescription", "Create and own a vault secret for this connection.")), V && X("existing", u, T("integrations.addConnection.credentialStorage.existingSecret", "Existing secret"), T("integrations.addConnection.credentialStorage.existingSecretDescription", "Reference an already stored secret from the vault."))]
95
103
  }),
96
- /* @__PURE__ */ m("div", {
104
+ /* @__PURE__ */ g("div", {
97
105
  className: "space-y-2",
98
- children: [/* @__PURE__ */ m("div", {
106
+ children: [/* @__PURE__ */ g("div", {
99
107
  className: "flex items-center justify-between gap-2",
100
- children: [/* @__PURE__ */ p("label", {
101
- htmlFor: V,
108
+ children: [/* @__PURE__ */ h("label", {
109
+ htmlFor: K,
102
110
  className: "block text-xs font-semibold uppercase tracking-wide text-text-primary",
103
- children: C("integrations.addConnection.credentialStorage.vaultLabel", "Vault")
104
- }), !N && S && /* @__PURE__ */ m("button", {
111
+ children: T("integrations.addConnection.credentialStorage.vaultLabel", "Vault")
112
+ }), !L && w && /* @__PURE__ */ g("button", {
105
113
  type: "button",
106
- disabled: w,
107
- onClick: () => P(!0),
114
+ disabled: E,
115
+ onClick: () => R(!0),
108
116
  className: "inline-flex items-center gap-1 text-xs font-medium text-primary hover:underline",
109
117
  children: [
110
- /* @__PURE__ */ p(u, { size: 13 }),
118
+ /* @__PURE__ */ h(f, { size: 13 }),
111
119
  " ",
112
- C("integrations.addConnection.credentialStorage.newVault", "New vault")
120
+ T("integrations.addConnection.credentialStorage.newVault", "New vault")
113
121
  ]
114
122
  })]
115
- }), N ? /* @__PURE__ */ p(v, {
116
- api: a,
117
- translate: C,
118
- onCreated: (e) => void B(e),
119
- onCancel: () => P(!1)
120
- }) : /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ m("div", {
123
+ }), L ? /* @__PURE__ */ h(b, {
124
+ api: s,
125
+ translate: T,
126
+ onCreated: (e) => void G(e),
127
+ onCancel: () => R(!1)
128
+ }) : /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ g("div", {
121
129
  className: "relative",
122
- children: [/* @__PURE__ */ m("select", {
123
- id: V,
124
- value: d.vaultId,
125
- disabled: w,
126
- onChange: (e) => _((t) => ({
130
+ children: [/* @__PURE__ */ g("select", {
131
+ id: K,
132
+ value: p.vaultId,
133
+ disabled: E,
134
+ onChange: (e) => y((t) => ({
127
135
  ...t,
128
136
  vaultId: e.target.value,
129
137
  secretId: ""
130
138
  })),
131
- className: g,
132
- children: [/* @__PURE__ */ p("option", {
139
+ className: v,
140
+ children: [/* @__PURE__ */ h("option", {
133
141
  value: "",
134
- children: W
135
- }), T.map((e) => /* @__PURE__ */ m("option", {
142
+ children: Y
143
+ }), k.map((e) => /* @__PURE__ */ g("option", {
136
144
  value: e.id,
137
145
  children: [
138
146
  e.name,
@@ -141,75 +149,75 @@ var h = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5
141
149
  ")"
142
150
  ]
143
151
  }, e.id))]
144
- }), D && /* @__PURE__ */ p(l, {
152
+ }), j && /* @__PURE__ */ h(d, {
145
153
  size: 16,
146
154
  className: "absolute end-3 top-3 animate-spin text-text-secondary"
147
155
  })]
148
- }), R && !D && T.length === 0 && (S ? /* @__PURE__ */ m("p", {
156
+ }), H && !j && k.length === 0 && (w ? /* @__PURE__ */ g("p", {
149
157
  className: "text-xs text-text-secondary",
150
158
  children: [
151
- C("integrations.addConnection.credentialStorage.noVaults.canCreate", "No vaults yet. Create one to store this connection's credentials."),
159
+ T("integrations.addConnection.credentialStorage.noVaults.canCreate", "No vaults yet. Create one to store this connection's credentials."),
152
160
  " ",
153
- /* @__PURE__ */ p("button", {
161
+ /* @__PURE__ */ h("button", {
154
162
  type: "button",
155
- onClick: () => P(!0),
163
+ onClick: () => R(!0),
156
164
  className: "font-medium text-primary hover:underline",
157
- children: C("integrations.addConnection.credentialStorage.noVaults.createOne", "Create one")
165
+ children: T("integrations.addConnection.credentialStorage.noVaults.createOne", "Create one")
158
166
  })
159
167
  ]
160
- }) : /* @__PURE__ */ p("p", {
168
+ }) : /* @__PURE__ */ h("p", {
161
169
  className: "text-xs text-text-secondary",
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.")
170
+ children: T("integrations.addConnection.credentialStorage.noVaults.readOnly", "No vaults yet. Ask an administrator to create one — a connection needs a vault to store its credentials.")
163
171
  }))] })]
164
172
  }),
165
- d.mode === "managed" || !L ? I && d.vaultId ? /* @__PURE__ */ m("div", {
173
+ p.mode === "managed" || !V ? B && p.vaultId ? /* @__PURE__ */ g("div", {
166
174
  className: "space-y-2",
167
175
  children: [
168
- /* @__PURE__ */ p("label", {
169
- htmlFor: H,
176
+ /* @__PURE__ */ h("label", {
177
+ htmlFor: q,
170
178
  className: "block text-xs font-semibold uppercase tracking-wide text-text-primary",
171
- children: C("integrations.addConnection.credentialStorage.managedSecretName", "Managed secret name")
179
+ children: T("integrations.addConnection.credentialStorage.managedSecretName", "Managed secret name")
172
180
  }),
173
- /* @__PURE__ */ p("input", {
174
- id: H,
181
+ /* @__PURE__ */ h("input", {
182
+ id: q,
175
183
  type: "text",
176
- value: d.managedSecretName,
177
- disabled: w,
178
- onChange: (e) => _((t) => ({
184
+ value: p.managedSecretName,
185
+ disabled: E,
186
+ onChange: (e) => y((t) => ({
179
187
  ...t,
180
188
  managedSecretName: e.target.value
181
189
  })),
182
- placeholder: C("integrations.addConnection.credentialStorage.managedSecretPlaceholder", "Optional custom vault secret name"),
183
- className: h
190
+ placeholder: T("integrations.addConnection.credentialStorage.managedSecretPlaceholder", "Optional custom vault secret name"),
191
+ className: _
184
192
  }),
185
- /* @__PURE__ */ p("p", {
193
+ /* @__PURE__ */ h("p", {
186
194
  className: "text-xs text-text-secondary",
187
- children: C("integrations.addConnection.credentialStorage.managedSecretHint", "Leave empty to auto-generate a secret name from the connection and provider.")
195
+ children: T("integrations.addConnection.credentialStorage.managedSecretHint", "Leave empty to auto-generate a secret name from the connection and provider.")
188
196
  })
189
197
  ]
190
- }) : null : /* @__PURE__ */ m("div", {
198
+ }) : null : /* @__PURE__ */ g("div", {
191
199
  className: "space-y-2",
192
200
  children: [
193
- /* @__PURE__ */ p("label", {
194
- htmlFor: U,
201
+ /* @__PURE__ */ h("label", {
202
+ htmlFor: J,
195
203
  className: "block text-xs font-semibold uppercase tracking-wide text-text-primary",
196
- children: C("integrations.addConnection.credentialStorage.existingSecretLabel", "Existing secret")
204
+ children: T("integrations.addConnection.credentialStorage.existingSecretLabel", "Existing secret")
197
205
  }),
198
- /* @__PURE__ */ m("div", {
206
+ /* @__PURE__ */ g("div", {
199
207
  className: "relative",
200
- children: [/* @__PURE__ */ m("select", {
201
- id: U,
202
- value: d.secretId,
203
- onChange: (e) => _((t) => ({
208
+ children: [/* @__PURE__ */ g("select", {
209
+ id: J,
210
+ value: p.secretId,
211
+ onChange: (e) => y((t) => ({
204
212
  ...t,
205
213
  secretId: e.target.value
206
214
  })),
207
- disabled: w || !d.vaultId,
208
- className: g,
209
- children: [/* @__PURE__ */ p("option", {
215
+ disabled: E || !p.vaultId,
216
+ className: v,
217
+ children: [/* @__PURE__ */ h("option", {
210
218
  value: "",
211
- children: C("integrations.addConnection.credentialStorage.selectExistingSecret", "Select an existing secret")
212
- }), k.map((e) => /* @__PURE__ */ m("option", {
219
+ children: T("integrations.addConnection.credentialStorage.selectExistingSecret", "Select an existing secret")
220
+ }), N.map((e) => /* @__PURE__ */ g("option", {
213
221
  value: e.id,
214
222
  children: [
215
223
  e.name,
@@ -217,81 +225,81 @@ var h = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5
217
225
  e.type
218
226
  ]
219
227
  }, e.id))]
220
- }), j && /* @__PURE__ */ p(l, {
228
+ }), F && /* @__PURE__ */ h(d, {
221
229
  size: 16,
222
230
  className: "absolute end-3 top-3 animate-spin text-text-secondary"
223
231
  })]
224
232
  }),
225
- /* @__PURE__ */ p("p", {
233
+ /* @__PURE__ */ h("p", {
226
234
  className: "text-xs text-text-secondary",
227
- children: C("integrations.addConnection.credentialStorage.existingSecretHint", "For OAuth and basic auth, choose a structured credential secret created for integrations.")
235
+ children: T("integrations.addConnection.credentialStorage.existingSecretHint", "For OAuth and basic auth, choose a structured credential secret created for integrations.")
228
236
  })
229
237
  ]
230
238
  })
231
239
  ]
232
240
  });
233
- }, v = ({ api: e, translate: t, onCreated: n, onCancel: o }) => {
234
- let [s, c] = i(""), [f, g] = i(!1), [_, v] = i(null), y = r(), b = async () => {
235
- if (s.trim() && !f) {
236
- g(!0), v(null);
241
+ }, b = ({ api: e, translate: t, onCreated: n, onCancel: r }) => {
242
+ let [i, c] = o(""), [l, u] = o(!1), [m, v] = o(null), y = a(), b = async () => {
243
+ if (i.trim() && !l) {
244
+ u(!0), v(null);
237
245
  try {
238
- n((await e.createVault(s)).id);
246
+ n((await e.createVault(i)).id);
239
247
  } catch (e) {
240
248
  v(e instanceof Error ? e.message : t("integrations.addConnection.credentialStorage.createVaultFailed", "The vault could not be created"));
241
249
  } finally {
242
- g(!1);
250
+ u(!1);
243
251
  }
244
252
  }
245
253
  };
246
- return /* @__PURE__ */ m("div", {
254
+ return /* @__PURE__ */ g("div", {
247
255
  className: "space-y-2 rounded-lg border border-primary/40 bg-action-primary-bg/5 p-3",
248
256
  children: [
249
- /* @__PURE__ */ m("div", {
257
+ /* @__PURE__ */ g("div", {
250
258
  className: "flex items-center justify-between gap-2",
251
- children: [/* @__PURE__ */ p("label", {
259
+ children: [/* @__PURE__ */ h("label", {
252
260
  htmlFor: y,
253
261
  className: "text-xs font-medium text-text-primary",
254
262
  children: t("integrations.addConnection.credentialStorage.newVaultName", "New vault name")
255
- }), /* @__PURE__ */ p("button", {
263
+ }), /* @__PURE__ */ h("button", {
256
264
  type: "button",
257
- onClick: o,
265
+ onClick: r,
258
266
  "aria-label": t("integrations.addConnection.credentialStorage.cancelCreateVault", "Cancel creating a vault"),
259
267
  className: "text-text-secondary hover:text-text-primary",
260
- children: /* @__PURE__ */ p(d, { size: 14 })
268
+ children: /* @__PURE__ */ h(p, { size: 14 })
261
269
  })]
262
270
  }),
263
- /* @__PURE__ */ p("input", {
271
+ /* @__PURE__ */ h("input", {
264
272
  id: y,
265
273
  type: "text",
266
- value: s,
274
+ value: i,
267
275
  autoFocus: !0,
268
276
  onChange: (e) => c(e.target.value),
269
277
  onKeyDown: (e) => {
270
278
  e.key === "Enter" && (e.preventDefault(), b());
271
279
  },
272
280
  placeholder: t("integrations.addConnection.credentialStorage.newVaultPlaceholder", "e.g. Integrations"),
273
- disabled: f,
274
- className: h
281
+ disabled: l,
282
+ className: _
275
283
  }),
276
- _ && /* @__PURE__ */ m("p", {
284
+ m && /* @__PURE__ */ g("p", {
277
285
  className: "flex items-center gap-1.5 text-xs text-status-error-text",
278
- children: [/* @__PURE__ */ p(a, {
286
+ children: [/* @__PURE__ */ h(s, {
279
287
  size: 13,
280
288
  className: "flex-shrink-0"
281
- }), _]
289
+ }), m]
282
290
  }),
283
- /* @__PURE__ */ m("div", {
291
+ /* @__PURE__ */ g("div", {
284
292
  className: "flex items-center gap-2",
285
- children: [/* @__PURE__ */ m("button", {
293
+ children: [/* @__PURE__ */ g("button", {
286
294
  type: "button",
287
295
  onClick: () => void b(),
288
- disabled: f || !s.trim(),
296
+ disabled: l || !i.trim(),
289
297
  className: "inline-flex items-center gap-1.5 rounded-md bg-action-primary-bg px-3 py-1.5 text-xs font-medium text-action-primary-text transition-colors hover:bg-action-primary-bg/90 disabled:opacity-50",
290
- children: [f ? /* @__PURE__ */ p(l, {
298
+ children: [l ? /* @__PURE__ */ h(d, {
291
299
  size: 13,
292
300
  className: "animate-spin"
293
- }) : /* @__PURE__ */ p(u, { size: 13 }), t("integrations.addConnection.credentialStorage.createVault", "Create vault")]
294
- }), /* @__PURE__ */ p("span", {
301
+ }) : /* @__PURE__ */ h(f, { size: 13 }), t("integrations.addConnection.credentialStorage.createVault", "Create vault")]
302
+ }), /* @__PURE__ */ h("span", {
295
303
  className: "text-xs text-text-secondary",
296
304
  children: t("integrations.addConnection.credentialStorage.scopedHint", "Scoped to this workspace.")
297
305
  })]
@@ -299,4 +307,4 @@ var h = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5
299
307
  ]
300
308
  });
301
309
  };
302
- export { _ as CredentialStorageSelector };
310
+ export { y as CredentialStorageSelector };
@@ -0,0 +1,22 @@
1
+ import { FC, ReactNode } from 'react';
2
+ import { ConnectionFormTabProps } from './ConnectionFormTab';
3
+ /** The remembered open/closed state of the connect form's "More options". */
4
+ export declare const CONNECT_MORE_OPTIONS_KEY = "connections.connect.more-options";
5
+ export interface OneScreenConnectionFormProps extends ConnectionFormTabProps {
6
+ /** Signing in again on an existing connection: its name, storage and sharing are kept. */
7
+ reconnect: boolean;
8
+ /**
9
+ * Show where the key is kept at level 1: a vault is required and the person
10
+ * has none, so there is nothing to pick for them and the choice cannot hide.
11
+ */
12
+ storageAtTop: boolean;
13
+ onVaultsLoaded: (count: number) => void;
14
+ /** Who can use the new connection (the classic Sharing tab), when the host shows it. */
15
+ sharing?: ReactNode;
16
+ /** What the app is (the classic Details tab). */
17
+ about?: ReactNode;
18
+ /** The browser blocked the sign-in window; offer to open it from a click. */
19
+ signInBlocked: boolean;
20
+ onOpenSignIn: () => void;
21
+ }
22
+ export declare const OneScreenConnectionForm: FC<OneScreenConnectionFormProps>;