@jackuait/blok 0.7.3-beta.4 → 0.8.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-CdxHhr5i.mjs → blok-CdiMFzDz.mjs} +2256 -2141
- package/dist/chunks/{constants-C_H9o9Ao.mjs → constants-CjWRVOdm.mjs} +227 -190
- package/dist/chunks/{i18next-loader-D5HxE5ZQ.mjs → i18next-loader-p-7ioTwr.mjs} +1 -1
- package/dist/chunks/{lightweight-i18n-Safdy0ua.mjs → lightweight-i18n-BPeH69Dl.mjs} +14 -1
- package/dist/{messages-BbLCMWln2.mjs → chunks/messages--aM83pib2.mjs} +14 -1
- package/dist/chunks/{messages-ni0ahgYk2.mjs → messages-4OvVdaG52.mjs} +14 -1
- package/dist/chunks/{messages-DnPkoMz1.mjs → messages-5ohIWynJ.mjs} +14 -1
- package/dist/chunks/{messages-BjkDJuqh.mjs → messages-5thhSeME.mjs} +14 -1
- package/dist/chunks/{messages-hngFJrES2.mjs → messages-8pf7gRQm2.mjs} +14 -1
- package/dist/{messages-eCyczLYY.mjs → chunks/messages-B-i-d1Bc.mjs} +14 -1
- package/dist/chunks/{messages-CRxkRJRN.mjs → messages-B9zocutJ.mjs} +14 -1
- package/dist/{messages-pgqtPci-.mjs → chunks/messages-BAC7nLeM.mjs} +14 -1
- package/dist/chunks/{messages-DjOY_EqX.mjs → messages-BARPMN7R.mjs} +14 -1
- package/dist/{messages-Bsz7Qgj_.mjs → chunks/messages-BAgTIgPH.mjs} +15 -2
- package/dist/chunks/{messages-Cb-x47kY2.mjs → messages-BDTgiBJY2.mjs} +14 -1
- package/dist/chunks/{messages-BM1Su_Uy2.mjs → messages-BHf_VcXb2.mjs} +14 -1
- package/dist/{messages-wRvz0vQ3.mjs → chunks/messages-BIrkzbBP.mjs} +14 -1
- package/dist/{messages-DB9U3VIh.mjs → chunks/messages-BKjLgO5d.mjs} +14 -1
- package/dist/{messages-gldjQk7M.mjs → chunks/messages-BMzmli1K.mjs} +14 -1
- package/dist/chunks/{messages-CficsmSH2.mjs → messages-BO_jtRbZ2.mjs} +14 -1
- package/dist/chunks/{messages-kHTrX3wo2.mjs → messages-B_fFjpX12.mjs} +14 -1
- package/dist/{messages-BU9luYgO.mjs → chunks/messages-Bdk5tBNu.mjs} +14 -1
- package/dist/{messages-CRMZ79Xf.mjs → chunks/messages-BgaGPFuy2.mjs} +14 -1
- package/dist/{messages-DCOKudVN.mjs → chunks/messages-BsYzg2le.mjs} +14 -1
- package/dist/{messages-B9qltgXa.mjs → chunks/messages-BtS6JWMT.mjs} +14 -1
- package/dist/{messages-Cgy54529.mjs → chunks/messages-BvlSf_pu.mjs} +14 -1
- package/dist/{messages-oH0ADQ362.mjs → chunks/messages-C03I_oR-2.mjs} +14 -1
- package/dist/{messages-C8iAUPzI.mjs → chunks/messages-CDJLoStb.mjs} +14 -1
- package/dist/chunks/{messages-ClOxDE0y2.mjs → messages-CH_cexo62.mjs} +14 -1
- package/dist/{messages-DkkrjINb2.mjs → chunks/messages-CIBuZccC.mjs} +14 -1
- package/dist/chunks/{messages-BZ45xBlV.mjs → messages-CIZkNCpW.mjs} +14 -1
- package/dist/{messages-CJYE0_hr2.mjs → chunks/messages-CIugNDDO2.mjs} +14 -1
- package/dist/chunks/{messages-Cn5n0nHe2.mjs → messages-COkQfKa72.mjs} +14 -1
- package/dist/{messages-Bw-GC0m5.mjs → chunks/messages-CSpfBhlK2.mjs} +14 -1
- package/dist/chunks/{messages-tBHnC2Rj2.mjs → messages-CWp6-Y8f2.mjs} +14 -1
- package/dist/chunks/{messages-CteKp81J.mjs → messages-Co4WFeQ8.mjs} +14 -1
- package/dist/chunks/{messages-IJhiftj5.mjs → messages-CoRQE_Jc.mjs} +14 -1
- package/dist/{messages-DGZQXeav2.mjs → chunks/messages-CuRN1_ep2.mjs} +14 -1
- package/dist/{messages-BwdowdYD.mjs → chunks/messages-D0IKicWg.mjs} +14 -1
- package/dist/chunks/{messages-1C3OS98e.mjs → messages-D14soBOO.mjs} +14 -1
- package/dist/chunks/{messages-nE9Ko73n2.mjs → messages-D1SqLcxI2.mjs} +14 -1
- package/dist/{messages-COU4L-pL2.mjs → chunks/messages-D2uBlGXR2.mjs} +14 -1
- package/dist/chunks/{messages-DDr8J4FE.mjs → messages-DDpgr0B1.mjs} +14 -1
- package/dist/chunks/{messages-C232njMF2.mjs → messages-DEGzGmEQ2.mjs} +14 -1
- package/dist/chunks/{messages-6z-ULVyk.mjs → messages-DKChC8Qu.mjs} +14 -1
- package/dist/{messages-BP8ZuVaD.mjs → chunks/messages-DKCoHa5D.mjs} +14 -1
- package/dist/{messages-ruU_e2LK.mjs → chunks/messages-DPoPrTiZ.mjs} +14 -1
- package/dist/chunks/{messages-DziA-L3p.mjs → messages-DQOk-dTH.mjs} +14 -1
- package/dist/chunks/{messages-uLIUXFmU.mjs → messages-DUp8NnKT.mjs} +15 -2
- package/dist/chunks/{messages-rJdSnvyi.mjs → messages-DVg69mRj.mjs} +14 -1
- package/dist/chunks/{messages-Cq6wj6FG.mjs → messages-DeLzropc.mjs} +14 -1
- package/dist/chunks/{messages-DDRCk44J2.mjs → messages-Df69rfTF2.mjs} +15 -2
- package/dist/chunks/{messages-6EJxSImH.mjs → messages-DfsHFEWa.mjs} +14 -1
- package/dist/{messages-MaHxNgKA.mjs → chunks/messages-DgZnRQRS.mjs} +14 -1
- package/dist/{messages-B8M4YRFO2.mjs → chunks/messages-DhGHk-Ma2.mjs} +14 -1
- package/dist/{messages-3aRjZXpv.mjs → chunks/messages-Di7mfvB8.mjs} +14 -1
- package/dist/chunks/{messages-C1iQkKu82.mjs → messages-DlM9TmqS2.mjs} +14 -1
- package/dist/chunks/{messages-CejEH4FW2.mjs → messages-DmrsEYQm2.mjs} +14 -1
- package/dist/chunks/{messages-DK6pBwD2.mjs → messages-Dr-Ig3sw.mjs} +14 -1
- package/dist/{messages-BOxe7ewT.mjs → chunks/messages-DrXNb1gu.mjs} +14 -1
- package/dist/chunks/{messages-CvLXClh9.mjs → messages-EDTq4Q52.mjs} +14 -1
- package/dist/{messages-huTzItxA.mjs → chunks/messages-Ehx9YYeb2.mjs} +14 -1
- package/dist/chunks/{messages-CxTq0x772.mjs → messages-FCmAVA792.mjs} +14 -1
- package/dist/{messages-q7HzQPVt.mjs → chunks/messages-LL3Tflph.mjs} +14 -1
- package/dist/chunks/{messages-D9qyilS0.mjs → messages-N72K1hw3.mjs} +14 -1
- package/dist/chunks/{messages-C9XSSqS5.mjs → messages-Nz8C7Znm.mjs} +15 -2
- package/dist/{messages-e-KHuxtY2.mjs → chunks/messages-OIelQDL32.mjs} +14 -1
- package/dist/{messages-BQJzUYP-.mjs → chunks/messages-SsrFJhTN.mjs} +14 -1
- package/dist/{messages-CVBsztOg.mjs → chunks/messages-ohtcmr1w.mjs} +14 -1
- package/dist/chunks/{messages-CVzvKl6U.mjs → messages-stUQR58d.mjs} +14 -1
- package/dist/{messages-DlrZrm3s.mjs → chunks/messages-wUoSWFsJ2.mjs} +14 -1
- package/dist/chunks/{tools-B0YXCZFW.mjs → tools-B5yNeTZh.mjs} +1286 -872
- package/dist/full.mjs +15 -13
- package/dist/locales.mjs +81 -68
- package/dist/{messages-mVFAkdcY.mjs → messages-1_FCq0It.mjs} +14 -1
- package/dist/{chunks/messages-DoDbCS02.mjs → messages-8zo-T-Nx2.mjs} +14 -1
- package/dist/{chunks/messages-DacahKek.mjs → messages-B21zLG6b.mjs} +14 -1
- package/dist/{messages-BBgyeB_N.mjs → messages-B9ythxux.mjs} +14 -1
- package/dist/{messages-C_RPN2GV.mjs → messages-BAZK-8Zb.mjs} +14 -1
- package/dist/{messages-D6Sr5cUE.mjs → messages-BB8umWL1.mjs} +14 -1
- package/dist/{chunks/messages-Dhe8_mnQ.mjs → messages-BD_U2EnE.mjs} +14 -1
- package/dist/{messages-6G0Eia-2.mjs → messages-BRC9E_sp.mjs} +14 -1
- package/dist/{chunks/messages-BUy3odZo.mjs → messages-BSLYh59S.mjs} +14 -1
- package/dist/{messages-K7ROT6ea.mjs → messages-BSwhWcYw.mjs} +14 -1
- package/dist/{messages-BztXgybv2.mjs → messages-BTR3QlIb2.mjs} +14 -1
- package/dist/{messages-C0gyqo4h2.mjs → messages-BZXBdD_S2.mjs} +14 -1
- package/dist/{messages-BlnZ8CkJ2.mjs → messages-Bm8I_Li12.mjs} +15 -2
- package/dist/{chunks/messages-BKtWlK39.mjs → messages-BrcgNZOJ.mjs} +14 -1
- package/dist/{messages-Be1CCcsp2.mjs → messages-BzZ8LahA2.mjs} +14 -1
- package/dist/{chunks/messages-B_90PYaG.mjs → messages-C4HpNHfK.mjs} +14 -1
- package/dist/{chunks/messages-m6bLP64R2.mjs → messages-C5hD5pSd2.mjs} +14 -1
- package/dist/{chunks/messages-C3AJz_i6.mjs → messages-C7Rz00Tp.mjs} +14 -1
- package/dist/{chunks/messages-C1lqY56F2.mjs → messages-C92tAUYT2.mjs} +14 -1
- package/dist/{messages-Kye1BINC.mjs → messages-C9LsEUfG.mjs} +14 -1
- package/dist/{chunks/messages-tg78NAmW.mjs → messages-CHWfj4ik.mjs} +14 -1
- package/dist/{messages-CaJRIGUu2.mjs → messages-CHeucLGl2.mjs} +14 -1
- package/dist/{chunks/messages-DcPtg90i.mjs → messages-CIxT1nSh.mjs} +14 -1
- package/dist/{messages-C7R0m6oE2.mjs → messages-CKX9iXIb2.mjs} +14 -1
- package/dist/{messages-CzSLUJQt.mjs → messages-CKmmJ9tW.mjs} +14 -1
- package/dist/{messages-DpY9s4Qi2.mjs → messages-CTFwu5-h2.mjs} +14 -1
- package/dist/{messages-DAssrN5L2.mjs → messages-CTPFrtK92.mjs} +14 -1
- package/dist/{messages-BZgGD0zf2.mjs → messages-CWzET_9H2.mjs} +14 -1
- package/dist/{messages-CkmVEyEQ2.mjs → messages-CkIRmpfZ2.mjs} +14 -1
- package/dist/{messages-B2bHgIcC2.mjs → messages-CmoTIebG2.mjs} +14 -1
- package/dist/{messages-DZbsds_k2.mjs → messages-Co26RSCV2.mjs} +14 -1
- package/dist/{messages-DrouoDgp.mjs → messages-CqNzlpWi.mjs} +15 -2
- package/dist/{messages-m1uf_AMy2.mjs → messages-CrWsU4Xw2.mjs} +14 -1
- package/dist/{messages-TseLyyoU.mjs → messages-CsmTziC6.mjs} +14 -1
- package/dist/{messages-CAffVeAE2.mjs → messages-CsnglxbV2.mjs} +14 -1
- package/dist/{messages-CE305J0p.mjs → messages-Cu7Lr1wp.mjs} +14 -1
- package/dist/{chunks/messages-Ul43l29K2.mjs → messages-Cy3Ne_M9.mjs} +14 -1
- package/dist/{chunks/messages-CzCqu58X2.mjs → messages-CzZAfGif.mjs} +14 -1
- package/dist/{messages-C_4VGaBC.mjs → messages-D5rnT-BC.mjs} +14 -1
- package/dist/{chunks/messages-yJmwc3zD.mjs → messages-D8iCBMg7.mjs} +14 -1
- package/dist/{chunks/messages-BtNOlsMj.mjs → messages-DDJOu049.mjs} +14 -1
- package/dist/{chunks/messages-CnzaTbel.mjs → messages-DDiP6yex.mjs} +14 -1
- package/dist/{chunks/messages-DotEkUpQ.mjs → messages-DHJ1fZLL.mjs} +14 -1
- package/dist/{chunks/messages-3ePgbbpx2.mjs → messages-DToWAonn2.mjs} +14 -1
- package/dist/{messages-BxQ1gzJF2.mjs → messages-DV29fJMD2.mjs} +14 -1
- package/dist/{chunks/messages-DJWRON2S.mjs → messages-D_-rh8gl.mjs} +14 -1
- package/dist/{chunks/messages-D6SAC8Lc2.mjs → messages-D_cAZ4Ic2.mjs} +14 -1
- package/dist/{chunks/messages-pKUiAqlX2.mjs → messages-Dc7ZzqYN.mjs} +14 -1
- package/dist/{chunks/messages-JRavIeeW.mjs → messages-DiSeSE8p.mjs} +14 -1
- package/dist/{chunks/messages-DbS9Oibb.mjs → messages-Djhu5RJd.mjs} +14 -1
- package/dist/{messages-BdJ1lCo_.mjs → messages-Dr9L1psl.mjs} +15 -2
- package/dist/{messages-voUPclMU.mjs → messages-EIeWKoc5.mjs} +14 -1
- package/dist/{messages-GrVSCmXW.mjs → messages-EwoT2jof.mjs} +14 -1
- package/dist/{chunks/messages-B_nVGWdk.mjs → messages-F7cRf-20.mjs} +14 -1
- package/dist/{chunks/messages-Dxrg70jo.mjs → messages-JZhs_0pf.mjs} +14 -1
- package/dist/{messages-CB0RKGVM.mjs → messages-JwMkLben.mjs} +14 -1
- package/dist/{messages-Cb5JJ8C_2.mjs → messages-LyzjEEIj2.mjs} +14 -1
- package/dist/{chunks/messages-DQ4VyVJf2.mjs → messages-SepwOOcg.mjs} +14 -1
- package/dist/{chunks/messages-DfTU2I8J.mjs → messages-TI0u6Ked.mjs} +14 -1
- package/dist/{chunks/messages-D7aoKTPD.mjs → messages-Tx25QErT.mjs} +14 -1
- package/dist/{chunks/messages-D9nReG4C2.mjs → messages-bRqMCja-2.mjs} +14 -1
- package/dist/{chunks/messages-h474TGR72.mjs → messages-lEyiemqU2.mjs} +14 -1
- package/dist/{messages-BENRci-_2.mjs → messages-mVLfVtQX2.mjs} +14 -1
- package/dist/{messages-CEhkWwqI.mjs → messages-ouO9js8Z.mjs} +14 -1
- package/dist/{messages--XEfVx572.mjs → messages-ouRGTAKo2.mjs} +14 -1
- package/dist/{chunks/messages-DNrK8lCg2.mjs → messages-qV14y_oA2.mjs} +14 -1
- package/dist/{chunks/messages-Yk__PXZQ.mjs → messages-rM6YFLZH.mjs} +15 -2
- package/dist/react.mjs +2 -2
- package/dist/tools.mjs +3 -3
- package/package.json +2 -2
- package/src/components/block/style-manager.ts +1 -1
- package/src/components/blocks.ts +26 -54
- package/src/components/constants/data-attributes.ts +0 -2
- package/src/components/i18n/locales/am/messages.json +14 -1
- package/src/components/i18n/locales/ar/messages.json +14 -1
- package/src/components/i18n/locales/az/messages.json +14 -1
- package/src/components/i18n/locales/bg/messages.json +15 -2
- package/src/components/i18n/locales/bn/messages.json +14 -1
- package/src/components/i18n/locales/bs/messages.json +14 -1
- package/src/components/i18n/locales/cs/messages.json +14 -1
- package/src/components/i18n/locales/da/messages.json +14 -1
- package/src/components/i18n/locales/de/messages.json +14 -1
- package/src/components/i18n/locales/dv/messages.json +14 -1
- package/src/components/i18n/locales/el/messages.json +14 -1
- package/src/components/i18n/locales/en/messages.json +14 -1
- package/src/components/i18n/locales/es/messages.json +14 -1
- package/src/components/i18n/locales/et/messages.json +15 -2
- package/src/components/i18n/locales/fa/messages.json +14 -1
- package/src/components/i18n/locales/fi/messages.json +14 -1
- package/src/components/i18n/locales/fil/messages.json +14 -1
- package/src/components/i18n/locales/fr/messages.json +14 -1
- package/src/components/i18n/locales/gu/messages.json +14 -1
- package/src/components/i18n/locales/he/messages.json +14 -1
- package/src/components/i18n/locales/hi/messages.json +14 -1
- package/src/components/i18n/locales/hr/messages.json +14 -1
- package/src/components/i18n/locales/hu/messages.json +14 -1
- package/src/components/i18n/locales/hy/messages.json +14 -1
- package/src/components/i18n/locales/id/messages.json +14 -1
- package/src/components/i18n/locales/it/messages.json +14 -1
- package/src/components/i18n/locales/ja/messages.json +14 -1
- package/src/components/i18n/locales/ka/messages.json +14 -1
- package/src/components/i18n/locales/km/messages.json +14 -1
- package/src/components/i18n/locales/kn/messages.json +14 -1
- package/src/components/i18n/locales/ko/messages.json +14 -1
- package/src/components/i18n/locales/ku/messages.json +14 -1
- package/src/components/i18n/locales/lo/messages.json +14 -1
- package/src/components/i18n/locales/lt/messages.json +14 -1
- package/src/components/i18n/locales/lv/messages.json +14 -1
- package/src/components/i18n/locales/mk/messages.json +14 -1
- package/src/components/i18n/locales/ml/messages.json +14 -1
- package/src/components/i18n/locales/mn/messages.json +14 -1
- package/src/components/i18n/locales/mr/messages.json +14 -1
- package/src/components/i18n/locales/ms/messages.json +14 -1
- package/src/components/i18n/locales/my/messages.json +14 -1
- package/src/components/i18n/locales/ne/messages.json +14 -1
- package/src/components/i18n/locales/nl/messages.json +14 -1
- package/src/components/i18n/locales/no/messages.json +14 -1
- package/src/components/i18n/locales/pa/messages.json +14 -1
- package/src/components/i18n/locales/pl/messages.json +14 -1
- package/src/components/i18n/locales/ps/messages.json +14 -1
- package/src/components/i18n/locales/pt/messages.json +14 -1
- package/src/components/i18n/locales/ro/messages.json +14 -1
- package/src/components/i18n/locales/ru/messages.json +15 -2
- package/src/components/i18n/locales/sd/messages.json +14 -1
- package/src/components/i18n/locales/si/messages.json +14 -1
- package/src/components/i18n/locales/sk/messages.json +14 -1
- package/src/components/i18n/locales/sl/messages.json +14 -1
- package/src/components/i18n/locales/sq/messages.json +14 -1
- package/src/components/i18n/locales/sr/messages.json +14 -1
- package/src/components/i18n/locales/sv/messages.json +14 -1
- package/src/components/i18n/locales/sw/messages.json +14 -1
- package/src/components/i18n/locales/ta/messages.json +14 -1
- package/src/components/i18n/locales/te/messages.json +14 -1
- package/src/components/i18n/locales/th/messages.json +14 -1
- package/src/components/i18n/locales/tr/messages.json +14 -1
- package/src/components/i18n/locales/ug/messages.json +14 -1
- package/src/components/i18n/locales/uk/messages.json +15 -2
- package/src/components/i18n/locales/ur/messages.json +14 -1
- package/src/components/i18n/locales/vi/messages.json +14 -1
- package/src/components/i18n/locales/yi/messages.json +14 -1
- package/src/components/i18n/locales/zh/messages.json +14 -1
- package/src/components/icons/index.ts +52 -6
- package/src/components/inline-tools/inline-tool-link.ts +202 -5
- package/src/components/inline-tools/inline-tool-marker.ts +166 -23
- package/src/components/inline-tools/inline-tool-strikethrough.ts +408 -0
- package/src/components/inline-tools/inline-tool-underline.ts +408 -0
- package/src/components/inline-tools/utils/formatting-range-utils.ts +10 -1
- package/src/components/modules/blockManager/blockManager.ts +2 -2
- package/src/components/modules/blockManager/operations.ts +2 -2
- package/src/components/modules/blockManager/repository.ts +1 -9
- package/src/components/modules/blockManager/types.ts +1 -1
- package/src/components/modules/drag/operations/DragOperations.ts +45 -6
- package/src/components/modules/paste/google-docs-preprocessor.ts +69 -2
- package/src/components/modules/paste/handlers/blok-data-handler.ts +96 -19
- package/src/components/modules/rectangleSelection.ts +48 -0
- package/src/components/modules/renderer.ts +2 -0
- package/src/components/modules/toolbar/blockSettings.ts +1 -1
- package/src/components/modules/toolbar/index.ts +26 -2
- package/src/components/modules/toolbar/plus-button.ts +15 -5
- package/src/components/selection/fake-background/index.ts +9 -10
- package/src/components/shared/color-picker.ts +116 -95
- package/src/components/shared/color-presets.ts +30 -2
- package/src/components/ui/toolbox.ts +36 -7
- package/src/components/utils/color-mapping.ts +43 -1
- package/src/components/utils/color-migration.ts +37 -0
- package/src/components/utils/popover/components/popover-item/popover-item-default/popover-item-default.const.ts +4 -3
- package/src/components/utils/popover/components/popover-item/popover-item-default/popover-item-default.ts +5 -39
- package/src/components/utils/popover/components/popover-item/popover-item-separator/popover-item-separator.const.ts +2 -2
- package/src/components/utils/popover/components/popover-item/popover-item.ts +11 -0
- package/src/components/utils/popover/components/search-input/search-input.const.ts +2 -3
- package/src/components/utils/popover/components/search-input/search-input.ts +1 -32
- package/src/components/utils/popover/popover-abstract.ts +2 -4
- package/src/components/utils/popover/popover-desktop.ts +1 -16
- package/src/components/utils/popover/popover-inline.ts +1 -2
- package/src/components/utils/popover/popover-mobile.ts +2 -2
- package/src/components/utils/popover/popover.const.ts +1 -1
- package/src/full.ts +7 -1
- package/src/stories/MarkerColors.stories.ts +13 -34
- package/src/stories/Table.stories.ts +15 -9
- package/src/styles/main.css +313 -15
- package/src/tools/header/index.ts +11 -9
- package/src/tools/index.ts +4 -0
- package/src/tools/list/constants.ts +13 -6
- package/src/tools/list/depth-validator.ts +13 -1
- package/src/tools/list/dom-builder.ts +6 -3
- package/src/tools/list/index.ts +3 -2
- package/src/tools/paragraph/index.ts +2 -2
- package/src/tools/table/table-cell-blocks.ts +25 -0
- package/src/tools/table/table-cell-color-picker.ts +1 -1
- package/src/tools/table/table-cell-selection.ts +1 -2
- package/src/tools/table/table-core.ts +2 -2
- package/src/tools/table/table-grip-visuals.ts +13 -5
- package/src/tools/table/table-heading-toggle.ts +15 -9
- package/src/tools/table/table-row-col-controls.ts +17 -11
- package/src/tools/table/table-row-col-drag.ts +26 -3
- package/src/tools/toggle/constants.ts +13 -6
- package/src/tools/toggle/index.ts +1 -1
- package/types/tools/hook-events.d.ts +6 -0
- package/types/utils/popover/popover-item.d.ts +6 -0
- package/CHANGELOG.md +0 -119
|
@@ -23,6 +23,17 @@
|
|
|
23
23
|
"tools.marker.textColor": "文字",
|
|
24
24
|
"tools.marker.background": "背景",
|
|
25
25
|
"tools.marker.default": "默认",
|
|
26
|
+
"tools.colorPicker.defaultSwatchLabel": "{default} {mode}",
|
|
27
|
+
"tools.colorPicker.colorSwatchLabel": "{color} {mode}",
|
|
28
|
+
"tools.colorPicker.color.gray": "灰色",
|
|
29
|
+
"tools.colorPicker.color.brown": "棕色",
|
|
30
|
+
"tools.colorPicker.color.orange": "橙色",
|
|
31
|
+
"tools.colorPicker.color.yellow": "黄色",
|
|
32
|
+
"tools.colorPicker.color.green": "绿色",
|
|
33
|
+
"tools.colorPicker.color.blue": "蓝色",
|
|
34
|
+
"tools.colorPicker.color.purple": "紫色",
|
|
35
|
+
"tools.colorPicker.color.pink": "粉色",
|
|
36
|
+
"tools.colorPicker.color.red": "红色",
|
|
26
37
|
"tools.stub.error": "错误",
|
|
27
38
|
"tools.stub.blockCannotBeDisplayed": "无法显示此内容块",
|
|
28
39
|
"tools.header.heading1": "一级标题",
|
|
@@ -72,5 +83,7 @@
|
|
|
72
83
|
"tools.table.dragToAddRemoveRows": "拖动以添加或删除行",
|
|
73
84
|
"tools.table.clickToAddColumn": "点击添加新列",
|
|
74
85
|
"tools.table.dragToAddRemoveColumns": "拖动以添加或删除列",
|
|
75
|
-
"blockSettings.convertWithChildrenWarning": "此内容块包含 {count} 个嵌套块。转换后,这些嵌套块将被提升至顶层。是否继续?"
|
|
86
|
+
"blockSettings.convertWithChildrenWarning": "此内容块包含 {count} 个嵌套块。转换后,这些嵌套块将被提升至顶层。是否继续?",
|
|
87
|
+
"toolNames.underline": "Underline",
|
|
88
|
+
"toolNames.strikethrough": "Strikethrough"
|
|
76
89
|
}
|
|
@@ -9,7 +9,8 @@ export const IconCross = `
|
|
|
9
9
|
export const IconBold = `
|
|
10
10
|
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
11
11
|
<path
|
|
12
|
-
|
|
12
|
+
transform="translate(0,-1)"
|
|
13
|
+
d="M6 11h4.9231c.6528 0 1.2789-.3161 1.7405-.8787.4617-.56259.721-1.32565.721-2.1213 0-.79565-.2593-1.55871-.721-2.12132C12.202 5.31607 11.5759 5 10.9231 5H6v6Zm0 0h5.5385c.6528 0 1.2789.3161 1.7405.8787.4617.5626.721 1.3257.721 2.1213 0 .7956-.2593 1.5587-.721 2.1213-.4616.5626-1.0877.8787-1.7405.8787H6v-6Z"
|
|
13
14
|
stroke="currentColor"
|
|
14
15
|
stroke-width="1.25"
|
|
15
16
|
stroke-linecap="round"
|
|
@@ -22,7 +23,7 @@ export const IconBold = `
|
|
|
22
23
|
export const IconItalic = `
|
|
23
24
|
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
24
25
|
<path
|
|
25
|
-
d="M8.5
|
|
26
|
+
d="M8.5 4h6m-10 12h6m1-12-4 12"
|
|
26
27
|
stroke="currentColor"
|
|
27
28
|
stroke-width="1.25"
|
|
28
29
|
stroke-linecap="round"
|
|
@@ -39,12 +40,29 @@ export const IconLink = `
|
|
|
39
40
|
</svg>
|
|
40
41
|
`;
|
|
41
42
|
|
|
42
|
-
// Marker/Color icon (letter A
|
|
43
|
+
// Marker/Color icon (letter A in rounded square)
|
|
43
44
|
export const IconMarker = `
|
|
44
45
|
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
45
|
-
<
|
|
46
|
-
<path d="
|
|
47
|
-
<
|
|
46
|
+
<rect x="1.25" y="1.25" width="17.5" height="17.5" rx="4.5" stroke="currentColor" stroke-width="1.25"/>
|
|
47
|
+
<path d="M6.5 14.5L10 5.5l3.5 9" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
|
|
48
|
+
<path d="M8.5 11h3" stroke="currentColor" stroke-width="1.25" stroke-linecap="round"/>
|
|
49
|
+
</svg>
|
|
50
|
+
`;
|
|
51
|
+
|
|
52
|
+
// Underline icon
|
|
53
|
+
export const IconUnderline = `
|
|
54
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
55
|
+
<path d="M5.5 3.5v7.5a4.5 4.5 0 0 0 9 0V3.5" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
|
|
56
|
+
<path d="M3.5 18.5h13" stroke="currentColor" stroke-width="1.25" stroke-linecap="round"/>
|
|
57
|
+
</svg>
|
|
58
|
+
`;
|
|
59
|
+
|
|
60
|
+
// Strikethrough icon
|
|
61
|
+
export const IconStrikethrough = `
|
|
62
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
63
|
+
<path d="M4 10h12" stroke="currentColor" stroke-width="1.25" stroke-linecap="round"/>
|
|
64
|
+
<path d="M8.2 10c-1-.5-1.8-1.27-1.8-2.4 0-1.99 1.61-3.6 3.6-3.6s3.6 1.61 3.6 3.6" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
|
|
65
|
+
<path d="M11.8 10c1 .5 1.8 1.27 1.8 2.4 0 1.99-1.61 3.6-3.6 3.6s-3.6-1.61-3.6-3.6" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
|
|
48
66
|
</svg>
|
|
49
67
|
`;
|
|
50
68
|
|
|
@@ -386,3 +404,31 @@ export const IconToggleH3 = `
|
|
|
386
404
|
<path d="M16 7l2.5 3-2.5 3" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
|
|
387
405
|
</svg>
|
|
388
406
|
`;
|
|
407
|
+
|
|
408
|
+
// Globe icon (URL link type)
|
|
409
|
+
export const IconGlobe = `
|
|
410
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
411
|
+
<circle cx="10" cy="10" r="6" stroke="currentColor" stroke-width="1.25"/>
|
|
412
|
+
<path d="M10 4C8 6 7.5 8 7.5 10C7.5 12 8 14 10 16" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
|
|
413
|
+
<path d="M10 4C12 6 12.5 8 12.5 10C12.5 12 12 14 10 16" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
|
|
414
|
+
<path d="M4 10H16" stroke="currentColor" stroke-width="1.25" stroke-linecap="round"/>
|
|
415
|
+
</svg>
|
|
416
|
+
`;
|
|
417
|
+
|
|
418
|
+
// Mail icon (email link type)
|
|
419
|
+
export const IconMail = `
|
|
420
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
421
|
+
<rect x="3" y="5.5" width="14" height="9" rx="1.5" stroke="currentColor" stroke-width="1.25" stroke-linejoin="round"/>
|
|
422
|
+
<path d="M3 8L10 10L17 8" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
|
|
423
|
+
</svg>
|
|
424
|
+
`;
|
|
425
|
+
|
|
426
|
+
// Hash icon (anchor link type)
|
|
427
|
+
export const IconHash = `
|
|
428
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
429
|
+
<path d="M7.5 4L7.5 16" stroke="currentColor" stroke-width="1.25" stroke-linecap="round"/>
|
|
430
|
+
<path d="M12.5 4L12.5 16" stroke="currentColor" stroke-width="1.25" stroke-linecap="round"/>
|
|
431
|
+
<path d="M4 8H16" stroke="currentColor" stroke-width="1.25" stroke-linecap="round"/>
|
|
432
|
+
<path d="M4 12H16" stroke="currentColor" stroke-width="1.25" stroke-linecap="round"/>
|
|
433
|
+
</svg>
|
|
434
|
+
`;
|
|
@@ -6,12 +6,15 @@ import type {
|
|
|
6
6
|
import type { Notifier, Toolbar, I18n, InlineToolbar } from '../../../types/api';
|
|
7
7
|
import type { MenuConfig } from '../../../types/tools';
|
|
8
8
|
import { DATA_ATTR, createSelector, INLINE_TOOLBAR_INTERFACE_VALUE } from '../constants';
|
|
9
|
-
import { IconLink } from '../icons';
|
|
9
|
+
import { IconLink, IconGlobe, IconMail, IconHash } from '../icons';
|
|
10
10
|
import { SelectionUtils } from '../selection/index';
|
|
11
11
|
import { log } from '../utils';
|
|
12
12
|
import { PopoverItemType } from '../utils/popover';
|
|
13
13
|
import { twMerge } from '../utils/tw';
|
|
14
14
|
|
|
15
|
+
const SUGGESTION_ROW_VALID = 'flex items-center gap-2 w-full mt-0.5 px-1.5 py-1.5 rounded-md text-left cursor-pointer can-hover:hover:bg-item-hover-bg transition-colors';
|
|
16
|
+
const SUGGESTION_ROW_INVALID = 'flex items-center gap-2 w-full mt-0.5 px-1.5 py-1.5 rounded-md text-left pointer-events-none';
|
|
17
|
+
|
|
15
18
|
/**
|
|
16
19
|
* Link Tool
|
|
17
20
|
*
|
|
@@ -54,7 +57,7 @@ export class LinkInlineTool implements InlineTool {
|
|
|
54
57
|
/**
|
|
55
58
|
* Tailwind classes for input
|
|
56
59
|
*/
|
|
57
|
-
private readonly INPUT_BASE_CLASSES = 'hidden w-
|
|
60
|
+
private readonly INPUT_BASE_CLASSES = 'hidden w-[200px] m-0 px-2 py-1 text-sm leading-[22px] font-medium text-text-primary bg-item-hover-bg border border-link-input-border rounded-lg! outline-hidden box-border appearance-none font-[inherit] placeholder:text-gray-text mobile:text-[15px] mobile:font-medium';
|
|
58
61
|
|
|
59
62
|
/**
|
|
60
63
|
* Data attributes for e2e selectors
|
|
@@ -70,9 +73,13 @@ export class LinkInlineTool implements InlineTool {
|
|
|
70
73
|
*/
|
|
71
74
|
private nodes: {
|
|
72
75
|
input: HTMLInputElement | null;
|
|
76
|
+
inputWrapper: HTMLElement | null;
|
|
77
|
+
suggestion: HTMLElement | null;
|
|
73
78
|
button: HTMLButtonElement | null;
|
|
74
79
|
} = {
|
|
75
80
|
input: null,
|
|
81
|
+
inputWrapper: null,
|
|
82
|
+
suggestion: null,
|
|
76
83
|
button: null,
|
|
77
84
|
};
|
|
78
85
|
|
|
@@ -121,6 +128,9 @@ export class LinkInlineTool implements InlineTool {
|
|
|
121
128
|
this.i18n = api.i18n;
|
|
122
129
|
this.selection = new SelectionUtils();
|
|
123
130
|
this.nodes.input = this.createInput();
|
|
131
|
+
this.nodes.suggestion = this.createSuggestion();
|
|
132
|
+
this.nodes.inputWrapper = document.createElement('div');
|
|
133
|
+
this.nodes.inputWrapper.append(this.nodes.input, this.nodes.suggestion);
|
|
124
134
|
}
|
|
125
135
|
|
|
126
136
|
/**
|
|
@@ -133,12 +143,11 @@ export class LinkInlineTool implements InlineTool {
|
|
|
133
143
|
isActive: () => !!this.selection.findParentTag('A'),
|
|
134
144
|
children: {
|
|
135
145
|
hideChevron: true,
|
|
136
|
-
width: '200px',
|
|
137
146
|
items: [
|
|
138
147
|
{
|
|
139
148
|
type: PopoverItemType.Html,
|
|
140
|
-
//
|
|
141
|
-
element: this.nodes.
|
|
149
|
+
// Wrapper contains the input and suggestion chip
|
|
150
|
+
element: this.nodes.inputWrapper as HTMLElement,
|
|
142
151
|
},
|
|
143
152
|
],
|
|
144
153
|
onOpen: () => {
|
|
@@ -167,10 +176,195 @@ export class LinkInlineTool implements InlineTool {
|
|
|
167
176
|
this.enterPressed(event);
|
|
168
177
|
}
|
|
169
178
|
});
|
|
179
|
+
input.addEventListener('paste', () => {
|
|
180
|
+
requestAnimationFrame(() => {
|
|
181
|
+
this.updateSuggestion(input.value);
|
|
182
|
+
});
|
|
183
|
+
});
|
|
184
|
+
input.addEventListener('input', () => {
|
|
185
|
+
this.updateSuggestion(input.value);
|
|
186
|
+
});
|
|
170
187
|
|
|
171
188
|
return input;
|
|
172
189
|
}
|
|
173
190
|
|
|
191
|
+
/**
|
|
192
|
+
* Create the suggestion chip shown below the input when a URL is present
|
|
193
|
+
*/
|
|
194
|
+
private createSuggestion(): HTMLElement {
|
|
195
|
+
const wrapper = document.createElement('div');
|
|
196
|
+
|
|
197
|
+
wrapper.className = 'hidden';
|
|
198
|
+
wrapper.setAttribute('data-link-suggestion', '');
|
|
199
|
+
|
|
200
|
+
const divider = document.createElement('div');
|
|
201
|
+
|
|
202
|
+
divider.className = 'mt-1 mb-0.5 h-px bg-link-input-border';
|
|
203
|
+
|
|
204
|
+
const row = document.createElement('button');
|
|
205
|
+
|
|
206
|
+
row.type = 'button';
|
|
207
|
+
row.className = SUGGESTION_ROW_VALID;
|
|
208
|
+
row.setAttribute('data-link-suggestion-row', '');
|
|
209
|
+
|
|
210
|
+
const iconEl = document.createElement('span');
|
|
211
|
+
|
|
212
|
+
iconEl.className = 'text-gray-text shrink-0 flex [&>svg]:size-7';
|
|
213
|
+
iconEl.setAttribute('data-link-suggestion-icon', '');
|
|
214
|
+
|
|
215
|
+
const textEl = document.createElement('span');
|
|
216
|
+
|
|
217
|
+
textEl.className = 'flex-1 min-w-0';
|
|
218
|
+
|
|
219
|
+
const urlEl = document.createElement('span');
|
|
220
|
+
|
|
221
|
+
urlEl.className = 'block text-xs font-medium text-text-primary truncate';
|
|
222
|
+
urlEl.setAttribute('data-link-suggestion-url', '');
|
|
223
|
+
|
|
224
|
+
const typeEl = document.createElement('span');
|
|
225
|
+
|
|
226
|
+
typeEl.className = 'block text-[10.5px] text-gray-text leading-tight mt-px';
|
|
227
|
+
typeEl.setAttribute('data-link-suggestion-type', '');
|
|
228
|
+
|
|
229
|
+
textEl.append(urlEl, typeEl);
|
|
230
|
+
row.append(iconEl, textEl);
|
|
231
|
+
wrapper.append(divider, row);
|
|
232
|
+
|
|
233
|
+
row.addEventListener('mousedown', (e) => e.preventDefault());
|
|
234
|
+
row.addEventListener('click', () => this.confirmLink());
|
|
235
|
+
|
|
236
|
+
return wrapper;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* Update the suggestion chip content and visibility based on current input value
|
|
241
|
+
*/
|
|
242
|
+
private updateSuggestion(value: string): void {
|
|
243
|
+
if (!this.nodes.suggestion) {
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
const trimmed = value.trim();
|
|
248
|
+
|
|
249
|
+
if (!trimmed) {
|
|
250
|
+
this.nodes.suggestion.classList.add('hidden');
|
|
251
|
+
|
|
252
|
+
return;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
const isComplete = this.isLinkComplete(trimmed);
|
|
256
|
+
const { icon, label } = this.getLinkTypeInfo(trimmed);
|
|
257
|
+
const iconEl = this.nodes.suggestion.querySelector<HTMLElement>('[data-link-suggestion-icon]');
|
|
258
|
+
const urlEl = this.nodes.suggestion.querySelector<HTMLElement>('[data-link-suggestion-url]');
|
|
259
|
+
const typeEl = this.nodes.suggestion.querySelector<HTMLElement>('[data-link-suggestion-type]');
|
|
260
|
+
const row = this.nodes.suggestion.querySelector<HTMLElement>('[data-link-suggestion-row]');
|
|
261
|
+
|
|
262
|
+
if (iconEl) {
|
|
263
|
+
iconEl.innerHTML = icon;
|
|
264
|
+
iconEl.className = `${isComplete ? 'text-gray-text' : 'text-gray-text opacity-40'} shrink-0 flex [&>svg]:size-7`;
|
|
265
|
+
}
|
|
266
|
+
if (urlEl) {
|
|
267
|
+
urlEl.textContent = trimmed;
|
|
268
|
+
urlEl.className = `block text-xs font-medium truncate ${isComplete ? 'text-text-primary' : 'text-gray-text'}`;
|
|
269
|
+
}
|
|
270
|
+
if (typeEl) {
|
|
271
|
+
typeEl.textContent = isComplete ? label : 'Keep typing to add a link';
|
|
272
|
+
typeEl.className = 'block text-[10.5px] text-gray-text leading-tight mt-px';
|
|
273
|
+
}
|
|
274
|
+
if (row) {
|
|
275
|
+
row.className = isComplete ? SUGGESTION_ROW_VALID : SUGGESTION_ROW_INVALID;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
this.nodes.suggestion.classList.remove('hidden');
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* Return true if the URL is complete enough to confirm as a link.
|
|
283
|
+
*
|
|
284
|
+
* Rules by category:
|
|
285
|
+
* - http/https → must have at least one character after "://"
|
|
286
|
+
* - other :// → same (ftp, ws, etc.)
|
|
287
|
+
* - mailto/tel/… → must have something after the colon
|
|
288
|
+
* - //host → must have at least one character after "//"
|
|
289
|
+
* - #anchor → must have at least one character after "#"
|
|
290
|
+
* - /path → always valid (internal link)
|
|
291
|
+
* - plain text → must look like a domain (dot + 2+ letter TLD) or IP address
|
|
292
|
+
*/
|
|
293
|
+
private isLinkComplete(url: string): boolean {
|
|
294
|
+
// http / https — require a non-empty host after "://"
|
|
295
|
+
if (/^https?:\/\//i.test(url)) {
|
|
296
|
+
return url.replace(/^https?:\/\//i, '').length > 0;
|
|
297
|
+
}
|
|
298
|
+
// Other double-slash protocols (ftp://, ws://, etc.)
|
|
299
|
+
if (/^\w+:\/\//.test(url)) {
|
|
300
|
+
return url.replace(/^\w+:\/\//, '').length > 0;
|
|
301
|
+
}
|
|
302
|
+
// Single-colon schemes: mailto:, tel:, sms:, etc. — require something after ":"
|
|
303
|
+
if (/^\w+:/.test(url)) {
|
|
304
|
+
return url.slice(url.indexOf(':') + 1).length > 0;
|
|
305
|
+
}
|
|
306
|
+
// Protocol-relative — require a non-empty host after "//"
|
|
307
|
+
if (url.startsWith('//')) {
|
|
308
|
+
return url.slice(2).length > 0;
|
|
309
|
+
}
|
|
310
|
+
// Anchor — require at least one character after "#"
|
|
311
|
+
if (url.startsWith('#')) {
|
|
312
|
+
return url.length > 1;
|
|
313
|
+
}
|
|
314
|
+
// Absolute internal path — always valid
|
|
315
|
+
if (url.startsWith('/')) {
|
|
316
|
+
return true;
|
|
317
|
+
}
|
|
318
|
+
// Plain text — must look like a domain or IP address
|
|
319
|
+
return /\.[a-zA-Z]{2,}/.test(url) || /^\d{1,3}(\.\d{1,3}){3}/.test(url);
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* Return the icon SVG and human-readable label for a given URL
|
|
324
|
+
*/
|
|
325
|
+
private getLinkTypeInfo(url: string): { icon: string; label: string } {
|
|
326
|
+
if (url.startsWith('mailto:')) {
|
|
327
|
+
return { icon: IconMail, label: 'Email address' };
|
|
328
|
+
}
|
|
329
|
+
if (url.startsWith('#')) {
|
|
330
|
+
return { icon: IconHash, label: 'Jump to section' };
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
return { icon: IconGlobe, label: 'Link to web page' };
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* Insert the link from the input — called by the suggestion chip click
|
|
338
|
+
*/
|
|
339
|
+
private confirmLink(): void {
|
|
340
|
+
if (!this.nodes.input) {
|
|
341
|
+
return;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
const value = this.nodes.input.value || '';
|
|
345
|
+
|
|
346
|
+
if (!value.trim() || !this.isLinkComplete(value.trim())) {
|
|
347
|
+
return;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
if (!this.validateURL(value)) {
|
|
351
|
+
this.notifier.show({
|
|
352
|
+
message: this.i18n.t('tools.link.invalidLink'),
|
|
353
|
+
style: 'error',
|
|
354
|
+
});
|
|
355
|
+
|
|
356
|
+
return;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
const preparedValue = this.prepareLink(value);
|
|
360
|
+
|
|
361
|
+
this.selection.removeFakeBackground();
|
|
362
|
+
this.selection.restore();
|
|
363
|
+
this.insertLink(preparedValue);
|
|
364
|
+
this.selection.collapseToEnd();
|
|
365
|
+
this.inlineToolbar.close();
|
|
366
|
+
}
|
|
367
|
+
|
|
174
368
|
/**
|
|
175
369
|
* Shortcut for the link tool
|
|
176
370
|
*/
|
|
@@ -202,6 +396,8 @@ export class LinkInlineTool implements InlineTool {
|
|
|
202
396
|
this.nodes.input.value = '';
|
|
203
397
|
}
|
|
204
398
|
|
|
399
|
+
this.updateSuggestion(this.nodes.input.value);
|
|
400
|
+
|
|
205
401
|
this.nodes.input.className = twMerge(this.INPUT_BASE_CLASSES, 'block');
|
|
206
402
|
this.setBooleanStateAttribute(this.nodes.input, this.DATA_ATTRIBUTES.inputOpened, true);
|
|
207
403
|
|
|
@@ -310,6 +506,7 @@ export class LinkInlineTool implements InlineTool {
|
|
|
310
506
|
this.nodes.input.className = this.INPUT_BASE_CLASSES;
|
|
311
507
|
this.setBooleanStateAttribute(this.nodes.input, this.DATA_ATTRIBUTES.inputOpened, false);
|
|
312
508
|
this.nodes.input.value = '';
|
|
509
|
+
this.nodes.suggestion?.classList.add('hidden');
|
|
313
510
|
this.updateButtonStateAttributes(false);
|
|
314
511
|
this.unlinkAvailable = false;
|
|
315
512
|
if (clearSavedSelection) {
|