@hwp-editor/react 1.1.0 → 1.3.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/README.md +5 -3
- package/dist/index.cjs +4270 -496
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +281 -59
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +861 -67
- package/dist/index.d.ts +861 -67
- package/dist/index.js +4241 -463
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -41,7 +41,9 @@ so referring to them by a fixed label goes stale the moment the copy or the
|
|
|
41
41
|
locale changes. Protected/distribution documents open read-only with a notice
|
|
42
42
|
(engine `capabilities().editable === false`).
|
|
43
43
|
|
|
44
|
-
Keyboard: `Escape` clears the selection
|
|
44
|
+
Keyboard: `Escape` clears the selection, or closes the new-document dialog
|
|
45
|
+
when it is open (without touching the selection); `Cmd/Ctrl+Enter` applies
|
|
46
|
+
pending ops.
|
|
45
47
|
|
|
46
48
|
## Props
|
|
47
49
|
|
|
@@ -73,8 +75,8 @@ rendering in a way a getter read from outside the render cycle cannot.
|
|
|
73
75
|
| Method | Returns | No-op when |
|
|
74
76
|
| ------ | ------- | ---------- |
|
|
75
77
|
| `apply()` | `Promise<void>` | The queue is empty, no document is loaded, an apply is already in flight, or the editor is read-only. Resolves without touching the engine. |
|
|
76
|
-
| `revert()` | `Promise<void>` | The snapshot stack is empty. Resolves without touching the engine. |
|
|
77
|
-
| `refresh()` | `Promise<void>` | Never a no-op: it re-reads and re-renders the current document after an external change. **Rejects** if the engine fails, after firing `onError` and showing the alert. |
|
|
78
|
+
| `revert()` | `Promise<void>` | The snapshot stack is empty, or a load is replacing the document its snapshots came from (the refusal fires `onError` and the notice line). Resolves without touching the engine. |
|
|
79
|
+
| `refresh()` | `Promise<void>` | Never a no-op: it re-reads and re-renders the current document after an external change. **Rejects** if the engine fails, after firing `onError` and showing the alert — and also when a load is in flight, or takes the document over while the read runs, because that reading describes a document the editor has left. It rejects the same way, firing `onError` only, when an edit or an undo replaces the document while the read runs: that edit has already put its own envelope and pages on screen, so no alert is shown, and the caller hears that its reading was discarded rather than installed. |
|
|
78
80
|
| `openCompose()` | `void` | Never; it opens the new-document compose dialog. |
|
|
79
81
|
|
|
80
82
|
Host callbacks are non-reactive: passing a fresh inline arrow on every
|