@club-employes/utopia 4.373.0 → 4.374.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/dist/index.js CHANGED
@@ -20745,7 +20745,7 @@ const Rz = {
20745
20745
  }
20746
20746
  function Qe(Q) {
20747
20747
  const V = r.value, oe = V.state.apply(Q);
20748
- V.updateState(oe), Ot(oe), fo(oe), l("update:modelValue", Ct(oe.doc)), Q.docChanged && n.state === "error" && (l("update:state", "default"), l("update:message", ""));
20748
+ V.updateState(oe), Ot(oe), fo(oe), Q.docChanged && l("update:modelValue", Ct(oe.doc)), Q.docChanged && n.state === "error" && (l("update:state", "default"), l("update:message", ""));
20749
20749
  }
20750
20750
  function et(Q) {
20751
20751
  return () => {
@@ -21892,7 +21892,7 @@ const Rz = {
21892
21892
  ], 2)) : P("", !0)
21893
21893
  ], 2));
21894
21894
  }
21895
- }, Uz = /* @__PURE__ */ re(Kz, [["__scopeId", "data-v-60a77087"]]), Gs = {
21895
+ }, Uz = /* @__PURE__ */ re(Kz, [["__scopeId", "data-v-0590d869"]]), Gs = {
21896
21896
  showToolbar: !0,
21897
21897
  headings: !0,
21898
21898
  formatting: {
@@ -22039,58 +22039,61 @@ const tx = /* @__PURE__ */ se({
22039
22039
  ...sf,
22040
22040
  ...n.labels
22041
22041
  })), a = { type: "doc", content: [{ type: "paragraph" }] }, s = H(a);
22042
- function c(u) {
22043
- if (typeof u == "string") {
22044
- if (!u.trim()) return a;
22042
+ let c = null;
22043
+ function r(A) {
22044
+ if (typeof A == "string") {
22045
+ if (!A.trim()) return a;
22045
22046
  try {
22046
- return ex(u);
22047
+ return ex(A);
22047
22048
  } catch {
22048
22049
  return a;
22049
22050
  }
22050
22051
  }
22051
- return u && typeof u == "object" ? u : a;
22052
+ return A && typeof A == "object" ? A : a;
22052
22053
  }
22053
- s.value = c(n.modelValue), ke(() => n.modelValue, (u) => {
22054
- const A = c(u);
22054
+ s.value = r(n.modelValue), ke(() => n.modelValue, (A) => {
22055
+ if (n.output !== "json" && typeof A == "string" && A === c)
22056
+ return;
22057
+ const p = r(A);
22055
22058
  try {
22056
- JSON.stringify(A) !== JSON.stringify(s.value) && (s.value = A);
22059
+ JSON.stringify(p) !== JSON.stringify(s.value) && (s.value = p);
22057
22060
  } catch {
22058
- s.value = A;
22061
+ s.value = p;
22059
22062
  }
22060
22063
  }, { immediate: !0 });
22061
- const r = M(() => {
22062
- const u = n.toolbarConfig;
22063
- if (!(u && Object.keys(u).length > 0) || u === Gs)
22064
+ const u = M(() => {
22065
+ const A = n.toolbarConfig;
22066
+ if (!(A && Object.keys(A).length > 0) || A === Gs)
22064
22067
  return Gs;
22065
- const m = { bold: !1, italic: !1, link: !1 }, f = { ordered: !1, bullet: !1 }, b = { codeBlock: !1, blockquote: !1, expandable: !1 }, z = { image: !1, video: !1, table: !1, columns: !1 };
22068
+ const f = { bold: !1, italic: !1, link: !1 }, b = { ordered: !1, bullet: !1 }, z = { codeBlock: !1, blockquote: !1, expandable: !1 }, k = { image: !1, video: !1, table: !1, columns: !1 };
22066
22069
  return {
22067
- showToolbar: u.showToolbar !== !1,
22068
- headings: u.headings === !0,
22069
- colors: u.colors === !0,
22070
- alignment: u.alignment === !0,
22071
- separators: u.separators === !0,
22072
- divider: u.divider !== !1,
22073
- formatting: u.formatting ? { ...m, ...u.formatting } : m,
22074
- lists: u.lists ? { ...f, ...u.lists } : f,
22075
- blocks: u.blocks ? { ...b, ...u.blocks } : b,
22076
- media: u.media ? { ...z, ...u.media } : z
22070
+ showToolbar: A.showToolbar !== !1,
22071
+ headings: A.headings === !0,
22072
+ colors: A.colors === !0,
22073
+ alignment: A.alignment === !0,
22074
+ separators: A.separators === !0,
22075
+ divider: A.divider !== !1,
22076
+ formatting: A.formatting ? { ...f, ...A.formatting } : f,
22077
+ lists: A.lists ? { ...b, ...A.lists } : b,
22078
+ blocks: A.blocks ? { ...z, ...A.blocks } : z,
22079
+ media: A.media ? { ...k, ...A.media } : k
22077
22080
  };
22078
22081
  });
22079
- return ke(s, (u) => {
22082
+ return ke(s, (A) => {
22080
22083
  try {
22081
22084
  if (n.output === "json")
22082
- o("update:modelValue", u);
22085
+ c = null, o("update:modelValue", A);
22083
22086
  else {
22084
- const A = fr(u);
22085
- o("update:modelValue", A);
22087
+ const p = fr(A);
22088
+ c = p, o("update:modelValue", p);
22086
22089
  }
22087
- } catch (A) {
22088
- console.error("Failed to render ProseMirror content", A);
22090
+ } catch (p) {
22091
+ console.error("Failed to render ProseMirror content", p);
22089
22092
  }
22090
- }, { deep: !0 }), (u, A) => (i(), B(Uz, {
22093
+ }, { deep: !0 }), (A, p) => (i(), B(Uz, {
22091
22094
  modelValue: s.value,
22092
- "onUpdate:modelValue": A[0] || (A[0] = (p) => s.value = p),
22093
- "toolbar-config": r.value,
22095
+ "onUpdate:modelValue": p[0] || (p[0] = (m) => s.value = m),
22096
+ "toolbar-config": u.value,
22094
22097
  labels: l.value,
22095
22098
  label: e.label,
22096
22099
  required: e.required,
@@ -22098,8 +22101,8 @@ const tx = /* @__PURE__ */ se({
22098
22101
  message: e.message,
22099
22102
  "max-image-size": e.maxImageSize,
22100
22103
  "max-video-size": e.maxVideoSize,
22101
- "onUpdate:state": A[1] || (A[1] = (p) => u.$emit("update:state", p)),
22102
- "onUpdate:message": A[2] || (A[2] = (p) => u.$emit("update:message", p))
22104
+ "onUpdate:state": p[1] || (p[1] = (m) => A.$emit("update:state", m)),
22105
+ "onUpdate:message": p[2] || (p[2] = (m) => A.$emit("update:message", m))
22103
22106
  }, null, 8, ["modelValue", "toolbar-config", "labels", "label", "required", "state", "message", "max-image-size", "max-video-size"]));
22104
22107
  }
22105
22108
  }), tA = {};