@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,822 +1,525 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
class
|
|
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
|
-
to the given transaction.
|
|
82
|
-
*/
|
|
83
|
-
replaceWith(e, t) {
|
|
84
|
-
let r = e.steps.length, n = this.ranges;
|
|
85
|
-
for (let s = 0; s < n.length; s++) {
|
|
86
|
-
let { $from: o, $to: a } = n[s], c = e.mapping.slice(r), u = c.map(o.pos), h = c.map(a.pos);
|
|
87
|
-
s ? e.deleteRange(u, h) : (e.replaceRangeWith(u, h, t), E(e, r, t.isInline ? -1 : 1));
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
Find a valid cursor or leaf node selection starting at the given
|
|
92
|
-
position and searching back if `dir` is negative, and forward if
|
|
93
|
-
positive. When `textOnly` is true, only consider cursor
|
|
94
|
-
selections. Will return null when no valid selection position is
|
|
95
|
-
found.
|
|
96
|
-
*/
|
|
97
|
-
static findFrom(e, t, r = !1) {
|
|
98
|
-
let n = e.parent.inlineContent ? new f(e) : g(e.node(0), e.parent, e.pos, e.index(), t, r);
|
|
99
|
-
if (n)
|
|
100
|
-
return n;
|
|
101
|
-
for (let s = e.depth - 1; s >= 0; s--) {
|
|
102
|
-
let o = t < 0 ? g(e.node(0), e.node(s), e.before(s + 1), e.index(s), t, r) : g(e.node(0), e.node(s), e.after(s + 1), e.index(s) + 1, t, r);
|
|
103
|
-
if (o)
|
|
104
|
-
return o;
|
|
105
|
-
}
|
|
106
|
-
return null;
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
Find a valid cursor or leaf node selection near the given
|
|
110
|
-
position. Searches forward first by default, but if `bias` is
|
|
111
|
-
negative, it will search backwards first.
|
|
112
|
-
*/
|
|
113
|
-
static near(e, t = 1) {
|
|
114
|
-
return this.findFrom(e, t) || this.findFrom(e, -t) || new d(e.node(0));
|
|
115
|
-
}
|
|
116
|
-
/**
|
|
117
|
-
Find the cursor or leaf node selection closest to the start of
|
|
118
|
-
the given document. Will return an
|
|
119
|
-
[`AllSelection`](https://prosemirror.net/docs/ref/#state.AllSelection) if no valid position
|
|
120
|
-
exists.
|
|
121
|
-
*/
|
|
122
|
-
static atStart(e) {
|
|
123
|
-
return g(e, e, 0, 0, 1) || new d(e);
|
|
124
|
-
}
|
|
125
|
-
/**
|
|
126
|
-
Find the cursor or leaf node selection closest to the end of the
|
|
127
|
-
given document.
|
|
128
|
-
*/
|
|
129
|
-
static atEnd(e) {
|
|
130
|
-
return g(e, e, e.content.size, e.childCount, -1) || new d(e);
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
Deserialize the JSON representation of a selection. Must be
|
|
134
|
-
implemented for custom classes (as a static class method).
|
|
135
|
-
*/
|
|
136
|
-
static fromJSON(e, t) {
|
|
137
|
-
if (!t || !t.type)
|
|
138
|
-
throw new RangeError("Invalid input for Selection.fromJSON");
|
|
139
|
-
let r = O[t.type];
|
|
140
|
-
if (!r)
|
|
141
|
-
throw new RangeError(`No selection type ${t.type} defined`);
|
|
142
|
-
return r.fromJSON(e, t);
|
|
143
|
-
}
|
|
144
|
-
/**
|
|
145
|
-
To be able to deserialize selections from JSON, custom selection
|
|
146
|
-
classes must register themselves with an ID string, so that they
|
|
147
|
-
can be disambiguated. Try to pick something that's unlikely to
|
|
148
|
-
clash with classes from other modules.
|
|
149
|
-
*/
|
|
150
|
-
static jsonID(e, t) {
|
|
151
|
-
if (e in O)
|
|
152
|
-
throw new RangeError("Duplicate use of selection JSON ID " + e);
|
|
153
|
-
return O[e] = t, t.prototype.jsonID = e, t;
|
|
154
|
-
}
|
|
155
|
-
/**
|
|
156
|
-
Get a [bookmark](https://prosemirror.net/docs/ref/#state.SelectionBookmark) for this selection,
|
|
157
|
-
which is a value that can be mapped without having access to a
|
|
158
|
-
current document, and later resolved to a real selection for a
|
|
159
|
-
given document again. (This is used mostly by the history to
|
|
160
|
-
track and restore old selections.) The default implementation of
|
|
161
|
-
this method just converts the selection to a text selection and
|
|
162
|
-
returns the bookmark for that.
|
|
163
|
-
*/
|
|
164
|
-
getBookmark() {
|
|
165
|
-
return f.between(this.$anchor, this.$head).getBookmark();
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
l.prototype.visible = !0;
|
|
169
|
-
class q {
|
|
170
|
-
/**
|
|
171
|
-
Create a range.
|
|
172
|
-
*/
|
|
173
|
-
constructor(e, t) {
|
|
174
|
-
this.$from = e, this.$to = t;
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
let I = !1;
|
|
178
|
-
function T(i) {
|
|
179
|
-
!I && !i.parent.inlineContent && (I = !0, console.warn("TextSelection endpoint not pointing into a node with inline content (" + i.parent.type.name + ")"));
|
|
180
|
-
}
|
|
181
|
-
class f extends l {
|
|
182
|
-
/**
|
|
183
|
-
Construct a text selection between the given points.
|
|
184
|
-
*/
|
|
185
|
-
constructor(e, t = e) {
|
|
186
|
-
T(e), T(t), super(e, t);
|
|
187
|
-
}
|
|
188
|
-
/**
|
|
189
|
-
Returns a resolved position if this is a cursor selection (an
|
|
190
|
-
empty text selection), and null otherwise.
|
|
191
|
-
*/
|
|
192
|
-
get $cursor() {
|
|
193
|
-
return this.$anchor.pos == this.$head.pos ? this.$head : null;
|
|
194
|
-
}
|
|
195
|
-
map(e, t) {
|
|
196
|
-
let r = e.resolve(t.map(this.head));
|
|
197
|
-
if (!r.parent.inlineContent)
|
|
198
|
-
return l.near(r);
|
|
199
|
-
let n = e.resolve(t.map(this.anchor));
|
|
200
|
-
return new f(n.parent.inlineContent ? n : r, r);
|
|
201
|
-
}
|
|
202
|
-
replace(e, t = m.empty) {
|
|
203
|
-
if (super.replace(e, t), t == m.empty) {
|
|
204
|
-
let r = this.$from.marksAcross(this.$to);
|
|
205
|
-
r && e.ensureMarks(r);
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
eq(e) {
|
|
209
|
-
return e instanceof f && e.anchor == this.anchor && e.head == this.head;
|
|
210
|
-
}
|
|
211
|
-
getBookmark() {
|
|
212
|
-
return new y(this.anchor, this.head);
|
|
213
|
-
}
|
|
214
|
-
toJSON() {
|
|
215
|
-
return { type: "text", anchor: this.anchor, head: this.head };
|
|
216
|
-
}
|
|
217
|
-
/**
|
|
218
|
-
@internal
|
|
219
|
-
*/
|
|
220
|
-
static fromJSON(e, t) {
|
|
221
|
-
if (typeof t.anchor != "number" || typeof t.head != "number")
|
|
222
|
-
throw new RangeError("Invalid input for TextSelection.fromJSON");
|
|
223
|
-
return new f(e.resolve(t.anchor), e.resolve(t.head));
|
|
224
|
-
}
|
|
225
|
-
/**
|
|
226
|
-
Create a text selection from non-resolved positions.
|
|
227
|
-
*/
|
|
228
|
-
static create(e, t, r = t) {
|
|
229
|
-
let n = e.resolve(t);
|
|
230
|
-
return new this(n, r == t ? n : e.resolve(r));
|
|
231
|
-
}
|
|
232
|
-
/**
|
|
233
|
-
Return a text selection that spans the given positions or, if
|
|
234
|
-
they aren't text positions, find a text selection near them.
|
|
235
|
-
`bias` determines whether the method searches forward (default)
|
|
236
|
-
or backwards (negative number) first. Will fall back to calling
|
|
237
|
-
[`Selection.near`](https://prosemirror.net/docs/ref/#state.Selection^near) when the document
|
|
238
|
-
doesn't contain a valid text position.
|
|
239
|
-
*/
|
|
240
|
-
static between(e, t, r) {
|
|
241
|
-
let n = e.pos - t.pos;
|
|
242
|
-
if ((!r || n) && (r = n >= 0 ? 1 : -1), !t.parent.inlineContent) {
|
|
243
|
-
let s = l.findFrom(t, r, !0) || l.findFrom(t, -r, !0);
|
|
244
|
-
if (s)
|
|
245
|
-
t = s.$head;
|
|
246
|
-
else
|
|
247
|
-
return l.near(t, r);
|
|
248
|
-
}
|
|
249
|
-
return e.parent.inlineContent || (n == 0 ? e = t : (e = (l.findFrom(e, -r, !0) || l.findFrom(e, r, !0)).$anchor, e.pos < t.pos != n < 0 && (e = t))), new f(e, t);
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
l.jsonID("text", f);
|
|
253
|
-
class y {
|
|
254
|
-
constructor(e, t) {
|
|
255
|
-
this.anchor = e, this.head = t;
|
|
256
|
-
}
|
|
257
|
-
map(e) {
|
|
258
|
-
return new y(e.map(this.anchor), e.map(this.head));
|
|
259
|
-
}
|
|
260
|
-
resolve(e) {
|
|
261
|
-
return f.between(e.resolve(this.anchor), e.resolve(this.head));
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
class p extends l {
|
|
265
|
-
/**
|
|
266
|
-
Create a node selection. Does not verify the validity of its
|
|
267
|
-
argument.
|
|
268
|
-
*/
|
|
269
|
-
constructor(e) {
|
|
270
|
-
let t = e.nodeAfter, r = e.node(0).resolve(e.pos + t.nodeSize);
|
|
271
|
-
super(e, r), this.node = t;
|
|
272
|
-
}
|
|
273
|
-
map(e, t) {
|
|
274
|
-
let { deleted: r, pos: n } = t.mapResult(this.anchor), s = e.resolve(n);
|
|
275
|
-
return r ? l.near(s) : new p(s);
|
|
276
|
-
}
|
|
277
|
-
content() {
|
|
278
|
-
return new m(B.from(this.node), 0, 0);
|
|
279
|
-
}
|
|
280
|
-
eq(e) {
|
|
281
|
-
return e instanceof p && e.anchor == this.anchor;
|
|
282
|
-
}
|
|
283
|
-
toJSON() {
|
|
284
|
-
return { type: "node", anchor: this.anchor };
|
|
285
|
-
}
|
|
286
|
-
getBookmark() {
|
|
287
|
-
return new J(this.anchor);
|
|
288
|
-
}
|
|
289
|
-
/**
|
|
290
|
-
@internal
|
|
291
|
-
*/
|
|
292
|
-
static fromJSON(e, t) {
|
|
293
|
-
if (typeof t.anchor != "number")
|
|
294
|
-
throw new RangeError("Invalid input for NodeSelection.fromJSON");
|
|
295
|
-
return new p(e.resolve(t.anchor));
|
|
296
|
-
}
|
|
297
|
-
/**
|
|
298
|
-
Create a node selection from non-resolved positions.
|
|
299
|
-
*/
|
|
300
|
-
static create(e, t) {
|
|
301
|
-
return new p(e.resolve(t));
|
|
302
|
-
}
|
|
303
|
-
/**
|
|
304
|
-
Determines whether the given node may be selected as a node
|
|
305
|
-
selection.
|
|
306
|
-
*/
|
|
307
|
-
static isSelectable(e) {
|
|
308
|
-
return !e.isText && e.type.spec.selectable !== !1;
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
p.prototype.visible = !1;
|
|
312
|
-
l.jsonID("node", p);
|
|
313
|
-
class J {
|
|
314
|
-
constructor(e) {
|
|
315
|
-
this.anchor = e;
|
|
316
|
-
}
|
|
317
|
-
map(e) {
|
|
318
|
-
let { deleted: t, pos: r } = e.mapResult(this.anchor);
|
|
319
|
-
return t ? new y(r, r) : new J(r);
|
|
320
|
-
}
|
|
321
|
-
resolve(e) {
|
|
322
|
-
let t = e.resolve(this.anchor), r = t.nodeAfter;
|
|
323
|
-
return r && p.isSelectable(r) ? new p(t) : l.near(t);
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
class d extends l {
|
|
327
|
-
/**
|
|
328
|
-
Create an all-selection over the given document.
|
|
329
|
-
*/
|
|
330
|
-
constructor(e) {
|
|
331
|
-
super(e.resolve(0), e.resolve(e.content.size));
|
|
332
|
-
}
|
|
333
|
-
replace(e, t = m.empty) {
|
|
334
|
-
if (t == m.empty) {
|
|
335
|
-
e.delete(0, e.doc.content.size);
|
|
336
|
-
let r = l.atStart(e.doc);
|
|
337
|
-
r.eq(e.selection) || e.setSelection(r);
|
|
338
|
-
} else
|
|
339
|
-
super.replace(e, t);
|
|
340
|
-
}
|
|
341
|
-
toJSON() {
|
|
342
|
-
return { type: "all" };
|
|
343
|
-
}
|
|
344
|
-
/**
|
|
345
|
-
@internal
|
|
346
|
-
*/
|
|
347
|
-
static fromJSON(e) {
|
|
348
|
-
return new d(e);
|
|
349
|
-
}
|
|
350
|
-
map(e) {
|
|
351
|
-
return new d(e);
|
|
352
|
-
}
|
|
353
|
-
eq(e) {
|
|
354
|
-
return e instanceof d;
|
|
355
|
-
}
|
|
356
|
-
getBookmark() {
|
|
357
|
-
return z;
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
l.jsonID("all", d);
|
|
361
|
-
const z = {
|
|
362
|
-
map() {
|
|
363
|
-
return this;
|
|
364
|
-
},
|
|
365
|
-
resolve(i) {
|
|
366
|
-
return new d(i);
|
|
367
|
-
}
|
|
1
|
+
import { Fragment as e, Mark as t, Node as n, Slice as r } from "../../prosemirror-model/dist/index.js";
|
|
2
|
+
import { ReplaceAroundStep as i, ReplaceStep as a, Transform as o } from "../../prosemirror-transform/dist/index.js";
|
|
3
|
+
//#region ../../node_modules/prosemirror-state/dist/index.js
|
|
4
|
+
var s = Object.create(null), c = class {
|
|
5
|
+
constructor(e, t, n) {
|
|
6
|
+
this.$anchor = e, this.$head = t, this.ranges = n || [new l(e.min(t), e.max(t))];
|
|
7
|
+
}
|
|
8
|
+
get anchor() {
|
|
9
|
+
return this.$anchor.pos;
|
|
10
|
+
}
|
|
11
|
+
get head() {
|
|
12
|
+
return this.$head.pos;
|
|
13
|
+
}
|
|
14
|
+
get from() {
|
|
15
|
+
return this.$from.pos;
|
|
16
|
+
}
|
|
17
|
+
get to() {
|
|
18
|
+
return this.$to.pos;
|
|
19
|
+
}
|
|
20
|
+
get $from() {
|
|
21
|
+
return this.ranges[0].$from;
|
|
22
|
+
}
|
|
23
|
+
get $to() {
|
|
24
|
+
return this.ranges[0].$to;
|
|
25
|
+
}
|
|
26
|
+
get empty() {
|
|
27
|
+
let e = this.ranges;
|
|
28
|
+
for (let t = 0; t < e.length; t++) if (e[t].$from.pos != e[t].$to.pos) return !1;
|
|
29
|
+
return !0;
|
|
30
|
+
}
|
|
31
|
+
content() {
|
|
32
|
+
return this.$from.doc.slice(this.from, this.to, !0);
|
|
33
|
+
}
|
|
34
|
+
replace(e, t = r.empty) {
|
|
35
|
+
let n = t.content.lastChild, i = null;
|
|
36
|
+
for (let e = 0; e < t.openEnd; e++) i = n, n = n.lastChild;
|
|
37
|
+
let a = e.steps.length, o = this.ranges;
|
|
38
|
+
for (let s = 0; s < o.length; s++) {
|
|
39
|
+
let { $from: c, $to: l } = o[s], u = e.mapping.slice(a);
|
|
40
|
+
e.replaceRange(u.map(c.pos), u.map(l.pos), s ? r.empty : t), s == 0 && y(e, a, (n ? n.isInline : i && i.isTextblock) ? -1 : 1);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
replaceWith(e, t) {
|
|
44
|
+
let n = e.steps.length, r = this.ranges;
|
|
45
|
+
for (let i = 0; i < r.length; i++) {
|
|
46
|
+
let { $from: a, $to: o } = r[i], s = e.mapping.slice(n), c = s.map(a.pos), l = s.map(o.pos);
|
|
47
|
+
i ? e.deleteRange(c, l) : (e.replaceRangeWith(c, l, t), y(e, n, t.isInline ? -1 : 1));
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
static findFrom(e, t, n = !1) {
|
|
51
|
+
let r = e.parent.inlineContent ? new f(e) : v(e.node(0), e.parent, e.pos, e.index(), t, n);
|
|
52
|
+
if (r) return r;
|
|
53
|
+
for (let r = e.depth - 1; r >= 0; r--) {
|
|
54
|
+
let i = t < 0 ? v(e.node(0), e.node(r), e.before(r + 1), e.index(r), t, n) : v(e.node(0), e.node(r), e.after(r + 1), e.index(r) + 1, t, n);
|
|
55
|
+
if (i) return i;
|
|
56
|
+
}
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
59
|
+
static near(e, t = 1) {
|
|
60
|
+
return this.findFrom(e, t) || this.findFrom(e, -t) || new g(e.node(0));
|
|
61
|
+
}
|
|
62
|
+
static atStart(e) {
|
|
63
|
+
return v(e, e, 0, 0, 1) || new g(e);
|
|
64
|
+
}
|
|
65
|
+
static atEnd(e) {
|
|
66
|
+
return v(e, e, e.content.size, e.childCount, -1) || new g(e);
|
|
67
|
+
}
|
|
68
|
+
static fromJSON(e, t) {
|
|
69
|
+
if (!t || !t.type) throw RangeError("Invalid input for Selection.fromJSON");
|
|
70
|
+
let n = s[t.type];
|
|
71
|
+
if (!n) throw RangeError(`No selection type ${t.type} defined`);
|
|
72
|
+
return n.fromJSON(e, t);
|
|
73
|
+
}
|
|
74
|
+
static jsonID(e, t) {
|
|
75
|
+
if (e in s) throw RangeError("Duplicate use of selection JSON ID " + e);
|
|
76
|
+
return s[e] = t, t.prototype.jsonID = e, t;
|
|
77
|
+
}
|
|
78
|
+
getBookmark() {
|
|
79
|
+
return f.between(this.$anchor, this.$head).getBookmark();
|
|
80
|
+
}
|
|
368
81
|
};
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
} else {
|
|
378
|
-
let c = g(i, a, t + n, n < 0 ? a.childCount : 0, n, s);
|
|
379
|
-
if (c)
|
|
380
|
-
return c;
|
|
381
|
-
}
|
|
382
|
-
t += a.nodeSize * n;
|
|
383
|
-
}
|
|
384
|
-
return null;
|
|
385
|
-
}
|
|
386
|
-
function E(i, e, t) {
|
|
387
|
-
let r = i.steps.length - 1;
|
|
388
|
-
if (r < e)
|
|
389
|
-
return;
|
|
390
|
-
let n = i.steps[r];
|
|
391
|
-
if (!(n instanceof P || n instanceof K))
|
|
392
|
-
return;
|
|
393
|
-
let s = i.mapping.maps[r], o;
|
|
394
|
-
s.forEach((a, c, u, h) => {
|
|
395
|
-
o == null && (o = h);
|
|
396
|
-
}), i.setSelection(l.near(i.doc.resolve(o), t));
|
|
397
|
-
}
|
|
398
|
-
const b = 1, k = 2, F = 4;
|
|
399
|
-
class W extends $ {
|
|
400
|
-
/**
|
|
401
|
-
@internal
|
|
402
|
-
*/
|
|
403
|
-
constructor(e) {
|
|
404
|
-
super(e.doc), this.curSelectionFor = 0, this.updated = 0, this.meta = /* @__PURE__ */ Object.create(null), this.time = Date.now(), this.curSelection = e.selection, this.storedMarks = e.storedMarks;
|
|
405
|
-
}
|
|
406
|
-
/**
|
|
407
|
-
The transaction's current selection. This defaults to the editor
|
|
408
|
-
selection [mapped](https://prosemirror.net/docs/ref/#state.Selection.map) through the steps in the
|
|
409
|
-
transaction, but can be overwritten with
|
|
410
|
-
[`setSelection`](https://prosemirror.net/docs/ref/#state.Transaction.setSelection).
|
|
411
|
-
*/
|
|
412
|
-
get selection() {
|
|
413
|
-
return this.curSelectionFor < this.steps.length && (this.curSelection = this.curSelection.map(this.doc, this.mapping.slice(this.curSelectionFor)), this.curSelectionFor = this.steps.length), this.curSelection;
|
|
414
|
-
}
|
|
415
|
-
/**
|
|
416
|
-
Update the transaction's current selection. Will determine the
|
|
417
|
-
selection that the editor gets when the transaction is applied.
|
|
418
|
-
*/
|
|
419
|
-
setSelection(e) {
|
|
420
|
-
if (e.$from.doc != this.doc)
|
|
421
|
-
throw new RangeError("Selection passed to setSelection must point at the current document");
|
|
422
|
-
return this.curSelection = e, this.curSelectionFor = this.steps.length, this.updated = (this.updated | b) & ~k, this.storedMarks = null, this;
|
|
423
|
-
}
|
|
424
|
-
/**
|
|
425
|
-
Whether the selection was explicitly updated by this transaction.
|
|
426
|
-
*/
|
|
427
|
-
get selectionSet() {
|
|
428
|
-
return (this.updated & b) > 0;
|
|
429
|
-
}
|
|
430
|
-
/**
|
|
431
|
-
Set the current stored marks.
|
|
432
|
-
*/
|
|
433
|
-
setStoredMarks(e) {
|
|
434
|
-
return this.storedMarks = e, this.updated |= k, this;
|
|
435
|
-
}
|
|
436
|
-
/**
|
|
437
|
-
Make sure the current stored marks or, if that is null, the marks
|
|
438
|
-
at the selection, match the given set of marks. Does nothing if
|
|
439
|
-
this is already the case.
|
|
440
|
-
*/
|
|
441
|
-
ensureMarks(e) {
|
|
442
|
-
return R.sameSet(this.storedMarks || this.selection.$from.marks(), e) || this.setStoredMarks(e), this;
|
|
443
|
-
}
|
|
444
|
-
/**
|
|
445
|
-
Add a mark to the set of stored marks.
|
|
446
|
-
*/
|
|
447
|
-
addStoredMark(e) {
|
|
448
|
-
return this.ensureMarks(e.addToSet(this.storedMarks || this.selection.$head.marks()));
|
|
449
|
-
}
|
|
450
|
-
/**
|
|
451
|
-
Remove a mark or mark type from the set of stored marks.
|
|
452
|
-
*/
|
|
453
|
-
removeStoredMark(e) {
|
|
454
|
-
return this.ensureMarks(e.removeFromSet(this.storedMarks || this.selection.$head.marks()));
|
|
455
|
-
}
|
|
456
|
-
/**
|
|
457
|
-
Whether the stored marks were explicitly set for this transaction.
|
|
458
|
-
*/
|
|
459
|
-
get storedMarksSet() {
|
|
460
|
-
return (this.updated & k) > 0;
|
|
461
|
-
}
|
|
462
|
-
/**
|
|
463
|
-
@internal
|
|
464
|
-
*/
|
|
465
|
-
addStep(e, t) {
|
|
466
|
-
super.addStep(e, t), this.updated = this.updated & ~k, this.storedMarks = null;
|
|
467
|
-
}
|
|
468
|
-
/**
|
|
469
|
-
Update the timestamp for the transaction.
|
|
470
|
-
*/
|
|
471
|
-
setTime(e) {
|
|
472
|
-
return this.time = e, this;
|
|
473
|
-
}
|
|
474
|
-
/**
|
|
475
|
-
Replace the current selection with the given slice.
|
|
476
|
-
*/
|
|
477
|
-
replaceSelection(e) {
|
|
478
|
-
return this.selection.replace(this, e), this;
|
|
479
|
-
}
|
|
480
|
-
/**
|
|
481
|
-
Replace the selection with the given node. When `inheritMarks` is
|
|
482
|
-
true and the content is inline, it inherits the marks from the
|
|
483
|
-
place where it is inserted.
|
|
484
|
-
*/
|
|
485
|
-
replaceSelectionWith(e, t = !0) {
|
|
486
|
-
let r = this.selection;
|
|
487
|
-
return t && (e = e.mark(this.storedMarks || (r.empty ? r.$from.marks() : r.$from.marksAcross(r.$to) || R.none))), r.replaceWith(this, e), this;
|
|
488
|
-
}
|
|
489
|
-
/**
|
|
490
|
-
Delete the selection.
|
|
491
|
-
*/
|
|
492
|
-
deleteSelection() {
|
|
493
|
-
return this.selection.replace(this), this;
|
|
494
|
-
}
|
|
495
|
-
/**
|
|
496
|
-
Replace the given range, or the selection if no range is given,
|
|
497
|
-
with a text node containing the given string.
|
|
498
|
-
*/
|
|
499
|
-
insertText(e, t, r) {
|
|
500
|
-
let n = this.doc.type.schema;
|
|
501
|
-
if (t == null)
|
|
502
|
-
return e ? this.replaceSelectionWith(n.text(e), !0) : this.deleteSelection();
|
|
503
|
-
{
|
|
504
|
-
if (r == null && (r = t), !e)
|
|
505
|
-
return this.deleteRange(t, r);
|
|
506
|
-
let s = this.storedMarks;
|
|
507
|
-
if (!s) {
|
|
508
|
-
let o = this.doc.resolve(t);
|
|
509
|
-
s = r == t ? o.marks() : o.marksAcross(this.doc.resolve(r));
|
|
510
|
-
}
|
|
511
|
-
return this.replaceRangeWith(t, r, n.text(e, s)), !this.selection.empty && this.selection.to == t + e.length && this.setSelection(l.near(this.selection.$to)), this;
|
|
512
|
-
}
|
|
513
|
-
}
|
|
514
|
-
/**
|
|
515
|
-
Store a metadata property in this transaction, keyed either by
|
|
516
|
-
name or by plugin.
|
|
517
|
-
*/
|
|
518
|
-
setMeta(e, t) {
|
|
519
|
-
return this.meta[typeof e == "string" ? e : e.key] = t, this;
|
|
520
|
-
}
|
|
521
|
-
/**
|
|
522
|
-
Retrieve a metadata property for a given name or plugin.
|
|
523
|
-
*/
|
|
524
|
-
getMeta(e) {
|
|
525
|
-
return this.meta[typeof e == "string" ? e : e.key];
|
|
526
|
-
}
|
|
527
|
-
/**
|
|
528
|
-
Returns true if this transaction doesn't contain any metadata,
|
|
529
|
-
and can thus safely be extended.
|
|
530
|
-
*/
|
|
531
|
-
get isGeneric() {
|
|
532
|
-
for (let e in this.meta)
|
|
533
|
-
return !1;
|
|
534
|
-
return !0;
|
|
535
|
-
}
|
|
536
|
-
/**
|
|
537
|
-
Indicate that the editor should scroll the selection into view
|
|
538
|
-
when updated to the state produced by this transaction.
|
|
539
|
-
*/
|
|
540
|
-
scrollIntoView() {
|
|
541
|
-
return this.updated |= F, this;
|
|
542
|
-
}
|
|
543
|
-
/**
|
|
544
|
-
True when this transaction has had `scrollIntoView` called on it.
|
|
545
|
-
*/
|
|
546
|
-
get scrolledIntoView() {
|
|
547
|
-
return (this.updated & F) > 0;
|
|
548
|
-
}
|
|
82
|
+
c.prototype.visible = !0;
|
|
83
|
+
var l = class {
|
|
84
|
+
constructor(e, t) {
|
|
85
|
+
this.$from = e, this.$to = t;
|
|
86
|
+
}
|
|
87
|
+
}, u = !1;
|
|
88
|
+
function d(e) {
|
|
89
|
+
!u && !e.parent.inlineContent && (u = !0, console.warn("TextSelection endpoint not pointing into a node with inline content (" + e.parent.type.name + ")"));
|
|
549
90
|
}
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
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
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
class
|
|
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
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
reconfigure(e) {
|
|
707
|
-
let t = new v(this.schema, e.plugins), r = t.fields, n = new w(t);
|
|
708
|
-
for (let s = 0; s < r.length; s++) {
|
|
709
|
-
let o = r[s].name;
|
|
710
|
-
n[o] = this.hasOwnProperty(o) ? this[o] : r[s].init(e, n);
|
|
711
|
-
}
|
|
712
|
-
return n;
|
|
713
|
-
}
|
|
714
|
-
/**
|
|
715
|
-
Serialize this state to JSON. If you want to serialize the state
|
|
716
|
-
of plugins, pass an object mapping property names to use in the
|
|
717
|
-
resulting JSON object to plugin objects. The argument may also be
|
|
718
|
-
a string or number, in which case it is ignored, to support the
|
|
719
|
-
way `JSON.stringify` calls `toString` methods.
|
|
720
|
-
*/
|
|
721
|
-
toJSON(e) {
|
|
722
|
-
let t = { doc: this.doc.toJSON(), selection: this.selection.toJSON() };
|
|
723
|
-
if (this.storedMarks && (t.storedMarks = this.storedMarks.map((r) => r.toJSON())), e && typeof e == "object")
|
|
724
|
-
for (let r in e) {
|
|
725
|
-
if (r == "doc" || r == "selection")
|
|
726
|
-
throw new RangeError("The JSON fields `doc` and `selection` are reserved");
|
|
727
|
-
let n = e[r], s = n.spec.state;
|
|
728
|
-
s && s.toJSON && (t[r] = s.toJSON.call(n, this[n.key]));
|
|
729
|
-
}
|
|
730
|
-
return t;
|
|
731
|
-
}
|
|
732
|
-
/**
|
|
733
|
-
Deserialize a JSON representation of a state. `config` should
|
|
734
|
-
have at least a `schema` field, and should contain array of
|
|
735
|
-
plugins to initialize the state with. `pluginFields` can be used
|
|
736
|
-
to deserialize the state of plugins, by associating plugin
|
|
737
|
-
instances with the property names they use in the JSON object.
|
|
738
|
-
*/
|
|
739
|
-
static fromJSON(e, t, r) {
|
|
740
|
-
if (!t)
|
|
741
|
-
throw new RangeError("Invalid input for EditorState.fromJSON");
|
|
742
|
-
if (!e.schema)
|
|
743
|
-
throw new RangeError("Required config field 'schema' missing");
|
|
744
|
-
let n = new v(e.schema, e.plugins), s = new w(n);
|
|
745
|
-
return n.fields.forEach((o) => {
|
|
746
|
-
if (o.name == "doc")
|
|
747
|
-
s.doc = x.fromJSON(e.schema, t.doc);
|
|
748
|
-
else if (o.name == "selection")
|
|
749
|
-
s.selection = l.fromJSON(s.doc, t.selection);
|
|
750
|
-
else if (o.name == "storedMarks")
|
|
751
|
-
t.storedMarks && (s.storedMarks = t.storedMarks.map(e.schema.markFromJSON));
|
|
752
|
-
else {
|
|
753
|
-
if (r)
|
|
754
|
-
for (let a in r) {
|
|
755
|
-
let c = r[a], u = c.spec.state;
|
|
756
|
-
if (c.key == o.name && u && u.fromJSON && Object.prototype.hasOwnProperty.call(t, a)) {
|
|
757
|
-
s[o.name] = u.fromJSON.call(c, e, t[a], s);
|
|
758
|
-
return;
|
|
759
|
-
}
|
|
760
|
-
}
|
|
761
|
-
s[o.name] = o.init(e, s);
|
|
762
|
-
}
|
|
763
|
-
}), s;
|
|
764
|
-
}
|
|
91
|
+
var f = class e extends c {
|
|
92
|
+
constructor(e, t = e) {
|
|
93
|
+
d(e), d(t), super(e, t);
|
|
94
|
+
}
|
|
95
|
+
get $cursor() {
|
|
96
|
+
return this.$anchor.pos == this.$head.pos ? this.$head : null;
|
|
97
|
+
}
|
|
98
|
+
map(t, n) {
|
|
99
|
+
let r = t.resolve(n.map(this.head));
|
|
100
|
+
if (!r.parent.inlineContent) return c.near(r);
|
|
101
|
+
let i = t.resolve(n.map(this.anchor));
|
|
102
|
+
return new e(i.parent.inlineContent ? i : r, r);
|
|
103
|
+
}
|
|
104
|
+
replace(e, t = r.empty) {
|
|
105
|
+
if (super.replace(e, t), t == r.empty) {
|
|
106
|
+
let t = this.$from.marksAcross(this.$to);
|
|
107
|
+
t && e.ensureMarks(t);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
eq(t) {
|
|
111
|
+
return t instanceof e && t.anchor == this.anchor && t.head == this.head;
|
|
112
|
+
}
|
|
113
|
+
getBookmark() {
|
|
114
|
+
return new p(this.anchor, this.head);
|
|
115
|
+
}
|
|
116
|
+
toJSON() {
|
|
117
|
+
return {
|
|
118
|
+
type: "text",
|
|
119
|
+
anchor: this.anchor,
|
|
120
|
+
head: this.head
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
static fromJSON(t, n) {
|
|
124
|
+
if (typeof n.anchor != "number" || typeof n.head != "number") throw RangeError("Invalid input for TextSelection.fromJSON");
|
|
125
|
+
return new e(t.resolve(n.anchor), t.resolve(n.head));
|
|
126
|
+
}
|
|
127
|
+
static create(e, t, n = t) {
|
|
128
|
+
let r = e.resolve(t);
|
|
129
|
+
return new this(r, n == t ? r : e.resolve(n));
|
|
130
|
+
}
|
|
131
|
+
static between(t, n, r) {
|
|
132
|
+
let i = t.pos - n.pos;
|
|
133
|
+
if ((!r || i) && (r = i >= 0 ? 1 : -1), !n.parent.inlineContent) {
|
|
134
|
+
let e = c.findFrom(n, r, !0) || c.findFrom(n, -r, !0);
|
|
135
|
+
if (e) n = e.$head;
|
|
136
|
+
else return c.near(n, r);
|
|
137
|
+
}
|
|
138
|
+
return t.parent.inlineContent || (i == 0 ? t = n : (t = (c.findFrom(t, -r, !0) || c.findFrom(t, r, !0)).$anchor, t.pos < n.pos != i < 0 && (t = n))), new e(t, n);
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
c.jsonID("text", f);
|
|
142
|
+
var p = class e {
|
|
143
|
+
constructor(e, t) {
|
|
144
|
+
this.anchor = e, this.head = t;
|
|
145
|
+
}
|
|
146
|
+
map(t) {
|
|
147
|
+
return new e(t.map(this.anchor), t.map(this.head));
|
|
148
|
+
}
|
|
149
|
+
resolve(e) {
|
|
150
|
+
return f.between(e.resolve(this.anchor), e.resolve(this.head));
|
|
151
|
+
}
|
|
152
|
+
}, m = class t extends c {
|
|
153
|
+
constructor(e) {
|
|
154
|
+
let t = e.nodeAfter, n = e.node(0).resolve(e.pos + t.nodeSize);
|
|
155
|
+
super(e, n), this.node = t;
|
|
156
|
+
}
|
|
157
|
+
map(e, n) {
|
|
158
|
+
let { deleted: r, pos: i } = n.mapResult(this.anchor), a = e.resolve(i);
|
|
159
|
+
return r ? c.near(a) : new t(a);
|
|
160
|
+
}
|
|
161
|
+
content() {
|
|
162
|
+
return new r(e.from(this.node), 0, 0);
|
|
163
|
+
}
|
|
164
|
+
eq(e) {
|
|
165
|
+
return e instanceof t && e.anchor == this.anchor;
|
|
166
|
+
}
|
|
167
|
+
toJSON() {
|
|
168
|
+
return {
|
|
169
|
+
type: "node",
|
|
170
|
+
anchor: this.anchor
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
getBookmark() {
|
|
174
|
+
return new h(this.anchor);
|
|
175
|
+
}
|
|
176
|
+
static fromJSON(e, n) {
|
|
177
|
+
if (typeof n.anchor != "number") throw RangeError("Invalid input for NodeSelection.fromJSON");
|
|
178
|
+
return new t(e.resolve(n.anchor));
|
|
179
|
+
}
|
|
180
|
+
static create(e, n) {
|
|
181
|
+
return new t(e.resolve(n));
|
|
182
|
+
}
|
|
183
|
+
static isSelectable(e) {
|
|
184
|
+
return !e.isText && e.type.spec.selectable !== !1;
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
m.prototype.visible = !1, c.jsonID("node", m);
|
|
188
|
+
var h = class e {
|
|
189
|
+
constructor(e) {
|
|
190
|
+
this.anchor = e;
|
|
191
|
+
}
|
|
192
|
+
map(t) {
|
|
193
|
+
let { deleted: n, pos: r } = t.mapResult(this.anchor);
|
|
194
|
+
return n ? new p(r, r) : new e(r);
|
|
195
|
+
}
|
|
196
|
+
resolve(e) {
|
|
197
|
+
let t = e.resolve(this.anchor), n = t.nodeAfter;
|
|
198
|
+
return n && m.isSelectable(n) ? new m(t) : c.near(t);
|
|
199
|
+
}
|
|
200
|
+
}, g = class e extends c {
|
|
201
|
+
constructor(e) {
|
|
202
|
+
super(e.resolve(0), e.resolve(e.content.size));
|
|
203
|
+
}
|
|
204
|
+
replace(e, t = r.empty) {
|
|
205
|
+
if (t == r.empty) {
|
|
206
|
+
e.delete(0, e.doc.content.size);
|
|
207
|
+
let t = c.atStart(e.doc);
|
|
208
|
+
t.eq(e.selection) || e.setSelection(t);
|
|
209
|
+
} else super.replace(e, t);
|
|
210
|
+
}
|
|
211
|
+
toJSON() {
|
|
212
|
+
return { type: "all" };
|
|
213
|
+
}
|
|
214
|
+
static fromJSON(t) {
|
|
215
|
+
return new e(t);
|
|
216
|
+
}
|
|
217
|
+
map(t) {
|
|
218
|
+
return new e(t);
|
|
219
|
+
}
|
|
220
|
+
eq(t) {
|
|
221
|
+
return t instanceof e;
|
|
222
|
+
}
|
|
223
|
+
getBookmark() {
|
|
224
|
+
return _;
|
|
225
|
+
}
|
|
226
|
+
};
|
|
227
|
+
c.jsonID("all", g);
|
|
228
|
+
var _ = {
|
|
229
|
+
map() {
|
|
230
|
+
return this;
|
|
231
|
+
},
|
|
232
|
+
resolve(e) {
|
|
233
|
+
return new g(e);
|
|
234
|
+
}
|
|
235
|
+
};
|
|
236
|
+
function v(e, t, n, r, i, a = !1) {
|
|
237
|
+
if (t.inlineContent) return f.create(e, n);
|
|
238
|
+
for (let o = r - (i > 0 ? 0 : 1); i > 0 ? o < t.childCount : o >= 0; o += i) {
|
|
239
|
+
let r = t.child(o);
|
|
240
|
+
if (!r.isAtom) {
|
|
241
|
+
let t = v(e, r, n + i, i < 0 ? r.childCount : 0, i, a);
|
|
242
|
+
if (t) return t;
|
|
243
|
+
} else if (!a && m.isSelectable(r)) return m.create(e, n - (i < 0 ? r.nodeSize : 0));
|
|
244
|
+
n += r.nodeSize * i;
|
|
245
|
+
}
|
|
246
|
+
return null;
|
|
765
247
|
}
|
|
766
|
-
function
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
248
|
+
function y(e, t, n) {
|
|
249
|
+
let r = e.steps.length - 1;
|
|
250
|
+
if (r < t) return;
|
|
251
|
+
let o = e.steps[r];
|
|
252
|
+
if (!(o instanceof a || o instanceof i)) return;
|
|
253
|
+
let s = e.mapping.maps[r], l;
|
|
254
|
+
s.forEach((e, t, n, r) => {
|
|
255
|
+
l ??= r;
|
|
256
|
+
}), e.setSelection(c.near(e.doc.resolve(l), n));
|
|
772
257
|
}
|
|
773
|
-
class
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
258
|
+
var b = 1, x = 2, S = 4, C = class extends o {
|
|
259
|
+
constructor(e) {
|
|
260
|
+
super(e.doc), this.curSelectionFor = 0, this.updated = 0, this.meta = Object.create(null), this.time = Date.now(), this.curSelection = e.selection, this.storedMarks = e.storedMarks;
|
|
261
|
+
}
|
|
262
|
+
get selection() {
|
|
263
|
+
return this.curSelectionFor < this.steps.length && (this.curSelection = this.curSelection.map(this.doc, this.mapping.slice(this.curSelectionFor)), this.curSelectionFor = this.steps.length), this.curSelection;
|
|
264
|
+
}
|
|
265
|
+
setSelection(e) {
|
|
266
|
+
if (e.$from.doc != this.doc) throw RangeError("Selection passed to setSelection must point at the current document");
|
|
267
|
+
return this.curSelection = e, this.curSelectionFor = this.steps.length, this.updated = (this.updated | b) & -3, this.storedMarks = null, this;
|
|
268
|
+
}
|
|
269
|
+
get selectionSet() {
|
|
270
|
+
return (this.updated & b) > 0;
|
|
271
|
+
}
|
|
272
|
+
setStoredMarks(e) {
|
|
273
|
+
return this.storedMarks = e, this.updated |= x, this;
|
|
274
|
+
}
|
|
275
|
+
ensureMarks(e) {
|
|
276
|
+
return t.sameSet(this.storedMarks || this.selection.$from.marks(), e) || this.setStoredMarks(e), this;
|
|
277
|
+
}
|
|
278
|
+
addStoredMark(e) {
|
|
279
|
+
return this.ensureMarks(e.addToSet(this.storedMarks || this.selection.$head.marks()));
|
|
280
|
+
}
|
|
281
|
+
removeStoredMark(e) {
|
|
282
|
+
return this.ensureMarks(e.removeFromSet(this.storedMarks || this.selection.$head.marks()));
|
|
283
|
+
}
|
|
284
|
+
get storedMarksSet() {
|
|
285
|
+
return (this.updated & x) > 0;
|
|
286
|
+
}
|
|
287
|
+
addStep(e, t) {
|
|
288
|
+
super.addStep(e, t), this.updated &= -3, this.storedMarks = null;
|
|
289
|
+
}
|
|
290
|
+
setTime(e) {
|
|
291
|
+
return this.time = e, this;
|
|
292
|
+
}
|
|
293
|
+
replaceSelection(e) {
|
|
294
|
+
return this.selection.replace(this, e), this;
|
|
295
|
+
}
|
|
296
|
+
replaceSelectionWith(e, n = !0) {
|
|
297
|
+
let r = this.selection;
|
|
298
|
+
return n && (e = e.mark(this.storedMarks || (r.empty ? r.$from.marks() : r.$from.marksAcross(r.$to) || t.none))), r.replaceWith(this, e), this;
|
|
299
|
+
}
|
|
300
|
+
deleteSelection() {
|
|
301
|
+
return this.selection.replace(this), this;
|
|
302
|
+
}
|
|
303
|
+
insertText(e, t, n) {
|
|
304
|
+
let r = this.doc.type.schema;
|
|
305
|
+
if (t == null) return e ? this.replaceSelectionWith(r.text(e), !0) : this.deleteSelection();
|
|
306
|
+
{
|
|
307
|
+
if (n ??= t, !e) return this.deleteRange(t, n);
|
|
308
|
+
let i = this.storedMarks;
|
|
309
|
+
if (!i) {
|
|
310
|
+
let e = this.doc.resolve(t);
|
|
311
|
+
i = n == t ? e.marks() : e.marksAcross(this.doc.resolve(n));
|
|
312
|
+
}
|
|
313
|
+
return this.replaceRangeWith(t, n, r.text(e, i)), !this.selection.empty && this.selection.to == t + e.length && this.setSelection(c.near(this.selection.$to)), this;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
setMeta(e, t) {
|
|
317
|
+
return this.meta[typeof e == "string" ? e : e.key] = t, this;
|
|
318
|
+
}
|
|
319
|
+
getMeta(e) {
|
|
320
|
+
return this.meta[typeof e == "string" ? e : e.key];
|
|
321
|
+
}
|
|
322
|
+
get isGeneric() {
|
|
323
|
+
for (let e in this.meta) return !1;
|
|
324
|
+
return !0;
|
|
325
|
+
}
|
|
326
|
+
scrollIntoView() {
|
|
327
|
+
return this.updated |= S, this;
|
|
328
|
+
}
|
|
329
|
+
get scrolledIntoView() {
|
|
330
|
+
return (this.updated & S) > 0;
|
|
331
|
+
}
|
|
332
|
+
};
|
|
333
|
+
function w(e, t) {
|
|
334
|
+
return !t || !e ? e : e.bind(t);
|
|
786
335
|
}
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
336
|
+
var T = class {
|
|
337
|
+
constructor(e, t, n) {
|
|
338
|
+
this.name = e, this.init = w(t.init, n), this.apply = w(t.apply, n);
|
|
339
|
+
}
|
|
340
|
+
}, E = [
|
|
341
|
+
new T("doc", {
|
|
342
|
+
init(e) {
|
|
343
|
+
return e.doc || e.schema.topNodeType.createAndFill();
|
|
344
|
+
},
|
|
345
|
+
apply(e) {
|
|
346
|
+
return e.doc;
|
|
347
|
+
}
|
|
348
|
+
}),
|
|
349
|
+
new T("selection", {
|
|
350
|
+
init(e, t) {
|
|
351
|
+
return e.selection || c.atStart(t.doc);
|
|
352
|
+
},
|
|
353
|
+
apply(e) {
|
|
354
|
+
return e.selection;
|
|
355
|
+
}
|
|
356
|
+
}),
|
|
357
|
+
new T("storedMarks", {
|
|
358
|
+
init(e) {
|
|
359
|
+
return e.storedMarks || null;
|
|
360
|
+
},
|
|
361
|
+
apply(e, t, n, r) {
|
|
362
|
+
return r.selection.$cursor ? e.storedMarks : null;
|
|
363
|
+
}
|
|
364
|
+
}),
|
|
365
|
+
new T("scrollToSelection", {
|
|
366
|
+
init() {
|
|
367
|
+
return 0;
|
|
368
|
+
},
|
|
369
|
+
apply(e, t) {
|
|
370
|
+
return e.scrolledIntoView ? t + 1 : t;
|
|
371
|
+
}
|
|
372
|
+
})
|
|
373
|
+
], D = class {
|
|
374
|
+
constructor(e, t) {
|
|
375
|
+
this.schema = e, this.plugins = [], this.pluginsByKey = Object.create(null), this.fields = E.slice(), t && t.forEach((e) => {
|
|
376
|
+
if (this.pluginsByKey[e.key]) throw RangeError("Adding different instances of a keyed plugin (" + e.key + ")");
|
|
377
|
+
this.plugins.push(e), this.pluginsByKey[e.key] = e, e.spec.state && this.fields.push(new T(e.key, e.spec.state, e));
|
|
378
|
+
});
|
|
379
|
+
}
|
|
380
|
+
}, O = class e {
|
|
381
|
+
constructor(e) {
|
|
382
|
+
this.config = e;
|
|
383
|
+
}
|
|
384
|
+
get schema() {
|
|
385
|
+
return this.config.schema;
|
|
386
|
+
}
|
|
387
|
+
get plugins() {
|
|
388
|
+
return this.config.plugins;
|
|
389
|
+
}
|
|
390
|
+
apply(e) {
|
|
391
|
+
return this.applyTransaction(e).state;
|
|
392
|
+
}
|
|
393
|
+
filterTransaction(e, t = -1) {
|
|
394
|
+
for (let n = 0; n < this.config.plugins.length; n++) if (n != t) {
|
|
395
|
+
let t = this.config.plugins[n];
|
|
396
|
+
if (t.spec.filterTransaction && !t.spec.filterTransaction.call(t, e, this)) return !1;
|
|
397
|
+
}
|
|
398
|
+
return !0;
|
|
399
|
+
}
|
|
400
|
+
applyTransaction(e) {
|
|
401
|
+
if (!this.filterTransaction(e)) return {
|
|
402
|
+
state: this,
|
|
403
|
+
transactions: []
|
|
404
|
+
};
|
|
405
|
+
let t = [e], n = this.applyInner(e), r = null;
|
|
406
|
+
for (;;) {
|
|
407
|
+
let i = !1;
|
|
408
|
+
for (let a = 0; a < this.config.plugins.length; a++) {
|
|
409
|
+
let o = this.config.plugins[a];
|
|
410
|
+
if (o.spec.appendTransaction) {
|
|
411
|
+
let s = r ? r[a].n : 0, c = r ? r[a].state : this, l = s < t.length && o.spec.appendTransaction.call(o, s ? t.slice(s) : t, c, n);
|
|
412
|
+
if (l && n.filterTransaction(l, a)) {
|
|
413
|
+
if (l.setMeta("appendedTransaction", e), !r) {
|
|
414
|
+
r = [];
|
|
415
|
+
for (let e = 0; e < this.config.plugins.length; e++) r.push(e < a ? {
|
|
416
|
+
state: n,
|
|
417
|
+
n: t.length
|
|
418
|
+
} : {
|
|
419
|
+
state: this,
|
|
420
|
+
n: 0
|
|
421
|
+
});
|
|
422
|
+
}
|
|
423
|
+
t.push(l), n = n.applyInner(l), i = !0;
|
|
424
|
+
}
|
|
425
|
+
r && (r[a] = {
|
|
426
|
+
state: n,
|
|
427
|
+
n: t.length
|
|
428
|
+
});
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
if (!i) return {
|
|
432
|
+
state: n,
|
|
433
|
+
transactions: t
|
|
434
|
+
};
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
applyInner(t) {
|
|
438
|
+
if (!t.before.eq(this.doc)) throw RangeError("Applying a mismatched transaction");
|
|
439
|
+
let n = new e(this.config), r = this.config.fields;
|
|
440
|
+
for (let e = 0; e < r.length; e++) {
|
|
441
|
+
let i = r[e];
|
|
442
|
+
n[i.name] = i.apply(t, this[i.name], this, n);
|
|
443
|
+
}
|
|
444
|
+
return n;
|
|
445
|
+
}
|
|
446
|
+
get tr() {
|
|
447
|
+
return new C(this);
|
|
448
|
+
}
|
|
449
|
+
static create(t) {
|
|
450
|
+
let n = new D(t.doc ? t.doc.type.schema : t.schema, t.plugins), r = new e(n);
|
|
451
|
+
for (let e = 0; e < n.fields.length; e++) r[n.fields[e].name] = n.fields[e].init(t, r);
|
|
452
|
+
return r;
|
|
453
|
+
}
|
|
454
|
+
reconfigure(t) {
|
|
455
|
+
let n = new D(this.schema, t.plugins), r = n.fields, i = new e(n);
|
|
456
|
+
for (let e = 0; e < r.length; e++) {
|
|
457
|
+
let n = r[e].name;
|
|
458
|
+
i[n] = this.hasOwnProperty(n) ? this[n] : r[e].init(t, i);
|
|
459
|
+
}
|
|
460
|
+
return i;
|
|
461
|
+
}
|
|
462
|
+
toJSON(e) {
|
|
463
|
+
let t = {
|
|
464
|
+
doc: this.doc.toJSON(),
|
|
465
|
+
selection: this.selection.toJSON()
|
|
466
|
+
};
|
|
467
|
+
if (this.storedMarks && (t.storedMarks = this.storedMarks.map((e) => e.toJSON())), e && typeof e == "object") for (let n in e) {
|
|
468
|
+
if (n == "doc" || n == "selection") throw RangeError("The JSON fields `doc` and `selection` are reserved");
|
|
469
|
+
let r = e[n], i = r.spec.state;
|
|
470
|
+
i && i.toJSON && (t[n] = i.toJSON.call(r, this[r.key]));
|
|
471
|
+
}
|
|
472
|
+
return t;
|
|
473
|
+
}
|
|
474
|
+
static fromJSON(t, r, i) {
|
|
475
|
+
if (!r) throw RangeError("Invalid input for EditorState.fromJSON");
|
|
476
|
+
if (!t.schema) throw RangeError("Required config field 'schema' missing");
|
|
477
|
+
let a = new D(t.schema, t.plugins), o = new e(a);
|
|
478
|
+
return a.fields.forEach((e) => {
|
|
479
|
+
if (e.name == "doc") o.doc = n.fromJSON(t.schema, r.doc);
|
|
480
|
+
else if (e.name == "selection") o.selection = c.fromJSON(o.doc, r.selection);
|
|
481
|
+
else if (e.name == "storedMarks") r.storedMarks && (o.storedMarks = r.storedMarks.map(t.schema.markFromJSON));
|
|
482
|
+
else {
|
|
483
|
+
if (i) for (let n in i) {
|
|
484
|
+
let a = i[n], s = a.spec.state;
|
|
485
|
+
if (a.key == e.name && s && s.fromJSON && Object.prototype.hasOwnProperty.call(r, n)) {
|
|
486
|
+
o[e.name] = s.fromJSON.call(a, t, r[n], o);
|
|
487
|
+
return;
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
o[e.name] = e.init(t, o);
|
|
491
|
+
}
|
|
492
|
+
}), o;
|
|
493
|
+
}
|
|
494
|
+
};
|
|
495
|
+
function k(e, t, n) {
|
|
496
|
+
for (let r in e) {
|
|
497
|
+
let i = e[r];
|
|
498
|
+
i instanceof Function ? i = i.bind(t) : r == "handleDOMEvents" && (i = k(i, t, {})), n[r] = i;
|
|
499
|
+
}
|
|
500
|
+
return n;
|
|
790
501
|
}
|
|
791
|
-
class
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
*/
|
|
802
|
-
get(e) {
|
|
803
|
-
return e.config.pluginsByKey[this.key];
|
|
804
|
-
}
|
|
805
|
-
/**
|
|
806
|
-
Get the plugin's state from an editor state.
|
|
807
|
-
*/
|
|
808
|
-
getState(e) {
|
|
809
|
-
return e[this.key];
|
|
810
|
-
}
|
|
502
|
+
var A = class {
|
|
503
|
+
constructor(e) {
|
|
504
|
+
this.spec = e, this.props = {}, e.props && k(e.props, this, this.props), this.key = e.key ? e.key.key : M("plugin");
|
|
505
|
+
}
|
|
506
|
+
getState(e) {
|
|
507
|
+
return e[this.key];
|
|
508
|
+
}
|
|
509
|
+
}, j = Object.create(null);
|
|
510
|
+
function M(e) {
|
|
511
|
+
return e in j ? e + "$" + ++j[e] : (j[e] = 0, e + "$");
|
|
811
512
|
}
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
513
|
+
var N = class {
|
|
514
|
+
constructor(e = "key") {
|
|
515
|
+
this.key = M(e);
|
|
516
|
+
}
|
|
517
|
+
get(e) {
|
|
518
|
+
return e.config.pluginsByKey[this.key];
|
|
519
|
+
}
|
|
520
|
+
getState(e) {
|
|
521
|
+
return e[this.key];
|
|
522
|
+
}
|
|
822
523
|
};
|
|
524
|
+
//#endregion
|
|
525
|
+
export { g as AllSelection, O as EditorState, m as NodeSelection, A as Plugin, N as PluginKey, c as Selection, l as SelectionRange, f as TextSelection, C as Transaction };
|