@jackuait/blok 0.13.1 → 0.14.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/blok.cjs +1 -1
- package/dist/blok.iife.js +30 -30
- package/dist/blok.mjs +2 -2
- package/dist/chunks/blok-Da-GaWJ8.cjs +17 -0
- package/dist/chunks/{blok-BF9i6G_n.mjs → blok-PpFnlqXZ.mjs} +2723 -2323
- package/dist/chunks/constants-C-OQpSwB.cjs +457 -0
- package/dist/chunks/{constants-jfK6xPl6.mjs → constants-DdfiMdC1.mjs} +390 -299
- package/dist/chunks/{i18next-loader-GIrBCFrC.mjs → i18next-loader-BEWWek8j.mjs} +1 -1
- package/dist/chunks/{i18next-loader-DC1uN-wc.cjs → i18next-loader-BRLYf-CW.cjs} +1 -1
- package/dist/chunks/{lightweight-i18n-DF9Pupws.mjs → lightweight-i18n-GbzxWVgl.mjs} +9 -0
- package/dist/chunks/lightweight-i18n-lNYVKCfj.cjs +1 -0
- package/dist/chunks/messages-085GG-gT.cjs +1 -0
- package/dist/{messages-3j4yi-DF.mjs → chunks/messages-46QopBh4.mjs} +9 -0
- package/dist/chunks/messages-5kQujjf1.cjs +1 -0
- package/dist/chunks/{messages-CTWXEx_o.mjs → messages-6r3Lrqpf.mjs} +9 -0
- package/dist/chunks/messages-8vjbwhvK.cjs +1 -0
- package/dist/chunks/messages-ACbZDExx.cjs +1 -0
- package/dist/chunks/messages-B05XREvI.cjs +1 -0
- package/dist/chunks/{messages-CQg2_vmm.mjs → messages-B0y97-C9.mjs} +9 -0
- package/dist/chunks/{messages-ZHNvKiIX.mjs → messages-B26pkAIj.mjs} +9 -0
- package/dist/chunks/messages-B2J7kDKI.cjs +1 -0
- package/dist/chunks/messages-B3jMjjFG.cjs +1 -0
- package/dist/chunks/messages-B4_c-uS0.cjs +1 -0
- package/dist/chunks/messages-B6zoVYEd.cjs +1 -0
- package/dist/chunks/{messages-DI9Ifrgt.mjs → messages-B73uch0z.mjs} +9 -0
- package/dist/chunks/{messages-AgmrT2Id.mjs → messages-B74xK8Ux.mjs} +9 -0
- package/dist/chunks/messages-B7efcz_S2.cjs +1 -0
- package/dist/chunks/{messages-sqdfYuVj2.mjs → messages-B9u3UJRu2.mjs} +9 -0
- package/dist/chunks/messages-BB9huoLU.cjs +1 -0
- package/dist/{messages-Cx7sqvx02.mjs → chunks/messages-BEzCtzW3.mjs} +9 -0
- package/dist/chunks/messages-BGQdk2zV2.cjs +1 -0
- package/dist/chunks/messages-BGmUrVtN2.cjs +1 -0
- package/dist/chunks/messages-BH-3FR4b2.cjs +1 -0
- package/dist/chunks/{messages-BZ4d5yNH.mjs → messages-BHqAQF6C.mjs} +9 -0
- package/dist/{messages-DzkZ434Z.mjs → chunks/messages-BI_-Ub99.mjs} +9 -0
- package/dist/chunks/messages-BNa6_BYq2.cjs +1 -0
- package/dist/chunks/{messages-BvupGuDw2.mjs → messages-BOMNOs8T2.mjs} +9 -0
- package/dist/chunks/{messages-fSeXd6-z.mjs → messages-BPYPnKHy.mjs} +9 -0
- package/dist/{messages-B3PWaMcw.mjs → chunks/messages-BQmUOeft.mjs} +9 -0
- package/dist/chunks/messages-BRfutnCs.cjs +1 -0
- package/dist/chunks/messages-BT_0dgL1.cjs +1 -0
- package/dist/chunks/{messages-BWGqOZ9J.mjs → messages-BWSXW4jk.mjs} +9 -0
- package/dist/chunks/messages-BWpKvkND2.cjs +1 -0
- package/dist/chunks/messages-BY6gCAsA2.cjs +1 -0
- package/dist/{messages-BDwU9rYR2.mjs → chunks/messages-BbfZo0kw2.mjs} +9 -0
- package/dist/{messages-gQ5PFa2t2.mjs → chunks/messages-BfqzgRP72.mjs} +9 -0
- package/dist/chunks/messages-Bk2Xs7_v.cjs +1 -0
- package/dist/{messages-CmN2OfuB.mjs → chunks/messages-BmkavfpK.mjs} +9 -0
- package/dist/chunks/{messages-B1k4DgVe.mjs → messages-BmzMikmq.mjs} +9 -0
- package/dist/chunks/messages-BniEGAW32.cjs +1 -0
- package/dist/chunks/{messages-BP77P9ER.mjs → messages-BplwYBhA.mjs} +9 -0
- package/dist/chunks/{messages-B1xgsCNQ.cjs → messages-BqJ-xe8R.cjs} +1 -1
- package/dist/chunks/messages-Bry43U_U.cjs +1 -0
- package/dist/{messages-DFfhoDWZ2.mjs → chunks/messages-BuzGjYKw.mjs} +9 -0
- package/dist/chunks/messages-ByT63R7v2.cjs +1 -0
- package/dist/{messages-C_gdsU952.mjs → chunks/messages-C0S7KViA2.mjs} +9 -0
- package/dist/chunks/{messages-DzY53I67.mjs → messages-C0Tt7Odx.mjs} +9 -0
- package/dist/{messages-B8Tq9Txy.mjs → chunks/messages-C3A1iLjY.mjs} +9 -0
- package/dist/chunks/{messages-B6You-RA.mjs → messages-C3gh1rpr.mjs} +9 -0
- package/dist/chunks/{messages-CXxz5HYQ.mjs → messages-C7JE4SUS.mjs} +9 -0
- package/dist/chunks/messages-C9IWDnCh2.cjs +1 -0
- package/dist/chunks/messages-CBc3S61g2.cjs +1 -0
- package/dist/chunks/{messages-DefZ3ihx.mjs → messages-CHpkDOiI.mjs} +9 -0
- package/dist/{messages-BcD7xtJA.mjs → chunks/messages-CImQCp-z2.mjs} +9 -0
- package/dist/chunks/messages-CJ--z80t2.cjs +1 -0
- package/dist/chunks/messages-CNH8YFuv.cjs +1 -0
- package/dist/chunks/{messages-bjSJwsXK2.mjs → messages-CQ2KWTbV2.mjs} +9 -0
- package/dist/{messages-C8RMjnBe.mjs → chunks/messages-CWAukiLC.mjs} +9 -0
- package/dist/{messages-B3oFjWq3.mjs → chunks/messages-C_BUhMkZ.mjs} +9 -0
- package/dist/chunks/{messages-BvuEffoe.mjs → messages-CcBT1o1B.mjs} +9 -0
- package/dist/chunks/messages-CdqejEof.cjs +1 -0
- package/dist/chunks/messages-Chdejshy2.cjs +1 -0
- package/dist/{messages-D-rvoUSJ.mjs → chunks/messages-CijMg_B_.mjs} +9 -0
- package/dist/{messages-JKXCsFKZ.mjs → chunks/messages-Ciz80Z2u2.mjs} +9 -0
- package/dist/{messages-Dq2WEsEu.mjs → chunks/messages-CjuGKMoT.mjs} +9 -0
- package/dist/chunks/{messages-BxKobpJ22.mjs → messages-ClOfUECP2.mjs} +9 -0
- package/dist/chunks/messages-CrF-Q_ML.cjs +1 -0
- package/dist/chunks/messages-Cww_rBCM.cjs +1 -0
- package/dist/chunks/messages-CxPVYl2H2.cjs +1 -0
- package/dist/chunks/{messages-BA2sVGrR2.mjs → messages-Cyiqo_dk2.mjs} +9 -0
- package/dist/{messages-D788KtGe.mjs → chunks/messages-D-u_SWhb.mjs} +9 -0
- package/dist/chunks/messages-D0H-D5FQ2.cjs +1 -0
- package/dist/chunks/messages-D195RH3A.cjs +1 -0
- package/dist/chunks/{messages-Dd4nzvLj2.mjs → messages-D5-DG-_u2.mjs} +9 -0
- package/dist/chunks/messages-D6kDQgDP2.cjs +1 -0
- package/dist/{messages-CAGQtm7T.mjs → chunks/messages-D8-hiQgf.mjs} +9 -0
- package/dist/{messages-ftPYsH6d2.mjs → chunks/messages-D8nb9CKr2.mjs} +9 -0
- package/dist/{messages-DPqFBtJR.mjs → chunks/messages-DAd5yWtH2.mjs} +9 -0
- package/dist/chunks/messages-DAdsFLpE.cjs +1 -0
- package/dist/chunks/messages-DCUsbiUQ.cjs +1 -0
- package/dist/{messages-AycxTjmw.mjs → chunks/messages-DCVZaAT9.mjs} +9 -0
- package/dist/chunks/messages-DHXttezt2.cjs +1 -0
- package/dist/chunks/messages-DIgxCixa.cjs +1 -0
- package/dist/chunks/messages-DJ0Wr-Bt2.cjs +1 -0
- package/dist/chunks/messages-DJBdlmxR.cjs +1 -0
- package/dist/chunks/{messages-5AxgjKgf2.mjs → messages-DJm-uLwr2.mjs} +9 -0
- package/dist/chunks/{messages-BVarbXYD2.mjs → messages-DKF4qWhw2.mjs} +9 -0
- package/dist/chunks/messages-DLAWSVlE.cjs +1 -0
- package/dist/{messages-Bj03XD-02.mjs → chunks/messages-DLI8m6z_2.mjs} +9 -0
- package/dist/{messages-CTzO11jz.mjs → chunks/messages-DNiWBVQr.mjs} +9 -0
- package/dist/chunks/messages-DNsgR3ZH.cjs +1 -0
- package/dist/{messages-CgaGkQi32.mjs → chunks/messages-DPI5-TrO2.mjs} +9 -0
- package/dist/chunks/{messages-CyCl8la6.mjs → messages-DQ1z_srP.mjs} +9 -0
- package/dist/chunks/{messages-C4bHKGnB2.mjs → messages-DSxYO-_j2.mjs} +9 -0
- package/dist/chunks/messages-DTrrEqf02.cjs +1 -0
- package/dist/chunks/{messages-D7YPlNAK.mjs → messages-DYLfoakZ.mjs} +9 -0
- package/dist/chunks/messages-DZCWq8nI2.cjs +1 -0
- package/dist/{messages-PQVh93mt.mjs → chunks/messages-D_JT9POv.mjs} +9 -0
- package/dist/chunks/{messages-Uc3Uc2862.mjs → messages-DaTniq4w2.mjs} +9 -0
- package/dist/{messages-DiL61awK.mjs → chunks/messages-De2tXe0o.mjs} +9 -0
- package/dist/chunks/{messages-l5xHQb_m.mjs → messages-DiwyN3uU.mjs} +9 -0
- package/dist/chunks/messages-DkQGwmom.cjs +1 -0
- package/dist/chunks/{messages-B6t1xShv.mjs → messages-Dl-C7Pdf.mjs} +9 -0
- package/dist/chunks/{messages-bSVgJ1cu.mjs → messages-DlDyYt5x.mjs} +9 -0
- package/dist/chunks/messages-Dmhwr_Ow2.cjs +1 -0
- package/dist/chunks/messages-DrQQ1Hky.cjs +1 -0
- package/dist/chunks/messages-DtQ_pCWn.cjs +1 -0
- package/dist/{messages-uy3FE24_2.mjs → chunks/messages-Du-inLpi2.mjs} +9 -0
- package/dist/{messages-DqXJJPx9.mjs → chunks/messages-Duu9LiF32.mjs} +9 -0
- package/dist/chunks/messages-DxCc14pu2.cjs +1 -0
- package/dist/chunks/{messages-DNqFlfOd.mjs → messages-Dz3cVqxu.mjs} +9 -0
- package/dist/chunks/messages-EJkYSgsP.cjs +1 -0
- package/dist/chunks/messages-F3QeKduK.cjs +1 -0
- package/dist/chunks/messages-HfCZ1oPV.cjs +1 -0
- package/dist/chunks/{messages-BVZONUH9.mjs → messages-Ji3WDjrp.mjs} +9 -0
- package/dist/chunks/messages-MTnjMh07.cjs +1 -0
- package/dist/{messages-DL7JAwpC.mjs → chunks/messages-NU3n_1t9.mjs} +9 -0
- package/dist/chunks/messages-NpCBoXqi.cjs +1 -0
- package/dist/chunks/messages-PMZIH3mH.cjs +1 -0
- package/dist/{messages-7fwJIrld2.mjs → chunks/messages-TFu4tdzc2.mjs} +9 -0
- package/dist/{messages-BSHFypGE2.mjs → chunks/messages-Ti4ZdnqM2.mjs} +9 -0
- package/dist/chunks/messages-UOTfsDv3.cjs +1 -0
- package/dist/chunks/messages-WDBEGpNu.cjs +1 -0
- package/dist/chunks/messages-Zg6PFQ87.cjs +1 -0
- package/dist/chunks/messages-bdVhFVzt2.cjs +1 -0
- package/dist/chunks/messages-dnnjc_oR2.cjs +1 -0
- package/dist/{messages-BmWP4vpV2.mjs → chunks/messages-fI_5bRwV2.mjs} +9 -0
- package/dist/{messages-CIjSE2_O2.mjs → chunks/messages-g80Luov_2.mjs} +9 -0
- package/dist/chunks/messages-hlzAtKI5.cjs +1 -0
- package/dist/chunks/messages-kuh4lSUE2.cjs +1 -0
- package/dist/chunks/messages-m20Eebmt2.cjs +1 -0
- package/dist/chunks/messages-o1__8Rul.cjs +1 -0
- package/dist/chunks/messages-pBYvH88_.cjs +1 -0
- package/dist/chunks/{messages-CMRjQYxi2.mjs → messages-u1hpTCvK2.mjs} +9 -0
- package/dist/chunks/{messages-BoCUgrkI.mjs → messages-vq5ZvFTF.mjs} +9 -0
- package/dist/chunks/tools-DeTgjuIK.cjs +116 -0
- package/dist/chunks/{tools-CrrBwp7I.mjs → tools-omGeunql.mjs} +1818 -1686
- package/dist/full.cjs +1 -1
- package/dist/full.mjs +8 -8
- package/dist/locales.mjs +76 -67
- package/dist/{chunks/messages-DHdoaaFq2.mjs → messages-2hSOMnir2.mjs} +9 -0
- package/dist/{chunks/messages-DlcI-0Sy.mjs → messages-3VCxXECx.mjs} +9 -0
- package/dist/{messages-CxX23Jsk2.mjs → messages-8xGEIh_m2.mjs} +9 -0
- package/dist/{chunks/messages-DmErSGPk2.mjs → messages-B-QcHnuI2.mjs} +9 -0
- package/dist/{messages-BKCuCTFM.mjs → messages-B8zoeMf9.mjs} +9 -0
- package/dist/{chunks/messages-BmdkDNYv.mjs → messages-B9CF0GcE.mjs} +9 -0
- package/dist/{messages-1ufJbdRv2.mjs → messages-B9W0pRCr2.mjs} +9 -0
- package/dist/{messages-DQik3_xv2.mjs → messages-BFM2ljkf2.mjs} +9 -0
- package/dist/{chunks/messages-BNxTGhHu.mjs → messages-BLm4FSbz2.mjs} +9 -0
- package/dist/{chunks/messages-GHsufIGi2.mjs → messages-BLpeYPKv2.mjs} +9 -0
- package/dist/{messages-D_WzyzUt.mjs → messages-BM73sjxy.mjs} +9 -0
- package/dist/{messages-CX8egsiA2.mjs → messages-BOpqKi6Y2.mjs} +9 -0
- package/dist/{chunks/messages-eyGOcbhV.mjs → messages-BUGdUeTK.mjs} +9 -0
- package/dist/{chunks/messages-DhZwMl9x2.mjs → messages-BZm7MzSJ2.mjs} +9 -0
- package/dist/{messages-C31VIrlL.mjs → messages-BtBhP1sv.mjs} +9 -0
- package/dist/{messages-D1Fjr4OK2.mjs → messages-BthFu3bN2.mjs} +9 -0
- package/dist/{chunks/messages-COMdnGQV2.mjs → messages-BurjwjCQ2.mjs} +9 -0
- package/dist/{messages-DTkd9ND8.mjs → messages-ByIHkus-.mjs} +9 -0
- package/dist/{messages-C9GFRcVj.mjs → messages-ByVKFMH3.mjs} +9 -0
- package/dist/{chunks/messages-B5CFhyI8.mjs → messages-C6FDRqcf.mjs} +9 -0
- package/dist/{chunks/messages-OSIAf0Wk2.mjs → messages-C9dJ_N542.mjs} +9 -0
- package/dist/{messages-CRR1VRO6.mjs → messages-CCw8aJgW.mjs} +9 -0
- package/dist/{chunks/messages-AtUsRyWK2.mjs → messages-CO3NEwf22.mjs} +9 -0
- package/dist/{chunks/messages-CcboYTP8.mjs → messages-CPB2xkpC.mjs} +9 -0
- package/dist/{messages-CITYhXUz.mjs → messages-CPDsEORY.mjs} +9 -0
- package/dist/{chunks/messages-B2zrJyAc2.mjs → messages-CYyPOGy7.mjs} +9 -0
- package/dist/{chunks/messages-C03LZxma.mjs → messages-CZAODRjY.mjs} +9 -0
- package/dist/{messages-Duk7VVeY.mjs → messages-C_rns7Ku.mjs} +9 -0
- package/dist/{chunks/messages-CdWXgq_r.mjs → messages-CaUUIQvU.mjs} +9 -0
- package/dist/{messages-Cp0fjsey.mjs → messages-Cc-A7Vip.mjs} +9 -0
- package/dist/{chunks/messages-B7KbtBAE.mjs → messages-Ccf81JsG.mjs} +9 -0
- package/dist/{chunks/messages-rEsI_fAk.mjs → messages-CerTDuSC.mjs} +9 -0
- package/dist/{messages-BkTBwYet.mjs → messages-CgmDwRRE.mjs} +9 -0
- package/dist/{chunks/messages-DsyO86r3.mjs → messages-Cn3PWtLp.mjs} +9 -0
- package/dist/{chunks/messages-CWTFEPbA2.mjs → messages-Cu1rTEkB.mjs} +9 -0
- package/dist/{messages-oIa8wahx.mjs → messages-CxEHfUNH.mjs} +9 -0
- package/dist/{messages-C_mN4lx0.mjs → messages-D1B41i8X.mjs} +9 -0
- package/dist/{messages-NVepzgE3.mjs → messages-D6954zcl.mjs} +9 -0
- package/dist/{messages-C2TRJroV2.mjs → messages-DBwWssfL2.mjs} +9 -0
- package/dist/{messages-Cdgz3urh.mjs → messages-DFHRMYke.mjs} +9 -0
- package/dist/{messages-DXCyNanc2.mjs → messages-DJVrq0Xa2.mjs} +9 -0
- package/dist/{chunks/messages-OYoN_rp1.mjs → messages-DMJz28kt.mjs} +9 -0
- package/dist/{chunks/messages-B_U10evN2.mjs → messages-DOnOpXFJ2.mjs} +9 -0
- package/dist/{messages-5USazVPA2.mjs → messages-DR1Tf-Kj2.mjs} +9 -0
- package/dist/{chunks/messages-C4sIqArW2.mjs → messages-DSUXwuzH2.mjs} +9 -0
- package/dist/{chunks/messages-DGHTTk1S2.mjs → messages-DTNO7tw1.mjs} +9 -0
- package/dist/{messages-Ddz6eH0-2.mjs → messages-DWBtyom42.mjs} +9 -0
- package/dist/{messages-DKsyrVp5.mjs → messages-DZQALZIU.mjs} +9 -0
- package/dist/{chunks/messages-V8K7-1l2.mjs → messages-D_i86vbQ.mjs} +9 -0
- package/dist/{chunks/messages-BmiN0JGP2.mjs → messages-Da1VKvvf2.mjs} +9 -0
- package/dist/{messages-D5qgCWmB2.mjs → messages-Ddimgqvp2.mjs} +9 -0
- package/dist/{chunks/messages-MPF8o3EP.mjs → messages-DdmXBLUC.mjs} +9 -0
- package/dist/{messages-D4U4wkYM.mjs → messages-Devcsnrv.mjs} +9 -0
- package/dist/{chunks/messages-DiGsu5XN.mjs → messages-DhS-j4Hp.mjs} +9 -0
- package/dist/{messages-BGzpwNrz.mjs → messages-DrRVvVPI.mjs} +9 -0
- package/dist/{chunks/messages-Z9mDYT3w.mjs → messages-Ds4gQbVR2.mjs} +9 -0
- package/dist/{chunks/messages-vQ5kblO8.mjs → messages-DxkB7LL6.mjs} +9 -0
- package/dist/{chunks/messages-LTkIIrSe2.mjs → messages-GgHHrLBU2.mjs} +9 -0
- package/dist/{messages-CntTlSE22.mjs → messages-IycPaZe22.mjs} +9 -0
- package/dist/{messages-BtDz-sw92.mjs → messages-ST8f_nDx2.mjs} +9 -0
- package/dist/{messages-CgVEHCQ-.mjs → messages-SV8lf6F0.mjs} +9 -0
- package/dist/{messages-Bt4TLGth.mjs → messages-lVrQmsky.mjs} +9 -0
- package/dist/{messages-rpO1POP02.mjs → messages-lcoIGSX82.mjs} +9 -0
- package/dist/{chunks/messages-BuYnNUtU2.mjs → messages-mqRVfUUq.mjs} +9 -0
- package/dist/{chunks/messages-C24IC_eR.mjs → messages-qWFvoPY1.mjs} +9 -0
- package/dist/{messages-CacRpQpm.mjs → messages-yte1QPX5.mjs} +9 -0
- package/dist/{messages-DNlrcG5Z.mjs → messages-zyiti_A8.mjs} +9 -0
- package/dist/react.cjs +1 -1
- package/dist/react.mjs +1 -1
- package/dist/tools.cjs +1 -1
- package/dist/tools.mjs +3 -3
- package/package.json +1 -1
- package/src/components/blocks.ts +30 -7
- package/src/components/i18n/locales/am/messages.json +9 -0
- package/src/components/i18n/locales/ar/messages.json +9 -0
- package/src/components/i18n/locales/az/messages.json +9 -0
- package/src/components/i18n/locales/bg/messages.json +9 -0
- package/src/components/i18n/locales/bn/messages.json +9 -0
- package/src/components/i18n/locales/bs/messages.json +9 -0
- package/src/components/i18n/locales/cs/messages.json +9 -0
- package/src/components/i18n/locales/da/messages.json +9 -0
- package/src/components/i18n/locales/de/messages.json +9 -0
- package/src/components/i18n/locales/dv/messages.json +9 -0
- package/src/components/i18n/locales/el/messages.json +9 -0
- package/src/components/i18n/locales/en/messages.json +9 -0
- package/src/components/i18n/locales/es/messages.json +9 -0
- package/src/components/i18n/locales/et/messages.json +9 -0
- package/src/components/i18n/locales/fa/messages.json +9 -0
- package/src/components/i18n/locales/fi/messages.json +9 -0
- package/src/components/i18n/locales/fil/messages.json +9 -0
- package/src/components/i18n/locales/fr/messages.json +9 -0
- package/src/components/i18n/locales/gu/messages.json +9 -0
- package/src/components/i18n/locales/he/messages.json +9 -0
- package/src/components/i18n/locales/hi/messages.json +9 -0
- package/src/components/i18n/locales/hr/messages.json +9 -0
- package/src/components/i18n/locales/hu/messages.json +9 -0
- package/src/components/i18n/locales/hy/messages.json +9 -0
- package/src/components/i18n/locales/id/messages.json +9 -0
- package/src/components/i18n/locales/it/messages.json +9 -0
- package/src/components/i18n/locales/ja/messages.json +9 -0
- package/src/components/i18n/locales/ka/messages.json +9 -0
- package/src/components/i18n/locales/km/messages.json +9 -0
- package/src/components/i18n/locales/kn/messages.json +9 -0
- package/src/components/i18n/locales/ko/messages.json +9 -0
- package/src/components/i18n/locales/ku/messages.json +9 -0
- package/src/components/i18n/locales/lo/messages.json +9 -0
- package/src/components/i18n/locales/lt/messages.json +9 -0
- package/src/components/i18n/locales/lv/messages.json +9 -0
- package/src/components/i18n/locales/mk/messages.json +9 -0
- package/src/components/i18n/locales/ml/messages.json +9 -0
- package/src/components/i18n/locales/mn/messages.json +9 -0
- package/src/components/i18n/locales/mr/messages.json +9 -0
- package/src/components/i18n/locales/ms/messages.json +9 -0
- package/src/components/i18n/locales/my/messages.json +9 -0
- package/src/components/i18n/locales/ne/messages.json +9 -0
- package/src/components/i18n/locales/nl/messages.json +9 -0
- package/src/components/i18n/locales/no/messages.json +9 -0
- package/src/components/i18n/locales/pa/messages.json +9 -0
- package/src/components/i18n/locales/pl/messages.json +9 -0
- package/src/components/i18n/locales/ps/messages.json +9 -0
- package/src/components/i18n/locales/pt/messages.json +9 -0
- package/src/components/i18n/locales/ro/messages.json +9 -0
- package/src/components/i18n/locales/ru/messages.json +9 -0
- package/src/components/i18n/locales/sd/messages.json +9 -0
- package/src/components/i18n/locales/si/messages.json +9 -0
- package/src/components/i18n/locales/sk/messages.json +9 -0
- package/src/components/i18n/locales/sl/messages.json +9 -0
- package/src/components/i18n/locales/sq/messages.json +9 -0
- package/src/components/i18n/locales/sr/messages.json +9 -0
- package/src/components/i18n/locales/sv/messages.json +9 -0
- package/src/components/i18n/locales/sw/messages.json +9 -0
- package/src/components/i18n/locales/ta/messages.json +9 -0
- package/src/components/i18n/locales/te/messages.json +9 -0
- package/src/components/i18n/locales/th/messages.json +9 -0
- package/src/components/i18n/locales/tr/messages.json +9 -0
- package/src/components/i18n/locales/ug/messages.json +9 -0
- package/src/components/i18n/locales/uk/messages.json +9 -0
- package/src/components/i18n/locales/ur/messages.json +9 -0
- package/src/components/i18n/locales/vi/messages.json +9 -0
- package/src/components/i18n/locales/yi/messages.json +9 -0
- package/src/components/i18n/locales/zh/messages.json +9 -0
- package/src/components/icons/index.ts +24 -0
- package/src/components/modules/blockEvents/composers/keyboardNavigation.ts +67 -6
- package/src/components/modules/blockManager/hierarchy.ts +150 -8
- package/src/components/modules/blockManager/operations.ts +207 -8
- package/src/components/modules/blockManager/yjs-sync.ts +36 -1
- package/src/components/modules/caret.ts +205 -31
- package/src/components/modules/drag/DragController.ts +219 -2
- package/src/components/modules/drag/a11y/DragA11y.ts +9 -1
- package/src/components/modules/drag/state/DragStateMachine.ts +1 -1
- package/src/components/modules/drag/target/DropTargetDetector.ts +513 -3
- package/src/components/modules/drag/utils/drag.constants.ts +9 -0
- package/src/components/modules/toolbar/blockSettings.ts +75 -5
- package/src/components/modules/toolbar/index.ts +12 -1
- package/src/components/modules/ui.ts +9 -0
- package/src/components/modules/uiControllers/controllers/blockHover.ts +24 -2
- package/src/components/modules/uiControllers/controllers/selection.ts +50 -0
- package/src/components/utils/blocks.ts +21 -7
- package/src/styles/colors.css +3 -0
- package/src/styles/columns.css +105 -0
- package/src/styles/main.css +48 -3
- package/src/styles/popover-animation.css +8 -0
- package/src/tools/column/index.ts +189 -0
- package/src/tools/column/types.ts +26 -0
- package/src/tools/column-drop.ts +273 -0
- package/src/tools/column-list/index.ts +142 -0
- package/src/tools/column-list/types.ts +17 -0
- package/src/tools/columns-shared.ts +343 -0
- package/src/tools/divider/index.ts +1 -0
- package/src/tools/index.ts +4 -0
- package/src/tools/nested-blocks.ts +23 -2
- package/src/tools/table/table-restrictions.ts +1 -1
- package/types/tools/column-list.d.ts +15 -0
- package/types/tools/column.d.ts +13 -0
- package/types/tools-entry.d.ts +8 -0
- package/dist/chunks/blok-C7mseAhu.cjs +0 -17
- package/dist/chunks/constants-BZ9pK9tm.cjs +0 -457
- package/dist/chunks/lightweight-i18n-Bbl1cNYK.cjs +0 -1
- package/dist/chunks/messages-1qYt6EhZ2.cjs +0 -1
- package/dist/chunks/messages-2fxvN3Nb.cjs +0 -1
- package/dist/chunks/messages-B1Vs2HmR.cjs +0 -1
- package/dist/chunks/messages-B780gS332.cjs +0 -1
- package/dist/chunks/messages-B7T5Notn.cjs +0 -1
- package/dist/chunks/messages-BE9aZQ1Q.cjs +0 -1
- package/dist/chunks/messages-BIQpTYfm.cjs +0 -1
- package/dist/chunks/messages-BIRvUJ0t.cjs +0 -1
- package/dist/chunks/messages-BIodfkjv.cjs +0 -1
- package/dist/chunks/messages-BL-zBcuM.cjs +0 -1
- package/dist/chunks/messages-BQr0zpmu2.cjs +0 -1
- package/dist/chunks/messages-BTHi6rVW2.cjs +0 -1
- package/dist/chunks/messages-BZOAdcmO2.cjs +0 -1
- package/dist/chunks/messages-BbsGeVs_2.cjs +0 -1
- package/dist/chunks/messages-Bc1NYJVS.cjs +0 -1
- package/dist/chunks/messages-BdORNG8X.cjs +0 -1
- package/dist/chunks/messages-Bg2kheTv.cjs +0 -1
- package/dist/chunks/messages-Bj1eQtQw.cjs +0 -1
- package/dist/chunks/messages-BkJJCHNK.cjs +0 -1
- package/dist/chunks/messages-BkdGQfIX.cjs +0 -1
- package/dist/chunks/messages-BkgsB-cj2.cjs +0 -1
- package/dist/chunks/messages-Bn0vGFEP.cjs +0 -1
- package/dist/chunks/messages-BoIUXwWe.cjs +0 -1
- package/dist/chunks/messages-BpDEh8rW.cjs +0 -1
- package/dist/chunks/messages-BwknPZJ8.cjs +0 -1
- package/dist/chunks/messages-ByicRCge2.cjs +0 -1
- package/dist/chunks/messages-C2oBmyTn.cjs +0 -1
- package/dist/chunks/messages-C9wBMmxr2.cjs +0 -1
- package/dist/chunks/messages-CDK5-8vW.cjs +0 -1
- package/dist/chunks/messages-CKHbPcfh.cjs +0 -1
- package/dist/chunks/messages-CNFfwTfw.cjs +0 -1
- package/dist/chunks/messages-CNiuofck2.cjs +0 -1
- package/dist/chunks/messages-CWszAGkF.cjs +0 -1
- package/dist/chunks/messages-CWzQNagc2.cjs +0 -1
- package/dist/chunks/messages-CYf1gv722.cjs +0 -1
- package/dist/chunks/messages-CfcCwbQo.cjs +0 -1
- package/dist/chunks/messages-CkvqOnAR.cjs +0 -1
- package/dist/chunks/messages-Cnrug7nz2.cjs +0 -1
- package/dist/chunks/messages-Cr51zCHy.cjs +0 -1
- package/dist/chunks/messages-CsLvvl2F2.cjs +0 -1
- package/dist/chunks/messages-CuO-Rx4g.cjs +0 -1
- package/dist/chunks/messages-Cv4I3k1W2.cjs +0 -1
- package/dist/chunks/messages-CwHRv6g8.cjs +0 -1
- package/dist/chunks/messages-CzXnHfGb2.cjs +0 -1
- package/dist/chunks/messages-D2QxLx1a.cjs +0 -1
- package/dist/chunks/messages-D4LUPpX_.cjs +0 -1
- package/dist/chunks/messages-DJFL-bxd2.cjs +0 -1
- package/dist/chunks/messages-DLEeNpMi2.cjs +0 -1
- package/dist/chunks/messages-DTNU_cq0.cjs +0 -1
- package/dist/chunks/messages-DVKsYqpJ.cjs +0 -1
- package/dist/chunks/messages-DXlfz-nC.cjs +0 -1
- package/dist/chunks/messages-DbA_Zja3.cjs +0 -1
- package/dist/chunks/messages-Dc2TTEx_2.cjs +0 -1
- package/dist/chunks/messages-DeDMMmRC.cjs +0 -1
- package/dist/chunks/messages-DlQNXqzr.cjs +0 -1
- package/dist/chunks/messages-DqMqZLcn.cjs +0 -1
- package/dist/chunks/messages-DqqDuEE22.cjs +0 -1
- package/dist/chunks/messages-DzppdmWe.cjs +0 -1
- package/dist/chunks/messages-HzLF-BQL2.cjs +0 -1
- package/dist/chunks/messages-Jb9n97oP2.cjs +0 -1
- package/dist/chunks/messages-K_vSdSoF2.cjs +0 -1
- package/dist/chunks/messages-Nh7wrRdm.cjs +0 -1
- package/dist/chunks/messages-QHS-Ydg_.cjs +0 -1
- package/dist/chunks/messages-SpiG5vT-2.cjs +0 -1
- package/dist/chunks/messages-XFaJzdhP2.cjs +0 -1
- package/dist/chunks/messages-y03BGg692.cjs +0 -1
- package/dist/chunks/tools-Duq42I9m.cjs +0 -116
|
@@ -310,6 +310,31 @@ export class BlockOperations {
|
|
|
310
310
|
this.transferParentLinkToNewBlock(replacedBlockId, block, replacedParentId);
|
|
311
311
|
}
|
|
312
312
|
|
|
313
|
+
/**
|
|
314
|
+
* Non-replace insert positioned directly after a block that lives inside a
|
|
315
|
+
* `column` must inherit that column as its parent. The block-settings
|
|
316
|
+
* "Duplicate" action inserts the copy at the source block's index + 1 with
|
|
317
|
+
* no follow-up reparent; without this, the copy keeps a null parentId and
|
|
318
|
+
* the Saver emits it as a root sibling — orphaned out of the column even
|
|
319
|
+
* though the store already mounted its holder inside the column DOM.
|
|
320
|
+
*
|
|
321
|
+
* Scoped to a column predecessor (not every parented predecessor) so that
|
|
322
|
+
* internal callers which seed/reparent explicitly — split, paste,
|
|
323
|
+
* insertInsideParent, column seeding (whose predecessor is the column_list,
|
|
324
|
+
* not a column) — are untouched and never see a transient wrong-parent
|
|
325
|
+
* state. `forceTopLevel` callers opt out entirely.
|
|
326
|
+
*/
|
|
327
|
+
if (!replace && !forceTopLevel && block.parentId === null) {
|
|
328
|
+
const predecessor = this.repository.getBlockByIndex(targetIndex - 1);
|
|
329
|
+
const predecessorParent = predecessor?.parentId !== null && predecessor?.parentId !== undefined
|
|
330
|
+
? this.repository.getBlockById(predecessor.parentId)
|
|
331
|
+
: undefined;
|
|
332
|
+
|
|
333
|
+
if (predecessorParent !== undefined && predecessorParent.name === 'column') {
|
|
334
|
+
this.hierarchy.setBlockParent(block, predecessorParent.id);
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
|
|
313
338
|
/**
|
|
314
339
|
* Update the raw currentBlockIndex BEFORE firing the mutation event so
|
|
315
340
|
* that listeners (e.g. TableCellBlocks.handleBlockMutation) see the
|
|
@@ -434,19 +459,57 @@ export class BlockOperations {
|
|
|
434
459
|
parentBlock.contentIds = parentBlock.contentIds.filter(id => id !== block.id);
|
|
435
460
|
}
|
|
436
461
|
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
462
|
+
/**
|
|
463
|
+
* Removing a columns wrapper (`column` or `column_list`) drops its ENTIRE
|
|
464
|
+
* descendant subtree rather than promoting children to root.
|
|
465
|
+
*
|
|
466
|
+
* A column / column_list is pure layout: its children only make sense
|
|
467
|
+
* inside it. Promoting them (the generic toggle/callout behaviour below)
|
|
468
|
+
* leaks the deleted column's content out to the document root and — for a
|
|
469
|
+
* nested column_list — strands structurally-invalid `column` blocks at
|
|
470
|
+
* root (a column may only live inside a column_list). The flat blocks
|
|
471
|
+
* array is the Saver's source of truth, so descendants left in it
|
|
472
|
+
* resurface in the output even though their holders were detached when the
|
|
473
|
+
* wrapper's holder was removed. Splice the whole subtree out so nothing
|
|
474
|
+
* survives orphaned.
|
|
475
|
+
*
|
|
476
|
+
* Other container tools (toggle, callout, toggleable header) keep the
|
|
477
|
+
* promote-to-root behaviour: deleting the container preserves its body.
|
|
478
|
+
*/
|
|
479
|
+
const isColumnsWrapper = block.name === 'column' || block.name === 'column_list';
|
|
480
|
+
const descendants = isColumnsWrapper ? this.collectDescendants(block) : [];
|
|
481
|
+
|
|
482
|
+
if (isColumnsWrapper) {
|
|
483
|
+
// Detach every block in the subtree first so a nested column /
|
|
484
|
+
// column_list descendant's removed() hook finds no children and its
|
|
485
|
+
// auto-unwrap is a no-op while we tear the subtree down.
|
|
486
|
+
for (const descendant of descendants) {
|
|
487
|
+
descendant.parentId = null;
|
|
488
|
+
descendant.contentIds = [];
|
|
489
|
+
}
|
|
490
|
+
} else {
|
|
491
|
+
// Promote children to root level when a (non-columns) parent block is removed
|
|
492
|
+
this.promoteChildrenToRoot(block, block.contentIds);
|
|
493
|
+
}
|
|
440
494
|
|
|
441
|
-
|
|
495
|
+
blocksStore.remove(index);
|
|
496
|
+
|
|
497
|
+
// Splice the columns subtree's descendants out of the flat array + Yjs.
|
|
498
|
+
// The wrapper's holder.remove() above already detached their DOM; this
|
|
499
|
+
// removes their model entries so the Saver never re-emits them.
|
|
500
|
+
for (const descendant of descendants) {
|
|
501
|
+
const descendantIndex = this.repository.getBlockIndex(descendant);
|
|
502
|
+
|
|
503
|
+
if (descendantIndex < 0) {
|
|
442
504
|
continue;
|
|
443
505
|
}
|
|
444
506
|
|
|
445
|
-
|
|
446
|
-
childBlock.holder.classList.remove('hidden');
|
|
447
|
-
}
|
|
507
|
+
blocksStore.remove(descendantIndex);
|
|
448
508
|
|
|
449
|
-
|
|
509
|
+
if (!skipYjsSync) {
|
|
510
|
+
this.dependencies.YjsManager.removeBlock(descendant.id);
|
|
511
|
+
}
|
|
512
|
+
}
|
|
450
513
|
|
|
451
514
|
/**
|
|
452
515
|
* Force call of didMutated event on Block removal
|
|
@@ -494,6 +557,27 @@ export class BlockOperations {
|
|
|
494
557
|
this.currentBlockIndexValue = 0;
|
|
495
558
|
}
|
|
496
559
|
|
|
560
|
+
/**
|
|
561
|
+
* A `column` is pure layout — it exists only to host child blocks. When
|
|
562
|
+
* the block just removed was its LAST child, the now-empty column has
|
|
563
|
+
* nothing to lay out, so remove it too. Deleting the column fires its
|
|
564
|
+
* removed() hook, which unwraps the column_list when this drops the list
|
|
565
|
+
* to a single column (see Column.removed -> unwrapColumnListIfCollapsed).
|
|
566
|
+
*
|
|
567
|
+
* `parentBlock.contentIds` was already pruned of the removed child above,
|
|
568
|
+
* so an empty list means a childless column. Fire-and-forget, mirroring
|
|
569
|
+
* the async unwrap it may trigger; the recursive remove re-resolves the
|
|
570
|
+
* column's index, so a shifted flat array never targets the wrong block.
|
|
571
|
+
*/
|
|
572
|
+
if (
|
|
573
|
+
parentBlock !== undefined &&
|
|
574
|
+
parentBlock.name === 'column' &&
|
|
575
|
+
parentBlock.contentIds.length === 0 &&
|
|
576
|
+
this.repository.getBlockIndex(parentBlock) >= 0
|
|
577
|
+
) {
|
|
578
|
+
void this.removeBlock(parentBlock, addLastBlock, skipYjsSync, blocksStore);
|
|
579
|
+
}
|
|
580
|
+
|
|
497
581
|
this.assertHierarchyInvariantInDev('removeBlock');
|
|
498
582
|
|
|
499
583
|
resolve();
|
|
@@ -615,6 +699,83 @@ export class BlockOperations {
|
|
|
615
699
|
* @param childIds - Array of child block IDs to reparent
|
|
616
700
|
* @param newParentId - New parent block ID
|
|
617
701
|
*/
|
|
702
|
+
/**
|
|
703
|
+
* Depth-first collection of every descendant block beneath `block`,
|
|
704
|
+
* resolved through the live `contentIds` links. Cycle-safe via a visited
|
|
705
|
+
* set. Used to drop a whole columns subtree (column / column_list) on
|
|
706
|
+
* removal so no descendant is left orphaned in the flat blocks array.
|
|
707
|
+
* @param block - root of the subtree (excluded from the result)
|
|
708
|
+
*/
|
|
709
|
+
private collectDescendants(block: Block): Block[] {
|
|
710
|
+
const result: Block[] = [];
|
|
711
|
+
const visited = new Set<string>([block.id]);
|
|
712
|
+
const stack = [...block.contentIds];
|
|
713
|
+
|
|
714
|
+
while (stack.length > 0) {
|
|
715
|
+
const childId = stack.pop();
|
|
716
|
+
|
|
717
|
+
if (childId === undefined || visited.has(childId)) {
|
|
718
|
+
continue;
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
visited.add(childId);
|
|
722
|
+
|
|
723
|
+
const childBlock = this.repository.getBlockById(childId);
|
|
724
|
+
|
|
725
|
+
if (childBlock === undefined) {
|
|
726
|
+
continue;
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
result.push(childBlock);
|
|
730
|
+
stack.push(...childBlock.contentIds);
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
return result;
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
/**
|
|
737
|
+
* Promote the given child blocks to root level (parentId = null) and unhide
|
|
738
|
+
* their holders. Used when a non-columns container (toggle/callout/header) is
|
|
739
|
+
* removed so its body survives at root.
|
|
740
|
+
*
|
|
741
|
+
* Lift each surviving child's holder out of the container's
|
|
742
|
+
* `[data-blok-toggle-children]` container to immediately before the
|
|
743
|
+
* container's own holder, BEFORE the caller's `blocksStore.remove()` runs
|
|
744
|
+
* `container.holder.remove()` — which destroys EVERY descendant holder. Left
|
|
745
|
+
* nested, a promoted child's holder would be wiped, leaving the model saying
|
|
746
|
+
* "at root" while the live holder no longer exists.
|
|
747
|
+
*
|
|
748
|
+
* The lift is SCOPED to children whose IMMEDIATE container is a
|
|
749
|
+
* toggle-children container — the promote-and-preserve tools
|
|
750
|
+
* (toggle/callout/toggleable-header) all mount their direct children there.
|
|
751
|
+
* Self-managing containers like table/database keep their children in their
|
|
752
|
+
* own cell containers and tear that subtree down themselves, so their holders
|
|
753
|
+
* must stay nested and are deliberately not lifted. The match must be on the
|
|
754
|
+
* IMMEDIATE container, not any ancestor: a table cell block sitting inside a
|
|
755
|
+
* toggle has an ANCESTOR toggle-children container, but its immediate
|
|
756
|
+
* container is the cell — lifting it would leak the table's cells to root.
|
|
757
|
+
* @param container - the block being removed
|
|
758
|
+
* @param childIds - ids of the removed container's direct children
|
|
759
|
+
*/
|
|
760
|
+
private promoteChildrenToRoot(container: Block, childIds: string[]): void {
|
|
761
|
+
const containerInDom = container.holder.parentElement !== null;
|
|
762
|
+
|
|
763
|
+
for (const childId of childIds) {
|
|
764
|
+
const childBlock = this.repository.getBlockById(childId);
|
|
765
|
+
|
|
766
|
+
if (childBlock === undefined) {
|
|
767
|
+
continue;
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
childBlock.parentId = null;
|
|
771
|
+
childBlock.holder.classList.remove('hidden');
|
|
772
|
+
|
|
773
|
+
if (containerInDom && childBlock.holder.parentElement?.matches('[data-blok-toggle-children]') === true) {
|
|
774
|
+
container.holder.before(childBlock.holder);
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
|
|
618
779
|
private reparentChildren(childIds: string[], newParentId: string): void {
|
|
619
780
|
for (const childId of childIds) {
|
|
620
781
|
const childBlock = this.repository.getBlockById(childId);
|
|
@@ -707,6 +868,8 @@ export class BlockOperations {
|
|
|
707
868
|
*/
|
|
708
869
|
const newToolCanHostChildren = newTool === 'toggle' ||
|
|
709
870
|
newTool === 'callout' ||
|
|
871
|
+
newTool === 'column_list' ||
|
|
872
|
+
newTool === 'column' ||
|
|
710
873
|
(newTool === 'header' && (data as { isToggleable?: boolean }).isToggleable === true);
|
|
711
874
|
|
|
712
875
|
if (oldContentIds.length > 0 && !newToolCanHostChildren) {
|
|
@@ -791,6 +954,42 @@ export class BlockOperations {
|
|
|
791
954
|
*/
|
|
792
955
|
const destinationParentId = neighborBlock !== undefined ? neighborBlock.parentId : null;
|
|
793
956
|
|
|
957
|
+
/**
|
|
958
|
+
* Column-boundary clamp (keyboard / public-api move only).
|
|
959
|
+
*
|
|
960
|
+
* A column's blocks sit contiguously in the flat array, immediately
|
|
961
|
+
* before the next sibling column's blocks. A naive flat move-down on the
|
|
962
|
+
* LAST block of a column (or move-up on the FIRST) lands it next to a
|
|
963
|
+
* block in the ADJACENT column; the cross-container auto-heal below would
|
|
964
|
+
* then re-parent it into that sibling column — ejecting it out of its own
|
|
965
|
+
* column. Block-settings "move down/up" and the keyboard shortcuts must
|
|
966
|
+
* reorder WITHIN the column only, never cross the column edge.
|
|
967
|
+
*
|
|
968
|
+
* Clamp to a no-op when: the moving block lives in a `column`, and the
|
|
969
|
+
* destination neighbour belongs to a DIFFERENT parent (the move would
|
|
970
|
+
* cross the column boundary). Within-column reorders keep the same parent,
|
|
971
|
+
* so they are never clamped.
|
|
972
|
+
*
|
|
973
|
+
* Skipped while a Yjs move group is open (the drag path): DragController
|
|
974
|
+
* legitimately drags blocks across columns and assigns the parent itself.
|
|
975
|
+
*/
|
|
976
|
+
if (
|
|
977
|
+
movingBlock !== undefined
|
|
978
|
+
&& !this.dependencies.YjsManager.isInMoveGroup
|
|
979
|
+
) {
|
|
980
|
+
const movingParent = movingBlock.parentId !== null
|
|
981
|
+
? this.repository.getBlockById(movingBlock.parentId)
|
|
982
|
+
: undefined;
|
|
983
|
+
|
|
984
|
+
if (
|
|
985
|
+
movingParent !== undefined
|
|
986
|
+
&& movingParent.name === 'column'
|
|
987
|
+
&& destinationParentId !== movingBlock.parentId
|
|
988
|
+
) {
|
|
989
|
+
return;
|
|
990
|
+
}
|
|
991
|
+
}
|
|
992
|
+
|
|
794
993
|
// Suppress stopCapturing to keep DOM + Yjs move as single undo entry
|
|
795
994
|
this.suppressStopCapturing = true;
|
|
796
995
|
try {
|
|
@@ -596,9 +596,30 @@ export class BlockYjsSync {
|
|
|
596
596
|
|
|
597
597
|
// Promote children to root level before removing the parent block.
|
|
598
598
|
// This matches removeBlock() in operations.ts — without this,
|
|
599
|
-
// children whose DOM is inside the
|
|
599
|
+
// children whose DOM is inside the parent's container are destroyed
|
|
600
600
|
// along with the parent, and children in the blocks array become
|
|
601
601
|
// orphaned with a stale parentId pointing to a deleted block.
|
|
602
|
+
//
|
|
603
|
+
// Beyond the model promotion (parentId = null), the child's DOM holder
|
|
604
|
+
// must be LIFTED out of the parent's subtree before blocksStore.remove()
|
|
605
|
+
// calls parent.holder.remove() — that destroys EVERY descendant holder,
|
|
606
|
+
// including children that survive at root (e.g. when undo tears down a
|
|
607
|
+
// column_list and its columns, the leaf holders nested inside the doomed
|
|
608
|
+
// column subtree would be wiped even though the model promotes them to
|
|
609
|
+
// root, leaving model "at root" but the live holder gone). Yjs deletes a
|
|
610
|
+
// nested structure parent-first, so lifting each direct child one level —
|
|
611
|
+
// to immediately before the parent's own holder — walks every surviving
|
|
612
|
+
// descendant out to the document root across the cascade.
|
|
613
|
+
//
|
|
614
|
+
// Scope the lift to children whose IMMEDIATE container is a preserve-body
|
|
615
|
+
// container: a toggle-children container (toggle/callout/header) or a
|
|
616
|
+
// columns structure (a column inside the columns row, or a leaf inside a
|
|
617
|
+
// column's own container). Self-managing containers (table/database) keep
|
|
618
|
+
// their children in their own cell containers and tear that subtree down
|
|
619
|
+
// themselves — their cells must stay nested, so they are not lifted (a
|
|
620
|
+
// table deleted inside a column would otherwise leak its cells to root).
|
|
621
|
+
const parentHolderInDom = block.holder.parentElement !== null;
|
|
622
|
+
|
|
602
623
|
for (const childId of block.contentIds) {
|
|
603
624
|
const childBlock = this.repository.getBlockById(childId);
|
|
604
625
|
|
|
@@ -608,6 +629,20 @@ export class BlockYjsSync {
|
|
|
608
629
|
|
|
609
630
|
childBlock.parentId = null;
|
|
610
631
|
childBlock.holder.classList.remove('hidden');
|
|
632
|
+
|
|
633
|
+
// Every branch keys on the IMMEDIATE container, never an ancestor: a
|
|
634
|
+
// table/database cell sitting inside a toggle or column has a
|
|
635
|
+
// preserve-body ANCESTOR, but its immediate container is the cell —
|
|
636
|
+
// lifting it would leak the self-managing container's cells to root.
|
|
637
|
+
const immediateContainer = childBlock.holder.parentElement;
|
|
638
|
+
const isPreserveBodyChild =
|
|
639
|
+
immediateContainer?.matches('[data-blok-toggle-children]') === true ||
|
|
640
|
+
immediateContainer?.matches('[data-blok-columns]') === true ||
|
|
641
|
+
immediateContainer?.parentElement?.matches('[data-blok-column]') === true;
|
|
642
|
+
|
|
643
|
+
if (parentHolderInDom && isPreserveBodyChild && block.holder.contains(childBlock.holder)) {
|
|
644
|
+
block.holder.before(childBlock.holder);
|
|
645
|
+
}
|
|
611
646
|
}
|
|
612
647
|
|
|
613
648
|
// Remove from DOM
|
|
@@ -523,11 +523,48 @@ export class Caret extends Module {
|
|
|
523
523
|
return true;
|
|
524
524
|
}
|
|
525
525
|
|
|
526
|
-
|
|
527
|
-
|
|
526
|
+
/**
|
|
527
|
+
* Horizontal navigation across a container boundary must NOT slide into a
|
|
528
|
+
* sibling cell/column. When the next flat-array block belongs to the same
|
|
529
|
+
* outermost container (e.g. a sibling column of the same column_list) but a
|
|
530
|
+
* DIFFERENT DOM container than the current block, resolve to the block after
|
|
531
|
+
* the whole container instead. Sibling blocks stacked in the SAME column
|
|
532
|
+
* (same DOM container) keep their normal in-place move.
|
|
533
|
+
*/
|
|
534
|
+
const resolveNextAcrossContainer = (): Block | null => {
|
|
535
|
+
if (nextBlock === null || currentBlock.parentId === null) {
|
|
536
|
+
return nextBlock;
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
const sameDomContainer = currentBlock.holder.parentElement !== null &&
|
|
540
|
+
currentBlock.holder.parentElement === nextBlock.holder.parentElement;
|
|
541
|
+
|
|
542
|
+
if (sameDomContainer) {
|
|
543
|
+
return nextBlock;
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
const containerId = this.resolveContainerToExit(currentBlock.parentId);
|
|
547
|
+
|
|
548
|
+
if (!this.shouldExitContainer(currentBlock, nextBlock, containerId)) {
|
|
528
549
|
return nextBlock;
|
|
529
550
|
}
|
|
530
551
|
|
|
552
|
+
/**
|
|
553
|
+
* Exiting a column boundary horizontally must escape the WHOLE column_list
|
|
554
|
+
* to the block after it — never slide sideways into the adjacent sibling
|
|
555
|
+
* column. (Sibling blocks stacked in the same column took the same-DOM-
|
|
556
|
+
* container fast path above and never reach here.)
|
|
557
|
+
*/
|
|
558
|
+
return this.findFirstBlockAfterParent(containerId);
|
|
559
|
+
};
|
|
560
|
+
|
|
561
|
+
const getBlockToNavigate = (): Block | null => {
|
|
562
|
+
const resolvedNextBlock = resolveNextAcrossContainer();
|
|
563
|
+
|
|
564
|
+
if (resolvedNextBlock !== null) {
|
|
565
|
+
return resolvedNextBlock;
|
|
566
|
+
}
|
|
567
|
+
|
|
531
568
|
/**
|
|
532
569
|
* This code allows to exit from the last non-initial tool:
|
|
533
570
|
* https://github.com/codex-team/editor.js/issues/1103
|
|
@@ -591,8 +628,45 @@ export class Caret extends Module {
|
|
|
591
628
|
return true;
|
|
592
629
|
}
|
|
593
630
|
|
|
594
|
-
|
|
595
|
-
|
|
631
|
+
/**
|
|
632
|
+
* Horizontal navigation across a container boundary must NOT slide into a
|
|
633
|
+
* sibling cell/column. When the previous flat-array block belongs to the
|
|
634
|
+
* same outermost container (e.g. a sibling column of the same column_list)
|
|
635
|
+
* but a DIFFERENT DOM container, resolve to the block before the whole
|
|
636
|
+
* container instead. Sibling blocks stacked in the SAME column keep their
|
|
637
|
+
* normal in-place move.
|
|
638
|
+
*/
|
|
639
|
+
const resolvePreviousAcrossContainer = (): Block | null => {
|
|
640
|
+
if (previousBlock === null || currentBlock.parentId === null) {
|
|
641
|
+
return previousBlock;
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
const sameDomContainer = currentBlock.holder.parentElement !== null &&
|
|
645
|
+
currentBlock.holder.parentElement === previousBlock.holder.parentElement;
|
|
646
|
+
|
|
647
|
+
if (sameDomContainer) {
|
|
648
|
+
return previousBlock;
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
const containerId = this.resolveContainerToExit(currentBlock.parentId);
|
|
652
|
+
|
|
653
|
+
if (!this.shouldExitContainer(currentBlock, previousBlock, containerId)) {
|
|
654
|
+
return previousBlock;
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
/**
|
|
658
|
+
* Exiting a column boundary horizontally must escape the WHOLE column_list
|
|
659
|
+
* to the block before it — never slide sideways into the adjacent sibling
|
|
660
|
+
* column. (Sibling blocks stacked in the same column took the same-DOM-
|
|
661
|
+
* container fast path above and never reach here.)
|
|
662
|
+
*/
|
|
663
|
+
return this.findFirstBlockBeforeParent(containerId);
|
|
664
|
+
};
|
|
665
|
+
|
|
666
|
+
const blockToNavigate = resolvePreviousAcrossContainer();
|
|
667
|
+
|
|
668
|
+
if (blockToNavigate !== null && navigationAllowed) {
|
|
669
|
+
this.setToBlock(blockToNavigate, this.positions.END);
|
|
596
670
|
|
|
597
671
|
return true;
|
|
598
672
|
}
|
|
@@ -694,27 +768,26 @@ export class Caret extends Module {
|
|
|
694
768
|
}
|
|
695
769
|
|
|
696
770
|
/**
|
|
697
|
-
* If current block is inside a
|
|
698
|
-
* exit the
|
|
699
|
-
* 1. nextBlock is in a different cell of the same
|
|
700
|
-
*
|
|
771
|
+
* If current block is inside a container (has parentId), check if we should
|
|
772
|
+
* exit the whole container. This handles:
|
|
773
|
+
* 1. nextBlock is in a different cell/column of the same container → skip to
|
|
774
|
+
* the block after the container (never slide into a sibling column)
|
|
775
|
+
* 2. nextBlock is null (last block in flat list) → container is at the end
|
|
701
776
|
*/
|
|
702
|
-
const
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
nextBlock.id === currentBlock.parentId
|
|
706
|
-
);
|
|
777
|
+
const containerToExit = currentBlock.parentId !== null
|
|
778
|
+
? this.resolveContainerToExit(currentBlock.parentId)
|
|
779
|
+
: null;
|
|
707
780
|
|
|
708
|
-
if (
|
|
709
|
-
const
|
|
781
|
+
if (containerToExit !== null && this.shouldExitContainer(currentBlock, nextBlock, containerToExit)) {
|
|
782
|
+
const blockAfterContainer = this.findFirstBlockAfterParent(containerToExit);
|
|
710
783
|
|
|
711
|
-
if (
|
|
712
|
-
this.setToBlockAtXPosition(
|
|
784
|
+
if (blockAfterContainer !== null) {
|
|
785
|
+
this.setToBlockAtXPosition(blockAfterContainer, caretX, true);
|
|
713
786
|
|
|
714
787
|
return true;
|
|
715
788
|
}
|
|
716
789
|
|
|
717
|
-
// No block after
|
|
790
|
+
// No block after the container — create one
|
|
718
791
|
const newBlock = BlockManager.insertAtEnd();
|
|
719
792
|
|
|
720
793
|
this.setToBlock(newBlock, this.positions.START);
|
|
@@ -820,18 +893,17 @@ export class Caret extends Module {
|
|
|
820
893
|
|
|
821
894
|
/**
|
|
822
895
|
* If current block is inside a container, the "previous block" in the flat
|
|
823
|
-
* array may belong to a DIFFERENT cell of the SAME
|
|
824
|
-
*
|
|
825
|
-
* Notion-style navigation should treat as exiting
|
|
896
|
+
* array may belong to a DIFFERENT cell/column of the SAME container (e.g., a
|
|
897
|
+
* sibling column of the same column_list). Navigating to it would jump
|
|
898
|
+
* across the layout, which Notion-style navigation should treat as exiting
|
|
899
|
+
* the WHOLE container UP — past the column_list, not into a sibling column.
|
|
826
900
|
*/
|
|
827
|
-
const
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
previousBlock.id === currentBlock.parentId
|
|
831
|
-
);
|
|
901
|
+
const containerToExit = currentBlock.parentId !== null
|
|
902
|
+
? this.resolveContainerToExit(currentBlock.parentId)
|
|
903
|
+
: null;
|
|
832
904
|
|
|
833
|
-
if (
|
|
834
|
-
const blockBeforeContainer = this.findFirstBlockBeforeParent(
|
|
905
|
+
if (containerToExit !== null && this.shouldExitContainer(currentBlock, previousBlock, containerToExit)) {
|
|
906
|
+
const blockBeforeContainer = this.findFirstBlockBeforeParent(containerToExit);
|
|
835
907
|
|
|
836
908
|
if (blockBeforeContainer !== null) {
|
|
837
909
|
this.setToBlockAtXPosition(blockBeforeContainer, caretX, false);
|
|
@@ -872,8 +944,14 @@ export class Caret extends Module {
|
|
|
872
944
|
}
|
|
873
945
|
|
|
874
946
|
/**
|
|
875
|
-
* Find the first block after a parent
|
|
876
|
-
*
|
|
947
|
+
* Find the first block after a parent container by scanning the flat block
|
|
948
|
+
* array and skipping every block that belongs to the container's subtree.
|
|
949
|
+
*
|
|
950
|
+
* The container may be a single-level nest (table cell) or a multi-level nest
|
|
951
|
+
* (column_list > column > block). A block belongs to the container when the
|
|
952
|
+
* container's id appears anywhere on its ancestor chain, so blocks nested two
|
|
953
|
+
* levels deep (a paragraph inside a column inside the column_list) are skipped
|
|
954
|
+
* too — without that, ArrowDown/ArrowRight would land back inside the layout.
|
|
877
955
|
*/
|
|
878
956
|
private findFirstBlockAfterParent(parentBlockId: string): Block | null {
|
|
879
957
|
const { BlockManager } = this.Blok;
|
|
@@ -884,7 +962,103 @@ export class Caret extends Module {
|
|
|
884
962
|
return null;
|
|
885
963
|
}
|
|
886
964
|
|
|
887
|
-
return blocks
|
|
965
|
+
return blocks
|
|
966
|
+
.slice(parentIndex + 1)
|
|
967
|
+
.find(b => !this.isWithinContainer(b, parentBlockId)) ?? null;
|
|
968
|
+
}
|
|
969
|
+
|
|
970
|
+
/**
|
|
971
|
+
* Resolves the outermost container block that a nested block should exit when
|
|
972
|
+
* vertical/horizontal navigation crosses out of it.
|
|
973
|
+
*
|
|
974
|
+
* For a single-level nest (table cell) this is just `parentId`. For a
|
|
975
|
+
* multi-level nest (a block inside a `column`, the column inside a
|
|
976
|
+
* `column_list`) we must climb to the `column_list` so navigation exits the
|
|
977
|
+
* WHOLE layout instead of sliding into the sibling column. We climb the
|
|
978
|
+
* parentId chain to the topmost ancestor block that is still resolvable;
|
|
979
|
+
* when the immediate parent block is not registered (as in the table case),
|
|
980
|
+
* the parentId itself is the container to exit.
|
|
981
|
+
* @param parentId - immediate parentId of the navigating block
|
|
982
|
+
*/
|
|
983
|
+
private resolveContainerToExit(parentId: string): string {
|
|
984
|
+
const getBlockById = this.Blok.BlockManager.getBlockById?.bind(this.Blok.BlockManager);
|
|
985
|
+
|
|
986
|
+
if (getBlockById === undefined) {
|
|
987
|
+
return parentId;
|
|
988
|
+
}
|
|
989
|
+
|
|
990
|
+
const parent = getBlockById(parentId);
|
|
991
|
+
|
|
992
|
+
if (parent === undefined || parent.parentId === null) {
|
|
993
|
+
return parentId;
|
|
994
|
+
}
|
|
995
|
+
|
|
996
|
+
return this.resolveContainerToExit(parent.parentId);
|
|
997
|
+
}
|
|
998
|
+
|
|
999
|
+
/**
|
|
1000
|
+
* Whether `block` lives inside the container identified by `containerId`,
|
|
1001
|
+
* i.e. the container appears anywhere on the block's parentId chain. Used to
|
|
1002
|
+
* decide when a flat-array neighbour belongs to the same layout we are
|
|
1003
|
+
* exiting (e.g. a sibling column of the same column_list).
|
|
1004
|
+
* @param block - candidate block to test
|
|
1005
|
+
* @param containerId - id of the container to test against
|
|
1006
|
+
*/
|
|
1007
|
+
private isWithinContainer(block: Block, containerId: string): boolean {
|
|
1008
|
+
const ancestorId = block.parentId;
|
|
1009
|
+
|
|
1010
|
+
if (ancestorId === null) {
|
|
1011
|
+
return false;
|
|
1012
|
+
}
|
|
1013
|
+
|
|
1014
|
+
if (ancestorId === containerId) {
|
|
1015
|
+
return true;
|
|
1016
|
+
}
|
|
1017
|
+
|
|
1018
|
+
const getBlockById = this.Blok.BlockManager.getBlockById?.bind(this.Blok.BlockManager);
|
|
1019
|
+
|
|
1020
|
+
if (getBlockById === undefined) {
|
|
1021
|
+
return false;
|
|
1022
|
+
}
|
|
1023
|
+
|
|
1024
|
+
const ancestor = getBlockById(ancestorId);
|
|
1025
|
+
|
|
1026
|
+
if (ancestor === undefined) {
|
|
1027
|
+
return false;
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
return this.isWithinContainer(ancestor, containerId);
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
/**
|
|
1034
|
+
* Decides whether navigating from a nested `currentBlock` to its flat-array
|
|
1035
|
+
* neighbour `candidate` should be treated as exiting the whole container
|
|
1036
|
+
* rather than an in-place caret move. True when:
|
|
1037
|
+
* - there is no neighbour (the layout is at the document edge), or
|
|
1038
|
+
* - the neighbour belongs to the SAME outermost container subtree (e.g. a
|
|
1039
|
+
* sibling column of the same column_list), or
|
|
1040
|
+
* - the neighbour IS the container itself (an ancestor of the current block).
|
|
1041
|
+
*
|
|
1042
|
+
* Same-DOM-container sibling moves are handled earlier by the fast path and
|
|
1043
|
+
* never reach this check.
|
|
1044
|
+
* @param currentBlock - the block the caret is leaving
|
|
1045
|
+
* @param candidate - the flat-array neighbour caret would move to
|
|
1046
|
+
* @param containerId - outermost container resolved for currentBlock
|
|
1047
|
+
*/
|
|
1048
|
+
private shouldExitContainer(currentBlock: Block, candidate: Block | null, containerId: string): boolean {
|
|
1049
|
+
if (currentBlock.parentId === null) {
|
|
1050
|
+
return false;
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
if (candidate === null) {
|
|
1054
|
+
return true;
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
if (candidate.id === containerId) {
|
|
1058
|
+
return true;
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
return this.isWithinContainer(candidate, containerId);
|
|
888
1062
|
}
|
|
889
1063
|
|
|
890
1064
|
/**
|