@esheet/field-kerebron 0.0.4-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.
@@ -0,0 +1,4 @@
1
+ const e = {};
2
+ export {
3
+ e as default
4
+ };
@@ -0,0 +1,41 @@
1
+ import { AssetLoad } from '@kerebron/editor';
2
+ import { FieldComponentProps } from '@esheet/core';
3
+ import { JSX } from 'react/jsx-runtime';
4
+
5
+ /**
6
+ * Configure the Kerebron rich text editor.
7
+ * Call this once at app startup before rendering any richtext fields.
8
+ *
9
+ * @param assetLoad - Function that fetches WASM assets by filename.
10
+ * Use `createAssetLoad(url)` from `@kerebron/wasm/web` (browser).
11
+ *
12
+ * @example
13
+ * import { createAssetLoad } from '@kerebron/wasm/web';
14
+ * configureRichTextField({ assetLoad: createAssetLoad('/kerebron-wasm') });
15
+ */
16
+ export declare function configureRichTextField(options: {
17
+ assetLoad: AssetLoad;
18
+ }): void;
19
+
20
+ /**
21
+ * RichTextEditorField — a Kerebron/ProseMirror-based rich text editor field.
22
+ *
23
+ * Register in your app before use:
24
+ * ```ts
25
+ * import { registerFieldComponents } from '@esheet/fields';
26
+ * import { RichTextEditorField } from '@esheet/field-kerebron';
27
+ * registerFieldComponents({ richtext: RichTextEditorField });
28
+ * ```
29
+ */
30
+ export declare function RichTextEditorField({ field, form, response, isPreview, onUpdate, onResponse, }: FieldComponentProps): JSX.Element;
31
+
32
+ export declare interface RichTextFieldDefinition {
33
+ fieldType: 'richtext';
34
+ id: string;
35
+ question?: string;
36
+ required?: boolean;
37
+ /** Markdown content used as the default/initial value. */
38
+ defaultContent?: string;
39
+ }
40
+
41
+ export { }