@verbb/plugin-kit-web 2.0.23 → 2.0.24
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 +6 -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-C2qzGQKj.js} +4 -3
- package/dist/chunks/pk-tiptap-content-C2qzGQKj.js.map +1 -0
- package/dist/chunks/{pk-tiptap-editor-BeuyzH5l.js → pk-tiptap-editor-y_QyNSR-.js} +20 -21
- package/dist/chunks/pk-tiptap-editor-y_QyNSR-.js.map +1 -0
- package/dist/chunks/{pk-tiptap-input-CQojaxDH.js → pk-tiptap-input-0Xy6rrot.js} +7 -6
- package/dist/chunks/pk-tiptap-input-0Xy6rrot.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-Q4ED1nBw.js} +2 -2
- package/dist/chunks/{tiptap.styles-DjhIrSBN.js.map → tiptap.styles-Q4ED1nBw.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-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-uppXgD5k.js} +16099 -9213
- package/dist-loader/chunks/tiptap.styles-CyqI_Wrl.js +896 -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 +595 -21
- 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
|
@@ -0,0 +1,896 @@
|
|
|
1
|
+
import { n as uniqueId } from "./pk-a11y-mGj0G5AE.js";
|
|
2
|
+
import { m as i } from "./lit-B6nFKgbW.js";
|
|
3
|
+
import { A as src_default$7, C as src_default$14, D as src_default$10, E as src_default$11, I as NodeSelection, L as Plugin, M as src_default, N as Extension, O as src_default$9, P as Node, R as PluginKey, S as TextStyleKit, T as src_default$12, _ as src_default$18, a as src_default$25, b as src_default$16, c as src_default$5, d as src_default$24, f as Table, g as src_default$19, h as src_default$20, i as src_default$26, j as src_default$1, k as src_default$8, l as src_default$22, m as src_default$21, o as src_default$3, p as src_default$4, s as src_default$2, u as src_default$23, v as src_default$6, w as src_default$13, x as src_default$15, y as src_default$17, z as TextSelection } from "./tiptap-uppXgD5k.js";
|
|
4
|
+
//#region ../plugin-kit-tiptap-core/dist/links/extension.js
|
|
5
|
+
/** Shared Tiptap link mark configuration for Plugin Kit editors. */
|
|
6
|
+
function createLinkExtension() {
|
|
7
|
+
return src_default.configure({
|
|
8
|
+
openOnClick: false,
|
|
9
|
+
enableClickSelection: false,
|
|
10
|
+
HTMLAttributes: {
|
|
11
|
+
target: null,
|
|
12
|
+
rel: null
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region ../plugin-kit-tiptap-core/dist/extensions/variable-tag.js
|
|
18
|
+
var isCursorPlaceholder = (node) => {
|
|
19
|
+
return node && node.isText && (node.text === "" || node.text === "");
|
|
20
|
+
};
|
|
21
|
+
function createVariableTagExtension({ trailingCursorText = "", addNodeView } = {}) {
|
|
22
|
+
return Node.create({
|
|
23
|
+
name: "variableTag",
|
|
24
|
+
group: "inline",
|
|
25
|
+
inline: true,
|
|
26
|
+
selectable: true,
|
|
27
|
+
draggable: true,
|
|
28
|
+
atom: true,
|
|
29
|
+
addOptions() {
|
|
30
|
+
return { trailingCursorText };
|
|
31
|
+
},
|
|
32
|
+
addAttributes() {
|
|
33
|
+
return {
|
|
34
|
+
label: { default: null },
|
|
35
|
+
value: { default: null },
|
|
36
|
+
openOnInsert: { default: false },
|
|
37
|
+
default: { default: null },
|
|
38
|
+
transformerId: { default: null },
|
|
39
|
+
transformerParams: { default: null },
|
|
40
|
+
unresolved: { default: false }
|
|
41
|
+
};
|
|
42
|
+
},
|
|
43
|
+
parseHTML() {
|
|
44
|
+
return [{
|
|
45
|
+
tag: "variable-tag",
|
|
46
|
+
getAttrs: (dom) => {
|
|
47
|
+
try {
|
|
48
|
+
return JSON.parse(dom.innerHTML);
|
|
49
|
+
} catch {
|
|
50
|
+
return {};
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}];
|
|
54
|
+
},
|
|
55
|
+
renderHTML({ HTMLAttributes }) {
|
|
56
|
+
return ["variable-tag", JSON.stringify(HTMLAttributes)];
|
|
57
|
+
},
|
|
58
|
+
addCommands() {
|
|
59
|
+
return { setVariableTag: (options) => {
|
|
60
|
+
return ({ dispatch, state }) => {
|
|
61
|
+
if (!dispatch) return false;
|
|
62
|
+
const { selection } = state;
|
|
63
|
+
const textSelection = selection;
|
|
64
|
+
const position = textSelection.$cursor ? textSelection.$cursor.pos : textSelection.$to.pos;
|
|
65
|
+
const node = this.type.create(options);
|
|
66
|
+
const transaction = state.tr.insert(position, node);
|
|
67
|
+
const insertPos = position + node.nodeSize;
|
|
68
|
+
const cursorText = this.options.trailingCursorText;
|
|
69
|
+
if (cursorText) {
|
|
70
|
+
transaction.insert(insertPos, state.schema.text(cursorText));
|
|
71
|
+
transaction.setSelection(TextSelection.create(transaction.doc, insertPos + cursorText.length));
|
|
72
|
+
} else transaction.setSelection(TextSelection.create(transaction.doc, insertPos));
|
|
73
|
+
dispatch(transaction);
|
|
74
|
+
return true;
|
|
75
|
+
};
|
|
76
|
+
} };
|
|
77
|
+
},
|
|
78
|
+
addNodeView() {
|
|
79
|
+
return addNodeView ?? null;
|
|
80
|
+
},
|
|
81
|
+
addProseMirrorPlugins() {
|
|
82
|
+
return [new Plugin({
|
|
83
|
+
key: new PluginKey("variableTagProtection"),
|
|
84
|
+
props: {
|
|
85
|
+
handleKeyDown: (view, event) => {
|
|
86
|
+
const { state } = view;
|
|
87
|
+
const { selection, doc } = state;
|
|
88
|
+
if (event.key === "ArrowLeft" && selection.empty) {
|
|
89
|
+
const { $from } = selection;
|
|
90
|
+
const { pos } = $from;
|
|
91
|
+
if (pos > 0) {
|
|
92
|
+
const before = $from.nodeBefore;
|
|
93
|
+
if (isCursorPlaceholder(before)) {
|
|
94
|
+
const posBeforePlaceholder = pos - before.nodeSize;
|
|
95
|
+
const variableTagNode = doc.resolve(posBeforePlaceholder).nodeBefore;
|
|
96
|
+
if (variableTagNode && variableTagNode.type.name === "variableTag") {
|
|
97
|
+
const tagStart = posBeforePlaceholder - variableTagNode.nodeSize;
|
|
98
|
+
event.preventDefault();
|
|
99
|
+
view.dispatch(state.tr.setSelection(NodeSelection.create(doc, tagStart)));
|
|
100
|
+
return true;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
if (event.key === "ArrowRight" && selection.empty) {
|
|
106
|
+
const { $from } = selection;
|
|
107
|
+
const { pos } = $from;
|
|
108
|
+
const after = $from.nodeAfter;
|
|
109
|
+
if (isCursorPlaceholder(after)) {
|
|
110
|
+
const before = $from.nodeBefore;
|
|
111
|
+
if (before && before.type.name === "variableTag") {
|
|
112
|
+
event.preventDefault();
|
|
113
|
+
view.dispatch(state.tr.setSelection(TextSelection.create(doc, pos + after.nodeSize)));
|
|
114
|
+
return true;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
if (event.key === "Backspace" && selection.empty) {
|
|
119
|
+
const { $from } = selection;
|
|
120
|
+
const { pos } = $from;
|
|
121
|
+
if (pos > 0) {
|
|
122
|
+
const before = $from.nodeBefore;
|
|
123
|
+
if (isCursorPlaceholder(before)) {
|
|
124
|
+
const posBeforePlaceholder = pos - before.nodeSize;
|
|
125
|
+
const variableTagNode = doc.resolve(posBeforePlaceholder).nodeBefore;
|
|
126
|
+
if (variableTagNode && variableTagNode.type.name === "variableTag") {
|
|
127
|
+
const deleteFrom = posBeforePlaceholder - variableTagNode.nodeSize;
|
|
128
|
+
event.preventDefault();
|
|
129
|
+
const tr = state.tr.delete(deleteFrom, pos);
|
|
130
|
+
tr.setSelection(TextSelection.create(tr.doc, Math.max(0, deleteFrom)));
|
|
131
|
+
view.dispatch(tr);
|
|
132
|
+
return true;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
if (selection instanceof NodeSelection && selection.node.type.name === "variableTag") {
|
|
138
|
+
if ([
|
|
139
|
+
"ArrowLeft",
|
|
140
|
+
"ArrowRight",
|
|
141
|
+
"ArrowUp",
|
|
142
|
+
"ArrowDown",
|
|
143
|
+
"Home",
|
|
144
|
+
"End"
|
|
145
|
+
].includes(event.key)) return false;
|
|
146
|
+
if (["Delete", "Backspace"].includes(event.key)) return false;
|
|
147
|
+
if (event.ctrlKey || event.metaKey || event.altKey || event.shiftKey) return false;
|
|
148
|
+
if (event.key.length === 1 || event.key === "Enter") return true;
|
|
149
|
+
}
|
|
150
|
+
return false;
|
|
151
|
+
},
|
|
152
|
+
handlePaste: (view) => {
|
|
153
|
+
const { selection } = view.state;
|
|
154
|
+
if (selection instanceof NodeSelection && selection.node.type.name === "variableTag") return true;
|
|
155
|
+
return false;
|
|
156
|
+
},
|
|
157
|
+
handleDrop: (view) => {
|
|
158
|
+
const { selection } = view.state;
|
|
159
|
+
if (selection instanceof NodeSelection && selection.node.type.name === "variableTag" && !view.dragging) return true;
|
|
160
|
+
return false;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
})];
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
//#endregion
|
|
168
|
+
//#region ../plugin-kit-tiptap-core/dist/extensions/one-liner-document.js
|
|
169
|
+
var OneLinerDocument = src_default$1.extend({ content: "inline*" });
|
|
170
|
+
//#endregion
|
|
171
|
+
//#region ../plugin-kit-tiptap-core/dist/extensions/font-variant-caps.js
|
|
172
|
+
/** A deliberately narrow TextStyle attribute; arbitrary CSS values are never persisted. */
|
|
173
|
+
var FontVariantCaps = Extension.create({
|
|
174
|
+
name: "fontVariantCaps",
|
|
175
|
+
addGlobalAttributes() {
|
|
176
|
+
return [{
|
|
177
|
+
types: ["textStyle"],
|
|
178
|
+
attributes: { fontVariantCaps: {
|
|
179
|
+
default: null,
|
|
180
|
+
parseHTML: (element) => element.style.fontVariantCaps === "small-caps" ? "small-caps" : null,
|
|
181
|
+
renderHTML: (attributes) => attributes.fontVariantCaps === "small-caps" ? { style: "font-variant-caps: small-caps" } : {}
|
|
182
|
+
} }
|
|
183
|
+
}];
|
|
184
|
+
},
|
|
185
|
+
addCommands() {
|
|
186
|
+
return {
|
|
187
|
+
setSmallCaps: () => ({ chain }) => chain().setMark("textStyle", { fontVariantCaps: "small-caps" }).run(),
|
|
188
|
+
unsetSmallCaps: () => ({ chain }) => chain().setMark("textStyle", { fontVariantCaps: null }).removeEmptyTextStyle().run(),
|
|
189
|
+
toggleSmallCaps: () => ({ editor, commands }) => editor.isActive("textStyle", { fontVariantCaps: "small-caps" }) ? commands.unsetSmallCaps() : commands.setSmallCaps()
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
//#endregion
|
|
194
|
+
//#region ../plugin-kit-tiptap-core/dist/registry.js
|
|
195
|
+
var extensionRegistrations = /* @__PURE__ */ new Map();
|
|
196
|
+
var toolbarControls = /* @__PURE__ */ new Map();
|
|
197
|
+
function getExtensionName(extension, id) {
|
|
198
|
+
if (!extension || typeof extension !== "object" || !("name" in extension)) throw new Error(`Tiptap extension "${id}" factory must return an extension with a schema name.`);
|
|
199
|
+
const { name } = extension;
|
|
200
|
+
if (typeof name !== "string" || !name) throw new Error(`Tiptap extension "${id}" factory must return an extension with a schema name.`);
|
|
201
|
+
return name;
|
|
202
|
+
}
|
|
203
|
+
function getRegisteredTiptapExtensions(surface) {
|
|
204
|
+
return [...extensionRegistrations.values()].filter((registration) => registration.surfaces.has(surface)).map((registration) => {
|
|
205
|
+
const extension = registration.factory();
|
|
206
|
+
const extensionName = getExtensionName(extension, registration.id);
|
|
207
|
+
if (extensionName !== registration.extensionName) throw new Error(`Tiptap extension factory "${registration.id}" changed its schema name from "${registration.extensionName}" to "${extensionName}".`);
|
|
208
|
+
return extension;
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
function getRegisteredTiptapToolbarControl(id) {
|
|
212
|
+
return toolbarControls.get(id);
|
|
213
|
+
}
|
|
214
|
+
function isRegisteredTiptapToolbarControl(id) {
|
|
215
|
+
return toolbarControls.has(id);
|
|
216
|
+
}
|
|
217
|
+
//#endregion
|
|
218
|
+
//#region ../plugin-kit-tiptap-core/dist/extensions/create-extensions.js
|
|
219
|
+
var createTiptapExtensions = ({ trailingCursorText = "", variableTagNodeView, includeVariableTag = true, surface = "editor" } = {}) => {
|
|
220
|
+
const extensions = [
|
|
221
|
+
src_default$1,
|
|
222
|
+
src_default$2,
|
|
223
|
+
src_default$3,
|
|
224
|
+
src_default$4,
|
|
225
|
+
src_default$5,
|
|
226
|
+
src_default$6,
|
|
227
|
+
src_default$7,
|
|
228
|
+
src_default$8,
|
|
229
|
+
src_default$9,
|
|
230
|
+
src_default$10,
|
|
231
|
+
src_default$11,
|
|
232
|
+
src_default$12,
|
|
233
|
+
src_default$13,
|
|
234
|
+
src_default$14,
|
|
235
|
+
TextStyleKit,
|
|
236
|
+
FontVariantCaps,
|
|
237
|
+
src_default$15,
|
|
238
|
+
src_default$16,
|
|
239
|
+
src_default$17,
|
|
240
|
+
src_default$18.configure({ levels: [
|
|
241
|
+
1,
|
|
242
|
+
2,
|
|
243
|
+
3,
|
|
244
|
+
4,
|
|
245
|
+
5,
|
|
246
|
+
6
|
|
247
|
+
] }),
|
|
248
|
+
src_default$19,
|
|
249
|
+
src_default$20,
|
|
250
|
+
src_default$21,
|
|
251
|
+
Table.configure({ resizable: true }),
|
|
252
|
+
src_default$22,
|
|
253
|
+
src_default$23,
|
|
254
|
+
src_default$24,
|
|
255
|
+
src_default$25,
|
|
256
|
+
createLinkExtension(),
|
|
257
|
+
src_default$26.configure({
|
|
258
|
+
types: ["heading", "paragraph"],
|
|
259
|
+
defaultAlignment: "start"
|
|
260
|
+
})
|
|
261
|
+
];
|
|
262
|
+
if (includeVariableTag) extensions.push(createVariableTagExtension({
|
|
263
|
+
trailingCursorText,
|
|
264
|
+
addNodeView: variableTagNodeView
|
|
265
|
+
}));
|
|
266
|
+
extensions.push(...getRegisteredTiptapExtensions(surface));
|
|
267
|
+
return extensions;
|
|
268
|
+
};
|
|
269
|
+
var createTiptapInputExtensions = ({ trailingCursorText = "", variableTagNodeView } = {}) => {
|
|
270
|
+
return [
|
|
271
|
+
OneLinerDocument,
|
|
272
|
+
src_default$5,
|
|
273
|
+
createVariableTagExtension({
|
|
274
|
+
trailingCursorText,
|
|
275
|
+
addNodeView: variableTagNodeView
|
|
276
|
+
})
|
|
277
|
+
];
|
|
278
|
+
};
|
|
279
|
+
//#endregion
|
|
280
|
+
//#region ../plugin-kit-tiptap-core/dist/text-style-toolbar.js
|
|
281
|
+
var DEFAULT_TIPTAP_TEXT_STYLE_TOOLBAR_CONFIG = {
|
|
282
|
+
fontFamilies: [
|
|
283
|
+
{
|
|
284
|
+
label: "Default font",
|
|
285
|
+
value: null
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
label: "Arial",
|
|
289
|
+
value: "Arial, sans-serif"
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
label: "Georgia",
|
|
293
|
+
value: "Georgia, serif"
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
label: "Times New Roman",
|
|
297
|
+
value: "\"Times New Roman\", serif"
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
label: "Courier New",
|
|
301
|
+
value: "\"Courier New\", monospace"
|
|
302
|
+
}
|
|
303
|
+
],
|
|
304
|
+
fontSizes: [{
|
|
305
|
+
label: "Default",
|
|
306
|
+
value: null
|
|
307
|
+
}, ...[
|
|
308
|
+
8,
|
|
309
|
+
9,
|
|
310
|
+
10,
|
|
311
|
+
11,
|
|
312
|
+
12,
|
|
313
|
+
14,
|
|
314
|
+
16,
|
|
315
|
+
18,
|
|
316
|
+
24,
|
|
317
|
+
30,
|
|
318
|
+
36,
|
|
319
|
+
48,
|
|
320
|
+
60,
|
|
321
|
+
72,
|
|
322
|
+
96
|
|
323
|
+
].map((size) => ({
|
|
324
|
+
label: String(size),
|
|
325
|
+
value: `${size}px`
|
|
326
|
+
}))],
|
|
327
|
+
textColors: [
|
|
328
|
+
{
|
|
329
|
+
label: "Default",
|
|
330
|
+
value: null
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
label: "Black",
|
|
334
|
+
value: "#1f2937"
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
label: "Gray",
|
|
338
|
+
value: "#6b7280"
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
label: "Red",
|
|
342
|
+
value: "#dc2626"
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
label: "Orange",
|
|
346
|
+
value: "#ea580c"
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
label: "Yellow",
|
|
350
|
+
value: "#ca8a04"
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
label: "Green",
|
|
354
|
+
value: "#16a34a"
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
label: "Blue",
|
|
358
|
+
value: "#2563eb"
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
label: "Purple",
|
|
362
|
+
value: "#9333ea"
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
label: "Pink",
|
|
366
|
+
value: "#db2777"
|
|
367
|
+
}
|
|
368
|
+
],
|
|
369
|
+
backgroundColors: [
|
|
370
|
+
{
|
|
371
|
+
label: "None",
|
|
372
|
+
value: null
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
label: "Gray",
|
|
376
|
+
value: "#f3f4f6"
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
label: "Red",
|
|
380
|
+
value: "#fee2e2"
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
label: "Orange",
|
|
384
|
+
value: "#ffedd5"
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
label: "Yellow",
|
|
388
|
+
value: "#fef9c3"
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
label: "Green",
|
|
392
|
+
value: "#dcfce7"
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
label: "Blue",
|
|
396
|
+
value: "#dbeafe"
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
label: "Purple",
|
|
400
|
+
value: "#f3e8ff"
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
label: "Pink",
|
|
404
|
+
value: "#fce7f3"
|
|
405
|
+
}
|
|
406
|
+
],
|
|
407
|
+
lineHeights: [
|
|
408
|
+
{
|
|
409
|
+
label: "Default",
|
|
410
|
+
value: null
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
label: "Single (1.0)",
|
|
414
|
+
value: "1"
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
label: "1.15",
|
|
418
|
+
value: "1.15"
|
|
419
|
+
},
|
|
420
|
+
{
|
|
421
|
+
label: "1.5",
|
|
422
|
+
value: "1.5"
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
label: "Double (2.0)",
|
|
426
|
+
value: "2"
|
|
427
|
+
}
|
|
428
|
+
]
|
|
429
|
+
};
|
|
430
|
+
function resolveTiptapTextStyleToolbarConfig(config) {
|
|
431
|
+
return {
|
|
432
|
+
...DEFAULT_TIPTAP_TEXT_STYLE_TOOLBAR_CONFIG,
|
|
433
|
+
...config
|
|
434
|
+
};
|
|
435
|
+
}
|
|
436
|
+
//#endregion
|
|
437
|
+
//#region src/components/tiptap/variable-tag-node-view.ts
|
|
438
|
+
/** Match kit v1 VariableTagView chip chrome (indigo + remove). */
|
|
439
|
+
var REMOVE_ICON = `
|
|
440
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 10" width="10" height="10" aria-hidden="true" focusable="false">
|
|
441
|
+
<path fill="currentColor" d="M2.1 1.4 5 4.3l2.9-2.9.7.7L5.7 5l2.9 2.9-.7.7L5 5.7l-2.9 2.9-.7-.7L4.3 5 1.4 2.1z"/>
|
|
442
|
+
</svg>
|
|
443
|
+
`.trim();
|
|
444
|
+
var PK_VARIABLE_TAG_CONFIGURE_EVENT = "pk-variable-tag-configure";
|
|
445
|
+
var findTiptapHost = (viewDom) => {
|
|
446
|
+
let node = viewDom;
|
|
447
|
+
while (node) {
|
|
448
|
+
if (node instanceof HTMLElement && node.localName.startsWith("pk-tiptap")) return node;
|
|
449
|
+
node = node.parentNode instanceof ShadowRoot ? node.parentNode.host : node.parentNode;
|
|
450
|
+
}
|
|
451
|
+
return null;
|
|
452
|
+
};
|
|
453
|
+
var emitConfigure = (editor, detail) => {
|
|
454
|
+
const viewDom = editor.view.dom;
|
|
455
|
+
const host = findTiptapHost(viewDom);
|
|
456
|
+
const configure = host && "variableTagConfigure" in host ? host.variableTagConfigure : null;
|
|
457
|
+
if (typeof configure === "function") configure(detail);
|
|
458
|
+
(host ?? viewDom).dispatchEvent(new CustomEvent(PK_VARIABLE_TAG_CONFIGURE_EVENT, {
|
|
459
|
+
bubbles: true,
|
|
460
|
+
composed: true,
|
|
461
|
+
detail
|
|
462
|
+
}));
|
|
463
|
+
};
|
|
464
|
+
/**
|
|
465
|
+
* DOM NodeViewRendererProps do NOT include React's `deleteNode` / `updateAttributes`
|
|
466
|
+
* (those live on NodeViewProps for ReactNodeViewRenderer only). Build them from
|
|
467
|
+
* editor + getPos — same operations ReactNodeViewRenderer wires for VariableTagView.
|
|
468
|
+
*/
|
|
469
|
+
function createNodeViewCommands(editor, getPos) {
|
|
470
|
+
const resolvePos = () => {
|
|
471
|
+
const pos = typeof getPos === "function" ? getPos() : getPos;
|
|
472
|
+
return typeof pos === "number" ? pos : void 0;
|
|
473
|
+
};
|
|
474
|
+
const deleteNode = () => {
|
|
475
|
+
const pos = resolvePos();
|
|
476
|
+
if (typeof pos !== "number") return;
|
|
477
|
+
const live = editor.state.doc.nodeAt(pos);
|
|
478
|
+
if (!live || live.type.name !== "variableTag") return;
|
|
479
|
+
editor.chain().focus().deleteRange({
|
|
480
|
+
from: pos,
|
|
481
|
+
to: pos + live.nodeSize
|
|
482
|
+
}).run();
|
|
483
|
+
};
|
|
484
|
+
const updateAttributes = (attributes) => {
|
|
485
|
+
const pos = resolvePos();
|
|
486
|
+
if (typeof pos !== "number") return;
|
|
487
|
+
const live = editor.state.doc.nodeAt(pos);
|
|
488
|
+
if (!live || live.type.name !== "variableTag") return;
|
|
489
|
+
editor.chain().command(({ tr, dispatch }) => {
|
|
490
|
+
if (dispatch) tr.setNodeMarkup(pos, void 0, {
|
|
491
|
+
...live.attrs,
|
|
492
|
+
...attributes
|
|
493
|
+
});
|
|
494
|
+
return true;
|
|
495
|
+
}).run();
|
|
496
|
+
};
|
|
497
|
+
return {
|
|
498
|
+
deleteNode,
|
|
499
|
+
updateAttributes,
|
|
500
|
+
resolvePos
|
|
501
|
+
};
|
|
502
|
+
}
|
|
503
|
+
/**
|
|
504
|
+
* DOM node view for variable tags in vanilla editors.
|
|
505
|
+
* Chip + remove match kit v1; configure UI is opened via `pk-variable-tag-configure`
|
|
506
|
+
* (Formie mounts the edit overlay beside the WC editor).
|
|
507
|
+
*/
|
|
508
|
+
function createVariableTagDomNodeView() {
|
|
509
|
+
return (props) => {
|
|
510
|
+
const { editor, getPos } = props;
|
|
511
|
+
const { deleteNode, updateAttributes, resolvePos } = createNodeViewCommands(editor, getPos);
|
|
512
|
+
let currentNode = props.node;
|
|
513
|
+
const syncUnresolvedPresentation = (attrs) => {
|
|
514
|
+
const unresolved = Boolean(attrs.unresolved);
|
|
515
|
+
const token = String(attrs.value ?? "");
|
|
516
|
+
const chipLabel = String(attrs.label || attrs.value || "");
|
|
517
|
+
dom.classList.toggle("pk-variable-tag--unresolved", unresolved);
|
|
518
|
+
if (unresolved) {
|
|
519
|
+
dom.dataset.unresolved = "true";
|
|
520
|
+
const description = token ? `Unknown or missing reference — ${token}` : "Unknown or missing reference";
|
|
521
|
+
dom.setAttribute("aria-description", description);
|
|
522
|
+
label.setAttribute("aria-invalid", "true");
|
|
523
|
+
} else {
|
|
524
|
+
delete dom.dataset.unresolved;
|
|
525
|
+
dom.removeAttribute("aria-description");
|
|
526
|
+
label.removeAttribute("aria-invalid");
|
|
527
|
+
}
|
|
528
|
+
label.textContent = chipLabel;
|
|
529
|
+
};
|
|
530
|
+
const dom = document.createElement("span");
|
|
531
|
+
dom.className = "pk-variable-tag";
|
|
532
|
+
dom.id = uniqueId("pk-variable-tag");
|
|
533
|
+
dom.setAttribute("contenteditable", "false");
|
|
534
|
+
dom.setAttribute("data-drag-handle", "");
|
|
535
|
+
dom.dataset.label = String(currentNode.attrs.label ?? "");
|
|
536
|
+
dom.dataset.variableValue = String(currentNode.attrs.value ?? "");
|
|
537
|
+
const label = document.createElement("button");
|
|
538
|
+
label.type = "button";
|
|
539
|
+
label.className = "pk-variable-tag__label";
|
|
540
|
+
label.draggable = false;
|
|
541
|
+
dom.append(label);
|
|
542
|
+
syncUnresolvedPresentation(currentNode.attrs);
|
|
543
|
+
let removeButton = null;
|
|
544
|
+
let openOnInsertHandled = false;
|
|
545
|
+
let openedAt = 0;
|
|
546
|
+
const readLiveAttrs = () => {
|
|
547
|
+
const pos = resolvePos();
|
|
548
|
+
if (typeof pos === "number") {
|
|
549
|
+
const live = editor.state.doc.nodeAt(pos);
|
|
550
|
+
if (live?.type.name === "variableTag") return { ...live.attrs };
|
|
551
|
+
}
|
|
552
|
+
return { ...currentNode.attrs };
|
|
553
|
+
};
|
|
554
|
+
const openConfigure = () => {
|
|
555
|
+
if (!editor.isEditable) return;
|
|
556
|
+
const now = Date.now();
|
|
557
|
+
if (now - openedAt < 300) return;
|
|
558
|
+
openedAt = now;
|
|
559
|
+
dom.removeAttribute("draggable");
|
|
560
|
+
emitConfigure(editor, {
|
|
561
|
+
editor,
|
|
562
|
+
anchor: dom,
|
|
563
|
+
attrs: readLiveAttrs(),
|
|
564
|
+
getPos: resolvePos,
|
|
565
|
+
updateAttributes,
|
|
566
|
+
deleteNode
|
|
567
|
+
});
|
|
568
|
+
};
|
|
569
|
+
label.addEventListener("pointerdown", (event) => {
|
|
570
|
+
if (event.button !== 0) return;
|
|
571
|
+
event.preventDefault();
|
|
572
|
+
event.stopPropagation();
|
|
573
|
+
openConfigure();
|
|
574
|
+
});
|
|
575
|
+
label.addEventListener("click", (event) => {
|
|
576
|
+
event.preventDefault();
|
|
577
|
+
event.stopPropagation();
|
|
578
|
+
openConfigure();
|
|
579
|
+
});
|
|
580
|
+
const syncRemoveButton = (editable) => {
|
|
581
|
+
if (editable) {
|
|
582
|
+
if (removeButton) return;
|
|
583
|
+
removeButton = document.createElement("button");
|
|
584
|
+
removeButton.type = "button";
|
|
585
|
+
removeButton.className = "pk-variable-tag__remove";
|
|
586
|
+
removeButton.setAttribute("aria-label", "Remove");
|
|
587
|
+
removeButton.draggable = false;
|
|
588
|
+
removeButton.innerHTML = REMOVE_ICON;
|
|
589
|
+
removeButton.addEventListener("pointerdown", (event) => {
|
|
590
|
+
event.preventDefault();
|
|
591
|
+
event.stopPropagation();
|
|
592
|
+
});
|
|
593
|
+
removeButton.addEventListener("click", (event) => {
|
|
594
|
+
event.preventDefault();
|
|
595
|
+
event.stopPropagation();
|
|
596
|
+
deleteNode();
|
|
597
|
+
});
|
|
598
|
+
dom.append(removeButton);
|
|
599
|
+
return;
|
|
600
|
+
}
|
|
601
|
+
removeButton?.remove();
|
|
602
|
+
removeButton = null;
|
|
603
|
+
};
|
|
604
|
+
syncRemoveButton(editor.isEditable);
|
|
605
|
+
if (currentNode.attrs.openOnInsert && editor.isEditable && !openOnInsertHandled) {
|
|
606
|
+
openOnInsertHandled = true;
|
|
607
|
+
queueMicrotask(() => {
|
|
608
|
+
updateAttributes({ openOnInsert: false });
|
|
609
|
+
openConfigure();
|
|
610
|
+
});
|
|
611
|
+
}
|
|
612
|
+
return {
|
|
613
|
+
dom,
|
|
614
|
+
stopEvent: (event) => {
|
|
615
|
+
const target = event.target;
|
|
616
|
+
if (!(target instanceof Element)) return false;
|
|
617
|
+
return Boolean(target.closest(".pk-variable-tag__label") || target.closest(".pk-variable-tag__remove"));
|
|
618
|
+
},
|
|
619
|
+
selectNode: () => {
|
|
620
|
+
dom.classList.add("ProseMirror-selectednode");
|
|
621
|
+
dom.removeAttribute("draggable");
|
|
622
|
+
},
|
|
623
|
+
deselectNode: () => {
|
|
624
|
+
dom.classList.remove("ProseMirror-selectednode");
|
|
625
|
+
dom.removeAttribute("draggable");
|
|
626
|
+
},
|
|
627
|
+
update(updatedNode) {
|
|
628
|
+
if (updatedNode.type.name !== "variableTag") return false;
|
|
629
|
+
currentNode = updatedNode;
|
|
630
|
+
dom.dataset.label = String(updatedNode.attrs.label ?? "");
|
|
631
|
+
dom.dataset.variableValue = String(updatedNode.attrs.value ?? "");
|
|
632
|
+
syncUnresolvedPresentation(updatedNode.attrs);
|
|
633
|
+
syncRemoveButton(editor.isEditable);
|
|
634
|
+
return true;
|
|
635
|
+
}
|
|
636
|
+
};
|
|
637
|
+
};
|
|
638
|
+
}
|
|
639
|
+
//#endregion
|
|
640
|
+
//#region src/components/tiptap/tiptap.styles.ts
|
|
641
|
+
/**
|
|
642
|
+
* Indigo chip matching kit v1 VariableTagView (`bg-[#5C6BC0] text-white rounded-[2px]`).
|
|
643
|
+
* Shared by rich editor + single-line input ProseMirror hosts.
|
|
644
|
+
*/
|
|
645
|
+
var variableTagStyles = i`
|
|
646
|
+
.pk-variable-tag {
|
|
647
|
+
position: relative;
|
|
648
|
+
display: inline-flex;
|
|
649
|
+
align-items: stretch;
|
|
650
|
+
max-width: 100%;
|
|
651
|
+
margin-inline: 1px;
|
|
652
|
+
margin-block-start: -3px;
|
|
653
|
+
padding: 0;
|
|
654
|
+
border-radius: 2px;
|
|
655
|
+
background: #5c6bc0;
|
|
656
|
+
color: #fff;
|
|
657
|
+
font-size: 11px;
|
|
658
|
+
font-weight: 400;
|
|
659
|
+
line-height: 1;
|
|
660
|
+
white-space: nowrap;
|
|
661
|
+
vertical-align: middle;
|
|
662
|
+
overflow: hidden;
|
|
663
|
+
cursor: default;
|
|
664
|
+
box-sizing: border-box;
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
/* Unresolved / missing reference — muted grey (not alarm yellow). */
|
|
668
|
+
.pk-variable-tag--unresolved {
|
|
669
|
+
background: var(--pk-color-gray-100, #f3f4f6);
|
|
670
|
+
color: var(--pk-color-gray-600, #4b5563);
|
|
671
|
+
box-shadow: inset 0 0 0 1px var(--pk-color-gray-300, #d1d5db);
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
.pk-variable-tag--unresolved.ProseMirror-selectednode {
|
|
675
|
+
box-shadow:
|
|
676
|
+
inset 0 0 0 1px var(--pk-color-gray-400, #9ca3af),
|
|
677
|
+
0 0 0 2px rgba(156, 163, 175, 0.45);
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
.pk-variable-tag.ProseMirror-selectednode {
|
|
681
|
+
outline: none;
|
|
682
|
+
box-shadow: 0 0 0 2px rgba(123, 140, 232, 0.5);
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
.pk-variable-tag__label {
|
|
686
|
+
display: inline-flex;
|
|
687
|
+
align-items: center;
|
|
688
|
+
max-width: 220px;
|
|
689
|
+
margin: 0;
|
|
690
|
+
padding: 4px 5px;
|
|
691
|
+
border: 0;
|
|
692
|
+
background: transparent;
|
|
693
|
+
color: inherit;
|
|
694
|
+
font: inherit;
|
|
695
|
+
font-size: inherit;
|
|
696
|
+
line-height: inherit;
|
|
697
|
+
text-align: left;
|
|
698
|
+
overflow: hidden;
|
|
699
|
+
text-overflow: ellipsis;
|
|
700
|
+
cursor: pointer;
|
|
701
|
+
user-select: none;
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
.pk-variable-tag__remove {
|
|
705
|
+
display: inline-flex;
|
|
706
|
+
align-items: center;
|
|
707
|
+
justify-content: center;
|
|
708
|
+
align-self: stretch;
|
|
709
|
+
margin: 0;
|
|
710
|
+
padding: 4px 5px 4px 4px;
|
|
711
|
+
border: 0;
|
|
712
|
+
background: transparent;
|
|
713
|
+
color: inherit;
|
|
714
|
+
cursor: pointer;
|
|
715
|
+
line-height: 0;
|
|
716
|
+
appearance: none;
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
.pk-variable-tag__remove svg {
|
|
720
|
+
display: block;
|
|
721
|
+
width: 10px;
|
|
722
|
+
height: 10px;
|
|
723
|
+
pointer-events: none;
|
|
724
|
+
}
|
|
725
|
+
`;
|
|
726
|
+
var tiptapProseMirrorStyles = i`
|
|
727
|
+
@layer pk-component {
|
|
728
|
+
.ProseMirror {
|
|
729
|
+
outline: none;
|
|
730
|
+
min-height: 2rem;
|
|
731
|
+
padding: 1rem;
|
|
732
|
+
background: rgb(251, 252, 254);
|
|
733
|
+
/* Craft CP body text (~gray-700), not gray-900. */
|
|
734
|
+
color: var(--pk-color-gray-700);
|
|
735
|
+
font-family: var(--pk-font-family);
|
|
736
|
+
/* Match pk-input / body (14px). sm (13px) matched field instructions and looked undersized vs v1. */
|
|
737
|
+
font-size: var(--pk-font-size-base);
|
|
738
|
+
line-height: 1.5;
|
|
739
|
+
white-space: pre-wrap;
|
|
740
|
+
box-sizing: border-box;
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
.ProseMirror p {
|
|
744
|
+
margin: 0 0 0.5rem;
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
.ProseMirror p:last-child {
|
|
748
|
+
margin-bottom: 0;
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
.ProseMirror h1 {
|
|
752
|
+
font-size: 1.25rem;
|
|
753
|
+
font-weight: 700;
|
|
754
|
+
margin: 0 0 0.5rem;
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
.ProseMirror h2 {
|
|
758
|
+
font-size: 1.125rem;
|
|
759
|
+
font-weight: 600;
|
|
760
|
+
margin: 0 0 0.5rem;
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
.ProseMirror h3,
|
|
764
|
+
.ProseMirror h4,
|
|
765
|
+
.ProseMirror h5,
|
|
766
|
+
.ProseMirror h6 {
|
|
767
|
+
font-weight: 600;
|
|
768
|
+
margin: 0 0 0.5rem;
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
.ProseMirror a {
|
|
772
|
+
color: var(--pk-color-blue-600);
|
|
773
|
+
text-decoration: underline;
|
|
774
|
+
cursor: pointer;
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
.ProseMirror ul,
|
|
778
|
+
.ProseMirror ol {
|
|
779
|
+
margin: 0 0 0.5rem;
|
|
780
|
+
padding-left: 1.25rem;
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
.ProseMirror blockquote {
|
|
784
|
+
margin: 0 0 0.5rem;
|
|
785
|
+
padding-left: 0.75rem;
|
|
786
|
+
border-left: 3px solid var(--pk-color-gray-300);
|
|
787
|
+
color: var(--pk-color-gray-600);
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
.ProseMirror code {
|
|
791
|
+
font-family: var(--pk-font-family-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace);
|
|
792
|
+
font-size: var(--pk-font-size-mono, 0.9em);
|
|
793
|
+
line-height: var(--pk-line-height-mono, 1.5);
|
|
794
|
+
background: var(--pk-color-gray-100);
|
|
795
|
+
border-radius: 0.2rem;
|
|
796
|
+
padding: 0.1rem 0.25rem;
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
.ProseMirror pre {
|
|
800
|
+
margin: 0 0 0.5rem;
|
|
801
|
+
padding: 0.75rem;
|
|
802
|
+
background: var(--pk-color-gray-900);
|
|
803
|
+
color: var(--pk-color-gray-50);
|
|
804
|
+
border-radius: var(--pk-radius-md);
|
|
805
|
+
overflow-x: auto;
|
|
806
|
+
font-family: var(--pk-font-family-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace);
|
|
807
|
+
font-size: var(--pk-font-size-mono, 0.9em);
|
|
808
|
+
line-height: var(--pk-line-height-mono, 1.5);
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
${variableTagStyles}
|
|
812
|
+
}
|
|
813
|
+
`;
|
|
814
|
+
/**
|
|
815
|
+
* Single-line TipTap field — same box metrics as `pk-input` .input
|
|
816
|
+
* (14px / line-height 1.4 / padding 6px 8px).
|
|
817
|
+
*
|
|
818
|
+
* ProseMirror always injects `br.ProseMirror-trailingBreak` for the caret.
|
|
819
|
+
* Never `display: none` it — that freezes one-liner docs after the first character.
|
|
820
|
+
* Clip to one line height instead so the break cannot inflate the control.
|
|
821
|
+
*/
|
|
822
|
+
var tiptapInputProseMirrorStyles = i`
|
|
823
|
+
@layer pk-component {
|
|
824
|
+
.ProseMirror {
|
|
825
|
+
outline: none;
|
|
826
|
+
margin: 0;
|
|
827
|
+
/* Match stock pk-input padding by default. Hosts can override density via
|
|
828
|
+
* --pk-tiptap-input-* (light DOM cannot style .ProseMirror in the shadow tree).
|
|
829
|
+
*/
|
|
830
|
+
padding-block: var(--pk-tiptap-input-padding-block, 6px);
|
|
831
|
+
padding-inline-start: var(--pk-tiptap-input-padding-inline-start, 8px);
|
|
832
|
+
padding-inline-end: var(--pk-tiptap-input-padding-inline-end, 8px);
|
|
833
|
+
/* One-liner clip: padding + control line-height (v1 text-sm), not a fixed shell token. */
|
|
834
|
+
height: var(--pk-tiptap-input-height, calc(var(--pk-input-control-line-height, 1.25rem) + 12px));
|
|
835
|
+
max-height: var(--pk-tiptap-input-height, calc(var(--pk-input-control-line-height, 1.25rem) + 12px));
|
|
836
|
+
background: var(--pk-input-bg);
|
|
837
|
+
/* Craft CP body / field value text. */
|
|
838
|
+
color: var(--pk-color-gray-700);
|
|
839
|
+
font-family: var(--pk-font-family);
|
|
840
|
+
font-size: var(--pk-tiptap-input-font-size, var(--pk-font-size-base));
|
|
841
|
+
line-height: var(--pk-tiptap-input-line-height, var(--pk-input-control-line-height, 1.25rem));
|
|
842
|
+
white-space: nowrap;
|
|
843
|
+
overflow-x: auto;
|
|
844
|
+
overflow-y: hidden;
|
|
845
|
+
box-sizing: border-box;
|
|
846
|
+
scrollbar-width: none;
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
.ProseMirror::-webkit-scrollbar {
|
|
850
|
+
display: none;
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
/* OneLinerDocument is inline-only; keep p inline if a schema ever wraps text. */
|
|
854
|
+
.ProseMirror p {
|
|
855
|
+
margin: 0;
|
|
856
|
+
display: inline;
|
|
857
|
+
line-height: inherit;
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
/* Read-only display: no input padding/height box (v1 skipped chrome when readOnly).
|
|
861
|
+
* Inherit color/weight so list name links (text-blue-600 font-bold) show through. */
|
|
862
|
+
:host([readonly]) .ProseMirror {
|
|
863
|
+
padding-block: 0;
|
|
864
|
+
padding-inline: 0;
|
|
865
|
+
height: auto;
|
|
866
|
+
max-height: none;
|
|
867
|
+
background: transparent;
|
|
868
|
+
overflow: visible;
|
|
869
|
+
white-space: normal;
|
|
870
|
+
color: inherit;
|
|
871
|
+
font-weight: inherit;
|
|
872
|
+
font-size: inherit;
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
${variableTagStyles}
|
|
876
|
+
}
|
|
877
|
+
`;
|
|
878
|
+
var tiptapContentProseMirrorStyles = i`
|
|
879
|
+
@layer pk-component {
|
|
880
|
+
/* Inherit host color/size so light-DOM wrappers (warning banners, badges)
|
|
881
|
+
can restyle read-only TipTap without piercing the shadow tree. */
|
|
882
|
+
.ProseMirror {
|
|
883
|
+
outline: none;
|
|
884
|
+
color: inherit;
|
|
885
|
+
font-family: inherit;
|
|
886
|
+
font-size: inherit;
|
|
887
|
+
line-height: inherit;
|
|
888
|
+
}
|
|
889
|
+
|
|
890
|
+
.ProseMirror p {
|
|
891
|
+
margin: 0;
|
|
892
|
+
}
|
|
893
|
+
}
|
|
894
|
+
`;
|
|
895
|
+
//#endregion
|
|
896
|
+
export { resolveTiptapTextStyleToolbarConfig as a, getRegisteredTiptapToolbarControl as c, createVariableTagDomNodeView as i, isRegisteredTiptapToolbarControl as l, tiptapInputProseMirrorStyles as n, createTiptapExtensions as o, tiptapProseMirrorStyles as r, createTiptapInputExtensions as s, tiptapContentProseMirrorStyles as t };
|