@gallop.software/studio 0.1.90 → 0.1.91

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.
@@ -357,9 +357,19 @@ function ProgressModal({
357
357
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { css: styles.message, children: [
358
358
  "Processed ",
359
359
  progress.processed,
360
- " image",
360
+ " new image",
361
361
  progress.processed !== 1 ? "s" : "",
362
362
  ".",
363
+ progress.alreadyProcessed !== void 0 && progress.alreadyProcessed > 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
364
+ " ",
365
+ progress.alreadyProcessed,
366
+ " already processed."
367
+ ] }) : null,
368
+ progress.pushedToCloud !== void 0 && progress.pushedToCloud > 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
369
+ " ",
370
+ progress.pushedToCloud,
371
+ " pushed to CDN."
372
+ ] }) : null,
363
373
  progress.orphansRemoved !== void 0 && progress.orphansRemoved > 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
364
374
  " Removed ",
365
375
  progress.orphansRemoved,
@@ -1315,7 +1325,7 @@ function StudioToolbar() {
1315
1325
  const [showRenameFolderModal, setShowRenameFolderModal] = _react.useState.call(void 0, false);
1316
1326
  const [showMoveModal, setShowMoveModal] = _react.useState.call(void 0, false);
1317
1327
  const [showR2SetupModal, setShowR2SetupModal] = _react.useState.call(void 0, false);
1318
- const [syncing, setSyncing] = _react.useState.call(void 0, false);
1328
+ const [pushing, setPushing] = _react.useState.call(void 0, false);
1319
1329
  const isInImagesFolder = currentPath === "public/images" || currentPath.startsWith("public/images/");
1320
1330
  const handleUpload = _react.useCallback.call(void 0, () => {
1321
1331
  _optionalChain([fileInputRef, 'access', _2 => _2.current, 'optionalAccess', _3 => _3.click, 'call', _4 => _4()]);
@@ -1620,6 +1630,8 @@ function StudioToolbar() {
1620
1630
  percent: 100,
1621
1631
  status: "complete",
1622
1632
  processed: data.processed,
1633
+ alreadyProcessed: data.alreadyProcessed,
1634
+ pushedToCloud: data.pushedToCloud,
1623
1635
  orphansRemoved: data.orphansRemoved,
1624
1636
  errors: data.errors
1625
1637
  });
@@ -1808,10 +1820,10 @@ function StudioToolbar() {
1808
1820
  total: imageKeys.length,
1809
1821
  percent: 0,
1810
1822
  status: "processing",
1811
- message: "Syncing to CDN..."
1823
+ message: "Pushing to CDN..."
1812
1824
  });
1813
1825
  setShowProgress(true);
1814
- let synced = 0;
1826
+ let pushed = 0;
1815
1827
  let errors = 0;
1816
1828
  const errorMessages = [];
1817
1829
  try {
@@ -1839,8 +1851,8 @@ function StudioToolbar() {
1839
1851
  }
1840
1852
  errors++;
1841
1853
  errorMessages.push(data.error || `Failed: ${imageKey}`);
1842
- } else if (_optionalChain([data, 'access', _40 => _40.synced, 'optionalAccess', _41 => _41.length]) > 0) {
1843
- synced++;
1854
+ } else if (_optionalChain([data, 'access', _40 => _40.pushed, 'optionalAccess', _41 => _41.length]) > 0) {
1855
+ pushed++;
1844
1856
  } else if (_optionalChain([data, 'access', _42 => _42.errors, 'optionalAccess', _43 => _43.length]) > 0) {
1845
1857
  errors++;
1846
1858
  for (const errMsg of data.errors) {
@@ -1857,20 +1869,20 @@ function StudioToolbar() {
1857
1869
  total: imageKeys.length,
1858
1870
  percent: 100,
1859
1871
  status: "complete",
1860
- processed: synced,
1872
+ processed: pushed,
1861
1873
  errors,
1862
1874
  errorMessages: errorMessages.length > 0 ? errorMessages : void 0
1863
1875
  });
1864
1876
  clearSelection();
1865
1877
  triggerRefresh();
1866
1878
  } catch (error) {
1867
- console.error("Sync error:", error);
1879
+ console.error("Push error:", error);
1868
1880
  setProgressState({
1869
1881
  current: 0,
1870
1882
  total: 0,
1871
1883
  percent: 0,
1872
1884
  status: "error",
1873
- message: "Failed to sync to CDN."
1885
+ message: "Failed to push to CDN."
1874
1886
  });
1875
1887
  }
1876
1888
  }, [selectedItems, clearSelection, triggerRefresh]);
@@ -2326,7 +2338,7 @@ var StudioApiClient = class {
2326
2338
  return this.post("/api/studio/move", { paths, destination });
2327
2339
  }
2328
2340
  // Image handlers
2329
- async sync(imageKeys) {
2341
+ async push(imageKeys) {
2330
2342
  return this.post("/api/studio/sync", { imageKeys });
2331
2343
  }
2332
2344
  async reprocess(imageKeys) {
@@ -2917,7 +2929,7 @@ function GridItem({ item, isSelected, onClick, onOpen, onGenerateThumbnail }) {
2917
2929
  )
2918
2930
  }
2919
2931
  ),
2920
- item.cdnSynced && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { css: styles5.cdnBadge, children: "CDN" }),
2932
+ item.cdnPushed && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { css: styles5.cdnBadge, children: "CDN" }),
2921
2933
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { css: styles5.content, children: [
2922
2934
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
2923
2935
  "button",
@@ -3503,7 +3515,7 @@ function ListRow({ item, isSelected, onClick, onOpen, onGenerateThumbnail }) {
3503
3515
  ] }) }),
3504
3516
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { css: [styles6.td, styles6.meta], children: isFolder ? item.fileCount !== void 0 ? `${item.fileCount} files` : "--" : item.size !== void 0 ? formatFileSize2(item.size) : "--" }),
3505
3517
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { css: [styles6.td, styles6.meta], children: isFolder ? item.totalSize !== void 0 ? formatFileSize2(item.totalSize) : "--" : item.dimensions ? `${item.dimensions.width}x${item.dimensions.height}` : "--" }),
3506
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { css: styles6.td, children: item.cdnSynced ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { css: styles6.cdnBadge, children: [
3518
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { css: styles6.td, children: item.cdnPushed ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { css: styles6.cdnBadge, children: [
3507
3519
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { css: styles6.cdnIcon, fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { fillRule: "evenodd", d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z", clipRule: "evenodd" }) }),
3508
3520
  "Synced"
3509
3521
  ] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { css: styles6.cdnEmpty, children: "--" }) })
@@ -3799,7 +3811,7 @@ function StudioDetailView() {
3799
3811
  const [processProgress, setProcessProgress] = _react.useState.call(void 0, null);
3800
3812
  const [alertMessage, setAlertMessage] = _react.useState.call(void 0, null);
3801
3813
  const [showCopied, setShowCopied] = _react.useState.call(void 0, false);
3802
- const [syncing, setSyncing] = _react.useState.call(void 0, false);
3814
+ const [pushing, setPushing] = _react.useState.call(void 0, false);
3803
3815
  if (!focusedItem) return null;
3804
3816
  const isImage = isImageFile(focusedItem.name);
3805
3817
  const isVideo = isVideoFile(focusedItem.name);
@@ -3873,7 +3885,7 @@ function StudioDetailView() {
3873
3885
  };
3874
3886
  const handleSync = async () => {
3875
3887
  const imageKey = "/" + focusedItem.path.replace(/^public\//, "");
3876
- setSyncing(true);
3888
+ setPushing(true);
3877
3889
  try {
3878
3890
  const response = await fetch("/api/studio/sync", {
3879
3891
  method: "POST",
@@ -3883,8 +3895,8 @@ function StudioDetailView() {
3883
3895
  const data = await response.json();
3884
3896
  if (response.ok) {
3885
3897
  setAlertMessage({
3886
- title: "Sync Complete",
3887
- message: "Successfully synced to CDN."
3898
+ title: "Push Complete",
3899
+ message: "Successfully pushed to CDN."
3888
3900
  });
3889
3901
  triggerRefresh();
3890
3902
  } else {
@@ -3904,7 +3916,7 @@ function StudioDetailView() {
3904
3916
  message: "Failed to sync to CDN. Check console for details."
3905
3917
  });
3906
3918
  } finally {
3907
- setSyncing(false);
3919
+ setPushing(false);
3908
3920
  }
3909
3921
  };
3910
3922
  const handleProcessImage = async () => {
@@ -4067,7 +4079,7 @@ function StudioDetailView() {
4067
4079
  ] }),
4068
4080
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { css: styles7.infoRow, children: [
4069
4081
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { css: styles7.infoLabel, children: "CDN Status" }),
4070
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { css: styles7.infoValue, children: focusedItem.cdnSynced ? "Synced" : "Not synced" })
4082
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { css: styles7.infoValue, children: focusedItem.cdnPushed ? "Pushed" : "Not pushed" })
4071
4083
  ] })
4072
4084
  ] }),
4073
4085
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { css: styles7.actions, children: [
@@ -4075,7 +4087,7 @@ function StudioDetailView() {
4075
4087
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { css: styles7.actionIcon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z" }) }),
4076
4088
  "Rename"
4077
4089
  ] }),
4078
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "button", { css: styles7.actionBtn, onClick: handleSync, disabled: syncing, children: [
4090
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "button", { css: styles7.actionBtn, onClick: handleSync, disabled: pushing, children: [
4079
4091
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { css: styles7.actionIcon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12" }) }),
4080
4092
  syncing ? "Pushing..." : "Push to CDN"
4081
4093
  ] }),
@@ -4886,4 +4898,4 @@ var StudioUI_default = StudioUI;
4886
4898
 
4887
4899
 
4888
4900
  exports.StudioUI = StudioUI; exports.default = StudioUI_default;
4889
- //# sourceMappingURL=StudioUI-HWUO2H6J.js.map
4901
+ //# sourceMappingURL=StudioUI-4376LEHU.js.map