@wrdagency/blockout 0.1.10 → 1.0.1
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/2NBKRL7C-Cug3TzgR.js +85 -0
- package/dist/{2RSXSRCN-qt84MtKs.js → 2RSXSRCN-Bc3g-z-i.js} +12 -12
- package/dist/{4CMBR7SL-BAGv8IL2.js → 4CMBR7SL-xNGezbCB.js} +31 -31
- package/dist/{5JTVDSTH-CG1NL6Fw.js → 5JTVDSTH-CIreO5bC.js} +26 -26
- package/dist/{5VQZOHHZ-CscZGerP.js → 5VQZOHHZ-CNzYHc1X.js} +1 -1
- package/dist/{6VRAQV3D-2rb_aClP.js → 6VRAQV3D-BoLhl3hf.js} +19 -19
- package/dist/A3WPL2ZJ-D0Eh1dEB.js +11 -0
- package/dist/ArrowBendDownRight.es-mejk84um.js +32 -0
- package/dist/BM6PGYQY-Bhr7peim.js +17 -0
- package/dist/{CaretDown.es-eySGHzTJ.js → CaretDown.es-BKFnosGJ.js} +3 -5
- package/dist/CaretDown.es-eyr5AnCc.js +8 -0
- package/dist/CaretLeft.es-C1wX08tw.js +32 -0
- package/dist/CaretRight.es-vnr78BGI.js +32 -0
- package/dist/DG5U6ZEL-C7eLVyh-.js +17 -0
- package/dist/DotsSixVertical.es-Ixbhxg7Z.js +38 -0
- package/dist/DotsThreeVertical.es-uadrGk3y.js +36 -0
- package/dist/EM5CXX6A-DKxCXPnz.js +14 -0
- package/dist/{F5MUBM3I-87B2_4WK.js → F5MUBM3I-_HauDyEF.js} +11 -11
- package/dist/G7GW6PWC-Crp1Jn-8.js +1236 -0
- package/dist/J2LQO3EC-CcHJqN0I.js +39 -0
- package/dist/KFH4SEIX-D-fCkpQv.js +120 -0
- package/dist/{LMDWO4NN--KEvZePp.js → LMDWO4NN-DdLnHzru.js} +47 -47
- package/dist/MR26YJYP-yD1_RvCA.js +283 -0
- package/dist/MTZPJQMC-RLG1q394.js +12 -0
- package/dist/MagnifyingGlass.es-CLstwG_v.js +32 -0
- package/dist/O2PQ2652-THp22K4G.js +51 -0
- package/dist/P7GR5CS5-Dub2zqTX.js +22 -0
- package/dist/{PFRGBC2K-BEg8ahbY.js → PFRGBC2K-DUhGSIey.js} +83 -83
- package/dist/{RS7LB2H4-D0fWv5qu.js → RS7LB2H4-C0kmTjy8.js} +3 -3
- package/dist/{RZ4GPYOB-13-5LlEb.js → RZ4GPYOB-c8s_KHUk.js} +6 -6
- package/dist/RadioButton.es-D3QVjfF9.js +36 -0
- package/dist/{S43UC3DV-Dn8EFLaT.js → S43UC3DV-erT1ucAd.js} +5 -5
- package/dist/{T7VMP3TM-DeRMoW8g.js → T7VMP3TM-C-Aesx9K.js} +10 -10
- package/dist/TP7N7UIH-mdk33dnV.js +34 -0
- package/dist/{UQQRIHDV-Bu8e1bYU.js → UQQRIHDV-DIXH69U3.js} +8 -8
- package/dist/{UYGDZTLQ-DcCmv5SE.js → UYGDZTLQ-fOwUiOjI.js} +4 -4
- package/dist/VIIRIBF3-DylpToFV.js +18 -0
- package/dist/WMYDSCNQ-D43V-JUe.js +62 -0
- package/dist/WYCIER3C-S-jsj0wy.js +59 -0
- package/dist/X.es-TbGOnXOO.js +38 -0
- package/dist/{YV4JVR4I-kvospPUa.js → YV4JVR4I-BXEaRiAN.js} +33 -33
- package/dist/assets/button.css +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/assets/index10.css +1 -1
- package/dist/assets/index11.css +1 -1
- package/dist/assets/index12.css +1 -1
- package/dist/assets/index13.css +1 -1
- package/dist/assets/index14.css +1 -1
- package/dist/assets/index15.css +1 -1
- package/dist/assets/index16.css +1 -1
- package/dist/assets/index17.css +1 -1
- package/dist/assets/index18.css +1 -1
- package/dist/assets/index19.css +1 -1
- package/dist/assets/index2.css +1 -1
- package/dist/assets/index20.css +1 -1
- package/dist/assets/index3.css +1 -1
- package/dist/assets/index4.css +1 -1
- package/dist/assets/index5.css +1 -1
- package/dist/assets/index6.css +1 -1
- package/dist/assets/index7.css +1 -1
- package/dist/assets/index8.css +1 -1
- package/dist/assets/index9.css +1 -1
- package/dist/assets/prosemirror.css +1 -0
- package/dist/assets/root.css +1 -0
- package/dist/assets/style.css +1 -1
- package/dist/assets/style10.css +1 -0
- package/dist/assets/style11.css +1 -0
- package/dist/assets/style12.css +1 -0
- package/dist/assets/style13.css +1 -0
- package/dist/assets/style14.css +1 -0
- package/dist/assets/style15.css +1 -0
- package/dist/assets/style16.css +1 -0
- package/dist/assets/style17.css +1 -0
- package/dist/assets/style18.css +1 -0
- package/dist/assets/style19.css +1 -0
- package/dist/assets/style2.css +1 -1
- package/dist/assets/style20.css +1 -0
- package/dist/assets/style21.css +1 -0
- package/dist/assets/style22.css +1 -0
- package/dist/assets/style23.css +1 -0
- package/dist/assets/style24.css +1 -0
- package/dist/assets/style25.css +1 -0
- package/dist/assets/style3.css +1 -1
- package/dist/assets/style4.css +1 -1
- package/dist/assets/style5.css +1 -0
- package/dist/assets/style6.css +1 -0
- package/dist/assets/style7.css +1 -0
- package/dist/assets/style8.css +1 -0
- package/dist/assets/style9.css +1 -0
- package/dist/assets/styles2.css +1 -0
- package/dist/assets/styles3.css +1 -0
- package/dist/assets/styles4.css +1 -0
- package/dist/assets/styles5.css +1 -0
- package/dist/base-jB1DIMnz.js +559 -0
- package/dist/commands-IQnqt4xL.js +5937 -0
- package/dist/components/avatar/index.d.ts +10 -0
- package/dist/components/avatar/index.js +42 -0
- package/dist/components/badge/index.d.ts +7 -0
- package/dist/components/badge/index.js +24 -0
- package/dist/components/breadcrumbs/index.d.ts +2 -1
- package/dist/components/breadcrumbs/index.js +31 -63
- package/dist/components/breadcrumbs/types.d.ts +2 -1
- package/dist/components/button/button.d.ts +1 -0
- package/dist/components/button/icon.js +31 -10
- package/dist/components/button/index.js +7 -5
- package/dist/components/button/row.d.ts +7 -0
- package/dist/components/button/row.js +14 -0
- package/dist/components/controls/base-control/affix.d.ts +1 -1
- package/dist/components/controls/base-control/index.js +35 -23
- package/dist/components/controls/base-control/props.d.ts +9 -1
- package/dist/components/controls/base-control/props.js +31 -12
- package/dist/components/controls/base-popover-control/index.js +41 -27
- package/dist/components/controls/card-number-control/cards/index.d.ts +0 -1
- package/dist/components/controls/card-number-control/cards/index.js +6 -8
- package/dist/components/controls/card-number-control/index.js +39 -435
- package/dist/components/controls/checkbox-control/index.d.ts +2 -0
- package/dist/components/controls/checkbox-control/index.js +80 -46
- package/dist/components/controls/choice-control/choice.js +30 -23
- package/dist/components/controls/choice-control/index.js +6 -5
- package/dist/components/controls/date-control/component.d.ts +8 -7
- package/dist/components/controls/date-control/component.js +27 -28
- package/dist/components/controls/date-control/index.d.ts +5 -9
- package/dist/components/controls/date-control/index.js +131 -35
- package/dist/components/controls/date-control/picker.d.ts +8 -0
- package/dist/components/controls/date-control/picker.js +18 -0
- package/dist/components/controls/date-control/types.d.ts +10 -13
- package/dist/components/controls/date-control/types.js +75 -52
- package/dist/components/controls/date-control/util.d.ts +1 -0
- package/dist/components/controls/date-control/util.js +1608 -0
- package/dist/components/controls/index.d.ts +3 -1
- package/dist/components/controls/index.js +32 -27
- package/dist/components/controls/list-control/index.d.ts +9 -0
- package/dist/components/controls/list-control/index.js +42 -0
- package/dist/components/controls/list-control/item.d.ts +10 -0
- package/dist/components/controls/list-control/item.js +108 -0
- package/dist/components/controls/list-control/list.d.ts +10 -0
- package/dist/components/controls/list-control/list.js +89 -0
- package/dist/components/controls/list-control/types.d.ts +6 -0
- package/dist/components/controls/markdown-control/commands.d.ts +1 -0
- package/dist/components/controls/markdown-control/commands.js +5 -0
- package/dist/components/controls/markdown-control/editor.d.ts +8 -0
- package/dist/components/controls/markdown-control/editor.js +807 -0
- package/dist/components/controls/markdown-control/index.d.ts +7 -0
- package/dist/components/controls/markdown-control/index.js +20 -0
- package/dist/components/controls/markdown-control/slash/base.d.ts +14 -0
- package/dist/components/controls/markdown-control/slash/base.js +9 -0
- package/dist/components/controls/markdown-control/slash/mentions.d.ts +6 -0
- package/dist/components/controls/markdown-control/slash/mentions.js +14 -0
- package/dist/components/controls/markdown-control/toolbar.d.ts +6 -0
- package/dist/components/controls/markdown-control/toolbar.js +10 -0
- package/dist/components/controls/number-control/index.js +8 -7
- package/dist/components/controls/password-control/index.js +4 -3
- package/dist/components/controls/recurrence-control/index.js +81 -100
- package/dist/components/controls/select-control/control.d.ts +3 -0
- package/dist/components/controls/select-control/control.js +53 -0
- package/dist/components/controls/select-control/index.d.ts +2 -1
- package/dist/components/controls/select-control/index.js +6 -5
- package/dist/components/controls/select-control/props.d.ts +14 -0
- package/dist/components/controls/select-control/props.js +1 -0
- package/dist/components/controls/select-control/select.d.ts +3 -0
- package/dist/components/controls/select-control/select.js +1186 -0
- package/dist/components/controls/text-control/index.js +11 -10
- package/dist/components/controls/textarea-control/index.js +7 -6
- package/dist/components/controls/toggle-control/index.d.ts +4 -3
- package/dist/components/controls/toggle-control/index.js +73 -53
- package/dist/components/controls/toggle-group-control/index.d.ts +1 -0
- package/dist/components/controls/toggle-group-control/index.js +35 -26
- package/dist/components/data-form/api.d.ts +2 -0
- package/dist/components/data-form/api.js +1826 -0
- package/dist/components/data-form/autosave.d.ts +4 -0
- package/dist/components/data-form/autosave.js +12 -0
- package/dist/components/data-form/context.d.ts +10 -0
- package/dist/components/data-form/context.js +10 -0
- package/dist/components/data-form/form.d.ts +11 -0
- package/dist/components/data-form/form.js +30 -0
- package/dist/components/data-form/index.js +14 -0
- package/dist/components/data-form/row.d.ts +7 -0
- package/dist/components/data-form/row.js +16 -0
- package/dist/components/data-form/status.d.ts +6 -0
- package/dist/components/data-form/status.js +37 -0
- package/dist/components/data-form/submit.d.ts +10 -0
- package/dist/components/data-form/submit.js +37 -0
- package/dist/components/data-form/types.d.ts +37 -0
- package/dist/components/data-form/types.js +1 -0
- package/dist/components/data-view/api.d.ts +24 -0
- package/dist/components/data-view/api.js +31 -0
- package/dist/components/data-view/data/apply.d.ts +10 -0
- package/dist/components/data-view/data/apply.js +346 -0
- package/dist/components/data-view/data/fields.d.ts +4 -0
- package/dist/components/data-view/data/fields.js +26 -0
- package/dist/components/data-view/data/filter.d.ts +8 -0
- package/dist/components/data-view/data/filter.js +48 -0
- package/dist/components/data-view/data/layout.d.ts +2 -0
- package/dist/components/data-view/data/layout.js +19 -0
- package/dist/components/data-view/data/normalize.d.ts +5 -0
- package/dist/components/data-view/data/normalize.js +76 -0
- package/dist/components/data-view/data/options.d.ts +10 -0
- package/dist/components/data-view/data/options.js +297 -0
- package/dist/components/data-view/index.d.ts +5 -0
- package/dist/components/data-view/index.js +9 -0
- package/dist/components/data-view/layouts/grid/empty.d.ts +2 -0
- package/dist/components/data-view/layouts/grid/empty.js +6 -0
- package/dist/components/data-view/layouts/grid/group.d.ts +2 -0
- package/dist/components/data-view/layouts/grid/group.js +57 -0
- package/dist/components/data-view/layouts/grid/index.d.ts +3 -0
- package/dist/components/data-view/layouts/grid/index.js +8 -0
- package/dist/components/data-view/layouts/grid/item.d.ts +2 -0
- package/dist/components/data-view/layouts/grid/item.js +98 -0
- package/dist/components/data-view/layouts/grid/root.d.ts +2 -0
- package/dist/components/data-view/layouts/grid/root.js +6 -0
- package/dist/components/data-view/layouts/kanban/empty.d.ts +2 -0
- package/dist/components/data-view/layouts/kanban/empty.js +6 -0
- package/dist/components/data-view/layouts/kanban/group.d.ts +2 -0
- package/dist/components/data-view/layouts/kanban/group.js +57 -0
- package/dist/components/data-view/layouts/kanban/index.d.ts +3 -0
- package/dist/components/data-view/layouts/kanban/index.js +8 -0
- package/dist/components/data-view/layouts/kanban/item.d.ts +2 -0
- package/dist/components/data-view/layouts/kanban/item.js +98 -0
- package/dist/components/data-view/layouts/kanban/root.d.ts +2 -0
- package/dist/components/data-view/layouts/kanban/root.js +18 -0
- package/dist/components/data-view/layouts/list/empty.d.ts +2 -0
- package/dist/components/data-view/layouts/list/empty.js +6 -0
- package/dist/components/data-view/layouts/list/group.d.ts +2 -0
- package/dist/components/data-view/layouts/list/group.js +57 -0
- package/dist/components/data-view/layouts/list/index.d.ts +3 -0
- package/dist/components/data-view/layouts/list/index.js +8 -0
- package/dist/components/data-view/layouts/list/item.d.ts +2 -0
- package/dist/components/data-view/layouts/list/item.js +77 -0
- package/dist/components/data-view/layouts/list/root.d.ts +2 -0
- package/dist/components/data-view/layouts/list/root.js +6 -0
- package/dist/components/data-view/layouts/table/empty.d.ts +2 -0
- package/dist/components/data-view/layouts/table/empty.js +54 -0
- package/dist/components/data-view/layouts/table/group.d.ts +2 -0
- package/dist/components/data-view/layouts/table/group.js +67 -0
- package/dist/components/data-view/layouts/table/index.d.ts +3 -0
- package/dist/components/data-view/layouts/table/index.js +8 -0
- package/dist/components/data-view/layouts/table/item.d.ts +2 -0
- package/dist/components/data-view/layouts/table/item.js +77 -0
- package/dist/components/data-view/layouts/table/root.d.ts +2 -0
- package/dist/components/data-view/layouts/table/root.js +134 -0
- package/dist/components/data-view/parts/body/empty.d.ts +2 -0
- package/dist/components/data-view/parts/body/empty.js +50 -0
- package/dist/components/data-view/parts/body/index.d.ts +2 -0
- package/dist/components/data-view/parts/body/index.js +64 -0
- package/dist/components/data-view/parts/controls/index.d.ts +5 -0
- package/dist/components/data-view/parts/controls/index.js +139 -0
- package/dist/components/data-view/parts/controls/search.d.ts +5 -0
- package/dist/components/data-view/parts/controls/search.js +77 -0
- package/dist/components/data-view/parts/filters/chip.d.ts +13 -0
- package/dist/components/data-view/parts/filters/chip.js +53 -0
- package/dist/components/data-view/parts/filters/editor.d.ts +10 -0
- package/dist/components/data-view/parts/filters/editor.js +89 -0
- package/dist/components/data-view/parts/filters/index.js +9 -0
- package/dist/components/data-view/parts/filters/list.d.ts +11 -0
- package/dist/components/data-view/parts/filters/list.js +108 -0
- package/dist/components/data-view/parts/filters/utils.d.ts +2 -0
- package/dist/components/data-view/parts/filters/utils.js +13 -0
- package/dist/components/data-view/parts/footer/actions.d.ts +2 -0
- package/dist/components/data-view/parts/footer/actions.js +104 -0
- package/dist/components/data-view/parts/footer/index.js +68 -0
- package/dist/components/data-view/parts/footer/selection.d.ts +2 -0
- package/dist/components/data-view/parts/footer/selection.js +61 -0
- package/dist/components/data-view/parts/index.d.ts +5 -0
- package/dist/components/data-view/parts/index.js +12 -0
- package/dist/components/data-view/parts/view-control/index.d.ts +6 -0
- package/dist/components/data-view/parts/view-control/index.js +215 -0
- package/dist/components/data-view/root.d.ts +18 -0
- package/dist/components/data-view/root.js +105 -0
- package/dist/components/data-view/slots/group/checkbox.d.ts +7 -0
- package/dist/components/data-view/slots/group/checkbox.js +41 -0
- package/dist/components/data-view/slots/group/context.d.ts +12 -0
- package/dist/components/data-view/slots/group/context.js +23 -0
- package/dist/components/data-view/slots/group/icon.d.ts +1 -0
- package/dist/components/data-view/slots/group/icon.js +4 -0
- package/dist/components/data-view/slots/group/index.js +5 -0
- package/dist/components/data-view/slots/group/label.d.ts +3 -0
- package/dist/components/data-view/slots/group/label.js +5 -0
- package/dist/components/data-view/slots/index.d.ts +4 -0
- package/dist/components/data-view/slots/index.js +9 -0
- package/dist/components/data-view/slots/item/actions.d.ts +6 -0
- package/dist/components/data-view/slots/item/actions.js +44 -0
- package/dist/components/data-view/slots/item/checkbox.d.ts +7 -0
- package/dist/components/data-view/slots/item/checkbox.js +87 -0
- package/dist/components/data-view/slots/item/context.d.ts +8 -0
- package/dist/components/data-view/slots/item/context.js +10 -0
- package/dist/components/data-view/slots/item/depth.d.ts +3 -0
- package/dist/components/data-view/slots/item/depth.js +9 -0
- package/dist/components/data-view/slots/item/description.d.ts +3 -0
- package/dist/components/data-view/slots/item/description.js +6 -0
- package/dist/components/data-view/slots/item/index.js +8 -0
- package/dist/components/data-view/slots/item/properties.d.ts +13 -0
- package/dist/components/data-view/slots/item/properties.js +8 -0
- package/dist/components/data-view/slots/item/relations.d.ts +7 -0
- package/dist/components/data-view/slots/item/relations.js +21 -0
- package/dist/components/data-view/slots/item/tags.d.ts +6 -0
- package/dist/components/data-view/slots/item/tags.js +7 -0
- package/dist/components/data-view/slots/item/thumbnail.d.ts +6 -0
- package/dist/components/data-view/slots/item/thumbnail.js +6 -0
- package/dist/components/data-view/slots/item/title.d.ts +3 -0
- package/dist/components/data-view/slots/item/title.js +17 -0
- package/dist/components/data-view/slots/item/util.d.ts +6 -0
- package/dist/components/data-view/slots/item/util.js +6 -0
- package/dist/components/data-view/slots/property/context.d.ts +8 -0
- package/dist/components/data-view/slots/property/context.js +10 -0
- package/dist/components/data-view/slots/property/field/editable.d.ts +3 -0
- package/dist/components/data-view/slots/property/field/editable.js +42 -0
- package/dist/components/data-view/slots/property/field/index.d.ts +3 -0
- package/dist/components/data-view/slots/property/field/index.js +7 -0
- package/dist/components/data-view/slots/property/field/static.d.ts +8 -0
- package/dist/components/data-view/slots/property/field/static.js +7 -0
- package/dist/components/data-view/slots/property/field/types.d.ts +5 -0
- package/dist/components/data-view/slots/property/field/types.js +1 -0
- package/dist/components/data-view/slots/property/index.js +5 -0
- package/dist/components/data-view/slots/property/label.d.ts +7 -0
- package/dist/components/data-view/slots/property/label.js +5 -0
- package/dist/components/data-view/slots/root/checkbox.d.ts +7 -0
- package/dist/components/data-view/slots/root/checkbox.js +40 -0
- package/dist/components/data-view/slots/root/context.d.ts +25 -0
- package/dist/components/data-view/slots/root/context.js +11 -0
- package/dist/components/data-view/slots/root/index.js +5 -0
- package/dist/components/data-view/types/actions.d.ts +15 -0
- package/dist/components/data-view/types/actions.js +1 -0
- package/dist/components/data-view/types/fields.d.ts +64 -0
- package/dist/components/data-view/types/fields.js +1 -0
- package/dist/components/data-view/types/filters.d.ts +19 -0
- package/dist/components/data-view/types/filters.js +1 -0
- package/dist/components/data-view/types/hierarchy.d.ts +13 -0
- package/dist/components/data-view/types/hierarchy.js +1 -0
- package/dist/components/data-view/types/index.d.ts +3 -0
- package/dist/components/data-view/types/index.js +1 -0
- package/dist/components/data-view/types/view.d.ts +47 -0
- package/dist/components/data-view/types/view.js +1 -0
- package/dist/components/filesystem/file.js +1 -1
- package/dist/components/filesystem/folder.js +30 -29
- package/dist/components/filesystem/index.js +1 -1
- package/dist/components/filesystem/list.js +1 -1
- package/dist/components/filesystem/root.js +1 -1
- package/dist/components/form/components/pagination.js +72 -17
- package/dist/components/index.d.ts +7 -2
- package/dist/components/index.js +69 -50
- package/dist/components/menu/index.d.ts +4 -0
- package/dist/components/menu/index.js +40 -129
- package/dist/components/menu/item.js +1 -1
- package/dist/components/menu/items/action.js +2 -1
- package/dist/components/menu/items/spacer.js +3 -3
- package/dist/components/menu/items/submenu.js +4 -3
- package/dist/components/menu/items/toggle.js +11 -10
- package/dist/components/menu/types.d.ts +1 -0
- package/dist/components/pagination/index.d.ts +10 -0
- package/dist/components/pagination/index.js +63 -0
- package/dist/components/progress/index.d.ts +2 -1
- package/dist/components/progress/index.js +29 -20
- package/dist/components/shell/index.js +12 -0
- package/dist/components/shell/navigation.d.ts +6 -0
- package/dist/components/shell/navigation.js +6 -0
- package/dist/components/shell/pane.d.ts +9 -0
- package/dist/components/shell/pane.js +38 -0
- package/dist/components/shell/root.d.ts +7 -0
- package/dist/components/shell/root.js +31 -0
- package/dist/components/shell/sidebar.d.ts +6 -0
- package/dist/components/shell/sidebar.js +6 -0
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/tabs/list.js +3 -3
- package/dist/components/tabs/panel.js +11 -10
- package/dist/components/tabs/root.js +42 -42
- package/dist/components/tabs/tab.js +4 -4
- package/dist/components/tag/index.js +8 -0
- package/dist/components/tag/list.d.ts +8 -0
- package/dist/components/tag/list.js +10 -0
- package/dist/components/tag/tag.d.ts +8 -0
- package/dist/components/tag/tag.js +26 -0
- package/dist/components/tag/types.d.ts +6 -0
- package/dist/components/tag/types.js +1 -0
- package/dist/components/toolbar/divider.d.ts +6 -0
- package/dist/components/toolbar/divider.js +24 -0
- package/dist/components/toolbar/index.js +19 -15
- package/dist/components/toolbar/root.js +67 -4
- package/dist/components/window/index.d.ts +8 -0
- package/dist/components/window/index.js +54 -0
- package/dist/{composite-provider-DNftbE5U.js → composite-provider-R5SnRc_G.js} +4 -4
- package/dist/filter-HYEwffYa.js +133 -0
- package/dist/floating-ui.dom-2MezWvgs.js +1070 -0
- package/dist/hooks/index.d.ts +4 -1
- package/dist/hooks/index.js +10 -4
- package/dist/hooks/input.js +13 -13
- package/dist/hooks/keyboard.d.ts +7 -0
- package/dist/hooks/keyboard.js +40 -0
- package/dist/hooks/selection.d.ts +19 -0
- package/dist/hooks/selection.js +57 -0
- package/dist/hooks/state.js +3 -3
- package/dist/hooks/temporary.d.ts +7 -0
- package/dist/hooks/temporary.js +12 -0
- package/dist/index-C2R91pmO.js +251 -0
- package/dist/index-CwFPDtaz.js +172 -0
- package/dist/index-D7vLJIGX.js +90 -0
- package/dist/index-DgyEPQBp.js +55 -0
- package/dist/index-EPj3dCzl.js +16324 -0
- package/dist/index-EQOyE9yF.js +73 -0
- package/dist/index.js +112 -63
- package/dist/item-C5GtZF5t.js +470 -0
- package/dist/picker-HwuTWxQw.js +858 -0
- package/dist/primitives/colourway/index.d.ts +9 -0
- package/dist/primitives/colourway/index.js +26 -0
- package/dist/primitives/colourway/util.d.ts +2 -0
- package/dist/primitives/colourway/util.js +146 -0
- package/dist/primitives/icon-label/index.d.ts +8 -0
- package/dist/primitives/icon-label/index.js +23 -0
- package/dist/primitives/index.d.ts +7 -0
- package/dist/primitives/index.js +34 -10
- package/dist/primitives/link/index.d.ts +5 -0
- package/dist/primitives/link/index.js +24 -0
- package/dist/primitives/popover/index.js +10 -0
- package/dist/primitives/popover/root.d.ts +10 -0
- package/dist/primitives/popover/root.js +5 -0
- package/dist/primitives/popover/target.d.ts +7 -0
- package/dist/primitives/popover/target.js +18 -0
- package/dist/primitives/popover/window.d.ts +6 -0
- package/dist/primitives/popover/window.js +38 -0
- package/dist/primitives/resizable/index.js +43 -32
- package/dist/primitives/scroll-area/index.js +4 -5
- package/dist/primitives/symbol/danger.d.ts +6 -0
- package/dist/primitives/symbol/danger.js +83 -0
- package/dist/primitives/symbol/index.d.ts +5 -0
- package/dist/primitives/symbol/index.js +12 -0
- package/dist/primitives/symbol/progress.d.ts +6 -0
- package/dist/primitives/symbol/progress.js +162 -0
- package/dist/primitives/symbol/types.d.ts +5 -0
- package/dist/primitives/symbol/types.js +1 -0
- package/dist/primitives/tooltip/index.d.ts +7 -0
- package/dist/primitives/tooltip/index.js +178 -0
- package/dist/primitives/truncate/index.js +14 -13
- package/dist/primitives/typography/heading.d.ts +16 -0
- package/dist/primitives/typography/heading.js +50 -0
- package/dist/primitives/typography/index.d.ts +2 -0
- package/dist/primitives/typography/index.js +12 -0
- package/dist/primitives/typography/paragraph.d.ts +9 -0
- package/dist/primitives/typography/paragraph.js +25 -0
- package/dist/protectedTokens-DdjZoCxO.js +587 -0
- package/dist/root-C7IYlG1s.js +20 -0
- package/dist/sortable.esm-De3H-_AA.js +3009 -0
- package/dist/style-A7_0w2WD.js +397 -0
- package/dist/style-Bp4uISf6.js +670 -0
- package/dist/toolbar-j1SJvq8D.js +6283 -0
- package/dist/types/component.d.ts +1 -0
- package/dist/types/options.d.ts +1 -0
- package/dist/types/options.js +8 -2
- package/dist/types/util.d.ts +1 -0
- package/dist/types/util.js +1 -0
- package/dist/utils/array.d.ts +1 -0
- package/dist/utils/array.js +9 -0
- package/dist/utils/components.d.ts +2 -1
- package/dist/utils/components.js +11 -7
- package/dist/utils/object.d.ts +1 -0
- package/dist/utils/object.js +8 -0
- package/dist/utils/url.d.ts +1 -0
- package/dist/utils/url.js +10 -0
- package/package.json +23 -3
- package/dist/2NBKRL7C-BAzCMGOw.js +0 -85
- package/dist/ArrowRight.es-xyNbtVOa.js +0 -60
- package/dist/DG5U6ZEL-CVj-Czp2.js +0 -17
- package/dist/MTZPJQMC-DyCWBG18.js +0 -14
- package/dist/P7GR5CS5-BoOYUfSQ.js +0 -19
- package/dist/TP7N7UIH-BHb1rEeb.js +0 -34
- package/dist/VIIRIBF3-D5DmZNtI.js +0 -26
- package/dist/WMYDSCNQ-Dy1O-Kdl.js +0 -2405
- package/dist/WYCIER3C-DRn904Gy.js +0 -175
- package/dist/components/block-editor/editor.d.ts +0 -5
- package/dist/components/block-editor/editor.js +0 -6
- package/dist/components/block-editor/index.d.ts +0 -1
- package/dist/components/block-editor/index.js +0 -4
- package/dist/components/button/index.d.ts +0 -4
- package/dist/components/controls/card-number-control/cards/generic.d.ts +0 -2
- package/dist/components/controls/card-number-control/cards/generic.js +0 -19
- package/dist/components/controls/select-control/component.d.ts +0 -12
- package/dist/components/controls/select-control/component.js +0 -1898
- package/dist/components/data-table/column.d.ts +0 -4
- package/dist/components/data-table/column.js +0 -874
- package/dist/components/data-table/context.d.ts +0 -7
- package/dist/components/data-table/context.js +0 -36
- package/dist/components/data-table/example.d.ts +0 -1
- package/dist/components/data-table/example.js +0 -5
- package/dist/components/data-table/footer.js +0 -23
- package/dist/components/data-table/header.d.ts +0 -7
- package/dist/components/data-table/header.js +0 -358
- package/dist/components/data-table/index.d.ts +0 -10
- package/dist/components/data-table/index.js +0 -86
- package/dist/components/data-table/types.d.ts +0 -75
- package/dist/hooks/theme.d.ts +0 -8
- package/dist/hooks/theme.js +0 -14
- package/dist/index-1AjPIqTN.js +0 -73
- package/dist/item-B1ugJ7YQ.js +0 -764
- package/dist/root-CaKPdqzv.js +0 -73
- /package/dist/components/{data-table → controls/list-control}/types.js +0 -0
- /package/dist/components/{data-table/footer.d.ts → data-view/parts/footer/index.d.ts} +0 -0
|
@@ -0,0 +1,807 @@
|
|
|
1
|
+
import { jsx as C, jsxs as ge } from "react/jsx-runtime";
|
|
2
|
+
import { cn as ye } from "../../../utils/css.js";
|
|
3
|
+
import { r as T, w as ve, c as we, d as be, a as V, h as S, b as F, p as Me, E as Ie, l as ke, e as Ee, f as Ce } from "../../../toolbar-j1SJvq8D.js";
|
|
4
|
+
import { $ as X, d as Le, T as Y, a as ee, s as Pe, g as Oe, b as j, P as z, h as te, i as Te, j as Se, k as _e, l as Ae, m as De, M as je, n as Ne, o as ne, q as W, r as xe, I as Ue, S as Fe, t as Be, E as qe, u as ze, v as He, w as Ke } from "../../../index-EPj3dCzl.js";
|
|
5
|
+
import { l as Re, c as $e, g as Ve, w as We } from "../../../commands-IQnqt4xL.js";
|
|
6
|
+
import '../../../assets/prosemirror.css';/* empty css */
|
|
7
|
+
import { d as Ge, M as Je, a as Ze, b as Qe } from "../../../index-CwFPDtaz.js";
|
|
8
|
+
import { P as Xe } from "../../../base-jB1DIMnz.js";
|
|
9
|
+
import "react";
|
|
10
|
+
import { useMentionsPlugin as Ye } from "./slash/mentions.js";
|
|
11
|
+
var et = Object.defineProperty, G = Object.getOwnPropertySymbols, tt = Object.prototype.hasOwnProperty, nt = Object.prototype.propertyIsEnumerable, J = (n, e, t) => e in n ? et(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, rt = (n, e) => {
|
|
12
|
+
for (var t in e || (e = {}))
|
|
13
|
+
tt.call(e, t) && J(n, t, e[t]);
|
|
14
|
+
if (G)
|
|
15
|
+
for (var t of G(e))
|
|
16
|
+
nt.call(e, t) && J(n, t, e[t]);
|
|
17
|
+
return n;
|
|
18
|
+
};
|
|
19
|
+
function re(n, e) {
|
|
20
|
+
return Object.assign(n, {
|
|
21
|
+
meta: rt({
|
|
22
|
+
package: "@milkdown/components"
|
|
23
|
+
}, e)
|
|
24
|
+
}), n;
|
|
25
|
+
}
|
|
26
|
+
const st = {
|
|
27
|
+
renderLabel: ({ label: n, listType: e, checked: t }) => t == null ? e === "bullet" ? "⦿" : n : t ? "☑" : "□"
|
|
28
|
+
}, N = X(
|
|
29
|
+
st,
|
|
30
|
+
"listItemBlockConfigCtx"
|
|
31
|
+
);
|
|
32
|
+
re(N, {
|
|
33
|
+
displayName: "Config<list-item-block>",
|
|
34
|
+
group: "ListItemBlock"
|
|
35
|
+
});
|
|
36
|
+
function se({ icon: n, class: e, onClick: t }) {
|
|
37
|
+
return /* @__PURE__ */ S(
|
|
38
|
+
"span",
|
|
39
|
+
{
|
|
40
|
+
class: F("milkdown-icon", e),
|
|
41
|
+
onPointerdown: t,
|
|
42
|
+
innerHTML: n ? Me.sanitize(n.trim()) : void 0
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
se.props = {
|
|
47
|
+
icon: {
|
|
48
|
+
type: String,
|
|
49
|
+
required: !1
|
|
50
|
+
},
|
|
51
|
+
class: {
|
|
52
|
+
type: String,
|
|
53
|
+
required: !1
|
|
54
|
+
},
|
|
55
|
+
onClick: {
|
|
56
|
+
type: Function,
|
|
57
|
+
required: !1
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
const it = be({
|
|
61
|
+
props: {
|
|
62
|
+
label: {
|
|
63
|
+
type: Object,
|
|
64
|
+
required: !0
|
|
65
|
+
},
|
|
66
|
+
checked: {
|
|
67
|
+
type: Object,
|
|
68
|
+
required: !0
|
|
69
|
+
},
|
|
70
|
+
listType: {
|
|
71
|
+
type: Object,
|
|
72
|
+
required: !0
|
|
73
|
+
},
|
|
74
|
+
config: {
|
|
75
|
+
type: Object,
|
|
76
|
+
required: !0
|
|
77
|
+
},
|
|
78
|
+
readonly: {
|
|
79
|
+
type: Object,
|
|
80
|
+
required: !0
|
|
81
|
+
},
|
|
82
|
+
selected: {
|
|
83
|
+
type: Object,
|
|
84
|
+
required: !0
|
|
85
|
+
},
|
|
86
|
+
setAttr: {
|
|
87
|
+
type: Function,
|
|
88
|
+
required: !0
|
|
89
|
+
},
|
|
90
|
+
onMount: {
|
|
91
|
+
type: Function,
|
|
92
|
+
required: !0
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
setup({
|
|
96
|
+
label: n,
|
|
97
|
+
checked: e,
|
|
98
|
+
listType: t,
|
|
99
|
+
config: s,
|
|
100
|
+
readonly: r,
|
|
101
|
+
setAttr: i,
|
|
102
|
+
onMount: o,
|
|
103
|
+
selected: l
|
|
104
|
+
}) {
|
|
105
|
+
const a = (u) => {
|
|
106
|
+
u != null && u instanceof Element && o(u);
|
|
107
|
+
}, d = (u) => {
|
|
108
|
+
u.stopPropagation(), u.preventDefault(), e.value != null && i("checked", !e.value);
|
|
109
|
+
}, f = V(() => s.renderLabel({
|
|
110
|
+
label: n.value,
|
|
111
|
+
listType: t.value,
|
|
112
|
+
checked: e.value,
|
|
113
|
+
readonly: r.value
|
|
114
|
+
})), p = V(() => e.value == null ? t.value === "bullet" ? "bullet" : "ordered" : e.value ? "checked" : "unchecked");
|
|
115
|
+
return () => /* @__PURE__ */ S(
|
|
116
|
+
"li",
|
|
117
|
+
{
|
|
118
|
+
class: F(
|
|
119
|
+
"list-item",
|
|
120
|
+
l.value && "ProseMirror-selectednode"
|
|
121
|
+
)
|
|
122
|
+
},
|
|
123
|
+
/* @__PURE__ */ S(
|
|
124
|
+
"div",
|
|
125
|
+
{
|
|
126
|
+
class: "label-wrapper",
|
|
127
|
+
onPointerdown: d,
|
|
128
|
+
contenteditable: !1
|
|
129
|
+
},
|
|
130
|
+
/* @__PURE__ */ S(
|
|
131
|
+
se,
|
|
132
|
+
{
|
|
133
|
+
class: F(
|
|
134
|
+
"label",
|
|
135
|
+
r.value && "readonly",
|
|
136
|
+
p.value
|
|
137
|
+
),
|
|
138
|
+
icon: f.value
|
|
139
|
+
}
|
|
140
|
+
)
|
|
141
|
+
),
|
|
142
|
+
/* @__PURE__ */ S("div", { class: "children", ref: a })
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
}), ie = Le(
|
|
146
|
+
Re.node,
|
|
147
|
+
(n) => (e, t, s) => {
|
|
148
|
+
const r = document.createElement("div");
|
|
149
|
+
r.className = "milkdown-list-item-block";
|
|
150
|
+
const i = document.createElement("div");
|
|
151
|
+
i.setAttribute("data-content-dom", "true"), i.classList.add("content-dom");
|
|
152
|
+
const o = T(e.attrs.label), l = T(e.attrs.checked), a = T(e.attrs.listType), d = T(!t.editable), f = n.get(N.key), p = T(!1), u = (c, E) => {
|
|
153
|
+
if (!t.editable) return;
|
|
154
|
+
const w = s();
|
|
155
|
+
w != null && (t.hasFocus() || t.focus(), t.dispatch(t.state.tr.setNodeAttribute(w, c, E)));
|
|
156
|
+
}, h = ve(() => {
|
|
157
|
+
p.value ? r.classList.add("selected") : r.classList.remove("selected");
|
|
158
|
+
});
|
|
159
|
+
let g = 0;
|
|
160
|
+
const b = we(it, {
|
|
161
|
+
label: o,
|
|
162
|
+
checked: l,
|
|
163
|
+
listType: a,
|
|
164
|
+
readonly: d,
|
|
165
|
+
config: f,
|
|
166
|
+
selected: p,
|
|
167
|
+
setAttr: u,
|
|
168
|
+
onMount: (c) => {
|
|
169
|
+
const { anchor: E, head: w } = t.state.selection;
|
|
170
|
+
c.appendChild(i);
|
|
171
|
+
const _ = t.state.doc.resolve(E), he = t.state.doc.resolve(w);
|
|
172
|
+
g = requestAnimationFrame(() => {
|
|
173
|
+
if (cancelAnimationFrame(g), !_.doc.eq(t.state.doc)) return;
|
|
174
|
+
const me = new Y(_, he);
|
|
175
|
+
t.dispatch(t.state.tr.setSelection(me));
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
b.mount(r);
|
|
180
|
+
const O = (c) => {
|
|
181
|
+
a.value = c.attrs.listType, o.value = c.attrs.label, l.value = c.attrs.checked, d.value = !t.editable;
|
|
182
|
+
};
|
|
183
|
+
O(e);
|
|
184
|
+
let k = e;
|
|
185
|
+
return {
|
|
186
|
+
dom: r,
|
|
187
|
+
contentDOM: i,
|
|
188
|
+
update: (c) => c.type !== e.type ? !1 : (c.sameMarkup(k) && c.content.eq(k.content) || (k = c, O(c)), !0),
|
|
189
|
+
ignoreMutation: (c) => !r || !i ? !0 : c.type === "selection" ? !1 : i === c.target && c.type === "attributes" ? !0 : !i.contains(c.target),
|
|
190
|
+
selectNode: () => {
|
|
191
|
+
p.value = !0;
|
|
192
|
+
},
|
|
193
|
+
deselectNode: () => {
|
|
194
|
+
p.value = !1;
|
|
195
|
+
},
|
|
196
|
+
destroy: () => {
|
|
197
|
+
h(), b.unmount(), r.remove(), i.remove();
|
|
198
|
+
}
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
);
|
|
202
|
+
re(ie, {
|
|
203
|
+
displayName: "NodeView<list-item-block>",
|
|
204
|
+
group: "ListItemBlock"
|
|
205
|
+
});
|
|
206
|
+
const ot = [
|
|
207
|
+
N,
|
|
208
|
+
ie
|
|
209
|
+
];
|
|
210
|
+
function B(n) {
|
|
211
|
+
if (!n) return !1;
|
|
212
|
+
if (Array.isArray(n))
|
|
213
|
+
return n.length > 1 ? !1 : B(n[0]);
|
|
214
|
+
const e = n.content;
|
|
215
|
+
return e ? B(e) : n.type === "text";
|
|
216
|
+
}
|
|
217
|
+
function at(n, e) {
|
|
218
|
+
return Object.assign(n, {
|
|
219
|
+
meta: {
|
|
220
|
+
package: "@milkdown/plugin-clipboard",
|
|
221
|
+
...e
|
|
222
|
+
}
|
|
223
|
+
}), n;
|
|
224
|
+
}
|
|
225
|
+
const oe = ee((n) => {
|
|
226
|
+
const e = n.get(Pe);
|
|
227
|
+
n.update(Oe, (r) => ({
|
|
228
|
+
...r,
|
|
229
|
+
editable: r.editable ?? (() => !0)
|
|
230
|
+
}));
|
|
231
|
+
const t = new j("MILKDOWN_CLIPBOARD");
|
|
232
|
+
return new z({
|
|
233
|
+
key: t,
|
|
234
|
+
props: {
|
|
235
|
+
handlePaste: (r, i) => {
|
|
236
|
+
var O, k;
|
|
237
|
+
const o = n.get(Te), l = (k = (O = r.props).editable) == null ? void 0 : k.call(O, r.state), { clipboardData: a } = i;
|
|
238
|
+
if (!l || !a || r.state.selection.$from.node().type.spec.code) return !1;
|
|
239
|
+
const f = a.getData("text/plain"), p = a.getData("vscode-editor-data");
|
|
240
|
+
if (p) {
|
|
241
|
+
const c = JSON.parse(p), E = c == null ? void 0 : c.mode;
|
|
242
|
+
if (f && E) {
|
|
243
|
+
const { tr: w } = r.state, _ = Se("code_block", e);
|
|
244
|
+
return w.replaceSelectionWith(_.create({ language: E })).setSelection(
|
|
245
|
+
Y.near(
|
|
246
|
+
w.doc.resolve(Math.max(0, w.selection.from - 2))
|
|
247
|
+
)
|
|
248
|
+
).insertText(f.replace(/\r\n?/g, `
|
|
249
|
+
`)), r.dispatch(w), !0;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
const u = a.getData("text/html");
|
|
253
|
+
if (u.length === 0 && f.length === 0) return !1;
|
|
254
|
+
const h = _e.fromSchema(e);
|
|
255
|
+
let g;
|
|
256
|
+
if (u.length === 0) {
|
|
257
|
+
const c = o(f);
|
|
258
|
+
if (!c || typeof c == "string") return !1;
|
|
259
|
+
g = Ae.fromSchema(e).serializeFragment(
|
|
260
|
+
c.content
|
|
261
|
+
);
|
|
262
|
+
} else {
|
|
263
|
+
const c = document.createElement("template");
|
|
264
|
+
c.innerHTML = u, g = c.content.cloneNode(!0), c.remove();
|
|
265
|
+
}
|
|
266
|
+
const P = h.parseSlice(g), b = De(P);
|
|
267
|
+
if (b)
|
|
268
|
+
return r.dispatch(r.state.tr.replaceSelectionWith(b, !0)), !0;
|
|
269
|
+
try {
|
|
270
|
+
return r.dispatch(r.state.tr.replaceSelection(P)), !0;
|
|
271
|
+
} catch {
|
|
272
|
+
return !1;
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
clipboardTextSerializer: (r) => {
|
|
276
|
+
const i = n.get(te);
|
|
277
|
+
if (B(r.content.toJSON()))
|
|
278
|
+
return r.content.textBetween(
|
|
279
|
+
0,
|
|
280
|
+
r.content.size,
|
|
281
|
+
`
|
|
282
|
+
|
|
283
|
+
`
|
|
284
|
+
);
|
|
285
|
+
const l = e.topNodeType.createAndFill(void 0, r.content);
|
|
286
|
+
return l ? i(l) : "";
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
});
|
|
290
|
+
});
|
|
291
|
+
at(oe, { displayName: "Prose<clipboard>" });
|
|
292
|
+
var D = 200, m = function() {
|
|
293
|
+
};
|
|
294
|
+
m.prototype.append = function(e) {
|
|
295
|
+
return e.length ? (e = m.from(e), !this.length && e || e.length < D && this.leafAppend(e) || this.length < D && e.leafPrepend(this) || this.appendInner(e)) : this;
|
|
296
|
+
};
|
|
297
|
+
m.prototype.prepend = function(e) {
|
|
298
|
+
return e.length ? m.from(e).append(this) : this;
|
|
299
|
+
};
|
|
300
|
+
m.prototype.appendInner = function(e) {
|
|
301
|
+
return new lt(this, e);
|
|
302
|
+
};
|
|
303
|
+
m.prototype.slice = function(e, t) {
|
|
304
|
+
return e === void 0 && (e = 0), t === void 0 && (t = this.length), e >= t ? m.empty : this.sliceInner(Math.max(0, e), Math.min(this.length, t));
|
|
305
|
+
};
|
|
306
|
+
m.prototype.get = function(e) {
|
|
307
|
+
if (!(e < 0 || e >= this.length))
|
|
308
|
+
return this.getInner(e);
|
|
309
|
+
};
|
|
310
|
+
m.prototype.forEach = function(e, t, s) {
|
|
311
|
+
t === void 0 && (t = 0), s === void 0 && (s = this.length), t <= s ? this.forEachInner(e, t, s, 0) : this.forEachInvertedInner(e, t, s, 0);
|
|
312
|
+
};
|
|
313
|
+
m.prototype.map = function(e, t, s) {
|
|
314
|
+
t === void 0 && (t = 0), s === void 0 && (s = this.length);
|
|
315
|
+
var r = [];
|
|
316
|
+
return this.forEach(function(i, o) {
|
|
317
|
+
return r.push(e(i, o));
|
|
318
|
+
}, t, s), r;
|
|
319
|
+
};
|
|
320
|
+
m.from = function(e) {
|
|
321
|
+
return e instanceof m ? e : e && e.length ? new ae(e) : m.empty;
|
|
322
|
+
};
|
|
323
|
+
var ae = /* @__PURE__ */ function(n) {
|
|
324
|
+
function e(s) {
|
|
325
|
+
n.call(this), this.values = s;
|
|
326
|
+
}
|
|
327
|
+
n && (e.__proto__ = n), e.prototype = Object.create(n && n.prototype), e.prototype.constructor = e;
|
|
328
|
+
var t = { length: { configurable: !0 }, depth: { configurable: !0 } };
|
|
329
|
+
return e.prototype.flatten = function() {
|
|
330
|
+
return this.values;
|
|
331
|
+
}, e.prototype.sliceInner = function(r, i) {
|
|
332
|
+
return r == 0 && i == this.length ? this : new e(this.values.slice(r, i));
|
|
333
|
+
}, e.prototype.getInner = function(r) {
|
|
334
|
+
return this.values[r];
|
|
335
|
+
}, e.prototype.forEachInner = function(r, i, o, l) {
|
|
336
|
+
for (var a = i; a < o; a++)
|
|
337
|
+
if (r(this.values[a], l + a) === !1)
|
|
338
|
+
return !1;
|
|
339
|
+
}, e.prototype.forEachInvertedInner = function(r, i, o, l) {
|
|
340
|
+
for (var a = i - 1; a >= o; a--)
|
|
341
|
+
if (r(this.values[a], l + a) === !1)
|
|
342
|
+
return !1;
|
|
343
|
+
}, e.prototype.leafAppend = function(r) {
|
|
344
|
+
if (this.length + r.length <= D)
|
|
345
|
+
return new e(this.values.concat(r.flatten()));
|
|
346
|
+
}, e.prototype.leafPrepend = function(r) {
|
|
347
|
+
if (this.length + r.length <= D)
|
|
348
|
+
return new e(r.flatten().concat(this.values));
|
|
349
|
+
}, t.length.get = function() {
|
|
350
|
+
return this.values.length;
|
|
351
|
+
}, t.depth.get = function() {
|
|
352
|
+
return 0;
|
|
353
|
+
}, Object.defineProperties(e.prototype, t), e;
|
|
354
|
+
}(m);
|
|
355
|
+
m.empty = new ae([]);
|
|
356
|
+
var lt = /* @__PURE__ */ function(n) {
|
|
357
|
+
function e(t, s) {
|
|
358
|
+
n.call(this), this.left = t, this.right = s, this.length = t.length + s.length, this.depth = Math.max(t.depth, s.depth) + 1;
|
|
359
|
+
}
|
|
360
|
+
return n && (e.__proto__ = n), e.prototype = Object.create(n && n.prototype), e.prototype.constructor = e, e.prototype.flatten = function() {
|
|
361
|
+
return this.left.flatten().concat(this.right.flatten());
|
|
362
|
+
}, e.prototype.getInner = function(s) {
|
|
363
|
+
return s < this.left.length ? this.left.get(s) : this.right.get(s - this.left.length);
|
|
364
|
+
}, e.prototype.forEachInner = function(s, r, i, o) {
|
|
365
|
+
var l = this.left.length;
|
|
366
|
+
if (r < l && this.left.forEachInner(s, r, Math.min(i, l), o) === !1 || i > l && this.right.forEachInner(s, Math.max(r - l, 0), Math.min(this.length, i) - l, o + l) === !1)
|
|
367
|
+
return !1;
|
|
368
|
+
}, e.prototype.forEachInvertedInner = function(s, r, i, o) {
|
|
369
|
+
var l = this.left.length;
|
|
370
|
+
if (r > l && this.right.forEachInvertedInner(s, r - l, Math.max(i, l) - l, o + l) === !1 || i < l && this.left.forEachInvertedInner(s, Math.min(r, l), i, o) === !1)
|
|
371
|
+
return !1;
|
|
372
|
+
}, e.prototype.sliceInner = function(s, r) {
|
|
373
|
+
if (s == 0 && r == this.length)
|
|
374
|
+
return this;
|
|
375
|
+
var i = this.left.length;
|
|
376
|
+
return r <= i ? this.left.slice(s, r) : s >= i ? this.right.slice(s - i, r - i) : this.left.slice(s, i).append(this.right.slice(0, r - i));
|
|
377
|
+
}, e.prototype.leafAppend = function(s) {
|
|
378
|
+
var r = this.right.leafAppend(s);
|
|
379
|
+
if (r)
|
|
380
|
+
return new e(this.left, r);
|
|
381
|
+
}, e.prototype.leafPrepend = function(s) {
|
|
382
|
+
var r = this.left.leafPrepend(s);
|
|
383
|
+
if (r)
|
|
384
|
+
return new e(r, this.right);
|
|
385
|
+
}, e.prototype.appendInner = function(s) {
|
|
386
|
+
return this.left.depth >= Math.max(this.right.depth, s.depth) + 1 ? new e(this.left, new e(this.right, s)) : new e(this, s);
|
|
387
|
+
}, e;
|
|
388
|
+
}(m);
|
|
389
|
+
const pt = 500;
|
|
390
|
+
class y {
|
|
391
|
+
constructor(e, t) {
|
|
392
|
+
this.items = e, this.eventCount = t;
|
|
393
|
+
}
|
|
394
|
+
// Pop the latest event off the branch's history and apply it
|
|
395
|
+
// to a document transform.
|
|
396
|
+
popEvent(e, t) {
|
|
397
|
+
if (this.eventCount == 0)
|
|
398
|
+
return null;
|
|
399
|
+
let s = this.items.length;
|
|
400
|
+
for (; ; s--)
|
|
401
|
+
if (this.items.get(s - 1).selection) {
|
|
402
|
+
--s;
|
|
403
|
+
break;
|
|
404
|
+
}
|
|
405
|
+
let r, i;
|
|
406
|
+
t && (r = this.remapping(s, this.items.length), i = r.maps.length);
|
|
407
|
+
let o = e.tr, l, a, d = [], f = [];
|
|
408
|
+
return this.items.forEach((p, u) => {
|
|
409
|
+
if (!p.step) {
|
|
410
|
+
r || (r = this.remapping(s, u + 1), i = r.maps.length), i--, f.push(p);
|
|
411
|
+
return;
|
|
412
|
+
}
|
|
413
|
+
if (r) {
|
|
414
|
+
f.push(new v(p.map));
|
|
415
|
+
let h = p.step.map(r.slice(i)), g;
|
|
416
|
+
h && o.maybeStep(h).doc && (g = o.mapping.maps[o.mapping.maps.length - 1], d.push(new v(g, void 0, void 0, d.length + f.length))), i--, g && r.appendMap(g, i);
|
|
417
|
+
} else
|
|
418
|
+
o.maybeStep(p.step);
|
|
419
|
+
if (p.selection)
|
|
420
|
+
return l = r ? p.selection.map(r.slice(i)) : p.selection, a = new y(this.items.slice(0, s).append(f.reverse().concat(d)), this.eventCount - 1), !1;
|
|
421
|
+
}, this.items.length, 0), { remaining: a, transform: o, selection: l };
|
|
422
|
+
}
|
|
423
|
+
// Create a new branch with the given transform added.
|
|
424
|
+
addTransform(e, t, s, r) {
|
|
425
|
+
let i = [], o = this.eventCount, l = this.items, a = !r && l.length ? l.get(l.length - 1) : null;
|
|
426
|
+
for (let f = 0; f < e.steps.length; f++) {
|
|
427
|
+
let p = e.steps[f].invert(e.docs[f]), u = new v(e.mapping.maps[f], p, t), h;
|
|
428
|
+
(h = a && a.merge(u)) && (u = h, f ? i.pop() : l = l.slice(0, l.length - 1)), i.push(u), t && (o++, t = void 0), r || (a = u);
|
|
429
|
+
}
|
|
430
|
+
let d = o - s.depth;
|
|
431
|
+
return d > ct && (l = ut(l, d), o -= d), new y(l.append(i), o);
|
|
432
|
+
}
|
|
433
|
+
remapping(e, t) {
|
|
434
|
+
let s = new je();
|
|
435
|
+
return this.items.forEach((r, i) => {
|
|
436
|
+
let o = r.mirrorOffset != null && i - r.mirrorOffset >= e ? s.maps.length - r.mirrorOffset : void 0;
|
|
437
|
+
s.appendMap(r.map, o);
|
|
438
|
+
}, e, t), s;
|
|
439
|
+
}
|
|
440
|
+
addMaps(e) {
|
|
441
|
+
return this.eventCount == 0 ? this : new y(this.items.append(e.map((t) => new v(t))), this.eventCount);
|
|
442
|
+
}
|
|
443
|
+
// When the collab module receives remote changes, the history has
|
|
444
|
+
// to know about those, so that it can adjust the steps that were
|
|
445
|
+
// rebased on top of the remote changes, and include the position
|
|
446
|
+
// maps for the remote changes in its array of items.
|
|
447
|
+
rebased(e, t) {
|
|
448
|
+
if (!this.eventCount)
|
|
449
|
+
return this;
|
|
450
|
+
let s = [], r = Math.max(0, this.items.length - t), i = e.mapping, o = e.steps.length, l = this.eventCount;
|
|
451
|
+
this.items.forEach((u) => {
|
|
452
|
+
u.selection && l--;
|
|
453
|
+
}, r);
|
|
454
|
+
let a = t;
|
|
455
|
+
this.items.forEach((u) => {
|
|
456
|
+
let h = i.getMirror(--a);
|
|
457
|
+
if (h == null)
|
|
458
|
+
return;
|
|
459
|
+
o = Math.min(o, h);
|
|
460
|
+
let g = i.maps[h];
|
|
461
|
+
if (u.step) {
|
|
462
|
+
let P = e.steps[h].invert(e.docs[h]), b = u.selection && u.selection.map(i.slice(a + 1, h));
|
|
463
|
+
b && l++, s.push(new v(g, P, b));
|
|
464
|
+
} else
|
|
465
|
+
s.push(new v(g));
|
|
466
|
+
}, r);
|
|
467
|
+
let d = [];
|
|
468
|
+
for (let u = t; u < o; u++)
|
|
469
|
+
d.push(new v(i.maps[u]));
|
|
470
|
+
let f = this.items.slice(0, r).append(d).append(s), p = new y(f, l);
|
|
471
|
+
return p.emptyItemCount() > pt && (p = p.compress(this.items.length - s.length)), p;
|
|
472
|
+
}
|
|
473
|
+
emptyItemCount() {
|
|
474
|
+
let e = 0;
|
|
475
|
+
return this.items.forEach((t) => {
|
|
476
|
+
t.step || e++;
|
|
477
|
+
}), e;
|
|
478
|
+
}
|
|
479
|
+
// Compressing a branch means rewriting it to push the air (map-only
|
|
480
|
+
// items) out. During collaboration, these naturally accumulate
|
|
481
|
+
// because each remote change adds one. The `upto` argument is used
|
|
482
|
+
// to ensure that only the items below a given level are compressed,
|
|
483
|
+
// because `rebased` relies on a clean, untouched set of items in
|
|
484
|
+
// order to associate old items with rebased steps.
|
|
485
|
+
compress(e = this.items.length) {
|
|
486
|
+
let t = this.remapping(0, e), s = t.maps.length, r = [], i = 0;
|
|
487
|
+
return this.items.forEach((o, l) => {
|
|
488
|
+
if (l >= e)
|
|
489
|
+
r.push(o), o.selection && i++;
|
|
490
|
+
else if (o.step) {
|
|
491
|
+
let a = o.step.map(t.slice(s)), d = a && a.getMap();
|
|
492
|
+
if (s--, d && t.appendMap(d, s), a) {
|
|
493
|
+
let f = o.selection && o.selection.map(t.slice(s));
|
|
494
|
+
f && i++;
|
|
495
|
+
let p = new v(d.invert(), a, f), u, h = r.length - 1;
|
|
496
|
+
(u = r.length && r[h].merge(p)) ? r[h] = u : r.push(p);
|
|
497
|
+
}
|
|
498
|
+
} else o.map && s--;
|
|
499
|
+
}, this.items.length, 0), new y(m.from(r.reverse()), i);
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
y.empty = new y(m.empty, 0);
|
|
503
|
+
function ut(n, e) {
|
|
504
|
+
let t;
|
|
505
|
+
return n.forEach((s, r) => {
|
|
506
|
+
if (s.selection && e-- == 0)
|
|
507
|
+
return t = r, !1;
|
|
508
|
+
}), n.slice(t);
|
|
509
|
+
}
|
|
510
|
+
class v {
|
|
511
|
+
constructor(e, t, s, r) {
|
|
512
|
+
this.map = e, this.step = t, this.selection = s, this.mirrorOffset = r;
|
|
513
|
+
}
|
|
514
|
+
merge(e) {
|
|
515
|
+
if (this.step && e.step && !e.selection) {
|
|
516
|
+
let t = e.step.merge(this.step);
|
|
517
|
+
if (t)
|
|
518
|
+
return new v(t.getMap().invert(), t, this.selection);
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
class M {
|
|
523
|
+
constructor(e, t, s, r, i) {
|
|
524
|
+
this.done = e, this.undone = t, this.prevRanges = s, this.prevTime = r, this.prevComposition = i;
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
const ct = 20;
|
|
528
|
+
function dt(n, e, t, s) {
|
|
529
|
+
let r = t.getMeta(I), i;
|
|
530
|
+
if (r)
|
|
531
|
+
return r.historyState;
|
|
532
|
+
t.getMeta(mt) && (n = new M(n.done, n.undone, null, 0, -1));
|
|
533
|
+
let o = t.getMeta("appendedTransaction");
|
|
534
|
+
if (t.steps.length == 0)
|
|
535
|
+
return n;
|
|
536
|
+
if (o && o.getMeta(I))
|
|
537
|
+
return o.getMeta(I).redo ? new M(n.done.addTransform(t, void 0, s, A(e)), n.undone, Z(t.mapping.maps), n.prevTime, n.prevComposition) : new M(n.done, n.undone.addTransform(t, void 0, s, A(e)), null, n.prevTime, n.prevComposition);
|
|
538
|
+
if (t.getMeta("addToHistory") !== !1 && !(o && o.getMeta("addToHistory") === !1)) {
|
|
539
|
+
let l = t.getMeta("composition"), a = n.prevTime == 0 || !o && n.prevComposition != l && (n.prevTime < (t.time || 0) - s.newGroupDelay || !ft(t, n.prevRanges)), d = o ? x(n.prevRanges, t.mapping) : Z(t.mapping.maps);
|
|
540
|
+
return new M(n.done.addTransform(t, a ? e.selection.getBookmark() : void 0, s, A(e)), y.empty, d, t.time, l ?? n.prevComposition);
|
|
541
|
+
} else return (i = t.getMeta("rebased")) ? new M(n.done.rebased(t, i), n.undone.rebased(t, i), x(n.prevRanges, t.mapping), n.prevTime, n.prevComposition) : new M(n.done.addMaps(t.mapping.maps), n.undone.addMaps(t.mapping.maps), x(n.prevRanges, t.mapping), n.prevTime, n.prevComposition);
|
|
542
|
+
}
|
|
543
|
+
function ft(n, e) {
|
|
544
|
+
if (!e)
|
|
545
|
+
return !1;
|
|
546
|
+
if (!n.docChanged)
|
|
547
|
+
return !0;
|
|
548
|
+
let t = !1;
|
|
549
|
+
return n.mapping.maps[0].forEach((s, r) => {
|
|
550
|
+
for (let i = 0; i < e.length; i += 2)
|
|
551
|
+
s <= e[i + 1] && r >= e[i] && (t = !0);
|
|
552
|
+
}), t;
|
|
553
|
+
}
|
|
554
|
+
function Z(n) {
|
|
555
|
+
let e = [];
|
|
556
|
+
for (let t = n.length - 1; t >= 0 && e.length == 0; t--)
|
|
557
|
+
n[t].forEach((s, r, i, o) => e.push(i, o));
|
|
558
|
+
return e;
|
|
559
|
+
}
|
|
560
|
+
function x(n, e) {
|
|
561
|
+
if (!n)
|
|
562
|
+
return null;
|
|
563
|
+
let t = [];
|
|
564
|
+
for (let s = 0; s < n.length; s += 2) {
|
|
565
|
+
let r = e.map(n[s], 1), i = e.map(n[s + 1], -1);
|
|
566
|
+
r <= i && t.push(r, i);
|
|
567
|
+
}
|
|
568
|
+
return t;
|
|
569
|
+
}
|
|
570
|
+
function ht(n, e, t) {
|
|
571
|
+
let s = A(e), r = I.get(e).spec.config, i = (t ? n.undone : n.done).popEvent(e, s);
|
|
572
|
+
if (!i)
|
|
573
|
+
return null;
|
|
574
|
+
let o = i.selection.resolve(i.transform.doc), l = (t ? n.done : n.undone).addTransform(i.transform, e.selection.getBookmark(), r, s), a = new M(t ? l : i.remaining, t ? i.remaining : l, null, 0, -1);
|
|
575
|
+
return i.transform.setSelection(o).setMeta(I, { redo: t, historyState: a });
|
|
576
|
+
}
|
|
577
|
+
let U = !1, Q = null;
|
|
578
|
+
function A(n) {
|
|
579
|
+
let e = n.plugins;
|
|
580
|
+
if (Q != e) {
|
|
581
|
+
U = !1, Q = e;
|
|
582
|
+
for (let t = 0; t < e.length; t++)
|
|
583
|
+
if (e[t].spec.historyPreserveItems) {
|
|
584
|
+
U = !0;
|
|
585
|
+
break;
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
return U;
|
|
589
|
+
}
|
|
590
|
+
const I = new j("history"), mt = new j("closeHistory");
|
|
591
|
+
function gt(n = {}) {
|
|
592
|
+
return n = {
|
|
593
|
+
depth: n.depth || 100,
|
|
594
|
+
newGroupDelay: n.newGroupDelay || 500
|
|
595
|
+
}, new z({
|
|
596
|
+
key: I,
|
|
597
|
+
state: {
|
|
598
|
+
init() {
|
|
599
|
+
return new M(y.empty, y.empty, null, 0, -1);
|
|
600
|
+
},
|
|
601
|
+
apply(e, t, s) {
|
|
602
|
+
return dt(t, s, e, n);
|
|
603
|
+
}
|
|
604
|
+
},
|
|
605
|
+
config: n,
|
|
606
|
+
props: {
|
|
607
|
+
handleDOMEvents: {
|
|
608
|
+
beforeinput(e, t) {
|
|
609
|
+
let s = t.inputType, r = s == "historyUndo" ? pe : s == "historyRedo" ? ue : null;
|
|
610
|
+
return !r || !e.editable ? !1 : (t.preventDefault(), r(e.state, e.dispatch));
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
});
|
|
615
|
+
}
|
|
616
|
+
function le(n, e) {
|
|
617
|
+
return (t, s) => {
|
|
618
|
+
let r = I.getState(t);
|
|
619
|
+
if (!r || (n ? r.undone : r.done).eventCount == 0)
|
|
620
|
+
return !1;
|
|
621
|
+
if (s) {
|
|
622
|
+
let i = ht(r, t, n);
|
|
623
|
+
i && s(e ? i.scrollIntoView() : i);
|
|
624
|
+
}
|
|
625
|
+
return !0;
|
|
626
|
+
};
|
|
627
|
+
}
|
|
628
|
+
const pe = le(!1, !0), ue = le(!0, !0);
|
|
629
|
+
function L(n, e) {
|
|
630
|
+
return Object.assign(n, {
|
|
631
|
+
meta: {
|
|
632
|
+
package: "@milkdown/plugin-history",
|
|
633
|
+
...e
|
|
634
|
+
}
|
|
635
|
+
}), n;
|
|
636
|
+
}
|
|
637
|
+
const H = ne("Undo", () => () => pe);
|
|
638
|
+
L(H, {
|
|
639
|
+
displayName: "Command<undo>"
|
|
640
|
+
});
|
|
641
|
+
const K = ne("Redo", () => () => ue);
|
|
642
|
+
L(K, {
|
|
643
|
+
displayName: "Command<redo>"
|
|
644
|
+
});
|
|
645
|
+
const R = X({}, "historyProviderConfig");
|
|
646
|
+
L(R, {
|
|
647
|
+
displayName: "Ctx<historyProviderConfig>"
|
|
648
|
+
});
|
|
649
|
+
const ce = ee(
|
|
650
|
+
(n) => gt(n.get(R.key))
|
|
651
|
+
);
|
|
652
|
+
L(ce, {
|
|
653
|
+
displayName: "Ctx<historyProviderPlugin>"
|
|
654
|
+
});
|
|
655
|
+
const $ = Ne("historyKeymap", {
|
|
656
|
+
Undo: {
|
|
657
|
+
shortcuts: "Mod-z",
|
|
658
|
+
command: (n) => {
|
|
659
|
+
const e = n.get(W);
|
|
660
|
+
return () => e.call(H.key);
|
|
661
|
+
}
|
|
662
|
+
},
|
|
663
|
+
Redo: {
|
|
664
|
+
shortcuts: ["Mod-y", "Shift-Mod-z"],
|
|
665
|
+
command: (n) => {
|
|
666
|
+
const e = n.get(W);
|
|
667
|
+
return () => e.call(K.key);
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
});
|
|
671
|
+
L($.ctx, {
|
|
672
|
+
displayName: "KeymapCtx<history>"
|
|
673
|
+
});
|
|
674
|
+
L($.shortcuts, {
|
|
675
|
+
displayName: "Keymap<history>"
|
|
676
|
+
});
|
|
677
|
+
const yt = [
|
|
678
|
+
R,
|
|
679
|
+
ce,
|
|
680
|
+
$,
|
|
681
|
+
H,
|
|
682
|
+
K
|
|
683
|
+
].flat();
|
|
684
|
+
class de {
|
|
685
|
+
constructor() {
|
|
686
|
+
this.beforeMountedListeners = [], this.mountedListeners = [], this.updatedListeners = [], this.selectionUpdatedListeners = [], this.markdownUpdatedListeners = [], this.blurListeners = [], this.focusListeners = [], this.destroyListeners = [], this.beforeMount = (e) => (this.beforeMountedListeners.push(e), this), this.mounted = (e) => (this.mountedListeners.push(e), this), this.updated = (e) => (this.updatedListeners.push(e), this);
|
|
687
|
+
}
|
|
688
|
+
/// A getter to get all [subscribers](#interface-subscribers). You should not use this method directly.
|
|
689
|
+
get listeners() {
|
|
690
|
+
return {
|
|
691
|
+
beforeMount: this.beforeMountedListeners,
|
|
692
|
+
mounted: this.mountedListeners,
|
|
693
|
+
updated: this.updatedListeners,
|
|
694
|
+
markdownUpdated: this.markdownUpdatedListeners,
|
|
695
|
+
blur: this.blurListeners,
|
|
696
|
+
focus: this.focusListeners,
|
|
697
|
+
destroy: this.destroyListeners,
|
|
698
|
+
selectionUpdated: this.selectionUpdatedListeners
|
|
699
|
+
};
|
|
700
|
+
}
|
|
701
|
+
/// Subscribe to the markdownUpdated event.
|
|
702
|
+
/// This event will be triggered after the editor state is updated and **the document is changed**.
|
|
703
|
+
/// The second parameter is the current markdown and the third parameter is the previous markdown.
|
|
704
|
+
markdownUpdated(e) {
|
|
705
|
+
return this.markdownUpdatedListeners.push(e), this;
|
|
706
|
+
}
|
|
707
|
+
/// Subscribe to the blur event.
|
|
708
|
+
/// This event will be triggered when the editor is blurred.
|
|
709
|
+
blur(e) {
|
|
710
|
+
return this.blurListeners.push(e), this;
|
|
711
|
+
}
|
|
712
|
+
/// Subscribe to the focus event.
|
|
713
|
+
/// This event will be triggered when the editor is focused.
|
|
714
|
+
focus(e) {
|
|
715
|
+
return this.focusListeners.push(e), this;
|
|
716
|
+
}
|
|
717
|
+
/// Subscribe to the destroy event.
|
|
718
|
+
/// This event will be triggered before the editor is destroyed.
|
|
719
|
+
destroy(e) {
|
|
720
|
+
return this.destroyListeners.push(e), this;
|
|
721
|
+
}
|
|
722
|
+
/// Subscribe to the selectionUpdated event.
|
|
723
|
+
/// This event will be triggered when the editor selection is updated.
|
|
724
|
+
selectionUpdated(e) {
|
|
725
|
+
return this.selectionUpdatedListeners.push(e), this;
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
const q = xe(
|
|
729
|
+
new de(),
|
|
730
|
+
"listener"
|
|
731
|
+
), vt = new j("MILKDOWN_LISTENER"), fe = (n) => (n.inject(q, new de()), async () => {
|
|
732
|
+
await n.wait(Ue);
|
|
733
|
+
const e = n.get(q), { listeners: t } = e;
|
|
734
|
+
t.beforeMount.forEach((a) => a(n)), await n.wait(Fe);
|
|
735
|
+
const s = n.get(te);
|
|
736
|
+
let r = null, i = null, o = null;
|
|
737
|
+
const l = new z({
|
|
738
|
+
key: vt,
|
|
739
|
+
view: () => ({
|
|
740
|
+
destroy: () => {
|
|
741
|
+
t.destroy.forEach((a) => a(n));
|
|
742
|
+
}
|
|
743
|
+
}),
|
|
744
|
+
props: {
|
|
745
|
+
handleDOMEvents: {
|
|
746
|
+
focus: () => (t.focus.forEach((a) => a(n)), !1),
|
|
747
|
+
blur: () => (t.blur.forEach((a) => a(n)), !1)
|
|
748
|
+
}
|
|
749
|
+
},
|
|
750
|
+
state: {
|
|
751
|
+
init: (a, d) => {
|
|
752
|
+
r = d.doc, i = s(d.doc);
|
|
753
|
+
},
|
|
754
|
+
apply: (a) => {
|
|
755
|
+
const d = a.selection;
|
|
756
|
+
return (!o && d || o && !d.eq(o)) && (t.selectionUpdated.forEach((p) => {
|
|
757
|
+
p(n, d, o);
|
|
758
|
+
}), o = d), !(a.docChanged || a.storedMarksSet) || a.getMeta("addToHistory") === !1 ? void 0 : Ge(() => {
|
|
759
|
+
const { doc: p } = a;
|
|
760
|
+
if (t.updated.length > 0 && r && !r.eq(p) && t.updated.forEach((u) => {
|
|
761
|
+
u(n, p, r);
|
|
762
|
+
}), t.markdownUpdated.length > 0 && r && !r.eq(p)) {
|
|
763
|
+
const u = s(p);
|
|
764
|
+
t.markdownUpdated.forEach((h) => {
|
|
765
|
+
h(n, u, i);
|
|
766
|
+
}), i = u;
|
|
767
|
+
}
|
|
768
|
+
r = p;
|
|
769
|
+
}, 200)();
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
});
|
|
773
|
+
n.update(Be, (a) => a.concat(l)), await n.wait(qe), t.mounted.forEach((a) => a(n));
|
|
774
|
+
});
|
|
775
|
+
fe.meta = {
|
|
776
|
+
package: "@milkdown/plugin-listener",
|
|
777
|
+
displayName: "Listener"
|
|
778
|
+
};
|
|
779
|
+
const wt = ({
|
|
780
|
+
className: n,
|
|
781
|
+
value: e,
|
|
782
|
+
onChangeValue: t
|
|
783
|
+
}) => {
|
|
784
|
+
const s = Ye();
|
|
785
|
+
return Ze(
|
|
786
|
+
(r) => ze.make().config((i) => {
|
|
787
|
+
i.set(He, r), i.set(Ke, e), i.get(q).markdownUpdated((l, a) => {
|
|
788
|
+
t(a);
|
|
789
|
+
}), i.set(N.key, {
|
|
790
|
+
renderLabel: () => ""
|
|
791
|
+
}), i.update(ke.key, (l) => ({
|
|
792
|
+
...l,
|
|
793
|
+
linkIcon: "",
|
|
794
|
+
editButton: "",
|
|
795
|
+
removeButton: "",
|
|
796
|
+
confirmButton: "",
|
|
797
|
+
inputPlaceholder: "Enter a URL..."
|
|
798
|
+
})), s.config(i);
|
|
799
|
+
}).use(fe).use($e).use(Ve).use(oe).use(yt).use(ot).use(We).config(Ee).use(Ce).use(s.plugin)
|
|
800
|
+
), /* @__PURE__ */ ge("div", { className: ye("component-markdown-editor", n), children: [
|
|
801
|
+
/* @__PURE__ */ C(Ie, { className: "component-markdown-editor__toolbar" }),
|
|
802
|
+
/* @__PURE__ */ C("div", { className: "component-markdown-editor__content", children: /* @__PURE__ */ C(Qe, {}) })
|
|
803
|
+
] });
|
|
804
|
+
}, St = (n) => /* @__PURE__ */ C(Je, { children: /* @__PURE__ */ C(Xe, { children: /* @__PURE__ */ C(wt, { ...n }) }) });
|
|
805
|
+
export {
|
|
806
|
+
St as MarkdownEditor
|
|
807
|
+
};
|