@jackuait/blok 0.13.2 → 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.
Files changed (394) hide show
  1. package/dist/blok.cjs +1 -1
  2. package/dist/blok.iife.js +30 -30
  3. package/dist/blok.mjs +2 -2
  4. package/dist/chunks/blok-Da-GaWJ8.cjs +17 -0
  5. package/dist/chunks/{blok-Du6vYONn.mjs → blok-PpFnlqXZ.mjs} +2722 -2322
  6. package/dist/chunks/constants-C-OQpSwB.cjs +457 -0
  7. package/dist/chunks/{constants-DUuYY64n.mjs → constants-DdfiMdC1.mjs} +390 -299
  8. package/dist/chunks/{i18next-loader-GIrBCFrC.mjs → i18next-loader-BEWWek8j.mjs} +1 -1
  9. package/dist/chunks/{i18next-loader-DC1uN-wc.cjs → i18next-loader-BRLYf-CW.cjs} +1 -1
  10. package/dist/chunks/{lightweight-i18n-DF9Pupws.mjs → lightweight-i18n-GbzxWVgl.mjs} +9 -0
  11. package/dist/chunks/lightweight-i18n-lNYVKCfj.cjs +1 -0
  12. package/dist/chunks/messages-085GG-gT.cjs +1 -0
  13. package/dist/{messages-3j4yi-DF.mjs → chunks/messages-46QopBh4.mjs} +9 -0
  14. package/dist/chunks/messages-5kQujjf1.cjs +1 -0
  15. package/dist/chunks/{messages-CTWXEx_o.mjs → messages-6r3Lrqpf.mjs} +9 -0
  16. package/dist/chunks/messages-8vjbwhvK.cjs +1 -0
  17. package/dist/chunks/messages-ACbZDExx.cjs +1 -0
  18. package/dist/chunks/messages-B05XREvI.cjs +1 -0
  19. package/dist/chunks/{messages-CQg2_vmm.mjs → messages-B0y97-C9.mjs} +9 -0
  20. package/dist/chunks/{messages-ZHNvKiIX.mjs → messages-B26pkAIj.mjs} +9 -0
  21. package/dist/chunks/messages-B2J7kDKI.cjs +1 -0
  22. package/dist/chunks/messages-B3jMjjFG.cjs +1 -0
  23. package/dist/chunks/messages-B4_c-uS0.cjs +1 -0
  24. package/dist/chunks/messages-B6zoVYEd.cjs +1 -0
  25. package/dist/chunks/{messages-DI9Ifrgt.mjs → messages-B73uch0z.mjs} +9 -0
  26. package/dist/chunks/{messages-AgmrT2Id.mjs → messages-B74xK8Ux.mjs} +9 -0
  27. package/dist/chunks/messages-B7efcz_S2.cjs +1 -0
  28. package/dist/chunks/{messages-sqdfYuVj2.mjs → messages-B9u3UJRu2.mjs} +9 -0
  29. package/dist/chunks/messages-BB9huoLU.cjs +1 -0
  30. package/dist/{messages-Cx7sqvx02.mjs → chunks/messages-BEzCtzW3.mjs} +9 -0
  31. package/dist/chunks/messages-BGQdk2zV2.cjs +1 -0
  32. package/dist/chunks/messages-BGmUrVtN2.cjs +1 -0
  33. package/dist/chunks/messages-BH-3FR4b2.cjs +1 -0
  34. package/dist/chunks/{messages-BZ4d5yNH.mjs → messages-BHqAQF6C.mjs} +9 -0
  35. package/dist/{messages-DzkZ434Z.mjs → chunks/messages-BI_-Ub99.mjs} +9 -0
  36. package/dist/chunks/messages-BNa6_BYq2.cjs +1 -0
  37. package/dist/chunks/{messages-BvupGuDw2.mjs → messages-BOMNOs8T2.mjs} +9 -0
  38. package/dist/chunks/{messages-fSeXd6-z.mjs → messages-BPYPnKHy.mjs} +9 -0
  39. package/dist/{messages-B3PWaMcw.mjs → chunks/messages-BQmUOeft.mjs} +9 -0
  40. package/dist/chunks/messages-BRfutnCs.cjs +1 -0
  41. package/dist/chunks/messages-BT_0dgL1.cjs +1 -0
  42. package/dist/chunks/{messages-BWGqOZ9J.mjs → messages-BWSXW4jk.mjs} +9 -0
  43. package/dist/chunks/messages-BWpKvkND2.cjs +1 -0
  44. package/dist/chunks/messages-BY6gCAsA2.cjs +1 -0
  45. package/dist/{messages-BDwU9rYR2.mjs → chunks/messages-BbfZo0kw2.mjs} +9 -0
  46. package/dist/{messages-gQ5PFa2t2.mjs → chunks/messages-BfqzgRP72.mjs} +9 -0
  47. package/dist/chunks/messages-Bk2Xs7_v.cjs +1 -0
  48. package/dist/{messages-CmN2OfuB.mjs → chunks/messages-BmkavfpK.mjs} +9 -0
  49. package/dist/chunks/{messages-B1k4DgVe.mjs → messages-BmzMikmq.mjs} +9 -0
  50. package/dist/chunks/messages-BniEGAW32.cjs +1 -0
  51. package/dist/chunks/{messages-BP77P9ER.mjs → messages-BplwYBhA.mjs} +9 -0
  52. package/dist/chunks/{messages-B1xgsCNQ.cjs → messages-BqJ-xe8R.cjs} +1 -1
  53. package/dist/chunks/messages-Bry43U_U.cjs +1 -0
  54. package/dist/{messages-DFfhoDWZ2.mjs → chunks/messages-BuzGjYKw.mjs} +9 -0
  55. package/dist/chunks/messages-ByT63R7v2.cjs +1 -0
  56. package/dist/{messages-C_gdsU952.mjs → chunks/messages-C0S7KViA2.mjs} +9 -0
  57. package/dist/chunks/{messages-DzY53I67.mjs → messages-C0Tt7Odx.mjs} +9 -0
  58. package/dist/{messages-B8Tq9Txy.mjs → chunks/messages-C3A1iLjY.mjs} +9 -0
  59. package/dist/chunks/{messages-B6You-RA.mjs → messages-C3gh1rpr.mjs} +9 -0
  60. package/dist/chunks/{messages-CXxz5HYQ.mjs → messages-C7JE4SUS.mjs} +9 -0
  61. package/dist/chunks/messages-C9IWDnCh2.cjs +1 -0
  62. package/dist/chunks/messages-CBc3S61g2.cjs +1 -0
  63. package/dist/chunks/{messages-DefZ3ihx.mjs → messages-CHpkDOiI.mjs} +9 -0
  64. package/dist/{messages-BcD7xtJA.mjs → chunks/messages-CImQCp-z2.mjs} +9 -0
  65. package/dist/chunks/messages-CJ--z80t2.cjs +1 -0
  66. package/dist/chunks/messages-CNH8YFuv.cjs +1 -0
  67. package/dist/chunks/{messages-bjSJwsXK2.mjs → messages-CQ2KWTbV2.mjs} +9 -0
  68. package/dist/{messages-C8RMjnBe.mjs → chunks/messages-CWAukiLC.mjs} +9 -0
  69. package/dist/{messages-B3oFjWq3.mjs → chunks/messages-C_BUhMkZ.mjs} +9 -0
  70. package/dist/chunks/{messages-BvuEffoe.mjs → messages-CcBT1o1B.mjs} +9 -0
  71. package/dist/chunks/messages-CdqejEof.cjs +1 -0
  72. package/dist/chunks/messages-Chdejshy2.cjs +1 -0
  73. package/dist/{messages-D-rvoUSJ.mjs → chunks/messages-CijMg_B_.mjs} +9 -0
  74. package/dist/{messages-JKXCsFKZ.mjs → chunks/messages-Ciz80Z2u2.mjs} +9 -0
  75. package/dist/{messages-Dq2WEsEu.mjs → chunks/messages-CjuGKMoT.mjs} +9 -0
  76. package/dist/chunks/{messages-BxKobpJ22.mjs → messages-ClOfUECP2.mjs} +9 -0
  77. package/dist/chunks/messages-CrF-Q_ML.cjs +1 -0
  78. package/dist/chunks/messages-Cww_rBCM.cjs +1 -0
  79. package/dist/chunks/messages-CxPVYl2H2.cjs +1 -0
  80. package/dist/chunks/{messages-BA2sVGrR2.mjs → messages-Cyiqo_dk2.mjs} +9 -0
  81. package/dist/{messages-D788KtGe.mjs → chunks/messages-D-u_SWhb.mjs} +9 -0
  82. package/dist/chunks/messages-D0H-D5FQ2.cjs +1 -0
  83. package/dist/chunks/messages-D195RH3A.cjs +1 -0
  84. package/dist/chunks/{messages-Dd4nzvLj2.mjs → messages-D5-DG-_u2.mjs} +9 -0
  85. package/dist/chunks/messages-D6kDQgDP2.cjs +1 -0
  86. package/dist/{messages-CAGQtm7T.mjs → chunks/messages-D8-hiQgf.mjs} +9 -0
  87. package/dist/{messages-ftPYsH6d2.mjs → chunks/messages-D8nb9CKr2.mjs} +9 -0
  88. package/dist/{messages-DPqFBtJR.mjs → chunks/messages-DAd5yWtH2.mjs} +9 -0
  89. package/dist/chunks/messages-DAdsFLpE.cjs +1 -0
  90. package/dist/chunks/messages-DCUsbiUQ.cjs +1 -0
  91. package/dist/{messages-AycxTjmw.mjs → chunks/messages-DCVZaAT9.mjs} +9 -0
  92. package/dist/chunks/messages-DHXttezt2.cjs +1 -0
  93. package/dist/chunks/messages-DIgxCixa.cjs +1 -0
  94. package/dist/chunks/messages-DJ0Wr-Bt2.cjs +1 -0
  95. package/dist/chunks/messages-DJBdlmxR.cjs +1 -0
  96. package/dist/chunks/{messages-5AxgjKgf2.mjs → messages-DJm-uLwr2.mjs} +9 -0
  97. package/dist/chunks/{messages-BVarbXYD2.mjs → messages-DKF4qWhw2.mjs} +9 -0
  98. package/dist/chunks/messages-DLAWSVlE.cjs +1 -0
  99. package/dist/{messages-Bj03XD-02.mjs → chunks/messages-DLI8m6z_2.mjs} +9 -0
  100. package/dist/{messages-CTzO11jz.mjs → chunks/messages-DNiWBVQr.mjs} +9 -0
  101. package/dist/chunks/messages-DNsgR3ZH.cjs +1 -0
  102. package/dist/{messages-CgaGkQi32.mjs → chunks/messages-DPI5-TrO2.mjs} +9 -0
  103. package/dist/chunks/{messages-CyCl8la6.mjs → messages-DQ1z_srP.mjs} +9 -0
  104. package/dist/chunks/{messages-C4bHKGnB2.mjs → messages-DSxYO-_j2.mjs} +9 -0
  105. package/dist/chunks/messages-DTrrEqf02.cjs +1 -0
  106. package/dist/chunks/{messages-D7YPlNAK.mjs → messages-DYLfoakZ.mjs} +9 -0
  107. package/dist/chunks/messages-DZCWq8nI2.cjs +1 -0
  108. package/dist/{messages-PQVh93mt.mjs → chunks/messages-D_JT9POv.mjs} +9 -0
  109. package/dist/chunks/{messages-Uc3Uc2862.mjs → messages-DaTniq4w2.mjs} +9 -0
  110. package/dist/{messages-DiL61awK.mjs → chunks/messages-De2tXe0o.mjs} +9 -0
  111. package/dist/chunks/{messages-l5xHQb_m.mjs → messages-DiwyN3uU.mjs} +9 -0
  112. package/dist/chunks/messages-DkQGwmom.cjs +1 -0
  113. package/dist/chunks/{messages-B6t1xShv.mjs → messages-Dl-C7Pdf.mjs} +9 -0
  114. package/dist/chunks/{messages-bSVgJ1cu.mjs → messages-DlDyYt5x.mjs} +9 -0
  115. package/dist/chunks/messages-Dmhwr_Ow2.cjs +1 -0
  116. package/dist/chunks/messages-DrQQ1Hky.cjs +1 -0
  117. package/dist/chunks/messages-DtQ_pCWn.cjs +1 -0
  118. package/dist/{messages-uy3FE24_2.mjs → chunks/messages-Du-inLpi2.mjs} +9 -0
  119. package/dist/{messages-DqXJJPx9.mjs → chunks/messages-Duu9LiF32.mjs} +9 -0
  120. package/dist/chunks/messages-DxCc14pu2.cjs +1 -0
  121. package/dist/chunks/{messages-DNqFlfOd.mjs → messages-Dz3cVqxu.mjs} +9 -0
  122. package/dist/chunks/messages-EJkYSgsP.cjs +1 -0
  123. package/dist/chunks/messages-F3QeKduK.cjs +1 -0
  124. package/dist/chunks/messages-HfCZ1oPV.cjs +1 -0
  125. package/dist/chunks/{messages-BVZONUH9.mjs → messages-Ji3WDjrp.mjs} +9 -0
  126. package/dist/chunks/messages-MTnjMh07.cjs +1 -0
  127. package/dist/{messages-DL7JAwpC.mjs → chunks/messages-NU3n_1t9.mjs} +9 -0
  128. package/dist/chunks/messages-NpCBoXqi.cjs +1 -0
  129. package/dist/chunks/messages-PMZIH3mH.cjs +1 -0
  130. package/dist/{messages-7fwJIrld2.mjs → chunks/messages-TFu4tdzc2.mjs} +9 -0
  131. package/dist/{messages-BSHFypGE2.mjs → chunks/messages-Ti4ZdnqM2.mjs} +9 -0
  132. package/dist/chunks/messages-UOTfsDv3.cjs +1 -0
  133. package/dist/chunks/messages-WDBEGpNu.cjs +1 -0
  134. package/dist/chunks/messages-Zg6PFQ87.cjs +1 -0
  135. package/dist/chunks/messages-bdVhFVzt2.cjs +1 -0
  136. package/dist/chunks/messages-dnnjc_oR2.cjs +1 -0
  137. package/dist/{messages-BmWP4vpV2.mjs → chunks/messages-fI_5bRwV2.mjs} +9 -0
  138. package/dist/{messages-CIjSE2_O2.mjs → chunks/messages-g80Luov_2.mjs} +9 -0
  139. package/dist/chunks/messages-hlzAtKI5.cjs +1 -0
  140. package/dist/chunks/messages-kuh4lSUE2.cjs +1 -0
  141. package/dist/chunks/messages-m20Eebmt2.cjs +1 -0
  142. package/dist/chunks/messages-o1__8Rul.cjs +1 -0
  143. package/dist/chunks/messages-pBYvH88_.cjs +1 -0
  144. package/dist/chunks/{messages-CMRjQYxi2.mjs → messages-u1hpTCvK2.mjs} +9 -0
  145. package/dist/chunks/{messages-BoCUgrkI.mjs → messages-vq5ZvFTF.mjs} +9 -0
  146. package/dist/chunks/tools-DeTgjuIK.cjs +116 -0
  147. package/dist/chunks/{tools-Tt-NXbRZ.mjs → tools-omGeunql.mjs} +1818 -1686
  148. package/dist/full.cjs +1 -1
  149. package/dist/full.mjs +8 -8
  150. package/dist/locales.mjs +76 -67
  151. package/dist/{chunks/messages-DHdoaaFq2.mjs → messages-2hSOMnir2.mjs} +9 -0
  152. package/dist/{chunks/messages-DlcI-0Sy.mjs → messages-3VCxXECx.mjs} +9 -0
  153. package/dist/{messages-CxX23Jsk2.mjs → messages-8xGEIh_m2.mjs} +9 -0
  154. package/dist/{chunks/messages-DmErSGPk2.mjs → messages-B-QcHnuI2.mjs} +9 -0
  155. package/dist/{messages-BKCuCTFM.mjs → messages-B8zoeMf9.mjs} +9 -0
  156. package/dist/{chunks/messages-BmdkDNYv.mjs → messages-B9CF0GcE.mjs} +9 -0
  157. package/dist/{messages-1ufJbdRv2.mjs → messages-B9W0pRCr2.mjs} +9 -0
  158. package/dist/{messages-DQik3_xv2.mjs → messages-BFM2ljkf2.mjs} +9 -0
  159. package/dist/{chunks/messages-BNxTGhHu.mjs → messages-BLm4FSbz2.mjs} +9 -0
  160. package/dist/{chunks/messages-GHsufIGi2.mjs → messages-BLpeYPKv2.mjs} +9 -0
  161. package/dist/{messages-D_WzyzUt.mjs → messages-BM73sjxy.mjs} +9 -0
  162. package/dist/{messages-CX8egsiA2.mjs → messages-BOpqKi6Y2.mjs} +9 -0
  163. package/dist/{chunks/messages-eyGOcbhV.mjs → messages-BUGdUeTK.mjs} +9 -0
  164. package/dist/{chunks/messages-DhZwMl9x2.mjs → messages-BZm7MzSJ2.mjs} +9 -0
  165. package/dist/{messages-C31VIrlL.mjs → messages-BtBhP1sv.mjs} +9 -0
  166. package/dist/{messages-D1Fjr4OK2.mjs → messages-BthFu3bN2.mjs} +9 -0
  167. package/dist/{chunks/messages-COMdnGQV2.mjs → messages-BurjwjCQ2.mjs} +9 -0
  168. package/dist/{messages-DTkd9ND8.mjs → messages-ByIHkus-.mjs} +9 -0
  169. package/dist/{messages-C9GFRcVj.mjs → messages-ByVKFMH3.mjs} +9 -0
  170. package/dist/{chunks/messages-B5CFhyI8.mjs → messages-C6FDRqcf.mjs} +9 -0
  171. package/dist/{chunks/messages-OSIAf0Wk2.mjs → messages-C9dJ_N542.mjs} +9 -0
  172. package/dist/{messages-CRR1VRO6.mjs → messages-CCw8aJgW.mjs} +9 -0
  173. package/dist/{chunks/messages-AtUsRyWK2.mjs → messages-CO3NEwf22.mjs} +9 -0
  174. package/dist/{chunks/messages-CcboYTP8.mjs → messages-CPB2xkpC.mjs} +9 -0
  175. package/dist/{messages-CITYhXUz.mjs → messages-CPDsEORY.mjs} +9 -0
  176. package/dist/{chunks/messages-B2zrJyAc2.mjs → messages-CYyPOGy7.mjs} +9 -0
  177. package/dist/{chunks/messages-C03LZxma.mjs → messages-CZAODRjY.mjs} +9 -0
  178. package/dist/{messages-Duk7VVeY.mjs → messages-C_rns7Ku.mjs} +9 -0
  179. package/dist/{chunks/messages-CdWXgq_r.mjs → messages-CaUUIQvU.mjs} +9 -0
  180. package/dist/{messages-Cp0fjsey.mjs → messages-Cc-A7Vip.mjs} +9 -0
  181. package/dist/{chunks/messages-B7KbtBAE.mjs → messages-Ccf81JsG.mjs} +9 -0
  182. package/dist/{chunks/messages-rEsI_fAk.mjs → messages-CerTDuSC.mjs} +9 -0
  183. package/dist/{messages-BkTBwYet.mjs → messages-CgmDwRRE.mjs} +9 -0
  184. package/dist/{chunks/messages-DsyO86r3.mjs → messages-Cn3PWtLp.mjs} +9 -0
  185. package/dist/{chunks/messages-CWTFEPbA2.mjs → messages-Cu1rTEkB.mjs} +9 -0
  186. package/dist/{messages-oIa8wahx.mjs → messages-CxEHfUNH.mjs} +9 -0
  187. package/dist/{messages-C_mN4lx0.mjs → messages-D1B41i8X.mjs} +9 -0
  188. package/dist/{messages-NVepzgE3.mjs → messages-D6954zcl.mjs} +9 -0
  189. package/dist/{messages-C2TRJroV2.mjs → messages-DBwWssfL2.mjs} +9 -0
  190. package/dist/{messages-Cdgz3urh.mjs → messages-DFHRMYke.mjs} +9 -0
  191. package/dist/{messages-DXCyNanc2.mjs → messages-DJVrq0Xa2.mjs} +9 -0
  192. package/dist/{chunks/messages-OYoN_rp1.mjs → messages-DMJz28kt.mjs} +9 -0
  193. package/dist/{chunks/messages-B_U10evN2.mjs → messages-DOnOpXFJ2.mjs} +9 -0
  194. package/dist/{messages-5USazVPA2.mjs → messages-DR1Tf-Kj2.mjs} +9 -0
  195. package/dist/{chunks/messages-C4sIqArW2.mjs → messages-DSUXwuzH2.mjs} +9 -0
  196. package/dist/{chunks/messages-DGHTTk1S2.mjs → messages-DTNO7tw1.mjs} +9 -0
  197. package/dist/{messages-Ddz6eH0-2.mjs → messages-DWBtyom42.mjs} +9 -0
  198. package/dist/{messages-DKsyrVp5.mjs → messages-DZQALZIU.mjs} +9 -0
  199. package/dist/{chunks/messages-V8K7-1l2.mjs → messages-D_i86vbQ.mjs} +9 -0
  200. package/dist/{chunks/messages-BmiN0JGP2.mjs → messages-Da1VKvvf2.mjs} +9 -0
  201. package/dist/{messages-D5qgCWmB2.mjs → messages-Ddimgqvp2.mjs} +9 -0
  202. package/dist/{chunks/messages-MPF8o3EP.mjs → messages-DdmXBLUC.mjs} +9 -0
  203. package/dist/{messages-D4U4wkYM.mjs → messages-Devcsnrv.mjs} +9 -0
  204. package/dist/{chunks/messages-DiGsu5XN.mjs → messages-DhS-j4Hp.mjs} +9 -0
  205. package/dist/{messages-BGzpwNrz.mjs → messages-DrRVvVPI.mjs} +9 -0
  206. package/dist/{chunks/messages-Z9mDYT3w.mjs → messages-Ds4gQbVR2.mjs} +9 -0
  207. package/dist/{chunks/messages-vQ5kblO8.mjs → messages-DxkB7LL6.mjs} +9 -0
  208. package/dist/{chunks/messages-LTkIIrSe2.mjs → messages-GgHHrLBU2.mjs} +9 -0
  209. package/dist/{messages-CntTlSE22.mjs → messages-IycPaZe22.mjs} +9 -0
  210. package/dist/{messages-BtDz-sw92.mjs → messages-ST8f_nDx2.mjs} +9 -0
  211. package/dist/{messages-CgVEHCQ-.mjs → messages-SV8lf6F0.mjs} +9 -0
  212. package/dist/{messages-Bt4TLGth.mjs → messages-lVrQmsky.mjs} +9 -0
  213. package/dist/{messages-rpO1POP02.mjs → messages-lcoIGSX82.mjs} +9 -0
  214. package/dist/{chunks/messages-BuYnNUtU2.mjs → messages-mqRVfUUq.mjs} +9 -0
  215. package/dist/{chunks/messages-C24IC_eR.mjs → messages-qWFvoPY1.mjs} +9 -0
  216. package/dist/{messages-CacRpQpm.mjs → messages-yte1QPX5.mjs} +9 -0
  217. package/dist/{messages-DNlrcG5Z.mjs → messages-zyiti_A8.mjs} +9 -0
  218. package/dist/react.cjs +1 -1
  219. package/dist/react.mjs +1 -1
  220. package/dist/tools.cjs +1 -1
  221. package/dist/tools.mjs +3 -3
  222. package/package.json +1 -1
  223. package/src/components/blocks.ts +30 -7
  224. package/src/components/i18n/locales/am/messages.json +9 -0
  225. package/src/components/i18n/locales/ar/messages.json +9 -0
  226. package/src/components/i18n/locales/az/messages.json +9 -0
  227. package/src/components/i18n/locales/bg/messages.json +9 -0
  228. package/src/components/i18n/locales/bn/messages.json +9 -0
  229. package/src/components/i18n/locales/bs/messages.json +9 -0
  230. package/src/components/i18n/locales/cs/messages.json +9 -0
  231. package/src/components/i18n/locales/da/messages.json +9 -0
  232. package/src/components/i18n/locales/de/messages.json +9 -0
  233. package/src/components/i18n/locales/dv/messages.json +9 -0
  234. package/src/components/i18n/locales/el/messages.json +9 -0
  235. package/src/components/i18n/locales/en/messages.json +9 -0
  236. package/src/components/i18n/locales/es/messages.json +9 -0
  237. package/src/components/i18n/locales/et/messages.json +9 -0
  238. package/src/components/i18n/locales/fa/messages.json +9 -0
  239. package/src/components/i18n/locales/fi/messages.json +9 -0
  240. package/src/components/i18n/locales/fil/messages.json +9 -0
  241. package/src/components/i18n/locales/fr/messages.json +9 -0
  242. package/src/components/i18n/locales/gu/messages.json +9 -0
  243. package/src/components/i18n/locales/he/messages.json +9 -0
  244. package/src/components/i18n/locales/hi/messages.json +9 -0
  245. package/src/components/i18n/locales/hr/messages.json +9 -0
  246. package/src/components/i18n/locales/hu/messages.json +9 -0
  247. package/src/components/i18n/locales/hy/messages.json +9 -0
  248. package/src/components/i18n/locales/id/messages.json +9 -0
  249. package/src/components/i18n/locales/it/messages.json +9 -0
  250. package/src/components/i18n/locales/ja/messages.json +9 -0
  251. package/src/components/i18n/locales/ka/messages.json +9 -0
  252. package/src/components/i18n/locales/km/messages.json +9 -0
  253. package/src/components/i18n/locales/kn/messages.json +9 -0
  254. package/src/components/i18n/locales/ko/messages.json +9 -0
  255. package/src/components/i18n/locales/ku/messages.json +9 -0
  256. package/src/components/i18n/locales/lo/messages.json +9 -0
  257. package/src/components/i18n/locales/lt/messages.json +9 -0
  258. package/src/components/i18n/locales/lv/messages.json +9 -0
  259. package/src/components/i18n/locales/mk/messages.json +9 -0
  260. package/src/components/i18n/locales/ml/messages.json +9 -0
  261. package/src/components/i18n/locales/mn/messages.json +9 -0
  262. package/src/components/i18n/locales/mr/messages.json +9 -0
  263. package/src/components/i18n/locales/ms/messages.json +9 -0
  264. package/src/components/i18n/locales/my/messages.json +9 -0
  265. package/src/components/i18n/locales/ne/messages.json +9 -0
  266. package/src/components/i18n/locales/nl/messages.json +9 -0
  267. package/src/components/i18n/locales/no/messages.json +9 -0
  268. package/src/components/i18n/locales/pa/messages.json +9 -0
  269. package/src/components/i18n/locales/pl/messages.json +9 -0
  270. package/src/components/i18n/locales/ps/messages.json +9 -0
  271. package/src/components/i18n/locales/pt/messages.json +9 -0
  272. package/src/components/i18n/locales/ro/messages.json +9 -0
  273. package/src/components/i18n/locales/ru/messages.json +9 -0
  274. package/src/components/i18n/locales/sd/messages.json +9 -0
  275. package/src/components/i18n/locales/si/messages.json +9 -0
  276. package/src/components/i18n/locales/sk/messages.json +9 -0
  277. package/src/components/i18n/locales/sl/messages.json +9 -0
  278. package/src/components/i18n/locales/sq/messages.json +9 -0
  279. package/src/components/i18n/locales/sr/messages.json +9 -0
  280. package/src/components/i18n/locales/sv/messages.json +9 -0
  281. package/src/components/i18n/locales/sw/messages.json +9 -0
  282. package/src/components/i18n/locales/ta/messages.json +9 -0
  283. package/src/components/i18n/locales/te/messages.json +9 -0
  284. package/src/components/i18n/locales/th/messages.json +9 -0
  285. package/src/components/i18n/locales/tr/messages.json +9 -0
  286. package/src/components/i18n/locales/ug/messages.json +9 -0
  287. package/src/components/i18n/locales/uk/messages.json +9 -0
  288. package/src/components/i18n/locales/ur/messages.json +9 -0
  289. package/src/components/i18n/locales/vi/messages.json +9 -0
  290. package/src/components/i18n/locales/yi/messages.json +9 -0
  291. package/src/components/i18n/locales/zh/messages.json +9 -0
  292. package/src/components/icons/index.ts +24 -0
  293. package/src/components/modules/blockEvents/composers/keyboardNavigation.ts +67 -6
  294. package/src/components/modules/blockManager/hierarchy.ts +150 -8
  295. package/src/components/modules/blockManager/operations.ts +207 -8
  296. package/src/components/modules/blockManager/yjs-sync.ts +36 -1
  297. package/src/components/modules/caret.ts +205 -31
  298. package/src/components/modules/drag/DragController.ts +219 -2
  299. package/src/components/modules/drag/a11y/DragA11y.ts +9 -1
  300. package/src/components/modules/drag/state/DragStateMachine.ts +1 -1
  301. package/src/components/modules/drag/target/DropTargetDetector.ts +513 -3
  302. package/src/components/modules/drag/utils/drag.constants.ts +9 -0
  303. package/src/components/modules/toolbar/blockSettings.ts +75 -5
  304. package/src/components/modules/toolbar/index.ts +12 -1
  305. package/src/components/modules/uiControllers/controllers/blockHover.ts +24 -2
  306. package/src/components/modules/uiControllers/controllers/selection.ts +50 -0
  307. package/src/components/utils/blocks.ts +21 -7
  308. package/src/styles/colors.css +3 -0
  309. package/src/styles/columns.css +105 -0
  310. package/src/styles/main.css +48 -3
  311. package/src/styles/popover-animation.css +8 -0
  312. package/src/tools/column/index.ts +189 -0
  313. package/src/tools/column/types.ts +26 -0
  314. package/src/tools/column-drop.ts +273 -0
  315. package/src/tools/column-list/index.ts +142 -0
  316. package/src/tools/column-list/types.ts +17 -0
  317. package/src/tools/columns-shared.ts +343 -0
  318. package/src/tools/divider/index.ts +1 -0
  319. package/src/tools/index.ts +4 -0
  320. package/src/tools/nested-blocks.ts +23 -2
  321. package/src/tools/table/table-restrictions.ts +1 -1
  322. package/types/tools/column-list.d.ts +15 -0
  323. package/types/tools/column.d.ts +13 -0
  324. package/types/tools-entry.d.ts +8 -0
  325. package/dist/chunks/blok-Xu27QC2G.cjs +0 -17
  326. package/dist/chunks/constants-DDTVRO2H.cjs +0 -457
  327. package/dist/chunks/lightweight-i18n-Bbl1cNYK.cjs +0 -1
  328. package/dist/chunks/messages-1qYt6EhZ2.cjs +0 -1
  329. package/dist/chunks/messages-2fxvN3Nb.cjs +0 -1
  330. package/dist/chunks/messages-B1Vs2HmR.cjs +0 -1
  331. package/dist/chunks/messages-B780gS332.cjs +0 -1
  332. package/dist/chunks/messages-B7T5Notn.cjs +0 -1
  333. package/dist/chunks/messages-BE9aZQ1Q.cjs +0 -1
  334. package/dist/chunks/messages-BIQpTYfm.cjs +0 -1
  335. package/dist/chunks/messages-BIRvUJ0t.cjs +0 -1
  336. package/dist/chunks/messages-BIodfkjv.cjs +0 -1
  337. package/dist/chunks/messages-BL-zBcuM.cjs +0 -1
  338. package/dist/chunks/messages-BQr0zpmu2.cjs +0 -1
  339. package/dist/chunks/messages-BTHi6rVW2.cjs +0 -1
  340. package/dist/chunks/messages-BZOAdcmO2.cjs +0 -1
  341. package/dist/chunks/messages-BbsGeVs_2.cjs +0 -1
  342. package/dist/chunks/messages-Bc1NYJVS.cjs +0 -1
  343. package/dist/chunks/messages-BdORNG8X.cjs +0 -1
  344. package/dist/chunks/messages-Bg2kheTv.cjs +0 -1
  345. package/dist/chunks/messages-Bj1eQtQw.cjs +0 -1
  346. package/dist/chunks/messages-BkJJCHNK.cjs +0 -1
  347. package/dist/chunks/messages-BkdGQfIX.cjs +0 -1
  348. package/dist/chunks/messages-BkgsB-cj2.cjs +0 -1
  349. package/dist/chunks/messages-Bn0vGFEP.cjs +0 -1
  350. package/dist/chunks/messages-BoIUXwWe.cjs +0 -1
  351. package/dist/chunks/messages-BpDEh8rW.cjs +0 -1
  352. package/dist/chunks/messages-BwknPZJ8.cjs +0 -1
  353. package/dist/chunks/messages-ByicRCge2.cjs +0 -1
  354. package/dist/chunks/messages-C2oBmyTn.cjs +0 -1
  355. package/dist/chunks/messages-C9wBMmxr2.cjs +0 -1
  356. package/dist/chunks/messages-CDK5-8vW.cjs +0 -1
  357. package/dist/chunks/messages-CKHbPcfh.cjs +0 -1
  358. package/dist/chunks/messages-CNFfwTfw.cjs +0 -1
  359. package/dist/chunks/messages-CNiuofck2.cjs +0 -1
  360. package/dist/chunks/messages-CWszAGkF.cjs +0 -1
  361. package/dist/chunks/messages-CWzQNagc2.cjs +0 -1
  362. package/dist/chunks/messages-CYf1gv722.cjs +0 -1
  363. package/dist/chunks/messages-CfcCwbQo.cjs +0 -1
  364. package/dist/chunks/messages-CkvqOnAR.cjs +0 -1
  365. package/dist/chunks/messages-Cnrug7nz2.cjs +0 -1
  366. package/dist/chunks/messages-Cr51zCHy.cjs +0 -1
  367. package/dist/chunks/messages-CsLvvl2F2.cjs +0 -1
  368. package/dist/chunks/messages-CuO-Rx4g.cjs +0 -1
  369. package/dist/chunks/messages-Cv4I3k1W2.cjs +0 -1
  370. package/dist/chunks/messages-CwHRv6g8.cjs +0 -1
  371. package/dist/chunks/messages-CzXnHfGb2.cjs +0 -1
  372. package/dist/chunks/messages-D2QxLx1a.cjs +0 -1
  373. package/dist/chunks/messages-D4LUPpX_.cjs +0 -1
  374. package/dist/chunks/messages-DJFL-bxd2.cjs +0 -1
  375. package/dist/chunks/messages-DLEeNpMi2.cjs +0 -1
  376. package/dist/chunks/messages-DTNU_cq0.cjs +0 -1
  377. package/dist/chunks/messages-DVKsYqpJ.cjs +0 -1
  378. package/dist/chunks/messages-DXlfz-nC.cjs +0 -1
  379. package/dist/chunks/messages-DbA_Zja3.cjs +0 -1
  380. package/dist/chunks/messages-Dc2TTEx_2.cjs +0 -1
  381. package/dist/chunks/messages-DeDMMmRC.cjs +0 -1
  382. package/dist/chunks/messages-DlQNXqzr.cjs +0 -1
  383. package/dist/chunks/messages-DqMqZLcn.cjs +0 -1
  384. package/dist/chunks/messages-DqqDuEE22.cjs +0 -1
  385. package/dist/chunks/messages-DzppdmWe.cjs +0 -1
  386. package/dist/chunks/messages-HzLF-BQL2.cjs +0 -1
  387. package/dist/chunks/messages-Jb9n97oP2.cjs +0 -1
  388. package/dist/chunks/messages-K_vSdSoF2.cjs +0 -1
  389. package/dist/chunks/messages-Nh7wrRdm.cjs +0 -1
  390. package/dist/chunks/messages-QHS-Ydg_.cjs +0 -1
  391. package/dist/chunks/messages-SpiG5vT-2.cjs +0 -1
  392. package/dist/chunks/messages-XFaJzdhP2.cjs +0 -1
  393. package/dist/chunks/messages-y03BGg692.cjs +0 -1
  394. package/dist/chunks/tools-DOuVjow8.cjs +0 -116
@@ -0,0 +1,273 @@
1
+ import type { API } from '../../types';
2
+ import {
3
+ COLUMNS_ATTR,
4
+ COLUMN_LIST_TOOL,
5
+ COLUMN_TOOL,
6
+ buildColumnResizers,
7
+ playColumnEnterAnimation,
8
+ resetColumnsToEvenWidth,
9
+ } from './columns-shared';
10
+
11
+ /**
12
+ * Rebuild the resize separators of an already-rendered column_list. The list's
13
+ * rendered() hook fires only once, so adding a column to a live list never
14
+ * re-triggers it — the separators must be rebuilt here or the new column lands
15
+ * without a handle. The columns row is the element carrying COLUMNS_ATTR; reach
16
+ * it from any child column holder.
17
+ */
18
+ const rebuildColumnResizers = (api: API, columnListId: string): void => {
19
+ const holders = api.blocks.getChildren(columnListId).map(column => column.holder);
20
+ const container = holders[0]?.closest(`[${COLUMNS_ATTR}]`);
21
+
22
+ if (container instanceof HTMLElement) {
23
+ buildColumnResizers(container, holders, api.readOnly.isEnabled, api, columnListId);
24
+ }
25
+ };
26
+
27
+ export type ColumnDropSide = 'left' | 'right';
28
+
29
+ /**
30
+ * Run `fn` as a single undo entry when the host supports transactions, else
31
+ * run it directly. `transact` is optional on the public API, so guard it.
32
+ */
33
+ const runTransacted = (api: API, fn: () => void): void => {
34
+ if (api.blocks.transact !== undefined) {
35
+ api.blocks.transact(fn);
36
+
37
+ return;
38
+ }
39
+
40
+ fn();
41
+ };
42
+
43
+ /**
44
+ * Wrap a top-level `targetId` block and the dragged `sourceIds` into a brand
45
+ * new `column_list` with two columns: one holds the target, the other holds
46
+ * the sources stacked in document order.
47
+ *
48
+ * - side 'left' -> column order = [sources column, target column]
49
+ * - side 'right' -> column order = [target column, sources column]
50
+ *
51
+ * The target's subtree follows automatically because children track their
52
+ * parent. All work runs in a single undo entry via `transact`.
53
+ *
54
+ * Aborts (returns null, no mutation) when:
55
+ * - sources is empty, or includes the target (self-drop),
56
+ * - the target or any source is stale (no flat index),
57
+ * - the target is already inside a container (use addColumnToList instead).
58
+ */
59
+ export const wrapInNewColumnList = (
60
+ api: API,
61
+ targetId: string,
62
+ sourceIds: string[],
63
+ side: ColumnDropSide
64
+ ): string | null => {
65
+ if (sourceIds.length === 0 || sourceIds.includes(targetId)) {
66
+ return null;
67
+ }
68
+
69
+ const targetIndex = api.blocks.getBlockIndex(targetId);
70
+
71
+ if (targetIndex === undefined) {
72
+ return null;
73
+ }
74
+
75
+ for (const sourceId of sourceIds) {
76
+ if (api.blocks.getBlockIndex(sourceId) === undefined) {
77
+ return null;
78
+ }
79
+ }
80
+
81
+ // Wrapping is only for top-level targets; a target with a parent should be
82
+ // dropped beside an existing column via addColumnToList.
83
+ if (api.blocks.getById(targetId)?.parentId !== null) {
84
+ return null;
85
+ }
86
+
87
+ const created: { listId: string | null; sourcesColumnId: string | null } = {
88
+ listId: null,
89
+ sourcesColumnId: null,
90
+ };
91
+
92
+ runTransacted(api, () => {
93
+ // The column_list opts out of its default auto-seed; we fill it with
94
+ // explicit columns below. Columns are typed blocks, so they are created
95
+ // with `insert(COLUMN_TOOL, ...)` + setBlockParent (insertInsideParent only
96
+ // ever creates the default paragraph block).
97
+ const list = api.blocks.insert(COLUMN_LIST_TOOL, { noSeed: true }, {}, targetIndex, false, false);
98
+
99
+ created.listId = list.id;
100
+
101
+ const firstColumn = api.blocks.insert(COLUMN_TOOL, { noSeed: true }, {}, targetIndex + 1, false, false);
102
+ const secondColumn = api.blocks.insert(COLUMN_TOOL, { noSeed: true }, {}, targetIndex + 2, false, false);
103
+
104
+ api.blocks.setBlockParent(firstColumn.id, list.id);
105
+ api.blocks.setBlockParent(secondColumn.id, list.id);
106
+
107
+ const targetColumn = side === 'left' ? secondColumn : firstColumn;
108
+ const sourcesColumn = side === 'left' ? firstColumn : secondColumn;
109
+
110
+ created.sourcesColumnId = sourcesColumn.id;
111
+
112
+ api.blocks.setBlockParent(targetId, targetColumn.id);
113
+
114
+ for (const sourceId of sourceIds) {
115
+ api.blocks.setBlockParent(sourceId, sourcesColumn.id);
116
+ }
117
+ });
118
+
119
+ // Slide the new column in once the tree has settled; the target column reflows
120
+ // from full width to its share for free as the new column's grow animates up.
121
+ if (created.sourcesColumnId !== null) {
122
+ const holder = api.blocks.getById(created.sourcesColumnId)?.holder;
123
+
124
+ if (holder !== undefined) {
125
+ playColumnEnterAnimation(holder);
126
+ }
127
+ }
128
+
129
+ return created.listId;
130
+ };
131
+
132
+ /**
133
+ * Wrap the top-level `blockIds` into a brand new `column_list`, one block per
134
+ * column, preserving selection order. Each block keeps its subtree (children
135
+ * track their parent), so a selected `column_list` rides into a single column
136
+ * as a nested list. All work runs in a single undo entry via `transact`.
137
+ *
138
+ * Non-top-level ids are IGNORED, not rejected: a cross-block selection that
139
+ * spans a container also marks the container's descendants selected (the
140
+ * selection walks the flat block array), and those descendants ride along
141
+ * inside their container — wrapping them again would tear the subtree apart.
142
+ *
143
+ * Aborts (returns null, no mutation) when fewer than 2 top-level, non-stale
144
+ * blocks remain after filtering.
145
+ */
146
+ export const wrapBlocksInColumns = (
147
+ api: API,
148
+ blockIds: string[]
149
+ ): string | null => {
150
+ const topLevelIds = blockIds.filter((blockId) => {
151
+ if (api.blocks.getBlockIndex(blockId) === undefined) {
152
+ return false;
153
+ }
154
+
155
+ return api.blocks.getById(blockId)?.parentId === null;
156
+ });
157
+
158
+ if (topLevelIds.length < 2) {
159
+ return null;
160
+ }
161
+
162
+ const baseIndex = api.blocks.getBlockIndex(topLevelIds[0]);
163
+
164
+ if (baseIndex === undefined) {
165
+ return null;
166
+ }
167
+
168
+ const created: { listId: string | null } = { listId: null };
169
+
170
+ runTransacted(api, () => {
171
+ const list = api.blocks.insert(COLUMN_LIST_TOOL, { noSeed: true }, {}, baseIndex, false, false);
172
+
173
+ created.listId = list.id;
174
+
175
+ const columns = topLevelIds.map((_, i) =>
176
+ api.blocks.insert(COLUMN_TOOL, { noSeed: true }, {}, baseIndex + 1 + i, false, false)
177
+ );
178
+
179
+ for (const column of columns) {
180
+ api.blocks.setBlockParent(column.id, list.id);
181
+ }
182
+
183
+ topLevelIds.forEach((blockId, i) => {
184
+ api.blocks.setBlockParent(blockId, columns[i].id);
185
+ });
186
+
187
+ // New list: rendered() already fired with zero children, so it never built
188
+ // separators — rebuild the N-1 set and even the widths.
189
+ resetColumnsToEvenWidth(api, list.id);
190
+ rebuildColumnResizers(api, list.id);
191
+ });
192
+
193
+ return created.listId;
194
+ };
195
+
196
+ /**
197
+ * Add ONE new `column` beside an existing `neighborColumnId` inside its
198
+ * `column_list`, then move the dragged `sourceIds` into it (in order).
199
+ *
200
+ * - side 'left' -> new column inserted before the neighbor
201
+ * - side 'right' -> new column inserted after the neighbor
202
+ *
203
+ * All work runs in a single undo entry via `transact`. Aborts (returns null,
204
+ * no mutation) when sources is empty or the neighbor is stale.
205
+ */
206
+ export const addColumnToList = (
207
+ api: API,
208
+ neighborColumnId: string,
209
+ sourceIds: string[],
210
+ side: ColumnDropSide
211
+ ): string | null => {
212
+ if (sourceIds.length === 0) {
213
+ return null;
214
+ }
215
+
216
+ const neighborIndex = api.blocks.getBlockIndex(neighborColumnId);
217
+
218
+ if (neighborIndex === undefined) {
219
+ return null;
220
+ }
221
+
222
+ for (const sourceId of sourceIds) {
223
+ if (api.blocks.getBlockIndex(sourceId) === undefined) {
224
+ return null;
225
+ }
226
+ }
227
+
228
+ const neighbor = api.blocks.getById(neighborColumnId);
229
+ const columnListId = neighbor?.parentId;
230
+
231
+ if (columnListId === undefined || columnListId === null) {
232
+ return null;
233
+ }
234
+
235
+ const insertIndex = side === 'left' ? neighborIndex : neighborIndex + 1;
236
+
237
+ const created: { columnId: string | null } = { columnId: null };
238
+
239
+ runTransacted(api, () => {
240
+ // A column is a typed block, so it is created with insert(COLUMN_TOOL) +
241
+ // setBlockParent. Columns are ordered among the list's children by relative
242
+ // flat index, so neighborIndex (left) / neighborIndex+1 (right) places the
243
+ // new column on the correct side after the nested re-sort.
244
+ const column = api.blocks.insert(COLUMN_TOOL, { noSeed: true }, {}, insertIndex, false, false);
245
+
246
+ created.columnId = column.id;
247
+
248
+ api.blocks.setBlockParent(column.id, columnListId);
249
+
250
+ for (const sourceId of sourceIds) {
251
+ api.blocks.setBlockParent(sourceId, column.id);
252
+ }
253
+
254
+ // A column was added, so the row re-splits evenly — the only non-resize
255
+ // case where widths recalculate.
256
+ resetColumnsToEvenWidth(api, columnListId);
257
+
258
+ // The list was already rendered, so its rendered() hook won't fire again to
259
+ // build a separator for the new column — rebuild the full N-1 set here.
260
+ rebuildColumnResizers(api, columnListId);
261
+ });
262
+
263
+ // Slide the new column in; siblings reflow to make room as its grow animates.
264
+ if (created.columnId !== null) {
265
+ const holder = api.blocks.getById(created.columnId)?.holder;
266
+
267
+ if (holder !== undefined) {
268
+ playColumnEnterAnimation(holder);
269
+ }
270
+ }
271
+
272
+ return created.columnId;
273
+ };
@@ -0,0 +1,142 @@
1
+ import type {
2
+ API,
3
+ BlockTool,
4
+ BlockToolConstructorOptions,
5
+ ToolboxConfig,
6
+ } from '../../../types';
7
+ import {
8
+ COLUMNS_ATTR,
9
+ COLUMN_TOOL,
10
+ buildColumnResizers,
11
+ } from '../columns-shared';
12
+ import { mountChildBlocks } from '../nested-blocks';
13
+ import { DATA_ATTR } from '../../components/constants/data-attributes';
14
+ import { twMerge } from '../../components/utils/tw';
15
+ import { buildIconColumnsCount } from '../../components/icons';
16
+ import type { ColumnListData } from './types';
17
+
18
+ /**
19
+ * ColumnList block — horizontal container that hosts column children.
20
+ * Created via slash-menu presets carrying a transient `columnCount` seed.
21
+ */
22
+ export class ColumnList implements BlockTool {
23
+ private readonly api: API;
24
+ private _data: ColumnListData;
25
+ private readonly blockId: string;
26
+ private readonly readOnly: boolean;
27
+ private container: HTMLElement | null = null;
28
+
29
+ constructor({ data, api, block, readOnly }: BlockToolConstructorOptions<ColumnListData>) {
30
+ this.api = api;
31
+ this._data = { ...data };
32
+ this.blockId = block.id;
33
+ this.readOnly = readOnly;
34
+ }
35
+
36
+ public render(): HTMLElement {
37
+ const container = document.createElement('div');
38
+
39
+ // Horizontal gutter comes from the resizer elements, not flex gap, so a
40
+ // separator can live in the space between columns. Keep a vertical gap for
41
+ // the responsive stacked layout.
42
+ container.className = twMerge('flex', 'flex-row', 'flex-wrap', 'gap-y-4', 'w-full');
43
+ container.setAttribute(COLUMNS_ATTR, '');
44
+ container.setAttribute('data-blok-testid', 'column-list');
45
+ container.setAttribute(DATA_ATTR.nestedBlocks, '');
46
+
47
+ this.container = container;
48
+
49
+ return container;
50
+ }
51
+
52
+ public rendered(): void {
53
+ if (this.container === null) {
54
+ return;
55
+ }
56
+
57
+ const children = this.api.blocks.getChildren(this.blockId);
58
+
59
+ if (children.length === 0) {
60
+ // Drag-beside inserts the list and then fills it with explicit columns,
61
+ // so it opts out of the default auto-seed via the transient noSeed flag.
62
+ if (this._data.noSeed !== true) {
63
+ this.seedColumns();
64
+ }
65
+
66
+ return;
67
+ }
68
+
69
+ mountChildBlocks(this.container, children);
70
+ buildColumnResizers(this.container, children.map(child => child.holder), this.readOnly, this.api, this.blockId);
71
+ }
72
+
73
+ private seedColumns(): void {
74
+ const container = this.container;
75
+
76
+ if (container === null) {
77
+ return;
78
+ }
79
+
80
+ const count = this._data.columnCount ?? 2;
81
+ const baseIndex = this.api.blocks.getBlockIndex(this.blockId);
82
+
83
+ if (baseIndex === undefined) {
84
+ return;
85
+ }
86
+
87
+ // Clear the transient seed so a later re-render never re-seeds.
88
+ this._data = { ...this._data, columnCount: undefined };
89
+
90
+ const columns = Array.from({ length: count }).map((_, i) => {
91
+ // Columns render asynchronously, so each column's rendered() hook seeds
92
+ // and focuses its paragraph after this loop returns — the LAST one would
93
+ // win the focus race. Tag every column except the first with noFocus so
94
+ // only the first column claims the caret, deterministically.
95
+ const column = this.api.blocks.insert(
96
+ COLUMN_TOOL,
97
+ { noFocus: i !== 0 },
98
+ {},
99
+ baseIndex + 1 + i,
100
+ false,
101
+ false
102
+ );
103
+
104
+ this.api.blocks.setBlockParent(column.id, this.blockId);
105
+ container.appendChild(column.holder);
106
+
107
+ return column;
108
+ });
109
+
110
+ buildColumnResizers(container, columns.map(column => column.holder), this.readOnly, this.api, this.blockId);
111
+ }
112
+
113
+ public save(): ColumnListData {
114
+ return {};
115
+ }
116
+
117
+ public validate(_data: ColumnListData): boolean {
118
+ return true;
119
+ }
120
+
121
+ public static get toolbox(): ToolboxConfig {
122
+ const base = {
123
+ searchTerms: ['columns', 'cols', 'layout', 'grid'],
124
+ searchTermKeys: ['columns', 'layout'],
125
+ };
126
+
127
+ return [2, 3, 4, 5].map(count => ({
128
+ ...base,
129
+ icon: buildIconColumnsCount(count),
130
+ titleKey: `tools.columns.col${count}`,
131
+ name: `column_list-${count}`,
132
+ data: { columnCount: count },
133
+ searchTerms: [...base.searchTerms, `${count}c`, `c${count}`],
134
+ }));
135
+ }
136
+
137
+ public static get isReadOnlySupported(): boolean {
138
+ return true;
139
+ }
140
+ }
141
+
142
+ export type { ColumnListData };
@@ -0,0 +1,17 @@
1
+ import type { BlockToolData } from '../../../types';
2
+
3
+ export interface ColumnListData extends BlockToolData {
4
+ /**
5
+ * Transient seed hint: how many columns to create on first render.
6
+ * Set only by toolbox presets; never persisted. The real structure
7
+ * lives in the block's contentIds (the column children).
8
+ */
9
+ columnCount?: number;
10
+
11
+ /**
12
+ * Transient flag: suppress the default column auto-seed on first render.
13
+ * Set by drag-beside (which inserts the column_list and then fills it with
14
+ * explicit columns); never persisted.
15
+ */
16
+ noSeed?: boolean;
17
+ }