@fileverse-dev/ddoc 2.2.8-grammarlySupport-patch-1 → 2.2.8-hotfix-patch-1

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,4 +1,4 @@
1
- import { B as p, g as m, s as w, d as k, i as b, l as L, a as O, c as E, b as x, e as R, H as y, f as M } from "./index-Dk-FwFPC.mjs";
1
+ import { B as p, g as m, s as w, d as k, i as b, l as L, a as O, c as E, b as x, e as R, H as y, f as M } from "./index-2NliVzGa.mjs";
2
2
  class S extends p {
3
3
  constructor({ callbackSelector: r, cause: a, data: n, extraData: i, sender: f, urls: t }) {
4
4
  var o;
@@ -86505,7 +86505,7 @@ async function o6(e, t) {
86505
86505
  });
86506
86506
  return K === "0x" ? { data: void 0 } : { data: K };
86507
86507
  } catch (U) {
86508
- const P = hxt(U), { offchainLookup: _, offchainLookupSignature: G } = await import("./ccip-DISzctOC.mjs");
86508
+ const P = hxt(U), { offchainLookup: _, offchainLookupSignature: G } = await import("./ccip-B1we7Vyw.mjs");
86509
86509
  if (e.ccipRead !== !1 && (P == null ? void 0 : P.slice(0, 10)) === G && k)
86510
86510
  return { data: await _(e, { data: P, to: k }) };
86511
86511
  throw D && (P == null ? void 0 : P.slice(0, 10)) === "0x101bb98d" ? new v5t({ factory: c }) : r$(U, {
@@ -96848,13 +96848,6 @@ const _k = [
96848
96848
  e.chain().focus().setFontFamily("Georgia, serif").run();
96849
96849
  }
96850
96850
  },
96851
- {
96852
- title: "IBM Plex Mono",
96853
- value: "IBM Plex Mono, monospace",
96854
- command: (e) => {
96855
- e.chain().focus().setFontFamily("IBM Plex Mono, monospace").run();
96856
- }
96857
- },
96858
96851
  {
96859
96852
  title: "Impact",
96860
96853
  value: "Impact, Charcoal, sans-serif",
@@ -96869,13 +96862,6 @@ const _k = [
96869
96862
  e.chain().focus().setFontFamily("Inter, sans-serif").run();
96870
96863
  }
96871
96864
  },
96872
- {
96873
- title: "JetBrains Mono",
96874
- value: "JetBrains Mono, monospace",
96875
- command: (e) => {
96876
- e.chain().focus().setFontFamily("JetBrains Mono, monospace").run();
96877
- }
96878
- },
96879
96865
  {
96880
96866
  title: "Lato",
96881
96867
  value: "Lato, sans-serif",
@@ -115502,7 +115488,7 @@ class xLt extends TE {
115502
115488
  const vLt = {
115503
115489
  attributes: {
115504
115490
  class: "prose-lg prose-headings:font-display prose prose-p:my-2 prose-h1:my-2 prose-h2:my-2 prose-h3:my-2 prose-ul:my-2 prose-ol:my-2 max-w-none focus:outline-none w-full",
115505
- spellcheck: "true",
115491
+ spellcheck: "false",
115506
115492
  suppressContentEditableWarning: "true"
115507
115493
  }
115508
115494
  }, kLt = /[\uD800-\uDBFF]/, wLt = /[\uDC00-\uDFFF]/, FLt = (e, t) => {
@@ -127959,21 +127945,9 @@ const M_t = Xt.create({
127959
127945
  new tn({
127960
127946
  key: e,
127961
127947
  appendTransaction: (n, r, o) => {
127962
- const { doc: i, tr: a, schema: s } = o;
127963
- if (!e.getState(o)) return;
127964
- const u = i.content.size, c = s.nodes[this.options.node], d = {
127965
- class: "trailing-node"
127966
- };
127967
- let f = s.text(" ");
127968
- const p = this.editor.getAttributes("textStyle");
127969
- if (s.marks.textStyle) {
127970
- const g = s.marks.textStyle.create({
127971
- ...p
127972
- });
127973
- f = s.text(" ", [g]);
127974
- }
127975
- const h = c.create(d, f);
127976
- return a.insert(u, h);
127948
+ const { doc: i, tr: a, schema: s } = o, l = e.getState(o), u = i.content.size, c = s.nodes[this.options.node];
127949
+ if (l)
127950
+ return a.insert(u, c.create());
127977
127951
  },
127978
127952
  state: {
127979
127953
  init: (n, r) => {
@@ -218956,7 +218930,6 @@ const rKt = 200, oKt = new sn("emoji"), iKt = Bt.create({
218956
218930
  icon: /* @__PURE__ */ M.jsx(He, { name: "Callout", size: "md" }),
218957
218931
  image: "",
218958
218932
  command: ({ editor: r, range: o }) => {
218959
- const i = r.getAttributes("textStyle");
218960
218933
  r.chain().focus().deleteRange(o).insertContent({
218961
218934
  type: "callout",
218962
218935
  content: [
@@ -218965,7 +218938,7 @@ const rKt = 200, oKt = new sn("emoji"), iKt = Bt.create({
218965
218938
  content: []
218966
218939
  }
218967
218940
  ]
218968
- }).run(), i && r.chain().focus().setMark("textStyle", i).run();
218941
+ }).run();
218969
218942
  }
218970
218943
  },
218971
218944
  {
@@ -220159,10 +220132,7 @@ const f8 = ow.getInstance(), qKt = (e) => ({
220159
220132
  de == null || de.commands.unsetCommentActive();
220160
220133
  }
220161
220134
  },
220162
- handleClick: ce,
220163
- attributes: {
220164
- spellCheck: "true"
220165
- }
220135
+ handleClick: ce
220166
220136
  },
220167
220137
  autofocus: m ? !1 : "start",
220168
220138
  immediatelyRender: !1,
@@ -222480,7 +222450,7 @@ const kz = ke.memo(Aoe), gYt = ({
222480
222450
  isPreviewMode: e || !_
222481
222451
  }
222482
222452
  ),
222483
- /* @__PURE__ */ M.jsx(
222453
+ /* @__PURE__ */ M.jsxs(
222484
222454
  "div",
222485
222455
  {
222486
222456
  className: xt(
@@ -222519,150 +222489,152 @@ const kz = ke.memo(Aoe), gYt = ({
222519
222489
  transformOrigin: W === "2" && !nt ? "left center" : "top center",
222520
222490
  transform: `scaleX(${W})`
222521
222491
  },
222522
- children: /* @__PURE__ */ M.jsxs(
222523
- "div",
222524
- {
222525
- ref: kn,
222526
- className: xt(
222527
- "w-full h-full pt-8 md:pt-0",
222528
- { "custom-ios-padding": dt },
222529
- { "color-bg-default": W === "1.4" || "1.5" }
222530
- ),
222531
- style: {
222532
- transformOrigin: "top center",
222533
- transform: `scaleY(${W})`
222534
- },
222535
- children: [
222536
- /* @__PURE__ */ M.jsxs("div", { children: [
222537
- gt && /* @__PURE__ */ M.jsx(
222538
- DMt,
222539
- {
222540
- editor: gt,
222541
- onError: b,
222542
- zoomLevel: W,
222543
- disableInlineComment: ue || !1,
222544
- setIsCommentSectionOpen: C,
222545
- inlineCommentData: T,
222546
- setInlineCommentData: D,
222547
- isPreviewMode: e,
222548
- username: o,
222549
- walletAddress: s,
222550
- onInlineComment: Q,
222551
- activeCommentId: pr,
222552
- isCollabDocumentPublished: ee
222553
- }
222554
- ),
222555
- gt && /* @__PURE__ */ M.jsx(RMt, { editor: gt, appendTo: kn })
222556
- ] }),
222557
- !gt || Gn ? Mo(
222558
- /* @__PURE__ */ M.jsxs("div", { className: `${it ? "mx-10 mt-10" : "mx-20"}`, children: [
222559
- /* @__PURE__ */ M.jsx(
222560
- ln,
222492
+ children: [
222493
+ /* @__PURE__ */ M.jsxs(
222494
+ "div",
222495
+ {
222496
+ ref: kn,
222497
+ className: xt(
222498
+ "w-full h-full pt-8 md:pt-0",
222499
+ { "custom-ios-padding": dt },
222500
+ { "color-bg-default": W === "1.4" || "1.5" }
222501
+ ),
222502
+ style: {
222503
+ transformOrigin: "top center",
222504
+ transform: `scaleY(${W})`
222505
+ },
222506
+ children: [
222507
+ /* @__PURE__ */ M.jsxs("div", { children: [
222508
+ gt && /* @__PURE__ */ M.jsx(
222509
+ DMt,
222561
222510
  {
222562
- className: `${e || it ? "w-full" : "w-[400px]"} h-[32px] rounded-sm mb-4`
222511
+ editor: gt,
222512
+ onError: b,
222513
+ zoomLevel: W,
222514
+ disableInlineComment: ue || !1,
222515
+ setIsCommentSectionOpen: C,
222516
+ inlineCommentData: T,
222517
+ setInlineCommentData: D,
222518
+ isPreviewMode: e,
222519
+ username: o,
222520
+ walletAddress: s,
222521
+ onInlineComment: Q,
222522
+ activeCommentId: pr,
222523
+ isCollabDocumentPublished: ee
222563
222524
  }
222564
222525
  ),
222565
- e && /* @__PURE__ */ M.jsx(mYt, {})
222526
+ gt && /* @__PURE__ */ M.jsx(RMt, { editor: gt, appendTo: kn })
222566
222527
  ] }),
222567
- "content-transition"
222568
- ) : Co(
222569
- /* @__PURE__ */ M.jsxs($C, { isPreviewMode: e, children: [
222570
- x && x.length > 0 && /* @__PURE__ */ M.jsxs(
222571
- "div",
222572
- {
222573
- ref: wt,
222574
- className: xt(
222575
- "flex flex-wrap px-4 md:px-8 lg:px-[80px] items-center gap-1 mb-4 mt-4 lg:!mt-0",
222576
- { "pt-12": e }
222577
- ),
222578
- children: [
222579
- rn.map((Ne, oe) => /* @__PURE__ */ M.jsx(
222580
- Gp,
222581
- {
222582
- style: { backgroundColor: Ne == null ? void 0 : Ne.color },
222583
- onRemove: () => ct(Ne == null ? void 0 : Ne.name),
222584
- isRemovable: !e,
222585
- className: "!h-6 rounded",
222586
- children: Ne == null ? void 0 : Ne.name
222587
- },
222588
- oe
222589
- )),
222590
- vn > 0 && !Rt && /* @__PURE__ */ M.jsxs(
222591
- Kt,
222592
- {
222593
- variant: "ghost",
222594
- className: "!h-6 rounded min-w-fit !px-2 color-bg-secondary text-helper-text-sm",
222595
- onClick: () => qt(!0),
222596
- children: [
222597
- "+",
222598
- vn
222599
- ]
222600
- }
222601
- ),
222602
- Rt && /* @__PURE__ */ M.jsx(
222603
- ug.div,
222604
- {
222605
- initial: { opacity: 0, height: 0 },
222606
- animate: { opacity: 1, height: "auto" },
222607
- exit: { opacity: 0, height: 0 },
222608
- transition: { duration: 0.3 },
222609
- className: "flex flex-wrap items-center gap-1",
222610
- children: w == null ? void 0 : w.slice(4).map((Ne, oe) => /* @__PURE__ */ M.jsx(
222611
- Gp,
222612
- {
222613
- style: { backgroundColor: Ne == null ? void 0 : Ne.color },
222614
- onRemove: () => ct(Ne == null ? void 0 : Ne.name),
222615
- isRemovable: !e,
222616
- className: "!h-6 rounded",
222617
- children: Ne == null ? void 0 : Ne.name
222618
- },
222619
- oe + 4
222620
- ))
222621
- }
222528
+ !gt || Gn ? Mo(
222529
+ /* @__PURE__ */ M.jsxs("div", { className: `${it ? "mx-10 mt-10" : "mx-20"}`, children: [
222530
+ /* @__PURE__ */ M.jsx(
222531
+ ln,
222532
+ {
222533
+ className: `${e || it ? "w-full" : "w-[400px]"} h-[32px] rounded-sm mb-4`
222534
+ }
222535
+ ),
222536
+ e && /* @__PURE__ */ M.jsx(mYt, {})
222537
+ ] }),
222538
+ "content-transition"
222539
+ ) : Co(
222540
+ /* @__PURE__ */ M.jsxs($C, { isPreviewMode: e, children: [
222541
+ x && x.length > 0 && /* @__PURE__ */ M.jsxs(
222542
+ "div",
222543
+ {
222544
+ ref: wt,
222545
+ className: xt(
222546
+ "flex flex-wrap px-4 md:px-8 lg:px-[80px] items-center gap-1 mb-4 mt-4 lg:!mt-0",
222547
+ { "pt-12": e }
222622
222548
  ),
222623
- w && (w == null ? void 0 : w.length) < 6 ? /* @__PURE__ */ M.jsx(
222624
- gV,
222625
- {
222626
- tags: x || [],
222627
- selectedTags: w,
222628
- onAddTag: Ue,
222629
- isPreviewMode: e
222630
- }
222631
- ) : null
222632
- ]
222633
- }
222634
- ),
222635
- /* @__PURE__ */ M.jsx("div", { className: "grammarly-wrapper", children: /* @__PURE__ */ M.jsx(
222636
- Ww,
222637
- {
222638
- editor: gt,
222639
- id: "editor",
222640
- className: xt(
222641
- "w-full h-auto py-4 color-bg-default",
222642
- e && "preview-mode"
222643
- )
222644
- }
222645
- ) })
222646
- ] }),
222647
- "editor-transition"
222648
- )
222649
- ]
222650
- }
222651
- )
222652
- }
222653
- ),
222654
- p && !pt && /* @__PURE__ */ M.jsx(
222655
- Kt,
222656
- {
222657
- ref: tt,
222658
- onClick: () => {
222659
- gt && (f == null || f(gt));
222660
- },
222661
- variant: "ghost",
222662
- className: xt(
222663
- "absolute w-12 h-12 color-bg-default rounded-full shadow-xl top-[70px] right-[-23px]"
222664
- ),
222665
- children: /* @__PURE__ */ M.jsx(He, { name: "MessageSquareText", size: "sm" })
222549
+ children: [
222550
+ rn.map((Ne, oe) => /* @__PURE__ */ M.jsx(
222551
+ Gp,
222552
+ {
222553
+ style: { backgroundColor: Ne == null ? void 0 : Ne.color },
222554
+ onRemove: () => ct(Ne == null ? void 0 : Ne.name),
222555
+ isRemovable: !e,
222556
+ className: "!h-6 rounded",
222557
+ children: Ne == null ? void 0 : Ne.name
222558
+ },
222559
+ oe
222560
+ )),
222561
+ vn > 0 && !Rt && /* @__PURE__ */ M.jsxs(
222562
+ Kt,
222563
+ {
222564
+ variant: "ghost",
222565
+ className: "!h-6 rounded min-w-fit !px-2 color-bg-secondary text-helper-text-sm",
222566
+ onClick: () => qt(!0),
222567
+ children: [
222568
+ "+",
222569
+ vn
222570
+ ]
222571
+ }
222572
+ ),
222573
+ Rt && /* @__PURE__ */ M.jsx(
222574
+ ug.div,
222575
+ {
222576
+ initial: { opacity: 0, height: 0 },
222577
+ animate: { opacity: 1, height: "auto" },
222578
+ exit: { opacity: 0, height: 0 },
222579
+ transition: { duration: 0.3 },
222580
+ className: "flex flex-wrap items-center gap-1",
222581
+ children: w == null ? void 0 : w.slice(4).map((Ne, oe) => /* @__PURE__ */ M.jsx(
222582
+ Gp,
222583
+ {
222584
+ style: { backgroundColor: Ne == null ? void 0 : Ne.color },
222585
+ onRemove: () => ct(Ne == null ? void 0 : Ne.name),
222586
+ isRemovable: !e,
222587
+ className: "!h-6 rounded",
222588
+ children: Ne == null ? void 0 : Ne.name
222589
+ },
222590
+ oe + 4
222591
+ ))
222592
+ }
222593
+ ),
222594
+ w && (w == null ? void 0 : w.length) < 6 ? /* @__PURE__ */ M.jsx(
222595
+ gV,
222596
+ {
222597
+ tags: x || [],
222598
+ selectedTags: w,
222599
+ onAddTag: Ue,
222600
+ isPreviewMode: e
222601
+ }
222602
+ ) : null
222603
+ ]
222604
+ }
222605
+ ),
222606
+ /* @__PURE__ */ M.jsx(
222607
+ Ww,
222608
+ {
222609
+ editor: gt,
222610
+ id: "editor",
222611
+ className: xt(
222612
+ "w-full h-auto py-4 color-bg-default",
222613
+ e && "preview-mode"
222614
+ )
222615
+ }
222616
+ )
222617
+ ] }),
222618
+ "editor-transition"
222619
+ )
222620
+ ]
222621
+ }
222622
+ ),
222623
+ p && !pt && /* @__PURE__ */ M.jsx(
222624
+ Kt,
222625
+ {
222626
+ ref: tt,
222627
+ onClick: () => {
222628
+ gt && (f == null || f(gt));
222629
+ },
222630
+ variant: "ghost",
222631
+ className: xt(
222632
+ "absolute w-12 h-12 color-bg-default rounded-full shadow-xl top-[70px] right-[-23px]"
222633
+ ),
222634
+ children: /* @__PURE__ */ M.jsx(He, { name: "MessageSquareText", size: "sm" })
222635
+ }
222636
+ )
222637
+ ]
222666
222638
  }
222667
222639
  ),
222668
222640
  !e && !m && /* @__PURE__ */ M.jsx(
package/dist/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { D as d, P as r, h as s, u as t } from "./index-Dk-FwFPC.mjs";
1
+ import { D as d, P as r, h as s, u as t } from "./index-2NliVzGa.mjs";
2
2
  export {
3
3
  d as DdocEditor,
4
4
  r as PreviewDdocEditor,