@termix-ssh/plugin-sdk 1.0.0 → 1.0.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 (48) hide show
  1. package/README.md +7 -0
  2. package/cli/commands/changelog.mjs +25 -0
  3. package/cli/commands/dev.mjs +158 -0
  4. package/cli/commands/validate.mjs +16 -24
  5. package/cli/index.mjs +8 -0
  6. package/cli/lib/tmxplug.mjs +1 -1
  7. package/dist/backend.d.ts +6 -2
  8. package/dist/changelog.d.ts +67 -0
  9. package/dist/changelog.js +195 -0
  10. package/dist/frontend.d.ts +67 -1
  11. package/dist/host/{chunk-XGWE7BTJ.js → chunk-3KG44G55.js} +6 -1
  12. package/dist/host/{chunk-XH5NXL6Y.js → chunk-7GL25GFS.js} +8013 -7606
  13. package/dist/host/{chunk-F3SDZDDG.js → chunk-COGRSHKO.js} +17 -2
  14. package/dist/host/{linked-server-FZGWQW32.js → linked-server-BD573BEG.js} +1 -1
  15. package/dist/host/{rbac-api-6KDMBVDZ.js → rbac-api-7GHDJLU4.js} +1 -1
  16. package/dist/host/testing-host.js +38 -5
  17. package/dist/host/types/src/types/credential-sidebar-preferences.d.ts +12 -1
  18. package/dist/host/types/src/types/host-sidebar-preferences.d.ts +18 -1
  19. package/dist/host/types/src/types/onboarding.d.ts +29 -0
  20. package/dist/host/types/src/types/plugin-onboarding.d.ts +39 -0
  21. package/dist/host/types/src/types/ui-preferences.d.ts +13 -4
  22. package/dist/host/types/src/types/ui-types.d.ts +1 -1
  23. package/dist/host/types/src/ui/api/plugins-api.d.ts +194 -0
  24. package/dist/host/types/src/ui/components/connection/ConnectionLogPanel.d.ts +2 -1
  25. package/dist/host/types/src/ui/components/connection/ConnectionScreen.d.ts +5 -5
  26. package/dist/host/types/src/ui/components/list-kit.d.ts +102 -0
  27. package/dist/host/types/src/ui/components/panel-layout.d.ts +6 -1
  28. package/dist/host/types/src/ui/components/surface/surface-scope.d.ts +5 -1
  29. package/dist/host/types/src/ui/contexts/UiPreferencesContext.d.ts +15 -2
  30. package/dist/host/types/src/ui/hooks/use-permissions.d.ts +2 -0
  31. package/dist/host/types/src/ui/lib/embedded-frame.d.ts +14 -0
  32. package/dist/host/types/src/ui/onboarding/onboarding-registry.d.ts +49 -0
  33. package/dist/host/types/src/ui/plugin-host/sdk-ui.d.ts +1 -0
  34. package/dist/host/types/src/ui/plugins/open-plugins.d.ts +5 -0
  35. package/dist/host/types/src/ui/sidebar/host-contributions.d.ts +2 -0
  36. package/dist/host/types/src/ui/sidebar/rail-items.d.ts +10 -0
  37. package/dist/host/ui.js +982 -698
  38. package/dist/host/{use-permissions-NULZL43J.js → use-permissions-SKWXHWDJ.js} +3 -1
  39. package/dist/manifest.d.ts +10 -2
  40. package/dist/manifest.js +46 -1
  41. package/dist/testing/setup.js +8 -0
  42. package/dist/testing.d.ts +12 -0
  43. package/dist/vitest-preset.d.ts +3 -0
  44. package/dist/vitest-preset.js +6 -0
  45. package/package.json +5 -2
  46. package/schema/manifest.schema.json +6 -1
  47. package/cli/lib/changelog.mjs +0 -126
  48. package/schema/changelog.schema.json +0 -67
package/dist/host/ui.js CHANGED
@@ -5,6 +5,7 @@ import {
5
5
  Anchor2,
6
6
  ArrowLeft,
7
7
  BackButton,
8
+ Button,
8
9
  Cancel,
9
10
  Check,
10
11
  Checkbox,
@@ -95,15 +96,15 @@ import {
95
96
  ViewToggle,
96
97
  Viewport,
97
98
  X,
99
+ buttonVariants,
98
100
  challengeSecondFactor,
99
101
  changeAppLanguage,
100
- clsx,
101
102
  cn,
102
103
  createPluginApp,
104
+ cva,
103
105
  dist_exports,
104
106
  dist_exports2,
105
107
  dist_exports3,
106
- dist_exports4,
107
108
  getLoginMethods,
108
109
  getPlugins,
109
110
  getPollingEnvironmentMultiplier,
@@ -131,11 +132,12 @@ import {
131
132
  usePluginScope,
132
133
  useSecondFactors,
133
134
  useSettingsComponents,
135
+ useSurfaceClose,
134
136
  useSurfaceKind,
135
137
  useTheme,
136
138
  verifySecondFactor
137
- } from "./chunk-XH5NXL6Y.js";
138
- import "./chunk-XGWE7BTJ.js";
139
+ } from "./chunk-7GL25GFS.js";
140
+ import "./chunk-3KG44G55.js";
139
141
  import {
140
142
  TabProvider,
141
143
  buildOriginWsUrl,
@@ -151,6 +153,7 @@ import {
151
153
  getPasswordLoginAllowed,
152
154
  getPasswordResetAllowed,
153
155
  getPluginRecord,
156
+ getPluginStoreState,
154
157
  getRecentActivity,
155
158
  getRegistrationAllowed,
156
159
  getSSHHosts,
@@ -173,51 +176,9 @@ import {
173
176
  useTabs,
174
177
  useTabsSafe,
175
178
  verifyPasswordResetCode
176
- } from "./chunk-F3SDZDDG.js";
179
+ } from "./chunk-COGRSHKO.js";
177
180
  import "./chunk-YC2MAKSP.js";
178
181
 
179
- // node_modules/class-variance-authority/dist/index.mjs
180
- var falsyToString = (value) => typeof value === "boolean" ? `${value}` : value === 0 ? "0" : value;
181
- var cx = clsx;
182
- var cva = (base2, config2) => (props) => {
183
- var _config_compoundVariants;
184
- if ((config2 === null || config2 === void 0 ? void 0 : config2.variants) == null) return cx(base2, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
185
- const { variants, defaultVariants } = config2;
186
- const getVariantClassNames = Object.keys(variants).map((variant) => {
187
- const variantProp = props === null || props === void 0 ? void 0 : props[variant];
188
- const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];
189
- if (variantProp === null) return null;
190
- const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);
191
- return variants[variant][variantKey];
192
- });
193
- const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param) => {
194
- let [key, value] = param;
195
- if (value === void 0) {
196
- return acc;
197
- }
198
- acc[key] = value;
199
- return acc;
200
- }, {});
201
- const getCompoundVariantClassNames = config2 === null || config2 === void 0 ? void 0 : (_config_compoundVariants = config2.compoundVariants) === null || _config_compoundVariants === void 0 ? void 0 : _config_compoundVariants.reduce((acc, param) => {
202
- let { class: cvClass, className: cvClassName, ...compoundVariantOptions } = param;
203
- return Object.entries(compoundVariantOptions).every((param2) => {
204
- let [key, value] = param2;
205
- return Array.isArray(value) ? value.includes({
206
- ...defaultVariants,
207
- ...propsWithoutUndefined
208
- }[key]) : {
209
- ...defaultVariants,
210
- ...propsWithoutUndefined
211
- }[key] === value;
212
- }) ? [
213
- ...acc,
214
- cvClass,
215
- cvClassName
216
- ] : acc;
217
- }, []);
218
- return cx(base2, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
219
- };
220
-
221
182
  // src/ui/components/alert.tsx
222
183
  import { jsx } from "react/jsx-runtime";
223
184
  var alertVariants = cva(
@@ -279,79 +240,28 @@ function AlertDescription({
279
240
  );
280
241
  }
281
242
 
282
- // src/ui/components/button.tsx
283
- import { jsx as jsx2 } from "react/jsx-runtime";
284
- var buttonVariants = cva(
285
- "group/button inline-flex shrink-0 items-center justify-center rounded-none border border-transparent bg-clip-padding text-xs font-medium whitespace-nowrap transition-[color,background-color,border-color,opacity,box-shadow,transform] outline-none select-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-1 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
286
- {
287
- variants: {
288
- variant: {
289
- default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
290
- outline: "border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
291
- secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
292
- ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
293
- destructive: "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
294
- link: "text-primary underline-offset-4 hover:underline"
295
- },
296
- size: {
297
- default: "h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
298
- xs: "h-6 gap-1 rounded-none px-2 text-xs has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
299
- sm: "h-7 gap-1 rounded-none px-2.5 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",
300
- lg: "h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
301
- icon: "size-8",
302
- "icon-xs": "size-6 rounded-none [&_svg:not([class*='size-'])]:size-3",
303
- "icon-sm": "size-7 rounded-none",
304
- "icon-lg": "size-9"
305
- }
306
- },
307
- defaultVariants: {
308
- variant: "default",
309
- size: "default"
310
- }
311
- }
312
- );
313
- function Button({
314
- className,
315
- variant = "default",
316
- size = "default",
317
- asChild = false,
318
- ...props
319
- }) {
320
- const Comp = asChild ? dist_exports.Root : "button";
321
- return /* @__PURE__ */ jsx2(
322
- Comp,
323
- {
324
- "data-slot": "button",
325
- "data-variant": variant,
326
- "data-size": size,
327
- className: cn(buttonVariants({ variant, size, className })),
328
- ...props
329
- }
330
- );
331
- }
332
-
333
243
  // src/ui/components/alert-dialog.tsx
334
- import { jsx as jsx3, jsxs } from "react/jsx-runtime";
244
+ import { jsx as jsx2, jsxs } from "react/jsx-runtime";
335
245
  function AlertDialog({
336
246
  ...props
337
247
  }) {
338
- return /* @__PURE__ */ jsx3(Root2, { "data-slot": "alert-dialog", ...props });
248
+ return /* @__PURE__ */ jsx2(Root2, { "data-slot": "alert-dialog", ...props });
339
249
  }
340
250
  function AlertDialogTrigger({
341
251
  ...props
342
252
  }) {
343
- return /* @__PURE__ */ jsx3(Trigger2, { "data-slot": "alert-dialog-trigger", ...props });
253
+ return /* @__PURE__ */ jsx2(Trigger2, { "data-slot": "alert-dialog-trigger", ...props });
344
254
  }
345
255
  function AlertDialogPortal({
346
256
  ...props
347
257
  }) {
348
- return /* @__PURE__ */ jsx3(Portal2, { "data-slot": "alert-dialog-portal", ...props });
258
+ return /* @__PURE__ */ jsx2(Portal2, { "data-slot": "alert-dialog-portal", ...props });
349
259
  }
350
260
  function AlertDialogOverlay({
351
261
  className,
352
262
  ...props
353
263
  }) {
354
- return /* @__PURE__ */ jsx3(
264
+ return /* @__PURE__ */ jsx2(
355
265
  Overlay2,
356
266
  {
357
267
  "data-slot": "alert-dialog-overlay",
@@ -368,8 +278,8 @@ function AlertDialogContent({
368
278
  ...props
369
279
  }) {
370
280
  return /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [
371
- /* @__PURE__ */ jsx3(AlertDialogOverlay, {}),
372
- /* @__PURE__ */ jsx3(
281
+ /* @__PURE__ */ jsx2(AlertDialogOverlay, {}),
282
+ /* @__PURE__ */ jsx2(
373
283
  Content2,
374
284
  {
375
285
  "data-slot": "alert-dialog-content",
@@ -386,7 +296,7 @@ function AlertDialogHeader({
386
296
  className,
387
297
  ...props
388
298
  }) {
389
- return /* @__PURE__ */ jsx3(
299
+ return /* @__PURE__ */ jsx2(
390
300
  "div",
391
301
  {
392
302
  "data-slot": "alert-dialog-header",
@@ -399,7 +309,7 @@ function AlertDialogFooter({
399
309
  className,
400
310
  ...props
401
311
  }) {
402
- return /* @__PURE__ */ jsx3(
312
+ return /* @__PURE__ */ jsx2(
403
313
  "div",
404
314
  {
405
315
  "data-slot": "alert-dialog-footer",
@@ -415,7 +325,7 @@ function AlertDialogTitle({
415
325
  className,
416
326
  ...props
417
327
  }) {
418
- return /* @__PURE__ */ jsx3(
328
+ return /* @__PURE__ */ jsx2(
419
329
  Title2,
420
330
  {
421
331
  "data-slot": "alert-dialog-title",
@@ -428,7 +338,7 @@ function AlertDialogDescription({
428
338
  className,
429
339
  ...props
430
340
  }) {
431
- return /* @__PURE__ */ jsx3(
341
+ return /* @__PURE__ */ jsx2(
432
342
  Description2,
433
343
  {
434
344
  "data-slot": "alert-dialog-description",
@@ -441,7 +351,7 @@ function AlertDialogAction({
441
351
  className,
442
352
  ...props
443
353
  }) {
444
- return /* @__PURE__ */ jsx3(
354
+ return /* @__PURE__ */ jsx2(
445
355
  Action,
446
356
  {
447
357
  className: cn(buttonVariants(), className),
@@ -453,7 +363,7 @@ function AlertDialogCancel({
453
363
  className,
454
364
  ...props
455
365
  }) {
456
- return /* @__PURE__ */ jsx3(
366
+ return /* @__PURE__ */ jsx2(
457
367
  Cancel,
458
368
  {
459
369
  className: cn(buttonVariants({ variant: "outline" }), className),
@@ -463,7 +373,7 @@ function AlertDialogCancel({
463
373
  }
464
374
 
465
375
  // src/ui/components/badge.tsx
466
- import { jsx as jsx4 } from "react/jsx-runtime";
376
+ import { jsx as jsx3 } from "react/jsx-runtime";
467
377
  var badgeVariants = cva(
468
378
  "inline-flex items-center justify-center rounded-none border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
469
379
  {
@@ -487,7 +397,7 @@ function Badge({
487
397
  ...props
488
398
  }) {
489
399
  const Comp = asChild ? Slot : "span";
490
- return /* @__PURE__ */ jsx4(
400
+ return /* @__PURE__ */ jsx3(
491
401
  Comp,
492
402
  {
493
403
  "data-slot": "badge",
@@ -498,13 +408,13 @@ function Badge({
498
408
  }
499
409
 
500
410
  // src/ui/components/card.tsx
501
- import { jsx as jsx5 } from "react/jsx-runtime";
411
+ import { jsx as jsx4 } from "react/jsx-runtime";
502
412
  function Card({
503
413
  className,
504
414
  size = "default",
505
415
  ...props
506
416
  }) {
507
- return /* @__PURE__ */ jsx5(
417
+ return /* @__PURE__ */ jsx4(
508
418
  "div",
509
419
  {
510
420
  "data-slot": "card",
@@ -518,7 +428,7 @@ function Card({
518
428
  );
519
429
  }
520
430
  function CardHeader({ className, ...props }) {
521
- return /* @__PURE__ */ jsx5(
431
+ return /* @__PURE__ */ jsx4(
522
432
  "div",
523
433
  {
524
434
  "data-slot": "card-header",
@@ -531,7 +441,7 @@ function CardHeader({ className, ...props }) {
531
441
  );
532
442
  }
533
443
  function CardTitle({ className, ...props }) {
534
- return /* @__PURE__ */ jsx5(
444
+ return /* @__PURE__ */ jsx4(
535
445
  "div",
536
446
  {
537
447
  "data-slot": "card-title",
@@ -544,7 +454,7 @@ function CardTitle({ className, ...props }) {
544
454
  );
545
455
  }
546
456
  function CardDescription({ className, ...props }) {
547
- return /* @__PURE__ */ jsx5(
457
+ return /* @__PURE__ */ jsx4(
548
458
  "div",
549
459
  {
550
460
  "data-slot": "card-description",
@@ -554,7 +464,7 @@ function CardDescription({ className, ...props }) {
554
464
  );
555
465
  }
556
466
  function CardAction({ className, ...props }) {
557
- return /* @__PURE__ */ jsx5(
467
+ return /* @__PURE__ */ jsx4(
558
468
  "div",
559
469
  {
560
470
  "data-slot": "card-action",
@@ -567,7 +477,7 @@ function CardAction({ className, ...props }) {
567
477
  );
568
478
  }
569
479
  function CardContent({ className, ...props }) {
570
- return /* @__PURE__ */ jsx5(
480
+ return /* @__PURE__ */ jsx4(
571
481
  "div",
572
482
  {
573
483
  "data-slot": "card-content",
@@ -577,7 +487,7 @@ function CardContent({ className, ...props }) {
577
487
  );
578
488
  }
579
489
  function CardFooter({ className, ...props }) {
580
- return /* @__PURE__ */ jsx5(
490
+ return /* @__PURE__ */ jsx4(
581
491
  "div",
582
492
  {
583
493
  "data-slot": "card-footer",
@@ -591,12 +501,12 @@ function CardFooter({ className, ...props }) {
591
501
  }
592
502
 
593
503
  // src/ui/components/checkbox.tsx
594
- import { jsx as jsx6 } from "react/jsx-runtime";
504
+ import { jsx as jsx5 } from "react/jsx-runtime";
595
505
  function Checkbox2({
596
506
  className,
597
507
  ...props
598
508
  }) {
599
- return /* @__PURE__ */ jsx6(
509
+ return /* @__PURE__ */ jsx5(
600
510
  Checkbox,
601
511
  {
602
512
  "data-slot": "checkbox",
@@ -605,12 +515,12 @@ function Checkbox2({
605
515
  className
606
516
  ),
607
517
  ...props,
608
- children: /* @__PURE__ */ jsx6(
518
+ children: /* @__PURE__ */ jsx5(
609
519
  CheckboxIndicator,
610
520
  {
611
521
  "data-slot": "checkbox-indicator",
612
522
  className: "flex items-center justify-center text-current transition-none",
613
- children: /* @__PURE__ */ jsx6(Check, { className: "size-3.5" })
523
+ children: /* @__PURE__ */ jsx5(Check, { className: "size-3.5" })
614
524
  }
615
525
  )
616
526
  }
@@ -619,33 +529,33 @@ function Checkbox2({
619
529
 
620
530
  // src/ui/components/dialog.tsx
621
531
  import { useTranslation } from "react-i18next";
622
- import { jsx as jsx7, jsxs as jsxs2 } from "react/jsx-runtime";
532
+ import { jsx as jsx6, jsxs as jsxs2 } from "react/jsx-runtime";
623
533
  function Dialog({
624
534
  ...props
625
535
  }) {
626
- return /* @__PURE__ */ jsx7(dist_exports2.Root, { "data-slot": "dialog", ...props });
536
+ return /* @__PURE__ */ jsx6(dist_exports.Root, { "data-slot": "dialog", ...props });
627
537
  }
628
538
  function DialogTrigger({
629
539
  ...props
630
540
  }) {
631
- return /* @__PURE__ */ jsx7(dist_exports2.Trigger, { "data-slot": "dialog-trigger", ...props });
541
+ return /* @__PURE__ */ jsx6(dist_exports.Trigger, { "data-slot": "dialog-trigger", ...props });
632
542
  }
633
543
  function DialogPortal({
634
544
  ...props
635
545
  }) {
636
- return /* @__PURE__ */ jsx7(dist_exports2.Portal, { "data-slot": "dialog-portal", ...props });
546
+ return /* @__PURE__ */ jsx6(dist_exports.Portal, { "data-slot": "dialog-portal", ...props });
637
547
  }
638
548
  function DialogClose({
639
549
  ...props
640
550
  }) {
641
- return /* @__PURE__ */ jsx7(dist_exports2.Close, { "data-slot": "dialog-close", ...props });
551
+ return /* @__PURE__ */ jsx6(dist_exports.Close, { "data-slot": "dialog-close", ...props });
642
552
  }
643
553
  function DialogOverlay({
644
554
  className,
645
555
  ...props
646
556
  }) {
647
- return /* @__PURE__ */ jsx7(
648
- dist_exports2.Overlay,
557
+ return /* @__PURE__ */ jsx6(
558
+ dist_exports.Overlay,
649
559
  {
650
560
  "data-slot": "dialog-overlay",
651
561
  className: cn(
@@ -664,9 +574,9 @@ function DialogContent({
664
574
  }) {
665
575
  const { t: t2 } = useTranslation();
666
576
  return /* @__PURE__ */ jsxs2(DialogPortal, { children: [
667
- /* @__PURE__ */ jsx7(DialogOverlay, {}),
577
+ /* @__PURE__ */ jsx6(DialogOverlay, {}),
668
578
  /* @__PURE__ */ jsxs2(
669
- dist_exports2.Content,
579
+ dist_exports.Content,
670
580
  {
671
581
  "data-slot": "dialog-content",
672
582
  className: cn(
@@ -676,15 +586,15 @@ function DialogContent({
676
586
  ...props,
677
587
  children: [
678
588
  children,
679
- showCloseButton && /* @__PURE__ */ jsx7(dist_exports2.Close, { "data-slot": "dialog-close", asChild: true, children: /* @__PURE__ */ jsxs2(
589
+ showCloseButton && /* @__PURE__ */ jsx6(dist_exports.Close, { "data-slot": "dialog-close", asChild: true, children: /* @__PURE__ */ jsxs2(
680
590
  Button,
681
591
  {
682
592
  variant: "ghost",
683
593
  className: "absolute top-2 right-2",
684
594
  size: "icon-sm",
685
595
  children: [
686
- /* @__PURE__ */ jsx7(X, {}),
687
- /* @__PURE__ */ jsx7("span", { className: "sr-only", children: t2("common.close") })
596
+ /* @__PURE__ */ jsx6(X, {}),
597
+ /* @__PURE__ */ jsx6("span", { className: "sr-only", children: t2("common.close") })
688
598
  ]
689
599
  }
690
600
  ) })
@@ -694,7 +604,7 @@ function DialogContent({
694
604
  ] });
695
605
  }
696
606
  function DialogHeader({ className, ...props }) {
697
- return /* @__PURE__ */ jsx7(
607
+ return /* @__PURE__ */ jsx6(
698
608
  "div",
699
609
  {
700
610
  "data-slot": "dialog-header",
@@ -721,7 +631,7 @@ function DialogFooter({
721
631
  ...props,
722
632
  children: [
723
633
  children,
724
- showCloseButton && /* @__PURE__ */ jsx7(dist_exports2.Close, { asChild: true, children: /* @__PURE__ */ jsx7(Button, { variant: "outline", children: t2("common.close") }) })
634
+ showCloseButton && /* @__PURE__ */ jsx6(dist_exports.Close, { asChild: true, children: /* @__PURE__ */ jsx6(Button, { variant: "outline", children: t2("common.close") }) })
725
635
  ]
726
636
  }
727
637
  );
@@ -730,8 +640,8 @@ function DialogTitle({
730
640
  className,
731
641
  ...props
732
642
  }) {
733
- return /* @__PURE__ */ jsx7(
734
- dist_exports2.Title,
643
+ return /* @__PURE__ */ jsx6(
644
+ dist_exports.Title,
735
645
  {
736
646
  "data-slot": "dialog-title",
737
647
  className: cn("font-heading text-sm font-medium", className),
@@ -743,8 +653,8 @@ function DialogDescription({
743
653
  className,
744
654
  ...props
745
655
  }) {
746
- return /* @__PURE__ */ jsx7(
747
- dist_exports2.Description,
656
+ return /* @__PURE__ */ jsx6(
657
+ dist_exports.Description,
748
658
  {
749
659
  "data-slot": "dialog-description",
750
660
  className: cn(
@@ -757,22 +667,22 @@ function DialogDescription({
757
667
  }
758
668
 
759
669
  // src/ui/components/dropdown-menu.tsx
760
- import { jsx as jsx8, jsxs as jsxs3 } from "react/jsx-runtime";
670
+ import { jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
761
671
  function DropdownMenu({
762
672
  ...props
763
673
  }) {
764
- return /* @__PURE__ */ jsx8(dist_exports3.Root, { "data-slot": "dropdown-menu", ...props });
674
+ return /* @__PURE__ */ jsx7(dist_exports2.Root, { "data-slot": "dropdown-menu", ...props });
765
675
  }
766
676
  function DropdownMenuPortal({
767
677
  ...props
768
678
  }) {
769
- return /* @__PURE__ */ jsx8(dist_exports3.Portal, { "data-slot": "dropdown-menu-portal", ...props });
679
+ return /* @__PURE__ */ jsx7(dist_exports2.Portal, { "data-slot": "dropdown-menu-portal", ...props });
770
680
  }
771
681
  function DropdownMenuTrigger({
772
682
  ...props
773
683
  }) {
774
- return /* @__PURE__ */ jsx8(
775
- dist_exports3.Trigger,
684
+ return /* @__PURE__ */ jsx7(
685
+ dist_exports2.Trigger,
776
686
  {
777
687
  "data-slot": "dropdown-menu-trigger",
778
688
  ...props
@@ -785,8 +695,8 @@ function DropdownMenuContent({
785
695
  sideOffset = 4,
786
696
  ...props
787
697
  }) {
788
- return /* @__PURE__ */ jsx8(dist_exports3.Portal, { children: /* @__PURE__ */ jsx8(
789
- dist_exports3.Content,
698
+ return /* @__PURE__ */ jsx7(dist_exports2.Portal, { children: /* @__PURE__ */ jsx7(
699
+ dist_exports2.Content,
790
700
  {
791
701
  "data-slot": "dropdown-menu-content",
792
702
  sideOffset,
@@ -802,7 +712,7 @@ function DropdownMenuContent({
802
712
  function DropdownMenuGroup({
803
713
  ...props
804
714
  }) {
805
- return /* @__PURE__ */ jsx8(dist_exports3.Group, { "data-slot": "dropdown-menu-group", ...props });
715
+ return /* @__PURE__ */ jsx7(dist_exports2.Group, { "data-slot": "dropdown-menu-group", ...props });
806
716
  }
807
717
  function DropdownMenuItem({
808
718
  className,
@@ -810,8 +720,8 @@ function DropdownMenuItem({
810
720
  variant = "default",
811
721
  ...props
812
722
  }) {
813
- return /* @__PURE__ */ jsx8(
814
- dist_exports3.Item,
723
+ return /* @__PURE__ */ jsx7(
724
+ dist_exports2.Item,
815
725
  {
816
726
  "data-slot": "dropdown-menu-item",
817
727
  "data-inset": inset,
@@ -832,7 +742,7 @@ function DropdownMenuCheckboxItem({
832
742
  ...props
833
743
  }) {
834
744
  return /* @__PURE__ */ jsxs3(
835
- dist_exports3.CheckboxItem,
745
+ dist_exports2.CheckboxItem,
836
746
  {
837
747
  "data-slot": "dropdown-menu-checkbox-item",
838
748
  "data-inset": inset,
@@ -843,12 +753,12 @@ function DropdownMenuCheckboxItem({
843
753
  checked,
844
754
  ...props,
845
755
  children: [
846
- /* @__PURE__ */ jsx8(
756
+ /* @__PURE__ */ jsx7(
847
757
  "span",
848
758
  {
849
759
  className: "pointer-events-none absolute right-2 flex items-center justify-center",
850
760
  "data-slot": "dropdown-menu-checkbox-item-indicator",
851
- children: /* @__PURE__ */ jsx8(dist_exports3.ItemIndicator, { children: /* @__PURE__ */ jsx8(Check, {}) })
761
+ children: /* @__PURE__ */ jsx7(dist_exports2.ItemIndicator, { children: /* @__PURE__ */ jsx7(Check, {}) })
852
762
  }
853
763
  ),
854
764
  children
@@ -859,8 +769,8 @@ function DropdownMenuCheckboxItem({
859
769
  function DropdownMenuRadioGroup({
860
770
  ...props
861
771
  }) {
862
- return /* @__PURE__ */ jsx8(
863
- dist_exports3.RadioGroup,
772
+ return /* @__PURE__ */ jsx7(
773
+ dist_exports2.RadioGroup,
864
774
  {
865
775
  "data-slot": "dropdown-menu-radio-group",
866
776
  ...props
@@ -874,7 +784,7 @@ function DropdownMenuRadioItem({
874
784
  ...props
875
785
  }) {
876
786
  return /* @__PURE__ */ jsxs3(
877
- dist_exports3.RadioItem,
787
+ dist_exports2.RadioItem,
878
788
  {
879
789
  "data-slot": "dropdown-menu-radio-item",
880
790
  "data-inset": inset,
@@ -884,12 +794,12 @@ function DropdownMenuRadioItem({
884
794
  ),
885
795
  ...props,
886
796
  children: [
887
- /* @__PURE__ */ jsx8(
797
+ /* @__PURE__ */ jsx7(
888
798
  "span",
889
799
  {
890
800
  className: "pointer-events-none absolute right-2 flex items-center justify-center",
891
801
  "data-slot": "dropdown-menu-radio-item-indicator",
892
- children: /* @__PURE__ */ jsx8(dist_exports3.ItemIndicator, { children: /* @__PURE__ */ jsx8(Check, {}) })
802
+ children: /* @__PURE__ */ jsx7(dist_exports2.ItemIndicator, { children: /* @__PURE__ */ jsx7(Check, {}) })
893
803
  }
894
804
  ),
895
805
  children
@@ -902,8 +812,8 @@ function DropdownMenuLabel({
902
812
  inset,
903
813
  ...props
904
814
  }) {
905
- return /* @__PURE__ */ jsx8(
906
- dist_exports3.Label,
815
+ return /* @__PURE__ */ jsx7(
816
+ dist_exports2.Label,
907
817
  {
908
818
  "data-slot": "dropdown-menu-label",
909
819
  "data-inset": inset,
@@ -919,8 +829,8 @@ function DropdownMenuSeparator({
919
829
  className,
920
830
  ...props
921
831
  }) {
922
- return /* @__PURE__ */ jsx8(
923
- dist_exports3.Separator,
832
+ return /* @__PURE__ */ jsx7(
833
+ dist_exports2.Separator,
924
834
  {
925
835
  "data-slot": "dropdown-menu-separator",
926
836
  className: cn("-mx-1 h-px bg-border", className),
@@ -932,7 +842,7 @@ function DropdownMenuShortcut({
932
842
  className,
933
843
  ...props
934
844
  }) {
935
- return /* @__PURE__ */ jsx8(
845
+ return /* @__PURE__ */ jsx7(
936
846
  "span",
937
847
  {
938
848
  "data-slot": "dropdown-menu-shortcut",
@@ -947,7 +857,7 @@ function DropdownMenuShortcut({
947
857
  function DropdownMenuSub({
948
858
  ...props
949
859
  }) {
950
- return /* @__PURE__ */ jsx8(dist_exports3.Sub, { "data-slot": "dropdown-menu-sub", ...props });
860
+ return /* @__PURE__ */ jsx7(dist_exports2.Sub, { "data-slot": "dropdown-menu-sub", ...props });
951
861
  }
952
862
  function DropdownMenuSubTrigger({
953
863
  className,
@@ -956,7 +866,7 @@ function DropdownMenuSubTrigger({
956
866
  ...props
957
867
  }) {
958
868
  return /* @__PURE__ */ jsxs3(
959
- dist_exports3.SubTrigger,
869
+ dist_exports2.SubTrigger,
960
870
  {
961
871
  "data-slot": "dropdown-menu-sub-trigger",
962
872
  "data-inset": inset,
@@ -967,7 +877,7 @@ function DropdownMenuSubTrigger({
967
877
  ...props,
968
878
  children: [
969
879
  children,
970
- /* @__PURE__ */ jsx8(ChevronRight, { className: "ml-auto" })
880
+ /* @__PURE__ */ jsx7(ChevronRight, { className: "ml-auto" })
971
881
  ]
972
882
  }
973
883
  );
@@ -978,8 +888,8 @@ function DropdownMenuSubContent({
978
888
  alignOffset = -4,
979
889
  ...props
980
890
  }) {
981
- return /* @__PURE__ */ jsx8(
982
- dist_exports3.SubContent,
891
+ return /* @__PURE__ */ jsx7(
892
+ dist_exports2.SubContent,
983
893
  {
984
894
  "data-slot": "dropdown-menu-sub-content",
985
895
  sideOffset,
@@ -994,9 +904,9 @@ function DropdownMenuSubContent({
994
904
  }
995
905
 
996
906
  // src/ui/components/input.tsx
997
- import { jsx as jsx9 } from "react/jsx-runtime";
907
+ import { jsx as jsx8 } from "react/jsx-runtime";
998
908
  function Input({ className, type, ...props }) {
999
- return /* @__PURE__ */ jsx9(
909
+ return /* @__PURE__ */ jsx8(
1000
910
  "input",
1001
911
  {
1002
912
  type,
@@ -1012,12 +922,12 @@ function Input({ className, type, ...props }) {
1012
922
  }
1013
923
 
1014
924
  // src/ui/components/label.tsx
1015
- import { jsx as jsx10 } from "react/jsx-runtime";
925
+ import { jsx as jsx9 } from "react/jsx-runtime";
1016
926
  function Label({
1017
927
  className,
1018
928
  ...props
1019
929
  }) {
1020
- return /* @__PURE__ */ jsx10(
930
+ return /* @__PURE__ */ jsx9(
1021
931
  Root,
1022
932
  {
1023
933
  "data-slot": "label",
@@ -1032,11 +942,11 @@ function Label({
1032
942
 
1033
943
  // src/ui/components/password-input.tsx
1034
944
  import * as React from "react";
1035
- import { jsx as jsx11, jsxs as jsxs4 } from "react/jsx-runtime";
945
+ import { jsx as jsx10, jsxs as jsxs4 } from "react/jsx-runtime";
1036
946
  var PasswordInput = React.forwardRef(({ className, ...props }, ref) => {
1037
947
  const [showPassword, setShowPassword] = React.useState(false);
1038
948
  return /* @__PURE__ */ jsxs4("div", { className: "relative w-full", children: [
1039
- /* @__PURE__ */ jsx11(
949
+ /* @__PURE__ */ jsx10(
1040
950
  Input,
1041
951
  {
1042
952
  ref,
@@ -1045,14 +955,14 @@ var PasswordInput = React.forwardRef(({ className, ...props }, ref) => {
1045
955
  ...props
1046
956
  }
1047
957
  ),
1048
- /* @__PURE__ */ jsx11(
958
+ /* @__PURE__ */ jsx10(
1049
959
  "button",
1050
960
  {
1051
961
  type: "button",
1052
962
  onClick: () => setShowPassword((prev) => !prev),
1053
963
  className: "absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground transition",
1054
964
  "aria-label": showPassword ? "Hide password" : "Show password",
1055
- children: showPassword ? /* @__PURE__ */ jsx11(EyeOff, { className: "h-5 w-5" }) : /* @__PURE__ */ jsx11(Eye, { className: "h-5 w-5" })
965
+ children: showPassword ? /* @__PURE__ */ jsx10(EyeOff, { className: "h-5 w-5" }) : /* @__PURE__ */ jsx10(Eye, { className: "h-5 w-5" })
1056
966
  }
1057
967
  )
1058
968
  ] });
@@ -1060,16 +970,16 @@ var PasswordInput = React.forwardRef(({ className, ...props }, ref) => {
1060
970
  PasswordInput.displayName = "PasswordInput";
1061
971
 
1062
972
  // src/ui/components/popover.tsx
1063
- import { jsx as jsx12 } from "react/jsx-runtime";
973
+ import { jsx as jsx11 } from "react/jsx-runtime";
1064
974
  function Popover({
1065
975
  ...props
1066
976
  }) {
1067
- return /* @__PURE__ */ jsx12(Root22, { "data-slot": "popover", ...props });
977
+ return /* @__PURE__ */ jsx11(Root22, { "data-slot": "popover", ...props });
1068
978
  }
1069
979
  function PopoverTrigger({
1070
980
  ...props
1071
981
  }) {
1072
- return /* @__PURE__ */ jsx12(Trigger, { "data-slot": "popover-trigger", ...props });
982
+ return /* @__PURE__ */ jsx11(Trigger, { "data-slot": "popover-trigger", ...props });
1073
983
  }
1074
984
  function PopoverContent({
1075
985
  className,
@@ -1077,7 +987,7 @@ function PopoverContent({
1077
987
  sideOffset = 4,
1078
988
  ...props
1079
989
  }) {
1080
- return /* @__PURE__ */ jsx12(Portal, { children: /* @__PURE__ */ jsx12(
990
+ return /* @__PURE__ */ jsx11(Portal, { children: /* @__PURE__ */ jsx11(
1081
991
  Content22,
1082
992
  {
1083
993
  "data-slot": "popover-content",
@@ -1094,11 +1004,11 @@ function PopoverContent({
1094
1004
  function PopoverAnchor({
1095
1005
  ...props
1096
1006
  }) {
1097
- return /* @__PURE__ */ jsx12(Anchor2, { "data-slot": "popover-anchor", ...props });
1007
+ return /* @__PURE__ */ jsx11(Anchor2, { "data-slot": "popover-anchor", ...props });
1098
1008
  }
1099
1009
 
1100
1010
  // src/ui/components/scroll-area.tsx
1101
- import { jsx as jsx13, jsxs as jsxs5 } from "react/jsx-runtime";
1011
+ import { jsx as jsx12, jsxs as jsxs5 } from "react/jsx-runtime";
1102
1012
  function ScrollArea({
1103
1013
  className,
1104
1014
  children,
@@ -1111,7 +1021,7 @@ function ScrollArea({
1111
1021
  className: cn("relative", className),
1112
1022
  ...props,
1113
1023
  children: [
1114
- /* @__PURE__ */ jsx13(
1024
+ /* @__PURE__ */ jsx12(
1115
1025
  Viewport,
1116
1026
  {
1117
1027
  "data-slot": "scroll-area-viewport",
@@ -1119,8 +1029,8 @@ function ScrollArea({
1119
1029
  children
1120
1030
  }
1121
1031
  ),
1122
- /* @__PURE__ */ jsx13(ScrollBar, {}),
1123
- /* @__PURE__ */ jsx13(Corner, {})
1032
+ /* @__PURE__ */ jsx12(ScrollBar, {}),
1033
+ /* @__PURE__ */ jsx12(Corner, {})
1124
1034
  ]
1125
1035
  }
1126
1036
  );
@@ -1130,7 +1040,7 @@ function ScrollBar({
1130
1040
  orientation = "vertical",
1131
1041
  ...props
1132
1042
  }) {
1133
- return /* @__PURE__ */ jsx13(
1043
+ return /* @__PURE__ */ jsx12(
1134
1044
  ScrollAreaScrollbar,
1135
1045
  {
1136
1046
  "data-slot": "scroll-area-scrollbar",
@@ -1142,7 +1052,7 @@ function ScrollBar({
1142
1052
  className
1143
1053
  ),
1144
1054
  ...props,
1145
- children: /* @__PURE__ */ jsx13(
1055
+ children: /* @__PURE__ */ jsx12(
1146
1056
  ScrollAreaThumb,
1147
1057
  {
1148
1058
  "data-slot": "scroll-area-thumb",
@@ -1154,21 +1064,21 @@ function ScrollBar({
1154
1064
  }
1155
1065
 
1156
1066
  // src/ui/components/select.tsx
1157
- import { jsx as jsx14, jsxs as jsxs6 } from "react/jsx-runtime";
1067
+ import { jsx as jsx13, jsxs as jsxs6 } from "react/jsx-runtime";
1158
1068
  function Select2({
1159
1069
  ...props
1160
1070
  }) {
1161
- return /* @__PURE__ */ jsx14(Select, { "data-slot": "select", ...props });
1071
+ return /* @__PURE__ */ jsx13(Select, { "data-slot": "select", ...props });
1162
1072
  }
1163
1073
  function SelectGroup2({
1164
1074
  ...props
1165
1075
  }) {
1166
- return /* @__PURE__ */ jsx14(SelectGroup, { "data-slot": "select-group", ...props });
1076
+ return /* @__PURE__ */ jsx13(SelectGroup, { "data-slot": "select-group", ...props });
1167
1077
  }
1168
1078
  function SelectValue2({
1169
1079
  ...props
1170
1080
  }) {
1171
- return /* @__PURE__ */ jsx14(SelectValue, { "data-slot": "select-value", ...props });
1081
+ return /* @__PURE__ */ jsx13(SelectValue, { "data-slot": "select-value", ...props });
1172
1082
  }
1173
1083
  function SelectTrigger2({
1174
1084
  className,
@@ -1188,7 +1098,7 @@ function SelectTrigger2({
1188
1098
  ...props,
1189
1099
  children: [
1190
1100
  children,
1191
- /* @__PURE__ */ jsx14(SelectIcon, { asChild: true, children: /* @__PURE__ */ jsx14(ChevronDown, { className: "size-4 opacity-50" }) })
1101
+ /* @__PURE__ */ jsx13(SelectIcon, { asChild: true, children: /* @__PURE__ */ jsx13(ChevronDown, { className: "size-4 opacity-50" }) })
1192
1102
  ]
1193
1103
  }
1194
1104
  );
@@ -1199,7 +1109,7 @@ function SelectContent2({
1199
1109
  position = "popper",
1200
1110
  ...props
1201
1111
  }) {
1202
- return /* @__PURE__ */ jsx14(SelectPortal, { children: /* @__PURE__ */ jsxs6(
1112
+ return /* @__PURE__ */ jsx13(SelectPortal, { children: /* @__PURE__ */ jsxs6(
1203
1113
  SelectContent,
1204
1114
  {
1205
1115
  "data-slot": "select-content",
@@ -1211,8 +1121,8 @@ function SelectContent2({
1211
1121
  position,
1212
1122
  ...props,
1213
1123
  children: [
1214
- /* @__PURE__ */ jsx14(SelectScrollUpButton2, {}),
1215
- /* @__PURE__ */ jsx14(
1124
+ /* @__PURE__ */ jsx13(SelectScrollUpButton2, {}),
1125
+ /* @__PURE__ */ jsx13(
1216
1126
  SelectViewport,
1217
1127
  {
1218
1128
  className: cn(
@@ -1222,7 +1132,7 @@ function SelectContent2({
1222
1132
  children
1223
1133
  }
1224
1134
  ),
1225
- /* @__PURE__ */ jsx14(SelectScrollDownButton2, {})
1135
+ /* @__PURE__ */ jsx13(SelectScrollDownButton2, {})
1226
1136
  ]
1227
1137
  }
1228
1138
  ) });
@@ -1231,7 +1141,7 @@ function SelectLabel2({
1231
1141
  className,
1232
1142
  ...props
1233
1143
  }) {
1234
- return /* @__PURE__ */ jsx14(
1144
+ return /* @__PURE__ */ jsx13(
1235
1145
  SelectLabel,
1236
1146
  {
1237
1147
  "data-slot": "select-label",
@@ -1255,8 +1165,8 @@ function SelectItem2({
1255
1165
  ),
1256
1166
  ...props,
1257
1167
  children: [
1258
- /* @__PURE__ */ jsx14("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx14(SelectItemIndicator, { children: /* @__PURE__ */ jsx14(Check, { className: "size-4" }) }) }),
1259
- /* @__PURE__ */ jsx14(SelectItemText, { children })
1168
+ /* @__PURE__ */ jsx13("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx13(SelectItemIndicator, { children: /* @__PURE__ */ jsx13(Check, { className: "size-4" }) }) }),
1169
+ /* @__PURE__ */ jsx13(SelectItemText, { children })
1260
1170
  ]
1261
1171
  }
1262
1172
  );
@@ -1265,7 +1175,7 @@ function SelectSeparator2({
1265
1175
  className,
1266
1176
  ...props
1267
1177
  }) {
1268
- return /* @__PURE__ */ jsx14(
1178
+ return /* @__PURE__ */ jsx13(
1269
1179
  SelectSeparator,
1270
1180
  {
1271
1181
  "data-slot": "select-separator",
@@ -1278,7 +1188,7 @@ function SelectScrollUpButton2({
1278
1188
  className,
1279
1189
  ...props
1280
1190
  }) {
1281
- return /* @__PURE__ */ jsx14(
1191
+ return /* @__PURE__ */ jsx13(
1282
1192
  SelectScrollUpButton,
1283
1193
  {
1284
1194
  "data-slot": "select-scroll-up-button",
@@ -1287,7 +1197,7 @@ function SelectScrollUpButton2({
1287
1197
  className
1288
1198
  ),
1289
1199
  ...props,
1290
- children: /* @__PURE__ */ jsx14(ChevronUp, { className: "size-4" })
1200
+ children: /* @__PURE__ */ jsx13(ChevronUp, { className: "size-4" })
1291
1201
  }
1292
1202
  );
1293
1203
  }
@@ -1295,7 +1205,7 @@ function SelectScrollDownButton2({
1295
1205
  className,
1296
1206
  ...props
1297
1207
  }) {
1298
- return /* @__PURE__ */ jsx14(
1208
+ return /* @__PURE__ */ jsx13(
1299
1209
  SelectScrollDownButton,
1300
1210
  {
1301
1211
  "data-slot": "select-scroll-down-button",
@@ -1304,7 +1214,7 @@ function SelectScrollDownButton2({
1304
1214
  className
1305
1215
  ),
1306
1216
  ...props,
1307
- children: /* @__PURE__ */ jsx14(ChevronDown, { className: "size-4" })
1217
+ children: /* @__PURE__ */ jsx13(ChevronDown, { className: "size-4" })
1308
1218
  }
1309
1219
  );
1310
1220
  }
@@ -1312,7 +1222,7 @@ function SelectScrollDownButton2({
1312
1222
  // src/ui/components/select2.tsx
1313
1223
  import { useTranslation as useTranslation2 } from "react-i18next";
1314
1224
  import * as React2 from "react";
1315
- import { jsx as jsx15, jsxs as jsxs7 } from "react/jsx-runtime";
1225
+ import { jsx as jsx14, jsxs as jsxs7 } from "react/jsx-runtime";
1316
1226
  function getText(children) {
1317
1227
  return React2.Children.toArray(children).map((child) => {
1318
1228
  if (typeof child === "string" || typeof child === "number") {
@@ -1392,7 +1302,7 @@ function Select22({
1392
1302
  if (!open) setQuery("");
1393
1303
  }, [open]);
1394
1304
  return /* @__PURE__ */ jsxs7(Popover, { open, onOpenChange: setOpen, children: [
1395
- /* @__PURE__ */ jsx15(
1305
+ /* @__PURE__ */ jsx14(
1396
1306
  "select",
1397
1307
  {
1398
1308
  name: name2,
@@ -1406,7 +1316,7 @@ function Select22({
1406
1316
  children
1407
1317
  }
1408
1318
  ),
1409
- /* @__PURE__ */ jsx15(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs7(
1319
+ /* @__PURE__ */ jsx14(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs7(
1410
1320
  "button",
1411
1321
  {
1412
1322
  type: "button",
@@ -1429,7 +1339,7 @@ function Select22({
1429
1339
  },
1430
1340
  ...props,
1431
1341
  children: [
1432
- /* @__PURE__ */ jsx15(
1342
+ /* @__PURE__ */ jsx14(
1433
1343
  "span",
1434
1344
  {
1435
1345
  className: cn(
@@ -1439,7 +1349,7 @@ function Select22({
1439
1349
  children: selected?.label || placeholder2 || "Select an option"
1440
1350
  }
1441
1351
  ),
1442
- /* @__PURE__ */ jsx15(ChevronDown, { className: "size-4 shrink-0 text-muted-foreground opacity-70" })
1352
+ /* @__PURE__ */ jsx14(ChevronDown, { className: "size-4 shrink-0 text-muted-foreground opacity-70" })
1443
1353
  ]
1444
1354
  }
1445
1355
  ) }),
@@ -1453,8 +1363,8 @@ function Select22({
1453
1363
  ),
1454
1364
  children: [
1455
1365
  /* @__PURE__ */ jsxs7("div", { className: "flex items-center border-b border-border px-2", children: [
1456
- /* @__PURE__ */ jsx15(Search, { className: "mr-2 size-4 shrink-0 text-muted-foreground" }),
1457
- /* @__PURE__ */ jsx15(
1366
+ /* @__PURE__ */ jsx14(Search, { className: "mr-2 size-4 shrink-0 text-muted-foreground" }),
1367
+ /* @__PURE__ */ jsx14(
1458
1368
  "input",
1459
1369
  {
1460
1370
  value: query,
@@ -1465,16 +1375,16 @@ function Select22({
1465
1375
  }
1466
1376
  )
1467
1377
  ] }),
1468
- /* @__PURE__ */ jsx15(
1378
+ /* @__PURE__ */ jsx14(
1469
1379
  "div",
1470
1380
  {
1471
1381
  role: "listbox",
1472
1382
  className: "max-h-64 overflow-y-auto p-1 thin-scrollbar",
1473
- children: filteredOptions.length === 0 ? /* @__PURE__ */ jsx15("div", { className: "px-2 py-6 text-center text-sm text-muted-foreground", children: t2("common.noResults") }) : filteredOptions.map((option, index) => {
1383
+ children: filteredOptions.length === 0 ? /* @__PURE__ */ jsx14("div", { className: "px-2 py-6 text-center text-sm text-muted-foreground", children: t2("common.noResults") }) : filteredOptions.map((option, index) => {
1474
1384
  const showGroup = option.group && filteredOptions.slice(0, index).every((previous) => previous.group !== option.group);
1475
1385
  const isSelected = option.value === currentValue;
1476
1386
  return /* @__PURE__ */ jsxs7(React2.Fragment, { children: [
1477
- showGroup && /* @__PURE__ */ jsx15("div", { className: "px-2 py-1.5 text-xs font-medium text-muted-foreground", children: option.group }),
1387
+ showGroup && /* @__PURE__ */ jsx14("div", { className: "px-2 py-1.5 text-xs font-medium text-muted-foreground", children: option.group }),
1478
1388
  /* @__PURE__ */ jsxs7(
1479
1389
  "button",
1480
1390
  {
@@ -1488,8 +1398,8 @@ function Select22({
1488
1398
  ),
1489
1399
  onClick: () => selectValue(option.value),
1490
1400
  children: [
1491
- /* @__PURE__ */ jsx15("span", { className: "min-w-0 flex-1 truncate", children: option.label }),
1492
- isSelected && /* @__PURE__ */ jsx15(Check, { className: "size-4 shrink-0" })
1401
+ /* @__PURE__ */ jsx14("span", { className: "min-w-0 flex-1 truncate", children: option.label }),
1402
+ isSelected && /* @__PURE__ */ jsx14(Check, { className: "size-4 shrink-0" })
1493
1403
  ]
1494
1404
  }
1495
1405
  )
@@ -1504,9 +1414,9 @@ function Select22({
1504
1414
  }
1505
1415
 
1506
1416
  // src/ui/components/skeleton.tsx
1507
- import { jsx as jsx16 } from "react/jsx-runtime";
1417
+ import { jsx as jsx15 } from "react/jsx-runtime";
1508
1418
  function Skeleton({ className, ...props }) {
1509
- return /* @__PURE__ */ jsx16(
1419
+ return /* @__PURE__ */ jsx15(
1510
1420
  "div",
1511
1421
  {
1512
1422
  "data-slot": "skeleton",
@@ -1518,7 +1428,7 @@ function Skeleton({ className, ...props }) {
1518
1428
 
1519
1429
  // src/ui/components/slider.tsx
1520
1430
  import * as React3 from "react";
1521
- import { jsx as jsx17, jsxs as jsxs8 } from "react/jsx-runtime";
1431
+ import { jsx as jsx16, jsxs as jsxs8 } from "react/jsx-runtime";
1522
1432
  function Slider2({
1523
1433
  className,
1524
1434
  defaultValue,
@@ -1545,14 +1455,14 @@ function Slider2({
1545
1455
  ),
1546
1456
  ...props,
1547
1457
  children: [
1548
- /* @__PURE__ */ jsx17(
1458
+ /* @__PURE__ */ jsx16(
1549
1459
  SliderTrack,
1550
1460
  {
1551
1461
  "data-slot": "slider-track",
1552
1462
  className: cn(
1553
1463
  "bg-input relative grow overflow-hidden rounded-none data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"
1554
1464
  ),
1555
- children: /* @__PURE__ */ jsx17(
1465
+ children: /* @__PURE__ */ jsx16(
1556
1466
  SliderRange,
1557
1467
  {
1558
1468
  "data-slot": "slider-range",
@@ -1564,7 +1474,7 @@ function Slider2({
1564
1474
  )
1565
1475
  }
1566
1476
  ),
1567
- Array.from({ length: _values.length }, (_, index) => /* @__PURE__ */ jsx17(
1477
+ Array.from({ length: _values.length }, (_, index) => /* @__PURE__ */ jsx16(
1568
1478
  SliderThumb,
1569
1479
  {
1570
1480
  "data-slot": "slider-thumb",
@@ -1579,12 +1489,12 @@ function Slider2({
1579
1489
  }
1580
1490
 
1581
1491
  // src/ui/components/switch.tsx
1582
- import { jsx as jsx18 } from "react/jsx-runtime";
1492
+ import { jsx as jsx17 } from "react/jsx-runtime";
1583
1493
  function Switch2({
1584
1494
  className,
1585
1495
  ...props
1586
1496
  }) {
1587
- return /* @__PURE__ */ jsx18(
1497
+ return /* @__PURE__ */ jsx17(
1588
1498
  Switch,
1589
1499
  {
1590
1500
  "data-slot": "switch",
@@ -1593,7 +1503,7 @@ function Switch2({
1593
1503
  className
1594
1504
  ),
1595
1505
  ...props,
1596
- children: /* @__PURE__ */ jsx18(
1506
+ children: /* @__PURE__ */ jsx17(
1597
1507
  SwitchThumb,
1598
1508
  {
1599
1509
  "data-slot": "switch-thumb",
@@ -1608,10 +1518,10 @@ function Switch2({
1608
1518
 
1609
1519
  // src/ui/components/textarea.tsx
1610
1520
  import * as React4 from "react";
1611
- import { jsx as jsx19 } from "react/jsx-runtime";
1521
+ import { jsx as jsx18 } from "react/jsx-runtime";
1612
1522
  var Textarea = React4.forwardRef(
1613
1523
  ({ className, ...props }, ref) => {
1614
- return /* @__PURE__ */ jsx19(
1524
+ return /* @__PURE__ */ jsx18(
1615
1525
  "textarea",
1616
1526
  {
1617
1527
  className: cn(
@@ -1627,13 +1537,13 @@ var Textarea = React4.forwardRef(
1627
1537
  Textarea.displayName = "Textarea";
1628
1538
 
1629
1539
  // src/ui/components/tooltip.tsx
1630
- import { jsx as jsx20, jsxs as jsxs9 } from "react/jsx-runtime";
1540
+ import { jsx as jsx19, jsxs as jsxs9 } from "react/jsx-runtime";
1631
1541
  function TooltipProvider({
1632
1542
  delayDuration = 0,
1633
1543
  ...props
1634
1544
  }) {
1635
- return /* @__PURE__ */ jsx20(
1636
- dist_exports4.Provider,
1545
+ return /* @__PURE__ */ jsx19(
1546
+ dist_exports3.Provider,
1637
1547
  {
1638
1548
  "data-slot": "tooltip-provider",
1639
1549
  delayDuration,
@@ -1644,12 +1554,12 @@ function TooltipProvider({
1644
1554
  function Tooltip({
1645
1555
  ...props
1646
1556
  }) {
1647
- return /* @__PURE__ */ jsx20(dist_exports4.Root, { "data-slot": "tooltip", ...props });
1557
+ return /* @__PURE__ */ jsx19(dist_exports3.Root, { "data-slot": "tooltip", ...props });
1648
1558
  }
1649
1559
  function TooltipTrigger({
1650
1560
  ...props
1651
1561
  }) {
1652
- return /* @__PURE__ */ jsx20(dist_exports4.Trigger, { "data-slot": "tooltip-trigger", ...props });
1562
+ return /* @__PURE__ */ jsx19(dist_exports3.Trigger, { "data-slot": "tooltip-trigger", ...props });
1653
1563
  }
1654
1564
  function TooltipContent({
1655
1565
  className,
@@ -1657,8 +1567,8 @@ function TooltipContent({
1657
1567
  children,
1658
1568
  ...props
1659
1569
  }) {
1660
- return /* @__PURE__ */ jsx20(dist_exports4.Portal, { children: /* @__PURE__ */ jsxs9(
1661
- dist_exports4.Content,
1570
+ return /* @__PURE__ */ jsx19(dist_exports3.Portal, { children: /* @__PURE__ */ jsxs9(
1571
+ dist_exports3.Content,
1662
1572
  {
1663
1573
  "data-slot": "tooltip-content",
1664
1574
  sideOffset,
@@ -1669,7 +1579,7 @@ function TooltipContent({
1669
1579
  ...props,
1670
1580
  children: [
1671
1581
  children,
1672
- /* @__PURE__ */ jsx20(dist_exports4.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-none bg-foreground fill-foreground" })
1582
+ /* @__PURE__ */ jsx19(dist_exports3.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-none bg-foreground fill-foreground" })
1673
1583
  ]
1674
1584
  }
1675
1585
  ) });
@@ -1678,7 +1588,7 @@ function TooltipContent({
1678
1588
  // src/ui/lib/host-defaults-context.tsx
1679
1589
  import { createContext, useContext } from "react";
1680
1590
  import { useTranslation as useTranslation3 } from "react-i18next";
1681
- import { Fragment as Fragment2, jsx as jsx21, jsxs as jsxs10 } from "react/jsx-runtime";
1591
+ import { Fragment as Fragment2, jsx as jsx20, jsxs as jsxs10 } from "react/jsx-runtime";
1682
1592
  var HostDefaultsContext = createContext(null);
1683
1593
  function useHostDefaults() {
1684
1594
  return useContext(HostDefaultsContext);
@@ -1728,14 +1638,14 @@ function HostDefaultBadge({ settingKey }) {
1728
1638
  title: defaults3 ? t2("hostDefaults.clearTitle", { source: from }) : t2("hostDefaults.resetTitle", { source: from }),
1729
1639
  className: "inline-flex items-center gap-0.5 border border-accent-brand/40 px-1 text-[10px] font-medium normal-case tracking-normal text-accent-brand hover:bg-accent-brand/10",
1730
1640
  children: [
1731
- defaults3 ? /* @__PURE__ */ jsx21(X, { className: "size-2.5" }) : /* @__PURE__ */ jsx21(RotateCcw, { className: "size-2.5" }),
1641
+ defaults3 ? /* @__PURE__ */ jsx20(X, { className: "size-2.5" }) : /* @__PURE__ */ jsx20(RotateCcw, { className: "size-2.5" }),
1732
1642
  defaults3 ? t2("hostDefaults.setHere") : t2("hostDefaults.custom")
1733
1643
  ]
1734
1644
  }
1735
1645
  );
1736
1646
  }
1737
1647
  if (own || source?.level === "builtin") return null;
1738
- return /* @__PURE__ */ jsx21(
1648
+ return /* @__PURE__ */ jsx20(
1739
1649
  "span",
1740
1650
  {
1741
1651
  title: source ? t2("hostDefaults.inheritedTitle", { source: from }) : t2("hostDefaults.notSetTitle"),
@@ -1753,12 +1663,12 @@ function DefaultsOnly({
1753
1663
  if (context?.mode === "defaults" && fullKey && !context.isAvailable(fullKey)) {
1754
1664
  return null;
1755
1665
  }
1756
- return /* @__PURE__ */ jsx21(Fragment2, { children });
1666
+ return /* @__PURE__ */ jsx20(Fragment2, { children });
1757
1667
  }
1758
1668
 
1759
1669
  // src/ui/components/section-card.tsx
1760
1670
  import { useState as useState3 } from "react";
1761
- import { jsx as jsx22, jsxs as jsxs11 } from "react/jsx-runtime";
1671
+ import { jsx as jsx21, jsxs as jsxs11 } from "react/jsx-runtime";
1762
1672
  function SectionCard({
1763
1673
  title,
1764
1674
  icon,
@@ -1774,11 +1684,11 @@ function SectionCard({
1774
1684
  className: `flex flex-col border border-border bg-card overflow-hidden ${className ?? ""}`,
1775
1685
  children: [
1776
1686
  /* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-2 px-4 py-2.5 border-b border-border shrink-0", children: [
1777
- /* @__PURE__ */ jsx22("span", { className: "text-muted-foreground", children: icon }),
1778
- /* @__PURE__ */ jsx22("span", { className: "text-[10px] font-semibold uppercase tracking-widest text-muted-foreground flex-1", children: title }),
1779
- action && /* @__PURE__ */ jsx22("div", { className: "ml-auto", children: action })
1687
+ /* @__PURE__ */ jsx21("span", { className: "text-muted-foreground", children: icon }),
1688
+ /* @__PURE__ */ jsx21("span", { className: "text-[10px] font-semibold uppercase tracking-widest text-muted-foreground flex-1", children: title }),
1689
+ action && /* @__PURE__ */ jsx21("div", { className: "ml-auto", children: action })
1780
1690
  ] }),
1781
- /* @__PURE__ */ jsx22("div", { className: "px-3 md:px-4 py-1", children })
1691
+ /* @__PURE__ */ jsx21("div", { className: "px-3 md:px-4 py-1", children })
1782
1692
  ]
1783
1693
  }
1784
1694
  );
@@ -1791,21 +1701,21 @@ function SettingRow({
1791
1701
  rowId,
1792
1702
  children
1793
1703
  }) {
1794
- return /* @__PURE__ */ jsx22(DefaultsOnly, { settingKey: defaultKey ?? "", children: /* @__PURE__ */ jsxs11(
1704
+ return /* @__PURE__ */ jsx21(DefaultsOnly, { settingKey: defaultKey ?? "", children: /* @__PURE__ */ jsxs11(
1795
1705
  "div",
1796
1706
  {
1797
- "data-setting-row": rowId,
1707
+ "data-setting-row": rowId ?? "",
1798
1708
  className: "flex items-center justify-between gap-3 py-3 border-b border-border last:border-0 [.gap-4>&]:py-0 [.gap-4>&]:border-0",
1799
1709
  children: [
1800
1710
  /* @__PURE__ */ jsxs11("div", { className: "flex flex-col gap-0.5 min-w-0 flex-1", children: [
1801
1711
  /* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-1.5 flex-wrap", children: [
1802
- /* @__PURE__ */ jsx22("span", { className: "text-sm font-medium leading-snug", children: label }),
1803
- badge && /* @__PURE__ */ jsx22("span", { className: "text-[10px] font-bold text-warning border border-warning/40 px-1 shrink-0", children: badge }),
1804
- defaultKey && /* @__PURE__ */ jsx22(HostDefaultBadge, { settingKey: defaultKey })
1712
+ /* @__PURE__ */ jsx21("span", { className: "text-sm font-medium leading-snug", children: label }),
1713
+ badge && /* @__PURE__ */ jsx21("span", { className: "text-[10px] font-bold text-warning border border-warning/40 px-1 shrink-0", children: badge }),
1714
+ defaultKey && /* @__PURE__ */ jsx21(HostDefaultBadge, { settingKey: defaultKey })
1805
1715
  ] }),
1806
- description && /* @__PURE__ */ jsx22("span", { className: "text-xs text-muted-foreground leading-snug", children: description })
1716
+ description && /* @__PURE__ */ jsx21("span", { className: "text-xs text-muted-foreground leading-snug", children: description })
1807
1717
  ] }),
1808
- /* @__PURE__ */ jsx22("div", { className: "shrink-0", children })
1718
+ /* @__PURE__ */ jsx21("div", { className: "shrink-0", children })
1809
1719
  ]
1810
1720
  }
1811
1721
  ) });
@@ -1818,7 +1728,7 @@ function FakeSwitch({
1818
1728
  }) {
1819
1729
  const [internalOn, setInternalOn] = useState3(defaultChecked);
1820
1730
  const on = checked !== void 0 ? checked : internalOn;
1821
- return /* @__PURE__ */ jsx22(
1731
+ return /* @__PURE__ */ jsx21(
1822
1732
  "button",
1823
1733
  {
1824
1734
  type: "button",
@@ -1831,7 +1741,7 @@ function FakeSwitch({
1831
1741
  onChange?.(next);
1832
1742
  },
1833
1743
  className: `relative inline-flex h-5 w-9 shrink-0 cursor-pointer items-center border-2 transition-colors disabled:cursor-not-allowed disabled:opacity-50 ${on ? "bg-accent-brand border-accent-brand" : "bg-muted border-border"}`,
1834
- children: /* @__PURE__ */ jsx22(
1744
+ children: /* @__PURE__ */ jsx21(
1835
1745
  "span",
1836
1746
  {
1837
1747
  className: `pointer-events-none inline-block h-3 w-3 bg-background shadow-sm transition-transform ${on ? "translate-x-4" : "translate-x-0.5"}`
@@ -1842,7 +1752,7 @@ function FakeSwitch({
1842
1752
  }
1843
1753
 
1844
1754
  // src/ui/components/metric-card.tsx
1845
- import { jsx as jsx23, jsxs as jsxs12 } from "react/jsx-runtime";
1755
+ import { jsx as jsx22, jsxs as jsxs12 } from "react/jsx-runtime";
1846
1756
  var DEFAULT_SCROLL_MAX = 360;
1847
1757
  function MetricCard({
1848
1758
  title,
@@ -1855,11 +1765,11 @@ function MetricCard({
1855
1765
  }) {
1856
1766
  return /* @__PURE__ */ jsxs12("div", { className: "flex min-h-0 flex-col overflow-hidden border border-border bg-card", children: [
1857
1767
  /* @__PURE__ */ jsxs12("div", { className: "flex shrink-0 items-center gap-2 border-b border-border px-4 py-2.5", children: [
1858
- /* @__PURE__ */ jsx23("span", { className: "text-muted-foreground", children: icon }),
1859
- /* @__PURE__ */ jsx23("span", { className: "flex-1 truncate text-xs font-semibold uppercase tracking-widest text-muted-foreground", children: title }),
1860
- action && /* @__PURE__ */ jsx23("div", { className: "ml-auto shrink-0", children: action })
1768
+ /* @__PURE__ */ jsx22("span", { className: "text-muted-foreground", children: icon }),
1769
+ /* @__PURE__ */ jsx22("span", { className: "flex-1 truncate text-xs font-semibold uppercase tracking-widest text-muted-foreground", children: title }),
1770
+ action && /* @__PURE__ */ jsx22("div", { className: "ml-auto shrink-0", children: action })
1861
1771
  ] }),
1862
- /* @__PURE__ */ jsx23(
1772
+ /* @__PURE__ */ jsx22(
1863
1773
  "div",
1864
1774
  {
1865
1775
  className: cn(
@@ -1913,7 +1823,7 @@ function gaugeArc(value, radius, sweepDeg = 270) {
1913
1823
  }
1914
1824
 
1915
1825
  // src/ui/components/charts/Sparkline.tsx
1916
- import { jsx as jsx24, jsxs as jsxs13 } from "react/jsx-runtime";
1826
+ import { jsx as jsx23, jsxs as jsxs13 } from "react/jsx-runtime";
1917
1827
  function Sparkline({
1918
1828
  data,
1919
1829
  domain,
@@ -1929,7 +1839,7 @@ function Sparkline({
1929
1839
  domain
1930
1840
  );
1931
1841
  const last2 = coords[coords.length - 1];
1932
- return /* @__PURE__ */ jsx24(
1842
+ return /* @__PURE__ */ jsx23(
1933
1843
  "div",
1934
1844
  {
1935
1845
  className: cn(
@@ -1946,12 +1856,12 @@ function Sparkline({
1946
1856
  preserveAspectRatio: "none",
1947
1857
  "aria-hidden": "true",
1948
1858
  children: [
1949
- /* @__PURE__ */ jsx24("defs", { children: /* @__PURE__ */ jsxs13("linearGradient", { id: gradientId, x1: "0", y1: "0", x2: "0", y2: "1", children: [
1950
- /* @__PURE__ */ jsx24("stop", { offset: "0%", stopColor: "currentColor", stopOpacity: "0.28" }),
1951
- /* @__PURE__ */ jsx24("stop", { offset: "100%", stopColor: "currentColor", stopOpacity: "0" })
1859
+ /* @__PURE__ */ jsx23("defs", { children: /* @__PURE__ */ jsxs13("linearGradient", { id: gradientId, x1: "0", y1: "0", x2: "0", y2: "1", children: [
1860
+ /* @__PURE__ */ jsx23("stop", { offset: "0%", stopColor: "currentColor", stopOpacity: "0.28" }),
1861
+ /* @__PURE__ */ jsx23("stop", { offset: "100%", stopColor: "currentColor", stopOpacity: "0" })
1952
1862
  ] }) }),
1953
- /* @__PURE__ */ jsx24("path", { d: areaPath, fill: `url(#${gradientId})` }),
1954
- /* @__PURE__ */ jsx24(
1863
+ /* @__PURE__ */ jsx23("path", { d: areaPath, fill: `url(#${gradientId})` }),
1864
+ /* @__PURE__ */ jsx23(
1955
1865
  "path",
1956
1866
  {
1957
1867
  d: linePath,
@@ -1964,7 +1874,7 @@ function Sparkline({
1964
1874
  className: "opacity-80"
1965
1875
  }
1966
1876
  ),
1967
- showLastDot && last2 && /* @__PURE__ */ jsx24(
1877
+ showLastDot && last2 && /* @__PURE__ */ jsx23(
1968
1878
  "circle",
1969
1879
  {
1970
1880
  cx: last2[0],
@@ -1982,7 +1892,7 @@ function Sparkline({
1982
1892
  }
1983
1893
 
1984
1894
  // src/ui/components/charts/RadialGauge.tsx
1985
- import { jsx as jsx25, jsxs as jsxs14 } from "react/jsx-runtime";
1895
+ import { jsx as jsx24, jsxs as jsxs14 } from "react/jsx-runtime";
1986
1896
  function RadialGauge({
1987
1897
  value,
1988
1898
  label,
@@ -1994,7 +1904,7 @@ function RadialGauge({
1994
1904
  }) {
1995
1905
  const pct = value === null ? 0 : Math.min(100, Math.max(0, value));
1996
1906
  const radius = (size - strokeWidth) / 2;
1997
- const cx2 = size / 2;
1907
+ const cx = size / 2;
1998
1908
  const cy = size / 2;
1999
1909
  const startAngle = 135;
2000
1910
  const { trackLen, valueLen, circumference } = gaugeArc(value, radius, 270);
@@ -2015,10 +1925,10 @@ function RadialGauge({
2015
1925
  style: { transform: `rotate(${startAngle}deg)` },
2016
1926
  "aria-hidden": "true",
2017
1927
  children: [
2018
- /* @__PURE__ */ jsx25(
1928
+ /* @__PURE__ */ jsx24(
2019
1929
  "circle",
2020
1930
  {
2021
- cx: cx2,
1931
+ cx,
2022
1932
  cy,
2023
1933
  r: radius,
2024
1934
  fill: "none",
@@ -2028,10 +1938,10 @@ function RadialGauge({
2028
1938
  strokeLinecap: "round"
2029
1939
  }
2030
1940
  ),
2031
- /* @__PURE__ */ jsx25(
1941
+ /* @__PURE__ */ jsx24(
2032
1942
  "circle",
2033
1943
  {
2034
- cx: cx2,
1944
+ cx,
2035
1945
  cy,
2036
1946
  r: radius,
2037
1947
  fill: "none",
@@ -2046,7 +1956,7 @@ function RadialGauge({
2046
1956
  }
2047
1957
  ),
2048
1958
  /* @__PURE__ */ jsxs14("div", { className: "absolute inset-0 flex flex-col items-center justify-center", children: [
2049
- /* @__PURE__ */ jsx25(
1959
+ /* @__PURE__ */ jsx24(
2050
1960
  "span",
2051
1961
  {
2052
1962
  className: cn(
@@ -2056,7 +1966,7 @@ function RadialGauge({
2056
1966
  children: display
2057
1967
  }
2058
1968
  ),
2059
- caption && /* @__PURE__ */ jsx25("span", { className: "mt-1 text-[10px] font-semibold uppercase tracking-widest text-muted-foreground", children: caption })
1969
+ caption && /* @__PURE__ */ jsx24("span", { className: "mt-1 text-[10px] font-semibold uppercase tracking-widest text-muted-foreground", children: caption })
2060
1970
  ] })
2061
1971
  ]
2062
1972
  }
@@ -2064,7 +1974,7 @@ function RadialGauge({
2064
1974
  }
2065
1975
 
2066
1976
  // src/ui/components/charts/BarSeries.tsx
2067
- import { jsx as jsx26, jsxs as jsxs15 } from "react/jsx-runtime";
1977
+ import { jsx as jsx25, jsxs as jsxs15 } from "react/jsx-runtime";
2068
1978
  function BarSeries({
2069
1979
  items,
2070
1980
  max,
@@ -2072,14 +1982,14 @@ function BarSeries({
2072
1982
  colorClassName = "bg-accent-brand"
2073
1983
  }) {
2074
1984
  const domainMax = max ?? Math.max(1, ...items.map((i2) => i2.value));
2075
- return /* @__PURE__ */ jsx26("div", { className: cn("flex flex-col gap-2", className), children: items.map((item, i2) => {
1985
+ return /* @__PURE__ */ jsx25("div", { className: cn("flex flex-col gap-2", className), children: items.map((item, i2) => {
2076
1986
  const pct = Math.min(100, Math.max(0, item.value / domainMax * 100));
2077
1987
  return /* @__PURE__ */ jsxs15("div", { className: "flex flex-col gap-1", children: [
2078
1988
  /* @__PURE__ */ jsxs15("div", { className: "flex items-center justify-between gap-2", children: [
2079
- /* @__PURE__ */ jsx26("span", { className: "truncate text-xs text-muted-foreground", children: item.label }),
2080
- /* @__PURE__ */ jsx26("span", { className: "shrink-0 font-mono text-[11px] font-semibold", children: item.valueLabel ?? item.value })
1989
+ /* @__PURE__ */ jsx25("span", { className: "truncate text-xs text-muted-foreground", children: item.label }),
1990
+ /* @__PURE__ */ jsx25("span", { className: "shrink-0 font-mono text-[11px] font-semibold", children: item.valueLabel ?? item.value })
2081
1991
  ] }),
2082
- /* @__PURE__ */ jsx26("div", { className: "h-1.5 w-full overflow-hidden bg-muted", children: /* @__PURE__ */ jsx26(
1992
+ /* @__PURE__ */ jsx25("div", { className: "h-1.5 w-full overflow-hidden bg-muted", children: /* @__PURE__ */ jsx25(
2083
1993
  "div",
2084
1994
  {
2085
1995
  className: cn(
@@ -2094,7 +2004,7 @@ function BarSeries({
2094
2004
  }
2095
2005
 
2096
2006
  // src/ui/components/charts/StatRow.tsx
2097
- import { jsx as jsx27, jsxs as jsxs16 } from "react/jsx-runtime";
2007
+ import { jsx as jsx26, jsxs as jsxs16 } from "react/jsx-runtime";
2098
2008
  function StatRow({
2099
2009
  label,
2100
2010
  value,
@@ -2109,8 +2019,8 @@ function StatRow({
2109
2019
  className
2110
2020
  ),
2111
2021
  children: [
2112
- /* @__PURE__ */ jsx27("span", { className: "shrink-0 text-muted-foreground", children: label }),
2113
- /* @__PURE__ */ jsx27(
2022
+ /* @__PURE__ */ jsx26("span", { className: "shrink-0 text-muted-foreground", children: label }),
2023
+ /* @__PURE__ */ jsx26(
2114
2024
  "span",
2115
2025
  {
2116
2026
  className: cn(
@@ -2131,14 +2041,14 @@ function MiniStat({
2131
2041
  className
2132
2042
  }) {
2133
2043
  return /* @__PURE__ */ jsxs16("div", { className: cn("flex flex-col gap-0.5", className), children: [
2134
- /* @__PURE__ */ jsx27("span", { className: "text-[10px] font-bold uppercase tracking-widest text-muted-foreground", children: caption }),
2135
- /* @__PURE__ */ jsx27("span", { className: cn("text-sm font-bold leading-none", valueClassName), children: value })
2044
+ /* @__PURE__ */ jsx26("span", { className: "text-[10px] font-bold uppercase tracking-widest text-muted-foreground", children: caption }),
2045
+ /* @__PURE__ */ jsx26("span", { className: cn("text-sm font-bold leading-none", valueClassName), children: value })
2136
2046
  ] });
2137
2047
  }
2138
2048
 
2139
2049
  // src/ui/components/charts/LineChart.tsx
2140
2050
  import { useRef, useState as useState4, useEffect as useEffect2, useCallback } from "react";
2141
- import { jsx as jsx28, jsxs as jsxs17 } from "react/jsx-runtime";
2051
+ import { jsx as jsx27, jsxs as jsxs17 } from "react/jsx-runtime";
2142
2052
  var Y_LABEL_W = 44;
2143
2053
  var X_LABEL_H = 20;
2144
2054
  var TOP_PAD = 6;
@@ -2248,7 +2158,7 @@ function LineChart({
2248
2158
  yTicks.map((tick, ti) => {
2249
2159
  const y = valToY(tick, drawH, domain);
2250
2160
  return /* @__PURE__ */ jsxs17("g", { children: [
2251
- /* @__PURE__ */ jsx28(
2161
+ /* @__PURE__ */ jsx27(
2252
2162
  "line",
2253
2163
  {
2254
2164
  x1: Y_LABEL_W,
@@ -2260,7 +2170,7 @@ function LineChart({
2260
2170
  strokeOpacity: 0.6
2261
2171
  }
2262
2172
  ),
2263
- /* @__PURE__ */ jsx28(
2173
+ /* @__PURE__ */ jsx27(
2264
2174
  "text",
2265
2175
  {
2266
2176
  x: Y_LABEL_W - 6,
@@ -2273,7 +2183,7 @@ function LineChart({
2273
2183
  )
2274
2184
  ] }, ti);
2275
2185
  }),
2276
- /* @__PURE__ */ jsx28(
2186
+ /* @__PURE__ */ jsx27(
2277
2187
  "line",
2278
2188
  {
2279
2189
  x1: Y_LABEL_W,
@@ -2284,7 +2194,7 @@ function LineChart({
2284
2194
  strokeWidth: 1
2285
2195
  }
2286
2196
  ),
2287
- /* @__PURE__ */ jsx28(
2197
+ /* @__PURE__ */ jsx27(
2288
2198
  "line",
2289
2199
  {
2290
2200
  x1: Y_LABEL_W,
@@ -2298,7 +2208,7 @@ function LineChart({
2298
2208
  chartW > 0 && series.map((s) => {
2299
2209
  const d = buildLinePath(s.data, chartW, drawH, domain);
2300
2210
  if (!d) return null;
2301
- return /* @__PURE__ */ jsx28(
2211
+ return /* @__PURE__ */ jsx27(
2302
2212
  "path",
2303
2213
  {
2304
2214
  d,
@@ -2312,7 +2222,7 @@ function LineChart({
2312
2222
  s.key
2313
2223
  );
2314
2224
  }),
2315
- tooltip !== null && timestamps.length > 1 && chartW > 0 && /* @__PURE__ */ jsx28(
2225
+ tooltip !== null && timestamps.length > 1 && chartW > 0 && /* @__PURE__ */ jsx27(
2316
2226
  "line",
2317
2227
  {
2318
2228
  x1: Y_LABEL_W + tooltip.index / (timestamps.length - 1) * chartW,
@@ -2329,7 +2239,7 @@ function LineChart({
2329
2239
  const isFirst = li === 0;
2330
2240
  const isLast = li === xTickIndices.length - 1;
2331
2241
  const x = Y_LABEL_W + i2 / Math.max(1, timestamps.length - 1) * chartW;
2332
- return /* @__PURE__ */ jsx28(
2242
+ return /* @__PURE__ */ jsx27(
2333
2243
  "text",
2334
2244
  {
2335
2245
  x,
@@ -2355,11 +2265,11 @@ function LineChart({
2355
2265
  transform: tooltip.x > width / 2 ? "translateX(-100%)" : void 0
2356
2266
  },
2357
2267
  children: [
2358
- /* @__PURE__ */ jsx28("div", { className: "mb-1 font-medium text-muted-foreground", children: formatTimestamp(timestamps[tooltip.index], rangeMs) }),
2268
+ /* @__PURE__ */ jsx27("div", { className: "mb-1 font-medium text-muted-foreground", children: formatTimestamp(timestamps[tooltip.index], rangeMs) }),
2359
2269
  series.map((s) => {
2360
2270
  const v = s.data[tooltip.index];
2361
2271
  return /* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-1.5", children: [
2362
- /* @__PURE__ */ jsx28(
2272
+ /* @__PURE__ */ jsx27(
2363
2273
  "span",
2364
2274
  {
2365
2275
  className: "inline-block h-1.5 w-3 rounded-full shrink-0",
@@ -2370,7 +2280,7 @@ function LineChart({
2370
2280
  s.label,
2371
2281
  ":"
2372
2282
  ] }),
2373
- /* @__PURE__ */ jsx28("span", { className: "font-medium", children: v != null ? yFormatter(v) : "--" })
2283
+ /* @__PURE__ */ jsx27("span", { className: "font-medium", children: v != null ? yFormatter(v) : "--" })
2374
2284
  ] }, s.key);
2375
2285
  })
2376
2286
  ]
@@ -2480,7 +2390,7 @@ function heightToRowSpan(height, rowUnit, rowGap) {
2480
2390
  }
2481
2391
 
2482
2392
  // src/ui/components/card-grid/CardGridCanvas.tsx
2483
- import { Fragment as Fragment3, jsx as jsx29, jsxs as jsxs18 } from "react/jsx-runtime";
2393
+ import { Fragment as Fragment3, jsx as jsx28, jsxs as jsxs18 } from "react/jsx-runtime";
2484
2394
  var ROW_UNIT = 8;
2485
2395
  var ROW_GAP = 12;
2486
2396
  function DropZone({
@@ -2491,7 +2401,7 @@ function DropZone({
2491
2401
  }) {
2492
2402
  const [over, setOver] = useState6(false);
2493
2403
  if (!active2) return null;
2494
- return /* @__PURE__ */ jsx29(
2404
+ return /* @__PURE__ */ jsx28(
2495
2405
  "div",
2496
2406
  {
2497
2407
  className: cn(
@@ -2519,42 +2429,42 @@ function TileChrome({
2519
2429
  }) {
2520
2430
  const { t: t2 } = useTranslation4();
2521
2431
  return /* @__PURE__ */ jsxs18(Fragment3, { children: [
2522
- /* @__PURE__ */ jsx29("div", { className: "pointer-events-none absolute inset-0 z-10 border-2 border-dashed border-accent-brand/30" }),
2432
+ /* @__PURE__ */ jsx28("div", { className: "pointer-events-none absolute inset-0 z-10 border-2 border-dashed border-accent-brand/30" }),
2523
2433
  /* @__PURE__ */ jsxs18("div", { className: "absolute top-2 right-2 z-20 flex items-center gap-1", children: [
2524
- /* @__PURE__ */ jsx29(
2434
+ /* @__PURE__ */ jsx28(
2525
2435
  "div",
2526
2436
  {
2527
2437
  className: "flex size-6 cursor-grab items-center justify-center border border-border bg-card active:cursor-grabbing",
2528
2438
  title: t2("cardGrid.dragToMove"),
2529
- children: /* @__PURE__ */ jsx29(GripVertical, { className: "size-3 text-muted-foreground" })
2439
+ children: /* @__PURE__ */ jsx28(GripVertical, { className: "size-3 text-muted-foreground" })
2530
2440
  }
2531
2441
  ),
2532
- columns > 1 && /* @__PURE__ */ jsx29(
2442
+ columns > 1 && /* @__PURE__ */ jsx28(
2533
2443
  "button",
2534
2444
  {
2535
2445
  onClick: onCycleWidth,
2536
2446
  className: "flex size-6 items-center justify-center border border-border bg-card transition-colors hover:border-accent-brand/40 hover:bg-accent-brand/10",
2537
2447
  title: t2("cardGrid.changeWidth"),
2538
- children: /* @__PURE__ */ jsx29(Columns2, { className: "size-3 text-muted-foreground" })
2448
+ children: /* @__PURE__ */ jsx28(Columns2, { className: "size-3 text-muted-foreground" })
2539
2449
  }
2540
2450
  ),
2541
- /* @__PURE__ */ jsx29(
2451
+ /* @__PURE__ */ jsx28(
2542
2452
  "button",
2543
2453
  {
2544
2454
  onClick: onRemove,
2545
2455
  className: "flex size-6 items-center justify-center border border-border bg-card transition-colors hover:border-destructive/40 hover:bg-destructive/10",
2546
2456
  title: t2("cardGrid.removeCard", { label }),
2547
- children: /* @__PURE__ */ jsx29(Trash, { className: "size-3 text-muted-foreground" })
2457
+ children: /* @__PURE__ */ jsx28(Trash, { className: "size-3 text-muted-foreground" })
2548
2458
  }
2549
2459
  )
2550
2460
  ] }),
2551
- /* @__PURE__ */ jsx29(
2461
+ /* @__PURE__ */ jsx28(
2552
2462
  "div",
2553
2463
  {
2554
2464
  onMouseDown: onResizeStart,
2555
2465
  className: "group/resize absolute bottom-0 left-0 right-0 z-20 flex h-2.5 cursor-row-resize items-center justify-center",
2556
2466
  title: t2("cardGrid.dragToResize"),
2557
- children: /* @__PURE__ */ jsx29("div", { className: "h-0.5 w-12 rounded-full bg-border transition-colors group-hover/resize:bg-accent-brand/60" })
2467
+ children: /* @__PURE__ */ jsx28("div", { className: "h-0.5 w-12 rounded-full bg-border transition-colors group-hover/resize:bg-accent-brand/60" })
2558
2468
  }
2559
2469
  )
2560
2470
  ] });
@@ -2568,7 +2478,7 @@ function AddTray({
2568
2478
  const available = catalog.filter((c) => !presentIds.has(c.id));
2569
2479
  if (available.length === 0) return null;
2570
2480
  return /* @__PURE__ */ jsxs18("div", { className: "mt-3 flex flex-wrap items-center gap-2", children: [
2571
- /* @__PURE__ */ jsx29("span", { className: "text-[10px] font-semibold uppercase tracking-widest text-muted-foreground", children: t2("cardGrid.addCard") }),
2481
+ /* @__PURE__ */ jsx28("span", { className: "text-[10px] font-semibold uppercase tracking-widest text-muted-foreground", children: t2("cardGrid.addCard") }),
2572
2482
  available.map((card) => /* @__PURE__ */ jsxs18(
2573
2483
  "button",
2574
2484
  {
@@ -2576,7 +2486,7 @@ function AddTray({
2576
2486
  title: card.description,
2577
2487
  className: "flex items-center gap-1.5 border border-dashed border-border px-2.5 py-1 text-xs text-muted-foreground transition-colors hover:border-accent-brand/60 hover:bg-accent-brand/5 hover:text-foreground",
2578
2488
  children: [
2579
- /* @__PURE__ */ jsx29(Plus, { className: "size-3 text-accent-brand" }),
2489
+ /* @__PURE__ */ jsx28(Plus, { className: "size-3 text-accent-brand" }),
2580
2490
  card.label
2581
2491
  ]
2582
2492
  },
@@ -2637,7 +2547,7 @@ function MasonryTile({
2637
2547
  gridRow: `span ${rows} / span ${rows}`
2638
2548
  },
2639
2549
  children: [
2640
- /* @__PURE__ */ jsx29(
2550
+ /* @__PURE__ */ jsx28(
2641
2551
  "div",
2642
2552
  {
2643
2553
  ref: innerRef,
@@ -2649,7 +2559,7 @@ function MasonryTile({
2649
2559
  children
2650
2560
  }
2651
2561
  ),
2652
- editMode && /* @__PURE__ */ jsx29(
2562
+ editMode && /* @__PURE__ */ jsx28(
2653
2563
  TileChrome,
2654
2564
  {
2655
2565
  columns: effectiveColumns,
@@ -2751,11 +2661,11 @@ function CardGridCanvas({
2751
2661
  );
2752
2662
  const handleDragOver = (e) => e.preventDefault();
2753
2663
  if (isMobile) {
2754
- return /* @__PURE__ */ jsx29("div", { className: cn("flex flex-col gap-3", className), children: sorted.map((slot) => /* @__PURE__ */ jsx29("div", { className: "w-full", children: renderCard(slot.id) }, slot.id)) });
2664
+ return /* @__PURE__ */ jsx28("div", { className: cn("flex flex-col gap-3", className), children: sorted.map((slot) => /* @__PURE__ */ jsx28("div", { className: "w-full", children: renderCard(slot.id) }, slot.id)) });
2755
2665
  }
2756
2666
  const effectiveColumns = clampColumns(columns);
2757
2667
  return /* @__PURE__ */ jsxs18("div", { className: cn("flex flex-col", className), children: [
2758
- /* @__PURE__ */ jsx29(
2668
+ /* @__PURE__ */ jsx28(
2759
2669
  "div",
2760
2670
  {
2761
2671
  className: "grid items-start",
@@ -2770,7 +2680,7 @@ function CardGridCanvas({
2770
2680
  const span = Math.min(slot.colSpan, effectiveColumns);
2771
2681
  const isDragging = dragState?.id === slot.id;
2772
2682
  const rows = rowSpans[slot.id] ?? 24;
2773
- return /* @__PURE__ */ jsx29(
2683
+ return /* @__PURE__ */ jsx28(
2774
2684
  MasonryTile,
2775
2685
  {
2776
2686
  slot,
@@ -2799,8 +2709,8 @@ function CardGridCanvas({
2799
2709
  }
2800
2710
  ),
2801
2711
  editMode && /* @__PURE__ */ jsxs18(Fragment3, { children: [
2802
- sorted.length === 0 && /* @__PURE__ */ jsx29("div", { className: "flex items-center justify-center border border-dashed border-border/40 py-10 text-xs text-muted-foreground/40", children: t2("cardGrid.empty") }),
2803
- /* @__PURE__ */ jsx29(
2712
+ sorted.length === 0 && /* @__PURE__ */ jsx28("div", { className: "flex items-center justify-center border border-dashed border-border/40 py-10 text-xs text-muted-foreground/40", children: t2("cardGrid.empty") }),
2713
+ /* @__PURE__ */ jsx28(
2804
2714
  AddTray,
2805
2715
  {
2806
2716
  catalog: cardCatalog,
@@ -2809,7 +2719,7 @@ function CardGridCanvas({
2809
2719
  }
2810
2720
  )
2811
2721
  ] }),
2812
- editMode && /* @__PURE__ */ jsx29(
2722
+ editMode && /* @__PURE__ */ jsx28(
2813
2723
  DropZone,
2814
2724
  {
2815
2725
  order: sorted.length,
@@ -2826,10 +2736,10 @@ function ColumnCountStepper({
2826
2736
  }) {
2827
2737
  const { t: t2 } = useTranslation4();
2828
2738
  return /* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-1.5", children: [
2829
- /* @__PURE__ */ jsx29(StretchHorizontal, { className: "size-3.5 text-muted-foreground" }),
2830
- /* @__PURE__ */ jsx29("span", { className: "text-[10px] font-semibold uppercase tracking-widest text-muted-foreground", children: t2("cardGrid.columns") }),
2739
+ /* @__PURE__ */ jsx28(StretchHorizontal, { className: "size-3.5 text-muted-foreground" }),
2740
+ /* @__PURE__ */ jsx28("span", { className: "text-[10px] font-semibold uppercase tracking-widest text-muted-foreground", children: t2("cardGrid.columns") }),
2831
2741
  /* @__PURE__ */ jsxs18("div", { className: "flex items-center border border-border", children: [
2832
- /* @__PURE__ */ jsx29(
2742
+ /* @__PURE__ */ jsx28(
2833
2743
  "button",
2834
2744
  {
2835
2745
  className: "flex size-6 items-center justify-center text-muted-foreground transition-colors hover:bg-muted disabled:opacity-30",
@@ -2838,8 +2748,8 @@ function ColumnCountStepper({
2838
2748
  children: "\u2212"
2839
2749
  }
2840
2750
  ),
2841
- /* @__PURE__ */ jsx29("span", { className: "w-6 text-center text-xs font-bold tabular-nums", children: columns }),
2842
- /* @__PURE__ */ jsx29(
2751
+ /* @__PURE__ */ jsx28("span", { className: "w-6 text-center text-xs font-bold tabular-nums", children: columns }),
2752
+ /* @__PURE__ */ jsx28(
2843
2753
  "button",
2844
2754
  {
2845
2755
  className: "flex size-6 items-center justify-center text-muted-foreground transition-colors hover:bg-muted disabled:opacity-30",
@@ -2860,7 +2770,7 @@ import { useEffect as useEffect5, useRef as useRef3, useState as useState8 } fro
2860
2770
 
2861
2771
  // src/ui/ssh/connection-log/ConnectionLogContext.tsx
2862
2772
  import { createContext as createContext2, useContext as useContext2, useState as useState7, useCallback as useCallback3 } from "react";
2863
- import { jsx as jsx30 } from "react/jsx-runtime";
2773
+ import { jsx as jsx29 } from "react/jsx-runtime";
2864
2774
  var ConnectionLogContext = createContext2(void 0);
2865
2775
  function ConnectionLogProvider({
2866
2776
  children
@@ -2899,7 +2809,7 @@ function ConnectionLogProvider({
2899
2809
  const toggleExpanded = useCallback3(() => {
2900
2810
  setIsExpanded((prev) => !prev);
2901
2811
  }, []);
2902
- return /* @__PURE__ */ jsx30(
2812
+ return /* @__PURE__ */ jsx29(
2903
2813
  ConnectionLogContext.Provider,
2904
2814
  {
2905
2815
  value: {
@@ -3001,7 +2911,7 @@ function legacyPaste() {
3001
2911
 
3002
2912
  // src/ui/components/connection/ConnectionLogPanel.tsx
3003
2913
  import { toast } from "sonner";
3004
- import { jsx as jsx31, jsxs as jsxs19 } from "react/jsx-runtime";
2914
+ import { jsx as jsx30, jsxs as jsxs19 } from "react/jsx-runtime";
3005
2915
  var COLLAPSED_HEIGHT = "h-[136px]";
3006
2916
  var EXPANDED_HEIGHT = "h-[46%] min-h-[220px]";
3007
2917
  var DOT = {
@@ -3020,7 +2930,6 @@ function ConnectionLogPanel({
3020
2930
  isConnecting,
3021
2931
  isConnected,
3022
2932
  hasConnectionError,
3023
- position = "bottom",
3024
2933
  className
3025
2934
  }) {
3026
2935
  const { t: t2 } = useTranslation5();
@@ -3077,13 +2986,13 @@ function ConnectionLogPanel({
3077
2986
  {
3078
2987
  className: cn(
3079
2988
  "relative z-10 flex shrink-0 flex-col bg-surface-dim/60",
3080
- position === "bottom" ? "border-t border-border" : "border-b border-border",
2989
+ "border-t border-border",
3081
2990
  expanded ? EXPANDED_HEIGHT : COLLAPSED_HEIGHT,
3082
2991
  "transition-[height] duration-200",
3083
2992
  className
3084
2993
  ),
3085
2994
  children: [
3086
- /* @__PURE__ */ jsxs19("div", { className: "flex h-9 shrink-0 items-center gap-2 border-b border-border/60 px-2 pr-1.5", children: [
2995
+ /* @__PURE__ */ jsxs19("div", { className: "flex h-9 shrink-0 items-center gap-2 border-b border-border px-2 pr-1.5", children: [
3087
2996
  /* @__PURE__ */ jsxs19(
3088
2997
  "button",
3089
2998
  {
@@ -3092,13 +3001,13 @@ function ConnectionLogPanel({
3092
3001
  "aria-expanded": expanded,
3093
3002
  className: "flex min-w-0 items-center gap-1.5 px-1.5 py-1 text-foreground-secondary transition-colors hover:text-foreground",
3094
3003
  children: [
3095
- expanded ? /* @__PURE__ */ jsx31(ChevronDown, { className: "size-3.5 shrink-0" }) : /* @__PURE__ */ jsx31(ChevronUp, { className: "size-3.5 shrink-0" }),
3096
- /* @__PURE__ */ jsx31("span", { className: "text-[10px] font-semibold uppercase tracking-widest", children: t2("sshAuth.connectionLogTitle") })
3004
+ expanded ? /* @__PURE__ */ jsx30(ChevronDown, { className: "size-3.5 shrink-0" }) : /* @__PURE__ */ jsx30(ChevronUp, { className: "size-3.5 shrink-0" }),
3005
+ /* @__PURE__ */ jsx30("span", { className: "text-[10px] font-semibold uppercase tracking-widest", children: t2("sshAuth.connectionLogTitle") })
3097
3006
  ]
3098
3007
  }
3099
3008
  ),
3100
- /* @__PURE__ */ jsx31("span", { className: "text-xs tabular-nums text-muted-foreground", children: logs.length }),
3101
- logs.length > 0 && /* @__PURE__ */ jsx31(
3009
+ /* @__PURE__ */ jsx30("span", { className: "text-xs tabular-nums text-muted-foreground", children: logs.length }),
3010
+ logs.length > 0 && /* @__PURE__ */ jsx30(
3102
3011
  Button,
3103
3012
  {
3104
3013
  variant: "ghost",
@@ -3106,18 +3015,18 @@ function ConnectionLogPanel({
3106
3015
  onClick: copyLogsToClipboard,
3107
3016
  title: t2("sshAuth.connectionLogCopy"),
3108
3017
  className: "ml-auto text-muted-foreground",
3109
- children: copied ? /* @__PURE__ */ jsx31(Check, { className: "size-3.5 text-accent-brand" }) : /* @__PURE__ */ jsx31(Copy, { className: "size-3.5" })
3018
+ children: copied ? /* @__PURE__ */ jsx30(Check, { className: "size-3.5 text-accent-brand" }) : /* @__PURE__ */ jsx30(Copy, { className: "size-3.5" })
3110
3019
  }
3111
3020
  )
3112
3021
  ] }),
3113
- /* @__PURE__ */ jsx31("div", { className: "thin-scrollbar min-h-0 flex-1 overflow-y-auto overflow-x-hidden", children: logs.length === 0 ? /* @__PURE__ */ jsx31("p", { className: "px-3 py-4 text-xs text-muted-foreground", children: isConnecting ? t2("sshAuth.connectionLogWaiting") : t2("sshAuth.connectionLogEmpty") }) : /* @__PURE__ */ jsx31("div", { className: "px-2 py-1.5 font-mono text-[11px] leading-[1.7]", children: logs.map((log, index) => /* @__PURE__ */ jsxs19(
3022
+ /* @__PURE__ */ jsx30("div", { className: "thin-scrollbar min-h-0 flex-1 overflow-y-auto overflow-x-hidden", children: logs.length === 0 ? /* @__PURE__ */ jsx30("p", { className: "px-3 py-4 text-xs text-muted-foreground", children: isConnecting ? t2("sshAuth.connectionLogWaiting") : t2("sshAuth.connectionLogEmpty") }) : /* @__PURE__ */ jsx30("div", { className: "px-2 py-1.5 font-mono text-[11px] leading-[1.7]", children: logs.map((log, index) => /* @__PURE__ */ jsxs19(
3114
3023
  "div",
3115
3024
  {
3116
3025
  ref: index === logs.length - 1 ? lastLogRef : null,
3117
3026
  className: "flex items-baseline gap-2 px-1 hover:bg-foreground/[0.03]",
3118
3027
  children: [
3119
- /* @__PURE__ */ jsx31("span", { className: "shrink-0 tabular-nums text-muted-foreground/70", children: log.timestamp.toLocaleTimeString([], { hour12: false }) }),
3120
- /* @__PURE__ */ jsx31(
3028
+ /* @__PURE__ */ jsx30("span", { className: "shrink-0 tabular-nums text-muted-foreground/70", children: log.timestamp.toLocaleTimeString([], { hour12: false }) }),
3029
+ /* @__PURE__ */ jsx30(
3121
3030
  "span",
3122
3031
  {
3123
3032
  className: cn(
@@ -3126,7 +3035,7 @@ function ConnectionLogPanel({
3126
3035
  )
3127
3036
  }
3128
3037
  ),
3129
- /* @__PURE__ */ jsx31(
3038
+ /* @__PURE__ */ jsx30(
3130
3039
  "span",
3131
3040
  {
3132
3041
  className: cn(
@@ -3146,12 +3055,11 @@ function ConnectionLogPanel({
3146
3055
  }
3147
3056
 
3148
3057
  // src/ui/components/connection/ConnectionScreen.tsx
3149
- import { jsx as jsx32, jsxs as jsxs20 } from "react/jsx-runtime";
3058
+ import { jsx as jsx31, jsxs as jsxs20 } from "react/jsx-runtime";
3150
3059
  function ConnectionScreen({
3151
3060
  status,
3152
3061
  message,
3153
3062
  detail,
3154
- errorMessage,
3155
3063
  errorDetail,
3156
3064
  unavailable,
3157
3065
  backgroundColor,
@@ -3159,29 +3067,34 @@ function ConnectionScreen({
3159
3067
  maxAttempts = 0,
3160
3068
  nextRetryInMs = null,
3161
3069
  onManualRetry,
3162
- retryLabel,
3163
3070
  disconnectedMessage,
3071
+ onClose,
3164
3072
  extraActions,
3165
3073
  logPosition = "bottom",
3166
3074
  emptyState,
3167
3075
  className
3168
3076
  }) {
3169
3077
  const { t: t2 } = useTranslation6();
3078
+ const surfaceClose = useSurfaceClose();
3079
+ const logs = useOptionalConnectionLog()?.logs;
3080
+ const close = onClose === false ? null : onClose ?? surfaceClose;
3170
3081
  if (status === "connected" && !emptyState && !unavailable) {
3171
3082
  return null;
3172
3083
  }
3173
3084
  const connecting = status === "connecting" && !unavailable;
3174
3085
  const failed = status === "error" || status === "disconnected";
3175
3086
  const retrying = status === "error" && attempt > 0 && !!nextRetryInMs && nextRetryInMs > 0;
3176
- const showRetryButton = (failed || !!unavailable) && !!onManualRetry;
3087
+ const stopped = failed || !!unavailable;
3088
+ const showRetryButton = stopped && !!onManualRetry;
3089
+ const showClose = stopped && !!close;
3090
+ const reason = errorDetail || [...logs ?? []].reverse().find((entry) => entry.type === "error")?.message || null;
3177
3091
  const showLog = !emptyState && (status !== "connected" || !!unavailable);
3178
3092
  let headline = message;
3179
3093
  if (unavailable) headline = unavailable.title;
3180
- else if (status === "disconnected")
3181
- headline = disconnectedMessage || t2("connection.disconnected");
3182
3094
  else if (retrying) headline = t2("connection.failedRetrying");
3183
- else if (status === "error")
3184
- headline = errorMessage || t2("connection.failed");
3095
+ else if (status === "disconnected" && disconnectedMessage)
3096
+ headline = disconnectedMessage;
3097
+ else if (failed) headline = t2("connection.failed");
3185
3098
  const showCountdown = attempt > 0 && (connecting || retrying);
3186
3099
  return /* @__PURE__ */ jsxs20(
3187
3100
  "div",
@@ -3195,19 +3108,19 @@ function ConnectionScreen({
3195
3108
  ),
3196
3109
  style: { backgroundColor: backgroundColor || "var(--bg-base)" },
3197
3110
  children: [
3198
- /* @__PURE__ */ jsx32("div", { className: "flex min-h-0 flex-1 items-center justify-center p-6", children: emptyState ? emptyState : /* @__PURE__ */ jsxs20("div", { className: "flex max-w-md flex-col items-center gap-3.5 text-center", children: [
3199
- /* @__PURE__ */ jsx32(
3111
+ /* @__PURE__ */ jsx31("div", { className: "flex min-h-0 flex-1 items-center justify-center p-6", children: emptyState ? emptyState : /* @__PURE__ */ jsxs20("div", { className: "flex max-w-md flex-col items-center gap-3.5 text-center", children: [
3112
+ /* @__PURE__ */ jsx31(
3200
3113
  ConnectionMark,
3201
3114
  {
3202
3115
  state: unavailable ? "unavailable" : connecting || retrying ? "busy" : "failed"
3203
3116
  }
3204
3117
  ),
3205
3118
  /* @__PURE__ */ jsxs20("div", { className: "space-y-1.5", children: [
3206
- headline && /* @__PURE__ */ jsx32("p", { className: "text-sm font-semibold tracking-tight text-foreground", children: headline }),
3207
- detail && /* @__PURE__ */ jsx32("p", { className: "font-mono text-xs text-muted-foreground", children: detail }),
3208
- unavailable?.hint && /* @__PURE__ */ jsx32("p", { className: "text-xs leading-snug text-muted-foreground", children: unavailable.hint }),
3209
- failed && !unavailable && errorDetail && /* @__PURE__ */ jsx32("p", { className: "line-clamp-3 text-xs leading-snug text-destructive/80", children: errorDetail }),
3210
- showCountdown && /* @__PURE__ */ jsx32("p", { className: "text-xs tabular-nums text-muted-foreground", children: nextRetryInMs && nextRetryInMs > 0 ? t2("connection.retryingIn", {
3119
+ headline && /* @__PURE__ */ jsx31("p", { className: "text-sm font-semibold tracking-tight text-foreground", children: headline }),
3120
+ detail && /* @__PURE__ */ jsx31("p", { className: "font-mono text-xs text-muted-foreground", children: detail }),
3121
+ unavailable?.hint && /* @__PURE__ */ jsx31("p", { className: "text-xs leading-snug text-muted-foreground", children: unavailable.hint }),
3122
+ failed && !unavailable && reason && /* @__PURE__ */ jsx31("p", { className: "line-clamp-3 text-xs leading-snug text-destructive/80", children: reason }),
3123
+ showCountdown && /* @__PURE__ */ jsx31("p", { className: "text-xs tabular-nums text-muted-foreground", children: nextRetryInMs && nextRetryInMs > 0 ? t2("connection.retryingIn", {
3211
3124
  seconds: Math.ceil(nextRetryInMs / 1e3),
3212
3125
  attempt,
3213
3126
  max: maxAttempts
@@ -3216,7 +3129,7 @@ function ConnectionScreen({
3216
3129
  max: maxAttempts
3217
3130
  }) })
3218
3131
  ] }),
3219
- (showRetryButton || (failed || unavailable) && extraActions || unavailable?.action) && /* @__PURE__ */ jsxs20("div", { className: "flex flex-wrap justify-center gap-2 pt-0.5", children: [
3132
+ (showRetryButton || showClose || stopped && extraActions || unavailable?.action) && /* @__PURE__ */ jsxs20("div", { className: "flex flex-wrap justify-center gap-2 pt-0.5", children: [
3220
3133
  showRetryButton && /* @__PURE__ */ jsxs20(
3221
3134
  Button,
3222
3135
  {
@@ -3225,21 +3138,34 @@ function ConnectionScreen({
3225
3138
  onClick: onManualRetry,
3226
3139
  className: "gap-2 font-semibold",
3227
3140
  children: [
3228
- /* @__PURE__ */ jsx32(RefreshCw, { className: "size-3.5" }),
3229
- retrying ? t2("connection.retryNow") : retryLabel || t2("connection.reconnect")
3141
+ /* @__PURE__ */ jsx31(RefreshCw, { className: "size-3.5" }),
3142
+ retrying ? t2("connection.retryNow") : t2("connection.reconnect")
3230
3143
  ]
3231
3144
  }
3232
3145
  ),
3233
3146
  unavailable?.action,
3234
- (failed || unavailable) && extraActions
3147
+ stopped && extraActions,
3148
+ showClose && /* @__PURE__ */ jsxs20(
3149
+ Button,
3150
+ {
3151
+ variant: "outline",
3152
+ size: "sm",
3153
+ onClick: close,
3154
+ className: "gap-2 font-semibold",
3155
+ children: [
3156
+ /* @__PURE__ */ jsx31(X, { className: "size-3.5" }),
3157
+ t2("connection.close")
3158
+ ]
3159
+ }
3160
+ )
3235
3161
  ] })
3236
3162
  ] }) }),
3237
- showLog && /* @__PURE__ */ jsx32(
3163
+ showLog && /* @__PURE__ */ jsx31(
3238
3164
  ConnectionLogPanel,
3239
3165
  {
3240
3166
  isConnecting: connecting,
3241
3167
  isConnected: false,
3242
- hasConnectionError: failed || !!unavailable,
3168
+ hasConnectionError: stopped,
3243
3169
  position: logPosition
3244
3170
  }
3245
3171
  )
@@ -3252,7 +3178,7 @@ function ConnectionMark({
3252
3178
  }) {
3253
3179
  return /* @__PURE__ */ jsxs20("div", { className: "relative size-9", "aria-hidden": "true", children: [
3254
3180
  /* @__PURE__ */ jsxs20("svg", { viewBox: "0 0 36 36", className: "size-full", children: [
3255
- /* @__PURE__ */ jsx32(
3181
+ /* @__PURE__ */ jsx31(
3256
3182
  "circle",
3257
3183
  {
3258
3184
  cx: "18",
@@ -3263,7 +3189,7 @@ function ConnectionMark({
3263
3189
  className: "stroke-border"
3264
3190
  }
3265
3191
  ),
3266
- state === "busy" && /* @__PURE__ */ jsx32(
3192
+ state === "busy" && /* @__PURE__ */ jsx31(
3267
3193
  "circle",
3268
3194
  {
3269
3195
  cx: "18",
@@ -3277,7 +3203,7 @@ function ConnectionMark({
3277
3203
  }
3278
3204
  )
3279
3205
  ] }),
3280
- state !== "busy" && /* @__PURE__ */ jsx32(
3206
+ state !== "busy" && /* @__PURE__ */ jsx31(
3281
3207
  "span",
3282
3208
  {
3283
3209
  className: cn(
@@ -3298,31 +3224,31 @@ import * as React7 from "react";
3298
3224
 
3299
3225
  // src/ui/components/sheet.tsx
3300
3226
  import { useTranslation as useTranslation7 } from "react-i18next";
3301
- import { jsx as jsx33, jsxs as jsxs21 } from "react/jsx-runtime";
3227
+ import { jsx as jsx32, jsxs as jsxs21 } from "react/jsx-runtime";
3302
3228
  function Sheet({ ...props }) {
3303
- return /* @__PURE__ */ jsx33(dist_exports2.Root, { "data-slot": "sheet", ...props });
3229
+ return /* @__PURE__ */ jsx32(dist_exports.Root, { "data-slot": "sheet", ...props });
3304
3230
  }
3305
3231
  function SheetTrigger({
3306
3232
  ...props
3307
3233
  }) {
3308
- return /* @__PURE__ */ jsx33(dist_exports2.Trigger, { "data-slot": "sheet-trigger", ...props });
3234
+ return /* @__PURE__ */ jsx32(dist_exports.Trigger, { "data-slot": "sheet-trigger", ...props });
3309
3235
  }
3310
3236
  function SheetClose({
3311
3237
  ...props
3312
3238
  }) {
3313
- return /* @__PURE__ */ jsx33(dist_exports2.Close, { "data-slot": "sheet-close", ...props });
3239
+ return /* @__PURE__ */ jsx32(dist_exports.Close, { "data-slot": "sheet-close", ...props });
3314
3240
  }
3315
3241
  function SheetPortal({
3316
3242
  ...props
3317
3243
  }) {
3318
- return /* @__PURE__ */ jsx33(dist_exports2.Portal, { "data-slot": "sheet-portal", ...props });
3244
+ return /* @__PURE__ */ jsx32(dist_exports.Portal, { "data-slot": "sheet-portal", ...props });
3319
3245
  }
3320
3246
  function SheetOverlay({
3321
3247
  className,
3322
3248
  ...props
3323
3249
  }) {
3324
- return /* @__PURE__ */ jsx33(
3325
- dist_exports2.Overlay,
3250
+ return /* @__PURE__ */ jsx32(
3251
+ dist_exports.Overlay,
3326
3252
  {
3327
3253
  "data-slot": "sheet-overlay",
3328
3254
  className: cn(
@@ -3342,9 +3268,9 @@ function SheetContent({
3342
3268
  }) {
3343
3269
  const { t: t2 } = useTranslation7();
3344
3270
  return /* @__PURE__ */ jsxs21(SheetPortal, { children: [
3345
- /* @__PURE__ */ jsx33(SheetOverlay, {}),
3271
+ /* @__PURE__ */ jsx32(SheetOverlay, {}),
3346
3272
  /* @__PURE__ */ jsxs21(
3347
- dist_exports2.Content,
3273
+ dist_exports.Content,
3348
3274
  {
3349
3275
  "data-slot": "sheet-content",
3350
3276
  "data-side": side,
@@ -3355,15 +3281,15 @@ function SheetContent({
3355
3281
  ...props,
3356
3282
  children: [
3357
3283
  children,
3358
- showCloseButton && /* @__PURE__ */ jsx33(dist_exports2.Close, { "data-slot": "sheet-close", asChild: true, children: /* @__PURE__ */ jsxs21(
3284
+ showCloseButton && /* @__PURE__ */ jsx32(dist_exports.Close, { "data-slot": "sheet-close", asChild: true, children: /* @__PURE__ */ jsxs21(
3359
3285
  Button,
3360
3286
  {
3361
3287
  variant: "ghost",
3362
3288
  className: "absolute top-3 right-3",
3363
3289
  size: "icon-sm",
3364
3290
  children: [
3365
- /* @__PURE__ */ jsx33(X, {}),
3366
- /* @__PURE__ */ jsx33("span", { className: "sr-only", children: t2("common.close") })
3291
+ /* @__PURE__ */ jsx32(X, {}),
3292
+ /* @__PURE__ */ jsx32("span", { className: "sr-only", children: t2("common.close") })
3367
3293
  ]
3368
3294
  }
3369
3295
  ) })
@@ -3373,7 +3299,7 @@ function SheetContent({
3373
3299
  ] });
3374
3300
  }
3375
3301
  function SheetHeader({ className, ...props }) {
3376
- return /* @__PURE__ */ jsx33(
3302
+ return /* @__PURE__ */ jsx32(
3377
3303
  "div",
3378
3304
  {
3379
3305
  "data-slot": "sheet-header",
@@ -3383,7 +3309,7 @@ function SheetHeader({ className, ...props }) {
3383
3309
  );
3384
3310
  }
3385
3311
  function SheetFooter({ className, ...props }) {
3386
- return /* @__PURE__ */ jsx33(
3312
+ return /* @__PURE__ */ jsx32(
3387
3313
  "div",
3388
3314
  {
3389
3315
  "data-slot": "sheet-footer",
@@ -3396,8 +3322,8 @@ function SheetTitle({
3396
3322
  className,
3397
3323
  ...props
3398
3324
  }) {
3399
- return /* @__PURE__ */ jsx33(
3400
- dist_exports2.Title,
3325
+ return /* @__PURE__ */ jsx32(
3326
+ dist_exports.Title,
3401
3327
  {
3402
3328
  "data-slot": "sheet-title",
3403
3329
  className: cn(
@@ -3412,8 +3338,8 @@ function SheetDescription({
3412
3338
  className,
3413
3339
  ...props
3414
3340
  }) {
3415
- return /* @__PURE__ */ jsx33(
3416
- dist_exports2.Description,
3341
+ return /* @__PURE__ */ jsx32(
3342
+ dist_exports.Description,
3417
3343
  {
3418
3344
  "data-slot": "sheet-description",
3419
3345
  className: cn("text-xs/relaxed text-muted-foreground", className),
@@ -3423,7 +3349,7 @@ function SheetDescription({
3423
3349
  }
3424
3350
 
3425
3351
  // src/ui/components/sidebar.tsx
3426
- import { jsx as jsx34, jsxs as jsxs22 } from "react/jsx-runtime";
3352
+ import { jsx as jsx33, jsxs as jsxs22 } from "react/jsx-runtime";
3427
3353
  var SIDEBAR_COOKIE_NAME = "sidebar_state";
3428
3354
  var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
3429
3355
  var SIDEBAR_WIDTH = "16rem";
@@ -3481,7 +3407,7 @@ function SidebarProvider({
3481
3407
  }),
3482
3408
  [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
3483
3409
  );
3484
- return /* @__PURE__ */ jsx34(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx34(
3410
+ return /* @__PURE__ */ jsx33(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx33(
3485
3411
  "div",
3486
3412
  {
3487
3413
  "data-slot": "sidebar-wrapper",
@@ -3520,6 +3446,21 @@ var sidebarMenuButtonVariants = cva(
3520
3446
  }
3521
3447
  );
3522
3448
 
3449
+ // src/ui/lib/embedded-frame.ts
3450
+ function isInMobileWebView() {
3451
+ return /Termix-Mobile\/(Android|iOS)/.test(navigator.userAgent) || !!window.ReactNativeWebView;
3452
+ }
3453
+ function isInElectronWebView() {
3454
+ if (isInMobileWebView()) return false;
3455
+ if (window.IS_ELECTRON_WEBVIEW) return true;
3456
+ try {
3457
+ if (window.self !== window.top) return true;
3458
+ } catch {
3459
+ return true;
3460
+ }
3461
+ return false;
3462
+ }
3463
+
3523
3464
  // src/ui/auth/Auth.tsx
3524
3465
  import { useState as useState13, useEffect as useEffect10, useCallback as useCallback6, useRef as useRef4 } from "react";
3525
3466
  import { toast as toast2 } from "sonner";
@@ -3541,13 +3482,13 @@ async function getEmbeddedServerFailure() {
3541
3482
  }
3542
3483
 
3543
3484
  // src/ui/lib/plugin-icon.tsx
3544
- import { jsx as jsx35 } from "react/jsx-runtime";
3485
+ import { jsx as jsx34 } from "react/jsx-runtime";
3545
3486
  function PluginIcon({
3546
3487
  name: name2,
3547
3488
  ...props
3548
3489
  }) {
3549
3490
  const Icon = name2 && icons_exports[name2] || Puzzle;
3550
- return /* @__PURE__ */ jsx35(Icon, { ...props });
3491
+ return /* @__PURE__ */ jsx34(Icon, { ...props });
3551
3492
  }
3552
3493
 
3553
3494
  // src/ui/settings/HostPluginSections.tsx
@@ -3556,7 +3497,7 @@ import { useTranslation as useTranslation10 } from "react-i18next";
3556
3497
 
3557
3498
  // src/ui/settings/SettingsFields.tsx
3558
3499
  import { useTranslation as useTranslation9 } from "react-i18next";
3559
- import { Fragment as Fragment4, jsx as jsx36, jsxs as jsxs23 } from "react/jsx-runtime";
3500
+ import { Fragment as Fragment4, jsx as jsx35, jsxs as jsxs23 } from "react/jsx-runtime";
3560
3501
  function SettingsFieldRow({
3561
3502
  pluginId,
3562
3503
  field,
@@ -3573,7 +3514,7 @@ function SettingsFieldRow({
3573
3514
  if (field.type === "custom") {
3574
3515
  const Component = getSettingsComponent(pluginId, field.component);
3575
3516
  if (!Component) return null;
3576
- return /* @__PURE__ */ jsx36(
3517
+ return /* @__PURE__ */ jsx35(
3577
3518
  Component,
3578
3519
  {
3579
3520
  pluginId,
@@ -3587,9 +3528,9 @@ function SettingsFieldRow({
3587
3528
  const readOnly2 = disabled || !running;
3588
3529
  const description = field.descriptionKey ? /* @__PURE__ */ jsxs23(Fragment4, { children: [
3589
3530
  label(field.descriptionKey),
3590
- error && /* @__PURE__ */ jsx36("span", { className: "block text-destructive mt-0.5", children: error })
3591
- ] }) : error ? /* @__PURE__ */ jsx36("span", { className: "text-destructive", children: error }) : void 0;
3592
- const control = /* @__PURE__ */ jsx36(
3531
+ error && /* @__PURE__ */ jsx35("span", { className: "block text-destructive mt-0.5", children: error })
3532
+ ] }) : error ? /* @__PURE__ */ jsx35("span", { className: "text-destructive", children: error }) : void 0;
3533
+ const control = /* @__PURE__ */ jsx35(
3593
3534
  FieldControl,
3594
3535
  {
3595
3536
  pluginId,
@@ -3600,7 +3541,7 @@ function SettingsFieldRow({
3600
3541
  }
3601
3542
  );
3602
3543
  if (field.type === "boolean") {
3603
- return /* @__PURE__ */ jsx36(
3544
+ return /* @__PURE__ */ jsx35(
3604
3545
  SettingRow,
3605
3546
  {
3606
3547
  label: label(field.labelKey),
@@ -3611,14 +3552,14 @@ function SettingsFieldRow({
3611
3552
  }
3612
3553
  );
3613
3554
  }
3614
- return /* @__PURE__ */ jsx36(DefaultsOnly, { settingKey: defaultKey ?? "", children: /* @__PURE__ */ jsxs23("div", { className: "flex flex-col gap-1.5 py-3 border-b border-border last:border-0 min-w-0", children: [
3555
+ return /* @__PURE__ */ jsx35(DefaultsOnly, { settingKey: defaultKey ?? "", children: /* @__PURE__ */ jsxs23("div", { className: "flex flex-col gap-1.5 py-3 border-b border-border last:border-0 min-w-0", children: [
3615
3556
  /* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-1.5 flex-wrap", children: [
3616
- /* @__PURE__ */ jsx36("span", { className: "text-sm font-medium leading-snug", children: label(field.labelKey) }),
3617
- error && /* @__PURE__ */ jsx36("span", { className: "text-[10px] font-bold text-warning border border-warning/40 px-1 shrink-0", children: t2("common.error") }),
3618
- defaultKey && /* @__PURE__ */ jsx36(HostDefaultBadge, { settingKey: defaultKey })
3557
+ /* @__PURE__ */ jsx35("span", { className: "text-sm font-medium leading-snug", children: label(field.labelKey) }),
3558
+ error && /* @__PURE__ */ jsx35("span", { className: "text-[10px] font-bold text-warning border border-warning/40 px-1 shrink-0", children: t2("common.error") }),
3559
+ defaultKey && /* @__PURE__ */ jsx35(HostDefaultBadge, { settingKey: defaultKey })
3619
3560
  ] }),
3620
- description && /* @__PURE__ */ jsx36("span", { className: "text-xs text-muted-foreground leading-snug", children: description }),
3621
- /* @__PURE__ */ jsx36("div", { className: "min-w-0", children: control })
3561
+ description && /* @__PURE__ */ jsx35("span", { className: "text-xs text-muted-foreground leading-snug", children: description }),
3562
+ /* @__PURE__ */ jsx35("div", { className: "min-w-0", children: control })
3622
3563
  ] }) });
3623
3564
  }
3624
3565
  function FieldControl({
@@ -3633,7 +3574,7 @@ function FieldControl({
3633
3574
  const placeholder2 = field.placeholderKey ? label(field.placeholderKey) : void 0;
3634
3575
  switch (field.type) {
3635
3576
  case "boolean":
3636
- return /* @__PURE__ */ jsx36(
3577
+ return /* @__PURE__ */ jsx35(
3637
3578
  FakeSwitch,
3638
3579
  {
3639
3580
  checked: value === true,
@@ -3642,7 +3583,7 @@ function FieldControl({
3642
3583
  }
3643
3584
  );
3644
3585
  case "number":
3645
- return /* @__PURE__ */ jsx36(
3586
+ return /* @__PURE__ */ jsx35(
3646
3587
  Input,
3647
3588
  {
3648
3589
  type: "number",
@@ -3666,19 +3607,19 @@ function FieldControl({
3666
3607
  value: typeof value === "string" ? value : "",
3667
3608
  onValueChange: (next) => setValue(field.key, next),
3668
3609
  children: [
3669
- /* @__PURE__ */ jsx36(SelectTrigger2, { className: "h-8 w-full min-w-0 text-sm", children: /* @__PURE__ */ jsx36(SelectValue2, { placeholder: placeholder2 }) }),
3670
- /* @__PURE__ */ jsx36(SelectContent2, { children: (field.options ?? []).map((option) => /* @__PURE__ */ jsx36(SelectItem2, { value: option.value, children: label(option.labelKey) }, option.value)) })
3610
+ /* @__PURE__ */ jsx35(SelectTrigger2, { className: "h-8 w-full min-w-0 text-sm", children: /* @__PURE__ */ jsx35(SelectValue2, { placeholder: placeholder2 }) }),
3611
+ /* @__PURE__ */ jsx35(SelectContent2, { children: (field.options ?? []).map((option) => /* @__PURE__ */ jsx35(SelectItem2, { value: option.value, children: label(option.labelKey) }, option.value)) })
3671
3612
  ]
3672
3613
  }
3673
3614
  );
3674
3615
  case "multiselect": {
3675
3616
  const selected = Array.isArray(value) ? value : [];
3676
- return /* @__PURE__ */ jsx36("div", { className: "flex flex-col gap-1.5", children: (field.options ?? []).map((option) => /* @__PURE__ */ jsxs23(
3617
+ return /* @__PURE__ */ jsx35("div", { className: "flex flex-col gap-1.5", children: (field.options ?? []).map((option) => /* @__PURE__ */ jsxs23(
3677
3618
  "label",
3678
3619
  {
3679
3620
  className: "flex items-center gap-2 text-xs text-muted-foreground",
3680
3621
  children: [
3681
- /* @__PURE__ */ jsx36(
3622
+ /* @__PURE__ */ jsx35(
3682
3623
  Checkbox2,
3683
3624
  {
3684
3625
  disabled: readOnly2,
@@ -3689,14 +3630,14 @@ function FieldControl({
3689
3630
  )
3690
3631
  }
3691
3632
  ),
3692
- /* @__PURE__ */ jsx36("span", { children: label(option.labelKey) })
3633
+ /* @__PURE__ */ jsx35("span", { children: label(option.labelKey) })
3693
3634
  ]
3694
3635
  },
3695
3636
  option.value
3696
3637
  )) });
3697
3638
  }
3698
3639
  case "secret":
3699
- return /* @__PURE__ */ jsx36(
3640
+ return /* @__PURE__ */ jsx35(
3700
3641
  SecretControl,
3701
3642
  {
3702
3643
  field,
@@ -3708,7 +3649,7 @@ function FieldControl({
3708
3649
  );
3709
3650
  case "textarea":
3710
3651
  case "json":
3711
- return /* @__PURE__ */ jsx36(
3652
+ return /* @__PURE__ */ jsx35(
3712
3653
  Textarea,
3713
3654
  {
3714
3655
  className: "w-full text-sm font-mono min-h-16",
@@ -3719,7 +3660,7 @@ function FieldControl({
3719
3660
  }
3720
3661
  );
3721
3662
  default:
3722
- return /* @__PURE__ */ jsx36(
3663
+ return /* @__PURE__ */ jsx35(
3723
3664
  Input,
3724
3665
  {
3725
3666
  className: "h-8 w-full text-sm",
@@ -3743,8 +3684,8 @@ function SecretControl({
3743
3684
  const stored = redacted && value.set;
3744
3685
  if (redacted) {
3745
3686
  return /* @__PURE__ */ jsxs23("div", { className: "flex flex-wrap items-center gap-2", children: [
3746
- /* @__PURE__ */ jsx36("span", { className: "text-xs text-muted-foreground", children: stored ? t2("settings.secretSet") : t2("settings.secretNotSet") }),
3747
- /* @__PURE__ */ jsx36(
3687
+ /* @__PURE__ */ jsx35("span", { className: "text-xs text-muted-foreground", children: stored ? t2("settings.secretSet") : t2("settings.secretNotSet") }),
3688
+ /* @__PURE__ */ jsx35(
3748
3689
  Button,
3749
3690
  {
3750
3691
  variant: "outline",
@@ -3758,7 +3699,7 @@ function SecretControl({
3758
3699
  ] });
3759
3700
  }
3760
3701
  return /* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-2 min-w-0", children: [
3761
- /* @__PURE__ */ jsx36("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ jsx36(
3702
+ /* @__PURE__ */ jsx35("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ jsx35(
3762
3703
  PasswordInput,
3763
3704
  {
3764
3705
  className: "h-8 w-full text-sm",
@@ -3768,7 +3709,7 @@ function SecretControl({
3768
3709
  onChange: (event) => setValue(field.key, event.target.value)
3769
3710
  }
3770
3711
  ) }),
3771
- /* @__PURE__ */ jsx36(
3712
+ /* @__PURE__ */ jsx35(
3772
3713
  Button,
3773
3714
  {
3774
3715
  variant: "ghost",
@@ -3791,7 +3732,7 @@ function hasVisibleFields(fields) {
3791
3732
  }
3792
3733
 
3793
3734
  // src/ui/settings/HostPluginSections.tsx
3794
- import { jsx as jsx37, jsxs as jsxs24 } from "react/jsx-runtime";
3735
+ import { jsx as jsx36, jsxs as jsxs24 } from "react/jsx-runtime";
3795
3736
  function usePluginHostSections() {
3796
3737
  const [plugins, setPlugins] = useState10([]);
3797
3738
  useEffect7(() => {
@@ -3829,7 +3770,7 @@ function HostPluginSections({
3829
3770
  setValue
3830
3771
  }) {
3831
3772
  if (plugins.length === 0) return null;
3832
- return /* @__PURE__ */ jsx37("div", { className: "flex flex-col gap-2", children: plugins.map((plugin) => /* @__PURE__ */ jsx37(
3773
+ return /* @__PURE__ */ jsx36("div", { className: "flex flex-col gap-2", children: plugins.map((plugin) => /* @__PURE__ */ jsx36(
3833
3774
  HostPluginSection,
3834
3775
  {
3835
3776
  plugin,
@@ -3847,7 +3788,7 @@ function HostFeatureFields({
3847
3788
  const plugin = usePluginHostSections().find((p) => p.id === pluginId);
3848
3789
  if (!plugin) return null;
3849
3790
  const values = form?.pluginSettings ?? {};
3850
- return /* @__PURE__ */ jsx37(
3791
+ return /* @__PURE__ */ jsx36(
3851
3792
  HostPluginSection,
3852
3793
  {
3853
3794
  plugin,
@@ -3881,10 +3822,10 @@ function HostPluginSection({
3881
3822
  SectionCard,
3882
3823
  {
3883
3824
  title: plugin.name,
3884
- icon: /* @__PURE__ */ jsx37(PluginIcon, { name: plugin.icon, className: "size-3.5" }),
3825
+ icon: /* @__PURE__ */ jsx36(PluginIcon, { name: plugin.icon, className: "size-3.5" }),
3885
3826
  children: [
3886
- !running && /* @__PURE__ */ jsx37("div", { className: "my-3 border border-warning/40 bg-warning/10 px-3 py-2 text-xs text-warning", children: t2("settings.featureUnavailable", { name: plugin.name }) }),
3887
- enableKey && /* @__PURE__ */ jsx37(
3827
+ !running && /* @__PURE__ */ jsx36("div", { className: "my-3 border border-warning/40 bg-warning/10 px-3 py-2 text-xs text-warning", children: t2("settings.featureUnavailable", { name: plugin.name }) }),
3828
+ enableKey && /* @__PURE__ */ jsx36(
3888
3829
  SettingsFieldRow,
3889
3830
  {
3890
3831
  pluginId: plugin.id,
@@ -3900,7 +3841,7 @@ function HostPluginSection({
3900
3841
  defaultKey: `${plugin.id}.${enableKey}`
3901
3842
  }
3902
3843
  ),
3903
- enabled && host.fields.filter((field) => isFieldShown(field, shown)).map((field) => /* @__PURE__ */ jsx37(
3844
+ enabled && host.fields.filter((field) => isFieldShown(field, shown)).map((field) => /* @__PURE__ */ jsx36(
3904
3845
  SettingsFieldRow,
3905
3846
  {
3906
3847
  pluginId: plugin.id,
@@ -4141,7 +4082,7 @@ var CORE_EDITOR_KEYS = CORE_HOST_DEFAULTS.map(
4141
4082
  );
4142
4083
 
4143
4084
  // src/ui/settings/host-feature-tabs.tsx
4144
- import { jsx as jsx38 } from "react/jsx-runtime";
4085
+ import { jsx as jsx37 } from "react/jsx-runtime";
4145
4086
  var TAB_PREFIX = "feature:";
4146
4087
  function hostFeatureTabId(pluginId) {
4147
4088
  return `${TAB_PREFIX}${pluginId}`;
@@ -4195,8 +4136,8 @@ function syncHostFeatureTabs(plugins) {
4195
4136
  label: plugin.name,
4196
4137
  // Nothing but the plugin's host settings, so it works for defaults too.
4197
4138
  defaults: ownSections.has(plugin.id) ? "only" : true,
4198
- icon: icon ? ({ className }) => /* @__PURE__ */ jsx38(PluginIcon, { name: icon, className }) : void 0,
4199
- component: ({ form, setField }) => /* @__PURE__ */ jsx38(
4139
+ icon: icon ? ({ className }) => /* @__PURE__ */ jsx37(PluginIcon, { name: icon, className }) : void 0,
4140
+ component: ({ form, setField }) => /* @__PURE__ */ jsx37(
4200
4141
  HostPluginSections,
4201
4142
  {
4202
4143
  plugins: [plugin],
@@ -4450,6 +4391,26 @@ function enqueue(task) {
4450
4391
  queue = queue.then(task, task);
4451
4392
  return queue;
4452
4393
  }
4394
+ function syncPlugins(summaries) {
4395
+ return enqueue(async () => {
4396
+ let list = summaries;
4397
+ if (!list) {
4398
+ try {
4399
+ list = await currentDeps().fetchPlugins();
4400
+ } catch (error) {
4401
+ console.error("[plugins] could not load the plugin list", error);
4402
+ if (!getPluginStoreState().loaded) setPluginSummaries([]);
4403
+ markPluginsSettled();
4404
+ return;
4405
+ }
4406
+ }
4407
+ await reconcile(list);
4408
+ markPluginsSettled();
4409
+ });
4410
+ }
4411
+ import.meta.hot?.on("termix:plugins-reloaded", () => {
4412
+ if (started) void syncPlugins();
4413
+ });
4453
4414
  async function fetchPreLoginPlugins() {
4454
4415
  const response = await fetch(getBackendUrl("/plugins/public-manifest"));
4455
4416
  if (!response.ok) return [];
@@ -4489,7 +4450,7 @@ import {
4489
4450
  useMemo as useMemo6,
4490
4451
  useState as useState12
4491
4452
  } from "react";
4492
- import { jsx as jsx39 } from "react/jsx-runtime";
4453
+ import { jsx as jsx38 } from "react/jsx-runtime";
4493
4454
  var DEFAULT_APP_NAME = "Termix";
4494
4455
  var BrandingContext = createContext4({
4495
4456
  ready: false,
@@ -4504,14 +4465,14 @@ function useBranding() {
4504
4465
  }
4505
4466
 
4506
4467
  // src/ui/auth/auth-bits.tsx
4507
- import { jsx as jsx40, jsxs as jsxs25 } from "react/jsx-runtime";
4468
+ import { jsx as jsx39, jsxs as jsxs25 } from "react/jsx-runtime";
4508
4469
  function BrandPanel({
4509
4470
  logo,
4510
4471
  appName,
4511
4472
  tagline
4512
4473
  }) {
4513
4474
  return /* @__PURE__ */ jsxs25("div", { className: "relative hidden w-[46%] max-w-[560px] shrink-0 select-none flex-col justify-between overflow-hidden border-r border-border bg-sidebar p-10 lg:flex", children: [
4514
- /* @__PURE__ */ jsx40(
4475
+ /* @__PURE__ */ jsx39(
4515
4476
  "div",
4516
4477
  {
4517
4478
  className: "absolute inset-0 opacity-70",
@@ -4521,16 +4482,16 @@ function BrandPanel({
4521
4482
  }
4522
4483
  }
4523
4484
  ),
4524
- /* @__PURE__ */ jsx40("div", { className: "absolute inset-x-0 top-0 h-px bg-accent-brand/60" }),
4485
+ /* @__PURE__ */ jsx39("div", { className: "absolute inset-x-0 top-0 h-px bg-accent-brand/60" }),
4525
4486
  /* @__PURE__ */ jsxs25("div", { className: "relative flex items-center gap-3", children: [
4526
- logo && /* @__PURE__ */ jsx40("img", { src: logo, alt: "", className: "size-8 object-contain" }),
4527
- /* @__PURE__ */ jsx40("span", { className: "font-mono text-lg font-bold uppercase tracking-[0.35em]", children: appName })
4487
+ logo && /* @__PURE__ */ jsx39("img", { src: logo, alt: "", className: "size-8 object-contain" }),
4488
+ /* @__PURE__ */ jsx39("span", { className: "font-mono text-lg font-bold uppercase tracking-[0.35em]", children: appName })
4528
4489
  ] }),
4529
4490
  /* @__PURE__ */ jsxs25("div", { className: "relative max-w-[380px]", children: [
4530
- /* @__PURE__ */ jsx40("h2", { className: "text-2xl font-semibold leading-tight tracking-tight", children: tagline }),
4531
- /* @__PURE__ */ jsx40("div", { className: "mt-4 h-px w-10 bg-accent-brand" })
4491
+ /* @__PURE__ */ jsx39("h2", { className: "text-2xl font-semibold leading-tight tracking-tight", children: tagline }),
4492
+ /* @__PURE__ */ jsx39("div", { className: "mt-4 h-px w-10 bg-accent-brand" })
4532
4493
  ] }),
4533
- /* @__PURE__ */ jsx40("div", { className: "relative h-3" })
4494
+ /* @__PURE__ */ jsx39("div", { className: "relative h-3" })
4534
4495
  ] });
4535
4496
  }
4536
4497
  function CompactBrand({
@@ -4538,8 +4499,8 @@ function CompactBrand({
4538
4499
  appName
4539
4500
  }) {
4540
4501
  return /* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-2.5 lg:hidden", children: [
4541
- logo && /* @__PURE__ */ jsx40("img", { src: logo, alt: "", className: "size-7 object-contain" }),
4542
- /* @__PURE__ */ jsx40("span", { className: "font-mono text-sm font-bold uppercase tracking-[0.3em]", children: appName })
4502
+ logo && /* @__PURE__ */ jsx39("img", { src: logo, alt: "", className: "size-7 object-contain" }),
4503
+ /* @__PURE__ */ jsx39("span", { className: "font-mono text-sm font-bold uppercase tracking-[0.3em]", children: appName })
4543
4504
  ] });
4544
4505
  }
4545
4506
 
@@ -4563,7 +4524,7 @@ function removeSilentSigninFromSearch(search) {
4563
4524
  }
4564
4525
 
4565
4526
  // src/ui/auth/Auth.tsx
4566
- import { Fragment as Fragment5, jsx as jsx41, jsxs as jsxs26 } from "react/jsx-runtime";
4527
+ import { Fragment as Fragment5, jsx as jsx40, jsxs as jsxs26 } from "react/jsx-runtime";
4567
4528
  var LANGUAGES = [
4568
4529
  { code: "en", label: "English" },
4569
4530
  { code: "af", label: "Afrikaans" },
@@ -4608,8 +4569,8 @@ function LanguageRow({
4608
4569
  className
4609
4570
  }) {
4610
4571
  return /* @__PURE__ */ jsxs26("div", { className: cn("flex items-center justify-between gap-4", className), children: [
4611
- /* @__PURE__ */ jsx41("span", { className: "text-xs text-muted-foreground shrink-0", children: label }),
4612
- /* @__PURE__ */ jsx41(
4572
+ /* @__PURE__ */ jsx40("span", { className: "text-xs text-muted-foreground shrink-0", children: label }),
4573
+ /* @__PURE__ */ jsx40(
4613
4574
  Select22,
4614
4575
  {
4615
4576
  value,
@@ -4618,7 +4579,7 @@ function LanguageRow({
4618
4579
  align: "end",
4619
4580
  contentClassName: "w-56",
4620
4581
  className: "h-8 w-40 shrink-0 px-2.5 text-xs",
4621
- children: LANGUAGES.map((lang) => /* @__PURE__ */ jsx41("option", { value: lang.code, children: lang.label }, lang.code))
4582
+ children: LANGUAGES.map((lang) => /* @__PURE__ */ jsx40("option", { value: lang.code, children: lang.label }, lang.code))
4622
4583
  }
4623
4584
  )
4624
4585
  ] });
@@ -4641,17 +4602,6 @@ function storeAuth(username) {
4641
4602
  JSON.stringify({ loggedIn: true, username })
4642
4603
  );
4643
4604
  }
4644
- var isInMobileWebView = () => /Termix-Mobile\/(Android|iOS)/.test(navigator.userAgent) || !!window.ReactNativeWebView;
4645
- var isInElectronWebView = () => {
4646
- if (isInMobileWebView()) return false;
4647
- if (window.IS_ELECTRON_WEBVIEW) return true;
4648
- try {
4649
- if (window.self !== window.top) return true;
4650
- } catch {
4651
- return true;
4652
- }
4653
- return false;
4654
- };
4655
4605
  function PasswordInput2({
4656
4606
  value,
4657
4607
  onChange,
@@ -4661,7 +4611,7 @@ function PasswordInput2({
4661
4611
  }) {
4662
4612
  const [show, setShow] = useState13(false);
4663
4613
  return /* @__PURE__ */ jsxs26("div", { className: "relative", children: [
4664
- /* @__PURE__ */ jsx41(
4614
+ /* @__PURE__ */ jsx40(
4665
4615
  Input,
4666
4616
  {
4667
4617
  id,
@@ -4673,14 +4623,14 @@ function PasswordInput2({
4673
4623
  className: "pr-9 font-mono"
4674
4624
  }
4675
4625
  ),
4676
- /* @__PURE__ */ jsx41(
4626
+ /* @__PURE__ */ jsx40(
4677
4627
  "button",
4678
4628
  {
4679
4629
  type: "button",
4680
4630
  tabIndex: -1,
4681
4631
  onClick: () => setShow((o) => !o),
4682
4632
  className: "absolute right-2.5 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground transition-colors",
4683
- children: show ? /* @__PURE__ */ jsx41(EyeOff, { className: "size-4" }) : /* @__PURE__ */ jsx41(Eye, { className: "size-4" })
4633
+ children: show ? /* @__PURE__ */ jsx40(EyeOff, { className: "size-4" }) : /* @__PURE__ */ jsx40(Eye, { className: "size-4" })
4684
4634
  }
4685
4635
  )
4686
4636
  ] });
@@ -4689,7 +4639,7 @@ function FieldLabel({
4689
4639
  htmlFor,
4690
4640
  children
4691
4641
  }) {
4692
- return /* @__PURE__ */ jsx41(
4642
+ return /* @__PURE__ */ jsx40(
4693
4643
  "label",
4694
4644
  {
4695
4645
  htmlFor,
@@ -4704,7 +4654,7 @@ function Field({
4704
4654
  children
4705
4655
  }) {
4706
4656
  return /* @__PURE__ */ jsxs26("div", { className: "flex flex-col gap-1.5", children: [
4707
- /* @__PURE__ */ jsx41(FieldLabel, { htmlFor, children: label }),
4657
+ /* @__PURE__ */ jsx40(FieldLabel, { htmlFor, children: label }),
4708
4658
  children
4709
4659
  ] });
4710
4660
  }
@@ -5326,10 +5276,10 @@ function Auth({ onLogin }) {
5326
5276
  };
5327
5277
  if (ui) {
5328
5278
  const Component = ui.component;
5329
- return /* @__PURE__ */ jsx41(Component, { ...props }, method.id);
5279
+ return /* @__PURE__ */ jsx40(Component, { ...props }, method.id);
5330
5280
  }
5331
5281
  if (method.kind === "redirect") {
5332
- return method.instances.map((instance) => /* @__PURE__ */ jsx41(
5282
+ return method.instances.map((instance) => /* @__PURE__ */ jsx40(
5333
5283
  Button,
5334
5284
  {
5335
5285
  onClick: () => void startRedirect(method.id, instance.id),
@@ -5374,12 +5324,12 @@ function Auth({ onLogin }) {
5374
5324
  const detail = embeddedServerFailure.reason === "port-in-use" ? embeddedServerFailure.port !== null ? t2("messages.embeddedServerPortInUse", {
5375
5325
  port: embeddedServerFailure.port
5376
5326
  }) : t2("messages.embeddedServerPortInUseUnknownPort") : t2("messages.embeddedServerCrashed");
5377
- return /* @__PURE__ */ jsx41("div", { className: "fixed inset-0 flex items-center justify-center bg-background p-6", children: /* @__PURE__ */ jsxs26("div", { className: "flex flex-col gap-5 p-6 border border-border bg-card max-w-sm w-full", children: [
5327
+ return /* @__PURE__ */ jsx40("div", { className: "fixed inset-0 flex items-center justify-center bg-background p-6", children: /* @__PURE__ */ jsxs26("div", { className: "flex flex-col gap-5 p-6 border border-border bg-card max-w-sm w-full", children: [
5378
5328
  /* @__PURE__ */ jsxs26("div", { className: "flex flex-col gap-1", children: [
5379
- /* @__PURE__ */ jsx41("p", { className: "font-bold text-destructive", children: t2("errors.embeddedServerFailed") }),
5380
- /* @__PURE__ */ jsx41("p", { className: "text-sm text-muted-foreground", children: detail })
5329
+ /* @__PURE__ */ jsx40("p", { className: "font-bold text-destructive", children: t2("errors.embeddedServerFailed") }),
5330
+ /* @__PURE__ */ jsx40("p", { className: "text-sm text-muted-foreground", children: detail })
5381
5331
  ] }),
5382
- /* @__PURE__ */ jsx41(
5332
+ /* @__PURE__ */ jsx40(
5383
5333
  LanguageRow,
5384
5334
  {
5385
5335
  label: t2("common.language"),
@@ -5391,21 +5341,29 @@ function Auth({ onLogin }) {
5391
5341
  ] }) });
5392
5342
  }
5393
5343
  if (isElectron() && !isInElectronWebView() && desktopAutoSessionDone === null) {
5394
- return /* @__PURE__ */ jsx41("div", { className: "fixed inset-0 flex items-center justify-center bg-background", children: /* @__PURE__ */ jsx41("div", { className: "w-5 h-5 border-2 border-primary border-t-transparent rounded-full animate-spin" }) });
5344
+ return /* @__PURE__ */ jsx40("div", { className: "fixed inset-0 flex items-center justify-center bg-background", children: /* @__PURE__ */ jsx40("div", { className: "w-5 h-5 border-2 border-primary border-t-transparent rounded-full animate-spin" }) });
5395
5345
  }
5396
5346
  if (webviewAuthSuccess || isInElectronWebView() && webviewAuthSuccess)
5397
- return /* @__PURE__ */ jsx41("div", { className: "fixed inset-0 flex items-center justify-center bg-background", children: /* @__PURE__ */ jsxs26("div", { className: "text-center", children: [
5398
- /* @__PURE__ */ jsx41(CircleCheck, { className: "size-12 text-accent-brand mx-auto mb-4" }),
5399
- /* @__PURE__ */ jsx41("p", { className: "text-muted-foreground", children: t2("auth.redirectingToApp") })
5347
+ return /* @__PURE__ */ jsx40("div", { className: "fixed inset-0 flex items-center justify-center bg-background", children: /* @__PURE__ */ jsxs26("div", { className: "text-center", children: [
5348
+ /* @__PURE__ */ jsx40(CircleCheck, { className: "size-12 text-accent-brand mx-auto mb-4" }),
5349
+ /* @__PURE__ */ jsx40("p", { className: "text-muted-foreground", children: t2("auth.redirectingToApp") })
5400
5350
  ] }) });
5401
5351
  if (dbConnectionFailed)
5402
- return /* @__PURE__ */ jsx41("div", { className: "fixed inset-0 flex items-center justify-center bg-background p-6", children: /* @__PURE__ */ jsxs26("div", { className: "flex flex-col gap-5 p-6 border border-border bg-card max-w-sm w-full", children: [
5352
+ return /* @__PURE__ */ jsx40("div", { className: "fixed inset-0 flex items-center justify-center bg-background p-6", children: /* @__PURE__ */ jsxs26("div", { className: "flex flex-col gap-5 p-6 border border-border bg-card max-w-sm w-full", children: [
5403
5353
  /* @__PURE__ */ jsxs26("div", { className: "flex flex-col gap-1", children: [
5404
- /* @__PURE__ */ jsx41("p", { className: "font-bold text-destructive", children: t2("errors.databaseConnection") }),
5405
- /* @__PURE__ */ jsx41("p", { className: "text-sm text-muted-foreground", children: t2("messages.databaseConnectionFailed") })
5354
+ /* @__PURE__ */ jsx40("p", { className: "font-bold text-destructive", children: t2("errors.databaseConnection") }),
5355
+ /* @__PURE__ */ jsx40("p", { className: "text-sm text-muted-foreground", children: t2("messages.databaseConnectionFailed") })
5406
5356
  ] }),
5407
- /* @__PURE__ */ jsx41(Button, { onClick: () => window.location.reload(), children: t2("common.refresh") }),
5408
- /* @__PURE__ */ jsx41(
5357
+ /* @__PURE__ */ jsx40(
5358
+ Button,
5359
+ {
5360
+ variant: "outline",
5361
+ onClick: () => window.location.reload(),
5362
+ className: "border-accent-brand/40 text-accent-brand hover:bg-accent-brand/10 hover:text-accent-brand dark:border-accent-brand/40 dark:bg-transparent dark:hover:bg-accent-brand/10",
5363
+ children: t2("common.refresh")
5364
+ }
5365
+ ),
5366
+ /* @__PURE__ */ jsx40(
5409
5367
  LanguageRow,
5410
5368
  {
5411
5369
  label: t2("common.language"),
@@ -5416,10 +5374,10 @@ function Auth({ onLogin }) {
5416
5374
  )
5417
5375
  ] }) });
5418
5376
  if (dbHealthChecking)
5419
- return /* @__PURE__ */ jsx41("div", { className: "fixed inset-0 flex items-center justify-center bg-background", children: /* @__PURE__ */ jsx41("div", { className: "w-5 h-5 border-2 border-primary border-t-transparent rounded-full animate-spin" }) });
5377
+ return /* @__PURE__ */ jsx40("div", { className: "fixed inset-0 flex items-center justify-center bg-background", children: /* @__PURE__ */ jsx40("div", { className: "w-5 h-5 border-2 border-primary border-t-transparent rounded-full animate-spin" }) });
5420
5378
  if (localDesktopAuth)
5421
- return /* @__PURE__ */ jsx41("div", { className: "fixed inset-0 flex flex-col bg-background overflow-hidden", children: /* @__PURE__ */ jsxs26("div", { className: "flex flex-1 overflow-hidden", children: [
5422
- /* @__PURE__ */ jsx41(
5379
+ return /* @__PURE__ */ jsx40("div", { className: "fixed inset-0 flex flex-col bg-background overflow-hidden", children: /* @__PURE__ */ jsxs26("div", { className: "flex flex-1 overflow-hidden", children: [
5380
+ /* @__PURE__ */ jsx40(
5423
5381
  BrandPanel,
5424
5382
  {
5425
5383
  logo: branding.logo,
@@ -5427,14 +5385,14 @@ function Auth({ onLogin }) {
5427
5385
  tagline: branding.tagline || t2("auth.tagline")
5428
5386
  }
5429
5387
  ),
5430
- /* @__PURE__ */ jsx41("div", { className: "flex flex-1 items-center justify-center p-6 overflow-y-auto relative", children: /* @__PURE__ */ jsxs26("div", { className: "w-full max-w-[380px] flex flex-col gap-6 border border-border bg-card p-5", children: [
5431
- /* @__PURE__ */ jsx41(CompactBrand, { logo: branding.logo, appName: branding.appName }),
5388
+ /* @__PURE__ */ jsx40("div", { className: "flex flex-1 items-center justify-center p-6 overflow-y-auto relative", children: /* @__PURE__ */ jsxs26("div", { className: "w-full max-w-[380px] flex flex-col gap-6 border border-border bg-card p-5", children: [
5389
+ /* @__PURE__ */ jsx40(CompactBrand, { logo: branding.logo, appName: branding.appName }),
5432
5390
  /* @__PURE__ */ jsxs26("div", { className: "flex flex-col gap-5", children: [
5433
5391
  /* @__PURE__ */ jsxs26("div", { className: "flex flex-col gap-1", children: [
5434
- /* @__PURE__ */ jsx41("h1", { className: "text-xl font-bold", children: desktopManualLogoutActive ? t2("auth.localDesktopSignedOut") : t2("auth.localDesktopUnavailable") }),
5435
- /* @__PURE__ */ jsx41("p", { className: "text-xs text-muted-foreground leading-relaxed", children: desktopManualLogoutActive ? t2("auth.localDesktopSignedOutDesc") : t2("auth.localDesktopUnavailableDesc") })
5392
+ /* @__PURE__ */ jsx40("h1", { className: "text-xl font-bold", children: desktopManualLogoutActive ? t2("auth.localDesktopSignedOut") : t2("auth.localDesktopUnavailable") }),
5393
+ /* @__PURE__ */ jsx40("p", { className: "text-xs text-muted-foreground leading-relaxed", children: desktopManualLogoutActive ? t2("auth.localDesktopSignedOutDesc") : t2("auth.localDesktopUnavailableDesc") })
5436
5394
  ] }),
5437
- /* @__PURE__ */ jsx41(
5395
+ /* @__PURE__ */ jsx40(
5438
5396
  Button,
5439
5397
  {
5440
5398
  type: "button",
@@ -5444,8 +5402,8 @@ function Auth({ onLogin }) {
5444
5402
  children: desktopManualLogoutActive ? t2("auth.continueLocalDesktop") : t2("auth.retryLocalDesktop")
5445
5403
  }
5446
5404
  ),
5447
- /* @__PURE__ */ jsx41(Separator, {}),
5448
- /* @__PURE__ */ jsx41(
5405
+ /* @__PURE__ */ jsx40(Separator, {}),
5406
+ /* @__PURE__ */ jsx40(
5449
5407
  LanguageRow,
5450
5408
  {
5451
5409
  label: t2("common.language"),
@@ -5474,8 +5432,8 @@ function Auth({ onLogin }) {
5474
5432
  show: externalMethods.length > 0
5475
5433
  }
5476
5434
  ];
5477
- return /* @__PURE__ */ jsx41("div", { className: "fixed inset-0 flex flex-col bg-background overflow-hidden", children: /* @__PURE__ */ jsxs26("div", { className: "flex flex-1 overflow-hidden", children: [
5478
- /* @__PURE__ */ jsx41(
5435
+ return /* @__PURE__ */ jsx40("div", { className: "fixed inset-0 flex flex-col bg-background overflow-hidden", children: /* @__PURE__ */ jsxs26("div", { className: "flex flex-1 overflow-hidden", children: [
5436
+ /* @__PURE__ */ jsx40(
5479
5437
  BrandPanel,
5480
5438
  {
5481
5439
  logo: branding.logo,
@@ -5483,18 +5441,18 @@ function Auth({ onLogin }) {
5483
5441
  tagline: branding.tagline || t2("auth.tagline")
5484
5442
  }
5485
5443
  ),
5486
- /* @__PURE__ */ jsx41("div", { className: "flex flex-1 items-center justify-center p-6 overflow-y-auto relative", children: /* @__PURE__ */ jsxs26("div", { className: "w-full max-w-[380px] flex flex-col gap-6 border border-border bg-card p-5", children: [
5487
- /* @__PURE__ */ jsx41(CompactBrand, { logo: branding.logo, appName: branding.appName }),
5444
+ /* @__PURE__ */ jsx40("div", { className: "flex flex-1 items-center justify-center p-6 overflow-y-auto relative", children: /* @__PURE__ */ jsxs26("div", { className: "w-full max-w-[380px] flex flex-col gap-6 border border-border bg-card p-5", children: [
5445
+ /* @__PURE__ */ jsx40(CompactBrand, { logo: branding.logo, appName: branding.appName }),
5488
5446
  view === "second-factor" && /* @__PURE__ */ jsxs26("div", { className: "flex flex-col gap-5", children: [
5489
5447
  /* @__PURE__ */ jsxs26("div", { className: "flex flex-col gap-1", children: [
5490
- /* @__PURE__ */ jsx41("h1", { className: "text-xl font-bold", children: t2("auth.twoFactorAuth") }),
5491
- /* @__PURE__ */ jsx41("p", { className: "text-xs text-muted-foreground", children: t2("auth.enterCode") })
5448
+ /* @__PURE__ */ jsx40("h1", { className: "text-xl font-bold", children: t2("auth.twoFactorAuth") }),
5449
+ /* @__PURE__ */ jsx40("p", { className: "text-xs text-muted-foreground", children: t2("auth.enterCode") })
5492
5450
  ] }),
5493
- shownFactors.length > 1 && /* @__PURE__ */ jsx41("div", { className: "flex border border-border overflow-hidden", children: shownFactors.map((factor) => {
5451
+ shownFactors.length > 1 && /* @__PURE__ */ jsx40("div", { className: "flex border border-border overflow-hidden", children: shownFactors.map((factor) => {
5494
5452
  const ui = secondFactorUIs.find(
5495
5453
  (candidate) => candidate.id === factor.id
5496
5454
  );
5497
- return /* @__PURE__ */ jsx41(
5455
+ return /* @__PURE__ */ jsx40(
5498
5456
  "button",
5499
5457
  {
5500
5458
  type: "button",
@@ -5511,23 +5469,25 @@ function Auth({ onLogin }) {
5511
5469
  );
5512
5470
  if (!ui) {
5513
5471
  return /* @__PURE__ */ jsxs26("div", { className: "space-y-2", "aria-live": "polite", children: [
5514
- /* @__PURE__ */ jsx41("p", { className: "text-xs text-muted-foreground", children: t2(
5472
+ /* @__PURE__ */ jsx40("p", { className: "text-xs text-muted-foreground", children: t2(
5515
5473
  authPluginsLoading ? "common.loading" : "auth.secondFactorNoUI"
5516
5474
  ) }),
5517
- /* @__PURE__ */ jsx41(
5475
+ /* @__PURE__ */ jsx40(
5518
5476
  Button,
5519
5477
  {
5478
+ variant: "outline",
5520
5479
  type: "button",
5521
5480
  disabled: authPluginsLoading,
5522
5481
  onClick: () => void retryAuthPlugins().catch(() => {
5523
5482
  }),
5483
+ className: "border-accent-brand/40 text-accent-brand hover:bg-accent-brand/10 hover:text-accent-brand dark:border-accent-brand/40 dark:bg-transparent dark:hover:bg-accent-brand/10",
5524
5484
  children: t2("auth.retrySecondFactorUI")
5525
5485
  }
5526
5486
  )
5527
5487
  ] });
5528
5488
  }
5529
5489
  const Component = ui.component;
5530
- return /* @__PURE__ */ jsx41(
5490
+ return /* @__PURE__ */ jsx40(
5531
5491
  Component,
5532
5492
  {
5533
5493
  factorId: currentFactorId,
@@ -5551,16 +5511,16 @@ function Auth({ onLogin }) {
5551
5511
  onClick: () => switchView("login"),
5552
5512
  className: "flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground transition-colors w-fit",
5553
5513
  children: [
5554
- /* @__PURE__ */ jsx41(ArrowLeft, { className: "size-3.5" }),
5514
+ /* @__PURE__ */ jsx40(ArrowLeft, { className: "size-3.5" }),
5555
5515
  t2("common.back")
5556
5516
  ]
5557
5517
  }
5558
5518
  ),
5559
5519
  /* @__PURE__ */ jsxs26("div", { className: "flex flex-col gap-1", children: [
5560
- /* @__PURE__ */ jsx41("h1", { className: "text-xl font-bold", children: t2("auth.forgotPassword") }),
5561
- /* @__PURE__ */ jsx41("p", { className: "text-xs text-muted-foreground", children: t2("auth.resetCodeDesc") })
5520
+ /* @__PURE__ */ jsx40("h1", { className: "text-xl font-bold", children: t2("auth.forgotPassword") }),
5521
+ /* @__PURE__ */ jsx40("p", { className: "text-xs text-muted-foreground", children: t2("auth.resetCodeDesc") })
5562
5522
  ] }),
5563
- /* @__PURE__ */ jsx41("div", { className: "flex items-center gap-2", children: ["email", "code", "newpass"].map(
5523
+ /* @__PURE__ */ jsx40("div", { className: "flex items-center gap-2", children: ["email", "code", "newpass"].map(
5564
5524
  (step, i2) => {
5565
5525
  const stepIdx = ["email", "code", "newpass"].indexOf(
5566
5526
  resetStep
@@ -5572,14 +5532,14 @@ function Auth({ onLogin }) {
5572
5532
  {
5573
5533
  className: "flex items-center gap-2 flex-1",
5574
5534
  children: [
5575
- /* @__PURE__ */ jsx41(
5535
+ /* @__PURE__ */ jsx40(
5576
5536
  "div",
5577
5537
  {
5578
5538
  className: `size-5 flex items-center justify-center text-[10px] font-bold border transition-colors ${done ? "bg-accent-brand border-accent-brand text-background" : active2 ? "border-accent-brand text-accent-brand" : "border-border text-muted-foreground"}`,
5579
- children: done ? /* @__PURE__ */ jsx41(CircleCheck, { className: "size-3" }) : i2 + 1
5539
+ children: done ? /* @__PURE__ */ jsx40(CircleCheck, { className: "size-3" }) : i2 + 1
5580
5540
  }
5581
5541
  ),
5582
- i2 < 2 && /* @__PURE__ */ jsx41(
5542
+ i2 < 2 && /* @__PURE__ */ jsx40(
5583
5543
  "div",
5584
5544
  {
5585
5545
  className: `h-px flex-1 transition-colors ${done ? "bg-accent-brand" : "bg-border"}`
@@ -5597,7 +5557,7 @@ function Auth({ onLogin }) {
5597
5557
  onSubmit: handleResetInitiate,
5598
5558
  className: "flex flex-col gap-4",
5599
5559
  children: [
5600
- /* @__PURE__ */ jsx41(Field, { label: t2("common.username"), htmlFor: "reset-user", children: /* @__PURE__ */ jsx41(
5560
+ /* @__PURE__ */ jsx40(Field, { label: t2("common.username"), htmlFor: "reset-user", children: /* @__PURE__ */ jsx40(
5601
5561
  Input,
5602
5562
  {
5603
5563
  id: "reset-user",
@@ -5607,7 +5567,7 @@ function Auth({ onLogin }) {
5607
5567
  disabled: loading
5608
5568
  }
5609
5569
  ) }),
5610
- /* @__PURE__ */ jsx41(
5570
+ /* @__PURE__ */ jsx40(
5611
5571
  Button,
5612
5572
  {
5613
5573
  type: "submit",
@@ -5625,7 +5585,7 @@ function Auth({ onLogin }) {
5625
5585
  onSubmit: handleResetVerify,
5626
5586
  className: "flex flex-col gap-4",
5627
5587
  children: [
5628
- /* @__PURE__ */ jsx41(Field, { label: t2("auth.resetCode"), htmlFor: "reset-code", children: /* @__PURE__ */ jsx41(
5588
+ /* @__PURE__ */ jsx40(Field, { label: t2("auth.resetCode"), htmlFor: "reset-code", children: /* @__PURE__ */ jsx40(
5629
5589
  Input,
5630
5590
  {
5631
5591
  id: "reset-code",
@@ -5637,7 +5597,7 @@ function Auth({ onLogin }) {
5637
5597
  disabled: loading
5638
5598
  }
5639
5599
  ) }),
5640
- /* @__PURE__ */ jsx41(
5600
+ /* @__PURE__ */ jsx40(
5641
5601
  Button,
5642
5602
  {
5643
5603
  type: "submit",
@@ -5646,7 +5606,7 @@ function Auth({ onLogin }) {
5646
5606
  children: loading ? t2("common.loading") : t2("auth.verifyCodeButton")
5647
5607
  }
5648
5608
  ),
5649
- /* @__PURE__ */ jsx41(
5609
+ /* @__PURE__ */ jsx40(
5650
5610
  Button,
5651
5611
  {
5652
5612
  type: "button",
@@ -5666,7 +5626,7 @@ function Auth({ onLogin }) {
5666
5626
  onSubmit: handleResetComplete,
5667
5627
  className: "flex flex-col gap-4",
5668
5628
  children: [
5669
- /* @__PURE__ */ jsx41(Field, { label: t2("auth.newPassword"), htmlFor: "new-pass", children: /* @__PURE__ */ jsx41(
5629
+ /* @__PURE__ */ jsx40(Field, { label: t2("auth.newPassword"), htmlFor: "new-pass", children: /* @__PURE__ */ jsx40(
5670
5630
  PasswordInput2,
5671
5631
  {
5672
5632
  id: "new-pass",
@@ -5675,12 +5635,12 @@ function Auth({ onLogin }) {
5675
5635
  disabled: loading
5676
5636
  }
5677
5637
  ) }),
5678
- /* @__PURE__ */ jsx41(
5638
+ /* @__PURE__ */ jsx40(
5679
5639
  Field,
5680
5640
  {
5681
5641
  label: t2("auth.confirmNewPassword"),
5682
5642
  htmlFor: "confirm-new-pass",
5683
- children: /* @__PURE__ */ jsx41(
5643
+ children: /* @__PURE__ */ jsx40(
5684
5644
  PasswordInput2,
5685
5645
  {
5686
5646
  id: "confirm-new-pass",
@@ -5691,7 +5651,7 @@ function Auth({ onLogin }) {
5691
5651
  )
5692
5652
  }
5693
5653
  ),
5694
- /* @__PURE__ */ jsx41(
5654
+ /* @__PURE__ */ jsx40(
5695
5655
  Button,
5696
5656
  {
5697
5657
  type: "submit",
@@ -5705,7 +5665,7 @@ function Auth({ onLogin }) {
5705
5665
  )
5706
5666
  ] }),
5707
5667
  (view === "login" || view === "register" || view === "external") && /* @__PURE__ */ jsxs26("div", { className: "flex flex-col gap-5", children: [
5708
- /* @__PURE__ */ jsx41("div", { className: "flex border border-border overflow-hidden", children: TAB_ITEMS.filter((item) => item.show).map((item) => /* @__PURE__ */ jsx41(
5668
+ /* @__PURE__ */ jsx40("div", { className: "flex border border-border overflow-hidden", children: TAB_ITEMS.filter((item) => item.show).map((item) => /* @__PURE__ */ jsx40(
5709
5669
  "button",
5710
5670
  {
5711
5671
  onClick: () => switchView(item.id),
@@ -5715,12 +5675,12 @@ function Auth({ onLogin }) {
5715
5675
  item.id
5716
5676
  )) }),
5717
5677
  /* @__PURE__ */ jsxs26("div", { className: "flex flex-col gap-1", children: [
5718
- /* @__PURE__ */ jsx41("h1", { className: "text-xl font-bold", children: view === "login" ? t2("auth.loginTitle") : view === "register" ? t2("auth.registerTitle") : t2("auth.loginWithExternal") }),
5719
- /* @__PURE__ */ jsx41("p", { className: "text-xs text-muted-foreground", children: view === "login" ? t2("auth.loginSubtitle", "") : view === "register" ? t2("auth.registerSubtitle", "") : t2("auth.loginWithExternalDesc") })
5678
+ /* @__PURE__ */ jsx40("h1", { className: "text-xl font-bold", children: view === "login" ? t2("auth.loginTitle") : view === "register" ? t2("auth.registerTitle") : t2("auth.loginWithExternal") }),
5679
+ /* @__PURE__ */ jsx40("p", { className: "text-xs text-muted-foreground", children: view === "login" ? t2("auth.loginSubtitle", "") : view === "register" ? t2("auth.registerSubtitle", "") : t2("auth.loginWithExternalDesc") })
5720
5680
  ] }),
5721
5681
  view === "external" && /* @__PURE__ */ jsxs26("div", { className: "flex flex-col gap-4", children: [
5722
5682
  /* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-2", children: [
5723
- /* @__PURE__ */ jsx41(
5683
+ /* @__PURE__ */ jsx40(
5724
5684
  Checkbox2,
5725
5685
  {
5726
5686
  id: "rememberSSO",
@@ -5728,7 +5688,7 @@ function Auth({ onLogin }) {
5728
5688
  onCheckedChange: (v) => setRememberMe(v === true)
5729
5689
  }
5730
5690
  ),
5731
- /* @__PURE__ */ jsx41(
5691
+ /* @__PURE__ */ jsx40(
5732
5692
  "label",
5733
5693
  {
5734
5694
  htmlFor: "rememberSSO",
@@ -5745,9 +5705,9 @@ function Auth({ onLogin }) {
5745
5705
  ] })
5746
5706
  ] }),
5747
5707
  view === "login" && /* @__PURE__ */ jsxs26("form", { onSubmit: handleLogin, className: "flex flex-col gap-4", children: [
5748
- /* @__PURE__ */ jsx41(Field, { label: t2("common.username"), htmlFor: "login-user", children: /* @__PURE__ */ jsxs26("div", { className: "relative", children: [
5749
- /* @__PURE__ */ jsx41(User, { className: "absolute left-2.5 top-1/2 -translate-y-1/2 size-4 text-muted-foreground pointer-events-none" }),
5750
- /* @__PURE__ */ jsx41(
5708
+ /* @__PURE__ */ jsx40(Field, { label: t2("common.username"), htmlFor: "login-user", children: /* @__PURE__ */ jsxs26("div", { className: "relative", children: [
5709
+ /* @__PURE__ */ jsx40(User, { className: "absolute left-2.5 top-1/2 -translate-y-1/2 size-4 text-muted-foreground pointer-events-none" }),
5710
+ /* @__PURE__ */ jsx40(
5751
5711
  Input,
5752
5712
  {
5753
5713
  id: "login-user",
@@ -5760,7 +5720,7 @@ function Auth({ onLogin }) {
5760
5720
  }
5761
5721
  )
5762
5722
  ] }) }),
5763
- /* @__PURE__ */ jsx41(Field, { label: t2("common.password"), htmlFor: "login-pass", children: /* @__PURE__ */ jsx41(
5723
+ /* @__PURE__ */ jsx40(Field, { label: t2("common.password"), htmlFor: "login-pass", children: /* @__PURE__ */ jsx40(
5764
5724
  PasswordInput2,
5765
5725
  {
5766
5726
  id: "login-pass",
@@ -5771,7 +5731,7 @@ function Auth({ onLogin }) {
5771
5731
  ) }),
5772
5732
  /* @__PURE__ */ jsxs26("div", { className: "flex items-center justify-between", children: [
5773
5733
  /* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-2", children: [
5774
- /* @__PURE__ */ jsx41(
5734
+ /* @__PURE__ */ jsx40(
5775
5735
  Checkbox2,
5776
5736
  {
5777
5737
  id: "rememberMe",
@@ -5780,7 +5740,7 @@ function Auth({ onLogin }) {
5780
5740
  disabled: loading
5781
5741
  }
5782
5742
  ),
5783
- /* @__PURE__ */ jsx41(
5743
+ /* @__PURE__ */ jsx40(
5784
5744
  "label",
5785
5745
  {
5786
5746
  htmlFor: "rememberMe",
@@ -5789,7 +5749,7 @@ function Auth({ onLogin }) {
5789
5749
  }
5790
5750
  )
5791
5751
  ] }),
5792
- passwordResetAllowed && /* @__PURE__ */ jsx41(
5752
+ passwordResetAllowed && /* @__PURE__ */ jsx40(
5793
5753
  "button",
5794
5754
  {
5795
5755
  type: "button",
@@ -5799,14 +5759,14 @@ function Auth({ onLogin }) {
5799
5759
  }
5800
5760
  )
5801
5761
  ] }),
5802
- /* @__PURE__ */ jsx41(
5762
+ /* @__PURE__ */ jsx40(
5803
5763
  Button,
5804
5764
  {
5805
5765
  type: "submit",
5806
5766
  className: "w-full bg-accent-brand hover:bg-accent-brand/90 text-background font-bold h-10",
5807
5767
  disabled: loading,
5808
5768
  children: loading ? t2("common.loading") : /* @__PURE__ */ jsxs26("span", { className: "flex items-center gap-2", children: [
5809
- /* @__PURE__ */ jsx41(KeyRound, { className: "size-4" }),
5769
+ /* @__PURE__ */ jsx40(KeyRound, { className: "size-4" }),
5810
5770
  t2("common.login")
5811
5771
  ] })
5812
5772
  }
@@ -5819,9 +5779,9 @@ function Auth({ onLogin }) {
5819
5779
  onSubmit: handleRegister,
5820
5780
  className: "flex flex-col gap-4",
5821
5781
  children: [
5822
- /* @__PURE__ */ jsx41(Field, { label: t2("common.username"), htmlFor: "reg-user", children: /* @__PURE__ */ jsxs26("div", { className: "relative", children: [
5823
- /* @__PURE__ */ jsx41(User, { className: "absolute left-2.5 top-1/2 -translate-y-1/2 size-4 text-muted-foreground pointer-events-none" }),
5824
- /* @__PURE__ */ jsx41(
5782
+ /* @__PURE__ */ jsx40(Field, { label: t2("common.username"), htmlFor: "reg-user", children: /* @__PURE__ */ jsxs26("div", { className: "relative", children: [
5783
+ /* @__PURE__ */ jsx40(User, { className: "absolute left-2.5 top-1/2 -translate-y-1/2 size-4 text-muted-foreground pointer-events-none" }),
5784
+ /* @__PURE__ */ jsx40(
5825
5785
  Input,
5826
5786
  {
5827
5787
  id: "reg-user",
@@ -5834,7 +5794,7 @@ function Auth({ onLogin }) {
5834
5794
  }
5835
5795
  )
5836
5796
  ] }) }),
5837
- /* @__PURE__ */ jsx41(Field, { label: t2("common.password"), htmlFor: "reg-pass", children: /* @__PURE__ */ jsx41(
5797
+ /* @__PURE__ */ jsx40(Field, { label: t2("common.password"), htmlFor: "reg-pass", children: /* @__PURE__ */ jsx40(
5838
5798
  PasswordInput2,
5839
5799
  {
5840
5800
  id: "reg-pass",
@@ -5844,12 +5804,12 @@ function Auth({ onLogin }) {
5844
5804
  disabled: loading
5845
5805
  }
5846
5806
  ) }),
5847
- /* @__PURE__ */ jsx41(
5807
+ /* @__PURE__ */ jsx40(
5848
5808
  Field,
5849
5809
  {
5850
5810
  label: t2("common.confirmPassword"),
5851
5811
  htmlFor: "reg-confirm",
5852
- children: /* @__PURE__ */ jsx41(
5812
+ children: /* @__PURE__ */ jsx40(
5853
5813
  PasswordInput2,
5854
5814
  {
5855
5815
  id: "reg-confirm",
@@ -5860,14 +5820,14 @@ function Auth({ onLogin }) {
5860
5820
  )
5861
5821
  }
5862
5822
  ),
5863
- /* @__PURE__ */ jsx41(
5823
+ /* @__PURE__ */ jsx40(
5864
5824
  Button,
5865
5825
  {
5866
5826
  type: "submit",
5867
5827
  className: "w-full bg-accent-brand hover:bg-accent-brand/90 text-background font-bold h-10",
5868
5828
  disabled: loading,
5869
5829
  children: loading ? t2("common.loading") : /* @__PURE__ */ jsxs26("span", { className: "flex items-center gap-2", children: [
5870
- /* @__PURE__ */ jsx41(Shield, { className: "size-4" }),
5830
+ /* @__PURE__ */ jsx40(Shield, { className: "size-4" }),
5871
5831
  t2("auth.signUp")
5872
5832
  ] })
5873
5833
  }
@@ -5875,11 +5835,11 @@ function Auth({ onLogin }) {
5875
5835
  ]
5876
5836
  }
5877
5837
  ),
5878
- /* @__PURE__ */ jsx41(Separator, {}),
5879
- /* @__PURE__ */ jsx41("p", { className: "text-center text-xs text-muted-foreground", children: view === "login" && registrationAllowed ? /* @__PURE__ */ jsxs26(Fragment5, { children: [
5838
+ /* @__PURE__ */ jsx40(Separator, {}),
5839
+ /* @__PURE__ */ jsx40("p", { className: "text-center text-xs text-muted-foreground", children: view === "login" && registrationAllowed ? /* @__PURE__ */ jsxs26(Fragment5, { children: [
5880
5840
  t2("auth.noAccount", "Don't have an account?"),
5881
5841
  " ",
5882
- /* @__PURE__ */ jsx41(
5842
+ /* @__PURE__ */ jsx40(
5883
5843
  "button",
5884
5844
  {
5885
5845
  onClick: () => switchView("register"),
@@ -5890,7 +5850,7 @@ function Auth({ onLogin }) {
5890
5850
  ] }) : view === "register" && passwordLoginAllowed && !firstUser ? /* @__PURE__ */ jsxs26(Fragment5, { children: [
5891
5851
  t2("auth.hasAccount", "Already have an account?"),
5892
5852
  " ",
5893
- /* @__PURE__ */ jsx41(
5853
+ /* @__PURE__ */ jsx40(
5894
5854
  "button",
5895
5855
  {
5896
5856
  onClick: () => switchView("login"),
@@ -5899,7 +5859,7 @@ function Auth({ onLogin }) {
5899
5859
  }
5900
5860
  )
5901
5861
  ] }) : null }),
5902
- /* @__PURE__ */ jsx41(
5862
+ /* @__PURE__ */ jsx40(
5903
5863
  LanguageRow,
5904
5864
  {
5905
5865
  label: t2("common.language"),
@@ -5915,10 +5875,10 @@ function Auth({ onLogin }) {
5915
5875
 
5916
5876
  // src/ui/components/sonner.tsx
5917
5877
  import { Toaster as Sonner } from "sonner";
5918
- import { jsx as jsx42 } from "react/jsx-runtime";
5878
+ import { jsx as jsx41 } from "react/jsx-runtime";
5919
5879
  var Toaster = ({ ...props }) => {
5920
5880
  const { theme: theme2 = "system" } = useTheme();
5921
- return /* @__PURE__ */ jsx42(
5881
+ return /* @__PURE__ */ jsx41(
5922
5882
  Sonner,
5923
5883
  {
5924
5884
  theme: theme2,
@@ -5956,7 +5916,7 @@ var Toaster = ({ ...props }) => {
5956
5916
 
5957
5917
  // src/ui/components/FullScreenAppWrapper.tsx
5958
5918
  import { useTranslation as useTranslation12 } from "react-i18next";
5959
- import { Fragment as Fragment6, jsx as jsx43, jsxs as jsxs27 } from "react/jsx-runtime";
5919
+ import { Fragment as Fragment6, jsx as jsx42, jsxs as jsxs27 } from "react/jsx-runtime";
5960
5920
  var FullScreenAppWrapper = ({
5961
5921
  hostId,
5962
5922
  children
@@ -6060,17 +6020,17 @@ var FullScreenAppWrapper = ({
6060
6020
  window.location.reload();
6061
6021
  };
6062
6022
  if (authLoading) {
6063
- return /* @__PURE__ */ jsx43("div", { className: "relative w-full h-screen overflow-hidden", children: /* @__PURE__ */ jsx43(ConnectionScreen, { status: "connecting", message: t2("common.loading") }) });
6023
+ return /* @__PURE__ */ jsx42("div", { className: "relative w-full h-screen overflow-hidden", children: /* @__PURE__ */ jsx42(ConnectionScreen, { status: "connecting", message: t2("common.loading") }) });
6064
6024
  }
6065
6025
  if (!isAuthenticated) {
6066
- return /* @__PURE__ */ jsx43(SidebarProvider, { children: /* @__PURE__ */ jsx43(TabProvider, { children: /* @__PURE__ */ jsx43(Fragment6, { children: /* @__PURE__ */ jsxs27(
6026
+ return /* @__PURE__ */ jsx42(SidebarProvider, { children: /* @__PURE__ */ jsx42(TabProvider, { children: /* @__PURE__ */ jsx42(Fragment6, { children: /* @__PURE__ */ jsxs27(
6067
6027
  "div",
6068
6028
  {
6069
6029
  className: "w-full h-screen overflow-hidden flex items-center justify-center",
6070
6030
  style: { backgroundColor: "var(--bg-base)" },
6071
6031
  children: [
6072
- /* @__PURE__ */ jsx43(Auth, { onLogin: handleAuthSuccess }),
6073
- /* @__PURE__ */ jsx43(
6032
+ /* @__PURE__ */ jsx42(Auth, { onLogin: handleAuthSuccess }),
6033
+ /* @__PURE__ */ jsx42(
6074
6034
  Toaster,
6075
6035
  {
6076
6036
  position: "bottom-right",
@@ -6085,7 +6045,7 @@ var FullScreenAppWrapper = ({
6085
6045
  ) }) }) });
6086
6046
  }
6087
6047
  const phase = loading ? "loading" : !hostConfig && hostId ? "not-found" : "ready";
6088
- return /* @__PURE__ */ jsx43(SidebarProvider, { children: /* @__PURE__ */ jsx43(TabProvider, { children: /* @__PURE__ */ jsx43(Fragment6, { children: /* @__PURE__ */ jsx43(
6048
+ return /* @__PURE__ */ jsx42(SidebarProvider, { children: /* @__PURE__ */ jsx42(TabProvider, { children: /* @__PURE__ */ jsx42(Fragment6, { children: /* @__PURE__ */ jsx42(
6089
6049
  "div",
6090
6050
  {
6091
6051
  className: "w-full h-screen overflow-hidden",
@@ -6098,7 +6058,7 @@ var FullScreenAppWrapper = ({
6098
6058
  // src/ui/ssh/dialogs/TOTPDialog.tsx
6099
6059
  import { useEffect as useEffect12, useState as useState15 } from "react";
6100
6060
  import { useTranslation as useTranslation13 } from "react-i18next";
6101
- import { jsx as jsx44, jsxs as jsxs28 } from "react/jsx-runtime";
6061
+ import { jsx as jsx43, jsxs as jsxs28 } from "react/jsx-runtime";
6102
6062
  var CODE_INPUT = "rounded-none bg-muted/50 border-border text-center text-sm tracking-widest";
6103
6063
  function TOTPDialog({
6104
6064
  isOpen,
@@ -6138,24 +6098,24 @@ function TOTPDialog({
6138
6098
  };
6139
6099
  const title = isPush ? t2("sshAuth.mfaPushRequired") : isMenu ? t2("sshAuth.mfaPromptRequired") : t2("sshAuth.totpRequired");
6140
6100
  const label = prompt || (isTotp ? t2("sshAuth.totpCodeLabel") : void 0);
6141
- const cancel = /* @__PURE__ */ jsx44("button", { type: "button", onClick: onCancel, className: PROMPT_BUTTON, children: t2("common.cancel") });
6142
- return /* @__PURE__ */ jsx44(
6101
+ const cancel = /* @__PURE__ */ jsx43("button", { type: "button", onClick: onCancel, className: PROMPT_BUTTON, children: t2("common.cancel") });
6102
+ return /* @__PURE__ */ jsx43(
6143
6103
  PanePrompt,
6144
6104
  {
6145
6105
  open: true,
6146
6106
  layer: "connection",
6147
6107
  backgroundColor,
6148
- icon: /* @__PURE__ */ jsx44(Shield, { className: "size-4" }),
6108
+ icon: /* @__PURE__ */ jsx43(Shield, { className: "size-4" }),
6149
6109
  title,
6150
6110
  description: label,
6151
6111
  children: showWaiting ? /* @__PURE__ */ jsxs28("div", { className: "flex flex-col gap-3", children: [
6152
6112
  /* @__PURE__ */ jsxs28("div", { className: "flex items-center gap-3 py-1", children: [
6153
- /* @__PURE__ */ jsx44(LoaderCircle, { className: "size-4 animate-spin text-accent-brand shrink-0" }),
6154
- /* @__PURE__ */ jsx44("p", { className: "text-xs text-muted-foreground", children: t2("sshAuth.mfaWaitingApproval") })
6113
+ /* @__PURE__ */ jsx43(LoaderCircle, { className: "size-4 animate-spin text-accent-brand shrink-0" }),
6114
+ /* @__PURE__ */ jsx43("p", { className: "text-xs text-muted-foreground", children: t2("sshAuth.mfaWaitingApproval") })
6155
6115
  ] }),
6156
- /* @__PURE__ */ jsx44("div", { className: "flex justify-end gap-2", children: cancel })
6116
+ /* @__PURE__ */ jsx43("div", { className: "flex justify-end gap-2", children: cancel })
6157
6117
  ] }) : /* @__PURE__ */ jsxs28("form", { onSubmit: handleSubmit, className: "flex flex-col gap-3", children: [
6158
- isPush ? null : isMenu ? /* @__PURE__ */ jsx44(
6118
+ isPush ? null : isMenu ? /* @__PURE__ */ jsx43(
6159
6119
  Input,
6160
6120
  {
6161
6121
  id: "totpCode",
@@ -6165,7 +6125,7 @@ function TOTPDialog({
6165
6125
  placeholder: t2("sshAuth.mfaMenuPlaceholder"),
6166
6126
  className: CODE_INPUT
6167
6127
  }
6168
- ) : allowsPushKeyword ? /* @__PURE__ */ jsx44(
6128
+ ) : allowsPushKeyword ? /* @__PURE__ */ jsx43(
6169
6129
  Input,
6170
6130
  {
6171
6131
  id: "totpCode",
@@ -6175,7 +6135,7 @@ function TOTPDialog({
6175
6135
  placeholder: t2("sshAuth.mfaCodeOrPushPlaceholder"),
6176
6136
  className: CODE_INPUT
6177
6137
  }
6178
- ) : /* @__PURE__ */ jsx44(
6138
+ ) : /* @__PURE__ */ jsx43(
6179
6139
  Input,
6180
6140
  {
6181
6141
  id: "totpCode",
@@ -6191,7 +6151,7 @@ function TOTPDialog({
6191
6151
  ),
6192
6152
  /* @__PURE__ */ jsxs28("div", { className: "flex justify-end gap-2", children: [
6193
6153
  cancel,
6194
- /* @__PURE__ */ jsx44("button", { type: "submit", className: PROMPT_PRIMARY_BUTTON, children: isPush ? t2("sshAuth.mfaSendRequest") : t2("sshAuth.totpVerify") })
6154
+ /* @__PURE__ */ jsx43("button", { type: "submit", className: PROMPT_PRIMARY_BUTTON, children: isPush ? t2("sshAuth.mfaSendRequest") : t2("sshAuth.totpVerify") })
6195
6155
  ] })
6196
6156
  ] })
6197
6157
  }
@@ -6202,12 +6162,12 @@ function TOTPDialog({
6202
6162
  import { useState as useState17 } from "react";
6203
6163
 
6204
6164
  // src/ui/components/tabs.tsx
6205
- import { jsx as jsx45 } from "react/jsx-runtime";
6165
+ import { jsx as jsx44 } from "react/jsx-runtime";
6206
6166
  function Tabs({
6207
6167
  className,
6208
6168
  ...props
6209
6169
  }) {
6210
- return /* @__PURE__ */ jsx45(
6170
+ return /* @__PURE__ */ jsx44(
6211
6171
  Root23,
6212
6172
  {
6213
6173
  "data-slot": "tabs",
@@ -6220,7 +6180,7 @@ function TabsList({
6220
6180
  className,
6221
6181
  ...props
6222
6182
  }) {
6223
- return /* @__PURE__ */ jsx45(
6183
+ return /* @__PURE__ */ jsx44(
6224
6184
  List,
6225
6185
  {
6226
6186
  "data-slot": "tabs-list",
@@ -6236,7 +6196,7 @@ function TabsTrigger({
6236
6196
  className,
6237
6197
  ...props
6238
6198
  }) {
6239
- return /* @__PURE__ */ jsx45(
6199
+ return /* @__PURE__ */ jsx44(
6240
6200
  Trigger3,
6241
6201
  {
6242
6202
  "data-slot": "tabs-trigger",
@@ -6252,7 +6212,7 @@ function TabsContent({
6252
6212
  className,
6253
6213
  ...props
6254
6214
  }) {
6255
- return /* @__PURE__ */ jsx45(
6215
+ return /* @__PURE__ */ jsx44(
6256
6216
  Content,
6257
6217
  {
6258
6218
  "data-slot": "tabs-content",
@@ -20399,25 +20359,25 @@ var gutterView = /* @__PURE__ */ ViewPlugin.fromClass(class {
20399
20359
  for (let b of line.type) {
20400
20360
  if (b.type == BlockType.Text && first) {
20401
20361
  advanceCursor(lineClasses, classSet, b.from);
20402
- for (let cx2 of contexts)
20403
- cx2.line(this.view, b, classSet);
20362
+ for (let cx of contexts)
20363
+ cx.line(this.view, b, classSet);
20404
20364
  first = false;
20405
20365
  } else if (b.widget) {
20406
- for (let cx2 of contexts)
20407
- cx2.widget(this.view, b);
20366
+ for (let cx of contexts)
20367
+ cx.widget(this.view, b);
20408
20368
  }
20409
20369
  }
20410
20370
  } else if (line.type == BlockType.Text) {
20411
20371
  advanceCursor(lineClasses, classSet, line.from);
20412
- for (let cx2 of contexts)
20413
- cx2.line(this.view, line, classSet);
20372
+ for (let cx of contexts)
20373
+ cx.line(this.view, line, classSet);
20414
20374
  } else if (line.widget) {
20415
- for (let cx2 of contexts)
20416
- cx2.widget(this.view, line);
20375
+ for (let cx of contexts)
20376
+ cx.widget(this.view, line);
20417
20377
  }
20418
20378
  }
20419
- for (let cx2 of contexts)
20420
- cx2.finish();
20379
+ for (let cx of contexts)
20380
+ cx.finish();
20421
20381
  if (detach) {
20422
20382
  this.view.scrollDOM.insertBefore(this.dom, after);
20423
20383
  if (this.domAfter)
@@ -23371,12 +23331,12 @@ var ParseContext = class _ParseContext {
23371
23331
  let parser = {
23372
23332
  parsedPos: from,
23373
23333
  advance() {
23374
- let cx2 = currentContext;
23375
- if (cx2) {
23334
+ let cx = currentContext;
23335
+ if (cx) {
23376
23336
  for (let r of ranges)
23377
- cx2.tempSkipped.push(r);
23337
+ cx.tempSkipped.push(r);
23378
23338
  if (until)
23379
- cx2.scheduleOn = cx2.scheduleOn ? Promise.all([cx2.scheduleOn, until]) : until;
23339
+ cx.scheduleOn = cx.scheduleOn ? Promise.all([cx.scheduleOn, until]) : until;
23380
23340
  }
23381
23341
  this.parsedPos = to;
23382
23342
  return new Tree(NodeType.none, [], [], to - from);
@@ -23475,15 +23435,15 @@ var parseWorker = /* @__PURE__ */ ViewPlugin.fromClass(class ParseWorker {
23475
23435
  this.scheduleWork();
23476
23436
  }
23477
23437
  update(update) {
23478
- let cx2 = this.view.state.field(Language.state).context;
23479
- if (cx2.updateViewport(update.view.viewport) || this.view.viewport.to > cx2.treeLen)
23438
+ let cx = this.view.state.field(Language.state).context;
23439
+ if (cx.updateViewport(update.view.viewport) || this.view.viewport.to > cx.treeLen)
23480
23440
  this.scheduleWork();
23481
23441
  if (update.docChanged || update.selectionSet) {
23482
23442
  if (this.view.hasFocus)
23483
23443
  this.chunkBudget += 50;
23484
23444
  this.scheduleWork();
23485
23445
  }
23486
- this.checkAsyncSchedule(cx2);
23446
+ this.checkAsyncSchedule(cx);
23487
23447
  }
23488
23448
  scheduleWork() {
23489
23449
  if (this.working)
@@ -23521,11 +23481,11 @@ var parseWorker = /* @__PURE__ */ ViewPlugin.fromClass(class ParseWorker {
23521
23481
  this.scheduleWork();
23522
23482
  this.checkAsyncSchedule(field.context);
23523
23483
  }
23524
- checkAsyncSchedule(cx2) {
23525
- if (cx2.scheduleOn) {
23484
+ checkAsyncSchedule(cx) {
23485
+ if (cx.scheduleOn) {
23526
23486
  this.workScheduled++;
23527
- cx2.scheduleOn.then(() => this.scheduleWork()).catch((err) => logException(this.view.state, err)).then(() => this.workScheduled--);
23528
- cx2.scheduleOn = null;
23487
+ cx.scheduleOn.then(() => this.scheduleWork()).catch((err) => logException(this.view.state, err)).then(() => this.workScheduled--);
23488
+ cx.scheduleOn = null;
23529
23489
  }
23530
23490
  }
23531
23491
  destroy() {
@@ -23673,7 +23633,7 @@ var IndentContext = class {
23673
23633
  }
23674
23634
  };
23675
23635
  var indentNodeProp = /* @__PURE__ */ new NodeProp();
23676
- function syntaxIndentation(cx2, ast, pos) {
23636
+ function syntaxIndentation(cx, ast, pos) {
23677
23637
  let stack = ast.resolveStack(pos);
23678
23638
  let inner = ast.resolveInner(pos, -1).resolve(pos, 0).enterUnfinishedNodesBefore(pos);
23679
23639
  if (inner != stack.node) {
@@ -23683,18 +23643,18 @@ function syntaxIndentation(cx2, ast, pos) {
23683
23643
  for (let i2 = add2.length - 1; i2 >= 0; i2--)
23684
23644
  stack = { node: add2[i2], next: stack };
23685
23645
  }
23686
- return indentFor(stack, cx2, pos);
23646
+ return indentFor(stack, cx, pos);
23687
23647
  }
23688
- function indentFor(stack, cx2, pos) {
23648
+ function indentFor(stack, cx, pos) {
23689
23649
  for (let cur2 = stack; cur2; cur2 = cur2.next) {
23690
23650
  let strategy = indentStrategy(cur2.node);
23691
23651
  if (strategy)
23692
- return strategy(TreeIndentContext.create(cx2, pos, cur2));
23652
+ return strategy(TreeIndentContext.create(cx, pos, cur2));
23693
23653
  }
23694
23654
  return 0;
23695
23655
  }
23696
- function ignoreClosed(cx2) {
23697
- return cx2.pos == cx2.options.simulateBreak && cx2.options.simulateDoubleBreak;
23656
+ function ignoreClosed(cx) {
23657
+ return cx.pos == cx.options.simulateBreak && cx.options.simulateDoubleBreak;
23698
23658
  }
23699
23659
  function indentStrategy(tree) {
23700
23660
  let strategy = tree.type.prop(indentNodeProp);
@@ -23703,7 +23663,7 @@ function indentStrategy(tree) {
23703
23663
  let first = tree.firstChild, close;
23704
23664
  if (first && (close = first.type.prop(NodeProp.closedBy))) {
23705
23665
  let last2 = tree.lastChild, closed = last2 && close.indexOf(last2.name) > -1;
23706
- return (cx2) => delimitedStrategy(cx2, true, 1, void 0, closed && !ignoreClosed(cx2) ? last2.from : void 0);
23666
+ return (cx) => delimitedStrategy(cx, true, 1, void 0, closed && !ignoreClosed(cx) ? last2.from : void 0);
23707
23667
  }
23708
23668
  return tree.parent == null ? topIndent : null;
23709
23669
  }
@@ -25511,8 +25471,8 @@ function newlineAndIndent(atEof) {
25511
25471
  let explode = !atEof && from == to && isBetweenBrackets(state, from);
25512
25472
  if (atEof)
25513
25473
  from = to = (to <= line.to ? line : state.doc.lineAt(to)).to;
25514
- let cx2 = new IndentContext(state, { simulateBreak: from, simulateDoubleBreak: !!explode });
25515
- let indent = getIndentation(cx2, from);
25474
+ let cx = new IndentContext(state, { simulateBreak: from, simulateDoubleBreak: !!explode });
25475
+ let indent = getIndentation(cx, from);
25516
25476
  if (indent == null)
25517
25477
  indent = countColumn(/^\s*/.exec(state.doc.lineAt(from).text)[0], state.tabSize);
25518
25478
  while (to < line.to && /\s/.test(line.text[to - line.from]))
@@ -25523,7 +25483,7 @@ function newlineAndIndent(atEof) {
25523
25483
  from = line.from;
25524
25484
  let insert2 = ["", indentString(state, indent)];
25525
25485
  if (explode)
25526
- insert2.push(indentString(state, cx2.lineIndent(line.from, -1)));
25486
+ insert2.push(indentString(state, cx.lineIndent(line.from, -1)));
25527
25487
  return {
25528
25488
  changes: { from, to, insert: Text.of(insert2) },
25529
25489
  range: EditorSelection.cursor(from + 1 + insert2[1].length)
@@ -29539,7 +29499,7 @@ ReactCodeMirror.displayName = "CodeMirror";
29539
29499
  var esm_default = ReactCodeMirror;
29540
29500
 
29541
29501
  // src/ui/ssh/dialogs/SSHAuthDialog.tsx
29542
- import { jsx as jsx46, jsxs as jsxs29 } from "react/jsx-runtime";
29502
+ import { jsx as jsx45, jsxs as jsxs29 } from "react/jsx-runtime";
29543
29503
  function SSHAuthDialog({
29544
29504
  isOpen,
29545
29505
  reason,
@@ -29610,15 +29570,15 @@ function SSHAuthDialog({
29610
29570
  }
29611
29571
  }
29612
29572
  };
29613
- return /* @__PURE__ */ jsx46(
29573
+ return /* @__PURE__ */ jsx45(
29614
29574
  PanePrompt,
29615
29575
  {
29616
29576
  open: true,
29617
29577
  layer: "connection",
29618
29578
  backgroundColor,
29619
- icon: /* @__PURE__ */ jsx46(Shield, { className: "size-4" }),
29579
+ icon: /* @__PURE__ */ jsx45(Shield, { className: "size-4" }),
29620
29580
  title: t2("auth.sshAuthenticationRequired"),
29621
- description: /* @__PURE__ */ jsx46("span", { className: "font-mono", children: hostDisplay }),
29581
+ description: /* @__PURE__ */ jsx45("span", { className: "font-mono", children: hostDisplay }),
29622
29582
  className: "max-w-xl",
29623
29583
  children: /* @__PURE__ */ jsxs29("form", { onSubmit: handleSubmit, children: [
29624
29584
  /* @__PURE__ */ jsxs29("div", { className: "flex flex-col gap-3", children: [
@@ -29627,21 +29587,21 @@ function SSHAuthDialog({
29627
29587
  {
29628
29588
  className: `flex items-start gap-3 p-3 border ${reason === "auth_failed" ? "border-destructive/20 bg-destructive/10" : "border-border bg-muted/10"}`,
29629
29589
  children: [
29630
- /* @__PURE__ */ jsx46(
29590
+ /* @__PURE__ */ jsx45(
29631
29591
  CircleAlert,
29632
29592
  {
29633
29593
  className: `size-4 shrink-0 mt-0.5 ${reason === "auth_failed" ? "text-destructive" : "text-accent-brand"}`
29634
29594
  }
29635
29595
  ),
29636
29596
  /* @__PURE__ */ jsxs29("div", { children: [
29637
- /* @__PURE__ */ jsx46(
29597
+ /* @__PURE__ */ jsx45(
29638
29598
  "p",
29639
29599
  {
29640
29600
  className: `text-[10px] font-bold uppercase tracking-widest ${reason === "auth_failed" ? "text-destructive" : ""}`,
29641
29601
  children: getReasonMessage()
29642
29602
  }
29643
29603
  ),
29644
- /* @__PURE__ */ jsx46(
29604
+ /* @__PURE__ */ jsx45(
29645
29605
  "p",
29646
29606
  {
29647
29607
  className: `text-xs mt-1 ${reason === "auth_failed" ? "text-destructive/80" : "text-muted-foreground"}`,
@@ -29659,7 +29619,7 @@ function SSHAuthDialog({
29659
29619
  onValueChange: (v) => setAuthTab(v),
29660
29620
  children: [
29661
29621
  /* @__PURE__ */ jsxs29(TabsList, { className: "w-full rounded-none", children: [
29662
- /* @__PURE__ */ jsx46(
29622
+ /* @__PURE__ */ jsx45(
29663
29623
  TabsTrigger,
29664
29624
  {
29665
29625
  value: "password",
@@ -29667,7 +29627,7 @@ function SSHAuthDialog({
29667
29627
  children: t2("credentials.password")
29668
29628
  }
29669
29629
  ),
29670
- /* @__PURE__ */ jsx46(
29630
+ /* @__PURE__ */ jsx45(
29671
29631
  TabsTrigger,
29672
29632
  {
29673
29633
  value: "key",
@@ -29677,8 +29637,8 @@ function SSHAuthDialog({
29677
29637
  )
29678
29638
  ] }),
29679
29639
  /* @__PURE__ */ jsxs29(TabsContent, { value: "password", className: "mt-3 flex flex-col gap-2", children: [
29680
- /* @__PURE__ */ jsx46(Label, { className: "text-[10px] font-bold uppercase tracking-widest text-muted-foreground", children: t2("credentials.password") }),
29681
- /* @__PURE__ */ jsx46(
29640
+ /* @__PURE__ */ jsx45(Label, { className: "text-[10px] font-bold uppercase tracking-widest text-muted-foreground", children: t2("credentials.password") }),
29641
+ /* @__PURE__ */ jsx45(
29682
29642
  PasswordInput,
29683
29643
  {
29684
29644
  placeholder: t2("placeholders.enterPassword"),
@@ -29688,13 +29648,13 @@ function SSHAuthDialog({
29688
29648
  className: "rounded-none bg-muted/50 border-border text-xs"
29689
29649
  }
29690
29650
  ),
29691
- /* @__PURE__ */ jsx46("p", { className: "text-[10px] text-muted-foreground", children: t2("auth.sshPasswordDescription") })
29651
+ /* @__PURE__ */ jsx45("p", { className: "text-[10px] text-muted-foreground", children: t2("auth.sshPasswordDescription") })
29692
29652
  ] }),
29693
29653
  /* @__PURE__ */ jsxs29(TabsContent, { value: "key", className: "mt-3 flex flex-col gap-3", children: [
29694
29654
  /* @__PURE__ */ jsxs29("div", { className: "flex flex-col gap-2", children: [
29695
- /* @__PURE__ */ jsx46(Label, { className: "text-[10px] font-bold uppercase tracking-widest text-muted-foreground", children: t2("credentials.sshPrivateKey") }),
29655
+ /* @__PURE__ */ jsx45(Label, { className: "text-[10px] font-bold uppercase tracking-widest text-muted-foreground", children: t2("credentials.sshPrivateKey") }),
29696
29656
  /* @__PURE__ */ jsxs29("div", { className: "relative", children: [
29697
- /* @__PURE__ */ jsx46(
29657
+ /* @__PURE__ */ jsx45(
29698
29658
  "input",
29699
29659
  {
29700
29660
  id: "key-upload",
@@ -29711,13 +29671,13 @@ function SSHAuthDialog({
29711
29671
  variant: "outline",
29712
29672
  className: "w-full justify-start rounded-none text-[10px] font-bold uppercase tracking-widest border-border",
29713
29673
  children: [
29714
- /* @__PURE__ */ jsx46(Upload, { className: "size-3.5 mr-2" }),
29715
- /* @__PURE__ */ jsx46("span", { className: "truncate", children: t2("credentials.uploadPrivateKeyFile") })
29674
+ /* @__PURE__ */ jsx45(Upload, { className: "size-3.5 mr-2" }),
29675
+ /* @__PURE__ */ jsx45("span", { className: "truncate", children: t2("credentials.uploadPrivateKeyFile") })
29716
29676
  ]
29717
29677
  }
29718
29678
  )
29719
29679
  ] }),
29720
- /* @__PURE__ */ jsx46(
29680
+ /* @__PURE__ */ jsx45(
29721
29681
  esm_default,
29722
29682
  {
29723
29683
  value: sshKey,
@@ -29754,7 +29714,7 @@ function SSHAuthDialog({
29754
29714
  t2("common.optional"),
29755
29715
  ")"
29756
29716
  ] }),
29757
- /* @__PURE__ */ jsx46(
29717
+ /* @__PURE__ */ jsx45(
29758
29718
  PasswordInput,
29759
29719
  {
29760
29720
  placeholder: t2("placeholders.keyPassword"),
@@ -29763,7 +29723,7 @@ function SSHAuthDialog({
29763
29723
  className: "rounded-none bg-muted/50 border-border text-xs"
29764
29724
  }
29765
29725
  ),
29766
- /* @__PURE__ */ jsx46("p", { className: "text-[10px] text-muted-foreground", children: t2("auth.sshKeyPasswordDescription") })
29726
+ /* @__PURE__ */ jsx45("p", { className: "text-[10px] text-muted-foreground", children: t2("auth.sshKeyPasswordDescription") })
29767
29727
  ] }),
29768
29728
  /* @__PURE__ */ jsxs29("div", { className: "flex flex-col gap-2", children: [
29769
29729
  /* @__PURE__ */ jsxs29(Label, { className: "text-[10px] font-bold uppercase tracking-widest text-muted-foreground", children: [
@@ -29772,7 +29732,7 @@ function SSHAuthDialog({
29772
29732
  t2("common.optional"),
29773
29733
  ")"
29774
29734
  ] }),
29775
- /* @__PURE__ */ jsx46(
29735
+ /* @__PURE__ */ jsx45(
29776
29736
  PasswordInput,
29777
29737
  {
29778
29738
  placeholder: t2("placeholders.enterPassword"),
@@ -29788,7 +29748,7 @@ function SSHAuthDialog({
29788
29748
  )
29789
29749
  ] }),
29790
29750
  /* @__PURE__ */ jsxs29("div", { className: "flex justify-end gap-2 pt-3", children: [
29791
- /* @__PURE__ */ jsx46(
29751
+ /* @__PURE__ */ jsx45(
29792
29752
  "button",
29793
29753
  {
29794
29754
  type: "button",
@@ -29798,7 +29758,7 @@ function SSHAuthDialog({
29798
29758
  children: t2("common.cancel")
29799
29759
  }
29800
29760
  ),
29801
- /* @__PURE__ */ jsx46(
29761
+ /* @__PURE__ */ jsx45(
29802
29762
  "button",
29803
29763
  {
29804
29764
  type: "submit",
@@ -29817,7 +29777,7 @@ function SSHAuthDialog({
29817
29777
  import { useState as useState18 } from "react";
29818
29778
  import { useTranslation as useTranslation15 } from "react-i18next";
29819
29779
  import { toast as toast3 } from "sonner";
29820
- import { jsx as jsx47, jsxs as jsxs30 } from "react/jsx-runtime";
29780
+ import { jsx as jsx46, jsxs as jsxs30 } from "react/jsx-runtime";
29821
29781
  function BrowserSignInDialog({
29822
29782
  isOpen,
29823
29783
  label,
@@ -29841,24 +29801,24 @@ function BrowserSignInDialog({
29841
29801
  toast3.error(t2("common.copyFailed"));
29842
29802
  }
29843
29803
  };
29844
- return /* @__PURE__ */ jsx47(
29804
+ return /* @__PURE__ */ jsx46(
29845
29805
  PanePrompt,
29846
29806
  {
29847
29807
  open: true,
29848
29808
  layer: "connection",
29849
29809
  backgroundColor,
29850
- icon: /* @__PURE__ */ jsx47(Shield, { className: "size-4" }),
29810
+ icon: /* @__PURE__ */ jsx46(Shield, { className: "size-4" }),
29851
29811
  title: t2("sshAuth.browserSignInRequired", { provider: label }),
29852
29812
  className: "max-w-md",
29853
29813
  children: /* @__PURE__ */ jsxs30("div", { className: "flex flex-col gap-3", children: [
29854
29814
  code2 && code2 !== "N/A" && /* @__PURE__ */ jsxs30("div", { className: "flex flex-col gap-1.5", children: [
29855
- /* @__PURE__ */ jsx47("p", { className: "text-[10px] font-bold uppercase tracking-widest text-muted-foreground", children: t2("sshAuth.browserSignInCode") }),
29856
- /* @__PURE__ */ jsx47("div", { className: "border border-border bg-muted/10 p-4 text-center", children: /* @__PURE__ */ jsx47("div", { className: "text-2xl font-mono font-bold tracking-wider text-accent-brand", children: code2 }) })
29815
+ /* @__PURE__ */ jsx46("p", { className: "text-[10px] font-bold uppercase tracking-widest text-muted-foreground", children: t2("sshAuth.browserSignInCode") }),
29816
+ /* @__PURE__ */ jsx46("div", { className: "border border-border bg-muted/10 p-4 text-center", children: /* @__PURE__ */ jsx46("div", { className: "text-2xl font-mono font-bold tracking-wider text-accent-brand", children: code2 }) })
29857
29817
  ] }),
29858
29818
  /* @__PURE__ */ jsxs30("div", { className: "flex flex-col gap-1.5", children: [
29859
- /* @__PURE__ */ jsx47("p", { className: "text-[10px] font-bold uppercase tracking-widest text-muted-foreground", children: t2("sshAuth.browserSignInUrl") }),
29819
+ /* @__PURE__ */ jsx46("p", { className: "text-[10px] font-bold uppercase tracking-widest text-muted-foreground", children: t2("sshAuth.browserSignInUrl") }),
29860
29820
  /* @__PURE__ */ jsxs30("div", { className: "flex gap-2", children: [
29861
- /* @__PURE__ */ jsx47(
29821
+ /* @__PURE__ */ jsx46(
29862
29822
  Input,
29863
29823
  {
29864
29824
  type: "text",
@@ -29867,7 +29827,7 @@ function BrowserSignInDialog({
29867
29827
  className: "rounded-none bg-muted/50 border-border text-xs font-mono flex-1"
29868
29828
  }
29869
29829
  ),
29870
- /* @__PURE__ */ jsx47(
29830
+ /* @__PURE__ */ jsx46(
29871
29831
  "button",
29872
29832
  {
29873
29833
  type: "button",
@@ -29875,13 +29835,13 @@ function BrowserSignInDialog({
29875
29835
  className: `${PROMPT_BUTTON} h-9 w-9 shrink-0 px-0`,
29876
29836
  title: t2("common.copy"),
29877
29837
  "aria-label": t2("common.copy"),
29878
- children: copied ? /* @__PURE__ */ jsx47(Check, { className: "size-4 text-accent-brand" }) : /* @__PURE__ */ jsx47(Copy, { className: "size-4" })
29838
+ children: copied ? /* @__PURE__ */ jsx46(Check, { className: "size-4 text-accent-brand" }) : /* @__PURE__ */ jsx46(Copy, { className: "size-4" })
29879
29839
  }
29880
29840
  )
29881
29841
  ] })
29882
29842
  ] }),
29883
29843
  /* @__PURE__ */ jsxs30("div", { className: "flex flex-wrap justify-end gap-2", children: [
29884
- /* @__PURE__ */ jsx47(
29844
+ /* @__PURE__ */ jsx46(
29885
29845
  "button",
29886
29846
  {
29887
29847
  type: "button",
@@ -29890,7 +29850,7 @@ function BrowserSignInDialog({
29890
29850
  children: t2("common.cancel")
29891
29851
  }
29892
29852
  ),
29893
- /* @__PURE__ */ jsx47("button", { type: "button", onClick: onContinue, className: PROMPT_BUTTON, children: t2("sshAuth.browserSignInContinue") }),
29853
+ /* @__PURE__ */ jsx46("button", { type: "button", onClick: onContinue, className: PROMPT_BUTTON, children: t2("sshAuth.browserSignInContinue") }),
29894
29854
  /* @__PURE__ */ jsxs30(
29895
29855
  "button",
29896
29856
  {
@@ -29898,7 +29858,7 @@ function BrowserSignInDialog({
29898
29858
  onClick: onOpenUrl,
29899
29859
  className: PROMPT_PRIMARY_BUTTON,
29900
29860
  children: [
29901
- /* @__PURE__ */ jsx47(ExternalLink, { className: "size-3.5" }),
29861
+ /* @__PURE__ */ jsx46(ExternalLink, { className: "size-3.5" }),
29902
29862
  t2("sshAuth.browserSignInOpen")
29903
29863
  ]
29904
29864
  }
@@ -29930,7 +29890,7 @@ var FOLDER_COLORS = [
29930
29890
 
29931
29891
  // src/ui/components/manager-card.tsx
29932
29892
  import { useTranslation as useTranslation16 } from "react-i18next";
29933
- import { jsx as jsx48, jsxs as jsxs31 } from "react/jsx-runtime";
29893
+ import { jsx as jsx47, jsxs as jsxs31 } from "react/jsx-runtime";
29934
29894
  function ManagerCardShell({
29935
29895
  title,
29936
29896
  icon,
@@ -29943,7 +29903,7 @@ function ManagerCardShell({
29943
29903
  headerExtra
29944
29904
  }) {
29945
29905
  const { t: t2 } = useTranslation16();
29946
- return /* @__PURE__ */ jsx48(
29906
+ return /* @__PURE__ */ jsx47(
29947
29907
  MetricCard,
29948
29908
  {
29949
29909
  title,
@@ -29951,21 +29911,21 @@ function ManagerCardShell({
29951
29911
  scroll: true,
29952
29912
  action: /* @__PURE__ */ jsxs31("div", { className: "flex items-center gap-1", children: [
29953
29913
  headerExtra,
29954
- /* @__PURE__ */ jsx48(
29914
+ /* @__PURE__ */ jsx47(
29955
29915
  "button",
29956
29916
  {
29957
29917
  onClick: onRefresh,
29958
29918
  className: "flex size-6 items-center justify-center text-muted-foreground transition-colors hover:text-foreground",
29959
29919
  title: t2("managerCard.refresh"),
29960
- children: /* @__PURE__ */ jsx48(RefreshCw, { className: `size-3 ${loading ? "animate-spin" : ""}` })
29920
+ children: /* @__PURE__ */ jsx47(RefreshCw, { className: `size-3 ${loading ? "animate-spin" : ""}` })
29961
29921
  }
29962
29922
  )
29963
29923
  ] }),
29964
29924
  children: error ? /* @__PURE__ */ jsxs31("div", { className: "flex flex-col items-center gap-2 py-6 text-center", children: [
29965
- /* @__PURE__ */ jsx48(TriangleAlert, { className: "size-6 text-warning" }),
29966
- /* @__PURE__ */ jsx48("span", { className: "text-xs text-muted-foreground", children: error.message }),
29967
- error.code === "SUDO_REQUIRED" && /* @__PURE__ */ jsx48("span", { className: "text-[10px] text-muted-foreground", children: t2("managerCard.sudoHint") }),
29968
- /* @__PURE__ */ jsx48(
29925
+ /* @__PURE__ */ jsx47(TriangleAlert, { className: "size-6 text-warning" }),
29926
+ /* @__PURE__ */ jsx47("span", { className: "text-xs text-muted-foreground", children: error.message }),
29927
+ error.code === "SUDO_REQUIRED" && /* @__PURE__ */ jsx47("span", { className: "text-[10px] text-muted-foreground", children: t2("managerCard.sudoHint") }),
29928
+ /* @__PURE__ */ jsx47(
29969
29929
  Button,
29970
29930
  {
29971
29931
  variant: "outline",
@@ -29975,7 +29935,7 @@ function ManagerCardShell({
29975
29935
  children: t2("managerCard.retry")
29976
29936
  }
29977
29937
  )
29978
- ] }) : empty2 ? /* @__PURE__ */ jsx48("div", { className: "flex items-center justify-center py-8 text-xs text-muted-foreground/50", children: emptyMessage ?? t2("managerCard.noData") }) : children
29938
+ ] }) : empty2 ? /* @__PURE__ */ jsx47("div", { className: "flex items-center justify-center py-8 text-xs text-muted-foreground/50", children: emptyMessage ?? t2("managerCard.noData") }) : children
29979
29939
  }
29980
29940
  );
29981
29941
  }
@@ -29989,8 +29949,8 @@ function ManagerSearch({
29989
29949
  const { t: t2 } = useTranslation16();
29990
29950
  return /* @__PURE__ */ jsxs31("div", { className: "mb-2 flex items-center gap-1.5", children: [
29991
29951
  /* @__PURE__ */ jsxs31("div", { className: "relative flex-1", children: [
29992
- /* @__PURE__ */ jsx48(Search, { className: "pointer-events-none absolute left-2 top-1/2 size-3 -translate-y-1/2 text-muted-foreground/60" }),
29993
- /* @__PURE__ */ jsx48(
29952
+ /* @__PURE__ */ jsx47(Search, { className: "pointer-events-none absolute left-2 top-1/2 size-3 -translate-y-1/2 text-muted-foreground/60" }),
29953
+ /* @__PURE__ */ jsx47(
29994
29954
  "input",
29995
29955
  {
29996
29956
  value,
@@ -30000,7 +29960,7 @@ function ManagerSearch({
30000
29960
  }
30001
29961
  )
30002
29962
  ] }),
30003
- count != null && /* @__PURE__ */ jsx48("span", { className: "shrink-0 text-[10px] tabular-nums text-muted-foreground", children: count }),
29963
+ count != null && /* @__PURE__ */ jsx47("span", { className: "shrink-0 text-[10px] tabular-nums text-muted-foreground", children: count }),
30004
29964
  extra
30005
29965
  ] });
30006
29966
  }
@@ -30050,13 +30010,13 @@ function useAdaptivePolling(poll, policy, enabled = true, options = {}) {
30050
30010
  }
30051
30011
 
30052
30012
  // src/ui/lib/widget-title.tsx
30053
- import { jsx as jsx49, jsxs as jsxs32 } from "react/jsx-runtime";
30013
+ import { jsx as jsx48, jsxs as jsxs32 } from "react/jsx-runtime";
30054
30014
  function WidgetTitle({ title, icon, fallback }) {
30055
30015
  const label = title || fallback;
30056
30016
  if (!label) return null;
30057
30017
  return /* @__PURE__ */ jsxs32("div", { className: "flex items-center gap-1.5 px-2 py-1.5 border-b border-border/50 shrink-0", children: [
30058
- icon && /* @__PURE__ */ jsx49("span", { className: "text-accent-brand shrink-0", children: icon }),
30059
- /* @__PURE__ */ jsx49("span", { className: "text-[10px] font-semibold text-muted-foreground uppercase tracking-wider truncate", children: label })
30018
+ icon && /* @__PURE__ */ jsx48("span", { className: "text-accent-brand shrink-0", children: icon }),
30019
+ /* @__PURE__ */ jsx48("span", { className: "text-[10px] font-semibold text-muted-foreground uppercase tracking-wider truncate", children: label })
30060
30020
  ] });
30061
30021
  }
30062
30022
 
@@ -30098,7 +30058,7 @@ function runVisibleInterval(tick, intervalMs) {
30098
30058
  }
30099
30059
 
30100
30060
  // src/ui/components/empty-state.tsx
30101
- import { jsx as jsx50, jsxs as jsxs33 } from "react/jsx-runtime";
30061
+ import { jsx as jsx49, jsxs as jsxs33 } from "react/jsx-runtime";
30102
30062
  function EmptyState({
30103
30063
  icon: Icon,
30104
30064
  title,
@@ -30113,9 +30073,9 @@ function EmptyState({
30113
30073
  {
30114
30074
  className: `flex flex-col items-center justify-center gap-2 px-4 py-8 text-center ${className ?? ""}`,
30115
30075
  children: [
30116
- Icon && /* @__PURE__ */ jsx50(Icon, { className: "size-5 shrink-0 text-muted-foreground/40" }),
30117
- /* @__PURE__ */ jsx50("span", { className: "text-xs text-muted-foreground", children: title }),
30118
- guided && hint && /* @__PURE__ */ jsx50("span", { className: "max-w-xs text-[11px] leading-snug text-muted-foreground/70", children: hint }),
30076
+ Icon && /* @__PURE__ */ jsx49(Icon, { className: "size-5 shrink-0 text-muted-foreground/40" }),
30077
+ /* @__PURE__ */ jsx49("span", { className: "text-xs text-muted-foreground", children: title }),
30078
+ guided && hint && /* @__PURE__ */ jsx49("span", { className: "max-w-xs text-[11px] leading-snug text-muted-foreground/70", children: hint }),
30119
30079
  guided && action
30120
30080
  ]
30121
30081
  }
@@ -30124,7 +30084,7 @@ function EmptyState({
30124
30084
 
30125
30085
  // src/ui/ssh/dialogs/PassphraseDialog.tsx
30126
30086
  import { useTranslation as useTranslation17 } from "react-i18next";
30127
- import { jsx as jsx51, jsxs as jsxs34 } from "react/jsx-runtime";
30087
+ import { jsx as jsx50, jsxs as jsxs34 } from "react/jsx-runtime";
30128
30088
  function PassphraseDialog({
30129
30089
  isOpen,
30130
30090
  onSubmit,
@@ -30144,18 +30104,18 @@ function PassphraseDialog({
30144
30104
  onSubmit(input.value);
30145
30105
  }
30146
30106
  };
30147
- return /* @__PURE__ */ jsx51(
30107
+ return /* @__PURE__ */ jsx50(
30148
30108
  PanePrompt,
30149
30109
  {
30150
30110
  open: true,
30151
30111
  layer: "connection",
30152
30112
  backgroundColor,
30153
- icon: /* @__PURE__ */ jsx51(KeyRound, { className: "size-4" }),
30113
+ icon: /* @__PURE__ */ jsx50(KeyRound, { className: "size-4" }),
30154
30114
  title: t2("auth.passphraseRequired"),
30155
- description: /* @__PURE__ */ jsx51("span", { className: "font-mono", children: hostDisplay }),
30115
+ description: /* @__PURE__ */ jsx50("span", { className: "font-mono", children: hostDisplay }),
30156
30116
  children: /* @__PURE__ */ jsxs34("form", { onSubmit: handleSubmit, className: "flex flex-col gap-3", children: [
30157
30117
  /* @__PURE__ */ jsxs34("div", { className: "flex flex-col gap-1.5", children: [
30158
- /* @__PURE__ */ jsx51(
30118
+ /* @__PURE__ */ jsx50(
30159
30119
  PasswordInput,
30160
30120
  {
30161
30121
  id: "passphrase",
@@ -30165,11 +30125,11 @@ function PassphraseDialog({
30165
30125
  className: "rounded-none bg-muted/50 border-border text-xs"
30166
30126
  }
30167
30127
  ),
30168
- /* @__PURE__ */ jsx51("p", { className: "text-[10px] text-muted-foreground", children: t2("auth.passphraseRequiredDescription") })
30128
+ /* @__PURE__ */ jsx50("p", { className: "text-[10px] text-muted-foreground", children: t2("auth.passphraseRequiredDescription") })
30169
30129
  ] }),
30170
30130
  /* @__PURE__ */ jsxs34("div", { className: "flex justify-end gap-2", children: [
30171
- /* @__PURE__ */ jsx51("button", { type: "button", onClick: onCancel, className: PROMPT_BUTTON, children: t2("common.cancel") }),
30172
- /* @__PURE__ */ jsx51("button", { type: "submit", className: PROMPT_PRIMARY_BUTTON, children: t2("common.connect") })
30131
+ /* @__PURE__ */ jsx50("button", { type: "button", onClick: onCancel, className: PROMPT_BUTTON, children: t2("common.cancel") }),
30132
+ /* @__PURE__ */ jsx50("button", { type: "submit", className: PROMPT_PRIMARY_BUTTON, children: t2("common.connect") })
30173
30133
  ] })
30174
30134
  ] })
30175
30135
  }
@@ -30179,7 +30139,7 @@ function PassphraseDialog({
30179
30139
  // src/ui/ssh/dialogs/HostKeyVerificationDialog.tsx
30180
30140
  import { useState as useState19 } from "react";
30181
30141
  import { useTranslation as useTranslation18 } from "react-i18next";
30182
- import { Fragment as Fragment7, jsx as jsx52, jsxs as jsxs35 } from "react/jsx-runtime";
30142
+ import { Fragment as Fragment7, jsx as jsx51, jsxs as jsxs35 } from "react/jsx-runtime";
30183
30143
  var formatFingerprint = (fp) => fp.match(/.{1,2}/g)?.join(":") || fp;
30184
30144
  function FingerprintRow({
30185
30145
  label,
@@ -30189,10 +30149,10 @@ function FingerprintRow({
30189
30149
  }) {
30190
30150
  const { t: t2 } = useTranslation18();
30191
30151
  return /* @__PURE__ */ jsxs35("div", { className: "flex flex-col gap-1.5", children: [
30192
- /* @__PURE__ */ jsx52("p", { className: "text-[10px] font-bold uppercase tracking-widest text-muted-foreground", children: label }),
30152
+ /* @__PURE__ */ jsx51("p", { className: "text-[10px] font-bold uppercase tracking-widest text-muted-foreground", children: label }),
30193
30153
  /* @__PURE__ */ jsxs35("div", { className: "flex items-center gap-2", children: [
30194
- /* @__PURE__ */ jsx52("div", { className: "flex-1 bg-muted/50 border border-border p-3 font-mono text-xs break-all", children: formatFingerprint(value) }),
30195
- /* @__PURE__ */ jsx52(
30154
+ /* @__PURE__ */ jsx51("div", { className: "flex-1 bg-muted/50 border border-border p-3 font-mono text-xs break-all", children: formatFingerprint(value) }),
30155
+ /* @__PURE__ */ jsx51(
30196
30156
  "button",
30197
30157
  {
30198
30158
  type: "button",
@@ -30200,7 +30160,7 @@ function FingerprintRow({
30200
30160
  title: t2("common.copy"),
30201
30161
  "aria-label": t2("common.copy"),
30202
30162
  className: `${PROMPT_BUTTON} size-8 shrink-0 px-0`,
30203
- children: copied ? /* @__PURE__ */ jsx52(Check, { className: "size-4 text-accent-brand" }) : /* @__PURE__ */ jsx52(Copy, { className: "size-4" })
30163
+ children: copied ? /* @__PURE__ */ jsx51(Check, { className: "size-4 text-accent-brand" }) : /* @__PURE__ */ jsx51(Copy, { className: "size-4" })
30204
30164
  }
30205
30165
  )
30206
30166
  ] })
@@ -30234,14 +30194,14 @@ function HostKeyVerificationDialog({
30234
30194
  }
30235
30195
  };
30236
30196
  const changed = scenario === "changed";
30237
- return /* @__PURE__ */ jsx52(
30197
+ return /* @__PURE__ */ jsx51(
30238
30198
  PanePrompt,
30239
30199
  {
30240
30200
  open: true,
30241
30201
  layer: "connection",
30242
30202
  backgroundColor,
30243
30203
  tone: changed ? "destructive" : "default",
30244
- icon: changed ? /* @__PURE__ */ jsx52(TriangleAlert, { className: "size-4" }) : /* @__PURE__ */ jsx52(Shield, { className: "size-4" }),
30204
+ icon: changed ? /* @__PURE__ */ jsx51(TriangleAlert, { className: "size-4" }) : /* @__PURE__ */ jsx51(Shield, { className: "size-4" }),
30245
30205
  title: changed ? t2("hostKey.keyChangedWarning") : t2("hostKey.verifyNewHost"),
30246
30206
  description: /* @__PURE__ */ jsxs35("span", { className: "font-mono", children: [
30247
30207
  hostname || ip,
@@ -30250,8 +30210,8 @@ function HostKeyVerificationDialog({
30250
30210
  ] }),
30251
30211
  className: "max-w-lg",
30252
30212
  actions: /* @__PURE__ */ jsxs35(Fragment7, { children: [
30253
- /* @__PURE__ */ jsx52("button", { type: "button", onClick: onReject, className: PROMPT_BUTTON, children: t2("common.cancel") }),
30254
- /* @__PURE__ */ jsx52(
30213
+ /* @__PURE__ */ jsx51("button", { type: "button", onClick: onReject, className: PROMPT_BUTTON, children: t2("common.cancel") }),
30214
+ /* @__PURE__ */ jsx51(
30255
30215
  "button",
30256
30216
  {
30257
30217
  type: "button",
@@ -30261,15 +30221,15 @@ function HostKeyVerificationDialog({
30261
30221
  }
30262
30222
  )
30263
30223
  ] }),
30264
- children: /* @__PURE__ */ jsx52("div", { className: "flex flex-col gap-3", children: changed ? /* @__PURE__ */ jsxs35(Fragment7, { children: [
30224
+ children: /* @__PURE__ */ jsx51("div", { className: "flex flex-col gap-3", children: changed ? /* @__PURE__ */ jsxs35(Fragment7, { children: [
30265
30225
  /* @__PURE__ */ jsxs35("div", { className: "flex items-start gap-3 p-3 border border-destructive/20 bg-destructive/10", children: [
30266
- /* @__PURE__ */ jsx52(TriangleAlert, { className: "size-4 text-destructive shrink-0 mt-0.5" }),
30226
+ /* @__PURE__ */ jsx51(TriangleAlert, { className: "size-4 text-destructive shrink-0 mt-0.5" }),
30267
30227
  /* @__PURE__ */ jsxs35("div", { children: [
30268
- /* @__PURE__ */ jsx52("p", { className: "text-[10px] font-bold uppercase tracking-widest text-destructive", children: t2("hostKey.securityWarning") }),
30269
- /* @__PURE__ */ jsx52("p", { className: "text-xs text-destructive/80 mt-1", children: t2("hostKey.keyChangedDescription") })
30228
+ /* @__PURE__ */ jsx51("p", { className: "text-[10px] font-bold uppercase tracking-widest text-destructive", children: t2("hostKey.securityWarning") }),
30229
+ /* @__PURE__ */ jsx51("p", { className: "text-xs text-destructive/80 mt-1", children: t2("hostKey.keyChangedDescription") })
30270
30230
  ] })
30271
30231
  ] }),
30272
- /* @__PURE__ */ jsx52(
30232
+ /* @__PURE__ */ jsx51(
30273
30233
  FingerprintRow,
30274
30234
  {
30275
30235
  label: t2("hostKey.previousKey"),
@@ -30278,7 +30238,7 @@ function HostKeyVerificationDialog({
30278
30238
  onCopy: () => copyFingerprint(oldFingerprint || "", true)
30279
30239
  }
30280
30240
  ),
30281
- /* @__PURE__ */ jsx52(
30241
+ /* @__PURE__ */ jsx51(
30282
30242
  FingerprintRow,
30283
30243
  {
30284
30244
  label: t2("hostKey.newFingerprint"),
@@ -30289,13 +30249,13 @@ function HostKeyVerificationDialog({
30289
30249
  )
30290
30250
  ] }) : /* @__PURE__ */ jsxs35(Fragment7, { children: [
30291
30251
  /* @__PURE__ */ jsxs35("div", { className: "flex items-start gap-3 p-3 border border-border bg-muted/10", children: [
30292
- /* @__PURE__ */ jsx52(Shield, { className: "size-4 text-accent-brand shrink-0 mt-0.5" }),
30252
+ /* @__PURE__ */ jsx51(Shield, { className: "size-4 text-accent-brand shrink-0 mt-0.5" }),
30293
30253
  /* @__PURE__ */ jsxs35("div", { children: [
30294
- /* @__PURE__ */ jsx52("p", { className: "text-[10px] font-bold uppercase tracking-widest", children: t2("hostKey.firstConnectionTitle") }),
30295
- /* @__PURE__ */ jsx52("p", { className: "text-xs text-muted-foreground mt-1", children: t2("hostKey.firstConnectionDescription") })
30254
+ /* @__PURE__ */ jsx51("p", { className: "text-[10px] font-bold uppercase tracking-widest", children: t2("hostKey.firstConnectionTitle") }),
30255
+ /* @__PURE__ */ jsx51("p", { className: "text-xs text-muted-foreground mt-1", children: t2("hostKey.firstConnectionDescription") })
30296
30256
  ] })
30297
30257
  ] }),
30298
- /* @__PURE__ */ jsx52(
30258
+ /* @__PURE__ */ jsx51(
30299
30259
  FingerprintRow,
30300
30260
  {
30301
30261
  label: `${t2("hostKey.fingerprint")} (${algorithm.toUpperCase()})`,
@@ -30304,7 +30264,7 @@ function HostKeyVerificationDialog({
30304
30264
  onCopy: () => copyFingerprint(fingerprint)
30305
30265
  }
30306
30266
  ),
30307
- /* @__PURE__ */ jsx52("p", { className: "text-[10px] text-muted-foreground", children: t2("hostKey.verifyInstructions") })
30267
+ /* @__PURE__ */ jsx51("p", { className: "text-[10px] text-muted-foreground", children: t2("hostKey.verifyInstructions") })
30308
30268
  ] }) })
30309
30269
  }
30310
30270
  );
@@ -30402,10 +30362,10 @@ function isTabJumpHotkey(e) {
30402
30362
 
30403
30363
  // src/ui/components/kbd.tsx
30404
30364
  import * as React12 from "react";
30405
- import { jsx as jsx53 } from "react/jsx-runtime";
30365
+ import { jsx as jsx52 } from "react/jsx-runtime";
30406
30366
  var Kbd = React12.forwardRef(
30407
30367
  ({ className, ...props }, ref) => {
30408
- return /* @__PURE__ */ jsx53(
30368
+ return /* @__PURE__ */ jsx52(
30409
30369
  "kbd",
30410
30370
  {
30411
30371
  ref,
@@ -30422,12 +30382,12 @@ Kbd.displayName = "Kbd";
30422
30382
  var KbdKey = ({
30423
30383
  className,
30424
30384
  ...props
30425
- }) => /* @__PURE__ */ jsx53("span", { className: cn("", className), ...props });
30385
+ }) => /* @__PURE__ */ jsx52("span", { className: cn("", className), ...props });
30426
30386
  KbdKey.displayName = "KbdKey";
30427
30387
  var KbdSeparator = ({
30428
30388
  className,
30429
30389
  ...props
30430
- }) => /* @__PURE__ */ jsx53("span", { className: cn("text-muted-foreground/50", className), ...props, children: "+" });
30390
+ }) => /* @__PURE__ */ jsx52("span", { className: cn("text-muted-foreground/50", className), ...props, children: "+" });
30431
30391
  KbdSeparator.displayName = "KbdSeparator";
30432
30392
 
30433
30393
  // src/ui/lib/local-adaptive-engine.ts
@@ -30801,8 +30761,325 @@ function createQuickConnectHost(input) {
30801
30761
  };
30802
30762
  }
30803
30763
 
30764
+ // src/ui/components/list-kit.tsx
30765
+ import { useState as useState20 } from "react";
30766
+ import { useTranslation as useTranslation19 } from "react-i18next";
30767
+ import { jsx as jsx53, jsxs as jsxs36 } from "react/jsx-runtime";
30768
+ var STRIPE = {
30769
+ brand: "bg-accent-brand/60",
30770
+ muted: "bg-muted-foreground/30",
30771
+ success: "bg-green-500/70",
30772
+ warning: "bg-warning/70",
30773
+ destructive: "bg-destructive/70",
30774
+ none: "bg-transparent"
30775
+ };
30776
+ function PanelList({
30777
+ empty: empty2,
30778
+ className,
30779
+ children
30780
+ }) {
30781
+ const hasRows = Array.isArray(children) ? children.flat().some(Boolean) : Boolean(children);
30782
+ return /* @__PURE__ */ jsx53(
30783
+ "div",
30784
+ {
30785
+ className: cn(
30786
+ "flex min-h-0 flex-1 flex-col overflow-y-auto thin-scrollbar",
30787
+ className
30788
+ ),
30789
+ children: hasRows ? children : empty2
30790
+ }
30791
+ );
30792
+ }
30793
+ function ListRow({
30794
+ title,
30795
+ icon,
30796
+ badges,
30797
+ meta: meta2,
30798
+ stripe = 0,
30799
+ tone = "brand",
30800
+ color,
30801
+ selected,
30802
+ active: active2,
30803
+ dimmed,
30804
+ leading,
30805
+ trailing,
30806
+ actions,
30807
+ onClick,
30808
+ className,
30809
+ children,
30810
+ ...rest
30811
+ }) {
30812
+ return /* @__PURE__ */ jsxs36(
30813
+ "div",
30814
+ {
30815
+ ...rest,
30816
+ role: onClick ? "button" : rest.role,
30817
+ tabIndex: onClick ? 0 : rest.tabIndex,
30818
+ onClick,
30819
+ onKeyDown: (e) => {
30820
+ rest.onKeyDown?.(e);
30821
+ if (!onClick || e.defaultPrevented || e.target !== e.currentTarget)
30822
+ return;
30823
+ if (e.key === "Enter" || e.key === " ") {
30824
+ e.preventDefault();
30825
+ onClick();
30826
+ }
30827
+ },
30828
+ "data-selected": selected || void 0,
30829
+ className: cn(
30830
+ "group/row relative flex items-stretch select-none border-b border-border/40 transition-colors hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-ring",
30831
+ onClick && "cursor-pointer",
30832
+ selected ? "bg-accent-brand/10 hover:bg-accent-brand/15" : active2 ? "bg-muted/50" : stripe % 2 === 1 && "bg-muted/15",
30833
+ dimmed && "opacity-60",
30834
+ className
30835
+ ),
30836
+ children: [
30837
+ /* @__PURE__ */ jsx53(
30838
+ "div",
30839
+ {
30840
+ className: cn(
30841
+ "w-[3px] shrink-0",
30842
+ selected ? "bg-accent-brand" : !color && STRIPE[tone]
30843
+ ),
30844
+ style: color && !selected ? { backgroundColor: color } : void 0
30845
+ }
30846
+ ),
30847
+ leading,
30848
+ /* @__PURE__ */ jsxs36("div", { className: "flex min-w-0 flex-1 flex-col gap-[3.5px] py-[7px] pl-[8.75px] pr-[7px]", children: [
30849
+ /* @__PURE__ */ jsxs36("div", { className: "flex min-w-0 items-center gap-1.5", children: [
30850
+ icon && /* @__PURE__ */ jsx53("span", { className: "flex shrink-0 text-muted-foreground/60 [&_svg]:size-3", children: icon }),
30851
+ /* @__PURE__ */ jsx53("span", { className: "truncate text-[13px] font-semibold leading-none tracking-tight text-foreground", children: title }),
30852
+ badges
30853
+ ] }),
30854
+ meta2 && /* @__PURE__ */ jsx53("div", { className: "min-w-0 truncate text-[11px] leading-tight text-muted-foreground/80", children: meta2 }),
30855
+ children,
30856
+ actions && /* @__PURE__ */ jsx53(
30857
+ "div",
30858
+ {
30859
+ onClick: (e) => e.stopPropagation(),
30860
+ className: cn(
30861
+ "flex-wrap items-center gap-[1.75px] border-t border-border/30 pt-[3.5px]",
30862
+ active2 ? "flex" : "hidden group-hover/row:flex group-focus-within/row:flex pointer-coarse:flex"
30863
+ ),
30864
+ children: actions
30865
+ }
30866
+ )
30867
+ ] }),
30868
+ trailing && /* @__PURE__ */ jsx53("div", { className: "flex shrink-0 items-center pr-2", children: trailing })
30869
+ ]
30870
+ }
30871
+ );
30872
+ }
30873
+ function ListRowAction({
30874
+ label,
30875
+ tone = "default",
30876
+ className,
30877
+ children,
30878
+ ...rest
30879
+ }) {
30880
+ return /* @__PURE__ */ jsx53(
30881
+ "button",
30882
+ {
30883
+ type: "button",
30884
+ title: label,
30885
+ "aria-label": label,
30886
+ ...rest,
30887
+ className: cn(
30888
+ "flex size-[22.75px] items-center justify-center transition-colors hover:bg-muted disabled:pointer-events-none disabled:opacity-40 [&_svg]:size-3.5",
30889
+ tone === "brand" ? "text-accent-brand/80 hover:text-accent-brand" : tone === "destructive" ? "text-muted-foreground/60 hover:bg-destructive/10 hover:text-destructive" : "text-muted-foreground/60 hover:text-foreground",
30890
+ className
30891
+ ),
30892
+ children
30893
+ }
30894
+ );
30895
+ }
30896
+ function ListBadge({
30897
+ tone = "muted",
30898
+ className,
30899
+ children
30900
+ }) {
30901
+ return /* @__PURE__ */ jsx53(
30902
+ "span",
30903
+ {
30904
+ className: cn(
30905
+ "flex shrink-0 items-center gap-0.5 border px-1 py-px text-[9px] uppercase leading-none tracking-wider [&_svg]:size-2.5",
30906
+ tone === "brand" && "border-accent-brand/30 bg-accent-brand/10 text-accent-brand",
30907
+ tone === "warning" && "border-warning/30 bg-warning/10 text-warning",
30908
+ tone === "destructive" && "border-destructive/30 bg-destructive/10 text-destructive",
30909
+ tone === "success" && "border-green-500/30 bg-green-500/10 text-green-500",
30910
+ tone === "muted" && "border-border bg-muted/40 text-muted-foreground",
30911
+ className
30912
+ ),
30913
+ children
30914
+ }
30915
+ );
30916
+ }
30917
+ function ListRowFolder({
30918
+ name: name2,
30919
+ icon,
30920
+ count,
30921
+ open,
30922
+ onToggle,
30923
+ stripe = 0,
30924
+ actions,
30925
+ dropActive,
30926
+ onDropItem,
30927
+ emptyText,
30928
+ className,
30929
+ children
30930
+ }) {
30931
+ const [dragOver, setDragOver] = useState20(false);
30932
+ const empty2 = count === 0;
30933
+ return /* @__PURE__ */ jsxs36("div", { className: cn("border-b border-border/40", className), children: [
30934
+ /* @__PURE__ */ jsxs36(
30935
+ "div",
30936
+ {
30937
+ role: "button",
30938
+ tabIndex: 0,
30939
+ "aria-expanded": open,
30940
+ onClick: onToggle,
30941
+ onKeyDown: (e) => {
30942
+ if (e.target !== e.currentTarget) return;
30943
+ if (e.key === "Enter" || e.key === " ") {
30944
+ e.preventDefault();
30945
+ onToggle();
30946
+ }
30947
+ },
30948
+ onDragOver: (e) => {
30949
+ if (!dropActive) return;
30950
+ e.preventDefault();
30951
+ setDragOver(true);
30952
+ },
30953
+ onDragLeave: (e) => {
30954
+ if (e.currentTarget === e.target) setDragOver(false);
30955
+ },
30956
+ onDrop: (e) => {
30957
+ if (!dropActive) return;
30958
+ e.preventDefault();
30959
+ setDragOver(false);
30960
+ onDropItem?.();
30961
+ },
30962
+ className: cn(
30963
+ "group/folder flex w-full cursor-pointer select-none items-center gap-2 py-1.5 pl-2.5 pr-2 transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-ring",
30964
+ open ? "bg-muted/40" : "hover:bg-muted/30",
30965
+ stripe % 2 === 1 && !open && "bg-muted/[0.08]",
30966
+ dragOver && dropActive && "bg-accent-brand/10 ring-1 ring-inset ring-accent-brand"
30967
+ ),
30968
+ children: [
30969
+ /* @__PURE__ */ jsx53(
30970
+ ChevronRight,
30971
+ {
30972
+ className: cn(
30973
+ "size-3.5 shrink-0 text-muted-foreground/60 transition-transform",
30974
+ open && "rotate-90"
30975
+ )
30976
+ }
30977
+ ),
30978
+ icon && /* @__PURE__ */ jsx53(
30979
+ "span",
30980
+ {
30981
+ className: cn(
30982
+ "flex shrink-0 [&_svg]:size-4",
30983
+ open ? "text-accent-brand" : "text-muted-foreground/70"
30984
+ ),
30985
+ children: icon
30986
+ }
30987
+ ),
30988
+ /* @__PURE__ */ jsx53("span", { className: "min-w-0 flex-1 truncate text-[13px] font-bold tracking-tight text-foreground", children: name2 }),
30989
+ count !== void 0 && /* @__PURE__ */ jsx53("span", { className: "shrink-0 bg-muted/70 px-1.5 py-[1px] text-[10px] tabular-nums text-muted-foreground/70", children: count }),
30990
+ actions && /* @__PURE__ */ jsx53(
30991
+ "div",
30992
+ {
30993
+ onClick: (e) => e.stopPropagation(),
30994
+ className: "flex shrink-0 items-center opacity-0 transition-opacity focus-within:opacity-100 group-hover/folder:opacity-100 pointer-coarse:opacity-100 has-[[data-state=open]]:opacity-100",
30995
+ children: actions
30996
+ }
30997
+ )
30998
+ ]
30999
+ }
31000
+ ),
31001
+ open && /* @__PURE__ */ jsx53("div", { className: "ml-[27px] border-l border-t border-border/50 border-t-border/40 [&>*:last-child]:border-b-0", children: empty2 && emptyText ? /* @__PURE__ */ jsx53("div", { className: "px-3 py-2 text-[11px] text-muted-foreground/60", children: emptyText }) : children })
31002
+ ] });
31003
+ }
31004
+ function AddButton({
31005
+ label,
31006
+ compact,
31007
+ className,
31008
+ ...rest
31009
+ }) {
31010
+ const { t: t2 } = useTranslation19();
31011
+ const text = label ?? t2("common.new");
31012
+ return /* @__PURE__ */ jsxs36(
31013
+ Button,
31014
+ {
31015
+ variant: "outline",
31016
+ size: compact ? "icon" : "default",
31017
+ title: text,
31018
+ "aria-label": text,
31019
+ ...rest,
31020
+ className: cn(
31021
+ "shrink-0 border-accent-brand/40 text-accent-brand hover:bg-accent-brand/10 hover:text-accent-brand dark:border-accent-brand/40 dark:bg-transparent dark:hover:bg-accent-brand/10",
31022
+ className
31023
+ ),
31024
+ children: [
31025
+ /* @__PURE__ */ jsx53(Plus, { className: "size-3.5" }),
31026
+ !compact && /* @__PURE__ */ jsx53("span", { children: text })
31027
+ ]
31028
+ }
31029
+ );
31030
+ }
31031
+ function FormFooter({
31032
+ onCancel,
31033
+ onSave,
31034
+ saveLabel,
31035
+ cancelLabel,
31036
+ saving,
31037
+ dirty,
31038
+ status,
31039
+ disabled,
31040
+ onDelete,
31041
+ deleteLabel,
31042
+ extra,
31043
+ saveType = "button",
31044
+ form
31045
+ }) {
31046
+ const { t: t2 } = useTranslation19();
31047
+ return /* @__PURE__ */ jsxs36("div", { className: "flex w-full min-w-0 items-center gap-2", children: [
31048
+ onDelete && /* @__PURE__ */ jsxs36(
31049
+ Button,
31050
+ {
31051
+ variant: "ghost",
31052
+ size: "sm",
31053
+ onClick: onDelete,
31054
+ disabled: saving,
31055
+ className: "text-destructive hover:bg-destructive/10 hover:text-destructive dark:hover:bg-destructive/10",
31056
+ children: [
31057
+ /* @__PURE__ */ jsx53(Trash, {}),
31058
+ deleteLabel ?? t2("common.delete")
31059
+ ]
31060
+ }
31061
+ ),
31062
+ /* @__PURE__ */ jsx53("div", { className: "min-w-0 flex-1 truncate text-[11px]", children: status ?? (dirty && /* @__PURE__ */ jsx53("span", { className: "text-warning", children: t2("common.unsavedChanges") })) }),
31063
+ onCancel && /* @__PURE__ */ jsx53(Button, { variant: "ghost", size: "sm", onClick: onCancel, disabled: saving, children: cancelLabel ?? t2("common.cancel") }),
31064
+ extra,
31065
+ (onSave || saveType === "submit") && /* @__PURE__ */ jsx53(
31066
+ Button,
31067
+ {
31068
+ type: saveType,
31069
+ form,
31070
+ variant: "outline",
31071
+ size: "sm",
31072
+ onClick: onSave,
31073
+ disabled: disabled || saving,
31074
+ className: "border-accent-brand/40 px-6 text-accent-brand hover:bg-accent-brand/10 hover:text-accent-brand dark:border-accent-brand/40 dark:bg-transparent dark:hover:bg-accent-brand/10",
31075
+ children: saving ? t2("common.saving") : saveLabel ?? t2("common.save")
31076
+ }
31077
+ )
31078
+ ] });
31079
+ }
31080
+
30804
31081
  // src/ui/components/data-view.tsx
30805
- import { jsx as jsx54, jsxs as jsxs36 } from "react/jsx-runtime";
31082
+ import { jsx as jsx54, jsxs as jsxs37 } from "react/jsx-runtime";
30806
31083
  var COLS = {
30807
31084
  1: "grid-cols-1",
30808
31085
  2: "grid-cols-2",
@@ -30856,7 +31133,7 @@ function DataView({
30856
31133
  }
30857
31134
  const template = listColumns.map((c) => c.width).join(" ");
30858
31135
  const rowHeight = density === "compact" ? "h-7" : "h-9";
30859
- return /* @__PURE__ */ jsxs36("div", { className: cn("border border-border bg-card", className), role: "table", children: [
31136
+ return /* @__PURE__ */ jsxs37("div", { className: cn("border border-border bg-card", className), role: "table", children: [
30860
31137
  /* @__PURE__ */ jsx54(
30861
31138
  "div",
30862
31139
  {
@@ -30918,7 +31195,7 @@ import {
30918
31195
  useLayoutEffect as useLayoutEffect3,
30919
31196
  useMemo as useMemo7,
30920
31197
  useRef as useRef7,
30921
- useState as useState20
31198
+ useState as useState21
30922
31199
  } from "react";
30923
31200
  import { jsx as jsx55 } from "react/jsx-runtime";
30924
31201
  var COLUMN_STEPS = {
@@ -30949,7 +31226,7 @@ function CardMasonry({
30949
31226
  children
30950
31227
  }) {
30951
31228
  const ref = useRef7(null);
30952
- const [width, setWidth] = useState20(0);
31229
+ const [width, setWidth] = useState21(0);
30953
31230
  useLayoutEffect3(() => {
30954
31231
  const el = ref.current;
30955
31232
  if (!el) return;
@@ -31001,7 +31278,7 @@ function usageBarColor(percent) {
31001
31278
  }
31002
31279
 
31003
31280
  // src/ui/components/meter.tsx
31004
- import { jsx as jsx56, jsxs as jsxs37 } from "react/jsx-runtime";
31281
+ import { jsx as jsx56, jsxs as jsxs38 } from "react/jsx-runtime";
31005
31282
  function Meter({
31006
31283
  percent,
31007
31284
  className
@@ -31021,7 +31298,7 @@ function UsagePair({
31021
31298
  detail
31022
31299
  }) {
31023
31300
  const clamped = Math.min(100, Math.max(0, percent));
31024
- return /* @__PURE__ */ jsxs37("div", { className: "flex min-w-0 items-center gap-2", children: [
31301
+ return /* @__PURE__ */ jsxs38("div", { className: "flex min-w-0 items-center gap-2", children: [
31025
31302
  label && /* @__PURE__ */ jsx56("span", { className: "w-10 shrink-0 text-[10px] uppercase text-muted-foreground", children: label }),
31026
31303
  /* @__PURE__ */ jsx56(Meter, { percent: clamped, className: "flex-1" }),
31027
31304
  /* @__PURE__ */ jsx56(
@@ -31038,9 +31315,9 @@ function UsagePair({
31038
31315
  }
31039
31316
 
31040
31317
  // src/ui/components/form-fields.tsx
31041
- import { useState as useState21 } from "react";
31042
- import { useTranslation as useTranslation19 } from "react-i18next";
31043
- import { jsx as jsx57, jsxs as jsxs38 } from "react/jsx-runtime";
31318
+ import { useState as useState22 } from "react";
31319
+ import { useTranslation as useTranslation20 } from "react-i18next";
31320
+ import { jsx as jsx57, jsxs as jsxs39 } from "react/jsx-runtime";
31044
31321
  function Field2({
31045
31322
  label,
31046
31323
  hint,
@@ -31050,8 +31327,8 @@ function Field2({
31050
31327
  className,
31051
31328
  children
31052
31329
  }) {
31053
- return /* @__PURE__ */ jsxs38("div", { className: cn("flex flex-col gap-1.5", className), children: [
31054
- (label || aside) && /* @__PURE__ */ jsxs38("div", { className: "flex items-center gap-2", children: [
31330
+ return /* @__PURE__ */ jsxs39("div", { "data-setting-row": "", className: cn("flex flex-col gap-1.5", className), children: [
31331
+ (label || aside) && /* @__PURE__ */ jsxs39("div", { className: "flex items-center gap-2", children: [
31055
31332
  /* @__PURE__ */ jsx57(
31056
31333
  "label",
31057
31334
  {
@@ -31148,7 +31425,7 @@ function SecretField({
31148
31425
  disabled,
31149
31426
  className
31150
31427
  }) {
31151
- const { t: t2 } = useTranslation19();
31428
+ const { t: t2 } = useTranslation20();
31152
31429
  const saved = isSecretSentinel(value);
31153
31430
  return /* @__PURE__ */ jsx57(
31154
31431
  Field2,
@@ -31182,7 +31459,7 @@ function SelectField({
31182
31459
  placeholder: placeholder2
31183
31460
  }) {
31184
31461
  const EMPTY = "__empty__";
31185
- return /* @__PURE__ */ jsx57(Field2, { label, hint, error, className, children: /* @__PURE__ */ jsxs38(
31462
+ return /* @__PURE__ */ jsx57(Field2, { label, hint, error, className, children: /* @__PURE__ */ jsxs39(
31186
31463
  Select2,
31187
31464
  {
31188
31465
  value: value === "" ? EMPTY : value,
@@ -31273,11 +31550,11 @@ function Repeater({
31273
31550
  hint,
31274
31551
  renderItem
31275
31552
  }) {
31276
- const { t: t2 } = useTranslation19();
31277
- return /* @__PURE__ */ jsxs38("div", { className: "flex flex-col gap-2 py-3", children: [
31278
- /* @__PURE__ */ jsxs38("div", { className: "flex items-center gap-2", children: [
31553
+ const { t: t2 } = useTranslation20();
31554
+ return /* @__PURE__ */ jsxs39("div", { className: "flex flex-col gap-2 py-3", children: [
31555
+ /* @__PURE__ */ jsxs39("div", { className: "flex items-center gap-2", children: [
31279
31556
  /* @__PURE__ */ jsx57("span", { className: "text-[10px] font-bold uppercase tracking-widest text-muted-foreground", children: label }),
31280
- /* @__PURE__ */ jsxs38(
31557
+ /* @__PURE__ */ jsxs39(
31281
31558
  Button,
31282
31559
  {
31283
31560
  type: "button",
@@ -31293,7 +31570,7 @@ function Repeater({
31293
31570
  )
31294
31571
  ] }),
31295
31572
  hint && /* @__PURE__ */ jsx57("span", { className: "text-[10px] text-muted-foreground", children: hint }),
31296
- items.length === 0 ? /* @__PURE__ */ jsx57("span", { className: "border border-dashed border-border px-3 py-2 text-[10px] text-muted-foreground", children: empty2 }) : /* @__PURE__ */ jsx57("div", { className: "flex flex-col gap-2", children: items.map((item, index) => /* @__PURE__ */ jsxs38(
31573
+ items.length === 0 ? /* @__PURE__ */ jsx57("span", { className: "border border-dashed border-border px-3 py-2 text-[10px] text-muted-foreground", children: empty2 }) : /* @__PURE__ */ jsx57("div", { className: "flex flex-col gap-2", children: items.map((item, index) => /* @__PURE__ */ jsxs39(
31297
31574
  "div",
31298
31575
  {
31299
31576
  className: "flex items-start gap-2 border border-border bg-muted/10 p-2",
@@ -31327,9 +31604,9 @@ function TagInput({
31327
31604
  onTagsChange,
31328
31605
  onInputChange
31329
31606
  }) {
31330
- const { t: t2 } = useTranslation19();
31331
- return /* @__PURE__ */ jsxs38("div", { className: "flex min-h-8 flex-wrap items-center gap-1 border border-input bg-background px-2 py-1 focus-within:border-ring focus-within:ring-1 focus-within:ring-ring/50 dark:bg-input/30", children: [
31332
- tags2.map((tag) => /* @__PURE__ */ jsxs38(
31607
+ const { t: t2 } = useTranslation20();
31608
+ return /* @__PURE__ */ jsxs39("div", { className: "flex min-h-8 flex-wrap items-center gap-1 border border-input bg-background px-2 py-1 focus-within:border-ring focus-within:ring-1 focus-within:ring-ring/50 dark:bg-input/30", children: [
31609
+ tags2.map((tag) => /* @__PURE__ */ jsxs39(
31333
31610
  "span",
31334
31611
  {
31335
31612
  className: "flex items-center gap-0.5 border border-border/60 bg-muted px-1.5 py-0.5 text-[10px] text-foreground",
@@ -31381,10 +31658,10 @@ import {
31381
31658
  useContext as useContext5,
31382
31659
  useMemo as useMemo8,
31383
31660
  useRef as useRef8,
31384
- useState as useState22
31661
+ useState as useState23
31385
31662
  } from "react";
31386
31663
  import { useConnectionRetry } from "@termix-ssh/plugin-sdk/frontend";
31387
- import { jsx as jsx58, jsxs as jsxs39 } from "react/jsx-runtime";
31664
+ import { jsx as jsx58, jsxs as jsxs40 } from "react/jsx-runtime";
31388
31665
  function messageOf(err) {
31389
31666
  return typeof err === "string" ? err : getErrorMessage(err);
31390
31667
  }
@@ -31412,11 +31689,11 @@ function Gate({
31412
31689
  children
31413
31690
  }) {
31414
31691
  const { addLog, clearLogs } = useConnectionLog();
31415
- const [error, setError] = useState22(null);
31416
- const [unavailable, setUnavailable] = useState22(
31692
+ const [error, setError] = useState23(null);
31693
+ const [unavailable, setUnavailable] = useState23(
31417
31694
  null
31418
31695
  );
31419
- const [dropped, setDropped] = useState22(false);
31696
+ const [dropped, setDropped] = useState23(false);
31420
31697
  const maxAttempts = retry?.maxAttempts ?? 8;
31421
31698
  const gateRef = useRef8(null);
31422
31699
  const write = useCallback8(
@@ -31534,7 +31811,7 @@ function Gate({
31534
31811
  gateRef.current = controller;
31535
31812
  const up = status === "connected" && !unavailable;
31536
31813
  const content2 = typeof children === "function" ? children(controller) : children;
31537
- return /* @__PURE__ */ jsx58(GateContext.Provider, { value: controller, children: /* @__PURE__ */ jsxs39("div", { className: `relative h-full w-full ${className ?? ""}`, children: [
31814
+ return /* @__PURE__ */ jsx58(GateContext.Provider, { value: controller, children: /* @__PURE__ */ jsxs40("div", { className: `relative h-full w-full ${className ?? ""}`, children: [
31538
31815
  (up || keepMounted) && content2,
31539
31816
  /* @__PURE__ */ jsx58(
31540
31817
  ConnectionScreen,
@@ -31558,6 +31835,7 @@ function Gate({
31558
31835
  }
31559
31836
  export {
31560
31837
  ActionSlot,
31838
+ AddButton,
31561
31839
  Alert,
31562
31840
  AlertDescription,
31563
31841
  AlertDialog,
@@ -31625,6 +31903,7 @@ export {
31625
31903
  FakeSwitch,
31626
31904
  Field2 as Field,
31627
31905
  FieldPair,
31906
+ FormFooter,
31628
31907
  FullScreenAppWrapper,
31629
31908
  GroupHeading,
31630
31909
  HostDefaultBadge,
@@ -31638,6 +31917,10 @@ export {
31638
31917
  KbdSeparator,
31639
31918
  Label,
31640
31919
  LineChart,
31920
+ ListBadge,
31921
+ ListRow,
31922
+ ListRowAction,
31923
+ ListRowFolder,
31641
31924
  ManagerCardShell,
31642
31925
  ManagerSearch,
31643
31926
  Meter,
@@ -31649,6 +31932,7 @@ export {
31649
31932
  PROMPT_DESTRUCTIVE_BUTTON,
31650
31933
  PROMPT_PRIMARY_BUTTON,
31651
31934
  PanePrompt,
31935
+ PanelList,
31652
31936
  PanelSearch,
31653
31937
  PanelShell,
31654
31938
  PassphraseDialog,