hazo_ihelp 2.3.0 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,4 +6,5 @@ export { IhelpSearchDialog } from './ihelp_search_dialog.js';
6
6
  export { IhelpRichEditor } from './ihelp_rich_editor.js';
7
7
  export { IhelpEditor } from './ihelp_editor.js';
8
8
  export { IhelpFieldHelp, type IhelpFieldHelpProps } from './ihelp_field_help.js';
9
+ export { TopicHoverIcon, resolveTopicForContext, type TopicHoverIconProps } from './topic_hover_icon.js';
9
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC9F,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC9F,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjF,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,KAAK,mBAAmB,EAAE,MAAM,uBAAuB,CAAC"}
@@ -6,4 +6,5 @@ export { IhelpSearchDialog } from './ihelp_search_dialog.js';
6
6
  export { IhelpRichEditor } from './ihelp_rich_editor.js';
7
7
  export { IhelpEditor } from './ihelp_editor.js';
8
8
  export { IhelpFieldHelp } from './ihelp_field_help.js';
9
+ export { TopicHoverIcon, resolveTopicForContext } from './topic_hover_icon.js';
9
10
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC9F,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAA2B,MAAM,sBAAsB,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,cAAc,EAA4B,MAAM,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC9F,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAA2B,MAAM,sBAAsB,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,cAAc,EAA4B,MAAM,uBAAuB,CAAC;AACjF,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAA4B,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,92 @@
1
+ import React from "react";
2
+ import type { IhelpTopic } from "../types/index.js";
3
+ /**
4
+ * Resolve the best topic for a context key: the topic whose `contexts` array
5
+ * contains an entry with `key === context_key`. When multiple topics match,
6
+ * the one with the **lowest** matching `contexts[].priority` wins. Returns
7
+ * `undefined` when no topic matches.
8
+ *
9
+ * Tie-break rule: if two topics share the same lowest matching priority, the
10
+ * one that appears **earlier** in the `topics` array wins (stable sort).
11
+ *
12
+ * Defensive: topics whose `contexts` property is missing or empty are silently
13
+ * skipped, so partial seed coverage never throws or produces broken icons.
14
+ *
15
+ * @param topics - Full list of `IhelpTopic` objects (e.g. from `search.all_topics`).
16
+ * @param context_key - The dot-notation context key to look up
17
+ * (e.g. `"deductions.work_from_home"`).
18
+ * @returns The best-matching `IhelpTopic`, or `undefined` if none matched.
19
+ *
20
+ * @example
21
+ * ```ts
22
+ * const topic = resolveTopicForContext(search.all_topics, "income.salary");
23
+ * if (topic) { ... }
24
+ * ```
25
+ */
26
+ export declare function resolveTopicForContext(topics: IhelpTopic[], context_key: string): IhelpTopic | undefined;
27
+ /**
28
+ * Props for {@link TopicHoverIcon}.
29
+ *
30
+ * The component is intentionally thin: callers supply only a `context_key`
31
+ * and the icon resolves the matching topic from the `IhelpProvider` store on
32
+ * its own.
33
+ */
34
+ export interface TopicHoverIconProps {
35
+ /**
36
+ * Dot-notation key that identifies a location in the host application
37
+ * (e.g. `"deductions.work_from_home"`).
38
+ *
39
+ * The component calls {@link resolveTopicForContext} against the provider's
40
+ * `search.all_topics` list to find the best matching topic. If no topic is
41
+ * found, the component renders `null` (graceful no-op).
42
+ */
43
+ context_key: string;
44
+ /**
45
+ * Icon pixel size passed to the Lucide `HelpCircle` icon.
46
+ * The trigger button is sized to `size + 8` pixels square.
47
+ * @defaultValue 14
48
+ */
49
+ size?: number;
50
+ /**
51
+ * Which side of the trigger the hover card opens on.
52
+ * @defaultValue "top"
53
+ */
54
+ side?: "top" | "right" | "bottom" | "left";
55
+ /**
56
+ * Optional extra CSS class names applied to the trigger button.
57
+ */
58
+ className?: string;
59
+ }
60
+ /**
61
+ * A small circular `?` icon that shows a Radix HoverCard with the title and
62
+ * description of the help topic mapped to `context_key`.
63
+ *
64
+ * **How topics are resolved** — The component looks up the `IhelpProvider`
65
+ * context (via {@link useIhelpContextOptional}) and calls
66
+ * {@link resolveTopicForContext} against `search.all_topics`. The topic
67
+ * whose `contexts` array contains `{ key: context_key }` with the lowest
68
+ * `priority` value is selected.
69
+ *
70
+ * **No-op cases** — the component renders `null` (nothing) when:
71
+ * - it is rendered outside an `<IhelpProvider>` (provider absent),
72
+ * - the provider is still loading topics (`search.loading === true`),
73
+ * - no topic is mapped to `context_key` (partial seed coverage is safe).
74
+ *
75
+ * **Escalation** — The hover card footer contains a "Learn more →" button that
76
+ * closes the card and calls `open_search(context_key)` to open the full
77
+ * `IhelpSearchDialog` seeded to that context — giving users access to the
78
+ * topic's rich `content` without embedding it inline.
79
+ *
80
+ * **Touch / keyboard** — Like `HoverHelpIcon`, opens on hover on desktop and
81
+ * on tap / Enter for touch / keyboard users (controlled `open` state overlay).
82
+ *
83
+ * @example
84
+ * ```tsx
85
+ * // Renders nothing if no topic is mapped to this key
86
+ * <label>
87
+ * Work from home <TopicHoverIcon context_key="deductions.work_from_home" />
88
+ * </label>
89
+ * ```
90
+ */
91
+ export declare function TopicHoverIcon({ context_key, size, side, className, }: TopicHoverIconProps): React.JSX.Element | null;
92
+ //# sourceMappingURL=topic_hover_icon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"topic_hover_icon.d.ts","sourceRoot":"","sources":["../../src/components/topic_hover_icon.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAIxC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAOpD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,UAAU,EAAE,EACpB,WAAW,EAAE,MAAM,GAClB,UAAU,GAAG,SAAS,CAuBxB;AAMD;;;;;;GAMG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;;;;;OAOG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,IAAI,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAE3C;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,cAAc,CAAC,EAC7B,WAAW,EACX,IAAS,EACT,IAAY,EACZ,SAAS,GACV,EAAE,mBAAmB,4BA6ErB"}
@@ -0,0 +1,107 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useState } from "react";
4
+ import * as HoverCard from "@radix-ui/react-hover-card";
5
+ import { HelpCircle, ArrowRight } from "lucide-react";
6
+ import { cn } from "hazo_ui";
7
+ import { useIhelpContextOptional } from "./ihelp_provider.js";
8
+ // =============================================================================
9
+ // Pure resolver
10
+ // =============================================================================
11
+ /**
12
+ * Resolve the best topic for a context key: the topic whose `contexts` array
13
+ * contains an entry with `key === context_key`. When multiple topics match,
14
+ * the one with the **lowest** matching `contexts[].priority` wins. Returns
15
+ * `undefined` when no topic matches.
16
+ *
17
+ * Tie-break rule: if two topics share the same lowest matching priority, the
18
+ * one that appears **earlier** in the `topics` array wins (stable sort).
19
+ *
20
+ * Defensive: topics whose `contexts` property is missing or empty are silently
21
+ * skipped, so partial seed coverage never throws or produces broken icons.
22
+ *
23
+ * @param topics - Full list of `IhelpTopic` objects (e.g. from `search.all_topics`).
24
+ * @param context_key - The dot-notation context key to look up
25
+ * (e.g. `"deductions.work_from_home"`).
26
+ * @returns The best-matching `IhelpTopic`, or `undefined` if none matched.
27
+ *
28
+ * @example
29
+ * ```ts
30
+ * const topic = resolveTopicForContext(search.all_topics, "income.salary");
31
+ * if (topic) { ... }
32
+ * ```
33
+ */
34
+ export function resolveTopicForContext(topics, context_key) {
35
+ let best_topic;
36
+ let best_priority = Infinity;
37
+ for (const topic of topics) {
38
+ if (!Array.isArray(topic.contexts) || topic.contexts.length === 0) {
39
+ continue;
40
+ }
41
+ for (const ctx of topic.contexts) {
42
+ if (ctx.key === context_key) {
43
+ // Lower priority value wins; ties go to the earlier topic in the array
44
+ // (best_priority is still Infinity on the first match, so any priority
45
+ // wins initially).
46
+ if (ctx.priority < best_priority) {
47
+ best_topic = topic;
48
+ best_priority = ctx.priority;
49
+ }
50
+ break; // only count the first matching context entry per topic
51
+ }
52
+ }
53
+ }
54
+ return best_topic;
55
+ }
56
+ /**
57
+ * A small circular `?` icon that shows a Radix HoverCard with the title and
58
+ * description of the help topic mapped to `context_key`.
59
+ *
60
+ * **How topics are resolved** — The component looks up the `IhelpProvider`
61
+ * context (via {@link useIhelpContextOptional}) and calls
62
+ * {@link resolveTopicForContext} against `search.all_topics`. The topic
63
+ * whose `contexts` array contains `{ key: context_key }` with the lowest
64
+ * `priority` value is selected.
65
+ *
66
+ * **No-op cases** — the component renders `null` (nothing) when:
67
+ * - it is rendered outside an `<IhelpProvider>` (provider absent),
68
+ * - the provider is still loading topics (`search.loading === true`),
69
+ * - no topic is mapped to `context_key` (partial seed coverage is safe).
70
+ *
71
+ * **Escalation** — The hover card footer contains a "Learn more →" button that
72
+ * closes the card and calls `open_search(context_key)` to open the full
73
+ * `IhelpSearchDialog` seeded to that context — giving users access to the
74
+ * topic's rich `content` without embedding it inline.
75
+ *
76
+ * **Touch / keyboard** — Like `HoverHelpIcon`, opens on hover on desktop and
77
+ * on tap / Enter for touch / keyboard users (controlled `open` state overlay).
78
+ *
79
+ * @example
80
+ * ```tsx
81
+ * // Renders nothing if no topic is mapped to this key
82
+ * <label>
83
+ * Work from home <TopicHoverIcon context_key="deductions.work_from_home" />
84
+ * </label>
85
+ * ```
86
+ */
87
+ export function TopicHoverIcon({ context_key, size = 14, side = "top", className, }) {
88
+ const ctx = useIhelpContextOptional();
89
+ const [tap_open, set_tap_open] = useState(false);
90
+ // No-op: outside a provider
91
+ if (!ctx)
92
+ return null;
93
+ const { search, open_search } = ctx;
94
+ // No-op: still loading
95
+ if (search.loading)
96
+ return null;
97
+ // No-op: no matching topic
98
+ const topic = resolveTopicForContext(search.all_topics, context_key);
99
+ if (!topic)
100
+ return null;
101
+ const aria_label = `Help: ${topic.title}`;
102
+ return (_jsxs(HoverCard.Root, { openDelay: 120, closeDelay: 120, open: tap_open || undefined, onOpenChange: set_tap_open, children: [_jsx(HoverCard.Trigger, { asChild: true, children: _jsx("button", { type: "button", "aria-label": aria_label, onClick: () => set_tap_open((v) => !v), className: cn("inline-flex items-center justify-center rounded-full text-blue-600", "hover:bg-blue-100 hover:text-blue-800 transition-colors", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-400 focus-visible:ring-offset-1", className), style: { width: size + 8, height: size + 8 }, children: _jsx(HelpCircle, { size: size, "aria-hidden": true }) }) }), _jsx(HoverCard.Portal, { children: _jsxs(HoverCard.Content, { side: side, sideOffset: 8, align: "center", className: cn("z-50 max-w-sm rounded-lg border border-black/5 bg-white p-4 shadow-lg", "text-xs leading-relaxed text-slate-700"), children: [_jsx("p", { className: "mb-2 text-sm font-semibold text-slate-900", children: topic.title }), topic.description != null && (_jsx("div", { className: "whitespace-pre-line", children: topic.description })), _jsxs("button", { type: "button", onClick: () => {
103
+ set_tap_open(false);
104
+ open_search(context_key);
105
+ }, className: cn("mt-3 inline-flex items-center gap-1 text-xs font-semibold text-blue-600", "hover:text-blue-800 hover:underline", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-400 focus-visible:ring-offset-1 rounded"), children: ["Learn more", _jsx(ArrowRight, { size: 12, "aria-hidden": true })] }), _jsx(HoverCard.Arrow, { className: "fill-white" })] }) })] }));
106
+ }
107
+ //# sourceMappingURL=topic_hover_icon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"topic_hover_icon.js","sourceRoot":"","sources":["../../src/components/topic_hover_icon.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,KAAK,SAAS,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAE7B,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAE9D,gFAAgF;AAChF,gBAAgB;AAChB,gFAAgF;AAEhF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,UAAU,sBAAsB,CACpC,MAAoB,EACpB,WAAmB;IAEnB,IAAI,UAAkC,CAAC;IACvC,IAAI,aAAa,GAAG,QAAQ,CAAC;IAE7B,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;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IhelpContextOptional, } from './comp
15
15
  export { IhelpIcon } from './components/ihelp_icon.js';
16
16
  export { HoverHelpIcon, type HoverHelpIconProps } from './components/hover_help_icon.js';
17
17
  export { IhelpFieldHelp, type IhelpFieldHelpProps } from './components/ihelp_field_help.js';
18
+ export { TopicHoverIcon, resolveTopicForContext, type TopicHoverIconProps } from './components/topic_hover_icon.js';
18
19
  export { IhelpSearchDialog } from './components/ihelp_search_dialog.js';
19
20
  export { IhelpDetailPanel } from './components/ihelp_detail_panel.js';
20
21
  export * from './hooks/index.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.runtime.d.ts","sourceRoot":"","sources":["../src/index.runtime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EACL,aAAa,EACb,eAAe,EACf,uBAAuB,GACxB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACzF,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAC5F,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAGtE,cAAc,kBAAkB,CAAC;AAGjC,YAAY,EACV,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,sBAAsB,EACtB,qBAAqB,EACrB,UAAU,EACV,WAAW,EACX,cAAc,EACd,oBAAoB,GACrB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.runtime.d.ts","sourceRoot":"","sources":["../src/index.runtime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EACL,aAAa,EACb,eAAe,EACf,uBAAuB,GACxB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACzF,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAC5F,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,KAAK,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACpH,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAGtE,cAAc,kBAAkB,CAAC;AAGjC,YAAY,EACV,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,sBAAsB,EACtB,qBAAqB,EACrB,UAAU,EACV,WAAW,EACX,cAAc,EACd,oBAAoB,GACrB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC"}
@@ -15,6 +15,7 @@ export { IhelpProvider, useIhelpContext, useIhelpContextOptional, } from './comp
15
15
  export { IhelpIcon } from './components/ihelp_icon.js';
16
16
  export { HoverHelpIcon } from './components/hover_help_icon.js';
17
17
  export { IhelpFieldHelp } from './components/ihelp_field_help.js';
18
+ export { TopicHoverIcon, resolveTopicForContext } from './components/topic_hover_icon.js';
18
19
  export { IhelpSearchDialog } from './components/ihelp_search_dialog.js';
19
20
  export { IhelpDetailPanel } from './components/ihelp_detail_panel.js';
20
21
  // Hooks (client-safe, REST-backed)
@@ -1 +1 @@
1
- {"version":3,"file":"index.runtime.js","sourceRoot":"","sources":["../src/index.runtime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EACL,aAAa,EACb,eAAe,EACf,uBAAuB,GACxB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,aAAa,EAA2B,MAAM,iCAAiC,CAAC;AACzF,OAAO,EAAE,cAAc,EAA4B,MAAM,kCAAkC,CAAC;AAC5F,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAEtE,mCAAmC;AACnC,cAAc,kBAAkB,CAAC;AAmBjC,QAAQ;AACR,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.runtime.js","sourceRoot":"","sources":["../src/index.runtime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EACL,aAAa,EACb,eAAe,EACf,uBAAuB,GACxB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,aAAa,EAA2B,MAAM,iCAAiC,CAAC;AACzF,OAAO,EAAE,cAAc,EAA4B,MAAM,kCAAkC,CAAC;AAC5F,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAA4B,MAAM,kCAAkC,CAAC;AACpH,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAEtE,mCAAmC;AACnC,cAAc,kBAAkB,CAAC;AAmBjC,QAAQ;AACR,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hazo_ihelp",
3
- "version": "2.3.0",
3
+ "version": "2.4.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.client.js",
6
6
  "module": "./dist/index.client.js",
@@ -84,16 +84,17 @@
84
84
  "zod": "^4.1.12"
85
85
  },
86
86
  "peerDependencies": {
87
- "hazo_auth": "^10.4.1",
87
+ "hazo_auth": "^10.9.0",
88
88
  "hazo_chat": "^6.0.0",
89
- "hazo_config": "^2.3.0",
90
- "hazo_connect": "^3.8.0",
91
- "hazo_core": "^1.2.0",
92
- "hazo_files": "^3.1.0",
89
+ "hazo_config": "^2.4.1",
90
+ "hazo_connect": "^3.9.2",
91
+ "hazo_core": "^1.2.1",
92
+ "hazo_files": "^3.1.1",
93
93
  "hazo_llm_api": "^2.1.0",
94
94
  "hazo_logs": "^2.1.1",
95
95
  "hazo_notes": "^2.0.0",
96
- "hazo_ui": "^4.4.0",
96
+ "hazo_theme": "^1.0.1",
97
+ "hazo_ui": "^6.1.0",
97
98
  "next": "^14.0.0 || ^16.0.0",
98
99
  "react": "^18.0.0 || ^19.0.0",
99
100
  "react-dom": "^18.0.0 || ^19.0.0",
@@ -135,22 +136,25 @@
135
136
  },
136
137
  "sharp": {
137
138
  "optional": true
139
+ },
140
+ "hazo_theme": {
141
+ "optional": true
138
142
  }
139
143
  },
140
144
  "devDependencies": {
141
145
  "@types/node": "^20.14.10",
142
146
  "@types/react": "^18.3.3",
143
147
  "@types/react-dom": "^18.3.0",
144
- "hazo_auth": "^10.4.1",
148
+ "hazo_auth": "^10.9.0",
145
149
  "hazo_chat": "^6.0.0",
146
- "hazo_config": "^2.3.0",
147
- "hazo_connect": "^3.8.0",
148
- "hazo_core": "^1.2.0",
149
- "hazo_files": "^3.1.0",
150
+ "hazo_config": "^2.4.1",
151
+ "hazo_connect": "^3.9.2",
152
+ "hazo_core": "^1.2.1",
153
+ "hazo_files": "^3.1.1",
150
154
  "hazo_llm_api": "^2.1.0",
151
155
  "hazo_logs": "^2.1.1",
152
156
  "hazo_notes": "^2.0.0",
153
- "hazo_ui": "^4.4.0",
157
+ "hazo_ui": "^6.1.0",
154
158
  "next": "^16.0.10",
155
159
  "typescript": "^5.7.2"
156
160
  },