hazo_ihelp 2.0.6 → 2.1.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 +16 -3
- package/SETUP_CHECKLIST.md +131 -0
- package/config/hazo_ihelp_config.ini.sample +41 -8
- package/db_setup_postgres.sql +52 -0
- package/db_setup_sqlite.sql +25 -0
- package/dist/api/create_config_handler.d.ts +2 -0
- package/dist/api/create_config_handler.d.ts.map +1 -1
- package/dist/api/create_config_handler.js +117 -81
- package/dist/api/create_config_handler.js.map +1 -1
- package/dist/api/create_ihelp_handler.d.ts +7 -14
- package/dist/api/create_ihelp_handler.d.ts.map +1 -1
- package/dist/api/create_ihelp_handler.js +277 -257
- package/dist/api/create_ihelp_handler.js.map +1 -1
- package/dist/api/image_upload_handler.d.ts.map +1 -1
- package/dist/api/image_upload_handler.js +114 -80
- package/dist/api/image_upload_handler.js.map +1 -1
- package/dist/components/editor/editor_collapsible_section.js +1 -1
- package/dist/components/editor/editor_collapsible_section.js.map +1 -1
- package/dist/components/editor/editor_form.js +1 -1
- package/dist/components/editor/editor_form.js.map +1 -1
- package/dist/components/editor/editor_topic_list_item.js +1 -1
- package/dist/components/editor/editor_topic_list_item.js.map +1 -1
- package/dist/components/hover_help_icon.d.ts +39 -0
- package/dist/components/hover_help_icon.d.ts.map +1 -0
- package/dist/components/hover_help_icon.js +29 -0
- package/dist/components/hover_help_icon.js.map +1 -0
- package/dist/components/ihelp_detail_panel.js +2 -2
- package/dist/components/ihelp_detail_panel.js.map +1 -1
- package/dist/components/ihelp_editor.js +1 -1
- package/dist/components/ihelp_editor.js.map +1 -1
- package/dist/components/ihelp_icon.js +1 -1
- package/dist/components/ihelp_icon.js.map +1 -1
- package/dist/components/ihelp_provider.d.ts.map +1 -1
- package/dist/components/ihelp_provider.js +6 -1
- package/dist/components/ihelp_provider.js.map +1 -1
- package/dist/components/ihelp_rich_editor.js +2 -2
- package/dist/components/ihelp_rich_editor.js.map +1 -1
- package/dist/components/ihelp_search_dialog.d.ts.map +1 -1
- package/dist/components/ihelp_search_dialog.js +5 -3
- package/dist/components/ihelp_search_dialog.js.map +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +1 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/ui/badge.js +1 -1
- package/dist/components/ui/badge.js.map +1 -1
- package/dist/components/ui/button.js +1 -1
- package/dist/components/ui/button.js.map +1 -1
- package/dist/components/ui/dialog.js +1 -1
- package/dist/components/ui/dialog.js.map +1 -1
- package/dist/components/ui/input.js +1 -1
- package/dist/components/ui/input.js.map +1 -1
- package/dist/components/ui/label.js +1 -1
- package/dist/components/ui/label.js.map +1 -1
- package/dist/components/ui/popover.js +1 -1
- package/dist/components/ui/popover.js.map +1 -1
- package/dist/components/ui/select.js +1 -1
- package/dist/components/ui/select.js.map +1 -1
- package/dist/components/ui/switch.js +1 -1
- package/dist/components/ui/switch.js.map +1 -1
- package/dist/components/ui/textarea.js +1 -1
- package/dist/components/ui/textarea.js.map +1 -1
- package/dist/index.client.d.ts +2 -2
- package/dist/index.client.d.ts.map +1 -1
- package/dist/index.client.js +1 -1
- package/dist/index.client.js.map +1 -1
- package/dist/lib/config/hazo_ihelp_config.d.ts +106 -0
- package/dist/lib/config/hazo_ihelp_config.d.ts.map +1 -0
- package/dist/lib/config/hazo_ihelp_config.js +66 -0
- package/dist/lib/config/hazo_ihelp_config.js.map +1 -0
- package/dist/types/index.d.ts +45 -34
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils/logger.d.ts +25 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +42 -0
- package/dist/utils/logger.js.map +1 -0
- package/package.json +74 -23
- package/config/hazo_ihelp_config.ini +0 -9
- package/dist/utils/cn.d.ts +0 -3
- package/dist/utils/cn.d.ts.map +0 -1
- package/dist/utils/cn.js +0 -6
- package/dist/utils/cn.js.map +0 -1
- package/migrations/001_create_ihelp_tables.sql +0 -58
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* hazo_ihelp standard configuration schema + loader
|
|
3
|
+
*
|
|
4
|
+
* Wraps hazo_core's loadConfig with a Zod schema that mirrors the
|
|
5
|
+
* structure of config/hazo_ihelp_config.ini.
|
|
6
|
+
*
|
|
7
|
+
* Resolution order (per hazo_core/loadConfig):
|
|
8
|
+
* 1. <pkg>_config.ini at process.cwd()/config/ or package root
|
|
9
|
+
* 2. <pkg>_config.<HAZO_ENV>.ini overlay
|
|
10
|
+
* 3. HAZO_IHELP_<SECTION>_<KEY> env-var overrides
|
|
11
|
+
*
|
|
12
|
+
* NOTE: The legacy image_upload INI loader at src/config/parse_config.ts
|
|
13
|
+
* stays — it serves the image-upload handler's tight feedback loop and
|
|
14
|
+
* needs synchronous filesystem reads on every request without zod overhead.
|
|
15
|
+
* This file owns the workspace-standard sections only.
|
|
16
|
+
*/
|
|
17
|
+
import { z } from 'zod';
|
|
18
|
+
declare const schema: z.ZodNullable<z.ZodObject<{
|
|
19
|
+
general: z.ZodOptional<z.ZodObject<{
|
|
20
|
+
env: z.ZodOptional<z.ZodString>;
|
|
21
|
+
api_base_url: z.ZodOptional<z.ZodString>;
|
|
22
|
+
}, "strip", z.ZodTypeAny, {
|
|
23
|
+
api_base_url?: string | undefined;
|
|
24
|
+
env?: string | undefined;
|
|
25
|
+
}, {
|
|
26
|
+
api_base_url?: string | undefined;
|
|
27
|
+
env?: string | undefined;
|
|
28
|
+
}>>;
|
|
29
|
+
log: z.ZodOptional<z.ZodObject<{
|
|
30
|
+
overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
31
|
+
}, "strip", z.ZodTypeAny, {
|
|
32
|
+
overrides?: Record<string, string> | undefined;
|
|
33
|
+
}, {
|
|
34
|
+
overrides?: Record<string, string> | undefined;
|
|
35
|
+
}>>;
|
|
36
|
+
image_upload: z.ZodOptional<z.ZodObject<{
|
|
37
|
+
max_file_size_mb: z.ZodOptional<z.ZodString>;
|
|
38
|
+
allowed_types: z.ZodOptional<z.ZodString>;
|
|
39
|
+
upload_dir: z.ZodOptional<z.ZodString>;
|
|
40
|
+
upload_url_prefix: z.ZodOptional<z.ZodString>;
|
|
41
|
+
resize_enabled: z.ZodOptional<z.ZodString>;
|
|
42
|
+
resize_max_width: z.ZodOptional<z.ZodString>;
|
|
43
|
+
resize_max_height: z.ZodOptional<z.ZodString>;
|
|
44
|
+
resize_quality: z.ZodOptional<z.ZodString>;
|
|
45
|
+
}, "strip", z.ZodTypeAny, {
|
|
46
|
+
max_file_size_mb?: string | undefined;
|
|
47
|
+
allowed_types?: string | undefined;
|
|
48
|
+
upload_dir?: string | undefined;
|
|
49
|
+
upload_url_prefix?: string | undefined;
|
|
50
|
+
resize_enabled?: string | undefined;
|
|
51
|
+
resize_max_width?: string | undefined;
|
|
52
|
+
resize_max_height?: string | undefined;
|
|
53
|
+
resize_quality?: string | undefined;
|
|
54
|
+
}, {
|
|
55
|
+
max_file_size_mb?: string | undefined;
|
|
56
|
+
allowed_types?: string | undefined;
|
|
57
|
+
upload_dir?: string | undefined;
|
|
58
|
+
upload_url_prefix?: string | undefined;
|
|
59
|
+
resize_enabled?: string | undefined;
|
|
60
|
+
resize_max_width?: string | undefined;
|
|
61
|
+
resize_max_height?: string | undefined;
|
|
62
|
+
resize_quality?: string | undefined;
|
|
63
|
+
}>>;
|
|
64
|
+
}, "strip", z.ZodTypeAny, {
|
|
65
|
+
log?: {
|
|
66
|
+
overrides?: Record<string, string> | undefined;
|
|
67
|
+
} | undefined;
|
|
68
|
+
image_upload?: {
|
|
69
|
+
max_file_size_mb?: string | undefined;
|
|
70
|
+
allowed_types?: string | undefined;
|
|
71
|
+
upload_dir?: string | undefined;
|
|
72
|
+
upload_url_prefix?: string | undefined;
|
|
73
|
+
resize_enabled?: string | undefined;
|
|
74
|
+
resize_max_width?: string | undefined;
|
|
75
|
+
resize_max_height?: string | undefined;
|
|
76
|
+
resize_quality?: string | undefined;
|
|
77
|
+
} | undefined;
|
|
78
|
+
general?: {
|
|
79
|
+
api_base_url?: string | undefined;
|
|
80
|
+
env?: string | undefined;
|
|
81
|
+
} | undefined;
|
|
82
|
+
}, {
|
|
83
|
+
log?: {
|
|
84
|
+
overrides?: Record<string, string> | undefined;
|
|
85
|
+
} | undefined;
|
|
86
|
+
image_upload?: {
|
|
87
|
+
max_file_size_mb?: string | undefined;
|
|
88
|
+
allowed_types?: string | undefined;
|
|
89
|
+
upload_dir?: string | undefined;
|
|
90
|
+
upload_url_prefix?: string | undefined;
|
|
91
|
+
resize_enabled?: string | undefined;
|
|
92
|
+
resize_max_width?: string | undefined;
|
|
93
|
+
resize_max_height?: string | undefined;
|
|
94
|
+
resize_quality?: string | undefined;
|
|
95
|
+
} | undefined;
|
|
96
|
+
general?: {
|
|
97
|
+
api_base_url?: string | undefined;
|
|
98
|
+
env?: string | undefined;
|
|
99
|
+
} | undefined;
|
|
100
|
+
}>>;
|
|
101
|
+
export type IhelpStandardConfig = NonNullable<z.infer<typeof schema>>;
|
|
102
|
+
export declare function getIhelpConfig(): IhelpStandardConfig;
|
|
103
|
+
/** Reset the in-memory cache. Mainly for tests. */
|
|
104
|
+
export declare function resetIhelpConfigCache(): void;
|
|
105
|
+
export {};
|
|
106
|
+
//# sourceMappingURL=hazo_ihelp_config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hazo_ihelp_config.d.ts","sourceRoot":"","sources":["../../../src/lib/config/hazo_ihelp_config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,QAAA,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BC,CAAC;AAEd,MAAM,MAAM,mBAAmB,GAAG,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,MAAM,CAAC,CAAC,CAAC;AAItE,wBAAgB,cAAc,IAAI,mBAAmB,CAYpD;AAED,mDAAmD;AACnD,wBAAgB,qBAAqB,IAAI,IAAI,CAE5C"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* hazo_ihelp standard configuration schema + loader
|
|
3
|
+
*
|
|
4
|
+
* Wraps hazo_core's loadConfig with a Zod schema that mirrors the
|
|
5
|
+
* structure of config/hazo_ihelp_config.ini.
|
|
6
|
+
*
|
|
7
|
+
* Resolution order (per hazo_core/loadConfig):
|
|
8
|
+
* 1. <pkg>_config.ini at process.cwd()/config/ or package root
|
|
9
|
+
* 2. <pkg>_config.<HAZO_ENV>.ini overlay
|
|
10
|
+
* 3. HAZO_IHELP_<SECTION>_<KEY> env-var overrides
|
|
11
|
+
*
|
|
12
|
+
* NOTE: The legacy image_upload INI loader at src/config/parse_config.ts
|
|
13
|
+
* stays — it serves the image-upload handler's tight feedback loop and
|
|
14
|
+
* needs synchronous filesystem reads on every request without zod overhead.
|
|
15
|
+
* This file owns the workspace-standard sections only.
|
|
16
|
+
*/
|
|
17
|
+
import { loadConfig } from 'hazo_core';
|
|
18
|
+
import { z } from 'zod';
|
|
19
|
+
const schema = z
|
|
20
|
+
.object({
|
|
21
|
+
general: z
|
|
22
|
+
.object({
|
|
23
|
+
env: z.string().optional(),
|
|
24
|
+
api_base_url: z.string().optional(),
|
|
25
|
+
})
|
|
26
|
+
.optional(),
|
|
27
|
+
log: z
|
|
28
|
+
.object({
|
|
29
|
+
overrides: z.record(z.string(), z.string()).optional(),
|
|
30
|
+
})
|
|
31
|
+
.optional(),
|
|
32
|
+
image_upload: z
|
|
33
|
+
.object({
|
|
34
|
+
max_file_size_mb: z.string().optional(),
|
|
35
|
+
allowed_types: z.string().optional(),
|
|
36
|
+
upload_dir: z.string().optional(),
|
|
37
|
+
upload_url_prefix: z.string().optional(),
|
|
38
|
+
resize_enabled: z.string().optional(),
|
|
39
|
+
resize_max_width: z.string().optional(),
|
|
40
|
+
resize_max_height: z.string().optional(),
|
|
41
|
+
resize_quality: z.string().optional(),
|
|
42
|
+
})
|
|
43
|
+
.optional(),
|
|
44
|
+
})
|
|
45
|
+
.nullable();
|
|
46
|
+
let _cached = null;
|
|
47
|
+
export function getIhelpConfig() {
|
|
48
|
+
if (_cached !== null)
|
|
49
|
+
return _cached;
|
|
50
|
+
try {
|
|
51
|
+
_cached =
|
|
52
|
+
loadConfig({
|
|
53
|
+
pkg: 'hazo_ihelp',
|
|
54
|
+
schema: schema,
|
|
55
|
+
}) ?? {};
|
|
56
|
+
}
|
|
57
|
+
catch {
|
|
58
|
+
_cached = {};
|
|
59
|
+
}
|
|
60
|
+
return _cached;
|
|
61
|
+
}
|
|
62
|
+
/** Reset the in-memory cache. Mainly for tests. */
|
|
63
|
+
export function resetIhelpConfigCache() {
|
|
64
|
+
_cached = null;
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=hazo_ihelp_config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hazo_ihelp_config.js","sourceRoot":"","sources":["../../../src/lib/config/hazo_ihelp_config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,MAAM,GAAG,CAAC;KACb,MAAM,CAAC;IACN,OAAO,EAAE,CAAC;SACP,MAAM,CAAC;QACN,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC1B,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KACpC,CAAC;SACD,QAAQ,EAAE;IACb,GAAG,EAAE,CAAC;SACH,MAAM,CAAC;QACN,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,C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
* A help topic stored in the
|
|
9
|
+
* A help topic stored in the hazo_ihelp_topics table.
|
|
10
10
|
*
|
|
11
11
|
* Topics can be nested (via parent_id), scoped to an organisation (via
|
|
12
|
-
* scope_id), and enriched with tags and context mappings
|
|
13
|
-
*
|
|
12
|
+
* scope_id), and enriched with tags and context mappings stored as JSON
|
|
13
|
+
* columns directly on the row.
|
|
14
14
|
*/
|
|
15
15
|
export interface IhelpTopic {
|
|
16
|
-
/** Primary key — UUID
|
|
16
|
+
/** Primary key — UUID. */
|
|
17
17
|
id: string;
|
|
18
18
|
/**
|
|
19
19
|
* Parent topic UUID for hierarchical nesting.
|
|
@@ -54,24 +54,29 @@ export interface IhelpTopic {
|
|
|
54
54
|
* Unpublished topics are only accessible in the editor.
|
|
55
55
|
*/
|
|
56
56
|
is_published: boolean;
|
|
57
|
-
/** ISO-8601 timestamp of when the topic row was created. */
|
|
58
|
-
created_at: string;
|
|
59
|
-
/**
|
|
60
|
-
* ISO-8601 timestamp of the most recent update.
|
|
61
|
-
* NULL if the topic has never been edited after creation.
|
|
62
|
-
*/
|
|
63
|
-
changed_at: string | null;
|
|
64
57
|
/**
|
|
65
|
-
* Tags
|
|
58
|
+
* Tags stored as a JSON array on the hazo_ihelp_topics row.
|
|
66
59
|
* Empty array when no tags are associated.
|
|
67
60
|
*/
|
|
68
61
|
tags: IhelpTag[];
|
|
69
62
|
/**
|
|
70
|
-
*
|
|
71
|
-
* Empty array when
|
|
63
|
+
* Context mappings stored as a JSON array on the hazo_ihelp_topics row.
|
|
64
|
+
* Empty array when no context mappings exist.
|
|
65
|
+
*/
|
|
66
|
+
contexts: IhelpContext[];
|
|
67
|
+
/**
|
|
68
|
+
* Flat list of context keys derived from the contexts array.
|
|
69
|
+
* Convenience field populated at query time.
|
|
72
70
|
* Example values: ["deductions.work_from_home", "benefits.dental"]
|
|
73
71
|
*/
|
|
74
72
|
context_keys: string[];
|
|
73
|
+
/** ISO-8601 timestamp of when the topic row was created. */
|
|
74
|
+
created_at: string;
|
|
75
|
+
/**
|
|
76
|
+
* ISO-8601 timestamp of the most recent update.
|
|
77
|
+
* NULL if the topic has never been edited after creation.
|
|
78
|
+
*/
|
|
79
|
+
changed_at: string | null;
|
|
75
80
|
/**
|
|
76
81
|
* Child topics populated when building a tree for rendering.
|
|
77
82
|
* Absent (undefined) in flat list responses.
|
|
@@ -79,14 +84,10 @@ export interface IhelpTopic {
|
|
|
79
84
|
children?: IhelpTopic[];
|
|
80
85
|
}
|
|
81
86
|
/**
|
|
82
|
-
* A decorative or informational badge
|
|
83
|
-
*
|
|
87
|
+
* A decorative or informational badge embedded in the tags JSON column
|
|
88
|
+
* of hazo_ihelp_topics.
|
|
84
89
|
*/
|
|
85
90
|
export interface IhelpTag {
|
|
86
|
-
/** Primary key — UUID generated by the database. */
|
|
87
|
-
id: string;
|
|
88
|
-
/** UUID of the parent topic this tag belongs to. */
|
|
89
|
-
topic_id: string;
|
|
90
91
|
/**
|
|
91
92
|
* Display text rendered inside the badge.
|
|
92
93
|
* Examples: "Receipt Required", "Tip", "New".
|
|
@@ -105,22 +106,17 @@ export interface IhelpTag {
|
|
|
105
106
|
icon: string | null;
|
|
106
107
|
}
|
|
107
108
|
/**
|
|
108
|
-
* A mapping
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
* relevant topics for a given location in the host application.
|
|
109
|
+
* A context mapping embedded in the contexts JSON column of
|
|
110
|
+
* hazo_ihelp_topics. Links a topic to a dot-notation context key
|
|
111
|
+
* so the IhelpIcon component can surface relevant topics for a
|
|
112
|
+
* given location in the host application.
|
|
113
113
|
*/
|
|
114
|
-
export interface
|
|
115
|
-
/** Primary key — UUID generated by the database. */
|
|
116
|
-
id: string;
|
|
117
|
-
/** UUID of the topic being mapped. */
|
|
118
|
-
topic_id: string;
|
|
114
|
+
export interface IhelpContext {
|
|
119
115
|
/**
|
|
120
116
|
* Dot-notation key identifying a location in the host application.
|
|
121
117
|
* Example: "deductions.work_from_home", "payroll.leave_accrual".
|
|
122
118
|
*/
|
|
123
|
-
|
|
119
|
+
key: string;
|
|
124
120
|
/**
|
|
125
121
|
* Ascending integer used to rank topics when multiple are mapped
|
|
126
122
|
* to the same context key. Lower values appear first.
|
|
@@ -198,8 +194,14 @@ export interface IhelpTopicInput {
|
|
|
198
194
|
*/
|
|
199
195
|
tags?: IhelpTagInput[];
|
|
200
196
|
/**
|
|
201
|
-
*
|
|
202
|
-
* When provided on an update, existing
|
|
197
|
+
* Context mappings to attach to this topic.
|
|
198
|
+
* When provided on an update, existing contexts are replaced in full.
|
|
199
|
+
*/
|
|
200
|
+
contexts?: IhelpContextInput[];
|
|
201
|
+
/**
|
|
202
|
+
* Convenience shorthand: dot-notation context keys to map to this topic.
|
|
203
|
+
* Each key is assigned an ascending priority starting at 0.
|
|
204
|
+
* When both `contexts` and `context_keys` are provided, `contexts` wins.
|
|
203
205
|
*/
|
|
204
206
|
context_keys?: string[];
|
|
205
207
|
}
|
|
@@ -224,6 +226,15 @@ export interface IhelpTagInput {
|
|
|
224
226
|
*/
|
|
225
227
|
icon?: string | null;
|
|
226
228
|
}
|
|
229
|
+
/**
|
|
230
|
+
* Payload for creating or replacing a context mapping on a topic.
|
|
231
|
+
*/
|
|
232
|
+
export interface IhelpContextInput {
|
|
233
|
+
/** Dot-notation context key. */
|
|
234
|
+
key: string;
|
|
235
|
+
/** Priority for ordering when multiple topics share the same key. Defaults to 0. */
|
|
236
|
+
priority?: number;
|
|
237
|
+
}
|
|
227
238
|
/**
|
|
228
239
|
* Envelope returned by all ihelp API endpoints.
|
|
229
240
|
*
|
|
@@ -405,7 +416,7 @@ export interface IhelpIconProps {
|
|
|
405
416
|
/**
|
|
406
417
|
* Dot-notation key identifying the current location in the host
|
|
407
418
|
* application (e.g. "deductions.work_from_home").
|
|
408
|
-
* Used to look up relevant topics from
|
|
419
|
+
* Used to look up relevant topics from the contexts JSON column.
|
|
409
420
|
*/
|
|
410
421
|
context_key: string;
|
|
411
422
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B;;;;;;GAMG;AACH,MAAM,WAAW,UAAU;IACzB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B;;;;;;GAMG;AACH,MAAM,WAAW,UAAU;IACzB,0BAA0B;IAC1B,EAAE,EAAE,MAAM,CAAC;IAEX;;;OAGG;IACH,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzB;;;OAGG;IACH,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAExB;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB,yEAAyE;IACzE,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B;;;OAGG;IACH,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAEvB;;;OAGG;IACH,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAEpB,wEAAwE;IACxE,UAAU,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,YAAY,EAAE,OAAO,CAAC;IAEtB;;;OAGG;IACH,IAAI,EAAE,QAAQ,EAAE,CAAC;IAEjB;;;OAGG;IACH,QAAQ,EAAE,YAAY,EAAE,CAAC;IAEzB;;;;OAIG;IACH,YAAY,EAAE,MAAM,EAAE,CAAC;IAEvB,4DAA4D;IAC5D,UAAU,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAE1B;;;OAGG;IACH,QAAQ,CAAC,EAAE,UAAU,EAAE,CAAC;CACzB;AAED;;;GAGG;AACH,MAAM,W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,CAAC;IAEzB,6DAA6D;IAC7D,OAAO,EAAE,OAAO,CAAC;IAEjB;;;OAGG;IACH,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB;IACnC,+EAA+E;IAC/E,MAAM,EAAE,UAAU,EAAE,CAAC;IAErB,8DAA8D;IAC9D,OAAO,EAAE,OAAO,CAAC;IAEjB;;;OAGG;IACH,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAErB;;;;;OAKG;IACH,YAAY,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;IAE9D;;;;;;OAMG;IACH,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,eAAe,CAAC,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;IAEnF;;;;OAIG;IACH,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAE5C,oDAAoD;IACpD,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Logger Utility for hazo_ihelp
|
|
3
|
+
*
|
|
4
|
+
* Default behavior: delegates to hazo_core's createLogger('hazo_ihelp'), which
|
|
5
|
+
* auto-injects correlationId, env, and writes structured JSON via hazo_logs.
|
|
6
|
+
* Consumers can still override with set_logger() — useful for browser-only
|
|
7
|
+
* loggers or app-specific instrumentation.
|
|
8
|
+
*/
|
|
9
|
+
export interface Logger {
|
|
10
|
+
info: (message: string, data?: Record<string, unknown>) => void;
|
|
11
|
+
debug: (message: string, data?: Record<string, unknown>) => void;
|
|
12
|
+
warn: (message: string, data?: Record<string, unknown>) => void;
|
|
13
|
+
error: (message: string, data?: Record<string, unknown>) => void;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Set the logger instance to use throughout hazo_ihelp.
|
|
17
|
+
* Pass `undefined` to reset to the hazo_core default.
|
|
18
|
+
*/
|
|
19
|
+
export declare function set_logger(logger: Logger | undefined): void;
|
|
20
|
+
/**
|
|
21
|
+
* Get the current logger instance — defaults to hazo_core's createLogger
|
|
22
|
+
* on first access if no consumer override has been set.
|
|
23
|
+
*/
|
|
24
|
+
export declare function get_logger(): Logger;
|
|
25
|
+
//# sourceMappingURL=logger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;IAChE,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;IACjE,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;IAChE,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;CAClE;AAmBD;;;GAGG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAE3D;AAED;;;GAGG;AACH,wBAAgB,UAAU,IAAI,MAAM,CAKnC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Logger Utility for hazo_ihelp
|
|
3
|
+
*
|
|
4
|
+
* Default behavior: delegates to hazo_core's createLogger('hazo_ihelp'), which
|
|
5
|
+
* auto-injects correlationId, env, and writes structured JSON via hazo_logs.
|
|
6
|
+
* Consumers can still override with set_logger() — useful for browser-only
|
|
7
|
+
* loggers or app-specific instrumentation.
|
|
8
|
+
*/
|
|
9
|
+
import { createLogger } from 'hazo_core';
|
|
10
|
+
const console_logger = {
|
|
11
|
+
info: (m, d) => (d ? console.log(`[hazo_ihelp] ${m}`, d) : console.log(`[hazo_ihelp] ${m}`)),
|
|
12
|
+
debug: (m, d) => (d ? console.debug(`[hazo_ihelp] ${m}`, d) : console.debug(`[hazo_ihelp] ${m}`)),
|
|
13
|
+
warn: (m, d) => (d ? console.warn(`[hazo_ihelp] ${m}`, d) : console.warn(`[hazo_ihelp] ${m}`)),
|
|
14
|
+
error: (m, d) => (d ? console.error(`[hazo_ihelp] ${m}`, d) : console.error(`[hazo_ihelp] ${m}`)),
|
|
15
|
+
};
|
|
16
|
+
function build_default_logger() {
|
|
17
|
+
try {
|
|
18
|
+
return createLogger('hazo_ihelp');
|
|
19
|
+
}
|
|
20
|
+
catch {
|
|
21
|
+
return console_logger;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
let current_logger = null;
|
|
25
|
+
/**
|
|
26
|
+
* Set the logger instance to use throughout hazo_ihelp.
|
|
27
|
+
* Pass `undefined` to reset to the hazo_core default.
|
|
28
|
+
*/
|
|
29
|
+
export function set_logger(logger) {
|
|
30
|
+
current_logger = logger ?? null;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Get the current logger instance — defaults to hazo_core's createLogger
|
|
34
|
+
* on first access if no consumer override has been set.
|
|
35
|
+
*/
|
|
36
|
+
export function get_logger() {
|
|
37
|
+
if (!current_logger) {
|
|
38
|
+
current_logger = build_default_logger();
|
|
39
|
+
}
|
|
40
|
+
return current_logger;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=logger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAE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MAA0B;IACnD,cAAc,GAAG,MAAM,IAAI,IAAI,CAAC;AAClC,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,UAAU;IACxB,IAAI,CAAC,cAAc,EAAE,CAAC;QACpB,cAAc,GAAG,oBAAoB,EAAE,CAAC;IAC1C,CAAC;IACD,OAAO,cAAc,CAAC;AACxB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hazo_ihelp",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.client.js",
|
|
6
6
|
"module": "./dist/index.client.js",
|
|
@@ -29,12 +29,11 @@
|
|
|
29
29
|
},
|
|
30
30
|
"files": [
|
|
31
31
|
"dist",
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"test-app"
|
|
32
|
+
"config/hazo_ihelp_config.ini.sample",
|
|
33
|
+
"db_setup_postgres.sql",
|
|
34
|
+
"db_setup_sqlite.sql",
|
|
35
|
+
"README.md",
|
|
36
|
+
"SETUP_CHECKLIST.md"
|
|
38
37
|
],
|
|
39
38
|
"scripts": {
|
|
40
39
|
"build": "tsc -p tsconfig.build.json",
|
|
@@ -46,6 +45,9 @@
|
|
|
46
45
|
"prepublishOnly": "npm run build"
|
|
47
46
|
},
|
|
48
47
|
"dependencies": {
|
|
48
|
+
"@dnd-kit/core": "^6.3.1",
|
|
49
|
+
"@dnd-kit/sortable": "^10.0.0",
|
|
50
|
+
"@dnd-kit/utilities": "^3.2.2",
|
|
49
51
|
"@radix-ui/react-accordion": "^1.2.12",
|
|
50
52
|
"@radix-ui/react-checkbox": "^1.3.3",
|
|
51
53
|
"@radix-ui/react-dialog": "^1.0.5",
|
|
@@ -60,32 +62,70 @@
|
|
|
60
62
|
"@radix-ui/react-switch": "^1.0.3",
|
|
61
63
|
"@radix-ui/react-tabs": "^1.1.13",
|
|
62
64
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
63
|
-
"@tiptap/extension-image": "^
|
|
64
|
-
"@tiptap/extension-link": "^
|
|
65
|
-
"@tiptap/react": "^
|
|
66
|
-
"@tiptap/starter-kit": "^
|
|
65
|
+
"@tiptap/extension-image": "^3.20.5",
|
|
66
|
+
"@tiptap/extension-link": "^3.20.5",
|
|
67
|
+
"@tiptap/react": "^3.20.5",
|
|
68
|
+
"@tiptap/starter-kit": "^3.20.5",
|
|
67
69
|
"class-variance-authority": "^0.7.1",
|
|
68
70
|
"clsx": "^2.1.1",
|
|
69
71
|
"cmdk": "^1.1.1",
|
|
70
72
|
"date-fns": "^4.1.0",
|
|
71
73
|
"fuse.js": "^7.0.0",
|
|
72
|
-
"lucide-react": "^0.
|
|
74
|
+
"lucide-react": "^0.553.0",
|
|
73
75
|
"react-day-picker": "^9.14.0",
|
|
74
|
-
"react-
|
|
76
|
+
"react-icons": "^5.6.0",
|
|
77
|
+
"react-resizable-panels": "^4.7.6",
|
|
75
78
|
"sonner": "^2.0.7",
|
|
76
|
-
"tailwind-merge": "^
|
|
79
|
+
"tailwind-merge": "^3.5.0",
|
|
80
|
+
"zod": "^3.23.8"
|
|
77
81
|
},
|
|
78
82
|
"peerDependencies": {
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"
|
|
83
|
+
"hazo_auth": "^9.0.0",
|
|
84
|
+
"hazo_chat": "^6.0.0",
|
|
85
|
+
"hazo_config": "^2.1.5",
|
|
86
|
+
"hazo_connect": "^3.0.0",
|
|
87
|
+
"hazo_core": "^1.0.0",
|
|
88
|
+
"hazo_files": "^3.0.0",
|
|
89
|
+
"hazo_llm_api": "^2.0.0",
|
|
90
|
+
"hazo_logs": "^2.0.0",
|
|
91
|
+
"hazo_notes": "^2.0.0",
|
|
92
|
+
"hazo_ui": "^3.1.0",
|
|
93
|
+
"next": "^14.0.0 || ^16.0.0",
|
|
94
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
95
|
+
"react-dom": "^18.0.0 || ^19.0.0",
|
|
96
|
+
"tailwindcss": "^4.2.4"
|
|
84
97
|
},
|
|
85
98
|
"peerDependenciesMeta": {
|
|
99
|
+
"hazo_auth": {
|
|
100
|
+
"optional": true
|
|
101
|
+
},
|
|
102
|
+
"hazo_chat": {
|
|
103
|
+
"optional": true
|
|
104
|
+
},
|
|
105
|
+
"hazo_config": {
|
|
106
|
+
"optional": true
|
|
107
|
+
},
|
|
86
108
|
"hazo_connect": {
|
|
87
109
|
"optional": true
|
|
88
110
|
},
|
|
111
|
+
"hazo_core": {
|
|
112
|
+
"optional": false
|
|
113
|
+
},
|
|
114
|
+
"hazo_files": {
|
|
115
|
+
"optional": true
|
|
116
|
+
},
|
|
117
|
+
"hazo_llm_api": {
|
|
118
|
+
"optional": true
|
|
119
|
+
},
|
|
120
|
+
"hazo_logs": {
|
|
121
|
+
"optional": true
|
|
122
|
+
},
|
|
123
|
+
"hazo_notes": {
|
|
124
|
+
"optional": true
|
|
125
|
+
},
|
|
126
|
+
"hazo_ui": {
|
|
127
|
+
"optional": false
|
|
128
|
+
},
|
|
89
129
|
"next": {
|
|
90
130
|
"optional": true
|
|
91
131
|
},
|
|
@@ -94,10 +134,21 @@
|
|
|
94
134
|
}
|
|
95
135
|
},
|
|
96
136
|
"devDependencies": {
|
|
97
|
-
"@types/node": "^20.10
|
|
98
|
-
"@types/react": "^18.
|
|
99
|
-
"@types/react-dom": "^18.
|
|
100
|
-
"
|
|
137
|
+
"@types/node": "^20.14.10",
|
|
138
|
+
"@types/react": "^18.3.3",
|
|
139
|
+
"@types/react-dom": "^18.3.0",
|
|
140
|
+
"hazo_auth": "^9.0.0",
|
|
141
|
+
"hazo_chat": "^6.0.0",
|
|
142
|
+
"hazo_config": "^2.1.6",
|
|
143
|
+
"hazo_connect": "^3.0.0",
|
|
144
|
+
"hazo_core": "^1.0.0",
|
|
145
|
+
"hazo_files": "^3.0.0",
|
|
146
|
+
"hazo_llm_api": "^2.0.0",
|
|
147
|
+
"hazo_logs": "^2.0.1",
|
|
148
|
+
"hazo_notes": "^2.0.0",
|
|
149
|
+
"hazo_ui": "^3.1.0",
|
|
150
|
+
"next": "^16.0.10",
|
|
151
|
+
"typescript": "^5.7.2"
|
|
101
152
|
},
|
|
102
153
|
"author": "Pubs Abayasiri",
|
|
103
154
|
"license": "MIT",
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
[image_upload]
|
|
2
|
-
max_file_size_mb = 5
|
|
3
|
-
allowed_types = image/jpeg, image/png, image/gif, image/webp, image/svg+xml, image/avif
|
|
4
|
-
upload_dir = test-app/public/ihelp/images
|
|
5
|
-
upload_url_prefix = /ihelp/images
|
|
6
|
-
resize_enabled = true
|
|
7
|
-
resize_max_width = 1200
|
|
8
|
-
resize_max_height = 1200
|
|
9
|
-
resize_quality = 80
|
package/dist/utils/cn.d.ts
DELETED
package/dist/utils/cn.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cn.d.ts","sourceRoot":"","sources":["../../src/utils/cn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,MAAM,CAAC;AAG7C,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC"}
|
package/dist/utils/cn.js
DELETED
package/dist/utils/cn.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cn.js","sourceRoot":"","sources":["../../src/utils/cn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAmB,MAAM,MAAM,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,MAAM,UAAU,EAAE,CAAC,GAAG,MAAoB;IACxC,OAAO,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;AAC/B,CAAC"}
|