@verbb/plugin-kit-web 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/LICENSE.md +21 -0
- package/README.md +149 -0
- package/dist/a11y/active-elements.d.ts +6 -0
- package/dist/a11y/active-elements.d.ts.map +1 -0
- package/dist/a11y/dismissible-stack.d.ts +6 -0
- package/dist/a11y/dismissible-stack.d.ts.map +1 -0
- package/dist/a11y/focus.d.ts +20 -0
- package/dist/a11y/focus.d.ts.map +1 -0
- package/dist/a11y/index.d.ts +7 -0
- package/dist/a11y/index.d.ts.map +1 -0
- package/dist/a11y/offset.d.ts +9 -0
- package/dist/a11y/offset.d.ts.map +1 -0
- package/dist/a11y/scroll-lock.d.ts +23 -0
- package/dist/a11y/scroll-lock.d.ts.map +1 -0
- package/dist/base/checkbox-control.styles.d.ts +3 -0
- package/dist/base/checkbox-control.styles.d.ts.map +1 -0
- package/dist/base/component-id.d.ts +2 -0
- package/dist/base/component-id.d.ts.map +1 -0
- package/dist/base/form-control.styles.d.ts +3 -0
- package/dist/base/form-control.styles.d.ts.map +1 -0
- package/dist/base/icon.styles.d.ts +3 -0
- package/dist/base/icon.styles.d.ts.map +1 -0
- package/dist/base/markdown.styles.d.ts +3 -0
- package/dist/base/markdown.styles.d.ts.map +1 -0
- package/dist/base/pk-element.d.ts +28 -0
- package/dist/base/pk-element.d.ts.map +1 -0
- package/dist/base/pk-form-associated-element.d.ts +63 -0
- package/dist/base/pk-form-associated-element.d.ts.map +1 -0
- package/dist/base/shadow-reset.styles.d.ts +6 -0
- package/dist/base/shadow-reset.styles.d.ts.map +1 -0
- package/dist/base/styles.d.ts +9 -0
- package/dist/base/styles.d.ts.map +1 -0
- package/dist/chunks/active-elements-BwpXu8Lb.js +16 -0
- package/dist/chunks/active-elements-BwpXu8Lb.js.map +1 -0
- package/dist/chunks/animate-with-class-CsDwYnXL.js +42 -0
- package/dist/chunks/animate-with-class-CsDwYnXL.js.map +1 -0
- package/dist/chunks/autoloader-DzOTQqe6.js +177 -0
- package/dist/chunks/autoloader-DzOTQqe6.js.map +1 -0
- package/dist/chunks/button-group-item.styles-DYmBR28a.js +147 -0
- package/dist/chunks/button-group-item.styles-DYmBR28a.js.map +1 -0
- package/dist/chunks/component-registry-CpZiIDh4.js +130 -0
- package/dist/chunks/component-registry-CpZiIDh4.js.map +1 -0
- package/dist/chunks/control-aria-B2QMq4ji.js +69 -0
- package/dist/chunks/control-aria-B2QMq4ji.js.map +1 -0
- package/dist/chunks/decorate-W02hmVTt.js +149 -0
- package/dist/chunks/decorate-W02hmVTt.js.map +1 -0
- package/dist/chunks/dismissible-stack-XQUMfKO3.js +32 -0
- package/dist/chunks/dismissible-stack-XQUMfKO3.js.map +1 -0
- package/dist/chunks/field-labels-CoU9dnNq.js +14 -0
- package/dist/chunks/field-labels-CoU9dnNq.js.map +1 -0
- package/dist/chunks/focus-aa5dlv8k.js +122 -0
- package/dist/chunks/focus-aa5dlv8k.js.map +1 -0
- package/dist/chunks/form-control.styles-BQdimE5o.js +108 -0
- package/dist/chunks/form-control.styles-BQdimE5o.js.map +1 -0
- package/dist/chunks/has-slot-8BvCt_qo.js +74 -0
- package/dist/chunks/has-slot-8BvCt_qo.js.map +1 -0
- package/dist/chunks/icon.styles-BLTWLqYp.js +21 -0
- package/dist/chunks/icon.styles-BLTWLqYp.js.map +1 -0
- package/dist/chunks/icons-BR8JcQj2.js +52 -0
- package/dist/chunks/icons-BR8JcQj2.js.map +1 -0
- package/dist/chunks/mirror-validator-DCjNYrrx.js +32 -0
- package/dist/chunks/mirror-validator-DCjNYrrx.js.map +1 -0
- package/dist/chunks/overlay-lifecycle-D0pkTQyI.js +44 -0
- package/dist/chunks/overlay-lifecycle-D0pkTQyI.js.map +1 -0
- package/dist/chunks/pk-button-Cilu5WAT.js +840 -0
- package/dist/chunks/pk-button-Cilu5WAT.js.map +1 -0
- package/dist/chunks/pk-button-group-D9hqSfb_.js +422 -0
- package/dist/chunks/pk-button-group-D9hqSfb_.js.map +1 -0
- package/dist/chunks/pk-button-group-separator-DG0CYaqc.js +61 -0
- package/dist/chunks/pk-button-group-separator-DG0CYaqc.js.map +1 -0
- package/dist/chunks/pk-button-group-text-C5z4P7ur.js +49 -0
- package/dist/chunks/pk-button-group-text-C5z4P7ur.js.map +1 -0
- package/dist/chunks/pk-calendar-CcV-La-9.js +1410 -0
- package/dist/chunks/pk-calendar-CcV-La-9.js.map +1 -0
- package/dist/chunks/pk-checkbox-Bavq3-9C.js +360 -0
- package/dist/chunks/pk-checkbox-Bavq3-9C.js.map +1 -0
- package/dist/chunks/pk-checkbox-select-ZEJ6WIQn.js +221 -0
- package/dist/chunks/pk-checkbox-select-ZEJ6WIQn.js.map +1 -0
- package/dist/chunks/pk-clear--mPWZP7H.js +15 -0
- package/dist/chunks/pk-clear--mPWZP7H.js.map +1 -0
- package/dist/chunks/pk-code-editor-DSG6AwLV.js +213 -0
- package/dist/chunks/pk-code-editor-DSG6AwLV.js.map +1 -0
- package/dist/chunks/pk-color-input-D4L0DE5S.js +398 -0
- package/dist/chunks/pk-color-input-D4L0DE5S.js.map +1 -0
- package/dist/chunks/pk-combobox-Dd1ik0Ko.js +2015 -0
- package/dist/chunks/pk-combobox-Dd1ik0Ko.js.map +1 -0
- package/dist/chunks/pk-copy-button-DPh5TOF9.js +139 -0
- package/dist/chunks/pk-copy-button-DPh5TOF9.js.map +1 -0
- package/dist/chunks/pk-date-picker-CkwU4DzD.js +717 -0
- package/dist/chunks/pk-date-picker-CkwU4DzD.js.map +1 -0
- package/dist/chunks/pk-dialog-DZZd1Tzb.js +636 -0
- package/dist/chunks/pk-dialog-DZZd1Tzb.js.map +1 -0
- package/dist/chunks/pk-dropdown-item-BFyjtsL5.js +547 -0
- package/dist/chunks/pk-dropdown-item-BFyjtsL5.js.map +1 -0
- package/dist/chunks/pk-dropdown-label-DfACId-K.js +48 -0
- package/dist/chunks/pk-dropdown-label-DfACId-K.js.map +1 -0
- package/dist/chunks/pk-dropdown-menu-DWlxkDIs.js +735 -0
- package/dist/chunks/pk-dropdown-menu-DWlxkDIs.js.map +1 -0
- package/dist/chunks/pk-editable-table-pBkD6izs.js +1528 -0
- package/dist/chunks/pk-editable-table-pBkD6izs.js.map +1 -0
- package/dist/chunks/pk-field-Buy_AtYF.js +485 -0
- package/dist/chunks/pk-field-Buy_AtYF.js.map +1 -0
- package/dist/chunks/pk-form-associated-element-DmZKgNPL.js +260 -0
- package/dist/chunks/pk-form-associated-element-DmZKgNPL.js.map +1 -0
- package/dist/chunks/pk-input-group-CGHQKrt8.js +238 -0
- package/dist/chunks/pk-input-group-CGHQKrt8.js.map +1 -0
- package/dist/chunks/pk-input-group-addon-DXbNbsfY.js +101 -0
- package/dist/chunks/pk-input-group-addon-DXbNbsfY.js.map +1 -0
- package/dist/chunks/pk-input-group-button-XOfVLqGO.js +55 -0
- package/dist/chunks/pk-input-group-button-XOfVLqGO.js.map +1 -0
- package/dist/chunks/pk-input-group-input-CSmR5vdY.js +136 -0
- package/dist/chunks/pk-input-group-input-CSmR5vdY.js.map +1 -0
- package/dist/chunks/pk-input-group-text-C6ekhtff.js +40 -0
- package/dist/chunks/pk-input-group-text-C6ekhtff.js.map +1 -0
- package/dist/chunks/pk-input-group-textarea-DALr3pdU.js +113 -0
- package/dist/chunks/pk-input-group-textarea-DALr3pdU.js.map +1 -0
- package/dist/chunks/pk-input-naIRPWGC.js +723 -0
- package/dist/chunks/pk-input-naIRPWGC.js.map +1 -0
- package/dist/chunks/pk-lightswitch-B-rLflNq.js +432 -0
- package/dist/chunks/pk-lightswitch-B-rLflNq.js.map +1 -0
- package/dist/chunks/pk-option-C3Zqmu3z.js +312 -0
- package/dist/chunks/pk-option-C3Zqmu3z.js.map +1 -0
- package/dist/chunks/pk-option-group-CbI56A3T.js +72 -0
- package/dist/chunks/pk-option-group-CbI56A3T.js.map +1 -0
- package/dist/chunks/pk-popover-XZZdJ4WI.js +377 -0
- package/dist/chunks/pk-popover-XZZdJ4WI.js.map +1 -0
- package/dist/chunks/pk-popup-CgiXok-U.js +538 -0
- package/dist/chunks/pk-popup-CgiXok-U.js.map +1 -0
- package/dist/chunks/pk-radio-Bg02ckzC.js +233 -0
- package/dist/chunks/pk-radio-Bg02ckzC.js.map +1 -0
- package/dist/chunks/pk-radio-group-B5rps9G4.js +253 -0
- package/dist/chunks/pk-radio-group-B5rps9G4.js.map +1 -0
- package/dist/chunks/pk-scroll-area-B0V4Dr2j.js +402 -0
- package/dist/chunks/pk-scroll-area-B0V4Dr2j.js.map +1 -0
- package/dist/chunks/pk-select-B17rV6BR.js +1129 -0
- package/dist/chunks/pk-select-B17rV6BR.js.map +1 -0
- package/dist/chunks/pk-separator-CLb9n0FK.js +89 -0
- package/dist/chunks/pk-separator-CLb9n0FK.js.map +1 -0
- package/dist/chunks/pk-spinner-Blxd3SIH.js +148 -0
- package/dist/chunks/pk-spinner-Blxd3SIH.js.map +1 -0
- package/dist/chunks/pk-status-7_5dEuw-.js +92 -0
- package/dist/chunks/pk-status-7_5dEuw-.js.map +1 -0
- package/dist/chunks/pk-tab-CzV7pOdp.js +259 -0
- package/dist/chunks/pk-tab-CzV7pOdp.js.map +1 -0
- package/dist/chunks/pk-tab-heading-BWAB85ua.js +50 -0
- package/dist/chunks/pk-tab-heading-BWAB85ua.js.map +1 -0
- package/dist/chunks/pk-tab-panel-Q3Pqyq-f.js +86 -0
- package/dist/chunks/pk-tab-panel-Q3Pqyq-f.js.map +1 -0
- package/dist/chunks/pk-tabs-Cip4nbb7.js +622 -0
- package/dist/chunks/pk-tabs-Cip4nbb7.js.map +1 -0
- package/dist/chunks/pk-textarea-BEapC8Rk.js +342 -0
- package/dist/chunks/pk-textarea-BEapC8Rk.js.map +1 -0
- package/dist/chunks/pk-time-picker-DbW_hMs2.js +228 -0
- package/dist/chunks/pk-time-picker-DbW_hMs2.js.map +1 -0
- package/dist/chunks/pk-tiptap-content-DAtNbJYC.js +76 -0
- package/dist/chunks/pk-tiptap-content-DAtNbJYC.js.map +1 -0
- package/dist/chunks/pk-tiptap-editor-umIuEaXh.js +1084 -0
- package/dist/chunks/pk-tiptap-editor-umIuEaXh.js.map +1 -0
- package/dist/chunks/pk-tiptap-input-CXcYXbRa.js +250 -0
- package/dist/chunks/pk-tiptap-input-CXcYXbRa.js.map +1 -0
- package/dist/chunks/pk-toggle-5-GKVLye.js +256 -0
- package/dist/chunks/pk-toggle-5-GKVLye.js.map +1 -0
- package/dist/chunks/pk-toggle-group-CWDwYlgR.js +175 -0
- package/dist/chunks/pk-toggle-group-CWDwYlgR.js.map +1 -0
- package/dist/chunks/pk-tooltip-fcUbVGli.js +469 -0
- package/dist/chunks/pk-tooltip-fcUbVGli.js.map +1 -0
- package/dist/chunks/popup-content-animation.styles-Dc6d9quJ.js +117 -0
- package/dist/chunks/popup-content-animation.styles-Dc6d9quJ.js.map +1 -0
- package/dist/chunks/popup-placement-animation-WlEXnS85.js +60 -0
- package/dist/chunks/popup-placement-animation-WlEXnS85.js.map +1 -0
- package/dist/chunks/popup-pointer-C8lypj8V.js +21 -0
- package/dist/chunks/popup-pointer-C8lypj8V.js.map +1 -0
- package/dist/chunks/register-components-DNw6EYNo.js +15 -0
- package/dist/chunks/register-components-DNw6EYNo.js.map +1 -0
- package/dist/chunks/render-Dvc3MHQR.js +16 -0
- package/dist/chunks/render-Dvc3MHQR.js.map +1 -0
- package/dist/chunks/required-validator-CEg8dvjS.js +29 -0
- package/dist/chunks/required-validator-CEg8dvjS.js.map +1 -0
- package/dist/chunks/scroll-lock-B4o9vdzJ.js +193 -0
- package/dist/chunks/scroll-lock-B4o9vdzJ.js.map +1 -0
- package/dist/chunks/spinner-utils-CDfHypTv.js +15 -0
- package/dist/chunks/spinner-utils-CDfHypTv.js.map +1 -0
- package/dist/chunks/supports-popover-CUBsbHpS.js +7 -0
- package/dist/chunks/supports-popover-CUBsbHpS.js.map +1 -0
- package/dist/chunks/sync-listbox-separators-B1-V0oJi.js +149 -0
- package/dist/chunks/sync-listbox-separators-B1-V0oJi.js.map +1 -0
- package/dist/chunks/tiptap.styles-BytOpP0H.js +463 -0
- package/dist/chunks/tiptap.styles-BytOpP0H.js.map +1 -0
- package/dist/component-registry.d.ts +28 -0
- package/dist/component-registry.d.ts.map +1 -0
- package/dist/components/button/index.d.ts +2 -0
- package/dist/components/button/index.d.ts.map +1 -0
- package/dist/components/button/pk-button.d.ts +91 -0
- package/dist/components/button/pk-button.d.ts.map +1 -0
- package/dist/components/button/pk-button.js +2 -0
- package/dist/components/button/pk-button.styles.d.ts +2 -0
- package/dist/components/button/pk-button.styles.d.ts.map +1 -0
- package/dist/components/button-group/button-group-item.styles.d.ts +13 -0
- package/dist/components/button-group/button-group-item.styles.d.ts.map +1 -0
- package/dist/components/button-group/index.d.ts +4 -0
- package/dist/components/button-group/index.d.ts.map +1 -0
- package/dist/components/button-group/pk-button-group-separator.d.ts +18 -0
- package/dist/components/button-group/pk-button-group-separator.d.ts.map +1 -0
- package/dist/components/button-group/pk-button-group-separator.js +2 -0
- package/dist/components/button-group/pk-button-group-separator.styles.d.ts +2 -0
- package/dist/components/button-group/pk-button-group-separator.styles.d.ts.map +1 -0
- package/dist/components/button-group/pk-button-group-text.d.ts +18 -0
- package/dist/components/button-group/pk-button-group-text.d.ts.map +1 -0
- package/dist/components/button-group/pk-button-group-text.js +2 -0
- package/dist/components/button-group/pk-button-group-text.styles.d.ts +2 -0
- package/dist/components/button-group/pk-button-group-text.styles.d.ts.map +1 -0
- package/dist/components/button-group/pk-button-group.d.ts +40 -0
- package/dist/components/button-group/pk-button-group.d.ts.map +1 -0
- package/dist/components/button-group/pk-button-group.js +2 -0
- package/dist/components/button-group/pk-button-group.styles.d.ts +2 -0
- package/dist/components/button-group/pk-button-group.styles.d.ts.map +1 -0
- package/dist/components/button-group.d.ts +2 -0
- package/dist/components/button-group.js +4 -0
- package/dist/components/button.d.ts +2 -0
- package/dist/components/button.js +2 -0
- package/dist/components/calendar/index.d.ts +3 -0
- package/dist/components/calendar/index.d.ts.map +1 -0
- package/dist/components/calendar/pk-calendar.d.ts +117 -0
- package/dist/components/calendar/pk-calendar.d.ts.map +1 -0
- package/dist/components/calendar/pk-calendar.js +2 -0
- package/dist/components/calendar/pk-calendar.styles.d.ts +2 -0
- package/dist/components/calendar/pk-calendar.styles.d.ts.map +1 -0
- package/dist/components/calendar.d.ts +2 -0
- package/dist/components/calendar.js +2 -0
- package/dist/components/checkbox/index.d.ts +2 -0
- package/dist/components/checkbox/index.d.ts.map +1 -0
- package/dist/components/checkbox/pk-checkbox.d.ts +50 -0
- package/dist/components/checkbox/pk-checkbox.d.ts.map +1 -0
- package/dist/components/checkbox/pk-checkbox.js +2 -0
- package/dist/components/checkbox/pk-checkbox.styles.d.ts +2 -0
- package/dist/components/checkbox/pk-checkbox.styles.d.ts.map +1 -0
- package/dist/components/checkbox-select/index.d.ts +2 -0
- package/dist/components/checkbox-select/index.d.ts.map +1 -0
- package/dist/components/checkbox-select/pk-checkbox-select.d.ts +48 -0
- package/dist/components/checkbox-select/pk-checkbox-select.d.ts.map +1 -0
- package/dist/components/checkbox-select/pk-checkbox-select.js +2 -0
- package/dist/components/checkbox-select/pk-checkbox-select.styles.d.ts +2 -0
- package/dist/components/checkbox-select/pk-checkbox-select.styles.d.ts.map +1 -0
- package/dist/components/checkbox-select.d.ts +2 -0
- package/dist/components/checkbox-select.js +2 -0
- package/dist/components/checkbox.d.ts +2 -0
- package/dist/components/checkbox.js +2 -0
- package/dist/components/code-editor/index.d.ts +2 -0
- package/dist/components/code-editor/index.d.ts.map +1 -0
- package/dist/components/code-editor/pk-code-editor.d.ts +40 -0
- package/dist/components/code-editor/pk-code-editor.d.ts.map +1 -0
- package/dist/components/code-editor/pk-code-editor.js +2 -0
- package/dist/components/code-editor/pk-code-editor.styles.d.ts +2 -0
- package/dist/components/code-editor/pk-code-editor.styles.d.ts.map +1 -0
- package/dist/components/code-editor.d.ts +2 -0
- package/dist/components/code-editor.js +2 -0
- package/dist/components/color-input/index.d.ts +2 -0
- package/dist/components/color-input/index.d.ts.map +1 -0
- package/dist/components/color-input/pk-color-input.d.ts +41 -0
- package/dist/components/color-input/pk-color-input.d.ts.map +1 -0
- package/dist/components/color-input/pk-color-input.js +2 -0
- package/dist/components/color-input/pk-color-input.styles.d.ts +7 -0
- package/dist/components/color-input/pk-color-input.styles.d.ts.map +1 -0
- package/dist/components/color-input.d.ts +2 -0
- package/dist/components/color-input.js +2 -0
- package/dist/components/combobox/index.d.ts +2 -0
- package/dist/components/combobox/index.d.ts.map +1 -0
- package/dist/components/combobox/pk-combobox.d.ts +219 -0
- package/dist/components/combobox/pk-combobox.d.ts.map +1 -0
- package/dist/components/combobox/pk-combobox.js +2 -0
- package/dist/components/combobox/pk-combobox.styles.d.ts +2 -0
- package/dist/components/combobox/pk-combobox.styles.d.ts.map +1 -0
- package/dist/components/combobox.d.ts +2 -0
- package/dist/components/combobox.js +2 -0
- package/dist/components/copy-button/index.d.ts +2 -0
- package/dist/components/copy-button/index.d.ts.map +1 -0
- package/dist/components/copy-button/pk-copy-button.d.ts +37 -0
- package/dist/components/copy-button/pk-copy-button.d.ts.map +1 -0
- package/dist/components/copy-button/pk-copy-button.js +2 -0
- package/dist/components/copy-button/pk-copy-button.styles.d.ts +2 -0
- package/dist/components/copy-button/pk-copy-button.styles.d.ts.map +1 -0
- package/dist/components/copy-button.d.ts +2 -0
- package/dist/components/copy-button.js +2 -0
- package/dist/components/date-picker/index.d.ts +3 -0
- package/dist/components/date-picker/index.d.ts.map +1 -0
- package/dist/components/date-picker/pk-date-picker.d.ts +107 -0
- package/dist/components/date-picker/pk-date-picker.d.ts.map +1 -0
- package/dist/components/date-picker/pk-date-picker.js +2 -0
- package/dist/components/date-picker/pk-date-picker.styles.d.ts +2 -0
- package/dist/components/date-picker/pk-date-picker.styles.d.ts.map +1 -0
- package/dist/components/date-picker.d.ts +2 -0
- package/dist/components/date-picker.js +2 -0
- package/dist/components/dialog/index.d.ts +2 -0
- package/dist/components/dialog/index.d.ts.map +1 -0
- package/dist/components/dialog/pk-dialog.d.ts +87 -0
- package/dist/components/dialog/pk-dialog.d.ts.map +1 -0
- package/dist/components/dialog/pk-dialog.js +2 -0
- package/dist/components/dialog/pk-dialog.styles.d.ts +2 -0
- package/dist/components/dialog/pk-dialog.styles.d.ts.map +1 -0
- package/dist/components/dialog.d.ts +2 -0
- package/dist/components/dialog.js +2 -0
- package/dist/components/dropdown-menu/dropdown-menu-size.styles.d.ts +11 -0
- package/dist/components/dropdown-menu/dropdown-menu-size.styles.d.ts.map +1 -0
- package/dist/components/dropdown-menu/index.d.ts +5 -0
- package/dist/components/dropdown-menu/index.d.ts.map +1 -0
- package/dist/components/dropdown-menu/pk-dropdown-item.d.ts +67 -0
- package/dist/components/dropdown-menu/pk-dropdown-item.d.ts.map +1 -0
- package/dist/components/dropdown-menu/pk-dropdown-item.js +2 -0
- package/dist/components/dropdown-menu/pk-dropdown-item.styles.d.ts +2 -0
- package/dist/components/dropdown-menu/pk-dropdown-item.styles.d.ts.map +1 -0
- package/dist/components/dropdown-menu/pk-dropdown-label.d.ts +13 -0
- package/dist/components/dropdown-menu/pk-dropdown-label.d.ts.map +1 -0
- package/dist/components/dropdown-menu/pk-dropdown-label.js +2 -0
- package/dist/components/dropdown-menu/pk-dropdown-label.styles.d.ts +2 -0
- package/dist/components/dropdown-menu/pk-dropdown-label.styles.d.ts.map +1 -0
- package/dist/components/dropdown-menu/pk-dropdown-menu.d.ts +130 -0
- package/dist/components/dropdown-menu/pk-dropdown-menu.d.ts.map +1 -0
- package/dist/components/dropdown-menu/pk-dropdown-menu.js +2 -0
- package/dist/components/dropdown-menu/pk-dropdown-menu.styles.d.ts +6 -0
- package/dist/components/dropdown-menu/pk-dropdown-menu.styles.d.ts.map +1 -0
- package/dist/components/dropdown-menu/pk-dropdown-separator.d.ts +13 -0
- package/dist/components/dropdown-menu/pk-dropdown-separator.d.ts.map +1 -0
- package/dist/components/dropdown-menu/pk-dropdown-separator.js +36 -0
- package/dist/components/dropdown-menu/pk-dropdown-separator.js.map +1 -0
- package/dist/components/dropdown-menu.d.ts +2 -0
- package/dist/components/dropdown-menu.js +5 -0
- package/dist/components/editable-table/editable-table-dnd.d.ts +64 -0
- package/dist/components/editable-table/editable-table-dnd.d.ts.map +1 -0
- package/dist/components/editable-table/editable-table-model.d.ts +93 -0
- package/dist/components/editable-table/editable-table-model.d.ts.map +1 -0
- package/dist/components/editable-table/index.d.ts +3 -0
- package/dist/components/editable-table/index.d.ts.map +1 -0
- package/dist/components/editable-table/pk-editable-table.d.ts +122 -0
- package/dist/components/editable-table/pk-editable-table.d.ts.map +1 -0
- package/dist/components/editable-table/pk-editable-table.js +2 -0
- package/dist/components/editable-table/pk-editable-table.styles.d.ts +2 -0
- package/dist/components/editable-table/pk-editable-table.styles.d.ts.map +1 -0
- package/dist/components/editable-table.d.ts +2 -0
- package/dist/components/editable-table.js +2 -0
- package/dist/components/field/index.d.ts +2 -0
- package/dist/components/field/index.d.ts.map +1 -0
- package/dist/components/field/pk-field.d.ts +69 -0
- package/dist/components/field/pk-field.d.ts.map +1 -0
- package/dist/components/field/pk-field.js +2 -0
- package/dist/components/field/pk-field.styles.d.ts +2 -0
- package/dist/components/field/pk-field.styles.d.ts.map +1 -0
- package/dist/components/field.d.ts +2 -0
- package/dist/components/field.js +2 -0
- package/dist/components/icon/index.d.ts +2 -0
- package/dist/components/icon/index.d.ts.map +1 -0
- package/dist/components/icon/pk-icon-loader.d.ts +1 -0
- package/dist/components/icon/pk-icon-loader.d.ts.map +1 -0
- package/dist/components/icon/pk-icon.d.ts +46 -0
- package/dist/components/icon/pk-icon.d.ts.map +1 -0
- package/dist/components/icon/pk-icon.js +47 -0
- package/dist/components/icon/pk-icon.js.map +1 -0
- package/dist/components/icon.d.ts +2 -0
- package/dist/components/icon.js +2 -0
- package/dist/components/input/index.d.ts +2 -0
- package/dist/components/input/index.d.ts.map +1 -0
- package/dist/components/input/pk-input.d.ts +83 -0
- package/dist/components/input/pk-input.d.ts.map +1 -0
- package/dist/components/input/pk-input.js +2 -0
- package/dist/components/input/pk-input.styles.d.ts +2 -0
- package/dist/components/input/pk-input.styles.d.ts.map +1 -0
- package/dist/components/input-group/index.d.ts +10 -0
- package/dist/components/input-group/index.d.ts.map +1 -0
- package/dist/components/input-group/pk-input-group-addon.d.ts +23 -0
- package/dist/components/input-group/pk-input-group-addon.d.ts.map +1 -0
- package/dist/components/input-group/pk-input-group-addon.js +2 -0
- package/dist/components/input-group/pk-input-group-addon.styles.d.ts +2 -0
- package/dist/components/input-group/pk-input-group-addon.styles.d.ts.map +1 -0
- package/dist/components/input-group/pk-input-group-button.d.ts +22 -0
- package/dist/components/input-group/pk-input-group-button.d.ts.map +1 -0
- package/dist/components/input-group/pk-input-group-button.js +2 -0
- package/dist/components/input-group/pk-input-group-button.styles.d.ts +2 -0
- package/dist/components/input-group/pk-input-group-button.styles.d.ts.map +1 -0
- package/dist/components/input-group/pk-input-group-input.d.ts +28 -0
- package/dist/components/input-group/pk-input-group-input.d.ts.map +1 -0
- package/dist/components/input-group/pk-input-group-input.js +2 -0
- package/dist/components/input-group/pk-input-group-input.styles.d.ts +2 -0
- package/dist/components/input-group/pk-input-group-input.styles.d.ts.map +1 -0
- package/dist/components/input-group/pk-input-group-text.d.ts +18 -0
- package/dist/components/input-group/pk-input-group-text.d.ts.map +1 -0
- package/dist/components/input-group/pk-input-group-text.js +2 -0
- package/dist/components/input-group/pk-input-group-text.styles.d.ts +2 -0
- package/dist/components/input-group/pk-input-group-text.styles.d.ts.map +1 -0
- package/dist/components/input-group/pk-input-group-textarea.d.ts +25 -0
- package/dist/components/input-group/pk-input-group-textarea.d.ts.map +1 -0
- package/dist/components/input-group/pk-input-group-textarea.js +2 -0
- package/dist/components/input-group/pk-input-group-textarea.styles.d.ts +2 -0
- package/dist/components/input-group/pk-input-group-textarea.styles.d.ts.map +1 -0
- package/dist/components/input-group/pk-input-group.d.ts +39 -0
- package/dist/components/input-group/pk-input-group.d.ts.map +1 -0
- package/dist/components/input-group/pk-input-group.js +2 -0
- package/dist/components/input-group/pk-input-group.styles.d.ts +2 -0
- package/dist/components/input-group/pk-input-group.styles.d.ts.map +1 -0
- package/dist/components/input-group.d.ts +2 -0
- package/dist/components/input-group.js +7 -0
- package/dist/components/input.d.ts +2 -0
- package/dist/components/input.js +2 -0
- package/dist/components/lightswitch/index.d.ts +2 -0
- package/dist/components/lightswitch/index.d.ts.map +1 -0
- package/dist/components/lightswitch/pk-lightswitch.d.ts +54 -0
- package/dist/components/lightswitch/pk-lightswitch.d.ts.map +1 -0
- package/dist/components/lightswitch/pk-lightswitch.js +2 -0
- package/dist/components/lightswitch/pk-lightswitch.styles.d.ts +2 -0
- package/dist/components/lightswitch/pk-lightswitch.styles.d.ts.map +1 -0
- package/dist/components/lightswitch.d.ts +2 -0
- package/dist/components/lightswitch.js +2 -0
- package/dist/components/popover/index.d.ts +2 -0
- package/dist/components/popover/index.d.ts.map +1 -0
- package/dist/components/popover/pk-popover.d.ts +90 -0
- package/dist/components/popover/pk-popover.d.ts.map +1 -0
- package/dist/components/popover/pk-popover.js +2 -0
- package/dist/components/popover/pk-popover.styles.d.ts +2 -0
- package/dist/components/popover/pk-popover.styles.d.ts.map +1 -0
- package/dist/components/popover.d.ts +2 -0
- package/dist/components/popover.js +2 -0
- package/dist/components/popup/index.d.ts +2 -0
- package/dist/components/popup/index.d.ts.map +1 -0
- package/dist/components/popup/pk-popup.d.ts +96 -0
- package/dist/components/popup/pk-popup.d.ts.map +1 -0
- package/dist/components/popup/pk-popup.js +2 -0
- package/dist/components/popup/pk-popup.styles.d.ts +2 -0
- package/dist/components/popup/pk-popup.styles.d.ts.map +1 -0
- package/dist/components/popup.d.ts +2 -0
- package/dist/components/popup.js +2 -0
- package/dist/components/radio-group/index.d.ts +3 -0
- package/dist/components/radio-group/index.d.ts.map +1 -0
- package/dist/components/radio-group/pk-radio-group.d.ts +58 -0
- package/dist/components/radio-group/pk-radio-group.d.ts.map +1 -0
- package/dist/components/radio-group/pk-radio-group.js +2 -0
- package/dist/components/radio-group/pk-radio-group.styles.d.ts +2 -0
- package/dist/components/radio-group/pk-radio-group.styles.d.ts.map +1 -0
- package/dist/components/radio-group/pk-radio.d.ts +37 -0
- package/dist/components/radio-group/pk-radio.d.ts.map +1 -0
- package/dist/components/radio-group/pk-radio.js +2 -0
- package/dist/components/radio-group/pk-radio.styles.d.ts +2 -0
- package/dist/components/radio-group/pk-radio.styles.d.ts.map +1 -0
- package/dist/components/radio-group.d.ts +2 -0
- package/dist/components/radio-group.js +3 -0
- package/dist/components/scroll-area/index.d.ts +2 -0
- package/dist/components/scroll-area/index.d.ts.map +1 -0
- package/dist/components/scroll-area/pk-scroll-area.d.ts +53 -0
- package/dist/components/scroll-area/pk-scroll-area.d.ts.map +1 -0
- package/dist/components/scroll-area/pk-scroll-area.js +2 -0
- package/dist/components/scroll-area/pk-scroll-area.styles.d.ts +2 -0
- package/dist/components/scroll-area/pk-scroll-area.styles.d.ts.map +1 -0
- package/dist/components/scroll-area.d.ts +2 -0
- package/dist/components/scroll-area.js +2 -0
- package/dist/components/select/index.d.ts +4 -0
- package/dist/components/select/index.d.ts.map +1 -0
- package/dist/components/select/pk-option-group.d.ts +22 -0
- package/dist/components/select/pk-option-group.d.ts.map +1 -0
- package/dist/components/select/pk-option-group.js +2 -0
- package/dist/components/select/pk-option-group.styles.d.ts +2 -0
- package/dist/components/select/pk-option-group.styles.d.ts.map +1 -0
- package/dist/components/select/pk-option.d.ts +55 -0
- package/dist/components/select/pk-option.d.ts.map +1 -0
- package/dist/components/select/pk-option.js +2 -0
- package/dist/components/select/pk-option.styles.d.ts +2 -0
- package/dist/components/select/pk-option.styles.d.ts.map +1 -0
- package/dist/components/select/pk-select.d.ts +132 -0
- package/dist/components/select/pk-select.d.ts.map +1 -0
- package/dist/components/select/pk-select.js +2 -0
- package/dist/components/select/pk-select.styles.d.ts +2 -0
- package/dist/components/select/pk-select.styles.d.ts.map +1 -0
- package/dist/components/select.d.ts +2 -0
- package/dist/components/select.js +4 -0
- package/dist/components/separator/index.d.ts +2 -0
- package/dist/components/separator/index.d.ts.map +1 -0
- package/dist/components/separator/pk-separator.d.ts +25 -0
- package/dist/components/separator/pk-separator.d.ts.map +1 -0
- package/dist/components/separator/pk-separator.js +2 -0
- package/dist/components/separator/pk-separator.styles.d.ts +9 -0
- package/dist/components/separator/pk-separator.styles.d.ts.map +1 -0
- package/dist/components/separator.d.ts +2 -0
- package/dist/components/separator.js +2 -0
- package/dist/components/spinner/index.d.ts +3 -0
- package/dist/components/spinner/index.d.ts.map +1 -0
- package/dist/components/spinner/pk-spinner.d.ts +23 -0
- package/dist/components/spinner/pk-spinner.d.ts.map +1 -0
- package/dist/components/spinner/pk-spinner.js +2 -0
- package/dist/components/spinner/pk-spinner.styles.d.ts +2 -0
- package/dist/components/spinner/pk-spinner.styles.d.ts.map +1 -0
- package/dist/components/spinner/spinner-utils.d.ts +7 -0
- package/dist/components/spinner/spinner-utils.d.ts.map +1 -0
- package/dist/components/spinner.d.ts +2 -0
- package/dist/components/spinner.js +3 -0
- package/dist/components/status/index.d.ts +2 -0
- package/dist/components/status/index.d.ts.map +1 -0
- package/dist/components/status/pk-status.d.ts +19 -0
- package/dist/components/status/pk-status.d.ts.map +1 -0
- package/dist/components/status/pk-status.js +2 -0
- package/dist/components/status/pk-status.styles.d.ts +2 -0
- package/dist/components/status/pk-status.styles.d.ts.map +1 -0
- package/dist/components/status.d.ts +2 -0
- package/dist/components/status.js +2 -0
- package/dist/components/tabs/index.d.ts +5 -0
- package/dist/components/tabs/index.d.ts.map +1 -0
- package/dist/components/tabs/pk-tab-base.d.ts +14 -0
- package/dist/components/tabs/pk-tab-base.d.ts.map +1 -0
- package/dist/components/tabs/pk-tab-heading.d.ts +20 -0
- package/dist/components/tabs/pk-tab-heading.d.ts.map +1 -0
- package/dist/components/tabs/pk-tab-heading.js +2 -0
- package/dist/components/tabs/pk-tab-heading.styles.d.ts +2 -0
- package/dist/components/tabs/pk-tab-heading.styles.d.ts.map +1 -0
- package/dist/components/tabs/pk-tab-panel-base.d.ts +9 -0
- package/dist/components/tabs/pk-tab-panel-base.d.ts.map +1 -0
- package/dist/components/tabs/pk-tab-panel.d.ts +18 -0
- package/dist/components/tabs/pk-tab-panel.d.ts.map +1 -0
- package/dist/components/tabs/pk-tab-panel.js +2 -0
- package/dist/components/tabs/pk-tab-panel.styles.d.ts +2 -0
- package/dist/components/tabs/pk-tab-panel.styles.d.ts.map +1 -0
- package/dist/components/tabs/pk-tab.d.ts +23 -0
- package/dist/components/tabs/pk-tab.d.ts.map +1 -0
- package/dist/components/tabs/pk-tab.js +2 -0
- package/dist/components/tabs/pk-tab.styles.d.ts +2 -0
- package/dist/components/tabs/pk-tab.styles.d.ts.map +1 -0
- package/dist/components/tabs/pk-tabs.d.ts +67 -0
- package/dist/components/tabs/pk-tabs.d.ts.map +1 -0
- package/dist/components/tabs/pk-tabs.js +2 -0
- package/dist/components/tabs/pk-tabs.styles.d.ts +6 -0
- package/dist/components/tabs/pk-tabs.styles.d.ts.map +1 -0
- package/dist/components/tabs.d.ts +2 -0
- package/dist/components/tabs.js +5 -0
- package/dist/components/textarea/index.d.ts +2 -0
- package/dist/components/textarea/index.d.ts.map +1 -0
- package/dist/components/textarea/pk-textarea.d.ts +60 -0
- package/dist/components/textarea/pk-textarea.d.ts.map +1 -0
- package/dist/components/textarea/pk-textarea.js +2 -0
- package/dist/components/textarea/pk-textarea.styles.d.ts +2 -0
- package/dist/components/textarea/pk-textarea.styles.d.ts.map +1 -0
- package/dist/components/textarea.d.ts +2 -0
- package/dist/components/textarea.js +2 -0
- package/dist/components/time-picker/index.d.ts +2 -0
- package/dist/components/time-picker/index.d.ts.map +1 -0
- package/dist/components/time-picker/pk-time-picker.d.ts +25 -0
- package/dist/components/time-picker/pk-time-picker.d.ts.map +1 -0
- package/dist/components/time-picker/pk-time-picker.js +2 -0
- package/dist/components/time-picker/pk-time-picker.styles.d.ts +2 -0
- package/dist/components/time-picker/pk-time-picker.styles.d.ts.map +1 -0
- package/dist/components/time-picker.d.ts +2 -0
- package/dist/components/time-picker.js +2 -0
- package/dist/components/tiptap/index.d.ts +4 -0
- package/dist/components/tiptap/index.d.ts.map +1 -0
- package/dist/components/tiptap/pk-tiptap-content.d.ts +25 -0
- package/dist/components/tiptap/pk-tiptap-content.d.ts.map +1 -0
- package/dist/components/tiptap/pk-tiptap-content.js +2 -0
- package/dist/components/tiptap/pk-tiptap-content.styles.d.ts +2 -0
- package/dist/components/tiptap/pk-tiptap-content.styles.d.ts.map +1 -0
- package/dist/components/tiptap/pk-tiptap-editor.d.ts +123 -0
- package/dist/components/tiptap/pk-tiptap-editor.d.ts.map +1 -0
- package/dist/components/tiptap/pk-tiptap-editor.js +2 -0
- package/dist/components/tiptap/pk-tiptap-editor.styles.d.ts +2 -0
- package/dist/components/tiptap/pk-tiptap-editor.styles.d.ts.map +1 -0
- package/dist/components/tiptap/pk-tiptap-input.d.ts +54 -0
- package/dist/components/tiptap/pk-tiptap-input.d.ts.map +1 -0
- package/dist/components/tiptap/pk-tiptap-input.js +2 -0
- package/dist/components/tiptap/pk-tiptap-input.styles.d.ts +2 -0
- package/dist/components/tiptap/pk-tiptap-input.styles.d.ts.map +1 -0
- package/dist/components/tiptap/tiptap-editor-host.d.ts +28 -0
- package/dist/components/tiptap/tiptap-editor-host.d.ts.map +1 -0
- package/dist/components/tiptap/tiptap-toolbar.d.ts +7 -0
- package/dist/components/tiptap/tiptap-toolbar.d.ts.map +1 -0
- package/dist/components/tiptap/tiptap-utils.d.ts +13 -0
- package/dist/components/tiptap/tiptap-utils.d.ts.map +1 -0
- package/dist/components/tiptap/tiptap.styles.d.ts +12 -0
- package/dist/components/tiptap/tiptap.styles.d.ts.map +1 -0
- package/dist/components/tiptap/variable-tag-node-view.d.ts +17 -0
- package/dist/components/tiptap/variable-tag-node-view.d.ts.map +1 -0
- package/dist/components/tiptap-content.d.ts +2 -0
- package/dist/components/tiptap-content.js +2 -0
- package/dist/components/tiptap-editor.d.ts +2 -0
- package/dist/components/tiptap-editor.js +2 -0
- package/dist/components/tiptap-input.d.ts +2 -0
- package/dist/components/tiptap-input.js +2 -0
- package/dist/components/toggle/index.d.ts +2 -0
- package/dist/components/toggle/index.d.ts.map +1 -0
- package/dist/components/toggle/pk-toggle.d.ts +28 -0
- package/dist/components/toggle/pk-toggle.d.ts.map +1 -0
- package/dist/components/toggle/pk-toggle.js +2 -0
- package/dist/components/toggle/pk-toggle.styles.d.ts +2 -0
- package/dist/components/toggle/pk-toggle.styles.d.ts.map +1 -0
- package/dist/components/toggle-group/index.d.ts +2 -0
- package/dist/components/toggle-group/index.d.ts.map +1 -0
- package/dist/components/toggle-group/pk-toggle-group.d.ts +43 -0
- package/dist/components/toggle-group/pk-toggle-group.d.ts.map +1 -0
- package/dist/components/toggle-group/pk-toggle-group.js +2 -0
- package/dist/components/toggle-group/pk-toggle-group.styles.d.ts +2 -0
- package/dist/components/toggle-group/pk-toggle-group.styles.d.ts.map +1 -0
- package/dist/components/toggle-group.d.ts +2 -0
- package/dist/components/toggle-group.js +2 -0
- package/dist/components/toggle.d.ts +2 -0
- package/dist/components/toggle.js +2 -0
- package/dist/components/tooltip/index.d.ts +2 -0
- package/dist/components/tooltip/index.d.ts.map +1 -0
- package/dist/components/tooltip/pk-tooltip.d.ts +73 -0
- package/dist/components/tooltip/pk-tooltip.d.ts.map +1 -0
- package/dist/components/tooltip/pk-tooltip.js +2 -0
- package/dist/components/tooltip/pk-tooltip.styles.d.ts +2 -0
- package/dist/components/tooltip/pk-tooltip.styles.d.ts.map +1 -0
- package/dist/components/tooltip.d.ts +2 -0
- package/dist/components/tooltip.js +2 -0
- package/dist/create-register-components.d.ts +7 -0
- package/dist/create-register-components.d.ts.map +1 -0
- package/dist/events/overlay-lifecycle.d.ts +27 -0
- package/dist/events/overlay-lifecycle.d.ts.map +1 -0
- package/dist/events/pk-clear.d.ts +10 -0
- package/dist/events/pk-clear.d.ts.map +1 -0
- package/dist/events/pk-copy.d.ts +18 -0
- package/dist/events/pk-copy.d.ts.map +1 -0
- package/dist/events/pk-create.d.ts +11 -0
- package/dist/events/pk-create.d.ts.map +1 -0
- package/dist/events/pk-invalid.d.ts +10 -0
- package/dist/events/pk-invalid.d.ts.map +1 -0
- package/dist/events/pk-reposition.d.ts +10 -0
- package/dist/events/pk-reposition.d.ts.map +1 -0
- package/dist/icons/checkbox-indicators.d.ts +6 -0
- package/dist/icons/checkbox-indicators.d.ts.map +1 -0
- package/dist/icons/index.d.ts +4 -0
- package/dist/icons/index.d.ts.map +1 -0
- package/dist/icons/index.js +4 -0
- package/dist/icons/render.d.ts +7 -0
- package/dist/icons/render.d.ts.map +1 -0
- package/dist/icons/translation-icon.d.ts +2 -0
- package/dist/icons/translation-icon.d.ts.map +1 -0
- package/dist/index.d.ts +52 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +218 -0
- package/dist/index.js.map +1 -0
- package/dist/internal/control-aria.d.ts +31 -0
- package/dist/internal/control-aria.d.ts.map +1 -0
- package/dist/internal/field-aria.d.ts +19 -0
- package/dist/internal/field-aria.d.ts.map +1 -0
- package/dist/internal/field-labels.d.ts +5 -0
- package/dist/internal/field-labels.d.ts.map +1 -0
- package/dist/internal/has-slot.d.ts +30 -0
- package/dist/internal/has-slot.d.ts.map +1 -0
- package/dist/internal/implicit-form-submit.d.ts +15 -0
- package/dist/internal/implicit-form-submit.d.ts.map +1 -0
- package/dist/internal/resolve-element-by-id.d.ts +3 -0
- package/dist/internal/resolve-element-by-id.d.ts.map +1 -0
- package/dist/internal/sync-listbox-separators.d.ts +3 -0
- package/dist/internal/sync-listbox-separators.d.ts.map +1 -0
- package/dist/plugin-kit.css +583 -0
- package/dist/plugin-kit.d.ts +9 -0
- package/dist/plugin-kit.d.ts.map +1 -0
- package/dist/plugin-kit.js +267 -0
- package/dist/plugin-kit.js.map +1 -0
- package/dist/plugin-kit.loader.d.ts +2 -0
- package/dist/plugin-kit.loader.d.ts.map +1 -0
- package/dist/register-components.d.ts +3 -0
- package/dist/register-components.d.ts.map +1 -0
- package/dist/register-components.js +2 -0
- package/dist/register-pk.generated.d.ts +103 -0
- package/dist/register-pk.generated.d.ts.map +1 -0
- package/dist/register.d.ts +85 -0
- package/dist/register.d.ts.map +1 -0
- package/dist/register.js +146 -0
- package/dist/register.js.map +1 -0
- package/dist/styles/overlay-content.css +64 -0
- package/dist/styles/popup-content-animation.styles.d.ts +9 -0
- package/dist/styles/popup-content-animation.styles.d.ts.map +1 -0
- package/dist/tokens.css +408 -0
- package/dist/utilities/autoloader.d.ts +8 -0
- package/dist/utilities/autoloader.d.ts.map +1 -0
- package/dist/utilities/base-path.d.ts +3 -0
- package/dist/utilities/base-path.d.ts.map +1 -0
- package/dist/utilities/defined.d.ts +17 -0
- package/dist/utilities/defined.d.ts.map +1 -0
- package/dist/utilities/fouce-strategy.d.ts +43 -0
- package/dist/utilities/fouce-strategy.d.ts.map +1 -0
- package/dist/utilities/fouce.css +108 -0
- package/dist/utils/animate-with-class.d.ts +7 -0
- package/dist/utils/animate-with-class.d.ts.map +1 -0
- package/dist/utils/config.d.ts +15 -0
- package/dist/utils/config.d.ts.map +1 -0
- package/dist/utils/copy-to-clipboard.d.ts +5 -0
- package/dist/utils/copy-to-clipboard.d.ts.map +1 -0
- package/dist/utils/craft-host-modal.d.ts +19 -0
- package/dist/utils/craft-host-modal.d.ts.map +1 -0
- package/dist/utils/date-matchers.d.ts +29 -0
- package/dist/utils/date-matchers.d.ts.map +1 -0
- package/dist/utils/date.d.ts +23 -0
- package/dist/utils/date.d.ts.map +1 -0
- package/dist/utils/documentScrollStability.d.ts +11 -0
- package/dist/utils/documentScrollStability.d.ts.map +1 -0
- package/dist/utils/floating-ui.d.ts +14 -0
- package/dist/utils/floating-ui.d.ts.map +1 -0
- package/dist/utils/highlight-text.d.ts +7 -0
- package/dist/utils/highlight-text.d.ts.map +1 -0
- package/dist/utils/host-date.d.ts +8 -0
- package/dist/utils/host-date.d.ts.map +1 -0
- package/dist/utils/inline-markdown.d.ts +6 -0
- package/dist/utils/inline-markdown.d.ts.map +1 -0
- package/dist/utils/listbox-keyboard.d.ts +25 -0
- package/dist/utils/listbox-keyboard.d.ts.map +1 -0
- package/dist/utils/menu-keyboard.d.ts +15 -0
- package/dist/utils/menu-keyboard.d.ts.map +1 -0
- package/dist/utils/mount-shadow-app.d.ts +31 -0
- package/dist/utils/mount-shadow-app.d.ts.map +1 -0
- package/dist/utils/overlay-recovery.d.ts +39 -0
- package/dist/utils/overlay-recovery.d.ts.map +1 -0
- package/dist/utils/popup-placement-animation.d.ts +26 -0
- package/dist/utils/popup-placement-animation.d.ts.map +1 -0
- package/dist/utils/popup-pointer.d.ts +15 -0
- package/dist/utils/popup-pointer.d.ts.map +1 -0
- package/dist/utils/portal.d.ts +16 -0
- package/dist/utils/portal.d.ts.map +1 -0
- package/dist/utils/supports-popover.d.ts +3 -0
- package/dist/utils/supports-popover.d.ts.map +1 -0
- package/dist/utils/time-options.d.ts +16 -0
- package/dist/utils/time-options.d.ts.map +1 -0
- package/dist/utils/top-layer.d.ts +34 -0
- package/dist/utils/top-layer.d.ts.map +1 -0
- package/dist/utils/week-info.d.ts +14 -0
- package/dist/utils/week-info.d.ts.map +1 -0
- package/dist/validators/custom-error-validator.d.ts +3 -0
- package/dist/validators/custom-error-validator.d.ts.map +1 -0
- package/dist/validators/index.d.ts +6 -0
- package/dist/validators/index.d.ts.map +1 -0
- package/dist/validators/mirror-validator.d.ts +4 -0
- package/dist/validators/mirror-validator.d.ts.map +1 -0
- package/dist/validators/required-validator.d.ts +7 -0
- package/dist/validators/required-validator.d.ts.map +1 -0
- package/dist/validators/types.d.ts +12 -0
- package/dist/validators/types.d.ts.map +1 -0
- package/dist-loader/chunks/animate-with-class-DT0jwaR_.js +40 -0
- package/dist-loader/chunks/button-group-item.styles-Dwakbyx5.js +145 -0
- package/dist-loader/chunks/codemirror-CSgOT0QM.js +23675 -0
- package/dist-loader/chunks/field-labels-D3lKQ2nq.js +12 -0
- package/dist-loader/chunks/floating-ui-87vslRWW.js +1220 -0
- package/dist-loader/chunks/has-slot-BGJeJdHr.js +72 -0
- package/dist-loader/chunks/icons-B1i-oRoD.js +429 -0
- package/dist-loader/chunks/lit-Dnn7gEi2.js +891 -0
- package/dist-loader/chunks/mirror-validator-C5XrXPaq.js +30 -0
- package/dist-loader/chunks/overlay-lifecycle-C3tSQ3UR.js +42 -0
- package/dist-loader/chunks/pk-a11y-Cx5RZvhu.js +274 -0
- package/dist-loader/chunks/pk-base-BlxAYXJD.js +705 -0
- package/dist-loader/chunks/pk-button-BlSs4e6V.js +846 -0
- package/dist-loader/chunks/pk-calendar-RXCDDhLI.js +1403 -0
- package/dist-loader/chunks/pk-checkbox-hJCj8In8.js +273 -0
- package/dist-loader/chunks/pk-clear-BMZUzwDt.js +13 -0
- package/dist-loader/chunks/pk-color-input-BfNtLznP.js +393 -0
- package/dist-loader/chunks/pk-combobox-1PJBcIrV.js +2006 -0
- package/dist-loader/chunks/pk-date-picker-D4vCtbw-.js +708 -0
- package/dist-loader/chunks/pk-dialog-D1RZjwQN.js +630 -0
- package/dist-loader/chunks/pk-dropdown-item-BJIhQ0Mw.js +543 -0
- package/dist-loader/chunks/pk-dropdown-menu-I1s3TBiA.js +731 -0
- package/dist-loader/chunks/pk-field-BnKPT_Kk.js +5842 -0
- package/dist-loader/chunks/pk-input-Oarjv7Vc.js +715 -0
- package/dist-loader/chunks/pk-lightswitch-D-UrNM3y.js +427 -0
- package/dist-loader/chunks/pk-option-CCZebfif.js +308 -0
- package/dist-loader/chunks/pk-popup-BNRyCsVX.js +553 -0
- package/dist-loader/chunks/pk-select-BcbtjIoP.js +1120 -0
- package/dist-loader/chunks/pk-spinner-Di9O69-m.js +145 -0
- package/dist-loader/chunks/pk-textarea-CC6WXpIu.js +334 -0
- package/dist-loader/chunks/pk-time-picker-BtGXo-KJ.js +225 -0
- package/dist-loader/chunks/pk-tooltip-JJRxVXYD.js +465 -0
- package/dist-loader/chunks/popup-content-animation.styles-S6CK-zPp.js +115 -0
- package/dist-loader/chunks/popup-placement-animation-WlEXnS85.js +58 -0
- package/dist-loader/chunks/popup-pointer-BC4n_sNb.js +19 -0
- package/dist-loader/chunks/registry-CmL0rH9r.js +55 -0
- package/dist-loader/chunks/render-DApFfV9S.js +14 -0
- package/dist-loader/chunks/required-validator-0XwZtX9k.js +27 -0
- package/dist-loader/chunks/rolldown-runtime-CzwdidQP.js +13 -0
- package/dist-loader/chunks/supports-popover-COjbi2RP.js +5 -0
- package/dist-loader/chunks/svg-Boar0Kf1.js +34 -0
- package/dist-loader/chunks/sync-listbox-separators-Bcja51HC.js +147 -0
- package/dist-loader/chunks/tiptap-Db7MTUH1.js +22888 -0
- package/dist-loader/chunks/tiptap.styles-DAH_90Fi.js +1628 -0
- package/dist-loader/components/button/button.js +2 -0
- package/dist-loader/components/button-group/button-group-separator.js +58 -0
- package/dist-loader/components/button-group/button-group-text.js +46 -0
- package/dist-loader/components/button-group/button-group.js +419 -0
- package/dist-loader/components/calendar/calendar.js +2 -0
- package/dist-loader/components/checkbox/checkbox.js +2 -0
- package/dist-loader/components/checkbox-select/checkbox-select.js +217 -0
- package/dist-loader/components/code-editor/code-editor.js +376 -0
- package/dist-loader/components/color-input/color-input.js +2 -0
- package/dist-loader/components/combobox/combobox.js +2 -0
- package/dist-loader/components/copy-button/copy-button.js +135 -0
- package/dist-loader/components/date-picker/date-picker.js +2 -0
- package/dist-loader/components/dialog/dialog.js +2 -0
- package/dist-loader/components/dropdown-menu/dropdown-item.js +2 -0
- package/dist-loader/components/dropdown-menu/dropdown-label.js +45 -0
- package/dist-loader/components/dropdown-menu/dropdown-menu.js +2 -0
- package/dist-loader/components/dropdown-menu/dropdown-separator.js +33 -0
- package/dist-loader/components/editable-table/editable-table.js +1522 -0
- package/dist-loader/components/field/field.js +2 -0
- package/dist-loader/components/icon/icon.js +17 -0
- package/dist-loader/components/input/input.js +2 -0
- package/dist-loader/components/input-group/input-group-addon.js +98 -0
- package/dist-loader/components/input-group/input-group-button.js +52 -0
- package/dist-loader/components/input-group/input-group-input.js +132 -0
- package/dist-loader/components/input-group/input-group-text.js +37 -0
- package/dist-loader/components/input-group/input-group-textarea.js +110 -0
- package/dist-loader/components/input-group/input-group.js +234 -0
- package/dist-loader/components/lightswitch/lightswitch.js +2 -0
- package/dist-loader/components/popover/popover.js +372 -0
- package/dist-loader/components/popup/popup.js +2 -0
- package/dist-loader/components/radio-group/radio-group.js +247 -0
- package/dist-loader/components/radio-group/radio.js +229 -0
- package/dist-loader/components/scroll-area/scroll-area.js +398 -0
- package/dist-loader/components/select/option-group.js +69 -0
- package/dist-loader/components/select/option.js +2 -0
- package/dist-loader/components/select/select.js +2 -0
- package/dist-loader/components/separator/separator.js +86 -0
- package/dist-loader/components/spinner/spinner.js +2 -0
- package/dist-loader/components/status/status.js +89 -0
- package/dist-loader/components/tabs/tab-heading.js +47 -0
- package/dist-loader/components/tabs/tab-panel.js +83 -0
- package/dist-loader/components/tabs/tab.js +256 -0
- package/dist-loader/components/tabs/tabs.js +619 -0
- package/dist-loader/components/textarea/textarea.js +2 -0
- package/dist-loader/components/time-picker/time-picker.js +2 -0
- package/dist-loader/components/tiptap/tiptap-content.js +72 -0
- package/dist-loader/components/tiptap/tiptap-editor.js +1078 -0
- package/dist-loader/components/tiptap/tiptap-input.js +244 -0
- package/dist-loader/components/toggle/toggle.js +253 -0
- package/dist-loader/components/toggle-group/toggle-group.js +172 -0
- package/dist-loader/components/tooltip/tooltip.js +2 -0
- package/dist-loader/plugin-kit.css +583 -0
- package/dist-loader/plugin-kit.d.ts +9 -0
- package/dist-loader/plugin-kit.d.ts.map +1 -0
- package/dist-loader/plugin-kit.loader.d.ts +2 -0
- package/dist-loader/plugin-kit.loader.d.ts.map +1 -0
- package/dist-loader/plugin-kit.loader.js +527 -0
- package/dist-loader/styles/overlay-content.css +64 -0
- package/dist-loader/tokens.css +408 -0
- package/dist-loader/utilities/autoloader.d.ts +8 -0
- package/dist-loader/utilities/autoloader.d.ts.map +1 -0
- package/dist-loader/utilities/base-path.d.ts +3 -0
- package/dist-loader/utilities/base-path.d.ts.map +1 -0
- package/dist-loader/utilities/defined.d.ts +17 -0
- package/dist-loader/utilities/defined.d.ts.map +1 -0
- package/dist-loader/utilities/fouce-strategy.d.ts +43 -0
- package/dist-loader/utilities/fouce-strategy.d.ts.map +1 -0
- package/dist-loader/utilities/fouce.css +108 -0
- package/package.json +961 -0
|
@@ -0,0 +1,1078 @@
|
|
|
1
|
+
import { n as uniqueId } from "../../chunks/pk-a11y-Cx5RZvhu.js";
|
|
2
|
+
import { a as o, c as r, f as A, l as n, m as i, p as b, s as e, u as t } from "../../chunks/lit-Dnn7gEi2.js";
|
|
3
|
+
import { c as __decorate, i as PkFormAssociatedElement, n as formControlStyles } from "../../chunks/pk-base-BlxAYXJD.js";
|
|
4
|
+
import { B as strikethrough, C as h2, D as h6, E as h5, F as listUl, G as triangleExclamation, H as superscript, I as minus, K as underline, L as paragraph, N as link, O as heading, P as listOl, S as h1, T as h4, U as table, V as subscript, W as textSlash, b as fileDashedLine, d as bracketsCurly, i as alignRight, j as italic, k as highlighter, m as chevronDown, n as alignJustify, o as arrowRotateLeft, r as alignLeft, s as arrowRotateRight, t as alignCenter, u as bold, v as code, w as h3, z as quoteRight } from "../../chunks/icons-B1i-oRoD.js";
|
|
5
|
+
import { t as MirrorValidator } from "../../chunks/mirror-validator-C5XrXPaq.js";
|
|
6
|
+
import { M as posToDOMRect, j as getMarkRange, k as Editor } from "../../chunks/tiptap-Db7MTUH1.js";
|
|
7
|
+
import { A as createTiptapExtensions, D as getFatalTiptapContentError, O as normalizeContentArray, S as openCraftElementLinkSelector, _ as getLinkOpenInNewTab, a as getToolbarGroupDefaultIcon, b as getCraftLinkOptions, c as isFormattingToolbarPreset, d as parseToolbarConfig, f as runToolbarButton, g as getLinkEditState, h as applyLinkToEditor, i as createVariableTagDomNodeView, k as valueToContent, l as isHeadingsOnlyToolbarPreset, m as isTiptapButtonActive, o as getToolbarGroupMenuItems, p as toolbarIncludesButton, r as tiptapProseMirrorStyles, s as getToolbarGroupTriggerState, u as isToolbarButtonActive, v as getSelectedText, x as getLinkOptionsElementSiteId, y as unsetLinkFromEditor } from "../../chunks/tiptap.styles-DAH_90Fi.js";
|
|
8
|
+
import { n as renderIconHtml } from "../../chunks/render-DApFfV9S.js";
|
|
9
|
+
import "../dropdown-menu/dropdown-separator.js";
|
|
10
|
+
//#region src/components/tiptap/tiptap-editor-host.ts
|
|
11
|
+
function serializeTiptapDocumentContent(content) {
|
|
12
|
+
return JSON.stringify(normalizeContentArray(content));
|
|
13
|
+
}
|
|
14
|
+
/** Normalize React/HTML `value` into the JSON string the editor stores and emits. */
|
|
15
|
+
function serializeTiptapDocumentValue(raw) {
|
|
16
|
+
if (raw == null) return "[]";
|
|
17
|
+
if (typeof raw === "string") return raw;
|
|
18
|
+
if (Array.isArray(raw)) return JSON.stringify(raw);
|
|
19
|
+
return "[]";
|
|
20
|
+
}
|
|
21
|
+
function parseTiptapDocumentValue(raw) {
|
|
22
|
+
if (raw == null || raw === "") return [];
|
|
23
|
+
if (Array.isArray(raw)) return raw;
|
|
24
|
+
if (typeof raw !== "string") return [];
|
|
25
|
+
try {
|
|
26
|
+
const parsed = JSON.parse(raw);
|
|
27
|
+
return Array.isArray(parsed) ? parsed : [];
|
|
28
|
+
} catch {
|
|
29
|
+
return [];
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
var TiptapEditorHost = class {
|
|
33
|
+
constructor() {
|
|
34
|
+
this.editor = null;
|
|
35
|
+
this.lastEmitted = null;
|
|
36
|
+
this.suppressUpdateEmission = false;
|
|
37
|
+
}
|
|
38
|
+
mount({ element, extensions, content, editable, trailingCursorText = "", minHeight, onUpdate }) {
|
|
39
|
+
const doc = valueToContent(content, { trailingCursorText });
|
|
40
|
+
this.editor = new Editor({
|
|
41
|
+
element,
|
|
42
|
+
extensions: extensions ?? createTiptapExtensions({ trailingCursorText }),
|
|
43
|
+
content: doc,
|
|
44
|
+
editable,
|
|
45
|
+
onUpdate: ({ editor }) => {
|
|
46
|
+
const normalized = normalizeContentArray(editor.getJSON().content);
|
|
47
|
+
const serialized = JSON.stringify(normalized);
|
|
48
|
+
this.lastEmitted = serialized;
|
|
49
|
+
if (this.suppressUpdateEmission) return;
|
|
50
|
+
onUpdate?.(normalized);
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
if (minHeight) this.editor.view.dom.style.minHeight = minHeight;
|
|
54
|
+
}
|
|
55
|
+
setContent(content, options = {}) {
|
|
56
|
+
if (!this.editor) return;
|
|
57
|
+
const { trailingCursorText = "", respectFocus = true } = options;
|
|
58
|
+
if (respectFocus && this.editor.isFocused) return;
|
|
59
|
+
const doc = valueToContent(content, { trailingCursorText });
|
|
60
|
+
const incoming = JSON.stringify(doc?.content ?? []);
|
|
61
|
+
if (incoming === JSON.stringify(this.editor.getJSON().content ?? []) || incoming === this.lastEmitted) return;
|
|
62
|
+
this.suppressUpdateEmission = true;
|
|
63
|
+
try {
|
|
64
|
+
this.editor.commands.setContent(doc ?? {
|
|
65
|
+
type: "doc",
|
|
66
|
+
content: []
|
|
67
|
+
});
|
|
68
|
+
} finally {
|
|
69
|
+
this.suppressUpdateEmission = false;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
destroy() {
|
|
73
|
+
this.editor?.destroy();
|
|
74
|
+
this.editor = null;
|
|
75
|
+
this.lastEmitted = null;
|
|
76
|
+
this.suppressUpdateEmission = false;
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
//#endregion
|
|
80
|
+
//#region src/components/tiptap/tiptap-utils.ts
|
|
81
|
+
function createCraftElementSelectorHost() {
|
|
82
|
+
return { openElementSelector: (elementType, options) => {
|
|
83
|
+
const open = window.Craft?.createElementSelectorModal;
|
|
84
|
+
if (!open) throw new Error("Craft element selector is not available in this environment.");
|
|
85
|
+
open(elementType, options);
|
|
86
|
+
} };
|
|
87
|
+
}
|
|
88
|
+
function parseLinkOptionsAttribute(raw) {
|
|
89
|
+
if (!raw) return;
|
|
90
|
+
try {
|
|
91
|
+
return JSON.parse(raw);
|
|
92
|
+
} catch {
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
function parseToolbarAttribute(toolbarRaw, buttonsRaw) {
|
|
97
|
+
if (Array.isArray(toolbarRaw)) return parseToolbarConfig(toolbarRaw);
|
|
98
|
+
if (typeof toolbarRaw === "string" && toolbarRaw.trim()) return parseToolbarConfig(toolbarRaw);
|
|
99
|
+
if (Array.isArray(buttonsRaw)) return parseToolbarConfig(buttonsRaw.join(","));
|
|
100
|
+
return parseToolbarConfig(buttonsRaw ?? "bold,italic");
|
|
101
|
+
}
|
|
102
|
+
//#endregion
|
|
103
|
+
//#region src/components/tiptap/tiptap-toolbar.ts
|
|
104
|
+
var TOOLBAR_CHEVRON_HTML = renderIconHtml(chevronDown);
|
|
105
|
+
var TOOLBAR_ICONS = {
|
|
106
|
+
bold: renderIconHtml(bold),
|
|
107
|
+
italic: renderIconHtml(italic),
|
|
108
|
+
underline: renderIconHtml(underline),
|
|
109
|
+
strikethrough: renderIconHtml(strikethrough),
|
|
110
|
+
subscript: renderIconHtml(subscript),
|
|
111
|
+
superscript: renderIconHtml(superscript),
|
|
112
|
+
code: renderIconHtml(bracketsCurly),
|
|
113
|
+
"code-block": renderIconHtml(code),
|
|
114
|
+
highlight: renderIconHtml(highlighter),
|
|
115
|
+
h1: renderIconHtml(h1),
|
|
116
|
+
h2: renderIconHtml(h2),
|
|
117
|
+
h3: renderIconHtml(h3),
|
|
118
|
+
h4: renderIconHtml(h4),
|
|
119
|
+
h5: renderIconHtml(h5),
|
|
120
|
+
h6: renderIconHtml(h6),
|
|
121
|
+
heading: renderIconHtml(heading),
|
|
122
|
+
paragraph: renderIconHtml(paragraph),
|
|
123
|
+
"unordered-list": renderIconHtml(listUl),
|
|
124
|
+
"ordered-list": renderIconHtml(listOl),
|
|
125
|
+
blockquote: renderIconHtml(quoteRight),
|
|
126
|
+
"align-left": renderIconHtml(alignLeft),
|
|
127
|
+
"align-center": renderIconHtml(alignCenter),
|
|
128
|
+
"align-right": renderIconHtml(alignRight),
|
|
129
|
+
"align-justify": renderIconHtml(alignJustify),
|
|
130
|
+
"clear-format": renderIconHtml(textSlash),
|
|
131
|
+
hr: renderIconHtml(minus),
|
|
132
|
+
"line-break": renderIconHtml(fileDashedLine),
|
|
133
|
+
link: renderIconHtml(link),
|
|
134
|
+
table: renderIconHtml(table),
|
|
135
|
+
undo: renderIconHtml(arrowRotateLeft),
|
|
136
|
+
redo: renderIconHtml(arrowRotateRight)
|
|
137
|
+
};
|
|
138
|
+
var TOOLBAR_LABELS = {
|
|
139
|
+
bold: "Bold",
|
|
140
|
+
italic: "Italic",
|
|
141
|
+
underline: "Underline",
|
|
142
|
+
strikethrough: "Strikethrough",
|
|
143
|
+
subscript: "Subscript",
|
|
144
|
+
superscript: "Superscript",
|
|
145
|
+
code: "Inline code",
|
|
146
|
+
"code-block": "Code block",
|
|
147
|
+
highlight: "Highlight",
|
|
148
|
+
h1: "Heading 1",
|
|
149
|
+
h2: "Heading 2",
|
|
150
|
+
h3: "Heading 3",
|
|
151
|
+
h4: "Heading 4",
|
|
152
|
+
h5: "Heading 5",
|
|
153
|
+
h6: "Heading 6",
|
|
154
|
+
paragraph: "Paragraph",
|
|
155
|
+
"unordered-list": "Bullet list",
|
|
156
|
+
"ordered-list": "Numbered list",
|
|
157
|
+
blockquote: "Blockquote",
|
|
158
|
+
"align-left": "Align left",
|
|
159
|
+
"align-center": "Align center",
|
|
160
|
+
"align-right": "Align right",
|
|
161
|
+
"align-justify": "Justify",
|
|
162
|
+
"clear-format": "Clear format",
|
|
163
|
+
hr: "Horizontal rule",
|
|
164
|
+
"line-break": "Line break",
|
|
165
|
+
link: "Link",
|
|
166
|
+
table: "Table",
|
|
167
|
+
undo: "Undo",
|
|
168
|
+
redo: "Redo"
|
|
169
|
+
};
|
|
170
|
+
function getToolbarMenuItemLabel(buttonName) {
|
|
171
|
+
return TOOLBAR_LABELS[buttonName] ?? buttonName;
|
|
172
|
+
}
|
|
173
|
+
/** Prefix icon for `pk-dropdown-item` — SVG must carry `slot="prefix"` directly. */
|
|
174
|
+
function createToolbarPrefixIcon(buttonName) {
|
|
175
|
+
const iconHtml = TOOLBAR_ICONS[buttonName];
|
|
176
|
+
if (!iconHtml) return null;
|
|
177
|
+
const template = document.createElement("template");
|
|
178
|
+
template.innerHTML = iconHtml.trim();
|
|
179
|
+
const icon = template.content.firstElementChild;
|
|
180
|
+
if (!(icon instanceof SVGSVGElement)) return null;
|
|
181
|
+
icon.setAttribute("slot", "prefix");
|
|
182
|
+
icon.setAttribute("aria-hidden", "true");
|
|
183
|
+
icon.setAttribute("width", "12");
|
|
184
|
+
icon.setAttribute("height", "12");
|
|
185
|
+
icon.classList.add("pk-dropdown-item__prefix-icon");
|
|
186
|
+
return icon;
|
|
187
|
+
}
|
|
188
|
+
//#endregion
|
|
189
|
+
//#region src/components/tiptap/pk-tiptap-editor.styles.ts
|
|
190
|
+
var pkTiptapEditorStyles = i`
|
|
191
|
+
@layer pk-component {
|
|
192
|
+
:host {
|
|
193
|
+
display: block;
|
|
194
|
+
width: 100%;
|
|
195
|
+
font-family: var(--pk-font-family);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.shell {
|
|
199
|
+
overflow: hidden;
|
|
200
|
+
border: var(--pk-input-border);
|
|
201
|
+
border-radius: var(--pk-radius-md);
|
|
202
|
+
background: #fff;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
:host([invalid]) .shell,
|
|
206
|
+
:host(:state(user-invalid)) .shell {
|
|
207
|
+
border-color: var(--pk-color-rose-600);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.toolbar {
|
|
211
|
+
display: flex;
|
|
212
|
+
flex-wrap: wrap;
|
|
213
|
+
gap: 0.25rem;
|
|
214
|
+
padding: 0.25rem 0.5rem;
|
|
215
|
+
border-bottom: 1px solid rgba(96, 125, 159, 0.4);
|
|
216
|
+
background: #fff;
|
|
217
|
+
box-shadow: 0 2px 3px rgba(49, 49, 93, 0.07);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.toolbar-item {
|
|
221
|
+
display: inline-flex;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.toolbar-item pk-tooltip {
|
|
225
|
+
display: contents;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.toolbar-btn {
|
|
229
|
+
display: inline-flex;
|
|
230
|
+
align-items: center;
|
|
231
|
+
justify-content: center;
|
|
232
|
+
width: 2rem;
|
|
233
|
+
height: 2rem;
|
|
234
|
+
margin: 0;
|
|
235
|
+
padding: 0;
|
|
236
|
+
border: 0;
|
|
237
|
+
border-radius: var(--pk-radius-md);
|
|
238
|
+
background: transparent;
|
|
239
|
+
color: #1c2e36;
|
|
240
|
+
cursor: pointer;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.toolbar-btn:hover:not(:disabled) {
|
|
244
|
+
background: rgb(241, 245, 249);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.toolbar-btn[data-state='active'] {
|
|
248
|
+
background: rgb(226, 232, 240);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.toolbar-btn:disabled {
|
|
252
|
+
cursor: not-allowed;
|
|
253
|
+
opacity: 0.5;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.toolbar-btn svg {
|
|
257
|
+
display: block;
|
|
258
|
+
width: 1rem;
|
|
259
|
+
height: 1rem;
|
|
260
|
+
pointer-events: none;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.toolbar-btn--menu {
|
|
264
|
+
width: auto;
|
|
265
|
+
min-width: 2rem;
|
|
266
|
+
gap: 0.125rem;
|
|
267
|
+
padding: 0 0.375rem;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.toolbar-btn__trigger-label {
|
|
271
|
+
font-size: 0.625rem;
|
|
272
|
+
font-weight: 700;
|
|
273
|
+
line-height: 1;
|
|
274
|
+
letter-spacing: 0.02em;
|
|
275
|
+
text-transform: uppercase;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
.toolbar-btn__chevron {
|
|
279
|
+
display: inline-flex;
|
|
280
|
+
flex-shrink: 0;
|
|
281
|
+
opacity: 0.7;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.toolbar-btn__chevron svg {
|
|
285
|
+
width: 0.5rem;
|
|
286
|
+
height: 0.5rem;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.toolbar-separator {
|
|
290
|
+
align-self: center;
|
|
291
|
+
flex-shrink: 0;
|
|
292
|
+
width: 1px;
|
|
293
|
+
height: 1.25rem;
|
|
294
|
+
margin: 0 0.125rem;
|
|
295
|
+
background: rgba(96, 125, 159, 0.35);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.toolbar-btn__label {
|
|
299
|
+
font-size: 0.625rem;
|
|
300
|
+
font-weight: 600;
|
|
301
|
+
line-height: 1;
|
|
302
|
+
text-transform: uppercase;
|
|
303
|
+
letter-spacing: 0.02em;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
/* Full toolbar replace (slot=toolbar on host when hasCustomToolbar). */
|
|
307
|
+
.toolbar ::slotted([slot='toolbar']) {
|
|
308
|
+
display: contents;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
/* Append lane inside the stock toolbar — one flex item per slotted root (same gap). */
|
|
312
|
+
.toolbar ::slotted([slot='toolbar-end']) {
|
|
313
|
+
display: inline-flex;
|
|
314
|
+
align-items: center;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
.editor-mount {
|
|
318
|
+
position: relative;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
.content-error {
|
|
322
|
+
display: flex;
|
|
323
|
+
gap: 0.5rem;
|
|
324
|
+
padding: 0.5rem 1rem;
|
|
325
|
+
border-bottom: 1px solid var(--pk-color-rose-200);
|
|
326
|
+
background: var(--pk-color-rose-50);
|
|
327
|
+
color: var(--pk-color-rose-800);
|
|
328
|
+
font-size: var(--pk-font-size-sm);
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
.mirror-input {
|
|
332
|
+
display: none;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
/* No trigger slot — collapse the host so it does not reserve shell space.
|
|
336
|
+
Toolbar refresh while open is still gated by linkDialogBusy / open. */
|
|
337
|
+
.link-dialog {
|
|
338
|
+
display: contents;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
.link-dialog__fields {
|
|
342
|
+
display: flex;
|
|
343
|
+
flex-direction: column;
|
|
344
|
+
gap: 1rem;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
.link-bubble {
|
|
348
|
+
position: absolute;
|
|
349
|
+
z-index: 250;
|
|
350
|
+
display: flex;
|
|
351
|
+
align-items: center;
|
|
352
|
+
gap: 0;
|
|
353
|
+
width: max-content;
|
|
354
|
+
max-width: calc(100% - 1rem);
|
|
355
|
+
padding: 0;
|
|
356
|
+
border: 0;
|
|
357
|
+
border-radius: var(--pk-radius-md);
|
|
358
|
+
background: #1c2e36;
|
|
359
|
+
color: #fff;
|
|
360
|
+
font-size: 12px;
|
|
361
|
+
line-height: 1.5;
|
|
362
|
+
overflow: visible;
|
|
363
|
+
pointer-events: auto;
|
|
364
|
+
white-space: nowrap;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
.link-bubble__arrow {
|
|
368
|
+
position: absolute;
|
|
369
|
+
left: 50%;
|
|
370
|
+
bottom: -0.25rem;
|
|
371
|
+
width: 0.5rem;
|
|
372
|
+
height: 0.5rem;
|
|
373
|
+
background: #1c2e36;
|
|
374
|
+
transform: translateX(-50%) rotate(45deg);
|
|
375
|
+
pointer-events: none;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
.link-bubble__url,
|
|
379
|
+
.link-bubble__action {
|
|
380
|
+
box-sizing: border-box;
|
|
381
|
+
padding: 6px 8px;
|
|
382
|
+
font-size: 12px;
|
|
383
|
+
line-height: 1.5;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
.link-bubble__url {
|
|
387
|
+
display: inline-flex;
|
|
388
|
+
align-items: center;
|
|
389
|
+
max-width: 200px;
|
|
390
|
+
overflow: hidden;
|
|
391
|
+
text-overflow: ellipsis;
|
|
392
|
+
white-space: nowrap;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
.link-bubble__divider {
|
|
396
|
+
flex-shrink: 0;
|
|
397
|
+
align-self: center;
|
|
398
|
+
width: 1px;
|
|
399
|
+
height: 12px;
|
|
400
|
+
background: #616d73;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
.link-bubble__action {
|
|
404
|
+
display: inline-flex;
|
|
405
|
+
align-items: center;
|
|
406
|
+
justify-content: center;
|
|
407
|
+
margin: 0;
|
|
408
|
+
border: 0;
|
|
409
|
+
border-radius: var(--pk-radius-sm);
|
|
410
|
+
background: transparent;
|
|
411
|
+
color: #fff;
|
|
412
|
+
font-family: inherit;
|
|
413
|
+
font-weight: inherit;
|
|
414
|
+
white-space: nowrap;
|
|
415
|
+
cursor: pointer;
|
|
416
|
+
outline: none;
|
|
417
|
+
appearance: none;
|
|
418
|
+
-webkit-appearance: none;
|
|
419
|
+
min-height: 0;
|
|
420
|
+
transition: color 0.15s ease;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
.link-bubble__action:hover {
|
|
424
|
+
color: rgb(255 255 255 / 0.7);
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
`;
|
|
428
|
+
//#endregion
|
|
429
|
+
//#region src/components/tiptap/pk-tiptap-editor.ts
|
|
430
|
+
var PkTiptapEditor = class PkTiptapEditor extends PkFormAssociatedElement {
|
|
431
|
+
constructor(..._args) {
|
|
432
|
+
super(..._args);
|
|
433
|
+
this.assumeInteractionOn = ["blur", "input"];
|
|
434
|
+
this.linkUrlInputId = uniqueId("pk-tiptap-link-url");
|
|
435
|
+
this.linkTextInputId = uniqueId("pk-tiptap-link-text");
|
|
436
|
+
this.host = new TiptapEditorHost();
|
|
437
|
+
this._value = null;
|
|
438
|
+
this.buttons = "bold,italic";
|
|
439
|
+
this.toolbar = null;
|
|
440
|
+
this.linkOptions = null;
|
|
441
|
+
this.rows = 4;
|
|
442
|
+
this.placeholder = "";
|
|
443
|
+
this.readonly = false;
|
|
444
|
+
this.invalid = false;
|
|
445
|
+
this.variableTagConfigure = null;
|
|
446
|
+
this.invalidContentMessage = "";
|
|
447
|
+
this.toolbarTooltips = true;
|
|
448
|
+
this.linkDialogBusy = false;
|
|
449
|
+
this.linkDialogSeed = {};
|
|
450
|
+
this.linkDialogTitle = "Insert Link";
|
|
451
|
+
this.linkDialogSubmitLabel = "Insert";
|
|
452
|
+
this.linkDialogMounted = false;
|
|
453
|
+
this.linkBubbleVisible = false;
|
|
454
|
+
this.linkBubbleHref = "";
|
|
455
|
+
this.linkBubbleTop = 0;
|
|
456
|
+
this.linkBubbleLeft = 0;
|
|
457
|
+
this.hasCustomToolbar = false;
|
|
458
|
+
this.linkButtonId = uniqueId("pk-tiptap-link-btn");
|
|
459
|
+
this.toolbarButtonIds = /* @__PURE__ */ new Map();
|
|
460
|
+
this.toolbarGroupIds = /* @__PURE__ */ new Map();
|
|
461
|
+
this.selectionListenerAttached = false;
|
|
462
|
+
this.defaultValue = "[]";
|
|
463
|
+
this.handleLinkBubbleEdit = (event) => {
|
|
464
|
+
event.preventDefault();
|
|
465
|
+
const editor = this.host.editor;
|
|
466
|
+
if (!editor) return;
|
|
467
|
+
const state = getLinkEditState(editor);
|
|
468
|
+
this.linkBubbleVisible = false;
|
|
469
|
+
this.openLinkDialog({
|
|
470
|
+
url: state.href,
|
|
471
|
+
text: state.text,
|
|
472
|
+
openInNewTab: state.openInNewTab,
|
|
473
|
+
from: state.from,
|
|
474
|
+
to: state.to
|
|
475
|
+
});
|
|
476
|
+
};
|
|
477
|
+
this.handleLinkBubbleUnlink = (event) => {
|
|
478
|
+
event.preventDefault();
|
|
479
|
+
const editor = this.host.editor;
|
|
480
|
+
if (!editor) return;
|
|
481
|
+
unsetLinkFromEditor(editor);
|
|
482
|
+
this.linkBubbleVisible = false;
|
|
483
|
+
};
|
|
484
|
+
this.handleLinkDialogAfterHide = () => {
|
|
485
|
+
this.linkDialogBusy = false;
|
|
486
|
+
queueMicrotask(() => {
|
|
487
|
+
if (this.isConnected && !this.linkDialog?.open) this.requestUpdate();
|
|
488
|
+
});
|
|
489
|
+
};
|
|
490
|
+
this.handleLinkUrlInput = () => {
|
|
491
|
+
this.updateLinkDialogSubmitState();
|
|
492
|
+
};
|
|
493
|
+
this.handleLinkDialogKeyDown = (event) => {
|
|
494
|
+
if (event.key !== "Enter") return;
|
|
495
|
+
const path = event.composedPath();
|
|
496
|
+
if (path.some((node) => node instanceof HTMLElement && node.localName === "pk-checkbox")) return;
|
|
497
|
+
if (path.some((node) => node instanceof HTMLElement && node.localName === "pk-button")) return;
|
|
498
|
+
if (path.some((node) => node instanceof HTMLButtonElement)) return;
|
|
499
|
+
event.preventDefault();
|
|
500
|
+
event.stopPropagation();
|
|
501
|
+
this.submitLinkDialog();
|
|
502
|
+
};
|
|
503
|
+
this.handleLinkDialogSubmit = () => {
|
|
504
|
+
this.submitLinkDialog();
|
|
505
|
+
};
|
|
506
|
+
}
|
|
507
|
+
static {
|
|
508
|
+
this.styles = [
|
|
509
|
+
formControlStyles,
|
|
510
|
+
pkTiptapEditorStyles,
|
|
511
|
+
tiptapProseMirrorStyles
|
|
512
|
+
];
|
|
513
|
+
}
|
|
514
|
+
static get validators() {
|
|
515
|
+
return [...super.validators, MirrorValidator()];
|
|
516
|
+
}
|
|
517
|
+
get value() {
|
|
518
|
+
if (this.valueHasChanged) return this._value ?? "[]";
|
|
519
|
+
return this._value ?? this.defaultValue ?? "[]";
|
|
520
|
+
}
|
|
521
|
+
/**
|
|
522
|
+
* Document JSON string. Also accepts a TipTap node array (common from React)
|
|
523
|
+
* and serializes it — arrays previously bypassed JSON.parse and mounted empty.
|
|
524
|
+
*/
|
|
525
|
+
set value(val) {
|
|
526
|
+
const next = serializeTiptapDocumentValue(val);
|
|
527
|
+
if (this._value === next) return;
|
|
528
|
+
this.valueHasChanged = true;
|
|
529
|
+
this._value = next;
|
|
530
|
+
}
|
|
531
|
+
get editor() {
|
|
532
|
+
return this.host.editor;
|
|
533
|
+
}
|
|
534
|
+
get toolbarNodes() {
|
|
535
|
+
const buttonsRaw = Array.isArray(this.buttons) ? this.buttons.join(",") : this.buttons;
|
|
536
|
+
return parseToolbarAttribute(this.toolbar, buttonsRaw).filter((node) => node.type !== "button" || node.name !== "variableTag");
|
|
537
|
+
}
|
|
538
|
+
/** Resolved flat button names from the active toolbar config. */
|
|
539
|
+
get buttonNames() {
|
|
540
|
+
return this.toolbarNodes.filter((node) => node.type === "button").map((node) => node.name);
|
|
541
|
+
}
|
|
542
|
+
toolbarHasLink() {
|
|
543
|
+
return toolbarIncludesButton(this.toolbarNodes, "link");
|
|
544
|
+
}
|
|
545
|
+
resolveLinkOptions() {
|
|
546
|
+
return parseLinkOptionsAttribute(this.linkOptions);
|
|
547
|
+
}
|
|
548
|
+
get contentError() {
|
|
549
|
+
return this.resolveContentError();
|
|
550
|
+
}
|
|
551
|
+
syncFormValue() {
|
|
552
|
+
this.setValue(this.value || "[]");
|
|
553
|
+
if (this.input) this.input.value = this.value || "[]";
|
|
554
|
+
}
|
|
555
|
+
resetToDefaultValue() {
|
|
556
|
+
this.valueHasChanged = false;
|
|
557
|
+
this._value = null;
|
|
558
|
+
this.syncEditorContent();
|
|
559
|
+
}
|
|
560
|
+
restoreFormState(state) {
|
|
561
|
+
if (typeof state === "string") {
|
|
562
|
+
this.value = state;
|
|
563
|
+
this.syncEditorContent();
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
connectedCallback() {
|
|
567
|
+
super.connectedCallback();
|
|
568
|
+
this.hasCustomToolbar = Boolean(this.querySelector("[slot=\"toolbar\"]"));
|
|
569
|
+
}
|
|
570
|
+
disconnectedCallback() {
|
|
571
|
+
this.linkDialog?.forceOverlayReset();
|
|
572
|
+
this.linkDialogBusy = false;
|
|
573
|
+
this.host.destroy();
|
|
574
|
+
this.selectionListenerAttached = false;
|
|
575
|
+
super.disconnectedCallback();
|
|
576
|
+
}
|
|
577
|
+
updated(changed) {
|
|
578
|
+
if (changed.has("value") && !changed.has("defaultValue")) this.syncEditorContent();
|
|
579
|
+
if (changed.has("defaultValue") && !this.valueHasChanged) this.syncEditorContent();
|
|
580
|
+
if (changed.has("disabled") || changed.has("readonly")) this.host.editor?.setEditable(!this.disabled && !this.readonly);
|
|
581
|
+
super.updated(changed);
|
|
582
|
+
}
|
|
583
|
+
firstUpdated() {
|
|
584
|
+
queueMicrotask(() => {
|
|
585
|
+
this.mountEditor();
|
|
586
|
+
this.syncFormValue();
|
|
587
|
+
});
|
|
588
|
+
}
|
|
589
|
+
resolveContentError() {
|
|
590
|
+
const detected = getFatalTiptapContentError(this.value);
|
|
591
|
+
return detected ? this.invalidContentMessage || detected : "";
|
|
592
|
+
}
|
|
593
|
+
mountEditor() {
|
|
594
|
+
const content = this.contentError ? null : parseTiptapDocumentValue(this.value);
|
|
595
|
+
const minHeight = `${Math.max(1, Number(this.rows || 0)) * 24 + 32}px`;
|
|
596
|
+
this.host.mount({
|
|
597
|
+
element: this.editorMount,
|
|
598
|
+
extensions: createTiptapExtensions({
|
|
599
|
+
trailingCursorText: "",
|
|
600
|
+
variableTagNodeView: createVariableTagDomNodeView()
|
|
601
|
+
}),
|
|
602
|
+
content,
|
|
603
|
+
editable: !this.disabled && !this.readonly && !this.contentError,
|
|
604
|
+
trailingCursorText: "",
|
|
605
|
+
minHeight,
|
|
606
|
+
onUpdate: (nextContent) => {
|
|
607
|
+
const serialized = serializeTiptapDocumentContent(nextContent);
|
|
608
|
+
this.value = serialized;
|
|
609
|
+
if (this.input) this.input.value = serialized;
|
|
610
|
+
this.syncFormValue();
|
|
611
|
+
this.emitValueChange(serialized);
|
|
612
|
+
}
|
|
613
|
+
});
|
|
614
|
+
queueMicrotask(() => {
|
|
615
|
+
this.attachSelectionListeners();
|
|
616
|
+
});
|
|
617
|
+
}
|
|
618
|
+
attachSelectionListeners() {
|
|
619
|
+
const editor = this.host.editor;
|
|
620
|
+
if (!editor || this.selectionListenerAttached) return;
|
|
621
|
+
const refreshToolbar = () => {
|
|
622
|
+
if (this.linkDialogBusy || this.linkDialog?.open) {
|
|
623
|
+
this.linkBubbleVisible = false;
|
|
624
|
+
return;
|
|
625
|
+
}
|
|
626
|
+
this.updateLinkBubble();
|
|
627
|
+
queueMicrotask(() => {
|
|
628
|
+
if (this.isConnected && !this.linkDialogBusy && !this.linkDialog?.open) this.requestUpdate();
|
|
629
|
+
});
|
|
630
|
+
};
|
|
631
|
+
editor.on("selectionUpdate", refreshToolbar);
|
|
632
|
+
editor.on("transaction", refreshToolbar);
|
|
633
|
+
editor.on("focus", refreshToolbar);
|
|
634
|
+
editor.on("blur", () => {
|
|
635
|
+
this.linkBubbleVisible = false;
|
|
636
|
+
this.requestUpdate();
|
|
637
|
+
});
|
|
638
|
+
this.selectionListenerAttached = true;
|
|
639
|
+
}
|
|
640
|
+
updateLinkBubble() {
|
|
641
|
+
const editor = this.host.editor;
|
|
642
|
+
if (!editor || this.disabled || this.readonly || this.linkDialogBusy || this.linkDialog?.open || !editor.isFocused || !editor.isActive("link")) {
|
|
643
|
+
this.linkBubbleVisible = false;
|
|
644
|
+
return;
|
|
645
|
+
}
|
|
646
|
+
const linkType = editor.state.schema.marks.link;
|
|
647
|
+
const range = getMarkRange(editor.state.selection.$from, linkType);
|
|
648
|
+
if (!range) {
|
|
649
|
+
this.linkBubbleVisible = false;
|
|
650
|
+
return;
|
|
651
|
+
}
|
|
652
|
+
const linkRect = posToDOMRect(editor.view, range.from, range.to);
|
|
653
|
+
const mountRect = this.editorMount.getBoundingClientRect();
|
|
654
|
+
const bubbleOffset = 8;
|
|
655
|
+
this.linkBubbleHref = String(editor.getAttributes("link").href ?? "");
|
|
656
|
+
this.linkBubbleTop = linkRect.top - mountRect.top - bubbleOffset;
|
|
657
|
+
this.linkBubbleLeft = linkRect.left - mountRect.left + linkRect.width / 2;
|
|
658
|
+
this.linkBubbleVisible = true;
|
|
659
|
+
}
|
|
660
|
+
renderLinkBubble() {
|
|
661
|
+
return b`
|
|
662
|
+
<div
|
|
663
|
+
class="link-bubble"
|
|
664
|
+
role="toolbar"
|
|
665
|
+
aria-label="Link actions"
|
|
666
|
+
tabindex="0"
|
|
667
|
+
style=${`top:${this.linkBubbleTop}px;left:${this.linkBubbleLeft}px;transform:translate(-50%, -100%);`}
|
|
668
|
+
>
|
|
669
|
+
<span class="link-bubble__arrow" aria-hidden="true"></span>
|
|
670
|
+
<span class="link-bubble__url" title=${this.linkBubbleHref}>${this.linkBubbleHref}</span>
|
|
671
|
+
<span class="link-bubble__divider" aria-hidden="true"></span>
|
|
672
|
+
<button
|
|
673
|
+
type="button"
|
|
674
|
+
class="link-bubble__action"
|
|
675
|
+
@mousedown=${(event) => event.preventDefault()}
|
|
676
|
+
@click=${this.handleLinkBubbleEdit}
|
|
677
|
+
>Edit</button>
|
|
678
|
+
<span class="link-bubble__divider" aria-hidden="true"></span>
|
|
679
|
+
<button
|
|
680
|
+
type="button"
|
|
681
|
+
class="link-bubble__action"
|
|
682
|
+
@mousedown=${(event) => event.preventDefault()}
|
|
683
|
+
@click=${this.handleLinkBubbleUnlink}
|
|
684
|
+
>Unlink</button>
|
|
685
|
+
</div>
|
|
686
|
+
`;
|
|
687
|
+
}
|
|
688
|
+
syncEditorContent() {
|
|
689
|
+
const content = this.contentError ? null : parseTiptapDocumentValue(this.value);
|
|
690
|
+
this.host.setContent(content, { trailingCursorText: "" });
|
|
691
|
+
if (this.input) this.input.value = this.value || "[]";
|
|
692
|
+
}
|
|
693
|
+
emitValueChange(value) {
|
|
694
|
+
this.dispatchEvent(new CustomEvent("pk-change", {
|
|
695
|
+
detail: { value },
|
|
696
|
+
bubbles: true,
|
|
697
|
+
composed: true
|
|
698
|
+
}));
|
|
699
|
+
this.dispatchEvent(new Event("input", {
|
|
700
|
+
bubbles: true,
|
|
701
|
+
composed: true
|
|
702
|
+
}));
|
|
703
|
+
this.dispatchEvent(new Event("change", {
|
|
704
|
+
bubbles: true,
|
|
705
|
+
composed: true
|
|
706
|
+
}));
|
|
707
|
+
}
|
|
708
|
+
handleToolbarCommand(buttonName) {
|
|
709
|
+
const editor = this.host.editor;
|
|
710
|
+
if (!editor) return;
|
|
711
|
+
runToolbarButton(editor, buttonName);
|
|
712
|
+
}
|
|
713
|
+
openLinkMenu() {
|
|
714
|
+
const editor = this.host.editor;
|
|
715
|
+
if (!editor) return;
|
|
716
|
+
const selected = getSelectedText(editor);
|
|
717
|
+
const { from, to } = editor.state.selection;
|
|
718
|
+
const menu = this.shadowRoot?.querySelector(`pk-dropdown-menu[for="${this.linkButtonId}"]`);
|
|
719
|
+
(async () => {
|
|
720
|
+
await menu?.whenClosed();
|
|
721
|
+
this.openLinkDialog(from !== to ? {
|
|
722
|
+
text: selected,
|
|
723
|
+
from,
|
|
724
|
+
to
|
|
725
|
+
} : void 0);
|
|
726
|
+
})();
|
|
727
|
+
}
|
|
728
|
+
openLinkDialog(initial) {
|
|
729
|
+
const editor = this.host.editor;
|
|
730
|
+
const url = initial?.url ?? "";
|
|
731
|
+
this.linkDialogBusy = true;
|
|
732
|
+
this.linkBubbleVisible = false;
|
|
733
|
+
this.linkDialogSeed = {
|
|
734
|
+
url,
|
|
735
|
+
text: initial?.text ?? "",
|
|
736
|
+
openInNewTab: initial?.openInNewTab ?? (editor ? getLinkOpenInNewTab(editor) : false),
|
|
737
|
+
from: initial?.from,
|
|
738
|
+
to: initial?.to
|
|
739
|
+
};
|
|
740
|
+
this.linkDialogTitle = url.trim() ? "Update Link" : "Insert Link";
|
|
741
|
+
this.linkDialogSubmitLabel = url.trim() ? "Update" : "Insert";
|
|
742
|
+
if (!this.linkDialogMounted) this.linkDialogMounted = true;
|
|
743
|
+
queueMicrotask(async () => {
|
|
744
|
+
await this.updateComplete;
|
|
745
|
+
await this.linkDialog?.updateComplete;
|
|
746
|
+
this.syncLinkDialogFields();
|
|
747
|
+
await this.linkDialog?.show();
|
|
748
|
+
});
|
|
749
|
+
}
|
|
750
|
+
closeLinkDialog() {
|
|
751
|
+
this.linkDialog?.hide("close-button");
|
|
752
|
+
}
|
|
753
|
+
syncLinkDialogFields() {
|
|
754
|
+
const seed = this.linkDialogSeed;
|
|
755
|
+
if (this.linkUrlInput) this.linkUrlInput.value = seed.url ?? "";
|
|
756
|
+
if (this.linkTextInput) this.linkTextInput.value = seed.text ?? "";
|
|
757
|
+
if (this.linkNewTabCheckbox) this.linkNewTabCheckbox.checked = Boolean(seed.openInNewTab);
|
|
758
|
+
this.updateLinkDialogSubmitState();
|
|
759
|
+
}
|
|
760
|
+
updateLinkDialogSubmitState() {
|
|
761
|
+
const canSubmit = Boolean(this.linkUrlInput?.value.trim());
|
|
762
|
+
if (this.linkSubmitButton) this.linkSubmitButton.disabled = !canSubmit;
|
|
763
|
+
}
|
|
764
|
+
submitLinkDialog() {
|
|
765
|
+
const editor = this.host.editor;
|
|
766
|
+
const url = this.linkUrlInput?.value.trim() ?? "";
|
|
767
|
+
if (!editor || !url) return;
|
|
768
|
+
applyLinkToEditor(editor, {
|
|
769
|
+
url,
|
|
770
|
+
text: this.linkTextInput?.value ?? "",
|
|
771
|
+
openInNewTab: Boolean(this.linkNewTabCheckbox?.checked),
|
|
772
|
+
from: this.linkDialogSeed.from,
|
|
773
|
+
to: this.linkDialogSeed.to
|
|
774
|
+
});
|
|
775
|
+
this.closeLinkDialog();
|
|
776
|
+
}
|
|
777
|
+
isLinkActive() {
|
|
778
|
+
const editor = this.host.editor;
|
|
779
|
+
return editor ? isTiptapButtonActive(editor, "link") : false;
|
|
780
|
+
}
|
|
781
|
+
renderLinkDialog() {
|
|
782
|
+
return b`
|
|
783
|
+
<pk-dialog
|
|
784
|
+
class="link-dialog"
|
|
785
|
+
size="wide"
|
|
786
|
+
label=${this.linkDialogTitle}
|
|
787
|
+
@pk-after-hide=${this.handleLinkDialogAfterHide}
|
|
788
|
+
@keydown=${this.handleLinkDialogKeyDown}
|
|
789
|
+
>
|
|
790
|
+
<div class="link-dialog__fields">
|
|
791
|
+
<pk-field label="URL" required .for=${this.linkUrlInputId}>
|
|
792
|
+
<pk-input
|
|
793
|
+
id=${this.linkUrlInputId}
|
|
794
|
+
class="link-dialog__url-input"
|
|
795
|
+
type="url"
|
|
796
|
+
placeholder="https://"
|
|
797
|
+
autofocus
|
|
798
|
+
@input=${this.handleLinkUrlInput}
|
|
799
|
+
></pk-input>
|
|
800
|
+
</pk-field>
|
|
801
|
+
<pk-field label="Text" .for=${this.linkTextInputId}>
|
|
802
|
+
<pk-input
|
|
803
|
+
id=${this.linkTextInputId}
|
|
804
|
+
class="link-dialog__text-input"
|
|
805
|
+
type="text"
|
|
806
|
+
></pk-input>
|
|
807
|
+
</pk-field>
|
|
808
|
+
<pk-checkbox>Open link in new tab</pk-checkbox>
|
|
809
|
+
</div>
|
|
810
|
+
<pk-button slot="footer" data-dialog-close>Cancel</pk-button>
|
|
811
|
+
<pk-button
|
|
812
|
+
slot="footer"
|
|
813
|
+
class="link-dialog__submit"
|
|
814
|
+
variant="primary"
|
|
815
|
+
disabled
|
|
816
|
+
@click=${this.handleLinkDialogSubmit}
|
|
817
|
+
>
|
|
818
|
+
${this.linkDialogSubmitLabel}
|
|
819
|
+
</pk-button>
|
|
820
|
+
</pk-dialog>
|
|
821
|
+
`;
|
|
822
|
+
}
|
|
823
|
+
getToolbarButtonId(buttonName) {
|
|
824
|
+
let id = this.toolbarButtonIds.get(buttonName);
|
|
825
|
+
if (!id) {
|
|
826
|
+
id = uniqueId(`pk-tiptap-toolbar-${buttonName}`);
|
|
827
|
+
this.toolbarButtonIds.set(buttonName, id);
|
|
828
|
+
}
|
|
829
|
+
return id;
|
|
830
|
+
}
|
|
831
|
+
getToolbarButtonLabel(buttonName) {
|
|
832
|
+
return TOOLBAR_LABELS[buttonName] ?? buttonName;
|
|
833
|
+
}
|
|
834
|
+
renderToolbarTooltip(buttonId, label) {
|
|
835
|
+
if (!this.toolbarTooltips) return A;
|
|
836
|
+
return b`
|
|
837
|
+
<pk-tooltip for=${buttonId} content=${label} placement="top"></pk-tooltip>
|
|
838
|
+
`;
|
|
839
|
+
}
|
|
840
|
+
renderToolbarButton(buttonName) {
|
|
841
|
+
const editor = this.host.editor;
|
|
842
|
+
const icon = TOOLBAR_ICONS[buttonName];
|
|
843
|
+
const label = this.getToolbarButtonLabel(buttonName);
|
|
844
|
+
const buttonId = this.getToolbarButtonId(buttonName);
|
|
845
|
+
const active = editor ? isTiptapButtonActive(editor, buttonName) : false;
|
|
846
|
+
return b`
|
|
847
|
+
<div class="toolbar-item">
|
|
848
|
+
<button
|
|
849
|
+
id=${buttonId}
|
|
850
|
+
type="button"
|
|
851
|
+
class="toolbar-btn"
|
|
852
|
+
aria-label=${label}
|
|
853
|
+
?disabled=${this.disabled || this.readonly}
|
|
854
|
+
data-state=${active ? "active" : A}
|
|
855
|
+
@click=${() => this.handleToolbarCommand(buttonName)}
|
|
856
|
+
>
|
|
857
|
+
${icon ? o(icon) : b`<span class="toolbar-btn__label">${label}</span>`}
|
|
858
|
+
</button>
|
|
859
|
+
${this.renderToolbarTooltip(buttonId, label)}
|
|
860
|
+
</div>
|
|
861
|
+
`;
|
|
862
|
+
}
|
|
863
|
+
handleCraftLink(config) {
|
|
864
|
+
const editor = this.host.editor;
|
|
865
|
+
if (!editor) return;
|
|
866
|
+
openCraftElementLinkSelector({
|
|
867
|
+
config,
|
|
868
|
+
elementSiteId: getLinkOptionsElementSiteId(this.resolveLinkOptions()),
|
|
869
|
+
linkSelectorStorageKeyPrefix: this.linkSelectorStorageKeyPrefix,
|
|
870
|
+
getSelectedText: () => getSelectedText(editor),
|
|
871
|
+
onSelect: ({ url, text }) => {
|
|
872
|
+
this.openLinkDialog({
|
|
873
|
+
url,
|
|
874
|
+
text
|
|
875
|
+
});
|
|
876
|
+
},
|
|
877
|
+
host: createCraftElementSelectorHost()
|
|
878
|
+
});
|
|
879
|
+
}
|
|
880
|
+
getToolbarGroupId(groupKey) {
|
|
881
|
+
let id = this.toolbarGroupIds.get(groupKey);
|
|
882
|
+
if (!id) {
|
|
883
|
+
id = uniqueId("pk-tiptap-toolbar-group");
|
|
884
|
+
this.toolbarGroupIds.set(groupKey, id);
|
|
885
|
+
}
|
|
886
|
+
return id;
|
|
887
|
+
}
|
|
888
|
+
renderToolbarSeparator() {
|
|
889
|
+
return b`<span class="toolbar-separator" aria-hidden="true"></span>`;
|
|
890
|
+
}
|
|
891
|
+
renderGroupTriggerContent(group, triggerLabel, iconName) {
|
|
892
|
+
const icon = TOOLBAR_ICONS[iconName];
|
|
893
|
+
if (Boolean(group.label) && triggerLabel) return b`
|
|
894
|
+
<span class="toolbar-btn__trigger-label">${triggerLabel}</span>
|
|
895
|
+
<span class="toolbar-btn__chevron">${o(TOOLBAR_CHEVRON_HTML)}</span>
|
|
896
|
+
`;
|
|
897
|
+
return b`
|
|
898
|
+
${icon ? o(icon) : b`<span class="toolbar-btn__trigger-label">${triggerLabel}</span>`}
|
|
899
|
+
<span class="toolbar-btn__chevron">${o(TOOLBAR_CHEVRON_HTML)}</span>
|
|
900
|
+
`;
|
|
901
|
+
}
|
|
902
|
+
renderToolbarGroup(group, groupKey) {
|
|
903
|
+
const editor = this.host.editor;
|
|
904
|
+
const groupId = this.getToolbarGroupId(groupKey);
|
|
905
|
+
const trigger = editor ? getToolbarGroupTriggerState(editor, group) : {
|
|
906
|
+
activeName: null,
|
|
907
|
+
label: group.label ?? "",
|
|
908
|
+
isActive: false,
|
|
909
|
+
icon: group.icon ?? getToolbarGroupDefaultIcon(group)
|
|
910
|
+
};
|
|
911
|
+
const menuItems = getToolbarGroupMenuItems(group);
|
|
912
|
+
const tooltipLabel = group.label ?? (isHeadingsOnlyToolbarPreset(group.preset) ? "Headings" : isFormattingToolbarPreset(group.preset) ? "Formatting" : group.preset === "lists" ? "Lists" : group.preset === "align" ? "Alignment" : "More");
|
|
913
|
+
return b`
|
|
914
|
+
<div class="toolbar-item">
|
|
915
|
+
<button
|
|
916
|
+
id=${groupId}
|
|
917
|
+
type="button"
|
|
918
|
+
class="toolbar-btn toolbar-btn--menu"
|
|
919
|
+
aria-label=${tooltipLabel}
|
|
920
|
+
aria-haspopup="menu"
|
|
921
|
+
?disabled=${this.disabled || this.readonly}
|
|
922
|
+
data-state=${trigger.isActive ? "active" : A}
|
|
923
|
+
>
|
|
924
|
+
${this.renderGroupTriggerContent(group, trigger.label, trigger.icon)}
|
|
925
|
+
</button>
|
|
926
|
+
${this.renderToolbarTooltip(groupId, tooltipLabel)}
|
|
927
|
+
<pk-dropdown-menu for=${groupId} placement="bottom-start">
|
|
928
|
+
${menuItems.map((entry, itemIndex) => {
|
|
929
|
+
if (entry.type === "separator") return b`<pk-dropdown-separator key=${`${groupKey}-sep-${itemIndex}`}></pk-dropdown-separator>`;
|
|
930
|
+
const itemName = entry.name;
|
|
931
|
+
const active = editor ? isToolbarButtonActive(editor, itemName) : false;
|
|
932
|
+
const prefixIcon = createToolbarPrefixIcon(itemName);
|
|
933
|
+
const itemLabel = getToolbarMenuItemLabel(itemName);
|
|
934
|
+
return b`
|
|
935
|
+
<pk-dropdown-item
|
|
936
|
+
key=${`${groupKey}-${itemName}-${itemIndex}`}
|
|
937
|
+
?data-active=${active || A}
|
|
938
|
+
@click=${() => this.handleToolbarCommand(itemName)}
|
|
939
|
+
>
|
|
940
|
+
${prefixIcon ?? A}
|
|
941
|
+
${itemLabel}
|
|
942
|
+
</pk-dropdown-item>
|
|
943
|
+
`;
|
|
944
|
+
})}
|
|
945
|
+
</pk-dropdown-menu>
|
|
946
|
+
</div>
|
|
947
|
+
`;
|
|
948
|
+
}
|
|
949
|
+
renderToolbarNode(node, index) {
|
|
950
|
+
if (node.type === "separator") return this.renderToolbarSeparator();
|
|
951
|
+
if (node.type === "group") return this.renderToolbarGroup(node.group, `group-${index}`);
|
|
952
|
+
if (node.name === "link") return this.renderLinkToolbarButton();
|
|
953
|
+
return this.renderToolbarButton(node.name);
|
|
954
|
+
}
|
|
955
|
+
renderDefaultToolbar() {
|
|
956
|
+
return b`
|
|
957
|
+
<div class="toolbar" part="toolbar">
|
|
958
|
+
${this.toolbarNodes.map((node, index) => this.renderToolbarNode(node, index))}
|
|
959
|
+
<slot name="toolbar-end"></slot>
|
|
960
|
+
</div>
|
|
961
|
+
`;
|
|
962
|
+
}
|
|
963
|
+
renderLinkToolbarButton() {
|
|
964
|
+
const editor = this.host.editor;
|
|
965
|
+
const craftOptions = getCraftLinkOptions(this.resolveLinkOptions());
|
|
966
|
+
const label = this.getToolbarButtonLabel("link");
|
|
967
|
+
const active = this.isLinkActive();
|
|
968
|
+
return b`
|
|
969
|
+
<div class="toolbar-item">
|
|
970
|
+
<button
|
|
971
|
+
id=${this.linkButtonId}
|
|
972
|
+
type="button"
|
|
973
|
+
class="toolbar-btn"
|
|
974
|
+
aria-label=${label}
|
|
975
|
+
aria-haspopup="menu"
|
|
976
|
+
?disabled=${this.disabled || this.readonly}
|
|
977
|
+
data-state=${active ? "active" : A}
|
|
978
|
+
>
|
|
979
|
+
${o(TOOLBAR_ICONS.link)}
|
|
980
|
+
</button>
|
|
981
|
+
${this.renderToolbarTooltip(this.linkButtonId, label)}
|
|
982
|
+
<pk-dropdown-menu for=${this.linkButtonId} placement="bottom-start">
|
|
983
|
+
${craftOptions.map((option) => b`
|
|
984
|
+
<pk-dropdown-item @click=${() => this.handleCraftLink(option)}>
|
|
985
|
+
${option.optionTitle}
|
|
986
|
+
</pk-dropdown-item>
|
|
987
|
+
`)}
|
|
988
|
+
${craftOptions.length > 0 ? b`<pk-dropdown-separator></pk-dropdown-separator>` : A}
|
|
989
|
+
<pk-dropdown-item @click=${() => this.openLinkMenu()}>Insert Link</pk-dropdown-item>
|
|
990
|
+
<pk-dropdown-item
|
|
991
|
+
?disabled=${!active}
|
|
992
|
+
@click=${() => editor && unsetLinkFromEditor(editor)}
|
|
993
|
+
>Unlink</pk-dropdown-item>
|
|
994
|
+
</pk-dropdown-menu>
|
|
995
|
+
</div>
|
|
996
|
+
`;
|
|
997
|
+
}
|
|
998
|
+
render() {
|
|
999
|
+
return b`
|
|
1000
|
+
<div class="shell" part="shell">
|
|
1001
|
+
${this.hasCustomToolbar ? b`<slot name="toolbar"></slot>` : this.renderDefaultToolbar()}
|
|
1002
|
+
|
|
1003
|
+
<div class="editor-mount" part="editor">
|
|
1004
|
+
${this.contentError ? b`
|
|
1005
|
+
<div class="content-error">
|
|
1006
|
+
<span>${o(renderIconHtml(triangleExclamation))}</span>
|
|
1007
|
+
<span>${this.contentError}</span>
|
|
1008
|
+
</div>
|
|
1009
|
+
` : A}
|
|
1010
|
+
${this.toolbarHasLink() && this.linkBubbleVisible ? this.renderLinkBubble() : A}
|
|
1011
|
+
</div>
|
|
1012
|
+
|
|
1013
|
+
<input class="mirror-input" type="text" .value=${this.value} readonly tabindex="-1" aria-hidden="true" />
|
|
1014
|
+
${this.toolbarHasLink() && this.linkDialogMounted ? this.renderLinkDialog() : A}
|
|
1015
|
+
</div>
|
|
1016
|
+
`;
|
|
1017
|
+
}
|
|
1018
|
+
};
|
|
1019
|
+
__decorate([e(".editor-mount")], PkTiptapEditor.prototype, "editorMount", void 0);
|
|
1020
|
+
__decorate([e(".mirror-input")], PkTiptapEditor.prototype, "input", void 0);
|
|
1021
|
+
__decorate([e(".link-dialog")], PkTiptapEditor.prototype, "linkDialog", void 0);
|
|
1022
|
+
__decorate([e("pk-input.link-dialog__url-input")], PkTiptapEditor.prototype, "linkUrlInput", void 0);
|
|
1023
|
+
__decorate([e("pk-input.link-dialog__text-input")], PkTiptapEditor.prototype, "linkTextInput", void 0);
|
|
1024
|
+
__decorate([e("pk-checkbox")], PkTiptapEditor.prototype, "linkNewTabCheckbox", void 0);
|
|
1025
|
+
__decorate([e("pk-button.link-dialog__submit")], PkTiptapEditor.prototype, "linkSubmitButton", void 0);
|
|
1026
|
+
__decorate([n({
|
|
1027
|
+
attribute: "buttons",
|
|
1028
|
+
converter: {
|
|
1029
|
+
fromAttribute: (value) => value ?? "bold,italic",
|
|
1030
|
+
toAttribute: (value) => {
|
|
1031
|
+
if (value == null) return "bold,italic";
|
|
1032
|
+
return Array.isArray(value) ? value.join(",") : value;
|
|
1033
|
+
}
|
|
1034
|
+
}
|
|
1035
|
+
})], PkTiptapEditor.prototype, "buttons", void 0);
|
|
1036
|
+
__decorate([n({
|
|
1037
|
+
attribute: "toolbar",
|
|
1038
|
+
converter: {
|
|
1039
|
+
fromAttribute: (value) => value,
|
|
1040
|
+
toAttribute: (value) => {
|
|
1041
|
+
if (value == null) return null;
|
|
1042
|
+
return typeof value === "string" ? value : JSON.stringify(value);
|
|
1043
|
+
}
|
|
1044
|
+
}
|
|
1045
|
+
})], PkTiptapEditor.prototype, "toolbar", void 0);
|
|
1046
|
+
__decorate([n({ attribute: "link-options" })], PkTiptapEditor.prototype, "linkOptions", void 0);
|
|
1047
|
+
__decorate([n({ attribute: "link-selector-storage-key-prefix" })], PkTiptapEditor.prototype, "linkSelectorStorageKeyPrefix", void 0);
|
|
1048
|
+
__decorate([n({ type: Number })], PkTiptapEditor.prototype, "rows", void 0);
|
|
1049
|
+
__decorate([n()], PkTiptapEditor.prototype, "placeholder", void 0);
|
|
1050
|
+
__decorate([n({
|
|
1051
|
+
type: Boolean,
|
|
1052
|
+
reflect: true
|
|
1053
|
+
})], PkTiptapEditor.prototype, "readonly", void 0);
|
|
1054
|
+
__decorate([n({
|
|
1055
|
+
type: Boolean,
|
|
1056
|
+
reflect: true
|
|
1057
|
+
})], PkTiptapEditor.prototype, "invalid", void 0);
|
|
1058
|
+
__decorate([n({ attribute: false })], PkTiptapEditor.prototype, "variableTagConfigure", void 0);
|
|
1059
|
+
__decorate([n({ attribute: "invalid-content-message" })], PkTiptapEditor.prototype, "invalidContentMessage", void 0);
|
|
1060
|
+
__decorate([n({
|
|
1061
|
+
type: Boolean,
|
|
1062
|
+
attribute: "toolbar-tooltips"
|
|
1063
|
+
})], PkTiptapEditor.prototype, "toolbarTooltips", void 0);
|
|
1064
|
+
__decorate([r()], PkTiptapEditor.prototype, "linkDialogTitle", void 0);
|
|
1065
|
+
__decorate([r()], PkTiptapEditor.prototype, "linkDialogSubmitLabel", void 0);
|
|
1066
|
+
__decorate([r()], PkTiptapEditor.prototype, "linkDialogMounted", void 0);
|
|
1067
|
+
__decorate([r()], PkTiptapEditor.prototype, "linkBubbleVisible", void 0);
|
|
1068
|
+
__decorate([r()], PkTiptapEditor.prototype, "linkBubbleHref", void 0);
|
|
1069
|
+
__decorate([r()], PkTiptapEditor.prototype, "linkBubbleTop", void 0);
|
|
1070
|
+
__decorate([r()], PkTiptapEditor.prototype, "linkBubbleLeft", void 0);
|
|
1071
|
+
__decorate([r()], PkTiptapEditor.prototype, "value", null);
|
|
1072
|
+
__decorate([n({
|
|
1073
|
+
attribute: "value",
|
|
1074
|
+
reflect: true
|
|
1075
|
+
})], PkTiptapEditor.prototype, "defaultValue", void 0);
|
|
1076
|
+
PkTiptapEditor = __decorate([t("pk-tiptap-editor")], PkTiptapEditor);
|
|
1077
|
+
//#endregion
|
|
1078
|
+
export { PkTiptapEditor };
|