@tutti-os/workspace-file-manager 0.0.201 → 0.0.202
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/README.md
CHANGED
|
@@ -43,6 +43,13 @@ drag movement.
|
|
|
43
43
|
Hosts now provide one app-level i18n runtime and scope it into the file-manager
|
|
44
44
|
namespace, rather than hand-assembling package-local message objects.
|
|
45
45
|
|
|
46
|
+
The React surface owns its archive and folder fallback artwork. Those files are
|
|
47
|
+
published through the stable
|
|
48
|
+
`@tutti-os/workspace-file-manager/assets/workspace-*-fallback.png` subpaths so
|
|
49
|
+
consumer bundlers can resolve them during dependency prebundling. Keep runtime
|
|
50
|
+
imports on those public subpaths; relative `new URL("./assets/...", import.meta.url)`
|
|
51
|
+
references from the built entry are not a supported asset contract.
|
|
52
|
+
|
|
46
53
|
What stays outside this package is concrete host integration: desktop preload
|
|
47
54
|
calls, tuttid transport wiring, host absolute paths, import/export/upload
|
|
48
55
|
flows, share/exposure flows, and other product-specific integration details
|
package/dist/index.js
CHANGED
|
@@ -1116,14 +1116,8 @@ import {
|
|
|
1116
1116
|
} from "@tutti-os/workspace-file-preview";
|
|
1117
1117
|
|
|
1118
1118
|
// src/workspaceFileFallbackAssets.ts
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
import.meta.url
|
|
1122
|
-
).toString();
|
|
1123
|
-
var workspaceFolderFallbackIconUrl = new URL(
|
|
1124
|
-
"./assets/workspace-folder-fallback.png",
|
|
1125
|
-
import.meta.url
|
|
1126
|
-
).toString();
|
|
1119
|
+
import workspaceArchiveFallbackIconUrl from "@tutti-os/workspace-file-manager/assets/workspace-archive-fallback.png";
|
|
1120
|
+
import workspaceFolderFallbackIconUrl from "@tutti-os/workspace-file-manager/assets/workspace-folder-fallback.png";
|
|
1127
1121
|
|
|
1128
1122
|
// src/ui/WorkspaceFileEntryIcon.tsx
|
|
1129
1123
|
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
@@ -2392,7 +2386,7 @@ function EntryRow({
|
|
|
2392
2386
|
});
|
|
2393
2387
|
}, [selected]);
|
|
2394
2388
|
const rowClassName = cn4(
|
|
2395
|
-
"grid min-h-10 w-full items-center gap-x-6 border-b border-[var(--border-1)] px-0 text-left transition-colors",
|
|
2389
|
+
"relative grid min-h-10 w-full items-center gap-x-6 border-b border-[var(--border-1)] px-0 text-left transition-colors",
|
|
2396
2390
|
gridClassName,
|
|
2397
2391
|
isInlineRenaming ? "cursor-default" : "cursor-pointer hover:bg-transparency-hover active:bg-[var(--transparency-active)]",
|
|
2398
2392
|
canMove && moveDragActive && "cursor-grabbing",
|
|
@@ -2402,43 +2396,52 @@ function EntryRow({
|
|
|
2402
2396
|
moveDragActive && !moveDragSource && !moveDragTarget && "opacity-90"
|
|
2403
2397
|
);
|
|
2404
2398
|
const rowProps = {
|
|
2405
|
-
"aria-label": entry.name,
|
|
2406
2399
|
className: rowClassName,
|
|
2407
2400
|
"data-workspace-file-entry-path": entry.path,
|
|
2408
|
-
draggable: isInlineRenaming ? false : draggable,
|
|
2409
2401
|
style: gridStyle,
|
|
2410
2402
|
onContextMenu: (event) => {
|
|
2411
2403
|
onContextMenu(event, entry);
|
|
2412
2404
|
}
|
|
2413
2405
|
};
|
|
2414
|
-
const nameCell = /* @__PURE__ */ jsx6(
|
|
2415
|
-
|
|
2406
|
+
const nameCell = /* @__PURE__ */ jsx6(
|
|
2407
|
+
"span",
|
|
2416
2408
|
{
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2409
|
+
className: cn4(
|
|
2410
|
+
"min-w-0 overflow-hidden",
|
|
2411
|
+
!isInlineRenaming && "pointer-events-none relative z-[1]",
|
|
2412
|
+
tableCellPaddingClassName
|
|
2413
|
+
),
|
|
2414
|
+
children: /* @__PURE__ */ jsx6(
|
|
2415
|
+
EntryNameCell,
|
|
2416
|
+
{
|
|
2417
|
+
copy,
|
|
2418
|
+
contextLabel,
|
|
2419
|
+
entry,
|
|
2420
|
+
iconUrlByCacheKey,
|
|
2421
|
+
inlineRenameValidation,
|
|
2422
|
+
isEnteringDirectory,
|
|
2423
|
+
isExpanded: expanded,
|
|
2424
|
+
isExpandable: expandable,
|
|
2425
|
+
isInlineRenaming,
|
|
2426
|
+
isLoadingChildren,
|
|
2427
|
+
isRenaming,
|
|
2428
|
+
treeDepth: depth,
|
|
2429
|
+
onEntryIconViewportLeave,
|
|
2430
|
+
onEntryIconViewportEnter,
|
|
2431
|
+
onCancelInlineRename,
|
|
2432
|
+
onClearInlineRenameValidation,
|
|
2433
|
+
onConfirmInlineRename,
|
|
2434
|
+
onToggleDirectoryExpanded
|
|
2435
|
+
}
|
|
2436
|
+
)
|
|
2435
2437
|
}
|
|
2436
|
-
)
|
|
2438
|
+
);
|
|
2437
2439
|
const modifiedCell = /* @__PURE__ */ jsx6(
|
|
2438
2440
|
"span",
|
|
2439
2441
|
{
|
|
2440
2442
|
className: cn4(
|
|
2441
2443
|
"truncate text-xs text-[var(--text-secondary)]",
|
|
2444
|
+
!isInlineRenaming && "pointer-events-none relative z-[1]",
|
|
2442
2445
|
tableCellPaddingClassName
|
|
2443
2446
|
),
|
|
2444
2447
|
children: formatWorkspaceFileModifiedTime(
|
|
@@ -2452,24 +2455,34 @@ function EntryRow({
|
|
|
2452
2455
|
{
|
|
2453
2456
|
className: cn4(
|
|
2454
2457
|
"truncate text-xs text-[var(--text-secondary)]",
|
|
2458
|
+
!isInlineRenaming && "pointer-events-none relative z-[1]",
|
|
2455
2459
|
tableCellPaddingClassName
|
|
2456
2460
|
),
|
|
2457
2461
|
children: entry.kind === "directory" ? "--" : formatWorkspaceFileBytes(entry.sizeBytes)
|
|
2458
2462
|
}
|
|
2459
2463
|
);
|
|
2460
2464
|
if (isInlineRenaming) {
|
|
2461
|
-
return /* @__PURE__ */ jsxs5(
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2465
|
+
return /* @__PURE__ */ jsxs5(
|
|
2466
|
+
"div",
|
|
2467
|
+
{
|
|
2468
|
+
...rowProps,
|
|
2469
|
+
"aria-label": entry.name,
|
|
2470
|
+
draggable: false,
|
|
2471
|
+
ref: divRowRef,
|
|
2472
|
+
children: [
|
|
2473
|
+
nameCell,
|
|
2474
|
+
modifiedCell,
|
|
2475
|
+
sizeCell
|
|
2476
|
+
]
|
|
2477
|
+
}
|
|
2478
|
+
);
|
|
2466
2479
|
}
|
|
2467
2480
|
return /* @__PURE__ */ jsxs5(
|
|
2468
|
-
"
|
|
2481
|
+
"div",
|
|
2469
2482
|
{
|
|
2470
2483
|
...rowProps,
|
|
2471
|
-
|
|
2472
|
-
|
|
2484
|
+
draggable,
|
|
2485
|
+
ref: divRowRef,
|
|
2473
2486
|
onDragStart: (event) => {
|
|
2474
2487
|
if (!draggable) {
|
|
2475
2488
|
event.preventDefault();
|
|
@@ -2477,13 +2490,22 @@ function EntryRow({
|
|
|
2477
2490
|
}
|
|
2478
2491
|
onDragStart?.(entry, event.dataTransfer);
|
|
2479
2492
|
},
|
|
2480
|
-
onPointerDown: (event) => {
|
|
2481
|
-
onPointerDown(entry, event);
|
|
2482
|
-
},
|
|
2483
|
-
onClick: () => {
|
|
2484
|
-
onClick(entry);
|
|
2485
|
-
},
|
|
2486
2493
|
children: [
|
|
2494
|
+
/* @__PURE__ */ jsx6(
|
|
2495
|
+
"button",
|
|
2496
|
+
{
|
|
2497
|
+
"aria-label": entry.name,
|
|
2498
|
+
className: "absolute inset-0 z-0",
|
|
2499
|
+
ref: buttonRowRef,
|
|
2500
|
+
type: "button",
|
|
2501
|
+
onPointerDown: (event) => {
|
|
2502
|
+
onPointerDown(entry, event);
|
|
2503
|
+
},
|
|
2504
|
+
onClick: () => {
|
|
2505
|
+
onClick(entry);
|
|
2506
|
+
}
|
|
2507
|
+
}
|
|
2508
|
+
),
|
|
2487
2509
|
nameCell,
|
|
2488
2510
|
modifiedCell,
|
|
2489
2511
|
sizeCell
|
|
@@ -2614,7 +2636,7 @@ function DirectoryDisclosureButton({
|
|
|
2614
2636
|
expanded ? "collapseFolderLabel" : "expandFolderLabel"
|
|
2615
2637
|
),
|
|
2616
2638
|
"aria-expanded": expanded,
|
|
2617
|
-
className: "grid size-5 shrink-0 place-items-center rounded text-[var(--text-tertiary)] transition-colors hover:bg-transparency-block hover:text-[var(--text-primary)]",
|
|
2639
|
+
className: "pointer-events-auto grid size-5 shrink-0 place-items-center rounded text-[var(--text-tertiary)] transition-colors hover:bg-transparency-block hover:text-[var(--text-primary)]",
|
|
2618
2640
|
disabled: isLoading,
|
|
2619
2641
|
type: "button",
|
|
2620
2642
|
onClick: (event) => {
|