@verbb/plugin-kit-web 2.0.23 → 2.0.25
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/CHANGELOG.md +11 -0
- package/dist/chunks/{active-elements-DM_lCHaW.js → active-elements-739kISON.js} +1 -1
- package/dist/chunks/{active-elements-DM_lCHaW.js.map → active-elements-739kISON.js.map} +1 -1
- package/dist/chunks/{animate-with-class-NP-yJVt_.js → animate-with-class-CjTZI0NU.js} +1 -1
- package/dist/chunks/{animate-with-class-NP-yJVt_.js.map → animate-with-class-CjTZI0NU.js.map} +1 -1
- package/dist/chunks/{autoloader-DnSfHkrD.js → autoloader-DcwybeWc.js} +3 -3
- package/dist/chunks/{autoloader-DnSfHkrD.js.map → autoloader-DcwybeWc.js.map} +1 -1
- package/dist/chunks/{button-group-item.styles-G05d0DNI.js → button-group-item.styles-D7tuu-sr.js} +1 -1
- package/dist/chunks/{button-group-item.styles-G05d0DNI.js.map → button-group-item.styles-D7tuu-sr.js.map} +1 -1
- package/dist/chunks/{component-registry-DoevfR-u.js → component-registry-B5pnAZsb.js} +2 -1
- package/dist/chunks/{component-registry-DoevfR-u.js.map → component-registry-B5pnAZsb.js.map} +1 -1
- package/dist/chunks/{control-aria-CzouQRZD.js → control-aria-CtNg2izr.js} +1 -1
- package/dist/chunks/{control-aria-CzouQRZD.js.map → control-aria-CtNg2izr.js.map} +1 -1
- package/dist/chunks/{decorate-R0X811qp.js → decorate-Br_PE9pq.js} +3 -4
- package/dist/chunks/{decorate-R0X811qp.js.map → decorate-Br_PE9pq.js.map} +1 -1
- package/dist/chunks/decorators-BkErmuYK.js +2 -0
- package/dist/chunks/{dismissible-stack-B3BgzdQb.js → dismissible-stack-CwhtwAyo.js} +1 -1
- package/dist/chunks/{dismissible-stack-B3BgzdQb.js.map → dismissible-stack-CwhtwAyo.js.map} +1 -1
- package/dist/chunks/{field-labels-CGSfAGf-.js → field-labels-pY-gQDwQ.js} +1 -1
- package/dist/chunks/{field-labels-CGSfAGf-.js.map → field-labels-pY-gQDwQ.js.map} +1 -1
- package/dist/chunks/{focus-C6pY4Ym4.js → focus-DcVUPVqn.js} +2 -2
- package/dist/chunks/{focus-C6pY4Ym4.js.map → focus-DcVUPVqn.js.map} +1 -1
- package/dist/chunks/{form-control.styles-BHwSsx_y.js → form-control.styles-CQ93gnVf.js} +1 -1
- package/dist/chunks/{form-control.styles-BHwSsx_y.js.map → form-control.styles-CQ93gnVf.js.map} +1 -1
- package/dist/chunks/{has-slot-9zjTXvea.js → has-slot-DJv86HKx.js} +1 -1
- package/dist/chunks/{has-slot-9zjTXvea.js.map → has-slot-DJv86HKx.js.map} +1 -1
- package/dist/chunks/{icon.styles-pNyUmVtP.js → icon.styles-KWvfi7RV.js} +1 -1
- package/dist/chunks/{icon.styles-pNyUmVtP.js.map → icon.styles-KWvfi7RV.js.map} +1 -1
- package/dist/chunks/{icons-B8siZLOe.js → icons-k1pvx6yX.js} +2 -2
- package/dist/chunks/{icons-B8siZLOe.js.map → icons-k1pvx6yX.js.map} +1 -1
- package/dist/chunks/{mirror-validator-Cszpqlxk.js → mirror-validator-BkZlEv1Z.js} +1 -1
- package/dist/chunks/{mirror-validator-Cszpqlxk.js.map → mirror-validator-BkZlEv1Z.js.map} +1 -1
- package/dist/chunks/{option-filter-Cj5SvyzI.js → option-filter-BkKyBg8L.js} +2 -2
- package/dist/chunks/{option-filter-Cj5SvyzI.js.map → option-filter-BkKyBg8L.js.map} +1 -1
- package/dist/chunks/{overlay-lifecycle-CAoT0LE8.js → overlay-lifecycle-C582MGBJ.js} +1 -1
- package/dist/chunks/{overlay-lifecycle-CAoT0LE8.js.map → overlay-lifecycle-C582MGBJ.js.map} +1 -1
- package/dist/chunks/{pk-alert-Cjxl6CY_.js → pk-alert-BQAb4lJc.js} +9 -7
- package/dist/chunks/pk-alert-BQAb4lJc.js.map +1 -0
- package/dist/chunks/{pk-autocomplete-DA77kdTN.js → pk-autocomplete-DUXhs1hi.js} +20 -19
- package/dist/chunks/pk-autocomplete-DUXhs1hi.js.map +1 -0
- package/dist/chunks/{pk-button-group-DBdKK_2_.js → pk-button-group-BY12Lbk7.js} +10 -7
- package/dist/chunks/pk-button-group-BY12Lbk7.js.map +1 -0
- package/dist/chunks/{pk-button-group-separator-D0Aa0a0f.js → pk-button-group-separator-B1a8dP9A.js} +3 -2
- package/dist/chunks/pk-button-group-separator-B1a8dP9A.js.map +1 -0
- package/dist/chunks/{pk-button-group-text-BsqEM-dB.js → pk-button-group-text-CWNlZkyV.js} +3 -3
- package/dist/chunks/pk-button-group-text-CWNlZkyV.js.map +1 -0
- package/dist/chunks/{pk-button-DCtNLEPr.js → pk-button-ntSVrer_.js} +7 -6
- package/dist/chunks/pk-button-ntSVrer_.js.map +1 -0
- package/dist/chunks/{pk-calendar-hBz1MnOu.js → pk-calendar-Df0c5u79.js} +11 -10
- package/dist/chunks/pk-calendar-Df0c5u79.js.map +1 -0
- package/dist/chunks/{pk-checkbox-dvHRoVbL.js → pk-checkbox-L5uRex3b.js} +6 -5
- package/dist/chunks/pk-checkbox-L5uRex3b.js.map +1 -0
- package/dist/chunks/{pk-checkbox-select-Cqx5ZCMq.js → pk-checkbox-select-6OS0wFYO.js} +4 -3
- package/dist/chunks/pk-checkbox-select-6OS0wFYO.js.map +1 -0
- package/dist/chunks/{pk-clear-LzxwxEX7.js → pk-clear-DHxP_2cm.js} +1 -1
- package/dist/chunks/{pk-clear-LzxwxEX7.js.map → pk-clear-DHxP_2cm.js.map} +1 -1
- package/dist/chunks/{pk-code-editor-C_PqjR75.js → pk-code-editor-vZriNR67.js} +6 -5
- package/dist/chunks/pk-code-editor-vZriNR67.js.map +1 -0
- package/dist/chunks/{pk-color-input-4LDV0Z3W.js → pk-color-input-Csbm4ROT.js} +6 -5
- package/dist/chunks/pk-color-input-Csbm4ROT.js.map +1 -0
- package/dist/chunks/{pk-combobox-BeddzAsl.js → pk-combobox-BrSBrldb.js} +24 -22
- package/dist/chunks/pk-combobox-BrSBrldb.js.map +1 -0
- package/dist/chunks/{pk-connect.styles-ciqZMK3B.js → pk-connect.styles-oKhxa_m2.js} +1 -1
- package/dist/chunks/{pk-connect.styles-ciqZMK3B.js.map → pk-connect.styles-oKhxa_m2.js.map} +1 -1
- package/dist/chunks/{pk-copy-button-KegSx46o.js → pk-copy-button-5i9v_zmu.js} +7 -6
- package/dist/chunks/pk-copy-button-5i9v_zmu.js.map +1 -0
- package/dist/chunks/{pk-date-picker-D_JFep-Y.js → pk-date-picker-C-w6Mn6j.js} +20 -19
- package/dist/chunks/pk-date-picker-C-w6Mn6j.js.map +1 -0
- package/dist/chunks/{pk-dialog-CFU850OH.js → pk-dialog-C7KZGpQs.js} +9 -8
- package/dist/chunks/pk-dialog-C7KZGpQs.js.map +1 -0
- package/dist/chunks/{pk-dropdown-item-A4P4zfVF.js → pk-dropdown-item-Ck2N_suK.js} +11 -8
- package/dist/chunks/pk-dropdown-item-Ck2N_suK.js.map +1 -0
- package/dist/chunks/{pk-dropdown-label-PqDxMkCI.js → pk-dropdown-label-BdZLeizJ.js} +2 -2
- package/dist/chunks/pk-dropdown-label-BdZLeizJ.js.map +1 -0
- package/dist/chunks/{pk-dropdown-menu-C_vasBoa.js → pk-dropdown-menu-DBsO1uYR.js} +22 -18
- package/dist/chunks/pk-dropdown-menu-DBsO1uYR.js.map +1 -0
- package/dist/chunks/{pk-editable-table-B85NhFYY.js → pk-editable-table-Cd8K6vT4.js} +25 -22
- package/dist/chunks/pk-editable-table-Cd8K6vT4.js.map +1 -0
- package/dist/chunks/{pk-field-BJA2fZ6s.js → pk-field--PCE9nOd.js} +8 -7
- package/dist/chunks/pk-field--PCE9nOd.js.map +1 -0
- package/dist/chunks/{pk-form-associated-element-MqaHdIoH.js → pk-form-associated-element-Doh2K3pG.js} +3 -3
- package/dist/chunks/pk-form-associated-element-Doh2K3pG.js.map +1 -0
- package/dist/chunks/{pk-image-browser-DLAQcjFt.js → pk-image-browser-iUqdcLKs.js} +20 -20
- package/dist/chunks/pk-image-browser-iUqdcLKs.js.map +1 -0
- package/dist/chunks/{pk-input-CiUNLTSW.js → pk-input-BUbXj9We.js} +14 -13
- package/dist/chunks/pk-input-BUbXj9We.js.map +1 -0
- package/dist/chunks/{pk-input-group-k7WV0pQI.js → pk-input-group-CN79c5HT.js} +5 -4
- package/dist/chunks/pk-input-group-CN79c5HT.js.map +1 -0
- package/dist/chunks/{pk-input-group-addon-piOznzSS.js → pk-input-group-addon-DpxfuYp1.js} +3 -2
- package/dist/chunks/pk-input-group-addon-DpxfuYp1.js.map +1 -0
- package/dist/chunks/{pk-input-group-button-Di2vEJLo.js → pk-input-group-button-D5Hm4saA.js} +3 -2
- package/dist/chunks/pk-input-group-button-D5Hm4saA.js.map +1 -0
- package/dist/chunks/{pk-input-group-input-CwaaEfr1.js → pk-input-group-input-Cm1MoHgN.js} +3 -2
- package/dist/chunks/pk-input-group-input-Cm1MoHgN.js.map +1 -0
- package/dist/chunks/{pk-input-group-text-C0VAdy0J.js → pk-input-group-text-CtyJZ_Kg.js} +2 -2
- package/dist/chunks/pk-input-group-text-CtyJZ_Kg.js.map +1 -0
- package/dist/chunks/{pk-input-group-textarea-DOG1NIlE.js → pk-input-group-textarea-BxmKGjdt.js} +3 -2
- package/dist/chunks/pk-input-group-textarea-BxmKGjdt.js.map +1 -0
- package/dist/chunks/{pk-lightswitch-FH5ZxMG2.js → pk-lightswitch-CSvgiHVQ.js} +9 -8
- package/dist/chunks/pk-lightswitch-CSvgiHVQ.js.map +1 -0
- package/dist/chunks/{pk-option-Cx52kLmz.js → pk-option-B_PF4v_Z.js} +9 -7
- package/dist/chunks/pk-option-B_PF4v_Z.js.map +1 -0
- package/dist/chunks/{pk-option-group-CYo9Ukue.js → pk-option-group-D6bHfn0j.js} +4 -3
- package/dist/chunks/pk-option-group-D6bHfn0j.js.map +1 -0
- package/dist/chunks/{pk-popover-209LdoPr.js → pk-popover-BOoGfR7I.js} +11 -10
- package/dist/chunks/pk-popover-BOoGfR7I.js.map +1 -0
- package/dist/chunks/{pk-popup-0EIt9X_W.js → pk-popup-DVE93VSV.js} +32 -28
- package/dist/chunks/pk-popup-DVE93VSV.js.map +1 -0
- package/dist/chunks/{pk-radio-jgj6A0Wy.js → pk-radio-D0eqmnlH.js} +3 -2
- package/dist/chunks/pk-radio-D0eqmnlH.js.map +1 -0
- package/dist/chunks/{pk-radio-group-CruMBeeF.js → pk-radio-group-BehEZG_k.js} +8 -7
- package/dist/chunks/pk-radio-group-BehEZG_k.js.map +1 -0
- package/dist/chunks/{pk-scroll-area-BaqN798b.js → pk-scroll-area-BeaLZ6k-.js} +3 -2
- package/dist/chunks/pk-scroll-area-BeaLZ6k-.js.map +1 -0
- package/dist/chunks/{pk-select-UUH7FE4H.js → pk-select-DZNpEk5Z.js} +19 -18
- package/dist/chunks/pk-select-DZNpEk5Z.js.map +1 -0
- package/dist/chunks/{pk-separator-Bcxg_GO2.js → pk-separator-ZkRowI5Y.js} +3 -2
- package/dist/chunks/pk-separator-ZkRowI5Y.js.map +1 -0
- package/dist/chunks/{pk-spinner-CN365srE.js → pk-spinner-Bxkn4iVO.js} +3 -2
- package/dist/chunks/pk-spinner-Bxkn4iVO.js.map +1 -0
- package/dist/chunks/{pk-state-panel-DPP7t-er.js → pk-state-panel-BTo2xiug.js} +7 -6
- package/dist/chunks/pk-state-panel-BTo2xiug.js.map +1 -0
- package/dist/chunks/{pk-status-CYcadu0Q.js → pk-status-CdiRBRyh.js} +3 -2
- package/dist/chunks/pk-status-CdiRBRyh.js.map +1 -0
- package/dist/chunks/{pk-tab-BmXNyDg7.js → pk-tab-CSbI3XxX.js} +2 -2
- package/dist/chunks/pk-tab-CSbI3XxX.js.map +1 -0
- package/dist/chunks/{pk-tab-heading-GZHVmCAd.js → pk-tab-heading-BMyLTBNc.js} +2 -2
- package/dist/chunks/pk-tab-heading-BMyLTBNc.js.map +1 -0
- package/dist/chunks/{pk-tab-panel-OpM3f_cm.js → pk-tab-panel-sgdRjV8o.js} +2 -2
- package/dist/chunks/pk-tab-panel-sgdRjV8o.js.map +1 -0
- package/dist/chunks/{pk-tabs-x26NAw-V.js → pk-tabs-bBNCu_4h.js} +10 -7
- package/dist/chunks/pk-tabs-bBNCu_4h.js.map +1 -0
- package/dist/chunks/{pk-textarea-CBijEmcV.js → pk-textarea-B401dUWa.js} +11 -10
- package/dist/chunks/pk-textarea-B401dUWa.js.map +1 -0
- package/dist/chunks/{pk-time-picker-D-u5-7pf.js → pk-time-picker-DnNZVwRk.js} +6 -6
- package/dist/chunks/pk-time-picker-DnNZVwRk.js.map +1 -0
- package/dist/chunks/{pk-tiptap-content-BGxMO3T4.js → pk-tiptap-content-DmS_2EUi.js} +4 -3
- package/dist/chunks/pk-tiptap-content-DmS_2EUi.js.map +1 -0
- package/dist/chunks/{pk-tiptap-editor-BeuyzH5l.js → pk-tiptap-editor-DCgHtgoi.js} +20 -21
- package/dist/chunks/pk-tiptap-editor-DCgHtgoi.js.map +1 -0
- package/dist/chunks/{pk-tiptap-input-CQojaxDH.js → pk-tiptap-input-asrD-8W6.js} +7 -6
- package/dist/chunks/pk-tiptap-input-asrD-8W6.js.map +1 -0
- package/dist/chunks/{pk-toggle-CAtGO_Le.js → pk-toggle-Co8GsHuK.js} +4 -3
- package/dist/chunks/pk-toggle-Co8GsHuK.js.map +1 -0
- package/dist/chunks/{pk-toggle-group-CLso6OE7.js → pk-toggle-group-Ct1ljI-7.js} +7 -4
- package/dist/chunks/pk-toggle-group-Ct1ljI-7.js.map +1 -0
- package/dist/chunks/{pk-tooltip-C6yb4CXI.js → pk-tooltip-Cvv2f7T5.js} +7 -6
- package/dist/chunks/pk-tooltip-Cvv2f7T5.js.map +1 -0
- package/dist/chunks/{popup-content-animation.styles-EUnGV75J.js → popup-content-animation.styles-CJ8zGJz-.js} +1 -1
- package/dist/chunks/{popup-content-animation.styles-EUnGV75J.js.map → popup-content-animation.styles-CJ8zGJz-.js.map} +1 -1
- package/dist/chunks/{popup-placement-animation-GvFXER7D.js → popup-placement-animation-ClUYI79z.js} +1 -1
- package/dist/chunks/{popup-placement-animation-GvFXER7D.js.map → popup-placement-animation-ClUYI79z.js.map} +1 -1
- package/dist/chunks/{popup-pointer-BTS3Y6LE.js → popup-pointer-Bh_d205v.js} +1 -1
- package/dist/chunks/{popup-pointer-BTS3Y6LE.js.map → popup-pointer-Bh_d205v.js.map} +1 -1
- package/dist/chunks/{register-components-Dcdn1e3S.js → register-components-CZtpgZe3.js} +1 -1
- package/dist/chunks/{register-components-Dcdn1e3S.js.map → register-components-CZtpgZe3.js.map} +1 -1
- package/dist/chunks/{render-BKGW1a68.js → render-DQZp_Rak.js} +1 -1
- package/dist/chunks/{render-BKGW1a68.js.map → render-DQZp_Rak.js.map} +1 -1
- package/dist/chunks/{required-validator-CaRnQk1V.js → required-validator-I58oJGZ3.js} +1 -1
- package/dist/chunks/{required-validator-CaRnQk1V.js.map → required-validator-I58oJGZ3.js.map} +1 -1
- package/dist/chunks/{scroll-lock-gTFrvIPu.js → scroll-lock-DE1pElMQ.js} +2 -2
- package/dist/chunks/{scroll-lock-gTFrvIPu.js.map → scroll-lock-DE1pElMQ.js.map} +1 -1
- package/dist/chunks/{spinner-utils-Co_4X3ip.js → spinner-utils-DXwIxQ6z.js} +1 -1
- package/dist/chunks/{spinner-utils-Co_4X3ip.js.map → spinner-utils-DXwIxQ6z.js.map} +1 -1
- package/dist/chunks/{supports-popover-6lNVStLh.js → supports-popover-BCqyOPtO.js} +1 -1
- package/dist/chunks/{supports-popover-6lNVStLh.js.map → supports-popover-BCqyOPtO.js.map} +1 -1
- package/dist/chunks/{sync-listbox-separators-CPFtrpNq.js → sync-listbox-separators-saLEtPpJ.js} +2 -2
- package/dist/chunks/{sync-listbox-separators-CPFtrpNq.js.map → sync-listbox-separators-saLEtPpJ.js.map} +1 -1
- package/dist/chunks/{tiptap.styles-DjhIrSBN.js → tiptap.styles-Cwb_cj9g.js} +21 -2
- package/dist/chunks/{tiptap.styles-DjhIrSBN.js.map → tiptap.styles-Cwb_cj9g.js.map} +1 -1
- package/dist/components/alert/pk-alert.js +1 -1
- package/dist/components/alert.js +1 -1
- package/dist/components/autocomplete/pk-autocomplete.js +1 -1
- package/dist/components/autocomplete.js +1 -1
- package/dist/components/button/pk-button.js +1 -1
- package/dist/components/button-group/pk-button-group-separator.js +1 -1
- package/dist/components/button-group/pk-button-group-text.js +1 -1
- package/dist/components/button-group/pk-button-group.js +1 -1
- package/dist/components/button-group.js +3 -3
- package/dist/components/button.js +1 -1
- package/dist/components/calendar/pk-calendar.js +1 -1
- package/dist/components/calendar.js +1 -1
- package/dist/components/checkbox/pk-checkbox.js +1 -1
- package/dist/components/checkbox-select/pk-checkbox-select.js +1 -1
- package/dist/components/checkbox-select.js +1 -1
- package/dist/components/checkbox.js +1 -1
- package/dist/components/code-editor/pk-code-editor.js +1 -1
- package/dist/components/code-editor.js +1 -1
- package/dist/components/color-input/pk-color-input.js +1 -1
- package/dist/components/color-input.js +1 -1
- package/dist/components/combobox/pk-combobox.js +1 -1
- package/dist/components/combobox.js +1 -1
- package/dist/components/connect/pk-connect-oauth.js +5 -4
- package/dist/components/connect/pk-connect-oauth.js.map +1 -1
- package/dist/components/connect/pk-connect.js +7 -6
- package/dist/components/connect/pk-connect.js.map +1 -1
- package/dist/components/copy-button/pk-copy-button.js +1 -1
- package/dist/components/copy-button.js +1 -1
- package/dist/components/date-picker/pk-date-picker.js +1 -1
- package/dist/components/date-picker.js +1 -1
- package/dist/components/dialog/pk-dialog.js +1 -1
- package/dist/components/dialog.js +1 -1
- package/dist/components/dropdown-menu/pk-dropdown-item.js +1 -1
- package/dist/components/dropdown-menu/pk-dropdown-label.js +1 -1
- package/dist/components/dropdown-menu/pk-dropdown-menu.js +1 -1
- package/dist/components/dropdown-menu/pk-dropdown-separator.js +1 -1
- package/dist/components/dropdown-menu/pk-dropdown-separator.js.map +1 -1
- package/dist/components/dropdown-menu.js +3 -3
- package/dist/components/editable-table/pk-editable-table.js +1 -1
- package/dist/components/editable-table.js +1 -1
- package/dist/components/field/pk-field.js +1 -1
- package/dist/components/field.js +1 -1
- package/dist/components/icon/pk-icon.js +2 -1
- package/dist/components/icon/pk-icon.js.map +1 -1
- package/dist/components/image-browser/pk-image-browser.js +1 -1
- package/dist/components/image-browser.js +1 -1
- package/dist/components/input/pk-input.js +1 -1
- package/dist/components/input-group/pk-input-group-addon.js +1 -1
- package/dist/components/input-group/pk-input-group-button.js +1 -1
- package/dist/components/input-group/pk-input-group-input.js +1 -1
- package/dist/components/input-group/pk-input-group-text.js +1 -1
- package/dist/components/input-group/pk-input-group-textarea.js +1 -1
- package/dist/components/input-group/pk-input-group.js +1 -1
- package/dist/components/input-group.js +6 -6
- package/dist/components/input.js +1 -1
- package/dist/components/lightswitch/pk-lightswitch.js +1 -1
- package/dist/components/lightswitch.js +1 -1
- package/dist/components/popover/pk-popover.js +1 -1
- package/dist/components/popover.js +1 -1
- package/dist/components/popup/pk-popup.js +1 -1
- package/dist/components/popup.js +1 -1
- package/dist/components/radio-group/pk-radio-group.js +1 -1
- package/dist/components/radio-group/pk-radio.js +1 -1
- package/dist/components/radio-group.js +2 -2
- package/dist/components/scroll-area/pk-scroll-area.js +1 -1
- package/dist/components/scroll-area.js +1 -1
- package/dist/components/select/pk-option-group.js +1 -1
- package/dist/components/select/pk-option.js +1 -1
- package/dist/components/select/pk-select.js +1 -1
- package/dist/components/select.js +3 -3
- package/dist/components/separator/pk-separator.js +1 -1
- package/dist/components/separator.js +1 -1
- package/dist/components/spinner/pk-spinner.js +1 -1
- package/dist/components/spinner.js +2 -2
- package/dist/components/state-panel/pk-state-panel.js +1 -1
- package/dist/components/state-panel.js +1 -1
- package/dist/components/status/pk-status.js +1 -1
- package/dist/components/status.js +1 -1
- package/dist/components/tabs/pk-tab-heading.js +1 -1
- package/dist/components/tabs/pk-tab-panel.js +1 -1
- package/dist/components/tabs/pk-tab.js +1 -1
- package/dist/components/tabs/pk-tabs.js +1 -1
- package/dist/components/tabs.js +4 -4
- package/dist/components/textarea/pk-textarea.js +1 -1
- package/dist/components/textarea.js +1 -1
- package/dist/components/time-picker/pk-time-picker.js +1 -1
- package/dist/components/time-picker.js +1 -1
- package/dist/components/tiptap/pk-tiptap-content.js +1 -1
- package/dist/components/tiptap/pk-tiptap-editor.js +1 -1
- package/dist/components/tiptap/pk-tiptap-input.js +1 -1
- package/dist/components/tiptap/tiptap.styles.d.ts.map +1 -1
- package/dist/components/tiptap-content.js +1 -1
- package/dist/components/tiptap-editor.js +1 -1
- package/dist/components/tiptap-input.js +1 -1
- package/dist/components/toggle/pk-toggle.js +1 -1
- package/dist/components/toggle-group/pk-toggle-group.js +1 -1
- package/dist/components/toggle-group.js +1 -1
- package/dist/components/toggle.js +1 -1
- package/dist/components/tooltip/pk-tooltip.js +1 -1
- package/dist/components/tooltip.js +1 -1
- package/dist/connect/register-cp-connect.js +4 -4
- package/dist/connect/register-cp-connect.js.map +1 -1
- package/dist/icons/index.js +2 -2
- package/dist/index.js +67 -67
- package/dist/plugin-kit.js +4 -4
- package/dist/plugin-kit.js.map +1 -1
- package/dist/register-components.js +1 -1
- package/dist/register.js +120 -55
- package/dist/register.js.map +1 -0
- package/dist-loader/chunks/{button-group-item.styles-CXLuiMeZ.js → button-group-item.styles-BQbvE3sC.js} +1 -1
- package/dist-loader/chunks/{codemirror-CU2NB7wh.js → codemirror-C_TTKlG1.js} +584 -436
- package/dist-loader/chunks/editor-CS16rBkM.js +110 -0
- package/dist-loader/chunks/{floating-ui-B84As3F-.js → floating-ui-BJQPB-Ip.js} +9 -11
- package/dist-loader/chunks/{lit-s6aadvWG.js → lit-B6nFKgbW.js} +52 -14
- package/dist-loader/chunks/{option-filter-DH11hDpV.js → option-filter-BkKyBg8L.js} +1 -1
- package/dist-loader/chunks/{pk-a11y-CjB4-U-R.js → pk-a11y-mGj0G5AE.js} +1 -1
- package/dist-loader/chunks/{pk-base-Om6X9ab5.js → pk-base-BGegy7-X.js} +2 -2
- package/dist-loader/chunks/{pk-button-nSZxt8_B.js → pk-button-DV9Tk5Pd.js} +5 -5
- package/dist-loader/chunks/{pk-calendar-BS7Mfme_.js → pk-calendar-C0xpIVIw.js} +9 -9
- package/dist-loader/chunks/{pk-checkbox-CYUcOnco.js → pk-checkbox-DhP0iMoP.js} +9 -6
- package/dist-loader/chunks/{pk-color-input-BjDit7z0.js → pk-color-input-B02cYzyr.js} +4 -4
- package/dist-loader/chunks/{pk-combobox-DyexEhFo.js → pk-combobox-S_tpNUHK.js} +19 -18
- package/dist-loader/chunks/{pk-connect.styles-BsPAXjgF.js → pk-connect.styles-B5qe5yQB.js} +1 -1
- package/dist-loader/chunks/{pk-copy-button-CoN83ilF.js → pk-copy-button-D6tPuhJ3.js} +6 -6
- package/dist-loader/chunks/{pk-date-picker-CO6deRCu.js → pk-date-picker-C0y4sfSf.js} +15 -15
- package/dist-loader/chunks/{pk-dialog-BWo6iDnY.js → pk-dialog-BJs5fVHS.js} +7 -7
- package/dist-loader/chunks/{pk-dropdown-item-CbujjI8U.js → pk-dropdown-item-Bs5NZDRh.js} +11 -9
- package/dist-loader/chunks/{pk-dropdown-label-9X4ctyES.js → pk-dropdown-label-Cpl9-bzB.js} +2 -2
- package/dist-loader/chunks/{pk-dropdown-menu-D1KpGuqU.js → pk-dropdown-menu-CLrfuD3i.js} +20 -17
- package/dist-loader/chunks/{pk-field-DzggayrX.js → pk-field-Pg61fxBR.js} +140 -74
- package/dist-loader/chunks/{pk-icon-DQPqxFKW.js → pk-icon-B7ywfPb6.js} +4 -4
- package/dist-loader/chunks/{pk-input-C1peOijH.js → pk-input-Cj5s8eBT.js} +10 -10
- package/dist-loader/chunks/{pk-lightswitch-Y-I3eKCt.js → pk-lightswitch-rUGB1p8q.js} +6 -6
- package/dist-loader/chunks/{pk-option-IfazQDxz.js → pk-option-B-MeLvZf.js} +8 -7
- package/dist-loader/chunks/{pk-popup-BrLT_4kD.js → pk-popup-CeyruJFh.js} +35 -29
- package/dist-loader/chunks/{pk-select-49fogRYV.js → pk-select-JUx3mxRS.js} +14 -14
- package/dist-loader/chunks/{pk-spinner-BmnrA60m.js → pk-spinner-B8iuHDQ9.js} +2 -2
- package/dist-loader/chunks/{pk-state-panel-DKf54EnJ.js → pk-state-panel-BhdZGllL.js} +7 -7
- package/dist-loader/chunks/{pk-status-Dat3_D-T.js → pk-status-D3qVwWlR.js} +2 -2
- package/dist-loader/chunks/{pk-textarea-DPb2R8gV.js → pk-textarea-KnpJMQX2.js} +7 -7
- package/dist-loader/chunks/{pk-time-picker-CJiQTVuC.js → pk-time-picker-DCqZ5z7M.js} +6 -6
- package/dist-loader/chunks/{pk-tooltip-CqwQfOPV.js → pk-tooltip-DStkplzy.js} +6 -6
- package/dist-loader/chunks/{popup-content-animation.styles-CWR2mend.js → popup-content-animation.styles-BtUVJg82.js} +1 -1
- package/dist-loader/chunks/{render-BuA2YeZN.js → render-D9G_a_c2.js} +1 -1
- package/dist-loader/chunks/{sync-listbox-separators-rbu8jrAa.js → sync-listbox-separators-saLEtPpJ.js} +1 -1
- package/dist-loader/chunks/{tiptap-BhYH5Dva.js → tiptap-DYSRDaas.js} +10392 -7521
- package/dist-loader/chunks/tiptap.styles-CZUkf2K6.js +915 -0
- package/dist-loader/components/alert/alert.js +8 -7
- package/dist-loader/components/autocomplete/autocomplete.js +15 -15
- package/dist-loader/components/button/button.js +1 -1
- package/dist-loader/components/button-group/button-group-separator.js +2 -2
- package/dist-loader/components/button-group/button-group-text.js +3 -3
- package/dist-loader/components/button-group/button-group.js +9 -7
- package/dist-loader/components/calendar/calendar.js +1 -1
- package/dist-loader/components/checkbox/checkbox.js +1 -1
- package/dist-loader/components/checkbox-select/checkbox-select.js +3 -3
- package/dist-loader/components/code-editor/code-editor.js +4 -4
- package/dist-loader/components/color-input/color-input.js +1 -1
- package/dist-loader/components/combobox/combobox.js +1 -1
- package/dist-loader/components/connect/connect-oauth.js +5 -5
- package/dist-loader/components/connect/connect.js +8 -8
- package/dist-loader/components/copy-button/copy-button.js +1 -1
- package/dist-loader/components/date-picker/date-picker.js +1 -1
- package/dist-loader/components/dialog/dialog.js +1 -1
- package/dist-loader/components/dropdown-menu/dropdown-item.js +1 -1
- package/dist-loader/components/dropdown-menu/dropdown-label.js +1 -1
- package/dist-loader/components/dropdown-menu/dropdown-menu.js +1 -1
- package/dist-loader/components/dropdown-menu/dropdown-separator.js +2 -2
- package/dist-loader/components/editable-table/editable-table.js +25 -23
- package/dist-loader/components/field/field.js +1 -1
- package/dist-loader/components/icon/icon.js +3 -3
- package/dist-loader/components/image-browser/image-browser.js +15 -16
- package/dist-loader/components/input/input.js +1 -1
- package/dist-loader/components/input-group/input-group-addon.js +2 -2
- package/dist-loader/components/input-group/input-group-button.js +2 -2
- package/dist-loader/components/input-group/input-group-input.js +2 -2
- package/dist-loader/components/input-group/input-group-text.js +2 -2
- package/dist-loader/components/input-group/input-group-textarea.js +2 -2
- package/dist-loader/components/input-group/input-group.js +3 -3
- package/dist-loader/components/lightswitch/lightswitch.js +1 -1
- package/dist-loader/components/popover/popover.js +9 -9
- package/dist-loader/components/popup/popup.js +1 -1
- package/dist-loader/components/radio-group/radio-group.js +5 -5
- package/dist-loader/components/radio-group/radio.js +2 -2
- package/dist-loader/components/scroll-area/scroll-area.js +2 -2
- package/dist-loader/components/select/option-group.js +3 -3
- package/dist-loader/components/select/option.js +1 -1
- package/dist-loader/components/select/select.js +1 -1
- package/dist-loader/components/separator/separator.js +2 -2
- package/dist-loader/components/spinner/spinner.js +1 -1
- package/dist-loader/components/state-panel/state-panel.js +1 -1
- package/dist-loader/components/status/status.js +1 -1
- package/dist-loader/components/tabs/tab-heading.js +2 -2
- package/dist-loader/components/tabs/tab-panel.js +2 -2
- package/dist-loader/components/tabs/tab.js +2 -2
- package/dist-loader/components/tabs/tabs.js +9 -7
- package/dist-loader/components/textarea/textarea.js +1 -1
- package/dist-loader/components/time-picker/time-picker.js +1 -1
- package/dist-loader/components/tiptap/tiptap-content.js +5 -4
- package/dist-loader/components/tiptap/tiptap-editor.js +594 -20
- package/dist-loader/components/tiptap/tiptap-input.js +273 -5
- package/dist-loader/components/toggle/toggle.js +3 -3
- package/dist-loader/components/toggle-group/toggle-group.js +6 -4
- package/dist-loader/components/tooltip/tooltip.js +1 -1
- package/dist-loader/plugin-kit.loader.js +2 -1
- package/package.json +9 -9
- package/dist/chunks/pk-alert-Cjxl6CY_.js.map +0 -1
- package/dist/chunks/pk-autocomplete-DA77kdTN.js.map +0 -1
- package/dist/chunks/pk-button-DCtNLEPr.js.map +0 -1
- package/dist/chunks/pk-button-group-DBdKK_2_.js.map +0 -1
- package/dist/chunks/pk-button-group-separator-D0Aa0a0f.js.map +0 -1
- package/dist/chunks/pk-button-group-text-BsqEM-dB.js.map +0 -1
- package/dist/chunks/pk-calendar-hBz1MnOu.js.map +0 -1
- package/dist/chunks/pk-checkbox-dvHRoVbL.js.map +0 -1
- package/dist/chunks/pk-checkbox-select-Cqx5ZCMq.js.map +0 -1
- package/dist/chunks/pk-code-editor-C_PqjR75.js.map +0 -1
- package/dist/chunks/pk-color-input-4LDV0Z3W.js.map +0 -1
- package/dist/chunks/pk-combobox-BeddzAsl.js.map +0 -1
- package/dist/chunks/pk-copy-button-KegSx46o.js.map +0 -1
- package/dist/chunks/pk-date-picker-D_JFep-Y.js.map +0 -1
- package/dist/chunks/pk-dialog-CFU850OH.js.map +0 -1
- package/dist/chunks/pk-dropdown-item-A4P4zfVF.js.map +0 -1
- package/dist/chunks/pk-dropdown-label-PqDxMkCI.js.map +0 -1
- package/dist/chunks/pk-dropdown-menu-C_vasBoa.js.map +0 -1
- package/dist/chunks/pk-editable-table-B85NhFYY.js.map +0 -1
- package/dist/chunks/pk-field-BJA2fZ6s.js.map +0 -1
- package/dist/chunks/pk-form-associated-element-MqaHdIoH.js.map +0 -1
- package/dist/chunks/pk-image-browser-DLAQcjFt.js.map +0 -1
- package/dist/chunks/pk-input-CiUNLTSW.js.map +0 -1
- package/dist/chunks/pk-input-group-addon-piOznzSS.js.map +0 -1
- package/dist/chunks/pk-input-group-button-Di2vEJLo.js.map +0 -1
- package/dist/chunks/pk-input-group-input-CwaaEfr1.js.map +0 -1
- package/dist/chunks/pk-input-group-k7WV0pQI.js.map +0 -1
- package/dist/chunks/pk-input-group-text-C0VAdy0J.js.map +0 -1
- package/dist/chunks/pk-input-group-textarea-DOG1NIlE.js.map +0 -1
- package/dist/chunks/pk-lightswitch-FH5ZxMG2.js.map +0 -1
- package/dist/chunks/pk-option-Cx52kLmz.js.map +0 -1
- package/dist/chunks/pk-option-group-CYo9Ukue.js.map +0 -1
- package/dist/chunks/pk-popover-209LdoPr.js.map +0 -1
- package/dist/chunks/pk-popup-0EIt9X_W.js.map +0 -1
- package/dist/chunks/pk-radio-group-CruMBeeF.js.map +0 -1
- package/dist/chunks/pk-radio-jgj6A0Wy.js.map +0 -1
- package/dist/chunks/pk-scroll-area-BaqN798b.js.map +0 -1
- package/dist/chunks/pk-select-UUH7FE4H.js.map +0 -1
- package/dist/chunks/pk-separator-Bcxg_GO2.js.map +0 -1
- package/dist/chunks/pk-spinner-CN365srE.js.map +0 -1
- package/dist/chunks/pk-state-panel-DPP7t-er.js.map +0 -1
- package/dist/chunks/pk-status-CYcadu0Q.js.map +0 -1
- package/dist/chunks/pk-tab-BmXNyDg7.js.map +0 -1
- package/dist/chunks/pk-tab-heading-GZHVmCAd.js.map +0 -1
- package/dist/chunks/pk-tab-panel-OpM3f_cm.js.map +0 -1
- package/dist/chunks/pk-tabs-x26NAw-V.js.map +0 -1
- package/dist/chunks/pk-textarea-CBijEmcV.js.map +0 -1
- package/dist/chunks/pk-time-picker-D-u5-7pf.js.map +0 -1
- package/dist/chunks/pk-tiptap-content-BGxMO3T4.js.map +0 -1
- package/dist/chunks/pk-tiptap-editor-BeuyzH5l.js.map +0 -1
- package/dist/chunks/pk-tiptap-input-CQojaxDH.js.map +0 -1
- package/dist/chunks/pk-toggle-CAtGO_Le.js.map +0 -1
- package/dist/chunks/pk-toggle-group-CLso6OE7.js.map +0 -1
- package/dist/chunks/pk-tooltip-C6yb4CXI.js.map +0 -1
- package/dist/chunks/register-BDO_LUHK.js +0 -154
- package/dist/chunks/register-BDO_LUHK.js.map +0 -1
- package/dist-loader/chunks/rolldown-runtime-CzwdidQP.js +0 -13
- package/dist-loader/chunks/supports-popover-COjbi2RP.js +0 -5
- package/dist-loader/chunks/tiptap.styles-BckAim0_.js +0 -1848
- /package/dist-loader/chunks/{animate-with-class-BpZi7v-y.js → animate-with-class-CjTZI0NU.js} +0 -0
- /package/dist-loader/chunks/{field-labels-D7ccWdRn.js → field-labels-pY-gQDwQ.js} +0 -0
- /package/dist-loader/chunks/{has-slot-BvdEcnpm.js → has-slot-DJv86HKx.js} +0 -0
- /package/dist-loader/chunks/{mirror-validator-9X0wdFnh.js → mirror-validator-BkZlEv1Z.js} +0 -0
- /package/dist-loader/chunks/{overlay-lifecycle-CSIBJZgQ.js → overlay-lifecycle-C582MGBJ.js} +0 -0
- /package/dist-loader/chunks/{pk-clear-BL8m1NyC.js → pk-clear-DHxP_2cm.js} +0 -0
- /package/dist-loader/chunks/{popup-placement-animation-BQdKabXq.js → popup-placement-animation-ClUYI79z.js} +0 -0
- /package/dist-loader/chunks/{popup-pointer-BNwlPGKA.js → popup-pointer-Bh_d205v.js} +0 -0
- /package/dist-loader/chunks/{registry-BanyScVR.js → registry-CJc164pT.js} +0 -0
- /package/dist-loader/chunks/{required-validator-DCTovZ6r.js → required-validator-I58oJGZ3.js} +0 -0
- /package/dist-loader/chunks/{svg-C6YcJMk9.js → svg-BRgqS9vA.js} +0 -0
|
@@ -1,21 +1,597 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import { c as
|
|
4
|
-
import {
|
|
5
|
-
import { n as
|
|
6
|
-
import "../../chunks/
|
|
7
|
-
import "../../chunks/pk-button-
|
|
8
|
-
import { t as MirrorValidator } from "../../chunks/mirror-validator-
|
|
9
|
-
import "../../chunks/pk-checkbox-
|
|
10
|
-
import "../../chunks/pk-input-
|
|
11
|
-
import { A as Editor, N as getMarkRange, P as posToDOMRect } from "../../chunks/tiptap-
|
|
12
|
-
import {
|
|
13
|
-
import "../../chunks/
|
|
14
|
-
import "../../chunks/pk-
|
|
15
|
-
import "../../chunks/pk-dropdown-
|
|
16
|
-
import "../../chunks/pk-dropdown-
|
|
1
|
+
import "../../chunks/pk-field-Pg61fxBR.js";
|
|
2
|
+
import { n as uniqueId } from "../../chunks/pk-a11y-mGj0G5AE.js";
|
|
3
|
+
import { a as e, c as customElement, f as A, l as o, m as i, o as r, p as b, s as n } from "../../chunks/lit-B6nFKgbW.js";
|
|
4
|
+
import { c as __decorate, i as PkFormAssociatedElement, n as formControlStyles } from "../../chunks/pk-base-BGegy7-X.js";
|
|
5
|
+
import { $ as triangleExclamation, A as h2, B as link, E as fileDashedLine, F as heading, H as listUl, I as highlighter, J as strikethrough, K as quoteRight, M as h4, N as h5, P as h6, Q as textSlash, R as italic, S as code, U as minus, V as listOl, W as paragraph, X as superscript, Y as subscript, Z as table, a as alignRight, c as arrowRotateRight, d as bold, et as underline, f as bracketsCurly, h as chevronDown, i as alignLeft, j as h3, k as h1, n as alignCenter, q as smallCaps, r as alignJustify, s as arrowRotateLeft } from "../../chunks/svg-BRgqS9vA.js";
|
|
6
|
+
import { n as renderIconHtml } from "../../chunks/render-D9G_a_c2.js";
|
|
7
|
+
import "../../chunks/pk-button-DV9Tk5Pd.js";
|
|
8
|
+
import { t as MirrorValidator } from "../../chunks/mirror-validator-BkZlEv1Z.js";
|
|
9
|
+
import "../../chunks/pk-checkbox-DhP0iMoP.js";
|
|
10
|
+
import "../../chunks/pk-input-Cj5s8eBT.js";
|
|
11
|
+
import { A as Editor, N as getMarkRange, P as posToDOMRect } from "../../chunks/tiptap-DYSRDaas.js";
|
|
12
|
+
import { a as resolveTiptapTextStyleToolbarConfig, c as getRegisteredTiptapToolbarControl, i as createVariableTagDomNodeView, l as isRegisteredTiptapToolbarControl, o as createTiptapExtensions, r as tiptapProseMirrorStyles } from "../../chunks/tiptap.styles-CZUkf2K6.js";
|
|
13
|
+
import { n as normalizeContentArray, r as valueToContent, t as getFatalTiptapContentError } from "../../chunks/editor-CS16rBkM.js";
|
|
14
|
+
import "../../chunks/pk-dialog-BJs5fVHS.js";
|
|
15
|
+
import "../../chunks/pk-dropdown-item-Bs5NZDRh.js";
|
|
16
|
+
import "../../chunks/pk-dropdown-label-Cpl9-bzB.js";
|
|
17
|
+
import "../../chunks/pk-dropdown-menu-CLrfuD3i.js";
|
|
17
18
|
import "../dropdown-menu/dropdown-separator.js";
|
|
18
|
-
import "../../chunks/pk-tooltip-
|
|
19
|
+
import "../../chunks/pk-tooltip-DStkplzy.js";
|
|
20
|
+
//#region ../plugin-kit-tiptap-core/dist/links/craft-element.js
|
|
21
|
+
function isLinkOptionsArray(value) {
|
|
22
|
+
return Array.isArray(value) && value.length > 0;
|
|
23
|
+
}
|
|
24
|
+
function getCraftLinkOptions(linkOptions) {
|
|
25
|
+
if (!linkOptions) return [];
|
|
26
|
+
if (isLinkOptionsArray(linkOptions)) return linkOptions;
|
|
27
|
+
const items = [];
|
|
28
|
+
if (linkOptions.linkToEntry) items.push({
|
|
29
|
+
...linkOptions.linkToEntry,
|
|
30
|
+
optionTitle: "Link to an entry"
|
|
31
|
+
});
|
|
32
|
+
if (linkOptions.linkToAsset) items.push({
|
|
33
|
+
...linkOptions.linkToAsset,
|
|
34
|
+
optionTitle: "Link to an asset"
|
|
35
|
+
});
|
|
36
|
+
if (linkOptions.linkToCategory) items.push({
|
|
37
|
+
...linkOptions.linkToCategory,
|
|
38
|
+
optionTitle: "Link to a category"
|
|
39
|
+
});
|
|
40
|
+
return items;
|
|
41
|
+
}
|
|
42
|
+
function getLinkOptionsElementSiteId(linkOptions) {
|
|
43
|
+
if (!linkOptions || isLinkOptionsArray(linkOptions)) return;
|
|
44
|
+
return linkOptions.elementSiteId;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Build a Craft element link URL with the standard ref fragment:
|
|
48
|
+
* `https://example.com/page#refHandle:123@1`
|
|
49
|
+
*/
|
|
50
|
+
function buildCraftElementLinkUrl(element, refHandle) {
|
|
51
|
+
return `${element.url || ""}#${refHandle}:${element.id}@${element.siteId}`;
|
|
52
|
+
}
|
|
53
|
+
function buildCraftElementSelectorStorageKey(linkSelectorStorageKeyPrefix, elementType) {
|
|
54
|
+
return `${linkSelectorStorageKeyPrefix}.${elementType}`;
|
|
55
|
+
}
|
|
56
|
+
/** Open Craft's element selector modal and return a Plugin Kit link URL on selection. */
|
|
57
|
+
function openCraftElementLinkSelector({ config, elementSiteId, linkSelectorStorageKeyPrefix, getSelectedText, onSelect, host }) {
|
|
58
|
+
if (!linkSelectorStorageKeyPrefix) throw new Error("Craft element links require \"linkSelectorStorageKeyPrefix\".");
|
|
59
|
+
host.openElementSelector(config.elementType, {
|
|
60
|
+
storageKey: buildCraftElementSelectorStorageKey(linkSelectorStorageKeyPrefix, config.elementType),
|
|
61
|
+
sources: config.sources,
|
|
62
|
+
criteria: config.criteria,
|
|
63
|
+
defaultSiteId: elementSiteId,
|
|
64
|
+
autoFocusSearchBox: false,
|
|
65
|
+
onSelect: (elements) => {
|
|
66
|
+
if (!elements?.length) return;
|
|
67
|
+
const [element] = elements;
|
|
68
|
+
onSelect({
|
|
69
|
+
url: buildCraftElementLinkUrl(element, config.refHandle),
|
|
70
|
+
text: getSelectedText() || element.label || ""
|
|
71
|
+
});
|
|
72
|
+
},
|
|
73
|
+
closeOtherModals: false
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
//#endregion
|
|
77
|
+
//#region ../plugin-kit-tiptap-core/dist/links/commands.js
|
|
78
|
+
function buildLinkMarkAttributes(url, openInNewTab) {
|
|
79
|
+
const linkAttrs = { href: url };
|
|
80
|
+
if (openInNewTab) linkAttrs.target = "_blank";
|
|
81
|
+
return linkAttrs;
|
|
82
|
+
}
|
|
83
|
+
function getSelectedText(editor) {
|
|
84
|
+
const { from, to } = editor.state.selection;
|
|
85
|
+
return editor.state.doc.textBetween(from, to, " ");
|
|
86
|
+
}
|
|
87
|
+
function getLinkOpenInNewTab(editor) {
|
|
88
|
+
return editor.isActive("link") && editor.getAttributes("link").target === "_blank";
|
|
89
|
+
}
|
|
90
|
+
function getLinkEditState(editor) {
|
|
91
|
+
const { href } = editor.getAttributes("link");
|
|
92
|
+
const { state } = editor;
|
|
93
|
+
const linkType = state.schema.marks.link;
|
|
94
|
+
const range = getMarkRange(state.selection.$from, linkType);
|
|
95
|
+
const from = range?.from ?? state.selection.from;
|
|
96
|
+
const to = range?.to ?? state.selection.to;
|
|
97
|
+
const text = editor.state.doc.textBetween(from, to, " ");
|
|
98
|
+
return {
|
|
99
|
+
from,
|
|
100
|
+
to,
|
|
101
|
+
href: href ?? "",
|
|
102
|
+
text,
|
|
103
|
+
openInNewTab: getLinkOpenInNewTab(editor)
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
function applyLinkToEditor(editor, params) {
|
|
107
|
+
const { url, text, openInNewTab, from: fromParam, to: toParam } = params;
|
|
108
|
+
const chain = editor.chain().focus();
|
|
109
|
+
const linkAttrs = buildLinkMarkAttributes(url, openInNewTab);
|
|
110
|
+
const content = {
|
|
111
|
+
type: "text",
|
|
112
|
+
text: text.trim() || url,
|
|
113
|
+
marks: [{
|
|
114
|
+
type: "link",
|
|
115
|
+
attrs: linkAttrs
|
|
116
|
+
}]
|
|
117
|
+
};
|
|
118
|
+
if (typeof fromParam === "number" && typeof toParam === "number" && fromParam !== toParam) {
|
|
119
|
+
chain.insertContentAt({
|
|
120
|
+
from: fromParam,
|
|
121
|
+
to: toParam
|
|
122
|
+
}, [content]).run();
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
const { from, to } = editor.state.selection;
|
|
126
|
+
if (editor.state.doc.textBetween(from, to, " ")) {
|
|
127
|
+
chain.extendMarkRange("link").setLink(linkAttrs).run();
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
chain.insertContent([content]).run();
|
|
131
|
+
}
|
|
132
|
+
function unsetLinkFromEditor(editor) {
|
|
133
|
+
editor.chain().focus().extendMarkRange("link").unsetLink().run();
|
|
134
|
+
}
|
|
135
|
+
//#endregion
|
|
136
|
+
//#region ../plugin-kit-tiptap-core/dist/toolbar/button-registry.js
|
|
137
|
+
var HEADING_LEVELS = [
|
|
138
|
+
1,
|
|
139
|
+
2,
|
|
140
|
+
3,
|
|
141
|
+
4,
|
|
142
|
+
5,
|
|
143
|
+
6
|
|
144
|
+
];
|
|
145
|
+
function isTiptapButtonName(value) {
|
|
146
|
+
if (isRegisteredTiptapToolbarControl(value)) return true;
|
|
147
|
+
if (HEADING_LEVELS.some((level) => value === `h${level}`)) return true;
|
|
148
|
+
return [
|
|
149
|
+
"bold",
|
|
150
|
+
"italic",
|
|
151
|
+
"underline",
|
|
152
|
+
"strikethrough",
|
|
153
|
+
"subscript",
|
|
154
|
+
"superscript",
|
|
155
|
+
"small-caps",
|
|
156
|
+
"font-family",
|
|
157
|
+
"font-size",
|
|
158
|
+
"text-color",
|
|
159
|
+
"line-height",
|
|
160
|
+
"unordered-list",
|
|
161
|
+
"ordered-list",
|
|
162
|
+
"blockquote",
|
|
163
|
+
"highlight",
|
|
164
|
+
"code",
|
|
165
|
+
"code-block",
|
|
166
|
+
"hr",
|
|
167
|
+
"line-break",
|
|
168
|
+
"align-left",
|
|
169
|
+
"align-center",
|
|
170
|
+
"align-right",
|
|
171
|
+
"align-justify",
|
|
172
|
+
"clear-format",
|
|
173
|
+
"undo",
|
|
174
|
+
"redo",
|
|
175
|
+
"link",
|
|
176
|
+
"table",
|
|
177
|
+
"variableTag"
|
|
178
|
+
].includes(value);
|
|
179
|
+
}
|
|
180
|
+
function isTiptapButtonActive(editor, buttonName) {
|
|
181
|
+
const registered = getRegisteredTiptapToolbarControl(buttonName);
|
|
182
|
+
if (registered) return registered.isActive?.(editor) ?? false;
|
|
183
|
+
if (!isTiptapButtonName(buttonName)) return false;
|
|
184
|
+
const headingMatch = buttonName.match(/^h([1-6])$/);
|
|
185
|
+
if (headingMatch) {
|
|
186
|
+
const level = Number(headingMatch[1]);
|
|
187
|
+
return editor.isActive("heading", { level });
|
|
188
|
+
}
|
|
189
|
+
switch (buttonName) {
|
|
190
|
+
case "bold": return editor.isActive("bold");
|
|
191
|
+
case "italic": return editor.isActive("italic");
|
|
192
|
+
case "underline": return editor.isActive("underline");
|
|
193
|
+
case "strikethrough": return editor.isActive("strike");
|
|
194
|
+
case "subscript": return editor.isActive("subscript");
|
|
195
|
+
case "superscript": return editor.isActive("superscript");
|
|
196
|
+
case "small-caps": return editor.isActive("textStyle", { fontVariantCaps: "small-caps" });
|
|
197
|
+
case "unordered-list": return editor.isActive("bulletList");
|
|
198
|
+
case "ordered-list": return editor.isActive("orderedList");
|
|
199
|
+
case "blockquote": return editor.isActive("blockquote");
|
|
200
|
+
case "highlight": return editor.isActive("highlight");
|
|
201
|
+
case "code": return editor.isActive("code");
|
|
202
|
+
case "code-block": return editor.isActive("codeBlock");
|
|
203
|
+
case "align-left": return editor.isActive({ textAlign: "left" });
|
|
204
|
+
case "align-center": return editor.isActive({ textAlign: "center" });
|
|
205
|
+
case "align-right": return editor.isActive({ textAlign: "right" });
|
|
206
|
+
case "align-justify": return editor.isActive({ textAlign: "justify" });
|
|
207
|
+
case "link": return editor.isActive("link");
|
|
208
|
+
case "variableTag": return editor.isActive("variableTag");
|
|
209
|
+
default: return false;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
function runTiptapButton(editor, buttonName, options = {}) {
|
|
213
|
+
const registered = getRegisteredTiptapToolbarControl(buttonName);
|
|
214
|
+
if (registered) return registered.run(editor) !== false;
|
|
215
|
+
if (!isTiptapButtonName(buttonName)) return false;
|
|
216
|
+
const chain = editor.chain().focus();
|
|
217
|
+
const headingMatch = buttonName.match(/^h([1-6])$/);
|
|
218
|
+
if (headingMatch) {
|
|
219
|
+
const level = Number(headingMatch[1]);
|
|
220
|
+
return chain.toggleHeading({ level }).run();
|
|
221
|
+
}
|
|
222
|
+
switch (buttonName) {
|
|
223
|
+
case "bold": return chain.toggleBold().run();
|
|
224
|
+
case "italic": return chain.toggleItalic().run();
|
|
225
|
+
case "underline": return chain.toggleUnderline().run();
|
|
226
|
+
case "strikethrough": return chain.toggleStrike().run();
|
|
227
|
+
case "subscript": return chain.toggleSubscript().run();
|
|
228
|
+
case "superscript": return chain.toggleSuperscript().run();
|
|
229
|
+
case "small-caps": return chain.toggleSmallCaps().run();
|
|
230
|
+
case "unordered-list": return chain.toggleBulletList().run();
|
|
231
|
+
case "ordered-list": return chain.toggleOrderedList().run();
|
|
232
|
+
case "blockquote": return chain.toggleBlockquote().run();
|
|
233
|
+
case "highlight": return chain.toggleHighlight().run();
|
|
234
|
+
case "code": return chain.toggleCode().run();
|
|
235
|
+
case "code-block": return chain.toggleCodeBlock().run();
|
|
236
|
+
case "hr": return chain.setHorizontalRule().run();
|
|
237
|
+
case "line-break": return chain.setHardBreak().run();
|
|
238
|
+
case "align-left": return chain.setTextAlign("left").run();
|
|
239
|
+
case "align-center": return chain.setTextAlign("center").run();
|
|
240
|
+
case "align-right": return chain.setTextAlign("right").run();
|
|
241
|
+
case "align-justify": return chain.setTextAlign("justify").run();
|
|
242
|
+
case "clear-format": return chain.clearNodes().unsetAllMarks().run();
|
|
243
|
+
case "undo": return chain.undo().run();
|
|
244
|
+
case "redo": return chain.redo().run();
|
|
245
|
+
case "table": {
|
|
246
|
+
const tableOptions = options.tableOptions ?? {};
|
|
247
|
+
return chain.insertTable({
|
|
248
|
+
rows: tableOptions.rows ?? 3,
|
|
249
|
+
cols: tableOptions.cols ?? 3,
|
|
250
|
+
withHeaderRow: tableOptions.withHeaderRow ?? true
|
|
251
|
+
}).run();
|
|
252
|
+
}
|
|
253
|
+
case "link":
|
|
254
|
+
case "variableTag": return false;
|
|
255
|
+
default: return false;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
//#endregion
|
|
259
|
+
//#region ../plugin-kit-tiptap-core/dist/toolbar/toolbar-schema.js
|
|
260
|
+
var DEFAULT_HEADING_LEVELS = [
|
|
261
|
+
1,
|
|
262
|
+
2,
|
|
263
|
+
3,
|
|
264
|
+
4
|
|
265
|
+
];
|
|
266
|
+
var PRESET_DEFAULT_ICONS = {
|
|
267
|
+
formatting: "paragraph",
|
|
268
|
+
headings: "heading",
|
|
269
|
+
lists: "unordered-list",
|
|
270
|
+
align: "align-left"
|
|
271
|
+
};
|
|
272
|
+
var VALID_PRESETS = /* @__PURE__ */ new Set([
|
|
273
|
+
"formatting",
|
|
274
|
+
"headings",
|
|
275
|
+
"lists",
|
|
276
|
+
"align"
|
|
277
|
+
]);
|
|
278
|
+
function isFormattingToolbarPreset(preset) {
|
|
279
|
+
return preset === "formatting";
|
|
280
|
+
}
|
|
281
|
+
function isHeadingsOnlyToolbarPreset(preset) {
|
|
282
|
+
return preset === "headings";
|
|
283
|
+
}
|
|
284
|
+
function getToolbarGroupDefaultIcon(group) {
|
|
285
|
+
if (group.preset) return PRESET_DEFAULT_ICONS[group.preset];
|
|
286
|
+
return getToolbarGroupItems(group)[0] ?? "bold";
|
|
287
|
+
}
|
|
288
|
+
var SEPARATOR_TOKENS = /* @__PURE__ */ new Set(["|", "separator"]);
|
|
289
|
+
function isToolbarSeparatorToken(value) {
|
|
290
|
+
return SEPARATOR_TOKENS.has(value);
|
|
291
|
+
}
|
|
292
|
+
function expandPresetItems(group) {
|
|
293
|
+
if (group.items?.length) return group.items.filter((item) => typeof item === "string" && isTiptapButtonName(item));
|
|
294
|
+
switch (group.preset) {
|
|
295
|
+
case "formatting": return [
|
|
296
|
+
...(group.headingLevels ?? DEFAULT_HEADING_LEVELS).map((level) => `h${level}`),
|
|
297
|
+
"blockquote",
|
|
298
|
+
"code-block"
|
|
299
|
+
];
|
|
300
|
+
case "headings": return (group.headingLevels ?? DEFAULT_HEADING_LEVELS).map((level) => `h${level}`);
|
|
301
|
+
case "lists": return ["unordered-list", "ordered-list"];
|
|
302
|
+
case "align": return [
|
|
303
|
+
"align-left",
|
|
304
|
+
"align-center",
|
|
305
|
+
"align-right",
|
|
306
|
+
"align-justify"
|
|
307
|
+
];
|
|
308
|
+
default: return [];
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
function getToolbarGroupItems(group) {
|
|
312
|
+
return expandPresetItems(group);
|
|
313
|
+
}
|
|
314
|
+
function flattenToolbarButtonNames(nodes) {
|
|
315
|
+
const names = [];
|
|
316
|
+
nodes.forEach((node) => {
|
|
317
|
+
if (node.type === "button") {
|
|
318
|
+
names.push(node.name);
|
|
319
|
+
return;
|
|
320
|
+
}
|
|
321
|
+
if (node.type === "group") names.push(...getToolbarGroupItems(node.group));
|
|
322
|
+
});
|
|
323
|
+
return names;
|
|
324
|
+
}
|
|
325
|
+
function toolbarIncludesButton(nodes, buttonName) {
|
|
326
|
+
return flattenToolbarButtonNames(nodes).includes(buttonName);
|
|
327
|
+
}
|
|
328
|
+
function normalizeGroupItemDefinition(raw) {
|
|
329
|
+
if (typeof raw === "string") {
|
|
330
|
+
const token = raw.trim();
|
|
331
|
+
if (!token) return null;
|
|
332
|
+
if (isToolbarSeparatorToken(token)) return token;
|
|
333
|
+
if (token === "paragraph") return "paragraph";
|
|
334
|
+
return normalizeButtonName(token);
|
|
335
|
+
}
|
|
336
|
+
if (!raw || typeof raw !== "object") return null;
|
|
337
|
+
const record = raw;
|
|
338
|
+
if (record.type === "separator") return { type: "separator" };
|
|
339
|
+
if (record.type === "item" && typeof record.name === "string") {
|
|
340
|
+
if (record.name === "paragraph") return "paragraph";
|
|
341
|
+
return normalizeButtonName(record.name);
|
|
342
|
+
}
|
|
343
|
+
return null;
|
|
344
|
+
}
|
|
345
|
+
function normalizeGroupItemDefinitions(raw) {
|
|
346
|
+
return raw.map((item) => normalizeGroupItemDefinition(item)).filter((item) => item !== null);
|
|
347
|
+
}
|
|
348
|
+
function isGroupItemSeparator(item) {
|
|
349
|
+
return item === "|" || item === "separator" || typeof item === "object" && item.type === "separator";
|
|
350
|
+
}
|
|
351
|
+
function isToolbarGroupMenuButton(item) {
|
|
352
|
+
return !isGroupItemSeparator(item);
|
|
353
|
+
}
|
|
354
|
+
function groupItemDefinitionsToMenuEntries(items) {
|
|
355
|
+
return items.flatMap((item) => {
|
|
356
|
+
if (isGroupItemSeparator(item)) return [{ type: "separator" }];
|
|
357
|
+
if (!isToolbarGroupMenuButton(item)) return [];
|
|
358
|
+
return [{
|
|
359
|
+
type: "item",
|
|
360
|
+
name: item
|
|
361
|
+
}];
|
|
362
|
+
});
|
|
363
|
+
}
|
|
364
|
+
function getToolbarGroupMenuButtons(group) {
|
|
365
|
+
return getToolbarGroupMenuItems(group).filter((entry) => entry.type === "item").map((entry) => entry.name);
|
|
366
|
+
}
|
|
367
|
+
function normalizeButtonName(value) {
|
|
368
|
+
return isTiptapButtonName(value) ? value : null;
|
|
369
|
+
}
|
|
370
|
+
function normalizeHeadingLevels(value) {
|
|
371
|
+
if (!Array.isArray(value)) return;
|
|
372
|
+
const levels = value.map((level) => Number(level)).filter((level) => [
|
|
373
|
+
1,
|
|
374
|
+
2,
|
|
375
|
+
3,
|
|
376
|
+
4,
|
|
377
|
+
5,
|
|
378
|
+
6
|
|
379
|
+
].includes(level));
|
|
380
|
+
return levels.length > 0 ? levels : void 0;
|
|
381
|
+
}
|
|
382
|
+
function normalizeToolbarGroup(raw) {
|
|
383
|
+
const source = typeof raw.group === "object" && raw.group !== null ? raw.group : raw;
|
|
384
|
+
const preset = typeof source.preset === "string" ? source.preset : void 0;
|
|
385
|
+
const label = typeof source.label === "string" ? source.label : void 0;
|
|
386
|
+
const iconRaw = typeof source.icon === "string" ? source.icon : void 0;
|
|
387
|
+
const icon = iconRaw ? normalizeButtonName(iconRaw) ?? void 0 : void 0;
|
|
388
|
+
const headingLevels = normalizeHeadingLevels(source.headingLevels);
|
|
389
|
+
const items = Array.isArray(source.items) ? normalizeGroupItemDefinitions(source.items) : void 0;
|
|
390
|
+
if (!preset && !items?.length) return null;
|
|
391
|
+
if (preset && !VALID_PRESETS.has(preset)) return null;
|
|
392
|
+
return {
|
|
393
|
+
type: "group",
|
|
394
|
+
group: {
|
|
395
|
+
...label ? { label } : {},
|
|
396
|
+
...icon ? { icon } : {},
|
|
397
|
+
...preset ? { preset } : {},
|
|
398
|
+
...items?.length ? { items } : {},
|
|
399
|
+
...headingLevels ? { headingLevels } : {}
|
|
400
|
+
}
|
|
401
|
+
};
|
|
402
|
+
}
|
|
403
|
+
function normalizeToolbarNode(raw) {
|
|
404
|
+
if (typeof raw === "string") {
|
|
405
|
+
const token = raw.trim();
|
|
406
|
+
if (!token) return null;
|
|
407
|
+
if (isToolbarSeparatorToken(token)) return { type: "separator" };
|
|
408
|
+
const buttonName = normalizeButtonName(token);
|
|
409
|
+
return buttonName ? {
|
|
410
|
+
type: "button",
|
|
411
|
+
name: buttonName
|
|
412
|
+
} : null;
|
|
413
|
+
}
|
|
414
|
+
if (!raw || typeof raw !== "object") return null;
|
|
415
|
+
const record = raw;
|
|
416
|
+
if (record.type === "separator") return { type: "separator" };
|
|
417
|
+
if (record.type === "button" && typeof record.name === "string") {
|
|
418
|
+
const buttonName = normalizeButtonName(record.name);
|
|
419
|
+
return buttonName ? {
|
|
420
|
+
type: "button",
|
|
421
|
+
name: buttonName
|
|
422
|
+
} : null;
|
|
423
|
+
}
|
|
424
|
+
if (record.type === "group" || record.preset || record.items || record.group) return normalizeToolbarGroup(record);
|
|
425
|
+
if (typeof record.button === "string") {
|
|
426
|
+
const buttonName = normalizeButtonName(record.button);
|
|
427
|
+
return buttonName ? {
|
|
428
|
+
type: "button",
|
|
429
|
+
name: buttonName
|
|
430
|
+
} : null;
|
|
431
|
+
}
|
|
432
|
+
return null;
|
|
433
|
+
}
|
|
434
|
+
function normalizeToolbarNodes(raw) {
|
|
435
|
+
return raw.map((item) => normalizeToolbarNode(item)).filter((item) => item !== null);
|
|
436
|
+
}
|
|
437
|
+
function parseToolbarConfig(input) {
|
|
438
|
+
if (input === null || input === void 0 || input === "") return [{
|
|
439
|
+
type: "button",
|
|
440
|
+
name: "bold"
|
|
441
|
+
}, {
|
|
442
|
+
type: "button",
|
|
443
|
+
name: "italic"
|
|
444
|
+
}];
|
|
445
|
+
if (Array.isArray(input)) {
|
|
446
|
+
const normalized = normalizeToolbarNodes(input);
|
|
447
|
+
return normalized.length > 0 ? normalized : [{
|
|
448
|
+
type: "button",
|
|
449
|
+
name: "bold"
|
|
450
|
+
}, {
|
|
451
|
+
type: "button",
|
|
452
|
+
name: "italic"
|
|
453
|
+
}];
|
|
454
|
+
}
|
|
455
|
+
if (typeof input === "string") {
|
|
456
|
+
const trimmed = input.trim();
|
|
457
|
+
if (!trimmed) return [{
|
|
458
|
+
type: "button",
|
|
459
|
+
name: "bold"
|
|
460
|
+
}, {
|
|
461
|
+
type: "button",
|
|
462
|
+
name: "italic"
|
|
463
|
+
}];
|
|
464
|
+
if (trimmed.startsWith("[")) try {
|
|
465
|
+
const parsed = JSON.parse(trimmed);
|
|
466
|
+
return Array.isArray(parsed) ? parseToolbarConfig(parsed) : parseToolbarConfig(null);
|
|
467
|
+
} catch {
|
|
468
|
+
return parseToolbarConfig(null);
|
|
469
|
+
}
|
|
470
|
+
return parseToolbarConfig(trimmed.split(",").map((token) => token.trim()).filter(Boolean));
|
|
471
|
+
}
|
|
472
|
+
return parseToolbarConfig(null);
|
|
473
|
+
}
|
|
474
|
+
function runToolbarButton(editor, buttonName, options = {}) {
|
|
475
|
+
if (buttonName === "paragraph") return editor.chain().focus().setParagraph().run();
|
|
476
|
+
return runTiptapButton(editor, buttonName, options);
|
|
477
|
+
}
|
|
478
|
+
function isToolbarButtonActive(editor, buttonName) {
|
|
479
|
+
if (buttonName === "paragraph") return editor.isActive("paragraph") && !editor.isActive("heading");
|
|
480
|
+
return isTiptapButtonActive(editor, buttonName);
|
|
481
|
+
}
|
|
482
|
+
function getActiveHeadingLevel(editor) {
|
|
483
|
+
for (const level of [
|
|
484
|
+
1,
|
|
485
|
+
2,
|
|
486
|
+
3,
|
|
487
|
+
4,
|
|
488
|
+
5,
|
|
489
|
+
6
|
|
490
|
+
]) if (editor.isActive("heading", { level })) return level;
|
|
491
|
+
return null;
|
|
492
|
+
}
|
|
493
|
+
function getToolbarGroupTriggerState(editor, group) {
|
|
494
|
+
const fallbackIcon = group.icon ?? getToolbarGroupDefaultIcon(group);
|
|
495
|
+
const menuButtons = getToolbarGroupMenuButtons(group);
|
|
496
|
+
if (isHeadingsOnlyToolbarPreset(group.preset)) {
|
|
497
|
+
const activeLevel = getActiveHeadingLevel(editor);
|
|
498
|
+
if (activeLevel) {
|
|
499
|
+
const name = `h${activeLevel}`;
|
|
500
|
+
return {
|
|
501
|
+
activeName: name,
|
|
502
|
+
label: `H${activeLevel}`,
|
|
503
|
+
isActive: true,
|
|
504
|
+
icon: name
|
|
505
|
+
};
|
|
506
|
+
}
|
|
507
|
+
return {
|
|
508
|
+
activeName: null,
|
|
509
|
+
label: "",
|
|
510
|
+
isActive: false,
|
|
511
|
+
icon: "heading"
|
|
512
|
+
};
|
|
513
|
+
}
|
|
514
|
+
if (isFormattingToolbarPreset(group.preset)) {
|
|
515
|
+
const activeLevel = getActiveHeadingLevel(editor);
|
|
516
|
+
if (activeLevel) {
|
|
517
|
+
const name = `h${activeLevel}`;
|
|
518
|
+
return {
|
|
519
|
+
activeName: name,
|
|
520
|
+
label: `H${activeLevel}`,
|
|
521
|
+
isActive: true,
|
|
522
|
+
icon: name
|
|
523
|
+
};
|
|
524
|
+
}
|
|
525
|
+
if (isToolbarButtonActive(editor, "blockquote")) return {
|
|
526
|
+
activeName: "blockquote",
|
|
527
|
+
label: "",
|
|
528
|
+
isActive: true,
|
|
529
|
+
icon: "blockquote"
|
|
530
|
+
};
|
|
531
|
+
if (isToolbarButtonActive(editor, "code-block")) return {
|
|
532
|
+
activeName: "code-block",
|
|
533
|
+
label: "",
|
|
534
|
+
isActive: true,
|
|
535
|
+
icon: "code-block"
|
|
536
|
+
};
|
|
537
|
+
return {
|
|
538
|
+
activeName: "paragraph",
|
|
539
|
+
label: "Text",
|
|
540
|
+
isActive: isToolbarButtonActive(editor, "paragraph"),
|
|
541
|
+
icon: "paragraph"
|
|
542
|
+
};
|
|
543
|
+
}
|
|
544
|
+
const activeName = menuButtons.find((name) => isToolbarButtonActive(editor, name)) ?? null;
|
|
545
|
+
if (activeName) {
|
|
546
|
+
const icon = activeName === "paragraph" ? "paragraph" : isTiptapButtonName(activeName) ? activeName : fallbackIcon;
|
|
547
|
+
return {
|
|
548
|
+
activeName: activeName === "paragraph" ? "paragraph" : activeName,
|
|
549
|
+
label: activeName === "paragraph" ? "Text" : group.label ?? activeName,
|
|
550
|
+
isActive: true,
|
|
551
|
+
icon
|
|
552
|
+
};
|
|
553
|
+
}
|
|
554
|
+
return {
|
|
555
|
+
activeName: null,
|
|
556
|
+
label: group.label ?? "",
|
|
557
|
+
isActive: false,
|
|
558
|
+
icon: fallbackIcon
|
|
559
|
+
};
|
|
560
|
+
}
|
|
561
|
+
function getFormattingHeadingLevels(group) {
|
|
562
|
+
return group.headingLevels ?? DEFAULT_HEADING_LEVELS;
|
|
563
|
+
}
|
|
564
|
+
function getFormattingMenuEntries(group) {
|
|
565
|
+
return [
|
|
566
|
+
{
|
|
567
|
+
type: "item",
|
|
568
|
+
name: "paragraph"
|
|
569
|
+
},
|
|
570
|
+
{ type: "separator" },
|
|
571
|
+
...getFormattingHeadingLevels(group).map((level) => ({
|
|
572
|
+
type: "item",
|
|
573
|
+
name: `h${level}`
|
|
574
|
+
})),
|
|
575
|
+
{ type: "separator" },
|
|
576
|
+
{
|
|
577
|
+
type: "item",
|
|
578
|
+
name: "blockquote"
|
|
579
|
+
},
|
|
580
|
+
{
|
|
581
|
+
type: "item",
|
|
582
|
+
name: "code-block"
|
|
583
|
+
}
|
|
584
|
+
];
|
|
585
|
+
}
|
|
586
|
+
function getToolbarGroupMenuItems(group) {
|
|
587
|
+
if (group.items?.length) return groupItemDefinitionsToMenuEntries(group.items);
|
|
588
|
+
if (isFormattingToolbarPreset(group.preset)) return getFormattingMenuEntries(group);
|
|
589
|
+
return getToolbarGroupItems(group).map((name) => ({
|
|
590
|
+
type: "item",
|
|
591
|
+
name
|
|
592
|
+
}));
|
|
593
|
+
}
|
|
594
|
+
//#endregion
|
|
19
595
|
//#region src/components/tiptap/tiptap-editor-host.ts
|
|
20
596
|
function serializeTiptapDocumentContent(content) {
|
|
21
597
|
return JSON.stringify(normalizeContentArray(content));
|
|
@@ -1037,9 +1613,7 @@ var PkTiptapEditor = class PkTiptapEditor extends PkFormAssociatedElement {
|
|
|
1037
1613
|
case "backgroundColor":
|
|
1038
1614
|
value ? chain.setBackgroundColor(value).run() : chain.unsetBackgroundColor().run();
|
|
1039
1615
|
break;
|
|
1040
|
-
case "lineHeight":
|
|
1041
|
-
value ? chain.setLineHeight(value).run() : chain.unsetLineHeight().run();
|
|
1042
|
-
break;
|
|
1616
|
+
case "lineHeight": value ? chain.setLineHeight(value).run() : chain.unsetLineHeight().run();
|
|
1043
1617
|
}
|
|
1044
1618
|
}
|
|
1045
1619
|
getTextStyleOptionLabel(options, value) {
|