@jackuait/blok 0.8.3-beta.4 → 0.9.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.mjs +2 -2
- package/dist/chunks/{blok-eDCl1y00.mjs → blok-RJ3hyzDH.mjs} +1012 -1000
- package/dist/chunks/{constants-Duj_CSIT.mjs → constants-A3iVmQL8.mjs} +55 -55
- package/dist/chunks/{i18next-loader-BCAGutUy.mjs → i18next-loader-dH3UPF7S.mjs} +1 -1
- package/dist/chunks/{lightweight-i18n-CNUuUkuo.mjs → lightweight-i18n-1rbaxIZW.mjs} +1 -0
- package/dist/{messages-Z8dpjy_K2.mjs → chunks/messages--eH7tTJV2.mjs} +1 -0
- package/dist/chunks/{messages-Dmxk7uOK.mjs → messages-0zhE8A9X.mjs} +1 -0
- package/dist/{messages-UpoT1AS6.mjs → chunks/messages-517llQmh.mjs} +1 -0
- package/dist/chunks/{messages-B-x11A7Z.mjs → messages-7uCUVFea.mjs} +1 -0
- package/dist/{messages-ItP2i78l.mjs → chunks/messages-B0t2L3bi.mjs} +1 -0
- package/dist/{messages-DkaJV53s2.mjs → chunks/messages-B1kDfIN82.mjs} +1 -0
- package/dist/{messages-DffJ5W5G.mjs → chunks/messages-BDvpl6Ox.mjs} +1 -0
- package/dist/{messages-CjCjr0wW.mjs → chunks/messages-BG8Nq35G.mjs} +1 -0
- package/dist/{messages-BMUQ7kA62.mjs → chunks/messages-BGE43_6M.mjs} +1 -0
- package/dist/chunks/{messages-K453lCht2.mjs → messages-BGssMBWM2.mjs} +1 -0
- package/dist/chunks/{messages-2i0z2hFq2.mjs → messages-BSw88lIo2.mjs} +1 -0
- package/dist/{messages-D0KBToO12.mjs → chunks/messages-BW8arxf72.mjs} +1 -0
- package/dist/chunks/{messages-D6EtVUzk2.mjs → messages-BkES2MDr2.mjs} +1 -0
- package/dist/chunks/{messages-CbilQw5o2.mjs → messages-BsZz1Hnn2.mjs} +1 -0
- package/dist/{messages-tFDVfvWL.mjs → chunks/messages-BtUqUzMG2.mjs} +1 -0
- package/dist/{messages-BvIBkUCG2.mjs → chunks/messages-BwKs-9DF.mjs} +1 -0
- package/dist/{messages-D2Xo8E0P.mjs → chunks/messages-C0hQPZmh2.mjs} +1 -0
- package/dist/{messages-rgXeOQMh2.mjs → chunks/messages-C4X0xP3h.mjs} +1 -0
- package/dist/chunks/{messages-DlSDBHih.mjs → messages-C4ZAJzBh.mjs} +1 -0
- package/dist/{messages-Bkv2sk7Y.mjs → chunks/messages-C5-aaU2b.mjs} +1 -0
- package/dist/{messages-BcrsCh5-2.mjs → chunks/messages-C7plNvNE2.mjs} +1 -0
- package/dist/{messages-Bn77ieXA.mjs → chunks/messages-C912bk5I.mjs} +1 -0
- package/dist/chunks/{messages-BRa1Itk_.mjs → messages-C9aKfCro.mjs} +1 -0
- package/dist/{messages-BD3lSUU_.mjs → chunks/messages-CCH4OETw2.mjs} +1 -0
- package/dist/{messages-BFbAM_pK2.mjs → chunks/messages-CFfpHyTU.mjs} +1 -0
- package/dist/{messages-C9AvcT0K.mjs → chunks/messages-CGh56r-H2.mjs} +1 -0
- package/dist/{messages-CWIigMhw2.mjs → chunks/messages-COJ0CbVV2.mjs} +1 -0
- package/dist/{messages-CH8tCpAX.mjs → chunks/messages-CTuCPqpJ.mjs} +1 -0
- package/dist/{messages-D7dJJ7dx.mjs → chunks/messages-CaRSYuhO.mjs} +1 -0
- package/dist/{messages-BXvE3YB4.mjs → chunks/messages-CjIA--kO.mjs} +1 -0
- package/dist/chunks/{messages-CEVMB1TN2.mjs → messages-ComLU2T32.mjs} +1 -0
- package/dist/chunks/{messages-DAhzpf-j.mjs → messages-CqZ9vFyx.mjs} +1 -0
- package/dist/chunks/{messages-CCywXuFz2.mjs → messages-Ct9UUOrl2.mjs} +1 -0
- package/dist/{messages-DaZkRhoM.mjs → chunks/messages-D2OZ9dbO.mjs} +1 -0
- package/dist/{messages-BZg8xxIT.mjs → chunks/messages-D8JFu42v.mjs} +1 -0
- package/dist/{messages-CJd52qP7.mjs → chunks/messages-DAbCNake2.mjs} +1 -0
- package/dist/{messages-Oqm_fCLp.mjs → chunks/messages-DHHZUf_H2.mjs} +1 -0
- package/dist/{messages-DFlT_TM02.mjs → chunks/messages-DJxXZi1D2.mjs} +1 -0
- package/dist/{messages-Cuw_6akN.mjs → chunks/messages-DKNULJpc.mjs} +1 -0
- package/dist/chunks/{messages-CTtFH-AE.mjs → messages-DLPrj3Dh.mjs} +1 -0
- package/dist/{messages-D5Uk_qYf.mjs → chunks/messages-DQ6bFum9.mjs} +1 -0
- package/dist/chunks/{messages-DVDFAJaw.mjs → messages-DRUkmDVZ.mjs} +1 -0
- package/dist/chunks/{messages-D1eXOdyJ.mjs → messages-DZzoT0T_.mjs} +1 -0
- package/dist/chunks/{messages-B3VMWaO8.mjs → messages-D_6vPBzT.mjs} +1 -0
- package/dist/{messages-Bgu3IB_k.mjs → chunks/messages-Da-SOTFW.mjs} +1 -0
- package/dist/{messages-CY_Fj715.mjs → chunks/messages-DdEWnfAR.mjs} +1 -0
- package/dist/chunks/{messages-CF7WlKOY.mjs → messages-DeSSxLsh.mjs} +1 -0
- package/dist/chunks/{messages-CqoOMgIb2.mjs → messages-Df2RYuup2.mjs} +1 -0
- package/dist/chunks/{messages-CDZrOiaR.mjs → messages-DfU4yvkL.mjs} +1 -0
- package/dist/{messages-D8SS2hOs2.mjs → chunks/messages-Dkp-Eyu02.mjs} +1 -0
- package/dist/chunks/{messages-qt_Tsj1u2.mjs → messages-Dl03jd4b2.mjs} +1 -0
- package/dist/chunks/{messages-LGqROvB5.mjs → messages-Dl6SVT1Z.mjs} +1 -0
- package/dist/{messages-ikSI7M732.mjs → chunks/messages-DmJf9laH2.mjs} +1 -0
- package/dist/chunks/{messages-CTI66ZU52.mjs → messages-DngM4hda2.mjs} +1 -0
- package/dist/{messages-Bf0eqjDJ.mjs → chunks/messages-DnuhgHG0.mjs} +1 -0
- package/dist/chunks/{messages-Cqxe2gIN.mjs → messages-Dsapm4K9.mjs} +1 -0
- package/dist/chunks/{messages-BHMUmX3N.mjs → messages-DxtnwNPo.mjs} +1 -0
- package/dist/chunks/{messages-lu4RI1A3.mjs → messages-Dyku8Cut.mjs} +1 -0
- package/dist/chunks/{messages-ByeBRHpJ.mjs → messages-OdEuBvgf.mjs} +1 -0
- package/dist/{messages-Cr2hTJyi2.mjs → chunks/messages-Yj4Q1_uX2.mjs} +1 -0
- package/dist/chunks/{messages-SOew8O6I.mjs → messages-Z762-GLL.mjs} +1 -0
- package/dist/{messages-DlEdd01l2.mjs → chunks/messages-_5Pg5fKy2.mjs} +1 -0
- package/dist/chunks/{messages-B2Xnfn7m2.mjs → messages-cegxHurd2.mjs} +1 -0
- package/dist/chunks/{messages-CLcwMAAe.mjs → messages-gaxTO-87.mjs} +1 -0
- package/dist/{messages-CGD9LR8l.mjs → chunks/messages-qS8tM3Dk.mjs} +1 -0
- package/dist/chunks/{messages-fdO2V2XC.mjs → messages-v9NkxRcL.mjs} +1 -0
- package/dist/chunks/{messages-B6n2OYKJ.mjs → messages-zGdqNZbH.mjs} +1 -0
- package/dist/chunks/{tools-BG9c26dK.mjs → tools-nT6zA9QL.mjs} +722 -682
- package/dist/full.mjs +11 -11
- package/dist/locales.mjs +68 -67
- package/dist/{chunks/messages-CyrZJ9dG.mjs → messages-3WhPEFd7.mjs} +1 -0
- package/dist/{messages-C5MKR_WT2.mjs → messages-A8aZS7d_2.mjs} +1 -0
- package/dist/{chunks/messages-4epWYTzK.mjs → messages-B2YeJw8s2.mjs} +1 -0
- package/dist/{chunks/messages-D2QcrPYF.mjs → messages-B2ZwD4n9.mjs} +1 -0
- package/dist/{messages-DAjtVSb6.mjs → messages-B3jq5Hpa.mjs} +1 -0
- package/dist/{chunks/messages-B38lWmza.mjs → messages-B7jZvo-m.mjs} +1 -0
- package/dist/{chunks/messages-Dxa27UhV2.mjs → messages-BE0DjTEC.mjs} +1 -0
- package/dist/{chunks/messages-PDaWSrFT.mjs → messages-BLEVLZve.mjs} +1 -0
- package/dist/{messages-Dd4OTpH3.mjs → messages-BPRR6TMf.mjs} +1 -0
- package/dist/{messages--PYnorLu2.mjs → messages-BRcLIBCd2.mjs} +1 -0
- package/dist/{chunks/messages-Dqoj0eKD2.mjs → messages-BRxNqmJ8.mjs} +1 -0
- package/dist/{messages-ierNgYE02.mjs → messages-BSLErTnW2.mjs} +1 -0
- package/dist/{chunks/messages-cjqgX4JV2.mjs → messages-BfTBVFd9.mjs} +1 -0
- package/dist/{messages-CIGa1j8-2.mjs → messages-Bm0nvUuj2.mjs} +1 -0
- package/dist/{chunks/messages-C35b_LVM.mjs → messages-BmnC-s4X.mjs} +1 -0
- package/dist/{messages-Dc93MR86.mjs → messages-Bsd4ruEY.mjs} +1 -0
- package/dist/{chunks/messages-DvZa_OtS2.mjs → messages-BxJv0qBn2.mjs} +1 -0
- package/dist/{messages-DjWAR34D.mjs → messages-C-4z1-Dh.mjs} +1 -0
- package/dist/{messages-C6UkeZ0y.mjs → messages-C52AiyVV.mjs} +1 -0
- package/dist/{chunks/messages-D7qp-JvC.mjs → messages-C5pBfa_W.mjs} +1 -0
- package/dist/{messages-olK9oNtb.mjs → messages-C6WJx6Z0.mjs} +1 -0
- package/dist/{messages-BRJBZB-H2.mjs → messages-C6o0FVy02.mjs} +1 -0
- package/dist/{messages-D9a5iSFC2.mjs → messages-C8JVJUp12.mjs} +1 -0
- package/dist/{chunks/messages-Bo2PcQoc.mjs → messages-C8ca-jEa.mjs} +1 -0
- package/dist/{messages-B2X5gO-s.mjs → messages-COgvIEeW.mjs} +1 -0
- package/dist/{messages-CqbeAhjH.mjs → messages-CUDbNJG5.mjs} +1 -0
- package/dist/{messages-DPECmAwT.mjs → messages-CZTcgUzd.mjs} +1 -0
- package/dist/{messages-Dl7LQ_fI.mjs → messages-CbVilNPE.mjs} +1 -0
- package/dist/{chunks/messages-B847kJa02.mjs → messages-CdX1odk_2.mjs} +1 -0
- package/dist/{chunks/messages-CTGjizuJ2.mjs → messages-Cnz_SHE32.mjs} +1 -0
- package/dist/{messages-C_YAmOyQ.mjs → messages-CoCy2JIP.mjs} +1 -0
- package/dist/{chunks/messages-BN78Am3l2.mjs → messages-Cpeko5kB.mjs} +1 -0
- package/dist/{chunks/messages-DEVxqfH0.mjs → messages-Ct468oX22.mjs} +1 -0
- package/dist/{chunks/messages-DJ_gZym52.mjs → messages-CvIxHHp92.mjs} +1 -0
- package/dist/{chunks/messages-BrsB1FRe.mjs → messages-CxHn7cs2.mjs} +1 -0
- package/dist/{chunks/messages-xG65ERBM2.mjs → messages-CxruHsuD2.mjs} +1 -0
- package/dist/{chunks/messages-B1mCwtgm2.mjs → messages-D1P0QGLz2.mjs} +1 -0
- package/dist/{chunks/messages-CiSiPyKp.mjs → messages-D2HwpoUE.mjs} +1 -0
- package/dist/{chunks/messages-Kqu8QyYy2.mjs → messages-D2Mf9z2D.mjs} +1 -0
- package/dist/{messages-DUPXmcZh.mjs → messages-D4mCIODv.mjs} +1 -0
- package/dist/{chunks/messages-DHJIlD2m.mjs → messages-D6qfWi6H2.mjs} +1 -0
- package/dist/{chunks/messages-Dc2wd0BC2.mjs → messages-DL000FUf2.mjs} +1 -0
- package/dist/{messages-DBuHaabF2.mjs → messages-DNAp0U4l2.mjs} +1 -0
- package/dist/{messages-DR2Lgl002.mjs → messages-DSX2HaeN2.mjs} +1 -0
- package/dist/{messages-Buf_f_-32.mjs → messages-DT4rHATO2.mjs} +1 -0
- package/dist/{chunks/messages-BleThZm5.mjs → messages-DTNfG4ZH.mjs} +1 -0
- package/dist/{messages-DCjAu6M72.mjs → messages-D_CUdqU12.mjs} +1 -0
- package/dist/{messages-DVReQ5EC.mjs → messages-DaOnbI6d.mjs} +1 -0
- package/dist/{chunks/messages-uQOWdLDn2.mjs → messages-Dbsx9m5q2.mjs} +1 -0
- package/dist/{chunks/messages-CxKX6wTt.mjs → messages-DdiPWkV8.mjs} +1 -0
- package/dist/{chunks/messages-CBa6-NHn.mjs → messages-DfEPVRdJ.mjs} +1 -0
- package/dist/{chunks/messages-DvUNk-e7.mjs → messages-DfXh-i9o.mjs} +1 -0
- package/dist/{chunks/messages-Bqk7cuZY.mjs → messages-DgGZsxBB.mjs} +1 -0
- package/dist/{chunks/messages-ClD_3Kmk.mjs → messages-DpGo_Da5.mjs} +1 -0
- package/dist/{chunks/messages-CAH4L_Mq2.mjs → messages-Dtih3ffa2.mjs} +1 -0
- package/dist/{chunks/messages-DYQ87v5m.mjs → messages-Du62vI49.mjs} +1 -0
- package/dist/{messages-CC596_yM.mjs → messages-HNAtlVax.mjs} +1 -0
- package/dist/{messages-Bw0kGTAV.mjs → messages-I03yFhup.mjs} +1 -0
- package/dist/{messages-syo0DKqf.mjs → messages-O6z1uabG.mjs} +1 -0
- package/dist/{chunks/messages-LiQ7ni4i2.mjs → messages-Phrqr7a6.mjs} +1 -0
- package/dist/{messages-B_idm-Pp.mjs → messages-VBFioL2M.mjs} +1 -0
- package/dist/{messages-BTFWPbHk2.mjs → messages-cokJPuUp2.mjs} +1 -0
- package/dist/{chunks/messages-B8nL5cPA2.mjs → messages-diSPQ2Da2.mjs} +1 -0
- package/dist/{chunks/messages-DMENc4jZ.mjs → messages-sNSXCkeB.mjs} +1 -0
- package/dist/{messages-CJ5pCncM.mjs → messages-yZj20Fvf.mjs} +1 -0
- package/dist/{messages-BR1Hlhdc2.mjs → messages-ypuLZyw12.mjs} +1 -0
- package/dist/{chunks/messages-JQR7Z2f0.mjs → messages-zHkURG6V2.mjs} +1 -0
- package/dist/react.mjs +2 -2
- package/dist/tools.mjs +3 -3
- package/package.json +1 -1
- package/src/components/i18n/locales/am/messages.json +1 -0
- package/src/components/i18n/locales/ar/messages.json +1 -0
- package/src/components/i18n/locales/az/messages.json +1 -0
- package/src/components/i18n/locales/bg/messages.json +1 -0
- package/src/components/i18n/locales/bn/messages.json +1 -0
- package/src/components/i18n/locales/bs/messages.json +1 -0
- package/src/components/i18n/locales/cs/messages.json +1 -0
- package/src/components/i18n/locales/da/messages.json +1 -0
- package/src/components/i18n/locales/de/messages.json +1 -0
- package/src/components/i18n/locales/dv/messages.json +1 -0
- package/src/components/i18n/locales/el/messages.json +1 -0
- package/src/components/i18n/locales/en/messages.json +1 -0
- package/src/components/i18n/locales/es/messages.json +1 -0
- package/src/components/i18n/locales/et/messages.json +1 -0
- package/src/components/i18n/locales/fa/messages.json +1 -0
- package/src/components/i18n/locales/fi/messages.json +1 -0
- package/src/components/i18n/locales/fil/messages.json +1 -0
- package/src/components/i18n/locales/fr/messages.json +1 -0
- package/src/components/i18n/locales/gu/messages.json +1 -0
- package/src/components/i18n/locales/he/messages.json +1 -0
- package/src/components/i18n/locales/hi/messages.json +1 -0
- package/src/components/i18n/locales/hr/messages.json +1 -0
- package/src/components/i18n/locales/hu/messages.json +1 -0
- package/src/components/i18n/locales/hy/messages.json +1 -0
- package/src/components/i18n/locales/id/messages.json +1 -0
- package/src/components/i18n/locales/it/messages.json +1 -0
- package/src/components/i18n/locales/ja/messages.json +1 -0
- package/src/components/i18n/locales/ka/messages.json +1 -0
- package/src/components/i18n/locales/km/messages.json +1 -0
- package/src/components/i18n/locales/kn/messages.json +1 -0
- package/src/components/i18n/locales/ko/messages.json +1 -0
- package/src/components/i18n/locales/ku/messages.json +1 -0
- package/src/components/i18n/locales/lo/messages.json +1 -0
- package/src/components/i18n/locales/lt/messages.json +1 -0
- package/src/components/i18n/locales/lv/messages.json +1 -0
- package/src/components/i18n/locales/mk/messages.json +1 -0
- package/src/components/i18n/locales/ml/messages.json +1 -0
- package/src/components/i18n/locales/mn/messages.json +1 -0
- package/src/components/i18n/locales/mr/messages.json +1 -0
- package/src/components/i18n/locales/ms/messages.json +1 -0
- package/src/components/i18n/locales/my/messages.json +1 -0
- package/src/components/i18n/locales/ne/messages.json +1 -0
- package/src/components/i18n/locales/nl/messages.json +1 -0
- package/src/components/i18n/locales/no/messages.json +1 -0
- package/src/components/i18n/locales/pa/messages.json +1 -0
- package/src/components/i18n/locales/pl/messages.json +1 -0
- package/src/components/i18n/locales/ps/messages.json +1 -0
- package/src/components/i18n/locales/pt/messages.json +1 -0
- package/src/components/i18n/locales/ro/messages.json +1 -0
- package/src/components/i18n/locales/ru/messages.json +1 -0
- package/src/components/i18n/locales/sd/messages.json +1 -0
- package/src/components/i18n/locales/si/messages.json +1 -0
- package/src/components/i18n/locales/sk/messages.json +1 -0
- package/src/components/i18n/locales/sl/messages.json +1 -0
- package/src/components/i18n/locales/sq/messages.json +1 -0
- package/src/components/i18n/locales/sr/messages.json +1 -0
- package/src/components/i18n/locales/sv/messages.json +1 -0
- package/src/components/i18n/locales/sw/messages.json +1 -0
- package/src/components/i18n/locales/ta/messages.json +1 -0
- package/src/components/i18n/locales/te/messages.json +1 -0
- package/src/components/i18n/locales/th/messages.json +1 -0
- package/src/components/i18n/locales/tr/messages.json +1 -0
- package/src/components/i18n/locales/ug/messages.json +1 -0
- package/src/components/i18n/locales/uk/messages.json +1 -0
- package/src/components/i18n/locales/ur/messages.json +1 -0
- package/src/components/i18n/locales/vi/messages.json +1 -0
- package/src/components/i18n/locales/yi/messages.json +1 -0
- package/src/components/i18n/locales/zh/messages.json +1 -0
- package/src/components/icons/index.ts +7 -0
- package/src/components/modules/blockEvents/composers/markdownShortcuts.ts +65 -2
- package/src/components/modules/blockEvents/constants.ts +11 -0
- package/src/components/utils/data-model-transform.ts +8 -6
- package/src/styles/main.css +6 -4
- package/src/tools/callout/constants.ts +1 -1
- package/src/tools/callout/emoji-picker/index.ts +0 -3
- package/src/tools/divider/index.ts +96 -0
- package/src/tools/divider/types.ts +6 -0
- package/src/tools/index.ts +2 -0
- package/types/tools/divider.d.ts +11 -0
- package/types/tools-entry.d.ts +9 -3
|
@@ -87,6 +87,7 @@
|
|
|
87
87
|
"toolNames.underline": "မျဉ်းသား",
|
|
88
88
|
"toolNames.strikethrough": "ဖျက်မျဉ်း",
|
|
89
89
|
"toolNames.callout": "မှတ်သားချက်",
|
|
90
|
+
"toolNames.divider": "ပိုင်းခြားမျဉ်း",
|
|
90
91
|
"tools.callout.placeholder": "မှတ်သားချက်",
|
|
91
92
|
"tools.callout.addEmoji": "အီမိုဂျီထည့်",
|
|
92
93
|
"tools.callout.editIcon": "အိုင်ကွန် တည်းဖြတ်",
|
|
@@ -87,6 +87,7 @@
|
|
|
87
87
|
"toolNames.underline": "रेखांकन",
|
|
88
88
|
"toolNames.strikethrough": "स्ट्राइकथ्रु",
|
|
89
89
|
"toolNames.callout": "कलआउट",
|
|
90
|
+
"toolNames.divider": "विभाजक",
|
|
90
91
|
"tools.callout.placeholder": "कलआउट",
|
|
91
92
|
"tools.callout.addEmoji": "इमोजी थप्नुहोस्",
|
|
92
93
|
"tools.callout.editIcon": "आइकन सम्पादन गर्नुहोस्",
|
|
@@ -87,6 +87,7 @@
|
|
|
87
87
|
"toolNames.underline": "Onderstrepen",
|
|
88
88
|
"toolNames.strikethrough": "Doorhalen",
|
|
89
89
|
"toolNames.callout": "Toelichting",
|
|
90
|
+
"toolNames.divider": "Scheidingslijn",
|
|
90
91
|
"tools.callout.placeholder": "Toelichting",
|
|
91
92
|
"tools.callout.addEmoji": "Emoji toevoegen",
|
|
92
93
|
"tools.callout.editIcon": "Pictogram bewerken",
|
|
@@ -87,6 +87,7 @@
|
|
|
87
87
|
"toolNames.underline": "Understreking",
|
|
88
88
|
"toolNames.strikethrough": "Gjennomstreking",
|
|
89
89
|
"toolNames.callout": "Merknad",
|
|
90
|
+
"toolNames.divider": "Skillelinje",
|
|
90
91
|
"tools.callout.placeholder": "Merknad",
|
|
91
92
|
"tools.callout.addEmoji": "Legg til emoji",
|
|
92
93
|
"tools.callout.editIcon": "Rediger ikon",
|
|
@@ -87,6 +87,7 @@
|
|
|
87
87
|
"toolNames.underline": "ਅੰਡਰਲਾਈਨ",
|
|
88
88
|
"toolNames.strikethrough": "ਸਟ੍ਰਾਈਕਥਰੂ",
|
|
89
89
|
"toolNames.callout": "ਕਾਲਆਊਟ",
|
|
90
|
+
"toolNames.divider": "ਵੰਡਣਹਾਰਾ",
|
|
90
91
|
"tools.callout.placeholder": "ਕਾਲਆਊਟ",
|
|
91
92
|
"tools.callout.addEmoji": "ਇਮੋਜੀ ਜੋੜੋ",
|
|
92
93
|
"tools.callout.editIcon": "ਆਈਕਨ ਸੰਪਾਦਿਤ ਕਰੋ",
|
|
@@ -87,6 +87,7 @@
|
|
|
87
87
|
"toolNames.underline": "Podkreślenie",
|
|
88
88
|
"toolNames.strikethrough": "Przekreślenie",
|
|
89
89
|
"toolNames.callout": "Objaśnienie",
|
|
90
|
+
"toolNames.divider": "Separator",
|
|
90
91
|
"tools.callout.placeholder": "Objaśnienie",
|
|
91
92
|
"tools.callout.addEmoji": "Dodaj emoji",
|
|
92
93
|
"tools.callout.editIcon": "Edytuj ikonę",
|
|
@@ -87,6 +87,7 @@
|
|
|
87
87
|
"toolNames.underline": "کرښنلیک",
|
|
88
88
|
"toolNames.strikethrough": "پرېکړلیک",
|
|
89
89
|
"toolNames.callout": "یادونه",
|
|
90
|
+
"toolNames.divider": "بېلونکی",
|
|
90
91
|
"tools.callout.placeholder": "یادونه",
|
|
91
92
|
"tools.callout.addEmoji": "ایموجي اضافه کړئ",
|
|
92
93
|
"tools.callout.editIcon": "آیکون سمون",
|
|
@@ -87,6 +87,7 @@
|
|
|
87
87
|
"toolNames.underline": "Sublinhado",
|
|
88
88
|
"toolNames.strikethrough": "Tachado",
|
|
89
89
|
"toolNames.callout": "Destaque",
|
|
90
|
+
"toolNames.divider": "Divisor",
|
|
90
91
|
"tools.callout.placeholder": "Destaque",
|
|
91
92
|
"tools.callout.addEmoji": "Adicionar emoji",
|
|
92
93
|
"tools.callout.editIcon": "Editar ícone",
|
|
@@ -87,6 +87,7 @@
|
|
|
87
87
|
"toolNames.underline": "Subliniat",
|
|
88
88
|
"toolNames.strikethrough": "Tăiat",
|
|
89
89
|
"toolNames.callout": "Evidențiere",
|
|
90
|
+
"toolNames.divider": "Separator",
|
|
90
91
|
"tools.callout.placeholder": "Evidențiere",
|
|
91
92
|
"tools.callout.addEmoji": "Adaugă emoji",
|
|
92
93
|
"tools.callout.editIcon": "Editează pictograma",
|
|
@@ -87,6 +87,7 @@
|
|
|
87
87
|
"toolNames.underline": "Подчёркнутый",
|
|
88
88
|
"toolNames.strikethrough": "Зачёркнутый",
|
|
89
89
|
"toolNames.callout": "Выноска",
|
|
90
|
+
"toolNames.divider": "Разделитель",
|
|
90
91
|
"tools.callout.placeholder": "Выноска",
|
|
91
92
|
"tools.callout.addEmoji": "Добавить эмодзи",
|
|
92
93
|
"tools.callout.editIcon": "Изменить иконку",
|
|
@@ -87,6 +87,7 @@
|
|
|
87
87
|
"toolNames.underline": "هيٺ لڪير",
|
|
88
88
|
"toolNames.strikethrough": "وچ لڪير",
|
|
89
89
|
"toolNames.callout": "نوٽ",
|
|
90
|
+
"toolNames.divider": "ورهائيندڙ",
|
|
90
91
|
"tools.callout.placeholder": "نوٽ",
|
|
91
92
|
"tools.callout.addEmoji": "ايموجي شامل ڪريو",
|
|
92
93
|
"tools.callout.editIcon": "آئیکن تبديل ڪريو",
|
|
@@ -87,6 +87,7 @@
|
|
|
87
87
|
"toolNames.underline": "යටිරේඛනය",
|
|
88
88
|
"toolNames.strikethrough": "ඉරිතැලීම",
|
|
89
89
|
"toolNames.callout": "කෝලවුට්",
|
|
90
|
+
"toolNames.divider": "බෙදුම්කරු",
|
|
90
91
|
"tools.callout.placeholder": "කෝලවුට්",
|
|
91
92
|
"tools.callout.addEmoji": "ඉමෝජි එක් කරන්න",
|
|
92
93
|
"tools.callout.editIcon": "නිරූපකය සංස්කරණය කරන්න",
|
|
@@ -87,6 +87,7 @@
|
|
|
87
87
|
"toolNames.underline": "Podčiarknuté",
|
|
88
88
|
"toolNames.strikethrough": "Prečiarknuté",
|
|
89
89
|
"toolNames.callout": "Popisok",
|
|
90
|
+
"toolNames.divider": "Oddeľovač",
|
|
90
91
|
"tools.callout.placeholder": "Popisok",
|
|
91
92
|
"tools.callout.addEmoji": "Pridať emoji",
|
|
92
93
|
"tools.callout.editIcon": "Upraviť ikonu",
|
|
@@ -87,6 +87,7 @@
|
|
|
87
87
|
"toolNames.underline": "Podčrtano",
|
|
88
88
|
"toolNames.strikethrough": "Prečrtano",
|
|
89
89
|
"toolNames.callout": "Opomba",
|
|
90
|
+
"toolNames.divider": "Ločilnik",
|
|
90
91
|
"tools.callout.placeholder": "Opomba",
|
|
91
92
|
"tools.callout.addEmoji": "Dodaj emoji",
|
|
92
93
|
"tools.callout.editIcon": "Uredi ikono",
|
|
@@ -87,6 +87,7 @@
|
|
|
87
87
|
"toolNames.underline": "Nënvizim",
|
|
88
88
|
"toolNames.strikethrough": "Vizë përmes",
|
|
89
89
|
"toolNames.callout": "Theksim",
|
|
90
|
+
"toolNames.divider": "Ndarës",
|
|
90
91
|
"tools.callout.placeholder": "Theksim",
|
|
91
92
|
"tools.callout.addEmoji": "Shto emoji",
|
|
92
93
|
"tools.callout.editIcon": "Ndrysho ikonën",
|
|
@@ -87,6 +87,7 @@
|
|
|
87
87
|
"toolNames.underline": "Подвучено",
|
|
88
88
|
"toolNames.strikethrough": "Прецртано",
|
|
89
89
|
"toolNames.callout": "Истакнуто",
|
|
90
|
+
"toolNames.divider": "Раздвајач",
|
|
90
91
|
"tools.callout.placeholder": "Истакнуто",
|
|
91
92
|
"tools.callout.addEmoji": "Додај емоџи",
|
|
92
93
|
"tools.callout.editIcon": "Уреди икону",
|
|
@@ -87,6 +87,7 @@
|
|
|
87
87
|
"toolNames.underline": "Understrykning",
|
|
88
88
|
"toolNames.strikethrough": "Genomstrykning",
|
|
89
89
|
"toolNames.callout": "Notering",
|
|
90
|
+
"toolNames.divider": "Avdelare",
|
|
90
91
|
"tools.callout.placeholder": "Notering",
|
|
91
92
|
"tools.callout.addEmoji": "Lägg till emoji",
|
|
92
93
|
"tools.callout.editIcon": "Redigera ikon",
|
|
@@ -87,6 +87,7 @@
|
|
|
87
87
|
"toolNames.underline": "Mstari chini",
|
|
88
88
|
"toolNames.strikethrough": "Mstari katikati",
|
|
89
89
|
"toolNames.callout": "Angazio",
|
|
90
|
+
"toolNames.divider": "Kigawanyo",
|
|
90
91
|
"tools.callout.placeholder": "Angazio",
|
|
91
92
|
"tools.callout.addEmoji": "Ongeza emoji",
|
|
92
93
|
"tools.callout.editIcon": "Hariri ikoni",
|
|
@@ -87,6 +87,7 @@
|
|
|
87
87
|
"toolNames.underline": "அடிக்கோடு",
|
|
88
88
|
"toolNames.strikethrough": "நடுக்கோடு",
|
|
89
89
|
"toolNames.callout": "குறிப்புப்பெட்டி",
|
|
90
|
+
"toolNames.divider": "பிரிப்பான்",
|
|
90
91
|
"tools.callout.placeholder": "குறிப்புப்பெட்டி",
|
|
91
92
|
"tools.callout.addEmoji": "இமோஜி சேர்",
|
|
92
93
|
"tools.callout.editIcon": "ஐகானைத் திருத்து",
|
|
@@ -87,6 +87,7 @@
|
|
|
87
87
|
"toolNames.underline": "అండర్లైన్",
|
|
88
88
|
"toolNames.strikethrough": "స్ట్రైక్త్రూ",
|
|
89
89
|
"toolNames.callout": "కాలౌట్",
|
|
90
|
+
"toolNames.divider": "విభజకం",
|
|
90
91
|
"tools.callout.placeholder": "కాలౌట్",
|
|
91
92
|
"tools.callout.addEmoji": "ఇమోజీ జోడించండి",
|
|
92
93
|
"tools.callout.editIcon": "చిహ్నాన్ని సవరించండి",
|
|
@@ -87,6 +87,7 @@
|
|
|
87
87
|
"toolNames.underline": "ขีดเส้นใต้",
|
|
88
88
|
"toolNames.strikethrough": "ขีดทับ",
|
|
89
89
|
"toolNames.callout": "กล่องเน้น",
|
|
90
|
+
"toolNames.divider": "เส้นคั่น",
|
|
90
91
|
"tools.callout.placeholder": "กล่องเน้น",
|
|
91
92
|
"tools.callout.addEmoji": "เพิ่มอีโมจิ",
|
|
92
93
|
"tools.callout.editIcon": "แก้ไขไอคอน",
|
|
@@ -87,6 +87,7 @@
|
|
|
87
87
|
"toolNames.underline": "Altı çizili",
|
|
88
88
|
"toolNames.strikethrough": "Üstü çizili",
|
|
89
89
|
"toolNames.callout": "Bilgi kutusu",
|
|
90
|
+
"toolNames.divider": "Ayırıcı",
|
|
90
91
|
"tools.callout.placeholder": "Bilgi kutusu",
|
|
91
92
|
"tools.callout.addEmoji": "Emoji ekle",
|
|
92
93
|
"tools.callout.editIcon": "Simgeyi düzenle",
|
|
@@ -87,6 +87,7 @@
|
|
|
87
87
|
"toolNames.underline": "ئاستى سىزىق",
|
|
88
88
|
"toolNames.strikethrough": "ئۆچۈرۈش سىزىقى",
|
|
89
89
|
"toolNames.callout": "ئەسكەرتىش",
|
|
90
|
+
"toolNames.divider": "بۆلگۈچ",
|
|
90
91
|
"tools.callout.placeholder": "ئەسكەرتىش",
|
|
91
92
|
"tools.callout.addEmoji": "ئېموجى قوشۇش",
|
|
92
93
|
"tools.callout.editIcon": "سىنبەلگە تەھرىرلەش",
|
|
@@ -87,6 +87,7 @@
|
|
|
87
87
|
"toolNames.underline": "Підкреслений",
|
|
88
88
|
"toolNames.strikethrough": "Закреслений",
|
|
89
89
|
"toolNames.callout": "Виноска",
|
|
90
|
+
"toolNames.divider": "Роздільник",
|
|
90
91
|
"tools.callout.placeholder": "Виноска",
|
|
91
92
|
"tools.callout.addEmoji": "Додати емодзі",
|
|
92
93
|
"tools.callout.editIcon": "Редагувати іконку",
|
|
@@ -87,6 +87,7 @@
|
|
|
87
87
|
"toolNames.underline": "خط کشیدہ",
|
|
88
88
|
"toolNames.strikethrough": "کٹا ہوا",
|
|
89
89
|
"toolNames.callout": "نوٹ",
|
|
90
|
+
"toolNames.divider": "تقسیم کار",
|
|
90
91
|
"tools.callout.placeholder": "نوٹ",
|
|
91
92
|
"tools.callout.addEmoji": "ایموجی شامل کریں",
|
|
92
93
|
"tools.callout.editIcon": "آئیکن ترمیم کریں",
|
|
@@ -87,6 +87,7 @@
|
|
|
87
87
|
"toolNames.underline": "Gạch chân",
|
|
88
88
|
"toolNames.strikethrough": "Gạch ngang",
|
|
89
89
|
"toolNames.callout": "Chú thích",
|
|
90
|
+
"toolNames.divider": "Đường phân cách",
|
|
90
91
|
"tools.callout.placeholder": "Chú thích",
|
|
91
92
|
"tools.callout.addEmoji": "Thêm biểu tượng",
|
|
92
93
|
"tools.callout.editIcon": "Chỉnh sửa biểu tượng",
|
|
@@ -87,6 +87,7 @@
|
|
|
87
87
|
"toolNames.underline": "אונטערשטרייכן",
|
|
88
88
|
"toolNames.strikethrough": "דורכשטרייכן",
|
|
89
89
|
"toolNames.callout": "באַמערקונג",
|
|
90
|
+
"toolNames.divider": "טיילער",
|
|
90
91
|
"tools.callout.placeholder": "באַמערקונג",
|
|
91
92
|
"tools.callout.addEmoji": "צולייגן עמאָדזשי",
|
|
92
93
|
"tools.callout.editIcon": "רעדאַקטירן בילדל",
|
|
@@ -441,6 +441,13 @@ export const IconPaintRoller = `<svg xmlns="http://www.w3.org/2000/svg" width="2
|
|
|
441
441
|
<rect x="8" y="14" width="3" height="3.5" rx="0.75" stroke="currentColor" stroke-width="1.25"/>
|
|
442
442
|
</svg>`;
|
|
443
443
|
|
|
444
|
+
// Divider icon
|
|
445
|
+
export const IconDivider = `
|
|
446
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
447
|
+
<path d="M4 10h12" stroke="currentColor" stroke-width="1.25" stroke-linecap="round"/>
|
|
448
|
+
</svg>
|
|
449
|
+
`;
|
|
450
|
+
|
|
444
451
|
// Emoji Picker Category Icons
|
|
445
452
|
|
|
446
453
|
// Star icon (Callout category)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Block } from '../../../block';
|
|
2
|
-
import { HEADER_PATTERN, CHECKLIST_PATTERN, UNORDERED_LIST_PATTERN, ORDERED_LIST_PATTERN, TOGGLE_HEADER_PATTERN, TOGGLE_PATTERN, HEADER_TOOL_NAME, LIST_TOOL_NAME, TOGGLE_TOOL_NAME } from '../constants';
|
|
2
|
+
import { HEADER_PATTERN, CHECKLIST_PATTERN, UNORDERED_LIST_PATTERN, ORDERED_LIST_PATTERN, TOGGLE_HEADER_PATTERN, TOGGLE_PATTERN, HEADER_TOOL_NAME, LIST_TOOL_NAME, TOGGLE_TOOL_NAME, DIVIDER_TOOL_NAME, DIVIDER_PATTERN } from '../constants';
|
|
3
3
|
|
|
4
4
|
import { BlockEventComposer } from './__base';
|
|
5
5
|
|
|
@@ -20,7 +20,18 @@ export class MarkdownShortcuts extends BlockEventComposer {
|
|
|
20
20
|
* @returns true if a shortcut was triggered and handled
|
|
21
21
|
*/
|
|
22
22
|
public handleInput(event: InputEvent): boolean {
|
|
23
|
-
if (event.inputType !== 'insertText'
|
|
23
|
+
if (event.inputType !== 'insertText') {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Divider shortcut triggers on the third hyphen — no space needed.
|
|
29
|
+
*/
|
|
30
|
+
if (event.data === '-') {
|
|
31
|
+
return this.handleDividerShortcut();
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
if (event.data !== ' ') {
|
|
24
35
|
return false;
|
|
25
36
|
}
|
|
26
37
|
|
|
@@ -339,6 +350,58 @@ export class MarkdownShortcuts extends BlockEventComposer {
|
|
|
339
350
|
return true;
|
|
340
351
|
}
|
|
341
352
|
|
|
353
|
+
/**
|
|
354
|
+
* Check if current block content is exactly "---" and convert to divider.
|
|
355
|
+
* Unlike other shortcuts, this triggers on the third hyphen keystroke — no space needed.
|
|
356
|
+
*/
|
|
357
|
+
private handleDividerShortcut(): boolean {
|
|
358
|
+
const { BlockManager, Tools, Caret } = this.Blok;
|
|
359
|
+
const currentBlock = BlockManager.currentBlock;
|
|
360
|
+
|
|
361
|
+
if (!currentBlock) {
|
|
362
|
+
return false;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
if (!currentBlock.tool.isDefault) {
|
|
366
|
+
return false;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
const dividerTool = Tools.blockTools.get(DIVIDER_TOOL_NAME);
|
|
370
|
+
|
|
371
|
+
if (!dividerTool) {
|
|
372
|
+
return false;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
const currentInput = currentBlock.currentInput;
|
|
376
|
+
|
|
377
|
+
if (!currentInput) {
|
|
378
|
+
return false;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
const textContent = currentInput.textContent || '';
|
|
382
|
+
|
|
383
|
+
if (!DIVIDER_PATTERN.test(textContent)) {
|
|
384
|
+
return false;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
this.Blok.YjsManager.stopCapturing();
|
|
388
|
+
|
|
389
|
+
const newBlock = BlockManager.replace(currentBlock, DIVIDER_TOOL_NAME, {});
|
|
390
|
+
|
|
391
|
+
/**
|
|
392
|
+
* Insert an empty paragraph after the divider and set caret there,
|
|
393
|
+
* so the user can continue typing.
|
|
394
|
+
*/
|
|
395
|
+
const newBlockIndex = BlockManager.getBlockIndex(newBlock);
|
|
396
|
+
const paragraphBlock = BlockManager.insertDefaultBlockAtIndex(newBlockIndex + 1);
|
|
397
|
+
|
|
398
|
+
Caret.setToBlock(paragraphBlock, Caret.positions.START);
|
|
399
|
+
|
|
400
|
+
this.Blok.YjsManager.stopCapturing();
|
|
401
|
+
|
|
402
|
+
return true;
|
|
403
|
+
}
|
|
404
|
+
|
|
342
405
|
/**
|
|
343
406
|
* Match default header shortcuts like "# ", "## ", etc.
|
|
344
407
|
*/
|
|
@@ -82,3 +82,14 @@ export const TOGGLE_HEADER_PATTERN = /^>(#{1,6})\s([\s\S]*)$/;
|
|
|
82
82
|
* Captures remaining content after the shortcut in group 1.
|
|
83
83
|
*/
|
|
84
84
|
export const TOGGLE_PATTERN = /^>\s([\s\S]*)$/;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Tool name for divider blocks.
|
|
88
|
+
*/
|
|
89
|
+
export const DIVIDER_TOOL_NAME = 'divider';
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Regex pattern for detecting divider shortcuts.
|
|
93
|
+
* Matches exactly three hyphens with no other content.
|
|
94
|
+
*/
|
|
95
|
+
export const DIVIDER_PATTERN = /^-{3}$/;
|
|
@@ -260,10 +260,6 @@ const hasHierarchicalRefs = (block: OutputBlockData): boolean => {
|
|
|
260
260
|
export const analyzeDataFormat = (blocks: OutputBlockData[]): DataFormatAnalysis => {
|
|
261
261
|
const foundHierarchicalRefs = blocks.some(hasHierarchicalRefs);
|
|
262
262
|
|
|
263
|
-
if (foundHierarchicalRefs) {
|
|
264
|
-
return { format: 'hierarchical', hasHierarchy: true };
|
|
265
|
-
}
|
|
266
|
-
|
|
267
263
|
// Check if any block uses legacy list format (items[] array)
|
|
268
264
|
const foundLegacyList = blocks.some(isLegacyListBlock);
|
|
269
265
|
|
|
@@ -273,9 +269,15 @@ export const analyzeDataFormat = (blocks: OutputBlockData[]): DataFormatAnalysis
|
|
|
273
269
|
// Check if any block uses legacy callout format (has body field)
|
|
274
270
|
const foundLegacyCallout = blocks.some(isLegacyCalloutBlock);
|
|
275
271
|
|
|
276
|
-
|
|
272
|
+
const hasLegacyBlocks = foundLegacyList || foundLegacyToggle || foundLegacyCallout;
|
|
273
|
+
|
|
274
|
+
if (foundHierarchicalRefs && !hasLegacyBlocks) {
|
|
275
|
+
return { format: 'hierarchical', hasHierarchy: true };
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
if (hasLegacyBlocks) {
|
|
277
279
|
// Check if there's actual nesting for the hasHierarchy flag
|
|
278
|
-
const hasNesting = blocks.some(hasNestedItems) || blocks.some(block =>
|
|
280
|
+
const hasNesting = foundHierarchicalRefs || blocks.some(hasNestedItems) || blocks.some(block =>
|
|
279
281
|
isLegacyToggleListBlock(block) && block.data.body?.blocks !== undefined && block.data.body.blocks.length > 0
|
|
280
282
|
) || blocks.some(block =>
|
|
281
283
|
isLegacyCalloutBlock(block) && block.data.body?.blocks !== undefined && block.data.body.blocks.length > 0
|
package/src/styles/main.css
CHANGED
|
@@ -1164,16 +1164,18 @@
|
|
|
1164
1164
|
* Callout emoji vertical centering for heading first children.
|
|
1165
1165
|
* Headings have taller line boxes than the emoji button, so the emoji
|
|
1166
1166
|
* needs a top margin to shift its center down to match the heading's
|
|
1167
|
-
* first line center. Values: (heading-line-height − emoji-
|
|
1167
|
+
* first line center. Values: (heading-line-height − emoji-line-height) / 2 + 1px mt-px.
|
|
1168
|
+
* Emoji button: text-[1.5rem] leading-[1] → line-height 24px.
|
|
1169
|
+
* H1 text-3xl leading-[1.3] → 39px; H2 text-2xl → 31.2px; H3 text-xl → 26px.
|
|
1168
1170
|
*/
|
|
1169
1171
|
[data-blok-component="callout"] button:has(+ [data-blok-toggle-children] > :first-child h1) {
|
|
1170
|
-
margin-top:
|
|
1172
|
+
margin-top: 8.5px;
|
|
1171
1173
|
}
|
|
1172
1174
|
[data-blok-component="callout"] button:has(+ [data-blok-toggle-children] > :first-child h2) {
|
|
1173
|
-
margin-top:
|
|
1175
|
+
margin-top: 4.6px;
|
|
1174
1176
|
}
|
|
1175
1177
|
[data-blok-component="callout"] button:has(+ [data-blok-toggle-children] > :first-child h3) {
|
|
1176
|
-
margin-top:
|
|
1178
|
+
margin-top: 2px;
|
|
1177
1179
|
}
|
|
1178
1180
|
|
|
1179
1181
|
/**
|
|
@@ -26,5 +26,5 @@ export const DEFAULT_EMOJI = '💡';
|
|
|
26
26
|
|
|
27
27
|
// CSS — Tailwind classes
|
|
28
28
|
export const WRAPPER_STYLES = 'rounded-xl px-4 py-[5px] my-1 flex items-start gap-2';
|
|
29
|
-
export const EMOJI_BUTTON_STYLES = 'text-[1.
|
|
29
|
+
export const EMOJI_BUTTON_STYLES = 'text-[1.5rem] leading-[1] cursor-pointer bg-transparent border-0 px-0 py-[7px] flex-shrink-0 select-none';
|
|
30
30
|
export const CHILDREN_STYLES = 'flex-1 min-w-0';
|
|
@@ -246,7 +246,6 @@ export class EmojiPicker {
|
|
|
246
246
|
randomBtn.type = 'button';
|
|
247
247
|
randomBtn.setAttribute('data-emoji-picker-random', '');
|
|
248
248
|
randomBtn.setAttribute('aria-label', this.i18n.t(PICK_RANDOM_KEY));
|
|
249
|
-
randomBtn.title = this.i18n.t(PICK_RANDOM_KEY);
|
|
250
249
|
randomBtn.className = [
|
|
251
250
|
'flex-shrink-0 w-[34px] h-[34px] flex items-center justify-center rounded-lg',
|
|
252
251
|
'text-neutral-400 hover:bg-neutral-100 hover:text-neutral-600',
|
|
@@ -262,7 +261,6 @@ export class EmojiPicker {
|
|
|
262
261
|
removeBtn.type = 'button';
|
|
263
262
|
removeBtn.setAttribute('data-emoji-picker-remove', '');
|
|
264
263
|
removeBtn.setAttribute('aria-label', this.i18n.t(REMOVE_EMOJI_KEY));
|
|
265
|
-
removeBtn.title = this.i18n.t(REMOVE_EMOJI_KEY);
|
|
266
264
|
removeBtn.className = [
|
|
267
265
|
'flex-shrink-0 w-[34px] h-[34px] flex items-center justify-center rounded-lg',
|
|
268
266
|
'text-neutral-400 hover:bg-neutral-100 hover:text-neutral-600',
|
|
@@ -653,7 +651,6 @@ export class EmojiPicker {
|
|
|
653
651
|
const btn = document.createElement('button');
|
|
654
652
|
btn.type = 'button';
|
|
655
653
|
btn.textContent = this.getSkinnedNative(emoji);
|
|
656
|
-
btn.title = this.getDisplayName(emoji);
|
|
657
654
|
btn.setAttribute('data-emoji-native', emoji.native);
|
|
658
655
|
btn.className = [
|
|
659
656
|
'aspect-square flex items-center justify-center',
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
BlockTool,
|
|
3
|
+
BlockToolConstructorOptions,
|
|
4
|
+
PasteConfig,
|
|
5
|
+
SanitizerConfig,
|
|
6
|
+
ToolboxConfig,
|
|
7
|
+
} from '../../../types';
|
|
8
|
+
import type { DividerData } from './types';
|
|
9
|
+
import { IconDivider } from '../../components/icons';
|
|
10
|
+
import { twMerge } from '../../components/utils/tw';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Divider block tool — renders a thin horizontal line separator.
|
|
14
|
+
* Contentless void block with no editable content or settings.
|
|
15
|
+
*/
|
|
16
|
+
export class DividerTool implements BlockTool {
|
|
17
|
+
/**
|
|
18
|
+
* Rendered wrapper element
|
|
19
|
+
*/
|
|
20
|
+
private element: HTMLElement | null = null;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @param _options - block tool constructor options (unused for divider)
|
|
24
|
+
*/
|
|
25
|
+
constructor(_options: BlockToolConstructorOptions<DividerData>) {}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Render a wrapper with a semantic <hr> element inside.
|
|
29
|
+
* Wrapper uses padding for spacing and minimal line-height so the
|
|
30
|
+
* toolbar positioning algorithm centers correctly on the divider line.
|
|
31
|
+
*/
|
|
32
|
+
public render(): HTMLElement {
|
|
33
|
+
const wrapper = document.createElement('div');
|
|
34
|
+
|
|
35
|
+
wrapper.className = twMerge('py-3', 'leading-[1px]');
|
|
36
|
+
|
|
37
|
+
const hr = document.createElement('hr');
|
|
38
|
+
|
|
39
|
+
hr.className = twMerge('border-t', 'border-border-primary', 'border-b-0', 'border-l-0', 'border-r-0');
|
|
40
|
+
wrapper.appendChild(hr);
|
|
41
|
+
this.element = wrapper;
|
|
42
|
+
|
|
43
|
+
return wrapper;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Return empty data — divider has no content
|
|
48
|
+
*/
|
|
49
|
+
public save(): DividerData {
|
|
50
|
+
return {} as DividerData;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Always valid — nothing to validate
|
|
55
|
+
*/
|
|
56
|
+
public validate(_data: DividerData): boolean {
|
|
57
|
+
return true;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Toolbox appearance
|
|
62
|
+
*/
|
|
63
|
+
public static get toolbox(): ToolboxConfig {
|
|
64
|
+
return {
|
|
65
|
+
icon: IconDivider,
|
|
66
|
+
titleKey: 'divider',
|
|
67
|
+
shortcut: '---',
|
|
68
|
+
searchTerms: ['hr', 'line', 'separator', 'rule', '---'],
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Divider works in read-only mode
|
|
74
|
+
*/
|
|
75
|
+
public static get isReadOnlySupported(): boolean {
|
|
76
|
+
return true;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Paste three-or-more hyphens to create a divider
|
|
81
|
+
*/
|
|
82
|
+
public static get pasteConfig(): PasteConfig {
|
|
83
|
+
return {
|
|
84
|
+
patterns: {
|
|
85
|
+
divider: /^-{3,}$/,
|
|
86
|
+
},
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Nothing to sanitize — no HTML content
|
|
92
|
+
*/
|
|
93
|
+
public static get sanitize(): SanitizerConfig {
|
|
94
|
+
return {};
|
|
95
|
+
}
|
|
96
|
+
}
|
package/src/tools/index.ts
CHANGED
|
@@ -26,6 +26,7 @@ export { ListItem as List } from './list';
|
|
|
26
26
|
export { Table } from './table';
|
|
27
27
|
export { ToggleItem as Toggle } from './toggle';
|
|
28
28
|
export { CalloutTool as Callout } from './callout';
|
|
29
|
+
export { DividerTool as Divider } from './divider';
|
|
29
30
|
|
|
30
31
|
// Inline tools
|
|
31
32
|
export { BoldInlineTool as Bold } from '../components/inline-tools/inline-tool-bold';
|
|
@@ -45,6 +46,7 @@ export const defaultBlockTools = {
|
|
|
45
46
|
table: {},
|
|
46
47
|
toggle: {},
|
|
47
48
|
callout: {},
|
|
49
|
+
divider: {},
|
|
48
50
|
} as const;
|
|
49
51
|
|
|
50
52
|
export const defaultInlineTools = {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BlockTool, BlockToolConstructable, BlockToolConstructorOptions, BlockToolData } from './block-tool';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Divider Tool's input and output data format.
|
|
5
|
+
* Empty — dividers have no configurable properties.
|
|
6
|
+
*/
|
|
7
|
+
export interface DividerData extends BlockToolData {}
|
|
8
|
+
|
|
9
|
+
export interface DividerConstructable extends BlockToolConstructable {
|
|
10
|
+
new(options: BlockToolConstructorOptions<DividerData>): BlockTool;
|
|
11
|
+
}
|
package/types/tools-entry.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ import { ParagraphConstructable, ParagraphData, ParagraphConfig } from './tools/
|
|
|
8
8
|
import { ListConstructable, ListData, ListConfig, ListStyle } from './tools/list';
|
|
9
9
|
import { TableConstructable, TableData, TableConfig, CellContent } from './tools/table';
|
|
10
10
|
import { ToggleConstructable, ToggleData, ToggleConfig } from './tools/toggle';
|
|
11
|
+
import { DividerConstructable, DividerData } from './tools/divider';
|
|
11
12
|
import { InlineToolConstructable } from './tools/inline-tool';
|
|
12
13
|
import { BlockTuneConstructable } from './block-tunes';
|
|
13
14
|
import { ToolSettings } from './tools';
|
|
@@ -18,6 +19,7 @@ export const Header: HeaderConstructable;
|
|
|
18
19
|
export const List: ListConstructable;
|
|
19
20
|
export const Table: TableConstructable;
|
|
20
21
|
export const Toggle: ToggleConstructable;
|
|
22
|
+
export const Divider: DividerConstructable;
|
|
21
23
|
|
|
22
24
|
// Re-export data and config types for convenience
|
|
23
25
|
export { HeaderData, HeaderConfig } from './tools/header';
|
|
@@ -25,6 +27,7 @@ export { ParagraphData, ParagraphConfig } from './tools/paragraph';
|
|
|
25
27
|
export { ListData, ListConfig, ListStyle } from './tools/list';
|
|
26
28
|
export { TableData, TableConfig, CellContent } from './tools/table';
|
|
27
29
|
export { ToggleData, ToggleConfig } from './tools/toggle';
|
|
30
|
+
export { DividerData } from './tools/divider';
|
|
28
31
|
|
|
29
32
|
// Inline tools
|
|
30
33
|
export const Bold: InlineToolConstructable;
|
|
@@ -42,10 +45,13 @@ export const Delete: BlockTuneConstructable;
|
|
|
42
45
|
* Default block tools configuration
|
|
43
46
|
*/
|
|
44
47
|
export const defaultBlockTools: {
|
|
45
|
-
readonly paragraph: { readonly
|
|
46
|
-
readonly header: {
|
|
47
|
-
readonly list: {
|
|
48
|
+
readonly paragraph: { readonly preserveBlank: true };
|
|
49
|
+
readonly header: {};
|
|
50
|
+
readonly list: {};
|
|
48
51
|
readonly table: {};
|
|
52
|
+
readonly toggle: {};
|
|
53
|
+
readonly callout: {};
|
|
54
|
+
readonly divider: {};
|
|
49
55
|
};
|
|
50
56
|
|
|
51
57
|
/**
|