@haklex/rich-compose 0.53.1 → 0.54.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.
@@ -13054,7 +13054,7 @@
13054
13054
  t.length = 0;
13055
13055
  };
13056
13056
  }
13057
- var _Symbol$iterator, _Symbol$toStringTag, _Symbol$iterator2, _Symbol$iterator3, _Symbol$iterator4, r$8, s$16, a$7, u$5, d$8, g$4, _$3, p$6, y$6, m$6, x$8, O$4, M$3, A$3, F$3, K$3, B$4, R$2, $$4, j$4, U$2, J$3, H$1, G, Z$2, et$4, rt$6, it$7, st$6, ct$7, at$5, gt$5, _t$4, Pt$7, Lt$9, Gt$5, ge$2, _e$2, Ce$2, ve$3, Ie$4, Ke$2, Be$2, Re$3, We$2, $e$2, je$3, Ue$1, Ve$2, Ye$1, Ge$2, Xe$3, Qe$3, Ze$3, tn$4, en$3, nn$4, on$4, rn$4, sn$3, ln$4, fn$3, Ln$4, zn$3, Kn$3, Bn$3, Rn$4, Wn$3, $n$3, jn$2, Un$3, Vn$3, Jn$2, Hn$3, qn$2, Yn$3, Gn$3, Xn$4, Qn$3, Zn$4, to$2, eo$2, no$1, oo$2, ro$2, io$1, so$1, lo$1, co$1, ao$1, uo$2, fo$2, ho$2, go$1, _o$2, po$2, yo$3, mo$1, xo$2, So$3, Co$3, vo$2, ko$3, bo$2, To$2, Mo$2, Ao$3, Fo$3, Po$2, Io$1, Lo$2, Ko$2, $o$2, jo$2, Uo$2, Vo$2, Jo, _r$2, pr$2, yr$2, mr$2, xr$2, vr$2, Nr$2, Or$2, Ar$1, Fr$1, Lr$1, jr$2, Vr$1, Jr$2, Yr$2, Xr$2, Qr$2, Zr$2, ti$1, ii$2, hi$2, pi$4, Si$1, Ti$1, Ni$2, Oi, Ii$1, Ki$2, Xi$2, As$1, Fs$1, Ds$1, Ps$1, Is$1, Ls$1, zs$1, Ks$2, Bs$1, dl$1, hl$1, gl$1, pl$1, xl$1, Cl$1, wl$1, El$1, Ol$1, ec$1, mc$1, vc$1, kc$1, Tc$1, Nc$1, Mc$1, eu$1, ku$1, Tu$1, Iu$1, Lu$1, qu$1, Xu$1, Qu$1, of$1, lf$1, yf$1, kf$1, Nf$1, zf$1, Kf$1, Rf$1, Wf$1, qf$1, Yf$1, Gf$1, Xf$1, td$1, ed, sd$1, ld$1, cd$1, pd$1, yd$1;
13057
+ var _Symbol$iterator, _Symbol$toStringTag, _Symbol$iterator2, _Symbol$iterator3, _Symbol$iterator4, r$8, s$16, a$7, u$5, d$8, g$4, _$3, p$6, y$6, m$6, x$8, O$4, M$3, A$3, F$3, K$3, B$4, R$2, $$4, j$4, U$2, J$3, H$1, G, Z$2, et$4, rt$6, it$7, st$6, ct$7, at$5, gt$5, _t$4, Pt$7, Lt$9, Gt$5, ge$2, _e$2, Ce$2, ve$3, Ie$4, Ke$2, Be$2, Re$3, We$2, $e$2, je$3, Ue$1, Ve$2, Ye$1, Ge$2, Xe$3, Qe$3, Ze$3, tn$4, en$3, nn$4, on$4, rn$4, sn$3, ln$4, fn$3, Ln$4, zn$3, Kn$3, Bn$3, Rn$4, Wn$3, $n$3, jn$2, Un$3, Vn$3, Jn$2, Hn$3, qn$2, Yn$3, Gn$3, Xn$4, Qn$3, Zn$4, to$2, eo$2, no$1, oo$2, ro$2, io$1, so$1, lo$1, co$1, ao$1, uo$2, fo$2, ho$2, go$1, _o$2, po$2, yo$3, mo$1, xo$2, So$3, Co$3, vo$2, ko$3, bo$2, To$2, Mo$2, Ao$3, Fo$3, Po$2, Io$1, Lo$2, Ko$2, $o$2, jo$2, Uo$2, Vo$2, Jo, _r$2, pr$2, yr$2, mr$2, xr$2, vr$2, Nr$2, Or$2, Ar$1, Fr$1, Lr$1, $r$2, jr$2, Vr$1, Jr$2, Yr$2, Xr$2, Qr$2, Zr$2, ti$1, ii$2, hi$2, pi$4, Si$1, Ti$1, Ni$2, Oi, Ii$1, Ki$2, Xi$2, As$1, Fs$1, Ds$1, Ps$1, Is$1, Ls$1, zs$1, Ks$2, Bs$1, dl$1, hl$1, gl$1, pl$1, xl$1, Cl$1, wl$1, El$1, Ol$1, ec$1, mc$1, vc$1, kc$1, Tc$1, Nc$1, Mc$1, eu$1, ku$1, Tu$1, Iu$1, Lu$1, qu$1, Xu$1, Qu$1, of$1, lf$1, yf$1, kf$1, Nf$1, zf$1, Kf$1, Rf$1, Wf$1, qf$1, Yf$1, Gf$1, Xf$1, td$1, ed, sd$1, ld$1, cd$1, pd$1, yd$1;
13058
13058
  var init_Lexical_prod = __esmMin((() => {
13059
13059
  init_defineProperty();
13060
13060
  r$8 = /* @__PURE__ */ o$9();
@@ -13937,6 +13937,7 @@
13937
13937
  };
13938
13938
  _defineProperty(Fr$1, "importDOM", void 0);
13939
13939
  Lr$1 = "history-merge";
13940
+ $r$2 = "skip-dom-selection";
13940
13941
  jr$2 = "skip-selection-focus";
13941
13942
  Vr$1 = "composition-end";
13942
13943
  Jr$2 = /^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;
@@ -118461,6 +118462,35 @@ ${g}`, r = e.length;
118461
118462
  ] });
118462
118463
  }
118463
118464
  //#endregion
118465
+ //#region ../rich-editor/src/utils/nested-editor-sync.ts
118466
+ init_Lexical_prod();
118467
+ function registerNestedEditorSync(parentEditor, nestedEditor, ownerKey) {
118468
+ return nestedEditor.registerUpdateListener(({ dirtyElements, dirtyLeaves }) => {
118469
+ if (dirtyElements.size === 0 && dirtyLeaves.size === 0) return;
118470
+ parentEditor.update(() => {
118471
+ const owner = Xc$1(ownerKey);
118472
+ if (!owner) return;
118473
+ za$1(Lr$1);
118474
+ za$1($r$2);
118475
+ owner.markDirty();
118476
+ });
118477
+ });
118478
+ }
118479
+ //#endregion
118480
+ //#region ../rich-editor/src/components/decorators/useNestedEditorSync.ts
118481
+ init_LexicalComposerContext_prod();
118482
+ function useNestedEditorSync(nestedEditors, ownerKey) {
118483
+ const [editor] = o$10();
118484
+ (0, import_react$46.useEffect)(() => {
118485
+ const unregisters = nestedEditors.map((nested) => registerNestedEditorSync(editor, nested, ownerKey));
118486
+ return () => unregisters.forEach((unregister) => unregister());
118487
+ }, [
118488
+ editor,
118489
+ nestedEditors,
118490
+ ownerKey
118491
+ ]);
118492
+ }
118493
+ //#endregion
118464
118494
  //#region ../rich-editor/src/components/decorators/AlertEditDecorator.tsx
118465
118495
  init_LexicalComposerContext_prod();
118466
118496
  init_Lexical_prod();
@@ -118544,6 +118574,7 @@ ${g}`, r = e.length;
118544
118574
  }
118545
118575
  function AlertEditDecorator({ nodeKey, alertType, contentEditor }) {
118546
118576
  const [editor] = o$10();
118577
+ useNestedEditorSync((0, import_react$46.useMemo)(() => [contentEditor], [contentEditor]), nodeKey);
118547
118578
  const editable = editor.isEditable();
118548
118579
  const handleTypeChange = (0, import_react$46.useCallback)((newType) => {
118549
118580
  editor.update(() => {
@@ -118755,6 +118786,7 @@ ${g}`, r = e.length;
118755
118786
  init_RendererWrapper();
118756
118787
  function BannerEditDecorator({ nodeKey, bannerType, contentEditor }) {
118757
118788
  const [editor] = o$10();
118789
+ useNestedEditorSync((0, import_react$46.useMemo)(() => [contentEditor], [contentEditor]), nodeKey);
118758
118790
  const editable = editor.isEditable();
118759
118791
  const handleTypeChange = (0, import_react$46.useCallback)((newType) => {
118760
118792
  editor.update(() => {
@@ -119287,6 +119319,7 @@ ${g}`, r = e.length;
119287
119319
  function GridEditDecorator({ nodeKey, autoFocusOnMount, cols: initialCols, gap, cellEditors }) {
119288
119320
  const [editor] = o$10();
119289
119321
  const [currentCols, setCurrentCols] = (0, import_react$46.useState)(initialCols);
119322
+ useNestedEditorSync(cellEditors, nodeKey);
119290
119323
  (0, import_react$46.useEffect)(() => {
119291
119324
  return editor.registerUpdateListener(({ editorState }) => {
119292
119325
  editorState.read(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haklex/rich-compose",
3
- "version": "0.53.1",
3
+ "version": "0.54.0",
4
4
  "description": "Compose primitives for haklex rich content renderers — Gundam-style assembly of Lexical nodes, sync/lazy renderers, and Provider stacks.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -328,34 +328,34 @@
328
328
  "dist"
329
329
  ],
330
330
  "dependencies": {
331
- "@haklex/rich-ext-chart": "0.53.1",
332
- "@haklex/rich-ext-chat": "0.53.1",
333
- "@haklex/rich-ext-code-snippet": "0.53.1",
334
- "@haklex/rich-ext-embed": "0.53.1",
335
- "@haklex/rich-ext-excalidraw": "0.53.1",
336
- "@haklex/rich-ext-gallery": "0.53.1",
337
- "@haklex/rich-ext-nested-doc": "0.53.1",
338
- "@haklex/rich-ext-poll": "0.53.1",
339
- "@haklex/rich-ext-steps": "0.53.1",
340
- "@haklex/rich-litexml": "0.53.1",
341
- "@haklex/rich-plugin-slash-menu": "0.53.1",
342
- "@haklex/rich-renderer-alert": "0.53.1",
343
- "@haklex/rich-renderer-banner": "0.53.1",
344
- "@haklex/rich-renderer-codeblock": "0.53.1",
345
- "@haklex/rich-renderer-file": "0.53.1",
346
- "@haklex/rich-renderer-image": "0.53.1",
347
- "@haklex/rich-renderer-katex": "0.53.1",
348
- "@haklex/rich-renderer-linkcard": "0.53.1",
349
- "@haklex/rich-renderer-mention": "0.53.1",
350
- "@haklex/rich-renderer-mermaid": "0.53.1",
351
- "@haklex/rich-renderer-ruby": "0.53.1",
352
- "@haklex/rich-renderer-video": "0.53.1",
353
- "@haklex/rich-style-token": "0.53.1",
331
+ "@haklex/rich-ext-chart": "0.54.0",
332
+ "@haklex/rich-ext-chat": "0.54.0",
333
+ "@haklex/rich-ext-code-snippet": "0.54.0",
334
+ "@haklex/rich-ext-embed": "0.54.0",
335
+ "@haklex/rich-ext-excalidraw": "0.54.0",
336
+ "@haklex/rich-ext-gallery": "0.54.0",
337
+ "@haklex/rich-ext-nested-doc": "0.54.0",
338
+ "@haklex/rich-ext-poll": "0.54.0",
339
+ "@haklex/rich-ext-steps": "0.54.0",
340
+ "@haklex/rich-litexml": "0.54.0",
341
+ "@haklex/rich-plugin-slash-menu": "0.54.0",
342
+ "@haklex/rich-renderer-alert": "0.54.0",
343
+ "@haklex/rich-renderer-banner": "0.54.0",
344
+ "@haklex/rich-renderer-codeblock": "0.54.0",
345
+ "@haklex/rich-renderer-file": "0.54.0",
346
+ "@haklex/rich-renderer-image": "0.54.0",
347
+ "@haklex/rich-renderer-katex": "0.54.0",
348
+ "@haklex/rich-renderer-linkcard": "0.54.0",
349
+ "@haklex/rich-renderer-mention": "0.54.0",
350
+ "@haklex/rich-renderer-mermaid": "0.54.0",
351
+ "@haklex/rich-renderer-ruby": "0.54.0",
352
+ "@haklex/rich-renderer-video": "0.54.0",
353
+ "@haklex/rich-style-token": "0.54.0",
354
354
  "@lexical/headless": "^0.52.0"
355
355
  },
356
356
  "devDependencies": {
357
- "@haklex/rich-editor": "0.53.1",
358
- "@haklex/rich-ext-dynamic": "0.53.1",
357
+ "@haklex/rich-editor": "0.54.0",
358
+ "@haklex/rich-ext-dynamic": "0.54.0",
359
359
  "@lexical/react": "^0.52.0",
360
360
  "@types/react": "^19.3.0",
361
361
  "@types/react-dom": "^19.3.0",
@@ -371,8 +371,8 @@
371
371
  "vitest": "^5.0.5"
372
372
  },
373
373
  "peerDependencies": {
374
- "@haklex/rich-editor": "^0.53.1",
375
- "@haklex/rich-ext-dynamic": "^0.53.1",
374
+ "@haklex/rich-editor": "^0.54.0",
375
+ "@haklex/rich-ext-dynamic": "^0.54.0",
376
376
  "@lexical/react": "^0.52.0",
377
377
  "lexical": "^0.52.0",
378
378
  "lucide-react": "^1.0.0",