@mcp-b/react-components 0.75.1 → 0.75.2
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.
- package/dist/{AgentComputer-KhPwXwh8.js → AgentComputer-B1rKkSUP.js} +14 -14
- package/dist/{AgentComputer-BI8RsGzq.d.ts → AgentComputer-MNiC5pQC.d.ts} +3 -3
- package/dist/{ChatGptSignInScreen-CLq5cetL.js → ChatGptSignInScreen-CeKZ0htx.js} +1 -1
- package/dist/{CodeBlock-ZG47S5e4.js → CodeBlock-DOVQbHdt.js} +1 -1
- package/dist/{ComputerCalendar-B3xdMl90.js → ComputerCalendar-WTEQV--E.js} +9 -9
- package/dist/{ComputerPresentation-rzx6n36S.js → ComputerPresentation-3f4QYD2Z.js} +5 -5
- package/dist/{ExecutionResult-BojdvFEY.js → ExecutionResult-oj5iiK-R.js} +2 -2
- package/dist/{FileTree-C7fh3_H5.js → FileTree-BLQF5D2f.js} +1 -1
- package/dist/{ManagerOffice-80ZkVjSt.js → ManagerOffice-CU_aPVzD.js} +5 -5
- package/dist/{SetupChecklist-BKCMkUuh.js → SetupChecklist-4Qyuw5R1.js} +2 -2
- package/dist/{ThinkSchedule-gDwDmWOF.d.ts → ThinkSchedule-Ce2tV1BF.d.ts} +1 -1
- package/dist/{Workspace-mZddFyvP.d.ts → Workspace-Hw8GhSp9.d.ts} +26 -7
- package/dist/{WorkspaceAutomation-Dugk4RkK.d.ts → WorkspaceAutomation-BiZzDc4y.d.ts} +2 -2
- package/dist/{WorkspaceBrowser-BFdnZrm7.js → WorkspaceBrowser-B7qBJrNE.js} +7 -7
- package/dist/{WorkspaceBrowser-CNVAKXXZ.d.ts → WorkspaceBrowser-DYQIXLO8.d.ts} +5 -4
- package/dist/{WorkspaceConcept-DqzfZWws.d.ts → WorkspaceConcept-EqNa4417.d.ts} +1 -1
- package/dist/{WorkspaceFileCommands-CN2oVUzx.d.ts → WorkspaceFileCommands-DAGsAfrn.d.ts} +2 -2
- package/dist/{WorkspaceFileTransfer-D2cOoVyO.js → WorkspaceFileTransfer-DlCEZRuz.js} +13 -11
- package/dist/{WorkspaceFileTransfer-D--dVla2.d.ts → WorkspaceFileTransfer-gzr9DQvv.d.ts} +1 -1
- package/dist/{codex-model-catalog-CFEGgUAj.d.ts → codex-model-catalog-18yO7dln.d.ts} +8 -8
- package/dist/components/agents-sdk/AIProviderDialog.js +3 -3
- package/dist/components/agents-sdk/AgentActivity.js +1 -1
- package/dist/components/agents-sdk/AgentChat.js +8 -8
- package/dist/components/agents-sdk/AgentComputer.d.ts +1 -1
- package/dist/components/agents-sdk/AgentComputer.js +1 -1
- package/dist/components/agents-sdk/AgentEvent.js +3 -3
- package/dist/components/agents-sdk/AgentScreenSwitcher.js +5 -5
- package/dist/components/agents-sdk/BrowserLiveScreen.js +1 -1
- package/dist/components/agents-sdk/BrowserLiveView.js +1 -1
- package/dist/components/agents-sdk/BrowserReplay.js +3 -3
- package/dist/components/agents-sdk/BrowserRunPanel.js +3 -3
- package/dist/components/agents-sdk/ComputerAutomations.d.ts +3 -3
- package/dist/components/agents-sdk/ComputerAutomations.js +13 -13
- package/dist/components/agents-sdk/ComputerCalendar.d.ts +1 -1
- package/dist/components/agents-sdk/ComputerCalendar.js +1 -1
- package/dist/components/agents-sdk/ComputerChannels.js +5 -5
- package/dist/components/agents-sdk/ComputerFileThumbnail.d.ts +1 -1
- package/dist/components/agents-sdk/ComputerFiles.d.ts +4 -4
- package/dist/components/agents-sdk/ComputerFiles.js +16 -17
- package/dist/components/agents-sdk/ComputerHome.js +1 -1
- package/dist/components/agents-sdk/ComputerHost.d.ts +1 -1
- package/dist/components/agents-sdk/ComputerLayout.d.ts +1 -1
- package/dist/components/agents-sdk/ComputerNotifications.js +1 -1
- package/dist/components/agents-sdk/ComputerPresentation.d.ts +1 -1
- package/dist/components/agents-sdk/ComputerPresentation.js +1 -1
- package/dist/components/agents-sdk/ComputerScreen.d.ts +1 -1
- package/dist/components/agents-sdk/ComputerScreen.js +6 -6
- package/dist/components/agents-sdk/ComputerSettings.d.ts +1 -1
- package/dist/components/agents-sdk/ComputerSettings.js +7 -7
- package/dist/components/agents-sdk/ComputerSpotlight.js +1 -1
- package/dist/components/agents-sdk/ComputerViewer.js +2 -2
- package/dist/components/agents-sdk/EmployeeApp.js +1 -1
- package/dist/components/agents-sdk/EmployeeChat.js +5 -5
- package/dist/components/agents-sdk/EmployeeChrome.js +14 -14
- package/dist/components/agents-sdk/EmployeeSchedules.d.ts +2 -2
- package/dist/components/agents-sdk/EmployeeSchedules.js +2 -2
- package/dist/components/agents-sdk/EmployeeStartScreen.js +4 -4
- package/dist/components/agents-sdk/ExecutionBoard.js +5 -5
- package/dist/components/agents-sdk/ManagerAccountActions.js +3 -3
- package/dist/components/agents-sdk/ManagerOffice.d.ts +1 -1
- package/dist/components/agents-sdk/ManagerOffice.js +1 -1
- package/dist/components/agents-sdk/ManagerOfficeScreens.js +3 -3
- package/dist/components/agents-sdk/McpConnectionRequest.js +2 -2
- package/dist/components/agents-sdk/McpConnectorForm.js +2 -2
- package/dist/components/agents-sdk/McpPluginCatalog.js +5 -5
- package/dist/components/agents-sdk/McpServerPicker.js +3 -3
- package/dist/components/agents-sdk/ModelSelector.js +5 -5
- package/dist/components/agents-sdk/PromptInputApproval.js +1 -1
- package/dist/components/agents-sdk/PromptInputCommands.js +1 -1
- package/dist/components/agents-sdk/SubagentRunIndicator.js +1 -1
- package/dist/components/agents-sdk/SubagentRunLanes.js +2 -2
- package/dist/components/agents-sdk/SubagentRunPanel.js +4 -4
- package/dist/components/agents-sdk/SubagentRunSelector.js +1 -1
- package/dist/components/agents-sdk/ThinkChat.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkChat.js +2 -2
- package/dist/components/agents-sdk/ThinkChatActivity.js +3 -3
- package/dist/components/agents-sdk/ThinkChatActivitySummary.js +1 -1
- package/dist/components/agents-sdk/ThinkChatToolPanels.js +5 -5
- package/dist/components/agents-sdk/ThinkExecutionDetail.js +1 -1
- package/dist/components/agents-sdk/ThinkExecutionStatus.js +1 -1
- package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +6 -6
- package/dist/components/agents-sdk/ThinkRecoveryNotice.js +1 -1
- package/dist/components/agents-sdk/ThinkSchedule.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkScheduleActions.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkScheduleActions.js +3 -3
- package/dist/components/agents-sdk/ThinkScheduleBrowser.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkScheduleBrowser.js +3 -3
- package/dist/components/agents-sdk/ThinkScheduleDetail.d.ts +2 -2
- package/dist/components/agents-sdk/ThinkScheduleDetail.js +4 -4
- package/dist/components/agents-sdk/ThinkScheduleForm.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkScheduleForm.js +12 -12
- package/dist/components/agents-sdk/ThinkThreadPicker.js +5 -5
- package/dist/components/agents-sdk/WorkbenchBack.js +1 -1
- package/dist/components/agents-sdk/Workspace.d.ts +2 -2
- package/dist/components/agents-sdk/Workspace.js +353 -319
- package/dist/components/agents-sdk/WorkspaceAutomation.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceAutomation.js +15 -15
- package/dist/components/agents-sdk/WorkspaceAutomationTable.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceAutomationTable.js +10 -10
- package/dist/components/agents-sdk/WorkspaceBrowser.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceBrowser.js +1 -1
- package/dist/components/agents-sdk/WorkspaceConcept.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceCorrespondence.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceCorrespondence.js +3 -3
- package/dist/components/agents-sdk/WorkspaceDesktop.d.ts +2 -2
- package/dist/components/agents-sdk/WorkspaceDesktop.js +4 -4
- package/dist/components/agents-sdk/WorkspaceExplorer.d.ts +4 -3
- package/dist/components/agents-sdk/WorkspaceExplorer.js +3 -3
- package/dist/components/agents-sdk/WorkspaceFileCommands.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceFileCommands.js +1 -1
- package/dist/components/agents-sdk/WorkspaceFileDetails.js +4 -4
- package/dist/components/agents-sdk/WorkspaceFileTransfer.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceFileTransfer.js +1 -1
- package/dist/components/agents-sdk/WorkspaceFileView.js +8 -8
- package/dist/components/agents-sdk/WorkspaceHeader.js +1 -1
- package/dist/components/agents-sdk/WorkspaceLive.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceLive.js +1 -1
- package/dist/components/agents-sdk/WorkspaceLocalFolder.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceLocalFolder.js +4 -3
- package/dist/components/agents-sdk/WorkspaceMountManager.js +1 -1
- package/dist/components/agents-sdk/WorkspacePerson.d.ts +2 -2
- package/dist/components/agents-sdk/WorkspacePerson.js +3 -3
- package/dist/components/agents-sdk/WorkspaceProject.d.ts +2 -2
- package/dist/components/agents-sdk/WorkspaceProject.js +4 -4
- package/dist/components/ai-sdk/Activity.js +1 -1
- package/dist/components/ai-sdk/AgentChatMessageEditor.js +2 -2
- package/dist/components/ai-sdk/AgentChatStartScreen.js +1 -1
- package/dist/components/ai-sdk/Approval.js +3 -3
- package/dist/components/ai-sdk/Artifact.js +1 -1
- package/dist/components/ai-sdk/ChainOfThought.js +1 -1
- package/dist/components/ai-sdk/Checkpoint.js +1 -1
- package/dist/components/ai-sdk/CodeBlock.js +1 -1
- package/dist/components/ai-sdk/ComposerLink.js +1 -1
- package/dist/components/ai-sdk/ConnectedAppCards.js +2 -2
- package/dist/components/ai-sdk/Conversation.js +1 -1
- package/dist/components/ai-sdk/Goal.js +2 -2
- package/dist/components/ai-sdk/MediaPreviewCard.js +2 -2
- package/dist/components/ai-sdk/Message.js +3 -3
- package/dist/components/ai-sdk/MessageScroller.js +1 -1
- package/dist/components/ai-sdk/MessageScrollerVirtual.js +1 -1
- package/dist/components/ai-sdk/Plan.js +1 -1
- package/dist/components/ai-sdk/PromptInput.js +9 -9
- package/dist/components/ai-sdk/Queue.js +2 -2
- package/dist/components/ai-sdk/Reasoning.js +1 -1
- package/dist/components/ai-sdk/Sources.js +1 -1
- package/dist/components/ai-sdk/Task.js +1 -1
- package/dist/components/ai-sdk/ToolInvocation.js +1 -1
- package/dist/components/extension/ChatGptSignInScreen.js +1 -1
- package/dist/components/extension/CodexModelSelector.d.ts +1 -1
- package/dist/components/extension/CodexModelSelector.js +3 -3
- package/dist/components/extension/ConversationTabPicker.js +2 -2
- package/dist/components/extension/FirstRunSetup.d.ts +2 -2
- package/dist/components/extension/FirstRunSetup.js +13 -13
- package/dist/components/foundations/Checkbox.js +2 -2
- package/dist/components/foundations/Collapsible.js +1 -1
- package/dist/components/foundations/ContextMenu.js +1 -1
- package/dist/components/foundations/Favicon.js +1 -1
- package/dist/components/foundations/Menubar.js +1 -1
- package/dist/components/foundations/SearchField.js +1 -1
- package/dist/components/foundations/Select.js +1 -1
- package/dist/components/foundations/Stepper.js +1 -1
- package/dist/components/foundations/Toast.js +1 -1
- package/dist/components/foundations/ToggleGroup.d.ts +1 -1
- package/dist/components/foundations/ToggleGroup.js +1 -1
- package/dist/components/foundations/icons.js +1 -1
- package/dist/components/general-purpose/CommandPalette.js +1 -1
- package/dist/components/general-purpose/Commit.js +2 -2
- package/dist/components/general-purpose/EnvironmentVariables.js +2 -2
- package/dist/components/general-purpose/FileTree.js +1 -1
- package/dist/components/general-purpose/PricingBillingToggle.js +1 -1
- package/dist/components/general-purpose/PricingPlanCard.js +2 -2
- package/dist/components/general-purpose/PricingUsageCalculator.js +2 -2
- package/dist/components/general-purpose/ResponsiveSidebarShell.js +3 -3
- package/dist/components/general-purpose/SettingsFormDialog.js +4 -4
- package/dist/components/general-purpose/SetupChecklist.js +1 -1
- package/dist/components/general-purpose/TestResults.js +1 -1
- package/dist/components/general-purpose/ThemeModeControl.js +1 -1
- package/dist/components/general-purpose/WallpaperPicker.js +1 -1
- package/dist/components/general-purpose/WebPreview.js +1 -1
- package/dist/components/nanites/AgentConnection.js +2 -2
- package/dist/components/nanites/AgentToolDetail.js +5 -5
- package/dist/{connected-app-drafts-D2ijldOR.js → connected-app-drafts-BcWAz2A5.js} +6 -6
- package/dist/{copy-button-UNBY7oXF.js → copy-button-CseE2x9v.js} +1 -1
- package/dist/{parts-Bb1aZP2y.js → parts-BH-SeHct.js} +1 -1
- package/dist/{scheduled-table-source-6YdnC3Sh.js → scheduled-table-source-D0Pv1_Hb.js} +1 -1
- package/dist/utils/codex-model-catalog.d.ts +1 -1
- package/dist/{workspace-assets-CadpUKoz.js → workspace-assets-BPkMEXP5.js} +1 -1
- package/dist/{workspace-concept-panel-CzxPyGpN.js → workspace-concept-panel-BC2aq8rz.js} +2 -2
- package/dist/{workspace-concept-panel-BC2W28pu.d.ts → workspace-concept-panel-Cq7odBRZ.d.ts} +1 -1
- package/dist/{workspace-delete-D9ZesEdu.js → workspace-delete-DrV618jg.js} +1 -1
- package/dist/{workspace-drag-BNhZIN8F.js → workspace-drag-BldB7Yr3.js} +1 -1
- package/dist/{workspace-media-preview-kXaEY4AN.js → workspace-media-preview-B9BmB8Tu.js} +2 -2
- package/dist/{workspace-quick-look-BDD-jXn3.js → workspace-quick-look-Dw047GMK.js} +5 -5
- package/package.json +2 -2
- package/dist/{icons-CNwk7DEu.js → icons-B7D1XaPY.js} +1 -1
|
@@ -85,7 +85,8 @@ function workspaceFileQueryKey(sourceKey, root, requestedPath) {
|
|
|
85
85
|
}
|
|
86
86
|
/**
|
|
87
87
|
* The source's summary. It does not depend on the root and each read is a
|
|
88
|
-
* whole-workspace aggregate, so every root of one source shares it.
|
|
88
|
+
* whole-workspace aggregate, so every root of one source shares it. Mark it
|
|
89
|
+
* stale with {@link invalidateWorkspaceInfo}, never by cancelling a read.
|
|
89
90
|
*/
|
|
90
91
|
function workspaceInfoQueryKey(sourceKey) {
|
|
91
92
|
return [
|
|
@@ -94,6 +95,31 @@ function workspaceInfoQueryKey(sourceKey) {
|
|
|
94
95
|
"info"
|
|
95
96
|
];
|
|
96
97
|
}
|
|
98
|
+
/** The one follow-up read queued behind each summary read in flight. */
|
|
99
|
+
const summaryFollowUps = /* @__PURE__ */ new WeakMap();
|
|
100
|
+
/**
|
|
101
|
+
* Marks the source's summary stale. Only a mounted reader that shows it reads
|
|
102
|
+
* it again, and never beside a read in flight: a source may walk every file to
|
|
103
|
+
* answer and cannot abort the walk, so every change during one waits for it to
|
|
104
|
+
* land and then shares a single follow-up read.
|
|
105
|
+
*/
|
|
106
|
+
function invalidateWorkspaceInfo(queryClient, sourceKey) {
|
|
107
|
+
const queryKey = workspaceInfoQueryKey(sourceKey);
|
|
108
|
+
const inFlight = queryClient.getQueryCache().find({
|
|
109
|
+
queryKey,
|
|
110
|
+
exact: true
|
|
111
|
+
})?.promise;
|
|
112
|
+
if (!inFlight) return queryClient.invalidateQueries({
|
|
113
|
+
queryKey,
|
|
114
|
+
exact: true
|
|
115
|
+
});
|
|
116
|
+
let followUp = summaryFollowUps.get(inFlight);
|
|
117
|
+
if (!followUp) {
|
|
118
|
+
followUp = inFlight.then(() => invalidateWorkspaceInfo(queryClient, sourceKey), () => invalidateWorkspaceInfo(queryClient, sourceKey));
|
|
119
|
+
summaryFollowUps.set(inFlight, followUp);
|
|
120
|
+
}
|
|
121
|
+
return followUp;
|
|
122
|
+
}
|
|
97
123
|
function workspaceFileVersion(target) {
|
|
98
124
|
return {
|
|
99
125
|
path: target.readPath,
|
|
@@ -128,15 +154,16 @@ function workspaceDirectoryQueryOptions(source, sourceKey, root, path) {
|
|
|
128
154
|
staleTime: Infinity
|
|
129
155
|
});
|
|
130
156
|
}
|
|
131
|
-
/**
|
|
157
|
+
/**
|
|
158
|
+
* Shared workspace-summary options for a surface that shows the summary.
|
|
159
|
+
* The read ignores its abort signal, since a source cannot abort its walk: a
|
|
160
|
+
* reader that unmounts mid-read lets it land in the cache, so a reader that
|
|
161
|
+
* mounts next shares it rather than starting a second walk beside it.
|
|
162
|
+
*/
|
|
132
163
|
function workspaceInfoQueryOptions(source, sourceKey) {
|
|
133
164
|
return queryOptions({
|
|
134
165
|
queryKey: workspaceInfoQueryKey(sourceKey),
|
|
135
|
-
queryFn:
|
|
136
|
-
const info = await source.getWorkspaceInfo();
|
|
137
|
-
throwIfAborted(signal);
|
|
138
|
-
return info;
|
|
139
|
-
},
|
|
166
|
+
queryFn: () => source.getWorkspaceInfo(),
|
|
140
167
|
staleTime: Infinity
|
|
141
168
|
});
|
|
142
169
|
}
|
|
@@ -294,210 +321,221 @@ function createDirectoryListingStore(queryClient, sourceKey, root) {
|
|
|
294
321
|
* selection, while this hook only keeps local tree expansion state.
|
|
295
322
|
*/
|
|
296
323
|
function useWorkspace(t0) {
|
|
297
|
-
const $ = c(
|
|
298
|
-
const { source, sourceKey, root: t1, selectedPath, onSelectedPathChange, resolveFileAsset, maxInlineAssetBytes: t2 } = t0;
|
|
324
|
+
const $ = c(146);
|
|
325
|
+
const { source, sourceKey, root: t1, selectedPath, onSelectedPathChange, resolveFileAsset, maxInlineAssetBytes: t2, info: t3 } = t0;
|
|
299
326
|
const root = t1 === void 0 ? "/" : t1;
|
|
300
327
|
const maxInlineAssetBytes = t2 === void 0 ? DEFAULT_MAX_INLINE_ASSET_BYTES : t2;
|
|
328
|
+
const showsInfo = t3 === void 0 ? false : t3;
|
|
301
329
|
const queryClient = useQueryClient();
|
|
302
|
-
let
|
|
330
|
+
let t4;
|
|
303
331
|
if ($[0] !== root || $[1] !== sourceKey) {
|
|
304
|
-
|
|
332
|
+
t4 = JSON.stringify([sourceKey, root]);
|
|
305
333
|
$[0] = root;
|
|
306
334
|
$[1] = sourceKey;
|
|
307
|
-
$[2] =
|
|
308
|
-
} else
|
|
309
|
-
const scopeKey =
|
|
310
|
-
let
|
|
335
|
+
$[2] = t4;
|
|
336
|
+
} else t4 = $[2];
|
|
337
|
+
const scopeKey = t4;
|
|
338
|
+
let t5;
|
|
311
339
|
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
312
|
-
|
|
313
|
-
$[3] =
|
|
314
|
-
} else
|
|
315
|
-
const [expandedPathsByScope, setExpandedPathsByScope] = React.useState(
|
|
340
|
+
t5 = {};
|
|
341
|
+
$[3] = t5;
|
|
342
|
+
} else t5 = $[3];
|
|
343
|
+
const [expandedPathsByScope, setExpandedPathsByScope] = React.useState(t5);
|
|
316
344
|
const expandedPaths = expandedPathsByScope[scopeKey] ?? EMPTY_PATHS;
|
|
317
|
-
let
|
|
345
|
+
let t6;
|
|
318
346
|
if ($[4] !== expandedPaths || $[5] !== scopeKey) {
|
|
319
|
-
|
|
347
|
+
t6 = {
|
|
320
348
|
scopeKey,
|
|
321
349
|
paths: expandedPaths
|
|
322
350
|
};
|
|
323
351
|
$[4] = expandedPaths;
|
|
324
352
|
$[5] = scopeKey;
|
|
325
|
-
$[6] =
|
|
326
|
-
} else
|
|
327
|
-
const latestExpansionRef = React.useRef(
|
|
353
|
+
$[6] = t6;
|
|
354
|
+
} else t6 = $[6];
|
|
355
|
+
const latestExpansionRef = React.useRef(t6);
|
|
328
356
|
const normalizedMaxInlineAssetBytes = Number.isFinite(maxInlineAssetBytes) && maxInlineAssetBytes >= 0 ? maxInlineAssetBytes : DEFAULT_MAX_INLINE_ASSET_BYTES;
|
|
329
|
-
let
|
|
357
|
+
let t7;
|
|
330
358
|
if ($[7] !== expandedPaths || $[8] !== root) {
|
|
331
|
-
|
|
359
|
+
t7 = [.../* @__PURE__ */ new Set([root, ...expandedPaths])].sort();
|
|
332
360
|
$[7] = expandedPaths;
|
|
333
361
|
$[8] = root;
|
|
334
|
-
$[9] =
|
|
335
|
-
} else
|
|
336
|
-
const directoryPaths =
|
|
337
|
-
let
|
|
362
|
+
$[9] = t7;
|
|
363
|
+
} else t7 = $[9];
|
|
364
|
+
const directoryPaths = t7;
|
|
365
|
+
let t8;
|
|
338
366
|
if ($[10] !== directoryPaths || $[11] !== root || $[12] !== source || $[13] !== sourceKey) {
|
|
339
|
-
let
|
|
367
|
+
let t9;
|
|
340
368
|
if ($[15] !== root || $[16] !== source || $[17] !== sourceKey) {
|
|
341
|
-
|
|
369
|
+
t9 = (path) => workspaceDirectoryQueryOptions(source, sourceKey, root, path);
|
|
342
370
|
$[15] = root;
|
|
343
371
|
$[16] = source;
|
|
344
372
|
$[17] = sourceKey;
|
|
345
|
-
$[18] =
|
|
346
|
-
} else
|
|
347
|
-
|
|
373
|
+
$[18] = t9;
|
|
374
|
+
} else t9 = $[18];
|
|
375
|
+
t8 = directoryPaths.map(t9);
|
|
348
376
|
$[10] = directoryPaths;
|
|
349
377
|
$[11] = root;
|
|
350
378
|
$[12] = source;
|
|
351
379
|
$[13] = sourceKey;
|
|
352
|
-
$[14] =
|
|
353
|
-
} else
|
|
354
|
-
let t8;
|
|
355
|
-
if ($[19] !== t7) {
|
|
356
|
-
t8 = { queries: t7 };
|
|
357
|
-
$[19] = t7;
|
|
358
|
-
$[20] = t8;
|
|
359
|
-
} else t8 = $[20];
|
|
360
|
-
const directoryQueries = useQueries(t8);
|
|
380
|
+
$[14] = t8;
|
|
381
|
+
} else t8 = $[14];
|
|
361
382
|
let t9;
|
|
383
|
+
if ($[19] !== t8) {
|
|
384
|
+
t9 = { queries: t8 };
|
|
385
|
+
$[19] = t8;
|
|
386
|
+
$[20] = t9;
|
|
387
|
+
} else t9 = $[20];
|
|
388
|
+
const directoryQueries = useQueries(t9);
|
|
389
|
+
let t10;
|
|
362
390
|
if ($[21] !== source || $[22] !== sourceKey) {
|
|
363
|
-
|
|
391
|
+
t10 = workspaceInfoQueryOptions(source, sourceKey);
|
|
364
392
|
$[21] = source;
|
|
365
393
|
$[22] = sourceKey;
|
|
366
|
-
$[23] =
|
|
367
|
-
} else
|
|
368
|
-
const infoQuery = useQuery(t9);
|
|
369
|
-
const t10 = selectedPath ?? root;
|
|
394
|
+
$[23] = t10;
|
|
395
|
+
} else t10 = $[23];
|
|
370
396
|
let t11;
|
|
371
|
-
if ($[24] !==
|
|
372
|
-
t11 =
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
$[26] = sourceKey;
|
|
376
|
-
$[27] = t10;
|
|
377
|
-
$[28] = t11;
|
|
378
|
-
} else t11 = $[28];
|
|
379
|
-
const t12 = selectedPath !== null;
|
|
380
|
-
let t13;
|
|
381
|
-
if ($[29] !== t11 || $[30] !== t12) {
|
|
382
|
-
t13 = {
|
|
383
|
-
...t11,
|
|
384
|
-
enabled: t12
|
|
397
|
+
if ($[24] !== showsInfo || $[25] !== t10) {
|
|
398
|
+
t11 = {
|
|
399
|
+
...t10,
|
|
400
|
+
enabled: showsInfo
|
|
385
401
|
};
|
|
386
|
-
$[
|
|
402
|
+
$[24] = showsInfo;
|
|
403
|
+
$[25] = t10;
|
|
404
|
+
$[26] = t11;
|
|
405
|
+
} else t11 = $[26];
|
|
406
|
+
const infoQuery = useQuery(t11);
|
|
407
|
+
const t12 = selectedPath ?? root;
|
|
408
|
+
let t13;
|
|
409
|
+
if ($[27] !== root || $[28] !== source || $[29] !== sourceKey || $[30] !== t12) {
|
|
410
|
+
t13 = workspaceFileStatQueryOptions(source, sourceKey, root, t12);
|
|
411
|
+
$[27] = root;
|
|
412
|
+
$[28] = source;
|
|
413
|
+
$[29] = sourceKey;
|
|
387
414
|
$[30] = t12;
|
|
388
415
|
$[31] = t13;
|
|
389
416
|
} else t13 = $[31];
|
|
390
|
-
const
|
|
417
|
+
const t14 = selectedPath !== null;
|
|
418
|
+
let t15;
|
|
419
|
+
if ($[32] !== t13 || $[33] !== t14) {
|
|
420
|
+
t15 = {
|
|
421
|
+
...t13,
|
|
422
|
+
enabled: t14
|
|
423
|
+
};
|
|
424
|
+
$[32] = t13;
|
|
425
|
+
$[33] = t14;
|
|
426
|
+
$[34] = t15;
|
|
427
|
+
} else t15 = $[34];
|
|
428
|
+
const statQuery = useQuery(t15);
|
|
391
429
|
const target = selectedPath === null ? void 0 : statQuery.data;
|
|
392
430
|
const statSettled = target !== void 0 && statQuery.isSuccess && !statQuery.isFetching;
|
|
393
|
-
let
|
|
394
|
-
if ($[
|
|
395
|
-
|
|
431
|
+
let t16;
|
|
432
|
+
if ($[35] !== root || $[36] !== selectedPath || $[37] !== target) {
|
|
433
|
+
t16 = target ?? {
|
|
396
434
|
requestedPath: selectedPath ?? root,
|
|
397
435
|
readPath: selectedPath ?? root,
|
|
398
436
|
info: INACTIVE_FILE_INFO,
|
|
399
437
|
media: null
|
|
400
438
|
};
|
|
401
|
-
$[
|
|
402
|
-
$[
|
|
403
|
-
$[
|
|
404
|
-
$[
|
|
405
|
-
} else
|
|
406
|
-
const queryTarget =
|
|
407
|
-
let t15;
|
|
408
|
-
if ($[36] !== target) {
|
|
409
|
-
t15 = target ? isWorkspaceTextPath(target.readPath, target.info.mimeType) : false;
|
|
410
|
-
$[36] = target;
|
|
411
|
-
$[37] = t15;
|
|
412
|
-
} else t15 = $[37];
|
|
413
|
-
const targetIsText = t15;
|
|
414
|
-
const t16 = resolveFileAsset ?? INACTIVE_FILE_ASSET_RESOLVER;
|
|
439
|
+
$[35] = root;
|
|
440
|
+
$[36] = selectedPath;
|
|
441
|
+
$[37] = target;
|
|
442
|
+
$[38] = t16;
|
|
443
|
+
} else t16 = $[38];
|
|
444
|
+
const queryTarget = t16;
|
|
415
445
|
let t17;
|
|
416
|
-
if ($[
|
|
417
|
-
t17 =
|
|
418
|
-
$[
|
|
419
|
-
$[
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
} else t17 = $[42];
|
|
424
|
-
const t18 = statSettled && resolveFileAsset !== void 0;
|
|
446
|
+
if ($[39] !== target) {
|
|
447
|
+
t17 = target ? isWorkspaceTextPath(target.readPath, target.info.mimeType) : false;
|
|
448
|
+
$[39] = target;
|
|
449
|
+
$[40] = t17;
|
|
450
|
+
} else t17 = $[40];
|
|
451
|
+
const targetIsText = t17;
|
|
452
|
+
const t18 = resolveFileAsset ?? INACTIVE_FILE_ASSET_RESOLVER;
|
|
425
453
|
let t19;
|
|
426
|
-
if ($[43] !==
|
|
427
|
-
t19 =
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
$[43] = t17;
|
|
454
|
+
if ($[41] !== queryTarget || $[42] !== root || $[43] !== sourceKey || $[44] !== t18) {
|
|
455
|
+
t19 = workspaceFileAssetQueryOptions(sourceKey, root, queryTarget, t18);
|
|
456
|
+
$[41] = queryTarget;
|
|
457
|
+
$[42] = root;
|
|
458
|
+
$[43] = sourceKey;
|
|
432
459
|
$[44] = t18;
|
|
433
460
|
$[45] = t19;
|
|
434
461
|
} else t19 = $[45];
|
|
435
|
-
const
|
|
462
|
+
const t20 = statSettled && resolveFileAsset !== void 0;
|
|
463
|
+
let t21;
|
|
464
|
+
if ($[46] !== t19 || $[47] !== t20) {
|
|
465
|
+
t21 = {
|
|
466
|
+
...t19,
|
|
467
|
+
enabled: t20
|
|
468
|
+
};
|
|
469
|
+
$[46] = t19;
|
|
470
|
+
$[47] = t20;
|
|
471
|
+
$[48] = t21;
|
|
472
|
+
} else t21 = $[48];
|
|
473
|
+
const assetQuery = useQuery(t21);
|
|
436
474
|
const resolvedAsset = assetQuery.data ?? null;
|
|
437
475
|
const resolverSettled = !resolveFileAsset || assetQuery.isSuccess && !assetQuery.isFetching;
|
|
438
|
-
let t20;
|
|
439
|
-
if ($[46] !== queryTarget || $[47] !== root || $[48] !== source || $[49] !== sourceKey) {
|
|
440
|
-
t20 = workspaceTextFileQueryOptions(source, sourceKey, root, queryTarget);
|
|
441
|
-
$[46] = queryTarget;
|
|
442
|
-
$[47] = root;
|
|
443
|
-
$[48] = source;
|
|
444
|
-
$[49] = sourceKey;
|
|
445
|
-
$[50] = t20;
|
|
446
|
-
} else t20 = $[50];
|
|
447
|
-
const t21 = statSettled && resolverSettled && !resolvedAsset && !target.media && targetIsText;
|
|
448
476
|
let t22;
|
|
449
|
-
if ($[51] !==
|
|
450
|
-
t22 =
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
$[
|
|
455
|
-
$[52] = t21;
|
|
477
|
+
if ($[49] !== queryTarget || $[50] !== root || $[51] !== source || $[52] !== sourceKey) {
|
|
478
|
+
t22 = workspaceTextFileQueryOptions(source, sourceKey, root, queryTarget);
|
|
479
|
+
$[49] = queryTarget;
|
|
480
|
+
$[50] = root;
|
|
481
|
+
$[51] = source;
|
|
482
|
+
$[52] = sourceKey;
|
|
456
483
|
$[53] = t22;
|
|
457
484
|
} else t22 = $[53];
|
|
458
|
-
const
|
|
459
|
-
let
|
|
460
|
-
if ($[54] !==
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
$[56] = root;
|
|
465
|
-
$[57] = source;
|
|
466
|
-
$[58] = sourceKey;
|
|
467
|
-
$[59] = t23;
|
|
468
|
-
} else t23 = $[59];
|
|
469
|
-
const t24 = statSettled && resolverSettled && !resolvedAsset && Boolean(target.media);
|
|
470
|
-
let t25;
|
|
471
|
-
if ($[60] !== t23 || $[61] !== t24) {
|
|
472
|
-
t25 = {
|
|
473
|
-
...t23,
|
|
474
|
-
enabled: t24
|
|
485
|
+
const t23 = statSettled && resolverSettled && !resolvedAsset && !target.media && targetIsText;
|
|
486
|
+
let t24;
|
|
487
|
+
if ($[54] !== t22 || $[55] !== t23) {
|
|
488
|
+
t24 = {
|
|
489
|
+
...t22,
|
|
490
|
+
enabled: t23
|
|
475
491
|
};
|
|
476
|
-
$[
|
|
477
|
-
$[
|
|
492
|
+
$[54] = t22;
|
|
493
|
+
$[55] = t23;
|
|
494
|
+
$[56] = t24;
|
|
495
|
+
} else t24 = $[56];
|
|
496
|
+
const textQuery = useQuery(t24);
|
|
497
|
+
let t25;
|
|
498
|
+
if ($[57] !== normalizedMaxInlineAssetBytes || $[58] !== queryTarget || $[59] !== root || $[60] !== source || $[61] !== sourceKey) {
|
|
499
|
+
t25 = workspaceBinaryFileQueryOptions(source, sourceKey, root, queryTarget, normalizedMaxInlineAssetBytes);
|
|
500
|
+
$[57] = normalizedMaxInlineAssetBytes;
|
|
501
|
+
$[58] = queryTarget;
|
|
502
|
+
$[59] = root;
|
|
503
|
+
$[60] = source;
|
|
504
|
+
$[61] = sourceKey;
|
|
478
505
|
$[62] = t25;
|
|
479
506
|
} else t25 = $[62];
|
|
480
|
-
const
|
|
481
|
-
let
|
|
482
|
-
if ($[63] !==
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
$[
|
|
488
|
-
|
|
489
|
-
|
|
507
|
+
const t26 = statSettled && resolverSettled && !resolvedAsset && Boolean(target.media);
|
|
508
|
+
let t27;
|
|
509
|
+
if ($[63] !== t25 || $[64] !== t26) {
|
|
510
|
+
t27 = {
|
|
511
|
+
...t25,
|
|
512
|
+
enabled: t26
|
|
513
|
+
};
|
|
514
|
+
$[63] = t25;
|
|
515
|
+
$[64] = t26;
|
|
516
|
+
$[65] = t27;
|
|
517
|
+
} else t27 = $[65];
|
|
518
|
+
const binaryQuery = useQuery(t27);
|
|
519
|
+
let t28;
|
|
520
|
+
if ($[66] !== queryClient || $[67] !== root || $[68] !== sourceKey) {
|
|
521
|
+
t28 = createDirectoryListingStore(queryClient, sourceKey, root);
|
|
522
|
+
$[66] = queryClient;
|
|
523
|
+
$[67] = root;
|
|
524
|
+
$[68] = sourceKey;
|
|
525
|
+
$[69] = t28;
|
|
526
|
+
} else t28 = $[69];
|
|
527
|
+
const directoryListings = t28;
|
|
490
528
|
const entriesByDirectory = React.useSyncExternalStore(directoryListings.subscribe, directoryListings.getSnapshot, directoryListings.getSnapshot);
|
|
491
529
|
let entryByPath;
|
|
492
|
-
if ($[
|
|
530
|
+
if ($[70] !== entriesByDirectory) {
|
|
493
531
|
entryByPath = /* @__PURE__ */ new Map();
|
|
494
532
|
for (const directoryEntries of Object.values(entriesByDirectory)) for (const entry of directoryEntries) entryByPath.set(entry.path, entry);
|
|
495
|
-
$[
|
|
496
|
-
$[
|
|
497
|
-
} else entryByPath = $[
|
|
498
|
-
let
|
|
499
|
-
if ($[
|
|
500
|
-
|
|
533
|
+
$[70] = entriesByDirectory;
|
|
534
|
+
$[71] = entryByPath;
|
|
535
|
+
} else entryByPath = $[71];
|
|
536
|
+
let t29;
|
|
537
|
+
if ($[72] !== scopeKey) {
|
|
538
|
+
t29 = (next) => {
|
|
501
539
|
latestExpansionRef.current = {
|
|
502
540
|
scopeKey,
|
|
503
541
|
paths: next
|
|
@@ -507,151 +545,151 @@ function useWorkspace(t0) {
|
|
|
507
545
|
[scopeKey]: next
|
|
508
546
|
}));
|
|
509
547
|
};
|
|
510
|
-
$[
|
|
511
|
-
$[
|
|
512
|
-
} else
|
|
513
|
-
const setExpandedPaths =
|
|
514
|
-
let
|
|
515
|
-
if ($[
|
|
516
|
-
|
|
517
|
-
$[
|
|
518
|
-
$[
|
|
519
|
-
} else
|
|
520
|
-
const selectFile =
|
|
548
|
+
$[72] = scopeKey;
|
|
549
|
+
$[73] = t29;
|
|
550
|
+
} else t29 = $[73];
|
|
551
|
+
const setExpandedPaths = t29;
|
|
552
|
+
let t30;
|
|
553
|
+
if ($[74] !== onSelectedPathChange) {
|
|
554
|
+
t30 = (path_0) => onSelectedPathChange?.(path_0);
|
|
555
|
+
$[74] = onSelectedPathChange;
|
|
556
|
+
$[75] = t30;
|
|
557
|
+
} else t30 = $[75];
|
|
558
|
+
const selectFile = t30;
|
|
521
559
|
const selectedError = statQuery.error ?? assetQuery.error ?? textQuery.error ?? binaryQuery.error;
|
|
522
560
|
let selectedFile = null;
|
|
523
561
|
if (selectedPath && selectedError) {
|
|
524
|
-
let t29;
|
|
525
|
-
if ($[73] !== selectedPath) {
|
|
526
|
-
t29 = workspaceBasename(selectedPath);
|
|
527
|
-
$[73] = selectedPath;
|
|
528
|
-
$[74] = t29;
|
|
529
|
-
} else t29 = $[74];
|
|
530
|
-
const t30 = target?.info ?? null;
|
|
531
562
|
let t31;
|
|
532
|
-
if ($[
|
|
533
|
-
t31 =
|
|
534
|
-
$[
|
|
535
|
-
$[
|
|
536
|
-
} else t31 = $[
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
563
|
+
if ($[76] !== selectedPath) {
|
|
564
|
+
t31 = workspaceBasename(selectedPath);
|
|
565
|
+
$[76] = selectedPath;
|
|
566
|
+
$[77] = t31;
|
|
567
|
+
} else t31 = $[77];
|
|
568
|
+
const t32 = target?.info ?? null;
|
|
569
|
+
let t33;
|
|
570
|
+
if ($[78] !== selectedError) {
|
|
571
|
+
t33 = formatErrorMessage(selectedError);
|
|
572
|
+
$[78] = selectedError;
|
|
573
|
+
$[79] = t33;
|
|
574
|
+
} else t33 = $[79];
|
|
575
|
+
let t34;
|
|
576
|
+
if ($[80] !== selectedPath || $[81] !== t31 || $[82] !== t32 || $[83] !== t33) {
|
|
577
|
+
t34 = {
|
|
540
578
|
path: selectedPath,
|
|
541
|
-
name:
|
|
579
|
+
name: t31,
|
|
542
580
|
content: null,
|
|
543
581
|
asset: null,
|
|
544
|
-
info:
|
|
545
|
-
error:
|
|
582
|
+
info: t32,
|
|
583
|
+
error: t33
|
|
546
584
|
};
|
|
547
|
-
$[
|
|
548
|
-
$[
|
|
549
|
-
$[
|
|
550
|
-
$[
|
|
551
|
-
$[
|
|
552
|
-
} else
|
|
553
|
-
selectedFile =
|
|
585
|
+
$[80] = selectedPath;
|
|
586
|
+
$[81] = t31;
|
|
587
|
+
$[82] = t32;
|
|
588
|
+
$[83] = t33;
|
|
589
|
+
$[84] = t34;
|
|
590
|
+
} else t34 = $[84];
|
|
591
|
+
selectedFile = t34;
|
|
554
592
|
} else if (selectedPath && statSettled && target && resolverSettled) {
|
|
555
593
|
if (resolvedAsset) {
|
|
556
|
-
let
|
|
557
|
-
if ($[
|
|
558
|
-
|
|
559
|
-
$[
|
|
560
|
-
$[
|
|
561
|
-
} else
|
|
562
|
-
let
|
|
563
|
-
if ($[
|
|
564
|
-
|
|
594
|
+
let t31;
|
|
595
|
+
if ($[85] !== selectedPath) {
|
|
596
|
+
t31 = workspaceBasename(selectedPath);
|
|
597
|
+
$[85] = selectedPath;
|
|
598
|
+
$[86] = t31;
|
|
599
|
+
} else t31 = $[86];
|
|
600
|
+
let t32;
|
|
601
|
+
if ($[87] !== resolvedAsset.asset || $[88] !== selectedPath || $[89] !== t31 || $[90] !== target.info) {
|
|
602
|
+
t32 = {
|
|
565
603
|
path: selectedPath,
|
|
566
|
-
name:
|
|
604
|
+
name: t31,
|
|
567
605
|
content: null,
|
|
568
606
|
asset: resolvedAsset.asset,
|
|
569
607
|
info: target.info,
|
|
570
608
|
error: null
|
|
571
609
|
};
|
|
572
|
-
$[
|
|
573
|
-
$[
|
|
574
|
-
$[
|
|
575
|
-
$[
|
|
576
|
-
$[
|
|
577
|
-
} else
|
|
578
|
-
selectedFile =
|
|
610
|
+
$[87] = resolvedAsset.asset;
|
|
611
|
+
$[88] = selectedPath;
|
|
612
|
+
$[89] = t31;
|
|
613
|
+
$[90] = target.info;
|
|
614
|
+
$[91] = t32;
|
|
615
|
+
} else t32 = $[91];
|
|
616
|
+
selectedFile = t32;
|
|
579
617
|
} else if (target.media && binaryQuery.isSuccess && !binaryQuery.isFetching) {
|
|
580
|
-
let t29;
|
|
581
|
-
if ($[89] !== selectedPath) {
|
|
582
|
-
t29 = workspaceBasename(selectedPath);
|
|
583
|
-
$[89] = selectedPath;
|
|
584
|
-
$[90] = t29;
|
|
585
|
-
} else t29 = $[90];
|
|
586
|
-
const t30 = binaryQuery.data?.asset ?? null;
|
|
587
618
|
let t31;
|
|
588
|
-
if ($[
|
|
589
|
-
t31 =
|
|
619
|
+
if ($[92] !== selectedPath) {
|
|
620
|
+
t31 = workspaceBasename(selectedPath);
|
|
621
|
+
$[92] = selectedPath;
|
|
622
|
+
$[93] = t31;
|
|
623
|
+
} else t31 = $[93];
|
|
624
|
+
const t32 = binaryQuery.data?.asset ?? null;
|
|
625
|
+
let t33;
|
|
626
|
+
if ($[94] !== selectedPath || $[95] !== t31 || $[96] !== t32 || $[97] !== target.info) {
|
|
627
|
+
t33 = {
|
|
590
628
|
path: selectedPath,
|
|
591
|
-
name:
|
|
629
|
+
name: t31,
|
|
592
630
|
content: null,
|
|
593
|
-
asset:
|
|
631
|
+
asset: t32,
|
|
594
632
|
info: target.info,
|
|
595
633
|
error: null
|
|
596
634
|
};
|
|
597
|
-
$[
|
|
598
|
-
$[92] = t29;
|
|
599
|
-
$[93] = t30;
|
|
600
|
-
$[94] = target.info;
|
|
635
|
+
$[94] = selectedPath;
|
|
601
636
|
$[95] = t31;
|
|
602
|
-
|
|
603
|
-
|
|
637
|
+
$[96] = t32;
|
|
638
|
+
$[97] = target.info;
|
|
639
|
+
$[98] = t33;
|
|
640
|
+
} else t33 = $[98];
|
|
641
|
+
selectedFile = t33;
|
|
604
642
|
} else if (targetIsText && textQuery.isSuccess) {
|
|
605
|
-
let
|
|
606
|
-
if ($[
|
|
607
|
-
|
|
608
|
-
$[
|
|
609
|
-
$[
|
|
610
|
-
} else
|
|
611
|
-
let
|
|
612
|
-
if ($[
|
|
613
|
-
|
|
643
|
+
let t31;
|
|
644
|
+
if ($[99] !== selectedPath) {
|
|
645
|
+
t31 = workspaceBasename(selectedPath);
|
|
646
|
+
$[99] = selectedPath;
|
|
647
|
+
$[100] = t31;
|
|
648
|
+
} else t31 = $[100];
|
|
649
|
+
let t32;
|
|
650
|
+
if ($[101] !== selectedPath || $[102] !== t31 || $[103] !== target.info || $[104] !== textQuery.data) {
|
|
651
|
+
t32 = {
|
|
614
652
|
path: selectedPath,
|
|
615
|
-
name:
|
|
653
|
+
name: t31,
|
|
616
654
|
content: textQuery.data,
|
|
617
655
|
asset: null,
|
|
618
656
|
info: target.info,
|
|
619
657
|
error: null
|
|
620
658
|
};
|
|
621
|
-
$[
|
|
622
|
-
$[
|
|
623
|
-
$[
|
|
624
|
-
$[
|
|
625
|
-
$[
|
|
626
|
-
} else
|
|
627
|
-
selectedFile =
|
|
659
|
+
$[101] = selectedPath;
|
|
660
|
+
$[102] = t31;
|
|
661
|
+
$[103] = target.info;
|
|
662
|
+
$[104] = textQuery.data;
|
|
663
|
+
$[105] = t32;
|
|
664
|
+
} else t32 = $[105];
|
|
665
|
+
selectedFile = t32;
|
|
628
666
|
} else if (!target.media && !targetIsText) {
|
|
629
|
-
let
|
|
630
|
-
if ($[
|
|
631
|
-
|
|
632
|
-
$[
|
|
633
|
-
$[
|
|
634
|
-
} else
|
|
635
|
-
let
|
|
636
|
-
if ($[
|
|
637
|
-
|
|
667
|
+
let t31;
|
|
668
|
+
if ($[106] !== selectedPath) {
|
|
669
|
+
t31 = workspaceBasename(selectedPath);
|
|
670
|
+
$[106] = selectedPath;
|
|
671
|
+
$[107] = t31;
|
|
672
|
+
} else t31 = $[107];
|
|
673
|
+
let t32;
|
|
674
|
+
if ($[108] !== selectedPath || $[109] !== t31 || $[110] !== target.info) {
|
|
675
|
+
t32 = {
|
|
638
676
|
path: selectedPath,
|
|
639
|
-
name:
|
|
677
|
+
name: t31,
|
|
640
678
|
content: null,
|
|
641
679
|
asset: null,
|
|
642
680
|
info: target.info,
|
|
643
681
|
error: null
|
|
644
682
|
};
|
|
645
|
-
$[
|
|
646
|
-
$[
|
|
647
|
-
$[
|
|
648
|
-
$[
|
|
649
|
-
} else
|
|
650
|
-
selectedFile =
|
|
683
|
+
$[108] = selectedPath;
|
|
684
|
+
$[109] = t31;
|
|
685
|
+
$[110] = target.info;
|
|
686
|
+
$[111] = t32;
|
|
687
|
+
} else t32 = $[111];
|
|
688
|
+
selectedFile = t32;
|
|
651
689
|
}
|
|
652
690
|
}
|
|
653
691
|
let paths;
|
|
654
|
-
if ($[
|
|
692
|
+
if ($[112] !== assetQuery || $[113] !== binaryQuery || $[114] !== directoryPaths || $[115] !== directoryQueries || $[116] !== selectedPath || $[117] !== statQuery || $[118] !== textQuery) {
|
|
655
693
|
paths = /* @__PURE__ */ new Set();
|
|
656
694
|
for (const [index, path_1] of directoryPaths.entries()) if (directoryQueries[index]?.isFetching) paths.add(path_1);
|
|
657
695
|
if (selectedPath && [
|
|
@@ -660,28 +698,28 @@ function useWorkspace(t0) {
|
|
|
660
698
|
textQuery,
|
|
661
699
|
binaryQuery
|
|
662
700
|
].some(_temp)) paths.add(selectedPath);
|
|
663
|
-
$[
|
|
664
|
-
$[
|
|
665
|
-
$[
|
|
666
|
-
$[
|
|
667
|
-
$[
|
|
668
|
-
$[
|
|
669
|
-
$[
|
|
670
|
-
$[
|
|
671
|
-
} else paths = $[
|
|
701
|
+
$[112] = assetQuery;
|
|
702
|
+
$[113] = binaryQuery;
|
|
703
|
+
$[114] = directoryPaths;
|
|
704
|
+
$[115] = directoryQueries;
|
|
705
|
+
$[116] = selectedPath;
|
|
706
|
+
$[117] = statQuery;
|
|
707
|
+
$[118] = textQuery;
|
|
708
|
+
$[119] = paths;
|
|
709
|
+
} else paths = $[119];
|
|
672
710
|
const loadingPaths = paths;
|
|
673
711
|
const rootDirectoryIndex = directoryPaths.indexOf(root);
|
|
674
|
-
const isLoading = Boolean(directoryQueries[rootDirectoryIndex]?.isFetching) || infoQuery.isFetching;
|
|
675
|
-
let
|
|
676
|
-
if ($[
|
|
677
|
-
|
|
678
|
-
$[
|
|
679
|
-
$[
|
|
680
|
-
} else
|
|
681
|
-
const error =
|
|
682
|
-
let
|
|
683
|
-
if ($[
|
|
684
|
-
|
|
712
|
+
const isLoading = Boolean(directoryQueries[rootDirectoryIndex]?.isFetching) || showsInfo && infoQuery.isFetching;
|
|
713
|
+
let t31;
|
|
714
|
+
if ($[120] !== directoryQueries) {
|
|
715
|
+
t31 = [...new Set(directoryQueries.map(_temp2).filter(_temp3).map(formatErrorMessage))].join("; ") || null;
|
|
716
|
+
$[120] = directoryQueries;
|
|
717
|
+
$[121] = t31;
|
|
718
|
+
} else t31 = $[121];
|
|
719
|
+
const error = t31;
|
|
720
|
+
let t32;
|
|
721
|
+
if ($[122] !== expandedPaths || $[123] !== normalizedMaxInlineAssetBytes || $[124] !== queryClient || $[125] !== resolveFileAsset || $[126] !== root || $[127] !== scopeKey || $[128] !== selectedPath || $[129] !== source || $[130] !== sourceKey) {
|
|
722
|
+
t32 = () => {
|
|
685
723
|
(async () => {
|
|
686
724
|
const latestExpandedPaths = latestExpansionRef.current.scopeKey === scopeKey ? latestExpansionRef.current.paths : expandedPaths;
|
|
687
725
|
const refreshedDirectoryPaths = [.../* @__PURE__ */ new Set([root, ...latestExpandedPaths])].sort();
|
|
@@ -697,10 +735,7 @@ function useWorkspace(t0) {
|
|
|
697
735
|
return false;
|
|
698
736
|
}
|
|
699
737
|
}));
|
|
700
|
-
|
|
701
|
-
...workspaceInfoQueryOptions(source, sourceKey),
|
|
702
|
-
staleTime: 0
|
|
703
|
-
}).catch(_temp4);
|
|
738
|
+
invalidateWorkspaceInfo(queryClient, sourceKey);
|
|
704
739
|
if (refreshedDirectories.includes(false)) return;
|
|
705
740
|
await refreshWorkspaceFileQueries(queryClient, {
|
|
706
741
|
source,
|
|
@@ -710,58 +745,57 @@ function useWorkspace(t0) {
|
|
|
710
745
|
resolveFileAsset,
|
|
711
746
|
maxInlineAssetBytes: normalizedMaxInlineAssetBytes
|
|
712
747
|
});
|
|
713
|
-
})().catch(
|
|
748
|
+
})().catch(_temp4);
|
|
714
749
|
};
|
|
715
|
-
$[
|
|
716
|
-
$[
|
|
717
|
-
$[
|
|
718
|
-
$[
|
|
719
|
-
$[
|
|
720
|
-
$[
|
|
721
|
-
$[
|
|
722
|
-
$[
|
|
723
|
-
$[
|
|
724
|
-
$[
|
|
725
|
-
} else
|
|
726
|
-
const refresh =
|
|
727
|
-
const
|
|
728
|
-
const
|
|
729
|
-
const
|
|
730
|
-
let
|
|
731
|
-
if ($[
|
|
732
|
-
|
|
750
|
+
$[122] = expandedPaths;
|
|
751
|
+
$[123] = normalizedMaxInlineAssetBytes;
|
|
752
|
+
$[124] = queryClient;
|
|
753
|
+
$[125] = resolveFileAsset;
|
|
754
|
+
$[126] = root;
|
|
755
|
+
$[127] = scopeKey;
|
|
756
|
+
$[128] = selectedPath;
|
|
757
|
+
$[129] = source;
|
|
758
|
+
$[130] = sourceKey;
|
|
759
|
+
$[131] = t32;
|
|
760
|
+
} else t32 = $[131];
|
|
761
|
+
const refresh = t32;
|
|
762
|
+
const t33 = entryByPath.size > 0 ? entryByPath : EMPTY_ENTRY_BY_PATH;
|
|
763
|
+
const t34 = loadingPaths.size > 0 ? loadingPaths : EMPTY_PATHS;
|
|
764
|
+
const t35 = showsInfo ? infoQuery.data ?? null : null;
|
|
765
|
+
let t36;
|
|
766
|
+
if ($[132] !== entriesByDirectory || $[133] !== error || $[134] !== expandedPaths || $[135] !== isLoading || $[136] !== refresh || $[137] !== root || $[138] !== selectFile || $[139] !== selectedFile || $[140] !== selectedPath || $[141] !== setExpandedPaths || $[142] !== t33 || $[143] !== t34 || $[144] !== t35) {
|
|
767
|
+
t36 = {
|
|
733
768
|
root,
|
|
734
769
|
entriesByDirectory,
|
|
735
|
-
entryByPath:
|
|
770
|
+
entryByPath: t33,
|
|
736
771
|
expandedPaths,
|
|
737
772
|
setExpandedPaths,
|
|
738
773
|
selectedPath,
|
|
739
774
|
selectFile,
|
|
740
775
|
selectedFile,
|
|
741
776
|
isLoading,
|
|
742
|
-
loadingPaths:
|
|
777
|
+
loadingPaths: t34,
|
|
743
778
|
error,
|
|
744
|
-
info:
|
|
779
|
+
info: t35,
|
|
745
780
|
refresh
|
|
746
781
|
};
|
|
747
|
-
$[
|
|
748
|
-
$[
|
|
749
|
-
$[
|
|
750
|
-
$[
|
|
751
|
-
$[
|
|
752
|
-
$[
|
|
753
|
-
$[
|
|
754
|
-
$[
|
|
755
|
-
$[
|
|
756
|
-
$[
|
|
757
|
-
$[
|
|
758
|
-
$[
|
|
759
|
-
$[
|
|
760
|
-
$[
|
|
761
|
-
} else
|
|
762
|
-
return
|
|
782
|
+
$[132] = entriesByDirectory;
|
|
783
|
+
$[133] = error;
|
|
784
|
+
$[134] = expandedPaths;
|
|
785
|
+
$[135] = isLoading;
|
|
786
|
+
$[136] = refresh;
|
|
787
|
+
$[137] = root;
|
|
788
|
+
$[138] = selectFile;
|
|
789
|
+
$[139] = selectedFile;
|
|
790
|
+
$[140] = selectedPath;
|
|
791
|
+
$[141] = setExpandedPaths;
|
|
792
|
+
$[142] = t33;
|
|
793
|
+
$[143] = t34;
|
|
794
|
+
$[144] = t35;
|
|
795
|
+
$[145] = t36;
|
|
796
|
+
} else t36 = $[145];
|
|
797
|
+
return t36;
|
|
763
798
|
}
|
|
764
|
-
function _temp5() {}
|
|
765
799
|
function _temp4() {}
|
|
766
800
|
function _temp3(queryError) {
|
|
767
801
|
return queryError !== null;
|
|
@@ -773,4 +807,4 @@ function _temp(query) {
|
|
|
773
807
|
return query.isFetching;
|
|
774
808
|
}
|
|
775
809
|
//#endregion
|
|
776
|
-
export { refreshWorkspaceFileQueries, useWorkspace, workspaceBinaryFileQueryOptions, workspaceDirectoryQueryKey, workspaceDirectoryQueryOptions, workspaceDirectoryQueryPrefix, workspaceFileAssetQueryOptions, workspaceFileQueryKey, workspaceFileStatQueryOptions, workspaceInfoQueryKey, workspaceInfoQueryOptions, workspaceQueryKey, workspaceTextFileQueryOptions };
|
|
810
|
+
export { invalidateWorkspaceInfo, refreshWorkspaceFileQueries, useWorkspace, workspaceBinaryFileQueryOptions, workspaceDirectoryQueryKey, workspaceDirectoryQueryOptions, workspaceDirectoryQueryPrefix, workspaceFileAssetQueryOptions, workspaceFileQueryKey, workspaceFileStatQueryOptions, workspaceInfoQueryKey, workspaceInfoQueryOptions, workspaceQueryKey, workspaceTextFileQueryOptions };
|