@pie-lib/editable-html-tip-tap 3.0.5-next.20261014231219 → 3.1.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.
@@ -1,46 +1,47 @@
1
1
  import { ExternalPaste as e } from "../external-paste.js";
2
2
  import { normalizeInitialMarkup as t } from "../utils/helper.js";
3
- import n from "../extensions/extended-table.js";
4
- import { ExtendedTableCell as r, ExtendedTableHeader as i } from "../extensions/extended-table-cell.js";
5
- import { DivNode as a } from "../extensions/div-node.js";
6
- import { EnsureEmptyRootIsDiv as ee } from "../extensions/ensure-empty-root-div.js";
7
- import { EnsureListItemContentIsDiv as te } from "../extensions/ensure-list-item-content-is-div.js";
8
- import { DragInTheBlankNode as o, ExplicitConstructedResponseNode as s, InlineDropdownNode as c, MathTemplatedNode as l, ResponseAreaExtension as u } from "../extensions/responseArea.js";
9
- import { MathNode as ne } from "../extensions/math.js";
10
- import { ImageUploadNode as re, uploadPastedImage as ie } from "../extensions/image.js";
11
- import { Media as ae } from "../extensions/media.js";
12
- import { CSSMark as oe } from "../extensions/css.js";
13
- import { ExtendedListItem as se } from "../extensions/extended-list-item.js";
14
- import { HeadingParagraph as ce } from "../extensions/heading-paragraph.js";
15
- import { valueToSize as d } from "../utils/size.js";
16
- import le from "./TiptapContainer.js";
17
- import { PLUGINS_MAP as ue, buildExtensions as f } from "../extensions/index.js";
18
- import { useCallback as p, useEffect as m, useMemo as h, useRef as g, useState as _ } from "react";
19
- import { debounce as de } from "@pie-element/shared-lodash";
20
- import { EditorContent as v, useEditor as y, useEditorState as b } from "@tiptap/react";
21
- import { styled as x } from "@mui/material/styles";
22
- import S from "@tiptap/starter-kit";
23
- import { TextStyleKit as C } from "@tiptap/extension-text-style";
24
- import { CharacterCount as w } from "@tiptap/extension-character-count";
25
- import T from "@tiptap/extension-superscript";
26
- import E from "@tiptap/extension-subscript";
27
- import D from "@tiptap/extension-text-align";
28
- import O from "@tiptap/extension-image";
29
- import k from "@tiptap/extension-placeholder";
30
- import { TableRow as A } from "@tiptap/extension-table-row";
31
- import { jsx as j } from "react/jsx-runtime";
3
+ import { setPendingSaveFlush as n } from "../pending-save.js";
4
+ import r from "../extensions/extended-table.js";
5
+ import { ExtendedTableCell as i, ExtendedTableHeader as a } from "../extensions/extended-table-cell.js";
6
+ import { DivNode as ee } from "../extensions/div-node.js";
7
+ import { EnsureEmptyRootIsDiv as te } from "../extensions/ensure-empty-root-div.js";
8
+ import { EnsureListItemContentIsDiv as ne } from "../extensions/ensure-list-item-content-is-div.js";
9
+ import { DragInTheBlankNode as re, ExplicitConstructedResponseNode as ie, InlineDropdownNode as ae, MathTemplatedNode as oe, ResponseAreaExtension as se } from "../extensions/responseArea.js";
10
+ import { MathNode as ce } from "../extensions/math.js";
11
+ import { ImageUploadNode as o, uploadPastedImage as s } from "../extensions/image.js";
12
+ import { Media as c } from "../extensions/media.js";
13
+ import { CSSMark as le } from "../extensions/css.js";
14
+ import { ExtendedListItem as ue } from "../extensions/extended-list-item.js";
15
+ import { HeadingParagraph as l } from "../extensions/heading-paragraph.js";
16
+ import { valueToSize as u } from "../utils/size.js";
17
+ import de from "./TiptapContainer.js";
18
+ import { PLUGINS_MAP as fe, buildExtensions as pe } from "../extensions/index.js";
19
+ import { useCallback as d, useEffect as f, useMemo as p, useRef as m, useState as h } from "react";
20
+ import { debounce as g } from "@pie-element/shared-lodash";
21
+ import { EditorContent as _, useEditor as me, useEditorState as he } from "@tiptap/react";
22
+ import { styled as v } from "@mui/material/styles";
23
+ import y from "@tiptap/starter-kit";
24
+ import { TextStyleKit as b } from "@tiptap/extension-text-style";
25
+ import { CharacterCount as ge } from "@tiptap/extension-character-count";
26
+ import _e from "@tiptap/extension-superscript";
27
+ import ve from "@tiptap/extension-subscript";
28
+ import ye from "@tiptap/extension-text-align";
29
+ import be from "@tiptap/extension-image";
30
+ import xe from "@tiptap/extension-placeholder";
31
+ import { TableRow as x } from "@tiptap/extension-table-row";
32
+ import { jsx as S } from "react/jsx-runtime";
32
33
  //#region src/components/EditableHtml.tsx
33
- var M = {
34
+ var C = {
34
35
  position: "bottom",
35
36
  alignment: "left",
36
37
  alwaysVisible: !1,
37
38
  showDone: !0,
38
39
  doneOn: "blur"
39
- }, N = {
40
+ }, w = {
40
41
  options: {},
41
42
  respAreaToolbar: () => {},
42
43
  onHandleAreaChange: () => {}
43
- }, P = [
44
+ }, T = [
44
45
  "bold",
45
46
  "italic",
46
47
  "underline",
@@ -62,7 +63,7 @@ var M = {
62
63
  "h3",
63
64
  "undo",
64
65
  "redo"
65
- ], F = {
66
+ ], E = {
66
67
  bold: "bold",
67
68
  italic: "italic",
68
69
  underline: "underline",
@@ -73,7 +74,7 @@ var M = {
73
74
  "numbered-list": "orderedList",
74
75
  table: "table",
75
76
  image: "image"
76
- }, I = {
77
+ }, D = {
77
78
  "--white": "#fff",
78
79
  "--black": "#2e2b29",
79
80
  "--black-contrast": "#110f0e",
@@ -92,7 +93,7 @@ var M = {
92
93
  "--red": "#ff5c33",
93
94
  "--red-light": "#ffebe5",
94
95
  "--shadow": "0px 12px 33px 0px rgba(0, 0, 0, .06),\n 0px 3.618px 9.949px 0px rgba(0, 0, 0, .04)"
95
- }, L = (e, t, n) => ({
96
+ }, O = (e, t, n) => ({
96
97
  role: "textbox",
97
98
  "data-pie-editor": "true",
98
99
  class: "mathjax_ignore",
@@ -101,55 +102,80 @@ var M = {
101
102
  autocapitalize: e ? "on" : "off",
102
103
  ...t && { "aria-label": t },
103
104
  ...n && { "aria-labelledby": n }
104
- }), R = ["aria-label", "aria-labelledby"], z = (v) => {
105
- let { showParagraphs: x, separateParagraphs: z } = v.pluginProps || {}, [fe, V] = _([]), [H, pe] = _(!1), { toolbarOpts: me } = v, U = p((e) => {
106
- V((t) => {
105
+ }), k = ["aria-label", "aria-labelledby"], A = 5, j = (e) => e._insertingImage || e._toolbarOpened || e.isActive("inline_dropdown") || e.isActive("explicit_constructed_response"), M = (_) => {
106
+ let { showParagraphs: v, separateParagraphs: M } = _.pluginProps || {}, [Ce, N] = h([]), [we, Te] = h(!1), { toolbarOpts: Ee } = _, P = d((e) => {
107
+ N((t) => {
107
108
  let n = t.filter((t) => t.pos !== e);
108
- return n.length === 0 && pe(!1), n;
109
+ return n.length === 0 && Te(!1), n;
109
110
  });
110
- }, [V]), W = {
111
- ...M,
112
- ...me
113
- }, G = p((e) => {
111
+ }, [N]), F = {
112
+ ...C,
113
+ ...Ee
114
+ }, I = m([]), L = (e) => {
115
+ I.current = [...I.current.slice(1 - A), e], _.onChange?.(e);
116
+ }, R = m(L);
117
+ R.current = L;
118
+ let z = d((e) => {
114
119
  let t = e.getHTML();
115
- v.markup !== t && v.onChange?.(t), W.doneOn === "blur" && v.onDone?.(t);
120
+ _.markup !== t && R.current(t), F.doneOn === "blur" && _.onDone?.(t);
116
121
  }, [
117
- v.markup,
118
- v.onChange,
119
- v.onDone,
120
- W.doneOn
121
- ]), K = h(() => ({
122
- ...N,
123
- ...v.responseAreaProps,
124
- onInlineDropdownToolbarClose: G
125
- }), [v.responseAreaProps, G]), q = h(() => {
126
- let { customPlugins: e, ...t } = v.pluginProps || {};
122
+ _.markup,
123
+ _.onChange,
124
+ _.onDone,
125
+ F.doneOn
126
+ ]), B = m(z);
127
+ B.current = z;
128
+ let { idleSaveDelay: V } = _, H = m(!1), U = p(() => V > 0 ? g((e) => {
129
+ if (!e.isDestroyed) {
130
+ if (!H.current && (e.view.composing || j(e))) {
131
+ W.current?.(e);
132
+ return;
133
+ }
134
+ B.current(e);
135
+ }
136
+ }, V) : null, [V]), W = m(U);
137
+ W.current = U;
138
+ let G = d((e) => {
139
+ H.current = !0;
140
+ try {
141
+ e?.flush();
142
+ } finally {
143
+ H.current = !1;
144
+ }
145
+ }, []);
146
+ f(() => () => G(U), [U, G]);
147
+ let De = d(() => G(W.current), [G]), K = p(() => ({
148
+ ...w,
149
+ ..._.responseAreaProps,
150
+ onInlineDropdownToolbarClose: z
151
+ }), [_.responseAreaProps, z]), q = p(() => {
152
+ let { customPlugins: e, ...t } = _.pluginProps || {};
127
153
  e ||= [];
128
- let n = (v.activePlugins || P)?.filter((e) => {
129
- let n = ue[e] || e, r = t[n] || {};
154
+ let n = (_.activePlugins || T)?.filter((e) => {
155
+ let n = fe[e] || e, r = t[n] || {};
130
156
  return !r || !r.disabled;
131
157
  });
132
- return f(n, e, {
158
+ return pe(n, e, {
133
159
  math: {},
134
- textAlign: v.textAlign,
160
+ textAlign: _.textAlign,
135
161
  html: {},
136
- extraCSSRules: v.extraCSSRules || {},
137
- image: { ...v.imageSupport },
162
+ extraCSSRules: _.extraCSSRules || {},
163
+ image: { ..._.imageSupport },
138
164
  toolbar: {},
139
165
  table: {},
140
166
  responseArea: { type: K.type },
141
- languageCharacters: v.languageCharactersProps,
167
+ languageCharacters: _.languageCharactersProps,
142
168
  keyPadCharacterRef: {},
143
169
  setKeypadInteraction: {},
144
170
  media: {}
145
171
  });
146
- }, [v, K.type]), J = g(null);
172
+ }, [_, K.type]), J = m(null);
147
173
  J.current = {
148
- plainText: v.pluginProps?.pasteFormatting?.disabled === !0,
149
- formatting: q.map((e) => F[e]).filter(Boolean)
174
+ plainText: _.pluginProps?.pasteFormatting?.disabled === !0,
175
+ formatting: q.map((e) => E[e]).filter(Boolean)
150
176
  };
151
- let he = [
152
- D.configure({
177
+ let Oe = [
178
+ ye.configure({
153
179
  types: [
154
180
  "heading",
155
181
  "paragraph",
@@ -171,13 +197,13 @@ var M = {
171
197
  "justify"
172
198
  ]
173
199
  }),
174
- C,
200
+ b,
175
201
  e.configure({
176
202
  settings: () => J.current,
177
- uploadImage: v.imageSupport && ie
203
+ uploadImage: _.imageSupport && s
178
204
  }),
179
- w.configure({ limit: v.charactersLimit || 1e6 }),
180
- S.configure({
205
+ ge.configure({ limit: _.charactersLimit || 1e6 }),
206
+ y.configure({
181
207
  trailingNode: {
182
208
  node: "paragraph",
183
209
  notAfter: ["paragraph", "div"]
@@ -187,95 +213,97 @@ var M = {
187
213
  linkOnPaste: !1
188
214
  }
189
215
  }),
190
- se,
191
- a,
192
- ce,
216
+ ue,
193
217
  ee,
218
+ l,
194
219
  te,
195
- k.configure({
196
- placeholder: v.placeholder,
220
+ ne,
221
+ xe.configure({
222
+ placeholder: _.placeholder,
197
223
  showOnlyWhenEditable: !0,
198
224
  showOnlyCurrent: !1,
199
225
  includeChildren: !0
200
226
  }),
201
- n,
202
- A,
203
- i,
204
227
  r,
205
- u.configure(K),
206
- s.configure(K),
207
- o.configure(K),
208
- c.configure(K),
209
- l.configure(K),
210
- ne.configure({
211
- toolbarOpts: W,
212
- math: v.pluginProps?.math || {}
228
+ x,
229
+ a,
230
+ i,
231
+ se.configure(K),
232
+ ie.configure(K),
233
+ re.configure(K),
234
+ ae.configure(K),
235
+ oe.configure(K),
236
+ ce.configure({
237
+ toolbarOpts: F,
238
+ math: _.pluginProps?.math || {}
213
239
  }),
214
- E,
215
- T,
216
- O,
217
- re.configure({
218
- toolbarOpts: W,
240
+ ve,
241
+ _e,
242
+ be,
243
+ o.configure({
244
+ toolbarOpts: F,
219
245
  imageHandling: {
220
- disableImageAlignmentButtons: v.disableImageAlignmentButtons,
221
- onDone: (e) => v.onDone?.(e.getHTML()),
222
- onDelete: v.imageSupport && v.imageSupport.delete && ((e) => {
246
+ disableImageAlignmentButtons: _.disableImageAlignmentButtons,
247
+ onDone: (e) => _.onDone?.(e.getHTML()),
248
+ onDelete: _.imageSupport && _.imageSupport.delete && ((e) => {
223
249
  let { src: t } = e.attrs;
224
- v.imageSupport.delete(t, (t) => {
225
- U(e.pos);
250
+ _.imageSupport.delete(t, (t) => {
251
+ P(e.pos);
226
252
  });
227
253
  }),
228
- insertImageRequested: v.imageSupport && ((e, t, n) => {
254
+ insertImageRequested: _.imageSupport && ((e, t, n) => {
229
255
  let [r, i] = t, a = (t) => {
230
256
  let n;
231
- H && t && (n = v.onChange), U(i), n?.(e.getHTML());
257
+ we && t && (n = R.current), P(i), n?.(e.getHTML());
232
258
  };
233
- e._insertingImage = !0, V((e) => [...e, r]), (() => {
234
- let t = n(a), r = de(() => {
259
+ e._insertingImage = !0, N((e) => [...e, r]), (() => {
260
+ let t = n(a), r = g(() => {
235
261
  let t = () => window.removeEventListener("focus", r);
236
262
  if (!e._insertingImage) {
237
263
  t();
238
264
  return;
239
265
  }
240
- U(i), e._insertingImage = !1, t();
266
+ P(i), e._insertingImage = !1, t();
241
267
  }, 500);
242
- window.addEventListener("focus", r), v.imageSupport.add(t);
268
+ window.addEventListener("focus", r), _.imageSupport.add(t);
243
269
  })();
244
270
  }),
245
- maxImageWidth: v.maxImageWidth,
246
- maxImageHeight: v.maxImageHeight
271
+ maxImageWidth: _.maxImageWidth,
272
+ maxImageHeight: _.maxImageHeight
247
273
  },
248
274
  limit: 3
249
275
  }),
250
- ae.configure({ uploadSoundSupport: v.uploadSoundSupport }),
251
- oe.configure({ extraCSSRules: v.extraCSSRules })
252
- ], Y = v.spellCheck !== !1, { ariaLabel: X, ariaLabelledBy: Z } = v, Q = y({
253
- extensions: he,
276
+ c.configure({ uploadSoundSupport: _.uploadSoundSupport }),
277
+ le.configure({ extraCSSRules: _.extraCSSRules })
278
+ ], Y = _.spellCheck !== !1, { ariaLabel: X, ariaLabelledBy: Z } = _, Q = me({
279
+ extensions: Oe,
254
280
  immediatelyRender: !1,
255
281
  editorProps: {
256
- attributes: L(Y, X, Z),
282
+ attributes: O(Y, X, Z),
257
283
  handleKeyDown(e, t) {
258
- return v.onKeyDown ? v.onKeyDown(t) : !1;
284
+ return _.onKeyDown ? _.onKeyDown(t) : !1;
259
285
  }
260
286
  },
261
- editable: !v.disabled,
262
- content: t(v.markup),
287
+ editable: !_.disabled,
288
+ content: t(_.markup),
263
289
  onUpdate: ({ editor: e, transaction: t }) => {
264
- t.isDone && v.onChange?.(e.getHTML());
290
+ t.isDone && R.current(e.getHTML()), t.docChanged && W.current && (W.current(e), n(e.view.dom, De));
265
291
  },
266
292
  onBlur: ({ editor: e }) => {
267
- e._insertingImage || e._toolbarOpened || e.isActive("inline_dropdown") || e.isActive("explicit_constructed_response") || !e.schema || G(e);
293
+ j(e) || !e.schema || (W.current?.cancel(), z(e));
268
294
  }
269
- }, [v.charactersLimit]);
270
- m(() => {
271
- v.editorRef && v.editorRef(Q);
272
- }, [v.editorRef, Q]), m(() => {
273
- Q?.setEditable(!v.disabled);
274
- }, [v.disabled, Q]), m(() => {
295
+ }, [_.charactersLimit]);
296
+ f(() => {
297
+ _.editorRef && _.editorRef(Q);
298
+ }, [_.editorRef, Q]), f(() => {
299
+ Q?.setEditable(!_.disabled);
300
+ }, [_.disabled, Q]), f(() => {
301
+ Q?.on("destroy", () => G(W.current));
302
+ }, [Q, G]), f(() => {
275
303
  if (!Q) return;
276
- let e = Q.options?.editorProps, t = e?.attributes || {}, n = L(Y, X, Z);
277
- if (["spellcheck", ...R].every((e) => t[e] === n[e])) return;
278
- let r = Object.fromEntries(Object.entries(t).filter(([e]) => !R.includes(e)));
304
+ let e = Q.options?.editorProps, t = e?.attributes || {}, n = O(Y, X, Z);
305
+ if (["spellcheck", ...k].every((e) => t[e] === n[e])) return;
306
+ let r = Object.fromEntries(Object.entries(t).filter(([e]) => !k.includes(e)));
279
307
  Q.setOptions({ editorProps: {
280
308
  ...e,
281
309
  attributes: {
@@ -288,47 +316,48 @@ var M = {
288
316
  X,
289
317
  Z,
290
318
  Q
291
- ]), m(() => {
292
- if (!Q) return;
293
- let e = t(v.markup);
319
+ ]), f(() => {
320
+ if (!Q || I.current.includes(_.markup)) return;
321
+ I.current = [];
322
+ let e = t(_.markup);
294
323
  e !== Q.getHTML() && Q.commands.setContent(e, { emitUpdate: !1 });
295
- }, [v.markup, Q]), m(() => {
296
- Object.entries(I).forEach(([e, t]) => {
324
+ }, [_.markup, Q]), f(() => {
325
+ Object.entries(D).forEach(([e, t]) => {
297
326
  document.documentElement.style.setProperty(e, t);
298
327
  });
299
328
  }, []);
300
- let ge = b({
329
+ let ke = he({
301
330
  editor: Q,
302
331
  selector: (e) => ({ isFocused: e.editor?.isFocused })
303
- }), $ = h(() => {
304
- let { minWidth: e, width: t, maxWidth: n, minHeight: r, height: i, maxHeight: a } = v;
332
+ }), $ = p(() => {
333
+ let { minWidth: e, width: t, maxWidth: n, minHeight: r, height: i, maxHeight: a } = _;
305
334
  return {
306
- width: d(t),
307
- minWidth: d(e),
308
- maxWidth: d(n),
309
- height: d(i),
310
- minHeight: d(r),
311
- maxHeight: d(a)
335
+ width: u(t),
336
+ minWidth: u(e),
337
+ maxWidth: u(n),
338
+ height: u(i),
339
+ minHeight: u(r),
340
+ maxHeight: u(a)
312
341
  };
313
- }, [v]);
314
- return /* @__PURE__ */ j(le, {
315
- ...v,
342
+ }, [_]);
343
+ return /* @__PURE__ */ S(de, {
344
+ ..._,
316
345
  activePlugins: q,
317
- toolbarOpts: W,
318
- editorState: ge,
346
+ toolbarOpts: F,
347
+ editorState: ke,
319
348
  editor: Q,
320
- children: Q && /* @__PURE__ */ j(B, {
349
+ children: Q && /* @__PURE__ */ S(Se, {
321
350
  style: {
322
351
  minHeight: $.minHeight,
323
352
  height: $.height,
324
353
  maxHeight: $.maxHeight
325
354
  },
326
- showParagraph: x && !x.disabled,
327
- separateParagraph: z && !z.disabled,
355
+ showParagraph: v && !v.disabled,
356
+ separateParagraph: M && !M.disabled,
328
357
  editor: Q
329
358
  })
330
359
  });
331
- }, B = x(v, { shouldForwardProp: (e) => !["showParagraph", "separateParagraph"].includes(e) })(({ showParagraph: e, separateParagraph: t }) => ({
360
+ }, Se = v(_, { shouldForwardProp: (e) => !["showParagraph", "separateParagraph"].includes(e) })(({ showParagraph: e, separateParagraph: t }) => ({
332
361
  display: "flex",
333
362
  outline: "none !important",
334
363
  "& .ProseMirror": {
@@ -358,4 +387,4 @@ var M = {
358
387
  }
359
388
  }));
360
389
  //#endregion
361
- export { z as EditableHtml, z as default };
390
+ export { M as EditableHtml, M as default };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import StyledEditor, { EditableHtml } from './components/EditableHtml.js';
2
2
  import { ALL_PLUGINS, DEFAULT_PLUGINS } from './extensions/index.js';
3
3
  import { deleteInlineDropdownByIndex } from './components/respArea/inlineDropdownUtils.js';
4
- export { EditableHtml, ALL_PLUGINS, DEFAULT_PLUGINS, deleteInlineDropdownByIndex };
4
+ import { flushPendingEditorSaves } from './pending-save.js';
5
+ export { EditableHtml, ALL_PLUGINS, DEFAULT_PLUGINS, deleteInlineDropdownByIndex, flushPendingEditorSaves };
5
6
  export default StyledEditor;
package/dist/index.js CHANGED
@@ -1,7 +1,8 @@
1
- import { ALL_PLUGINS as e, DEFAULT_PLUGINS as t } from "./extensions/index.js";
2
- import { EditableHtml as n } from "./components/EditableHtml.js";
3
- import { deleteInlineDropdownByIndex as r } from "./components/respArea/inlineDropdownUtils.js";
1
+ import { flushPendingEditorSaves as e } from "./pending-save.js";
2
+ import { ALL_PLUGINS as t, DEFAULT_PLUGINS as n } from "./extensions/index.js";
3
+ import { EditableHtml as r } from "./components/EditableHtml.js";
4
+ import { deleteInlineDropdownByIndex as i } from "./components/respArea/inlineDropdownUtils.js";
4
5
  //#region src/index.tsx
5
- var i = n;
6
+ var a = r;
6
7
  //#endregion
7
- export { e as ALL_PLUGINS, t as DEFAULT_PLUGINS, n as EditableHtml, i as default, r as deleteInlineDropdownByIndex };
8
+ export { t as ALL_PLUGINS, n as DEFAULT_PLUGINS, r as EditableHtml, a as default, i as deleteInlineDropdownByIndex, e as flushPendingEditorSaves };
@@ -0,0 +1,7 @@
1
+ export declare const setPendingSaveFlush: (node: Element, flush: () => void) => void;
2
+ /**
3
+ * Sends every idle save still waiting in an editor under `root` now, as a blur would. An element
4
+ * calls this from `commitPendingSession()`, before its own notifiers flush, so a player committing
5
+ * the session gets what the student typed in the last idle-save delay.
6
+ */
7
+ export declare function flushPendingEditorSaves(root: ParentNode): void;
@@ -0,0 +1,11 @@
1
+ //#region src/pending-save.ts
2
+ var e = Symbol.for("@pie-lib/editable-html-tip-tap/pending-save"), t = (t, n) => {
3
+ t[e] = n;
4
+ };
5
+ function n(t) {
6
+ t.querySelectorAll("[data-pie-editor]").forEach((t) => {
7
+ t[e]?.();
8
+ });
9
+ }
10
+ //#endregion
11
+ export { n as flushPendingEditorSaves, t as setPendingSaveFlush };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-lib/editable-html-tip-tap",
3
- "version": "3.0.5-next.20261014231219",
3
+ "version": "3.1.0",
4
4
  "description": "",
5
5
  "repository": {
6
6
  "type": "git",
@@ -13,11 +13,11 @@
13
13
  "@dnd-kit/utilities": "3.2.2",
14
14
  "@mui/icons-material": "^7.3.4",
15
15
  "@mui/material": "^7.3.4",
16
- "@pie-lib/drag": "5.0.5-next.20261014231219",
17
- "@pie-lib/math-input": "9.0.5-next.20261014231219",
18
- "@pie-lib/math-toolbar": "4.0.5-next.20261014231219",
19
- "@pie-lib/render-ui": "8.0.5-next.20261014231219",
20
- "@pie-lib/translator": "5.0.2-next.20261006160832",
16
+ "@pie-lib/drag": "5.0.5",
17
+ "@pie-lib/math-input": "9.0.5",
18
+ "@pie-lib/math-toolbar": "4.0.5",
19
+ "@pie-lib/render-ui": "8.0.5",
20
+ "@pie-lib/translator": "5.0.1",
21
21
  "@tiptap/core": "3.31.4",
22
22
  "@tiptap/extension-character-count": "3.31.4",
23
23
  "@tiptap/extension-color": "3.31.4",
@@ -44,10 +44,10 @@
44
44
  "react-portal": "^4.2.0",
45
45
  "tippy.js": "latest",
46
46
  "to-style": "^1.3.3",
47
- "@pie-element/shared-lodash": "0.1.3-next.20261012213240",
47
+ "@pie-element/shared-lodash": "0.1.2",
48
48
  "clsx": "^2.1.1",
49
49
  "prosemirror-state": "^1.4.4",
50
- "@pie-element/shared-math-rendering-mathjax": "0.2.0-next.20261014231219",
50
+ "@pie-element/shared-math-rendering-mathjax": "0.1.6",
51
51
  "@tiptap/extensions": "3.31.4",
52
52
  "@tiptap/extension-list": "3.31.4",
53
53
  "@tiptap/extension-bubble-menu": "3.31.4",