hazo_files 3.3.0 → 3.4.0

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/ui/index.js CHANGED
@@ -705,7 +705,109 @@ function PathBreadcrumb({ currentPath, onNavigate, className = "" }) {
705
705
  // src/ui/components/FolderTree.tsx
706
706
  var import_react2 = require("react");
707
707
  var import_core = require("@dnd-kit/core");
708
+
709
+ // src/locales/en.json
710
+ var en_default = {
711
+ "upload_dialog.title": "Upload Files",
712
+ "upload_dialog.uploading_to": "Uploading to:",
713
+ "upload_dialog.drop_text": "Drag and drop files here, or",
714
+ "upload_dialog.browse": "browse",
715
+ "upload_dialog.files_selected": "{{count}} file(s) selected",
716
+ "upload_dialog.total": "Total:",
717
+ "upload_dialog.cancel": "Cancel",
718
+ "upload_dialog.upload": "Upload",
719
+ "upload_dialog.select_files_error": "Please select files to upload",
720
+ "create_folder_dialog.title": "Create New Folder",
721
+ "create_folder_dialog.creating_in": "Creating folder in:",
722
+ "create_folder_dialog.name_label": "Folder Name",
723
+ "create_folder_dialog.name_placeholder": "Enter folder name",
724
+ "create_folder_dialog.cancel": "Cancel",
725
+ "create_folder_dialog.submit": "Create Folder",
726
+ "create_folder_dialog.name_required_error": "Please enter a folder name",
727
+ "create_folder_dialog.invalid_chars_error": "Folder name contains invalid characters",
728
+ "rename_dialog.title_folder": "Rename Folder",
729
+ "rename_dialog.title_file": "Rename File",
730
+ "rename_dialog.name_label": "New Name",
731
+ "rename_dialog.name_placeholder": "Enter new name",
732
+ "rename_dialog.cancel": "Cancel",
733
+ "rename_dialog.submit": "Rename",
734
+ "rename_dialog.name_required_error": "Please enter a name",
735
+ "rename_dialog.invalid_chars_error": "Name contains invalid characters",
736
+ "delete_confirm_dialog.title_folder": "Delete Folder",
737
+ "delete_confirm_dialog.title_file": "Delete File",
738
+ "delete_confirm_dialog.confirm_message": "Are you sure you want to delete",
739
+ "delete_confirm_dialog.folder_warning": "Warning: This folder and all its contents will be permanently deleted.",
740
+ "delete_confirm_dialog.cancel": "Cancel",
741
+ "delete_confirm_dialog.submit": "Delete",
742
+ "metadata_dialog.title": "File Metadata",
743
+ "metadata_dialog.close": "Close",
744
+ "file_actions.new_folder": "New Folder",
745
+ "file_actions.upload": "Upload",
746
+ "file_actions.download": "Download",
747
+ "file_actions.rename": "Rename",
748
+ "file_actions.delete": "Delete",
749
+ "file_actions.refresh": "Refresh",
750
+ "file_list.empty": "This folder is empty",
751
+ "file_list.header_name": "Name",
752
+ "file_list.header_size": "Size",
753
+ "file_list.header_modified": "Modified",
754
+ "folder_tree.root": "Root",
755
+ "file_preview.select_prompt": "Select a file to preview",
756
+ "file_preview.folder_label": "Folder",
757
+ "file_preview.created_label": "Created:",
758
+ "file_preview.modified_label": "Modified:",
759
+ "file_preview.error_loading": "Error loading preview",
760
+ "file_preview.video_unsupported": "Your browser does not support video playback.",
761
+ "file_preview.audio_unsupported": "Your browser does not support audio playback.",
762
+ "file_preview.no_preview": "No preview available",
763
+ "file_preview.size_label": "Size:",
764
+ "file_preview.type_label": "Type:",
765
+ "file_info_panel.no_item_selected": "No item selected",
766
+ "file_info_panel.no_custom_metadata": "No custom metadata",
767
+ "file_info_panel.name_label": "Name:",
768
+ "file_info_panel.path_label": "Path:",
769
+ "file_info_panel.type_label": "Type:",
770
+ "file_info_panel.size_label": "Size:",
771
+ "file_info_panel.created_label": "Created:",
772
+ "file_info_panel.modified_label": "Modified:",
773
+ "file_info_panel.storage_label": "Storage:",
774
+ "file_info_panel.custom_metadata_title": "Custom Metadata",
775
+ "file_info_panel.type_folder": "Folder",
776
+ "file_info_panel.type_unknown": "Unknown",
777
+ "file_browser.load_directory_error": "Failed to load directory",
778
+ "file_browser.move_item_error": "Failed to move item",
779
+ "file_browser.upload_file_error": "Failed to upload {{name}}",
780
+ "file_browser.download_file_error": "Failed to download file",
781
+ "file_browser.create_folder_error": "Failed to create folder",
782
+ "file_browser.delete_error": "Failed to delete",
783
+ "file_browser.rename_error": "Failed to rename",
784
+ "file_browser.context_menu_view_metadata": "View Metadata",
785
+ "file_browser.context_menu_rename": "Rename",
786
+ "file_browser.context_menu_download": "Download",
787
+ "file_browser.context_menu_delete": "Delete",
788
+ "use_file_upload_toasts.job_completed": "{{count}} {{file_word}} processed for {{label}}",
789
+ "use_file_upload_toasts.upload_failed": "Upload failed for {{label}}: {{error}}",
790
+ "use_file_upload_toasts.action_required": "Action required for {{label}}",
791
+ "use_file_upload_toasts.action_required_description": "Review and confirm data conflicts",
792
+ "use_file_upload_toasts.batch_complete": "Batch complete: {{completed}}/{{total}} succeeded",
793
+ "pattern_preview.title": "Preview",
794
+ "pattern_preview.no_pattern": "(no pattern defined)",
795
+ "pattern_preview.file_label": "File:",
796
+ "pattern_preview.folder_label": "Folder:",
797
+ "pattern_preview.full_path_label": "Full path:",
798
+ "pattern_preview.example_note": "Preview uses example values from your variables",
799
+ "separator_picker.add_label": "Add:",
800
+ "separator_picker.title_hyphen": "Hyphen",
801
+ "separator_picker.title_underscore": "Underscore",
802
+ "separator_picker.title_slash": "Slash (for folder paths)",
803
+ "separator_picker.title_space": "Space",
804
+ "separator_picker.title_period": "Period"
805
+ };
806
+
807
+ // src/ui/components/FolderTree.tsx
808
+ var import_i18n = require("hazo_core/i18n");
708
809
  var import_jsx_runtime3 = require("react/jsx-runtime");
810
+ var t = (0, import_i18n.createPackageT)("hazo_files", en_default);
709
811
  function TreeNodeItem({
710
812
  node,
711
813
  level,
@@ -796,7 +898,7 @@ function FolderTree({
796
898
  }) {
797
899
  const rootNode = {
798
900
  id: "root",
799
- name: "Root",
901
+ name: t("folder_tree.root"),
800
902
  path: "/",
801
903
  children: tree,
802
904
  isExpanded: true
@@ -831,7 +933,9 @@ function formatBytes(bytes, decimals = 2) {
831
933
  }
832
934
 
833
935
  // src/ui/components/FileList.tsx
936
+ var import_i18n2 = require("hazo_core/i18n");
834
937
  var import_jsx_runtime4 = require("react/jsx-runtime");
938
+ var t2 = (0, import_i18n2.createPackageT)("hazo_files", en_default);
835
939
  function FileItemCard({
836
940
  item,
837
941
  isSelected,
@@ -947,7 +1051,7 @@ function FileItemCard({
947
1051
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "ml-3 flex-1 truncate text-sm", title: item.name, children: item.name }),
948
1052
  !item.isDirectory && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
949
1053
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "text-xs text-gray-400 ml-4", children: formatBytes(item.size) }),
950
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "text-xs text-gray-400 ml-4 w-32 truncate", children: new Date(item.modifiedAt).toLocaleDateString() })
1054
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "text-xs text-gray-400 ml-4 w-32 truncate", children: new Date(item.modifiedAt).toLocaleDateString((0, import_i18n2.resolvePackageLocale)("en-US")) })
951
1055
  ] })
952
1056
  ]
953
1057
  }
@@ -996,7 +1100,7 @@ function FileList({
996
1100
  )
997
1101
  }
998
1102
  ),
999
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { children: "This folder is empty" })
1103
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { children: t2("file_list.empty") })
1000
1104
  ]
1001
1105
  }
1002
1106
  );
@@ -1031,9 +1135,9 @@ function FileList({
1031
1135
  onClick: handleBackgroundClick,
1032
1136
  children: [
1033
1137
  /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex items-center p-2 border-b text-xs text-gray-500 font-medium", children: [
1034
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "flex-1 ml-8", children: "Name" }),
1035
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "w-20 ml-4", children: "Size" }),
1036
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "w-32 ml-4", children: "Modified" })
1138
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "flex-1 ml-8", children: t2("file_list.header_name") }),
1139
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "w-20 ml-4", children: t2("file_list.header_size") }),
1140
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "w-32 ml-4", children: t2("file_list.header_modified") })
1037
1141
  ] }),
1038
1142
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "flex-1 overflow-auto", children: files.map((file) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1039
1143
  FileItemCard,
@@ -1154,7 +1258,9 @@ function isPreviewable(filenameOrMime) {
1154
1258
  }
1155
1259
 
1156
1260
  // src/ui/components/FilePreview.tsx
1261
+ var import_i18n3 = require("hazo_core/i18n");
1157
1262
  var import_jsx_runtime5 = require("react/jsx-runtime");
1263
+ var t3 = (0, import_i18n3.createPackageT)("hazo_files", en_default);
1158
1264
  function FilePreview({
1159
1265
  item,
1160
1266
  getPreviewUrl,
@@ -1195,22 +1301,24 @@ function FilePreview({
1195
1301
  }
1196
1302
  }, [item, getPreviewUrl, getFileContent]);
1197
1303
  if (!item) {
1198
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: `flex items-center justify-center h-full text-gray-400 ${className}`, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { children: "Select a file to preview" }) });
1304
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: `flex items-center justify-center h-full text-gray-400 ${className}`, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { children: t3("file_preview.select_prompt") }) });
1199
1305
  }
1200
1306
  if (item.isDirectory) {
1201
1307
  const Icon2 = getFileIcon("folder", true);
1202
1308
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: `flex flex-col items-center justify-center h-full p-4 ${className}`, children: [
1203
1309
  /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Icon2, { size: 64, className: "text-yellow-500 mb-4" }),
1204
1310
  /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("h3", { className: "text-lg font-medium", children: item.name }),
1205
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "text-sm text-gray-500 mt-2", children: "Folder" }),
1311
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "text-sm text-gray-500 mt-2", children: t3("file_preview.folder_label") }),
1206
1312
  /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "mt-4 text-xs text-gray-400 space-y-1", children: [
1207
1313
  /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("p", { children: [
1208
- "Created: ",
1209
- new Date(item.createdAt).toLocaleString()
1314
+ t3("file_preview.created_label"),
1315
+ " ",
1316
+ new Date(item.createdAt).toLocaleString((0, import_i18n3.resolvePackageLocale)("en-US"))
1210
1317
  ] }),
1211
1318
  /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("p", { children: [
1212
- "Modified: ",
1213
- new Date(item.modifiedAt).toLocaleString()
1319
+ t3("file_preview.modified_label"),
1320
+ " ",
1321
+ new Date(item.modifiedAt).toLocaleString((0, import_i18n3.resolvePackageLocale)("en-US"))
1214
1322
  ] })
1215
1323
  ] })
1216
1324
  ] });
@@ -1223,7 +1331,7 @@ function FilePreview({
1223
1331
  }
1224
1332
  if (error) {
1225
1333
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: `flex flex-col items-center justify-center h-full p-4 text-red-500 ${className}`, children: [
1226
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { children: "Error loading preview" }),
1334
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { children: t3("file_preview.error_loading") }),
1227
1335
  /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "text-sm mt-2", children: error })
1228
1336
  ] });
1229
1337
  }
@@ -1243,41 +1351,41 @@ function FilePreview({
1243
1351
  src: previewUrl,
1244
1352
  controls: true,
1245
1353
  className: "max-w-full max-h-full",
1246
- children: "Your browser does not support video playback."
1354
+ children: t3("file_preview.video_unsupported")
1247
1355
  }
1248
1356
  ),
1249
1357
  isAudio(mimeType) && previewUrl && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex flex-col items-center", children: [
1250
1358
  /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Icon, { size: 64, className: "text-gray-400 mb-4" }),
1251
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("audio", { src: previewUrl, controls: true, className: "w-full max-w-md", children: "Your browser does not support audio playback." })
1359
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("audio", { src: previewUrl, controls: true, className: "w-full max-w-md", children: t3("file_preview.audio_unsupported") })
1252
1360
  ] }),
1253
1361
  isText(mimeType) && textContent !== null && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("pre", { className: "w-full h-full overflow-auto text-sm bg-white p-4 rounded border font-mono whitespace-pre-wrap", children: textContent }),
1254
1362
  !previewUrl && textContent === null && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex flex-col items-center text-gray-400", children: [
1255
1363
  /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Icon, { size: 64, className: "mb-4" }),
1256
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { children: "No preview available" })
1364
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { children: t3("file_preview.no_preview") })
1257
1365
  ] })
1258
1366
  ] }),
1259
1367
  /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "border-t bg-white p-4", children: [
1260
1368
  /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("h3", { className: "font-medium truncate", title: item.name, children: item.name }),
1261
1369
  /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "mt-2 text-sm text-gray-500 grid grid-cols-2 gap-2", children: [
1262
1370
  /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { children: [
1263
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "text-gray-400", children: "Size:" }),
1371
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "text-gray-400", children: t3("file_preview.size_label") }),
1264
1372
  " ",
1265
1373
  formatBytes(fileItem.size)
1266
1374
  ] }),
1267
1375
  /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { children: [
1268
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "text-gray-400", children: "Type:" }),
1376
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "text-gray-400", children: t3("file_preview.type_label") }),
1269
1377
  " ",
1270
1378
  mimeType
1271
1379
  ] }),
1272
1380
  /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { children: [
1273
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "text-gray-400", children: "Created:" }),
1381
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "text-gray-400", children: t3("file_preview.created_label") }),
1274
1382
  " ",
1275
- new Date(item.createdAt).toLocaleDateString()
1383
+ new Date(item.createdAt).toLocaleDateString((0, import_i18n3.resolvePackageLocale)("en-US"))
1276
1384
  ] }),
1277
1385
  /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { children: [
1278
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "text-gray-400", children: "Modified:" }),
1386
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "text-gray-400", children: t3("file_preview.modified_label") }),
1279
1387
  " ",
1280
- new Date(item.modifiedAt).toLocaleDateString()
1388
+ new Date(item.modifiedAt).toLocaleDateString((0, import_i18n3.resolvePackageLocale)("en-US"))
1281
1389
  ] })
1282
1390
  ] })
1283
1391
  ] })
@@ -1286,7 +1394,9 @@ function FilePreview({
1286
1394
 
1287
1395
  // src/ui/components/FileActions.tsx
1288
1396
  var import_react5 = require("react");
1397
+ var import_i18n4 = require("hazo_core/i18n");
1289
1398
  var import_jsx_runtime6 = require("react/jsx-runtime");
1399
+ var t4 = (0, import_i18n4.createPackageT)("hazo_files", en_default);
1290
1400
  function ActionButton({ icon, label, onClick, disabled, variant = "default" }) {
1291
1401
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
1292
1402
  "button",
@@ -1343,7 +1453,7 @@ function FileActions({
1343
1453
  ActionButton,
1344
1454
  {
1345
1455
  icon: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PlusIcon, { size: 18 }),
1346
- label: "New Folder",
1456
+ label: t4("file_actions.new_folder"),
1347
1457
  onClick: onCreateFolder,
1348
1458
  disabled: isLoading
1349
1459
  }
@@ -1352,7 +1462,7 @@ function FileActions({
1352
1462
  ActionButton,
1353
1463
  {
1354
1464
  icon: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(UploadIcon, { size: 18 }),
1355
- label: "Upload",
1465
+ label: t4("file_actions.upload"),
1356
1466
  onClick: handleUploadClick,
1357
1467
  disabled: isLoading
1358
1468
  }
@@ -1362,7 +1472,7 @@ function FileActions({
1362
1472
  ActionButton,
1363
1473
  {
1364
1474
  icon: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DownloadIcon, { size: 18 }),
1365
- label: "Download",
1475
+ label: t4("file_actions.download"),
1366
1476
  onClick: onDownload,
1367
1477
  disabled: !isFile || isLoading
1368
1478
  }
@@ -1371,7 +1481,7 @@ function FileActions({
1371
1481
  ActionButton,
1372
1482
  {
1373
1483
  icon: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PencilIcon, { size: 18 }),
1374
- label: "Rename",
1484
+ label: t4("file_actions.rename"),
1375
1485
  onClick: onRename,
1376
1486
  disabled: !hasSelection || isLoading
1377
1487
  }
@@ -1380,7 +1490,7 @@ function FileActions({
1380
1490
  ActionButton,
1381
1491
  {
1382
1492
  icon: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(TrashIcon, { size: 18 }),
1383
- label: "Delete",
1493
+ label: t4("file_actions.delete"),
1384
1494
  onClick: onDelete,
1385
1495
  disabled: !hasSelection || isLoading,
1386
1496
  variant: "danger"
@@ -1391,7 +1501,7 @@ function FileActions({
1391
1501
  ActionButton,
1392
1502
  {
1393
1503
  icon: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(RefreshIcon, { size: 18, className: isLoading ? "animate-spin" : "" }),
1394
- label: "Refresh",
1504
+ label: t4("file_actions.refresh"),
1395
1505
  onClick: onRefresh,
1396
1506
  disabled: isLoading
1397
1507
  }
@@ -1538,7 +1648,9 @@ function DragPreview({ item, className = "" }) {
1538
1648
 
1539
1649
  // src/ui/components/dialogs/CreateFolderDialog.tsx
1540
1650
  var import_react7 = require("react");
1651
+ var import_i18n5 = require("hazo_core/i18n");
1541
1652
  var import_jsx_runtime9 = require("react/jsx-runtime");
1653
+ var t5 = (0, import_i18n5.createPackageT)("hazo_files", en_default);
1542
1654
  function CreateFolderDialog({
1543
1655
  isOpen,
1544
1656
  onClose,
@@ -1557,11 +1669,11 @@ function CreateFolderDialog({
1557
1669
  const handleSubmit = (0, import_react7.useCallback)(async (e) => {
1558
1670
  e.preventDefault();
1559
1671
  if (!name.trim()) {
1560
- setError("Please enter a folder name");
1672
+ setError(t5("create_folder_dialog.name_required_error"));
1561
1673
  return;
1562
1674
  }
1563
1675
  if (/[<>:"/\\|?*]/.test(name)) {
1564
- setError("Folder name contains invalid characters");
1676
+ setError(t5("create_folder_dialog.invalid_chars_error"));
1565
1677
  return;
1566
1678
  }
1567
1679
  setIsLoading(true);
@@ -1588,7 +1700,7 @@ function CreateFolderDialog({
1588
1700
  /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-center justify-between p-4 border-b", children: [
1589
1701
  /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-center gap-2", children: [
1590
1702
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(FolderIcon, { size: 20, className: "text-yellow-500" }),
1591
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("h2", { className: "text-lg font-medium", children: "Create New Folder" })
1703
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("h2", { className: "text-lg font-medium", children: t5("create_folder_dialog.title") })
1592
1704
  ] }),
1593
1705
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1594
1706
  "button",
@@ -1602,18 +1714,19 @@ function CreateFolderDialog({
1602
1714
  /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("form", { onSubmit: handleSubmit, children: [
1603
1715
  /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "p-4", children: [
1604
1716
  /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "text-sm text-gray-500 mb-4", children: [
1605
- "Creating folder in: ",
1717
+ t5("create_folder_dialog.creating_in"),
1718
+ " ",
1606
1719
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "font-medium", children: currentPath })
1607
1720
  ] }),
1608
1721
  /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("label", { className: "block", children: [
1609
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "text-sm font-medium text-gray-700", children: "Folder Name" }),
1722
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "text-sm font-medium text-gray-700", children: t5("create_folder_dialog.name_label") }),
1610
1723
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1611
1724
  "input",
1612
1725
  {
1613
1726
  type: "text",
1614
1727
  value: name,
1615
1728
  onChange: (e) => setName(e.target.value),
1616
- placeholder: "Enter folder name",
1729
+ placeholder: t5("create_folder_dialog.name_placeholder"),
1617
1730
  className: "mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",
1618
1731
  autoFocus: true,
1619
1732
  disabled: isLoading
@@ -1630,7 +1743,7 @@ function CreateFolderDialog({
1630
1743
  onClick: onClose,
1631
1744
  className: "px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-100 rounded-md transition-colors",
1632
1745
  disabled: isLoading,
1633
- children: "Cancel"
1746
+ children: t5("create_folder_dialog.cancel")
1634
1747
  }
1635
1748
  ),
1636
1749
  /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
@@ -1641,7 +1754,7 @@ function CreateFolderDialog({
1641
1754
  disabled: isLoading || !name.trim(),
1642
1755
  children: [
1643
1756
  isLoading && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(LoaderIcon, { size: 16 }),
1644
- "Create Folder"
1757
+ t5("create_folder_dialog.submit")
1645
1758
  ]
1646
1759
  }
1647
1760
  )
@@ -1653,7 +1766,9 @@ function CreateFolderDialog({
1653
1766
 
1654
1767
  // src/ui/components/dialogs/RenameDialog.tsx
1655
1768
  var import_react8 = require("react");
1769
+ var import_i18n6 = require("hazo_core/i18n");
1656
1770
  var import_jsx_runtime10 = require("react/jsx-runtime");
1771
+ var t6 = (0, import_i18n6.createPackageT)("hazo_files", en_default);
1657
1772
  function RenameDialog({
1658
1773
  isOpen,
1659
1774
  item,
@@ -1672,11 +1787,11 @@ function RenameDialog({
1672
1787
  const handleSubmit = (0, import_react8.useCallback)(async (e) => {
1673
1788
  e.preventDefault();
1674
1789
  if (!name.trim()) {
1675
- setError("Please enter a name");
1790
+ setError(t6("rename_dialog.name_required_error"));
1676
1791
  return;
1677
1792
  }
1678
1793
  if (/[<>:"/\\|?*]/.test(name)) {
1679
- setError("Name contains invalid characters");
1794
+ setError(t6("rename_dialog.invalid_chars_error"));
1680
1795
  return;
1681
1796
  }
1682
1797
  if (name.trim() === item?.name) {
@@ -1707,10 +1822,7 @@ function RenameDialog({
1707
1822
  /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex items-center justify-between p-4 border-b", children: [
1708
1823
  /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex items-center gap-2", children: [
1709
1824
  /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(PencilIcon, { size: 20, className: "text-gray-500" }),
1710
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("h2", { className: "text-lg font-medium", children: [
1711
- "Rename ",
1712
- item.isDirectory ? "Folder" : "File"
1713
- ] })
1825
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("h2", { className: "text-lg font-medium", children: item.isDirectory ? t6("rename_dialog.title_folder") : t6("rename_dialog.title_file") })
1714
1826
  ] }),
1715
1827
  /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1716
1828
  "button",
@@ -1724,14 +1836,14 @@ function RenameDialog({
1724
1836
  /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("form", { onSubmit: handleSubmit, children: [
1725
1837
  /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "p-4", children: [
1726
1838
  /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("label", { className: "block", children: [
1727
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "text-sm font-medium text-gray-700", children: "New Name" }),
1839
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "text-sm font-medium text-gray-700", children: t6("rename_dialog.name_label") }),
1728
1840
  /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1729
1841
  "input",
1730
1842
  {
1731
1843
  type: "text",
1732
1844
  value: name,
1733
1845
  onChange: (e) => setName(e.target.value),
1734
- placeholder: "Enter new name",
1846
+ placeholder: t6("rename_dialog.name_placeholder"),
1735
1847
  className: "mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",
1736
1848
  autoFocus: true,
1737
1849
  disabled: isLoading
@@ -1748,7 +1860,7 @@ function RenameDialog({
1748
1860
  onClick: onClose,
1749
1861
  className: "px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-100 rounded-md transition-colors",
1750
1862
  disabled: isLoading,
1751
- children: "Cancel"
1863
+ children: t6("rename_dialog.cancel")
1752
1864
  }
1753
1865
  ),
1754
1866
  /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
@@ -1759,7 +1871,7 @@ function RenameDialog({
1759
1871
  disabled: isLoading || !name.trim(),
1760
1872
  children: [
1761
1873
  isLoading && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(LoaderIcon, { size: 16 }),
1762
- "Rename"
1874
+ t6("rename_dialog.submit")
1763
1875
  ]
1764
1876
  }
1765
1877
  )
@@ -1771,7 +1883,9 @@ function RenameDialog({
1771
1883
 
1772
1884
  // src/ui/components/dialogs/DeleteConfirmDialog.tsx
1773
1885
  var import_react9 = require("react");
1886
+ var import_i18n7 = require("hazo_core/i18n");
1774
1887
  var import_jsx_runtime11 = require("react/jsx-runtime");
1888
+ var t7 = (0, import_i18n7.createPackageT)("hazo_files", en_default);
1775
1889
  function DeleteConfirmDialog({
1776
1890
  isOpen,
1777
1891
  item,
@@ -1805,10 +1919,7 @@ function DeleteConfirmDialog({
1805
1919
  /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex items-center justify-between p-4 border-b", children: [
1806
1920
  /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex items-center gap-2", children: [
1807
1921
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(TrashIcon, { size: 20, className: "text-red-500" }),
1808
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("h2", { className: "text-lg font-medium", children: [
1809
- "Delete ",
1810
- item.isDirectory ? "Folder" : "File"
1811
- ] })
1922
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("h2", { className: "text-lg font-medium", children: item.isDirectory ? t7("delete_confirm_dialog.title_folder") : t7("delete_confirm_dialog.title_file") })
1812
1923
  ] }),
1813
1924
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1814
1925
  "button",
@@ -1821,12 +1932,12 @@ function DeleteConfirmDialog({
1821
1932
  ] }),
1822
1933
  /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "p-4", children: [
1823
1934
  /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("p", { className: "text-gray-700", children: [
1824
- "Are you sure you want to delete",
1935
+ t7("delete_confirm_dialog.confirm_message"),
1825
1936
  " ",
1826
1937
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "font-medium", children: item.name }),
1827
1938
  "?"
1828
1939
  ] }),
1829
- item.isDirectory && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: "mt-2 text-sm text-amber-600 bg-amber-50 p-3 rounded", children: "Warning: This folder and all its contents will be permanently deleted." }),
1940
+ item.isDirectory && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: "mt-2 text-sm text-amber-600 bg-amber-50 p-3 rounded", children: t7("delete_confirm_dialog.folder_warning") }),
1830
1941
  error && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: "mt-2 text-sm text-red-600", children: error })
1831
1942
  ] }),
1832
1943
  /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex justify-end gap-2 p-4 border-t bg-gray-50 rounded-b-lg", children: [
@@ -1837,7 +1948,7 @@ function DeleteConfirmDialog({
1837
1948
  onClick: onClose,
1838
1949
  className: "px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-100 rounded-md transition-colors",
1839
1950
  disabled: isLoading,
1840
- children: "Cancel"
1951
+ children: t7("delete_confirm_dialog.cancel")
1841
1952
  }
1842
1953
  ),
1843
1954
  /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
@@ -1849,7 +1960,7 @@ function DeleteConfirmDialog({
1849
1960
  disabled: isLoading,
1850
1961
  children: [
1851
1962
  isLoading && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(LoaderIcon, { size: 16 }),
1852
- "Delete"
1963
+ t7("delete_confirm_dialog.submit")
1853
1964
  ]
1854
1965
  }
1855
1966
  )
@@ -1860,7 +1971,9 @@ function DeleteConfirmDialog({
1860
1971
 
1861
1972
  // src/ui/components/dialogs/UploadDialog.tsx
1862
1973
  var import_react10 = require("react");
1974
+ var import_i18n8 = require("hazo_core/i18n");
1863
1975
  var import_jsx_runtime12 = require("react/jsx-runtime");
1976
+ var t8 = (0, import_i18n8.createPackageT)("hazo_files", en_default);
1864
1977
  function UploadDialog({
1865
1978
  isOpen,
1866
1979
  currentPath,
@@ -1896,7 +2009,7 @@ function UploadDialog({
1896
2009
  }, []);
1897
2010
  const handleUpload = (0, import_react10.useCallback)(async () => {
1898
2011
  if (selectedFiles.length === 0) {
1899
- setError("Please select files to upload");
2012
+ setError(t8("upload_dialog.select_files_error"));
1900
2013
  return;
1901
2014
  }
1902
2015
  setIsLoading(true);
@@ -1932,7 +2045,7 @@ function UploadDialog({
1932
2045
  /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex items-center justify-between p-4 border-b", children: [
1933
2046
  /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex items-center gap-2", children: [
1934
2047
  /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(UploadIcon, { size: 20, className: "text-blue-500" }),
1935
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("h2", { className: "text-lg font-medium", children: "Upload Files" })
2048
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("h2", { className: "text-lg font-medium", children: t8("upload_dialog.title") })
1936
2049
  ] }),
1937
2050
  /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1938
2051
  "button",
@@ -1945,7 +2058,8 @@ function UploadDialog({
1945
2058
  ] }),
1946
2059
  /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "p-4", children: [
1947
2060
  /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "text-sm text-gray-500 mb-4", children: [
1948
- "Uploading to: ",
2061
+ t8("upload_dialog.uploading_to"),
2062
+ " ",
1949
2063
  /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "font-medium", children: currentPath })
1950
2064
  ] }),
1951
2065
  /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
@@ -1972,21 +2086,19 @@ function UploadDialog({
1972
2086
  ),
1973
2087
  /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(UploadIcon, { size: 40, className: "mx-auto text-gray-400 mb-4" }),
1974
2088
  /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("p", { className: "text-gray-600", children: [
1975
- "Drag and drop files here, or",
2089
+ t8("upload_dialog.drop_text"),
1976
2090
  " ",
1977
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "text-blue-500 cursor-pointer", children: "browse" })
2091
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "text-blue-500 cursor-pointer", children: t8("upload_dialog.browse") })
1978
2092
  ] })
1979
2093
  ]
1980
2094
  }
1981
2095
  ),
1982
2096
  selectedFiles.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "mt-4", children: [
1983
2097
  /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex items-center justify-between mb-2", children: [
1984
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "text-sm font-medium text-gray-700", children: [
1985
- selectedFiles.length,
1986
- " file(s) selected"
1987
- ] }),
2098
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "text-sm font-medium text-gray-700", children: t8("upload_dialog.files_selected", { count: String(selectedFiles.length) }) }),
1988
2099
  /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "text-sm text-gray-500", children: [
1989
- "Total: ",
2100
+ t8("upload_dialog.total"),
2101
+ " ",
1990
2102
  formatBytes(totalSize)
1991
2103
  ] })
1992
2104
  ] }),
@@ -2023,7 +2135,7 @@ function UploadDialog({
2023
2135
  onClick: handleClose,
2024
2136
  className: "px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-100 rounded-md transition-colors",
2025
2137
  disabled: isLoading,
2026
- children: "Cancel"
2138
+ children: t8("upload_dialog.cancel")
2027
2139
  }
2028
2140
  ),
2029
2141
  /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
@@ -2035,7 +2147,8 @@ function UploadDialog({
2035
2147
  disabled: isLoading || selectedFiles.length === 0,
2036
2148
  children: [
2037
2149
  isLoading && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(LoaderIcon, { size: 16 }),
2038
- "Upload ",
2150
+ t8("upload_dialog.upload"),
2151
+ " ",
2039
2152
  selectedFiles.length > 0 && `(${selectedFiles.length})`
2040
2153
  ]
2041
2154
  }
@@ -2046,15 +2159,17 @@ function UploadDialog({
2046
2159
  }
2047
2160
 
2048
2161
  // src/ui/components/FileInfoPanel.tsx
2162
+ var import_i18n9 = require("hazo_core/i18n");
2049
2163
  var import_jsx_runtime13 = require("react/jsx-runtime");
2164
+ var t9 = (0, import_i18n9.createPackageT)("hazo_files", en_default);
2050
2165
  function formatDate(date) {
2051
2166
  if (!date) return "-";
2052
2167
  const d = date instanceof Date ? date : new Date(date);
2053
- return d.toLocaleString();
2168
+ return d.toLocaleString((0, import_i18n9.resolvePackageLocale)("en-US"));
2054
2169
  }
2055
2170
  function formatJSON(data) {
2056
2171
  if (!data || Object.keys(data).length === 0) {
2057
- return "No custom metadata";
2172
+ return t9("file_info_panel.no_custom_metadata");
2058
2173
  }
2059
2174
  return JSON.stringify(data, null, 2);
2060
2175
  }
@@ -2066,12 +2181,12 @@ function FileInfoPanel({
2066
2181
  className = ""
2067
2182
  }) {
2068
2183
  if (!item) {
2069
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: `text-sm text-gray-500 ${className}`, children: "No item selected" });
2184
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: `text-sm text-gray-500 ${className}`, children: t9("file_info_panel.no_item_selected") });
2070
2185
  }
2071
2186
  const displayData = {
2072
2187
  name: item.name || "-",
2073
2188
  path: item.path || "-",
2074
- type: item.isDirectory ? "Folder" : item?.mimeType || "Unknown",
2189
+ type: item.isDirectory ? t9("file_info_panel.type_folder") : item?.mimeType || t9("file_info_panel.type_unknown"),
2075
2190
  size: item.isDirectory ? void 0 : item?.size,
2076
2191
  createdAt: item.createdAt,
2077
2192
  modifiedAt: item.modifiedAt,
@@ -2081,43 +2196,45 @@ function FileInfoPanel({
2081
2196
  return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className, children: [
2082
2197
  /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("dl", { className: "space-y-3", children: [
2083
2198
  /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex", children: [
2084
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("dt", { className: "w-24 text-sm font-medium text-gray-500", children: "Name:" }),
2199
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("dt", { className: "w-24 text-sm font-medium text-gray-500", children: t9("file_info_panel.name_label") }),
2085
2200
  /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("dd", { className: "flex-1 text-sm text-gray-900 break-all", children: displayData.name })
2086
2201
  ] }),
2087
2202
  /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex", children: [
2088
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("dt", { className: "w-24 text-sm font-medium text-gray-500", children: "Path:" }),
2203
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("dt", { className: "w-24 text-sm font-medium text-gray-500", children: t9("file_info_panel.path_label") }),
2089
2204
  /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("dd", { className: "flex-1 text-sm text-gray-900 break-all font-mono text-xs", children: displayData.path })
2090
2205
  ] }),
2091
2206
  /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex", children: [
2092
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("dt", { className: "w-24 text-sm font-medium text-gray-500", children: "Type:" }),
2207
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("dt", { className: "w-24 text-sm font-medium text-gray-500", children: t9("file_info_panel.type_label") }),
2093
2208
  /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("dd", { className: "flex-1 text-sm text-gray-900", children: displayData.type })
2094
2209
  ] }),
2095
2210
  displayData.size !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex", children: [
2096
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("dt", { className: "w-24 text-sm font-medium text-gray-500", children: "Size:" }),
2211
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("dt", { className: "w-24 text-sm font-medium text-gray-500", children: t9("file_info_panel.size_label") }),
2097
2212
  /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("dd", { className: "flex-1 text-sm text-gray-900", children: formatBytes(displayData.size) })
2098
2213
  ] }),
2099
2214
  /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex", children: [
2100
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("dt", { className: "w-24 text-sm font-medium text-gray-500", children: "Created:" }),
2215
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("dt", { className: "w-24 text-sm font-medium text-gray-500", children: t9("file_info_panel.created_label") }),
2101
2216
  /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("dd", { className: "flex-1 text-sm text-gray-900", children: formatDate(displayData.createdAt) })
2102
2217
  ] }),
2103
2218
  /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex", children: [
2104
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("dt", { className: "w-24 text-sm font-medium text-gray-500", children: "Modified:" }),
2219
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("dt", { className: "w-24 text-sm font-medium text-gray-500", children: t9("file_info_panel.modified_label") }),
2105
2220
  /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("dd", { className: "flex-1 text-sm text-gray-900", children: formatDate(displayData.modifiedAt) })
2106
2221
  ] }),
2107
2222
  displayData.storageType && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex", children: [
2108
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("dt", { className: "w-24 text-sm font-medium text-gray-500", children: "Storage:" }),
2223
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("dt", { className: "w-24 text-sm font-medium text-gray-500", children: t9("file_info_panel.storage_label") }),
2109
2224
  /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("dd", { className: "flex-1 text-sm text-gray-900 capitalize", children: displayData.storageType.replace("_", " ") })
2110
2225
  ] })
2111
2226
  ] }),
2112
2227
  showCustomMetadata && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "mt-6", children: [
2113
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("h3", { className: "text-sm font-medium text-gray-700 mb-2", children: "Custom Metadata" }),
2228
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("h3", { className: "text-sm font-medium text-gray-700 mb-2", children: t9("file_info_panel.custom_metadata_title") }),
2114
2229
  isLoading ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "flex items-center justify-center py-8", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(LoaderIcon, { size: 24, className: "text-gray-400" }) }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "bg-gray-50 rounded-lg p-3 border", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("pre", { className: "text-xs text-gray-700 font-mono whitespace-pre-wrap overflow-auto max-h-48", children: formatJSON(displayData.fileData) }) })
2115
2230
  ] })
2116
2231
  ] });
2117
2232
  }
2118
2233
 
2119
2234
  // src/ui/components/dialogs/MetadataDialog.tsx
2235
+ var import_i18n10 = require("hazo_core/i18n");
2120
2236
  var import_jsx_runtime14 = require("react/jsx-runtime");
2237
+ var t10 = (0, import_i18n10.createPackageT)("hazo_files", en_default);
2121
2238
  function MetadataDialog({
2122
2239
  isOpen,
2123
2240
  item,
@@ -2138,7 +2255,7 @@ function MetadataDialog({
2138
2255
  /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex items-center justify-between p-4 border-b", children: [
2139
2256
  /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex items-center gap-2", children: [
2140
2257
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(InfoIcon, { size: 20, className: "text-blue-500" }),
2141
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("h2", { className: "text-lg font-medium", children: "File Metadata" })
2258
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("h2", { className: "text-lg font-medium", children: t10("metadata_dialog.title") })
2142
2259
  ] }),
2143
2260
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2144
2261
  "button",
@@ -2164,7 +2281,7 @@ function MetadataDialog({
2164
2281
  type: "button",
2165
2282
  onClick: onClose,
2166
2283
  className: "px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-100 rounded-md transition-colors",
2167
- children: "Close"
2284
+ children: t10("metadata_dialog.close")
2168
2285
  }
2169
2286
  ) })
2170
2287
  ] })
@@ -2172,7 +2289,9 @@ function MetadataDialog({
2172
2289
  }
2173
2290
 
2174
2291
  // src/ui/components/FileBrowser.tsx
2292
+ var import_i18n11 = require("hazo_core/i18n");
2175
2293
  var import_jsx_runtime15 = require("react/jsx-runtime");
2294
+ var t11 = (0, import_i18n11.createPackageT)("hazo_files", en_default);
2176
2295
  function FileBrowser({
2177
2296
  api,
2178
2297
  initialPath = "/",
@@ -2220,7 +2339,7 @@ function FileBrowser({
2220
2339
  setSelectedItem(null);
2221
2340
  onNavigate?.(path);
2222
2341
  } else {
2223
- onError?.(result.error || "Failed to load directory");
2342
+ onError?.(result.error || t11("file_browser.load_directory_error"));
2224
2343
  }
2225
2344
  } finally {
2226
2345
  setIsLoading(false);
@@ -2304,7 +2423,7 @@ function FileBrowser({
2304
2423
  await loadTree();
2305
2424
  }
2306
2425
  } else {
2307
- onError?.(result.error || "Failed to move item");
2426
+ onError?.(result.error || t11("file_browser.move_item_error"));
2308
2427
  }
2309
2428
  }, [draggedItem, isValidDropTarget, api, currentPath, showTree, loadDirectory, loadTree, onError]);
2310
2429
  const handleSelect = (0, import_react11.useCallback)((item) => {
@@ -2341,7 +2460,7 @@ function FileBrowser({
2341
2460
  setFiles((prev) => sortItems([...prev, result.data]));
2342
2461
  await loadTree();
2343
2462
  } else {
2344
- throw new Error(result.error || "Failed to create folder");
2463
+ throw new Error(result.error || t11("file_browser.create_folder_error"));
2345
2464
  }
2346
2465
  }, [api, currentPath, loadTree]);
2347
2466
  const handleUpload = (0, import_react11.useCallback)(async (fileList) => {
@@ -2352,7 +2471,7 @@ function FileBrowser({
2352
2471
  if (result.success && result.data) {
2353
2472
  setFiles((prev) => sortItems([...prev, result.data]));
2354
2473
  } else {
2355
- onError?.(result.error || `Failed to upload ${file.name}`);
2474
+ onError?.(result.error || t11("file_browser.upload_file_error", { name: file.name }));
2356
2475
  }
2357
2476
  }
2358
2477
  }, [api, currentPath, onError]);
@@ -2370,7 +2489,7 @@ function FileBrowser({
2370
2489
  document.body.removeChild(a);
2371
2490
  URL.revokeObjectURL(url);
2372
2491
  } else {
2373
- onError?.(result.error || "Failed to download file");
2492
+ onError?.(result.error || t11("file_browser.download_file_error"));
2374
2493
  }
2375
2494
  }, [api, selectedItem, onError]);
2376
2495
  const handleDelete = (0, import_react11.useCallback)(async () => {
@@ -2388,7 +2507,7 @@ function FileBrowser({
2388
2507
  await loadTree();
2389
2508
  }
2390
2509
  } else {
2391
- throw new Error(result.error || "Failed to delete");
2510
+ throw new Error(result.error || t11("file_browser.delete_error"));
2392
2511
  }
2393
2512
  }, [api, selectedItem, loadTree]);
2394
2513
  const handleRename = (0, import_react11.useCallback)(async (newName) => {
@@ -2406,7 +2525,7 @@ function FileBrowser({
2406
2525
  await loadTree();
2407
2526
  }
2408
2527
  } else {
2409
- throw new Error(result.error || "Failed to rename");
2528
+ throw new Error(result.error || t11("file_browser.rename_error"));
2410
2529
  }
2411
2530
  }, [api, selectedItem, loadTree]);
2412
2531
  const handleContextMenu = (0, import_react11.useCallback)((item, event) => {
@@ -2438,7 +2557,7 @@ function FileBrowser({
2438
2557
  const contextMenuItems = contextMenuItem ? [
2439
2558
  {
2440
2559
  id: "metadata",
2441
- label: "View Metadata",
2560
+ label: t11("file_browser.context_menu_view_metadata"),
2442
2561
  icon: InfoIcon,
2443
2562
  onClick: handleViewMetadata
2444
2563
  },
@@ -2451,7 +2570,7 @@ function FileBrowser({
2451
2570
  },
2452
2571
  {
2453
2572
  id: "rename",
2454
- label: "Rename",
2573
+ label: t11("file_browser.context_menu_rename"),
2455
2574
  icon: PencilIcon,
2456
2575
  onClick: () => {
2457
2576
  setSelectedItem(contextMenuItem);
@@ -2460,7 +2579,7 @@ function FileBrowser({
2460
2579
  },
2461
2580
  {
2462
2581
  id: "download",
2463
- label: "Download",
2582
+ label: t11("file_browser.context_menu_download"),
2464
2583
  icon: DownloadIcon,
2465
2584
  onClick: async () => {
2466
2585
  if (contextMenuItem.isDirectory) return;
@@ -2476,7 +2595,7 @@ function FileBrowser({
2476
2595
  document.body.removeChild(a);
2477
2596
  URL.revokeObjectURL(url);
2478
2597
  } else {
2479
- onError?.(result.error || "Failed to download file");
2598
+ onError?.(result.error || t11("file_browser.download_file_error"));
2480
2599
  }
2481
2600
  },
2482
2601
  disabled: contextMenuItem.isDirectory
@@ -2490,7 +2609,7 @@ function FileBrowser({
2490
2609
  },
2491
2610
  {
2492
2611
  id: "delete",
2493
- label: "Delete",
2612
+ label: t11("file_browser.context_menu_delete"),
2494
2613
  icon: TrashIcon,
2495
2614
  danger: true,
2496
2615
  onClick: () => {
@@ -4035,22 +4154,27 @@ function PatternSegmentItem({
4035
4154
  }
4036
4155
 
4037
4156
  // src/ui/components/naming/SeparatorPicker.tsx
4157
+ var import_i18n12 = require("hazo_core/i18n");
4038
4158
  var import_jsx_runtime20 = require("react/jsx-runtime");
4039
- var COMMON_SEPARATORS = [
4040
- { value: "-", label: "-", title: "Hyphen" },
4041
- { value: "_", label: "_", title: "Underscore" },
4042
- { value: "/", label: "/", title: "Slash (for folder paths)" },
4043
- { value: " ", label: "\u2423", title: "Space" },
4044
- { value: ".", label: ".", title: "Period" }
4045
- ];
4159
+ var t12 = (0, import_i18n12.createPackageT)("hazo_files", en_default);
4160
+ function getCommonSeparators() {
4161
+ return [
4162
+ { value: "-", label: "-", title: t12("separator_picker.title_hyphen") },
4163
+ { value: "_", label: "_", title: t12("separator_picker.title_underscore") },
4164
+ { value: "/", label: "/", title: t12("separator_picker.title_slash") },
4165
+ { value: " ", label: "\u2423", title: t12("separator_picker.title_space") },
4166
+ { value: ".", label: ".", title: t12("separator_picker.title_period") }
4167
+ ];
4168
+ }
4046
4169
  function SeparatorPicker({
4047
4170
  onSelect,
4048
4171
  disabled = false,
4049
4172
  className = ""
4050
4173
  }) {
4174
+ const commonSeparators = getCommonSeparators();
4051
4175
  return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: `flex items-center gap-1 ${className}`, children: [
4052
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "text-xs text-gray-500 mr-1", children: "Add:" }),
4053
- COMMON_SEPARATORS.map(({ value, label, title }) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
4176
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "text-xs text-gray-500 mr-1", children: t12("separator_picker.add_label") }),
4177
+ commonSeparators.map(({ value, label, title }) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
4054
4178
  "button",
4055
4179
  {
4056
4180
  type: "button",
@@ -4168,7 +4292,9 @@ function PatternBuilder({
4168
4292
 
4169
4293
  // src/ui/components/naming/PatternPreview.tsx
4170
4294
  var import_react19 = require("react");
4295
+ var import_i18n13 = require("hazo_core/i18n");
4171
4296
  var import_jsx_runtime22 = require("react/jsx-runtime");
4297
+ var t13 = (0, import_i18n13.createPackageT)("hazo_files", en_default);
4172
4298
  function PatternPreview({
4173
4299
  filePattern,
4174
4300
  folderPattern,
@@ -4181,7 +4307,7 @@ function PatternPreview({
4181
4307
  const date = previewDate || /* @__PURE__ */ new Date();
4182
4308
  const filePreview = (0, import_react19.useMemo)(() => {
4183
4309
  if (filePattern.length === 0) {
4184
- return { name: "(no pattern defined)", isEmpty: true };
4310
+ return { name: t13("pattern_preview.no_pattern"), isEmpty: true };
4185
4311
  }
4186
4312
  const baseName = generatePreviewName(filePattern, userVariables, {
4187
4313
  date,
@@ -4197,7 +4323,7 @@ function PatternPreview({
4197
4323
  }, [filePattern, userVariables, date, counterValue, sampleFileName]);
4198
4324
  const folderPreview = (0, import_react19.useMemo)(() => {
4199
4325
  if (folderPattern.length === 0) {
4200
- return { name: "(no pattern defined)", isEmpty: true };
4326
+ return { name: t13("pattern_preview.no_pattern"), isEmpty: true };
4201
4327
  }
4202
4328
  return {
4203
4329
  name: generatePreviewName(folderPattern, userVariables, {
@@ -4208,7 +4334,7 @@ function PatternPreview({
4208
4334
  isEmpty: false
4209
4335
  };
4210
4336
  }, [folderPattern, userVariables, date, counterValue, sampleFileName]);
4211
- const dateDisplay = date.toLocaleDateString("en-US", {
4337
+ const dateDisplay = date.toLocaleDateString((0, import_i18n13.resolvePackageLocale)("en-US"), {
4212
4338
  weekday: "short",
4213
4339
  year: "numeric",
4214
4340
  month: "short",
@@ -4220,12 +4346,12 @@ function PatternPreview({
4220
4346
  className: `bg-gradient-to-br from-gray-50 to-gray-100 rounded-lg border border-gray-200 p-4 ${className}`,
4221
4347
  children: [
4222
4348
  /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex items-center justify-between mb-3", children: [
4223
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("h3", { className: "text-sm font-medium text-gray-700", children: "Preview" }),
4349
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("h3", { className: "text-sm font-medium text-gray-700", children: t13("pattern_preview.title") }),
4224
4350
  /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "text-xs text-gray-400", children: dateDisplay })
4225
4351
  ] }),
4226
4352
  /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "space-y-3", children: [
4227
4353
  /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex items-start gap-3", children: [
4228
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "flex-shrink-0 w-16 text-xs text-gray-500 pt-0.5", children: "File:" }),
4354
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "flex-shrink-0 w-16 text-xs text-gray-500 pt-0.5", children: t13("pattern_preview.file_label") }),
4229
4355
  /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
4230
4356
  "div",
4231
4357
  {
@@ -4259,7 +4385,7 @@ function PatternPreview({
4259
4385
  )
4260
4386
  ] }),
4261
4387
  /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex items-start gap-3", children: [
4262
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "flex-shrink-0 w-16 text-xs text-gray-500 pt-0.5", children: "Folder:" }),
4388
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "flex-shrink-0 w-16 text-xs text-gray-500 pt-0.5", children: t13("pattern_preview.folder_label") }),
4263
4389
  /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
4264
4390
  "div",
4265
4391
  {
@@ -4290,7 +4416,7 @@ function PatternPreview({
4290
4416
  )
4291
4417
  ] }),
4292
4418
  !filePreview.isEmpty && !folderPreview.isEmpty && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex items-start gap-3 pt-2 border-t border-gray-200", children: [
4293
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "flex-shrink-0 w-16 text-xs text-gray-500 pt-0.5", children: "Full path:" }),
4419
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "flex-shrink-0 w-16 text-xs text-gray-500 pt-0.5", children: t13("pattern_preview.full_path_label") }),
4294
4420
  /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex-1 font-mono text-xs text-gray-600 px-3 py-2 rounded bg-gray-100 border border-gray-200 overflow-x-auto", children: [
4295
4421
  "/",
4296
4422
  folderPreview.name,
@@ -4299,7 +4425,7 @@ function PatternPreview({
4299
4425
  ] })
4300
4426
  ] })
4301
4427
  ] }),
4302
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "text-xs text-gray-400 mt-3 text-center", children: "Preview uses example values from your variables" })
4428
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "text-xs text-gray-400 mt-3 text-center", children: t13("pattern_preview.example_note") })
4303
4429
  ]
4304
4430
  }
4305
4431
  );