@mcp-b/react-components 0.71.1 → 0.72.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 (154) hide show
  1. package/dist/{AgentComputer-CpS9R2KG.d.ts → AgentComputer-BI8RsGzq.d.ts} +11 -1
  2. package/dist/{AgentComputer-CsWDnHwj.js → AgentComputer-KhPwXwh8.js} +256 -247
  3. package/dist/{ChatGptSignInScreen-CmbBe09G.js → ChatGptSignInScreen-CLq5cetL.js} +1 -1
  4. package/dist/{CodeBlock-dt0L8md0.js → CodeBlock-ZG47S5e4.js} +1 -1
  5. package/dist/{ComputerCalendar-Z6k_DVJF.js → ComputerCalendar-B3xdMl90.js} +565 -478
  6. package/dist/{ComputerPresentation-BEQKYAjc.js → ComputerPresentation-rzx6n36S.js} +26 -4
  7. package/dist/{ExecutionResult-CXnGcmM4.js → ExecutionResult-BojdvFEY.js} +2 -2
  8. package/dist/{FileTree-CjfzpN6X.js → FileTree-C7fh3_H5.js} +1 -1
  9. package/dist/{ManagerOffice-BJ2vs-Lr.js → ManagerOffice-80ZkVjSt.js} +1 -1
  10. package/dist/{SetupChecklist-DwscX3Bw.js → SetupChecklist-BKCMkUuh.js} +1 -1
  11. package/dist/{ThinkSchedule-9nzxIoX1.d.ts → ThinkSchedule-C9vErgZQ.d.ts} +2 -3
  12. package/dist/{WorkspaceBrowser-mRScUczT.js → WorkspaceBrowser-BFdnZrm7.js} +2 -2
  13. package/dist/components/agents-sdk/AIProviderDialog.js +1 -1
  14. package/dist/components/agents-sdk/AgentActivity.js +1 -1
  15. package/dist/components/agents-sdk/AgentChat.js +1 -1
  16. package/dist/components/agents-sdk/AgentComputer.d.ts +1 -1
  17. package/dist/components/agents-sdk/AgentComputer.js +1 -1
  18. package/dist/components/agents-sdk/AgentScreenSwitcher.js +1 -1
  19. package/dist/components/agents-sdk/BrowserLiveScreen.js +1 -1
  20. package/dist/components/agents-sdk/BrowserLiveView.js +1 -1
  21. package/dist/components/agents-sdk/BrowserReplay.js +1 -1
  22. package/dist/components/agents-sdk/BrowserRunPanel.js +1 -1
  23. package/dist/components/agents-sdk/ComputerAutomations.d.ts +13 -3
  24. package/dist/components/agents-sdk/ComputerAutomations.js +77 -80
  25. package/dist/components/agents-sdk/ComputerCalendar.d.ts +22 -2
  26. package/dist/components/agents-sdk/ComputerCalendar.js +1 -1
  27. package/dist/components/agents-sdk/ComputerChannels.d.ts +51 -0
  28. package/dist/components/agents-sdk/ComputerChannels.js +311 -0
  29. package/dist/components/agents-sdk/ComputerFiles.d.ts +1 -1
  30. package/dist/components/agents-sdk/ComputerFiles.js +4 -4
  31. package/dist/components/agents-sdk/ComputerHome.js +1 -1
  32. package/dist/components/agents-sdk/ComputerLayout.d.ts +1 -1
  33. package/dist/components/agents-sdk/ComputerNotifications.js +1 -1
  34. package/dist/components/agents-sdk/ComputerPresentation.d.ts +2 -2
  35. package/dist/components/agents-sdk/ComputerPresentation.js +2 -2
  36. package/dist/components/agents-sdk/ComputerScreen.d.ts +1 -1
  37. package/dist/components/agents-sdk/ComputerScreen.js +3 -3
  38. package/dist/components/agents-sdk/ComputerSettings.d.ts +1 -1
  39. package/dist/components/agents-sdk/ComputerSettings.js +4 -4
  40. package/dist/components/agents-sdk/ComputerSpotlight.js +1 -1
  41. package/dist/components/agents-sdk/ComputerViewer.js +1 -1
  42. package/dist/components/agents-sdk/EmployeeApp.js +1 -1
  43. package/dist/components/agents-sdk/EmployeeChat.js +1 -1
  44. package/dist/components/agents-sdk/EmployeeChrome.js +2 -2
  45. package/dist/components/agents-sdk/EmployeeSchedules.d.ts +1 -1
  46. package/dist/components/agents-sdk/EmployeeSchedules.js +1 -1
  47. package/dist/components/agents-sdk/EmployeeStartScreen.js +2 -2
  48. package/dist/components/agents-sdk/ExecutionBoard.js +3 -3
  49. package/dist/components/agents-sdk/ManagerAccountActions.js +1 -1
  50. package/dist/components/agents-sdk/ManagerOffice.d.ts +2 -2
  51. package/dist/components/agents-sdk/ManagerOffice.js +1 -1
  52. package/dist/components/agents-sdk/ManagerOfficeScreens.js +2 -2
  53. package/dist/components/agents-sdk/McpConnectionRequest.js +1 -1
  54. package/dist/components/agents-sdk/McpPluginCatalog.js +1 -1
  55. package/dist/components/agents-sdk/McpServerPicker.js +1 -1
  56. package/dist/components/agents-sdk/ModelSelector.js +1 -1
  57. package/dist/components/agents-sdk/PromptInputCommands.js +1 -1
  58. package/dist/components/agents-sdk/SubagentRunIndicator.js +1 -1
  59. package/dist/components/agents-sdk/SubagentRunPanel.js +1 -1
  60. package/dist/components/agents-sdk/ThinkChatToolPanels.js +2 -2
  61. package/dist/components/agents-sdk/ThinkExecutionStatus.js +1 -1
  62. package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +1 -1
  63. package/dist/components/agents-sdk/ThinkSchedule.d.ts +1 -1
  64. package/dist/components/agents-sdk/ThinkSchedule.js +2 -2
  65. package/dist/components/agents-sdk/ThinkScheduleActions.d.ts +1 -1
  66. package/dist/components/agents-sdk/ThinkScheduleActions.js +1 -1
  67. package/dist/components/agents-sdk/ThinkScheduleBrowser.d.ts +1 -1
  68. package/dist/components/agents-sdk/ThinkScheduleBrowser.js +1 -1
  69. package/dist/components/agents-sdk/ThinkScheduleDetail.d.ts +1 -1
  70. package/dist/components/agents-sdk/ThinkScheduleDetail.js +2 -2
  71. package/dist/components/agents-sdk/ThinkScheduleForm.js +4 -4
  72. package/dist/components/agents-sdk/ThinkThreadPicker.js +1 -1
  73. package/dist/components/agents-sdk/WorkbenchBack.js +1 -1
  74. package/dist/components/agents-sdk/WorkspaceAutomation.js +5 -5
  75. package/dist/components/agents-sdk/WorkspaceAutomationTable.js +4 -4
  76. package/dist/components/agents-sdk/WorkspaceBrowser.js +1 -1
  77. package/dist/components/agents-sdk/WorkspaceCorrespondence.js +3 -3
  78. package/dist/components/agents-sdk/WorkspaceDesktop.js +326 -162
  79. package/dist/components/agents-sdk/WorkspaceExplorer.js +2 -2
  80. package/dist/components/agents-sdk/WorkspaceFileDetails.js +2 -2
  81. package/dist/components/agents-sdk/WorkspaceFileView.js +5 -5
  82. package/dist/components/agents-sdk/WorkspaceHeader.js +1 -1
  83. package/dist/components/agents-sdk/WorkspacePerson.js +3 -3
  84. package/dist/components/agents-sdk/WorkspaceProject.js +4 -4
  85. package/dist/components/ai-sdk/Activity.js +1 -1
  86. package/dist/components/ai-sdk/AgentChatStartScreen.js +1 -1
  87. package/dist/components/ai-sdk/Approval.js +1 -1
  88. package/dist/components/ai-sdk/Artifact.js +1 -1
  89. package/dist/components/ai-sdk/ChainOfThought.d.ts +1 -1
  90. package/dist/components/ai-sdk/ChainOfThought.js +1 -1
  91. package/dist/components/ai-sdk/Checkpoint.js +1 -1
  92. package/dist/components/ai-sdk/CodeBlock.js +1 -1
  93. package/dist/components/ai-sdk/ComposerLink.js +1 -1
  94. package/dist/components/ai-sdk/ConnectedAppCards.js +2 -2
  95. package/dist/components/ai-sdk/Conversation.js +1 -1
  96. package/dist/components/ai-sdk/Goal.js +1 -1
  97. package/dist/components/ai-sdk/MediaPreviewCard.js +1 -1
  98. package/dist/components/ai-sdk/Message.js +2 -2
  99. package/dist/components/ai-sdk/MessageScroller.js +1 -1
  100. package/dist/components/ai-sdk/MessageScrollerVirtual.js +1 -1
  101. package/dist/components/ai-sdk/Plan.js +1 -1
  102. package/dist/components/ai-sdk/PromptInput.js +1 -1
  103. package/dist/components/ai-sdk/Queue.js +1 -1
  104. package/dist/components/ai-sdk/Reasoning.js +1 -1
  105. package/dist/components/ai-sdk/Sources.js +1 -1
  106. package/dist/components/ai-sdk/Task.js +1 -1
  107. package/dist/components/extension/ChatGptSignInScreen.js +1 -1
  108. package/dist/components/extension/CodexModelSelector.js +1 -1
  109. package/dist/components/extension/ConversationTabPicker.js +1 -1
  110. package/dist/components/extension/FirstRunSetup.d.ts +1 -1
  111. package/dist/components/extension/FirstRunSetup.js +1 -1
  112. package/dist/components/foundations/Checkbox.js +1 -1
  113. package/dist/components/foundations/ContextMenu.js +1 -1
  114. package/dist/components/foundations/Favicon.js +1 -1
  115. package/dist/components/foundations/Menubar.js +1 -1
  116. package/dist/components/foundations/SearchField.js +1 -1
  117. package/dist/components/foundations/Select.js +1 -1
  118. package/dist/components/foundations/Stepper.js +1 -1
  119. package/dist/components/foundations/Toast.js +1 -1
  120. package/dist/components/foundations/icons.d.ts +2 -2
  121. package/dist/components/foundations/icons.js +2 -2
  122. package/dist/components/general-purpose/CommandPalette.js +1 -1
  123. package/dist/components/general-purpose/Commit.js +2 -2
  124. package/dist/components/general-purpose/EnvironmentVariables.js +2 -2
  125. package/dist/components/general-purpose/FileTree.js +1 -1
  126. package/dist/components/general-purpose/PricingPlanCard.js +1 -1
  127. package/dist/components/general-purpose/ResponsiveSidebarShell.js +1 -1
  128. package/dist/components/general-purpose/SetupChecklist.js +1 -1
  129. package/dist/components/general-purpose/TestResults.js +1 -1
  130. package/dist/components/general-purpose/ThemeModeControl.js +1 -1
  131. package/dist/components/general-purpose/WallpaperPicker.js +1 -1
  132. package/dist/components/general-purpose/WebPreview.js +1 -1
  133. package/dist/components/nanites/AgentConnection.js +2 -2
  134. package/dist/components/nanites/AgentToolDetail.js +1 -1
  135. package/dist/{connected-app-drafts-C49343p9.js → connected-app-drafts-D2ijldOR.js} +2 -2
  136. package/dist/{copy-button-DWBVJR6D.js → copy-button-UNBY7oXF.js} +1 -1
  137. package/dist/{icons-B3n7zvU7.d.ts → icons-CMPZtOxO.d.ts} +2 -1
  138. package/dist/{icons-nLTnB9kd.js → icons-CNwk7DEu.js} +3 -2
  139. package/dist/{parts-BFK5iocu.js → parts-Bb1aZP2y.js} +1 -1
  140. package/dist/{scheduled-table-source-gGpVJ1TN.js → scheduled-table-source-6YdnC3Sh.js} +1 -1
  141. package/dist/styles/app-top-bar.css +1 -1
  142. package/dist/styles/computer-calendar.css +12 -0
  143. package/dist/styles/computer-channels.css +87 -0
  144. package/dist/styles/index.css +1 -0
  145. package/dist/styles/list-detail.css +1 -2
  146. package/dist/styles/recipes.css +2 -2
  147. package/dist/styles/search-field.css +1 -1
  148. package/dist/styles/workspace-desktop.css +11 -7
  149. package/dist/{workspace-assets-DdtnBDU3.js → workspace-assets-CadpUKoz.js} +1 -1
  150. package/dist/{workspace-concept-panel-VkjvFCY_.js → workspace-concept-panel-CzxPyGpN.js} +1 -1
  151. package/dist/{workspace-delete-BOY6CMBf.js → workspace-delete-D9ZesEdu.js} +1 -1
  152. package/dist/{workspace-media-preview-B4iB5Tvi.js → workspace-media-preview-kXaEY4AN.js} +1 -1
  153. package/dist/{workspace-quick-look-8cbGu1Xf.js → workspace-quick-look-BDD-jXn3.js} +2 -2
  154. package/package.json +2 -2
@@ -1,14 +1,60 @@
1
+ import { a as workspaceDirname } from "../../workspace-path-TZggP-u4.js";
1
2
  import { describeWorkspaceFile } from "./WorkspaceFile.js";
2
3
  import { d as isHiddenWorkspaceEntry } from "../../WorkspaceFileTransfer-D2cOoVyO.js";
3
- import { r as useWorkspaceDragAndDrop } from "../../workspace-drag-BNhZIN8F.js";
4
- import { c as PortalContext, i as ComputerContext, n as AppHostsContext } from "../../context-BWJpR084.js";
4
+ import { r as useWorkspaceDragAndDrop, t as WORKSPACE_DRAG_TYPE } from "../../workspace-drag-BNhZIN8F.js";
5
+ import { c as PortalContext, i as ComputerContext, l as PresentationContext, n as AppHostsContext } from "../../context-BWJpR084.js";
5
6
  import { a as hasModifier, i as fileGridOption, n as FileGrid } from "../../ComputerFileThumbnail-CXHy127c.js";
6
7
  import { ContextMenu } from "../foundations/ContextMenu.js";
7
- import { i as WorkspaceThumbnailContext, n as useWorkspaceSelection, r as WorkspaceFileTile, t as WorkspaceQuickLook } from "../../workspace-quick-look-8cbGu1Xf.js";
8
+ import { i as WorkspaceThumbnailContext, n as useWorkspaceSelection, r as WorkspaceFileTile, t as WorkspaceQuickLook } from "../../workspace-quick-look-BDD-jXn3.js";
8
9
  import { c } from "react/compiler-runtime";
9
10
  import * as React from "react";
10
- import { jsx, jsxs } from "react/jsx-runtime";
11
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
11
12
  //#region src/components/agents-sdk/WorkspaceDesktop.tsx
13
+ const NO_ICONS = {};
14
+ const subscribeNothing = () => () => {};
15
+ const key = ({ column, row }) => `${column},${row}`;
16
+ /**
17
+ * Where each icon sits: a saved cell, clamped into the grid shown, or else the
18
+ * first free cell in macOS order — down the rightmost column, then leftwards.
19
+ */
20
+ function arrangeIcons(paths, saved, grid) {
21
+ const cells = /* @__PURE__ */ new Map();
22
+ const taken = /* @__PURE__ */ new Set();
23
+ const unplaced = [];
24
+ for (const path of paths) {
25
+ const at = saved[path];
26
+ const cell = at && {
27
+ column: Math.min(at.column, grid.columns - 1),
28
+ row: Math.min(at.row, grid.rows - 1)
29
+ };
30
+ if (!cell || taken.has(key(cell))) unplaced.push(path);
31
+ else {
32
+ cells.set(path, cell);
33
+ taken.add(key(cell));
34
+ }
35
+ }
36
+ let next = 0;
37
+ for (const path of unplaced) {
38
+ const cell = freeCell(next, grid.rows, taken);
39
+ next = cell.column * grid.rows + cell.row + 1;
40
+ cells.set(path, cell);
41
+ taken.add(key(cell));
42
+ }
43
+ return {
44
+ cells,
45
+ taken
46
+ };
47
+ }
48
+ /** The first cell not taken at or after `index`, counting down each column from the right. */
49
+ function freeCell(index, rows, taken) {
50
+ for (let i = index;; i++) {
51
+ const cell = {
52
+ column: Math.floor(i / rows),
53
+ row: i % rows
54
+ };
55
+ if (!taken.has(key(cell))) return cell;
56
+ }
57
+ }
12
58
  /**
13
59
  * Workspace objects on a desktop: one tab stop, then the arrow keys move the
14
60
  * selection as on the Finder desktop. Empty space or Escape clears selection,
@@ -20,36 +66,124 @@ import { jsx, jsxs } from "react/jsx-runtime";
20
66
  * object or on the desktop. Dialog owns dismissal and focus containment.
21
67
  */
22
68
  function WorkspaceDesktop(t0) {
23
- const $ = c(44);
69
+ const $ = c(53);
24
70
  const { entries: listed, directory: t1, onOpen, renderPreview, dragAndDrop, commands } = t0;
25
71
  const directory = t1 === void 0 ? "/" : t1;
26
72
  const entries = listed.filter(_temp);
27
73
  const { dragSource, dropTarget } = useWorkspaceDragAndDrop(dragAndDrop);
28
74
  const root = React.useRef(null);
29
75
  const listbox = React.useRef(null);
76
+ const presentation = React.use(PresentationContext);
77
+ const [unsavedIcons, setUnsavedIcons] = React.useState(NO_ICONS);
78
+ let t2;
79
+ if ($[0] !== presentation || $[1] !== unsavedIcons) {
80
+ t2 = () => presentation?.get().desktop ?? unsavedIcons;
81
+ $[0] = presentation;
82
+ $[1] = unsavedIcons;
83
+ $[2] = t2;
84
+ } else t2 = $[2];
85
+ const savedIcons = React.useSyncExternalStore(presentation?.subscribe ?? subscribeNothing, t2);
86
+ const saveIcons = presentation?.setDesktopIcons ?? setUnsavedIcons;
87
+ const hasIcons = entries.length > 0;
88
+ let t3;
89
+ if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
90
+ t3 = {
91
+ rows: 1,
92
+ columns: 1,
93
+ width: 1,
94
+ height: 1
95
+ };
96
+ $[3] = t3;
97
+ } else t3 = $[3];
98
+ const [grid, setGrid] = React.useState(t3);
99
+ let t4;
100
+ if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
101
+ t4 = () => {
102
+ const list = listbox.current;
103
+ if (!list) return;
104
+ const measure = () => {
105
+ const icon = list.querySelector(".workspace-desktop__item");
106
+ if (!icon) return;
107
+ const width = icon.offsetWidth || 1;
108
+ const height = icon.offsetHeight || 1;
109
+ const rows = Math.max(1, Math.floor(list.clientHeight / height));
110
+ const columns = Math.max(1, Math.floor(list.clientWidth / width));
111
+ setGrid((current) => current.rows === rows && current.columns === columns && current.width === width && current.height === height ? current : {
112
+ rows,
113
+ columns,
114
+ width,
115
+ height
116
+ });
117
+ };
118
+ measure();
119
+ const observer = new ResizeObserver(measure);
120
+ observer.observe(list);
121
+ return () => observer.disconnect();
122
+ };
123
+ $[4] = t4;
124
+ } else t4 = $[4];
125
+ let t5;
126
+ if ($[5] !== hasIcons) {
127
+ t5 = [hasIcons];
128
+ $[5] = hasIcons;
129
+ $[6] = t5;
130
+ } else t5 = $[6];
131
+ React.useLayoutEffect(t4, t5);
132
+ const arranged = arrangeIcons(entries.map(_temp2), savedIcons, grid);
133
+ const grab = React.useRef(null);
134
+ const surfaceDrop = dragAndDrop ? dropTarget(directory) : {};
135
+ const reposition = (event) => {
136
+ const carried = event.dataTransfer.getData(WORKSPACE_DRAG_TYPE);
137
+ const list_0 = listbox.current;
138
+ if (!carried || !list_0 || event.altKey || !dragAndDrop) return false;
139
+ const { sourceKey, paths } = JSON.parse(carried);
140
+ if (sourceKey !== dragAndDrop.sourceKey || !paths.length || !paths.every((path) => workspaceDirname(path) === directory && arranged.cells.has(path))) return false;
141
+ const held = grab.current && paths.includes(grab.current.path) ? grab.current : null;
142
+ const box = list_0.getBoundingClientRect();
143
+ const column = Math.round((box.right - event.clientX - (held?.right ?? grid.width / 2)) / grid.width);
144
+ const row = Math.round((event.clientY - (held?.top ?? grid.height / 2) - box.top) / grid.height);
145
+ const target = {
146
+ column: Math.min(Math.max(column, 0), grid.columns - 1),
147
+ row: Math.min(Math.max(row, 0), grid.rows - 1)
148
+ };
149
+ const moving = held ? [held.path, ...paths.filter((path_0) => path_0 !== held.path)] : paths;
150
+ const taken = new Set(arranged.taken);
151
+ for (const path_1 of moving) taken.delete(key(arranged.cells.get(path_1)));
152
+ const next = {};
153
+ for (const [path_2, cell] of arranged.cells) next[path_2] = savedIcons[path_2] ?? cell;
154
+ let index = target.column * grid.rows + target.row;
155
+ for (const path_3 of moving) {
156
+ const cell_0 = freeCell(index, grid.rows, taken);
157
+ index = cell_0.column * grid.rows + cell_0.row + 1;
158
+ next[path_3] = cell_0;
159
+ taken.add(key(cell_0));
160
+ }
161
+ saveIcons(next);
162
+ return true;
163
+ };
30
164
  const helpId = React.useId();
31
165
  const portalContainer = React.use(PortalContext);
32
166
  const computer = React.use(ComputerContext);
33
167
  const settings = React.use(AppHostsContext).settings;
34
168
  const thumbnailSource = dragAndDrop?.source;
35
169
  const thumbnailKey = dragAndDrop?.sourceKey;
36
- let t2;
37
- if ($[0] !== thumbnailKey || $[1] !== thumbnailSource) {
38
- t2 = thumbnailSource && thumbnailKey !== void 0 ? {
170
+ let t6;
171
+ if ($[7] !== thumbnailKey || $[8] !== thumbnailSource) {
172
+ t6 = thumbnailSource && thumbnailKey !== void 0 ? {
39
173
  source: thumbnailSource,
40
174
  sourceKey: thumbnailKey
41
175
  } : null;
42
- $[0] = thumbnailKey;
43
- $[1] = thumbnailSource;
44
- $[2] = t2;
45
- } else t2 = $[2];
46
- const thumbnails = t2;
47
- const openPath = (path) => {
48
- const entry_0 = entries.find((candidate) => candidate.path === path);
49
- if (entry_0) onOpen(entry_0);
176
+ $[7] = thumbnailKey;
177
+ $[8] = thumbnailSource;
178
+ $[9] = t6;
179
+ } else t6 = $[9];
180
+ const thumbnails = t6;
181
+ const openPath = (path_4) => {
182
+ const entry_1 = entries.find((candidate) => candidate.path === path_4);
183
+ if (entry_1) onOpen(entry_1);
50
184
  };
51
185
  const view = useWorkspaceSelection({
52
- order: entries.map(_temp2),
186
+ order: entries.map(_temp3),
53
187
  directory,
54
188
  commands,
55
189
  finder: true,
@@ -57,55 +191,47 @@ function WorkspaceDesktop(t0) {
57
191
  open: openPath,
58
192
  quickLook: true
59
193
  });
60
- let t3;
61
- if ($[3] !== view.selected) {
62
- t3 = view.selected.at(-1);
63
- $[3] = view.selected;
64
- $[4] = t3;
65
- } else t3 = $[4];
66
- const selectedPath = t3;
67
- const focusablePath = entries.find((entry_2) => entry_2.path === selectedPath)?.path ?? entries[0]?.path;
68
- let t4;
69
- if ($[5] !== directory || $[6] !== dragAndDrop || $[7] !== dropTarget) {
70
- t4 = dragAndDrop ? dropTarget(directory) : {};
71
- $[5] = directory;
72
- $[6] = dragAndDrop;
73
- $[7] = dropTarget;
74
- $[8] = t4;
75
- } else t4 = $[8];
76
- let t5;
77
- if ($[9] !== view.surfaceProps) {
78
- t5 = (event) => {
79
- view.surfaceProps.onPointerDown(event);
80
- const target = event.target;
81
- if ((event.button === 0 || event.button === 2) && target instanceof Element && !target.closest("[role=\"option\"], input")) listbox.current?.focus({ preventScroll: true });
194
+ let t7;
195
+ if ($[10] !== view.selected) {
196
+ t7 = view.selected.at(-1);
197
+ $[10] = view.selected;
198
+ $[11] = t7;
199
+ } else t7 = $[11];
200
+ const selectedPath = t7;
201
+ const focusablePath = entries.find((entry_3) => entry_3.path === selectedPath)?.path ?? entries[0]?.path;
202
+ let t8;
203
+ if ($[12] !== view.surfaceProps) {
204
+ t8 = (event_2) => {
205
+ view.surfaceProps.onPointerDown(event_2);
206
+ const target_0 = event_2.target;
207
+ if ((event_2.button === 0 || event_2.button === 2) && target_0 instanceof Element && !target_0.closest("[role=\"option\"], input")) listbox.current?.focus({ preventScroll: true });
82
208
  };
83
- $[9] = view.surfaceProps;
84
- $[10] = t5;
85
- } else t5 = $[10];
86
- let t6;
87
- if ($[11] !== helpId) {
88
- t6 = /* @__PURE__ */ jsx("p", {
209
+ $[12] = view.surfaceProps;
210
+ $[13] = t8;
211
+ } else t8 = $[13];
212
+ let t9;
213
+ if ($[14] !== helpId) {
214
+ t9 = /* @__PURE__ */ jsx("p", {
89
215
  id: helpId,
90
216
  className: "sigvelo-visually-hidden",
91
217
  children: "Arrow keys to move. Space to preview. Double-click or Command-Down Arrow to open. Return to rename. Escape to clear selection."
92
218
  });
93
- $[11] = helpId;
94
- $[12] = t6;
95
- } else t6 = $[12];
219
+ $[14] = helpId;
220
+ $[15] = t9;
221
+ } else t9 = $[15];
96
222
  const T0 = WorkspaceThumbnailContext;
97
223
  const T1 = FileGrid;
98
- const t7 = "workspace-desktop__files";
99
- const t8 = entries.length ? -1 : 0;
100
- const t9 = "Desktop files";
101
- const t10 = true;
102
- let t11;
103
- if ($[13] !== selectedPath || $[14] !== view) {
104
- t11 = (event_0) => {
105
- if (event_0.target === event_0.currentTarget && (event_0.key === "ContextMenu" || event_0.key === "F10" && event_0.shiftKey)) {
106
- event_0.preventDefault();
107
- const rect = event_0.currentTarget.getBoundingClientRect();
108
- event_0.currentTarget.dispatchEvent(new MouseEvent("contextmenu", {
224
+ const t10 = "workspace-desktop__files";
225
+ const t11 = entries.length ? -1 : 0;
226
+ const t12 = "Desktop files";
227
+ const t13 = true;
228
+ let t14;
229
+ if ($[16] !== selectedPath || $[17] !== view) {
230
+ t14 = (event_3) => {
231
+ if (event_3.target === event_3.currentTarget && (event_3.key === "ContextMenu" || event_3.key === "F10" && event_3.shiftKey)) {
232
+ event_3.preventDefault();
233
+ const rect = event_3.currentTarget.getBoundingClientRect();
234
+ event_3.currentTarget.dispatchEvent(new MouseEvent("contextmenu", {
109
235
  bubbles: true,
110
236
  cancelable: true,
111
237
  clientX: rect.left + rect.width / 2,
@@ -113,162 +239,200 @@ function WorkspaceDesktop(t0) {
113
239
  }));
114
240
  return;
115
241
  }
116
- if (event_0.key !== "Escape" || !selectedPath || event_0.defaultPrevented || hasModifier(event_0)) return;
117
- event_0.preventDefault();
242
+ if (event_3.key !== "Escape" || !selectedPath || event_3.defaultPrevented || hasModifier(event_3)) return;
243
+ event_3.preventDefault();
118
244
  if (view.quickLook.path) view.quickLook.close();
119
245
  else {
120
246
  view.select([]);
121
- event_0.currentTarget.focus({ preventScroll: true });
247
+ event_3.currentTarget.focus({ preventScroll: true });
122
248
  }
123
249
  };
124
- $[13] = selectedPath;
125
- $[14] = view;
126
- $[15] = t11;
127
- } else t11 = $[15];
128
- const t12 = entries.map((entry_3) => {
129
- const isSelected = view.isSelected(entry_3.path);
130
- const option = view.optionProps(entry_3.path, (event_1, paths) => dragSource(paths).onPointerDown?.(event_1));
250
+ $[16] = selectedPath;
251
+ $[17] = view;
252
+ $[18] = t14;
253
+ } else t14 = $[18];
254
+ const t15 = entries.map((entry_4) => {
255
+ const isSelected = view.isSelected(entry_4.path);
256
+ const option = view.optionProps(entry_4.path, (event_4, paths_0) => dragSource(paths_0).onPointerDown?.(event_4));
131
257
  return /* @__PURE__ */ jsx(WorkspaceFileTile, {
132
258
  className: "workspace-desktop__item",
133
- entry: entry_3,
259
+ style: {
260
+ "--workspace-desktop-column": arranged.cells.get(entry_4.path).column,
261
+ "--workspace-desktop-row": arranged.cells.get(entry_4.path).row
262
+ },
263
+ entry: entry_4,
134
264
  classes: {
135
265
  artwork: "workspace-desktop__thumbnail",
136
266
  name: "workspace-desktop__filename"
137
267
  },
138
- renaming: view.renaming === entry_3.path,
268
+ renaming: view.renaming === entry_4.path,
139
269
  option: /* @__PURE__ */ jsx("button", {
140
270
  type: "button",
141
271
  ...fileGridOption({
142
- path: entry_3.path,
143
- name: entry_3.name,
272
+ path: entry_4.path,
273
+ name: entry_4.name,
144
274
  selected: isSelected,
145
- tabStop: entry_3.path === focusablePath
275
+ tabStop: entry_4.path === focusablePath
146
276
  }),
147
- ...dragSource(isSelected ? view.selected : [entry_3.path]),
148
- ...entry_3.type === "directory" ? dropTarget(entry_3.path, () => onOpen(entry_3)) : {},
277
+ ...dragSource(isSelected ? view.selected : [entry_4.path]),
278
+ ...entry_4.type === "directory" ? dropTarget(entry_4.path, () => onOpen(entry_4)) : {},
149
279
  ...option,
150
280
  className: "workspace-desktop__file",
151
- onClick: (event_2) => {
152
- if (hasModifier(event_2)) return;
153
- view.select([entry_3.path]);
154
- onOpen(entry_3);
281
+ onClick: (event_5) => {
282
+ if (hasModifier(event_5)) return;
283
+ view.select([entry_4.path]);
284
+ onOpen(entry_4);
155
285
  }
156
286
  }),
157
287
  details: /* @__PURE__ */ jsxs("span", {
158
288
  className: "sigvelo-visually-hidden",
159
- children: [", ", describeWorkspaceFile(entry_3).kind]
289
+ children: [", ", describeWorkspaceFile(entry_4).kind]
160
290
  }),
161
- menu: view.menuItems(entry_3.path),
291
+ menu: view.menuItems(entry_4.path),
162
292
  menuFinalFocus: view.menuFinalFocus,
163
- renameField: view.renameField(entry_3.path, entry_3.name, entry_3.type === "directory")
164
- }, entry_3.path);
293
+ renameField: view.renameField(entry_4.path, entry_4.name, entry_4.type === "directory")
294
+ }, entry_4.path);
165
295
  });
166
- let t13;
167
- if ($[16] !== T1 || $[17] !== helpId || $[18] !== t11 || $[19] !== t12 || $[20] !== t8) {
168
- t13 = /* @__PURE__ */ jsx(T1, {
296
+ let t16;
297
+ if ($[19] !== T1 || $[20] !== helpId || $[21] !== t11 || $[22] !== t14 || $[23] !== t15) {
298
+ t16 = /* @__PURE__ */ jsx(T1, {
169
299
  ref: listbox,
170
- className: t7,
171
- tabIndex: t8,
172
- "aria-label": t9,
300
+ className: t10,
301
+ tabIndex: t11,
302
+ "aria-label": t12,
173
303
  "aria-describedby": helpId,
174
- "aria-multiselectable": t10,
175
- onKeyDown: t11,
176
- children: t12
304
+ "aria-multiselectable": t13,
305
+ onKeyDown: t14,
306
+ children: t15
177
307
  });
178
- $[16] = T1;
179
- $[17] = helpId;
180
- $[18] = t11;
181
- $[19] = t12;
182
- $[20] = t8;
183
- $[21] = t13;
184
- } else t13 = $[21];
185
- let t14;
186
- if ($[22] !== T0 || $[23] !== t13 || $[24] !== thumbnails) {
187
- t14 = /* @__PURE__ */ jsx(T0, {
308
+ $[19] = T1;
309
+ $[20] = helpId;
310
+ $[21] = t11;
311
+ $[22] = t14;
312
+ $[23] = t15;
313
+ $[24] = t16;
314
+ } else t16 = $[24];
315
+ let t17;
316
+ if ($[25] !== T0 || $[26] !== t16 || $[27] !== thumbnails) {
317
+ t17 = /* @__PURE__ */ jsx(T0, {
188
318
  value: thumbnails,
189
- children: t13
319
+ children: t16
190
320
  });
191
- $[22] = T0;
192
- $[23] = t13;
193
- $[24] = thumbnails;
194
- $[25] = t14;
195
- } else t14 = $[25];
196
- const t15 = computer?.previewFallbackFocus;
197
- let t16;
198
- if ($[26] !== entries || $[27] !== onOpen || $[28] !== renderPreview || $[29] !== root || $[30] !== t15 || $[31] !== view.quickLook) {
199
- t16 = /* @__PURE__ */ jsx(WorkspaceQuickLook, {
321
+ $[25] = T0;
322
+ $[26] = t16;
323
+ $[27] = thumbnails;
324
+ $[28] = t17;
325
+ } else t17 = $[28];
326
+ const t18 = computer?.previewFallbackFocus;
327
+ let t19;
328
+ if ($[29] !== entries || $[30] !== onOpen || $[31] !== renderPreview || $[32] !== root || $[33] !== t18 || $[34] !== view.quickLook) {
329
+ t19 = /* @__PURE__ */ jsx(WorkspaceQuickLook, {
200
330
  quickLook: view.quickLook,
201
331
  entries,
202
332
  renderPreview,
203
333
  openLabel: "Open in Files",
204
334
  onOpen,
205
335
  surface: root,
206
- fallbackFocus: t15
336
+ fallbackFocus: t18
207
337
  });
208
- $[26] = entries;
209
- $[27] = onOpen;
210
- $[28] = renderPreview;
211
- $[29] = root;
212
- $[30] = t15;
213
- $[31] = view.quickLook;
214
- $[32] = t16;
215
- } else t16 = $[32];
216
- const t17 = view.menuFinalFocus;
217
- let t18;
218
- if ($[33] !== settings || $[34] !== view) {
219
- let t19;
220
- if ($[36] !== settings) {
221
- t19 = settings ? /* @__PURE__ */ jsx(ContextMenu.Item, {
338
+ $[29] = entries;
339
+ $[30] = onOpen;
340
+ $[31] = renderPreview;
341
+ $[32] = root;
342
+ $[33] = t18;
343
+ $[34] = view.quickLook;
344
+ $[35] = t19;
345
+ } else t19 = $[35];
346
+ const t20 = view.menuFinalFocus;
347
+ let t21;
348
+ if ($[36] !== saveIcons || $[37] !== settings || $[38] !== view) {
349
+ let t22;
350
+ if ($[40] !== saveIcons) {
351
+ t22 = /* @__PURE__ */ jsx(ContextMenu.Item, {
352
+ onClick: () => saveIcons(NO_ICONS),
353
+ children: "Clean Up"
354
+ });
355
+ $[40] = saveIcons;
356
+ $[41] = t22;
357
+ } else t22 = $[41];
358
+ let t23;
359
+ if ($[42] !== settings) {
360
+ t23 = settings ? /* @__PURE__ */ jsx(ContextMenu.Item, {
222
361
  onClick: () => settings.open("appearance"),
223
362
  children: "Change background…"
224
- }) : void 0;
225
- $[36] = settings;
226
- $[37] = t19;
227
- } else t19 = $[37];
228
- t18 = view.menuItems(null, t19);
229
- $[33] = settings;
230
- $[34] = view;
231
- $[35] = t18;
232
- } else t18 = $[35];
233
- let t19;
234
- if ($[38] !== t18 || $[39] !== view.menuFinalFocus) {
235
- t19 = /* @__PURE__ */ jsx(ContextMenu.Positioner, { children: /* @__PURE__ */ jsx(ContextMenu.Popup, {
236
- finalFocus: t17,
237
- children: t18
363
+ }) : null;
364
+ $[42] = settings;
365
+ $[43] = t23;
366
+ } else t23 = $[43];
367
+ let t24;
368
+ if ($[44] !== t22 || $[45] !== t23) {
369
+ t24 = /* @__PURE__ */ jsxs(Fragment, { children: [t22, t23] });
370
+ $[44] = t22;
371
+ $[45] = t23;
372
+ $[46] = t24;
373
+ } else t24 = $[46];
374
+ t21 = view.menuItems(null, t24);
375
+ $[36] = saveIcons;
376
+ $[37] = settings;
377
+ $[38] = view;
378
+ $[39] = t21;
379
+ } else t21 = $[39];
380
+ let t22;
381
+ if ($[47] !== t21 || $[48] !== view.menuFinalFocus) {
382
+ t22 = /* @__PURE__ */ jsx(ContextMenu.Positioner, { children: /* @__PURE__ */ jsx(ContextMenu.Popup, {
383
+ finalFocus: t20,
384
+ children: t21
238
385
  }) });
239
- $[38] = t18;
240
- $[39] = view.menuFinalFocus;
241
- $[40] = t19;
242
- } else t19 = $[40];
243
- let t20;
244
- if ($[41] !== portalContainer || $[42] !== t19) {
245
- t20 = /* @__PURE__ */ jsx(ContextMenu.Portal, {
386
+ $[47] = t21;
387
+ $[48] = view.menuFinalFocus;
388
+ $[49] = t22;
389
+ } else t22 = $[49];
390
+ let t23;
391
+ if ($[50] !== portalContainer || $[51] !== t22) {
392
+ t23 = /* @__PURE__ */ jsx(ContextMenu.Portal, {
246
393
  container: portalContainer,
247
- children: t19
394
+ children: t22
248
395
  });
249
- $[41] = portalContainer;
250
- $[42] = t19;
251
- $[43] = t20;
252
- } else t20 = $[43];
396
+ $[50] = portalContainer;
397
+ $[51] = t22;
398
+ $[52] = t23;
399
+ } else t23 = $[52];
253
400
  return /* @__PURE__ */ jsxs(ContextMenu.Root, { children: [/* @__PURE__ */ jsxs(ContextMenu.Trigger, {
254
401
  render: /* @__PURE__ */ jsx("div", {
255
- ...t4,
402
+ ...surfaceDrop,
256
403
  ...view.surfaceProps,
257
404
  ref: root,
258
405
  className: "workspace-desktop",
259
- onPointerDown: t5
406
+ onDragStartCapture: (event_0) => {
407
+ const icon_0 = event_0.target.closest("[data-workspace-path]");
408
+ const box_0 = icon_0?.closest(".workspace-desktop__item")?.getBoundingClientRect();
409
+ grab.current = icon_0 && box_0 ? {
410
+ path: icon_0.dataset.workspacePath,
411
+ right: box_0.right - event_0.clientX,
412
+ top: event_0.clientY - box_0.top
413
+ } : null;
414
+ },
415
+ onDrop: (event_1) => {
416
+ if (!reposition(event_1)) return surfaceDrop.onDrop?.(event_1);
417
+ event_1.preventDefault();
418
+ event_1.stopPropagation();
419
+ },
420
+ onPointerDown: t8
260
421
  }),
261
422
  children: [
262
- t6,
263
- t14,
423
+ t9,
424
+ t17,
264
425
  view.marqueeElement,
265
426
  view.statusElement,
266
- t16
427
+ t19
267
428
  ]
268
- }), t20] });
429
+ }), t23] });
430
+ }
431
+ function _temp3(entry_2) {
432
+ return entry_2.path;
269
433
  }
270
- function _temp2(entry_1) {
271
- return entry_1.path;
434
+ function _temp2(entry_0) {
435
+ return entry_0.path;
272
436
  }
273
437
  function _temp(entry) {
274
438
  return !isHiddenWorkspaceEntry(entry);
@@ -1,12 +1,12 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { k as FolderIcon } from "../../icons-nLTnB9kd.js";
2
+ import { k as FolderIcon } from "../../icons-CNwk7DEu.js";
3
3
  import { n as mergeRefs } from "../../merge-refs-DTX97mLp.js";
4
4
  import { a as workspaceDirname } from "../../workspace-path-TZggP-u4.js";
5
5
  import { AppTopBar } from "../general-purpose/AppTopBar.js";
6
6
  import { n as WorkspaceNavigationProvider, r as resolveWorkspaceLink } from "../../WorkspaceLink-DDkj-Tq5.js";
7
7
  import { WorkspaceNavigationRestorationBoundary, useRequiredWorkspaceNavigationRestoration } from "./WorkspaceNavigationRestoration.js";
8
8
  import { WorkspaceMountManager } from "./WorkspaceMountManager.js";
9
- import { t as WorkspaceBrowser } from "../../WorkspaceBrowser-mRScUczT.js";
9
+ import { t as WorkspaceBrowser } from "../../WorkspaceBrowser-BFdnZrm7.js";
10
10
  import { WorkspaceFileView } from "./WorkspaceFileView.js";
11
11
  import { c } from "react/compiler-runtime";
12
12
  import * as React from "react";
@@ -1,7 +1,7 @@
1
- import { M as InfoIcon } from "../../icons-nLTnB9kd.js";
1
+ import { M as InfoIcon } from "../../icons-CNwk7DEu.js";
2
2
  import { Dialog } from "../foundations/Dialog.js";
3
3
  import { IconButton } from "../foundations/IconButton.js";
4
- import { t as CopyButton } from "../../copy-button-DWBVJR6D.js";
4
+ import { t as CopyButton } from "../../copy-button-UNBY7oXF.js";
5
5
  import { describeWorkspaceFile } from "./WorkspaceFile.js";
6
6
  import { FormattedDate } from "../foundations/FormattedDate.js";
7
7
  import { DescriptionList } from "../foundations/DescriptionList.js";
@@ -1,14 +1,14 @@
1
- import { E as EyeIcon, mt as WarningIcon, p as CheckIcon, r as ArrowLeftIcon, y as CodeIcon } from "../../icons-nLTnB9kd.js";
2
- import { t as CopyButton } from "../../copy-button-DWBVJR6D.js";
1
+ import { E as EyeIcon, ht as WarningIcon, p as CheckIcon, r as ArrowLeftIcon, y as CodeIcon } from "../../icons-CNwk7DEu.js";
2
+ import { t as CopyButton } from "../../copy-button-UNBY7oXF.js";
3
3
  import { inferWorkspaceLanguage, inferWorkspaceMedia, isWorkspaceMarkdownPath, isWorkspaceSkillPath, parseWorkspaceSkill } from "./WorkspaceFile.js";
4
4
  import { AppTopBar } from "../general-purpose/AppTopBar.js";
5
5
  import { t as ContentAppBarOutletContext } from "../../app-bar-outlet-BEIGl9iF.js";
6
6
  import { i as useWorkspaceNavigationContext } from "../../WorkspaceLink-DDkj-Tq5.js";
7
7
  import { useWorkspaceNavigationRestoration } from "./WorkspaceNavigationRestoration.js";
8
- import { t as ExecutionResult } from "../../ExecutionResult-CXnGcmM4.js";
8
+ import { t as ExecutionResult } from "../../ExecutionResult-BojdvFEY.js";
9
9
  import { WorkspaceHeader } from "./WorkspaceHeader.js";
10
- import { i as useWorkspaceAssetUrl, n as WorkspaceMediaPreview, t as WorkspaceAssetActions } from "../../workspace-media-preview-B4iB5Tvi.js";
11
- import { a as CodeBlockCopyButton, i as CodeBlockContent, r as CodeBlockContainer, t as CodeBlock } from "../../CodeBlock-dt0L8md0.js";
10
+ import { i as useWorkspaceAssetUrl, n as WorkspaceMediaPreview, t as WorkspaceAssetActions } from "../../workspace-media-preview-kXaEY4AN.js";
11
+ import { a as CodeBlockCopyButton, i as CodeBlockContent, r as CodeBlockContainer, t as CodeBlock } from "../../CodeBlock-ZG47S5e4.js";
12
12
  import { n as WorkspaceMessageResponse, r as createWorkspaceRehypePlugins } from "../../WorkspaceMessageResponse-CXGOQgpo.js";
13
13
  import { WorkspaceFileDetails } from "./WorkspaceFileDetails.js";
14
14
  import { c } from "react/compiler-runtime";
@@ -1,4 +1,4 @@
1
- import { et as RefreshIcon } from "../../icons-nLTnB9kd.js";
1
+ import { tt as RefreshIcon } from "../../icons-CNwk7DEu.js";
2
2
  import { AppTopBar } from "../general-purpose/AppTopBar.js";
3
3
  import { ResponsiveSidebarAppBar } from "../general-purpose/ResponsiveSidebarShell.js";
4
4
  import { c } from "react/compiler-runtime";
@@ -1,6 +1,6 @@
1
- import { pt as UsersIcon } from "../../icons-nLTnB9kd.js";
2
- import { n as OutboundLink } from "../../workspace-assets-DdtnBDU3.js";
3
- import { n as useConceptEntry, t as WorkspaceConceptPanel } from "../../workspace-concept-panel-VkjvFCY_.js";
1
+ import { mt as UsersIcon } from "../../icons-CNwk7DEu.js";
2
+ import { n as OutboundLink } from "../../workspace-assets-CadpUKoz.js";
3
+ import { n as useConceptEntry, t as WorkspaceConceptPanel } from "../../workspace-concept-panel-CzxPyGpN.js";
4
4
  import { t as WorkspaceEntityCard } from "../../workspace-entity-card-9YcsNiqU.js";
5
5
  import { n as peopleListItems, t as PersonAvatar } from "../../workspace-person-ZwPqu5TX.js";
6
6
  import { c } from "react/compiler-runtime";