hazo_ui 2.2.3 → 2.2.6

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/dist/index.d.cts CHANGED
@@ -1,16 +1,5 @@
1
- import * as React from 'react';
2
- import React__default from 'react';
3
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
-
5
- /**
6
- * Example component demonstrating the structure for hazo_ui components
7
- * @param props - Component props
8
- * @returns React component
9
- */
10
- declare const ExampleComponent: React__default.FC<{
11
- children?: React__default.ReactNode;
12
- className?: string;
13
- }>;
2
+ import * as React from 'react';
14
3
 
15
4
  interface FilterField {
16
5
  value: string;
@@ -115,4 +104,90 @@ interface HazoUiFlexInputProps extends Omit<InputProps, "type"> {
115
104
  }
116
105
  declare const HazoUiFlexInput: React.ForwardRefExoticComponent<HazoUiFlexInputProps & React.RefAttributes<HTMLInputElement>>;
117
106
 
118
- export { ExampleComponent, type FilterConfig, type FilterField, HazoUiFlexInput, type HazoUiFlexInputProps, HazoUiFlexRadio, type HazoUiFlexRadioItem, type HazoUiFlexRadioProps, HazoUiMultiFilterDialog, HazoUiMultiSortDialog, type SortConfig, type SortField };
107
+ /**
108
+ * Type definitions for HazoRichtextEditor component
109
+ *
110
+ * Contains all TypeScript interfaces and types used throughout the rich text editor.
111
+ */
112
+
113
+ /**
114
+ * Variable definition for template variables
115
+ */
116
+ interface Variable {
117
+ /** The variable identifier (e.g., "user_name") */
118
+ text: string;
119
+ /** Human-readable description (e.g., "Recipient's full name") */
120
+ description: string;
121
+ /** Optional category for grouping (e.g., "Template Variables", "System Variables") */
122
+ category?: string;
123
+ }
124
+ /**
125
+ * File attachment result from upload
126
+ */
127
+ interface FileAttachment {
128
+ /** File name */
129
+ name: string;
130
+ /** File type/mime type */
131
+ type: string;
132
+ /** File size in bytes */
133
+ size: number;
134
+ /** URL to the file (either data URL or uploaded URL) */
135
+ url: string;
136
+ }
137
+ /**
138
+ * Attachment stored as base64
139
+ */
140
+ interface Attachment {
141
+ /** Unique identifier */
142
+ id: string;
143
+ /** File name */
144
+ name: string;
145
+ /** File type/mime type */
146
+ type: string;
147
+ /** File size in bytes */
148
+ size: number;
149
+ /** Base64 encoded data (includes data URL prefix) */
150
+ data: string;
151
+ }
152
+ /**
153
+ * Main props for the HazoRichtextEditor component
154
+ */
155
+ interface HazoRichtextEditorProps {
156
+ /** Initial HTML content for the editor */
157
+ initial_html?: string;
158
+ /** Initial plain text content (used if initial_html is not provided) */
159
+ initial_text?: string;
160
+ /** Array of variables available for insertion */
161
+ variables?: Variable[];
162
+ /** Initial attachments array */
163
+ initial_attachments?: Attachment[];
164
+ /** Callback fired when save button is clicked - includes attachments array */
165
+ on_save?: (html: string, text: string, attachments: Attachment[]) => void;
166
+ /** Callback fired on content change */
167
+ on_change?: (html: string, text: string) => void;
168
+ /** Callback fired when attachments change */
169
+ on_attachments_change?: (attachments: Attachment[]) => void;
170
+ /** Callback fired when a file is attached for image embed - return the URL to use for the file */
171
+ on_file_attach?: (file: File) => Promise<string>;
172
+ /** Placeholder text when editor is empty */
173
+ placeholder?: string;
174
+ /** Minimum height of the editor area */
175
+ min_height?: string;
176
+ /** Maximum height of the editor area */
177
+ max_height?: string;
178
+ /** Whether the editor is read-only */
179
+ read_only?: boolean;
180
+ /** Whether to show the save button */
181
+ show_save_button?: boolean;
182
+ /** Custom text for the save button */
183
+ save_button_text?: string;
184
+ /** Additional CSS class for the container */
185
+ className?: string;
186
+ }
187
+
188
+ /**
189
+ * HazoRichtextEditor - A feature-rich rich text editor component
190
+ */
191
+ declare function HazoRichtextEditor({ initial_html, initial_text, variables, initial_attachments, on_save, on_change, on_attachments_change, on_file_attach, placeholder, min_height, max_height, read_only, show_save_button, save_button_text, className, }: HazoRichtextEditorProps): react_jsx_runtime.JSX.Element;
192
+
193
+ export { type FilterConfig, type FilterField, HazoRichtextEditor, type FileAttachment as HazoRichtextEditorFileAttachment, type HazoRichtextEditorProps, type Variable as HazoRichtextEditorVariable, HazoUiFlexInput, type HazoUiFlexInputProps, HazoUiFlexRadio, type HazoUiFlexRadioItem, type HazoUiFlexRadioProps, HazoUiMultiFilterDialog, HazoUiMultiSortDialog, type SortConfig, type SortField };
package/dist/index.d.ts CHANGED
@@ -1,16 +1,5 @@
1
- import * as React from 'react';
2
- import React__default from 'react';
3
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
-
5
- /**
6
- * Example component demonstrating the structure for hazo_ui components
7
- * @param props - Component props
8
- * @returns React component
9
- */
10
- declare const ExampleComponent: React__default.FC<{
11
- children?: React__default.ReactNode;
12
- className?: string;
13
- }>;
2
+ import * as React from 'react';
14
3
 
15
4
  interface FilterField {
16
5
  value: string;
@@ -115,4 +104,90 @@ interface HazoUiFlexInputProps extends Omit<InputProps, "type"> {
115
104
  }
116
105
  declare const HazoUiFlexInput: React.ForwardRefExoticComponent<HazoUiFlexInputProps & React.RefAttributes<HTMLInputElement>>;
117
106
 
118
- export { ExampleComponent, type FilterConfig, type FilterField, HazoUiFlexInput, type HazoUiFlexInputProps, HazoUiFlexRadio, type HazoUiFlexRadioItem, type HazoUiFlexRadioProps, HazoUiMultiFilterDialog, HazoUiMultiSortDialog, type SortConfig, type SortField };
107
+ /**
108
+ * Type definitions for HazoRichtextEditor component
109
+ *
110
+ * Contains all TypeScript interfaces and types used throughout the rich text editor.
111
+ */
112
+
113
+ /**
114
+ * Variable definition for template variables
115
+ */
116
+ interface Variable {
117
+ /** The variable identifier (e.g., "user_name") */
118
+ text: string;
119
+ /** Human-readable description (e.g., "Recipient's full name") */
120
+ description: string;
121
+ /** Optional category for grouping (e.g., "Template Variables", "System Variables") */
122
+ category?: string;
123
+ }
124
+ /**
125
+ * File attachment result from upload
126
+ */
127
+ interface FileAttachment {
128
+ /** File name */
129
+ name: string;
130
+ /** File type/mime type */
131
+ type: string;
132
+ /** File size in bytes */
133
+ size: number;
134
+ /** URL to the file (either data URL or uploaded URL) */
135
+ url: string;
136
+ }
137
+ /**
138
+ * Attachment stored as base64
139
+ */
140
+ interface Attachment {
141
+ /** Unique identifier */
142
+ id: string;
143
+ /** File name */
144
+ name: string;
145
+ /** File type/mime type */
146
+ type: string;
147
+ /** File size in bytes */
148
+ size: number;
149
+ /** Base64 encoded data (includes data URL prefix) */
150
+ data: string;
151
+ }
152
+ /**
153
+ * Main props for the HazoRichtextEditor component
154
+ */
155
+ interface HazoRichtextEditorProps {
156
+ /** Initial HTML content for the editor */
157
+ initial_html?: string;
158
+ /** Initial plain text content (used if initial_html is not provided) */
159
+ initial_text?: string;
160
+ /** Array of variables available for insertion */
161
+ variables?: Variable[];
162
+ /** Initial attachments array */
163
+ initial_attachments?: Attachment[];
164
+ /** Callback fired when save button is clicked - includes attachments array */
165
+ on_save?: (html: string, text: string, attachments: Attachment[]) => void;
166
+ /** Callback fired on content change */
167
+ on_change?: (html: string, text: string) => void;
168
+ /** Callback fired when attachments change */
169
+ on_attachments_change?: (attachments: Attachment[]) => void;
170
+ /** Callback fired when a file is attached for image embed - return the URL to use for the file */
171
+ on_file_attach?: (file: File) => Promise<string>;
172
+ /** Placeholder text when editor is empty */
173
+ placeholder?: string;
174
+ /** Minimum height of the editor area */
175
+ min_height?: string;
176
+ /** Maximum height of the editor area */
177
+ max_height?: string;
178
+ /** Whether the editor is read-only */
179
+ read_only?: boolean;
180
+ /** Whether to show the save button */
181
+ show_save_button?: boolean;
182
+ /** Custom text for the save button */
183
+ save_button_text?: string;
184
+ /** Additional CSS class for the container */
185
+ className?: string;
186
+ }
187
+
188
+ /**
189
+ * HazoRichtextEditor - A feature-rich rich text editor component
190
+ */
191
+ declare function HazoRichtextEditor({ initial_html, initial_text, variables, initial_attachments, on_save, on_change, on_attachments_change, on_file_attach, placeholder, min_height, max_height, read_only, show_save_button, save_button_text, className, }: HazoRichtextEditorProps): react_jsx_runtime.JSX.Element;
192
+
193
+ export { type FilterConfig, type FilterField, HazoRichtextEditor, type FileAttachment as HazoRichtextEditorFileAttachment, type HazoRichtextEditorProps, type Variable as HazoRichtextEditorVariable, HazoUiFlexInput, type HazoUiFlexInputProps, HazoUiFlexRadio, type HazoUiFlexRadioItem, type HazoUiFlexRadioProps, HazoUiMultiFilterDialog, HazoUiMultiSortDialog, type SortConfig, type SortField };