@jackuait/blok 0.10.3 → 0.10.5
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-3wc3aInM.mjs → blok-DSP5zC_s.mjs} +2374 -2159
- package/dist/chunks/{constants-Bp622jic.mjs → constants-B0Tns0mh.mjs} +318 -227
- package/dist/chunks/{i18next-loader-CDnSPae_.mjs → i18next-loader-D_v0EmDP.mjs} +1 -1
- package/dist/chunks/{lightweight-i18n-DZmo8dAI.mjs → lightweight-i18n-DTYoSr_o.mjs} +21 -0
- package/dist/{messages-bkGniiaz.mjs → chunks/messages--X-ZzYSb.mjs} +24 -3
- package/dist/chunks/{messages-DrfRYiM32.mjs → messages--tSqMtkx2.mjs} +24 -3
- package/dist/chunks/{messages-CW35K1pq.mjs → messages-3w1e16T2.mjs} +25 -4
- package/dist/chunks/{messages-BHMiK51R.mjs → messages-B5BaA6AV.mjs} +24 -3
- package/dist/{messages-DKHbt-7l2.mjs → chunks/messages-B5ZVSxG4.mjs} +25 -4
- package/dist/chunks/{messages-kGmxkeFH.mjs → messages-B9PUHq4t.mjs} +24 -3
- package/dist/chunks/{messages-BlxwW7M6.mjs → messages-BAxCMQgm.mjs} +24 -3
- package/dist/chunks/{messages-BRAoJpOu.mjs → messages-BDhWRN6Y.mjs} +25 -4
- package/dist/{messages-CdEASHDp2.mjs → chunks/messages-BGpx2ecP2.mjs} +24 -3
- package/dist/{messages-C6ONf71u2.mjs → chunks/messages-BHUQs6402.mjs} +24 -3
- package/dist/{messages-BrOWqNCu2.mjs → chunks/messages-BIXCvkbG.mjs} +24 -3
- package/dist/chunks/{messages-DMoERagV2.mjs → messages-BKeL1zk-2.mjs} +24 -3
- package/dist/chunks/{messages-DjvaiALg2.mjs → messages-Bedied602.mjs} +24 -3
- package/dist/chunks/{messages-oMc7qugU2.mjs → messages-Bg8uBETk2.mjs} +24 -3
- package/dist/{messages-CRNogopy2.mjs → chunks/messages-Blg1X6YL.mjs} +24 -3
- package/dist/chunks/{messages-euM2m3wQ.mjs → messages-BmDMK9Dg.mjs} +24 -3
- package/dist/{messages-D3rwCtKn.mjs → chunks/messages-BmDw1fZF2.mjs} +24 -3
- package/dist/{messages-qfvXgPpu2.mjs → chunks/messages-BqKIunt0.mjs} +24 -3
- package/dist/chunks/{messages-BfAcUavP.mjs → messages-BszGK0ox.mjs} +26 -5
- package/dist/{messages-BckDk9aq2.mjs → chunks/messages-Buwm8xrX2.mjs} +24 -3
- package/dist/chunks/{messages-CC_noR8y.mjs → messages-BvoElEE_.mjs} +24 -3
- package/dist/chunks/{messages-zt6zdYWh.mjs → messages-ByHXyVi6.mjs} +23 -2
- package/dist/chunks/{messages-DBMaLL8b2.mjs → messages-C9HPruJj2.mjs} +24 -3
- package/dist/{messages-DQORja0D.mjs → chunks/messages-CDtmVcBc.mjs} +26 -5
- package/dist/chunks/{messages-wl8YrvGG.mjs → messages-CEWKcK-Q.mjs} +23 -2
- package/dist/chunks/{messages-CZSlfnkO2.mjs → messages-CRLvJfNU2.mjs} +22 -1
- package/dist/chunks/{messages-BRoa9tGl.mjs → messages-CXjSY5Fy.mjs} +24 -3
- package/dist/{messages-BesJaI6A.mjs → chunks/messages-CdWS0hvw.mjs} +29 -8
- package/dist/{messages-JNrYldAa2.mjs → chunks/messages-Cic0Y1z6.mjs} +24 -3
- package/dist/chunks/{messages-CTCe595D2.mjs → messages-CmGixnBb2.mjs} +24 -3
- package/dist/chunks/{messages-JSQjKQ8I.mjs → messages-CrCalcxK.mjs} +24 -3
- package/dist/chunks/{messages-DUr9WAkD.mjs → messages-D3wlt9eE.mjs} +22 -1
- package/dist/{messages-CdduYw-q.mjs → chunks/messages-D5NWb-B9.mjs} +23 -2
- package/dist/chunks/{messages-CRF7nNrO.mjs → messages-D5lY22F4.mjs} +24 -3
- package/dist/{messages-_PLyRfVw.mjs → chunks/messages-DGYjioKM.mjs} +26 -5
- package/dist/{messages-Che99vKP.mjs → chunks/messages-DIH2U0ZD.mjs} +24 -3
- package/dist/chunks/{messages-BJ-vT1SU2.mjs → messages-DIUegdwv2.mjs} +24 -3
- package/dist/chunks/{messages-BgM91Lxm2.mjs → messages-DKZHsfXy2.mjs} +25 -4
- package/dist/chunks/{messages-1_6UkKLS.mjs → messages-DKjUcEfs.mjs} +24 -3
- package/dist/{messages-C1vc5584.mjs → chunks/messages-DOPK-Xif2.mjs} +24 -3
- package/dist/chunks/{messages-DB_-5Xln.mjs → messages-DSMFg80t.mjs} +25 -4
- package/dist/{messages-A96tMxeU.mjs → chunks/messages-DT6eM0I22.mjs} +22 -1
- package/dist/chunks/{messages-DUeiPraX.mjs → messages-DZTQIS9F.mjs} +24 -3
- package/dist/{messages-apA6BStA.mjs → chunks/messages-DalLfJNC.mjs} +24 -3
- package/dist/chunks/{messages-QilfinOn2.mjs → messages-DggaAu362.mjs} +24 -3
- package/dist/chunks/{messages-CxxyR4vY.mjs → messages-DgoJDjHm.mjs} +24 -3
- package/dist/chunks/{messages-ElIGUi0O2.mjs → messages-DhgEjOjw2.mjs} +25 -4
- package/dist/chunks/{messages-sDdNf8O9.mjs → messages-Dk-d3mmM.mjs} +22 -1
- package/dist/{messages-BE_z-zrb.mjs → chunks/messages-DlTG06-j.mjs} +25 -4
- package/dist/chunks/{messages-C0IFfhnp.mjs → messages-Dle6Hv30.mjs} +22 -1
- package/dist/{messages-DBhvm8NK.mjs → chunks/messages-DoD9yWMu2.mjs} +22 -1
- package/dist/{messages-D0lLw9KM.mjs → chunks/messages-DpnhbDoK2.mjs} +24 -3
- package/dist/{messages-DODrhcop.mjs → chunks/messages-DqGv-lj6.mjs} +24 -3
- package/dist/{messages-CZbcxlZt2.mjs → chunks/messages-DslnYTHU2.mjs} +24 -3
- package/dist/chunks/{messages-Du2BffA7.mjs → messages-IjEU7XAq.mjs} +24 -3
- package/dist/chunks/{messages-BK8Cp2d0.mjs → messages-JRjsu_bC.mjs} +24 -3
- package/dist/chunks/{messages-CszmHAvQ.mjs → messages-PkO_43Eb.mjs} +24 -3
- package/dist/chunks/{messages-CQBo3lmL2.mjs → messages-W2zpf0Mu2.mjs} +24 -3
- package/dist/{messages-Do7Xjy0n.mjs → chunks/messages-adEATsLK.mjs} +23 -2
- package/dist/{messages-E8NjqzWq2.mjs → chunks/messages-b8XGiuAa2.mjs} +23 -2
- package/dist/{messages-CisR4PNV.mjs → chunks/messages-bteFpBer.mjs} +24 -3
- package/dist/chunks/{messages-DVr1sqfI2.mjs → messages-cR48x2Aq2.mjs} +24 -3
- package/dist/chunks/{messages-4Ck88DYZ2.mjs → messages-f-YBthdd2.mjs} +24 -3
- package/dist/{messages-Xc0KUbYl.mjs → chunks/messages-fUpUvsRN.mjs} +25 -4
- package/dist/{messages-Be_2RHZD.mjs → chunks/messages-gNK1EolD.mjs} +25 -4
- package/dist/{messages-DfFZ6Yj5.mjs → chunks/messages-vqR3RAU4.mjs} +24 -3
- package/dist/{messages-BbJ7ZXY8.mjs → chunks/messages-wSX_4fK1.mjs} +24 -3
- package/dist/chunks/{tools-BC1jRfoS.mjs → tools-KZmhOKEo.mjs} +3407 -1299
- package/dist/full.mjs +10 -10
- package/dist/locales.mjs +88 -67
- package/dist/{chunks/messages-D22e9h7V2.mjs → messages--zgIPYtb.mjs} +22 -1
- package/dist/{chunks/messages-EDMC5ukV.mjs → messages-4jULpVvw.mjs} +24 -3
- package/dist/{messages-DK6dA0O2.mjs → messages-AbwSlRf_.mjs} +26 -5
- package/dist/{messages-Ddq3Ce3E2.mjs → messages-B-dl7Pwb2.mjs} +25 -4
- package/dist/{chunks/messages-BAlZjPcl.mjs → messages-B3rCRhb1.mjs} +24 -3
- package/dist/{chunks/messages-DSrdy9Nw2.mjs → messages-B73L8nKc2.mjs} +24 -3
- package/dist/{messages-ClGvlFcH2.mjs → messages-BAjsD2Vm2.mjs} +24 -3
- package/dist/{chunks/messages-BbEW9bQz.mjs → messages-BBodSb5B2.mjs} +24 -3
- package/dist/{messages-DopaMHC42.mjs → messages-BTpn6H9x2.mjs} +22 -1
- package/dist/{messages-D0005ti32.mjs → messages-BWb0GjTj2.mjs} +24 -3
- package/dist/{messages-Q5sQeVap2.mjs → messages-BbCgnri12.mjs} +24 -3
- package/dist/{chunks/messages-BeGZqQwz.mjs → messages-Bfon_Y3q.mjs} +25 -4
- package/dist/{messages-CTTmWn4Y2.mjs → messages-BhOtow9J2.mjs} +24 -3
- package/dist/{messages-98nQiC7t2.mjs → messages-BoB7m0uu2.mjs} +25 -4
- package/dist/{messages-CT-Kdas6.mjs → messages-BsOZPjeg.mjs} +24 -3
- package/dist/{messages-D6VIFnSW.mjs → messages-BuzKUYPV.mjs} +24 -3
- package/dist/{chunks/messages-DEBy3nuJ2.mjs → messages-BzOKMdMQ.mjs} +22 -1
- package/dist/{messages-DOGbHYv-2.mjs → messages-C2H3PeQW2.mjs} +24 -3
- package/dist/{chunks/messages-DxHh0O8j2.mjs → messages-C5KNzSTk.mjs} +24 -3
- package/dist/{chunks/messages-eFd4YYzt.mjs → messages-CIDYjE6l.mjs} +24 -3
- package/dist/{messages-Dqu4aX9s.mjs → messages-CJmyF5ye.mjs} +23 -2
- package/dist/{messages-qbKjjvgd2.mjs → messages-CTwiYb2a2.mjs} +22 -1
- package/dist/{chunks/messages-CPBN4zWc.mjs → messages-CUHoJaDO.mjs} +24 -3
- package/dist/{messages-D05jqBIa2.mjs → messages-CVeuqUjQ2.mjs} +24 -3
- package/dist/{chunks/messages-BMD37y3q2.mjs → messages-CW75b4sz.mjs} +24 -3
- package/dist/{chunks/messages-CD_MnBln.mjs → messages-CXd7YeWV.mjs} +24 -3
- package/dist/{messages-DVL0KZE5.mjs → messages-CjlYkunD.mjs} +24 -3
- package/dist/{chunks/messages-BKN3YVIj.mjs → messages-CrGx64yd.mjs} +25 -4
- package/dist/{messages-BK_LsgY4.mjs → messages-Ct0jbgHd.mjs} +24 -3
- package/dist/{messages-BmH2cQHQ.mjs → messages-CtKrCYD1.mjs} +24 -3
- package/dist/{messages-neGD3WGq.mjs → messages-Cu2eLjfJ.mjs} +24 -3
- package/dist/{messages-Brd5R-da2.mjs → messages-CvwQ-fK_2.mjs} +24 -3
- package/dist/{messages-uwK7ktqk.mjs → messages-Cy6UYN9b.mjs} +22 -1
- package/dist/{chunks/messages-ChK7v1PV.mjs → messages-D01vnfA9.mjs} +24 -3
- package/dist/{messages-DpwMKDV0.mjs → messages-D0BAV45W.mjs} +24 -3
- package/dist/{messages-LMaR2_bE.mjs → messages-D5LGpdga.mjs} +24 -3
- package/dist/{messages-BcVB3osF.mjs → messages-DATK4ftv.mjs} +25 -4
- package/dist/{chunks/messages-Bz0-KNEB.mjs → messages-DEl77Urv2.mjs} +25 -4
- package/dist/{messages-DSmxJWju2.mjs → messages-DHNjM2nv2.mjs} +22 -1
- package/dist/{messages-DYuD5-rO.mjs → messages-DMW8b_sO.mjs} +24 -3
- package/dist/{chunks/messages-DPzHD51Y.mjs → messages-DNmgANKr.mjs} +23 -2
- package/dist/{chunks/messages-C1S9ztpF.mjs → messages-DQaa3cEM.mjs} +25 -4
- package/dist/{chunks/messages-a07QVz8U.mjs → messages-DSlD4bV9.mjs} +24 -3
- package/dist/{messages-DM4Gjc9h.mjs → messages-DTzbkXFt.mjs} +24 -3
- package/dist/{messages-LYJbLq_F.mjs → messages-DbZihxtV.mjs} +24 -3
- package/dist/{messages-C_Qn9SbQ.mjs → messages-DeE8fyKQ.mjs} +24 -3
- package/dist/{chunks/messages-Q7-4ZJLB2.mjs → messages-Dg-TpO2S2.mjs} +24 -3
- package/dist/{messages-BiTMwiKH.mjs → messages-DgP82LzF.mjs} +23 -2
- package/dist/{chunks/messages-QMOmwcZb.mjs → messages-Dh3Vt7WC.mjs} +23 -2
- package/dist/{messages-C0GSBBCo2.mjs → messages-DiVVyZD22.mjs} +25 -4
- package/dist/{chunks/messages-BONyZroH.mjs → messages-DpRnGjoe.mjs} +26 -5
- package/dist/{chunks/messages-8Ld7P_9j2.mjs → messages-DqZmrFaa2.mjs} +24 -3
- package/dist/{chunks/messages-CxiURE2X.mjs → messages-Dra9Fz5Q.mjs} +26 -5
- package/dist/{chunks/messages-Clku7Cf-2.mjs → messages-DuPBRgEF2.mjs} +23 -2
- package/dist/{messages-53w0fPZS2.mjs → messages-DuxEyAY-2.mjs} +25 -4
- package/dist/{chunks/messages-D7dx_6k8.mjs → messages-FmJD6lHR2.mjs} +24 -3
- package/dist/{chunks/messages-DTN1XGll.mjs → messages-ONielGl92.mjs} +24 -3
- package/dist/{chunks/messages-CIfUm1Oa.mjs → messages-RzgUqCGb2.mjs} +24 -3
- package/dist/{messages-DpJGbx3q.mjs → messages-U22AKGKs.mjs} +24 -3
- package/dist/{messages-2ZWBTerL.mjs → messages-XufeeRfO.mjs} +24 -3
- package/dist/{messages-CnuH-BZK2.mjs → messages-fprUm7SO2.mjs} +24 -3
- package/dist/{messages-C7lJg8fy2.mjs → messages-gFNdz3Tn2.mjs} +24 -3
- package/dist/{chunks/messages-C15z2r5U.mjs → messages-h_n5GBm6.mjs} +29 -8
- package/dist/{chunks/messages-CvANwuht2.mjs → messages-oOogIpsL2.mjs} +24 -3
- package/dist/{chunks/messages-DtoId_bw2.mjs → messages-otwg3KcK.mjs} +24 -3
- package/dist/{messages-D81w6AmW.mjs → messages-rDDoBMWb.mjs} +24 -3
- package/dist/{messages-Dnd5YSWv.mjs → messages-trQPxZIu.mjs} +24 -3
- package/dist/react.mjs +2 -2
- package/dist/tools.mjs +3 -3
- package/dist/vendor.LICENSE.txt +135 -0
- package/package.json +2 -1
- package/src/blok.ts +103 -0
- package/src/components/block/index.ts +21 -2
- package/src/components/block-tunes/block-tune-copy-link.ts +82 -0
- package/src/components/i18n/locales/am/messages.json +24 -3
- package/src/components/i18n/locales/ar/messages.json +24 -3
- package/src/components/i18n/locales/az/messages.json +24 -3
- package/src/components/i18n/locales/bg/messages.json +23 -2
- package/src/components/i18n/locales/bn/messages.json +24 -3
- package/src/components/i18n/locales/bs/messages.json +26 -5
- package/src/components/i18n/locales/cs/messages.json +25 -4
- package/src/components/i18n/locales/da/messages.json +25 -4
- package/src/components/i18n/locales/de/messages.json +24 -3
- package/src/components/i18n/locales/dv/messages.json +24 -3
- package/src/components/i18n/locales/el/messages.json +24 -3
- package/src/components/i18n/locales/en/messages.json +21 -0
- package/src/components/i18n/locales/es/messages.json +25 -4
- package/src/components/i18n/locales/et/messages.json +23 -2
- package/src/components/i18n/locales/fa/messages.json +24 -3
- package/src/components/i18n/locales/fi/messages.json +24 -3
- package/src/components/i18n/locales/fil/messages.json +29 -8
- package/src/components/i18n/locales/fr/messages.json +24 -3
- package/src/components/i18n/locales/gu/messages.json +24 -3
- package/src/components/i18n/locales/he/messages.json +24 -3
- package/src/components/i18n/locales/hi/messages.json +24 -3
- package/src/components/i18n/locales/hr/messages.json +26 -5
- package/src/components/i18n/locales/hu/messages.json +25 -4
- package/src/components/i18n/locales/hy/messages.json +24 -3
- package/src/components/i18n/locales/id/messages.json +23 -2
- package/src/components/i18n/locales/it/messages.json +26 -5
- package/src/components/i18n/locales/ja/messages.json +24 -3
- package/src/components/i18n/locales/ka/messages.json +24 -3
- package/src/components/i18n/locales/km/messages.json +22 -1
- package/src/components/i18n/locales/kn/messages.json +24 -3
- package/src/components/i18n/locales/ko/messages.json +24 -3
- package/src/components/i18n/locales/ku/messages.json +24 -3
- package/src/components/i18n/locales/lo/messages.json +22 -1
- package/src/components/i18n/locales/lt/messages.json +24 -3
- package/src/components/i18n/locales/lv/messages.json +24 -3
- package/src/components/i18n/locales/mk/messages.json +24 -3
- package/src/components/i18n/locales/ml/messages.json +24 -3
- package/src/components/i18n/locales/mn/messages.json +24 -3
- package/src/components/i18n/locales/mr/messages.json +24 -3
- package/src/components/i18n/locales/ms/messages.json +22 -1
- package/src/components/i18n/locales/my/messages.json +24 -3
- package/src/components/i18n/locales/ne/messages.json +24 -3
- package/src/components/i18n/locales/nl/messages.json +24 -3
- package/src/components/i18n/locales/no/messages.json +25 -4
- package/src/components/i18n/locales/pa/messages.json +24 -3
- package/src/components/i18n/locales/pl/messages.json +25 -4
- package/src/components/i18n/locales/ps/messages.json +24 -3
- package/src/components/i18n/locales/pt/messages.json +24 -3
- package/src/components/i18n/locales/ro/messages.json +24 -3
- package/src/components/i18n/locales/ru/messages.json +23 -2
- package/src/components/i18n/locales/sd/messages.json +24 -3
- package/src/components/i18n/locales/si/messages.json +24 -3
- package/src/components/i18n/locales/sk/messages.json +25 -4
- package/src/components/i18n/locales/sl/messages.json +25 -4
- package/src/components/i18n/locales/sq/messages.json +25 -4
- package/src/components/i18n/locales/sr/messages.json +24 -3
- package/src/components/i18n/locales/sv/messages.json +24 -3
- package/src/components/i18n/locales/sw/messages.json +22 -1
- package/src/components/i18n/locales/ta/messages.json +24 -3
- package/src/components/i18n/locales/te/messages.json +24 -3
- package/src/components/i18n/locales/th/messages.json +22 -1
- package/src/components/i18n/locales/tr/messages.json +24 -3
- package/src/components/i18n/locales/ug/messages.json +24 -3
- package/src/components/i18n/locales/uk/messages.json +23 -2
- package/src/components/i18n/locales/ur/messages.json +24 -3
- package/src/components/i18n/locales/vi/messages.json +22 -1
- package/src/components/i18n/locales/yi/messages.json +24 -3
- package/src/components/i18n/locales/zh/messages.json +24 -3
- package/src/components/icons/index.ts +65 -0
- package/src/components/inline-tools/inline-tool-bold.ts +10 -0
- package/src/components/inline-tools/inline-tool-code.ts +35 -1
- package/src/components/inline-tools/inline-tool-italic.ts +37 -1
- package/src/components/inline-tools/inline-tool-strikethrough.ts +35 -1
- package/src/components/inline-tools/inline-tool-underline.ts +35 -1
- package/src/components/inline-tools/services/bold-normalization-pass.ts +2 -4
- package/src/components/inline-tools/utils/formatting-range-utils.ts +83 -0
- package/src/components/modules/api/tools.ts +19 -0
- package/src/components/modules/blockEvents/composers/keyboardNavigation.ts +7 -1
- package/src/components/modules/blockManager/blockManager.ts +22 -0
- package/src/components/modules/blockManager/event-binder.ts +12 -1
- package/src/components/modules/blockManager/factory.ts +4 -0
- package/src/components/modules/blockManager/types.ts +4 -0
- package/src/components/modules/blockManager/yjs-sync.ts +16 -2
- package/src/components/modules/paste/google-docs-preprocessor.ts +49 -3
- package/src/components/modules/paste/handlers/table-cells-handler.ts +12 -2
- package/src/components/modules/paste/index.ts +8 -4
- package/src/components/modules/paste/types.ts +2 -0
- package/src/components/modules/renderer.ts +22 -2
- package/src/components/modules/saver.ts +19 -1
- package/src/components/modules/themeManager.ts +3 -1
- package/src/components/modules/toolbar/blockSettings.ts +51 -1
- package/src/components/modules/toolbar/inline/index.ts +0 -3
- package/src/components/modules/tools.ts +5 -0
- package/src/components/modules/ui.ts +1 -0
- package/src/components/modules/uiControllers/controllers/keyboard.ts +79 -0
- package/src/components/modules/uiControllers/controllers/selection.ts +14 -2
- package/src/components/modules/yjs/document-store.ts +22 -0
- package/src/components/modules/yjs/index.ts +10 -0
- package/src/components/modules/yjs/serializer.ts +20 -0
- package/src/components/ui/toolbox.ts +0 -1
- package/src/components/utils/id-generator.ts +11 -0
- package/src/components/utils/key-icon.ts +187 -0
- package/src/components/utils/popover/components/hint/hint.ts +3 -1
- package/src/components/utils/popover/components/popover-item/popover-item-default/popover-item-default.ts +18 -5
- package/src/components/utils/popover/popover-abstract.ts +45 -0
- package/src/components/utils/popover/popover-desktop.ts +1 -0
- package/src/components/utils/popover/popover-position.ts +4 -2
- package/src/components/utils/popover/popover.const.ts +2 -0
- package/src/components/utils.ts +1 -0
- package/src/styles/main.css +1272 -0
- package/src/tools/code/index.ts +4 -0
- package/src/tools/database/database-backend-sync.ts +132 -0
- package/src/tools/database/database-board-view.ts +410 -0
- package/src/tools/database/database-card-drag.ts +306 -0
- package/src/tools/database/database-card-drawer.ts +546 -0
- package/src/tools/database/database-column-controls.ts +141 -0
- package/src/tools/database/database-column-drag.ts +262 -0
- package/src/tools/database/database-keyboard.ts +35 -0
- package/src/tools/database/database-list-row-drag.ts +245 -0
- package/src/tools/database/database-list-view.ts +333 -0
- package/src/tools/database/database-model.ts +214 -0
- package/src/tools/database/database-property-type-popover.ts +108 -0
- package/src/tools/database/database-tab-bar.ts +558 -0
- package/src/tools/database/database-view-popover.ts +129 -0
- package/src/tools/database/database-view-renderer.ts +25 -0
- package/src/tools/database/database-view.ts +269 -0
- package/src/tools/database/index.ts +1223 -0
- package/src/tools/database/types.ts +168 -0
- package/src/tools/database-row/index.ts +74 -0
- package/src/tools/index.ts +4 -0
- package/types/api/tools.d.ts +18 -0
- package/types/configs/blok-config.d.ts +27 -0
- package/types/data-formats/output-data.d.ts +13 -0
- package/types/index.d.ts +17 -0
- package/types/tools/database.d.ts +152 -0
- package/types/tools-entry.d.ts +7 -4
- package/types/utils/popover/popover.d.ts +6 -0
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import type { BlockToolData, OutputData } from '../../../types';
|
|
2
|
+
|
|
3
|
+
// ─── Property types ───
|
|
4
|
+
|
|
5
|
+
export type PropertyType = 'title' | 'text' | 'number' | 'select' | 'multiSelect' | 'date' | 'checkbox' | 'url' | 'richText';
|
|
6
|
+
|
|
7
|
+
export interface SelectOption {
|
|
8
|
+
id: string;
|
|
9
|
+
label: string;
|
|
10
|
+
color?: string;
|
|
11
|
+
position: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface SelectPropertyConfig {
|
|
15
|
+
options: SelectOption[];
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export type PropertyConfig = SelectPropertyConfig;
|
|
19
|
+
|
|
20
|
+
export interface PropertyDefinition {
|
|
21
|
+
id: string;
|
|
22
|
+
name: string;
|
|
23
|
+
type: PropertyType;
|
|
24
|
+
position: string;
|
|
25
|
+
config?: PropertyConfig;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export type PropertyValue = string | number | boolean | string[] | OutputData | null;
|
|
29
|
+
|
|
30
|
+
// ─── Rows ───
|
|
31
|
+
|
|
32
|
+
export interface DatabaseRow {
|
|
33
|
+
id: string;
|
|
34
|
+
position: string;
|
|
35
|
+
properties: Record<string, PropertyValue>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface DatabaseRowData extends BlockToolData {
|
|
39
|
+
properties: Record<string, PropertyValue>;
|
|
40
|
+
position: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// ─── View config ───
|
|
44
|
+
|
|
45
|
+
export type ViewType = 'board' | 'table' | 'gallery' | 'list';
|
|
46
|
+
|
|
47
|
+
export interface SortConfig {
|
|
48
|
+
propertyId: string;
|
|
49
|
+
direction: 'asc' | 'desc';
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export interface FilterConfig {
|
|
53
|
+
propertyId: string;
|
|
54
|
+
operator: string;
|
|
55
|
+
value: PropertyValue;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface DatabaseViewConfig {
|
|
59
|
+
id: string;
|
|
60
|
+
name: string;
|
|
61
|
+
type: ViewType;
|
|
62
|
+
position: string;
|
|
63
|
+
groupBy?: string;
|
|
64
|
+
sorts: SortConfig[];
|
|
65
|
+
filters: FilterConfig[];
|
|
66
|
+
visibleProperties: string[];
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// ─── Top-level saved data ───
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Data saved by the database block.
|
|
73
|
+
* Schema and views only — rows are child blocks (database-row type).
|
|
74
|
+
*/
|
|
75
|
+
export interface DatabaseData extends BlockToolData {
|
|
76
|
+
title?: string;
|
|
77
|
+
schema: PropertyDefinition[];
|
|
78
|
+
views: DatabaseViewConfig[];
|
|
79
|
+
activeViewId: string;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// ─── View data (kanban board) ───
|
|
83
|
+
|
|
84
|
+
export interface KanbanColumnData {
|
|
85
|
+
id: string;
|
|
86
|
+
title: string;
|
|
87
|
+
color?: string;
|
|
88
|
+
position: string;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export interface KanbanCardData {
|
|
92
|
+
id: string;
|
|
93
|
+
title: string;
|
|
94
|
+
columnId: string;
|
|
95
|
+
position: string;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// ─── Adapter ───
|
|
99
|
+
|
|
100
|
+
export interface DatabaseAdapter {
|
|
101
|
+
loadDatabase(): Promise<{
|
|
102
|
+
schema: PropertyDefinition[];
|
|
103
|
+
views: DatabaseViewConfig[];
|
|
104
|
+
}>;
|
|
105
|
+
|
|
106
|
+
createRow(params: {
|
|
107
|
+
id: string;
|
|
108
|
+
properties: Record<string, PropertyValue>;
|
|
109
|
+
position: string;
|
|
110
|
+
}): Promise<DatabaseRow>;
|
|
111
|
+
|
|
112
|
+
updateRow(params: {
|
|
113
|
+
rowId: string;
|
|
114
|
+
properties: Record<string, PropertyValue>;
|
|
115
|
+
}): Promise<DatabaseRow>;
|
|
116
|
+
|
|
117
|
+
moveRow(params: {
|
|
118
|
+
rowId: string;
|
|
119
|
+
position: string;
|
|
120
|
+
}): Promise<DatabaseRow>;
|
|
121
|
+
|
|
122
|
+
deleteRow(params: {
|
|
123
|
+
rowId: string;
|
|
124
|
+
}): Promise<void>;
|
|
125
|
+
|
|
126
|
+
createProperty(params: {
|
|
127
|
+
id: string;
|
|
128
|
+
name: string;
|
|
129
|
+
type: PropertyType;
|
|
130
|
+
position: string;
|
|
131
|
+
config?: PropertyConfig;
|
|
132
|
+
}): Promise<PropertyDefinition>;
|
|
133
|
+
|
|
134
|
+
updateProperty(params: {
|
|
135
|
+
propertyId: string;
|
|
136
|
+
changes: Partial<Pick<PropertyDefinition, 'name' | 'config'>>;
|
|
137
|
+
}): Promise<PropertyDefinition>;
|
|
138
|
+
|
|
139
|
+
deleteProperty(params: {
|
|
140
|
+
propertyId: string;
|
|
141
|
+
}): Promise<void>;
|
|
142
|
+
|
|
143
|
+
createView(params: {
|
|
144
|
+
id: string;
|
|
145
|
+
name: string;
|
|
146
|
+
type: ViewType;
|
|
147
|
+
position: string;
|
|
148
|
+
groupBy?: string;
|
|
149
|
+
sorts?: SortConfig[];
|
|
150
|
+
filters?: FilterConfig[];
|
|
151
|
+
visibleProperties?: string[];
|
|
152
|
+
}): Promise<DatabaseViewConfig>;
|
|
153
|
+
|
|
154
|
+
updateView(params: {
|
|
155
|
+
viewId: string;
|
|
156
|
+
changes: Partial<Pick<DatabaseViewConfig,
|
|
157
|
+
'name' | 'type' | 'position' | 'groupBy' | 'sorts' | 'filters' | 'visibleProperties'
|
|
158
|
+
>>;
|
|
159
|
+
}): Promise<DatabaseViewConfig>;
|
|
160
|
+
|
|
161
|
+
deleteView(params: {
|
|
162
|
+
viewId: string;
|
|
163
|
+
}): Promise<void>;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export interface DatabaseConfig {
|
|
167
|
+
adapter?: DatabaseAdapter;
|
|
168
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { BlockTool, BlockToolConstructorOptions } from '../../../types/tools/block-tool';
|
|
2
|
+
import type { DatabaseRowData, PropertyValue } from '../database/types';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* DatabaseRowTool — lightweight block that stores a single database row.
|
|
6
|
+
*
|
|
7
|
+
* Not user-insertable (no toolbox entry). The parent DatabaseTool creates
|
|
8
|
+
* and manages row blocks; this tool's job is to hold properties and position
|
|
9
|
+
* as block data so rows participate in the block tree.
|
|
10
|
+
*
|
|
11
|
+
* Custom methods (updateProperties, updatePosition, getProperties, getPosition)
|
|
12
|
+
* are accessed by the parent DatabaseTool via block.call('methodName', params),
|
|
13
|
+
* which invokes tool instance methods by name through the Block adapter.
|
|
14
|
+
*/
|
|
15
|
+
export class DatabaseRowTool implements BlockTool {
|
|
16
|
+
private _data: DatabaseRowData;
|
|
17
|
+
|
|
18
|
+
constructor({ data }: BlockToolConstructorOptions<DatabaseRowData>) {
|
|
19
|
+
this._data = {
|
|
20
|
+
properties: data.properties ?? {},
|
|
21
|
+
position: data.position ?? 'a0',
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
public render(): HTMLDivElement {
|
|
26
|
+
const el = document.createElement('div');
|
|
27
|
+
|
|
28
|
+
el.setAttribute('data-blok-tool', 'database-row');
|
|
29
|
+
|
|
30
|
+
return el;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
public save(_block: HTMLElement): DatabaseRowData {
|
|
34
|
+
return {
|
|
35
|
+
properties: this._data.properties,
|
|
36
|
+
position: this._data.position,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
public validate(data: DatabaseRowData): boolean {
|
|
41
|
+
return data.properties !== null && data.properties !== undefined && typeof data.properties === 'object';
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
public updateProperties(changes: Record<string, PropertyValue>): void {
|
|
45
|
+
Object.assign(this._data.properties, changes);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
public updatePosition(param: { position: string }): void {
|
|
49
|
+
this._data.position = param.position;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
public getProperties(): Record<string, PropertyValue> {
|
|
53
|
+
return this._data.properties;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
public getPosition(): string {
|
|
57
|
+
return this._data.position;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
public static get isReadOnlySupported(): boolean {
|
|
61
|
+
return true;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* No-op: DatabaseRowTool renders an invisible div with no interactive elements.
|
|
66
|
+
* Implementing this method enables the fast-path in-place read-only toggle in
|
|
67
|
+
* the ReadOnly module (which requires ALL tools to have setReadOnly()).
|
|
68
|
+
*/
|
|
69
|
+
public setReadOnly(_state: boolean): void {
|
|
70
|
+
// intentionally empty
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export type { DatabaseRowData };
|
package/src/tools/index.ts
CHANGED
|
@@ -26,6 +26,8 @@ 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 { DatabaseTool as Database } from './database';
|
|
30
|
+
export { DatabaseRowTool as DatabaseRow } from './database-row';
|
|
29
31
|
export { DividerTool as Divider } from './divider';
|
|
30
32
|
export { Quote } from './quote';
|
|
31
33
|
export { CodeTool as Code } from './code';
|
|
@@ -49,6 +51,8 @@ export const defaultBlockTools = {
|
|
|
49
51
|
table: {},
|
|
50
52
|
toggle: {},
|
|
51
53
|
callout: {},
|
|
54
|
+
database: {},
|
|
55
|
+
'database-row': {},
|
|
52
56
|
divider: {},
|
|
53
57
|
quote: {},
|
|
54
58
|
code: { inlineToolbar: false },
|
package/types/api/tools.d.ts
CHANGED
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
import { BlockToolAdapter } from '../tools/adapters/block-tool-adapter';
|
|
2
|
+
import { ToolConstructable, ToolSettings } from '../tools';
|
|
3
|
+
import { ThemeMode } from './theme';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Tools-related configuration that can be passed to a nested Blok instance.
|
|
7
|
+
*/
|
|
8
|
+
export interface ToolsConfig {
|
|
9
|
+
tools: { [toolName: string]: ToolConstructable | ToolSettings } | undefined;
|
|
10
|
+
inlineToolbar?: string[] | boolean;
|
|
11
|
+
tunes?: string[];
|
|
12
|
+
theme?: ThemeMode;
|
|
13
|
+
}
|
|
2
14
|
|
|
3
15
|
/**
|
|
4
16
|
* Describes methods for accessing installed Blok tools
|
|
@@ -8,4 +20,10 @@ export interface Tools {
|
|
|
8
20
|
* Returns all available Block Tools
|
|
9
21
|
*/
|
|
10
22
|
getBlockTools(): BlockToolAdapter[];
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Returns the tools-related configuration of the current editor instance.
|
|
26
|
+
* Useful for creating nested Blok editors with the same tools.
|
|
27
|
+
*/
|
|
28
|
+
getToolsConfig(): ToolsConfig;
|
|
11
29
|
}
|
|
@@ -183,4 +183,31 @@ export interface BlokConfig {
|
|
|
183
183
|
* @param resolvedTheme - the resolved theme ('dark' or 'light')
|
|
184
184
|
*/
|
|
185
185
|
onThemeChange?: (resolvedTheme: ResolvedTheme) => void;
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Options for the automatic scroll-to-block behavior on hash navigation.
|
|
189
|
+
* When the page URL contains a hash (`#<blockId>`) that matches a block ID,
|
|
190
|
+
* the editor smooth-scrolls to that block once all blocks are rendered.
|
|
191
|
+
* This behavior is always active — this config object only controls offset.
|
|
192
|
+
* No-op if the URL contains no hash or the hash does not match any block ID.
|
|
193
|
+
*/
|
|
194
|
+
scrollToBlock?: {
|
|
195
|
+
/**
|
|
196
|
+
* Pixels to leave above the block when scrolling into view.
|
|
197
|
+
* Useful when a sticky header is present.
|
|
198
|
+
* @default 0
|
|
199
|
+
*/
|
|
200
|
+
topOffset?: number;
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* User identity for edit tracking.
|
|
205
|
+
* When set, the user's name is recorded on each block they edit.
|
|
206
|
+
*/
|
|
207
|
+
user?: {
|
|
208
|
+
/**
|
|
209
|
+
* Display name shown in the "Last edited by" footer in block settings.
|
|
210
|
+
*/
|
|
211
|
+
name: string;
|
|
212
|
+
};
|
|
186
213
|
}
|
|
@@ -41,6 +41,19 @@ export interface OutputBlockData<Type extends string = string, Data extends obje
|
|
|
41
41
|
* Omit if block has no children.
|
|
42
42
|
*/
|
|
43
43
|
content?: BlockId[];
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Timestamp (milliseconds since epoch) of the last edit to this block.
|
|
47
|
+
* Automatically tracked by the editor when content changes.
|
|
48
|
+
* Omit for legacy data or blocks that haven't been edited.
|
|
49
|
+
*/
|
|
50
|
+
lastEditedAt?: number;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Display name of the user who last edited this block.
|
|
54
|
+
* Set from the `user.name` config option. Omit if no user is configured.
|
|
55
|
+
*/
|
|
56
|
+
lastEditedBy?: string;
|
|
44
57
|
}
|
|
45
58
|
|
|
46
59
|
export interface OutputData {
|
package/types/index.d.ts
CHANGED
|
@@ -88,6 +88,23 @@ export {
|
|
|
88
88
|
export * from './utils/popover';
|
|
89
89
|
|
|
90
90
|
export { OutputData, OutputBlockData} from './data-formats/output-data';
|
|
91
|
+
export {
|
|
92
|
+
PropertyType,
|
|
93
|
+
SelectOption,
|
|
94
|
+
SelectPropertyConfig,
|
|
95
|
+
PropertyConfig,
|
|
96
|
+
PropertyDefinition,
|
|
97
|
+
PropertyValue,
|
|
98
|
+
DatabaseRow,
|
|
99
|
+
ViewType,
|
|
100
|
+
SortConfig,
|
|
101
|
+
FilterConfig,
|
|
102
|
+
DatabaseViewConfig,
|
|
103
|
+
DatabaseRowData,
|
|
104
|
+
DatabaseData,
|
|
105
|
+
DatabaseAdapter,
|
|
106
|
+
DatabaseConfig,
|
|
107
|
+
} from './tools/database';
|
|
91
108
|
export { BlockId } from './data-formats/block-id';
|
|
92
109
|
export {
|
|
93
110
|
BlockAPI,
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { BlockToolData } from './block-tool';
|
|
2
|
+
import { OutputData } from '../data-formats/output-data';
|
|
3
|
+
|
|
4
|
+
// ─── Property types ───
|
|
5
|
+
|
|
6
|
+
export type PropertyType = 'title' | 'text' | 'number' | 'select' | 'multiSelect' | 'date' | 'checkbox' | 'url' | 'richText';
|
|
7
|
+
|
|
8
|
+
export interface SelectOption {
|
|
9
|
+
id: string;
|
|
10
|
+
label: string;
|
|
11
|
+
color?: string;
|
|
12
|
+
position: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface SelectPropertyConfig {
|
|
16
|
+
options: SelectOption[];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export type PropertyConfig = SelectPropertyConfig;
|
|
20
|
+
|
|
21
|
+
export interface PropertyDefinition {
|
|
22
|
+
id: string;
|
|
23
|
+
name: string;
|
|
24
|
+
type: PropertyType;
|
|
25
|
+
position: string;
|
|
26
|
+
config?: PropertyConfig;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export type PropertyValue = string | number | boolean | string[] | OutputData | null;
|
|
30
|
+
|
|
31
|
+
// ─── Rows ───
|
|
32
|
+
|
|
33
|
+
export interface DatabaseRow {
|
|
34
|
+
id: string;
|
|
35
|
+
position: string;
|
|
36
|
+
properties: Record<string, PropertyValue>;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface DatabaseRowData extends BlockToolData {
|
|
40
|
+
properties: Record<string, PropertyValue>;
|
|
41
|
+
position: string;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// ─── View config ───
|
|
45
|
+
|
|
46
|
+
export type ViewType = 'board' | 'table' | 'gallery' | 'list';
|
|
47
|
+
|
|
48
|
+
export interface SortConfig {
|
|
49
|
+
propertyId: string;
|
|
50
|
+
direction: 'asc' | 'desc';
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface FilterConfig {
|
|
54
|
+
propertyId: string;
|
|
55
|
+
operator: string;
|
|
56
|
+
value: PropertyValue;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface DatabaseViewConfig {
|
|
60
|
+
id: string;
|
|
61
|
+
name: string;
|
|
62
|
+
type: ViewType;
|
|
63
|
+
position: string;
|
|
64
|
+
groupBy?: string;
|
|
65
|
+
sorts: SortConfig[];
|
|
66
|
+
filters: FilterConfig[];
|
|
67
|
+
visibleProperties: string[];
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// ─── Top-level saved data ───
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Data saved by the database block.
|
|
74
|
+
* Schema and views only — rows are child blocks (database-row type).
|
|
75
|
+
*/
|
|
76
|
+
export interface DatabaseData extends BlockToolData {
|
|
77
|
+
schema: PropertyDefinition[];
|
|
78
|
+
views: DatabaseViewConfig[];
|
|
79
|
+
activeViewId: string;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// ─── Adapter ───
|
|
83
|
+
|
|
84
|
+
export interface DatabaseAdapter {
|
|
85
|
+
loadDatabase(): Promise<{
|
|
86
|
+
schema: PropertyDefinition[];
|
|
87
|
+
views: DatabaseViewConfig[];
|
|
88
|
+
}>;
|
|
89
|
+
|
|
90
|
+
createRow(params: {
|
|
91
|
+
id: string;
|
|
92
|
+
properties: Record<string, PropertyValue>;
|
|
93
|
+
position: string;
|
|
94
|
+
}): Promise<DatabaseRow>;
|
|
95
|
+
|
|
96
|
+
updateRow(params: {
|
|
97
|
+
rowId: string;
|
|
98
|
+
properties: Record<string, PropertyValue>;
|
|
99
|
+
}): Promise<DatabaseRow>;
|
|
100
|
+
|
|
101
|
+
moveRow(params: {
|
|
102
|
+
rowId: string;
|
|
103
|
+
position: string;
|
|
104
|
+
}): Promise<DatabaseRow>;
|
|
105
|
+
|
|
106
|
+
deleteRow(params: {
|
|
107
|
+
rowId: string;
|
|
108
|
+
}): Promise<void>;
|
|
109
|
+
|
|
110
|
+
createProperty(params: {
|
|
111
|
+
id: string;
|
|
112
|
+
name: string;
|
|
113
|
+
type: PropertyType;
|
|
114
|
+
position: string;
|
|
115
|
+
config?: PropertyConfig;
|
|
116
|
+
}): Promise<PropertyDefinition>;
|
|
117
|
+
|
|
118
|
+
updateProperty(params: {
|
|
119
|
+
propertyId: string;
|
|
120
|
+
changes: Partial<Pick<PropertyDefinition, 'name' | 'config'>>;
|
|
121
|
+
}): Promise<PropertyDefinition>;
|
|
122
|
+
|
|
123
|
+
deleteProperty(params: {
|
|
124
|
+
propertyId: string;
|
|
125
|
+
}): Promise<void>;
|
|
126
|
+
|
|
127
|
+
createView(params: {
|
|
128
|
+
id: string;
|
|
129
|
+
name: string;
|
|
130
|
+
type: ViewType;
|
|
131
|
+
position: string;
|
|
132
|
+
groupBy?: string;
|
|
133
|
+
sorts?: SortConfig[];
|
|
134
|
+
filters?: FilterConfig[];
|
|
135
|
+
visibleProperties?: string[];
|
|
136
|
+
}): Promise<DatabaseViewConfig>;
|
|
137
|
+
|
|
138
|
+
updateView(params: {
|
|
139
|
+
viewId: string;
|
|
140
|
+
changes: Partial<Pick<DatabaseViewConfig,
|
|
141
|
+
'name' | 'type' | 'position' | 'groupBy' | 'sorts' | 'filters' | 'visibleProperties'
|
|
142
|
+
>>;
|
|
143
|
+
}): Promise<DatabaseViewConfig>;
|
|
144
|
+
|
|
145
|
+
deleteView(params: {
|
|
146
|
+
viewId: string;
|
|
147
|
+
}): Promise<void>;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export interface DatabaseConfig {
|
|
151
|
+
adapter?: DatabaseAdapter;
|
|
152
|
+
}
|
package/types/tools-entry.d.ts
CHANGED
|
@@ -11,8 +11,9 @@ import { ToggleConstructable, ToggleData, ToggleConfig } from './tools/toggle';
|
|
|
11
11
|
import { DividerConstructable, DividerData } from './tools/divider';
|
|
12
12
|
import { CalloutConstructable, CalloutData, CalloutConfig } from './tools/callout';
|
|
13
13
|
import { QuoteConstructable, QuoteData } from './tools/quote';
|
|
14
|
+
import { BlockToolConstructable } from './tools/block-tool';
|
|
15
|
+
import { DatabaseData, DatabaseConfig, DatabaseAdapter, DatabaseViewConfig, DatabaseRowData } from './tools/database';
|
|
14
16
|
import { InlineToolConstructable } from './tools/inline-tool';
|
|
15
|
-
import { BlockTuneConstructable } from './block-tunes';
|
|
16
17
|
import { ToolSettings } from './tools';
|
|
17
18
|
|
|
18
19
|
// Block tools
|
|
@@ -24,6 +25,8 @@ export const Toggle: ToggleConstructable;
|
|
|
24
25
|
export const Divider: DividerConstructable;
|
|
25
26
|
export const Callout: CalloutConstructable;
|
|
26
27
|
export const Quote: QuoteConstructable;
|
|
28
|
+
export const Database: BlockToolConstructable;
|
|
29
|
+
export const DatabaseRow: BlockToolConstructable; // DatabaseRowTool (block tool), distinct from DatabaseRow interface in types/tools/database.d.ts
|
|
27
30
|
|
|
28
31
|
// Re-export data and config types for convenience
|
|
29
32
|
export { HeaderData, HeaderConfig } from './tools/header';
|
|
@@ -34,6 +37,7 @@ export { ToggleData, ToggleConfig } from './tools/toggle';
|
|
|
34
37
|
export { DividerData } from './tools/divider';
|
|
35
38
|
export { CalloutData, CalloutConfig } from './tools/callout';
|
|
36
39
|
export { QuoteData } from './tools/quote';
|
|
40
|
+
export { DatabaseData, DatabaseConfig, DatabaseAdapter, DatabaseViewConfig, DatabaseRowData } from './tools/database';
|
|
37
41
|
|
|
38
42
|
// Inline tools
|
|
39
43
|
export const Bold: InlineToolConstructable;
|
|
@@ -44,9 +48,6 @@ export const Marker: InlineToolConstructable;
|
|
|
44
48
|
export const Strikethrough: InlineToolConstructable;
|
|
45
49
|
export const Underline: InlineToolConstructable;
|
|
46
50
|
|
|
47
|
-
// Block tunes
|
|
48
|
-
export const Delete: BlockTuneConstructable;
|
|
49
|
-
|
|
50
51
|
/**
|
|
51
52
|
* Default block tools configuration
|
|
52
53
|
*/
|
|
@@ -57,6 +58,8 @@ export const defaultBlockTools: {
|
|
|
57
58
|
readonly table: {};
|
|
58
59
|
readonly toggle: {};
|
|
59
60
|
readonly callout: {};
|
|
61
|
+
readonly database: {};
|
|
62
|
+
readonly 'database-row': {};
|
|
60
63
|
readonly divider: {};
|
|
61
64
|
readonly quote: {};
|
|
62
65
|
};
|
|
@@ -146,6 +146,12 @@ export interface PopoverNodes {
|
|
|
146
146
|
|
|
147
147
|
/** Popover items wrapper */
|
|
148
148
|
items: HTMLElement;
|
|
149
|
+
|
|
150
|
+
/** Top scroll haze gradient overlay */
|
|
151
|
+
scrollHazeTop: HTMLElement;
|
|
152
|
+
|
|
153
|
+
/** Bottom scroll haze gradient overlay */
|
|
154
|
+
scrollHazeBottom: HTMLElement;
|
|
149
155
|
}
|
|
150
156
|
|
|
151
157
|
/**
|