@anymux/ui-kit 0.1.0 → 0.2.0

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 (94) hide show
  1. package/dist/{calendar-DSlrbHoj.js → calendar-DQKfYSQS.js} +48 -45
  2. package/dist/calendar-DQKfYSQS.js.map +1 -0
  3. package/dist/calendar.d.ts +1 -1
  4. package/dist/calendar.js +1 -1
  5. package/dist/{contacts-DQXTZzHc.js → contacts-By9Wg3kn.js} +35 -33
  6. package/dist/contacts-By9Wg3kn.js.map +1 -0
  7. package/dist/contacts.d.ts +1 -1
  8. package/dist/contacts.js +1 -1
  9. package/dist/{file-browser-m5atC3kF.js → file-browser-CkhNwADU.js} +61 -133
  10. package/dist/file-browser-CkhNwADU.js.map +1 -0
  11. package/dist/file-browser.d.ts +6 -6
  12. package/dist/file-browser.js +4 -4
  13. package/dist/{git-B55e6LL-.js → git-m4lboTfx.js} +29 -29
  14. package/dist/git-m4lboTfx.js.map +1 -0
  15. package/dist/git.js +1 -1
  16. package/dist/{iconMap-V4B8P-Uh.js → iconMap-DDpe35ek.js} +5 -5
  17. package/dist/iconMap-DDpe35ek.js.map +1 -0
  18. package/dist/icons.js +1 -1
  19. package/dist/{index-Bryv_GCG.d.ts → index-BP4IYXiF.d.ts} +46 -53
  20. package/dist/index-BP4IYXiF.d.ts.map +1 -0
  21. package/dist/{index-kHr9udZD.d.ts → index-BkIh8oov.d.ts} +17 -17
  22. package/dist/{index-kHr9udZD.d.ts.map → index-BkIh8oov.d.ts.map} +1 -1
  23. package/dist/{index-DSu19mq0.d.ts → index-D3Ob3aXg.d.ts} +9 -9
  24. package/dist/{index-DSu19mq0.d.ts.map → index-D3Ob3aXg.d.ts.map} +1 -1
  25. package/dist/{index-Ml_SgiKa.d.ts → index-DGoLQBX6.d.ts} +18 -42
  26. package/dist/index-DGoLQBX6.d.ts.map +1 -0
  27. package/dist/index-DnJaZr08.d.ts +67 -0
  28. package/dist/index-DnJaZr08.d.ts.map +1 -0
  29. package/dist/{index-DmsyeHFr.d.ts → index-Pty-N7-g.d.ts} +5 -5
  30. package/dist/{index-DmsyeHFr.d.ts.map → index-Pty-N7-g.d.ts.map} +1 -1
  31. package/dist/index.d.ts +7 -7
  32. package/dist/index.js +10 -10
  33. package/dist/layout-BYsc16hD.js +183 -0
  34. package/dist/layout-BYsc16hD.js.map +1 -0
  35. package/dist/layout.d.ts +2 -2
  36. package/dist/layout.js +2 -2
  37. package/dist/{list-CxfT6hix.js → list-DAq-b6RR.js} +49 -63
  38. package/dist/list-DAq-b6RR.js.map +1 -0
  39. package/dist/list.d.ts +2 -2
  40. package/dist/list.js +4 -3
  41. package/dist/{media-DZ292aKK.js → media-DuczOGsk.js} +32 -31
  42. package/dist/media-DuczOGsk.js.map +1 -0
  43. package/dist/media.js +1 -1
  44. package/dist/{tree-Dd9Z0Aso.js → tree-B9VQcKBp.js} +2 -2
  45. package/dist/{tree-Dd9Z0Aso.js.map → tree-B9VQcKBp.js.map} +1 -1
  46. package/dist/tree.d.ts +1 -1
  47. package/dist/tree.js +2 -2
  48. package/package.json +2 -2
  49. package/src/calendar/AgendaView.tsx +2 -2
  50. package/src/calendar/CalendarBrowser.tsx +11 -11
  51. package/src/calendar/CalendarSidebar.tsx +10 -10
  52. package/src/calendar/DayView.tsx +5 -5
  53. package/src/calendar/EventCard.tsx +3 -3
  54. package/src/calendar/MonthView.tsx +6 -6
  55. package/src/calendar/WeekView.tsx +10 -10
  56. package/src/contacts/ContactBrowser.tsx +8 -8
  57. package/src/contacts/ContactCard.tsx +4 -4
  58. package/src/contacts/ContactDetail.tsx +10 -10
  59. package/src/contacts/ContactGroupSidebar.tsx +6 -6
  60. package/src/contacts/ContactList.tsx +3 -3
  61. package/src/file-browser/components/FileBrowser.tsx +3 -2
  62. package/src/file-browser/components/FileBrowserContent.tsx +1 -1
  63. package/src/file-browser/examples/BasicUsage.tsx +2 -2
  64. package/src/file-browser/index.ts +1 -1
  65. package/src/file-browser/providers/FileSystemProvider.ts +1 -1
  66. package/src/git/BranchList.tsx +12 -12
  67. package/src/git/CommitList.tsx +11 -11
  68. package/src/git/DiffViewer.tsx +11 -11
  69. package/src/icons/iconMap.ts +4 -4
  70. package/src/layout/index.ts +6 -2
  71. package/src/layout/models/ResponsiveLayoutModel.ts +116 -0
  72. package/src/list/components/ListItem.tsx +1 -1
  73. package/src/list/index.ts +1 -1
  74. package/src/media/AlbumSidebar.tsx +4 -4
  75. package/src/media/MediaBrowser.tsx +11 -11
  76. package/src/media/MediaGrid.tsx +3 -3
  77. package/src/media/MediaList.tsx +6 -6
  78. package/src/media/MediaPreview.tsx +2 -2
  79. package/src/media/MediaTimeline.tsx +3 -3
  80. package/src/{file-browser/components/shared → shared}/ErrorBoundary.tsx +3 -3
  81. package/dist/calendar-DSlrbHoj.js.map +0 -1
  82. package/dist/contacts-DQXTZzHc.js.map +0 -1
  83. package/dist/file-browser-m5atC3kF.js.map +0 -1
  84. package/dist/git-B55e6LL-.js.map +0 -1
  85. package/dist/iconMap-V4B8P-Uh.js.map +0 -1
  86. package/dist/index-Bryv_GCG.d.ts.map +0 -1
  87. package/dist/index-DzfY1Tok.d.ts +0 -32
  88. package/dist/index-DzfY1Tok.d.ts.map +0 -1
  89. package/dist/index-Ml_SgiKa.d.ts.map +0 -1
  90. package/dist/layout-Ca_4r8ka.js +0 -89
  91. package/dist/layout-Ca_4r8ka.js.map +0 -1
  92. package/dist/list-CxfT6hix.js.map +0 -1
  93. package/dist/media-DZ292aKK.js.map +0 -1
  94. package/src/list/components/shared/ErrorBoundary.tsx +0 -123
@@ -1,15 +1,15 @@
1
1
  import { cn$1 as cn } from "./utils-B4fdKKsy.js";
2
- import { Tree, TreeModel } from "./tree-Dd9Z0Aso.js";
3
- import { getIconForFile$1 as getIconForFile } from "./iconMap-V4B8P-Uh.js";
2
+ import { Tree, TreeModel } from "./tree-B9VQcKBp.js";
3
+ import { getIconForFile$1 as getIconForFile } from "./iconMap-DDpe35ek.js";
4
4
  import { FileBrowserContext } from "./FileBrowserContext-B6jixa2j.js";
5
- import { DETAILS_VIEW_TYPE, GRID_VIEW_TYPE, LIST_VIEW_TYPE, ListItems, ListItemsModel, MASONRY_HORIZONTAL_VIEW_TYPE, MASONRY_VERTICAL_VIEW_TYPE, SearchFilter, TREEMAP_VIEW_TYPE, ViewTypeSelector } from "./list-CxfT6hix.js";
5
+ import { DETAILS_VIEW_TYPE, ErrorBoundary, GRID_VIEW_TYPE, LIST_VIEW_TYPE, ListItems, ListItemsModel, MASONRY_HORIZONTAL_VIEW_TYPE, MASONRY_VERTICAL_VIEW_TYPE, SearchFilter, TREEMAP_VIEW_TYPE, ViewTypeSelector } from "./list-DAq-b6RR.js";
6
6
  import { ExplorerLayout$1 as ExplorerLayout } from "./ExplorerLayout-CSIJd7N4.js";
7
- import React, { Component, Suspense, useCallback, useEffect, useMemo, useRef, useState } from "react";
7
+ import React, { Suspense, useCallback, useEffect, useMemo, useRef, useState } from "react";
8
8
  import { observer } from "mobx-react-lite";
9
9
  import { Badge } from "@anymux/ui/components/badge";
10
10
  import { Button } from "@anymux/ui/components/button";
11
11
  import { PathBreadcrumb } from "@anymux/ui/components/path-breadcrumb";
12
- import { AlertCircle, AlertTriangle, Archive, ArrowLeft, ArrowRight, ArrowUp, CheckCircle2, CheckSquare, ChevronDown, ChevronLeft, ChevronRight, ChevronUp, Download, Eye, File, FileAudio, FileCode, FileImage, FileQuestion, FileSpreadsheet, FileText, FileType, FileUp, FileVideo, Files, Folder, FolderOpen, FolderTree, Grid3X3, Home, ImageIcon, List, Loader2, Maximize, MoreVertical, PanelRightClose, PanelRightOpen, RotateCw, Settings, Upload, X, ZoomIn, ZoomOut } from "lucide-react";
12
+ import { AlertCircle, Archive, ArrowLeft, ArrowRight, ArrowUp, CheckCircle2, CheckSquare, ChevronDown, ChevronLeft, ChevronRight, ChevronUp, Download, Eye, File, FileAudio, FileCode, FileImage, FileQuestion, FileSpreadsheet, FileText, FileType, FileUp, FileVideo, Files, Folder, FolderOpen, FolderTree, Grid3X3, Home, ImageIcon, List, Loader2, Maximize, MoreVertical, PanelRightClose, PanelRightOpen, RotateCw, Settings, Upload, X, ZoomIn, ZoomOut } from "lucide-react";
13
13
  import { BrowserError } from "@anymux/ui/components/browser-error";
14
14
  import { flow, makeAutoObservable, observable, reaction, runInAction } from "mobx";
15
15
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -2515,17 +2515,17 @@ const ViewerLoadingFallback = ({ name }) => /* @__PURE__ */ jsxs("div", {
2515
2515
  /**
2516
2516
  * Render a single ToolbarAction as a button.
2517
2517
  */
2518
- const ToolbarActionButton = ({ action }) => {
2519
- const isEnabled = typeof action.enabled === "function" ? action.enabled() : action.enabled !== false;
2520
- const Icon = action.icon;
2518
+ const ToolbarActionButton = ({ action: action$1 }) => {
2519
+ const isEnabled = typeof action$1.enabled === "function" ? action$1.enabled() : action$1.enabled !== false;
2520
+ const Icon = action$1.icon;
2521
2521
  return /* @__PURE__ */ jsx("button", {
2522
- onClick: action.onClick,
2522
+ onClick: action$1.onClick,
2523
2523
  disabled: !isEnabled,
2524
2524
  className: cn("p-1 rounded hover:bg-muted text-muted-foreground hover:text-foreground transition-colors", "disabled:opacity-40 disabled:pointer-events-none"),
2525
- title: action.shortcutLabel ? `${action.label} (${action.shortcutLabel})` : action.label,
2525
+ title: action$1.shortcutLabel ? `${action$1.label} (${action$1.shortcutLabel})` : action$1.label,
2526
2526
  children: Icon ? /* @__PURE__ */ jsx(Icon, { className: "w-3.5 h-3.5" }) : /* @__PURE__ */ jsx("span", {
2527
2527
  className: "text-xs px-1",
2528
- children: action.label
2528
+ children: action$1.label
2529
2529
  })
2530
2530
  });
2531
2531
  };
@@ -2592,12 +2592,12 @@ const ViewerHost = observer(({ viewer, file, mode, onClose, onSave, readOnly, co
2592
2592
  className: "flex items-center justify-between px-2 py-1 border-b bg-muted/20 flex-shrink-0 min-h-[36px]",
2593
2593
  children: [/* @__PURE__ */ jsx("div", {
2594
2594
  className: "flex items-center gap-0.5",
2595
- children: leftActions.map((action) => /* @__PURE__ */ jsx(ToolbarActionButton, { action }, action.id))
2595
+ children: leftActions.map((action$1) => /* @__PURE__ */ jsx(ToolbarActionButton, { action: action$1 }, action$1.id))
2596
2596
  }), /* @__PURE__ */ jsxs("div", {
2597
2597
  className: "flex items-center gap-1",
2598
2598
  children: [
2599
2599
  model.toolbarExtras,
2600
- rightActions.map((action) => /* @__PURE__ */ jsx(ToolbarActionButton, { action }, action.id)),
2600
+ rightActions.map((action$1) => /* @__PURE__ */ jsx(ToolbarActionButton, { action: action$1 }, action$1.id)),
2601
2601
  hostToolbar
2602
2602
  ]
2603
2603
  })]
@@ -3072,9 +3072,9 @@ const FileBrowser = observer(({ fileSystem, initialPath = "/", className, showBr
3072
3072
  onDrop: handleNativeDrop,
3073
3073
  children: [
3074
3074
  isDragOver && /* @__PURE__ */ jsx("div", {
3075
- className: "absolute inset-0 z-50 bg-blue-500/10 border-2 border-dashed border-blue-500 rounded-lg flex items-center justify-center pointer-events-none",
3075
+ className: "absolute inset-0 z-50 bg-primary/10 border-2 border-dashed border-primary rounded-lg flex items-center justify-center pointer-events-none",
3076
3076
  children: /* @__PURE__ */ jsxs("div", {
3077
- className: "flex flex-col items-center gap-2 text-blue-600 dark:text-blue-400",
3077
+ className: "flex flex-col items-center gap-2 text-primary",
3078
3078
  children: [
3079
3079
  /* @__PURE__ */ jsx(Upload, { className: "w-8 h-8" }),
3080
3080
  /* @__PURE__ */ jsx("p", {
@@ -3395,78 +3395,6 @@ const FileBrowserItemComponent = observer(({ item, isSelected = false, isHovered
3395
3395
  FileBrowserItemComponent.displayName = "FileBrowserItem";
3396
3396
  var FileBrowserItem_default = FileBrowserItemComponent;
3397
3397
 
3398
- //#endregion
3399
- //#region src/file-browser/components/shared/ErrorBoundary.tsx
3400
- var ErrorBoundary = class extends Component {
3401
- constructor(props) {
3402
- super(props);
3403
- this.handleReset = () => {
3404
- this.setState({
3405
- hasError: false,
3406
- error: null,
3407
- errorInfo: null
3408
- });
3409
- };
3410
- this.state = {
3411
- hasError: false,
3412
- error: null,
3413
- errorInfo: null
3414
- };
3415
- }
3416
- static getDerivedStateFromError(error) {
3417
- return {
3418
- hasError: true,
3419
- error
3420
- };
3421
- }
3422
- componentDidCatch(error, errorInfo) {
3423
- const errorInfoString = errorInfo.componentStack || "";
3424
- this.setState({ errorInfo: errorInfoString });
3425
- this.props.onError?.(error, errorInfoString);
3426
- console.error("FileBrowser Error Boundary caught an error:", error);
3427
- console.error("Error Info:", errorInfo);
3428
- }
3429
- render() {
3430
- if (this.state.hasError) {
3431
- const { fallback, className } = this.props;
3432
- const { error, errorInfo } = this.state;
3433
- if (fallback && error) return fallback(error, errorInfo || "", this.handleReset);
3434
- return /* @__PURE__ */ jsxs("div", {
3435
- className: cn("flex flex-col items-center justify-center p-8 text-center border border-destructive/20 rounded-lg bg-destructive/5", className),
3436
- role: "alert",
3437
- "aria-live": "assertive",
3438
- children: [
3439
- /* @__PURE__ */ jsx(AlertTriangle, {
3440
- className: "w-12 h-12 text-destructive mb-4",
3441
- "aria-hidden": "true"
3442
- }),
3443
- /* @__PURE__ */ jsx("h2", {
3444
- className: "text-lg font-semibold text-destructive mb-2",
3445
- children: "Something went wrong"
3446
- }),
3447
- /* @__PURE__ */ jsx("p", {
3448
- className: "text-sm text-muted-foreground mb-4 max-w-md",
3449
- children: error?.message || "An unexpected error occurred while rendering the file browser."
3450
- }),
3451
- /* @__PURE__ */ jsxs("div", {
3452
- className: "flex gap-2",
3453
- children: [/* @__PURE__ */ jsx("button", {
3454
- onClick: this.handleReset,
3455
- className: "px-4 py-2 bg-primary text-primary-foreground rounded-md hover:bg-primary/90 focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 transition-colors",
3456
- children: "Try Again"
3457
- }), /* @__PURE__ */ jsx("button", {
3458
- onClick: () => window.location.reload(),
3459
- className: "px-4 py-2 bg-secondary text-secondary-foreground rounded-md hover:bg-secondary/90 focus:outline-none focus:ring-2 focus:ring-secondary focus:ring-offset-2 transition-colors",
3460
- children: "Reload Page"
3461
- })]
3462
- })
3463
- ]
3464
- });
3465
- }
3466
- return this.props.children;
3467
- }
3468
- };
3469
-
3470
3398
  //#endregion
3471
3399
  //#region src/file-browser/providers/FileSystemProvider.ts
3472
3400
  var FileSystemProvider = class {
@@ -3650,20 +3578,20 @@ var FileSystemProvider = class {
3650
3578
  }
3651
3579
  return null;
3652
3580
  }
3653
- canPerformAction(action, items) {
3581
+ canPerformAction(action$1, items) {
3654
3582
  const supportedActions = [
3655
3583
  "delete",
3656
3584
  "rename",
3657
3585
  "copy",
3658
3586
  "move"
3659
3587
  ];
3660
- return supportedActions.includes(action) && items.length > 0;
3588
+ return supportedActions.includes(action$1) && items.length > 0;
3661
3589
  }
3662
- async performAction(action, items) {
3663
- console.log(`Performing action ${action} on items:`, items);
3590
+ async performAction(action$1, items) {
3591
+ console.log(`Performing action ${action$1} on items:`, items);
3664
3592
  return {
3665
3593
  success: true,
3666
- message: `${action} completed`
3594
+ message: `${action$1} completed`
3667
3595
  };
3668
3596
  }
3669
3597
  async initialize() {}
@@ -3976,7 +3904,7 @@ var GitRepositoryProvider = class {
3976
3904
  }
3977
3905
  return null;
3978
3906
  }
3979
- canPerformAction(action, items) {
3907
+ canPerformAction(action$1, items) {
3980
3908
  const gitActions = [
3981
3909
  "stage",
3982
3910
  "unstage",
@@ -3987,11 +3915,11 @@ var GitRepositoryProvider = class {
3987
3915
  ];
3988
3916
  const basicActions = ["view", "copy"];
3989
3917
  const supportedActions = [...gitActions, ...basicActions];
3990
- return supportedActions.includes(action) && items.length > 0;
3918
+ return supportedActions.includes(action$1) && items.length > 0;
3991
3919
  }
3992
- async performAction(action, items) {
3993
- this.log(`Performing git action ${action} on items:`, items);
3994
- switch (action) {
3920
+ async performAction(action$1, items) {
3921
+ this.log(`Performing git action ${action$1} on items:`, items);
3922
+ switch (action$1) {
3995
3923
  case "stage": return {
3996
3924
  success: true,
3997
3925
  message: `Staged ${items.length} files`
@@ -4018,7 +3946,7 @@ var GitRepositoryProvider = class {
4018
3946
  };
4019
3947
  default: return {
4020
3948
  success: true,
4021
- message: `${action} completed`
3949
+ message: `${action$1} completed`
4022
3950
  };
4023
3951
  }
4024
3952
  }
@@ -4396,8 +4324,8 @@ var GitProvider = class {
4396
4324
  return null;
4397
4325
  }
4398
4326
  }
4399
- canPerformAction(action, items) {
4400
- switch (action) {
4327
+ canPerformAction(action$1, items) {
4328
+ switch (action$1) {
4401
4329
  case "git-checkout":
4402
4330
  case "git-diff":
4403
4331
  case "git-history": return items.length === 1;
@@ -4406,14 +4334,14 @@ var GitProvider = class {
4406
4334
  default: return false;
4407
4335
  }
4408
4336
  }
4409
- async performAction(action, items) {
4410
- switch (action) {
4337
+ async performAction(action$1, items) {
4338
+ switch (action$1) {
4411
4339
  case "git-checkout": throw new Error("Git checkout action not implemented yet");
4412
4340
  case "git-diff": throw new Error("Git diff action not implemented yet");
4413
4341
  case "git-history": throw new Error("Git history action not implemented yet");
4414
4342
  case "git-stage": throw new Error("Git stage action not implemented yet");
4415
4343
  case "git-unstage": throw new Error("Git unstage action not implemented yet");
4416
- default: throw new Error(`Unknown Git action: ${action}`);
4344
+ default: throw new Error(`Unknown Git action: ${action$1}`);
4417
4345
  }
4418
4346
  }
4419
4347
  async initialize() {
@@ -4762,9 +4690,9 @@ var ToolbarManagerModel = class {
4762
4690
  constructor(owner) {
4763
4691
  this.toolbarActions = observable.map();
4764
4692
  this.contextActions = observable.map();
4765
- this.addAction = (action) => {
4766
- this.owner.logger?.info(`addAction: ${action.id} (${action.category || "default"})`);
4767
- this.toolbarActions.set(action.id, action);
4693
+ this.addAction = (action$1) => {
4694
+ this.owner.logger?.info(`addAction: ${action$1.id} (${action$1.category || "default"})`);
4695
+ this.toolbarActions.set(action$1.id, action$1);
4768
4696
  };
4769
4697
  this.removeAction = (actionId) => {
4770
4698
  this.owner.logger?.info(`removeAction: ${actionId}`);
@@ -4780,31 +4708,31 @@ var ToolbarManagerModel = class {
4780
4708
  });
4781
4709
  }
4782
4710
  };
4783
- this.addContextAction = (action) => {
4784
- this.owner.logger?.info(`addContextAction: ${action.id}`);
4785
- this.contextActions.set(action.id, action);
4711
+ this.addContextAction = (action$1) => {
4712
+ this.owner.logger?.info(`addContextAction: ${action$1.id}`);
4713
+ this.contextActions.set(action$1.id, action$1);
4786
4714
  };
4787
4715
  this.removeContextAction = (actionId) => {
4788
4716
  this.owner.logger?.info(`removeContextAction: ${actionId}`);
4789
4717
  this.contextActions.delete(actionId);
4790
4718
  };
4791
4719
  this.getAvailableActions = (context) => {
4792
- return this.allToolbarActions.filter((action) => {
4793
- if (action.isVisible && !action.isVisible(context)) return false;
4794
- if (action.isEnabled && !action.isEnabled(context)) return false;
4720
+ return this.allToolbarActions.filter((action$1) => {
4721
+ if (action$1.isVisible && !action$1.isVisible(context)) return false;
4722
+ if (action$1.isEnabled && !action$1.isEnabled(context)) return false;
4795
4723
  return true;
4796
4724
  });
4797
4725
  };
4798
4726
  this.getContextActionsForItem = (context) => {
4799
- return this.allContextActions.filter((action) => {
4800
- if (action.isVisible && !action.isVisible(context)) return false;
4801
- if (action.isEnabled && !action.isEnabled(context)) return false;
4727
+ return this.allContextActions.filter((action$1) => {
4728
+ if (action$1.isVisible && !action$1.isVisible(context)) return false;
4729
+ if (action$1.isEnabled && !action$1.isEnabled(context)) return false;
4802
4730
  return true;
4803
4731
  });
4804
4732
  };
4805
4733
  this.canExecuteAction = (actionId, context) => {
4806
- const action = this.toolbarActions.get(actionId);
4807
- if (!action) return false;
4734
+ const action$1 = this.toolbarActions.get(actionId);
4735
+ if (!action$1) return false;
4808
4736
  const availableActions = this.getAvailableActions(context);
4809
4737
  return availableActions.some((a) => a.id === actionId);
4810
4738
  };
@@ -4817,15 +4745,15 @@ var ToolbarManagerModel = class {
4817
4745
  this.setActions = (actions) => {
4818
4746
  this.owner.logger?.info(`setActions: ${actions.length} actions`);
4819
4747
  this.toolbarActions.clear();
4820
- actions.forEach((action) => {
4821
- this.toolbarActions.set(action.id, action);
4748
+ actions.forEach((action$1) => {
4749
+ this.toolbarActions.set(action$1.id, action$1);
4822
4750
  });
4823
4751
  };
4824
4752
  this.setContextActions = (actions) => {
4825
4753
  this.owner.logger?.info(`setContextActions: ${actions.length} actions`);
4826
4754
  this.contextActions.clear();
4827
- actions.forEach((action) => {
4828
- this.contextActions.set(action.id, action);
4755
+ actions.forEach((action$1) => {
4756
+ this.contextActions.set(action$1.id, action$1);
4829
4757
  });
4830
4758
  };
4831
4759
  this.clearAllActions = () => {
@@ -4837,10 +4765,10 @@ var ToolbarManagerModel = class {
4837
4765
  this.owner = owner;
4838
4766
  }
4839
4767
  get globalActions() {
4840
- return Array.from(this.toolbarActions.values()).filter((action) => action.category === "global");
4768
+ return Array.from(this.toolbarActions.values()).filter((action$1) => action$1.category === "global");
4841
4769
  }
4842
4770
  get selectionActions() {
4843
- return Array.from(this.toolbarActions.values()).filter((action) => action.category === "selection");
4771
+ return Array.from(this.toolbarActions.values()).filter((action$1) => action$1.category === "selection");
4844
4772
  }
4845
4773
  get allToolbarActions() {
4846
4774
  return Array.from(this.toolbarActions.values());
@@ -5745,16 +5673,16 @@ const FileBrowserHeader = observer(({ model, toolbarManager, className, showBrea
5745
5673
  if (actions.length === 0) return /* @__PURE__ */ jsx("div", { className: "flex items-center gap-1" });
5746
5674
  return /* @__PURE__ */ jsx("div", {
5747
5675
  className: "flex items-center gap-1",
5748
- children: actions.map((action) => /* @__PURE__ */ jsx("button", {
5749
- onClick: () => action.action(context),
5750
- disabled: action.isEnabled ? !action.isEnabled(context) : false,
5751
- className: cn("flex items-center gap-1 px-2 py-1 rounded-md text-sm transition-colors", "hover:bg-muted disabled:opacity-50 disabled:cursor-not-allowed", action.variant === "primary" && "bg-primary text-primary-foreground hover:bg-primary/90", action.variant === "destructive" && "text-destructive hover:bg-destructive/10"),
5752
- title: action.tooltip || action.label,
5753
- children: action.showLabel !== false && /* @__PURE__ */ jsx("span", {
5676
+ children: actions.map((action$1) => /* @__PURE__ */ jsx("button", {
5677
+ onClick: () => action$1.action(context),
5678
+ disabled: action$1.isEnabled ? !action$1.isEnabled(context) : false,
5679
+ className: cn("flex items-center gap-1 px-2 py-1 rounded-md text-sm transition-colors", "hover:bg-muted disabled:opacity-50 disabled:cursor-not-allowed", action$1.variant === "primary" && "bg-primary text-primary-foreground hover:bg-primary/90", action$1.variant === "destructive" && "text-destructive hover:bg-destructive/10"),
5680
+ title: action$1.tooltip || action$1.label,
5681
+ children: action$1.showLabel !== false && /* @__PURE__ */ jsx("span", {
5754
5682
  className: "hidden sm:inline",
5755
- children: action.label
5683
+ children: action$1.label
5756
5684
  })
5757
- }, action.id))
5685
+ }, action$1.id))
5758
5686
  });
5759
5687
  };
5760
5688
  return /* @__PURE__ */ jsxs("header", {
@@ -6751,5 +6679,5 @@ ViewModeToggle.displayName = "ViewModeToggle";
6751
6679
  var ViewModeToggle_default = ViewModeToggle;
6752
6680
 
6753
6681
  //#endregion
6754
- export { ErrorBoundary, FileBrowser, FileBrowserContent_default, FileBrowserHeader_default, FileBrowserItem_default, FileBrowserModel, FileIcon_default, FileSystemBridge, FileSystemListProvider, FileSystemProvider, FileSystemTreeProvider, GitProvider, GitRepositoryProvider, ListViewUIModel, ListView_default, NavigationButtons_default, NavigationManagerModel, SelectionManagerModel, ThumbnailViewUIModel, ToolbarManagerModel, TreeViewUIModel, TreeView_default, UploadModel, ViewModeManagerModel, ViewModeToggle_default, ViewerHost, ViewerHostModel, ViewerRegistry, globalViewerRegistry, viewerConfigToPlugin };
6755
- //# sourceMappingURL=file-browser-m5atC3kF.js.map
6682
+ export { FileBrowser, FileBrowserContent_default, FileBrowserHeader_default, FileBrowserItem_default, FileBrowserModel, FileIcon_default, FileSystemBridge, FileSystemListProvider, FileSystemProvider, FileSystemTreeProvider, GitProvider, GitRepositoryProvider, ListViewUIModel, ListView_default, NavigationButtons_default, NavigationManagerModel, SelectionManagerModel, ThumbnailViewUIModel, ToolbarManagerModel, TreeViewUIModel, TreeView_default, UploadModel, ViewModeManagerModel, ViewModeToggle_default, ViewerHost, ViewerHostModel, ViewerRegistry, globalViewerRegistry, viewerConfigToPlugin };
6683
+ //# sourceMappingURL=file-browser-CkhNwADU.js.map