hazo_ihelp 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. package/config/hazo_ihelp_config.ini +9 -0
  2. package/config/hazo_ihelp_config.ini.sample +23 -0
  3. package/dist/api/create_config_handler.d.ts +27 -0
  4. package/dist/api/create_config_handler.d.ts.map +1 -0
  5. package/dist/api/create_config_handler.js +122 -0
  6. package/dist/api/create_config_handler.js.map +1 -0
  7. package/dist/api/create_ihelp_handler.d.ts +60 -0
  8. package/dist/api/create_ihelp_handler.d.ts.map +1 -0
  9. package/dist/api/create_ihelp_handler.js +378 -0
  10. package/dist/api/create_ihelp_handler.js.map +1 -0
  11. package/dist/api/image_upload_handler.d.ts +29 -0
  12. package/dist/api/image_upload_handler.d.ts.map +1 -0
  13. package/dist/api/image_upload_handler.js +149 -0
  14. package/dist/api/image_upload_handler.js.map +1 -0
  15. package/dist/api/index.d.ts +6 -0
  16. package/dist/api/index.d.ts.map +1 -0
  17. package/dist/api/index.js +4 -0
  18. package/dist/api/index.js.map +1 -0
  19. package/dist/components/editor/editor_collapsible_section.d.ts +11 -0
  20. package/dist/components/editor/editor_collapsible_section.d.ts.map +1 -0
  21. package/dist/components/editor/editor_collapsible_section.js +10 -0
  22. package/dist/components/editor/editor_collapsible_section.js.map +1 -0
  23. package/dist/components/editor/editor_context_keys_section.d.ts +13 -0
  24. package/dist/components/editor/editor_context_keys_section.d.ts.map +1 -0
  25. package/dist/components/editor/editor_context_keys_section.js +99 -0
  26. package/dist/components/editor/editor_context_keys_section.js.map +1 -0
  27. package/dist/components/editor/editor_form.d.ts +27 -0
  28. package/dist/components/editor/editor_form.d.ts.map +1 -0
  29. package/dist/components/editor/editor_form.js +25 -0
  30. package/dist/components/editor/editor_form.js.map +1 -0
  31. package/dist/components/editor/editor_import_export.d.ts +18 -0
  32. package/dist/components/editor/editor_import_export.d.ts.map +1 -0
  33. package/dist/components/editor/editor_import_export.js +117 -0
  34. package/dist/components/editor/editor_import_export.js.map +1 -0
  35. package/dist/components/editor/editor_tags_section.d.ts +10 -0
  36. package/dist/components/editor/editor_tags_section.d.ts.map +1 -0
  37. package/dist/components/editor/editor_tags_section.js +33 -0
  38. package/dist/components/editor/editor_tags_section.js.map +1 -0
  39. package/dist/components/editor/editor_topic_list.d.ts +14 -0
  40. package/dist/components/editor/editor_topic_list.d.ts.map +1 -0
  41. package/dist/components/editor/editor_topic_list.js +58 -0
  42. package/dist/components/editor/editor_topic_list.js.map +1 -0
  43. package/dist/components/editor/editor_topic_list_item.d.ts +10 -0
  44. package/dist/components/editor/editor_topic_list_item.d.ts.map +1 -0
  45. package/dist/components/editor/editor_topic_list_item.js +10 -0
  46. package/dist/components/editor/editor_topic_list_item.js.map +1 -0
  47. package/dist/components/ihelp_detail_panel.d.ts +16 -0
  48. package/dist/components/ihelp_detail_panel.d.ts.map +1 -0
  49. package/dist/components/ihelp_detail_panel.js +46 -0
  50. package/dist/components/ihelp_detail_panel.js.map +1 -0
  51. package/dist/components/ihelp_editor.d.ts +3 -0
  52. package/dist/components/ihelp_editor.d.ts.map +1 -0
  53. package/dist/components/ihelp_editor.js +169 -0
  54. package/dist/components/ihelp_editor.js.map +1 -0
  55. package/dist/components/ihelp_icon.d.ts +7 -0
  56. package/dist/components/ihelp_icon.d.ts.map +1 -0
  57. package/dist/components/ihelp_icon.js +14 -0
  58. package/dist/components/ihelp_icon.js.map +1 -0
  59. package/dist/components/ihelp_provider.d.ts +21 -0
  60. package/dist/components/ihelp_provider.d.ts.map +1 -0
  61. package/dist/components/ihelp_provider.js +83 -0
  62. package/dist/components/ihelp_provider.js.map +1 -0
  63. package/dist/components/ihelp_rich_editor.d.ts +15 -0
  64. package/dist/components/ihelp_rich_editor.d.ts.map +1 -0
  65. package/dist/components/ihelp_rich_editor.js +182 -0
  66. package/dist/components/ihelp_rich_editor.js.map +1 -0
  67. package/dist/components/ihelp_search_dialog.d.ts +3 -0
  68. package/dist/components/ihelp_search_dialog.d.ts.map +1 -0
  69. package/dist/components/ihelp_search_dialog.js +454 -0
  70. package/dist/components/ihelp_search_dialog.js.map +1 -0
  71. package/dist/components/index.d.ts +7 -0
  72. package/dist/components/index.d.ts.map +1 -0
  73. package/dist/components/index.js +7 -0
  74. package/dist/components/index.js.map +1 -0
  75. package/dist/components/resizable_image.d.ts +17 -0
  76. package/dist/components/resizable_image.d.ts.map +1 -0
  77. package/dist/components/resizable_image.js +170 -0
  78. package/dist/components/resizable_image.js.map +1 -0
  79. package/dist/components/ui/badge.d.ts +9 -0
  80. package/dist/components/ui/badge.d.ts.map +1 -0
  81. package/dist/components/ui/badge.js +17 -0
  82. package/dist/components/ui/badge.js.map +1 -0
  83. package/dist/components/ui/button.d.ts +10 -0
  84. package/dist/components/ui/button.d.ts.map +1 -0
  85. package/dist/components/ui/button.js +50 -0
  86. package/dist/components/ui/button.js.map +1 -0
  87. package/dist/components/ui/dialog.d.ts +20 -0
  88. package/dist/components/ui/dialog.d.ts.map +1 -0
  89. package/dist/components/ui/dialog.js +26 -0
  90. package/dist/components/ui/dialog.js.map +1 -0
  91. package/dist/components/ui/input.d.ts +6 -0
  92. package/dist/components/ui/input.d.ts.map +1 -0
  93. package/dist/components/ui/input.js +12 -0
  94. package/dist/components/ui/input.js.map +1 -0
  95. package/dist/components/ui/label.d.ts +6 -0
  96. package/dist/components/ui/label.d.ts.map +1 -0
  97. package/dist/components/ui/label.js +12 -0
  98. package/dist/components/ui/label.js.map +1 -0
  99. package/dist/components/ui/popover.d.ts +7 -0
  100. package/dist/components/ui/popover.d.ts.map +1 -0
  101. package/dist/components/ui/popover.js +13 -0
  102. package/dist/components/ui/popover.js.map +1 -0
  103. package/dist/components/ui/select.d.ts +14 -0
  104. package/dist/components/ui/select.d.ts.map +1 -0
  105. package/dist/components/ui/select.js +29 -0
  106. package/dist/components/ui/select.js.map +1 -0
  107. package/dist/components/ui/switch.d.ts +5 -0
  108. package/dist/components/ui/switch.d.ts.map +1 -0
  109. package/dist/components/ui/switch.js +11 -0
  110. package/dist/components/ui/switch.js.map +1 -0
  111. package/dist/components/ui/textarea.d.ts +6 -0
  112. package/dist/components/ui/textarea.d.ts.map +1 -0
  113. package/dist/components/ui/textarea.js +12 -0
  114. package/dist/components/ui/textarea.js.map +1 -0
  115. package/dist/config/parse_config.d.ts +10 -0
  116. package/dist/config/parse_config.d.ts.map +1 -0
  117. package/dist/config/parse_config.js +76 -0
  118. package/dist/config/parse_config.js.map +1 -0
  119. package/dist/hooks/index.d.ts +6 -0
  120. package/dist/hooks/index.d.ts.map +1 -0
  121. package/dist/hooks/index.js +5 -0
  122. package/dist/hooks/index.js.map +1 -0
  123. package/dist/hooks/use_ihelp.d.ts +3 -0
  124. package/dist/hooks/use_ihelp.d.ts.map +1 -0
  125. package/dist/hooks/use_ihelp.js +52 -0
  126. package/dist/hooks/use_ihelp.js.map +1 -0
  127. package/dist/hooks/use_ihelp_config.d.ts +19 -0
  128. package/dist/hooks/use_ihelp_config.d.ts.map +1 -0
  129. package/dist/hooks/use_ihelp_config.js +62 -0
  130. package/dist/hooks/use_ihelp_config.js.map +1 -0
  131. package/dist/hooks/use_ihelp_editor.d.ts +3 -0
  132. package/dist/hooks/use_ihelp_editor.d.ts.map +1 -0
  133. package/dist/hooks/use_ihelp_editor.js +93 -0
  134. package/dist/hooks/use_ihelp_editor.js.map +1 -0
  135. package/dist/hooks/use_ihelp_search.d.ts +3 -0
  136. package/dist/hooks/use_ihelp_search.d.ts.map +1 -0
  137. package/dist/hooks/use_ihelp_search.js +68 -0
  138. package/dist/hooks/use_ihelp_search.js.map +1 -0
  139. package/dist/index.client.d.ts +13 -0
  140. package/dist/index.client.d.ts.map +1 -0
  141. package/dist/index.client.js +15 -0
  142. package/dist/index.client.js.map +1 -0
  143. package/dist/index.d.ts +12 -0
  144. package/dist/index.d.ts.map +1 -0
  145. package/dist/index.js +12 -0
  146. package/dist/index.js.map +1 -0
  147. package/dist/types/index.d.ts +595 -0
  148. package/dist/types/index.d.ts.map +1 -0
  149. package/dist/types/index.js +8 -0
  150. package/dist/types/index.js.map +1 -0
  151. package/dist/utils/cn.d.ts +3 -0
  152. package/dist/utils/cn.d.ts.map +1 -0
  153. package/dist/utils/cn.js +6 -0
  154. package/dist/utils/cn.js.map +1 -0
  155. package/migrations/001_create_ihelp_tables.sql +58 -0
  156. package/package.json +108 -0
@@ -0,0 +1,595 @@
1
+ /**
2
+ * Type definitions for hazo_ihelp package.
3
+ *
4
+ * hazo_ihelp is a contextual popup help system that supports hierarchical
5
+ * topics, multi-tenant scoping, rich HTML content, and keyboard-driven search.
6
+ */
7
+ import type React from 'react';
8
+ /**
9
+ * A help topic stored in the ihelp_topics table.
10
+ *
11
+ * Topics can be nested (via parent_id), scoped to an organisation (via
12
+ * scope_id), and enriched with tags and context mappings that are joined in
13
+ * at query time.
14
+ */
15
+ export interface IhelpTopic {
16
+ /** Primary key — UUID generated by the database. */
17
+ id: string;
18
+ /**
19
+ * Parent topic UUID for hierarchical nesting.
20
+ * NULL indicates this is a root-level topic.
21
+ */
22
+ parent_id: string | null;
23
+ /**
24
+ * Organisation / tenant UUID for multi-tenant scoping.
25
+ * NULL means the topic is globally visible to all tenants.
26
+ */
27
+ scope_id: string | null;
28
+ /**
29
+ * High-level grouping label for the topic.
30
+ * Examples: "Deductions", "Benefits", "Onboarding".
31
+ */
32
+ category: string;
33
+ /** Human-readable title displayed in search results and detail views. */
34
+ title: string;
35
+ /**
36
+ * Short plain-text summary shown on search result cards.
37
+ * NULL if no description has been authored.
38
+ */
39
+ description: string | null;
40
+ /**
41
+ * Rich HTML body authored in the Tiptap editor.
42
+ * NULL until content has been saved.
43
+ */
44
+ content: string | null;
45
+ /**
46
+ * Lucide icon name rendered alongside the topic title.
47
+ * NULL if no icon has been selected.
48
+ */
49
+ icon: string | null;
50
+ /** Ascending integer used to order sibling topics within a category. */
51
+ sort_order: number;
52
+ /**
53
+ * Whether this topic is visible to end-users.
54
+ * Unpublished topics are only accessible in the editor.
55
+ */
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
+ /**
65
+ * Tags joined from the ihelp_tags table.
66
+ * Empty array when no tags are associated.
67
+ */
68
+ tags: IhelpTag[];
69
+ /**
70
+ * Flat list of context keys denormalized from ihelp_context_map.
71
+ * Empty array when the topic has no context mappings.
72
+ * Example values: ["deductions.work_from_home", "benefits.dental"]
73
+ */
74
+ context_keys: string[];
75
+ /**
76
+ * Child topics populated when building a tree for rendering.
77
+ * Absent (undefined) in flat list responses.
78
+ */
79
+ children?: IhelpTopic[];
80
+ }
81
+ /**
82
+ * A decorative or informational badge attached to a topic.
83
+ * Stored in the ihelp_tags table with a foreign key to ihelp_topics.
84
+ */
85
+ 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
+ * Display text rendered inside the badge.
92
+ * Examples: "Receipt Required", "Tip", "New".
93
+ */
94
+ label: string;
95
+ /**
96
+ * Visual style variant applied to the badge.
97
+ * Maps to a colour scheme: default (grey), success (green),
98
+ * warning (amber), info (blue).
99
+ */
100
+ variant: 'default' | 'success' | 'warning' | 'info';
101
+ /**
102
+ * Optional Lucide icon name rendered inside the badge.
103
+ * NULL if no icon is desired.
104
+ */
105
+ icon: string | null;
106
+ }
107
+ /**
108
+ * A mapping between a topic and a dot-notation context key.
109
+ * Stored in the ihelp_context_map table.
110
+ *
111
+ * Context mappings allow the IhelpIcon component to surface the most
112
+ * relevant topics for a given location in the host application.
113
+ */
114
+ export interface IhelpContextMapping {
115
+ /** Primary key — UUID generated by the database. */
116
+ id: string;
117
+ /** UUID of the topic being mapped. */
118
+ topic_id: string;
119
+ /**
120
+ * Dot-notation key identifying a location in the host application.
121
+ * Example: "deductions.work_from_home", "payroll.leave_accrual".
122
+ */
123
+ context_key: string;
124
+ /**
125
+ * Ascending integer used to rank topics when multiple are mapped
126
+ * to the same context key. Lower values appear first.
127
+ */
128
+ priority: number;
129
+ }
130
+ /** Row in the hazo_config key-value table. */
131
+ export interface HazoConfigRow {
132
+ id: string;
133
+ config_key: string;
134
+ /** JSON string — parse before use. */
135
+ config_value: string;
136
+ scope_id: string | null;
137
+ created_at: string;
138
+ changed_at: string | null;
139
+ }
140
+ /** A single context-key option stored in the "context_keys" config entry. */
141
+ export interface ContextKeyOption {
142
+ key: string;
143
+ label: string;
144
+ }
145
+ /**
146
+ * Payload accepted by the POST /ihelp/topics and PATCH /ihelp/topics/:id
147
+ * endpoints when creating or updating a topic.
148
+ *
149
+ * All fields except title are optional so the same type covers both full
150
+ * creates and partial updates (use Partial<IhelpTopicInput> for updates).
151
+ */
152
+ export interface IhelpTopicInput {
153
+ /**
154
+ * UUID of the desired parent topic.
155
+ * Omit or pass null to create / move a topic to the root level.
156
+ */
157
+ parent_id?: string | null;
158
+ /**
159
+ * Organisation UUID for scoping.
160
+ * Omit or pass null to make the topic globally visible.
161
+ */
162
+ scope_id?: string | null;
163
+ /**
164
+ * High-level grouping label.
165
+ * Examples: "Deductions", "Benefits".
166
+ */
167
+ category?: string;
168
+ /** Human-readable title — required when creating a new topic. */
169
+ title: string;
170
+ /**
171
+ * Short plain-text summary for search cards.
172
+ * Omit or pass null to clear an existing description.
173
+ */
174
+ description?: string | null;
175
+ /**
176
+ * Rich HTML body from the Tiptap editor.
177
+ * Omit or pass null to clear existing content.
178
+ */
179
+ content?: string | null;
180
+ /**
181
+ * Lucide icon name.
182
+ * Omit or pass null to remove the icon.
183
+ */
184
+ icon?: string | null;
185
+ /**
186
+ * Ascending integer controlling display order among siblings.
187
+ * Defaults to 0 when omitted.
188
+ */
189
+ sort_order?: number;
190
+ /**
191
+ * Whether to make this topic visible to end-users immediately.
192
+ * Defaults to false when omitted.
193
+ */
194
+ is_published?: boolean;
195
+ /**
196
+ * Tags to attach to the topic.
197
+ * When provided on an update, existing tags are replaced in full.
198
+ */
199
+ tags?: IhelpTagInput[];
200
+ /**
201
+ * Dot-notation context keys to map to this topic.
202
+ * When provided on an update, existing mappings are replaced in full.
203
+ */
204
+ context_keys?: string[];
205
+ }
206
+ /**
207
+ * Payload for creating or replacing a tag on a topic.
208
+ * The topic_id is supplied by the API route, not this input type.
209
+ */
210
+ export interface IhelpTagInput {
211
+ /**
212
+ * Display text rendered inside the badge.
213
+ * Examples: "Receipt Required", "Tip".
214
+ */
215
+ label: string;
216
+ /**
217
+ * Visual style variant for the badge.
218
+ * Defaults to 'default' when omitted.
219
+ */
220
+ variant?: 'default' | 'success' | 'warning' | 'info';
221
+ /**
222
+ * Optional Lucide icon name rendered inside the badge.
223
+ * Omit or pass null for a text-only badge.
224
+ */
225
+ icon?: string | null;
226
+ }
227
+ /**
228
+ * Envelope returned by all ihelp API endpoints.
229
+ *
230
+ * On success, data contains the requested or mutated resource.
231
+ * On failure, error contains a human-readable message and data is absent.
232
+ *
233
+ * @template T - Shape of the data payload; defaults to unknown.
234
+ */
235
+ export interface IhelpApiResponse<T = unknown> {
236
+ /** true when the operation completed without error. */
237
+ success: boolean;
238
+ /**
239
+ * The returned resource or collection.
240
+ * Absent when success is false.
241
+ */
242
+ data?: T;
243
+ /**
244
+ * Human-readable error message.
245
+ * Absent when success is true.
246
+ */
247
+ error?: string;
248
+ }
249
+ /**
250
+ * Configuration for the image upload feature.
251
+ * Read from config/hazo_ihelp_config.ini [image_upload] section.
252
+ */
253
+ export interface IhelpImageUploadConfig {
254
+ max_file_size_mb: number;
255
+ allowed_types: string[];
256
+ upload_dir: string;
257
+ upload_url_prefix: string;
258
+ resize_enabled: boolean;
259
+ resize_max_width: number;
260
+ resize_max_height: number;
261
+ resize_quality: number;
262
+ }
263
+ /**
264
+ * Response payload from the image upload endpoint.
265
+ */
266
+ export interface IhelpImageUploadResponse {
267
+ url: string;
268
+ filename: string;
269
+ size: number;
270
+ width?: number;
271
+ height?: number;
272
+ }
273
+ /**
274
+ * Options passed to createIhelpHandler when registering the API route in a
275
+ * Next.js (or other framework) application.
276
+ *
277
+ * Mirrors the handler factory pattern used by hazo_notes
278
+ * (createNotesHandler) so that consuming apps configure the package in a
279
+ * consistent way.
280
+ */
281
+ export interface CreateIhelpHandlerOptions {
282
+ /**
283
+ * Factory function (sync or async) that returns a configured database
284
+ * connection from hazo_connect.
285
+ *
286
+ * Called once per request so connection-pooling concerns are owned by
287
+ * the consuming application.
288
+ */
289
+ getHazoConnect: () => Promise<any> | any;
290
+ /**
291
+ * Optional factory function that returns a logger instance.
292
+ * When omitted, the handler falls back to console.
293
+ */
294
+ getLogger?: () => any;
295
+ }
296
+ /**
297
+ * Customisable colour tokens for the ihelp dialog.
298
+ *
299
+ * Each value should be a valid CSS colour string (hex, rgb, hsl, oklch, etc.).
300
+ * Any omitted key falls back to the host application's CSS custom properties
301
+ * (--background, --foreground, etc.) or sensible defaults.
302
+ */
303
+ export interface IhelpTheme {
304
+ /** Dialog / panel background colour. */
305
+ background?: string;
306
+ /** Primary text colour. */
307
+ foreground?: string;
308
+ /** Muted / secondary text colour. */
309
+ muted_foreground?: string;
310
+ /** Border colour. */
311
+ border?: string;
312
+ /** Accent / hover background colour. */
313
+ accent?: string;
314
+ /** Selected item highlight colour. */
315
+ accent_foreground?: string;
316
+ /** Primary accent colour (links, active indicators). */
317
+ primary?: string;
318
+ /** Primary accent text on primary bg. */
319
+ primary_foreground?: string;
320
+ }
321
+ /**
322
+ * Customisable UI labels / strings for the ihelp dialog.
323
+ *
324
+ * Useful for localisation or branding.
325
+ */
326
+ export interface IhelpLabels {
327
+ /** Placeholder text for the search input. Default: "Search help topics..." */
328
+ search_placeholder?: string;
329
+ /** Title shown in the dialog header / accessibility label. Default: "Help" */
330
+ dialog_title?: string;
331
+ /** Prefix shown above the detail title. Default: "More Info:" */
332
+ more_info_prefix?: string;
333
+ /** Heading for the related-topics section. Default: "Related topics" */
334
+ related_topics?: string;
335
+ /** Text shown when loading topics. Default: "Loading..." */
336
+ loading?: string;
337
+ /** Text when search yields nothing. Default: "No results found" */
338
+ no_results?: string;
339
+ /** Text when no topics exist. Default: "No topics available" */
340
+ no_topics?: string;
341
+ /** Prompt when no topic is selected. Default: "Select a topic to view details" */
342
+ select_prompt?: string;
343
+ /** Browse-all tooltip text. Default: "Browse all topics" */
344
+ browse_all?: string;
345
+ /** Context banner prefix. Default: "Showing help for:" */
346
+ showing_help_for?: string;
347
+ }
348
+ /**
349
+ * Props for the IhelpProvider context component.
350
+ *
351
+ * Wrap your application (or a subtree) with IhelpProvider to give all
352
+ * child components access to topics, search state, and keyboard shortcuts.
353
+ */
354
+ export interface IhelpProviderProps {
355
+ /** React subtree that will have access to the ihelp context. */
356
+ children: React.ReactNode;
357
+ /**
358
+ * Base URL prefix for all ihelp API requests.
359
+ * Defaults to '/api/ihelp' when omitted.
360
+ */
361
+ api_base_url?: string;
362
+ /**
363
+ * Organisation UUID passed as a query parameter on every API request.
364
+ * NULL or omitted for globally-scoped topics only.
365
+ */
366
+ scope_id?: string | null;
367
+ /**
368
+ * Keyboard shortcut string (KeyboardEvent key or modifier combo) used
369
+ * to open the search dialog.
370
+ * Defaults to 'mod+k' when omitted.
371
+ */
372
+ search_shortcut?: string;
373
+ /**
374
+ * Whether to register the keyboard shortcut listener.
375
+ * Defaults to true when omitted.
376
+ */
377
+ enable_shortcuts?: boolean;
378
+ /**
379
+ * Base URL for topic images/assets. Images in content reference paths
380
+ * relative to this base. When scope_id is set, the full path becomes
381
+ * `{asset_base_url}/{scope_id}/filename.png`. For global (no scope),
382
+ * it is `{asset_base_url}/global/filename.png`.
383
+ *
384
+ * Example: '/api/ihelp/assets' or 'https://cdn.example.com/help-images'
385
+ */
386
+ asset_base_url?: string;
387
+ /**
388
+ * Colour overrides for the ihelp dialog.
389
+ * See IhelpTheme for available tokens.
390
+ */
391
+ theme?: IhelpTheme;
392
+ /**
393
+ * UI label / string overrides for localisation or branding.
394
+ * See IhelpLabels for available keys.
395
+ */
396
+ labels?: IhelpLabels;
397
+ }
398
+ /**
399
+ * Props for the IhelpIcon trigger component.
400
+ *
401
+ * Renders a small icon button that opens the search dialog pre-filtered
402
+ * to topics matching the given context key.
403
+ */
404
+ export interface IhelpIconProps {
405
+ /**
406
+ * Dot-notation key identifying the current location in the host
407
+ * application (e.g. "deductions.work_from_home").
408
+ * Used to look up relevant topics from ihelp_context_map.
409
+ */
410
+ context_key: string;
411
+ /**
412
+ * Icon render size in pixels.
413
+ * Defaults to 16 when omitted.
414
+ */
415
+ size?: number;
416
+ /** Optional additional CSS class names applied to the icon button. */
417
+ className?: string;
418
+ }
419
+ /**
420
+ * Props for the IhelpSearchDialog component.
421
+ *
422
+ * The dialog supports three opening modes: context home (scoped to a
423
+ * context_key), free-text search, and browse-all.
424
+ */
425
+ export interface IhelpSearchDialogProps {
426
+ /**
427
+ * Controlled open state.
428
+ * When omitted the dialog manages its own open state.
429
+ */
430
+ open?: boolean;
431
+ /**
432
+ * Callback fired when the dialog requests an open-state change.
433
+ * Required when open is controlled from outside.
434
+ */
435
+ onOpenChange?: (open: boolean) => void;
436
+ /**
437
+ * Pre-seeds the dialog in CONTEXT HOME state for the given key.
438
+ * When omitted the dialog opens in browse or search state.
439
+ */
440
+ initial_context_key?: string;
441
+ /** Optional additional CSS class names applied to the dialog content. */
442
+ className?: string;
443
+ }
444
+ /**
445
+ * Props for the IhelpDetailPanel component.
446
+ *
447
+ * Renders the full content of a single topic including its rich HTML body,
448
+ * tags, and child topic links.
449
+ */
450
+ export interface IhelpDetailPanelProps {
451
+ /** The topic whose details are being rendered. */
452
+ topic: IhelpTopic;
453
+ /**
454
+ * Callback fired when the user activates a link to a child or related
455
+ * topic inside the panel. The consuming component should navigate to the
456
+ * given topic_id.
457
+ */
458
+ onNavigate?: (topic_id: string) => void;
459
+ /** Optional additional CSS class names applied to the panel container. */
460
+ className?: string;
461
+ }
462
+ /**
463
+ * Props for the IhelpEditor component.
464
+ *
465
+ * Full CRUD interface for managing topics, rendered as an admin panel.
466
+ */
467
+ export interface IhelpEditorProps {
468
+ /**
469
+ * Organisation UUID used to filter and scope new topics in the editor.
470
+ * NULL or omitted to operate on globally-scoped topics.
471
+ */
472
+ scope_id?: string | null;
473
+ /** Optional additional CSS class names applied to the editor container. */
474
+ className?: string;
475
+ /** URL of the image upload endpoint, e.g. "/api/ihelp/upload". Enables image toolbar button when set. */
476
+ upload_url?: string;
477
+ /** URL of the config API endpoint, e.g. "/api/ihelp/config". Enables context key dropdown when set. */
478
+ config_api_url?: string;
479
+ }
480
+ /**
481
+ * Discriminated union representing the current view inside the search dialog.
482
+ *
483
+ * - context_home: Showing topics mapped to a specific context key.
484
+ * - search: Showing free-text search results for a query string.
485
+ * - browse: Showing all published topics grouped by category.
486
+ * - detail: Showing the full content of a single topic.
487
+ */
488
+ export type IhelpNavState = {
489
+ /** Display topics relevant to the given application context. */
490
+ view: 'context_home';
491
+ /** Dot-notation context key passed from the triggering IhelpIcon. */
492
+ context_key: string;
493
+ } | {
494
+ /** Display free-text search results. */
495
+ view: 'search';
496
+ /** Current search query string (may be empty). */
497
+ query: string;
498
+ } | {
499
+ /** Display all published topics grouped by category. */
500
+ view: 'browse';
501
+ } | {
502
+ /** Display the full detail panel for a single topic. */
503
+ view: 'detail';
504
+ /** UUID of the topic being displayed. */
505
+ topic_id: string;
506
+ };
507
+ /**
508
+ * Return value of the useIhelp hook.
509
+ *
510
+ * Provides a flat list of topics fetched from the API along with loading
511
+ * and error state.
512
+ */
513
+ export interface UseIhelpResult {
514
+ /** All topics returned by the most recent fetch. Empty array while loading. */
515
+ topics: IhelpTopic[];
516
+ /** True while the initial or refetch request is in-flight. */
517
+ loading: boolean;
518
+ /**
519
+ * Error message if the last fetch failed.
520
+ * NULL when no error has occurred.
521
+ */
522
+ error: string | null;
523
+ /** Trigger a fresh fetch of topics from the API. */
524
+ refetch: () => void;
525
+ }
526
+ /**
527
+ * Return value of the useIhelpSearch hook.
528
+ *
529
+ * Manages search query state and returns filtered results derived from a
530
+ * cached list of all topics.
531
+ */
532
+ export interface UseIhelpSearchResult {
533
+ /** Current search query string. */
534
+ query: string;
535
+ /**
536
+ * Update the search query.
537
+ * Passing an empty string resets the filter.
538
+ */
539
+ set_query: (q: string) => void;
540
+ /**
541
+ * Topics matching the current query.
542
+ * Contains all topics when query is empty.
543
+ */
544
+ results: IhelpTopic[];
545
+ /** Unfiltered list of all topics available for search. */
546
+ all_topics: IhelpTopic[];
547
+ /** True while the underlying topic list is being fetched. */
548
+ loading: boolean;
549
+ /**
550
+ * Error message if the topic fetch failed.
551
+ * NULL when no error has occurred.
552
+ */
553
+ error: string | null;
554
+ }
555
+ /**
556
+ * Return value of the useIhelpEditor hook.
557
+ *
558
+ * Provides full CRUD operations for topics in addition to the standard
559
+ * fetch state from UseIhelpResult.
560
+ */
561
+ export interface UseIhelpEditorResult {
562
+ /** All topics returned by the most recent fetch. Empty array while loading. */
563
+ topics: IhelpTopic[];
564
+ /** True while the initial or refetch request is in-flight. */
565
+ loading: boolean;
566
+ /**
567
+ * Error message if the last operation failed.
568
+ * NULL when no error has occurred.
569
+ */
570
+ error: string | null;
571
+ /**
572
+ * Create a new topic from the given input and return the persisted record.
573
+ *
574
+ * @param input - Topic fields to create.
575
+ * @returns The newly created IhelpTopic with server-assigned id and timestamps.
576
+ */
577
+ create_topic: (input: IhelpTopicInput) => Promise<IhelpTopic>;
578
+ /**
579
+ * Update an existing topic by id and return the updated record.
580
+ *
581
+ * @param id - UUID of the topic to update.
582
+ * @param input - Partial set of fields to overwrite.
583
+ * @returns The updated IhelpTopic with refreshed changed_at timestamp.
584
+ */
585
+ update_topic: (id: string, input: Partial<IhelpTopicInput>) => Promise<IhelpTopic>;
586
+ /**
587
+ * Permanently delete a topic and its associated tags and context mappings.
588
+ *
589
+ * @param id - UUID of the topic to delete.
590
+ */
591
+ delete_topic: (id: string) => Promise<void>;
592
+ /** Trigger a fresh fetch of topics from the API. */
593
+ refetch: () => void;
594
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AK,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,8 @@
1
+ /**
2
+ * Type definitions for hazo_ihelp package.
3
+ *
4
+ * hazo_ihelp is a contextual popup help system that supports hierarchical
5
+ * topics, multi-tenant scoping, rich HTML content, and keyboard-driven search.
6
+ */
7
+ export {};
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
@@ -0,0 +1,3 @@
1
+ import { type ClassValue } from 'clsx';
2
+ export declare function cn(...inputs: ClassValue[]): string;
3
+ //# sourceMappingURL=cn.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,6 @@
1
+ import { clsx } from 'clsx';
2
+ import { twMerge } from 'tailwind-merge';
3
+ export function cn(...inputs) {
4
+ return twMerge(clsx(inputs));
5
+ }
6
+ //# sourceMappingURL=cn.js.map
@@ -0,0 +1 @@
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"}