@caspeco/casper-ui-library 10.4.0 → 10.5.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/dist/_virtual/_rolldown/runtime.js +11 -0
- package/dist/_virtual/builtin_esm-external-require-react.js +9 -0
- package/dist/components/accordion/accordion-context.js +5 -6
- package/dist/components/accordion/accordion-item.js +28 -40
- package/dist/components/accordion/accordion-panel.js +17 -14
- package/dist/components/accordion/accordion-recipe.js +85 -120
- package/dist/components/accordion/accordion.js +23 -20
- package/dist/components/alert/alert.js +80 -59
- package/dist/components/alert/helper.js +30 -42
- package/dist/components/alert/types.d.ts.map +1 -1
- package/dist/components/badge/badge-recipe.js +57 -49
- package/dist/components/badge/badge.js +66 -71
- package/dist/components/badge/helper.js +8 -9
- package/dist/components/box/box.js +14 -11
- package/dist/components/breadcrumbs/breadcrumb-item.js +21 -17
- package/dist/components/breadcrumbs/breadcrumb-link.js +21 -20
- package/dist/components/breadcrumbs/breadcrumbs.js +123 -90
- package/dist/components/button/button-recipe.js +280 -315
- package/dist/components/button/button.js +39 -40
- package/dist/components/checkbox/checkbox-icon.js +38 -46
- package/dist/components/checkbox/checkbox-recipe.js +176 -204
- package/dist/components/checkbox/checkbox.js +43 -36
- package/dist/components/checkbox/icons/check.js +5 -5
- package/dist/components/checkbox/icons/minus.js +5 -5
- package/dist/components/checkbox/icons/plus.js +5 -5
- package/dist/components/checkbox-group/checkbox-group.js +17 -16
- package/dist/components/collapsible/collapsible.js +117 -101
- package/dist/components/collapsible/translations.js +29 -29
- package/dist/components/combobox/combobox-button.js +173 -143
- package/dist/components/combobox/combobox-item.js +45 -23
- package/dist/components/combobox/combobox-menu.js +240 -190
- package/dist/components/combobox/combobox-recipe.js +69 -103
- package/dist/components/combobox/combobox.js +243 -273
- package/dist/components/combobox/translations.js +49 -50
- package/dist/components/date-picker/base-date-picker.js +238 -248
- package/dist/components/date-picker/date-cell-recipe.js +149 -179
- package/dist/components/date-picker/date-multi-picker.js +35 -29
- package/dist/components/date-picker/date-picker-date-cell.js +109 -114
- package/dist/components/date-picker/date-picker-header.js +152 -170
- package/dist/components/date-picker/date-picker-week-cell.js +41 -43
- package/dist/components/date-picker/date-picker.js +32 -29
- package/dist/components/date-picker/date-range-picker.js +29 -24
- package/dist/components/date-picker/date-week-picker.js +29 -22
- package/dist/components/date-picker/datepicker-week-recipe.js +75 -91
- package/dist/components/date-picker/helper.js +11 -16
- package/dist/components/divider/divider-recipe.js +9 -11
- package/dist/components/divider/divider.js +19 -18
- package/dist/components/drawer/drawer-recipe.js +21 -50
- package/dist/components/drawer/drawer.js +45 -41
- package/dist/components/drawer/inline-drawer.js +69 -66
- package/dist/components/drawer/use-drawer-key-down.js +20 -20
- package/dist/components/fieldset/fieldset-error-text.js +15 -15
- package/dist/components/fieldset/fieldset-helper-text.js +15 -15
- package/dist/components/fieldset/fieldset-legend.js +15 -15
- package/dist/components/fieldset/fieldset-recipe.js +14 -24
- package/dist/components/fieldset/fieldset.js +17 -17
- package/dist/components/flex/flex.js +15 -15
- package/dist/components/form-control/form-control-recipe.js +42 -46
- package/dist/components/form-control/form-control.js +19 -19
- package/dist/components/form-control/form-error-message.js +15 -15
- package/dist/components/form-control/form-helper-text.js +15 -15
- package/dist/components/form-control/form-label.js +24 -26
- package/dist/components/grid/grid-item.js +15 -15
- package/dist/components/grid/grid.js +15 -15
- package/dist/components/heading/heading.js +24 -23
- package/dist/components/highlight/highlight.js +22 -21
- package/dist/components/icon/create-icon.js +27 -26
- package/dist/components/icon/icons/absence-icon.js +5 -5
- package/dist/components/icon/icons/accessibility-icon.js +5 -5
- package/dist/components/icon/icons/add-absence-icon.js +5 -5
- package/dist/components/icon/icons/add-emoji-icon.js +5 -5
- package/dist/components/icon/icons/add-icon.js +5 -5
- package/dist/components/icon/icons/apple-icon.js +5 -5
- package/dist/components/icon/icons/apps-icon.js +5 -5
- package/dist/components/icon/icons/archive-icon.js +6 -6
- package/dist/components/icon/icons/area-icon.js +5 -5
- package/dist/components/icon/icons/at-icon.js +5 -5
- package/dist/components/icon/icons/attachment-icon.js +5 -5
- package/dist/components/icon/icons/baby-icon.js +5 -5
- package/dist/components/icon/icons/back-icon.js +5 -5
- package/dist/components/icon/icons/backspace-icon.js +5 -5
- package/dist/components/icon/icons/bank-icon.js +5 -5
- package/dist/components/icon/icons/bank-id-icon.js +5 -5
- package/dist/components/icon/icons/barcode-icon.js +5 -5
- package/dist/components/icon/icons/bell-icon.js +5 -5
- package/dist/components/icon/icons/bolt-icon.js +7 -7
- package/dist/components/icon/icons/calendar-icon.js +5 -5
- package/dist/components/icon/icons/camera-icon.js +5 -5
- package/dist/components/icon/icons/cancel-icon.js +5 -5
- package/dist/components/icon/icons/card-icon.js +5 -5
- package/dist/components/icon/icons/cart-icon.js +5 -5
- package/dist/components/icon/icons/caspeco-icon.js +7 -7
- package/dist/components/icon/icons/channels-icon.js +5 -5
- package/dist/components/icon/icons/chart-icon.js +5 -5
- package/dist/components/icon/icons/chart-line-icon.js +5 -5
- package/dist/components/icon/icons/chart-mixed-icon.js +5 -5
- package/dist/components/icon/icons/chart-pie-icon.js +5 -5
- package/dist/components/icon/icons/chart-scatter-icon.js +5 -5
- package/dist/components/icon/icons/check-icon.js +5 -5
- package/dist/components/icon/icons/checkbox-icon.js +5 -5
- package/dist/components/icon/icons/chevron-left-icon.js +5 -5
- package/dist/components/icon/icons/chevron-right-icon.js +5 -5
- package/dist/components/icon/icons/child-icon.js +5 -5
- package/dist/components/icon/icons/circle-info-icon.js +5 -5
- package/dist/components/icon/icons/circle-parking-icon.js +5 -5
- package/dist/components/icon/icons/circle-question-icon.js +5 -5
- package/dist/components/icon/icons/circle-select-icon.js +5 -5
- package/dist/components/icon/icons/circle-success-icon.js +5 -5
- package/dist/components/icon/icons/circle-user-icon.js +5 -5
- package/dist/components/icon/icons/clear-icon.js +5 -5
- package/dist/components/icon/icons/close-icon.js +5 -5
- package/dist/components/icon/icons/closed-icon.js +5 -5
- package/dist/components/icon/icons/collapse-icon.js +5 -5
- package/dist/components/icon/icons/color-icon.js +5 -5
- package/dist/components/icon/icons/columns-icon.js +5 -5
- package/dist/components/icon/icons/comment-add-icon.js +5 -5
- package/dist/components/icon/icons/comment-icon.js +5 -5
- package/dist/components/icon/icons/cookies-icon.js +5 -5
- package/dist/components/icon/icons/copy-icon.js +5 -5
- package/dist/components/icon/icons/date-icon.js +5 -5
- package/dist/components/icon/icons/decrease-icon.js +4 -4
- package/dist/components/icon/icons/delete-icon.js +5 -5
- package/dist/components/icon/icons/deliverect-icon.js +5 -5
- package/dist/components/icon/icons/delivery-icon.js +5 -5
- package/dist/components/icon/icons/description-icon.js +5 -5
- package/dist/components/icon/icons/discount-icon.js +5 -5
- package/dist/components/icon/icons/distribute-evenly-icon.js +5 -5
- package/dist/components/icon/icons/door-closed-icon.js +5 -5
- package/dist/components/icon/icons/door-open-icon.js +5 -5
- package/dist/components/icon/icons/down-icon.js +5 -5
- package/dist/components/icon/icons/eat-in-icon.js +5 -5
- package/dist/components/icon/icons/edit-icon.js +5 -5
- package/dist/components/icon/icons/email-icon.js +5 -5
- package/dist/components/icon/icons/error-icon.js +5 -5
- package/dist/components/icon/icons/expand-icon.js +5 -5
- package/dist/components/icon/icons/export-icon.js +5 -5
- package/dist/components/icon/icons/extract-icon.js +5 -5
- package/dist/components/icon/icons/facebook-icon.js +5 -5
- package/dist/components/icon/icons/failed-print-icon.js +5 -5
- package/dist/components/icon/icons/file-icon.js +5 -5
- package/dist/components/icon/icons/filter-icon.js +5 -5
- package/dist/components/icon/icons/folder-icon.js +5 -5
- package/dist/components/icon/icons/foodora-icon.js +5 -5
- package/dist/components/icon/icons/forward-icon.js +5 -5
- package/dist/components/icon/icons/glovo-icon.js +7 -7
- package/dist/components/icon/icons/goal-icon.js +5 -5
- package/dist/components/icon/icons/google-icon.js +5 -5
- package/dist/components/icon/icons/grip-more-icon.js +5 -5
- package/dist/components/icon/icons/hash-icon.js +5 -5
- package/dist/components/icon/icons/hexagon-error-icon.js +5 -5
- package/dist/components/icon/icons/hide-icon.js +5 -5
- package/dist/components/icon/icons/history-icon.js +5 -5
- package/dist/components/icon/icons/icon-picker-anchor-icon.js +5 -5
- package/dist/components/icon/icons/icon-picker-asterisk-icon.js +5 -5
- package/dist/components/icon/icons/icon-picker-beer-icon.js +5 -5
- package/dist/components/icon/icons/icon-picker-bicycle-icon.js +5 -5
- package/dist/components/icon/icons/icon-picker-binoculars-icon.js +5 -5
- package/dist/components/icon/icons/icon-picker-bomb-icon.js +5 -5
- package/dist/components/icon/icons/icon-picker-car-icon.js +5 -5
- package/dist/components/icon/icons/icon-picker-cocktail-icon.js +5 -5
- package/dist/components/icon/icons/icon-picker-gem-icon.js +5 -5
- package/dist/components/icon/icons/icon-picker-heart-full-icon.js +5 -5
- package/dist/components/icon/icons/icon-picker-heart-icon.js +5 -5
- package/dist/components/icon/icons/icon-picker-magnet-icon.js +5 -5
- package/dist/components/icon/icons/icon-picker-money-icon.js +5 -5
- package/dist/components/icon/icons/icon-picker-moon-icon.js +5 -5
- package/dist/components/icon/icons/icon-picker-music-icon.js +5 -5
- package/dist/components/icon/icons/icon-picker-star-full-icon.js +5 -5
- package/dist/components/icon/icons/icon-picker-star-half-icon.js +5 -5
- package/dist/components/icon/icons/icon-picker-star-icon.js +5 -5
- package/dist/components/icon/icons/icon-picker-tint-icon.js +5 -5
- package/dist/components/icon/icons/icon-picker-tree-icon.js +5 -5
- package/dist/components/icon/icons/icon-picker-utensils-icon.js +5 -5
- package/dist/components/icon/icons/icon-picker-wheelchair-icon.js +5 -5
- package/dist/components/icon/icons/image-icon.js +5 -5
- package/dist/components/icon/icons/import-icon.js +5 -5
- package/dist/components/icon/icons/inbox-icon.js +5 -5
- package/dist/components/icon/icons/increase-icon.js +5 -5
- package/dist/components/icon/icons/indeterminate-icon.js +4 -4
- package/dist/components/icon/icons/info-icon.js +5 -5
- package/dist/components/icon/icons/inheritance-icon.js +5 -5
- package/dist/components/icon/icons/just-eat-icon.js +5 -5
- package/dist/components/icon/icons/karma-icon.js +5 -5
- package/dist/components/icon/icons/key-command-icon.js +5 -5
- package/dist/components/icon/icons/key-enter-icon.js +5 -5
- package/dist/components/icon/icons/key-icon.js +5 -5
- package/dist/components/icon/icons/key-option-icon.js +5 -5
- package/dist/components/icon/icons/language-icon.js +5 -5
- package/dist/components/icon/icons/link-broken-icon.js +5 -5
- package/dist/components/icon/icons/link-external-icon.js +5 -5
- package/dist/components/icon/icons/link-icon.js +5 -5
- package/dist/components/icon/icons/list-ol-icon.js +5 -5
- package/dist/components/icon/icons/list-ul-icon.js +5 -5
- package/dist/components/icon/icons/loading-icon.js +5 -5
- package/dist/components/icon/icons/location-icon.js +5 -5
- package/dist/components/icon/icons/lock-icon.js +5 -5
- package/dist/components/icon/icons/log-in-icon.js +5 -5
- package/dist/components/icon/icons/log-out-icon.js +5 -5
- package/dist/components/icon/icons/map-icon.js +5 -5
- package/dist/components/icon/icons/maximize-icon.js +5 -5
- package/dist/components/icon/icons/members-icon.js +5 -5
- package/dist/components/icon/icons/menu-hide-icon.js +5 -5
- package/dist/components/icon/icons/menu-icon.js +5 -5
- package/dist/components/icon/icons/menu-show-icon.js +5 -5
- package/dist/components/icon/icons/message-add-icon.js +5 -5
- package/dist/components/icon/icons/message-icon.js +5 -5
- package/dist/components/icon/icons/message-lines-icon.js +5 -5
- package/dist/components/icon/icons/minimize-icon.js +5 -5
- package/dist/components/icon/icons/minimize-window-icon.js +5 -5
- package/dist/components/icon/icons/mobile-rotate-icon.js +5 -5
- package/dist/components/icon/icons/module-accounting-icon.js +5 -5
- package/dist/components/icon/icons/module-ai-forecast-icon.js +5 -5
- package/dist/components/icon/icons/module-app-icon.js +5 -5
- package/dist/components/icon/icons/module-articles-icon.js +5 -5
- package/dist/components/icon/icons/module-benchmark-icon.js +5 -5
- package/dist/components/icon/icons/module-booking-icon.js +5 -5
- package/dist/components/icon/icons/module-cai-icon.js +5 -5
- package/dist/components/icon/icons/module-campaigns-icon.js +5 -5
- package/dist/components/icon/icons/module-cashier-icon.js +5 -5
- package/dist/components/icon/icons/module-communication-icon.js +5 -5
- package/dist/components/icon/icons/module-copilot-icon.js +5 -5
- package/dist/components/icon/icons/module-dashboard-icon.js +5 -5
- package/dist/components/icon/icons/module-document-icon.js +5 -5
- package/dist/components/icon/icons/module-employees-icon.js +5 -5
- package/dist/components/icon/icons/module-feed-icon.js +5 -5
- package/dist/components/icon/icons/module-history-icon.js +5 -5
- package/dist/components/icon/icons/module-home-icon.js +5 -5
- package/dist/components/icon/icons/module-insights-icon.js +5 -5
- package/dist/components/icon/icons/module-kds-icon.js +5 -5
- package/dist/components/icon/icons/module-members-icon.js +5 -5
- package/dist/components/icon/icons/module-menus-icon.js +5 -5
- package/dist/components/icon/icons/module-my-city-icon.js +5 -5
- package/dist/components/icon/icons/module-notification-center-icon.js +5 -5
- package/dist/components/icon/icons/module-online-order-icon.js +5 -5
- package/dist/components/icon/icons/module-organisation-icon.js +5 -5
- package/dist/components/icon/icons/module-pos-icon.js +5 -5
- package/dist/components/icon/icons/module-pulse-icon.js +5 -5
- package/dist/components/icon/icons/module-result-icon.js +5 -5
- package/dist/components/icon/icons/module-salary-icon.js +5 -5
- package/dist/components/icon/icons/module-schedule-icon.js +5 -5
- package/dist/components/icon/icons/module-settings-alt-icon.js +5 -5
- package/dist/components/icon/icons/module-settings-icon.js +5 -5
- package/dist/components/icon/icons/module-support-icon.js +5 -5
- package/dist/components/icon/icons/module-survey-icon.js +5 -5
- package/dist/components/icon/icons/module-table-map-icon.js +6 -6
- package/dist/components/icon/icons/module-tablet-icon.js +5 -5
- package/dist/components/icon/icons/module-time-icon.js +5 -5
- package/dist/components/icon/icons/module-timeline-icon.js +5 -5
- package/dist/components/icon/icons/module-tip-icon.js +5 -5
- package/dist/components/icon/icons/module-to-do-icon.js +5 -5
- package/dist/components/icon/icons/module-tools-icon.js +5 -5
- package/dist/components/icon/icons/module-top-list-icon.js +5 -5
- package/dist/components/icon/icons/module-web-charts-icon.js +5 -5
- package/dist/components/icon/icons/module-web-icon.js +5 -5
- package/dist/components/icon/icons/more-horizontal-icon.js +5 -5
- package/dist/components/icon/icons/more-vertical-icon.js +5 -5
- package/dist/components/icon/icons/nfc-icon.js +5 -5
- package/dist/components/icon/icons/no-cart-icon.js +5 -5
- package/dist/components/icon/icons/note-icon.js +5 -5
- package/dist/components/icon/icons/number-icon.js +6 -6
- package/dist/components/icon/icons/open-modal-icon.js +5 -5
- package/dist/components/icon/icons/parking-icon.js +5 -5
- package/dist/components/icon/icons/party-horn-icon.js +5 -5
- package/dist/components/icon/icons/paste-icon.js +5 -5
- package/dist/components/icon/icons/pause-icon.js +5 -5
- package/dist/components/icon/icons/payment-card-icon.js +5 -5
- package/dist/components/icon/icons/payment-cash-icon.js +5 -5
- package/dist/components/icon/icons/payment-generic-icon.js +5 -5
- package/dist/components/icon/icons/payment-giftcard-icon.js +5 -5
- package/dist/components/icon/icons/payment-hotel-icon.js +5 -5
- package/dist/components/icon/icons/payment-invoice-icon.js +5 -5
- package/dist/components/icon/icons/percentage-icon.js +5 -5
- package/dist/components/icon/icons/phone-icon.js +5 -5
- package/dist/components/icon/icons/pin-icon.js +5 -5
- package/dist/components/icon/icons/pin-map-icon.js +5 -5
- package/dist/components/icon/icons/play-icon.js +5 -5
- package/dist/components/icon/icons/preview-icon.js +5 -5
- package/dist/components/icon/icons/print-icon.js +5 -5
- package/dist/components/icon/icons/privacy-icon.js +5 -5
- package/dist/components/icon/icons/product-admin-icon.js +5 -5
- package/dist/components/icon/icons/product-analytics-icon.js +5 -5
- package/dist/components/icon/icons/product-booking-icon.js +5 -5
- package/dist/components/icon/icons/product-checkout-icon.js +5 -5
- package/dist/components/icon/icons/product-my-pages-icon.js +5 -5
- package/dist/components/icon/icons/product-staff-icon.js +5 -5
- package/dist/components/icon/icons/puck-icon.js +5 -5
- package/dist/components/icon/icons/qr-code-icon.js +5 -5
- package/dist/components/icon/icons/question-icon.js +5 -5
- package/dist/components/icon/icons/radio-icon.js +5 -5
- package/dist/components/icon/icons/receipt-icon.js +5 -5
- package/dist/components/icon/icons/redo-icon.js +5 -5
- package/dist/components/icon/icons/refund-icon.js +5 -5
- package/dist/components/icon/icons/remove-icon.js +5 -5
- package/dist/components/icon/icons/replace-icon.js +5 -5
- package/dist/components/icon/icons/schedule-icon.js +5 -5
- package/dist/components/icon/icons/search-icon.js +5 -5
- package/dist/components/icon/icons/select-icon.js +4 -4
- package/dist/components/icon/icons/send-icon.js +5 -5
- package/dist/components/icon/icons/share-icon.js +5 -5
- package/dist/components/icon/icons/show-icon.js +5 -5
- package/dist/components/icon/icons/shuffle-icon.js +5 -5
- package/dist/components/icon/icons/sidebar-hide-icon.js +4 -4
- package/dist/components/icon/icons/sidebar-left-icon.js +4 -4
- package/dist/components/icon/icons/sidebar-right-icon.js +5 -5
- package/dist/components/icon/icons/sidebar-show-icon.js +5 -5
- package/dist/components/icon/icons/sliders-icon.js +5 -5
- package/dist/components/icon/icons/slightly-sad-icon.js +5 -5
- package/dist/components/icon/icons/smile-icon.js +5 -5
- package/dist/components/icon/icons/sort-asc-icon.js +5 -5
- package/dist/components/icon/icons/sort-desc-icon.js +5 -5
- package/dist/components/icon/icons/split-icon.js +5 -5
- package/dist/components/icon/icons/status-icon.js +5 -5
- package/dist/components/icon/icons/stop-icon.js +5 -5
- package/dist/components/icon/icons/submenu-icon.js +5 -5
- package/dist/components/icon/icons/success-icon.js +5 -5
- package/dist/components/icon/icons/swap-icon.js +5 -5
- package/dist/components/icon/icons/swatch-icon.js +5 -5
- package/dist/components/icon/icons/sweat-icon.js +5 -5
- package/dist/components/icon/icons/table-icon.js +5 -5
- package/dist/components/icon/icons/table-map-icon.js +5 -5
- package/dist/components/icon/icons/take-away-dot-com-icon.js +5 -5
- package/dist/components/icon/icons/take-away-icon.js +5 -5
- package/dist/components/icon/icons/talk-icon.js +5 -5
- package/dist/components/icon/icons/thumbtack-icon.js +5 -5
- package/dist/components/icon/icons/time-icon.js +5 -5
- package/dist/components/icon/icons/timeline-icon.js +5 -5
- package/dist/components/icon/icons/tip-icon.js +5 -5
- package/dist/components/icon/icons/title-icon.js +5 -5
- package/dist/components/icon/icons/translate-icon.js +5 -5
- package/dist/components/icon/icons/tree-view-collapse-icon.js +4 -4
- package/dist/components/icon/icons/tree-view-expand-icon.js +4 -4
- package/dist/components/icon/icons/tree-view-last-icon.js +4 -4
- package/dist/components/icon/icons/trend-down-icon.js +5 -5
- package/dist/components/icon/icons/trend-up-icon.js +5 -5
- package/dist/components/icon/icons/triangle-warning-icon.js +5 -5
- package/dist/components/icon/icons/trivec-icon.js +6 -6
- package/dist/components/icon/icons/uber-eats-icon.js +5 -5
- package/dist/components/icon/icons/undo-icon.js +5 -5
- package/dist/components/icon/icons/unlock-icon.js +5 -5
- package/dist/components/icon/icons/unwrap-content-icon.js +5 -5
- package/dist/components/icon/icons/up-icon.js +5 -5
- package/dist/components/icon/icons/user-group-icon.js +5 -5
- package/dist/components/icon/icons/user-icon.js +5 -5
- package/dist/components/icon/icons/user-permissions-icon.js +5 -5
- package/dist/components/icon/icons/user-wait-icon.js +5 -5
- package/dist/components/icon/icons/users-icon.js +5 -5
- package/dist/components/icon/icons/version-control-icon.js +5 -5
- package/dist/components/icon/icons/volume-high-icon.js +5 -5
- package/dist/components/icon/icons/volume-icon.js +5 -5
- package/dist/components/icon/icons/volume-low-icon.js +5 -5
- package/dist/components/icon/icons/volume-off-icon.js +5 -5
- package/dist/components/icon/icons/warning-icon.js +5 -5
- package/dist/components/icon/icons/waste-icon.js +5 -5
- package/dist/components/icon/icons/wifi-icon.js +5 -5
- package/dist/components/icon/icons/wifi-off-icon.js +5 -5
- package/dist/components/icon/icons/wolt-icon.js +5 -5
- package/dist/components/icon/icons/wrap-content-icon.js +5 -5
- package/dist/components/icon-button/icon-button.js +37 -39
- package/dist/components/image/image.js +12 -14
- package/dist/components/image-upload/image-cropper.helper.js +74 -82
- package/dist/components/image-upload/image-cropper.js +156 -183
- package/dist/components/image-upload/image-upload-dropzone.js +134 -112
- package/dist/components/image-upload/image-upload-helper.js +15 -19
- package/dist/components/image-upload/image-upload-icons.js +52 -20
- package/dist/components/image-upload/image-upload-modal.js +131 -106
- package/dist/components/image-upload/image-upload.js +96 -86
- package/dist/components/image-upload/translations.js +65 -65
- package/dist/components/image-upload/types.js +6 -4
- package/dist/components/input/helper.js +18 -29
- package/dist/components/input/input-addon-recipe.js +37 -43
- package/dist/components/input/input-recipe.js +124 -133
- package/dist/components/input/input.js +78 -83
- package/dist/components/link/link-recipe.js +18 -22
- package/dist/components/link/link.js +14 -14
- package/dist/components/list/list-item.js +15 -15
- package/dist/components/list/list.js +19 -20
- package/dist/components/menu/helper.js +12 -16
- package/dist/components/menu/menu-box-button.js +22 -18
- package/dist/components/menu/menu-button.js +18 -16
- package/dist/components/menu/menu-divider.js +31 -28
- package/dist/components/menu/menu-group.js +138 -142
- package/dist/components/menu/menu-icon-button.js +13 -11
- package/dist/components/menu/menu-item.js +44 -45
- package/dist/components/menu/menu-list.js +14 -15
- package/dist/components/menu/menu-recipe.js +67 -81
- package/dist/components/menu/menu.js +34 -41
- package/dist/components/message/message.js +52 -38
- package/dist/components/modal/modal-body-context.js +6 -7
- package/dist/components/modal/modal-body.js +17 -17
- package/dist/components/modal/modal-close-button.js +23 -18
- package/dist/components/modal/modal-footer.js +29 -32
- package/dist/components/modal/modal-header.js +17 -17
- package/dist/components/modal/modal-recipe.js +110 -141
- package/dist/components/modal/modal.js +54 -58
- package/dist/components/navigation-list/navigation-list-item.js +76 -88
- package/dist/components/navigation-list/navigation-list.js +23 -17
- package/dist/components/paginator/paginator-recipe.js +34 -40
- package/dist/components/paginator/paginator.js +65 -70
- package/dist/components/paginator/translations.js +35 -35
- package/dist/components/phone-input/country-data.js +31 -36
- package/dist/components/phone-input/country-list.js +45 -25
- package/dist/components/phone-input/country-selector.js +167 -115
- package/dist/components/phone-input/phone-input-helpers.js +91 -119
- package/dist/components/phone-input/phone-input.js +47 -42
- package/dist/components/phone-input/translations.js +53 -53
- package/dist/components/phone-input/use-phone-input.js +110 -137
- package/dist/components/quantity-button/minus-button.js +18 -16
- package/dist/components/quantity-button/plus-button.js +18 -16
- package/dist/components/quantity-button/quantity-button.js +72 -40
- package/dist/components/radio/check-icon.js +5 -5
- package/dist/components/radio/hover-styles.js +21 -36
- package/dist/components/radio/radio-group-context.js +5 -6
- package/dist/components/radio/radio-group-recipe.js +124 -142
- package/dist/components/radio/radio-group.js +30 -28
- package/dist/components/radio/radio.js +72 -55
- package/dist/components/radio-card/hover-styles.js +21 -36
- package/dist/components/radio-card/radio-card-group.js +24 -25
- package/dist/components/radio-card/radio-card.js +87 -67
- package/dist/components/rich-text-editor/boolean-control.js +51 -54
- package/dist/components/rich-text-editor/extensions.js +39 -34
- package/dist/components/rich-text-editor/index.js +26 -22
- package/dist/components/rich-text-editor/rich-text-editor-context.js +9 -11
- package/dist/components/rich-text-editor/rich-text-editor-control.js +290 -284
- package/dist/components/rich-text-editor/rich-text-editor-recipe.js +71 -83
- package/dist/components/rich-text-editor/rich-text-editor.js +72 -69
- package/dist/components/rich-text-editor/rich-text-renderer.js +32 -32
- package/dist/components/rich-text-editor/translations.js +119 -119
- package/dist/components/rich-text-editor/use-rich-text-editor.js +22 -29
- package/dist/components/segmented-control/segmented-control-item.js +24 -25
- package/dist/components/segmented-control/segmented-control.js +49 -40
- package/dist/components/select/select-recipe.js +91 -106
- package/dist/components/select/select.js +27 -29
- package/dist/components/skeleton/skeleton-text.js +18 -19
- package/dist/components/skeleton/skeleton.js +19 -20
- package/dist/components/spinner/spinner.js +44 -28
- package/dist/components/stack/stack.js +18 -18
- package/dist/components/stepper/check-icon.js +5 -5
- package/dist/components/stepper/step-context.js +5 -5
- package/dist/components/stepper/step.js +111 -106
- package/dist/components/stepper/stepper.js +42 -43
- package/dist/components/stepper/times-icon.js +5 -5
- package/dist/components/switch/hover-styles.js +30 -44
- package/dist/components/switch/switch-recipe.js +76 -84
- package/dist/components/switch/switch.d.ts +3 -3
- package/dist/components/switch/switch.d.ts.map +1 -1
- package/dist/components/switch/switch.js +30 -31
- package/dist/components/switch/types.d.ts +4 -2
- package/dist/components/switch/types.d.ts.map +1 -1
- package/dist/components/table/helper.d.ts +6 -0
- package/dist/components/table/helper.d.ts.map +1 -1
- package/dist/components/table/helper.js +29 -9
- package/dist/components/table/index.d.ts +1 -1
- package/dist/components/table/index.d.ts.map +1 -1
- package/dist/components/table/table-cell.d.ts.map +1 -1
- package/dist/components/table/table-cell.js +136 -122
- package/dist/components/table/table-column-resize-handle.d.ts +12 -0
- package/dist/components/table/table-column-resize-handle.d.ts.map +1 -0
- package/dist/components/table/table-column-resize-handle.js +69 -0
- package/dist/components/table/table-content.d.ts.map +1 -1
- package/dist/components/table/table-content.js +174 -98
- package/dist/components/table/table-context-provider.d.ts +7 -2
- package/dist/components/table/table-context-provider.d.ts.map +1 -1
- package/dist/components/table/table-context-provider.js +203 -151
- package/dist/components/table/table-context.d.ts +24 -0
- package/dist/components/table/table-context.d.ts.map +1 -1
- package/dist/components/table/table-context.js +18 -11
- package/dist/components/table/table-filter.js +170 -118
- package/dist/components/table/table-header-dropdown.js +131 -89
- package/dist/components/table/table-header-row.d.ts.map +1 -1
- package/dist/components/table/table-header-row.js +202 -140
- package/dist/components/table/table-recipe.d.ts.map +1 -1
- package/dist/components/table/table-recipe.js +75 -96
- package/dist/components/table/table-row-expand-toggle-button.js +28 -35
- package/dist/components/table/table-row.d.ts.map +1 -1
- package/dist/components/table/table-row.js +51 -41
- package/dist/components/table/table-toolbar-actions.js +19 -19
- package/dist/components/table/table-toolbar-add-button.js +18 -13
- package/dist/components/table/table-toolbar-search.js +17 -12
- package/dist/components/table/table-toolbar-settings.js +180 -133
- package/dist/components/table/table-toolbar.js +72 -51
- package/dist/components/table/table.composition.d.ts +1 -0
- package/dist/components/table/table.composition.d.ts.map +1 -1
- package/dist/components/table/table.constants.d.ts +4 -0
- package/dist/components/table/table.constants.d.ts.map +1 -1
- package/dist/components/table/table.constants.js +9 -4
- package/dist/components/table/table.d.ts +1 -1
- package/dist/components/table/table.d.ts.map +1 -1
- package/dist/components/table/table.js +41 -37
- package/dist/components/table/translations.d.ts +7 -0
- package/dist/components/table/translations.d.ts.map +1 -1
- package/dist/components/table/translations.js +199 -194
- package/dist/components/table/types.d.ts +33 -2
- package/dist/components/table/types.d.ts.map +1 -1
- package/dist/components/tabs/tab-list.js +16 -17
- package/dist/components/tabs/tab-panel.js +14 -14
- package/dist/components/tabs/tab-panels.js +15 -15
- package/dist/components/tabs/tab-with-image.js +60 -53
- package/dist/components/tabs/tab.js +26 -22
- package/dist/components/tabs/tabs-recipe.js +96 -116
- package/dist/components/tabs/tabs.js +25 -24
- package/dist/components/tag/tag-recipe.js +225 -252
- package/dist/components/tag/tag.js +121 -62
- package/dist/components/text/text-recipe.js +3 -8
- package/dist/components/text/text.js +26 -27
- package/dist/components/textarea/textarea-recipe.js +90 -96
- package/dist/components/textarea/textarea.js +19 -19
- package/dist/components/toaster/toast-store.d.ts +2 -2
- package/dist/components/toaster/toast-store.d.ts.map +1 -1
- package/dist/components/toaster/toast-store.js +25 -32
- package/dist/components/toaster/toaster.js +39 -34
- package/dist/components/toggle-button/toggle-button.js +23 -25
- package/dist/components/toggle-button/use-button-children.js +36 -35
- package/dist/components/tooltip/tooltip.js +43 -47
- package/dist/hooks/use-color-mode.js +17 -22
- package/dist/hooks/use-disclosure.js +10 -13
- package/dist/hooks/use-measured-width.js +21 -21
- package/dist/hooks/use-remove-attributes.js +25 -24
- package/dist/index.js +396 -802
- package/dist/node_modules/@dnd-kit/abstract/index.js +658 -1185
- package/dist/node_modules/@dnd-kit/collision/dist/index.js +51 -90
- package/dist/node_modules/@dnd-kit/dom/index.js +1256 -1518
- package/dist/node_modules/@dnd-kit/dom/sortable.js +529 -654
- package/dist/node_modules/@dnd-kit/dom/utilities.js +772 -940
- package/dist/node_modules/@dnd-kit/geometry/dist/index.js +228 -196
- package/dist/node_modules/@dnd-kit/react/hooks.js +51 -63
- package/dist/node_modules/@dnd-kit/react/index.js +175 -235
- package/dist/node_modules/@dnd-kit/react/sortable.js +67 -142
- package/dist/node_modules/@dnd-kit/react/utilities.js +7 -9
- package/dist/node_modules/@dnd-kit/state/dist/index.js +157 -172
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +154 -243
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +294 -369
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +95 -133
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +96 -122
- package/dist/node_modules/@preact/signals-core/dist/signals-core.module.js +249 -264
- package/dist/node_modules/@tanstack/react-table/build/lib/index.js +34 -88
- package/dist/node_modules/@tanstack/react-virtual/dist/esm/index.js +74 -88
- package/dist/node_modules/@tanstack/table-core/build/lib/index.js +1463 -1822
- package/dist/node_modules/@tanstack/virtual-core/dist/esm/index.js +633 -768
- package/dist/node_modules/@tanstack/virtual-core/dist/esm/lazy-measurements.js +30 -32
- package/dist/node_modules/@tanstack/virtual-core/dist/esm/utils.js +35 -48
- package/dist/node_modules/@tiptap/core/dist/index.js +3433 -3946
- package/dist/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js +19 -19
- package/dist/node_modules/@tiptap/extension-blockquote/dist/index.js +73 -1498
- package/dist/node_modules/@tiptap/extension-bold/dist/index.js +71 -84
- package/dist/node_modules/@tiptap/extension-code/dist/index.js +65 -70
- package/dist/node_modules/@tiptap/extension-code-block/dist/index.js +155 -216
- package/dist/node_modules/@tiptap/extension-document/dist/index.js +9 -11
- package/dist/node_modules/@tiptap/extension-hard-break/dist/index.js +48 -60
- package/dist/node_modules/@tiptap/extension-heading/dist/index.js +65 -66
- package/dist/node_modules/@tiptap/extension-horizontal-rule/dist/index.js +47 -55
- package/dist/node_modules/@tiptap/extension-italic/dist/index.js +68 -82
- package/dist/node_modules/@tiptap/extension-link/dist/index.js +365 -334
- package/dist/node_modules/@tiptap/extension-list/dist/index.js +936 -1105
- package/dist/node_modules/@tiptap/extension-paragraph/dist/index.js +43 -48
- package/dist/node_modules/@tiptap/extension-strike/dist/index.js +53 -65
- package/dist/node_modules/@tiptap/extension-text/dist/index.js +12 -12
- package/dist/node_modules/@tiptap/extension-underline/dist/index.js +60 -64
- package/dist/node_modules/@tiptap/extensions/dist/index.js +439 -462
- package/dist/node_modules/@tiptap/react/dist/index.js +314 -0
- package/dist/node_modules/@tiptap/starter-kit/dist/index.js +23 -24
- package/dist/node_modules/country-flag-icons/modules/countries.json.js +4 -4
- package/dist/node_modules/country-flag-icons/modules/hasFlag.js +6 -6
- package/dist/node_modules/country-flag-icons/modules/react/3x2/index.js +5469 -6298
- package/dist/node_modules/country-flag-icons/react/3x2/index.js +273 -269
- package/dist/node_modules/date-fns/_lib/addLeadingZeros.js +5 -6
- package/dist/node_modules/date-fns/_lib/defaultOptions.js +6 -6
- package/dist/node_modules/date-fns/_lib/format/formatters.js +385 -544
- package/dist/node_modules/date-fns/_lib/format/lightFormatters.js +42 -57
- package/dist/node_modules/date-fns/_lib/format/longFormatters.js +37 -48
- package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +7 -17
- package/dist/node_modules/date-fns/_lib/normalizeDates.js +6 -9
- package/dist/node_modules/date-fns/_lib/protectedTokens.js +19 -16
- package/dist/node_modules/date-fns/addDays.js +8 -8
- package/dist/node_modules/date-fns/addMonths.js +11 -18
- package/dist/node_modules/date-fns/addWeeks.js +6 -6
- package/dist/node_modules/date-fns/constants.js +10 -6
- package/dist/node_modules/date-fns/constructFrom.js +6 -6
- package/dist/node_modules/date-fns/constructNow.js +6 -6
- package/dist/node_modules/date-fns/differenceInCalendarDays.js +10 -14
- package/dist/node_modules/date-fns/endOfDay.js +7 -7
- package/dist/node_modules/date-fns/endOfMonth.js +7 -7
- package/dist/node_modules/date-fns/format.js +57 -55
- package/dist/node_modules/date-fns/getDayOfYear.js +9 -9
- package/dist/node_modules/date-fns/getISOWeek.js +10 -10
- package/dist/node_modules/date-fns/getISOWeekYear.js +13 -13
- package/dist/node_modules/date-fns/getWeek.js +10 -10
- package/dist/node_modules/date-fns/getWeekYear.js +14 -14
- package/dist/node_modules/date-fns/isBefore.js +6 -6
- package/dist/node_modules/date-fns/isDate.js +5 -5
- package/dist/node_modules/date-fns/isPast.js +6 -6
- package/dist/node_modules/date-fns/isSameDay.js +8 -12
- package/dist/node_modules/date-fns/isSameMonth.js +7 -11
- package/dist/node_modules/date-fns/isSameWeek.js +8 -12
- package/dist/node_modules/date-fns/isSameYear.js +7 -11
- package/dist/node_modules/date-fns/isToday.js +7 -10
- package/dist/node_modules/date-fns/isValid.js +7 -7
- package/dist/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +8 -8
- package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +16 -17
- package/dist/node_modules/date-fns/locale/_lib/buildMatchFn.js +19 -28
- package/dist/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +17 -14
- package/dist/node_modules/date-fns/locale/da/_lib/formatDistance.js +68 -69
- package/dist/node_modules/date-fns/locale/da/_lib/formatLong.js +31 -32
- package/dist/node_modules/date-fns/locale/da/_lib/formatRelative.js +11 -11
- package/dist/node_modules/date-fns/locale/da/_lib/localize.js +193 -142
- package/dist/node_modules/date-fns/locale/da/_lib/match.js +123 -109
- package/dist/node_modules/date-fns/locale/da.js +17 -17
- package/dist/node_modules/date-fns/locale/en-GB/_lib/formatLong.js +31 -32
- package/dist/node_modules/date-fns/locale/en-GB.js +18 -18
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +68 -69
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatLong.js +31 -32
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +11 -11
- package/dist/node_modules/date-fns/locale/en-US/_lib/localize.js +200 -153
- package/dist/node_modules/date-fns/locale/en-US/_lib/match.js +123 -109
- package/dist/node_modules/date-fns/locale/en-US.js +18 -18
- package/dist/node_modules/date-fns/locale/es/_lib/formatDistance.js +68 -69
- package/dist/node_modules/date-fns/locale/es/_lib/formatLong.js +31 -32
- package/dist/node_modules/date-fns/locale/es/_lib/formatRelative.js +18 -18
- package/dist/node_modules/date-fns/locale/es/_lib/localize.js +192 -141
- package/dist/node_modules/date-fns/locale/es/_lib/match.js +127 -114
- package/dist/node_modules/date-fns/locale/es.js +18 -18
- package/dist/node_modules/date-fns/locale/et/_lib/formatDistance.js +161 -162
- package/dist/node_modules/date-fns/locale/et/_lib/formatLong.js +31 -32
- package/dist/node_modules/date-fns/locale/et/_lib/formatRelative.js +11 -11
- package/dist/node_modules/date-fns/locale/et/_lib/localize.js +196 -152
- package/dist/node_modules/date-fns/locale/et/_lib/match.js +109 -107
- package/dist/node_modules/date-fns/locale/et.js +19 -19
- package/dist/node_modules/date-fns/locale/fi/_lib/formatDistance.js +101 -101
- package/dist/node_modules/date-fns/locale/fi/_lib/formatLong.js +31 -32
- package/dist/node_modules/date-fns/locale/fi/_lib/formatRelative.js +11 -11
- package/dist/node_modules/date-fns/locale/fi/_lib/localize.js +192 -140
- package/dist/node_modules/date-fns/locale/fi/_lib/match.js +122 -108
- package/dist/node_modules/date-fns/locale/fi.js +18 -18
- package/dist/node_modules/date-fns/locale/fr/_lib/formatDistance.js +68 -69
- package/dist/node_modules/date-fns/locale/fr/_lib/formatLong.js +31 -32
- package/dist/node_modules/date-fns/locale/fr/_lib/formatRelative.js +11 -11
- package/dist/node_modules/date-fns/locale/fr/_lib/localize.js +176 -120
- package/dist/node_modules/date-fns/locale/fr/_lib/match.js +122 -108
- package/dist/node_modules/date-fns/locale/fr.js +18 -18
- package/dist/node_modules/date-fns/locale/lt/_lib/formatDistance.js +93 -109
- package/dist/node_modules/date-fns/locale/lt/_lib/formatLong.js +31 -32
- package/dist/node_modules/date-fns/locale/lt/_lib/formatRelative.js +11 -11
- package/dist/node_modules/date-fns/locale/lt/_lib/localize.js +298 -195
- package/dist/node_modules/date-fns/locale/lt/_lib/match.js +154 -121
- package/dist/node_modules/date-fns/locale/lt.js +19 -19
- package/dist/node_modules/date-fns/locale/lv/_lib/formatDistance.js +226 -120
- package/dist/node_modules/date-fns/locale/lv/_lib/formatLong.js +31 -32
- package/dist/node_modules/date-fns/locale/lv/_lib/formatRelative.js +22 -22
- package/dist/node_modules/date-fns/locale/lv/_lib/localize.js +298 -221
- package/dist/node_modules/date-fns/locale/lv/_lib/match.js +138 -112
- package/dist/node_modules/date-fns/locale/lv.js +18 -18
- package/dist/node_modules/date-fns/locale/nb/_lib/formatDistance.js +68 -69
- package/dist/node_modules/date-fns/locale/nb/_lib/formatLong.js +31 -32
- package/dist/node_modules/date-fns/locale/nb/_lib/formatRelative.js +11 -11
- package/dist/node_modules/date-fns/locale/nb/_lib/localize.js +159 -108
- package/dist/node_modules/date-fns/locale/nb/_lib/match.js +112 -108
- package/dist/node_modules/date-fns/locale/nb.js +18 -18
- package/dist/node_modules/date-fns/locale/nl/_lib/formatDistance.js +68 -69
- package/dist/node_modules/date-fns/locale/nl/_lib/formatLong.js +31 -32
- package/dist/node_modules/date-fns/locale/nl/_lib/formatRelative.js +11 -11
- package/dist/node_modules/date-fns/locale/nl/_lib/localize.js +160 -109
- package/dist/node_modules/date-fns/locale/nl/_lib/match.js +120 -108
- package/dist/node_modules/date-fns/locale/nl-BE/_lib/formatDistance.js +68 -69
- package/dist/node_modules/date-fns/locale/nl-BE/_lib/formatLong.js +31 -32
- package/dist/node_modules/date-fns/locale/nl-BE/_lib/formatRelative.js +11 -11
- package/dist/node_modules/date-fns/locale/nl-BE/_lib/localize.js +160 -109
- package/dist/node_modules/date-fns/locale/nl-BE/_lib/match.js +120 -108
- package/dist/node_modules/date-fns/locale/nl-BE.js +18 -18
- package/dist/node_modules/date-fns/locale/nl.js +18 -18
- package/dist/node_modules/date-fns/locale/sv/_lib/formatDistance.js +82 -86
- package/dist/node_modules/date-fns/locale/sv/_lib/formatLong.js +31 -32
- package/dist/node_modules/date-fns/locale/sv/_lib/formatRelative.js +11 -11
- package/dist/node_modules/date-fns/locale/sv/_lib/localize.js +199 -142
- package/dist/node_modules/date-fns/locale/sv/_lib/match.js +109 -107
- package/dist/node_modules/date-fns/locale/sv.js +18 -18
- package/dist/node_modules/date-fns/startOfDay.js +7 -7
- package/dist/node_modules/date-fns/startOfISOWeek.js +9 -6
- package/dist/node_modules/date-fns/startOfISOWeekYear.js +9 -9
- package/dist/node_modules/date-fns/startOfMonth.js +7 -7
- package/dist/node_modules/date-fns/startOfWeek.js +8 -8
- package/dist/node_modules/date-fns/startOfWeekYear.js +10 -10
- package/dist/node_modules/date-fns/startOfYear.js +7 -7
- package/dist/node_modules/date-fns/subDays.js +6 -6
- package/dist/node_modules/date-fns/subMonths.js +6 -6
- package/dist/node_modules/date-fns/subWeeks.js +6 -6
- package/dist/node_modules/date-fns/toDate.js +6 -6
- package/dist/node_modules/fast-equals/dist/es/index.js +239 -298
- package/dist/node_modules/libphonenumber-js/es6/ParseError.js +116 -89
- package/dist/node_modules/libphonenumber-js/es6/PhoneNumber.js +155 -183
- package/dist/node_modules/libphonenumber-js/es6/constants.js +4 -10
- package/dist/node_modules/libphonenumber-js/es6/format.js +70 -91
- package/dist/node_modules/libphonenumber-js/es6/getCountries.js +5 -5
- package/dist/node_modules/libphonenumber-js/es6/helpers/RFC3966.js +8 -10
- package/dist/node_modules/libphonenumber-js/es6/helpers/applyInternationalSeparatorStyle.js +5 -5
- package/dist/node_modules/libphonenumber-js/es6/helpers/checkNumberLength.js +19 -14
- package/dist/node_modules/libphonenumber-js/es6/helpers/extension/createExtensionPattern.js +9 -9
- package/dist/node_modules/libphonenumber-js/es6/helpers/extension/extractExtension.js +15 -17
- package/dist/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCode.js +35 -45
- package/dist/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js +20 -26
- package/dist/node_modules/libphonenumber-js/es6/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.js +17 -22
- package/dist/node_modules/libphonenumber-js/es6/helpers/extractNationalNumber.js +24 -36
- package/dist/node_modules/libphonenumber-js/es6/helpers/extractNationalNumberFromPossiblyIncompleteNumber.js +26 -30
- package/dist/node_modules/libphonenumber-js/es6/helpers/extractPhoneContext.js +13 -21
- package/dist/node_modules/libphonenumber-js/es6/helpers/formatNationalNumberUsingFormat.js +10 -24
- package/dist/node_modules/libphonenumber-js/es6/helpers/getCountryAndCallingCodeFromOneOfThem.js +10 -11
- package/dist/node_modules/libphonenumber-js/es6/helpers/getCountryByCallingCode.js +6 -8
- package/dist/node_modules/libphonenumber-js/es6/helpers/getCountryByNationalNumber.js +39 -39
- package/dist/node_modules/libphonenumber-js/es6/helpers/getIddPrefix.js +9 -11
- package/dist/node_modules/libphonenumber-js/es6/helpers/getNumberType.js +56 -47
- package/dist/node_modules/libphonenumber-js/es6/helpers/getPossibleCountriesForNumber.js +12 -12
- package/dist/node_modules/libphonenumber-js/es6/helpers/isCallingCode.js +5 -5
- package/dist/node_modules/libphonenumber-js/es6/helpers/isCountryCode.js +5 -5
- package/dist/node_modules/libphonenumber-js/es6/helpers/isObject.js +6 -6
- package/dist/node_modules/libphonenumber-js/es6/helpers/isViablePhoneNumber.js +9 -17
- package/dist/node_modules/libphonenumber-js/es6/helpers/matchesEntirely.js +5 -5
- package/dist/node_modules/libphonenumber-js/es6/helpers/mergeArrays.js +39 -0
- package/dist/node_modules/libphonenumber-js/es6/helpers/parseDigits.js +46 -77
- package/dist/node_modules/libphonenumber-js/es6/helpers/stripIddPrefix.js +17 -18
- package/dist/node_modules/libphonenumber-js/es6/isPossible.js +29 -32
- package/dist/node_modules/libphonenumber-js/es6/isValid.js +12 -13
- package/dist/node_modules/libphonenumber-js/es6/isValidPhoneNumber.js +55 -52
- package/dist/node_modules/libphonenumber-js/es6/metadata.js +462 -482
- package/dist/node_modules/libphonenumber-js/es6/normalizeArguments.js +97 -95
- package/dist/node_modules/libphonenumber-js/es6/parse.js +98 -133
- package/dist/node_modules/libphonenumber-js/es6/parseIncompletePhoneNumber.js +43 -35
- package/dist/node_modules/libphonenumber-js/es6/parsePhoneNumber.js +8 -8
- package/dist/node_modules/libphonenumber-js/es6/parsePhoneNumberWithError_.js +51 -48
- package/dist/node_modules/libphonenumber-js/es6/parsePhoneNumber_.js +59 -55
- package/dist/node_modules/libphonenumber-js/es6/tools/semver-compare.js +13 -13
- package/dist/node_modules/libphonenumber-js/metadata.min.json.js +7437 -3
- package/dist/node_modules/libphonenumber-js/min/exports/getCountries.js +6 -6
- package/dist/node_modules/libphonenumber-js/min/exports/getCountryCallingCode.js +6 -6
- package/dist/node_modules/libphonenumber-js/min/exports/isSupportedCountry.js +7 -7
- package/dist/node_modules/libphonenumber-js/min/exports/isValidPhoneNumber.js +6 -6
- package/dist/node_modules/libphonenumber-js/min/exports/parsePhoneNumber.js +7 -7
- package/dist/node_modules/libphonenumber-js/min/exports/withMetadataArgument.js +6 -6
- package/dist/node_modules/linkifyjs/dist/linkify.js +486 -679
- package/dist/node_modules/next-themes/dist/index.js +120 -85
- package/dist/node_modules/orderedmap/dist/index.js +64 -100
- package/dist/node_modules/prosemirror-commands/dist/index.js +313 -368
- package/dist/node_modules/prosemirror-dropcursor/dist/index.js +109 -84
- package/dist/node_modules/prosemirror-gapcursor/dist/index.js +162 -195
- package/dist/node_modules/prosemirror-history/dist/index.js +203 -239
- package/dist/node_modules/prosemirror-keymap/dist/index.js +45 -57
- package/dist/node_modules/prosemirror-model/dist/index.js +1783 -2735
- package/dist/node_modules/prosemirror-schema-list/dist/index.js +66 -81
- package/dist/node_modules/prosemirror-state/dist/index.js +517 -814
- package/dist/node_modules/prosemirror-transform/dist/index.js +1104 -1505
- package/dist/node_modules/prosemirror-view/dist/index.js +3274 -3782
- package/dist/node_modules/react/cjs/react-compiler-runtime.development.js +15 -21
- package/dist/node_modules/react/cjs/react-compiler-runtime.production.js +12 -14
- package/dist/node_modules/react/compiler-runtime.js +10 -10
- package/dist/node_modules/rope-sequence/dist/index.js +82 -99
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js +55 -58
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js +53 -57
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +53 -58
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +45 -46
- package/dist/node_modules/use-sync-external-store/shim/index.js +10 -10
- package/dist/node_modules/use-sync-external-store/shim/with-selector.js +10 -10
- package/dist/node_modules/w3c-keyname/index.js +87 -92
- package/dist/theme/component-recipes.js +52 -53
- package/dist/theme/theme-casper-ui.js +179 -420
- package/dist/theme/theme-helper.js +4 -4
- package/dist/theme/theme-provider.js +33 -34
- package/dist/theme/theme-style-props.d.ts.map +1 -1
- package/dist/theme/theme-tokens.js +22 -12
- package/dist/theme/theme-types.js +22 -12
- package/dist/theme/theme.js +213 -268
- package/package.json +30 -29
- package/dist/_virtual/compiler-runtime.js +0 -5
- package/dist/_virtual/compiler-runtime2.js +0 -4
- package/dist/_virtual/index.js +0 -5
- package/dist/_virtual/index2.js +0 -4
- package/dist/_virtual/react-compiler-runtime.development.js +0 -4
- package/dist/_virtual/react-compiler-runtime.production.js +0 -4
- package/dist/_virtual/use-sync-external-store-shim.development.js +0 -4
- package/dist/_virtual/use-sync-external-store-shim.production.js +0 -4
- package/dist/_virtual/with-selector.development.js +0 -4
- package/dist/_virtual/with-selector.js +0 -5
- package/dist/_virtual/with-selector.production.js +0 -4
- package/dist/_virtual/with-selector2.js +0 -4
- package/dist/packages/casper-ui-library/node_modules/@tiptap/react/dist/index.js +0 -506
|
@@ -1,1131 +1,962 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}),
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
[10, "x"],
|
|
129
|
-
[9, "ix"],
|
|
130
|
-
[5, "v"],
|
|
131
|
-
[4, "iv"],
|
|
132
|
-
[1, "i"]
|
|
133
|
-
], T = "abcdefghijklmnopqrstuvwxyz", pt = "[a-zA-Z]{1,2}", S = String.raw`\d+|[ivxlcdmIVXLCDM]+|${pt}`;
|
|
134
|
-
function A(t) {
|
|
135
|
-
let e = t, n = "";
|
|
136
|
-
for (const [s, r] of F)
|
|
137
|
-
for (; e >= s; )
|
|
138
|
-
n += r, e -= s;
|
|
139
|
-
return n;
|
|
1
|
+
import { Fragment as e } from "../../../prosemirror-model/dist/index.js";
|
|
2
|
+
import { Plugin as t, TextSelection as n } from "../../../prosemirror-state/dist/index.js";
|
|
3
|
+
import { Extension as r, Node as i, getNodeAtPosition as a, getNodeType as o, getPreviousBlockSibling as s, getRenderedAttributes as c, isAtEndOfNode as l, isAtStartOfNode as u, isNodeActive as d, mergeAttributes as f, parseIndentedBlocks as p, renderNestedMarkdownContent as m, wrappingInputRule as h } from "../../core/dist/index.js";
|
|
4
|
+
//#region ../../node_modules/@tiptap/extension-list/dist/index.js
|
|
5
|
+
var g = Object.defineProperty, _ = (e, t) => {
|
|
6
|
+
for (var n in t) g(e, n, {
|
|
7
|
+
get: t[n],
|
|
8
|
+
enumerable: !0
|
|
9
|
+
});
|
|
10
|
+
}, ee = "listItem", v = "textStyle", y = /^\s*([-+*])\s$/, b = i.create({
|
|
11
|
+
name: "bulletList",
|
|
12
|
+
addOptions() {
|
|
13
|
+
return {
|
|
14
|
+
itemTypeName: "listItem",
|
|
15
|
+
HTMLAttributes: {},
|
|
16
|
+
keepMarks: !1,
|
|
17
|
+
keepAttributes: !1
|
|
18
|
+
};
|
|
19
|
+
},
|
|
20
|
+
group: "block list",
|
|
21
|
+
content() {
|
|
22
|
+
return `${this.options.itemTypeName}+`;
|
|
23
|
+
},
|
|
24
|
+
parseHTML() {
|
|
25
|
+
return [{ tag: "ul" }];
|
|
26
|
+
},
|
|
27
|
+
renderHTML({ HTMLAttributes: e }) {
|
|
28
|
+
return [
|
|
29
|
+
"ul",
|
|
30
|
+
f(this.options.HTMLAttributes, e),
|
|
31
|
+
0
|
|
32
|
+
];
|
|
33
|
+
},
|
|
34
|
+
markdownTokenName: "list",
|
|
35
|
+
parseMarkdown: (e, t) => e.type !== "list" || e.ordered ? [] : {
|
|
36
|
+
type: "bulletList",
|
|
37
|
+
content: e.items ? t.parseChildren(e.items) : []
|
|
38
|
+
},
|
|
39
|
+
renderMarkdown: (e, t) => e.content ? t.renderChildren(e.content, "\n") : "",
|
|
40
|
+
markdownOptions: { indentsContent: !0 },
|
|
41
|
+
addCommands() {
|
|
42
|
+
return { toggleBulletList: () => ({ commands: e, chain: t }) => this.options.keepAttributes ? t().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(ee, this.editor.getAttributes(v)).run() : e.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks) };
|
|
43
|
+
},
|
|
44
|
+
addKeyboardShortcuts() {
|
|
45
|
+
return { "Mod-Shift-8": () => this.editor.commands.toggleBulletList() };
|
|
46
|
+
},
|
|
47
|
+
addInputRules() {
|
|
48
|
+
let e = h({
|
|
49
|
+
find: y,
|
|
50
|
+
type: this.type
|
|
51
|
+
});
|
|
52
|
+
return (this.options.keepMarks || this.options.keepAttributes) && (e = h({
|
|
53
|
+
find: y,
|
|
54
|
+
type: this.type,
|
|
55
|
+
keepMarks: this.options.keepMarks,
|
|
56
|
+
keepAttributes: this.options.keepAttributes,
|
|
57
|
+
getAttributes: () => this.editor.getAttributes(v),
|
|
58
|
+
editor: this.editor
|
|
59
|
+
})), [e];
|
|
60
|
+
}
|
|
61
|
+
}), te = (e, t, n) => {
|
|
62
|
+
let { selection: r } = e;
|
|
63
|
+
if (!r.empty) return null;
|
|
64
|
+
let { $from: i } = r;
|
|
65
|
+
if (!i.parent.isTextblock || i.parentOffset !== i.parent.content.size) return null;
|
|
66
|
+
let a = -1;
|
|
67
|
+
for (let e = i.depth; e > 0; --e) if (i.node(e).type.name === t) {
|
|
68
|
+
a = e;
|
|
69
|
+
break;
|
|
70
|
+
}
|
|
71
|
+
if (a < 0) return null;
|
|
72
|
+
let o = i.node(a), s = i.index(a);
|
|
73
|
+
if (s + 1 >= o.childCount) return null;
|
|
74
|
+
let c = o.child(s + 1);
|
|
75
|
+
if (!n.includes(c.type.name)) return null;
|
|
76
|
+
let l = e.schema.nodes[t], u = !1;
|
|
77
|
+
if (c.forEach((e) => {
|
|
78
|
+
e.type === l && e.childCount > 1 && (u = !0);
|
|
79
|
+
}), !u) return null;
|
|
80
|
+
let d = e.doc.resolve(i.after()).nodeAfter;
|
|
81
|
+
if (!d || !n.includes(d.type.name)) return null;
|
|
82
|
+
let f = [];
|
|
83
|
+
return d.forEach((e) => {
|
|
84
|
+
f.push(e);
|
|
85
|
+
}), f.length === 0 ? null : {
|
|
86
|
+
listItemDepth: a,
|
|
87
|
+
nestedList: d,
|
|
88
|
+
nestedListPos: i.after(),
|
|
89
|
+
insertPos: i.after(a),
|
|
90
|
+
items: f
|
|
91
|
+
};
|
|
92
|
+
}, ne = (t, n, r, i) => {
|
|
93
|
+
let a = te(t, r, i);
|
|
94
|
+
if (!a) return !1;
|
|
95
|
+
let { selection: o } = t, { nestedList: s, nestedListPos: c, insertPos: l, items: u } = a, d = t.tr;
|
|
96
|
+
d.delete(c, c + s.nodeSize);
|
|
97
|
+
let f = d.mapping.map(l);
|
|
98
|
+
return d.insert(f, e.from(u)), d.setSelection(o.map(d.doc, d.mapping)), n && n(d), !0;
|
|
99
|
+
}, re = (e, t, n) => ne(e.state, e.view.dispatch, t, n), x = (e, t) => r.create({
|
|
100
|
+
name: `${e}BranchingDeleteKeymap`,
|
|
101
|
+
priority: 101,
|
|
102
|
+
addKeyboardShortcuts() {
|
|
103
|
+
let n = () => re(this.editor, e, t);
|
|
104
|
+
return {
|
|
105
|
+
Delete: n,
|
|
106
|
+
"Mod-Delete": n
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
}), S = [
|
|
110
|
+
[1e3, "m"],
|
|
111
|
+
[900, "cm"],
|
|
112
|
+
[500, "d"],
|
|
113
|
+
[400, "cd"],
|
|
114
|
+
[100, "c"],
|
|
115
|
+
[90, "xc"],
|
|
116
|
+
[50, "l"],
|
|
117
|
+
[40, "xl"],
|
|
118
|
+
[10, "x"],
|
|
119
|
+
[9, "ix"],
|
|
120
|
+
[5, "v"],
|
|
121
|
+
[4, "iv"],
|
|
122
|
+
[1, "i"]
|
|
123
|
+
], C = "abcdefghijklmnopqrstuvwxyz", w = String.raw`\d+|[ivxlcdmIVXLCDM]+|${"[a-zA-Z]{1,2}"}`;
|
|
124
|
+
function T(e) {
|
|
125
|
+
let t = e, n = "";
|
|
126
|
+
for (let [e, r] of S) for (; t >= e;) n += r, t -= e;
|
|
127
|
+
return n;
|
|
140
128
|
}
|
|
141
|
-
function
|
|
142
|
-
|
|
129
|
+
function E(e) {
|
|
130
|
+
return T(e).toUpperCase();
|
|
143
131
|
}
|
|
144
|
-
function
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
return 0;
|
|
156
|
-
}
|
|
157
|
-
return s;
|
|
132
|
+
function D(e) {
|
|
133
|
+
let t = e.toLowerCase(), n = 0, r = 0;
|
|
134
|
+
for (; n < t.length;) {
|
|
135
|
+
let e = !1;
|
|
136
|
+
for (let [i, a] of S) if (t.startsWith(a, n)) {
|
|
137
|
+
r += i, n += a.length, e = !0;
|
|
138
|
+
break;
|
|
139
|
+
}
|
|
140
|
+
if (!e) return 0;
|
|
141
|
+
}
|
|
142
|
+
return r;
|
|
158
143
|
}
|
|
159
|
-
function
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
return e <= 0 ? !1 : (t === t.toLowerCase() ? A(e) : $(e)) === t;
|
|
144
|
+
function ie(e) {
|
|
145
|
+
if (!/^[ivxlcdmIVXLCDM]+$/.test(e)) return !1;
|
|
146
|
+
let t = D(e);
|
|
147
|
+
return t <= 0 ? !1 : (e === e.toLowerCase() ? T(t) : E(t)) === e;
|
|
164
148
|
}
|
|
165
|
-
function
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
return 0;
|
|
149
|
+
function ae(e) {
|
|
150
|
+
let t = e.toLowerCase();
|
|
151
|
+
if (t.length === 1) return t.charCodeAt(0) - 97 + 1;
|
|
152
|
+
if (t.length === 2) {
|
|
153
|
+
let e = t.charCodeAt(0) - 97, n = t.charCodeAt(1) - 97;
|
|
154
|
+
return (e + 1) * 26 + n + 1;
|
|
155
|
+
}
|
|
156
|
+
return 0;
|
|
174
157
|
}
|
|
175
|
-
function
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
return e < 0 ? T[n] : T[e] + T[n];
|
|
158
|
+
function O(e) {
|
|
159
|
+
if (e <= 26) return C[e - 1];
|
|
160
|
+
let t = Math.floor((e - 1) / 26) - 1, n = (e - 1) % 26;
|
|
161
|
+
return t < 0 ? C[n] : C[t] + C[n];
|
|
180
162
|
}
|
|
181
|
-
function
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
if (/^[A-Z]{1,2}$/.test(t))
|
|
188
|
-
return "A";
|
|
189
|
-
}
|
|
163
|
+
function k(e) {
|
|
164
|
+
if (!(!e || /^\d+$/.test(e))) {
|
|
165
|
+
if (ie(e)) return e === e.toLowerCase() ? "i" : "I";
|
|
166
|
+
if (/^[a-z]{1,2}$/.test(e)) return "a";
|
|
167
|
+
if (/^[A-Z]{1,2}$/.test(e)) return "A";
|
|
168
|
+
}
|
|
190
169
|
}
|
|
191
|
-
function
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
const n = parseInt(t, 10);
|
|
202
|
-
return Number.isNaN(n) ? 1 : n;
|
|
170
|
+
function A(e) {
|
|
171
|
+
if (/^\d+$/.test(e)) return parseInt(e, 10);
|
|
172
|
+
let t = k(e);
|
|
173
|
+
if (t === "i" || t === "I") return D(e);
|
|
174
|
+
if (t === "a" || t === "A") {
|
|
175
|
+
let t = ae(e);
|
|
176
|
+
return t > 0 ? t : 1;
|
|
177
|
+
}
|
|
178
|
+
let n = parseInt(e, 10);
|
|
179
|
+
return Number.isNaN(n) ? 1 : n;
|
|
203
180
|
}
|
|
204
|
-
function
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
return A(e);
|
|
214
|
-
case "I":
|
|
215
|
-
return $(e);
|
|
216
|
-
default:
|
|
217
|
-
return String(e);
|
|
218
|
-
}
|
|
181
|
+
function oe(e, t) {
|
|
182
|
+
if (e === "numeric") return String(t);
|
|
183
|
+
switch (e) {
|
|
184
|
+
case "a": return O(t);
|
|
185
|
+
case "A": return O(t).toUpperCase();
|
|
186
|
+
case "i": return T(t);
|
|
187
|
+
case "I": return E(t);
|
|
188
|
+
default: return String(t);
|
|
189
|
+
}
|
|
219
190
|
}
|
|
220
|
-
function
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
if (t[r] !== i)
|
|
230
|
-
return !1;
|
|
231
|
-
}
|
|
232
|
-
return !0;
|
|
191
|
+
function j(e) {
|
|
192
|
+
if (e.length === 0) return !1;
|
|
193
|
+
let t = k(e[0]) ?? "numeric", n = A(e[0]);
|
|
194
|
+
if (n < 1) return !1;
|
|
195
|
+
for (let r = 0; r < e.length; r++) {
|
|
196
|
+
let i = oe(t, n + r);
|
|
197
|
+
if (e[r] !== i) return !1;
|
|
198
|
+
}
|
|
199
|
+
return !0;
|
|
233
200
|
}
|
|
234
|
-
function
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
201
|
+
function M(e) {
|
|
202
|
+
return {
|
|
203
|
+
type: k(e),
|
|
204
|
+
start: A(e)
|
|
205
|
+
};
|
|
239
206
|
}
|
|
240
|
-
function
|
|
241
|
-
|
|
242
|
-
|
|
207
|
+
function N(e) {
|
|
208
|
+
let { type: t, start: n } = M(e), r = {};
|
|
209
|
+
return t && (r.type = t), n !== 1 && (r.start = n), r;
|
|
243
210
|
}
|
|
244
|
-
function
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
return `${A(s)}${n}`;
|
|
255
|
-
case "I":
|
|
256
|
-
return `${$(s)}${n}`;
|
|
257
|
-
default:
|
|
258
|
-
return `${s}${n}`;
|
|
259
|
-
}
|
|
211
|
+
function P(e, t, n = ". ") {
|
|
212
|
+
let r = t + 1;
|
|
213
|
+
if (!e || e === "1") return `${r}${n}`;
|
|
214
|
+
switch (e) {
|
|
215
|
+
case "a": return `${O(r)}${n}`;
|
|
216
|
+
case "A": return `${O(r).toUpperCase()}${n}`;
|
|
217
|
+
case "i": return `${T(r)}${n}`;
|
|
218
|
+
case "I": return `${E(r)}${n}`;
|
|
219
|
+
default: return `${r}${n}`;
|
|
220
|
+
}
|
|
260
221
|
}
|
|
261
|
-
function
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
return !!(t.text && ((n = t.tokens) == null ? void 0 : n.length) === 1 && s?.type === "list" && s.ordered && s.raw === t.text);
|
|
222
|
+
function se(e) {
|
|
223
|
+
let t = e.tokens?.[0];
|
|
224
|
+
return !!(e.text && e.tokens?.length === 1 && t?.type === "list" && t.ordered && t.raw === e.text);
|
|
265
225
|
}
|
|
266
|
-
function
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
}
|
|
273
|
-
]);
|
|
226
|
+
function ce(e, t) {
|
|
227
|
+
return t.tokenizeInline ? t.parseInline(t.tokenizeInline(e)) : t.parseInline([{
|
|
228
|
+
type: "text",
|
|
229
|
+
raw: e,
|
|
230
|
+
text: e
|
|
231
|
+
}]);
|
|
274
232
|
}
|
|
275
|
-
var
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
this.options.orderedListTypeName
|
|
362
|
-
])
|
|
363
|
-
];
|
|
364
|
-
},
|
|
365
|
-
addKeyboardShortcuts() {
|
|
366
|
-
return {
|
|
367
|
-
Enter: () => this.editor.commands.splitListItem(this.name),
|
|
368
|
-
Tab: () => this.editor.commands.sinkListItem(this.name),
|
|
369
|
-
"Shift-Tab": () => this.editor.commands.liftListItem(this.name)
|
|
370
|
-
};
|
|
371
|
-
}
|
|
372
|
-
}), It = {};
|
|
373
|
-
ot(It, {
|
|
374
|
-
findListItemPos: () => M,
|
|
375
|
-
getNextListDepth: () => D,
|
|
376
|
-
handleBackspace: () => C,
|
|
377
|
-
handleDelete: () => E,
|
|
378
|
-
hasListBefore: () => W,
|
|
379
|
-
hasListItemAfter: () => At,
|
|
380
|
-
hasListItemBefore: () => xt,
|
|
381
|
-
listItemHasSubList: () => Mt,
|
|
382
|
-
nextListIsDeeper: () => q,
|
|
383
|
-
nextListIsHigher: () => G
|
|
233
|
+
var F = i.create({
|
|
234
|
+
name: "listItem",
|
|
235
|
+
addOptions() {
|
|
236
|
+
return {
|
|
237
|
+
HTMLAttributes: {},
|
|
238
|
+
bulletListTypeName: "bulletList",
|
|
239
|
+
orderedListTypeName: "orderedList"
|
|
240
|
+
};
|
|
241
|
+
},
|
|
242
|
+
content: "paragraph block*",
|
|
243
|
+
defining: !0,
|
|
244
|
+
parseHTML() {
|
|
245
|
+
return [{ tag: "li" }];
|
|
246
|
+
},
|
|
247
|
+
renderHTML({ HTMLAttributes: e }) {
|
|
248
|
+
return [
|
|
249
|
+
"li",
|
|
250
|
+
f(this.options.HTMLAttributes, e),
|
|
251
|
+
0
|
|
252
|
+
];
|
|
253
|
+
},
|
|
254
|
+
markdownTokenName: "list_item",
|
|
255
|
+
parseMarkdown: (e, t) => {
|
|
256
|
+
if (e.type !== "list_item") return [];
|
|
257
|
+
let n = t.parseBlockChildren ?? t.parseChildren, r = [];
|
|
258
|
+
if (e.tokens && e.tokens.length > 0) {
|
|
259
|
+
if (se(e)) return {
|
|
260
|
+
type: "listItem",
|
|
261
|
+
content: [{
|
|
262
|
+
type: "paragraph",
|
|
263
|
+
content: ce(e.text || "", t)
|
|
264
|
+
}]
|
|
265
|
+
};
|
|
266
|
+
if (e.tokens.some((e) => e.type === "paragraph")) r = n(e.tokens);
|
|
267
|
+
else {
|
|
268
|
+
let i = e.tokens[0];
|
|
269
|
+
if (i && i.type === "text" && i.tokens && i.tokens.length > 0) {
|
|
270
|
+
if (r = [{
|
|
271
|
+
type: "paragraph",
|
|
272
|
+
content: t.parseInline(i.tokens)
|
|
273
|
+
}], e.tokens.length > 1) {
|
|
274
|
+
let t = n(e.tokens.slice(1));
|
|
275
|
+
r.push(...t);
|
|
276
|
+
}
|
|
277
|
+
} else r = n(e.tokens);
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
return r.length === 0 && (r = [{
|
|
281
|
+
type: "paragraph",
|
|
282
|
+
content: []
|
|
283
|
+
}]), {
|
|
284
|
+
type: "listItem",
|
|
285
|
+
content: r
|
|
286
|
+
};
|
|
287
|
+
},
|
|
288
|
+
renderMarkdown: (e, t, n) => m(e, t, (e) => {
|
|
289
|
+
if (e.parentType === "bulletList") return "- ";
|
|
290
|
+
if (e.parentType === "orderedList") {
|
|
291
|
+
let t = e.meta?.parentAttrs?.start || 1;
|
|
292
|
+
return P(e.meta?.parentAttrs?.type, t - 1 + (e.index || 0), ". ");
|
|
293
|
+
}
|
|
294
|
+
return "- ";
|
|
295
|
+
}, n),
|
|
296
|
+
addExtensions() {
|
|
297
|
+
return [x(this.name, [this.options.bulletListTypeName, this.options.orderedListTypeName])];
|
|
298
|
+
},
|
|
299
|
+
addKeyboardShortcuts() {
|
|
300
|
+
return {
|
|
301
|
+
Enter: () => this.editor.commands.splitListItem(this.name),
|
|
302
|
+
Tab: () => this.editor.commands.sinkListItem(this.name),
|
|
303
|
+
"Shift-Tab": () => this.editor.commands.liftListItem(this.name)
|
|
304
|
+
};
|
|
305
|
+
}
|
|
306
|
+
}), I = {};
|
|
307
|
+
_(I, {
|
|
308
|
+
findListItemPos: () => L,
|
|
309
|
+
getNextListDepth: () => R,
|
|
310
|
+
handleBackspace: () => B,
|
|
311
|
+
handleDelete: () => U,
|
|
312
|
+
handleTab: () => W,
|
|
313
|
+
hasListBefore: () => z,
|
|
314
|
+
hasListItemAfter: () => le,
|
|
315
|
+
hasListItemBefore: () => ue,
|
|
316
|
+
listItemHasSubList: () => de,
|
|
317
|
+
nextListIsDeeper: () => V,
|
|
318
|
+
nextListIsHigher: () => H
|
|
384
319
|
});
|
|
385
|
-
var
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
},
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
},
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
},
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
},
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
},
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
},
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
},
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
})
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
),
|
|
493
|
-
|
|
494
|
-
|
|
320
|
+
var L = (e, t) => {
|
|
321
|
+
let { $from: n } = t.selection, r = o(e, t.schema), i = null, a = n.depth, s = n.pos, c = null;
|
|
322
|
+
for (; a > 0 && c === null;) i = n.node(a), i.type === r ? c = a : (--a, --s);
|
|
323
|
+
return c === null ? null : {
|
|
324
|
+
$pos: t.doc.resolve(s),
|
|
325
|
+
depth: c
|
|
326
|
+
};
|
|
327
|
+
}, R = (e, t) => {
|
|
328
|
+
let n = L(e, t);
|
|
329
|
+
if (!n) return !1;
|
|
330
|
+
let [, r] = a(t, e, n.$pos.pos + 4);
|
|
331
|
+
return r;
|
|
332
|
+
}, z = (e, t, n) => {
|
|
333
|
+
let { $anchor: r } = e.selection, i = Math.max(0, r.pos - 2), a = e.doc.resolve(i).node();
|
|
334
|
+
return !(!a || !n.includes(a.type.name));
|
|
335
|
+
}, B = (e, t, n) => {
|
|
336
|
+
if (e.commands.undoInputRule()) return !0;
|
|
337
|
+
if (e.state.selection.from !== e.state.selection.to) return !1;
|
|
338
|
+
if (!d(e.state, t) && z(e.state, t, n)) {
|
|
339
|
+
let { $anchor: n } = e.state.selection, r = e.state.doc.resolve(n.before() - 1), i = [];
|
|
340
|
+
r.node().descendants((e, n) => {
|
|
341
|
+
e.type.name === t && i.push({
|
|
342
|
+
node: e,
|
|
343
|
+
pos: n
|
|
344
|
+
});
|
|
345
|
+
});
|
|
346
|
+
let a = i.at(-1);
|
|
347
|
+
if (!a) return !1;
|
|
348
|
+
let o = e.state.doc.resolve(r.start() + a.pos + 1);
|
|
349
|
+
return e.chain().cut({
|
|
350
|
+
from: n.start() - 1,
|
|
351
|
+
to: n.end() + 1
|
|
352
|
+
}, o.end()).joinForward().run();
|
|
353
|
+
}
|
|
354
|
+
if (!d(e.state, t) || !u(e.state)) return !1;
|
|
355
|
+
let { $from: r } = e.state.selection, i = r.depth - 1;
|
|
356
|
+
return r.node(i).type !== e.schema.nodes[t] || r.index(i) !== 0 ? !1 : e.chain().liftListItem(t).run();
|
|
357
|
+
}, V = (e, t) => {
|
|
358
|
+
let n = R(e, t), r = L(e, t);
|
|
359
|
+
return !r || !n ? !1 : n > r.depth;
|
|
360
|
+
}, H = (e, t) => {
|
|
361
|
+
let n = R(e, t), r = L(e, t);
|
|
362
|
+
return !r || !n ? !1 : n < r.depth;
|
|
363
|
+
}, U = (e, t) => {
|
|
364
|
+
if (!d(e.state, t) || !l(e.state, t)) return !1;
|
|
365
|
+
let { selection: n } = e.state, { $from: r, $to: i } = n;
|
|
366
|
+
return !n.empty && r.sameParent(i) ? !1 : V(t, e.state) ? e.chain().focus(e.state.selection.from + 4).lift(t).joinBackward().run() : H(t, e.state) ? e.chain().joinForward().joinBackward().run() : e.commands.joinItemForward();
|
|
367
|
+
}, W = (t, r, i) => {
|
|
368
|
+
let { state: a } = t, { selection: o } = a;
|
|
369
|
+
if (!o.empty) return !1;
|
|
370
|
+
let { $from: c } = o;
|
|
371
|
+
if (c.parentOffset !== 0 || !c.parent.isTextblock || d(a, r)) return !1;
|
|
372
|
+
let l = s(c);
|
|
373
|
+
if (!l || !i.includes(l.type.name)) return !1;
|
|
374
|
+
let u = l.lastChild;
|
|
375
|
+
if (!u || u.type.name !== r) return !1;
|
|
376
|
+
let f = c.parent;
|
|
377
|
+
if (!u.canReplace(u.childCount, u.childCount, e.from(f))) return !1;
|
|
378
|
+
let p = c.before(), m = c.after(), h = p - 2;
|
|
379
|
+
return t.commands.command(({ tr: t, dispatch: r }) => (r && (t.delete(p, m).insert(h, e.from(f)), t.setSelection(n.create(t.doc, h + 1)), t.scrollIntoView()), !0));
|
|
380
|
+
}, le = (e, t) => {
|
|
381
|
+
let { $anchor: n } = t.selection, r = t.doc.resolve(n.pos - n.parentOffset - 2);
|
|
382
|
+
return r.index() !== r.parent.childCount - 1 && r.nodeAfter?.type.name === e;
|
|
383
|
+
}, ue = (e, t) => {
|
|
384
|
+
let { $anchor: n } = t.selection, r = t.doc.resolve(n.pos - 2);
|
|
385
|
+
return r.index() !== 0 && r.nodeBefore?.type.name === e;
|
|
386
|
+
}, de = (e, t, n) => {
|
|
387
|
+
if (!n) return !1;
|
|
388
|
+
let r = o(e, t.schema), i = !1;
|
|
389
|
+
return n.descendants((e) => {
|
|
390
|
+
e.type === r && (i = !0);
|
|
391
|
+
}), i;
|
|
392
|
+
}, G = r.create({
|
|
393
|
+
name: "listKeymap",
|
|
394
|
+
addOptions() {
|
|
395
|
+
return { listTypes: [{
|
|
396
|
+
itemName: "listItem",
|
|
397
|
+
wrapperNames: ["bulletList", "orderedList"]
|
|
398
|
+
}, {
|
|
399
|
+
itemName: "taskItem",
|
|
400
|
+
wrapperNames: ["taskList"]
|
|
401
|
+
}] };
|
|
402
|
+
},
|
|
403
|
+
addKeyboardShortcuts() {
|
|
404
|
+
return {
|
|
405
|
+
Delete: ({ editor: e }) => {
|
|
406
|
+
let t = !1;
|
|
407
|
+
return this.options.listTypes.forEach(({ itemName: n }) => {
|
|
408
|
+
e.state.schema.nodes[n] !== void 0 && U(e, n) && (t = !0);
|
|
409
|
+
}), t;
|
|
410
|
+
},
|
|
411
|
+
"Mod-Delete": ({ editor: e }) => {
|
|
412
|
+
let t = !1;
|
|
413
|
+
return this.options.listTypes.forEach(({ itemName: n }) => {
|
|
414
|
+
e.state.schema.nodes[n] !== void 0 && U(e, n) && (t = !0);
|
|
415
|
+
}), t;
|
|
416
|
+
},
|
|
417
|
+
Backspace: ({ editor: e }) => {
|
|
418
|
+
let t = !1;
|
|
419
|
+
return this.options.listTypes.forEach(({ itemName: n, wrapperNames: r }) => {
|
|
420
|
+
e.state.schema.nodes[n] !== void 0 && B(e, n, r) && (t = !0);
|
|
421
|
+
}), t;
|
|
422
|
+
},
|
|
423
|
+
"Mod-Backspace": ({ editor: e }) => {
|
|
424
|
+
let t = !1;
|
|
425
|
+
return this.options.listTypes.forEach(({ itemName: n, wrapperNames: r }) => {
|
|
426
|
+
e.state.schema.nodes[n] !== void 0 && B(e, n, r) && (t = !0);
|
|
427
|
+
}), t;
|
|
428
|
+
},
|
|
429
|
+
Tab: ({ editor: e }) => {
|
|
430
|
+
for (let { itemName: t, wrapperNames: n } of this.options.listTypes) if (e.state.schema.nodes[t] !== void 0 && W(e, t, n)) return !0;
|
|
431
|
+
return !1;
|
|
432
|
+
}
|
|
433
|
+
};
|
|
434
|
+
}
|
|
435
|
+
}), K = RegExp(`^(\\s*)(${w})([.)])\\s+(.*)$`), fe = /^\s/, q = {
|
|
436
|
+
heading: /^#{1,6}(?:\s|$)/,
|
|
437
|
+
bulletItem: /^[-+*]\s+/,
|
|
438
|
+
codeFence: /^(?:```|~~~)/,
|
|
439
|
+
blockMath: /^\$\$/,
|
|
440
|
+
thematicBreak: /^(?:(?:-[ \t]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})$/
|
|
441
|
+
};
|
|
442
|
+
function pe(e) {
|
|
443
|
+
return K.test(e.trimStart());
|
|
444
|
+
}
|
|
445
|
+
function me(e) {
|
|
446
|
+
let t = e.trimStart();
|
|
447
|
+
return q.bulletItem.test(t) || pe(t) || q.heading.test(t) || q.thematicBreak.test(t) && !t.startsWith("-") || /^>\s?/.test(t) || q.codeFence.test(t) || q.blockMath.test(t);
|
|
495
448
|
}
|
|
496
|
-
function
|
|
497
|
-
|
|
498
|
-
return (
|
|
499
|
-
// oxlint-disable-next-line prefer-string-starts-ends-with
|
|
500
|
-
/^[-+*]\s+/.test(e) || Nt(e) || // oxlint-disable-next-line prefer-string-starts-ends-with
|
|
501
|
-
/^>\s?/.test(e) || // oxlint-disable-next-line prefer-string-starts-ends-with
|
|
502
|
-
/^```/.test(e) || // oxlint-disable-next-line prefer-string-starts-ends-with
|
|
503
|
-
/^~~~/.test(e)
|
|
504
|
-
);
|
|
449
|
+
function he(e) {
|
|
450
|
+
return Object.values(q).some((t) => t.test(e));
|
|
505
451
|
}
|
|
506
|
-
function
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
};
|
|
452
|
+
function ge(e) {
|
|
453
|
+
let t = [], n = [], r = !1;
|
|
454
|
+
return e.forEach((e) => {
|
|
455
|
+
if (r) {
|
|
456
|
+
n.push(e);
|
|
457
|
+
return;
|
|
458
|
+
}
|
|
459
|
+
if (e.trim() === "") {
|
|
460
|
+
r = !0, n.push(e);
|
|
461
|
+
return;
|
|
462
|
+
}
|
|
463
|
+
if (t.length > 0 && me(e)) {
|
|
464
|
+
r = !0, n.push(e);
|
|
465
|
+
return;
|
|
466
|
+
}
|
|
467
|
+
t.push(e);
|
|
468
|
+
}), {
|
|
469
|
+
paragraphLines: t,
|
|
470
|
+
blockLines: n
|
|
471
|
+
};
|
|
527
472
|
}
|
|
528
|
-
function
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
number: d,
|
|
557
|
-
type: l,
|
|
558
|
-
content: L.join(`
|
|
559
|
-
`).trim(),
|
|
560
|
-
contentLines: L,
|
|
561
|
-
raw: m.join(`
|
|
562
|
-
`)
|
|
563
|
-
}), s = f, n = f;
|
|
564
|
-
}
|
|
565
|
-
return [e, s];
|
|
473
|
+
function _e(e) {
|
|
474
|
+
let t = [], n = 0, r = 0;
|
|
475
|
+
for (; n < e.length;) {
|
|
476
|
+
let i = e[n], a = i.match(K);
|
|
477
|
+
if (!a) break;
|
|
478
|
+
let [, o, s, c, l] = a, u = o.length, d = parseInt(s, 10), f = isNaN(d) ? k(s) : void 0, p = isNaN(d) ? A(s) : d, m = [l], h = n + 1, g = [i], _ = !1;
|
|
479
|
+
for (; h < e.length;) {
|
|
480
|
+
let t = e[h];
|
|
481
|
+
if (t.match(K)) break;
|
|
482
|
+
if (t.trim() === "") g.push(t), m.push(""), _ = !0, h += 1;
|
|
483
|
+
else if (t.match(fe)) {
|
|
484
|
+
let e = t.length - t.trimStart().length, n = u + s.length + 1;
|
|
485
|
+
g.push(t), m.push(t.slice(Math.min(e, n))), h += 1;
|
|
486
|
+
} else {
|
|
487
|
+
if (_ || he(t)) break;
|
|
488
|
+
g.push(t), m.push(t), h += 1;
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
t.push({
|
|
492
|
+
indent: u,
|
|
493
|
+
number: p,
|
|
494
|
+
type: f,
|
|
495
|
+
content: m.join("\n").trim(),
|
|
496
|
+
contentLines: m,
|
|
497
|
+
raw: g.join("\n")
|
|
498
|
+
}), r = h, n = h;
|
|
499
|
+
}
|
|
500
|
+
return [t, r];
|
|
566
501
|
}
|
|
567
|
-
var
|
|
568
|
-
|
|
569
|
-
);
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
content: [{ type: "text", text: i.content }]
|
|
595
|
-
}
|
|
596
|
-
]
|
|
597
|
-
}))
|
|
598
|
-
} : null;
|
|
502
|
+
var ve = RegExp(`^(${w})([.)])\\s+(.+)$`);
|
|
503
|
+
function J(e) {
|
|
504
|
+
let t = e.split("\n").filter((e) => e.trim().length > 0);
|
|
505
|
+
if (t.length === 0) return null;
|
|
506
|
+
let n = [];
|
|
507
|
+
for (let e of t) {
|
|
508
|
+
let t = e.trim().match(ve);
|
|
509
|
+
if (!t) return null;
|
|
510
|
+
n.push({
|
|
511
|
+
marker: t[1],
|
|
512
|
+
content: t[3]
|
|
513
|
+
});
|
|
514
|
+
}
|
|
515
|
+
return j(n.map((e) => e.marker)) ? {
|
|
516
|
+
type: "orderedList",
|
|
517
|
+
attrs: N(n[0].marker),
|
|
518
|
+
content: n.map((e) => ({
|
|
519
|
+
type: "listItem",
|
|
520
|
+
content: [{
|
|
521
|
+
type: "paragraph",
|
|
522
|
+
content: [{
|
|
523
|
+
type: "text",
|
|
524
|
+
text: e.content
|
|
525
|
+
}]
|
|
526
|
+
}]
|
|
527
|
+
}))
|
|
528
|
+
} : null;
|
|
599
529
|
}
|
|
600
|
-
function
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
raw: i.raw,
|
|
638
|
-
tokens: h
|
|
639
|
-
}), r = u;
|
|
640
|
-
} else
|
|
641
|
-
r += 1;
|
|
642
|
-
}
|
|
643
|
-
return s;
|
|
530
|
+
function Y(e, t, n) {
|
|
531
|
+
let r = [], i = 0;
|
|
532
|
+
for (; i < e.length;) {
|
|
533
|
+
let a = e[i];
|
|
534
|
+
if (a.indent === t) {
|
|
535
|
+
let { paragraphLines: o, blockLines: s } = ge(a.contentLines), c = o.join("\n").trim(), l = [];
|
|
536
|
+
c && l.push({
|
|
537
|
+
type: "paragraph",
|
|
538
|
+
raw: c,
|
|
539
|
+
tokens: n.inlineTokens(c)
|
|
540
|
+
});
|
|
541
|
+
let u = s.join("\n").trim();
|
|
542
|
+
if (u) {
|
|
543
|
+
let e = n.blockTokens(u);
|
|
544
|
+
l.push(...e);
|
|
545
|
+
}
|
|
546
|
+
let d = i + 1, f = [];
|
|
547
|
+
for (; d < e.length && e[d].indent > t;) f.push(e[d]), d += 1;
|
|
548
|
+
if (f.length > 0) {
|
|
549
|
+
let e = Y(f, Math.min(...f.map((e) => e.indent)), n);
|
|
550
|
+
l.push({
|
|
551
|
+
type: "list",
|
|
552
|
+
ordered: !0,
|
|
553
|
+
start: f[0].number,
|
|
554
|
+
typeMarker: f[0].type,
|
|
555
|
+
items: e,
|
|
556
|
+
raw: f.map((e) => e.raw).join("\n")
|
|
557
|
+
});
|
|
558
|
+
}
|
|
559
|
+
r.push({
|
|
560
|
+
type: "list_item",
|
|
561
|
+
raw: a.raw,
|
|
562
|
+
tokens: l
|
|
563
|
+
}), i = d;
|
|
564
|
+
} else i += 1;
|
|
565
|
+
}
|
|
566
|
+
return r;
|
|
644
567
|
}
|
|
645
|
-
function
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
};
|
|
667
|
-
});
|
|
568
|
+
function ye(e, t) {
|
|
569
|
+
return e.map((e) => {
|
|
570
|
+
if (e.type !== "list_item") return t.parseChildren([e])[0];
|
|
571
|
+
let n = [];
|
|
572
|
+
return e.tokens && e.tokens.length > 0 && e.tokens.forEach((e) => {
|
|
573
|
+
if (e.type === "paragraph" || e.type === "list" || e.type === "blockquote" || e.type === "code") n.push(...t.parseChildren([e]));
|
|
574
|
+
else if (e.type === "text" && e.tokens) {
|
|
575
|
+
let r = t.parseChildren([e]);
|
|
576
|
+
n.push({
|
|
577
|
+
type: "paragraph",
|
|
578
|
+
content: r
|
|
579
|
+
});
|
|
580
|
+
} else {
|
|
581
|
+
let r = t.parseChildren([e]);
|
|
582
|
+
r.length > 0 && n.push(...r);
|
|
583
|
+
}
|
|
584
|
+
}), {
|
|
585
|
+
type: "listItem",
|
|
586
|
+
content: n
|
|
587
|
+
};
|
|
588
|
+
});
|
|
668
589
|
}
|
|
669
|
-
var
|
|
670
|
-
function
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
case "lower-alpha":
|
|
683
|
-
case "lower-latin":
|
|
684
|
-
return "a";
|
|
685
|
-
default:
|
|
686
|
-
return null;
|
|
687
|
-
}
|
|
590
|
+
var be = "listItem", X = "textStyle", Z = /^(\d+)\.\s$/;
|
|
591
|
+
function Q(e) {
|
|
592
|
+
let t = e.match(/list-style-type\s*:\s*([^;]+)/i);
|
|
593
|
+
if (!t) return null;
|
|
594
|
+
switch (t[1].trim().toLowerCase()) {
|
|
595
|
+
case "upper-roman": return "I";
|
|
596
|
+
case "lower-roman": return "i";
|
|
597
|
+
case "upper-alpha":
|
|
598
|
+
case "upper-latin": return "A";
|
|
599
|
+
case "lower-alpha":
|
|
600
|
+
case "lower-latin": return "a";
|
|
601
|
+
default: return null;
|
|
602
|
+
}
|
|
688
603
|
}
|
|
689
|
-
var
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
}
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
mainContent: o.mainContent,
|
|
1039
|
-
indentLevel: o.indentLevel,
|
|
1040
|
-
checked: o.checked,
|
|
1041
|
-
text: o.mainContent,
|
|
1042
|
-
tokens: n.inlineTokens(o.mainContent),
|
|
1043
|
-
nestedTokens: c
|
|
1044
|
-
}),
|
|
1045
|
-
// Allow recursive nesting
|
|
1046
|
-
customNestedParser: s
|
|
1047
|
-
},
|
|
1048
|
-
n
|
|
1049
|
-
);
|
|
1050
|
-
return a ? [
|
|
1051
|
-
{
|
|
1052
|
-
type: "taskList",
|
|
1053
|
-
raw: a.raw,
|
|
1054
|
-
items: a.items
|
|
1055
|
-
}
|
|
1056
|
-
] : n.blockTokens(i);
|
|
1057
|
-
}, r = O(
|
|
1058
|
-
t,
|
|
1059
|
-
{
|
|
1060
|
-
itemPattern: /^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,
|
|
1061
|
-
extractItemData: (i) => ({
|
|
1062
|
-
indentLevel: i[1].length,
|
|
1063
|
-
mainContent: i[4],
|
|
1064
|
-
checked: i[3].toLowerCase() === "x"
|
|
1065
|
-
}),
|
|
1066
|
-
createToken: (i, a) => ({
|
|
1067
|
-
type: "taskItem",
|
|
1068
|
-
raw: "",
|
|
1069
|
-
mainContent: i.mainContent,
|
|
1070
|
-
indentLevel: i.indentLevel,
|
|
1071
|
-
checked: i.checked,
|
|
1072
|
-
text: i.mainContent,
|
|
1073
|
-
tokens: n.inlineTokens(i.mainContent),
|
|
1074
|
-
nestedTokens: a
|
|
1075
|
-
}),
|
|
1076
|
-
// Use the recursive parser for nested content
|
|
1077
|
-
customNestedParser: s
|
|
1078
|
-
},
|
|
1079
|
-
n
|
|
1080
|
-
);
|
|
1081
|
-
if (r)
|
|
1082
|
-
return {
|
|
1083
|
-
type: "taskList",
|
|
1084
|
-
raw: r.raw,
|
|
1085
|
-
items: r.items
|
|
1086
|
-
};
|
|
1087
|
-
}
|
|
1088
|
-
},
|
|
1089
|
-
markdownOptions: {
|
|
1090
|
-
indentsContent: !0
|
|
1091
|
-
},
|
|
1092
|
-
addCommands() {
|
|
1093
|
-
return {
|
|
1094
|
-
toggleTaskList: () => ({ commands: t }) => t.toggleList(this.name, this.options.itemTypeName)
|
|
1095
|
-
};
|
|
1096
|
-
},
|
|
1097
|
-
addKeyboardShortcuts() {
|
|
1098
|
-
return {
|
|
1099
|
-
"Mod-Shift-9": () => this.editor.commands.toggleTaskList()
|
|
1100
|
-
};
|
|
1101
|
-
}
|
|
604
|
+
var xe = i.create({
|
|
605
|
+
name: "orderedList",
|
|
606
|
+
addOptions() {
|
|
607
|
+
return {
|
|
608
|
+
itemTypeName: "listItem",
|
|
609
|
+
HTMLAttributes: {},
|
|
610
|
+
keepMarks: !1,
|
|
611
|
+
keepAttributes: !1
|
|
612
|
+
};
|
|
613
|
+
},
|
|
614
|
+
group: "block list",
|
|
615
|
+
content() {
|
|
616
|
+
return `${this.options.itemTypeName}+`;
|
|
617
|
+
},
|
|
618
|
+
addAttributes() {
|
|
619
|
+
return {
|
|
620
|
+
start: {
|
|
621
|
+
default: 1,
|
|
622
|
+
parseHTML: (e) => e.hasAttribute("start") ? parseInt(e.getAttribute("start") || "", 10) : 1
|
|
623
|
+
},
|
|
624
|
+
type: {
|
|
625
|
+
default: null,
|
|
626
|
+
parseHTML: (e) => {
|
|
627
|
+
let t = e.getAttribute("type");
|
|
628
|
+
if (t) return t;
|
|
629
|
+
let n = e.getAttribute("style");
|
|
630
|
+
if (n) {
|
|
631
|
+
let e = Q(n);
|
|
632
|
+
if (e) return e;
|
|
633
|
+
}
|
|
634
|
+
let r = e.querySelector("li");
|
|
635
|
+
if (r) {
|
|
636
|
+
let e = r.getAttribute("style");
|
|
637
|
+
if (e) {
|
|
638
|
+
let t = Q(e);
|
|
639
|
+
if (t) return t;
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
return null;
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
};
|
|
646
|
+
},
|
|
647
|
+
parseHTML() {
|
|
648
|
+
return [{ tag: "ol" }];
|
|
649
|
+
},
|
|
650
|
+
renderHTML({ HTMLAttributes: e }) {
|
|
651
|
+
let { start: t, type: n, ...r } = e, i = f(this.options.HTMLAttributes, r);
|
|
652
|
+
return t !== 1 && (i.start = t), n && n !== "1" && (i.type = n), [
|
|
653
|
+
"ol",
|
|
654
|
+
i,
|
|
655
|
+
0
|
|
656
|
+
];
|
|
657
|
+
},
|
|
658
|
+
markdownTokenName: "list",
|
|
659
|
+
parseMarkdown: (e, t) => {
|
|
660
|
+
if (e.type !== "list" || !e.ordered) return [];
|
|
661
|
+
let n = e.start || 1, r = e.typeMarker, i = e.items ? ye(e.items, t) : [], a = {};
|
|
662
|
+
return n !== 1 && (a.start = n), r && (a.type = r), Object.keys(a).length > 0 ? {
|
|
663
|
+
type: "orderedList",
|
|
664
|
+
attrs: a,
|
|
665
|
+
content: i
|
|
666
|
+
} : {
|
|
667
|
+
type: "orderedList",
|
|
668
|
+
content: i
|
|
669
|
+
};
|
|
670
|
+
},
|
|
671
|
+
renderMarkdown: (e, t) => e.content ? t.renderChildren(e.content, "\n") : "",
|
|
672
|
+
markdownTokenizer: {
|
|
673
|
+
name: "orderedList",
|
|
674
|
+
level: "block",
|
|
675
|
+
start: () => -1,
|
|
676
|
+
tokenize: (e, t, n) => {
|
|
677
|
+
let r = e.split("\n"), [i, a] = _e(r);
|
|
678
|
+
if (i.length === 0) return;
|
|
679
|
+
let o = Y(i, i[0].indent, n);
|
|
680
|
+
if (o.length !== 0) return {
|
|
681
|
+
type: "list",
|
|
682
|
+
ordered: !0,
|
|
683
|
+
start: i[0]?.number || 1,
|
|
684
|
+
typeMarker: i[0]?.type,
|
|
685
|
+
items: o,
|
|
686
|
+
raw: r.slice(0, a).join("\n")
|
|
687
|
+
};
|
|
688
|
+
}
|
|
689
|
+
},
|
|
690
|
+
markdownOptions: { indentsContent: !0 },
|
|
691
|
+
addCommands() {
|
|
692
|
+
return { toggleOrderedList: () => ({ commands: e, chain: t }) => this.options.keepAttributes ? t().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(be, this.editor.getAttributes(X)).run() : e.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks) };
|
|
693
|
+
},
|
|
694
|
+
addKeyboardShortcuts() {
|
|
695
|
+
return { "Mod-Shift-7": () => this.editor.commands.toggleOrderedList() };
|
|
696
|
+
},
|
|
697
|
+
addProseMirrorPlugins() {
|
|
698
|
+
return [new t({ props: { handlePaste: (e, t) => {
|
|
699
|
+
if ((t.clipboardData?.getData("text/html"))?.trim()) return !1;
|
|
700
|
+
let n = t.clipboardData?.getData("text/plain");
|
|
701
|
+
if (!n) return !1;
|
|
702
|
+
let r = J(n);
|
|
703
|
+
if (!r) return !1;
|
|
704
|
+
try {
|
|
705
|
+
let t = e.state.schema.nodeFromJSON(r), n = e.state.tr.replaceSelectionWith(t);
|
|
706
|
+
return e.dispatch(n), !0;
|
|
707
|
+
} catch {
|
|
708
|
+
return !1;
|
|
709
|
+
}
|
|
710
|
+
} } })];
|
|
711
|
+
},
|
|
712
|
+
addInputRules() {
|
|
713
|
+
let e = (e, t) => (!t.attrs.type || t.attrs.type === "1") && t.childCount + t.attrs.start === +e[1], t = h({
|
|
714
|
+
find: Z,
|
|
715
|
+
type: this.type,
|
|
716
|
+
getAttributes: (e) => ({ start: +e[1] }),
|
|
717
|
+
joinPredicate: e
|
|
718
|
+
});
|
|
719
|
+
return (this.options.keepMarks || this.options.keepAttributes) && (t = h({
|
|
720
|
+
find: Z,
|
|
721
|
+
type: this.type,
|
|
722
|
+
keepMarks: this.options.keepMarks,
|
|
723
|
+
keepAttributes: this.options.keepAttributes,
|
|
724
|
+
getAttributes: (e) => ({
|
|
725
|
+
start: +e[1],
|
|
726
|
+
...this.editor.getAttributes(X)
|
|
727
|
+
}),
|
|
728
|
+
joinPredicate: e,
|
|
729
|
+
editor: this.editor
|
|
730
|
+
})), [t];
|
|
731
|
+
}
|
|
732
|
+
}), Se = /^\s*(\[([( |x])?\])\s$/, Ce = "position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0", we = (e, t, n) => (n?.checkboxLabel)?.call(n, e, t) || `Task item checkbox for ${e.textContent || "empty task item"}`, Te = i.create({
|
|
733
|
+
name: "taskItem",
|
|
734
|
+
addOptions() {
|
|
735
|
+
return {
|
|
736
|
+
nested: !1,
|
|
737
|
+
HTMLAttributes: {},
|
|
738
|
+
taskListTypeName: "taskList",
|
|
739
|
+
a11y: void 0
|
|
740
|
+
};
|
|
741
|
+
},
|
|
742
|
+
content() {
|
|
743
|
+
return this.options.nested ? "paragraph block*" : "paragraph+";
|
|
744
|
+
},
|
|
745
|
+
defining: !0,
|
|
746
|
+
addAttributes() {
|
|
747
|
+
return { checked: {
|
|
748
|
+
default: !1,
|
|
749
|
+
keepOnSplit: !1,
|
|
750
|
+
parseHTML: (e) => {
|
|
751
|
+
let t = e.getAttribute("data-checked");
|
|
752
|
+
return t === "" || t === "true";
|
|
753
|
+
},
|
|
754
|
+
renderHTML: (e) => ({ "data-checked": e.checked })
|
|
755
|
+
} };
|
|
756
|
+
},
|
|
757
|
+
parseHTML() {
|
|
758
|
+
return [{
|
|
759
|
+
tag: `li[data-type="${this.name}"]`,
|
|
760
|
+
priority: 51,
|
|
761
|
+
contentElement: (e) => e.querySelector("div") ?? e
|
|
762
|
+
}];
|
|
763
|
+
},
|
|
764
|
+
renderHTML({ node: e, HTMLAttributes: t }) {
|
|
765
|
+
return [
|
|
766
|
+
"li",
|
|
767
|
+
f(this.options.HTMLAttributes, t, { "data-type": this.name }),
|
|
768
|
+
[
|
|
769
|
+
"label",
|
|
770
|
+
["input", {
|
|
771
|
+
type: "checkbox",
|
|
772
|
+
checked: e.attrs.checked ? "checked" : null
|
|
773
|
+
}],
|
|
774
|
+
["span"]
|
|
775
|
+
],
|
|
776
|
+
["div", 0]
|
|
777
|
+
];
|
|
778
|
+
},
|
|
779
|
+
parseMarkdown: (e, t) => {
|
|
780
|
+
let n = [];
|
|
781
|
+
if (e.tokens && e.tokens.length > 0 ? n.push(t.createNode("paragraph", {}, t.parseInline(e.tokens))) : e.text ? n.push(t.createNode("paragraph", {}, [t.createNode("text", { text: e.text })])) : n.push(t.createNode("paragraph", {}, [])), e.nestedTokens && e.nestedTokens.length > 0) {
|
|
782
|
+
let r = t.parseChildren(e.nestedTokens);
|
|
783
|
+
n.push(...r);
|
|
784
|
+
}
|
|
785
|
+
return t.createNode("taskItem", { checked: e.checked || !1 }, n);
|
|
786
|
+
},
|
|
787
|
+
renderMarkdown: (e, t) => {
|
|
788
|
+
let n = `- [${e.attrs?.checked ? "x" : " "}] `;
|
|
789
|
+
return m(e, t, n);
|
|
790
|
+
},
|
|
791
|
+
addExtensions() {
|
|
792
|
+
return this.options.nested ? [x(this.name, [this.options.taskListTypeName])] : [];
|
|
793
|
+
},
|
|
794
|
+
addKeyboardShortcuts() {
|
|
795
|
+
let e = {
|
|
796
|
+
Enter: () => this.editor.commands.splitListItem(this.name),
|
|
797
|
+
"Shift-Tab": () => this.editor.commands.liftListItem(this.name)
|
|
798
|
+
};
|
|
799
|
+
return this.options.nested ? {
|
|
800
|
+
...e,
|
|
801
|
+
Tab: () => this.editor.commands.sinkListItem(this.name)
|
|
802
|
+
} : e;
|
|
803
|
+
},
|
|
804
|
+
addNodeView() {
|
|
805
|
+
return ({ node: e, HTMLAttributes: t, getPos: n, editor: r }) => {
|
|
806
|
+
let i = document.createElement("li"), a = document.createElement("label"), o = document.createElement("span"), s = document.createElement("input"), l = document.createElement("div");
|
|
807
|
+
o.style.cssText = Ce;
|
|
808
|
+
let u = (e) => {
|
|
809
|
+
let t = we(e, e.attrs.checked, this.options.a11y);
|
|
810
|
+
s.setAttribute("aria-label", t), o.textContent = t;
|
|
811
|
+
};
|
|
812
|
+
u(e), a.contentEditable = "false", s.type = "checkbox", s.addEventListener("mousedown", (e) => e.preventDefault()), s.addEventListener("change", (t) => {
|
|
813
|
+
if (!r.isEditable && !this.options.onReadOnlyChecked) {
|
|
814
|
+
s.checked = !s.checked;
|
|
815
|
+
return;
|
|
816
|
+
}
|
|
817
|
+
let { checked: i } = t.target;
|
|
818
|
+
r.isEditable && typeof n == "function" && r.chain().focus(void 0, { scrollIntoView: !1 }).command(({ tr: e }) => {
|
|
819
|
+
let t = n();
|
|
820
|
+
if (typeof t != "number") return !1;
|
|
821
|
+
let r = e.doc.nodeAt(t);
|
|
822
|
+
return e.setNodeMarkup(t, void 0, {
|
|
823
|
+
...r?.attrs,
|
|
824
|
+
checked: i
|
|
825
|
+
}), !0;
|
|
826
|
+
}).run(), !r.isEditable && this.options.onReadOnlyChecked && (this.options.onReadOnlyChecked(e, i) || (s.checked = !s.checked));
|
|
827
|
+
}), Object.entries(this.options.HTMLAttributes).forEach(([e, t]) => {
|
|
828
|
+
i.setAttribute(e, t);
|
|
829
|
+
}), i.dataset.checked = e.attrs.checked, s.checked = e.attrs.checked, a.append(s, o), i.append(a, l), Object.entries(t).forEach(([e, t]) => {
|
|
830
|
+
i.setAttribute(e, t);
|
|
831
|
+
});
|
|
832
|
+
let d = new Set(Object.keys(t));
|
|
833
|
+
return {
|
|
834
|
+
dom: i,
|
|
835
|
+
contentDOM: l,
|
|
836
|
+
update: (e) => {
|
|
837
|
+
if (e.type !== this.type) return !1;
|
|
838
|
+
i.dataset.checked = e.attrs.checked, s.checked = e.attrs.checked, u(e);
|
|
839
|
+
let t = r.extensionManager.attributes, n = c(e, t), a = new Set(Object.keys(n)), o = this.options.HTMLAttributes;
|
|
840
|
+
return d.forEach((e) => {
|
|
841
|
+
a.has(e) || (e in o ? i.setAttribute(e, o[e]) : i.removeAttribute(e));
|
|
842
|
+
}), Object.entries(n).forEach(([e, t]) => {
|
|
843
|
+
t == null ? e in o ? i.setAttribute(e, o[e]) : i.removeAttribute(e) : i.setAttribute(e, t);
|
|
844
|
+
}), d = a, !0;
|
|
845
|
+
}
|
|
846
|
+
};
|
|
847
|
+
};
|
|
848
|
+
},
|
|
849
|
+
addInputRules() {
|
|
850
|
+
return [h({
|
|
851
|
+
find: Se,
|
|
852
|
+
type: this.type,
|
|
853
|
+
getAttributes: (e) => ({ checked: e[e.length - 1] === "x" })
|
|
854
|
+
})];
|
|
855
|
+
}
|
|
856
|
+
}), $ = i.create({
|
|
857
|
+
name: "taskList",
|
|
858
|
+
addOptions() {
|
|
859
|
+
return {
|
|
860
|
+
itemTypeName: "taskItem",
|
|
861
|
+
HTMLAttributes: {}
|
|
862
|
+
};
|
|
863
|
+
},
|
|
864
|
+
group: "block list",
|
|
865
|
+
content() {
|
|
866
|
+
return `${this.options.itemTypeName}+`;
|
|
867
|
+
},
|
|
868
|
+
parseHTML() {
|
|
869
|
+
return [{
|
|
870
|
+
tag: `ul[data-type="${this.name}"]`,
|
|
871
|
+
priority: 51
|
|
872
|
+
}];
|
|
873
|
+
},
|
|
874
|
+
renderHTML({ HTMLAttributes: e }) {
|
|
875
|
+
return [
|
|
876
|
+
"ul",
|
|
877
|
+
f(this.options.HTMLAttributes, e, { "data-type": this.name }),
|
|
878
|
+
0
|
|
879
|
+
];
|
|
880
|
+
},
|
|
881
|
+
parseMarkdown: (e, t) => t.createNode("taskList", {}, t.parseChildren(e.items || [])),
|
|
882
|
+
renderMarkdown: (e, t) => e.content ? t.renderChildren(e.content, "\n") : "",
|
|
883
|
+
markdownTokenizer: {
|
|
884
|
+
name: "taskList",
|
|
885
|
+
level: "block",
|
|
886
|
+
start(e) {
|
|
887
|
+
let t = e.match(/^\s*[-+*]\s+\[([ xX])\]\s+/)?.index;
|
|
888
|
+
return t === void 0 ? -1 : t;
|
|
889
|
+
},
|
|
890
|
+
tokenize(e, t, n) {
|
|
891
|
+
let r = (e) => {
|
|
892
|
+
let t = p(e, {
|
|
893
|
+
itemPattern: /^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,
|
|
894
|
+
extractItemData: (e) => ({
|
|
895
|
+
indentLevel: e[1].length,
|
|
896
|
+
mainContent: e[4],
|
|
897
|
+
checked: e[3].toLowerCase() === "x"
|
|
898
|
+
}),
|
|
899
|
+
createToken: (e, t) => ({
|
|
900
|
+
type: "taskItem",
|
|
901
|
+
raw: "",
|
|
902
|
+
mainContent: e.mainContent,
|
|
903
|
+
indentLevel: e.indentLevel,
|
|
904
|
+
checked: e.checked,
|
|
905
|
+
text: e.mainContent,
|
|
906
|
+
tokens: n.inlineTokens(e.mainContent),
|
|
907
|
+
nestedTokens: t
|
|
908
|
+
}),
|
|
909
|
+
customNestedParser: r
|
|
910
|
+
}, n);
|
|
911
|
+
if (t) {
|
|
912
|
+
let r = {
|
|
913
|
+
type: "taskList",
|
|
914
|
+
raw: t.raw,
|
|
915
|
+
items: t.items
|
|
916
|
+
}, i = e.slice(t.raw.length);
|
|
917
|
+
return i.trim() ? [r, ...n.blockTokens(i)] : [r];
|
|
918
|
+
}
|
|
919
|
+
return n.blockTokens(e);
|
|
920
|
+
}, i = p(e, {
|
|
921
|
+
itemPattern: /^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,
|
|
922
|
+
extractItemData: (e) => ({
|
|
923
|
+
indentLevel: e[1].length,
|
|
924
|
+
mainContent: e[4],
|
|
925
|
+
checked: e[3].toLowerCase() === "x"
|
|
926
|
+
}),
|
|
927
|
+
createToken: (e, t) => ({
|
|
928
|
+
type: "taskItem",
|
|
929
|
+
raw: "",
|
|
930
|
+
mainContent: e.mainContent,
|
|
931
|
+
indentLevel: e.indentLevel,
|
|
932
|
+
checked: e.checked,
|
|
933
|
+
text: e.mainContent,
|
|
934
|
+
tokens: n.inlineTokens(e.mainContent),
|
|
935
|
+
nestedTokens: t
|
|
936
|
+
}),
|
|
937
|
+
customNestedParser: r
|
|
938
|
+
}, n);
|
|
939
|
+
if (i) return {
|
|
940
|
+
type: "taskList",
|
|
941
|
+
raw: i.raw,
|
|
942
|
+
items: i.items
|
|
943
|
+
};
|
|
944
|
+
}
|
|
945
|
+
},
|
|
946
|
+
markdownOptions: { indentsContent: !0 },
|
|
947
|
+
addCommands() {
|
|
948
|
+
return { toggleTaskList: () => ({ commands: e }) => e.toggleList(this.name, this.options.itemTypeName) };
|
|
949
|
+
},
|
|
950
|
+
addKeyboardShortcuts() {
|
|
951
|
+
return { "Mod-Shift-9": () => this.editor.commands.toggleTaskList() };
|
|
952
|
+
}
|
|
1102
953
|
});
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
954
|
+
r.create({
|
|
955
|
+
name: "listKit",
|
|
956
|
+
addExtensions() {
|
|
957
|
+
let e = [];
|
|
958
|
+
return this.options.bulletList !== !1 && e.push(b.configure(this.options.bulletList)), this.options.listItem !== !1 && e.push(F.configure(this.options.listItem)), this.options.listKeymap !== !1 && e.push(G.configure(this.options.listKeymap)), this.options.orderedList !== !1 && e.push(xe.configure(this.options.orderedList)), this.options.taskItem !== !1 && e.push(Te.configure(this.options.taskItem)), this.options.taskList !== !1 && e.push($.configure(this.options.taskList)), e;
|
|
959
|
+
}
|
|
1109
960
|
});
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
Tt as ListItem,
|
|
1113
|
-
wt as ListKeymap,
|
|
1114
|
-
S as ORDERED_LIST_MARKER_PATTERN,
|
|
1115
|
-
Ht as OrderedList,
|
|
1116
|
-
jt as TaskItem,
|
|
1117
|
-
Kt as TaskList,
|
|
1118
|
-
Lt as areOrderedListMarkersSequential,
|
|
1119
|
-
yt as buildOrderedListAttrsFromMarker,
|
|
1120
|
-
H as bulletListInputRegex,
|
|
1121
|
-
x as detectMarkerType,
|
|
1122
|
-
gt as getListMarker,
|
|
1123
|
-
Bt as inputRegex,
|
|
1124
|
-
It as listHelpers,
|
|
1125
|
-
R as markerToStart,
|
|
1126
|
-
j as orderedListInputRegex,
|
|
1127
|
-
kt as parseListMarker,
|
|
1128
|
-
Dt as parsePlainTextOrderedListPaste,
|
|
1129
|
-
A as toRoman,
|
|
1130
|
-
$ as toRomanUpper
|
|
1131
|
-
};
|
|
961
|
+
//#endregion
|
|
962
|
+
export { b as BulletList, F as ListItem, G as ListKeymap, w as ORDERED_LIST_MARKER_PATTERN, xe as OrderedList, Te as TaskItem, $ as TaskList, j as areOrderedListMarkersSequential, N as buildOrderedListAttrsFromMarker, y as bulletListInputRegex, k as detectMarkerType, P as getListMarker, Se as inputRegex, I as listHelpers, A as markerToStart, Z as orderedListInputRegex, M as parseListMarker, J as parsePlainTextOrderedListPaste, T as toRoman, E as toRomanUpper };
|