@danxbot/ui 12.2.0 → 13.0.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/dist/index.js +4135 -4120
- package/dist/index.js.map +1 -1
- package/dist/types/components/InlineEdit.d.ts +19 -5
- package/dist/types/components/InlineMarkdownEdit.d.ts +10 -0
- package/package.json +1 -1
|
@@ -76,13 +76,27 @@ interface InlineEditFieldProps {
|
|
|
76
76
|
/** Box ramp. Matches `Input`'s names. */
|
|
77
77
|
size?: "sm" | "md" | "lg";
|
|
78
78
|
/**
|
|
79
|
-
*
|
|
79
|
+
* How the field wraps and how Enter behaves. Three shapes, not a boolean,
|
|
80
|
+
* because "wraps visually" and "Enter inserts a newline" are independent
|
|
81
|
+
* axes — DX-3388 needed a line that wraps but never contains "\n", which a
|
|
82
|
+
* single `multiline` flag could not express without a second bolted-on
|
|
83
|
+
* prop.
|
|
80
84
|
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
85
|
+
* - `"single"` (default) — no wrap; scrolls horizontally while editing,
|
|
86
|
+
* truncates at rest. Enter commits (Shift+Enter is a no-op — there is
|
|
87
|
+
* nowhere for a second line to go).
|
|
88
|
+
* - `"wrap"` — wraps visually like `"multiline"`, but Enter still commits
|
|
89
|
+
* exactly as `"single"` does. Every typed or pasted newline is normalised
|
|
90
|
+
* to a single space by the same `beforeinput` interception that
|
|
91
|
+
* `"single"` uses to strip them — the committed value can never contain
|
|
92
|
+
* "\n". For a title or summary: readable while long, never a literal
|
|
93
|
+
* line break in something that flows into a list row, Trello, or a
|
|
94
|
+
* commit message.
|
|
95
|
+
* - `"multiline"` — grows as a multi-line block. THE COMMIT KEY MOVES,
|
|
96
|
+
* because Enter has to insert a newline instead: Enter inserts "\n",
|
|
97
|
+
* Cmd/Ctrl+Enter commits, Escape still cancels, blur still commits.
|
|
84
98
|
*/
|
|
85
|
-
|
|
99
|
+
lineMode?: "single" | "wrap" | "multiline";
|
|
86
100
|
/**
|
|
87
101
|
* Save WHILE the reader types: commit this many milliseconds after the last
|
|
88
102
|
* keystroke, with the field still open. Enter (Shift+Enter is the newline in
|
|
@@ -33,6 +33,16 @@ export interface InlineMarkdownEditProps extends EditActivation {
|
|
|
33
33
|
toolbar?: ReactNode;
|
|
34
34
|
/** Stores a pasted/dropped/picked image — see `MarkdownEditorProps.uploadImage`. */
|
|
35
35
|
uploadImage?: ImageUploader;
|
|
36
|
+
/**
|
|
37
|
+
* Fires whenever the open draft's image-upload state changes: `true` while
|
|
38
|
+
* any image in it is uploading, failed, or otherwise unstored; `false` once
|
|
39
|
+
* none are — INCLUDING when the field closes or unmounts with an upload
|
|
40
|
+
* still pending, so a caller wiring this straight into its own navigation
|
|
41
|
+
* guard can never get stuck armed after the field that armed it is gone.
|
|
42
|
+
* See the module comment ("NAVIGATION HOLD WHILE AN UPLOAD IS PENDING") for
|
|
43
|
+
* why this is a callback rather than a router hook.
|
|
44
|
+
*/
|
|
45
|
+
onUploadStateChange?: (uploading: boolean) => void;
|
|
36
46
|
/**
|
|
37
47
|
* This value cannot be edited at all, AND WHY — `InlineEdit.readOnly`'s
|
|
38
48
|
* shape and rule: asked to open, the field hands `onEditingChange(false)`
|