@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
- void [label, labelledBy, describedBy, placeholder];
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 = () => ({ label, labelledBy, describedBy });
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
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quillmark/svelte",
3
- "version": "0.26.1",
3
+ "version": "0.26.2",
4
4
  "description": "Editor, live-preview and source surfaces over a Quillmark WASM session.",
5
5
  "repository": {
6
6
  "type": "git",