@quillmark/svelte 0.26.1 → 0.26.2
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.
|
@@ -170,8 +170,14 @@
|
|
|
170
170
|
view.dispatch(view.state.tr.setSelection(sel).scrollIntoView());
|
|
171
171
|
}
|
|
172
172
|
|
|
173
|
+
/** What the view draws from the props. The effect below writes it and the view reads
|
|
174
|
+
* it, never the props: ProseMirror's `destroy` redraws the decorations and attributes
|
|
175
|
+
* once more, and a prop read there re-derives the card over handles the host has
|
|
176
|
+
* already released. */
|
|
177
|
+
let drawn = untrack(() => ({ label, labelledBy, describedBy, placeholder }));
|
|
178
|
+
|
|
173
179
|
$effect(() => {
|
|
174
|
-
|
|
180
|
+
drawn = { label, labelledBy, describedBy, placeholder };
|
|
175
181
|
view?.setProps({});
|
|
176
182
|
});
|
|
177
183
|
|
|
@@ -181,7 +187,7 @@
|
|
|
181
187
|
const leaf = { inline, plaintext, islands: false };
|
|
182
188
|
// Read per attribute pass, not captured: an element's name carries its index,
|
|
183
189
|
// which a remove above it moves.
|
|
184
|
-
const names = () =>
|
|
190
|
+
const names = () => drawn;
|
|
185
191
|
const shown = (stored: Content | undefined): Content => stored ?? fallback ?? emptyContent();
|
|
186
192
|
const stored = content();
|
|
187
193
|
let seen = value;
|
|
@@ -212,7 +218,7 @@
|
|
|
212
218
|
? []
|
|
213
219
|
: proseLeafPlugins(schema, {
|
|
214
220
|
inline,
|
|
215
|
-
placeholder: () => placeholder,
|
|
221
|
+
placeholder: () => drawn.placeholder,
|
|
216
222
|
cap
|
|
217
223
|
})
|
|
218
224
|
});
|