hazo_ui 6.12.4 → 6.13.1

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/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import { clsx } from 'clsx';
3
3
  import { twMerge } from 'tailwind-merge';
4
4
  import * as React27 from 'react';
5
- import React27__default, { lazy, useRef, useState, useCallback, useEffect, useMemo, Fragment, Suspense, useSyncExternalStore } from 'react';
5
+ import React27__default, { createContext, lazy, useContext, useRef, useState, useCallback, useEffect, useMemo, Fragment, Suspense, useSyncExternalStore } from 'react';
6
6
  import { generateRequestId } from 'hazo_core';
7
7
  import { withContext, setBrowserCorrelationId } from 'hazo_core/client';
8
8
  import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
@@ -112,8 +112,8 @@ var require_extends = __commonJS({
112
112
  function _extends11() {
113
113
  return module.exports = _extends11 = Object.assign ? Object.assign.bind() : function(n) {
114
114
  for (var e = 1; e < arguments.length; e++) {
115
- var t22 = arguments[e];
116
- for (var r in t22) ({}).hasOwnProperty.call(t22, r) && (n[r] = t22[r]);
115
+ var t = arguments[e];
116
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
117
117
  }
118
118
  return n;
119
119
  }, module.exports.__esModule = true, module.exports["default"] = module.exports, _extends11.apply(null, arguments);
@@ -127,12 +127,12 @@ var require_objectWithoutPropertiesLoose = __commonJS({
127
127
  "../node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js"(exports, module) {
128
128
  function _objectWithoutPropertiesLoose10(r, e) {
129
129
  if (null == r) return {};
130
- var t22 = {};
130
+ var t = {};
131
131
  for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
132
132
  if (-1 !== e.indexOf(n)) continue;
133
- t22[n] = r[n];
133
+ t[n] = r[n];
134
134
  }
135
- return t22;
135
+ return t;
136
136
  }
137
137
  module.exports = _objectWithoutPropertiesLoose10, module.exports.__esModule = true, module.exports["default"] = module.exports;
138
138
  }
@@ -683,6 +683,11 @@ var en_default = {
683
683
  "rte.horizontal_rule": "Horizontal rule",
684
684
  "rte.insert_image": "Insert image",
685
685
  "rte.table": "Table",
686
+ "rte.tab_html": "HTML",
687
+ "rte.tab_plain_text": "Plain Text",
688
+ "rte.tab_raw_html": "Raw HTML",
689
+ "rte.empty_content": "(empty)",
690
+ "rte.link_placeholder": "https://example.com",
686
691
  "rte.insert_variable": "Insert variable",
687
692
  "rte.attach_file": "Attach file",
688
693
  "rte.block_type.paragraph": "Paragraph",
@@ -731,6 +736,9 @@ var en_default = {
731
736
  "canvas_toolbar.align_right": "Align right",
732
737
  "canvas_toolbar.text_color": "Text color",
733
738
  "canvas_toolbar.font_family": "Font family",
739
+ "canvas_toolbar.font_sans": "Sans",
740
+ "canvas_toolbar.font_serif": "Serif",
741
+ "canvas_toolbar.font_mono": "Mono",
734
742
  "canvas_toolbar.align_top": "Align top",
735
743
  "canvas_toolbar.align_middle": "Align middle",
736
744
  "canvas_toolbar.align_bottom": "Align bottom",
@@ -743,6 +751,8 @@ var en_default = {
743
751
  "notification.loading": "Loading notifications",
744
752
  "notification.mark_all_read": "Mark all as read",
745
753
  "notification.unread": "Unread",
754
+ "notification.unread_count": "{{count}} unread",
755
+ "browser_tab.close_aria": "Close {{label}}",
746
756
  "confirm.cancel": "Cancel",
747
757
  "icon_picker.search_placeholder": "Search icons...",
748
758
  "common.loading": "Loading...",
@@ -762,10 +772,12 @@ var en_default = {
762
772
  "kanban.select_placeholder": "Select {{label}}\u2026",
763
773
  "kanban.select_priority": "Select priority\u2026",
764
774
  "kanban.select_status": "Select status\u2026",
775
+ "kanban.clear": "Clear",
765
776
  "markdown.placeholder": "Write in Markdown\u2026",
766
777
  "markdown.upload_failed": "Upload failed.",
767
778
  "markdown.loading_editor": "Loading editor\u2026",
768
779
  "markdown.uploading_image": "Uploading image\u2026",
780
+ "markdown.upload_placeholder": "uploading\u2026",
769
781
  "cropper.title": "Crop photo",
770
782
  "cropper.save": "Save",
771
783
  "cropper.cancel": "Cancel",
@@ -778,9 +790,102 @@ var en_default = {
778
790
  "celebration.share": "Share",
779
791
  "celebration.copy_image": "Copy image",
780
792
  "celebration.dismiss": "Dismiss",
781
- "charts.date_range": "Date range"
793
+ "charts.date_range": "Date range",
794
+ "flex_input.must_be_valid_number": "Must be a valid number",
795
+ "flex_input.max_decimals": "Maximum {{count}} decimal places allowed",
796
+ "flex_input.min_value": "Must be at least {{min}}",
797
+ "flex_input.max_value": "Must be at most {{max}}",
798
+ "flex_input.alpha_only": "Only letters, numbers, and spaces are allowed",
799
+ "flex_input.must_be_valid_email": "Must be a valid email address",
800
+ "flex_input.min_characters": "Must be at least {{min}} characters",
801
+ "flex_input.max_characters": "Must be at most {{max}} characters",
802
+ "flex_input.invalid_format": "Invalid format",
803
+ "flex_input.invalid_input": "Invalid input",
804
+ "textbox.placeholder": "Type here...",
805
+ "textarea.placeholder": "Type here...",
806
+ "common.remove": "Remove",
807
+ "locale_picker.change_language": "Change language",
808
+ "app_logo.alt_fallback": "Logo",
809
+ "app_header.aria_label": "Application header",
810
+ "skeleton.loading_content": "Loading content",
811
+ "spinner.loading": "Loading",
812
+ "spinner.loading_text": "Loading...",
813
+ "rte.update_link": "Update Link",
814
+ "rte.add_link": "Add Link",
815
+ "rte.remove_link": "Remove",
816
+ "rte.select_size": "Select size",
817
+ "rte.custom_size": "Custom size",
818
+ "rte.insert_table": "Insert",
819
+ "rte.search_variables": "Search variables...",
820
+ "rte.no_variables": "No variables found.",
821
+ "rte.table_operations": "Table Operations",
822
+ "rte.add_row_above": "Add row above",
823
+ "rte.add_row_below": "Add row below",
824
+ "rte.add_col_left": "Add col left",
825
+ "rte.add_col_right": "Add col right",
826
+ "rte.delete_row": "Delete row",
827
+ "rte.delete_col": "Delete col",
828
+ "rte.delete_table": "Delete table",
829
+ "rte.insert_table_heading": "Insert Table",
830
+ "rte.placeholder": "Start typing...",
831
+ "sort.asc": "Asc",
832
+ "sort.desc": "Desc",
833
+ "sort.reorder_aria": "Reorder {{field}}",
834
+ "sort.priority_aria": "Sort priority {{n}}",
835
+ "sort.direction_aria": "Sort direction for {{field}}",
836
+ "sort.remove_aria": "Remove {{field}} from sort",
837
+ "sort.active_sorts": "Active sorts",
838
+ "sort.no_active_sorts": "No active sorts",
839
+ "sort.button_label": "Sort",
840
+ "sort.empty_message": "No sort fields yet. Add one below to start ordering rows.",
841
+ "sort.all_fields_added": "All fields added",
842
+ "sort.add_sort_field": "Add sort field",
843
+ "sort.no_fields_available": "No fields available.",
844
+ "kanban.dnd_pickup": "Picked up {{item}}. Currently in {{column}}. Use arrow keys to choose a different column. Press space to drop, escape to cancel.",
845
+ "kanban.dnd_over": "{{item}} over {{column}}.",
846
+ "kanban.dnd_drop": "{{item}} dropped in {{column}}, position {{pos}}.",
847
+ "kanban.dnd_reorder": "{{item}} reordered to position {{pos}} in {{column}}.",
848
+ "kanban.dnd_cancel": "Movement cancelled. {{item}} returned to {{column}}.",
849
+ "kanban.draggable_card": "draggable card",
850
+ "loading.still_loading": "We're still trying to load the {{label}}. The connection may be slow.",
851
+ "loading.try_again": "Try again",
852
+ "loading.gentle_message": "Loading {{label}}\u2026",
853
+ "loading.default_label": "content",
854
+ "loading.firm_message": "Still working on it \u2014 almost there.",
855
+ "icon_picker.emoji_tab": "Emoji",
856
+ "icon_picker.tools_group": "Tools",
857
+ "icon_picker.home_group": "Home",
858
+ "icon_picker.weather_group": "Weather",
859
+ "icon_picker.nature_group": "Nature",
860
+ "icon_picker.symbols_group": "Symbols",
861
+ "icon_picker.no_results": "No icons found",
862
+ "error.correlation_id": "Correlation ID",
863
+ "charts.total": "Total: {{value}}",
864
+ "charts.pct_of_first": "% of first: {{pct}}%",
865
+ "charts.pct_of_prev": "% of prev: {{pct}}%",
866
+ "charts.dropoff": "Drop-off: \u2212{{value}}",
867
+ "toast.missing_prefix": "Missing: {{items}}"
782
868
  };
783
- var t = createPackageT("hazo_ui", en_default);
869
+ var default_t = createPackageT("hazo_ui", en_default);
870
+ var defaultHazoUiT = default_t;
871
+ var HazoUiI18nContext = createContext(default_t);
872
+ function HazoUiI18nProvider({ t, children }) {
873
+ const safe_t = useMemo(
874
+ () => (key, values) => {
875
+ try {
876
+ return t(key, values);
877
+ } catch {
878
+ get_logger().warn("i18n_missing_key_fallback", { key });
879
+ return default_t(key, values);
880
+ }
881
+ },
882
+ [t]
883
+ );
884
+ return /* @__PURE__ */ jsx(HazoUiI18nContext.Provider, { value: safe_t, children });
885
+ }
886
+ function useHazoUiT() {
887
+ return useContext(HazoUiI18nContext);
888
+ }
784
889
  function FilterFieldItem({
785
890
  filterConfig,
786
891
  fieldConfig,
@@ -788,6 +893,7 @@ function FilterFieldItem({
788
893
  onOperatorChange,
789
894
  onDelete
790
895
  }) {
896
+ const t = useHazoUiT();
791
897
  const [isCalendarOpen, setIsCalendarOpen] = useState(false);
792
898
  const renderInput = () => {
793
899
  switch (fieldConfig.type) {
@@ -973,8 +1079,8 @@ function HazoUiMultiFilterDialog({
973
1079
  availableFields,
974
1080
  onFilterChange,
975
1081
  initialFilters = [],
976
- title = t("filter.title"),
977
- description = t("filter.description"),
1082
+ title: titleProp,
1083
+ description: descriptionProp,
978
1084
  headerBackgroundColor,
979
1085
  headerTextColor,
980
1086
  submitButtonBackgroundColor,
@@ -986,6 +1092,9 @@ function HazoUiMultiFilterDialog({
986
1092
  clearButtonTextColor,
987
1093
  clearButtonBorderColor
988
1094
  }) {
1095
+ const t = useHazoUiT();
1096
+ const description = descriptionProp ?? t("filter.description");
1097
+ const title = titleProp ?? t("filter.title");
989
1098
  const config = get_hazo_ui_config();
990
1099
  const finalSubmitBgColor = submitButtonBackgroundColor ?? config.submit_button_background_color;
991
1100
  const finalSubmitTextColor = submitButtonTextColor ?? config.submit_button_text_color;
@@ -1227,7 +1336,6 @@ function HazoUiMultiFilterDialog({
1227
1336
  ] })
1228
1337
  ] });
1229
1338
  }
1230
- var t2 = createPackageT("hazo_ui", en_default);
1231
1339
  function SortableSortFieldItem({
1232
1340
  sortConfig,
1233
1341
  fieldLabel,
@@ -1235,6 +1343,7 @@ function SortableSortFieldItem({
1235
1343
  onDirectionChange,
1236
1344
  onDelete
1237
1345
  }) {
1346
+ const t = useHazoUiT();
1238
1347
  const {
1239
1348
  attributes,
1240
1349
  listeners,
@@ -1266,7 +1375,7 @@ function SortableSortFieldItem({
1266
1375
  ...attributes,
1267
1376
  ...listeners,
1268
1377
  className: "cls_drag_handle flex h-7 w-5 shrink-0 cursor-grab items-center justify-center rounded text-muted-foreground/60 hover:text-foreground active:cursor-grabbing",
1269
- "aria-label": `Reorder ${fieldLabel}`,
1378
+ "aria-label": t("sort.reorder_aria", { field: fieldLabel }),
1270
1379
  children: /* @__PURE__ */ jsx(GripVertical, { className: "cls_drag_icon h-4 w-4" })
1271
1380
  }
1272
1381
  ),
@@ -1274,7 +1383,7 @@ function SortableSortFieldItem({
1274
1383
  "span",
1275
1384
  {
1276
1385
  className: "cls_priority_badge inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-muted text-[10px] font-semibold tabular-nums text-muted-foreground",
1277
- "aria-label": `Sort priority ${priority}`,
1386
+ "aria-label": t("sort.priority_aria", { n: priority }),
1278
1387
  children: priority
1279
1388
  }
1280
1389
  ),
@@ -1283,7 +1392,7 @@ function SortableSortFieldItem({
1283
1392
  "div",
1284
1393
  {
1285
1394
  role: "radiogroup",
1286
- "aria-label": `Sort direction for ${fieldLabel}`,
1395
+ "aria-label": t("sort.direction_aria", { field: fieldLabel }),
1287
1396
  className: "cls_direction_control inline-flex shrink-0 items-center rounded-md border border-border/70 bg-muted/40 p-0.5",
1288
1397
  children: [
1289
1398
  /* @__PURE__ */ jsxs(
@@ -1297,7 +1406,7 @@ function SortableSortFieldItem({
1297
1406
  className: "cls_dir_asc inline-flex items-center gap-1 rounded px-2 py-1 text-xs font-medium text-muted-foreground transition-colors data-[active=true]:bg-background data-[active=true]:text-foreground data-[active=true]:shadow-sm hover:text-foreground",
1298
1407
  children: [
1299
1408
  /* @__PURE__ */ jsx(ArrowUp, { className: "h-3 w-3" }),
1300
- "Asc"
1409
+ t("sort.asc")
1301
1410
  ]
1302
1411
  }
1303
1412
  ),
@@ -1312,7 +1421,7 @@ function SortableSortFieldItem({
1312
1421
  className: "cls_dir_desc inline-flex items-center gap-1 rounded px-2 py-1 text-xs font-medium text-muted-foreground transition-colors data-[active=true]:bg-background data-[active=true]:text-foreground data-[active=true]:shadow-sm hover:text-foreground",
1313
1422
  children: [
1314
1423
  /* @__PURE__ */ jsx(ArrowDown, { className: "h-3 w-3" }),
1315
- "Desc"
1424
+ t("sort.desc")
1316
1425
  ]
1317
1426
  }
1318
1427
  )
@@ -1326,7 +1435,7 @@ function SortableSortFieldItem({
1326
1435
  size: "sm",
1327
1436
  onClick: onDelete,
1328
1437
  className: "cls_delete_btn h-7 w-7 shrink-0 p-0 text-muted-foreground/60 hover:bg-destructive/10 hover:text-destructive",
1329
- "aria-label": `Remove ${fieldLabel} from sort`,
1438
+ "aria-label": t("sort.remove_aria", { field: fieldLabel }),
1330
1439
  children: /* @__PURE__ */ jsx(X, { className: "cls_delete_icon h-3.5 w-3.5" })
1331
1440
  }
1332
1441
  )
@@ -1338,8 +1447,8 @@ function HazoUiMultiSortDialog({
1338
1447
  availableFields,
1339
1448
  onSortChange,
1340
1449
  initialSortFields = [],
1341
- title = t2("sort.title"),
1342
- description = t2("sort.description"),
1450
+ title: titleProp,
1451
+ description: descriptionProp,
1343
1452
  headerBackgroundColor,
1344
1453
  headerTextColor,
1345
1454
  submitButtonBackgroundColor,
@@ -1351,6 +1460,9 @@ function HazoUiMultiSortDialog({
1351
1460
  clearButtonTextColor,
1352
1461
  clearButtonBorderColor
1353
1462
  }) {
1463
+ const t = useHazoUiT();
1464
+ const description = descriptionProp ?? t("sort.description");
1465
+ const title = titleProp ?? t("sort.title");
1354
1466
  const config = get_hazo_ui_config();
1355
1467
  const finalSubmitBgColor = submitButtonBackgroundColor ?? config.submit_button_background_color;
1356
1468
  const finalSubmitTextColor = submitButtonTextColor ?? config.submit_button_text_color;
@@ -1439,16 +1551,16 @@ function HazoUiMultiSortDialog({
1439
1551
  };
1440
1552
  const hasActiveSorts = initialSortFields.length > 0;
1441
1553
  const tooltipContent = hasActiveSorts ? /* @__PURE__ */ jsxs("div", { className: "cls_sort_tooltip_content space-y-1", children: [
1442
- /* @__PURE__ */ jsx("div", { className: "cls_tooltip_title text-xs font-semibold mb-1", children: "Active sorts" }),
1554
+ /* @__PURE__ */ jsx("div", { className: "cls_tooltip_title text-xs font-semibold mb-1", children: t("sort.active_sorts") }),
1443
1555
  initialSortFields.map((sortConfig, index) => /* @__PURE__ */ jsxs("div", { className: "cls_tooltip_item text-xs", children: [
1444
1556
  index + 1,
1445
1557
  ". ",
1446
1558
  getFieldLabel(sortConfig.field),
1447
1559
  " (",
1448
- sortConfig.direction === "asc" ? "Asc" : "Desc",
1560
+ sortConfig.direction === "asc" ? t("sort.asc") : t("sort.desc"),
1449
1561
  ")"
1450
1562
  ] }, sortConfig.field))
1451
- ] }) : /* @__PURE__ */ jsx("div", { className: "cls_sort_tooltip_content text-xs", children: "No active sorts" });
1563
+ ] }) : /* @__PURE__ */ jsx("div", { className: "cls_sort_tooltip_content text-xs", children: t("sort.no_active_sorts") });
1452
1564
  return /* @__PURE__ */ jsxs(Dialog, { open: isOpen, onOpenChange: setIsOpen, children: [
1453
1565
  /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsxs(Tooltip, { children: [
1454
1566
  /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx(DialogTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
@@ -1457,7 +1569,7 @@ function HazoUiMultiSortDialog({
1457
1569
  variant: "outline",
1458
1570
  size: "sm",
1459
1571
  className: "cls_sort_button",
1460
- "aria-label": t2("sort.open_dialog_aria"),
1572
+ "aria-label": t("sort.open_dialog_aria"),
1461
1573
  children: [
1462
1574
  /* @__PURE__ */ jsx(
1463
1575
  ArrowUpDown,
@@ -1468,7 +1580,7 @@ function HazoUiMultiSortDialog({
1468
1580
  )
1469
1581
  }
1470
1582
  ),
1471
- "Sort",
1583
+ t("sort.button_label"),
1472
1584
  hasActiveSorts && /* @__PURE__ */ jsx("span", { className: "cls_sort_count ml-2 inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-blue-600 px-1 text-[10px] font-semibold text-white", children: initialSortFields.length })
1473
1585
  ]
1474
1586
  }
@@ -1513,7 +1625,7 @@ function HazoUiMultiSortDialog({
1513
1625
  }
1514
1626
  )
1515
1627
  }
1516
- ) }) : /* @__PURE__ */ jsx("div", { className: "cls_empty_sort_fields rounded-lg border border-dashed border-border/70 bg-muted/20 px-4 py-6 text-center text-xs text-muted-foreground", children: "No sort fields yet. Add one below to start ordering rows." }),
1628
+ ) }) : /* @__PURE__ */ jsx("div", { className: "cls_empty_sort_fields rounded-lg border border-dashed border-border/70 bg-muted/20 px-4 py-6 text-center text-xs text-muted-foreground", children: t("sort.empty_message") }),
1517
1629
  /* @__PURE__ */ jsx("div", { className: "cls_add_field_section", children: /* @__PURE__ */ jsxs(Popover, { open: isComboboxOpen, onOpenChange: setIsComboboxOpen, children: [
1518
1630
  /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
1519
1631
  Button,
@@ -1525,13 +1637,13 @@ function HazoUiMultiSortDialog({
1525
1637
  className: "cls_add_field_combobox w-full justify-start gap-2 border border-dashed border-border/70 text-sm font-medium text-muted-foreground hover:border-border hover:bg-muted/40 hover:text-foreground",
1526
1638
  children: [
1527
1639
  /* @__PURE__ */ jsx(Plus, { className: "cls_plus_icon h-4 w-4" }),
1528
- /* @__PURE__ */ jsx("span", { children: availableFieldsToAdd.length === 0 ? "All fields added" : "Add sort field" })
1640
+ /* @__PURE__ */ jsx("span", { children: availableFieldsToAdd.length === 0 ? t("sort.all_fields_added") : t("sort.add_sort_field") })
1529
1641
  ]
1530
1642
  }
1531
1643
  ) }),
1532
1644
  /* @__PURE__ */ jsx(PopoverContent, { className: "cls_combobox_popover w-[var(--radix-popover-trigger-width)] p-0", align: "start", children: /* @__PURE__ */ jsxs(Command, { children: [
1533
- /* @__PURE__ */ jsx(CommandInput, { placeholder: t2("sort.search_fields"), className: "cls_command_input" }),
1534
- /* @__PURE__ */ jsx(CommandList, { children: availableFieldsToAdd.length === 0 ? /* @__PURE__ */ jsx(CommandEmpty, { children: "No fields available." }) : /* @__PURE__ */ jsx(CommandGroup, { children: availableFieldsToAdd.map((field) => /* @__PURE__ */ jsx(
1645
+ /* @__PURE__ */ jsx(CommandInput, { placeholder: t("sort.search_fields"), className: "cls_command_input" }),
1646
+ /* @__PURE__ */ jsx(CommandList, { children: availableFieldsToAdd.length === 0 ? /* @__PURE__ */ jsx(CommandEmpty, { children: t("sort.no_fields_available") }) : /* @__PURE__ */ jsx(CommandGroup, { children: availableFieldsToAdd.map((field) => /* @__PURE__ */ jsx(
1535
1647
  CommandItem,
1536
1648
  {
1537
1649
  value: field.label,
@@ -1553,7 +1665,7 @@ function HazoUiMultiSortDialog({
1553
1665
  onClick: handleClearAll,
1554
1666
  className: "cls_clear_all_btn text-muted-foreground hover:text-foreground",
1555
1667
  style: clearButtonStyles,
1556
- children: t2("sort.clear_all")
1668
+ children: t("sort.clear_all")
1557
1669
  }
1558
1670
  ) }),
1559
1671
  /* @__PURE__ */ jsxs("div", { className: "cls_footer_right flex items-center gap-2", children: [
@@ -1565,7 +1677,7 @@ function HazoUiMultiSortDialog({
1565
1677
  onClick: handleCancel,
1566
1678
  className: "cls_cancel_btn",
1567
1679
  style: cancelButtonStyles,
1568
- children: t2("sort.cancel")
1680
+ children: t("sort.cancel")
1569
1681
  }
1570
1682
  ),
1571
1683
  /* @__PURE__ */ jsx(
@@ -1575,7 +1687,7 @@ function HazoUiMultiSortDialog({
1575
1687
  onClick: handleApply,
1576
1688
  className: "cls_apply_btn",
1577
1689
  style: submitButtonStyles,
1578
- children: t2("sort.apply")
1690
+ children: t("sort.apply")
1579
1691
  }
1580
1692
  )
1581
1693
  ] })
@@ -1994,7 +2106,6 @@ var TabsContent = React27.forwardRef(({ className, ...props }, ref) => /* @__PUR
1994
2106
  }
1995
2107
  ));
1996
2108
  TabsContent.displayName = TabsPrimitive.Content.displayName;
1997
- var t3 = createPackageT("hazo_ui", en_default);
1998
2109
  function isLucideValue(value) {
1999
2110
  return value.startsWith("lucide:");
2000
2111
  }
@@ -2067,11 +2178,11 @@ var SYMBOLS_ICONS = [
2067
2178
  "Wrench"
2068
2179
  ];
2069
2180
  var LUCIDE_GROUPS = [
2070
- { key: "tools", label: "Tools", icons: TOOLS_ICONS },
2071
- { key: "home", label: "Home", icons: HOME_ICONS },
2072
- { key: "weather", label: "Weather", icons: WEATHER_ICONS },
2073
- { key: "nature", label: "Nature", icons: NATURE_ICONS },
2074
- { key: "symbols", label: "Symbols", icons: SYMBOLS_ICONS }
2181
+ { key: "tools", label_key: "icon_picker.tools_group", icons: TOOLS_ICONS },
2182
+ { key: "home", label_key: "icon_picker.home_group", icons: HOME_ICONS },
2183
+ { key: "weather", label_key: "icon_picker.weather_group", icons: WEATHER_ICONS },
2184
+ { key: "nature", label_key: "icon_picker.nature_group", icons: NATURE_ICONS },
2185
+ { key: "symbols", label_key: "icon_picker.symbols_group", icons: SYMBOLS_ICONS }
2075
2186
  ];
2076
2187
  var EMOJI_ITEMS = [
2077
2188
  // Faces
@@ -2213,6 +2324,7 @@ function HazoUiIconPicker({
2213
2324
  triggerClassName,
2214
2325
  align = "start"
2215
2326
  }) {
2327
+ const t = useHazoUiT();
2216
2328
  const [open, set_open] = React27.useState(false);
2217
2329
  const [search, set_search] = React27.useState("");
2218
2330
  const handle_select = React27.useCallback(
@@ -2260,7 +2372,7 @@ function HazoUiIconPicker({
2260
2372
  type: "text",
2261
2373
  value: search,
2262
2374
  onChange: (e) => set_search(e.target.value),
2263
- placeholder: t3("icon_picker.search_placeholder"),
2375
+ placeholder: t("icon_picker.search_placeholder"),
2264
2376
  className: cn(
2265
2377
  "cls_hazo_ui_icon_picker_search",
2266
2378
  "mb-2 flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm",
@@ -2284,11 +2396,11 @@ function HazoUiIconPicker({
2284
2396
  name
2285
2397
  );
2286
2398
  }),
2287
- filtered_search_results.length === 0 && /* @__PURE__ */ jsx("p", { className: "col-span-8 py-4 text-center text-sm text-muted-foreground", children: "No icons found" })
2399
+ filtered_search_results.length === 0 && /* @__PURE__ */ jsx("p", { className: "col-span-8 py-4 text-center text-sm text-muted-foreground", children: t("icon_picker.no_results") })
2288
2400
  ] }) : /* @__PURE__ */ jsxs(Tabs, { defaultValue: "emoji", children: [
2289
2401
  /* @__PURE__ */ jsxs(TabsList, { className: "grid w-full grid-cols-6", children: [
2290
- /* @__PURE__ */ jsx(TabsTrigger, { value: "emoji", children: "Emoji" }),
2291
- LUCIDE_GROUPS.map((group) => /* @__PURE__ */ jsx(TabsTrigger, { value: group.key, children: group.label }, group.key))
2402
+ /* @__PURE__ */ jsx(TabsTrigger, { value: "emoji", children: t("icon_picker.emoji_tab") }),
2403
+ LUCIDE_GROUPS.map((group) => /* @__PURE__ */ jsx(TabsTrigger, { value: group.key, children: t(group.label_key) }, group.key))
2292
2404
  ] }),
2293
2405
  /* @__PURE__ */ jsx(TabsContent, { value: "emoji", children: /* @__PURE__ */ jsx("div", { className: "grid max-h-56 grid-cols-8 gap-1 overflow-y-auto", children: EMOJI_ITEMS.map((emoji, index) => /* @__PURE__ */ jsx(
2294
2406
  "button",
@@ -2320,7 +2432,7 @@ function HazoUiIconPicker({
2320
2432
  }
2321
2433
  ) });
2322
2434
  }
2323
- function validateInput(value, input_type, text_len_min, text_len_max, num_min, num_max, regex, num_decimals) {
2435
+ function validateInput(value, input_type, text_len_min, text_len_max, num_min, num_max, regex, num_decimals, t) {
2324
2436
  if (value === "") {
2325
2437
  return { isValid: true };
2326
2438
  }
@@ -2328,36 +2440,36 @@ function validateInput(value, input_type, text_len_min, text_len_max, num_min, n
2328
2440
  case "numeric": {
2329
2441
  const numValue = parseFloat(value);
2330
2442
  if (isNaN(numValue)) {
2331
- return { isValid: false, errorMessage: "Must be a valid number" };
2443
+ return { isValid: false, errorMessage: t("flex_input.must_be_valid_number") };
2332
2444
  }
2333
2445
  if (num_decimals !== void 0) {
2334
2446
  const decimalPlaces = value.split(".")[1]?.length || 0;
2335
2447
  if (decimalPlaces > num_decimals) {
2336
2448
  return {
2337
2449
  isValid: false,
2338
- errorMessage: `Maximum ${num_decimals} decimal place${num_decimals !== 1 ? "s" : ""} allowed`
2450
+ errorMessage: t("flex_input.max_decimals", { count: num_decimals })
2339
2451
  };
2340
2452
  }
2341
2453
  }
2342
2454
  if (num_min !== void 0 && numValue < num_min) {
2343
- return { isValid: false, errorMessage: `Must be at least ${num_min}` };
2455
+ return { isValid: false, errorMessage: t("flex_input.min_value", { min: num_min }) };
2344
2456
  }
2345
2457
  if (num_max !== void 0 && numValue > num_max) {
2346
- return { isValid: false, errorMessage: `Must be at most ${num_max}` };
2458
+ return { isValid: false, errorMessage: t("flex_input.max_value", { max: num_max }) };
2347
2459
  }
2348
2460
  break;
2349
2461
  }
2350
2462
  case "alpha": {
2351
2463
  const alphaRegex = /^[A-Za-z0-9\s]*$/;
2352
2464
  if (!alphaRegex.test(value)) {
2353
- return { isValid: false, errorMessage: "Only letters, numbers, and spaces are allowed" };
2465
+ return { isValid: false, errorMessage: t("flex_input.alpha_only") };
2354
2466
  }
2355
2467
  break;
2356
2468
  }
2357
2469
  case "email": {
2358
2470
  const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
2359
2471
  if (!emailRegex.test(value)) {
2360
- return { isValid: false, errorMessage: "Must be a valid email address" };
2472
+ return { isValid: false, errorMessage: t("flex_input.must_be_valid_email") };
2361
2473
  }
2362
2474
  break;
2363
2475
  }
@@ -2365,13 +2477,13 @@ function validateInput(value, input_type, text_len_min, text_len_max, num_min, n
2365
2477
  if (text_len_min !== void 0 && value.length < text_len_min) {
2366
2478
  return {
2367
2479
  isValid: false,
2368
- errorMessage: `Must be at least ${text_len_min} character${text_len_min !== 1 ? "s" : ""}`
2480
+ errorMessage: t("flex_input.min_characters", { min: text_len_min })
2369
2481
  };
2370
2482
  }
2371
2483
  if (text_len_max !== void 0 && value.length > text_len_max) {
2372
2484
  return {
2373
2485
  isValid: false,
2374
- errorMessage: `Must be at most ${text_len_max} character${text_len_max !== 1 ? "s" : ""}`
2486
+ errorMessage: t("flex_input.max_characters", { max: text_len_max })
2375
2487
  };
2376
2488
  }
2377
2489
  break;
@@ -2380,7 +2492,7 @@ function validateInput(value, input_type, text_len_min, text_len_max, num_min, n
2380
2492
  if (regex) {
2381
2493
  const regexPattern = typeof regex === "string" ? new RegExp(regex) : regex;
2382
2494
  if (!regexPattern.test(value)) {
2383
- return { isValid: false, errorMessage: "Invalid format" };
2495
+ return { isValid: false, errorMessage: t("flex_input.invalid_format") };
2384
2496
  }
2385
2497
  }
2386
2498
  return { isValid: true };
@@ -2431,6 +2543,7 @@ var HazoUiFlexInput = React27.forwardRef(
2431
2543
  onBlur,
2432
2544
  ...props
2433
2545
  }, ref) => {
2546
+ const t = useHazoUiT();
2434
2547
  const [internalValue, setInternalValue] = React27.useState(
2435
2548
  typeof controlledValue === "string" ? controlledValue : typeof controlledValue === "number" ? String(controlledValue) : ""
2436
2549
  );
@@ -2473,10 +2586,11 @@ var HazoUiFlexInput = React27.forwardRef(
2473
2586
  num_min,
2474
2587
  num_max,
2475
2588
  regex,
2476
- num_decimals
2589
+ num_decimals,
2590
+ t
2477
2591
  );
2478
2592
  if (!validation.isValid) {
2479
- setErrorMessage(validation.errorMessage || format_guide || "Invalid input");
2593
+ setErrorMessage(validation.errorMessage || format_guide || t("flex_input.invalid_input"));
2480
2594
  } else {
2481
2595
  setErrorMessage(void 0);
2482
2596
  }
@@ -3706,10 +3820,10 @@ var BLOCK_TYPE_LABEL_KEYS = {
3706
3820
  "code-block": "rte.block_type.code_block",
3707
3821
  blockquote: "rte.block_type.blockquote"
3708
3822
  };
3709
- function get_translated_block_types(t22) {
3823
+ function get_translated_block_types(t) {
3710
3824
  return BLOCK_TYPES.map((type) => ({
3711
3825
  ...type,
3712
- label: t22(BLOCK_TYPE_LABEL_KEYS[type.value])
3826
+ label: t(BLOCK_TYPE_LABEL_KEYS[type.value])
3713
3827
  }));
3714
3828
  }
3715
3829
 
@@ -3756,7 +3870,6 @@ function get_file_extension(filename) {
3756
3870
  function is_image_file(mime_type) {
3757
3871
  return mime_type.startsWith("image/");
3758
3872
  }
3759
- var t4 = createPackageT("hazo_ui", en_default);
3760
3873
  var ALL_ON = {
3761
3874
  undo_redo: true,
3762
3875
  block_type: true,
@@ -3793,6 +3906,7 @@ var Toolbar = ({
3793
3906
  toolbar,
3794
3907
  font_families
3795
3908
  }) => {
3909
+ const t = useHazoUiT();
3796
3910
  const [link_url, set_link_url] = React27.useState("https://");
3797
3911
  const [link_popover_open, set_link_popover_open] = React27.useState(false);
3798
3912
  const [text_color_open, set_text_color_open] = React27.useState(false);
@@ -3811,7 +3925,7 @@ var Toolbar = ({
3811
3925
  }
3812
3926
  const tb = { ...ALL_ON, ...toolbar };
3813
3927
  const font_family_options = font_families && font_families.length > 0 ? font_families : FONT_FAMILIES;
3814
- const block_type_options = get_translated_block_types(t4);
3928
+ const block_type_options = get_translated_block_types(t);
3815
3929
  const get_current_font_size = () => {
3816
3930
  const attrs = editor.getAttributes("textStyle");
3817
3931
  return attrs.fontSize || FONT_SIZE_CONFIG.default;
@@ -3955,7 +4069,7 @@ var Toolbar = ({
3955
4069
  {
3956
4070
  onClick: () => editor.chain().focus().undo().run(),
3957
4071
  disabled: !editor.can().undo(),
3958
- tooltip: t4("rte.undo"),
4072
+ tooltip: t("rte.undo"),
3959
4073
  children: /* @__PURE__ */ jsx(LuUndo2, { className: "h-4 w-4" })
3960
4074
  },
3961
4075
  "undo"
@@ -3965,7 +4079,7 @@ var Toolbar = ({
3965
4079
  {
3966
4080
  onClick: () => editor.chain().focus().redo().run(),
3967
4081
  disabled: !editor.can().redo(),
3968
- tooltip: t4("rte.redo"),
4082
+ tooltip: t("rte.redo"),
3969
4083
  children: /* @__PURE__ */ jsx(LuRedo2, { className: "h-4 w-4" })
3970
4084
  },
3971
4085
  "redo"
@@ -4006,7 +4120,7 @@ var Toolbar = ({
4006
4120
  ToolbarButton,
4007
4121
  {
4008
4122
  onClick: () => handle_font_size_change(-2),
4009
- tooltip: t4("rte.decrease_font_size"),
4123
+ tooltip: t("rte.decrease_font_size"),
4010
4124
  children: /* @__PURE__ */ jsx(LuMinus, { className: "h-3 w-3" })
4011
4125
  }
4012
4126
  ),
@@ -4015,7 +4129,7 @@ var Toolbar = ({
4015
4129
  ToolbarButton,
4016
4130
  {
4017
4131
  onClick: () => handle_font_size_change(FONT_SIZE_CONFIG.step),
4018
- tooltip: t4("rte.increase_font_size"),
4132
+ tooltip: t("rte.increase_font_size"),
4019
4133
  children: /* @__PURE__ */ jsx(LuPlus, { className: "h-3 w-3" })
4020
4134
  }
4021
4135
  )
@@ -4033,7 +4147,7 @@ var Toolbar = ({
4033
4147
  {
4034
4148
  onClick: () => editor.chain().focus().toggleBold().run(),
4035
4149
  is_active: editor.isActive("bold"),
4036
- tooltip: t4("rte.bold"),
4150
+ tooltip: t("rte.bold"),
4037
4151
  children: /* @__PURE__ */ jsx(LuBold, { className: "h-4 w-4" })
4038
4152
  },
4039
4153
  "bold"
@@ -4047,7 +4161,7 @@ var Toolbar = ({
4047
4161
  {
4048
4162
  onClick: () => editor.chain().focus().toggleItalic().run(),
4049
4163
  is_active: editor.isActive("italic"),
4050
- tooltip: t4("rte.italic"),
4164
+ tooltip: t("rte.italic"),
4051
4165
  children: /* @__PURE__ */ jsx(LuItalic, { className: "h-4 w-4" })
4052
4166
  },
4053
4167
  "italic"
@@ -4061,7 +4175,7 @@ var Toolbar = ({
4061
4175
  {
4062
4176
  onClick: () => editor.chain().focus().toggleUnderline().run(),
4063
4177
  is_active: editor.isActive("underline"),
4064
- tooltip: t4("rte.underline"),
4178
+ tooltip: t("rte.underline"),
4065
4179
  children: /* @__PURE__ */ jsx(LuUnderline, { className: "h-4 w-4" })
4066
4180
  },
4067
4181
  "underline"
@@ -4075,7 +4189,7 @@ var Toolbar = ({
4075
4189
  {
4076
4190
  onClick: () => editor.chain().focus().toggleStrike().run(),
4077
4191
  is_active: editor.isActive("strike"),
4078
- tooltip: t4("rte.strikethrough"),
4192
+ tooltip: t("rte.strikethrough"),
4079
4193
  children: /* @__PURE__ */ jsx(LuStrikethrough, { className: "h-4 w-4" })
4080
4194
  },
4081
4195
  "strike"
@@ -4089,7 +4203,7 @@ var Toolbar = ({
4089
4203
  {
4090
4204
  onClick: () => editor.chain().focus().toggleSubscript().run(),
4091
4205
  is_active: editor.isActive("subscript"),
4092
- tooltip: t4("rte.subscript"),
4206
+ tooltip: t("rte.subscript"),
4093
4207
  children: /* @__PURE__ */ jsx(LuSubscript, { className: "h-4 w-4" })
4094
4208
  },
4095
4209
  "sub"
@@ -4103,7 +4217,7 @@ var Toolbar = ({
4103
4217
  {
4104
4218
  onClick: () => editor.chain().focus().toggleSuperscript().run(),
4105
4219
  is_active: editor.isActive("superscript"),
4106
- tooltip: t4("rte.superscript"),
4220
+ tooltip: t("rte.superscript"),
4107
4221
  children: /* @__PURE__ */ jsx(LuSuperscript, { className: "h-4 w-4" })
4108
4222
  },
4109
4223
  "super"
@@ -4117,29 +4231,26 @@ var Toolbar = ({
4117
4231
  if (tb.link) {
4118
4232
  items.push(
4119
4233
  /* @__PURE__ */ jsxs(Popover, { open: link_popover_open, onOpenChange: set_link_popover_open, children: [
4120
- /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(ToolbarButton, { is_active: editor.isActive("link"), tooltip: t4("rte.link"), children: /* @__PURE__ */ jsx(LuLink, { className: "h-4 w-4" }) }) }),
4234
+ /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(ToolbarButton, { is_active: editor.isActive("link"), tooltip: t("rte.link"), children: /* @__PURE__ */ jsx(LuLink, { className: "h-4 w-4" }) }) }),
4121
4235
  /* @__PURE__ */ jsx(PopoverContent, { className: "w-80 p-3", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
4122
4236
  /* @__PURE__ */ jsx(
4123
4237
  Input,
4124
4238
  {
4125
4239
  value: link_url,
4126
4240
  onChange: (e) => set_link_url(e.target.value),
4127
- placeholder: "https://example.com",
4241
+ placeholder: t("rte.link_placeholder"),
4128
4242
  className: "h-8 text-sm"
4129
4243
  }
4130
4244
  ),
4131
4245
  /* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
4132
- /* @__PURE__ */ jsxs(Button, { size: "sm", onClick: handle_set_link, className: "flex-1", children: [
4133
- editor.isActive("link") ? "Update" : "Add",
4134
- " Link"
4135
- ] }),
4246
+ /* @__PURE__ */ jsx(Button, { size: "sm", onClick: handle_set_link, className: "flex-1", children: editor.isActive("link") ? t("rte.update_link") : t("rte.add_link") }),
4136
4247
  editor.isActive("link") && /* @__PURE__ */ jsx(
4137
4248
  Button,
4138
4249
  {
4139
4250
  size: "sm",
4140
4251
  variant: "destructive",
4141
4252
  onClick: handle_remove_link,
4142
- children: "Remove"
4253
+ children: t("rte.remove_link")
4143
4254
  }
4144
4255
  )
4145
4256
  ] })
@@ -4153,7 +4264,7 @@ var Toolbar = ({
4153
4264
  ToolbarButton,
4154
4265
  {
4155
4266
  onClick: () => editor.chain().focus().unsetAllMarks().clearNodes().run(),
4156
- tooltip: t4("rte.clear_formatting"),
4267
+ tooltip: t("rte.clear_formatting"),
4157
4268
  children: /* @__PURE__ */ jsx(LuRemoveFormatting, { className: "h-4 w-4" })
4158
4269
  },
4159
4270
  "clear"
@@ -4167,7 +4278,7 @@ var Toolbar = ({
4167
4278
  if (tb.text_color) {
4168
4279
  items.push(
4169
4280
  /* @__PURE__ */ jsxs(Popover, { open: text_color_open, onOpenChange: set_text_color_open, children: [
4170
- /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(ToolbarButton, { tooltip: t4("rte.text_color"), children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center", children: [
4281
+ /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(ToolbarButton, { tooltip: t("rte.text_color"), children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center", children: [
4171
4282
  /* @__PURE__ */ jsx(LuPalette, { className: "h-4 w-4" }),
4172
4283
  /* @__PURE__ */ jsx(
4173
4284
  "div",
@@ -4210,7 +4321,7 @@ var Toolbar = ({
4210
4321
  if (tb.highlight_color) {
4211
4322
  items.push(
4212
4323
  /* @__PURE__ */ jsxs(Popover, { open: highlight_color_open, onOpenChange: set_highlight_color_open, children: [
4213
- /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(ToolbarButton, { tooltip: t4("rte.highlight_color"), children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center", children: [
4324
+ /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(ToolbarButton, { tooltip: t("rte.highlight_color"), children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center", children: [
4214
4325
  /* @__PURE__ */ jsx(LuHighlighter, { className: "h-4 w-4" }),
4215
4326
  /* @__PURE__ */ jsx(
4216
4327
  "div",
@@ -4253,7 +4364,7 @@ var Toolbar = ({
4253
4364
  {
4254
4365
  onClick: () => editor.chain().focus().setTextAlign("left").run(),
4255
4366
  is_active: editor.isActive({ textAlign: "left" }),
4256
- tooltip: t4("rte.align_left"),
4367
+ tooltip: t("rte.align_left"),
4257
4368
  children: /* @__PURE__ */ jsx(LuAlignLeft, { className: "h-4 w-4" })
4258
4369
  },
4259
4370
  "align-left"
@@ -4263,7 +4374,7 @@ var Toolbar = ({
4263
4374
  {
4264
4375
  onClick: () => editor.chain().focus().setTextAlign("center").run(),
4265
4376
  is_active: editor.isActive({ textAlign: "center" }),
4266
- tooltip: t4("rte.align_center"),
4377
+ tooltip: t("rte.align_center"),
4267
4378
  children: /* @__PURE__ */ jsx(LuAlignCenter, { className: "h-4 w-4" })
4268
4379
  },
4269
4380
  "align-center"
@@ -4273,7 +4384,7 @@ var Toolbar = ({
4273
4384
  {
4274
4385
  onClick: () => editor.chain().focus().setTextAlign("right").run(),
4275
4386
  is_active: editor.isActive({ textAlign: "right" }),
4276
- tooltip: t4("rte.align_right"),
4387
+ tooltip: t("rte.align_right"),
4277
4388
  children: /* @__PURE__ */ jsx(LuAlignRight, { className: "h-4 w-4" })
4278
4389
  },
4279
4390
  "align-right"
@@ -4283,7 +4394,7 @@ var Toolbar = ({
4283
4394
  {
4284
4395
  onClick: () => editor.chain().focus().setTextAlign("justify").run(),
4285
4396
  is_active: editor.isActive({ textAlign: "justify" }),
4286
- tooltip: t4("rte.justify"),
4397
+ tooltip: t("rte.justify"),
4287
4398
  children: /* @__PURE__ */ jsx(LuAlignJustify, { className: "h-4 w-4" })
4288
4399
  },
4289
4400
  "align-justify"
@@ -4299,7 +4410,7 @@ var Toolbar = ({
4299
4410
  {
4300
4411
  onClick: () => editor.chain().focus().toggleBulletList().run(),
4301
4412
  is_active: editor.isActive("bulletList"),
4302
- tooltip: t4("rte.bullet_list"),
4413
+ tooltip: t("rte.bullet_list"),
4303
4414
  children: /* @__PURE__ */ jsx(LuList, { className: "h-4 w-4" })
4304
4415
  },
4305
4416
  "bullet"
@@ -4313,7 +4424,7 @@ var Toolbar = ({
4313
4424
  {
4314
4425
  onClick: () => editor.chain().focus().toggleOrderedList().run(),
4315
4426
  is_active: editor.isActive("orderedList"),
4316
- tooltip: t4("rte.ordered_list"),
4427
+ tooltip: t("rte.ordered_list"),
4317
4428
  children: /* @__PURE__ */ jsx(LuListOrdered, { className: "h-4 w-4" })
4318
4429
  },
4319
4430
  "ordered"
@@ -4327,7 +4438,7 @@ var Toolbar = ({
4327
4438
  {
4328
4439
  onClick: () => editor.chain().focus().toggleTaskList().run(),
4329
4440
  is_active: editor.isActive("taskList"),
4330
- tooltip: t4("rte.checklist"),
4441
+ tooltip: t("rte.checklist"),
4331
4442
  children: /* @__PURE__ */ jsx(LuListChecks, { className: "h-4 w-4" })
4332
4443
  },
4333
4444
  "task"
@@ -4349,7 +4460,7 @@ var Toolbar = ({
4349
4460
  }
4350
4461
  },
4351
4462
  disabled: !editor.can().liftListItem("listItem") && !editor.can().liftListItem("taskItem"),
4352
- tooltip: t4("rte.decrease_indent"),
4463
+ tooltip: t("rte.decrease_indent"),
4353
4464
  children: /* @__PURE__ */ jsx(LuIndentDecrease, { className: "h-4 w-4" })
4354
4465
  },
4355
4466
  "indent-dec"
@@ -4365,7 +4476,7 @@ var Toolbar = ({
4365
4476
  }
4366
4477
  },
4367
4478
  disabled: !editor.can().sinkListItem("listItem") && !editor.can().sinkListItem("taskItem"),
4368
- tooltip: t4("rte.increase_indent"),
4479
+ tooltip: t("rte.increase_indent"),
4369
4480
  children: /* @__PURE__ */ jsx(LuIndentIncrease, { className: "h-4 w-4" })
4370
4481
  },
4371
4482
  "indent-inc"
@@ -4376,7 +4487,7 @@ var Toolbar = ({
4376
4487
  const items = [];
4377
4488
  if (tb.horizontal_rule) {
4378
4489
  items.push(
4379
- /* @__PURE__ */ jsx(ToolbarButton, { onClick: handle_hr_insert, tooltip: t4("rte.horizontal_rule"), children: /* @__PURE__ */ jsx(RxDividerHorizontal, { className: "h-4 w-4" }) }, "hr")
4490
+ /* @__PURE__ */ jsx(ToolbarButton, { onClick: handle_hr_insert, tooltip: t("rte.horizontal_rule"), children: /* @__PURE__ */ jsx(RxDividerHorizontal, { className: "h-4 w-4" }) }, "hr")
4380
4491
  );
4381
4492
  }
4382
4493
  if (tb.image) {
@@ -4385,7 +4496,7 @@ var Toolbar = ({
4385
4496
  ToolbarButton,
4386
4497
  {
4387
4498
  onClick: () => image_input_ref.current?.click(),
4388
- tooltip: t4("rte.insert_image"),
4499
+ tooltip: t("rte.insert_image"),
4389
4500
  children: /* @__PURE__ */ jsx(LuImage, { className: "h-4 w-4" })
4390
4501
  },
4391
4502
  "image"
@@ -4399,14 +4510,14 @@ var Toolbar = ({
4399
4510
  ToolbarButton,
4400
4511
  {
4401
4512
  is_active: editor.isActive("table"),
4402
- tooltip: t4("rte.table"),
4513
+ tooltip: t("rte.table"),
4403
4514
  children: /* @__PURE__ */ jsx(LuTable, { className: "h-4 w-4" })
4404
4515
  }
4405
4516
  ) }),
4406
4517
  /* @__PURE__ */ jsx(PopoverContent, { className: "w-auto p-3", align: "start", children: editor.isActive("table") ? (
4407
4518
  // Table editing controls when inside a table
4408
4519
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
4409
- /* @__PURE__ */ jsx("div", { className: "text-xs font-medium mb-1", children: "Table Operations" }),
4520
+ /* @__PURE__ */ jsx("div", { className: "text-xs font-medium mb-1", children: t("rte.table_operations") }),
4410
4521
  /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-1", children: [
4411
4522
  /* @__PURE__ */ jsxs(
4412
4523
  Button,
@@ -4417,7 +4528,7 @@ var Toolbar = ({
4417
4528
  onClick: handle_add_row_before,
4418
4529
  children: [
4419
4530
  /* @__PURE__ */ jsx(LuTableRowsSplit, { className: "h-3 w-3 mr-1" }),
4420
- "Add row above"
4531
+ t("rte.add_row_above")
4421
4532
  ]
4422
4533
  }
4423
4534
  ),
@@ -4430,7 +4541,7 @@ var Toolbar = ({
4430
4541
  onClick: handle_add_row_after,
4431
4542
  children: [
4432
4543
  /* @__PURE__ */ jsx(LuTableRowsSplit, { className: "h-3 w-3 mr-1" }),
4433
- "Add row below"
4544
+ t("rte.add_row_below")
4434
4545
  ]
4435
4546
  }
4436
4547
  ),
@@ -4443,7 +4554,7 @@ var Toolbar = ({
4443
4554
  onClick: handle_add_col_before,
4444
4555
  children: [
4445
4556
  /* @__PURE__ */ jsx(LuTableColumnsSplit, { className: "h-3 w-3 mr-1" }),
4446
- "Add col left"
4557
+ t("rte.add_col_left")
4447
4558
  ]
4448
4559
  }
4449
4560
  ),
@@ -4456,7 +4567,7 @@ var Toolbar = ({
4456
4567
  onClick: handle_add_col_after,
4457
4568
  children: [
4458
4569
  /* @__PURE__ */ jsx(LuTableColumnsSplit, { className: "h-3 w-3 mr-1" }),
4459
- "Add col right"
4570
+ t("rte.add_col_right")
4460
4571
  ]
4461
4572
  }
4462
4573
  ),
@@ -4469,7 +4580,7 @@ var Toolbar = ({
4469
4580
  onClick: handle_delete_row,
4470
4581
  children: [
4471
4582
  /* @__PURE__ */ jsx(LuTrash2, { className: "h-3 w-3 mr-1" }),
4472
- "Delete row"
4583
+ t("rte.delete_row")
4473
4584
  ]
4474
4585
  }
4475
4586
  ),
@@ -4482,7 +4593,7 @@ var Toolbar = ({
4482
4593
  onClick: handle_delete_col,
4483
4594
  children: [
4484
4595
  /* @__PURE__ */ jsx(LuTrash2, { className: "h-3 w-3 mr-1" }),
4485
- "Delete col"
4596
+ t("rte.delete_col")
4486
4597
  ]
4487
4598
  }
4488
4599
  )
@@ -4496,7 +4607,7 @@ var Toolbar = ({
4496
4607
  onClick: handle_delete_table,
4497
4608
  children: [
4498
4609
  /* @__PURE__ */ jsx(LuTrash2, { className: "h-3 w-3 mr-1" }),
4499
- "Delete table"
4610
+ t("rte.delete_table")
4500
4611
  ]
4501
4612
  }
4502
4613
  )
@@ -4504,7 +4615,7 @@ var Toolbar = ({
4504
4615
  ) : (
4505
4616
  // Table size picker when not in a table
4506
4617
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
4507
- /* @__PURE__ */ jsx("div", { className: "text-xs font-medium mb-1", children: "Insert Table" }),
4618
+ /* @__PURE__ */ jsx("div", { className: "text-xs font-medium mb-1", children: t("rte.insert_table_heading") }),
4508
4619
  /* @__PURE__ */ jsx("div", { className: "grid gap-0.5", children: Array.from({ length: 6 }).map((_, row_idx) => /* @__PURE__ */ jsx("div", { className: "flex gap-0.5", children: Array.from({ length: 6 }).map((_2, col_idx) => /* @__PURE__ */ jsx(
4509
4620
  "div",
4510
4621
  {
@@ -4518,9 +4629,9 @@ var Toolbar = ({
4518
4629
  },
4519
4630
  col_idx
4520
4631
  )) }, row_idx)) }),
4521
- /* @__PURE__ */ jsx("div", { className: "text-xs text-center text-muted-foreground", children: hovered_cell ? `${hovered_cell.col} x ${hovered_cell.row}` : "Select size" }),
4632
+ /* @__PURE__ */ jsx("div", { className: "text-xs text-center text-muted-foreground", children: hovered_cell ? `${hovered_cell.col} x ${hovered_cell.row}` : t("rte.select_size") }),
4522
4633
  /* @__PURE__ */ jsxs("div", { className: "border-t pt-2 mt-1", children: [
4523
- /* @__PURE__ */ jsx("div", { className: "text-xs text-muted-foreground mb-2", children: "Custom size" }),
4634
+ /* @__PURE__ */ jsx("div", { className: "text-xs text-muted-foreground mb-2", children: t("rte.custom_size") }),
4524
4635
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
4525
4636
  /* @__PURE__ */ jsx(
4526
4637
  Input,
@@ -4553,7 +4664,7 @@ var Toolbar = ({
4553
4664
  onClick: () => handle_table_insert(table_rows, table_cols),
4554
4665
  children: [
4555
4666
  /* @__PURE__ */ jsx(LuGrid3X3, { className: "h-3 w-3 mr-1" }),
4556
- "Insert"
4667
+ t("rte.insert_table")
4557
4668
  ]
4558
4669
  }
4559
4670
  )
@@ -4571,11 +4682,11 @@ var Toolbar = ({
4571
4682
  if (tb.variables && variables.length > 0) {
4572
4683
  items.push(
4573
4684
  /* @__PURE__ */ jsxs(Popover, { open: variables_menu_open, onOpenChange: set_variables_menu_open, children: [
4574
- /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(ToolbarButton, { tooltip: t4("rte.insert_variable"), children: /* @__PURE__ */ jsx(LuVariable, { className: "h-4 w-4" }) }) }),
4685
+ /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(ToolbarButton, { tooltip: t("rte.insert_variable"), children: /* @__PURE__ */ jsx(LuVariable, { className: "h-4 w-4" }) }) }),
4575
4686
  /* @__PURE__ */ jsx(PopoverContent, { className: "w-64 p-0", align: "start", children: /* @__PURE__ */ jsxs(Command, { children: [
4576
- /* @__PURE__ */ jsx(CommandInput, { placeholder: "Search variables...", className: "h-8 text-xs" }),
4687
+ /* @__PURE__ */ jsx(CommandInput, { placeholder: t("rte.search_variables"), className: "h-8 text-xs" }),
4577
4688
  /* @__PURE__ */ jsxs(CommandList, { children: [
4578
- /* @__PURE__ */ jsx(CommandEmpty, { children: "No variables found." }),
4689
+ /* @__PURE__ */ jsx(CommandEmpty, { children: t("rte.no_variables") }),
4579
4690
  /* @__PURE__ */ jsx(CommandGroup, { children: variables.map((variable) => /* @__PURE__ */ jsx(
4580
4691
  CommandItem,
4581
4692
  {
@@ -4600,7 +4711,7 @@ var Toolbar = ({
4600
4711
  ToolbarButton,
4601
4712
  {
4602
4713
  onClick: () => file_input_ref.current?.click(),
4603
- tooltip: t4("rte.attach_file"),
4714
+ tooltip: t("rte.attach_file"),
4604
4715
  children: /* @__PURE__ */ jsx(LuPaperclip, { className: "h-4 w-4" })
4605
4716
  },
4606
4717
  "attach"
@@ -4888,7 +4999,7 @@ var HazoUiRte = ({
4888
4999
  attachments: initial_attachments = [],
4889
5000
  variables = [],
4890
5001
  on_change,
4891
- placeholder = "Start typing...",
5002
+ placeholder,
4892
5003
  min_height = "200px",
4893
5004
  max_height = "400px",
4894
5005
  disabled = false,
@@ -4897,6 +5008,8 @@ var HazoUiRte = ({
4897
5008
  toolbar,
4898
5009
  font_families
4899
5010
  }) => {
5011
+ const t = useHazoUiT();
5012
+ const resolved_placeholder = placeholder ?? t("rte.placeholder");
4900
5013
  const [attachments, set_attachments] = React27.useState(
4901
5014
  initial_attachments
4902
5015
  );
@@ -4946,7 +5059,7 @@ var HazoUiRte = ({
4946
5059
  }
4947
5060
  }),
4948
5061
  Placeholder.configure({
4949
- placeholder
5062
+ placeholder: resolved_placeholder
4950
5063
  }),
4951
5064
  HorizontalRule,
4952
5065
  Table.configure({
@@ -5090,9 +5203,9 @@ var HazoUiRte = ({
5090
5203
  }
5091
5204
  ),
5092
5205
  show_output_viewer && editor && /* @__PURE__ */ jsx("div", { className: "cls_rte_tabs border-b border-border px-2 pt-2", children: /* @__PURE__ */ jsx(Tabs, { value: active_tab, onValueChange: (v) => set_active_tab(v), children: /* @__PURE__ */ jsxs(TabsList, { className: "h-9", children: [
5093
- /* @__PURE__ */ jsx(TabsTrigger, { value: "html", className: "text-sm", children: "HTML" }),
5094
- /* @__PURE__ */ jsx(TabsTrigger, { value: "plain_text", className: "text-sm", children: "Plain Text" }),
5095
- /* @__PURE__ */ jsx(TabsTrigger, { value: "raw_html", className: "text-sm", children: "Raw HTML" })
5206
+ /* @__PURE__ */ jsx(TabsTrigger, { value: "html", className: "text-sm", children: t("rte.tab_html") }),
5207
+ /* @__PURE__ */ jsx(TabsTrigger, { value: "plain_text", className: "text-sm", children: t("rte.tab_plain_text") }),
5208
+ /* @__PURE__ */ jsx(TabsTrigger, { value: "raw_html", className: "text-sm", children: t("rte.tab_raw_html") })
5096
5209
  ] }) }) }),
5097
5210
  /* @__PURE__ */ jsxs("div", { style: { minHeight: min_height, maxHeight: max_height }, className: "overflow-auto", children: [
5098
5211
  active_tab === "html" && /* @__PURE__ */ jsx(
@@ -5105,8 +5218,8 @@ var HazoUiRte = ({
5105
5218
  )
5106
5219
  }
5107
5220
  ),
5108
- active_tab === "plain_text" && /* @__PURE__ */ jsx("pre", { className: "cls_rte_plain_text p-4 text-sm whitespace-pre-wrap font-mono h-full", children: editor?.getText() || "(empty)" }),
5109
- active_tab === "raw_html" && /* @__PURE__ */ jsx("pre", { className: "cls_rte_raw_html p-4 text-xs whitespace-pre-wrap font-mono text-muted-foreground h-full", children: format_html(editor?.getHTML() || "") || "(empty)" })
5221
+ active_tab === "plain_text" && /* @__PURE__ */ jsx("pre", { className: "cls_rte_plain_text p-4 text-sm whitespace-pre-wrap font-mono h-full", children: editor?.getText() || t("rte.empty_content") }),
5222
+ active_tab === "raw_html" && /* @__PURE__ */ jsx("pre", { className: "cls_rte_raw_html p-4 text-xs whitespace-pre-wrap font-mono text-muted-foreground h-full", children: format_html(editor?.getHTML() || "") || t("rte.empty_content") })
5110
5223
  ] }),
5111
5224
  /* @__PURE__ */ jsx(
5112
5225
  AttachmentsList,
@@ -5121,7 +5234,6 @@ var HazoUiRte = ({
5121
5234
  );
5122
5235
  };
5123
5236
  HazoUiRte.displayName = "HazoUiRte";
5124
- var t5 = createPackageT("hazo_ui", en_default);
5125
5237
  function CanvasTextToolbar({
5126
5238
  bold,
5127
5239
  italic,
@@ -5142,6 +5254,7 @@ function CanvasTextToolbar({
5142
5254
  className,
5143
5255
  style
5144
5256
  }) {
5257
+ const t = useHazoUiT();
5145
5258
  return /* @__PURE__ */ jsx(TooltipProvider, { delayDuration: 300, children: /* @__PURE__ */ jsxs(
5146
5259
  "div",
5147
5260
  {
@@ -5152,14 +5265,14 @@ function CanvasTextToolbar({
5152
5265
  ),
5153
5266
  style,
5154
5267
  children: [
5155
- /* @__PURE__ */ jsx(ToolbarButton, { is_active: bold, onClick: onBold, tooltip: t5("canvas_toolbar.bold"), children: /* @__PURE__ */ jsx(LuBold, { className: "h-4 w-4" }) }),
5156
- /* @__PURE__ */ jsx(ToolbarButton, { is_active: italic, onClick: onItalic, tooltip: t5("canvas_toolbar.italic"), children: /* @__PURE__ */ jsx(LuItalic, { className: "h-4 w-4" }) }),
5268
+ /* @__PURE__ */ jsx(ToolbarButton, { is_active: bold, onClick: onBold, tooltip: t("canvas_toolbar.bold"), children: /* @__PURE__ */ jsx(LuBold, { className: "h-4 w-4" }) }),
5269
+ /* @__PURE__ */ jsx(ToolbarButton, { is_active: italic, onClick: onItalic, tooltip: t("canvas_toolbar.italic"), children: /* @__PURE__ */ jsx(LuItalic, { className: "h-4 w-4" }) }),
5157
5270
  /* @__PURE__ */ jsx(
5158
5271
  ToolbarButton,
5159
5272
  {
5160
5273
  is_active: underline,
5161
5274
  onClick: onUnderline,
5162
- tooltip: t5("canvas_toolbar.underline"),
5275
+ tooltip: t("canvas_toolbar.underline"),
5163
5276
  children: /* @__PURE__ */ jsx(LuUnderline, { className: "h-4 w-4" })
5164
5277
  }
5165
5278
  ),
@@ -5169,7 +5282,7 @@ function CanvasTextToolbar({
5169
5282
  {
5170
5283
  is_active: align === "left",
5171
5284
  onClick: () => onAlign?.("left"),
5172
- tooltip: t5("canvas_toolbar.align_left"),
5285
+ tooltip: t("canvas_toolbar.align_left"),
5173
5286
  children: /* @__PURE__ */ jsx(LuAlignLeft, { className: "h-4 w-4" })
5174
5287
  }
5175
5288
  ),
@@ -5178,7 +5291,7 @@ function CanvasTextToolbar({
5178
5291
  {
5179
5292
  is_active: align === "center",
5180
5293
  onClick: () => onAlign?.("center"),
5181
- tooltip: t5("canvas_toolbar.align_center"),
5294
+ tooltip: t("canvas_toolbar.align_center"),
5182
5295
  children: /* @__PURE__ */ jsx(LuAlignCenter, { className: "h-4 w-4" })
5183
5296
  }
5184
5297
  ),
@@ -5187,7 +5300,7 @@ function CanvasTextToolbar({
5187
5300
  {
5188
5301
  is_active: align === "right",
5189
5302
  onClick: () => onAlign?.("right"),
5190
- tooltip: t5("canvas_toolbar.align_right"),
5303
+ tooltip: t("canvas_toolbar.align_right"),
5191
5304
  children: /* @__PURE__ */ jsx(LuAlignRight, { className: "h-4 w-4" })
5192
5305
  }
5193
5306
  ),
@@ -5196,7 +5309,7 @@ function CanvasTextToolbar({
5196
5309
  "label",
5197
5310
  {
5198
5311
  className: "relative flex h-8 w-8 cursor-pointer items-center justify-center rounded-md hover:bg-accent",
5199
- title: t5("canvas_toolbar.text_color"),
5312
+ title: t("canvas_toolbar.text_color"),
5200
5313
  children: [
5201
5314
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center", children: [
5202
5315
  /* @__PURE__ */ jsx("span", { className: "text-xs font-bold text-muted-foreground", children: "A" }),
@@ -5226,7 +5339,7 @@ function CanvasTextToolbar({
5226
5339
  {
5227
5340
  is_active: verticalAlign === "top",
5228
5341
  onClick: () => onVerticalAlign?.("top"),
5229
- tooltip: t5("canvas_toolbar.align_top"),
5342
+ tooltip: t("canvas_toolbar.align_top"),
5230
5343
  children: /* @__PURE__ */ jsx(LuAlignVerticalJustifyStart, { className: "h-4 w-4" })
5231
5344
  }
5232
5345
  ),
@@ -5235,7 +5348,7 @@ function CanvasTextToolbar({
5235
5348
  {
5236
5349
  is_active: verticalAlign === "middle",
5237
5350
  onClick: () => onVerticalAlign?.("middle"),
5238
- tooltip: t5("canvas_toolbar.align_middle"),
5351
+ tooltip: t("canvas_toolbar.align_middle"),
5239
5352
  children: /* @__PURE__ */ jsx(LuAlignVerticalJustifyCenter, { className: "h-4 w-4" })
5240
5353
  }
5241
5354
  ),
@@ -5244,7 +5357,7 @@ function CanvasTextToolbar({
5244
5357
  {
5245
5358
  is_active: verticalAlign === "bottom",
5246
5359
  onClick: () => onVerticalAlign?.("bottom"),
5247
- tooltip: t5("canvas_toolbar.align_bottom"),
5360
+ tooltip: t("canvas_toolbar.align_bottom"),
5248
5361
  children: /* @__PURE__ */ jsx(LuAlignVerticalJustifyEnd, { className: "h-4 w-4" })
5249
5362
  }
5250
5363
  ),
@@ -5255,11 +5368,11 @@ function CanvasTextToolbar({
5255
5368
  value: font,
5256
5369
  onChange: (e) => onFont?.(e.target.value),
5257
5370
  className: "h-8 text-xs rounded-md border border-border bg-background px-1 text-foreground focus:outline-none",
5258
- title: t5("canvas_toolbar.font_family"),
5371
+ title: t("canvas_toolbar.font_family"),
5259
5372
  children: [
5260
- /* @__PURE__ */ jsx("option", { value: "sans-serif", children: "Sans" }),
5261
- /* @__PURE__ */ jsx("option", { value: "serif", children: "Serif" }),
5262
- /* @__PURE__ */ jsx("option", { value: "monospace", children: "Mono" }),
5373
+ /* @__PURE__ */ jsx("option", { value: "sans-serif", children: t("canvas_toolbar.font_sans") }),
5374
+ /* @__PURE__ */ jsx("option", { value: "serif", children: t("canvas_toolbar.font_serif") }),
5375
+ /* @__PURE__ */ jsx("option", { value: "monospace", children: t("canvas_toolbar.font_mono") }),
5263
5376
  /* @__PURE__ */ jsx("option", { value: "Arial", children: "Arial" }),
5264
5377
  /* @__PURE__ */ jsx("option", { value: "Georgia", children: "Georgia" }),
5265
5378
  /* @__PURE__ */ jsx("option", { value: "Courier New", children: "Courier" })
@@ -5267,12 +5380,11 @@ function CanvasTextToolbar({
5267
5380
  }
5268
5381
  ),
5269
5382
  /* @__PURE__ */ jsx("div", { className: "mx-1 h-6 w-px bg-border" }),
5270
- /* @__PURE__ */ jsx(ToolbarButton, { is_active: bullet, onClick: onBullet, tooltip: t5("canvas_toolbar.bullet_list"), children: /* @__PURE__ */ jsx(LuList, { className: "h-4 w-4" }) })
5383
+ /* @__PURE__ */ jsx(ToolbarButton, { is_active: bullet, onClick: onBullet, tooltip: t("canvas_toolbar.bullet_list"), children: /* @__PURE__ */ jsx(LuList, { className: "h-4 w-4" }) })
5271
5384
  ]
5272
5385
  }
5273
5386
  ) });
5274
5387
  }
5275
- var t6 = createPackageT("hazo_ui", en_default);
5276
5388
  var MdEditorLazy = lazy(() => import('@uiw/react-md-editor'));
5277
5389
  var EDITOR_TEXTAREA_SELECTOR = ".w-md-editor-text-input";
5278
5390
  function MarkdownEditor({
@@ -5289,6 +5401,7 @@ function MarkdownEditor({
5289
5401
  renderPreview,
5290
5402
  showPreview = true
5291
5403
  }) {
5404
+ const t = useHazoUiT();
5292
5405
  const [mounted, setMounted] = useState(false);
5293
5406
  useEffect(() => setMounted(true), []);
5294
5407
  const valueRef = useRef(value);
@@ -5356,19 +5469,19 @@ function MarkdownEditor({
5356
5469
  const current = valueRef.current;
5357
5470
  const before = current.slice(0, start);
5358
5471
  const after = current.slice(end);
5359
- onChange(before + "![uploading\u2026]()" + after);
5472
+ onChange(before + "![" + t("markdown.upload_placeholder") + "]()" + after);
5360
5473
  setUploading(true);
5361
5474
  setError("");
5362
5475
  try {
5363
5476
  const url = await onImageUpload(file);
5364
5477
  if (!url) {
5365
- setError(t6("markdown.upload_failed"));
5478
+ setError(t("markdown.upload_failed"));
5366
5479
  onChange(before + after);
5367
5480
  return;
5368
5481
  }
5369
5482
  onChange(before + `![](${url})` + after);
5370
5483
  } catch {
5371
- setError(t6("markdown.upload_failed"));
5484
+ setError(t("markdown.upload_failed"));
5372
5485
  onChange(before + after);
5373
5486
  } finally {
5374
5487
  setUploading(false);
@@ -5392,7 +5505,7 @@ function MarkdownEditor({
5392
5505
  {
5393
5506
  className: "flex items-center justify-center rounded-md border border-border bg-muted/30 text-sm text-muted-foreground",
5394
5507
  style: { height },
5395
- children: t6("markdown.loading_editor")
5508
+ children: t("markdown.loading_editor")
5396
5509
  }
5397
5510
  ),
5398
5511
  children: /* @__PURE__ */ jsx(
@@ -5404,7 +5517,7 @@ function MarkdownEditor({
5404
5517
  preview: effectivePreview,
5405
5518
  visibleDragbar: false,
5406
5519
  commands: editorCommands,
5407
- textareaProps: { placeholder: placeholder ?? t6("markdown.placeholder"), onPaste: handlePaste }
5520
+ textareaProps: { placeholder: placeholder ?? t("markdown.placeholder"), onPaste: handlePaste }
5408
5521
  }
5409
5522
  )
5410
5523
  }
@@ -5413,7 +5526,7 @@ function MarkdownEditor({
5413
5526
  {
5414
5527
  className: "flex items-center justify-center rounded-md border border-border bg-muted/30 text-sm text-muted-foreground",
5415
5528
  style: { height },
5416
- children: t6("markdown.loading_editor")
5529
+ children: t("markdown.loading_editor")
5417
5530
  }
5418
5531
  ) }),
5419
5532
  useCustomPreview && showPreview && /* @__PURE__ */ jsx(
@@ -5427,7 +5540,7 @@ function MarkdownEditor({
5427
5540
  ]
5428
5541
  }
5429
5542
  ),
5430
- uploading && /* @__PURE__ */ jsx("p", { className: "mt-2 text-xs text-muted-foreground", children: t6("markdown.uploading_image") }),
5543
+ uploading && /* @__PURE__ */ jsx("p", { className: "mt-2 text-xs text-muted-foreground", children: t("markdown.uploading_image") }),
5431
5544
  error && /* @__PURE__ */ jsx("p", { className: "mt-2 text-xs text-destructive", children: error })
5432
5545
  ] });
5433
5546
  }
@@ -6163,7 +6276,7 @@ var HazoUiTextbox = ({
6163
6276
  value,
6164
6277
  default_value,
6165
6278
  prefixes,
6166
- placeholder = "Type here...",
6279
+ placeholder,
6167
6280
  disabled = false,
6168
6281
  className,
6169
6282
  pill_variant = "default",
@@ -6174,6 +6287,8 @@ var HazoUiTextbox = ({
6174
6287
  on_command_change,
6175
6288
  on_command_remove
6176
6289
  }) => {
6290
+ const t = useHazoUiT();
6291
+ const resolved_placeholder = placeholder ?? t("textbox.placeholder");
6177
6292
  const generated_instance_id = React27.useId();
6178
6293
  const instance_id = provided_instance_id || generated_instance_id;
6179
6294
  const [suggestion_state, set_suggestion_state] = React27.useState(null);
@@ -6206,7 +6321,7 @@ var HazoUiTextbox = ({
6206
6321
  index_default2,
6207
6322
  index_default3,
6208
6323
  Placeholder.configure({
6209
- placeholder
6324
+ placeholder: resolved_placeholder
6210
6325
  }),
6211
6326
  CommandNodeExtension.configure({}),
6212
6327
  ...suggestion_extensions
@@ -6585,7 +6700,7 @@ var HazoUiTextbox = ({
6585
6700
  edit_selected_index === edit_commands.length && "bg-destructive/10"
6586
6701
  ),
6587
6702
  onClick: handle_command_remove,
6588
- children: /* @__PURE__ */ jsx("span", { children: "Remove" })
6703
+ children: /* @__PURE__ */ jsx("span", { children: t("common.remove") })
6589
6704
  }
6590
6705
  )
6591
6706
  ] })
@@ -6717,7 +6832,7 @@ var HazoUiTextarea = ({
6717
6832
  value,
6718
6833
  default_value,
6719
6834
  prefixes,
6720
- placeholder = "Type here...",
6835
+ placeholder,
6721
6836
  disabled = false,
6722
6837
  className,
6723
6838
  pill_variant = "default",
@@ -6731,6 +6846,8 @@ var HazoUiTextarea = ({
6731
6846
  on_command_change,
6732
6847
  on_command_remove
6733
6848
  }) => {
6849
+ const t = useHazoUiT();
6850
+ const resolved_placeholder = placeholder ?? t("textarea.placeholder");
6734
6851
  const generated_instance_id = React27.useId();
6735
6852
  const instance_id = provided_instance_id || generated_instance_id;
6736
6853
  const [suggestion_state, set_suggestion_state] = React27.useState(null);
@@ -6765,7 +6882,7 @@ var HazoUiTextarea = ({
6765
6882
  index_default3,
6766
6883
  index_default4,
6767
6884
  Placeholder.configure({
6768
- placeholder
6885
+ placeholder: resolved_placeholder
6769
6886
  }),
6770
6887
  CommandNodeExtension.configure({}),
6771
6888
  ...suggestion_extensions
@@ -7155,7 +7272,7 @@ var HazoUiTextarea = ({
7155
7272
  backgroundColor: edit_selected_index === edit_commands.length ? "rgba(239, 68, 68, 0.1)" : "inherit"
7156
7273
  },
7157
7274
  onClick: handle_command_remove,
7158
- children: /* @__PURE__ */ jsx("span", { children: "Remove" })
7275
+ children: /* @__PURE__ */ jsx("span", { children: t("common.remove") })
7159
7276
  }
7160
7277
  )
7161
7278
  ] })
@@ -7215,7 +7332,6 @@ function resolve_animation_classes(open_anim = "zoom", close_anim = "zoom") {
7215
7332
  const close_classes = close_anim in ANIMATION_PRESETS ? ANIMATION_PRESETS[close_anim].close : close_anim;
7216
7333
  return `${open_classes} ${close_classes}`;
7217
7334
  }
7218
- var t7 = createPackageT("hazo_ui", en_default);
7219
7335
  var VARIANT_PRESETS = {
7220
7336
  info: {
7221
7337
  header_background_color: "var(--dialog-info-bg)",
@@ -7302,6 +7418,7 @@ function HazoUiDialog({
7302
7418
  showCloseButton = true,
7303
7419
  kind
7304
7420
  }) {
7421
+ const t = useHazoUiT();
7305
7422
  const config = get_hazo_ui_config();
7306
7423
  const is_confirm_kind = kind === "confirm";
7307
7424
  const is_status_kind = kind === "status";
@@ -7309,11 +7426,11 @@ function HazoUiDialog({
7309
7426
  const cancel_ref = React27.useRef(null);
7310
7427
  const variant_preset = variant !== "default" ? VARIANT_PRESETS[variant] : is_status_kind || is_confirm_kind ? NEUTRAL_VARIANT_PRESET : void 0;
7311
7428
  const resolved_action_button_variant = actionButtonVariant ?? variant_preset?.action_button_variant ?? "default";
7312
- const resolved_title = title ?? t7("dialog.default_title");
7313
- const resolved_cancel_text = cancelButtonText ?? t7("dialog.cancel");
7429
+ const resolved_title = title ?? t("dialog.default_title");
7430
+ const resolved_cancel_text = cancelButtonText ?? t("dialog.cancel");
7314
7431
  const showCancelButton = showCancelButtonProp ?? (is_status_kind ? false : true);
7315
7432
  const closeOnConfirm = closeOnConfirmProp ?? (is_status_kind || is_confirm_kind ? true : false);
7316
- const actionButtonText = actionButtonTextProp ?? (is_status_kind ? t7("dialog.ok") : is_confirm_kind ? showCancelButton ? t7("dialog.confirm") : t7("dialog.ok") : t7("dialog.confirm"));
7433
+ const actionButtonText = actionButtonTextProp ?? (is_status_kind ? t("dialog.ok") : is_confirm_kind ? showCancelButton ? t("dialog.confirm") : t("dialog.ok") : t("dialog.confirm"));
7317
7434
  const actionButtonLoading = actionButtonLoadingProp ?? (is_confirm_kind ? internal_confirm_loading : false);
7318
7435
  const handleConfirm = () => {
7319
7436
  if (is_confirm_kind) {
@@ -7640,7 +7757,7 @@ function HazoUiDialog({
7640
7757
  style: headerBar ? { color: "var(--dialog-header-bar-fg)" } : finalHeaderTextColor ? { color: finalHeaderTextColor } : void 0,
7641
7758
  children: [
7642
7759
  /* @__PURE__ */ jsx(X, { className: "h-4 w-4" }),
7643
- /* @__PURE__ */ jsx("span", { className: "sr-only", children: t7("dialog.close") })
7760
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: t("dialog.close") })
7644
7761
  ]
7645
7762
  }
7646
7763
  )
@@ -7649,7 +7766,6 @@ function HazoUiDialog({
7649
7766
  )
7650
7767
  ] }) });
7651
7768
  }
7652
- var t8 = createPackageT("hazo_ui", en_default);
7653
7769
  function HazoUiConfirmDialog({
7654
7770
  open,
7655
7771
  onOpenChange,
@@ -7658,7 +7774,7 @@ function HazoUiConfirmDialog({
7658
7774
  children,
7659
7775
  variant = "default",
7660
7776
  confirmLabel,
7661
- cancelLabel = t8("confirm.cancel"),
7777
+ cancelLabel: cancelLabelProp,
7662
7778
  showCancelButton = true,
7663
7779
  onConfirm,
7664
7780
  onCancel,
@@ -7669,6 +7785,8 @@ function HazoUiConfirmDialog({
7669
7785
  openAnimation = "zoom",
7670
7786
  closeAnimation = "zoom"
7671
7787
  }) {
7788
+ const t = useHazoUiT();
7789
+ const cancelLabel = cancelLabelProp ?? t("confirm.cancel");
7672
7790
  const resolved_accent_color = confirmButtonColor ?? accentColor;
7673
7791
  return /* @__PURE__ */ jsx(
7674
7792
  HazoUiDialog,
@@ -7707,7 +7825,6 @@ var Slider = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
7707
7825
  }
7708
7826
  ));
7709
7827
  Slider.displayName = SliderPrimitive.Root.displayName;
7710
- var t9 = createPackageT("hazo_ui", en_default);
7711
7828
  async function getCroppedImg(imageSrc, areaPixels, outputSize, quality) {
7712
7829
  const img = await new Promise((resolve, reject) => {
7713
7830
  const image = new Image();
@@ -7756,12 +7873,13 @@ var HazoUiImageCropper = React27.forwardRef(function HazoUiImageCropper2({
7756
7873
  zoomLabel,
7757
7874
  className
7758
7875
  }, ref) {
7876
+ const t = useHazoUiT();
7759
7877
  const [crop, set_crop] = React27.useState({
7760
7878
  x: 0,
7761
7879
  y: 0
7762
7880
  });
7763
7881
  const [zoom, set_zoom] = React27.useState(1);
7764
- const resolved_zoom_label = zoomLabel ?? t9("cropper.zoom");
7882
+ const resolved_zoom_label = zoomLabel ?? t("cropper.zoom");
7765
7883
  const cropped_area_pixels_ref = React27.useRef(null);
7766
7884
  const handle_crop_complete = React27.useCallback(
7767
7885
  (_croppedArea, croppedAreaPixels) => {
@@ -7836,7 +7954,6 @@ var HazoUiImageCropper = React27.forwardRef(function HazoUiImageCropper2({
7836
7954
  ] });
7837
7955
  });
7838
7956
  HazoUiImageCropper.displayName = "HazoUiImageCropper";
7839
- var t10 = createPackageT("hazo_ui", en_default);
7840
7957
  function HazoUiImageCropperDialog({
7841
7958
  open,
7842
7959
  onOpenChange,
@@ -7850,10 +7967,11 @@ function HazoUiImageCropperDialog({
7850
7967
  outputSize = 512,
7851
7968
  quality = 0.9
7852
7969
  }) {
7853
- const resolved_title = title ?? t10("cropper.title");
7854
- const resolved_confirm_label = confirmLabel ?? t10("cropper.save");
7855
- const resolved_cancel_label = cancelLabel ?? t10("cropper.cancel");
7856
- const resolved_zoom_label = zoomLabel ?? t10("cropper.zoom");
7970
+ const t = useHazoUiT();
7971
+ const resolved_title = title ?? t("cropper.title");
7972
+ const resolved_confirm_label = confirmLabel ?? t("cropper.save");
7973
+ const resolved_cancel_label = cancelLabel ?? t("cropper.cancel");
7974
+ const resolved_zoom_label = zoomLabel ?? t("cropper.zoom");
7857
7975
  const cropper_ref = React27.useRef(null);
7858
7976
  const [image_src, set_image_src] = React27.useState(null);
7859
7977
  const [is_confirming, set_is_confirming] = React27.useState(false);
@@ -8340,14 +8458,15 @@ var CardFooter = React27.forwardRef(
8340
8458
  );
8341
8459
  CardFooter.displayName = "CardFooter";
8342
8460
  function Spinner({ className, size = "md" }) {
8461
+ const t = useHazoUiT();
8343
8462
  const sizeClasses = { sm: "h-4 w-4", md: "h-8 w-8", lg: "h-12 w-12" };
8344
8463
  return /* @__PURE__ */ jsx(
8345
8464
  "div",
8346
8465
  {
8347
8466
  className: cn("animate-spin rounded-full border-2 border-current border-t-transparent text-primary", sizeClasses[size], className),
8348
8467
  role: "status",
8349
- "aria-label": "Loading",
8350
- children: /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Loading..." })
8468
+ "aria-label": t("spinner.loading"),
8469
+ children: /* @__PURE__ */ jsx("span", { className: "sr-only", children: t("spinner.loading_text") })
8351
8470
  }
8352
8471
  );
8353
8472
  }
@@ -8524,18 +8643,20 @@ function SkeletonRect({ width = "100%", height = 96, radius = 6, className }) {
8524
8643
  }
8525
8644
  );
8526
8645
  }
8527
- function SkeletonGroup({ label = "Loading content", children, className, ...rest }) {
8646
+ function SkeletonGroup({ label, children, className, ...rest }) {
8647
+ const t = useHazoUiT();
8648
+ const resolved_label = label ?? t("skeleton.loading_content");
8528
8649
  return /* @__PURE__ */ jsxs(
8529
8650
  "div",
8530
8651
  {
8531
8652
  role: "status",
8532
8653
  "aria-busy": "true",
8533
- "aria-label": label,
8654
+ "aria-label": resolved_label,
8534
8655
  className: cn("space-y-2", className),
8535
8656
  ...rest,
8536
8657
  children: [
8537
8658
  children,
8538
- /* @__PURE__ */ jsx("span", { className: "sr-only", children: label })
8659
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: resolved_label })
8539
8660
  ]
8540
8661
  }
8541
8662
  );
@@ -8570,7 +8691,6 @@ function EmptyState({
8570
8691
  }
8571
8692
  );
8572
8693
  }
8573
- var t11 = createPackageT("hazo_ui", en_default);
8574
8694
  function ErrorBanner({
8575
8695
  severity = "error",
8576
8696
  title,
@@ -8580,6 +8700,7 @@ function ErrorBanner({
8580
8700
  onDismiss,
8581
8701
  className
8582
8702
  }) {
8703
+ const t = useHazoUiT();
8583
8704
  const palette = severity === "warning" ? "border-amber-300 bg-amber-50 text-amber-900 dark:border-amber-700 dark:bg-amber-950 dark:text-amber-100" : "border-destructive/40 bg-destructive/10 text-destructive-foreground";
8584
8705
  const iconColor = severity === "warning" ? "text-amber-600" : "text-destructive";
8585
8706
  const resolvedIcon = icon ?? (severity === "warning" ? /* @__PURE__ */ jsx(AlertTriangle, { className: cn("h-5 w-5", iconColor), "aria-hidden": "true" }) : /* @__PURE__ */ jsx(OctagonAlert, { className: cn("h-5 w-5", iconColor), "aria-hidden": "true" }));
@@ -8605,7 +8726,7 @@ function ErrorBanner({
8605
8726
  {
8606
8727
  type: "button",
8607
8728
  onClick: onDismiss,
8608
- "aria-label": t11("error.dismiss"),
8729
+ "aria-label": t("error.dismiss"),
8609
8730
  className: "flex-shrink-0 rounded p-1 hover:bg-black/5 focus:outline-none focus:ring-2 focus:ring-offset-2 dark:hover:bg-white/5",
8610
8731
  children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4", "aria-hidden": "true" })
8611
8732
  }
@@ -8614,9 +8735,8 @@ function ErrorBanner({
8614
8735
  }
8615
8736
  );
8616
8737
  }
8617
- var t12 = createPackageT("hazo_ui", en_default);
8618
8738
  function ErrorPage({
8619
- title = t12("error.something_went_wrong"),
8739
+ title,
8620
8740
  description,
8621
8741
  errorCode,
8622
8742
  correlationId,
@@ -8624,6 +8744,8 @@ function ErrorPage({
8624
8744
  illustration,
8625
8745
  className
8626
8746
  }) {
8747
+ const t = useHazoUiT();
8748
+ const resolved_title = title ?? t("error.something_went_wrong");
8627
8749
  return /* @__PURE__ */ jsxs(
8628
8750
  "div",
8629
8751
  {
@@ -8636,10 +8758,10 @@ function ErrorPage({
8636
8758
  children: [
8637
8759
  /* @__PURE__ */ jsx("div", { className: "text-destructive", children: illustration ?? /* @__PURE__ */ jsx(OctagonAlert, { className: "h-16 w-16", "aria-hidden": "true" }) }),
8638
8760
  errorCode ? /* @__PURE__ */ jsx("div", { className: "rounded-full bg-muted px-3 py-1 text-xs font-mono uppercase tracking-wider text-muted-foreground", children: errorCode }) : null,
8639
- /* @__PURE__ */ jsx("h1", { className: "text-2xl font-semibold text-foreground", children: title }),
8761
+ /* @__PURE__ */ jsx("h1", { className: "text-2xl font-semibold text-foreground", children: resolved_title }),
8640
8762
  description ? /* @__PURE__ */ jsx("div", { className: "text-sm text-muted-foreground", children: description }) : null,
8641
8763
  correlationId ? /* @__PURE__ */ jsxs("div", { className: "w-full rounded-md border bg-muted/40 px-3 py-2 text-left", children: [
8642
- /* @__PURE__ */ jsx("div", { className: "text-[10px] uppercase tracking-wider text-muted-foreground", children: "Correlation ID" }),
8764
+ /* @__PURE__ */ jsx("div", { className: "text-[10px] uppercase tracking-wider text-muted-foreground", children: t("error.correlation_id") }),
8643
8765
  /* @__PURE__ */ jsx("code", { className: "break-all text-xs", children: correlationId })
8644
8766
  ] }) : null,
8645
8767
  actions ? /* @__PURE__ */ jsx("div", { className: "mt-2 flex flex-wrap items-center justify-center gap-2", children: actions }) : null
@@ -8647,16 +8769,17 @@ function ErrorPage({
8647
8769
  }
8648
8770
  );
8649
8771
  }
8650
- var t13 = createPackageT("hazo_ui", en_default);
8651
8772
  function LoadingTimeout({
8652
8773
  active,
8653
8774
  children,
8654
8775
  skeleton,
8655
8776
  onRetry,
8656
8777
  thresholds,
8657
- label = "content",
8778
+ label,
8658
8779
  className
8659
8780
  }) {
8781
+ const t = useHazoUiT();
8782
+ const resolved_label = label ?? t("loading.default_label");
8660
8783
  const timeouts = {
8661
8784
  gentle: thresholds?.gentle ?? 5e3,
8662
8785
  firm: thresholds?.firm ?? 15e3,
@@ -8686,15 +8809,15 @@ function LoadingTimeout({
8686
8809
  ErrorBanner,
8687
8810
  {
8688
8811
  severity: "error",
8689
- title: t13("loading.taking_longer"),
8690
- message: `We're still trying to load the ${label}. The connection may be slow.`,
8812
+ title: t("loading.taking_longer"),
8813
+ message: t("loading.still_loading", { label: resolved_label }),
8691
8814
  action: onRetry ? /* @__PURE__ */ jsx(
8692
8815
  "button",
8693
8816
  {
8694
8817
  type: "button",
8695
8818
  onClick: onRetry,
8696
8819
  className: "rounded bg-foreground/10 px-3 py-1.5 text-sm font-medium hover:bg-foreground/15",
8697
- children: "Try again"
8820
+ children: t("loading.try_again")
8698
8821
  }
8699
8822
  ) : null
8700
8823
  }
@@ -8702,12 +8825,8 @@ function LoadingTimeout({
8702
8825
  }
8703
8826
  return /* @__PURE__ */ jsxs("div", { className, role: "status", "aria-busy": "true", "aria-live": "polite", children: [
8704
8827
  skeleton,
8705
- phase === "gentle" ? /* @__PURE__ */ jsxs("div", { className: "mt-3 text-center text-sm text-muted-foreground", children: [
8706
- "Loading ",
8707
- label,
8708
- "\u2026"
8709
- ] }) : null,
8710
- phase === "firm" ? /* @__PURE__ */ jsx("div", { className: "mt-3 text-center text-sm text-muted-foreground", children: "Still working on it \u2014 almost there." }) : null
8828
+ phase === "gentle" ? /* @__PURE__ */ jsx("div", { className: "mt-3 text-center text-sm text-muted-foreground", children: t("loading.gentle_message", { label: resolved_label }) }) : null,
8829
+ phase === "firm" ? /* @__PURE__ */ jsx("div", { className: "mt-3 text-center text-sm text-muted-foreground", children: t("loading.firm_message") }) : null
8711
8830
  ] });
8712
8831
  }
8713
8832
  function ProgressiveImage({
@@ -8768,13 +8887,14 @@ function NotificationCountBadge({
8768
8887
  max = 9,
8769
8888
  className
8770
8889
  }) {
8890
+ const t = useHazoUiT();
8771
8891
  if (count <= 0) return null;
8772
8892
  const isOverflow = count > max;
8773
8893
  const label = isOverflow ? `${max}+` : String(count);
8774
8894
  return /* @__PURE__ */ jsx(
8775
8895
  "span",
8776
8896
  {
8777
- "aria-label": `${count} unread`,
8897
+ "aria-label": t("notification.unread_count", { count }),
8778
8898
  className: cn(
8779
8899
  "cls_notification_count_badge",
8780
8900
  "inline-flex items-center justify-center",
@@ -8788,7 +8908,6 @@ function NotificationCountBadge({
8788
8908
  }
8789
8909
  );
8790
8910
  }
8791
- var t14 = createPackageT("hazo_ui", en_default);
8792
8911
  function NotificationItem({
8793
8912
  isRead,
8794
8913
  timestamp,
@@ -8799,6 +8918,7 @@ function NotificationItem({
8799
8918
  onMarkRead,
8800
8919
  markReadLabel
8801
8920
  }) {
8921
+ const t = useHazoUiT();
8802
8922
  const handleMarkRead = (e) => {
8803
8923
  e.stopPropagation();
8804
8924
  onMarkRead?.();
@@ -8819,7 +8939,7 @@ function NotificationItem({
8819
8939
  /* @__PURE__ */ jsx("div", { className: "cls_notification_item_dot_col flex-shrink-0 pt-1.5", children: !isRead ? /* @__PURE__ */ jsx(
8820
8940
  "span",
8821
8941
  {
8822
- "aria-label": t14("notification.unread"),
8942
+ "aria-label": t("notification.unread"),
8823
8943
  className: "cls_notification_item_dot block w-2 h-2 rounded-full bg-primary"
8824
8944
  }
8825
8945
  ) : /* @__PURE__ */ jsx("span", { className: "block w-2 h-2", "aria-hidden": "true" }) }),
@@ -8843,13 +8963,13 @@ function NotificationItem({
8843
8963
  }
8844
8964
  );
8845
8965
  }
8846
- var t15 = createPackageT("hazo_ui", en_default);
8847
8966
  function LoadingSkeletons() {
8967
+ const t = useHazoUiT();
8848
8968
  return /* @__PURE__ */ jsx(
8849
8969
  "div",
8850
8970
  {
8851
8971
  "aria-busy": "true",
8852
- "aria-label": t15("notification.loading"),
8972
+ "aria-label": t("notification.loading"),
8853
8973
  className: "cls_notification_panel_loading space-y-0",
8854
8974
  children: [0, 1, 2].map((i) => /* @__PURE__ */ jsxs(
8855
8975
  "div",
@@ -8908,7 +9028,6 @@ function NotificationPanel({
8908
9028
  }
8909
9029
  );
8910
9030
  }
8911
- var t16 = createPackageT("hazo_ui", en_default);
8912
9031
  function HazoUiToaster({
8913
9032
  position = "bottom-right",
8914
9033
  closeButton = true,
@@ -8952,14 +9071,17 @@ function permissionToast({
8952
9071
  missingPermissions,
8953
9072
  descriptions,
8954
9073
  action,
8955
- duration = 5e3
9074
+ duration = 5e3,
9075
+ t = defaultHazoUiT
8956
9076
  }) {
8957
- const description = missingPermissions.length === 0 ? t16("toast.permission_denied_message") : `Missing: ${missingPermissions.map((key) => {
8958
- const label = descriptions?.[key];
8959
- return label ? `\`${key}\` \u2014 ${label}` : `\`${key}\``;
8960
- }).join("; ")}`;
9077
+ const description = missingPermissions.length === 0 ? t("toast.permission_denied_message") : t("toast.missing_prefix", {
9078
+ items: missingPermissions.map((key) => {
9079
+ const label = descriptions?.[key];
9080
+ return label ? `\`${key}\` \u2014 ${label}` : `\`${key}\``;
9081
+ }).join("; ")
9082
+ });
8961
9083
  return errorToast({
8962
- title: t16("toast.permission_required"),
9084
+ title: t("toast.permission_required"),
8963
9085
  description,
8964
9086
  action,
8965
9087
  duration
@@ -9225,6 +9347,7 @@ function KanbanCard({
9225
9347
  showEdit = false,
9226
9348
  onEditRequest
9227
9349
  }) {
9350
+ const t = useHazoUiT();
9228
9351
  const {
9229
9352
  attributes,
9230
9353
  listeners,
@@ -9278,7 +9401,7 @@ function KanbanCard({
9278
9401
  ...listeners,
9279
9402
  role: "button",
9280
9403
  tabIndex: 0,
9281
- "aria-roledescription": "draggable card",
9404
+ "aria-roledescription": t("kanban.draggable_card"),
9282
9405
  "aria-grabbed": isDragging,
9283
9406
  onDoubleClick: () => {
9284
9407
  if (showEdit && onEditRequest && !dragging) onEditRequest(item);
@@ -9295,7 +9418,7 @@ function KanbanCard({
9295
9418
  e.stopPropagation();
9296
9419
  onEditRequest(item);
9297
9420
  },
9298
- "aria-label": `Edit ${item.id}`,
9421
+ "aria-label": t("kanban.edit_fallback", { id: item.id }),
9299
9422
  className: cn(
9300
9423
  "cls_hazo_kanban_card_edit absolute top-1.5 right-1.5",
9301
9424
  "p-1 rounded-md text-muted-foreground hover:text-foreground hover:bg-accent",
@@ -9603,12 +9726,11 @@ function KanbanLaneStrip({
9603
9726
  }
9604
9727
  );
9605
9728
  }
9606
- var t17 = createPackageT("hazo_ui", en_default);
9607
9729
  var DEFAULT_PRIORITIES = ["P0", "P1", "P2", "P3"];
9608
9730
  function humanize(key) {
9609
9731
  return key.replace(/[_\-]+/g, " ").replace(/([a-z])([A-Z])/g, "$1 $2").replace(/\s+/g, " ").trim().split(" ").map((w) => w ? w[0].toUpperCase() + w.slice(1) : w).join(" ");
9610
9732
  }
9611
- function auto_detect_fields(item, columns) {
9733
+ function auto_detect_fields(item, columns, t) {
9612
9734
  const skip = /* @__PURE__ */ new Set(["id", "columnKey", "priority"]);
9613
9735
  const out = [];
9614
9736
  for (const [key, value] of Object.entries(item)) {
@@ -9618,7 +9740,7 @@ function auto_detect_fields(item, columns) {
9618
9740
  }
9619
9741
  }
9620
9742
  if (columns.length > 0) {
9621
- out.push({ key: "columnKey", type: "status", label: t17("kanban.status_label") });
9743
+ out.push({ key: "columnKey", type: "status", label: t("kanban.status_label") });
9622
9744
  }
9623
9745
  return out;
9624
9746
  }
@@ -9633,6 +9755,7 @@ function KanbanEditor({
9633
9755
  onSave,
9634
9756
  onClose
9635
9757
  }) {
9758
+ const t = useHazoUiT();
9636
9759
  const [draft, set_draft] = React27.useState(item);
9637
9760
  const [saving, set_saving] = React27.useState(false);
9638
9761
  const [error, set_error] = React27.useState(null);
@@ -9647,7 +9770,7 @@ function KanbanEditor({
9647
9770
  const resolved_fields = React27.useMemo(() => {
9648
9771
  if (fields) return fields;
9649
9772
  if (!item) return [];
9650
- return auto_detect_fields(item, resolved_columns);
9773
+ return auto_detect_fields(item, resolved_columns, t);
9651
9774
  }, [fields, item, resolved_columns]);
9652
9775
  const required_keys = React27.useMemo(
9653
9776
  () => resolved_fields.filter(
@@ -9715,7 +9838,7 @@ function KanbanEditor({
9715
9838
  isDirty: is_dirty
9716
9839
  };
9717
9840
  const open = item !== null;
9718
- const title = item && titleFn ? titleFn(item) : item ? t17("kanban.edit_fallback", { id: item.id }) : "";
9841
+ const title = item && titleFn ? titleFn(item) : item ? t("kanban.edit_fallback", { id: item.id }) : "";
9719
9842
  const priority_var = item?.priority ? `--hazo-kanban-priority-${String(item.priority).toLowerCase()}` : null;
9720
9843
  const header_bar_color = priority_var ? `hsl(var(${priority_var}))` : void 0;
9721
9844
  const use_default_footer = !(renderBody && hideFooter);
@@ -9727,18 +9850,18 @@ function KanbanEditor({
9727
9850
  if (!o && !saving) onClose();
9728
9851
  },
9729
9852
  title,
9730
- description: t17("kanban.update_description"),
9853
+ description: t("kanban.update_description"),
9731
9854
  sizeWidth: "min(90vw, 480px)",
9732
9855
  openAnimation: "none",
9733
9856
  closeAnimation: "none",
9734
9857
  headerBar: !!priority_var,
9735
9858
  headerBarColor: header_bar_color,
9736
9859
  contentClassName: cn("cls_hazo_kanban_editor", priority_var && "pt-0"),
9737
- actionButtonText: saving ? t17("kanban.saving") : t17("kanban.save"),
9860
+ actionButtonText: saving ? t("kanban.saving") : t("kanban.save"),
9738
9861
  actionButtonIcon: saving ? void 0 : /* @__PURE__ */ jsx(Check, { className: "h-4 w-4 mr-2" }),
9739
9862
  actionButtonLoading: saving,
9740
9863
  actionButtonDisabled: !is_dirty || !all_required_filled || saving,
9741
- cancelButtonText: t17("kanban.cancel"),
9864
+ cancelButtonText: t("kanban.cancel"),
9742
9865
  showCancelButton: true,
9743
9866
  onConfirm: handle_save,
9744
9867
  onCancel: onClose,
@@ -9776,6 +9899,7 @@ function KanbanEditorFieldRow({
9776
9899
  priorities,
9777
9900
  columns
9778
9901
  }) {
9902
+ const t = useHazoUiT();
9779
9903
  const id = `kanban-editor-${field.key}`;
9780
9904
  const label = field.label ?? humanize(field.key);
9781
9905
  const value = draft[field.key];
@@ -9843,7 +9967,7 @@ function KanbanEditorFieldRow({
9843
9967
  /* @__PURE__ */ jsx(SelectTrigger, { id, children: /* @__PURE__ */ jsx(
9844
9968
  SelectValue,
9845
9969
  {
9846
- placeholder: field.placeholder ?? t17("kanban.select_placeholder", { label })
9970
+ placeholder: field.placeholder ?? t("kanban.select_placeholder", { label })
9847
9971
  }
9848
9972
  ) }),
9849
9973
  /* @__PURE__ */ jsx(SelectContent, { children: (field.options ?? []).map((opt) => /* @__PURE__ */ jsx(SelectItem, { value: opt, children: opt }, opt)) })
@@ -9859,7 +9983,7 @@ function KanbanEditorFieldRow({
9859
9983
  /* @__PURE__ */ jsx(SelectTrigger, { id, children: /* @__PURE__ */ jsx(
9860
9984
  SelectValue,
9861
9985
  {
9862
- placeholder: field.placeholder ?? t17("kanban.select_priority")
9986
+ placeholder: field.placeholder ?? t("kanban.select_priority")
9863
9987
  }
9864
9988
  ) }),
9865
9989
  /* @__PURE__ */ jsx(SelectContent, { children: priorities.map((p) => /* @__PURE__ */ jsx(SelectItem, { value: p, children: p }, p)) })
@@ -9875,7 +9999,7 @@ function KanbanEditorFieldRow({
9875
9999
  /* @__PURE__ */ jsx(SelectTrigger, { id, children: /* @__PURE__ */ jsx(
9876
10000
  SelectValue,
9877
10001
  {
9878
- placeholder: field.placeholder ?? t17("kanban.select_status")
10002
+ placeholder: field.placeholder ?? t("kanban.select_status")
9879
10003
  }
9880
10004
  ) }),
9881
10005
  /* @__PURE__ */ jsx(SelectContent, { children: columns.map((col) => /* @__PURE__ */ jsx(SelectItem, { value: col.key, children: col.title }, col.key)) })
@@ -9891,7 +10015,7 @@ var EMPTY_FILTER = {
9891
10015
  };
9892
10016
  function HazoUiKanbanFilter({
9893
10017
  search = true,
9894
- searchPlaceholder = "Search...",
10018
+ searchPlaceholder,
9895
10019
  categories,
9896
10020
  priorities,
9897
10021
  value,
@@ -9899,6 +10023,8 @@ function HazoUiKanbanFilter({
9899
10023
  onChange,
9900
10024
  className
9901
10025
  }) {
10026
+ const t = useHazoUiT();
10027
+ const resolved_search_placeholder = searchPlaceholder ?? t("common.search");
9902
10028
  const is_controlled = value !== void 0;
9903
10029
  const [internal, set_internal] = React27.useState(
9904
10030
  defaultValue ?? EMPTY_FILTER
@@ -9925,7 +10051,7 @@ function HazoUiKanbanFilter({
9925
10051
  {
9926
10052
  value: current.search,
9927
10053
  onChange: (e) => update({ ...current, search: e.target.value }),
9928
- placeholder: searchPlaceholder,
10054
+ placeholder: resolved_search_placeholder,
9929
10055
  className: "cls_hazo_kanban_filter_search w-full sm:w-64"
9930
10056
  }
9931
10057
  ),
@@ -9979,7 +10105,7 @@ function HazoUiKanbanFilter({
9979
10105
  className: "cls_hazo_kanban_filter_clear",
9980
10106
  children: [
9981
10107
  /* @__PURE__ */ jsx(X, { className: "h-4 w-4 mr-1" }),
9982
- "Clear"
10108
+ t("kanban.clear")
9983
10109
  ]
9984
10110
  }
9985
10111
  )
@@ -10014,12 +10140,20 @@ var UNMATCHED_LANE_KEY = "__hazo_lane_unmatched__";
10014
10140
  function bucket_key(lane_key, column_key) {
10015
10141
  return lane_key == null ? column_key : `${lane_key}\0${column_key}`;
10016
10142
  }
10017
- function default_announcements(itemLabel) {
10143
+ function default_announcements(itemLabel, t) {
10018
10144
  return {
10019
- onDragStart: ({ item, fromColumn }) => `Picked up ${itemLabel(item)}. Currently in ${fromColumn}. Use arrow keys to choose a different column. Press space to drop, escape to cancel.`,
10020
- onDragOver: ({ item, overColumn }) => overColumn ? `${itemLabel(item)} over ${overColumn}.` : "",
10021
- onDragEnd: ({ item, fromColumn, toColumn, newIndex }) => fromColumn === toColumn ? `${itemLabel(item)} reordered to position ${newIndex + 1} in ${toColumn}.` : `${itemLabel(item)} dropped in ${toColumn}, position ${newIndex + 1}.`,
10022
- onDragCancel: ({ item, fromColumn }) => `Movement cancelled. ${itemLabel(item)} returned to ${fromColumn}.`
10145
+ onDragStart: ({ item, fromColumn }) => t("kanban.dnd_pickup", { item: itemLabel(item), column: fromColumn }),
10146
+ onDragOver: ({ item, overColumn }) => overColumn ? t("kanban.dnd_over", { item: itemLabel(item), column: overColumn }) : "",
10147
+ onDragEnd: ({ item, fromColumn, toColumn, newIndex }) => fromColumn === toColumn ? t("kanban.dnd_reorder", {
10148
+ item: itemLabel(item),
10149
+ pos: newIndex + 1,
10150
+ column: toColumn
10151
+ }) : t("kanban.dnd_drop", {
10152
+ item: itemLabel(item),
10153
+ column: toColumn,
10154
+ pos: newIndex + 1
10155
+ }),
10156
+ onDragCancel: ({ item, fromColumn }) => t("kanban.dnd_cancel", { item: itemLabel(item), column: fromColumn })
10023
10157
  };
10024
10158
  }
10025
10159
  function group_items_by_column(items, overlay, columns, lanes) {
@@ -10086,6 +10220,7 @@ function HazoUiKanban({
10086
10220
  onCardSave,
10087
10221
  disableEdit = false
10088
10222
  }) {
10223
+ const t = useHazoUiT();
10089
10224
  const label_fn = React27.useCallback(
10090
10225
  (item) => itemLabel ? itemLabel(item) : item.id,
10091
10226
  [itemLabel]
@@ -10143,7 +10278,7 @@ function HazoUiKanban({
10143
10278
  return closestCorners(args);
10144
10279
  }, []);
10145
10280
  const merged_announcements = React27.useMemo(() => {
10146
- const defaults = default_announcements(label_fn);
10281
+ const defaults = default_announcements(label_fn, t);
10147
10282
  return {
10148
10283
  onDragStart: announcements?.onDragStart ?? defaults.onDragStart,
10149
10284
  onDragOver: announcements?.onDragOver ?? defaults.onDragOver,
@@ -10823,8 +10958,8 @@ function serializeFilter(filter) {
10823
10958
  const fields = (filter.fields ?? []).map((f) => `${f.field}:${f.operator ?? ""}:${String(f.value)}`).join(",");
10824
10959
  return `${filter.search ?? ""}|${fields}`;
10825
10960
  }
10826
- var t18 = createPackageT("hazo_ui", en_default);
10827
10961
  function HazoUiTable(props) {
10962
+ const t = useHazoUiT();
10828
10963
  const state = useTableState(props);
10829
10964
  const { columns, rows, getRowKey, className, caption } = props;
10830
10965
  const mobileBreakpoint = props.mobileBreakpoint ?? 768;
@@ -10855,15 +10990,15 @@ function HazoUiTable(props) {
10855
10990
  /* @__PURE__ */ jsx(SkeletonBar, { className: "w-1/2" })
10856
10991
  ] })
10857
10992
  ] }, `mloader-${i}`)
10858
- ) }) : state.serverError != null ? /* @__PURE__ */ jsx("div", { className: "cls_hazo_ui_table_mobile_error py-6", children: renderErrorState(props.error, state.serverError) }) : state.displayed.length === 0 ? /* @__PURE__ */ jsx("div", { className: "cls_hazo_ui_table_mobile_empty py-6", children: noActiveFilters(state.filter) && rows.length === 0 ? typeof props.empty === "string" || props.empty === void 0 ? /* @__PURE__ */ jsx(
10993
+ ) }) : state.serverError != null ? /* @__PURE__ */ jsx("div", { className: "cls_hazo_ui_table_mobile_error py-6", children: renderErrorState(props.error, state.serverError, t) }) : state.displayed.length === 0 ? /* @__PURE__ */ jsx("div", { className: "cls_hazo_ui_table_mobile_empty py-6", children: noActiveFilters(state.filter) && rows.length === 0 ? typeof props.empty === "string" || props.empty === void 0 ? /* @__PURE__ */ jsx(
10859
10994
  EmptyState,
10860
10995
  {
10861
- title: typeof props.empty === "string" && props.empty || t18("table.empty")
10996
+ title: typeof props.empty === "string" && props.empty || t("table.empty")
10862
10997
  }
10863
10998
  ) : props.empty : typeof props.noResults === "string" || props.noResults === void 0 ? /* @__PURE__ */ jsx(
10864
10999
  EmptyState,
10865
11000
  {
10866
- title: typeof props.noResults === "string" && props.noResults || t18("table.no_results")
11001
+ title: typeof props.noResults === "string" && props.noResults || t("table.no_results")
10867
11002
  }
10868
11003
  ) : props.noResults }) : /* @__PURE__ */ jsx(
10869
11004
  TableMobileCards,
@@ -10886,7 +11021,7 @@ function HazoUiTable(props) {
10886
11021
  {
10887
11022
  type: "button",
10888
11023
  onClick: (e) => state.cycleHeaderSort(c.key, e.shiftKey),
10889
- title: t18("table.sort_tooltip"),
11024
+ title: t("table.sort_tooltip"),
10890
11025
  className: "cls_hazo_ui_table_sort_btn inline-flex items-center gap-1 hover:text-foreground",
10891
11026
  children: [
10892
11027
  /* @__PURE__ */ jsx("span", { children: c.label }),
@@ -10908,7 +11043,7 @@ function HazoUiTable(props) {
10908
11043
  {
10909
11044
  colSpan: columns.length,
10910
11045
  className: "cls_hazo_ui_table_error_cell p-0",
10911
- children: /* @__PURE__ */ jsx("div", { className: "cls_hazo_ui_table_error_wrap py-6", children: renderErrorState(props.error, state.serverError) })
11046
+ children: /* @__PURE__ */ jsx("div", { className: "cls_hazo_ui_table_error_wrap py-6", children: renderErrorState(props.error, state.serverError, t) })
10912
11047
  }
10913
11048
  ) }) : state.displayed.length === 0 ? /* @__PURE__ */ jsx(TableRow2, { children: /* @__PURE__ */ jsx(
10914
11049
  TableCell2,
@@ -10918,12 +11053,12 @@ function HazoUiTable(props) {
10918
11053
  children: noActiveFilters(state.filter) && rows.length === 0 ? /* @__PURE__ */ jsx("div", { className: "cls_hazo_ui_table_empty_wrap py-6", children: typeof props.empty === "string" || props.empty === void 0 ? /* @__PURE__ */ jsx(
10919
11054
  EmptyState,
10920
11055
  {
10921
- title: typeof props.empty === "string" && props.empty || t18("table.empty")
11056
+ title: typeof props.empty === "string" && props.empty || t("table.empty")
10922
11057
  }
10923
11058
  ) : props.empty }) : /* @__PURE__ */ jsx("div", { className: "cls_hazo_ui_table_no_results_wrap py-6", children: typeof props.noResults === "string" || props.noResults === void 0 ? /* @__PURE__ */ jsx(
10924
11059
  EmptyState,
10925
11060
  {
10926
- title: typeof props.noResults === "string" && props.noResults || t18("table.no_results")
11061
+ title: typeof props.noResults === "string" && props.noResults || t("table.no_results")
10927
11062
  }
10928
11063
  ) : props.noResults })
10929
11064
  }
@@ -11033,11 +11168,12 @@ function PaginationFooter({
11033
11168
  total,
11034
11169
  onPageChange
11035
11170
  }) {
11171
+ const t = useHazoUiT();
11036
11172
  const start = total === 0 ? 0 : page * pageSize + 1;
11037
11173
  const end = Math.min((page + 1) * pageSize, total);
11038
11174
  const lastPage = Math.max(0, Math.ceil(total / pageSize) - 1);
11039
11175
  return /* @__PURE__ */ jsxs("div", { className: "cls_hazo_ui_table_pagination flex items-center justify-between gap-3 pt-2 text-sm", children: [
11040
- /* @__PURE__ */ jsx("span", { className: "cls_hazo_ui_table_page_counter text-muted-foreground", children: t18("table.showing", {
11176
+ /* @__PURE__ */ jsx("span", { className: "cls_hazo_ui_table_page_counter text-muted-foreground", children: t("table.showing", {
11041
11177
  start: String(start),
11042
11178
  end: String(end),
11043
11179
  total: String(total)
@@ -11050,8 +11186,8 @@ function PaginationFooter({
11050
11186
  size: "sm",
11051
11187
  onClick: () => onPageChange(Math.max(0, page - 1)),
11052
11188
  disabled: page === 0,
11053
- "aria-label": t18("table.prev_aria"),
11054
- children: t18("table.prev")
11189
+ "aria-label": t("table.prev_aria"),
11190
+ children: t("table.prev")
11055
11191
  }
11056
11192
  ),
11057
11193
  /* @__PURE__ */ jsx(
@@ -11061,14 +11197,15 @@ function PaginationFooter({
11061
11197
  size: "sm",
11062
11198
  onClick: () => onPageChange(Math.min(lastPage, page + 1)),
11063
11199
  disabled: page >= lastPage,
11064
- "aria-label": t18("table.next_aria"),
11065
- children: t18("table.next")
11200
+ "aria-label": t("table.next_aria"),
11201
+ children: t("table.next")
11066
11202
  }
11067
11203
  )
11068
11204
  ] })
11069
11205
  ] });
11070
11206
  }
11071
11207
  function Toolbar2(props) {
11208
+ const t = useHazoUiT();
11072
11209
  const {
11073
11210
  columns,
11074
11211
  sort,
@@ -11106,7 +11243,7 @@ function Toolbar2(props) {
11106
11243
  setSearchValue(v);
11107
11244
  onSearchChange(v);
11108
11245
  },
11109
- placeholder: searchPlaceholder ?? t18("table.search_placeholder"),
11246
+ placeholder: searchPlaceholder ?? t("table.search_placeholder"),
11110
11247
  className: "cls_hazo_ui_table_search w-full sm:max-w-xs"
11111
11248
  }
11112
11249
  ) : /* @__PURE__ */ jsx("div", {}),
@@ -11147,15 +11284,15 @@ function LoadingRows({
11147
11284
  function noActiveFilters(filter) {
11148
11285
  return !filter.search && (!filter.fields || filter.fields.length === 0);
11149
11286
  }
11150
- function renderErrorState(error, serverError) {
11287
+ function renderErrorState(error, serverError, t) {
11151
11288
  if (typeof error === "function") return error(serverError);
11152
11289
  if (error !== void 0 && error !== null) return error;
11153
11290
  const msg = serverError instanceof Error ? serverError.message : String(serverError);
11154
11291
  return /* @__PURE__ */ jsx(
11155
11292
  EmptyState,
11156
11293
  {
11157
- title: t18("table.error_title"),
11158
- description: msg || t18("table.error_description")
11294
+ title: t("table.error_title"),
11295
+ description: msg || t("table.error_description")
11159
11296
  }
11160
11297
  );
11161
11298
  }
@@ -11391,7 +11528,6 @@ function StackedBars({
11391
11528
  }
11392
11529
  );
11393
11530
  }
11394
- var t19 = createPackageT("hazo_ui", en_default);
11395
11531
  function DateRangeSelector({
11396
11532
  value,
11397
11533
  onChange,
@@ -11399,7 +11535,8 @@ function DateRangeSelector({
11399
11535
  className,
11400
11536
  ariaLabel
11401
11537
  }) {
11402
- const resolved_aria = ariaLabel ?? t19("charts.date_range");
11538
+ const t = useHazoUiT();
11539
+ const resolved_aria = ariaLabel ?? t("charts.date_range");
11403
11540
  return /* @__PURE__ */ jsx(
11404
11541
  "div",
11405
11542
  {
@@ -11455,6 +11592,7 @@ function FunnelChart({
11455
11592
  showTooltip = true,
11456
11593
  className
11457
11594
  }) {
11595
+ const t = useHazoUiT();
11458
11596
  const [hover_idx, set_hover_idx] = React27.useState(null);
11459
11597
  const fmt = valueFormat ?? format_num;
11460
11598
  const totals = steps.map(step_total);
@@ -11581,12 +11719,12 @@ function FunnelChart({
11581
11719
  const bubble_anchor_y = bar_y + BAR_H / 2;
11582
11720
  const lines = [
11583
11721
  { text: step.label, accent: true },
11584
- { text: `Total: ${fmt(total)}`, accent: false },
11585
- { text: `% of first: ${pct_first}%`, accent: false }
11722
+ { text: t("charts.total", { value: fmt(total) }), accent: false },
11723
+ { text: t("charts.pct_of_first", { pct: pct_first }), accent: false }
11586
11724
  ];
11587
11725
  if (i > 0) {
11588
- lines.push({ text: `% of prev: ${pct_prev}%`, accent: false });
11589
- lines.push({ text: `Drop-off: \u2212${fmt(dropoff)}`, accent: false });
11726
+ lines.push({ text: t("charts.pct_of_prev", { pct: pct_prev }), accent: false });
11727
+ lines.push({ text: t("charts.dropoff", { value: fmt(dropoff) }), accent: false });
11590
11728
  }
11591
11729
  if (step.segments) {
11592
11730
  step.segments.forEach((seg) => {
@@ -11647,7 +11785,6 @@ function FunnelChart({
11647
11785
 
11648
11786
  // src/assets/celebration-chime.mp3
11649
11787
  var celebration_chime_default = "data:text/plain;charset=utf-8,";
11650
- var t20 = createPackageT("hazo_ui", en_default);
11651
11788
  var CELEBRATION_GRADIENT = "linear-gradient(135deg, #667eea 0%, #764ba2 100%)";
11652
11789
  var CARD_SIZE = 1080;
11653
11790
  var PREVIEW_SIZE = 400;
@@ -11699,6 +11836,7 @@ function CelebrationModalInner({
11699
11836
  payload,
11700
11837
  onClose
11701
11838
  }) {
11839
+ const t = useHazoUiT();
11702
11840
  const {
11703
11841
  id,
11704
11842
  title,
@@ -11845,7 +11983,7 @@ function CelebrationModalInner({
11845
11983
  {
11846
11984
  className: "cls_celebration_close_btn absolute top-3 right-3 z-10 p-1.5 rounded-full hover:bg-black/10 transition-colors",
11847
11985
  onClick: close_modal,
11848
- "aria-label": t20("celebration.close"),
11986
+ "aria-label": t("celebration.close"),
11849
11987
  children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4 text-gray-600" })
11850
11988
  }
11851
11989
  ),
@@ -11908,21 +12046,21 @@ function CelebrationModalInner({
11908
12046
  disabled: is_downloading,
11909
12047
  children: [
11910
12048
  is_downloading ? /* @__PURE__ */ jsx(Loader2, { className: "h-3.5 w-3.5 mr-1.5 animate-spin" }) : /* @__PURE__ */ jsx(Download, { className: "h-3.5 w-3.5 mr-1.5" }),
11911
- t20("celebration.download_png")
12049
+ t("celebration.download_png")
11912
12050
  ]
11913
12051
  }
11914
12052
  ),
11915
12053
  can_share && /* @__PURE__ */ jsxs(Button, { variant: "outline", size: "sm", onClick: handle_share, children: [
11916
12054
  /* @__PURE__ */ jsx(Share2, { className: "h-3.5 w-3.5 mr-1.5" }),
11917
- t20("celebration.share")
12055
+ t("celebration.share")
11918
12056
  ] }),
11919
12057
  /* @__PURE__ */ jsxs(Button, { variant: "outline", size: "sm", onClick: handle_copy, children: [
11920
12058
  /* @__PURE__ */ jsx(Copy, { className: "h-3.5 w-3.5 mr-1.5" }),
11921
- t20("celebration.copy_image")
12059
+ t("celebration.copy_image")
11922
12060
  ] })
11923
12061
  ] })
11924
12062
  ] }),
11925
- !shareableCard && /* @__PURE__ */ jsx("div", { className: "cls_celebration_footer pb-8", children: /* @__PURE__ */ jsx(Button, { size: "sm", onClick: close_modal, children: t20("celebration.dismiss") }) })
12063
+ !shareableCard && /* @__PURE__ */ jsx("div", { className: "cls_celebration_footer pb-8", children: /* @__PURE__ */ jsx(Button, { size: "sm", onClick: close_modal, children: t("celebration.dismiss") }) })
11926
12064
  ]
11927
12065
  }
11928
12066
  )
@@ -11944,8 +12082,8 @@ function computeEta(durationWindow, unitCount, concurrency = 1, fallbackUnitMs =
11944
12082
  }
11945
12083
  function easeToward(elapsed, eta, maxCap = 0.95) {
11946
12084
  if (eta <= 0 || elapsed <= 0) return 0;
11947
- const t22 = elapsed / eta;
11948
- return maxCap * (1 - Math.exp(-1.5 * t22));
12085
+ const t = elapsed / eta;
12086
+ return maxCap * (1 - Math.exp(-1.5 * t));
11949
12087
  }
11950
12088
  function HazoUiProgressBar({
11951
12089
  value,
@@ -12121,7 +12259,6 @@ function upsertEntry(entries, entry) {
12121
12259
  function removeEntry(entries, id) {
12122
12260
  return entries.filter((e) => e.id !== id);
12123
12261
  }
12124
- var t21 = createPackageT("hazo_ui", en_default);
12125
12262
  function HazoUiMemoryDropdown({
12126
12263
  history_key,
12127
12264
  placeholder,
@@ -12129,8 +12266,9 @@ function HazoUiMemoryDropdown({
12129
12266
  add_entry,
12130
12267
  empty_label
12131
12268
  }) {
12132
- const resolved_placeholder = placeholder ?? t21("memory.search_placeholder");
12133
- const resolved_empty_label = empty_label ?? t21("memory.no_history");
12269
+ const t = useHazoUiT();
12270
+ const resolved_placeholder = placeholder ?? t("memory.search_placeholder");
12271
+ const resolved_empty_label = empty_label ?? t("memory.no_history");
12134
12272
  const { value: stored, setValue } = useHazoState(history_key, {
12135
12273
  level: "scope",
12136
12274
  fallback: []
@@ -12216,6 +12354,7 @@ function HazoUiMemoryDropdown({
12216
12354
  );
12217
12355
  }
12218
12356
  function EntryRow({ entry, on_select, onDelete }) {
12357
+ const t = useHazoUiT();
12219
12358
  const [deleteHovered, setDeleteHovered] = React27.useState(false);
12220
12359
  const [rowHovered, setRowHovered] = React27.useState(false);
12221
12360
  return /* @__PURE__ */ jsxs(
@@ -12255,7 +12394,7 @@ function EntryRow({ entry, on_select, onDelete }) {
12255
12394
  onClick: (e) => onDelete(entry.id, e),
12256
12395
  onMouseEnter: () => setDeleteHovered(true),
12257
12396
  onMouseLeave: () => setDeleteHovered(false),
12258
- "aria-label": t21("memory.remove_aria", { label: entry.label }),
12397
+ "aria-label": t("memory.remove_aria", { label: entry.label }),
12259
12398
  style: {
12260
12399
  flexShrink: 0,
12261
12400
  background: "none",
@@ -12283,7 +12422,8 @@ function Logo({
12283
12422
  className,
12284
12423
  imgClassName
12285
12424
  }) {
12286
- const alt = appTitle ?? "Logo";
12425
+ const t = useHazoUiT();
12426
+ const alt = appTitle ?? t("app_logo.alt_fallback");
12287
12427
  let content = null;
12288
12428
  if (logoUrl) {
12289
12429
  content = /* @__PURE__ */ jsxs(Fragment$1, { children: [
@@ -12319,10 +12459,11 @@ function Logo({
12319
12459
  return /* @__PURE__ */ jsx("div", { className: cn("inline-flex items-center gap-2", className), children: content });
12320
12460
  }
12321
12461
  function AppHeader({ identity, homeHref, navItems, actions, className }) {
12462
+ const t = useHazoUiT();
12322
12463
  return /* @__PURE__ */ jsxs(
12323
12464
  "header",
12324
12465
  {
12325
- "aria-label": "Application header",
12466
+ "aria-label": t("app_header.aria_label"),
12326
12467
  className: cn(
12327
12468
  "flex w-full items-center justify-between gap-4 border-b bg-navbar text-navbar-fg border-navbar-border px-4 py-2.5",
12328
12469
  className
@@ -12775,6 +12916,7 @@ function HazoBrowserTab({
12775
12916
  add_menu,
12776
12917
  className
12777
12918
  }) {
12919
+ const t = useHazoUiT();
12778
12920
  const handle_close = (e, id) => {
12779
12921
  e.stopPropagation();
12780
12922
  on_close?.(id);
@@ -12814,7 +12956,7 @@ function HazoBrowserTab({
12814
12956
  "button",
12815
12957
  {
12816
12958
  type: "button",
12817
- "aria-label": `Close ${tab.label}`,
12959
+ "aria-label": t("browser_tab.close_aria", { label: tab.label }),
12818
12960
  onClick: (e) => handle_close(e, tab.id),
12819
12961
  className: "cls_hazo_browser_tab_close flex-shrink-0 rounded p-0.5 text-muted-foreground opacity-0 group-hover:opacity-100 hover:bg-muted hover:text-foreground focus:opacity-100 focus:outline-none focus-visible:ring-2 focus-visible:ring-primary",
12820
12962
  children: /* @__PURE__ */ jsx(X, { className: "h-3 w-3" })
@@ -12901,9 +13043,11 @@ function LocalePicker({
12901
13043
  flags = false,
12902
13044
  alternates,
12903
13045
  activeLocale,
12904
- triggerLabel = "Change language",
13046
+ triggerLabel,
12905
13047
  className
12906
13048
  }) {
13049
+ const t = useHazoUiT();
13050
+ const resolved_trigger_label = triggerLabel ?? t("locale_picker.change_language");
12907
13051
  const options = React27.useMemo(() => {
12908
13052
  return Object.entries(alternates ?? {}).map(([code, url]) => {
12909
13053
  const href = safeHref(url);
@@ -12918,7 +13062,7 @@ function LocalePicker({
12918
13062
  return /* @__PURE__ */ jsx(
12919
13063
  "nav",
12920
13064
  {
12921
- "aria-label": triggerLabel,
13065
+ "aria-label": resolved_trigger_label,
12922
13066
  className: cn("cls_locale_picker_inline flex items-center gap-1", className),
12923
13067
  children: options.map((opt) => /* @__PURE__ */ jsxs(
12924
13068
  "a",
@@ -12948,7 +13092,7 @@ function LocalePicker({
12948
13092
  variant: "outline",
12949
13093
  size: "sm",
12950
13094
  lang: activeLocale,
12951
- "aria-label": triggerLabel,
13095
+ "aria-label": resolved_trigger_label,
12952
13096
  className: cn("cls_locale_picker_trigger gap-1.5", className),
12953
13097
  children: [
12954
13098
  flags && /* @__PURE__ */ jsx(FlagIcon, { code: active_option?.code ?? options[0].code }),
@@ -12974,6 +13118,6 @@ function LocalePicker({
12974
13118
  }
12975
13119
  LocalePicker.displayName = "LocalePicker";
12976
13120
 
12977
- export { ANIMATION_PRESETS, Accordion, AccordionContent, AccordionItem, AccordionTrigger, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AppFooter, AppHeader, Badge, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, CELEBRATION_GRADIENT, Calendar, CanvasTextToolbar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CelebrationProvider, Checkbox, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, CommandNodeExtension, CommandPill, CommandPopover, DEFAULT_ANNOUNCE_EVENT, DateRangeSelector, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, ErrorBanner, ErrorPage, FunnelChart, HazoBrowserTab, HazoContextProvider, HazoUiConfirmDialog, HazoUiDialog, DialogClose as HazoUiDialogClose, DialogContent as HazoUiDialogContent, DialogDescription as HazoUiDialogDescription, DialogFooter as HazoUiDialogFooter, DialogHeader as HazoUiDialogHeader, DialogOverlay as HazoUiDialogOverlay, DialogPortal as HazoUiDialogPortal, Dialog as HazoUiDialogRoot, DialogTitle as HazoUiDialogTitle, DialogTrigger as HazoUiDialogTrigger, HazoUiEtaProgress, HazoUiFlexInput, HazoUiFlexRadio, HazoUiIcon, HazoUiIconPicker, HazoUiImageCropper, HazoUiImageCropperDialog, HazoUiKanban, HazoUiKanbanFilter, HazoUiMemoryDropdown, HazoUiMultiFilterDialog, HazoUiMultiSortDialog, HazoUiPillRadio, HazoUiProgressBar, HazoUiRte, HazoUiTable, HazoUiTextarea, HazoUiTextbox, HazoUiToaster, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputAffix, InverseSparkline, Label3 as Label, LiveRegion, LoadingTimeout, LocalePicker, Logo, MarkdownEditor, NotificationCountBadge, NotificationItem, NotificationPanel, Popover, PopoverContent, PopoverTrigger, ProgressiveImage, RadioGroup, RadioGroupItem, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator3 as Separator, Command as ShadcnCommand, CommandEmpty as ShadcnCommandEmpty, CommandGroup as ShadcnCommandGroup, CommandInput as ShadcnCommandInput, CommandItem as ShadcnCommandItem, CommandList as ShadcnCommandList, Skeleton, SkeletonBar, SkeletonCircle, SkeletonGroup, SkeletonRect, Slider, Sparkline, Spinner, StackedBars, StatusBadge, Switch, Table2 as Table, TableBody, TableCaption, TableCell2 as TableCell, TableFooter, TableHead, TableHeader2 as TableHeader, TableRow2 as TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, announce, applyKanbanFilter, buttonGroupVariants, celebrate, cn, computeEta, create_command_suggestion_extension, easeToward, errorToast, format_num, generateUUID, get_hazo_ui_config, get_logger, hasUrlParam, isLucideValue, makeStatusBadge, median, parse_commands_from_text, permissionToast, pick_x_label_indices, readRememberedState, reset_hazo_ui_config, resolve_animation_classes, safeHref, set_hazo_ui_config, set_logger, successToast, text_to_tiptap_content, toggleVariants, upsertEntry as upsertMemoryEntry, useClickOutside, useCopyToClipboard, useDebounce, useErrorDisplay, useEtaProgress, useFullscreen, useIsMobile, useLoadingState, useLocalStorage, useLongPress, useMediaQuery, useRememberedState, useScrollRestore, useSessionStorage, useViewport, useWakeLock, use_fullscreen, use_wake_lock, writeRememberedState };
13121
+ export { ANIMATION_PRESETS, Accordion, AccordionContent, AccordionItem, AccordionTrigger, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AppFooter, AppHeader, Badge, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, CELEBRATION_GRADIENT, Calendar, CanvasTextToolbar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CelebrationProvider, Checkbox, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, CommandNodeExtension, CommandPill, CommandPopover, DEFAULT_ANNOUNCE_EVENT, DateRangeSelector, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, ErrorBanner, ErrorPage, FunnelChart, HazoBrowserTab, HazoContextProvider, HazoUiConfirmDialog, HazoUiDialog, DialogClose as HazoUiDialogClose, DialogContent as HazoUiDialogContent, DialogDescription as HazoUiDialogDescription, DialogFooter as HazoUiDialogFooter, DialogHeader as HazoUiDialogHeader, DialogOverlay as HazoUiDialogOverlay, DialogPortal as HazoUiDialogPortal, Dialog as HazoUiDialogRoot, DialogTitle as HazoUiDialogTitle, DialogTrigger as HazoUiDialogTrigger, HazoUiEtaProgress, HazoUiFlexInput, HazoUiFlexRadio, HazoUiI18nProvider, HazoUiIcon, HazoUiIconPicker, HazoUiImageCropper, HazoUiImageCropperDialog, HazoUiKanban, HazoUiKanbanFilter, HazoUiMemoryDropdown, HazoUiMultiFilterDialog, HazoUiMultiSortDialog, HazoUiPillRadio, HazoUiProgressBar, HazoUiRte, HazoUiTable, HazoUiTextarea, HazoUiTextbox, HazoUiToaster, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputAffix, InverseSparkline, Label3 as Label, LiveRegion, LoadingTimeout, LocalePicker, Logo, MarkdownEditor, NotificationCountBadge, NotificationItem, NotificationPanel, Popover, PopoverContent, PopoverTrigger, ProgressiveImage, RadioGroup, RadioGroupItem, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator3 as Separator, Command as ShadcnCommand, CommandEmpty as ShadcnCommandEmpty, CommandGroup as ShadcnCommandGroup, CommandInput as ShadcnCommandInput, CommandItem as ShadcnCommandItem, CommandList as ShadcnCommandList, Skeleton, SkeletonBar, SkeletonCircle, SkeletonGroup, SkeletonRect, Slider, Sparkline, Spinner, StackedBars, StatusBadge, Switch, Table2 as Table, TableBody, TableCaption, TableCell2 as TableCell, TableFooter, TableHead, TableHeader2 as TableHeader, TableRow2 as TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, announce, applyKanbanFilter, buttonGroupVariants, celebrate, cn, computeEta, create_command_suggestion_extension, defaultHazoUiT, easeToward, errorToast, format_num, generateUUID, get_hazo_ui_config, get_logger, hasUrlParam, isLucideValue, makeStatusBadge, median, parse_commands_from_text, permissionToast, pick_x_label_indices, readRememberedState, reset_hazo_ui_config, resolve_animation_classes, safeHref, set_hazo_ui_config, set_logger, successToast, text_to_tiptap_content, toggleVariants, upsertEntry as upsertMemoryEntry, useClickOutside, useCopyToClipboard, useDebounce, useErrorDisplay, useEtaProgress, useFullscreen, useHazoUiT, useIsMobile, useLoadingState, useLocalStorage, useLongPress, useMediaQuery, useRememberedState, useScrollRestore, useSessionStorage, useViewport, useWakeLock, use_fullscreen, use_wake_lock, writeRememberedState };
12978
13122
  //# sourceMappingURL=index.js.map
12979
13123
  //# sourceMappingURL=index.js.map