hazo_ui 3.1.0 → 3.1.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/CHANGE_LOG.md CHANGED
@@ -5,6 +5,25 @@ 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
+ ## v3.1.1 — 2026-05-30
9
+
10
+ **Fix:** Bundling failure when hazo_ui is consumed by a Next.js client component.
11
+
12
+ `src/utils/logger.ts` did `import { createLogger } from "hazo_core"` at module
13
+ top-level. hazo_core's package exports route browser bundles to its
14
+ `index.client.js`, which intentionally omits `createLogger` (the factory loads
15
+ hazo_logs dynamically, which is Node-only). Static named-import failed bundle
16
+ resolution for every downstream consumer that pulled hazo_ui into a client
17
+ component, including transitively via `hazo_auth/client`.
18
+
19
+ Switched to a namespace import + runtime feature check. When `createLogger` is
20
+ present (server bundle), the structured logger is used; otherwise the existing
21
+ `console_logger` fallback applies. No public API change.
22
+
23
+ Discovered during the gotimer Wave 3 consumer migration. Filing this as a
24
+ patch instead of a republish of 3.1.0 to preserve the published artifact's
25
+ hash for downstream auditability.
26
+
8
27
  ## v3.1.0 — Wave 2 hazo_core wiring
9
28
 
10
29
  **New:** `<HazoContextProvider>`, internal `get_logger` / `set_logger`,
package/dist/index.cjs CHANGED
@@ -4,7 +4,7 @@
4
4
  var clsx = require('clsx');
5
5
  var tailwindMerge = require('tailwind-merge');
6
6
  var React26 = require('react');
7
- var hazo_core = require('hazo_core');
7
+ var hazoCore = require('hazo_core');
8
8
  var client = require('hazo_core/client');
9
9
  var jsxRuntime = require('react/jsx-runtime');
10
10
  var reactSlot = require('@radix-ui/react-slot');
@@ -93,6 +93,7 @@ function _interopNamespace(e) {
93
93
  }
94
94
 
95
95
  var React26__namespace = /*#__PURE__*/_interopNamespace(React26);
96
+ var hazoCore__namespace = /*#__PURE__*/_interopNamespace(hazoCore);
96
97
  var DialogPrimitive__namespace = /*#__PURE__*/_interopNamespace(DialogPrimitive);
97
98
  var PopoverPrimitive__namespace = /*#__PURE__*/_interopNamespace(PopoverPrimitive);
98
99
  var SelectPrimitive__namespace = /*#__PURE__*/_interopNamespace(SelectPrimitive);
@@ -206,7 +207,7 @@ function HazoContextProvider({
206
207
  children
207
208
  }) {
208
209
  const id = React26__namespace.useMemo(
209
- () => correlationId ?? hazo_core.generateRequestId(),
210
+ () => correlationId ?? hazoCore.generateRequestId(),
210
211
  [correlationId]
211
212
  );
212
213
  React26__namespace.useEffect(() => {
@@ -226,8 +227,10 @@ var console_logger = {
226
227
  error: (m, d) => d ? console.error(`[hazo_ui] ${m}`, d) : console.error(`[hazo_ui] ${m}`)
227
228
  };
228
229
  function build_default_logger() {
230
+ const factory = hazoCore__namespace.createLogger;
231
+ if (typeof factory !== "function") return console_logger;
229
232
  try {
230
- return hazo_core.createLogger("hazo_ui");
233
+ return factory("hazo_ui");
231
234
  } catch {
232
235
  return console_logger;
233
236
  }
@@ -243,7 +246,7 @@ function get_logger() {
243
246
  return current_logger;
244
247
  }
245
248
  function generateUUID() {
246
- return hazo_core.generateRequestId().slice(4);
249
+ return hazoCore.generateRequestId().slice(4);
247
250
  }
248
251
 
249
252
  // src/lib/hazo_ui_config.ts