@burdenoff/fe-libs 2026.1118.12 → 2026.1119.1

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