@voltro/ui 0.54.0 → 0.56.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/CHANGELOG.md +639 -2
- package/dist/index.d.ts +31 -0
- package/dist/index.js +548 -470
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -343,6 +343,37 @@ export declare interface RecordViewProps<R extends Record<string, unknown>> {
|
|
|
343
343
|
readonly emptyText?: string;
|
|
344
344
|
}
|
|
345
345
|
|
|
346
|
+
/**
|
|
347
|
+
* Render a stored rich-text document. Takes `unknown` on purpose — a field that
|
|
348
|
+
* was never filled holds `undefined`, and a renderer that throws on it would
|
|
349
|
+
* push a null-check onto every read site.
|
|
350
|
+
*/
|
|
351
|
+
export declare const RichTextView: (props: {
|
|
352
|
+
readonly doc: unknown;
|
|
353
|
+
}) => ReactNode;
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
* The built-in `rich-text` widget: a source `<textarea>` over the markdown
|
|
357
|
+
* subset, reporting the parsed DOCUMENT through `onChange`.
|
|
358
|
+
*
|
|
359
|
+
* The source is local state rather than a derivation of the value, because a
|
|
360
|
+
* per-keystroke `parse → serialize` round trip rewrites what the user is
|
|
361
|
+
* typing under the cursor. The value is re-seeded only when it changes from
|
|
362
|
+
* OUTSIDE (a flash re-fill after a failed no-JS POST, a form reset) — detected
|
|
363
|
+
* by comparing against the last document this widget itself emitted.
|
|
364
|
+
*/
|
|
365
|
+
export declare const RichTextWidget: (props: {
|
|
366
|
+
readonly name: string;
|
|
367
|
+
readonly label: string;
|
|
368
|
+
readonly value: unknown;
|
|
369
|
+
readonly onChange: (value: unknown) => void;
|
|
370
|
+
readonly error?: string | undefined;
|
|
371
|
+
readonly required: boolean;
|
|
372
|
+
readonly disabled?: boolean | undefined;
|
|
373
|
+
readonly description?: string | undefined;
|
|
374
|
+
readonly onBlur?: (() => void) | undefined;
|
|
375
|
+
}) => ReactNode;
|
|
376
|
+
|
|
346
377
|
/** Build the "X is editing" / "X and Y are editing" / "X and N others are
|
|
347
378
|
* editing" sentence from the editor names. Pure — exported for tests. The
|
|
348
379
|
* sentence templates come from the kit strings (localizable); defaults to the
|