@haklex/rich-compose 0.26.6 → 0.28.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.
@@ -16766,7 +16766,7 @@
16766
16766
  function st$10(t) {
16767
16767
  ot$10 = t.timeStamp;
16768
16768
  }
16769
- function lt$5(t, e, n) {
16769
+ function lt$6(t, e, n) {
16770
16770
  const r = "BR" === t.nodeName, i = e.__lexicalLineBreak;
16771
16771
  return i && (t === i || r && t.previousSibling === i) || r && void 0 !== Ss$2(t, n);
16772
16772
  }
@@ -16815,7 +16815,7 @@
16815
16815
  const e = d.addedNodes;
16816
16816
  for (let n = 0; n < e.length; n++) {
16817
16817
  const r = e[n], i = vs$2(r), s = r.parentNode;
16818
- if (null != s && r !== a && null === i && !lt$5(r, s, t) && !Jl(r)) {
16818
+ if (null != s && r !== a && null === i && !lt$6(r, s, t) && !Jl(r)) {
16819
16819
  if (o$51) {
16820
16820
  const t = (vl(r) ? r.innerText : null) || r.nodeValue;
16821
16821
  t && (f += t);
@@ -16828,7 +16828,7 @@
16828
16828
  let e = 0;
16829
16829
  for (let i = 0; i < r; i++) {
16830
16830
  const r = n[i];
16831
- (lt$5(r, g, t) || a === r) && (g.appendChild(r), e++);
16831
+ (lt$6(r, g, t) || a === r) && (g.appendChild(r), e++);
16832
16832
  }
16833
16833
  r !== e && s.set(p, y);
16834
16834
  }
@@ -16841,7 +16841,7 @@
16841
16841
  const n = d[e], r = n.addedNodes, i = n.target;
16842
16842
  for (let e = 0; e < r.length; e++) {
16843
16843
  const n = r[e], o = n.parentNode;
16844
- null == o || "BR" !== n.nodeName || lt$5(n, i, t) || o.removeChild(n);
16844
+ null == o || "BR" !== n.nodeName || lt$6(n, i, t) || o.removeChild(n);
16845
16845
  }
16846
16846
  }
16847
16847
  n.takeRecords();
@@ -60236,7 +60236,7 @@
60236
60236
  } catch (t) {}
60237
60237
  }
60238
60238
  function pt$6(t, e, n) {
60239
- return rt$9(lt$4, t, e, n);
60239
+ return rt$9(lt$5, t, e, n);
60240
60240
  }
60241
60241
  function gt$6(t) {
60242
60242
  const e = Ke$6(t, ct$6);
@@ -60684,16 +60684,16 @@
60684
60684
  }
60685
60685
  return r;
60686
60686
  }
60687
- var H$7, ct$6, lt$4, ut$4, ft$8, ht$7, vt$5, Jt$5, Xt$4, te$3, ee$4, ne$4, oe$5, se$6, ie$6, be$4, Ce$5, _e$5, Ye$6, un$4, fn$10;
60687
+ var H$7, ct$6, lt$5, ut$4, ft$8, ht$7, vt$5, Jt$5, Xt$4, te$3, ee$4, ne$4, oe$5, se$6, ie$6, be$4, Ce$5, _e$5, Ye$6, un$4, fn$10;
60688
60688
  var init_LexicalHtml_prod = __esmMin((() => {
60689
60689
  init_LexicalSelection_prod();
60690
60690
  init_Lexical_prod();
60691
60691
  init_LexicalUtils_prod();
60692
60692
  init_LexicalExtension_prod();
60693
60693
  init_defineProperty();
60694
- ct$6 = "@lexical/html/DOM", lt$4 = Symbol.for("@lexical/html/DOMExportContext"), ut$4 = "@lexical/html/DOMImport", ft$8 = Symbol.for("@lexical/html/DOMImportContext");
60694
+ ct$6 = "@lexical/html/DOM", lt$5 = Symbol.for("@lexical/html/DOMExportContext"), ut$4 = "@lexical/html/DOMImport", ft$8 = Symbol.for("@lexical/html/DOMImportContext");
60695
60695
  pt$6("root", Boolean), ht$7 = pt$6("isExport", Boolean);
60696
- vt$5 = ot$9(lt$4, gt$6);
60696
+ vt$5 = ot$9(lt$5, gt$6);
60697
60697
  new Map([[xo$2, () => {
60698
60698
  const t = document.createElement("div");
60699
60699
  return t.role = "textbox", { element: t };
@@ -61350,7 +61350,7 @@
61350
61350
  function it$6(t) {
61351
61351
  return t.match(/^[a-z][a-z0-9+.-]*:/i) || t.match(/^[/#.]/) ? t : t.includes("@") ? `mailto:${t}` : rt$7.test(t) ? `tel:${t}` : `https://${t}`;
61352
61352
  }
61353
- function lt$2(t, e) {
61353
+ function lt$3(t, e) {
61354
61354
  return ea$1(t.registerNodeTransform(z$28, G$9), t.registerCommand(tt$7, (t) => {
61355
61355
  const n = e.validateUrl.peek(), r = e.attributes.peek();
61356
61356
  if (null === t) return nt$8(null), !0;
@@ -63245,6 +63245,10 @@
63245
63245
  function ot$4(e) {
63246
63246
  return e instanceof et$5;
63247
63247
  }
63248
+ function lt$2(e) {
63249
+ const t = Hl(e, (e) => Ge$4(e));
63250
+ return Ge$4(t) ? t : null;
63251
+ }
63248
63252
  function Et$2(e, t, n) {
63249
63253
  const [o, r, l] = kt$3(e, t, n);
63250
63254
  return null === r && Ze$5(207), null === l && Ze$5(208), [
@@ -65517,11 +65521,11 @@
65517
65521
  }
65518
65522
  }, [loaded]);
65519
65523
  const placeholderUrl = (0, import_react$167.useMemo)(() => thumbhash ? decodeThumbHash(thumbhash) : void 0, [thumbhash]);
65520
- const aspectStyle = width && height ? {
65521
- aspectRatio: `${width} / ${height}`,
65524
+ const aspectStyle = {
65525
+ ...width && height ? { aspectRatio: `${width} / ${height}` } : {},
65522
65526
  maxWidth: "100%",
65523
- width
65524
- } : { maxWidth: "100%" };
65527
+ width: displayWidth !== void 0 ? "100%" : width && height ? width : void 0
65528
+ };
65525
65529
  return /* @__PURE__ */ (0, import_jsx_runtime$215.jsxs)("figure", {
65526
65530
  className: "rich-image",
65527
65531
  "data-layout": layout,
@@ -65586,6 +65590,29 @@
65586
65590
  OPEN_IMAGE_UPLOAD_DIALOG_COMMAND = ke$6("OPEN_IMAGE_UPLOAD_DIALOG_COMMAND");
65587
65591
  }));
65588
65592
  //#endregion
65593
+ //#region ../rich-editor/src/utils/image-insertion.ts
65594
+ function $getSelectionAnchorNode() {
65595
+ const selection = Ti$1();
65596
+ if (si$1(selection)) return selection.anchor.getNode();
65597
+ if (ci$1(selection)) return selection.getNodes()[0] ?? null;
65598
+ return null;
65599
+ }
65600
+ function $isSelectionInTableCell() {
65601
+ const anchorNode = $getSelectionAnchorNode();
65602
+ return anchorNode ? lt$2(anchorNode) !== null : false;
65603
+ }
65604
+ function $withAdaptiveImageDisplayWidth(payload) {
65605
+ if (payload.displayWidth !== void 0 || !$isSelectionInTableCell()) return payload;
65606
+ return {
65607
+ ...payload,
65608
+ displayWidth: 100
65609
+ };
65610
+ }
65611
+ var init_image_insertion = __esmMin((() => {
65612
+ init_LexicalTable_prod();
65613
+ init_Lexical_prod();
65614
+ }));
65615
+ //#endregion
65589
65616
  //#region ../rich-editor/src/nodes/ImageNode.ts
65590
65617
  function sanitizeImageSrc(src) {
65591
65618
  const trimmed = src.trim();
@@ -65624,6 +65651,7 @@
65624
65651
  init_RendererWrapper();
65625
65652
  init_image_upload_command();
65626
65653
  init_renderer_keys();
65654
+ init_image_insertion();
65627
65655
  init_defineProperty();
65628
65656
  IMAGE_LAYOUTS = [
65629
65657
  "align-left",
@@ -65800,10 +65828,10 @@
65800
65828
  onSelect: (editor) => {
65801
65829
  if (editor.dispatchCommand(OPEN_IMAGE_UPLOAD_DIALOG_COMMAND, void 0)) return;
65802
65830
  editor.update(() => {
65803
- Pi$2([$createImageNode({
65831
+ Pi$2([$createImageNode($withAdaptiveImageDisplayWidth({
65804
65832
  src: "",
65805
65833
  altText: ""
65806
- })]);
65834
+ }))]);
65807
65835
  });
65808
65836
  }
65809
65837
  }]);
@@ -208302,8 +208330,6 @@ ${seriesRules.join("\n")}${tipRules}
208302
208330
  //#endregion
208303
208331
  //#region ../rich-ext-chat/src/node.ts
208304
208332
  init_augment$2();
208305
- //#endregion
208306
- //#region src/modules/chat/module.ts
208307
208333
  var chatModule = {
208308
208334
  name: "chat",
208309
208335
  nodes: [ChatNode],
@@ -210944,7 +210970,7 @@ ${seriesRules.join("\n")}${tipRules}
210944
210970
  var init_types$2 = __esmMin((() => {}));
210945
210971
  //#endregion
210946
210972
  //#region ../../node_modules/.pnpm/swr@2.4.1_react@19.2.6/node_modules/swr/dist/_internal/index.mjs
210947
- var import_react$144, enableDevtools, use$6, setupDevTools, normalize$3, useSWRConfig, middleware$1, BUILT_IN_MIDDLEWARE, withArgs, subscribeCallback;
210973
+ var import_react$144, enableDevtools, use$7, setupDevTools, normalize$3, useSWRConfig, middleware$1, BUILT_IN_MIDDLEWARE, withArgs, subscribeCallback;
210948
210974
  var init__internal = __esmMin((() => {
210949
210975
  init_config_context_12s_CCVTDPOP();
210950
210976
  init_events();
@@ -210952,7 +210978,7 @@ ${seriesRules.join("\n")}${tipRules}
210952
210978
  import_react$144 = /* @__PURE__ */ __toESM$1(require_react$1(), 1);
210953
210979
  init_types$2();
210954
210980
  enableDevtools = isWindowDefined && window.__SWR_DEVTOOLS_USE__;
210955
- use$6 = enableDevtools ? window.__SWR_DEVTOOLS_USE__ : [];
210981
+ use$7 = enableDevtools ? window.__SWR_DEVTOOLS_USE__ : [];
210956
210982
  setupDevTools = () => {
210957
210983
  if (enableDevtools) window.__SWR_DEVTOOLS_REACT__ = import_react$144.default;
210958
210984
  };
@@ -210982,7 +211008,7 @@ ${seriesRules.join("\n")}${tipRules}
210982
211008
  return req;
210983
211009
  }), config);
210984
211010
  };
210985
- BUILT_IN_MIDDLEWARE = use$6.concat(middleware$1);
211011
+ BUILT_IN_MIDDLEWARE = use$7.concat(middleware$1);
210986
211012
  withArgs = (hook) => {
210987
211013
  return function useSWRArgs(...args) {
210988
211014
  const fallbackConfig = useSWRConfig();
@@ -211007,12 +211033,12 @@ ${seriesRules.join("\n")}${tipRules}
211007
211033
  };
211008
211034
  };
211009
211035
  setupDevTools();
211010
- })), import_react$143, import_shim$1, use$5, WITH_DEDUPE, resolvedUndef, sub$1, useSWRHandler, useSWR$1;
211036
+ })), import_react$143, import_shim$1, use$6, WITH_DEDUPE, resolvedUndef, sub$1, useSWRHandler, useSWR$1;
211011
211037
  var init_index = __esmMin((() => {
211012
211038
  import_react$143 = /* @__PURE__ */ __toESM$1(require_react$1(), 1);
211013
211039
  import_shim$1 = require_shim();
211014
211040
  init__internal();
211015
- use$5 = import_react$143.use || ((thenable) => {
211041
+ use$6 = import_react$143.use || ((thenable) => {
211016
211042
  switch (thenable.status) {
211017
211043
  case "pending": throw thenable;
211018
211044
  case "fulfilled": return thenable.value;
@@ -211102,7 +211128,7 @@ ${seriesRules.join("\n")}${tipRules}
211102
211128
  }), [cache, key]), getSnapshot[0], getSnapshot[1]);
211103
211129
  const hasRevalidator = EVENT_REVALIDATORS[key] && EVENT_REVALIDATORS[key].length > 0;
211104
211130
  const cachedData = cached.data;
211105
- const data = isUndefined$2(cachedData) ? fallback && isPromiseLike$2(fallback) ? use$5(fallback) : fallback : cachedData;
211131
+ const data = isUndefined$2(cachedData) ? fallback && isPromiseLike$2(fallback) ? use$6(fallback) : fallback : cachedData;
211106
211132
  const error = cached.error;
211107
211133
  const laggyDataRef = (0, import_react$143.useRef)(data);
211108
211134
  const returnedData = keepPreviousData ? isUndefined$2(cachedData) ? isUndefined$2(laggyDataRef.current) ? data : laggyDataRef.current : cachedData : data;
@@ -211279,14 +211305,14 @@ ${seriesRules.join("\n")}${tipRules}
211279
211305
  unmountedRef.current = false;
211280
211306
  }
211281
211307
  const req = PRELOAD[key];
211282
- use$5(!isUndefined$2(req) && hasKeyButNoData ? boundMutate(req) : resolvedUndef);
211308
+ use$6(!isUndefined$2(req) && hasKeyButNoData ? boundMutate(req) : resolvedUndef);
211283
211309
  if (!isUndefined$2(error) && hasKeyButNoData) throw error;
211284
211310
  const revalidation = hasKeyButNoData ? revalidate(WITH_DEDUPE) : resolvedUndef;
211285
211311
  if (!isUndefined$2(returnedData) && hasKeyButNoData) {
211286
211312
  revalidation.status = "fulfilled";
211287
211313
  revalidation.value = true;
211288
211314
  }
211289
- use$5(revalidation);
211315
+ use$6(revalidation);
211290
211316
  }
211291
211317
  return {
211292
211318
  mutate: boundMutate,
@@ -240647,7 +240673,7 @@ or paste into an existing text editor`,
240647
240673
  delay
240648
240674
  ]);
240649
240675
  (0, import_react$136.useDebugValue)(value);
240650
- if (isPromiseLike(value)) return use$3(createContinuablePromise(value));
240676
+ if (isPromiseLike(value)) return use$4(createContinuablePromise(value));
240651
240677
  return value;
240652
240678
  }
240653
240679
  function useSetAtom(atom, options) {
@@ -240659,7 +240685,7 @@ or paste into an existing text editor`,
240659
240685
  function useAtom(atom, options) {
240660
240686
  return [useAtomValue(atom, options), useSetAtom(atom, options)];
240661
240687
  }
240662
- var import_react$136, StoreContext, useStore$1, isPromiseLike, attachPromiseMeta, use$3, continuablePromiseMap, createContinuablePromise;
240688
+ var import_react$136, StoreContext, useStore$1, isPromiseLike, attachPromiseMeta, use$4, continuablePromiseMap, createContinuablePromise;
240663
240689
  var init_react = __esmMin((() => {
240664
240690
  import_react$136 = /* @__PURE__ */ __toESM$1(require_react$1(), 1);
240665
240691
  init_vanilla$1();
@@ -240679,7 +240705,7 @@ or paste into an existing text editor`,
240679
240705
  promise.reason = e;
240680
240706
  });
240681
240707
  };
240682
- use$3 = import_react$136.use || ((promise) => {
240708
+ use$4 = import_react$136.use || ((promise) => {
240683
240709
  if (promise.status === "pending") throw promise;
240684
240710
  else if (promise.status === "fulfilled") return promise.value;
240685
240711
  else if (promise.status === "rejected") throw promise.reason;
@@ -479135,15 +479161,15 @@ TTD mermaid definition render errror: ${M.message}`, "color: yellow"), le("ai",
479135
479161
  resizeHandle: "rr-image-resize-handle"
479136
479162
  };
479137
479163
  var root$1 = "yvdzu0";
479138
- var image$1 = "yvdzu2";
479164
+ var image$1 = "yvdzu3";
479139
479165
  var imageState = {
479140
- loading: "yvdzu3",
479141
- loaded: "yvdzu4",
479142
- error: "yvdzu5"
479166
+ loading: "yvdzu4",
479167
+ loaded: "yvdzu5",
479168
+ error: "yvdzu6"
479143
479169
  };
479144
- var imageVisible = "yvdzu6";
479145
- var frame = "yvdzu7";
479146
- var frameStatic = "yvdzu9";
479170
+ var imageVisible = "yvdzu7";
479171
+ var frame = "yvdzu8";
479172
+ var frameStatic = "yvdzua";
479147
479173
  //#endregion
479148
479174
  //#region ../rich-renderer-image/src/ImageRenderer.tsx
479149
479175
  init_static_entry();
@@ -479168,7 +479194,7 @@ TTD mermaid definition render errror: ${M.message}`, "color: yellow"), le("ai",
479168
479194
  backgroundColor: state !== "loaded" && !placeholderUrl ? accent || vars.color.bgTertiary : "transparent",
479169
479195
  backgroundImage: placeholderUrl && state !== "loaded" ? `url(${placeholderUrl})` : void 0,
479170
479196
  backgroundSize: "cover",
479171
- width: width ? Math.min(width, 1200) : void 0,
479197
+ width: displayWidth !== void 0 ? "100%" : width ? Math.min(width, 1200) : void 0,
479172
479198
  maxWidth: "100%",
479173
479199
  ...width && height ? { aspectRatio: `${width} / ${height}` } : {}
479174
479200
  };
@@ -479211,14 +479237,14 @@ TTD mermaid definition render errror: ${M.message}`, "color: yellow"), le("ai",
479211
479237
  onError: () => setState("error"),
479212
479238
  onLoad: () => setState("loaded")
479213
479239
  }),
479214
- state === "loading" && /* @__PURE__ */ (0, import_jsx_runtime$232.jsx)("span", { className: `yvdzub ${semanticClassNames$4.loader}` }),
479240
+ state === "loading" && /* @__PURE__ */ (0, import_jsx_runtime$232.jsx)("span", { className: `yvdzuc ${semanticClassNames$4.loader}` }),
479215
479241
  state === "error" && /* @__PURE__ */ (0, import_jsx_runtime$232.jsx)("span", {
479216
- className: `yvdzuc ${semanticClassNames$4.errorBadge}`,
479242
+ className: `yvdzud ${semanticClassNames$4.errorBadge}`,
479217
479243
  children: "Image failed to load"
479218
479244
  })
479219
479245
  ]
479220
479246
  }), captionText && /* @__PURE__ */ (0, import_jsx_runtime$232.jsx)("figcaption", {
479221
- className: `yvdzud ${semanticClassNames$4.caption}`,
479247
+ className: `yvdzue ${semanticClassNames$4.caption}`,
479222
479248
  children: captionText
479223
479249
  })]
479224
479250
  });
@@ -481242,41 +481268,6 @@ TTD mermaid definition render errror: ${M.message}`, "color: yellow"), le("ai",
481242
481268
  });
481243
481269
  }
481244
481270
  //#endregion
481245
- //#region ../../node_modules/.pnpm/@lexical+react@0.45.0_react-dom@19.2.6_react@19.2.6__react@19.2.6_yjs@13.6.29/node_modules/@lexical/react/dist/LexicalLinkPlugin.prod.mjs
481246
- init_LexicalExtension_prod();
481247
- init_LexicalLink_prod();
481248
- init_LexicalComposerContext_prod();
481249
- function l$5({ validateUrl: l, attributes: n }) {
481250
- const [a] = o$52();
481251
- return (0, import_react$183.useEffect)(() => {
481252
- if (!a.hasNodes([z$28])) throw new Error("LinkPlugin: LinkNode not registered on editor");
481253
- }), (0, import_react$183.useEffect)(() => lt$2(a, Wt$7({
481254
- attributes: n,
481255
- validateUrl: l
481256
- })), [
481257
- a,
481258
- l,
481259
- n
481260
- ]), null;
481261
- }
481262
- //#endregion
481263
- //#region ../../node_modules/.pnpm/@lexical+react@0.45.0_react-dom@19.2.6_react@19.2.6__react@19.2.6_yjs@13.6.29/node_modules/@lexical/react/dist/LexicalListPlugin.prod.mjs
481264
- init_LexicalList_prod();
481265
- init_LexicalComposerContext_prod();
481266
- init_Lexical_prod();
481267
- function l$4({ hasStrictIndent: l = !1, shouldPreserveNumbering: m = !1 }) {
481268
- const [c] = o$52();
481269
- return (0, import_react$183.useEffect)(() => {
481270
- if (!c.hasNodes([Se$3, ye$2])) throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor");
481271
- }, [c]), (0, import_react$183.useEffect)(() => ea$1(Be$5(c, { restoreNumbering: m }), l ? We$5(c) : () => {}), [
481272
- c,
481273
- l,
481274
- m
481275
- ]), function(e) {
481276
- (0, import_react$183.useEffect)(() => Be$5(e), [e]);
481277
- }(c), null;
481278
- }
481279
- //#endregion
481280
481271
  //#region ../../node_modules/.pnpm/@lexical+react@0.45.0_react-dom@19.2.6_react@19.2.6__react@19.2.6_yjs@13.6.29/node_modules/@lexical/react/dist/LexicalCollaborationContext.prod.mjs
481281
481272
  /**
481282
481273
  * Copyright (c) Meta Platforms, Inc. and affiliates.
@@ -481302,12 +481293,12 @@ TTD mermaid definition render errror: ${M.message}`, "color: yellow"), le("ai",
481302
481293
  ["Owl", "rgb(0, 100, 100)"],
481303
481294
  ["Gull", "rgb(100, 0, 100)"],
481304
481295
  ["Squid", "rgb(150, 0, 150)"]
481305
- ], i$2 = t$1[Math.floor(Math.random() * t$1.length)], l$3 = (0, import_react$183.createContext)(null);
481296
+ ], i$3 = t$1[Math.floor(Math.random() * t$1.length)], l$5 = (0, import_react$183.createContext)(null);
481306
481297
  function a$3() {
481307
481298
  return {
481308
- color: i$2[1],
481299
+ color: i$3[1],
481309
481300
  isCollabActive: !1,
481310
- name: i$2[0],
481301
+ name: i$3[0],
481311
481302
  yjsDocMap: /* @__PURE__ */ new Map()
481312
481303
  };
481313
481304
  }
@@ -481367,7 +481358,7 @@ TTD mermaid definition render errror: ${M.message}`, "color: yellow"), le("ai",
481367
481358
  });
481368
481359
  }
481369
481360
  return [m, t];
481370
- }, []), { isCollabActive: L, yjsDocMap: M } = (0, import_react$183.useContext)(l$3) ?? {}, y = x || v.current || M && M.has(m.getKey());
481361
+ }, []), { isCollabActive: L, yjsDocMap: M } = (0, import_react$183.useContext)(l$5) ?? {}, y = x || v.current || M && M.has(m.getKey());
481371
481362
  return (0, import_react$183.useEffect)(() => {
481372
481363
  y && (v.current = !0);
481373
481364
  }, [y]), (0, import_react$183.useEffect)(() => {
@@ -481395,7 +481386,7 @@ TTD mermaid definition render errror: ${M.message}`, "color: yellow"), le("ai",
481395
481386
  subscribe: (t) => r.registerEditableListener(t)
481396
481387
  };
481397
481388
  }
481398
- function l$1() {
481389
+ function l$3() {
481399
481390
  return function(t) {
481400
481391
  const [e] = o$52(), o = (0, import_react$183.useMemo)(() => t(e), [e, t]), [a, l] = (0, import_react$183.useState)(() => o.initialValueFn()), s = (0, import_react$183.useRef)(a);
481401
481392
  return u$1(() => {
@@ -481497,10 +481488,61 @@ TTD mermaid definition render errror: ${M.message}`, "color: yellow"), le("ai",
481497
481488
  e();
481498
481489
  }));
481499
481490
  }, [r]), e;
481500
- }(o), i = l$1();
481491
+ }(o), i = l$3();
481501
481492
  return n ? "function" == typeof t ? t(i) : t : null;
481502
481493
  }
481503
481494
  //#endregion
481495
+ //#region ../../node_modules/.pnpm/@lexical+react@0.45.0_react-dom@19.2.6_react@19.2.6__react@19.2.6_yjs@13.6.29/node_modules/@lexical/react/dist/LexicalLinkPlugin.prod.mjs
481496
+ init_LexicalExtension_prod();
481497
+ init_LexicalLink_prod();
481498
+ init_LexicalComposerContext_prod();
481499
+ function l$1({ validateUrl: l, attributes: n }) {
481500
+ const [a] = o$52();
481501
+ return (0, import_react$183.useEffect)(() => {
481502
+ if (!a.hasNodes([z$28])) throw new Error("LinkPlugin: LinkNode not registered on editor");
481503
+ }), (0, import_react$183.useEffect)(() => lt$3(a, Wt$7({
481504
+ attributes: n,
481505
+ validateUrl: l
481506
+ })), [
481507
+ a,
481508
+ l,
481509
+ n
481510
+ ]), null;
481511
+ }
481512
+ //#endregion
481513
+ //#region ../../node_modules/.pnpm/@lexical+react@0.45.0_react-dom@19.2.6_react@19.2.6__react@19.2.6_yjs@13.6.29/node_modules/@lexical/react/dist/LexicalListPlugin.prod.mjs
481514
+ init_LexicalList_prod();
481515
+ init_LexicalComposerContext_prod();
481516
+ init_Lexical_prod();
481517
+ function l({ hasStrictIndent: l = !1, shouldPreserveNumbering: m = !1 }) {
481518
+ const [c] = o$52();
481519
+ return (0, import_react$183.useEffect)(() => {
481520
+ if (!c.hasNodes([Se$3, ye$2])) throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor");
481521
+ }, [c]), (0, import_react$183.useEffect)(() => ea$1(Be$5(c, { restoreNumbering: m }), l ? We$5(c) : () => {}), [
481522
+ c,
481523
+ l,
481524
+ m
481525
+ ]), function(e) {
481526
+ (0, import_react$183.useEffect)(() => Be$5(e), [e]);
481527
+ }(c), null;
481528
+ }
481529
+ //#endregion
481530
+ //#region ../rich-editor/src/context/NestedEditorPluginsContext.tsx
481531
+ var NestedEditorPluginsContext = (0, import_react$183.createContext)(null);
481532
+ function useNestedEditorPlugins() {
481533
+ return (0, import_react$183.use)(NestedEditorPluginsContext)?.plugins ?? null;
481534
+ }
481535
+ //#endregion
481536
+ //#region ../rich-editor/src/components/decorators/NestedEditorCorePlugins.tsx
481537
+ function NestedEditorCorePlugins() {
481538
+ const nestedEditorPlugins = useNestedEditorPlugins();
481539
+ return /* @__PURE__ */ (0, import_jsx_runtime$232.jsxs)(import_jsx_runtime$232.Fragment, { children: [
481540
+ /* @__PURE__ */ (0, import_jsx_runtime$232.jsx)(l, {}),
481541
+ /* @__PURE__ */ (0, import_jsx_runtime$232.jsx)(l$1, {}),
481542
+ nestedEditorPlugins
481543
+ ] });
481544
+ }
481545
+ //#endregion
481504
481546
  //#region ../rich-editor/src/components/decorators/AlertEditDecorator.tsx
481505
481547
  init_LexicalComposerContext_prod();
481506
481548
  init_Lexical_prod();
@@ -481613,8 +481655,7 @@ TTD mermaid definition render errror: ${M.message}`, "color: yellow"), le("ai",
481613
481655
  style: { outline: "none" }
481614
481656
  })
481615
481657
  }),
481616
- /* @__PURE__ */ (0, import_jsx_runtime$232.jsx)(l$4, {}),
481617
- /* @__PURE__ */ (0, import_jsx_runtime$232.jsx)(l$5, {}),
481658
+ /* @__PURE__ */ (0, import_jsx_runtime$232.jsx)(NestedEditorCorePlugins, {}),
481618
481659
  /* @__PURE__ */ (0, import_jsx_runtime$232.jsx)(ExitBlockPlugin, {
481619
481660
  nodeKey,
481620
481661
  parentEditor: editor
@@ -1,9 +1,10 @@
1
1
  import { chatNodes } from "@haklex/rich-ext-chat/node";
2
2
  //#region src/modules/chat/module.ts
3
+ var CHAT_MODULE_NAME = "chat";
3
4
  var chatModule = {
4
- name: "chat",
5
+ name: CHAT_MODULE_NAME,
5
6
  nodes: chatNodes,
6
7
  lazyRenderers: { Chat: () => import("@haklex/rich-ext-chat/renderer") }
7
8
  };
8
9
  //#endregion
9
- export { chatModule as t };
10
+ export { chatModule as n, CHAT_MODULE_NAME as t };
@@ -1,4 +1,4 @@
1
- import { t as chatModule } from "../../module-B-e-0OeP.js";
1
+ import { n as chatModule } from "../../module-BdmfHBDV.js";
2
2
  import { ChatEditRenderer, chatEditNodes } from "@haklex/rich-ext-chat/edit";
3
3
  //#region src/modules/chat/edit.ts
4
4
  var chatEditModule = {
@@ -1,4 +1,4 @@
1
- export { chatModule } from './module';
1
+ export { CHAT_MODULE_NAME, chatModule } from './module';
2
2
  export { $createChatNode, $isChatNode, ChatNode, chatNodes } from './node';
3
3
  export { ChatRenderer } from './renderer';
4
4
  export type { ChatMessage, ChatParticipant, ChatParticipantKind, ChatRendererProps, ChatVariant, SerializedChatNode, } from '@haklex/rich-ext-chat/static';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/chat/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,YAAY,EACV,WAAW,EACX,eAAe,EACf,mBAAmB,EACnB,iBAAiB,EACjB,WAAW,EACX,kBAAkB,GACnB,MAAM,8BAA8B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/chat/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,YAAY,EACV,WAAW,EACX,eAAe,EACf,mBAAmB,EACnB,iBAAiB,EACjB,WAAW,EACX,kBAAkB,GACnB,MAAM,8BAA8B,CAAC"}
@@ -1,4 +1,4 @@
1
- import { t as chatModule } from "../../module-B-e-0OeP.js";
1
+ import { n as chatModule, t as CHAT_MODULE_NAME } from "../../module-BdmfHBDV.js";
2
2
  import { $createChatNode, $isChatNode, ChatNode, chatNodes } from "./node.mjs";
3
3
  import { ChatRenderer } from "./renderer.mjs";
4
- export { $createChatNode, $isChatNode, ChatNode, ChatRenderer, chatModule, chatNodes };
4
+ export { $createChatNode, $isChatNode, CHAT_MODULE_NAME, ChatNode, ChatRenderer, chatModule, chatNodes };
@@ -1,3 +1,4 @@
1
1
  import { RichRendererModule } from '../../core/types';
2
+ export declare const CHAT_MODULE_NAME: "chat";
2
3
  export declare const chatModule: RichRendererModule;
3
4
  //# sourceMappingURL=module.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../src/modules/chat/module.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAE3D,eAAO,MAAM,UAAU,EAAE,kBAMxB,CAAC"}
1
+ {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../src/modules/chat/module.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAE3D,eAAO,MAAM,gBAAgB,EAAG,MAAe,CAAC;AAEhD,eAAO,MAAM,UAAU,EAAE,kBAMxB,CAAC"}
package/dist/renderer.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { n as alertModule } from "./module-D4mpXQAA.js";
2
2
  import { n as bannerModule } from "./module-CWEnhSrZ.js";
3
- import { t as chatModule } from "./module-B-e-0OeP.js";
3
+ import { n as chatModule } from "./module-BdmfHBDV.js";
4
4
  import { t as codeBlockModule } from "./module-D1w72FNW.js";
5
5
  import { t as codeSnippetModule } from "./module-Bik_qOoy.js";
6
6
  import { t as dynamicModule } from "./module-Db26fECJ.js";
@@ -1 +1 @@
1
- {"version":3,"file":"table.css.d.ts","sourceRoot":"","sources":["../../src/static-renderer/table.css.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY,QAEvB,CAAC;AAEH,eAAO,MAAM,KAAK,QAKhB,CAAC;AAEH,eAAO,MAAM,SAAS,QAQpB,CAAC;AAEH,eAAO,MAAM,SAAS,QAIpB,CAAC"}
1
+ {"version":3,"file":"table.css.d.ts","sourceRoot":"","sources":["../../src/static-renderer/table.css.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY,QAOvB,CAAC;AAEH,eAAO,MAAM,KAAK,QAKhB,CAAC;AAEH,eAAO,MAAM,SAAS,QAQpB,CAAC;AAEH,eAAO,MAAM,SAAS,QAIpB,CAAC"}