hazo_ui 6.11.1 → 6.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGE_LOG.md CHANGED
@@ -5,6 +5,35 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## v6.12.0 (2026-09-20)
9
+
10
+ ### Changed — migrated onto the canonical `hazo_core/i18n` bridge
11
+
12
+ hazo_ui's own baked-in strings (login buttons, table/filter-dialog labels,
13
+ kanban, browser-tab, RTE toolbar tooltips under the `rte.*` namespace, etc.)
14
+ now go through `createPackageT` from `hazo_core/i18n` instead of this
15
+ package's local `src/lib/create_package_t.ts` (deleted). Catalog stays a flat
16
+ `src/locales/en.json` with `{{var}}` interpolation — no reshaping needed.
17
+ `hazo_i18n` added as an optional peer dependency (`^0.5.0`); `hazo_core` peer
18
+ bumped to `^2.4.0` (first version shipping the `/i18n` sub-export). No public
19
+ API change — the bridge was never re-exported from `src/index.ts`.
20
+
21
+ The `rte.*` namespace (Tiptap rich-text-editor toolbar strings) already lived
22
+ in the single `en.json` catalog by the time this migration ran — there was no
23
+ separate `TiptapI18nProvider`/`en.ts`/`si.ts`/`sv.ts` locale system left to
24
+ merge; that consolidation had already happened in an earlier session.
25
+
26
+ ## v6.11.2 (2026-09-01)
27
+
28
+ ### Fixed — `hazo_state` peer dependency range never resolved
29
+
30
+ `peerDependencies.hazo_state` was `^0.5.0`, but `hazo_state` never published a
31
+ 0.5.x release on the registry (its version history jumps `0.4.0` → `0.6.0`
32
+ directly). Any fresh install of `hazo_ui` requiring registry resolution of
33
+ this peer range failed with `ETARGET`. Only symbol used from `hazo_state` is
34
+ the `StateLevel` type, unchanged since `0.4.0`, so the range is corrected to
35
+ `^0.6.0` with no consumer-facing behavior change.
36
+
8
37
  ## v6.11.1 (2026-08-25)
9
38
 
10
39
  ### Added — `data-lane-key` on `HazoUiKanban` swimlane hooks
package/dist/index.cjs CHANGED
@@ -16,6 +16,7 @@ var SelectPrimitive = require('@radix-ui/react-select');
16
16
  var TooltipPrimitive = require('@radix-ui/react-tooltip');
17
17
  var reactDayPicker = require('react-day-picker');
18
18
  var dateFns = require('date-fns');
19
+ var i18n = require('hazo_core/i18n');
19
20
  var core$1 = require('@dnd-kit/core');
20
21
  var sortable = require('@dnd-kit/sortable');
21
22
  var utilities = require('@dnd-kit/utilities');
@@ -712,47 +713,6 @@ function Calendar({
712
713
  );
713
714
  }
714
715
  Calendar.displayName = "Calendar";
715
- var hazo_i18n_module = null;
716
- void client$1.optional_import("hazo_i18n").then((mod) => {
717
- hazo_i18n_module = mod;
718
- }).catch(() => {
719
- hazo_i18n_module = null;
720
- });
721
- function interpolate(template, vars) {
722
- if (!vars) return template;
723
- return template.replace(
724
- /\{\{\s*(\w+)\s*\}\}/g,
725
- (whole, name) => Object.prototype.hasOwnProperty.call(vars, name) ? vars[name] : whole
726
- );
727
- }
728
- function createPackageT(namespace, fallbackCatalog) {
729
- return function t4(key, vars) {
730
- const mod = hazo_i18n_module;
731
- if (mod && typeof mod.t === "function") {
732
- try {
733
- const translated = mod.t(`${namespace}.${key}`, vars);
734
- if (typeof translated === "string" && translated.length > 0) {
735
- return translated;
736
- }
737
- } catch {
738
- }
739
- }
740
- const template = fallbackCatalog[key];
741
- if (template === void 0) return key;
742
- return interpolate(template, vars);
743
- };
744
- }
745
- function resolvePackageLocale(defaultLocale) {
746
- const mod = hazo_i18n_module;
747
- if (mod && typeof mod.getStaticLocale === "function") {
748
- try {
749
- const locale = mod.getStaticLocale();
750
- if (typeof locale === "string" && locale.length > 0) return locale;
751
- } catch {
752
- }
753
- }
754
- return defaultLocale;
755
- }
756
716
 
757
717
  // src/locales/en.json
758
718
  var en_default = {
@@ -827,7 +787,7 @@ var en_default = {
827
787
  "filter.cancel": "Cancel",
828
788
  "filter.apply": "Apply"
829
789
  };
830
- var t = createPackageT("hazo_ui", en_default);
790
+ var t = i18n.createPackageT("hazo_ui", en_default);
831
791
  function FilterFieldItem({
832
792
  filterConfig,
833
793
  fieldConfig,
@@ -3801,7 +3761,7 @@ function get_file_extension(filename) {
3801
3761
  function is_image_file(mime_type) {
3802
3762
  return mime_type.startsWith("image/");
3803
3763
  }
3804
- var t2 = createPackageT("hazo_ui", en_default);
3764
+ var t2 = i18n.createPackageT("hazo_ui", en_default);
3805
3765
  var ALL_ON = {
3806
3766
  undo_redo: true,
3807
3767
  block_type: true,
@@ -10834,7 +10794,7 @@ function serializeFilter(filter) {
10834
10794
  const fields = (filter.fields ?? []).map((f) => `${f.field}:${f.operator ?? ""}:${String(f.value)}`).join(",");
10835
10795
  return `${filter.search ?? ""}|${fields}`;
10836
10796
  }
10837
- var t3 = createPackageT("hazo_ui", en_default);
10797
+ var t3 = i18n.createPackageT("hazo_ui", en_default);
10838
10798
  function HazoUiTable(props) {
10839
10799
  const state = useTableState(props);
10840
10800
  const { columns, rows, getRowKey, className, caption } = props;
@@ -10973,7 +10933,7 @@ function renderCell(c, row, i) {
10973
10933
  var DEFAULT_NUMBER_LOCALE = "en-US";
10974
10934
  function formatValue(value, formatter, currency, locale) {
10975
10935
  if (value === null || value === void 0 || value === "") return "\u2014";
10976
- const lc = locale ?? resolvePackageLocale(DEFAULT_NUMBER_LOCALE);
10936
+ const lc = locale ?? i18n.resolvePackageLocale(DEFAULT_NUMBER_LOCALE);
10977
10937
  switch (formatter) {
10978
10938
  case "date": {
10979
10939
  const d = value instanceof Date ? value : new Date(value);