@gallop.software/studio 0.1.64 → 0.1.66
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/{StudioUI-57YOECIG.mjs → StudioUI-BFPT2G4P.mjs} +97 -5
- package/dist/StudioUI-BFPT2G4P.mjs.map +1 -0
- package/dist/{StudioUI-ILJIWA7T.js → StudioUI-RVVJ4TYS.js} +104 -12
- package/dist/StudioUI-RVVJ4TYS.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/StudioUI-57YOECIG.mjs.map +0 -1
- package/dist/StudioUI-ILJIWA7T.js.map +0 -1
|
@@ -447,22 +447,54 @@ var styles2 = {
|
|
|
447
447
|
folderList: _react3.css`
|
|
448
448
|
display: flex;
|
|
449
449
|
flex-direction: column;
|
|
450
|
-
gap:
|
|
450
|
+
gap: 0;
|
|
451
451
|
`,
|
|
452
452
|
folderItem: _react3.css`
|
|
453
453
|
display: flex;
|
|
454
454
|
align-items: center;
|
|
455
455
|
gap: 8px;
|
|
456
|
-
padding:
|
|
456
|
+
padding: 8px 12px;
|
|
457
457
|
border-radius: 6px;
|
|
458
458
|
cursor: pointer;
|
|
459
459
|
transition: all 0.15s ease;
|
|
460
460
|
border: 1px solid transparent;
|
|
461
|
+
position: relative;
|
|
461
462
|
|
|
462
463
|
&:hover {
|
|
463
464
|
background-color: ${_chunkUFCWGUAGjs.colors.surfaceHover};
|
|
464
465
|
}
|
|
465
466
|
`,
|
|
467
|
+
treeIndent: _react3.css`
|
|
468
|
+
display: flex;
|
|
469
|
+
align-items: center;
|
|
470
|
+
height: 100%;
|
|
471
|
+
`,
|
|
472
|
+
treeLine: _react3.css`
|
|
473
|
+
width: 16px;
|
|
474
|
+
height: 100%;
|
|
475
|
+
position: relative;
|
|
476
|
+
flex-shrink: 0;
|
|
477
|
+
|
|
478
|
+
&::before {
|
|
479
|
+
content: '';
|
|
480
|
+
position: absolute;
|
|
481
|
+
left: 8px;
|
|
482
|
+
top: 0;
|
|
483
|
+
bottom: 50%;
|
|
484
|
+
width: 0;
|
|
485
|
+
border-left: 1px dashed ${_chunkUFCWGUAGjs.colors.border};
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
&::after {
|
|
489
|
+
content: '';
|
|
490
|
+
position: absolute;
|
|
491
|
+
left: 8px;
|
|
492
|
+
top: 50%;
|
|
493
|
+
width: 8px;
|
|
494
|
+
height: 0;
|
|
495
|
+
border-top: 1px dashed ${_chunkUFCWGUAGjs.colors.border};
|
|
496
|
+
}
|
|
497
|
+
`,
|
|
466
498
|
folderItemSelected: _react3.css`
|
|
467
499
|
background-color: ${_chunkUFCWGUAGjs.colors.primaryLight};
|
|
468
500
|
border-color: ${_chunkUFCWGUAGjs.colors.primary};
|
|
@@ -607,9 +639,10 @@ function StudioFolderPicker({ selectedItems, currentPath, onMove, onCancel }) {
|
|
|
607
639
|
selectedFolder === folder.path && styles2.folderItemSelected,
|
|
608
640
|
disabled && styles2.folderItemDisabled
|
|
609
641
|
],
|
|
610
|
-
style: { paddingLeft: 12
|
|
642
|
+
style: { paddingLeft: 12 },
|
|
611
643
|
onClick: () => !disabled && setSelectedFolder(folder.path),
|
|
612
644
|
children: [
|
|
645
|
+
folder.depth > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { css: styles2.treeIndent, children: Array.from({ length: folder.depth }).map((_, i) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { css: styles2.treeLine }, i)) }),
|
|
613
646
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { css: styles2.folderIcon, fill: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z" }) }),
|
|
614
647
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { css: styles2.folderName, children: [
|
|
615
648
|
folder.name,
|
|
@@ -861,7 +894,7 @@ function StudioToolbar() {
|
|
|
861
894
|
const [showMoveModal, setShowMoveModal] = _react.useState.call(void 0, false);
|
|
862
895
|
const isInImagesFolder = currentPath === "public/images" || currentPath.startsWith("public/images/");
|
|
863
896
|
const handleUpload = _react.useCallback.call(void 0, () => {
|
|
864
|
-
_optionalChain([fileInputRef, 'access',
|
|
897
|
+
_optionalChain([fileInputRef, 'access', _2 => _2.current, 'optionalAccess', _3 => _3.click, 'call', _4 => _4()]);
|
|
865
898
|
}, []);
|
|
866
899
|
const handleRefresh = _react.useCallback.call(void 0, () => {
|
|
867
900
|
setRefreshing(true);
|
|
@@ -917,7 +950,7 @@ function StudioToolbar() {
|
|
|
917
950
|
const selectedPaths = Array.from(selectedItems);
|
|
918
951
|
const imageExtensions = ["jpg", "jpeg", "png", "gif", "webp", "svg", "ico", "bmp", "tiff", "tif"];
|
|
919
952
|
const selectedImagePaths = selectedPaths.filter((p) => {
|
|
920
|
-
const ext = _optionalChain([p, 'access',
|
|
953
|
+
const ext = _optionalChain([p, 'access', _5 => _5.split, 'call', _6 => _6("."), 'access', _7 => _7.pop, 'call', _8 => _8(), 'optionalAccess', _9 => _9.toLowerCase, 'call', _10 => _10()]) || "";
|
|
921
954
|
return imageExtensions.includes(ext);
|
|
922
955
|
});
|
|
923
956
|
const selectedFolders = selectedPaths.filter((p) => !p.includes(".") || p.endsWith("/"));
|
|
@@ -1078,12 +1111,12 @@ function StudioToolbar() {
|
|
|
1078
1111
|
const data = await response.json();
|
|
1079
1112
|
if (response.ok) {
|
|
1080
1113
|
setProgressState({
|
|
1081
|
-
current: _optionalChain([data, 'access',
|
|
1082
|
-
total: _optionalChain([data, 'access',
|
|
1114
|
+
current: _optionalChain([data, 'access', _11 => _11.processed, 'optionalAccess', _12 => _12.length]) || 0,
|
|
1115
|
+
total: _optionalChain([data, 'access', _13 => _13.processed, 'optionalAccess', _14 => _14.length]) || 0,
|
|
1083
1116
|
percent: 100,
|
|
1084
1117
|
status: "complete",
|
|
1085
|
-
processed: _optionalChain([data, 'access',
|
|
1086
|
-
errors: _optionalChain([data, 'access',
|
|
1118
|
+
processed: _optionalChain([data, 'access', _15 => _15.processed, 'optionalAccess', _16 => _16.length]) || 0,
|
|
1119
|
+
errors: _optionalChain([data, 'access', _17 => _17.errors, 'optionalAccess', _18 => _18.length]) || 0
|
|
1087
1120
|
});
|
|
1088
1121
|
clearSelection();
|
|
1089
1122
|
triggerRefresh();
|
|
@@ -2955,7 +2988,7 @@ function StudioDetailView() {
|
|
|
2955
2988
|
if (!response.ok) {
|
|
2956
2989
|
throw new Error("Processing failed");
|
|
2957
2990
|
}
|
|
2958
|
-
const reader = _optionalChain([response, 'access',
|
|
2991
|
+
const reader = _optionalChain([response, 'access', _19 => _19.body, 'optionalAccess', _20 => _20.getReader, 'call', _21 => _21()]);
|
|
2959
2992
|
if (!reader) {
|
|
2960
2993
|
throw new Error("No response body");
|
|
2961
2994
|
}
|
|
@@ -3469,6 +3502,44 @@ var styles8 = {
|
|
|
3469
3502
|
margin: 0;
|
|
3470
3503
|
letter-spacing: -0.02em;
|
|
3471
3504
|
`,
|
|
3505
|
+
headerLeft: _react3.css`
|
|
3506
|
+
display: flex;
|
|
3507
|
+
align-items: center;
|
|
3508
|
+
gap: 12px;
|
|
3509
|
+
min-width: 0;
|
|
3510
|
+
flex: 1;
|
|
3511
|
+
`,
|
|
3512
|
+
breadcrumbs: _react3.css`
|
|
3513
|
+
display: flex;
|
|
3514
|
+
align-items: center;
|
|
3515
|
+
gap: 6px;
|
|
3516
|
+
font-size: ${_chunkUFCWGUAGjs.fontSize.base};
|
|
3517
|
+
color: ${_chunkUFCWGUAGjs.colors.textSecondary};
|
|
3518
|
+
min-width: 0;
|
|
3519
|
+
overflow: hidden;
|
|
3520
|
+
`,
|
|
3521
|
+
breadcrumbSeparator: _react3.css`
|
|
3522
|
+
color: ${_chunkUFCWGUAGjs.colors.border};
|
|
3523
|
+
flex-shrink: 0;
|
|
3524
|
+
`,
|
|
3525
|
+
breadcrumbItem: _react3.css`
|
|
3526
|
+
color: ${_chunkUFCWGUAGjs.colors.textSecondary};
|
|
3527
|
+
text-decoration: none;
|
|
3528
|
+
cursor: pointer;
|
|
3529
|
+
transition: color 0.15s ease;
|
|
3530
|
+
white-space: nowrap;
|
|
3531
|
+
|
|
3532
|
+
&:hover {
|
|
3533
|
+
color: ${_chunkUFCWGUAGjs.colors.primary};
|
|
3534
|
+
}
|
|
3535
|
+
`,
|
|
3536
|
+
breadcrumbCurrent: _react3.css`
|
|
3537
|
+
color: ${_chunkUFCWGUAGjs.colors.text};
|
|
3538
|
+
font-weight: 500;
|
|
3539
|
+
white-space: nowrap;
|
|
3540
|
+
overflow: hidden;
|
|
3541
|
+
text-overflow: ellipsis;
|
|
3542
|
+
`,
|
|
3472
3543
|
headerActions: _react3.css`
|
|
3473
3544
|
display: flex;
|
|
3474
3545
|
align-items: center;
|
|
@@ -3685,7 +3756,10 @@ function StudioUI({ onClose, isVisible = true }) {
|
|
|
3685
3756
|
};
|
|
3686
3757
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, StudioContext.Provider, { value: contextValue, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { css: styles8.container, children: [
|
|
3687
3758
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { css: styles8.header, children: [
|
|
3688
|
-
/* @__PURE__ */ _jsxruntime.
|
|
3759
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { css: styles8.headerLeft, children: [
|
|
3760
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h1", { css: styles8.title, children: "Studio" }),
|
|
3761
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Breadcrumbs, { currentPath, onNavigate: setCurrentPath })
|
|
3762
|
+
] }),
|
|
3689
3763
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { css: styles8.headerActions, children: [
|
|
3690
3764
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, StudioSettings, {}),
|
|
3691
3765
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -3719,6 +3793,24 @@ function StudioUI({ onClose, isVisible = true }) {
|
|
|
3719
3793
|
focusedItem && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, StudioDetailView, {})
|
|
3720
3794
|
] }) });
|
|
3721
3795
|
}
|
|
3796
|
+
function Breadcrumbs({ currentPath, onNavigate }) {
|
|
3797
|
+
const parts = currentPath.split("/").filter(Boolean);
|
|
3798
|
+
const breadcrumbs = parts.map((part, index) => ({
|
|
3799
|
+
name: part,
|
|
3800
|
+
path: parts.slice(0, index + 1).join("/")
|
|
3801
|
+
}));
|
|
3802
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { css: styles8.breadcrumbs, children: breadcrumbs.map((crumb, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { style: { display: "flex", alignItems: "center", gap: 6 }, children: [
|
|
3803
|
+
index > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { css: styles8.breadcrumbSeparator, children: "/" }),
|
|
3804
|
+
index === breadcrumbs.length - 1 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { css: styles8.breadcrumbCurrent, children: crumb.name }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3805
|
+
"span",
|
|
3806
|
+
{
|
|
3807
|
+
css: styles8.breadcrumbItem,
|
|
3808
|
+
onClick: () => onNavigate(crumb.path),
|
|
3809
|
+
children: crumb.name
|
|
3810
|
+
}
|
|
3811
|
+
)
|
|
3812
|
+
] }, crumb.path)) });
|
|
3813
|
+
}
|
|
3722
3814
|
function CloseIcon() {
|
|
3723
3815
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
3724
3816
|
"svg",
|
|
@@ -3743,4 +3835,4 @@ var StudioUI_default = StudioUI;
|
|
|
3743
3835
|
|
|
3744
3836
|
|
|
3745
3837
|
exports.StudioUI = StudioUI; exports.default = StudioUI_default;
|
|
3746
|
-
//# sourceMappingURL=StudioUI-
|
|
3838
|
+
//# sourceMappingURL=StudioUI-RVVJ4TYS.js.map
|