hazo_ihelp 2.2.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.
- package/README.md +9 -8
- package/dist/components/editor/editor_collapsible_section.d.ts +1 -1
- package/dist/components/editor/editor_collapsible_section.d.ts.map +1 -1
- package/dist/components/editor/editor_context_keys_section.d.ts +2 -1
- package/dist/components/editor/editor_context_keys_section.d.ts.map +1 -1
- package/dist/components/editor/editor_form.d.ts +2 -1
- package/dist/components/editor/editor_form.d.ts.map +1 -1
- package/dist/components/editor/editor_import_export.d.ts +3 -2
- package/dist/components/editor/editor_import_export.d.ts.map +1 -1
- package/dist/components/editor/editor_tags_section.d.ts +2 -1
- package/dist/components/editor/editor_tags_section.d.ts.map +1 -1
- package/dist/components/editor/editor_topic_list.d.ts +2 -1
- package/dist/components/editor/editor_topic_list.d.ts.map +1 -1
- package/dist/components/editor/editor_topic_list_item.d.ts +2 -1
- package/dist/components/editor/editor_topic_list_item.d.ts.map +1 -1
- package/dist/components/hover_help_icon.d.ts +11 -2
- package/dist/components/hover_help_icon.d.ts.map +1 -1
- package/dist/components/hover_help_icon.js +6 -3
- package/dist/components/hover_help_icon.js.map +1 -1
- package/dist/components/ihelp_detail_panel.d.ts +2 -1
- package/dist/components/ihelp_detail_panel.d.ts.map +1 -1
- package/dist/components/ihelp_editor.d.ts +2 -1
- package/dist/components/ihelp_editor.d.ts.map +1 -1
- package/dist/components/ihelp_field_help.d.ts +24 -2
- package/dist/components/ihelp_field_help.d.ts.map +1 -1
- package/dist/components/ihelp_field_help.js +18 -2
- package/dist/components/ihelp_field_help.js.map +1 -1
- package/dist/components/ihelp_icon.d.ts +2 -1
- package/dist/components/ihelp_icon.d.ts.map +1 -1
- package/dist/components/ihelp_provider.d.ts +11 -1
- package/dist/components/ihelp_provider.d.ts.map +1 -1
- package/dist/components/ihelp_provider.js +11 -0
- package/dist/components/ihelp_provider.js.map +1 -1
- package/dist/components/ihelp_rich_editor.d.ts +2 -1
- package/dist/components/ihelp_rich_editor.d.ts.map +1 -1
- package/dist/components/ihelp_search_dialog.d.ts +2 -1
- package/dist/components/ihelp_search_dialog.d.ts.map +1 -1
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +2 -1
- package/dist/components/index.js.map +1 -1
- package/dist/components/topic_hover_icon.d.ts +92 -0
- package/dist/components/topic_hover_icon.d.ts.map +1 -0
- package/dist/components/topic_hover_icon.js +107 -0
- package/dist/components/topic_hover_icon.js.map +1 -0
- package/dist/components/ui/dialog.d.ts +2 -2
- package/dist/index.runtime.d.ts +24 -0
- package/dist/index.runtime.d.ts.map +1 -0
- package/dist/index.runtime.js +25 -0
- package/dist/index.runtime.js.map +1 -0
- package/package.json +23 -15
package/README.md
CHANGED
|
@@ -16,16 +16,16 @@ npm install hazo_ihelp
|
|
|
16
16
|
| `react-dom` | ^18 or ^19 | Required |
|
|
17
17
|
| `tailwindcss` | ^4.2.4 | Required for styling |
|
|
18
18
|
| `@tailwindcss/typography` | >=0.5.0 | Required — `prose` classes for rich content rendering |
|
|
19
|
-
| `hazo_core` | ^1.
|
|
20
|
-
| `hazo_ui` | ^
|
|
19
|
+
| `hazo_core` | ^1.2.0 | Required — error classes, correlation IDs, config/logger |
|
|
20
|
+
| `hazo_ui` | ^4.4.0 | Required — shared UI primitives + `cn()` |
|
|
21
21
|
| `next` | ^14 or ^16 | Optional — needed for API handlers |
|
|
22
|
-
| `hazo_connect` | ^3.
|
|
23
|
-
| `hazo_config` | ^2.
|
|
24
|
-
| `hazo_logs` | ^2.
|
|
25
|
-
| `hazo_auth` | ^10.
|
|
22
|
+
| `hazo_connect` | ^3.8.0 | Optional — needed for API handlers |
|
|
23
|
+
| `hazo_config` | ^2.3.0 | Optional — INI config loading |
|
|
24
|
+
| `hazo_logs` | ^2.1.1 | Optional — structured logging |
|
|
25
|
+
| `hazo_auth` | ^10.4.1 | Optional — multi-tenant scoping |
|
|
26
26
|
| `hazo_chat` | ^6.0.0 | Optional |
|
|
27
|
-
| `hazo_files` | ^3.
|
|
28
|
-
| `hazo_llm_api` | ^2.
|
|
27
|
+
| `hazo_files` | ^3.1.0 | Optional — image upload handling |
|
|
28
|
+
| `hazo_llm_api` | ^2.1.0 | Optional |
|
|
29
29
|
| `hazo_notes` | ^2.0.0 | Optional |
|
|
30
30
|
|
|
31
31
|
## Tailwind v4 Setup (Required)
|
|
@@ -235,6 +235,7 @@ Full CRUD editor for managing help topics (tags and context mappings are embedde
|
|
|
235
235
|
| Import path | Contents |
|
|
236
236
|
|-------------|----------|
|
|
237
237
|
| `hazo_ihelp` | Client components: `IhelpProvider`, `IhelpIcon`, `IhelpFieldHelp`, `IhelpSearchDialog`, `IhelpDetailPanel` |
|
|
238
|
+
| `hazo_ihelp/runtime` | Lean runtime entry — help consumption surface (provider, icons, search dialog, detail panel, field help, hooks) **without** the Tiptap/dnd-kit editor. Use this in consumers that only need to *display* help, not author it. |
|
|
238
239
|
| `hazo_ihelp/api` | Server handlers: `createIhelpHandler`, `createImageUploadHandler`, `createConfigHandler` |
|
|
239
240
|
| `hazo_ihelp/hooks` | Hooks: `use_ihelp`, `use_ihelp_search`, `use_ihelp_editor`, `use_ihelp_config` |
|
|
240
241
|
| `hazo_ihelp/components` | All components including `IhelpEditor` and UI primitives |
|
|
@@ -6,6 +6,6 @@ interface CollapsibleSectionProps {
|
|
|
6
6
|
defaultOpen?: boolean;
|
|
7
7
|
children: React.ReactNode;
|
|
8
8
|
}
|
|
9
|
-
export declare function CollapsibleSection({ icon, label, badge, defaultOpen, children, }: CollapsibleSectionProps):
|
|
9
|
+
export declare function CollapsibleSection({ icon, label, badge, defaultOpen, children, }: CollapsibleSectionProps): React.JSX.Element;
|
|
10
10
|
export {};
|
|
11
11
|
//# sourceMappingURL=editor_collapsible_section.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor_collapsible_section.d.ts","sourceRoot":"","sources":["../../../src/components/editor/editor_collapsible_section.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,UAAU,uBAAuB;IAC/B,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,wBAAgB,kBAAkB,CAAC,EACjC,IAAI,EACJ,KAAK,EACL,KAAK,EACL,WAAmB,EACnB,QAAQ,GACT,EAAE,uBAAuB,
|
|
1
|
+
{"version":3,"file":"editor_collapsible_section.d.ts","sourceRoot":"","sources":["../../../src/components/editor/editor_collapsible_section.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,UAAU,uBAAuB;IAC/B,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,wBAAgB,kBAAkB,CAAC,EACjC,IAAI,EACJ,KAAK,EACL,KAAK,EACL,WAAmB,EACnB,QAAQ,GACT,EAAE,uBAAuB,qBAsCzB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import type { ContextKeyOption } from '../../types/index.js';
|
|
2
3
|
interface EditorContextKeysSectionProps {
|
|
3
4
|
context_keys: string[];
|
|
@@ -8,6 +9,6 @@ interface EditorContextKeysSectionProps {
|
|
|
8
9
|
onRemove: (index: number) => void;
|
|
9
10
|
onManageKeys?: (keys: ContextKeyOption[]) => void;
|
|
10
11
|
}
|
|
11
|
-
export declare function EditorContextKeysSection({ context_keys, available_keys, available_keys_loading, defaultOpen, onAdd, onRemove, onManageKeys, }: EditorContextKeysSectionProps):
|
|
12
|
+
export declare function EditorContextKeysSection({ context_keys, available_keys, available_keys_loading, defaultOpen, onAdd, onRemove, onManageKeys, }: EditorContextKeysSectionProps): React.JSX.Element;
|
|
12
13
|
export {};
|
|
13
14
|
//# sourceMappingURL=editor_context_keys_section.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor_context_keys_section.d.ts","sourceRoot":"","sources":["../../../src/components/editor/editor_context_keys_section.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"editor_context_keys_section.d.ts","sourceRoot":"","sources":["../../../src/components/editor/editor_context_keys_section.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAU7D,UAAU,6BAA6B;IACrC,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,cAAc,EAAE,gBAAgB,EAAE,CAAC;IACnC,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,gBAAgB,EAAE,KAAK,IAAI,CAAC;CACnD;AAwMD,wBAAgB,wBAAwB,CAAC,EACvC,YAAY,EACZ,cAAc,EACd,sBAAsB,EACtB,WAAW,EACX,KAAK,EACL,QAAQ,EACR,YAAY,GACb,EAAE,6BAA6B,qBAwE/B"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import type { IhelpTopic, IhelpTopicInput, IhelpTagInput, ContextKeyOption } from '../../types/index.js';
|
|
2
3
|
interface EditorFormProps {
|
|
3
4
|
form: IhelpTopicInput;
|
|
@@ -22,6 +23,6 @@ interface EditorFormProps {
|
|
|
22
23
|
upload_url?: string;
|
|
23
24
|
scope_id?: string | null;
|
|
24
25
|
}
|
|
25
|
-
export declare function EditorForm({ form, form_tags, form_context_keys, is_new, saving, save_error, selected_id, topics, categories, onUpdateField, onAddTag, onRemoveTag, onAddContextKey, onRemoveContextKey, available_context_keys, available_context_keys_loading, onManageContextKeys, onSave, onDelete, upload_url, scope_id, }: EditorFormProps):
|
|
26
|
+
export declare function EditorForm({ form, form_tags, form_context_keys, is_new, saving, save_error, selected_id, topics, categories, onUpdateField, onAddTag, onRemoveTag, onAddContextKey, onRemoveContextKey, available_context_keys, available_context_keys_loading, onManageContextKeys, onSave, onDelete, upload_url, scope_id, }: EditorFormProps): React.JSX.Element;
|
|
26
27
|
export {};
|
|
27
28
|
//# sourceMappingURL=editor_form.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor_form.d.ts","sourceRoot":"","sources":["../../../src/components/editor/editor_form.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"editor_form.d.ts","sourceRoot":"","sources":["../../../src/components/editor/editor_form.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAazG,UAAU,eAAe;IACvB,IAAI,EAAE,eAAe,CAAC;IACtB,SAAS,EAAE,aAAa,EAAE,CAAC;IAC3B,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,MAAM,EAAE,UAAU,EAAE,CAAC;IACrB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,aAAa,EAAE,CAAC,CAAC,SAAS,MAAM,eAAe,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IAC5F,QAAQ,EAAE,CAAC,GAAG,EAAE,aAAa,KAAK,IAAI,CAAC;IACvC,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,eAAe,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,kBAAkB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,sBAAsB,EAAE,gBAAgB,EAAE,CAAC;IAC3C,8BAA8B,CAAC,EAAE,OAAO,CAAC;IACzC,mBAAmB,CAAC,EAAE,CAAC,IAAI,EAAE,gBAAgB,EAAE,KAAK,IAAI,CAAC;IACzD,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,SAAS,EACT,iBAAiB,EACjB,MAAM,EACN,MAAM,EACN,UAAU,EACV,WAAW,EACX,MAAM,EACN,UAAU,EACV,aAAa,EACb,QAAQ,EACR,WAAW,EACX,eAAe,EACf,kBAAkB,EAClB,sBAAsB,EACtB,8BAA8B,EAC9B,mBAAmB,EACnB,MAAM,EACN,QAAQ,EACR,UAAU,EACV,QAAQ,GACT,EAAE,eAAe,qBAkNjB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import type { IhelpTopic, IhelpTopicInput } from '../../types/index.js';
|
|
2
3
|
export declare function use_export_topics(topics: IhelpTopic[]): () => void;
|
|
3
4
|
interface ImportDialogProps {
|
|
@@ -6,11 +7,11 @@ interface ImportDialogProps {
|
|
|
6
7
|
create_topic: (input: IhelpTopicInput) => Promise<IhelpTopic>;
|
|
7
8
|
refetch: () => void;
|
|
8
9
|
}
|
|
9
|
-
export declare function ImportDialog({ open, onOpenChange, create_topic, refetch, }: ImportDialogProps):
|
|
10
|
+
export declare function ImportDialog({ open, onOpenChange, create_topic, refetch, }: ImportDialogProps): React.JSX.Element;
|
|
10
11
|
interface ImportExportMenuProps {
|
|
11
12
|
onExport: () => void;
|
|
12
13
|
onImport: () => void;
|
|
13
14
|
}
|
|
14
|
-
export declare function ImportExportButtons({ onExport, onImport }: ImportExportMenuProps):
|
|
15
|
+
export declare function ImportExportButtons({ onExport, onImport }: ImportExportMenuProps): React.JSX.Element;
|
|
15
16
|
export {};
|
|
16
17
|
//# sourceMappingURL=editor_import_export.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor_import_export.d.ts","sourceRoot":"","sources":["../../../src/components/editor/editor_import_export.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"editor_import_export.d.ts","sourceRoot":"","sources":["../../../src/components/editor/editor_import_export.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAiB,MAAM,sBAAsB,CAAC;AAkCvF,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,UAAU,EAAE,cAYrD;AAMD,UAAU,iBAAiB;IACzB,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,YAAY,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;IAC9D,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,wBAAgB,YAAY,CAAC,EAC3B,IAAI,EACJ,YAAY,EACZ,YAAY,EACZ,OAAO,GACR,EAAE,iBAAiB,qBAiJnB;AAMD,UAAU,qBAAqB;IAC7B,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,wBAAgB,mBAAmB,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,qBAAqB,qBAqBhF"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import type { IhelpTagInput } from '../../types/index.js';
|
|
2
3
|
interface EditorTagsSectionProps {
|
|
3
4
|
tags: IhelpTagInput[];
|
|
@@ -5,6 +6,6 @@ interface EditorTagsSectionProps {
|
|
|
5
6
|
onAdd: (tag: IhelpTagInput) => void;
|
|
6
7
|
onRemove: (index: number) => void;
|
|
7
8
|
}
|
|
8
|
-
export declare function EditorTagsSection({ tags, defaultOpen, onAdd, onRemove }: EditorTagsSectionProps):
|
|
9
|
+
export declare function EditorTagsSection({ tags, defaultOpen, onAdd, onRemove }: EditorTagsSectionProps): React.JSX.Element;
|
|
9
10
|
export {};
|
|
10
11
|
//# sourceMappingURL=editor_tags_section.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor_tags_section.d.ts","sourceRoot":"","sources":["../../../src/components/editor/editor_tags_section.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"editor_tags_section.d.ts","sourceRoot":"","sources":["../../../src/components/editor/editor_tags_section.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAO1D,UAAU,sBAAsB;IAC9B,IAAI,EAAE,aAAa,EAAE,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,EAAE,CAAC,GAAG,EAAE,aAAa,KAAK,IAAI,CAAC;IACpC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED,wBAAgB,iBAAiB,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,sBAAsB,qBAsF/F"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import type { IhelpTopic } from '../../types/index.js';
|
|
2
3
|
interface EditorTopicListProps {
|
|
3
4
|
topics: IhelpTopic[];
|
|
@@ -11,6 +12,6 @@ interface EditorTopicListProps {
|
|
|
11
12
|
onDeleteSelected: () => void;
|
|
12
13
|
onDeleteAll: () => void;
|
|
13
14
|
}
|
|
14
|
-
export declare function EditorTopicList({ topics, loading, error, selected_id, onSelect, onNew, onExport, onImport, onDeleteSelected, onDeleteAll, }: EditorTopicListProps):
|
|
15
|
+
export declare function EditorTopicList({ topics, loading, error, selected_id, onSelect, onNew, onExport, onImport, onDeleteSelected, onDeleteAll, }: EditorTopicListProps): React.JSX.Element;
|
|
15
16
|
export {};
|
|
16
17
|
//# sourceMappingURL=editor_topic_list.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor_topic_list.d.ts","sourceRoot":"","sources":["../../../src/components/editor/editor_topic_list.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"editor_topic_list.d.ts","sourceRoot":"","sources":["../../../src/components/editor/editor_topic_list.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAOvD,UAAU,oBAAoB;IAC5B,MAAM,EAAE,UAAU,EAAE,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,WAAW,EAAE,MAAM,IAAI,CAAC;CACzB;AAED,wBAAgB,eAAe,CAAC,EAC9B,MAAM,EACN,OAAO,EACP,KAAK,EACL,WAAW,EACX,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,gBAAgB,EAChB,WAAW,GACZ,EAAE,oBAAoB,qBA8JtB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import type { IhelpTopic } from '../../types/index.js';
|
|
2
3
|
interface TopicListItemProps {
|
|
3
4
|
topic: IhelpTopic;
|
|
@@ -5,6 +6,6 @@ interface TopicListItemProps {
|
|
|
5
6
|
selected: boolean;
|
|
6
7
|
onSelect: (id: string) => void;
|
|
7
8
|
}
|
|
8
|
-
export declare function TopicListItem({ topic, depth, selected, onSelect }: TopicListItemProps):
|
|
9
|
+
export declare function TopicListItem({ topic, depth, selected, onSelect }: TopicListItemProps): React.JSX.Element;
|
|
9
10
|
export {};
|
|
10
11
|
//# sourceMappingURL=editor_topic_list_item.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor_topic_list_item.d.ts","sourceRoot":"","sources":["../../../src/components/editor/editor_topic_list_item.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"editor_topic_list_item.d.ts","sourceRoot":"","sources":["../../../src/components/editor/editor_topic_list_item.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAGvD,UAAU,kBAAkB;IAC1B,KAAK,EAAE,UAAU,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CAChC;AAED,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,kBAAkB,qBAuBrF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ReactNode } from "react";
|
|
1
|
+
import React, { type ReactNode } from "react";
|
|
2
2
|
export interface HoverHelpIconProps {
|
|
3
3
|
/** Heading shown at the top of the hover card. Plain text. */
|
|
4
4
|
title: string;
|
|
@@ -18,6 +18,15 @@ export interface HoverHelpIconProps {
|
|
|
18
18
|
className?: string;
|
|
19
19
|
/** Optional extra className for the hover card container. */
|
|
20
20
|
content_className?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Optional callback wired to a "More" link rendered at the foot of the
|
|
23
|
+
* hover card. Use it to escalate from the short inline blurb to fuller
|
|
24
|
+
* help — e.g. opening the `IhelpProvider` search dialog for a context key.
|
|
25
|
+
* When omitted, no "More" link is shown.
|
|
26
|
+
*/
|
|
27
|
+
on_more?: () => void;
|
|
28
|
+
/** Label for the optional "More" link. Default "More". */
|
|
29
|
+
more_label?: string;
|
|
21
30
|
}
|
|
22
31
|
/**
|
|
23
32
|
* Standalone "?" icon that opens a Radix HoverCard with a titled help body.
|
|
@@ -35,5 +44,5 @@ export interface HoverHelpIconProps {
|
|
|
35
44
|
* For topic-store-backed help (full rich content, search, editor), keep
|
|
36
45
|
* using `IhelpIcon` which delegates to the provider's `open_search`.
|
|
37
46
|
*/
|
|
38
|
-
export declare function HoverHelpIcon({ title, body, aria_label, size, side, className, content_className, }: HoverHelpIconProps):
|
|
47
|
+
export declare function HoverHelpIcon({ title, body, aria_label, size, side, className, content_className, on_more, more_label, }: HoverHelpIconProps): React.JSX.Element;
|
|
39
48
|
//# sourceMappingURL=hover_help_icon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hover_help_icon.d.ts","sourceRoot":"","sources":["../../src/components/hover_help_icon.tsx"],"names":[],"mappings":"AAEA,
|
|
1
|
+
{"version":3,"file":"hover_help_icon.d.ts","sourceRoot":"","sources":["../../src/components/hover_help_icon.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAKxD,MAAM,WAAW,kBAAkB;IACjC,8DAA8D;IAC9D,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,IAAI,EAAE,SAAS,CAAC;IAChB,8EAA8E;IAC9E,UAAU,EAAE,MAAM,CAAC;IACnB,oCAAoC;IACpC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wDAAwD;IACxD,IAAI,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC3C,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6DAA6D;IAC7D,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,0DAA0D;IAC1D,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,IAAI,EACJ,UAAU,EACV,IAAS,EACT,IAAY,EACZ,SAAS,EACT,iBAAiB,EACjB,OAAO,EACP,UAAmB,GACpB,EAAE,kBAAkB,qBAmEpB"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useState } from "react";
|
|
4
4
|
import * as HoverCard from "@radix-ui/react-hover-card";
|
|
5
|
-
import { HelpCircle } from "lucide-react";
|
|
5
|
+
import { HelpCircle, ArrowRight } from "lucide-react";
|
|
6
6
|
import { cn } from 'hazo_ui';
|
|
7
7
|
/**
|
|
8
8
|
* Standalone "?" icon that opens a Radix HoverCard with a titled help body.
|
|
@@ -20,10 +20,13 @@ import { cn } from 'hazo_ui';
|
|
|
20
20
|
* For topic-store-backed help (full rich content, search, editor), keep
|
|
21
21
|
* using `IhelpIcon` which delegates to the provider's `open_search`.
|
|
22
22
|
*/
|
|
23
|
-
export function HoverHelpIcon({ title, body, aria_label, size = 14, side = "top", className, content_className, }) {
|
|
23
|
+
export function HoverHelpIcon({ title, body, aria_label, size = 14, side = "top", className, content_className, on_more, more_label = "More", }) {
|
|
24
24
|
// HoverCard ignores touch events by design (Radix decision: hover semantics
|
|
25
25
|
// are pointer-only). Pair it with a click toggle so taps still open it.
|
|
26
26
|
const [tap_open, set_tap_open] = useState(false);
|
|
27
|
-
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", content_className), children: [_jsx("p", { className: "mb-2 text-sm font-semibold text-slate-900", children: title }), typeof body === "string" ? (_jsx("div", { className: "whitespace-pre-line", children: body })) : (body),
|
|
27
|
+
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", content_className), children: [_jsx("p", { className: "mb-2 text-sm font-semibold text-slate-900", children: title }), typeof body === "string" ? (_jsx("div", { className: "whitespace-pre-line", children: body })) : (body), on_more && (_jsxs("button", { type: "button", onClick: () => {
|
|
28
|
+
set_tap_open(false);
|
|
29
|
+
on_more();
|
|
30
|
+
}, 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: [more_label, _jsx(ArrowRight, { size: 12, "aria-hidden": true })] })), _jsx(HoverCard.Arrow, { className: "fill-white" })] }) })] }));
|
|
28
31
|
}
|
|
29
32
|
//# sourceMappingURL=hover_help_icon.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hover_help_icon.js","sourceRoot":"","sources":["../../src/components/hover_help_icon.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAc,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AACxD,OAAO,KAAK,SAAS,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"hover_help_icon.js","sourceRoot":"","sources":["../../src/components/hover_help_icon.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAc,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AACxD,OAAO,KAAK,SAAS,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,EAAE,EAAE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AAC,qBAAqB,YAAE,IAAI,GAAO,CAClD,CAAC,CAAC,CAAC,CACF,IAAI,CACL,EACA,OAAO,IAAI,CACV,kBACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,GAAG,EAAE;gCACZ,YAAY,CAAC,KAAK,CAAC,CAAC;gCACpB,OAAO,EAAE,CAAC;4BACZ,CAAC,EACD,SAAS,EAAE,EAAE,CACX,yEAAyE,EACzE,qCAAqC,EACrC,iHAAiH,CAClH,aAEA,UAAU,EACX,KAAC,UAAU,IAAC,IAAI,EAAE,EAAE,wBAAgB,IAC7B,CACV,EACD,KAAC,SAAS,CAAC,KAAK,IAAC,SAAS,EAAC,YAAY,GAAG,IACxB,GACH,IACJ,CAClB,CAAC;AACJ,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { IhelpDetailPanelProps, IhelpLabels } from '../types/index.js';
|
|
2
3
|
/**
|
|
3
4
|
* Rich detail view for a single help topic.
|
|
@@ -12,5 +13,5 @@ export declare function IhelpDetailPanel({ topic, onNavigate, className, asset_b
|
|
|
12
13
|
asset_base_url?: string;
|
|
13
14
|
provider_scope_id?: string | null;
|
|
14
15
|
labels?: Partial<IhelpLabels>;
|
|
15
|
-
}):
|
|
16
|
+
}): React.JSX.Element;
|
|
16
17
|
//# sourceMappingURL=ihelp_detail_panel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ihelp_detail_panel.d.ts","sourceRoot":"","sources":["../../src/components/ihelp_detail_panel.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ihelp_detail_panel.d.ts","sourceRoot":"","sources":["../../src/components/ihelp_detail_panel.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAAE,qBAAqB,EAAE,WAAW,EAAc,MAAM,mBAAmB,CAAC;AAgCxF;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,KAAK,EACL,UAAU,EACV,SAAS,EACT,cAAc,EACd,iBAAiB,EACjB,MAAM,GACP,EAAE,qBAAqB,GAAG;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,MAAM,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;CAC/B,qBAiFA"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import type { IhelpEditorProps } from '../types/index.js';
|
|
2
|
-
export declare function IhelpEditor({ scope_id, className, api_url, upload_url, config_api_url }: IhelpEditorProps):
|
|
3
|
+
export declare function IhelpEditor({ scope_id, className, api_url, upload_url, config_api_url }: IhelpEditorProps): React.JSX.Element;
|
|
3
4
|
//# sourceMappingURL=ihelp_editor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ihelp_editor.d.ts","sourceRoot":"","sources":["../../src/components/ihelp_editor.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ihelp_editor.d.ts","sourceRoot":"","sources":["../../src/components/ihelp_editor.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,gBAAgB,EAAgE,MAAM,mBAAmB,CAAC;AAkDxH,wBAAgB,WAAW,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,EAAE,gBAAgB,qBA0OzG"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ReactNode } from "react";
|
|
1
|
+
import React, { type ReactNode } from "react";
|
|
2
2
|
export interface IhelpFieldHelpProps {
|
|
3
3
|
/** Field name/label — used as the hover card title. */
|
|
4
4
|
title: string;
|
|
@@ -10,6 +10,17 @@ export interface IhelpFieldHelpProps {
|
|
|
10
10
|
side?: "top" | "right" | "bottom" | "left";
|
|
11
11
|
/** Extra className for the trigger button. */
|
|
12
12
|
className?: string;
|
|
13
|
+
/**
|
|
14
|
+
* When set, the hover card shows a "More" link that opens the
|
|
15
|
+
* `IhelpProvider` search dialog scoped to this context key — escalating
|
|
16
|
+
* from the short inline blurb to the full topic-store help.
|
|
17
|
+
*
|
|
18
|
+
* Requires an ancestor `<IhelpProvider>`; if none is present the "More"
|
|
19
|
+
* link is omitted (the hover blurb still renders).
|
|
20
|
+
*/
|
|
21
|
+
more_context_key?: string;
|
|
22
|
+
/** Label for the "More" link. Default "More". */
|
|
23
|
+
more_label?: string;
|
|
13
24
|
}
|
|
14
25
|
/**
|
|
15
26
|
* Inline help icon for form field labels.
|
|
@@ -17,11 +28,22 @@ export interface IhelpFieldHelpProps {
|
|
|
17
28
|
* Thin wrapper over HoverHelpIcon with defaults tuned for the field-label
|
|
18
29
|
* context: smaller icon, aria_label auto-derived from title.
|
|
19
30
|
*
|
|
31
|
+
* Pass `more_context_key` to add a "More" link in the hover card that opens
|
|
32
|
+
* the provider's search dialog for richer, topic-store-backed help.
|
|
33
|
+
*
|
|
20
34
|
* @example
|
|
21
35
|
* <label className="flex items-center gap-1">
|
|
22
36
|
* Tax File Number
|
|
23
37
|
* <IhelpFieldHelp title="Tax File Number" body="Your 9-digit TFN issued by the ATO." />
|
|
24
38
|
* </label>
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* // Escalate to the full help dialog on "More"
|
|
42
|
+
* <IhelpFieldHelp
|
|
43
|
+
* title="Sponsorship"
|
|
44
|
+
* body="CHESS vs custodial in one line."
|
|
45
|
+
* more_context_key="broker.sponsorship"
|
|
46
|
+
* />
|
|
25
47
|
*/
|
|
26
|
-
export declare function IhelpFieldHelp({ title, body, size, side, className, }: IhelpFieldHelpProps):
|
|
48
|
+
export declare function IhelpFieldHelp({ title, body, size, side, className, more_context_key, more_label, }: IhelpFieldHelpProps): React.JSX.Element;
|
|
27
49
|
//# sourceMappingURL=ihelp_field_help.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ihelp_field_help.d.ts","sourceRoot":"","sources":["../../src/components/ihelp_field_help.tsx"],"names":[],"mappings":"AAEA,
|
|
1
|
+
{"version":3,"file":"ihelp_field_help.d.ts","sourceRoot":"","sources":["../../src/components/ihelp_field_help.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAI9C,MAAM,WAAW,mBAAmB;IAClC,uDAAuD;IACvD,KAAK,EAAE,MAAM,CAAC;IACd,8EAA8E;IAC9E,IAAI,EAAE,SAAS,CAAC;IAChB,mCAAmC;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,sCAAsC;IACtC,IAAI,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC3C,8CAA8C;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;;OAOG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iDAAiD;IACjD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,IAAI,EACJ,IAAS,EACT,IAAY,EACZ,SAAS,EACT,gBAAgB,EAChB,UAAU,GACX,EAAE,mBAAmB,qBAmBrB"}
|
|
@@ -1,19 +1,35 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { HoverHelpIcon } from "./hover_help_icon.js";
|
|
4
|
+
import { useIhelpContextOptional } from "./ihelp_provider.js";
|
|
4
5
|
/**
|
|
5
6
|
* Inline help icon for form field labels.
|
|
6
7
|
*
|
|
7
8
|
* Thin wrapper over HoverHelpIcon with defaults tuned for the field-label
|
|
8
9
|
* context: smaller icon, aria_label auto-derived from title.
|
|
9
10
|
*
|
|
11
|
+
* Pass `more_context_key` to add a "More" link in the hover card that opens
|
|
12
|
+
* the provider's search dialog for richer, topic-store-backed help.
|
|
13
|
+
*
|
|
10
14
|
* @example
|
|
11
15
|
* <label className="flex items-center gap-1">
|
|
12
16
|
* Tax File Number
|
|
13
17
|
* <IhelpFieldHelp title="Tax File Number" body="Your 9-digit TFN issued by the ATO." />
|
|
14
18
|
* </label>
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* // Escalate to the full help dialog on "More"
|
|
22
|
+
* <IhelpFieldHelp
|
|
23
|
+
* title="Sponsorship"
|
|
24
|
+
* body="CHESS vs custodial in one line."
|
|
25
|
+
* more_context_key="broker.sponsorship"
|
|
26
|
+
* />
|
|
15
27
|
*/
|
|
16
|
-
export function IhelpFieldHelp({ title, body, size = 13, side = "top", className, }) {
|
|
17
|
-
|
|
28
|
+
export function IhelpFieldHelp({ title, body, size = 13, side = "top", className, more_context_key, more_label, }) {
|
|
29
|
+
const ctx = useIhelpContextOptional();
|
|
30
|
+
const on_more = more_context_key && ctx
|
|
31
|
+
? () => ctx.open_search(more_context_key)
|
|
32
|
+
: undefined;
|
|
33
|
+
return (_jsx(HoverHelpIcon, { title: title, body: body, aria_label: `Help for ${title}`, size: size, side: side, className: className, on_more: on_more, more_label: more_label }));
|
|
18
34
|
}
|
|
19
35
|
//# sourceMappingURL=ihelp_field_help.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ihelp_field_help.js","sourceRoot":"","sources":["../../src/components/ihelp_field_help.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"ihelp_field_help.js","sourceRoot":"","sources":["../../src/components/ihelp_field_help.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AA0B9D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,UAAU,cAAc,CAAC,EAC7B,KAAK,EACL,IAAI,EACJ,IAAI,GAAG,EAAE,EACT,IAAI,GAAG,KAAK,EACZ,SAAS,EACT,gBAAgB,EAChB,UAAU,GACU;IACpB,MAAM,GAAG,GAAG,uBAAuB,EAAE,CAAC;IACtC,MAAM,OAAO,GACX,gBAAgB,IAAI,GAAG;QACrB,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,WAAW,CAAC,gBAAgB,CAAC;QACzC,CAAC,CAAC,SAAS,CAAC;IAEhB,OAAO,CACL,KAAC,aAAa,IACZ,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,YAAY,KAAK,EAAE,EAC/B,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,UAAU,GACtB,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { IhelpIconProps } from '../types/index.js';
|
|
2
3
|
/**
|
|
3
4
|
* Small blue "i" icon that opens the help search dialog scoped to the
|
|
4
5
|
* given context_key.
|
|
5
6
|
*/
|
|
6
|
-
export declare function IhelpIcon({ context_key, size, className }: IhelpIconProps):
|
|
7
|
+
export declare function IhelpIcon({ context_key, size, className }: IhelpIconProps): React.JSX.Element;
|
|
7
8
|
//# sourceMappingURL=ihelp_icon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ihelp_icon.d.ts","sourceRoot":"","sources":["../../src/components/ihelp_icon.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ihelp_icon.d.ts","sourceRoot":"","sources":["../../src/components/ihelp_icon.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExD;;;GAGG;AACH,wBAAgB,SAAS,CAAC,EAAE,WAAW,EAAE,IAAS,EAAE,SAAS,EAAE,EAAE,cAAc,qBAmB9E"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { IhelpProviderProps, IhelpTheme, IhelpLabels, UseIhelpSearchResult } from '../types/index.js';
|
|
2
3
|
interface IhelpContextValue {
|
|
3
4
|
api_base_url: string;
|
|
@@ -16,6 +17,15 @@ interface IhelpContextValue {
|
|
|
16
17
|
* Hook to consume the ihelp context. Must be called inside <IhelpProvider>.
|
|
17
18
|
*/
|
|
18
19
|
export declare function useIhelpContext(): IhelpContextValue;
|
|
19
|
-
|
|
20
|
+
/**
|
|
21
|
+
* Non-throwing variant of {@link useIhelpContext}. Returns `null` when called
|
|
22
|
+
* outside an `<IhelpProvider>` instead of throwing.
|
|
23
|
+
*
|
|
24
|
+
* Used by provider-optional components (e.g. `HoverHelpIcon` / `IhelpFieldHelp`)
|
|
25
|
+
* that want to wire a "More" affordance to the search dialog when a provider is
|
|
26
|
+
* present, while still rendering correctly when one is not.
|
|
27
|
+
*/
|
|
28
|
+
export declare function useIhelpContextOptional(): IhelpContextValue | null;
|
|
29
|
+
export declare function IhelpProvider({ children, api_base_url, scope_id, search_shortcut, enable_shortcuts, asset_base_url, theme, labels, }: IhelpProviderProps): React.JSX.Element;
|
|
20
30
|
export {};
|
|
21
31
|
//# sourceMappingURL=ihelp_provider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ihelp_provider.d.ts","sourceRoot":"","sources":["../../src/components/ihelp_provider.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ihelp_provider.d.ts","sourceRoot":"","sources":["../../src/components/ihelp_provider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAsE,MAAM,OAAO,CAAC;AAE3F,OAAO,KAAK,EAAE,kBAAkB,EAAE,UAAU,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAQ3G,UAAU,iBAAiB;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACpC,cAAc,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,KAAK,EAAE,UAAU,GAAG,SAAS,CAAC;IAC9B,MAAM,EAAE,WAAW,GAAG,SAAS,CAAC;IAChC,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,CAAC,WAAW,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,MAAM,EAAE,oBAAoB,CAAC;IAC7B,uEAAuE;IACvE,mBAAmB,EAAE,MAAM,GAAG,SAAS,CAAC;CACzC;AAID;;GAEG;AACH,wBAAgB,eAAe,IAAI,iBAAiB,CAUnD;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,IAAI,iBAAiB,GAAG,IAAI,CAElE;AAMD,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,YAA2B,EAC3B,QAAQ,EACR,eAAyB,EACzB,gBAAuB,EACvB,cAAc,EACd,KAAK,EACL,MAAM,GACP,EAAE,kBAAkB,qBAgFpB"}
|
|
@@ -19,6 +19,17 @@ export function useIhelpContext() {
|
|
|
19
19
|
}
|
|
20
20
|
return ctx;
|
|
21
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* Non-throwing variant of {@link useIhelpContext}. Returns `null` when called
|
|
24
|
+
* outside an `<IhelpProvider>` instead of throwing.
|
|
25
|
+
*
|
|
26
|
+
* Used by provider-optional components (e.g. `HoverHelpIcon` / `IhelpFieldHelp`)
|
|
27
|
+
* that want to wire a "More" affordance to the search dialog when a provider is
|
|
28
|
+
* present, while still rendering correctly when one is not.
|
|
29
|
+
*/
|
|
30
|
+
export function useIhelpContextOptional() {
|
|
31
|
+
return useContext(IhelpContext);
|
|
32
|
+
}
|
|
22
33
|
// ---------------------------------------------------------------------------
|
|
23
34
|
// Provider
|
|
24
35
|
// ---------------------------------------------------------------------------
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ihelp_provider.js","sourceRoot":"","sources":["../../src/components/ihelp_provider.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAc,EAAE,aAAa,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC3F,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAE9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAoB7D,MAAM,YAAY,GAAG,aAAa,CAA2B,IAAI,CAAC,CAAC;AAEnE;;GAEG;AACH,MAAM,UAAU,eAAe;IAC7B,MAAM,GAAG,GAAG,UAAU,CAAC,YAAY,CAAC,CAAC;IACrC,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,MAAM,IAAI,iBAAiB,CAAC;YAC1B,IAAI,EAAE,6BAA6B;YACnC,GAAG,EAAE,YAAY;YACjB,OAAO,EAAE,wDAAwD;SAClE,CAAC,CAAC;IACL,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,8EAA8E;AAC9E,WAAW;AACX,8EAA8E;AAE9E,MAAM,UAAU,aAAa,CAAC,EAC5B,QAAQ,EACR,YAAY,GAAG,YAAY,EAC3B,QAAQ,EACR,eAAe,GAAG,OAAO,EACzB,gBAAgB,GAAG,IAAI,EACvB,cAAc,EACd,KAAK,EACL,MAAM,GACa;IACnB,MAAM,CAAC,WAAW,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACrD,MAAM,CAAC,mBAAmB,EAAE,oBAAoB,CAAC,GAAG,QAAQ,CAAqB,SAAS,CAAC,CAAC;I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C,QAAQ,IAAI,CAAC,CAAC,GAAG,CAAC,WAAW,EAAE,KAAK,GAAG,EAAE,CAAC;gBACpD,CAAC,CAAC,cAAc,EAAE,CAAC;gBACnB,aAAa,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;YACjC,CAAC;QACH,CAAC;QAED,QAAQ,CAAC,gBAAgB,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;QACpD,OAAO,GAAG,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;IACtE,CAAC,EAAE,CAAC,gBAAgB,EAAE,eAAe,CAAC,CAAC,CAAC;IAExC,0EAA0E;IAC1E,SAAS;IACT,0EAA0E;IAC1E,MAAM,KAAK,GAAsB;QAC/B,YAAY;QACZ,QAAQ;QACR,cAAc;QACd,KAAK;QACL,MAAM;QACN,WAAW;QACX,WAAW;QACX,YAAY;QACZ,MAAM;QACN,mBAAmB;KACpB,CAAC;IAEF,OAAO,CACL,MAAC,YAAY,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,aAChC,QAAQ,EACR,OAAO,IAAI,CACV,KAAC,iBAAiB,IAChB,IAAI,EAAE,WAAW,EACjB,YAAY,EAAE,CAAC,IAAI,EAAE,EAAE;oBACrB,IAAI,CAAC,IAAI;wBAAE,YAAY,EAAE,CAAC;;wBACrB,aAAa,CAAC,IAAI,CAAC,CAAC;gBAC3B,CAAC,EACD,mBAAmB,EAAE,mBAAmB,GACxC,CACH,IACqB,CACzB,CAAC;AACJ,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
interface IhelpRichEditorProps {
|
|
2
3
|
/** HTML string to display / edit. */
|
|
3
4
|
content: string;
|
|
@@ -10,6 +11,6 @@ interface IhelpRichEditorProps {
|
|
|
10
11
|
/** Scope ID passed to upload endpoint for multi-tenant storage. */
|
|
11
12
|
scope_id?: string;
|
|
12
13
|
}
|
|
13
|
-
export declare function IhelpRichEditor({ content, onChange, className, placeholder, upload_url, scope_id, }: IhelpRichEditorProps):
|
|
14
|
+
export declare function IhelpRichEditor({ content, onChange, className, placeholder, upload_url, scope_id, }: IhelpRichEditorProps): React.JSX.Element;
|
|
14
15
|
export {};
|
|
15
16
|
//# sourceMappingURL=ihelp_rich_editor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ihelp_rich_editor.d.ts","sourceRoot":"","sources":["../../src/components/ihelp_rich_editor.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ihelp_rich_editor.d.ts","sourceRoot":"","sources":["../../src/components/ihelp_rich_editor.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAgB/B,UAAU,oBAAoB;IAC5B,qCAAqC;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,yDAAyD;IACzD,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yEAAyE;IACzE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,mEAAmE;IACnE,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAyMD,wBAAgB,eAAe,CAAC,EAC9B,OAAO,EACP,QAAQ,EACR,SAAS,EACT,WAAW,EACX,UAAU,EACV,QAAQ,GACT,EAAE,oBAAoB,qBAwItB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { IhelpSearchDialogProps } from '../types/index.js';
|
|
2
|
-
export declare function IhelpSearchDialog({ open, onOpenChange, initial_context_key, className, }: IhelpSearchDialogProps):
|
|
3
|
+
export declare function IhelpSearchDialog({ open, onOpenChange, initial_context_key, className, }: IhelpSearchDialogProps): React.JSX.Element;
|
|
3
4
|
//# sourceMappingURL=ihelp_search_dialog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ihelp_search_dialog.d.ts","sourceRoot":"","sources":["../../src/components/ihelp_search_dialog.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ihelp_search_dialog.d.ts","sourceRoot":"","sources":["../../src/components/ihelp_search_dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAazE,OAAO,KAAK,EAAE,sBAAsB,EAAsD,MAAM,mBAAmB,CAAC;AAgwBpH,wBAAgB,iBAAiB,CAAC,EAChC,IAAI,EACJ,YAAY,EACZ,mBAAmB,EACnB,SAAS,GACV,EAAE,sBAAsB,qBAoKxB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { IhelpProvider, useIhelpContext } from './ihelp_provider.js';
|
|
1
|
+
export { IhelpProvider, useIhelpContext, useIhelpContextOptional } from './ihelp_provider.js';
|
|
2
2
|
export { IhelpIcon } from './ihelp_icon.js';
|
|
3
3
|
export { HoverHelpIcon, type HoverHelpIconProps } from './hover_help_icon.js';
|
|
4
4
|
export { IhelpDetailPanel } from './ihelp_detail_panel.js';
|
|
@@ -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,MAAM,qBAAqB,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"}
|
package/dist/components/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { IhelpProvider, useIhelpContext } from './ihelp_provider.js';
|
|
1
|
+
export { IhelpProvider, useIhelpContext, useIhelpContextOptional } from './ihelp_provider.js';
|
|
2
2
|
export { IhelpIcon } from './ihelp_icon.js';
|
|
3
3
|
export { HoverHelpIcon } from './hover_help_icon.js';
|
|
4
4
|
export { IhelpDetailPanel } from './ihelp_detail_panel.js';
|
|
@@ -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,MAAM,qBAAqB,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,E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qBAAqB,YAAE,KAAK,CAAC,WAAW,GAAO,CAC/D,EACD,kBACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,GAAG,EAAE;gCACZ,YAAY,CAAC,KAAK,CAAC,CAAC;gCACpB,WAAW,CAAC,WAAW,CAAC,CAAC;4BAC3B,CAAC,EACD,SAAS,EAAE,EAAE,CACX,yEAAyE,EACzE,qCAAqC,EACrC,iHAAiH,CAClH,2BAGD,KAAC,UAAU,IAAC,IAAI,EAAE,EAAE,wBAAgB,IAC7B,EACT,KAAC,SAAS,CAAC,KAAK,IAAC,SAAS,EAAC,YAAY,GAAG,IACxB,GACH,IACJ,CAClB,CAAC;AACJ,CAAC"}
|
|
@@ -7,11 +7,11 @@ declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.Dialo
|
|
|
7
7
|
declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
8
|
declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
9
|
declare const DialogHeader: {
|
|
10
|
-
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>):
|
|
10
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
11
11
|
displayName: string;
|
|
12
12
|
};
|
|
13
13
|
declare const DialogFooter: {
|
|
14
|
-
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>):
|
|
14
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
15
15
|
displayName: string;
|
|
16
16
|
};
|
|
17
17
|
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* hazo_ihelp — Lean runtime entry
|
|
3
|
+
*
|
|
4
|
+
* The browser-facing help *consumption* surface WITHOUT the authoring editor.
|
|
5
|
+
* Importing from here pulls in the provider, search dialog, detail panel, and
|
|
6
|
+
* the inline help icons — but NOT `IhelpEditor` / `IhelpRichEditor`, so the
|
|
7
|
+
* heavy Tiptap / dnd-kit editor graph never reaches a consumer that only needs
|
|
8
|
+
* to *show* help.
|
|
9
|
+
*
|
|
10
|
+
* Use the main `hazo_ihelp` entry instead when you need the editor.
|
|
11
|
+
*
|
|
12
|
+
* @packageDocumentation
|
|
13
|
+
*/
|
|
14
|
+
export { IhelpProvider, useIhelpContext, useIhelpContextOptional, } from './components/ihelp_provider.js';
|
|
15
|
+
export { IhelpIcon } from './components/ihelp_icon.js';
|
|
16
|
+
export { HoverHelpIcon, type HoverHelpIconProps } from './components/hover_help_icon.js';
|
|
17
|
+
export { IhelpFieldHelp, type IhelpFieldHelpProps } from './components/ihelp_field_help.js';
|
|
18
|
+
export { TopicHoverIcon, resolveTopicForContext, type TopicHoverIconProps } from './components/topic_hover_icon.js';
|
|
19
|
+
export { IhelpSearchDialog } from './components/ihelp_search_dialog.js';
|
|
20
|
+
export { IhelpDetailPanel } from './components/ihelp_detail_panel.js';
|
|
21
|
+
export * from './hooks/index.js';
|
|
22
|
+
export type { IhelpTopic, IhelpTag, IhelpContext, IhelpTopicInput, IhelpApiResponse, IhelpProviderProps, IhelpIconProps, IhelpSearchDialogProps, IhelpDetailPanelProps, IhelpTheme, IhelpLabels, UseIhelpResult, UseIhelpSearchResult, } from './types/index.js';
|
|
23
|
+
export { cn } from 'hazo_ui';
|
|
24
|
+
//# sourceMappingURL=index.runtime.d.ts.map
|
|
@@ -0,0 +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,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"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* hazo_ihelp — Lean runtime entry
|
|
3
|
+
*
|
|
4
|
+
* The browser-facing help *consumption* surface WITHOUT the authoring editor.
|
|
5
|
+
* Importing from here pulls in the provider, search dialog, detail panel, and
|
|
6
|
+
* the inline help icons — but NOT `IhelpEditor` / `IhelpRichEditor`, so the
|
|
7
|
+
* heavy Tiptap / dnd-kit editor graph never reaches a consumer that only needs
|
|
8
|
+
* to *show* help.
|
|
9
|
+
*
|
|
10
|
+
* Use the main `hazo_ihelp` entry instead when you need the editor.
|
|
11
|
+
*
|
|
12
|
+
* @packageDocumentation
|
|
13
|
+
*/
|
|
14
|
+
export { IhelpProvider, useIhelpContext, useIhelpContextOptional, } from './components/ihelp_provider.js';
|
|
15
|
+
export { IhelpIcon } from './components/ihelp_icon.js';
|
|
16
|
+
export { HoverHelpIcon } from './components/hover_help_icon.js';
|
|
17
|
+
export { IhelpFieldHelp } from './components/ihelp_field_help.js';
|
|
18
|
+
export { TopicHoverIcon, resolveTopicForContext } from './components/topic_hover_icon.js';
|
|
19
|
+
export { IhelpSearchDialog } from './components/ihelp_search_dialog.js';
|
|
20
|
+
export { IhelpDetailPanel } from './components/ihelp_detail_panel.js';
|
|
21
|
+
// Hooks (client-safe, REST-backed)
|
|
22
|
+
export * from './hooks/index.js';
|
|
23
|
+
// Utils
|
|
24
|
+
export { cn } from 'hazo_ui';
|
|
25
|
+
//# sourceMappingURL=index.runtime.js.map
|
|
@@ -0,0 +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,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
|
+
"version": "2.4.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.client.js",
|
|
6
6
|
"module": "./dist/index.client.js",
|
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
"types": "./dist/index.client.d.ts",
|
|
11
11
|
"import": "./dist/index.client.js"
|
|
12
12
|
},
|
|
13
|
+
"./runtime": {
|
|
14
|
+
"types": "./dist/index.runtime.d.ts",
|
|
15
|
+
"import": "./dist/index.runtime.js"
|
|
16
|
+
},
|
|
13
17
|
"./api": {
|
|
14
18
|
"types": "./dist/api/index.d.ts",
|
|
15
19
|
"import": "./dist/api/index.js"
|
|
@@ -80,16 +84,17 @@
|
|
|
80
84
|
"zod": "^4.1.12"
|
|
81
85
|
},
|
|
82
86
|
"peerDependencies": {
|
|
83
|
-
"hazo_auth": "^10.
|
|
87
|
+
"hazo_auth": "^10.9.0",
|
|
84
88
|
"hazo_chat": "^6.0.0",
|
|
85
|
-
"hazo_config": "^2.1
|
|
86
|
-
"hazo_connect": "^3.
|
|
87
|
-
"hazo_core": "^1.2.
|
|
88
|
-
"hazo_files": "^3.1.
|
|
89
|
+
"hazo_config": "^2.4.1",
|
|
90
|
+
"hazo_connect": "^3.9.2",
|
|
91
|
+
"hazo_core": "^1.2.1",
|
|
92
|
+
"hazo_files": "^3.1.1",
|
|
89
93
|
"hazo_llm_api": "^2.1.0",
|
|
90
|
-
"hazo_logs": "^2.
|
|
94
|
+
"hazo_logs": "^2.1.1",
|
|
91
95
|
"hazo_notes": "^2.0.0",
|
|
92
|
-
"
|
|
96
|
+
"hazo_theme": "^1.0.1",
|
|
97
|
+
"hazo_ui": "^6.1.0",
|
|
93
98
|
"next": "^14.0.0 || ^16.0.0",
|
|
94
99
|
"react": "^18.0.0 || ^19.0.0",
|
|
95
100
|
"react-dom": "^18.0.0 || ^19.0.0",
|
|
@@ -131,22 +136,25 @@
|
|
|
131
136
|
},
|
|
132
137
|
"sharp": {
|
|
133
138
|
"optional": true
|
|
139
|
+
},
|
|
140
|
+
"hazo_theme": {
|
|
141
|
+
"optional": true
|
|
134
142
|
}
|
|
135
143
|
},
|
|
136
144
|
"devDependencies": {
|
|
137
145
|
"@types/node": "^20.14.10",
|
|
138
146
|
"@types/react": "^18.3.3",
|
|
139
147
|
"@types/react-dom": "^18.3.0",
|
|
140
|
-
"hazo_auth": "^10.
|
|
148
|
+
"hazo_auth": "^10.9.0",
|
|
141
149
|
"hazo_chat": "^6.0.0",
|
|
142
|
-
"hazo_config": "^2.1
|
|
143
|
-
"hazo_connect": "^3.
|
|
144
|
-
"hazo_core": "^1.2.
|
|
145
|
-
"hazo_files": "^3.1.
|
|
150
|
+
"hazo_config": "^2.4.1",
|
|
151
|
+
"hazo_connect": "^3.9.2",
|
|
152
|
+
"hazo_core": "^1.2.1",
|
|
153
|
+
"hazo_files": "^3.1.1",
|
|
146
154
|
"hazo_llm_api": "^2.1.0",
|
|
147
|
-
"hazo_logs": "^2.
|
|
155
|
+
"hazo_logs": "^2.1.1",
|
|
148
156
|
"hazo_notes": "^2.0.0",
|
|
149
|
-
"hazo_ui": "^
|
|
157
|
+
"hazo_ui": "^6.1.0",
|
|
150
158
|
"next": "^16.0.10",
|
|
151
159
|
"typescript": "^5.7.2"
|
|
152
160
|
},
|