amelia-booking-ui 0.0.446 → 0.0.447

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.
@@ -50356,59 +50356,59 @@ var hSe = (t = null, e = {}) => ({ editor: n, view: l, tr: r, dispatch: o }) =>
50356
50356
  ...n
50357
50357
  };
50358
50358
  let s;
50359
- const { selection: i } = o.state, c = ($) => {
50359
+ const i = (b) => {
50360
50360
  o.emit("contentError", {
50361
50361
  editor: o,
50362
- error: $,
50362
+ error: b,
50363
50363
  disableCollaboration: () => {
50364
50364
  "collaboration" in o.storage && typeof o.storage.collaboration == "object" && o.storage.collaboration && (o.storage.collaboration.isDisabled = !0);
50365
50365
  }
50366
50366
  });
50367
- }, u = {
50367
+ }, c = {
50368
50368
  preserveWhitespace: "full",
50369
50369
  ...n.parseOptions
50370
50370
  };
50371
50371
  if (!n.errorOnInvalidContent && !o.options.enableContentCheck && o.options.emitContentError)
50372
50372
  try {
50373
50373
  Nr(e, o.schema, {
50374
- parseOptions: u,
50374
+ parseOptions: c,
50375
50375
  errorOnInvalidContent: !0
50376
50376
  });
50377
- } catch ($) {
50378
- c($);
50377
+ } catch (b) {
50378
+ i(b);
50379
50379
  }
50380
50380
  try {
50381
50381
  s = Nr(e, o.schema, {
50382
- parseOptions: u,
50382
+ parseOptions: c,
50383
50383
  errorOnInvalidContent: (a = n.errorOnInvalidContent) != null ? a : o.options.enableContentCheck
50384
50384
  });
50385
- } catch ($) {
50386
- return c($), !1;
50385
+ } catch (b) {
50386
+ return i(b), !1;
50387
50387
  }
50388
- let { from: h, to: g } = typeof t == "number" ? { from: t, to: t } : { from: t.from, to: t.to }, m = !0, w = !0;
50389
- if ((gSe(s) ? s : [s]).forEach(($) => {
50390
- $.check(), m = m ? $.isText && $.marks.length === 0 : !1, w = w ? $.isBlock : !1;
50391
- }), h === g && w) {
50392
- const { parent: $ } = l.doc.resolve(h);
50393
- $.isTextblock && !$.type.spec.code && !$.childCount && (h -= 1, g += 1);
50388
+ let { from: u, to: h } = typeof t == "number" ? { from: t, to: t } : { from: t.from, to: t.to }, g = !0, m = !0;
50389
+ if ((gSe(s) ? s : [s]).forEach((b) => {
50390
+ b.check(), g = g ? b.isText && b.marks.length === 0 : !1, m = m ? b.isBlock : !1;
50391
+ }), u === h && m) {
50392
+ const { parent: b } = l.doc.resolve(u);
50393
+ b.isTextblock && !b.type.spec.code && !b.childCount && (u -= 1, h += 1);
50394
50394
  }
50395
- let b;
50396
- if (m) {
50395
+ let y;
50396
+ if (g) {
50397
50397
  if (Array.isArray(e))
50398
- b = e.map(($) => $.text || "").join("");
50398
+ y = e.map((b) => b.text || "").join("");
50399
50399
  else if (e instanceof me) {
50400
- let $ = "";
50401
- e.forEach((M) => {
50402
- M.text && ($ += M.text);
50403
- }), b = $;
50404
- } else typeof e == "object" && e && e.text ? b = e.text : b = e;
50405
- l.insertText(b, h, g);
50400
+ let b = "";
50401
+ e.forEach(($) => {
50402
+ $.text && (b += $.text);
50403
+ }), y = b;
50404
+ } else typeof e == "object" && e && e.text ? y = e.text : y = e;
50405
+ l.insertText(y, u, h);
50406
50406
  } else {
50407
- b = s;
50408
- const $ = i.$from.parentOffset === 0, M = i.$from.node().isText || i.$from.node().isTextblock, _ = i.$from.node().content.size > 0;
50409
- $ && M && _ && (h = Math.max(0, h - 1)), l.replaceWith(h, g, b);
50407
+ y = s;
50408
+ const b = l.doc.resolve(u), $ = b.node(), M = b.parentOffset === 0, _ = $.isText || $.isTextblock, x = $.content.size > 0;
50409
+ M && _ && x && (u = Math.max(0, u - 1)), l.replaceWith(u, h, y);
50410
50410
  }
50411
- n.updateSelection && HCe(l, l.steps.length - 1, -1), n.applyInputRules && l.setMeta("applyInputRules", { from: h, text: b }), n.applyPasteRules && l.setMeta("applyPasteRules", { from: h, text: b });
50411
+ n.updateSelection && HCe(l, l.steps.length - 1, -1), n.applyInputRules && l.setMeta("applyInputRules", { from: u, text: y }), n.applyPasteRules && l.setMeta("applyPasteRules", { from: u, text: y });
50412
50412
  }
50413
50413
  return !0;
50414
50414
  }, ySe = () => ({ state: t, dispatch: e }) => sCe(t, e), bSe = () => ({ state: t, dispatch: e }) => iCe(t, e), $Se = () => ({ state: t, dispatch: e }) => _h(t, e), MSe = () => ({ state: t, dispatch: e }) => Sh(t, e), _Se = () => ({ state: t, dispatch: e, tr: n }) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "amelia-booking-ui",
3
- "version": "0.0.446",
3
+ "version": "0.0.447",
4
4
  "description": "A Vue 3 component library for Amelia Booking Plugin.",
5
5
  "type": "module",
6
6
  "repository": {