@instincthub/react-ui 0.1.3 → 0.1.4
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/README.md +28 -3
- package/dist/_virtual/_commonjsHelpers.js +1 -1
- package/dist/_virtual/_rollupPluginBabelHelpers.js +1 -1
- package/dist/_virtual/index.js +1 -1
- package/dist/_virtual/index2.js +1 -1
- package/dist/_virtual/lodash.js +1 -1
- package/dist/_virtual/react-is.development.js +1 -1
- package/dist/_virtual/react-is.production.min.js +1 -1
- package/dist/node_modules/@tiptap/core/dist/index.js +1 -1
- package/dist/node_modules/@tiptap/core/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-blockquote/dist/index.js +1 -1
- package/dist/node_modules/@tiptap/extension-blockquote/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-bold/dist/index.js +1 -1
- package/dist/node_modules/@tiptap/extension-bold/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-bullet-list/dist/index.js +1 -1
- package/dist/node_modules/@tiptap/extension-bullet-list/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-character-count/dist/index.js +1 -1
- package/dist/node_modules/@tiptap/extension-character-count/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-code/dist/index.js +1 -1
- package/dist/node_modules/@tiptap/extension-code/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-code-block/dist/index.js +1 -1
- package/dist/node_modules/@tiptap/extension-code-block/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-document/dist/index.js +1 -1
- package/dist/node_modules/@tiptap/extension-document/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-dropcursor/dist/index.js +1 -1
- package/dist/node_modules/@tiptap/extension-dropcursor/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-gapcursor/dist/index.js +1 -1
- package/dist/node_modules/@tiptap/extension-gapcursor/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-hard-break/dist/index.js +1 -1
- package/dist/node_modules/@tiptap/extension-hard-break/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-heading/dist/index.js +1 -1
- package/dist/node_modules/@tiptap/extension-heading/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-highlight/dist/index.js +1 -1
- package/dist/node_modules/@tiptap/extension-highlight/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-history/dist/index.js +1 -1
- package/dist/node_modules/@tiptap/extension-history/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-horizontal-rule/dist/index.js +1 -1
- package/dist/node_modules/@tiptap/extension-horizontal-rule/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-image/dist/index.js +1 -1
- package/dist/node_modules/@tiptap/extension-image/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-italic/dist/index.js +1 -1
- package/dist/node_modules/@tiptap/extension-italic/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-link/dist/index.js +1 -1
- package/dist/node_modules/@tiptap/extension-link/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-list-item/dist/index.js +1 -1
- package/dist/node_modules/@tiptap/extension-list-item/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-ordered-list/dist/index.js +1 -1
- package/dist/node_modules/@tiptap/extension-ordered-list/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-paragraph/dist/index.js +1 -1
- package/dist/node_modules/@tiptap/extension-paragraph/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-placeholder/dist/index.js +1 -1
- package/dist/node_modules/@tiptap/extension-placeholder/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-strike/dist/index.js +1 -1
- package/dist/node_modules/@tiptap/extension-strike/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-table/dist/index.js +1 -1
- package/dist/node_modules/@tiptap/extension-table/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-table-cell/dist/index.js +1 -1
- package/dist/node_modules/@tiptap/extension-table-cell/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-table-header/dist/index.js +1 -1
- package/dist/node_modules/@tiptap/extension-table-header/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-table-row/dist/index.js +1 -1
- package/dist/node_modules/@tiptap/extension-table-row/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-task-item/dist/index.js +1 -1
- package/dist/node_modules/@tiptap/extension-task-item/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-task-list/dist/index.js +1 -1
- package/dist/node_modules/@tiptap/extension-task-list/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-text/dist/index.js +1 -1
- package/dist/node_modules/@tiptap/extension-text/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/react/dist/index.js +3 -3
- package/dist/node_modules/@tiptap/react/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/starter-kit/dist/index.js +1 -1
- package/dist/node_modules/@tiptap/starter-kit/dist/index.js.map +1 -1
- package/dist/node_modules/attr-accept/dist/es/index.js +1 -1
- package/dist/node_modules/attr-accept/dist/es/index.js.map +1 -1
- package/dist/node_modules/date-fns/_lib/addLeadingZeros.js +1 -1
- package/dist/node_modules/date-fns/_lib/addLeadingZeros.js.map +1 -1
- package/dist/node_modules/date-fns/_lib/defaultOptions.js +1 -1
- package/dist/node_modules/date-fns/_lib/defaultOptions.js.map +1 -1
- package/dist/node_modules/date-fns/_lib/format/formatters.js +1 -1
- package/dist/node_modules/date-fns/_lib/format/formatters.js.map +1 -1
- package/dist/node_modules/date-fns/_lib/format/lightFormatters.js +1 -1
- package/dist/node_modules/date-fns/_lib/format/lightFormatters.js.map +1 -1
- package/dist/node_modules/date-fns/_lib/format/longFormatters.js +1 -1
- package/dist/node_modules/date-fns/_lib/format/longFormatters.js.map +1 -1
- package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +1 -1
- package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js.map +1 -1
- package/dist/node_modules/date-fns/_lib/normalizeDates.js +1 -1
- package/dist/node_modules/date-fns/_lib/normalizeDates.js.map +1 -1
- package/dist/node_modules/date-fns/_lib/protectedTokens.js +1 -1
- package/dist/node_modules/date-fns/_lib/protectedTokens.js.map +1 -1
- package/dist/node_modules/date-fns/constants.js +1 -1
- package/dist/node_modules/date-fns/constants.js.map +1 -1
- package/dist/node_modules/date-fns/constructFrom.js +1 -1
- package/dist/node_modules/date-fns/constructFrom.js.map +1 -1
- package/dist/node_modules/date-fns/differenceInCalendarDays.js +1 -1
- package/dist/node_modules/date-fns/differenceInCalendarDays.js.map +1 -1
- package/dist/node_modules/date-fns/format.js +1 -1
- package/dist/node_modules/date-fns/format.js.map +1 -1
- package/dist/node_modules/date-fns/getDayOfYear.js +1 -1
- package/dist/node_modules/date-fns/getDayOfYear.js.map +1 -1
- package/dist/node_modules/date-fns/getISOWeek.js +1 -1
- package/dist/node_modules/date-fns/getISOWeek.js.map +1 -1
- package/dist/node_modules/date-fns/getISOWeekYear.js +1 -1
- package/dist/node_modules/date-fns/getISOWeekYear.js.map +1 -1
- package/dist/node_modules/date-fns/getWeek.js +1 -1
- package/dist/node_modules/date-fns/getWeek.js.map +1 -1
- package/dist/node_modules/date-fns/getWeekYear.js +1 -1
- package/dist/node_modules/date-fns/getWeekYear.js.map +1 -1
- package/dist/node_modules/date-fns/isDate.js +1 -1
- package/dist/node_modules/date-fns/isDate.js.map +1 -1
- package/dist/node_modules/date-fns/isValid.js +1 -1
- package/dist/node_modules/date-fns/isValid.js.map +1 -1
- package/dist/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +1 -1
- package/dist/node_modules/date-fns/locale/_lib/buildFormatLongFn.js.map +1 -1
- package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +1 -1
- package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js.map +1 -1
- package/dist/node_modules/date-fns/locale/_lib/buildMatchFn.js +1 -1
- package/dist/node_modules/date-fns/locale/_lib/buildMatchFn.js.map +1 -1
- package/dist/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +1 -1
- package/dist/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js.map +1 -1
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +1 -1
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js.map +1 -1
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatLong.js +1 -1
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatLong.js.map +1 -1
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +1 -1
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatRelative.js.map +1 -1
- package/dist/node_modules/date-fns/locale/en-US/_lib/localize.js +1 -1
- package/dist/node_modules/date-fns/locale/en-US/_lib/localize.js.map +1 -1
- package/dist/node_modules/date-fns/locale/en-US/_lib/match.js +1 -1
- package/dist/node_modules/date-fns/locale/en-US/_lib/match.js.map +1 -1
- package/dist/node_modules/date-fns/locale/en-US.js +1 -1
- package/dist/node_modules/date-fns/locale/en-US.js.map +1 -1
- package/dist/node_modules/date-fns/startOfDay.js +1 -1
- package/dist/node_modules/date-fns/startOfDay.js.map +1 -1
- package/dist/node_modules/date-fns/startOfISOWeek.js +1 -1
- package/dist/node_modules/date-fns/startOfISOWeek.js.map +1 -1
- package/dist/node_modules/date-fns/startOfISOWeekYear.js +1 -1
- package/dist/node_modules/date-fns/startOfISOWeekYear.js.map +1 -1
- package/dist/node_modules/date-fns/startOfWeek.js +1 -1
- package/dist/node_modules/date-fns/startOfWeek.js.map +1 -1
- package/dist/node_modules/date-fns/startOfWeekYear.js +1 -1
- package/dist/node_modules/date-fns/startOfWeekYear.js.map +1 -1
- package/dist/node_modules/date-fns/startOfYear.js +1 -1
- package/dist/node_modules/date-fns/startOfYear.js.map +1 -1
- package/dist/node_modules/date-fns/toDate.js +1 -1
- package/dist/node_modules/date-fns/toDate.js.map +1 -1
- package/dist/node_modules/dompurify/dist/purify.es.mjs.js +2 -1
- package/dist/node_modules/dompurify/dist/purify.es.mjs.js.map +1 -1
- package/dist/node_modules/file-selector/dist/es2015/file-selector.js +1 -1
- package/dist/node_modules/file-selector/dist/es2015/file-selector.js.map +1 -1
- package/dist/node_modules/file-selector/dist/es2015/file.js +1 -1
- package/dist/node_modules/file-selector/dist/es2015/file.js.map +1 -1
- package/dist/node_modules/html2canvas/dist/html2canvas.esm.js +2 -1
- package/dist/node_modules/html2canvas/dist/html2canvas.esm.js.map +1 -1
- package/dist/node_modules/linkifyjs/dist/linkify.es.js +1 -1
- package/dist/node_modules/linkifyjs/dist/linkify.es.js.map +1 -1
- package/dist/node_modules/lodash/lodash.js +3 -2
- package/dist/node_modules/lodash/lodash.js.map +1 -1
- package/dist/node_modules/marked/lib/marked.esm.js +1 -1
- package/dist/node_modules/marked/lib/marked.esm.js.map +1 -1
- package/dist/node_modules/object-assign/index.js +2 -1
- package/dist/node_modules/object-assign/index.js.map +1 -1
- package/dist/node_modules/orderedmap/dist/index.js +1 -1
- package/dist/node_modules/orderedmap/dist/index.js.map +1 -1
- package/dist/node_modules/prop-types/checkPropTypes.js +1 -1
- package/dist/node_modules/prop-types/checkPropTypes.js.map +1 -1
- package/dist/node_modules/prop-types/factoryWithThrowingShims.js +1 -1
- package/dist/node_modules/prop-types/factoryWithThrowingShims.js.map +1 -1
- package/dist/node_modules/prop-types/factoryWithTypeCheckers.js +1 -1
- package/dist/node_modules/prop-types/factoryWithTypeCheckers.js.map +1 -1
- package/dist/node_modules/prop-types/index.js +1 -1
- package/dist/node_modules/prop-types/index.js.map +1 -1
- package/dist/node_modules/prop-types/lib/ReactPropTypesSecret.js +1 -1
- package/dist/node_modules/prop-types/lib/ReactPropTypesSecret.js.map +1 -1
- package/dist/node_modules/prop-types/lib/has.js +1 -1
- package/dist/node_modules/prop-types/lib/has.js.map +1 -1
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js +2 -2
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js.map +1 -1
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js +2 -2
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js.map +1 -1
- package/dist/node_modules/prop-types/node_modules/react-is/index.js +1 -1
- package/dist/node_modules/prop-types/node_modules/react-is/index.js.map +1 -1
- package/dist/node_modules/prosemirror-commands/dist/index.js +1 -1
- package/dist/node_modules/prosemirror-commands/dist/index.js.map +1 -1
- package/dist/node_modules/prosemirror-dropcursor/dist/index.js +1 -1
- package/dist/node_modules/prosemirror-dropcursor/dist/index.js.map +1 -1
- package/dist/node_modules/prosemirror-gapcursor/dist/index.js +1 -1
- package/dist/node_modules/prosemirror-gapcursor/dist/index.js.map +1 -1
- package/dist/node_modules/prosemirror-history/dist/index.js +1 -1
- package/dist/node_modules/prosemirror-history/dist/index.js.map +1 -1
- package/dist/node_modules/prosemirror-keymap/dist/index.js +1 -1
- package/dist/node_modules/prosemirror-keymap/dist/index.js.map +1 -1
- package/dist/node_modules/prosemirror-model/dist/index.js +1 -1
- package/dist/node_modules/prosemirror-model/dist/index.js.map +1 -1
- package/dist/node_modules/prosemirror-schema-list/dist/index.js +1 -1
- package/dist/node_modules/prosemirror-schema-list/dist/index.js.map +1 -1
- package/dist/node_modules/prosemirror-state/dist/index.js +1 -1
- package/dist/node_modules/prosemirror-state/dist/index.js.map +1 -1
- package/dist/node_modules/prosemirror-tables/dist/index.js +1 -1
- package/dist/node_modules/prosemirror-tables/dist/index.js.map +1 -1
- package/dist/node_modules/prosemirror-transform/dist/index.js +1 -1
- package/dist/node_modules/prosemirror-transform/dist/index.js.map +1 -1
- package/dist/node_modules/prosemirror-view/dist/index.js +1 -1
- package/dist/node_modules/prosemirror-view/dist/index.js.map +1 -1
- package/dist/node_modules/react-dropzone/dist/es/index.js +1 -1
- package/dist/node_modules/react-dropzone/dist/es/index.js.map +1 -1
- package/dist/node_modules/react-dropzone/dist/es/utils/index.js +1 -1
- package/dist/node_modules/react-dropzone/dist/es/utils/index.js.map +1 -1
- package/dist/node_modules/rope-sequence/dist/index.js +1 -1
- package/dist/node_modules/rope-sequence/dist/index.js.map +1 -1
- package/dist/node_modules/tslib/tslib.es6.js +1 -1
- package/dist/node_modules/tslib/tslib.es6.js.map +1 -1
- package/dist/node_modules/w3c-keyname/index.js +1 -1
- package/dist/node_modules/w3c-keyname/index.js.map +1 -1
- package/dist/node_modules/xlsx/xlsx.mjs.js +2 -1
- package/dist/node_modules/xlsx/xlsx.mjs.js.map +1 -1
- package/dist/src/components/auth/ClientDetector.js +1 -1
- package/dist/src/components/auth/ClientOnly.js +1 -1
- package/dist/src/components/auth/FromInstinctHub.js +1 -1
- package/dist/src/components/auth/FromInstinctHub.js.map +1 -1
- package/dist/src/components/auth/IsUsernameEmailTaken.js +1 -1
- package/dist/src/components/auth/LoginForm.js +1 -1
- package/dist/src/components/auth/PasswordsMatch.js +1 -1
- package/dist/src/components/auth/ReactClientProviders.js +1 -1
- package/dist/src/components/cursors/Cursor.js +1 -1
- package/dist/src/components/cursors/CursorContext.js +1 -1
- package/dist/src/components/cursors/CursorControlDemo.js +1 -1
- package/dist/src/components/cursors/MagneticButton.js +1 -1
- package/dist/src/components/cursors/index.js +1 -1
- package/dist/src/components/cursors/index.js.map +1 -1
- package/dist/src/components/cursors/useCursorInteraction.js +1 -1
- package/dist/src/components/forms/ActionCallbackDropdown.js +1 -1
- package/dist/src/components/forms/ActionDropdown.js +1 -1
- package/dist/src/components/forms/AnimatedBox.js +1 -1
- package/dist/src/components/forms/CheckBoxes.js +1 -1
- package/dist/src/components/forms/CheckboxesField.js +1 -1
- package/dist/src/components/forms/ChipsInput.js +1 -1
- package/dist/src/components/forms/DateInput.js +1 -1
- package/dist/src/components/forms/DateInputPicker.js +1 -1
- package/dist/src/components/forms/DateTimeInput.js +1 -1
- package/dist/src/components/forms/DownloadAsExcel.js +1 -1
- package/dist/src/components/forms/DropFile.js +1 -1
- package/dist/src/components/forms/EmailList.js +1 -1
- package/dist/src/components/forms/FileField.js +1 -1
- package/dist/src/components/forms/FilterArray.js +1 -1
- package/dist/src/components/forms/FilterBy.js +1 -1
- package/dist/src/components/forms/FilterObjects.js +1 -1
- package/dist/src/components/forms/FormError.js +1 -1
- package/dist/src/components/forms/FormError.js.map +1 -1
- package/dist/src/components/forms/HandleError.js +1 -1
- package/dist/src/components/forms/InputAmount.js +1 -1
- package/dist/src/components/forms/InputNumber.js +1 -1
- package/dist/src/components/forms/InputText.js +1 -1
- package/dist/src/components/forms/InputTextarea.js +1 -1
- package/dist/src/components/forms/Logout.js +1 -1
- package/dist/src/components/forms/MessageDisplay.js +1 -1
- package/dist/src/components/forms/MessageDisplay.js.map +1 -1
- package/dist/src/components/forms/MultipleEmail.js +1 -1
- package/dist/src/components/forms/PageLoading.js +1 -1
- package/dist/src/components/forms/PageLoading.js.map +1 -1
- package/dist/src/components/forms/PasswordField.js +1 -1
- package/dist/src/components/forms/PhoneNumberInput.js +1 -1
- package/dist/src/components/forms/RadioField.js +1 -1
- package/dist/src/components/forms/RadioField.js.map +1 -1
- package/dist/src/components/forms/RadioSimple.js +1 -1
- package/dist/src/components/forms/RadioSimple.js.map +1 -1
- package/dist/src/components/forms/ReactTimeAgo.js +1 -1
- package/dist/src/components/forms/ReadTermsAndCondition.js +1 -1
- package/dist/src/components/forms/SearchField.js +1 -1
- package/dist/src/components/forms/SearchFieldDB.js +1 -1
- package/dist/src/components/forms/SearchObjectsFromDB.js +1 -1
- package/dist/src/components/forms/StepProgressBar.js +1 -1
- package/dist/src/components/forms/StepProgressBar.js.map +1 -1
- package/dist/src/components/forms/SubmitButton.js +1 -1
- package/dist/src/components/forms/TBodyNoData.js +1 -1
- package/dist/src/components/forms/TBodyNoData.js.map +1 -1
- package/dist/src/components/forms/THeadSortBtn.js +1 -1
- package/dist/src/components/forms/THeadSortBtn.js.map +1 -1
- package/dist/src/components/forms/THeadSortList.js +1 -1
- package/dist/src/components/forms/Tables.js +1 -1
- package/dist/src/components/forms/TextArea.js +1 -1
- package/dist/src/components/forms/TextArea.js.map +1 -1
- package/dist/src/components/forms/TextField.js +1 -1
- package/dist/src/components/forms/ToggleButton.js +1 -1
- package/dist/src/components/forms/Tooltip.js +1 -1
- package/dist/src/components/forms/UnsplashRandomImage.js +1 -1
- package/dist/src/components/forms/radio-btn/RadioButton.js +1 -1
- package/dist/src/components/forms/radio-btn/RadioButton.js.map +1 -1
- package/dist/src/components/forms/radio-btn/RadioGroup.js +1 -1
- package/dist/src/components/forms/radio-btn/RadioGroup.js.map +1 -1
- package/dist/src/components/forms/uploads/FileUploader.js +1 -1
- package/dist/src/components/forms/uploads/IhubFileUploader.js +1 -1
- package/dist/src/components/lib/auth/actions.js +1 -1
- package/dist/src/components/lib/auth/dbRequestst.js +1 -1
- package/dist/src/components/lib/auth/dbRequestst.js.map +1 -1
- package/dist/src/components/lib/charts.js +1 -1
- package/dist/src/components/lib/charts.js.map +1 -1
- package/dist/src/components/lib/convertArrayToObject.js +1 -1
- package/dist/src/components/lib/convertArrayToObject.js.map +1 -1
- package/dist/src/components/lib/createSubscription.js +1 -1
- package/dist/src/components/lib/createSubscription.js.map +1 -1
- package/dist/src/components/lib/elementIsVisibleInViewport.js +1 -1
- package/dist/src/components/lib/elementIsVisibleInViewport.js.map +1 -1
- package/dist/src/components/lib/fileToBase64.js +1 -1
- package/dist/src/components/lib/fileToBase64.js.map +1 -1
- package/dist/src/components/lib/formError.js +1 -1
- package/dist/src/components/lib/formError.js.map +1 -1
- package/dist/src/components/lib/format.js +1 -1
- package/dist/src/components/lib/format.js.map +1 -1
- package/dist/src/components/lib/getPriceObjects.js +1 -1
- package/dist/src/components/lib/getPriceObjects.js.map +1 -1
- package/dist/src/components/lib/helpFunction.js +1 -1
- package/dist/src/components/lib/helpFunction.js.map +1 -1
- package/dist/src/components/lib/index.js +1 -1
- package/dist/src/components/lib/index.js.map +1 -1
- package/dist/src/components/lib/json/accounts.js +1 -1
- package/dist/src/components/lib/json/accounts.js.map +1 -1
- package/dist/src/components/lib/json/countryObjects.js +1 -1
- package/dist/src/components/lib/json/countryObjects.js.map +1 -1
- package/dist/src/components/lib/json/unsplashDefaultObject.js +1 -1
- package/dist/src/components/lib/json/unsplashDefaultObject.js.map +1 -1
- package/dist/src/components/lib/loadScript.js +2 -0
- package/dist/src/components/lib/loadScript.js.map +1 -0
- package/dist/src/components/lib/modals/modals.js +1 -1
- package/dist/src/components/lib/modals/modals.js.map +1 -1
- package/dist/src/components/lib/modals/openConfirmDelete.js +1 -1
- package/dist/src/components/lib/modals/openConfirmDelete.js.map +1 -1
- package/dist/src/components/lib/oauth_json.js +1 -1
- package/dist/src/components/lib/oauth_json.js.map +1 -1
- package/dist/src/components/lib/paystack.js +1 -1
- package/dist/src/components/lib/paystack.js.map +1 -1
- package/dist/src/components/lib/permissions.js +1 -1
- package/dist/src/components/lib/permissions.js.map +1 -1
- package/dist/src/components/lib/queryParameters/index.js +1 -1
- package/dist/src/components/lib/queryParameters/index.js.map +1 -1
- package/dist/src/components/lib/redux/index.js +1 -1
- package/dist/src/components/lib/redux/middleware.js +1 -1
- package/dist/src/components/lib/redux/middleware.js.map +1 -1
- package/dist/src/components/lib/redux/rootReducer.js +1 -1
- package/dist/src/components/lib/redux/rootReducer.js.map +1 -1
- package/dist/src/components/lib/redux/slices/authSlice/channelCallbackUrl.js +1 -1
- package/dist/src/components/lib/redux/slices/authSlice/channelCallbackUrl.js.map +1 -1
- package/dist/src/components/lib/redux/slices/authSlice/selectors.js +1 -1
- package/dist/src/components/lib/redux/slices/authSlice/selectors.js.map +1 -1
- package/dist/src/components/lib/redux/slices/channelSlice/activeChannel.js +1 -1
- package/dist/src/components/lib/redux/slices/channelSlice/activeChannel.js.map +1 -1
- package/dist/src/components/lib/redux/slices/channelSlice/channelDetails.js +1 -1
- package/dist/src/components/lib/redux/slices/channelSlice/channelDetails.js.map +1 -1
- package/dist/src/components/lib/redux/slices/channelSlice/channelHandle.js +1 -1
- package/dist/src/components/lib/redux/slices/channelSlice/channelHandle.js.map +1 -1
- package/dist/src/components/lib/redux/slices/channelSlice/instructorChannelList.js +1 -1
- package/dist/src/components/lib/redux/slices/channelSlice/instructorChannelList.js.map +1 -1
- package/dist/src/components/lib/redux/slices/channelSlice/selectors.js +1 -1
- package/dist/src/components/lib/redux/slices/channelSlice/selectors.js.map +1 -1
- package/dist/src/components/lib/redux/slices/courseSlice/courseDetails.js +1 -1
- package/dist/src/components/lib/redux/slices/courseSlice/courseDetails.js.map +1 -1
- package/dist/src/components/lib/redux/slices/courseSlice/courseFilterDuration.js +1 -1
- package/dist/src/components/lib/redux/slices/courseSlice/courseFilterDuration.js.map +1 -1
- package/dist/src/components/lib/redux/slices/courseSlice/courseFilterLevel.js +1 -1
- package/dist/src/components/lib/redux/slices/courseSlice/courseFilterLevel.js.map +1 -1
- package/dist/src/components/lib/redux/slices/courseSlice/courseFilterSubject.js +1 -1
- package/dist/src/components/lib/redux/slices/courseSlice/courseFilterSubject.js.map +1 -1
- package/dist/src/components/lib/redux/slices/courseSlice/courseModules.js +1 -1
- package/dist/src/components/lib/redux/slices/courseSlice/courseModules.js.map +1 -1
- package/dist/src/components/lib/redux/slices/courseSlice/courseOverview.js +1 -1
- package/dist/src/components/lib/redux/slices/courseSlice/courseOverview.js.map +1 -1
- package/dist/src/components/lib/redux/slices/courseSlice/courseSearch.js +1 -1
- package/dist/src/components/lib/redux/slices/courseSlice/courseSearch.js.map +1 -1
- package/dist/src/components/lib/redux/slices/courseSlice/selectedCourses.js +1 -1
- package/dist/src/components/lib/redux/slices/courseSlice/selectedCourses.js.map +1 -1
- package/dist/src/components/lib/redux/slices/courseSlice/selectors.js +1 -1
- package/dist/src/components/lib/redux/slices/courseSlice/selectors.js.map +1 -1
- package/dist/src/components/lib/redux/slices/courseSlice/stepContent.js +1 -1
- package/dist/src/components/lib/redux/slices/courseSlice/stepContent.js.map +1 -1
- package/dist/src/components/lib/redux/slices/courseSlice/stepQuestions.js +1 -1
- package/dist/src/components/lib/redux/slices/courseSlice/stepQuestions.js.map +1 -1
- package/dist/src/components/lib/redux/slices/courseSlice/videoTimestamp.js +1 -1
- package/dist/src/components/lib/redux/slices/courseSlice/videoTimestamp.js.map +1 -1
- package/dist/src/components/lib/redux/slices/courseSlice/videoTimestampObject.js +1 -1
- package/dist/src/components/lib/redux/slices/courseSlice/videoTimestampObject.js.map +1 -1
- package/dist/src/components/lib/redux/slices/generics/arraySlice.js +1 -1
- package/dist/src/components/lib/redux/slices/generics/arraySlice.js.map +1 -1
- package/dist/src/components/lib/redux/slices/generics/objectSlice.js +1 -1
- package/dist/src/components/lib/redux/slices/generics/objectSlice.js.map +1 -1
- package/dist/src/components/lib/redux/slices/generics/selectors.js +1 -1
- package/dist/src/components/lib/redux/slices/generics/selectors.js.map +1 -1
- package/dist/src/components/lib/redux/slices/messageSlice/feedbackToggle.js +1 -1
- package/dist/src/components/lib/redux/slices/messageSlice/feedbackToggle.js.map +1 -1
- package/dist/src/components/lib/redux/slices/messageSlice/selectors.js +1 -1
- package/dist/src/components/lib/redux/slices/messageSlice/selectors.js.map +1 -1
- package/dist/src/components/lib/redux/slices/messageSlice/statusMessageState.js +1 -1
- package/dist/src/components/lib/redux/slices/messageSlice/statusMessageState.js.map +1 -1
- package/dist/src/components/lib/redux/slices/navigationSlice/IPAdress.js +1 -1
- package/dist/src/components/lib/redux/slices/navigationSlice/IPAdress.js.map +1 -1
- package/dist/src/components/lib/redux/slices/navigationSlice/appToggle.js +1 -1
- package/dist/src/components/lib/redux/slices/navigationSlice/appToggle.js.map +1 -1
- package/dist/src/components/lib/redux/slices/navigationSlice/confirmDelete.js +1 -1
- package/dist/src/components/lib/redux/slices/navigationSlice/confirmDelete.js.map +1 -1
- package/dist/src/components/lib/redux/slices/navigationSlice/courseNextStep.js +1 -1
- package/dist/src/components/lib/redux/slices/navigationSlice/courseNextStep.js.map +1 -1
- package/dist/src/components/lib/redux/slices/navigationSlice/currentPromo.js +1 -1
- package/dist/src/components/lib/redux/slices/navigationSlice/currentPromo.js.map +1 -1
- package/dist/src/components/lib/redux/slices/navigationSlice/searchValue.js +1 -1
- package/dist/src/components/lib/redux/slices/navigationSlice/searchValue.js.map +1 -1
- package/dist/src/components/lib/redux/slices/navigationSlice/selectors.js +1 -1
- package/dist/src/components/lib/redux/slices/navigationSlice/selectors.js.map +1 -1
- package/dist/src/components/lib/redux/slices/navigationSlice/settingsToggle.js +1 -1
- package/dist/src/components/lib/redux/slices/navigationSlice/settingsToggle.js.map +1 -1
- package/dist/src/components/lib/redux/slices/navigationSlice/toggleCreateCohort.js +1 -1
- package/dist/src/components/lib/redux/slices/navigationSlice/toggleCreateCohort.js.map +1 -1
- package/dist/src/components/lib/redux/slices/navigationSlice/toggleCreateCourse.js +1 -1
- package/dist/src/components/lib/redux/slices/navigationSlice/toggleCreateCourse.js.map +1 -1
- package/dist/src/components/lib/redux/slices/navigationSlice/userLocation.js +1 -1
- package/dist/src/components/lib/redux/slices/navigationSlice/userLocation.js.map +1 -1
- package/dist/src/components/lib/redux/slices/utilsSlice/screenSize.js +1 -1
- package/dist/src/components/lib/redux/slices/utilsSlice/screenSize.js.map +1 -1
- package/dist/src/components/lib/redux/slices/utilsSlice/selectors.js +1 -1
- package/dist/src/components/lib/redux/slices/utilsSlice/selectors.js.map +1 -1
- package/dist/src/components/lib/redux/store.js +1 -1
- package/dist/src/components/lib/redux/store.js.map +1 -1
- package/dist/src/components/lib/roles.js +1 -1
- package/dist/src/components/lib/roles.js.map +1 -1
- package/dist/src/components/lib/utils.js +1 -1
- package/dist/src/components/lib/utils.js.map +1 -1
- package/dist/src/components/navbar/Breadcrumb.js +1 -1
- package/dist/src/components/navbar/ChannelListAvatar.js +1 -1
- package/dist/src/components/navbar/MenuDropdown.js +1 -1
- package/dist/src/components/navbar/ResponsiveNavbar.js +1 -1
- package/dist/src/components/navbar/SideNavbar.js +1 -1
- package/dist/src/components/status/CopyToClipBoard.js +1 -1
- package/dist/src/components/status/DeleteConfirmationModal.js +1 -1
- package/dist/src/components/status/Error500.js +1 -1
- package/dist/src/components/status/Error500.js.map +1 -1
- package/dist/src/components/status/ErrorState.js +1 -1
- package/dist/src/components/status/ErrorState.js.map +1 -1
- package/dist/src/components/status/ModalExamples.js +1 -1
- package/dist/src/components/status/MultiPurposeModal.js +1 -1
- package/dist/src/components/status/NotFound.js +1 -1
- package/dist/src/components/status/ReactTimeTracker.js +1 -1
- package/dist/src/components/status/SessionHandleProvider.js +1 -1
- package/dist/src/components/status/Unauthorized.js +1 -1
- package/dist/src/components/status/Unauthorized.js.map +1 -1
- package/dist/src/components/tabs/TabContent.js +1 -1
- package/dist/src/components/tabs/TabContent.js.map +1 -1
- package/dist/src/components/tabs/Tabs.js +1 -1
- package/dist/src/components/tabs/VerticalTabs.js +1 -1
- package/dist/src/components/theme/ChangeStyleVariable.js +1 -1
- package/dist/src/components/theme/DarkModeProvider.js +1 -1
- package/dist/src/components/theme/LoadingAnimate.js +1 -1
- package/dist/src/components/theme/LoadingAnimate.js.map +1 -1
- package/dist/src/components/theme/SessionProviders.js +1 -1
- package/dist/src/components/theme/signout/SessionExpiresLogout.js +1 -1
- package/dist/src/components/theme/signout/SignOutSession.js +1 -1
- package/dist/src/components/ui/Action.js +1 -1
- package/dist/src/components/ui/Action.js.map +1 -1
- package/dist/src/components/ui/Badge.js +1 -1
- package/dist/src/components/ui/Badge.js.map +1 -1
- package/dist/src/components/ui/ColorPicker.js +1 -1
- package/dist/src/components/ui/ComponentLists.js +1 -1
- package/dist/src/components/ui/ComponentLists.js.map +1 -1
- package/dist/src/components/ui/Dropdown.js +1 -1
- package/dist/src/components/ui/OrDivider.js +1 -1
- package/dist/src/components/ui/cards/Card.js +1 -1
- package/dist/src/components/ui/cards/CardGrid.js +1 -1
- package/dist/src/components/ui/cards/CardGrid.js.map +1 -1
- package/dist/src/components/ui/cards/CardList.js +1 -1
- package/dist/src/components/ui/cards/CardList.js.map +1 -1
- package/dist/src/components/ui/cards/FeatureCard.js +1 -1
- package/dist/src/components/ui/cards/FeatureCard.js.map +1 -1
- package/dist/src/components/ui/cards/HorizontalCard.js +1 -1
- package/dist/src/components/ui/cards/HorizontalCard.js.map +1 -1
- package/dist/src/components/ui/cards/MediaCard.js +1 -1
- package/dist/src/components/ui/cards/MediaCard.js.map +1 -1
- package/dist/src/components/ui/cards/PricingCard.js +1 -1
- package/dist/src/components/ui/cards/PricingCard.js.map +1 -1
- package/dist/src/components/ui/cards/ProfileCard.js +1 -1
- package/dist/src/components/ui/cards/ProfileCard.js.map +1 -1
- package/dist/src/components/ui/charts/ChartConfigurator.js +1 -1
- package/dist/src/components/ui/charts/InstinctHubChart.js +1 -1
- package/dist/src/components/ui/charts/InstinctHubChartDashboard.js +1 -1
- package/dist/src/components/ui/create-button/CreateButton.js +1 -1
- package/dist/src/components/ui/create-button/CreateButtonExample.js +1 -1
- package/dist/src/components/ui/create-button/CreateButtonExample.js.map +1 -1
- package/dist/src/components/ui/dialogs/Dialog.js +1 -1
- package/dist/src/components/ui/editor/CustomTextEditor.js +1 -1
- package/dist/src/components/ui/editor/MenuBar.js +1 -1
- package/dist/src/components/ui/images/RandomGradientImage.js +1 -1
- package/dist/src/components/ui/images/RandomGradientImage.js.map +1 -1
- package/dist/src/components/ui/pagination/Pagination.js +1 -1
- package/dist/src/components/ui/pagination/PaginationDemo.js +1 -1
- package/dist/src/components/ui/tables/IHubTable.js +1 -1
- package/dist/src/components/ui/tables/IHubTableServer.js +1 -1
- package/dist/src/components/ui/viewer/CodeDisplay.js +1 -1
- package/dist/src/components/ui/viewer/ContentViewOrEdit.js +1 -1
- package/dist/src/components/ui/viewer/ContentViewer.js +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/ssr.js +1 -1
- package/dist/src/types/components/auth/IsUsernameEmailTaken.d.ts +13 -0
- package/dist/src/types/components/forms/DateInput.d.ts +3 -4
- package/dist/src/types/components/forms/FilterObjects.d.ts +1 -1
- package/dist/src/types/components/forms/uploads/IhubFileUploader.d.ts +1 -1
- package/dist/src/types/components/lib/index.d.ts +1 -1
- package/dist/src/types/components/lib/redux/slices/channelSlice/channelDetails.d.ts +1 -1
- package/dist/src/types/components/lib/redux/slices/channelSlice/instructorChannelList.d.ts +3 -2
- package/dist/src/types/components/lib/redux/slices/courseSlice/courseDetails.d.ts +1 -1
- package/dist/src/types/components/lib/redux/slices/courseSlice/courseFilterDuration.d.ts +1 -1
- package/dist/src/types/components/lib/redux/slices/courseSlice/courseFilterLevel.d.ts +1 -1
- package/dist/src/types/components/lib/redux/slices/courseSlice/courseFilterSubject.d.ts +1 -1
- package/dist/src/types/components/lib/redux/slices/courseSlice/courseModules.d.ts +1 -1
- package/dist/src/types/components/lib/redux/slices/courseSlice/courseOverview.d.ts +1 -1
- package/dist/src/types/components/lib/redux/slices/courseSlice/courseSearch.d.ts +1 -1
- package/dist/src/types/components/lib/redux/slices/courseSlice/stepContent.d.ts +1 -1
- package/dist/src/types/components/lib/redux/slices/courseSlice/stepQuestions.d.ts +1 -1
- package/dist/src/types/components/lib/redux/slices/courseSlice/videoTimestamp.d.ts +1 -1
- package/dist/src/types/components/lib/redux/slices/courseSlice/videoTimestampObject.d.ts +1 -1
- package/dist/src/types/components/lib/redux/slices/navigationSlice/IPAdress.d.ts +1 -1
- package/dist/src/types/components/status/ReactTimeTracker.d.ts +1 -1
- package/dist/src/types/components/tabs/Tabs.d.ts +1 -1
- package/dist/src/types/components/tabs/VerticalTabs.d.ts +1 -1
- package/dist/src/types/components/theme/signout/SessionExpiresLogout.d.ts +1 -1
- package/dist/src/types/components/ui/Action.d.ts +1 -1
- package/dist/src/types/types/index.d.ts +4 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +26 -9
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../core/dist/index.js");const e=/^\s*>\s$/,o=t.Node.create({name:"blockquote",addOptions:()=>({HTMLAttributes:{}}),content:"block+",group:"block",defining:!0,parseHTML:()=>[{tag:"blockquote"}],renderHTML({HTMLAttributes:e}){return["blockquote",t.mergeAttributes(this.options.HTMLAttributes,e),0]},addCommands(){return{setBlockquote:()=>({commands:t})=>t.wrapIn(this.name),toggleBlockquote:()=>({commands:t})=>t.toggleWrap(this.name),unsetBlockquote:()=>({commands:t})=>t.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[t.wrappingInputRule({find:e,type:this.type})]}});exports.Blockquote=o,exports.default=o,exports.inputRegex=e;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../node_modules/@tiptap/extension-blockquote/dist/index.js"],"sourcesContent":["import { Node, mergeAttributes, wrappingInputRule } from '@tiptap/core';\n\n/**\n * Matches a blockquote to a `>` as input.\n */\nconst inputRegex = /^\\s*>\\s$/;\n/**\n * This extension allows you to create blockquotes.\n * @see https://tiptap.dev/api/nodes/blockquote\n */\nconst Blockquote = Node.create({\n name: 'blockquote',\n addOptions() {\n return {\n HTMLAttributes: {},\n };\n },\n content: 'block+',\n group: 'block',\n defining: true,\n parseHTML() {\n return [\n { tag: 'blockquote' },\n ];\n },\n renderHTML({ HTMLAttributes }) {\n return ['blockquote', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];\n },\n addCommands() {\n return {\n setBlockquote: () => ({ commands }) => {\n return commands.wrapIn(this.name);\n },\n toggleBlockquote: () => ({ commands }) => {\n return commands.toggleWrap(this.name);\n },\n unsetBlockquote: () => ({ commands }) => {\n return commands.lift(this.name);\n },\n };\n },\n addKeyboardShortcuts() {\n return {\n 'Mod-Shift-b': () => this.editor.commands.toggleBlockquote(),\n };\n },\n addInputRules() {\n return [\n wrappingInputRule({\n find: inputRegex,\n type: this.type,\n }),\n ];\n },\n});\n\nexport { Blockquote, Blockquote as default, inputRegex };\n//# sourceMappingURL=index.js.map\n"],"names":["inputRegex","Blockquote","Node","create","name","addOptions","HTMLAttributes","content","group","defining","parseHTML","tag","renderHTML","mergeAttributes","this","options","addCommands","setBlockquote","commands","wrapIn","toggleBlockquote","toggleWrap","unsetBlockquote","lift","addKeyboardShortcuts","editor","addInputRules","wrappingInputRule","find","type"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../node_modules/@tiptap/extension-blockquote/dist/index.js"],"sourcesContent":["import { Node, mergeAttributes, wrappingInputRule } from '@tiptap/core';\n\n/**\n * Matches a blockquote to a `>` as input.\n */\nconst inputRegex = /^\\s*>\\s$/;\n/**\n * This extension allows you to create blockquotes.\n * @see https://tiptap.dev/api/nodes/blockquote\n */\nconst Blockquote = Node.create({\n name: 'blockquote',\n addOptions() {\n return {\n HTMLAttributes: {},\n };\n },\n content: 'block+',\n group: 'block',\n defining: true,\n parseHTML() {\n return [\n { tag: 'blockquote' },\n ];\n },\n renderHTML({ HTMLAttributes }) {\n return ['blockquote', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];\n },\n addCommands() {\n return {\n setBlockquote: () => ({ commands }) => {\n return commands.wrapIn(this.name);\n },\n toggleBlockquote: () => ({ commands }) => {\n return commands.toggleWrap(this.name);\n },\n unsetBlockquote: () => ({ commands }) => {\n return commands.lift(this.name);\n },\n };\n },\n addKeyboardShortcuts() {\n return {\n 'Mod-Shift-b': () => this.editor.commands.toggleBlockquote(),\n };\n },\n addInputRules() {\n return [\n wrappingInputRule({\n find: inputRegex,\n type: this.type,\n }),\n ];\n },\n});\n\nexport { Blockquote, Blockquote as default, inputRegex };\n//# sourceMappingURL=index.js.map\n"],"names":["inputRegex","Blockquote","Node","create","name","addOptions","HTMLAttributes","content","group","defining","parseHTML","tag","renderHTML","mergeAttributes","this","options","addCommands","setBlockquote","commands","wrapIn","toggleBlockquote","toggleWrap","unsetBlockquote","lift","addKeyboardShortcuts","editor","addInputRules","wrappingInputRule","find","type"],"mappings":"8GAKK,MAACA,EAAa,WAKbC,EAAaC,EAAIA,KAACC,OAAO,CAC3BC,KAAM,aACNC,WAAU,KACC,CACHC,eAAgB,CAAE,IAG1BC,QAAS,SACTC,MAAO,QACPC,UAAU,EACVC,UAAS,IACE,CACH,CAAEC,IAAK,eAGf,UAAAC,EAAWN,eAAEA,IACT,MAAO,CAAC,aAAcO,EAAAA,gBAAgBC,KAAKC,QAAQT,eAAgBA,GAAiB,EACvF,EACD,WAAAU,GACI,MAAO,CACHC,cAAe,IAAM,EAAGC,cACbA,EAASC,OAAOL,KAAKV,MAEhCgB,iBAAkB,IAAM,EAAGF,cAChBA,EAASG,WAAWP,KAAKV,MAEpCkB,gBAAiB,IAAM,EAAGJ,cACfA,EAASK,KAAKT,KAAKV,MAGrC,EACD,oBAAAoB,GACI,MAAO,CACH,cAAe,IAAMV,KAAKW,OAAOP,SAASE,mBAEjD,EACD,aAAAM,GACI,MAAO,CACHC,oBAAkB,CACdC,KAAM5B,EACN6B,KAAMf,KAAKe,OAGtB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../core/dist/index.js");const e=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,s=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,r=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,o=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,n=t.Mark.create({name:"bold",addOptions:()=>({HTMLAttributes:{}}),parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:t=>"normal"!==t.style.fontWeight&&null},{style:"font-weight=400",clearMark:t=>t.type.name===this.name},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}]},renderHTML({HTMLAttributes:e}){return["strong",t.mergeAttributes(this.options.HTMLAttributes,e),0]},addCommands(){return{setBold:()=>({commands:t})=>t.setMark(this.name),toggleBold:()=>({commands:t})=>t.toggleMark(this.name),unsetBold:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[t.markInputRule({find:e,type:this.type}),t.markInputRule({find:r,type:this.type})]},addPasteRules(){return[t.markPasteRule({find:s,type:this.type}),t.markPasteRule({find:o,type:this.type})]}});exports.Bold=n,exports.default=n,exports.starInputRegex=e,exports.starPasteRegex=s,exports.underscoreInputRegex=r,exports.underscorePasteRegex=o;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../node_modules/@tiptap/extension-bold/dist/index.js"],"sourcesContent":["import { Mark, mergeAttributes, markInputRule, markPasteRule } from '@tiptap/core';\n\n/**\n * Matches bold text via `**` as input.\n */\nconst starInputRegex = /(?:^|\\s)(\\*\\*(?!\\s+\\*\\*)((?:[^*]+))\\*\\*(?!\\s+\\*\\*))$/;\n/**\n * Matches bold text via `**` while pasting.\n */\nconst starPasteRegex = /(?:^|\\s)(\\*\\*(?!\\s+\\*\\*)((?:[^*]+))\\*\\*(?!\\s+\\*\\*))/g;\n/**\n * Matches bold text via `__` as input.\n */\nconst underscoreInputRegex = /(?:^|\\s)(__(?!\\s+__)((?:[^_]+))__(?!\\s+__))$/;\n/**\n * Matches bold text via `__` while pasting.\n */\nconst underscorePasteRegex = /(?:^|\\s)(__(?!\\s+__)((?:[^_]+))__(?!\\s+__))/g;\n/**\n * This extension allows you to mark text as bold.\n * @see https://tiptap.dev/api/marks/bold\n */\nconst Bold = Mark.create({\n name: 'bold',\n addOptions() {\n return {\n HTMLAttributes: {},\n };\n },\n parseHTML() {\n return [\n {\n tag: 'strong',\n },\n {\n tag: 'b',\n getAttrs: node => node.style.fontWeight !== 'normal' && null,\n },\n {\n style: 'font-weight=400',\n clearMark: mark => mark.type.name === this.name,\n },\n {\n style: 'font-weight',\n getAttrs: value => /^(bold(er)?|[5-9]\\d{2,})$/.test(value) && null,\n },\n ];\n },\n renderHTML({ HTMLAttributes }) {\n return ['strong', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];\n },\n addCommands() {\n return {\n setBold: () => ({ commands }) => {\n return commands.setMark(this.name);\n },\n toggleBold: () => ({ commands }) => {\n return commands.toggleMark(this.name);\n },\n unsetBold: () => ({ commands }) => {\n return commands.unsetMark(this.name);\n },\n };\n },\n addKeyboardShortcuts() {\n return {\n 'Mod-b': () => this.editor.commands.toggleBold(),\n 'Mod-B': () => this.editor.commands.toggleBold(),\n };\n },\n addInputRules() {\n return [\n markInputRule({\n find: starInputRegex,\n type: this.type,\n }),\n markInputRule({\n find: underscoreInputRegex,\n type: this.type,\n }),\n ];\n },\n addPasteRules() {\n return [\n markPasteRule({\n find: starPasteRegex,\n type: this.type,\n }),\n markPasteRule({\n find: underscorePasteRegex,\n type: this.type,\n }),\n ];\n },\n});\n\nexport { Bold, Bold as default, starInputRegex, starPasteRegex, underscoreInputRegex, underscorePasteRegex };\n//# sourceMappingURL=index.js.map\n"],"names":["starInputRegex","starPasteRegex","underscoreInputRegex","underscorePasteRegex","Bold","Mark","create","name","addOptions","HTMLAttributes","parseHTML","tag","getAttrs","node","style","fontWeight","clearMark","mark","type","this","value","test","renderHTML","mergeAttributes","options","addCommands","setBold","commands","setMark","toggleBold","toggleMark","unsetBold","unsetMark","addKeyboardShortcuts","editor","addInputRules","markInputRule","find","addPasteRules","markPasteRule"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../node_modules/@tiptap/extension-bold/dist/index.js"],"sourcesContent":["import { Mark, mergeAttributes, markInputRule, markPasteRule } from '@tiptap/core';\n\n/**\n * Matches bold text via `**` as input.\n */\nconst starInputRegex = /(?:^|\\s)(\\*\\*(?!\\s+\\*\\*)((?:[^*]+))\\*\\*(?!\\s+\\*\\*))$/;\n/**\n * Matches bold text via `**` while pasting.\n */\nconst starPasteRegex = /(?:^|\\s)(\\*\\*(?!\\s+\\*\\*)((?:[^*]+))\\*\\*(?!\\s+\\*\\*))/g;\n/**\n * Matches bold text via `__` as input.\n */\nconst underscoreInputRegex = /(?:^|\\s)(__(?!\\s+__)((?:[^_]+))__(?!\\s+__))$/;\n/**\n * Matches bold text via `__` while pasting.\n */\nconst underscorePasteRegex = /(?:^|\\s)(__(?!\\s+__)((?:[^_]+))__(?!\\s+__))/g;\n/**\n * This extension allows you to mark text as bold.\n * @see https://tiptap.dev/api/marks/bold\n */\nconst Bold = Mark.create({\n name: 'bold',\n addOptions() {\n return {\n HTMLAttributes: {},\n };\n },\n parseHTML() {\n return [\n {\n tag: 'strong',\n },\n {\n tag: 'b',\n getAttrs: node => node.style.fontWeight !== 'normal' && null,\n },\n {\n style: 'font-weight=400',\n clearMark: mark => mark.type.name === this.name,\n },\n {\n style: 'font-weight',\n getAttrs: value => /^(bold(er)?|[5-9]\\d{2,})$/.test(value) && null,\n },\n ];\n },\n renderHTML({ HTMLAttributes }) {\n return ['strong', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];\n },\n addCommands() {\n return {\n setBold: () => ({ commands }) => {\n return commands.setMark(this.name);\n },\n toggleBold: () => ({ commands }) => {\n return commands.toggleMark(this.name);\n },\n unsetBold: () => ({ commands }) => {\n return commands.unsetMark(this.name);\n },\n };\n },\n addKeyboardShortcuts() {\n return {\n 'Mod-b': () => this.editor.commands.toggleBold(),\n 'Mod-B': () => this.editor.commands.toggleBold(),\n };\n },\n addInputRules() {\n return [\n markInputRule({\n find: starInputRegex,\n type: this.type,\n }),\n markInputRule({\n find: underscoreInputRegex,\n type: this.type,\n }),\n ];\n },\n addPasteRules() {\n return [\n markPasteRule({\n find: starPasteRegex,\n type: this.type,\n }),\n markPasteRule({\n find: underscorePasteRegex,\n type: this.type,\n }),\n ];\n },\n});\n\nexport { Bold, Bold as default, starInputRegex, starPasteRegex, underscoreInputRegex, underscorePasteRegex };\n//# sourceMappingURL=index.js.map\n"],"names":["starInputRegex","starPasteRegex","underscoreInputRegex","underscorePasteRegex","Bold","Mark","create","name","addOptions","HTMLAttributes","parseHTML","tag","getAttrs","node","style","fontWeight","clearMark","mark","type","this","value","test","renderHTML","mergeAttributes","options","addCommands","setBold","commands","setMark","toggleBold","toggleMark","unsetBold","unsetMark","addKeyboardShortcuts","editor","addInputRules","markInputRule","find","addPasteRules","markPasteRule"],"mappings":"8GAKK,MAACA,EAAiB,uDAIjBC,EAAiB,uDAIjBC,EAAuB,+CAIvBC,EAAuB,+CAKvBC,EAAOC,EAAIA,KAACC,OAAO,CACrBC,KAAM,OACNC,WAAU,KACC,CACHC,eAAgB,CAAE,IAG1B,SAAAC,GACI,MAAO,CACH,CACIC,IAAK,UAET,CACIA,IAAK,IACLC,SAAUC,GAAkC,WAA1BA,EAAKC,MAAMC,YAA2B,MAE5D,CACID,MAAO,kBACPE,UAAWC,GAAQA,EAAKC,KAAKX,OAASY,KAAKZ,MAE/C,CACIO,MAAO,cACPF,SAAUQ,GAAS,4BAA4BC,KAAKD,IAAU,MAGzE,EACD,UAAAE,EAAWb,eAAEA,IACT,MAAO,CAAC,SAAUc,EAAAA,gBAAgBJ,KAAKK,QAAQf,eAAgBA,GAAiB,EACnF,EACD,WAAAgB,GACI,MAAO,CACHC,QAAS,IAAM,EAAGC,cACPA,EAASC,QAAQT,KAAKZ,MAEjCsB,WAAY,IAAM,EAAGF,cACVA,EAASG,WAAWX,KAAKZ,MAEpCwB,UAAW,IAAM,EAAGJ,cACTA,EAASK,UAAUb,KAAKZ,MAG1C,EACD,oBAAA0B,GACI,MAAO,CACH,QAAS,IAAMd,KAAKe,OAAOP,SAASE,aACpC,QAAS,IAAMV,KAAKe,OAAOP,SAASE,aAE3C,EACD,aAAAM,GACI,MAAO,CACHC,gBAAc,CACVC,KAAMrC,EACNkB,KAAMC,KAAKD,OAEfkB,gBAAc,CACVC,KAAMnC,EACNgB,KAAMC,KAAKD,OAGtB,EACD,aAAAoB,GACI,MAAO,CACHC,gBAAc,CACVF,KAAMpC,EACNiB,KAAMC,KAAKD,OAEfqB,gBAAc,CACVF,KAAMlC,EACNe,KAAMC,KAAKD,OAGtB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../core/dist/index.js");const e="textStyle",s=/^\s*([-+*])\s$/,i=t.Node.create({name:"bulletList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML:()=>[{tag:"ul"}],renderHTML({HTMLAttributes:e}){return["ul",t.mergeAttributes(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleBulletList:()=>({commands:t,chain:s})=>this.options.keepAttributes?s().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes("listItem",this.editor.getAttributes(e)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let i=t.wrappingInputRule({find:s,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(i=t.wrappingInputRule({find:s,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(e),editor:this.editor})),[i]}});exports.BulletList=i,exports.default=i,exports.inputRegex=s;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../node_modules/@tiptap/extension-bullet-list/dist/index.js"],"sourcesContent":["import { Node, mergeAttributes, wrappingInputRule } from '@tiptap/core';\n\nconst ListItemName = 'listItem';\nconst TextStyleName = 'textStyle';\n/**\n * Matches a bullet list to a dash or asterisk.\n */\nconst inputRegex = /^\\s*([-+*])\\s$/;\n/**\n * This extension allows you to create bullet lists.\n * This requires the ListItem extension\n * @see https://tiptap.dev/api/nodes/bullet-list\n * @see https://tiptap.dev/api/nodes/list-item.\n */\nconst BulletList = Node.create({\n name: 'bulletList',\n addOptions() {\n return {\n itemTypeName: 'listItem',\n HTMLAttributes: {},\n keepMarks: false,\n keepAttributes: false,\n };\n },\n group: 'block list',\n content() {\n return `${this.options.itemTypeName}+`;\n },\n parseHTML() {\n return [\n { tag: 'ul' },\n ];\n },\n renderHTML({ HTMLAttributes }) {\n return ['ul', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];\n },\n addCommands() {\n return {\n toggleBulletList: () => ({ commands, chain }) => {\n if (this.options.keepAttributes) {\n return chain().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(ListItemName, this.editor.getAttributes(TextStyleName)).run();\n }\n return commands.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks);\n },\n };\n },\n addKeyboardShortcuts() {\n return {\n 'Mod-Shift-8': () => this.editor.commands.toggleBulletList(),\n };\n },\n addInputRules() {\n let inputRule = wrappingInputRule({\n find: inputRegex,\n type: this.type,\n });\n if (this.options.keepMarks || this.options.keepAttributes) {\n inputRule = wrappingInputRule({\n find: inputRegex,\n type: this.type,\n keepMarks: this.options.keepMarks,\n keepAttributes: this.options.keepAttributes,\n getAttributes: () => { return this.editor.getAttributes(TextStyleName); },\n editor: this.editor,\n });\n }\n return [\n inputRule,\n ];\n },\n});\n\nexport { BulletList, BulletList as default, inputRegex };\n//# sourceMappingURL=index.js.map\n"],"names":["TextStyleName","inputRegex","BulletList","Node","create","name","addOptions","itemTypeName","HTMLAttributes","keepMarks","keepAttributes","group","content","this","options","parseHTML","tag","renderHTML","mergeAttributes","addCommands","toggleBulletList","commands","chain","toggleList","updateAttributes","editor","getAttributes","run","addKeyboardShortcuts","addInputRules","inputRule","wrappingInputRule","find","type"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../node_modules/@tiptap/extension-bullet-list/dist/index.js"],"sourcesContent":["import { Node, mergeAttributes, wrappingInputRule } from '@tiptap/core';\n\nconst ListItemName = 'listItem';\nconst TextStyleName = 'textStyle';\n/**\n * Matches a bullet list to a dash or asterisk.\n */\nconst inputRegex = /^\\s*([-+*])\\s$/;\n/**\n * This extension allows you to create bullet lists.\n * This requires the ListItem extension\n * @see https://tiptap.dev/api/nodes/bullet-list\n * @see https://tiptap.dev/api/nodes/list-item.\n */\nconst BulletList = Node.create({\n name: 'bulletList',\n addOptions() {\n return {\n itemTypeName: 'listItem',\n HTMLAttributes: {},\n keepMarks: false,\n keepAttributes: false,\n };\n },\n group: 'block list',\n content() {\n return `${this.options.itemTypeName}+`;\n },\n parseHTML() {\n return [\n { tag: 'ul' },\n ];\n },\n renderHTML({ HTMLAttributes }) {\n return ['ul', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];\n },\n addCommands() {\n return {\n toggleBulletList: () => ({ commands, chain }) => {\n if (this.options.keepAttributes) {\n return chain().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(ListItemName, this.editor.getAttributes(TextStyleName)).run();\n }\n return commands.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks);\n },\n };\n },\n addKeyboardShortcuts() {\n return {\n 'Mod-Shift-8': () => this.editor.commands.toggleBulletList(),\n };\n },\n addInputRules() {\n let inputRule = wrappingInputRule({\n find: inputRegex,\n type: this.type,\n });\n if (this.options.keepMarks || this.options.keepAttributes) {\n inputRule = wrappingInputRule({\n find: inputRegex,\n type: this.type,\n keepMarks: this.options.keepMarks,\n keepAttributes: this.options.keepAttributes,\n getAttributes: () => { return this.editor.getAttributes(TextStyleName); },\n editor: this.editor,\n });\n }\n return [\n inputRule,\n ];\n },\n});\n\nexport { BulletList, BulletList as default, inputRegex };\n//# sourceMappingURL=index.js.map\n"],"names":["TextStyleName","inputRegex","BulletList","Node","create","name","addOptions","itemTypeName","HTMLAttributes","keepMarks","keepAttributes","group","content","this","options","parseHTML","tag","renderHTML","mergeAttributes","addCommands","toggleBulletList","commands","chain","toggleList","updateAttributes","editor","getAttributes","run","addKeyboardShortcuts","addInputRules","inputRule","wrappingInputRule","find","type"],"mappings":"8GAEA,MACMA,EAAgB,YAIhBC,EAAa,iBAObC,EAAaC,EAAIA,KAACC,OAAO,CAC3BC,KAAM,aACNC,WAAU,KACC,CACHC,aAAc,WACdC,eAAgB,CAAE,EAClBC,WAAW,EACXC,gBAAgB,IAGxBC,MAAO,aACP,OAAAC,GACI,MAAO,GAAGC,KAAKC,QAAQP,eAC1B,EACDQ,UAAS,IACE,CACH,CAAEC,IAAK,OAGf,UAAAC,EAAWT,eAAEA,IACT,MAAO,CAAC,KAAMU,EAAAA,gBAAgBL,KAAKC,QAAQN,eAAgBA,GAAiB,EAC/E,EACD,WAAAW,GACI,MAAO,CACHC,iBAAkB,IAAM,EAAGC,WAAUC,WAC7BT,KAAKC,QAAQJ,eACNY,IAAQC,WAAWV,KAAKR,KAAMQ,KAAKC,QAAQP,aAAcM,KAAKC,QAAQL,WAAWe,iBAtCvF,WAsCsHX,KAAKY,OAAOC,cAAc1B,IAAgB2B,MAE9JN,EAASE,WAAWV,KAAKR,KAAMQ,KAAKC,QAAQP,aAAcM,KAAKC,QAAQL,WAGzF,EACD,oBAAAmB,GACI,MAAO,CACH,cAAe,IAAMf,KAAKY,OAAOJ,SAASD,mBAEjD,EACD,aAAAS,GACI,IAAIC,EAAYC,EAAAA,kBAAkB,CAC9BC,KAAM/B,EACNgC,KAAMpB,KAAKoB,OAYf,OAVIpB,KAAKC,QAAQL,WAAaI,KAAKC,QAAQJ,kBACvCoB,EAAYC,EAAAA,kBAAkB,CAC1BC,KAAM/B,EACNgC,KAAMpB,KAAKoB,KACXxB,UAAWI,KAAKC,QAAQL,UACxBC,eAAgBG,KAAKC,QAAQJ,eAC7BgB,cAAe,IAAeb,KAAKY,OAAOC,cAAc1B,GACxDyB,OAAQZ,KAAKY,UAGd,CACHK,EAEP"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../core/dist/index.js"),e=require("../../../prosemirror-state/dist/index.js");const r=t.Extension.create({name:"characterCount",addOptions:()=>({limit:null,mode:"textSize",textCounter:t=>t.length,wordCounter:t=>t.split(" ").filter((t=>""!==t)).length}),addStorage:()=>({characters:()=>0,words:()=>0}),onBeforeCreate(){this.storage.characters=t=>{const e=(null==t?void 0:t.node)||this.editor.state.doc;if("textSize"===((null==t?void 0:t.mode)||this.options.mode)){const t=e.textBetween(0,e.content.size,void 0," ");return this.options.textCounter(t)}return e.nodeSize},this.storage.words=t=>{const e=(null==t?void 0:t.node)||this.editor.state.doc,r=e.textBetween(0,e.content.size," "," ");return this.options.wordCounter(r)}},addProseMirrorPlugins(){let t=!1;return[new e.Plugin({key:new e.PluginKey("characterCount"),appendTransaction:(e,r,o)=>{if(t)return;const n=this.options.limit;if(null==n||0===n)return void(t=!0);const i=this.storage.characters({node:o.doc});if(i>n){const e=0,r=i-n;console.warn(`[CharacterCount] Initial content exceeded limit of ${n} characters. Content was automatically trimmed.`);const s=o.tr.deleteRange(e,r);return t=!0,s}t=!0},filterTransaction:(t,e)=>{const r=this.options.limit;if(!t.docChanged||0===r||null==r)return!0;const o=this.storage.characters({node:e.doc}),n=this.storage.characters({node:t.doc});if(n<=r)return!0;if(o>r&&n>r&&n<=o)return!0;if(o>r&&n>r&&n>o)return!1;if(!t.getMeta("paste"))return!1;const i=t.selection.$head.pos,s=i-(n-r),a=i;t.deleteRange(s,a);return!(this.storage.characters({node:t.doc})>r)}})]}});exports.CharacterCount=r,exports.default=r;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../node_modules/@tiptap/extension-character-count/dist/index.js"],"sourcesContent":["import { Extension } from '@tiptap/core';\nimport { Plugin, PluginKey } from '@tiptap/pm/state';\n\n/**\n * This extension allows you to count the characters and words of your document.\n * @see https://tiptap.dev/api/extensions/character-count\n */\nconst CharacterCount = Extension.create({\n name: 'characterCount',\n addOptions() {\n return {\n limit: null,\n mode: 'textSize',\n textCounter: text => text.length,\n wordCounter: text => text.split(' ').filter(word => word !== '').length,\n };\n },\n addStorage() {\n return {\n characters: () => 0,\n words: () => 0,\n };\n },\n onBeforeCreate() {\n this.storage.characters = options => {\n const node = (options === null || options === void 0 ? void 0 : options.node) || this.editor.state.doc;\n const mode = (options === null || options === void 0 ? void 0 : options.mode) || this.options.mode;\n if (mode === 'textSize') {\n const text = node.textBetween(0, node.content.size, undefined, ' ');\n return this.options.textCounter(text);\n }\n return node.nodeSize;\n };\n this.storage.words = options => {\n const node = (options === null || options === void 0 ? void 0 : options.node) || this.editor.state.doc;\n const text = node.textBetween(0, node.content.size, ' ', ' ');\n return this.options.wordCounter(text);\n };\n },\n addProseMirrorPlugins() {\n let initialEvaluationDone = false;\n return [\n new Plugin({\n key: new PluginKey('characterCount'),\n appendTransaction: (transactions, oldState, newState) => {\n if (initialEvaluationDone) {\n return;\n }\n const limit = this.options.limit;\n if (limit === null || limit === undefined || limit === 0) {\n initialEvaluationDone = true;\n return;\n }\n const initialContentSize = this.storage.characters({ node: newState.doc });\n if (initialContentSize > limit) {\n const over = initialContentSize - limit;\n const from = 0;\n const to = over;\n console.warn(`[CharacterCount] Initial content exceeded limit of ${limit} characters. Content was automatically trimmed.`);\n const tr = newState.tr.deleteRange(from, to);\n initialEvaluationDone = true;\n return tr;\n }\n initialEvaluationDone = true;\n },\n filterTransaction: (transaction, state) => {\n const limit = this.options.limit;\n // Nothing has changed or no limit is defined. Ignore it.\n if (!transaction.docChanged || limit === 0 || limit === null || limit === undefined) {\n return true;\n }\n const oldSize = this.storage.characters({ node: state.doc });\n const newSize = this.storage.characters({ node: transaction.doc });\n // Everything is in the limit. Good.\n if (newSize <= limit) {\n return true;\n }\n // The limit has already been exceeded but will be reduced.\n if (oldSize > limit && newSize > limit && newSize <= oldSize) {\n return true;\n }\n // The limit has already been exceeded and will be increased further.\n if (oldSize > limit && newSize > limit && newSize > oldSize) {\n return false;\n }\n const isPaste = transaction.getMeta('paste');\n // Block all exceeding transactions that were not pasted.\n if (!isPaste) {\n return false;\n }\n // For pasted content, we try to remove the exceeding content.\n const pos = transaction.selection.$head.pos;\n const over = newSize - limit;\n const from = pos - over;\n const to = pos;\n // It’s probably a bad idea to mutate transactions within `filterTransaction`\n // but for now this is working fine.\n transaction.deleteRange(from, to);\n // In some situations, the limit will continue to be exceeded after trimming.\n // This happens e.g. when truncating within a complex node (e.g. table)\n // and ProseMirror has to close this node again.\n // If this is the case, we prevent the transaction completely.\n const updatedSize = this.storage.characters({ node: transaction.doc });\n if (updatedSize > limit) {\n return false;\n }\n return true;\n },\n }),\n ];\n },\n});\n\nexport { CharacterCount, CharacterCount as default };\n//# sourceMappingURL=index.js.map\n"],"names":["CharacterCount","Extension","create","name","addOptions","limit","mode","textCounter","text","length","wordCounter","split","filter","word","addStorage","characters","words","onBeforeCreate","this","storage","options","node","editor","state","doc","textBetween","content","size","undefined","nodeSize","addProseMirrorPlugins","initialEvaluationDone","Plugin","key","PluginKey","appendTransaction","transactions","oldState","newState","initialContentSize","from","to","console","warn","tr","deleteRange","filterTransaction","transaction","docChanged","oldSize","newSize","getMeta","pos","selection","$head"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../node_modules/@tiptap/extension-character-count/dist/index.js"],"sourcesContent":["import { Extension } from '@tiptap/core';\nimport { Plugin, PluginKey } from '@tiptap/pm/state';\n\n/**\n * This extension allows you to count the characters and words of your document.\n * @see https://tiptap.dev/api/extensions/character-count\n */\nconst CharacterCount = Extension.create({\n name: 'characterCount',\n addOptions() {\n return {\n limit: null,\n mode: 'textSize',\n textCounter: text => text.length,\n wordCounter: text => text.split(' ').filter(word => word !== '').length,\n };\n },\n addStorage() {\n return {\n characters: () => 0,\n words: () => 0,\n };\n },\n onBeforeCreate() {\n this.storage.characters = options => {\n const node = (options === null || options === void 0 ? void 0 : options.node) || this.editor.state.doc;\n const mode = (options === null || options === void 0 ? void 0 : options.mode) || this.options.mode;\n if (mode === 'textSize') {\n const text = node.textBetween(0, node.content.size, undefined, ' ');\n return this.options.textCounter(text);\n }\n return node.nodeSize;\n };\n this.storage.words = options => {\n const node = (options === null || options === void 0 ? void 0 : options.node) || this.editor.state.doc;\n const text = node.textBetween(0, node.content.size, ' ', ' ');\n return this.options.wordCounter(text);\n };\n },\n addProseMirrorPlugins() {\n let initialEvaluationDone = false;\n return [\n new Plugin({\n key: new PluginKey('characterCount'),\n appendTransaction: (transactions, oldState, newState) => {\n if (initialEvaluationDone) {\n return;\n }\n const limit = this.options.limit;\n if (limit === null || limit === undefined || limit === 0) {\n initialEvaluationDone = true;\n return;\n }\n const initialContentSize = this.storage.characters({ node: newState.doc });\n if (initialContentSize > limit) {\n const over = initialContentSize - limit;\n const from = 0;\n const to = over;\n console.warn(`[CharacterCount] Initial content exceeded limit of ${limit} characters. Content was automatically trimmed.`);\n const tr = newState.tr.deleteRange(from, to);\n initialEvaluationDone = true;\n return tr;\n }\n initialEvaluationDone = true;\n },\n filterTransaction: (transaction, state) => {\n const limit = this.options.limit;\n // Nothing has changed or no limit is defined. Ignore it.\n if (!transaction.docChanged || limit === 0 || limit === null || limit === undefined) {\n return true;\n }\n const oldSize = this.storage.characters({ node: state.doc });\n const newSize = this.storage.characters({ node: transaction.doc });\n // Everything is in the limit. Good.\n if (newSize <= limit) {\n return true;\n }\n // The limit has already been exceeded but will be reduced.\n if (oldSize > limit && newSize > limit && newSize <= oldSize) {\n return true;\n }\n // The limit has already been exceeded and will be increased further.\n if (oldSize > limit && newSize > limit && newSize > oldSize) {\n return false;\n }\n const isPaste = transaction.getMeta('paste');\n // Block all exceeding transactions that were not pasted.\n if (!isPaste) {\n return false;\n }\n // For pasted content, we try to remove the exceeding content.\n const pos = transaction.selection.$head.pos;\n const over = newSize - limit;\n const from = pos - over;\n const to = pos;\n // It’s probably a bad idea to mutate transactions within `filterTransaction`\n // but for now this is working fine.\n transaction.deleteRange(from, to);\n // In some situations, the limit will continue to be exceeded after trimming.\n // This happens e.g. when truncating within a complex node (e.g. table)\n // and ProseMirror has to close this node again.\n // If this is the case, we prevent the transaction completely.\n const updatedSize = this.storage.characters({ node: transaction.doc });\n if (updatedSize > limit) {\n return false;\n }\n return true;\n },\n }),\n ];\n },\n});\n\nexport { CharacterCount, CharacterCount as default };\n//# sourceMappingURL=index.js.map\n"],"names":["CharacterCount","Extension","create","name","addOptions","limit","mode","textCounter","text","length","wordCounter","split","filter","word","addStorage","characters","words","onBeforeCreate","this","storage","options","node","editor","state","doc","textBetween","content","size","undefined","nodeSize","addProseMirrorPlugins","initialEvaluationDone","Plugin","key","PluginKey","appendTransaction","transactions","oldState","newState","initialContentSize","from","to","console","warn","tr","deleteRange","filterTransaction","transaction","docChanged","oldSize","newSize","getMeta","pos","selection","$head"],"mappings":"oKAOK,MAACA,EAAiBC,EAASA,UAACC,OAAO,CACpCC,KAAM,iBACNC,WAAU,KACC,CACHC,MAAO,KACPC,KAAM,WACNC,YAAaC,GAAQA,EAAKC,OAC1BC,YAAaF,GAAQA,EAAKG,MAAM,KAAKC,QAAOC,GAAiB,KAATA,IAAaJ,SAGzEK,WAAU,KACC,CACHC,WAAY,IAAM,EAClBC,MAAO,IAAM,IAGrB,cAAAC,GACIC,KAAKC,QAAQJ,WAAaK,IACtB,MAAMC,GAAQD,aAAyC,EAASA,EAAQC,OAASH,KAAKI,OAAOC,MAAMC,IAEnG,GAAa,eADCJ,aAAyC,EAASA,EAAQd,OAASY,KAAKE,QAAQd,MACrE,CACrB,MAAME,EAAOa,EAAKI,YAAY,EAAGJ,EAAKK,QAAQC,UAAMC,EAAW,KAC/D,OAAOV,KAAKE,QAAQb,YAAYC,EACnC,CACD,OAAOa,EAAKQ,QAAQ,EAExBX,KAAKC,QAAQH,MAAQI,IACjB,MAAMC,GAAQD,aAAyC,EAASA,EAAQC,OAASH,KAAKI,OAAOC,MAAMC,IAC7FhB,EAAOa,EAAKI,YAAY,EAAGJ,EAAKK,QAAQC,KAAM,IAAK,KACzD,OAAOT,KAAKE,QAAQV,YAAYF,EAAK,CAE5C,EACD,qBAAAsB,GACI,IAAIC,GAAwB,EAC5B,MAAO,CACH,IAAIC,SAAO,CACPC,IAAK,IAAIC,EAASA,UAAC,kBACnBC,kBAAmB,CAACC,EAAcC,EAAUC,KACxC,GAAIP,EACA,OAEJ,MAAM1B,EAAQa,KAAKE,QAAQf,MAC3B,GAAIA,SAAmD,IAAVA,EAEzC,YADA0B,GAAwB,GAG5B,MAAMQ,EAAqBrB,KAAKC,QAAQJ,WAAW,CAAEM,KAAMiB,EAASd,MACpE,GAAIe,EAAqBlC,EAAO,CAC5B,MACMmC,EAAO,EACPC,EAFOF,EAAqBlC,EAGlCqC,QAAQC,KAAK,sDAAsDtC,oDACnE,MAAMuC,EAAKN,EAASM,GAAGC,YAAYL,EAAMC,GAEzC,OADAV,GAAwB,EACjBa,CACV,CACDb,GAAwB,CAAI,EAEhCe,kBAAmB,CAACC,EAAaxB,KAC7B,MAAMlB,EAAQa,KAAKE,QAAQf,MAE3B,IAAK0C,EAAYC,YAAwB,IAAV3C,GAA3B,MAA0CA,EAC1C,OAAO,EAEX,MAAM4C,EAAU/B,KAAKC,QAAQJ,WAAW,CAAEM,KAAME,EAAMC,MAChD0B,EAAUhC,KAAKC,QAAQJ,WAAW,CAAEM,KAAM0B,EAAYvB,MAE5D,GAAI0B,GAAW7C,EACX,OAAO,EAGX,GAAI4C,EAAU5C,GAAS6C,EAAU7C,GAAS6C,GAAWD,EACjD,OAAO,EAGX,GAAIA,EAAU5C,GAAS6C,EAAU7C,GAAS6C,EAAUD,EAChD,OAAO,EAIX,IAFgBF,EAAYI,QAAQ,SAGhC,OAAO,EAGX,MAAMC,EAAML,EAAYM,UAAUC,MAAMF,IAElCZ,EAAOY,GADAF,EAAU7C,GAEjBoC,EAAKW,EAGXL,EAAYF,YAAYL,EAAMC,GAM9B,QADoBvB,KAAKC,QAAQJ,WAAW,CAAEM,KAAM0B,EAAYvB,MAC9CnB,EAGP,IAI1B"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../core/dist/index.js");const t=/(^|[^`])`([^`]+)`(?!`)/,s=/(^|[^`])`([^`]+)`(?!`)/g,r=e.Mark.create({name:"code",addOptions:()=>({HTMLAttributes:{}}),excludes:"_",code:!0,exitable:!0,parseHTML:()=>[{tag:"code"}],renderHTML({HTMLAttributes:t}){return["code",e.mergeAttributes(this.options.HTMLAttributes,t),0]},addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[e.markInputRule({find:t,type:this.type})]},addPasteRules(){return[e.markPasteRule({find:s,type:this.type})]}});exports.Code=r,exports.default=r,exports.inputRegex=t,exports.pasteRegex=s;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../node_modules/@tiptap/extension-code/dist/index.js"],"sourcesContent":["import { Mark, mergeAttributes, markInputRule, markPasteRule } from '@tiptap/core';\n\n/**\n * Regular expressions to match inline code blocks enclosed in backticks.\n * It matches:\n * - An opening backtick, followed by\n * - Any text that doesn't include a backtick (captured for marking), followed by\n * - A closing backtick.\n * This ensures that any text between backticks is formatted as code,\n * regardless of the surrounding characters (exception being another backtick).\n */\nconst inputRegex = /(^|[^`])`([^`]+)`(?!`)/;\n/**\n * Matches inline code while pasting.\n */\nconst pasteRegex = /(^|[^`])`([^`]+)`(?!`)/g;\n/**\n * This extension allows you to mark text as inline code.\n * @see https://tiptap.dev/api/marks/code\n */\nconst Code = Mark.create({\n name: 'code',\n addOptions() {\n return {\n HTMLAttributes: {},\n };\n },\n excludes: '_',\n code: true,\n exitable: true,\n parseHTML() {\n return [\n { tag: 'code' },\n ];\n },\n renderHTML({ HTMLAttributes }) {\n return ['code', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];\n },\n addCommands() {\n return {\n setCode: () => ({ commands }) => {\n return commands.setMark(this.name);\n },\n toggleCode: () => ({ commands }) => {\n return commands.toggleMark(this.name);\n },\n unsetCode: () => ({ commands }) => {\n return commands.unsetMark(this.name);\n },\n };\n },\n addKeyboardShortcuts() {\n return {\n 'Mod-e': () => this.editor.commands.toggleCode(),\n };\n },\n addInputRules() {\n return [\n markInputRule({\n find: inputRegex,\n type: this.type,\n }),\n ];\n },\n addPasteRules() {\n return [\n markPasteRule({\n find: pasteRegex,\n type: this.type,\n }),\n ];\n },\n});\n\nexport { Code, Code as default, inputRegex, pasteRegex };\n//# sourceMappingURL=index.js.map\n"],"names":["inputRegex","pasteRegex","Code","Mark","create","name","addOptions","HTMLAttributes","excludes","code","exitable","parseHTML","tag","renderHTML","mergeAttributes","this","options","addCommands","setCode","commands","setMark","toggleCode","toggleMark","unsetCode","unsetMark","addKeyboardShortcuts","editor","addInputRules","markInputRule","find","type","addPasteRules","markPasteRule"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../node_modules/@tiptap/extension-code/dist/index.js"],"sourcesContent":["import { Mark, mergeAttributes, markInputRule, markPasteRule } from '@tiptap/core';\n\n/**\n * Regular expressions to match inline code blocks enclosed in backticks.\n * It matches:\n * - An opening backtick, followed by\n * - Any text that doesn't include a backtick (captured for marking), followed by\n * - A closing backtick.\n * This ensures that any text between backticks is formatted as code,\n * regardless of the surrounding characters (exception being another backtick).\n */\nconst inputRegex = /(^|[^`])`([^`]+)`(?!`)/;\n/**\n * Matches inline code while pasting.\n */\nconst pasteRegex = /(^|[^`])`([^`]+)`(?!`)/g;\n/**\n * This extension allows you to mark text as inline code.\n * @see https://tiptap.dev/api/marks/code\n */\nconst Code = Mark.create({\n name: 'code',\n addOptions() {\n return {\n HTMLAttributes: {},\n };\n },\n excludes: '_',\n code: true,\n exitable: true,\n parseHTML() {\n return [\n { tag: 'code' },\n ];\n },\n renderHTML({ HTMLAttributes }) {\n return ['code', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];\n },\n addCommands() {\n return {\n setCode: () => ({ commands }) => {\n return commands.setMark(this.name);\n },\n toggleCode: () => ({ commands }) => {\n return commands.toggleMark(this.name);\n },\n unsetCode: () => ({ commands }) => {\n return commands.unsetMark(this.name);\n },\n };\n },\n addKeyboardShortcuts() {\n return {\n 'Mod-e': () => this.editor.commands.toggleCode(),\n };\n },\n addInputRules() {\n return [\n markInputRule({\n find: inputRegex,\n type: this.type,\n }),\n ];\n },\n addPasteRules() {\n return [\n markPasteRule({\n find: pasteRegex,\n type: this.type,\n }),\n ];\n },\n});\n\nexport { Code, Code as default, inputRegex, pasteRegex };\n//# sourceMappingURL=index.js.map\n"],"names":["inputRegex","pasteRegex","Code","Mark","create","name","addOptions","HTMLAttributes","excludes","code","exitable","parseHTML","tag","renderHTML","mergeAttributes","this","options","addCommands","setCode","commands","setMark","toggleCode","toggleMark","unsetCode","unsetMark","addKeyboardShortcuts","editor","addInputRules","markInputRule","find","type","addPasteRules","markPasteRule"],"mappings":"8GAWK,MAACA,EAAa,yBAIbC,EAAa,0BAKbC,EAAOC,EAAIA,KAACC,OAAO,CACrBC,KAAM,OACNC,WAAU,KACC,CACHC,eAAgB,CAAE,IAG1BC,SAAU,IACVC,MAAM,EACNC,UAAU,EACVC,UAAS,IACE,CACH,CAAEC,IAAK,SAGf,UAAAC,EAAWN,eAAEA,IACT,MAAO,CAAC,OAAQO,EAAAA,gBAAgBC,KAAKC,QAAQT,eAAgBA,GAAiB,EACjF,EACD,WAAAU,GACI,MAAO,CACHC,QAAS,IAAM,EAAGC,cACPA,EAASC,QAAQL,KAAKV,MAEjCgB,WAAY,IAAM,EAAGF,cACVA,EAASG,WAAWP,KAAKV,MAEpCkB,UAAW,IAAM,EAAGJ,cACTA,EAASK,UAAUT,KAAKV,MAG1C,EACD,oBAAAoB,GACI,MAAO,CACH,QAAS,IAAMV,KAAKW,OAAOP,SAASE,aAE3C,EACD,aAAAM,GACI,MAAO,CACHC,gBAAc,CACVC,KAAM7B,EACN8B,KAAMf,KAAKe,OAGtB,EACD,aAAAC,GACI,MAAO,CACHC,gBAAc,CACVH,KAAM5B,EACN6B,KAAMf,KAAKe,OAGtB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../core/dist/index.js"),t=require("../../../prosemirror-state/dist/index.js");const r=/^```([a-z]+)?[\s\n]$/,n=/^~~~([a-z]+)?[\s\n]$/,a=e.Node.create({name:"codeBlock",addOptions:()=>({languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,HTMLAttributes:{}}),content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:e=>{var t;const{languageClassPrefix:r}=this.options,n=[...(null===(t=e.firstElementChild)||void 0===t?void 0:t.classList)||[]].filter((e=>e.startsWith(r))).map((e=>e.replace(r,"")))[0];return n||null},rendered:!1}}},parseHTML:()=>[{tag:"pre",preserveWhitespace:"full"}],renderHTML({node:t,HTMLAttributes:r}){return["pre",e.mergeAttributes(this.options.HTMLAttributes,r),["code",{class:t.attrs.language?this.options.languageClassPrefix+t.attrs.language:null},0]]},addCommands(){return{setCodeBlock:e=>({commands:t})=>t.setNode(this.name,e),toggleCodeBlock:e=>({commands:t})=>t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:e,$anchor:t}=this.editor.state.selection,r=1===t.pos;return!(!e||t.parent.type.name!==this.name)&&(!(!r&&t.parent.textContent.length)&&this.editor.commands.clearNodes())},Enter:({editor:e})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:t}=e,{selection:r}=t,{$from:n,empty:a}=r;if(!a||n.parent.type!==this.type)return!1;const o=n.parentOffset===n.parent.nodeSize-2,s=n.parent.textContent.endsWith("\n\n");return!(!o||!s)&&e.chain().command((({tr:e})=>(e.delete(n.pos-2,n.pos),!0))).exitCode().run()},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;const{state:r}=e,{selection:n,doc:a}=r,{$from:o,empty:s}=n;if(!s||o.parent.type!==this.type)return!1;if(!(o.parentOffset===o.parent.nodeSize-2))return!1;const i=o.after();if(void 0===i)return!1;return a.nodeAt(i)?e.commands.command((({tr:e})=>(e.setSelection(t.Selection.near(a.resolve(i))),!0))):e.commands.exitCode()}}},addInputRules(){return[e.textblockTypeInputRule({find:r,type:this.type,getAttributes:e=>({language:e[1]})}),e.textblockTypeInputRule({find:n,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new t.Plugin({key:new t.PluginKey("codeBlockVSCodeHandler"),props:{handlePaste:(e,r)=>{if(!r.clipboardData)return!1;if(this.editor.isActive(this.type.name))return!1;const n=r.clipboardData.getData("text/plain"),a=r.clipboardData.getData("vscode-editor-data"),o=a?JSON.parse(a):void 0,s=null==o?void 0:o.mode;if(!n||!s)return!1;const{tr:i,schema:d}=e.state,l=d.text(n.replace(/\r\n?/g,"\n"));return i.replaceSelectionWith(this.type.create({language:s},l)),i.selection.$from.parent.type!==this.type&&i.setSelection(t.TextSelection.near(i.doc.resolve(Math.max(0,i.selection.from-2)))),i.setMeta("paste",!0),e.dispatch(i),!0}}})]}});exports.CodeBlock=a,exports.backtickInputRegex=r,exports.default=a,exports.tildeInputRegex=n;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../node_modules/@tiptap/extension-code-block/dist/index.js"],"sourcesContent":["import { Node, mergeAttributes, textblockTypeInputRule } from '@tiptap/core';\nimport { Selection, Plugin, PluginKey, TextSelection } from '@tiptap/pm/state';\n\n/**\n * Matches a code block with backticks.\n */\nconst backtickInputRegex = /^```([a-z]+)?[\\s\\n]$/;\n/**\n * Matches a code block with tildes.\n */\nconst tildeInputRegex = /^~~~([a-z]+)?[\\s\\n]$/;\n/**\n * This extension allows you to create code blocks.\n * @see https://tiptap.dev/api/nodes/code-block\n */\nconst CodeBlock = Node.create({\n name: 'codeBlock',\n addOptions() {\n return {\n languageClassPrefix: 'language-',\n exitOnTripleEnter: true,\n exitOnArrowDown: true,\n defaultLanguage: null,\n HTMLAttributes: {},\n };\n },\n content: 'text*',\n marks: '',\n group: 'block',\n code: true,\n defining: true,\n addAttributes() {\n return {\n language: {\n default: this.options.defaultLanguage,\n parseHTML: element => {\n var _a;\n const { languageClassPrefix } = this.options;\n const classNames = [...(((_a = element.firstElementChild) === null || _a === void 0 ? void 0 : _a.classList) || [])];\n const languages = classNames\n .filter(className => className.startsWith(languageClassPrefix))\n .map(className => className.replace(languageClassPrefix, ''));\n const language = languages[0];\n if (!language) {\n return null;\n }\n return language;\n },\n rendered: false,\n },\n };\n },\n parseHTML() {\n return [\n {\n tag: 'pre',\n preserveWhitespace: 'full',\n },\n ];\n },\n renderHTML({ node, HTMLAttributes }) {\n return [\n 'pre',\n mergeAttributes(this.options.HTMLAttributes, HTMLAttributes),\n [\n 'code',\n {\n class: node.attrs.language\n ? this.options.languageClassPrefix + node.attrs.language\n : null,\n },\n 0,\n ],\n ];\n },\n addCommands() {\n return {\n setCodeBlock: attributes => ({ commands }) => {\n return commands.setNode(this.name, attributes);\n },\n toggleCodeBlock: attributes => ({ commands }) => {\n return commands.toggleNode(this.name, 'paragraph', attributes);\n },\n };\n },\n addKeyboardShortcuts() {\n return {\n 'Mod-Alt-c': () => this.editor.commands.toggleCodeBlock(),\n // remove code block when at start of document or code block is empty\n Backspace: () => {\n const { empty, $anchor } = this.editor.state.selection;\n const isAtStart = $anchor.pos === 1;\n if (!empty || $anchor.parent.type.name !== this.name) {\n return false;\n }\n if (isAtStart || !$anchor.parent.textContent.length) {\n return this.editor.commands.clearNodes();\n }\n return false;\n },\n // exit node on triple enter\n Enter: ({ editor }) => {\n if (!this.options.exitOnTripleEnter) {\n return false;\n }\n const { state } = editor;\n const { selection } = state;\n const { $from, empty } = selection;\n if (!empty || $from.parent.type !== this.type) {\n return false;\n }\n const isAtEnd = $from.parentOffset === $from.parent.nodeSize - 2;\n const endsWithDoubleNewline = $from.parent.textContent.endsWith('\\n\\n');\n if (!isAtEnd || !endsWithDoubleNewline) {\n return false;\n }\n return editor\n .chain()\n .command(({ tr }) => {\n tr.delete($from.pos - 2, $from.pos);\n return true;\n })\n .exitCode()\n .run();\n },\n // exit node on arrow down\n ArrowDown: ({ editor }) => {\n if (!this.options.exitOnArrowDown) {\n return false;\n }\n const { state } = editor;\n const { selection, doc } = state;\n const { $from, empty } = selection;\n if (!empty || $from.parent.type !== this.type) {\n return false;\n }\n const isAtEnd = $from.parentOffset === $from.parent.nodeSize - 2;\n if (!isAtEnd) {\n return false;\n }\n const after = $from.after();\n if (after === undefined) {\n return false;\n }\n const nodeAfter = doc.nodeAt(after);\n if (nodeAfter) {\n return editor.commands.command(({ tr }) => {\n tr.setSelection(Selection.near(doc.resolve(after)));\n return true;\n });\n }\n return editor.commands.exitCode();\n },\n };\n },\n addInputRules() {\n return [\n textblockTypeInputRule({\n find: backtickInputRegex,\n type: this.type,\n getAttributes: match => ({\n language: match[1],\n }),\n }),\n textblockTypeInputRule({\n find: tildeInputRegex,\n type: this.type,\n getAttributes: match => ({\n language: match[1],\n }),\n }),\n ];\n },\n addProseMirrorPlugins() {\n return [\n // this plugin creates a code block for pasted content from VS Code\n // we can also detect the copied code language\n new Plugin({\n key: new PluginKey('codeBlockVSCodeHandler'),\n props: {\n handlePaste: (view, event) => {\n if (!event.clipboardData) {\n return false;\n }\n // don’t create a new code block within code blocks\n if (this.editor.isActive(this.type.name)) {\n return false;\n }\n const text = event.clipboardData.getData('text/plain');\n const vscode = event.clipboardData.getData('vscode-editor-data');\n const vscodeData = vscode ? JSON.parse(vscode) : undefined;\n const language = vscodeData === null || vscodeData === void 0 ? void 0 : vscodeData.mode;\n if (!text || !language) {\n return false;\n }\n const { tr, schema } = view.state;\n // prepare a text node\n // strip carriage return chars from text pasted as code\n // see: https://github.com/ProseMirror/prosemirror-view/commit/a50a6bcceb4ce52ac8fcc6162488d8875613aacd\n const textNode = schema.text(text.replace(/\\r\\n?/g, '\\n'));\n // create a code block with the text node\n // replace selection with the code block\n tr.replaceSelectionWith(this.type.create({ language }, textNode));\n if (tr.selection.$from.parent.type !== this.type) {\n // put cursor inside the newly created code block\n tr.setSelection(TextSelection.near(tr.doc.resolve(Math.max(0, tr.selection.from - 2))));\n }\n // store meta information\n // this is useful for other plugins that depends on the paste event\n // like the paste rule plugin\n tr.setMeta('paste', true);\n view.dispatch(tr);\n return true;\n },\n },\n }),\n ];\n },\n});\n\nexport { CodeBlock, backtickInputRegex, CodeBlock as default, tildeInputRegex };\n//# sourceMappingURL=index.js.map\n"],"names":["backtickInputRegex","tildeInputRegex","CodeBlock","Node","create","name","addOptions","languageClassPrefix","exitOnTripleEnter","exitOnArrowDown","defaultLanguage","HTMLAttributes","content","marks","group","code","defining","addAttributes","language","default","this","options","parseHTML","element","_a","firstElementChild","classList","filter","className","startsWith","map","replace","rendered","tag","preserveWhitespace","renderHTML","node","mergeAttributes","class","attrs","addCommands","setCodeBlock","attributes","commands","setNode","toggleCodeBlock","toggleNode","addKeyboardShortcuts","editor","Backspace","empty","$anchor","state","selection","isAtStart","pos","parent","type","textContent","length","clearNodes","Enter","$from","isAtEnd","parentOffset","nodeSize","endsWithDoubleNewline","endsWith","chain","command","tr","delete","exitCode","run","ArrowDown","doc","after","undefined","nodeAt","setSelection","Selection","near","resolve","addInputRules","textblockTypeInputRule","find","getAttributes","match","addProseMirrorPlugins","Plugin","key","PluginKey","props","handlePaste","view","event","clipboardData","isActive","text","getData","vscode","vscodeData","JSON","parse","mode","schema","textNode","replaceSelectionWith","TextSelection","Math","max","from","setMeta","dispatch"],"mappings":"oNAMK,MAACA,EAAqB,uBAIrBC,EAAkB,uBAKlBC,EAAYC,EAAKC,OAAO,CAC1BC,KAAM,YACNC,WAAU,KACC,CACHC,oBAAqB,YACrBC,mBAAmB,EACnBC,iBAAiB,EACjBC,gBAAiB,KACjBC,eAAgB,CAAE,IAG1BC,QAAS,QACTC,MAAO,GACPC,MAAO,QACPC,MAAM,EACNC,UAAU,EACV,aAAAC,GACI,MAAO,CACHC,SAAU,CACNC,QAASC,KAAKC,QAAQX,gBACtBY,UAAWC,IACP,IAAIC,EACJ,MAAMjB,oBAAEA,GAAwBa,KAAKC,QAK/BH,EAJa,KAA2C,QAApCM,EAAKD,EAAQE,yBAAsC,IAAPD,OAAgB,EAASA,EAAGE,YAAc,IAE3GC,QAAOC,GAAaA,EAAUC,WAAWtB,KACzCuB,KAAIF,GAAaA,EAAUG,QAAQxB,EAAqB,MAClC,GAC3B,OAAKW,GACM,IAEI,EAEnBc,UAAU,GAGrB,EACDV,UAAS,IACE,CACH,CACIW,IAAK,MACLC,mBAAoB,SAIhC,UAAAC,EAAWC,KAAEA,EAAIzB,eAAEA,IACf,MAAO,CACH,MACA0B,EAAgBjB,KAAKC,QAAQV,eAAgBA,GAC7C,CACI,OACA,CACI2B,MAAOF,EAAKG,MAAMrB,SACZE,KAAKC,QAAQd,oBAAsB6B,EAAKG,MAAMrB,SAC9C,MAEV,GAGX,EACD,WAAAsB,GACI,MAAO,CACHC,aAAcC,GAAc,EAAGC,cACpBA,EAASC,QAAQxB,KAAKf,KAAMqC,GAEvCG,gBAAiBH,GAAc,EAAGC,cACvBA,EAASG,WAAW1B,KAAKf,KAAM,YAAaqC,GAG9D,EACD,oBAAAK,GACI,MAAO,CACH,YAAa,IAAM3B,KAAK4B,OAAOL,SAASE,kBAExCI,UAAW,KACP,MAAMC,MAAEA,EAAKC,QAAEA,GAAY/B,KAAK4B,OAAOI,MAAMC,UACvCC,EAA4B,IAAhBH,EAAQI,IAC1B,SAAKL,GAASC,EAAQK,OAAOC,KAAKpD,OAASe,KAAKf,WAG5CiD,GAAcH,EAAQK,OAAOE,YAAYC,SAClCvC,KAAK4B,OAAOL,SAASiB,aAEpB,EAGhBC,MAAO,EAAGb,aACN,IAAK5B,KAAKC,QAAQb,kBACd,OAAO,EAEX,MAAM4C,MAAEA,GAAUJ,GACZK,UAAEA,GAAcD,GAChBU,MAAEA,EAAKZ,MAAEA,GAAUG,EACzB,IAAKH,GAASY,EAAMN,OAAOC,OAASrC,KAAKqC,KACrC,OAAO,EAEX,MAAMM,EAAUD,EAAME,eAAiBF,EAAMN,OAAOS,SAAW,EACzDC,EAAwBJ,EAAMN,OAAOE,YAAYS,SAAS,QAChE,SAAKJ,IAAYG,IAGVlB,EACFoB,QACAC,SAAQ,EAAGC,SACZA,EAAGC,OAAOT,EAAMP,IAAM,EAAGO,EAAMP,MACxB,KAENiB,WACAC,KAAK,EAGdC,UAAW,EAAG1B,aACV,IAAK5B,KAAKC,QAAQZ,gBACd,OAAO,EAEX,MAAM2C,MAAEA,GAAUJ,GACZK,UAAEA,EAASsB,IAAEA,GAAQvB,GACrBU,MAAEA,EAAKZ,MAAEA,GAAUG,EACzB,IAAKH,GAASY,EAAMN,OAAOC,OAASrC,KAAKqC,KACrC,OAAO,EAGX,KADgBK,EAAME,eAAiBF,EAAMN,OAAOS,SAAW,GAE3D,OAAO,EAEX,MAAMW,EAAQd,EAAMc,QACpB,QAAcC,IAAVD,EACA,OAAO,EAGX,OADkBD,EAAIG,OAAOF,GAElB5B,EAAOL,SAAS0B,SAAQ,EAAGC,SAC9BA,EAAGS,aAAaC,EAAUC,KAAKN,EAAIO,QAAQN,MACpC,KAGR5B,EAAOL,SAAS6B,UAAU,EAG5C,EACD,aAAAW,GACI,MAAO,CACHC,EAAuB,CACnBC,KAAMrF,EACNyD,KAAMrC,KAAKqC,KACX6B,cAAeC,IAAU,CACrBrE,SAAUqE,EAAM,OAGxBH,EAAuB,CACnBC,KAAMpF,EACNwD,KAAMrC,KAAKqC,KACX6B,cAAeC,IAAU,CACrBrE,SAAUqE,EAAM,OAI/B,EACD,qBAAAC,GACI,MAAO,CAGH,IAAIC,EAAO,CACPC,IAAK,IAAIC,EAAU,0BACnBC,MAAO,CACHC,YAAa,CAACC,EAAMC,KAChB,IAAKA,EAAMC,cACP,OAAO,EAGX,GAAI5E,KAAK4B,OAAOiD,SAAS7E,KAAKqC,KAAKpD,MAC/B,OAAO,EAEX,MAAM6F,EAAOH,EAAMC,cAAcG,QAAQ,cACnCC,EAASL,EAAMC,cAAcG,QAAQ,sBACrCE,EAAaD,EAASE,KAAKC,MAAMH,QAAUvB,EAC3C3D,EAAWmF,aAA+C,EAASA,EAAWG,KACpF,IAAKN,IAAShF,EACV,OAAO,EAEX,MAAMoD,GAAEA,EAAEmC,OAAEA,GAAWX,EAAK1C,MAItBsD,EAAWD,EAAOP,KAAKA,EAAKnE,QAAQ,SAAU,OAapD,OAVAuC,EAAGqC,qBAAqBvF,KAAKqC,KAAKrD,OAAO,CAAEc,YAAYwF,IACnDpC,EAAGjB,UAAUS,MAAMN,OAAOC,OAASrC,KAAKqC,MAExCa,EAAGS,aAAa6B,EAAc3B,KAAKX,EAAGK,IAAIO,QAAQ2B,KAAKC,IAAI,EAAGxC,EAAGjB,UAAU0D,KAAO,MAKtFzC,EAAG0C,QAAQ,SAAS,GACpBlB,EAAKmB,SAAS3C,IACP,CAAI,KAK9B"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../node_modules/@tiptap/extension-code-block/dist/index.js"],"sourcesContent":["import { Node, mergeAttributes, textblockTypeInputRule } from '@tiptap/core';\nimport { Selection, Plugin, PluginKey, TextSelection } from '@tiptap/pm/state';\n\n/**\n * Matches a code block with backticks.\n */\nconst backtickInputRegex = /^```([a-z]+)?[\\s\\n]$/;\n/**\n * Matches a code block with tildes.\n */\nconst tildeInputRegex = /^~~~([a-z]+)?[\\s\\n]$/;\n/**\n * This extension allows you to create code blocks.\n * @see https://tiptap.dev/api/nodes/code-block\n */\nconst CodeBlock = Node.create({\n name: 'codeBlock',\n addOptions() {\n return {\n languageClassPrefix: 'language-',\n exitOnTripleEnter: true,\n exitOnArrowDown: true,\n defaultLanguage: null,\n HTMLAttributes: {},\n };\n },\n content: 'text*',\n marks: '',\n group: 'block',\n code: true,\n defining: true,\n addAttributes() {\n return {\n language: {\n default: this.options.defaultLanguage,\n parseHTML: element => {\n var _a;\n const { languageClassPrefix } = this.options;\n const classNames = [...(((_a = element.firstElementChild) === null || _a === void 0 ? void 0 : _a.classList) || [])];\n const languages = classNames\n .filter(className => className.startsWith(languageClassPrefix))\n .map(className => className.replace(languageClassPrefix, ''));\n const language = languages[0];\n if (!language) {\n return null;\n }\n return language;\n },\n rendered: false,\n },\n };\n },\n parseHTML() {\n return [\n {\n tag: 'pre',\n preserveWhitespace: 'full',\n },\n ];\n },\n renderHTML({ node, HTMLAttributes }) {\n return [\n 'pre',\n mergeAttributes(this.options.HTMLAttributes, HTMLAttributes),\n [\n 'code',\n {\n class: node.attrs.language\n ? this.options.languageClassPrefix + node.attrs.language\n : null,\n },\n 0,\n ],\n ];\n },\n addCommands() {\n return {\n setCodeBlock: attributes => ({ commands }) => {\n return commands.setNode(this.name, attributes);\n },\n toggleCodeBlock: attributes => ({ commands }) => {\n return commands.toggleNode(this.name, 'paragraph', attributes);\n },\n };\n },\n addKeyboardShortcuts() {\n return {\n 'Mod-Alt-c': () => this.editor.commands.toggleCodeBlock(),\n // remove code block when at start of document or code block is empty\n Backspace: () => {\n const { empty, $anchor } = this.editor.state.selection;\n const isAtStart = $anchor.pos === 1;\n if (!empty || $anchor.parent.type.name !== this.name) {\n return false;\n }\n if (isAtStart || !$anchor.parent.textContent.length) {\n return this.editor.commands.clearNodes();\n }\n return false;\n },\n // exit node on triple enter\n Enter: ({ editor }) => {\n if (!this.options.exitOnTripleEnter) {\n return false;\n }\n const { state } = editor;\n const { selection } = state;\n const { $from, empty } = selection;\n if (!empty || $from.parent.type !== this.type) {\n return false;\n }\n const isAtEnd = $from.parentOffset === $from.parent.nodeSize - 2;\n const endsWithDoubleNewline = $from.parent.textContent.endsWith('\\n\\n');\n if (!isAtEnd || !endsWithDoubleNewline) {\n return false;\n }\n return editor\n .chain()\n .command(({ tr }) => {\n tr.delete($from.pos - 2, $from.pos);\n return true;\n })\n .exitCode()\n .run();\n },\n // exit node on arrow down\n ArrowDown: ({ editor }) => {\n if (!this.options.exitOnArrowDown) {\n return false;\n }\n const { state } = editor;\n const { selection, doc } = state;\n const { $from, empty } = selection;\n if (!empty || $from.parent.type !== this.type) {\n return false;\n }\n const isAtEnd = $from.parentOffset === $from.parent.nodeSize - 2;\n if (!isAtEnd) {\n return false;\n }\n const after = $from.after();\n if (after === undefined) {\n return false;\n }\n const nodeAfter = doc.nodeAt(after);\n if (nodeAfter) {\n return editor.commands.command(({ tr }) => {\n tr.setSelection(Selection.near(doc.resolve(after)));\n return true;\n });\n }\n return editor.commands.exitCode();\n },\n };\n },\n addInputRules() {\n return [\n textblockTypeInputRule({\n find: backtickInputRegex,\n type: this.type,\n getAttributes: match => ({\n language: match[1],\n }),\n }),\n textblockTypeInputRule({\n find: tildeInputRegex,\n type: this.type,\n getAttributes: match => ({\n language: match[1],\n }),\n }),\n ];\n },\n addProseMirrorPlugins() {\n return [\n // this plugin creates a code block for pasted content from VS Code\n // we can also detect the copied code language\n new Plugin({\n key: new PluginKey('codeBlockVSCodeHandler'),\n props: {\n handlePaste: (view, event) => {\n if (!event.clipboardData) {\n return false;\n }\n // don’t create a new code block within code blocks\n if (this.editor.isActive(this.type.name)) {\n return false;\n }\n const text = event.clipboardData.getData('text/plain');\n const vscode = event.clipboardData.getData('vscode-editor-data');\n const vscodeData = vscode ? JSON.parse(vscode) : undefined;\n const language = vscodeData === null || vscodeData === void 0 ? void 0 : vscodeData.mode;\n if (!text || !language) {\n return false;\n }\n const { tr, schema } = view.state;\n // prepare a text node\n // strip carriage return chars from text pasted as code\n // see: https://github.com/ProseMirror/prosemirror-view/commit/a50a6bcceb4ce52ac8fcc6162488d8875613aacd\n const textNode = schema.text(text.replace(/\\r\\n?/g, '\\n'));\n // create a code block with the text node\n // replace selection with the code block\n tr.replaceSelectionWith(this.type.create({ language }, textNode));\n if (tr.selection.$from.parent.type !== this.type) {\n // put cursor inside the newly created code block\n tr.setSelection(TextSelection.near(tr.doc.resolve(Math.max(0, tr.selection.from - 2))));\n }\n // store meta information\n // this is useful for other plugins that depends on the paste event\n // like the paste rule plugin\n tr.setMeta('paste', true);\n view.dispatch(tr);\n return true;\n },\n },\n }),\n ];\n },\n});\n\nexport { CodeBlock, backtickInputRegex, CodeBlock as default, tildeInputRegex };\n//# sourceMappingURL=index.js.map\n"],"names":["backtickInputRegex","tildeInputRegex","CodeBlock","Node","create","name","addOptions","languageClassPrefix","exitOnTripleEnter","exitOnArrowDown","defaultLanguage","HTMLAttributes","content","marks","group","code","defining","addAttributes","language","default","this","options","parseHTML","element","_a","firstElementChild","classList","filter","className","startsWith","map","replace","rendered","tag","preserveWhitespace","renderHTML","node","mergeAttributes","class","attrs","addCommands","setCodeBlock","attributes","commands","setNode","toggleCodeBlock","toggleNode","addKeyboardShortcuts","editor","Backspace","empty","$anchor","state","selection","isAtStart","pos","parent","type","textContent","length","clearNodes","Enter","$from","isAtEnd","parentOffset","nodeSize","endsWithDoubleNewline","endsWith","chain","command","tr","delete","exitCode","run","ArrowDown","doc","after","undefined","nodeAt","setSelection","Selection","near","resolve","addInputRules","textblockTypeInputRule","find","getAttributes","match","addProseMirrorPlugins","Plugin","key","PluginKey","props","handlePaste","view","event","clipboardData","isActive","text","getData","vscode","vscodeData","JSON","parse","mode","schema","textNode","replaceSelectionWith","TextSelection","Math","max","from","setMeta","dispatch"],"mappings":"oKAMK,MAACA,EAAqB,uBAIrBC,EAAkB,uBAKlBC,EAAYC,EAAIA,KAACC,OAAO,CAC1BC,KAAM,YACNC,WAAU,KACC,CACHC,oBAAqB,YACrBC,mBAAmB,EACnBC,iBAAiB,EACjBC,gBAAiB,KACjBC,eAAgB,CAAE,IAG1BC,QAAS,QACTC,MAAO,GACPC,MAAO,QACPC,MAAM,EACNC,UAAU,EACV,aAAAC,GACI,MAAO,CACHC,SAAU,CACNC,QAASC,KAAKC,QAAQX,gBACtBY,UAAWC,IACP,IAAIC,EACJ,MAAMjB,oBAAEA,GAAwBa,KAAKC,QAK/BH,EAJa,KAA2C,QAApCM,EAAKD,EAAQE,yBAAsC,IAAPD,OAAgB,EAASA,EAAGE,YAAc,IAE3GC,QAAOC,GAAaA,EAAUC,WAAWtB,KACzCuB,KAAIF,GAAaA,EAAUG,QAAQxB,EAAqB,MAClC,GAC3B,OAAKW,GACM,IAEI,EAEnBc,UAAU,GAGrB,EACDV,UAAS,IACE,CACH,CACIW,IAAK,MACLC,mBAAoB,SAIhC,UAAAC,EAAWC,KAAEA,EAAIzB,eAAEA,IACf,MAAO,CACH,MACA0B,EAAAA,gBAAgBjB,KAAKC,QAAQV,eAAgBA,GAC7C,CACI,OACA,CACI2B,MAAOF,EAAKG,MAAMrB,SACZE,KAAKC,QAAQd,oBAAsB6B,EAAKG,MAAMrB,SAC9C,MAEV,GAGX,EACD,WAAAsB,GACI,MAAO,CACHC,aAAcC,GAAc,EAAGC,cACpBA,EAASC,QAAQxB,KAAKf,KAAMqC,GAEvCG,gBAAiBH,GAAc,EAAGC,cACvBA,EAASG,WAAW1B,KAAKf,KAAM,YAAaqC,GAG9D,EACD,oBAAAK,GACI,MAAO,CACH,YAAa,IAAM3B,KAAK4B,OAAOL,SAASE,kBAExCI,UAAW,KACP,MAAMC,MAAEA,EAAKC,QAAEA,GAAY/B,KAAK4B,OAAOI,MAAMC,UACvCC,EAA4B,IAAhBH,EAAQI,IAC1B,SAAKL,GAASC,EAAQK,OAAOC,KAAKpD,OAASe,KAAKf,WAG5CiD,GAAcH,EAAQK,OAAOE,YAAYC,SAClCvC,KAAK4B,OAAOL,SAASiB,aAEpB,EAGhBC,MAAO,EAAGb,aACN,IAAK5B,KAAKC,QAAQb,kBACd,OAAO,EAEX,MAAM4C,MAAEA,GAAUJ,GACZK,UAAEA,GAAcD,GAChBU,MAAEA,EAAKZ,MAAEA,GAAUG,EACzB,IAAKH,GAASY,EAAMN,OAAOC,OAASrC,KAAKqC,KACrC,OAAO,EAEX,MAAMM,EAAUD,EAAME,eAAiBF,EAAMN,OAAOS,SAAW,EACzDC,EAAwBJ,EAAMN,OAAOE,YAAYS,SAAS,QAChE,SAAKJ,IAAYG,IAGVlB,EACFoB,QACAC,SAAQ,EAAGC,SACZA,EAAGC,OAAOT,EAAMP,IAAM,EAAGO,EAAMP,MACxB,KAENiB,WACAC,KAAK,EAGdC,UAAW,EAAG1B,aACV,IAAK5B,KAAKC,QAAQZ,gBACd,OAAO,EAEX,MAAM2C,MAAEA,GAAUJ,GACZK,UAAEA,EAASsB,IAAEA,GAAQvB,GACrBU,MAAEA,EAAKZ,MAAEA,GAAUG,EACzB,IAAKH,GAASY,EAAMN,OAAOC,OAASrC,KAAKqC,KACrC,OAAO,EAGX,KADgBK,EAAME,eAAiBF,EAAMN,OAAOS,SAAW,GAE3D,OAAO,EAEX,MAAMW,EAAQd,EAAMc,QACpB,QAAcC,IAAVD,EACA,OAAO,EAGX,OADkBD,EAAIG,OAAOF,GAElB5B,EAAOL,SAAS0B,SAAQ,EAAGC,SAC9BA,EAAGS,aAAaC,EAAAA,UAAUC,KAAKN,EAAIO,QAAQN,MACpC,KAGR5B,EAAOL,SAAS6B,UAAU,EAG5C,EACD,aAAAW,GACI,MAAO,CACHC,yBAAuB,CACnBC,KAAMrF,EACNyD,KAAMrC,KAAKqC,KACX6B,cAAeC,IAAU,CACrBrE,SAAUqE,EAAM,OAGxBH,yBAAuB,CACnBC,KAAMpF,EACNwD,KAAMrC,KAAKqC,KACX6B,cAAeC,IAAU,CACrBrE,SAAUqE,EAAM,OAI/B,EACD,qBAAAC,GACI,MAAO,CAGH,IAAIC,SAAO,CACPC,IAAK,IAAIC,EAASA,UAAC,0BACnBC,MAAO,CACHC,YAAa,CAACC,EAAMC,KAChB,IAAKA,EAAMC,cACP,OAAO,EAGX,GAAI5E,KAAK4B,OAAOiD,SAAS7E,KAAKqC,KAAKpD,MAC/B,OAAO,EAEX,MAAM6F,EAAOH,EAAMC,cAAcG,QAAQ,cACnCC,EAASL,EAAMC,cAAcG,QAAQ,sBACrCE,EAAaD,EAASE,KAAKC,MAAMH,QAAUvB,EAC3C3D,EAAWmF,aAA+C,EAASA,EAAWG,KACpF,IAAKN,IAAShF,EACV,OAAO,EAEX,MAAMoD,GAAEA,EAAEmC,OAAEA,GAAWX,EAAK1C,MAItBsD,EAAWD,EAAOP,KAAKA,EAAKnE,QAAQ,SAAU,OAapD,OAVAuC,EAAGqC,qBAAqBvF,KAAKqC,KAAKrD,OAAO,CAAEc,YAAYwF,IACnDpC,EAAGjB,UAAUS,MAAMN,OAAOC,OAASrC,KAAKqC,MAExCa,EAAGS,aAAa6B,EAAaA,cAAC3B,KAAKX,EAAGK,IAAIO,QAAQ2B,KAAKC,IAAI,EAAGxC,EAAGjB,UAAU0D,KAAO,MAKtFzC,EAAG0C,QAAQ,SAAS,GACpBlB,EAAKmB,SAAS3C,IACP,CAAI,KAK9B"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const e=require("../../core/dist/index.js").Node.create({name:"doc",topNode:!0,content:"block+"});exports.Document=e,exports.default=e;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../node_modules/@tiptap/extension-document/dist/index.js"],"sourcesContent":["import { Node } from '@tiptap/core';\n\n/**\n * The default document node which represents the top level node of the editor.\n * @see https://tiptap.dev/api/nodes/document\n */\nconst Document = Node.create({\n name: 'doc',\n topNode: true,\n content: 'block+',\n});\n\nexport { Document, Document as default };\n//# sourceMappingURL=index.js.map\n"],"names":["Document","Node","create","name","topNode","content"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../node_modules/@tiptap/extension-document/dist/index.js"],"sourcesContent":["import { Node } from '@tiptap/core';\n\n/**\n * The default document node which represents the top level node of the editor.\n * @see https://tiptap.dev/api/nodes/document\n */\nconst Document = Node.create({\n name: 'doc',\n topNode: true,\n content: 'block+',\n});\n\nexport { Document, Document as default };\n//# sourceMappingURL=index.js.map\n"],"names":["Document","Node","create","name","topNode","content"],"mappings":"oEAMK,MAACA,sCAAeC,KAACC,OAAO,CACzBC,KAAM,MACNC,SAAS,EACTC,QAAS"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("../../core/dist/index.js"),o=require("../../../prosemirror-dropcursor/dist/index.js");const e=r.Extension.create({name:"dropCursor",addOptions:()=>({color:"currentColor",width:1,class:void 0}),addProseMirrorPlugins(){return[o.dropCursor(this.options)]}});exports.Dropcursor=e,exports.default=e;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../node_modules/@tiptap/extension-dropcursor/dist/index.js"],"sourcesContent":["import { Extension } from '@tiptap/core';\nimport { dropCursor } from '@tiptap/pm/dropcursor';\n\n/**\n * This extension allows you to add a drop cursor to your editor.\n * A drop cursor is a line that appears when you drag and drop content\n * inbetween nodes.\n * @see https://tiptap.dev/api/extensions/dropcursor\n */\nconst Dropcursor = Extension.create({\n name: 'dropCursor',\n addOptions() {\n return {\n color: 'currentColor',\n width: 1,\n class: undefined,\n };\n },\n addProseMirrorPlugins() {\n return [\n dropCursor(this.options),\n ];\n },\n});\n\nexport { Dropcursor, Dropcursor as default };\n//# sourceMappingURL=index.js.map\n"],"names":["Dropcursor","Extension","create","name","addOptions","color","width","class","undefined","addProseMirrorPlugins","dropCursor","this","options"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../node_modules/@tiptap/extension-dropcursor/dist/index.js"],"sourcesContent":["import { Extension } from '@tiptap/core';\nimport { dropCursor } from '@tiptap/pm/dropcursor';\n\n/**\n * This extension allows you to add a drop cursor to your editor.\n * A drop cursor is a line that appears when you drag and drop content\n * inbetween nodes.\n * @see https://tiptap.dev/api/extensions/dropcursor\n */\nconst Dropcursor = Extension.create({\n name: 'dropCursor',\n addOptions() {\n return {\n color: 'currentColor',\n width: 1,\n class: undefined,\n };\n },\n addProseMirrorPlugins() {\n return [\n dropCursor(this.options),\n ];\n },\n});\n\nexport { Dropcursor, Dropcursor as default };\n//# sourceMappingURL=index.js.map\n"],"names":["Dropcursor","Extension","create","name","addOptions","color","width","class","undefined","addProseMirrorPlugins","dropCursor","this","options"],"mappings":"yKASK,MAACA,EAAaC,EAASA,UAACC,OAAO,CAChCC,KAAM,aACNC,WAAU,KACC,CACHC,MAAO,eACPC,MAAO,EACPC,WAAOC,IAGf,qBAAAC,GACI,MAAO,CACHC,EAAUA,WAACC,KAAKC,SAEvB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("../../core/dist/index.js"),e=require("../../../prosemirror-gapcursor/dist/index.js");const o=r.Extension.create({name:"gapCursor",addProseMirrorPlugins:()=>[e.gapCursor()],extendNodeSchema(e){var o;const s={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:null!==(o=r.callOrReturn(r.getExtensionField(e,"allowGapCursor",s)))&&void 0!==o?o:null}}});exports.Gapcursor=o,exports.default=o;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../node_modules/@tiptap/extension-gapcursor/dist/index.js"],"sourcesContent":["import { Extension, callOrReturn, getExtensionField } from '@tiptap/core';\nimport { gapCursor } from '@tiptap/pm/gapcursor';\n\n/**\n * This extension allows you to add a gap cursor to your editor.\n * A gap cursor is a cursor that appears when you click on a place\n * where no content is present, for example inbetween nodes.\n * @see https://tiptap.dev/api/extensions/gapcursor\n */\nconst Gapcursor = Extension.create({\n name: 'gapCursor',\n addProseMirrorPlugins() {\n return [\n gapCursor(),\n ];\n },\n extendNodeSchema(extension) {\n var _a;\n const context = {\n name: extension.name,\n options: extension.options,\n storage: extension.storage,\n };\n return {\n allowGapCursor: (_a = callOrReturn(getExtensionField(extension, 'allowGapCursor', context))) !== null && _a !== void 0 ? _a : null,\n };\n },\n});\n\nexport { Gapcursor, Gapcursor as default };\n//# sourceMappingURL=index.js.map\n"],"names":["Gapcursor","Extension","create","name","addProseMirrorPlugins","gapCursor","extendNodeSchema","extension","_a","context","options","storage","allowGapCursor","callOrReturn","getExtensionField"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../node_modules/@tiptap/extension-gapcursor/dist/index.js"],"sourcesContent":["import { Extension, callOrReturn, getExtensionField } from '@tiptap/core';\nimport { gapCursor } from '@tiptap/pm/gapcursor';\n\n/**\n * This extension allows you to add a gap cursor to your editor.\n * A gap cursor is a cursor that appears when you click on a place\n * where no content is present, for example inbetween nodes.\n * @see https://tiptap.dev/api/extensions/gapcursor\n */\nconst Gapcursor = Extension.create({\n name: 'gapCursor',\n addProseMirrorPlugins() {\n return [\n gapCursor(),\n ];\n },\n extendNodeSchema(extension) {\n var _a;\n const context = {\n name: extension.name,\n options: extension.options,\n storage: extension.storage,\n };\n return {\n allowGapCursor: (_a = callOrReturn(getExtensionField(extension, 'allowGapCursor', context))) !== null && _a !== void 0 ? _a : null,\n };\n },\n});\n\nexport { Gapcursor, Gapcursor as default };\n//# sourceMappingURL=index.js.map\n"],"names":["Gapcursor","Extension","create","name","addProseMirrorPlugins","gapCursor","extendNodeSchema","extension","_a","context","options","storage","allowGapCursor","callOrReturn","getExtensionField"],"mappings":"wKASK,MAACA,EAAYC,EAASA,UAACC,OAAO,CAC/BC,KAAM,YACNC,sBAAqB,IACV,CACHC,eAGR,gBAAAC,CAAiBC,GACb,IAAIC,EACJ,MAAMC,EAAU,CACZN,KAAMI,EAAUJ,KAChBO,QAASH,EAAUG,QACnBC,QAASJ,EAAUI,SAEvB,MAAO,CACHC,eAAiG,QAAhFJ,EAAKK,EAAYA,aAACC,EAAiBA,kBAACP,EAAW,iBAAkBE,WAA8B,IAAPD,EAAgBA,EAAK,KAErI"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../core/dist/index.js");const t=e.Node.create({name:"hardBreak",addOptions:()=>({keepMarks:!0,HTMLAttributes:{}}),inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML:()=>[{tag:"br"}],renderHTML({HTMLAttributes:t}){return["br",e.mergeAttributes(this.options.HTMLAttributes,t)]},renderText:()=>"\n",addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:r,editor:s})=>e.first([()=>e.exitCode(),()=>e.command((()=>{const{selection:e,storedMarks:n}=r;if(e.$from.parent.type.spec.isolating)return!1;const{keepMarks:a}=this.options,{splittableMarks:i}=s.extensionManager,o=n||e.$to.parentOffset&&e.$from.marks();return t().insertContent({type:this.name}).command((({tr:e,dispatch:t})=>{if(t&&o&&a){const t=o.filter((e=>i.includes(e.type.name)));e.ensureMarks(t)}return!0})).run()}))])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}});exports.HardBreak=t,exports.default=t;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../node_modules/@tiptap/extension-hard-break/dist/index.js"],"sourcesContent":["import { Node, mergeAttributes } from '@tiptap/core';\n\n/**\n * This extension allows you to insert hard breaks.\n * @see https://www.tiptap.dev/api/nodes/hard-break\n */\nconst HardBreak = Node.create({\n name: 'hardBreak',\n addOptions() {\n return {\n keepMarks: true,\n HTMLAttributes: {},\n };\n },\n inline: true,\n group: 'inline',\n selectable: false,\n linebreakReplacement: true,\n parseHTML() {\n return [\n { tag: 'br' },\n ];\n },\n renderHTML({ HTMLAttributes }) {\n return ['br', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes)];\n },\n renderText() {\n return '\\n';\n },\n addCommands() {\n return {\n setHardBreak: () => ({ commands, chain, state, editor, }) => {\n return commands.first([\n () => commands.exitCode(),\n () => commands.command(() => {\n const { selection, storedMarks } = state;\n if (selection.$from.parent.type.spec.isolating) {\n return false;\n }\n const { keepMarks } = this.options;\n const { splittableMarks } = editor.extensionManager;\n const marks = storedMarks\n || (selection.$to.parentOffset && selection.$from.marks());\n return chain()\n .insertContent({ type: this.name })\n .command(({ tr, dispatch }) => {\n if (dispatch && marks && keepMarks) {\n const filteredMarks = marks\n .filter(mark => splittableMarks.includes(mark.type.name));\n tr.ensureMarks(filteredMarks);\n }\n return true;\n })\n .run();\n }),\n ]);\n },\n };\n },\n addKeyboardShortcuts() {\n return {\n 'Mod-Enter': () => this.editor.commands.setHardBreak(),\n 'Shift-Enter': () => this.editor.commands.setHardBreak(),\n };\n },\n});\n\nexport { HardBreak, HardBreak as default };\n//# sourceMappingURL=index.js.map\n"],"names":["HardBreak","Node","create","name","addOptions","keepMarks","HTMLAttributes","inline","group","selectable","linebreakReplacement","parseHTML","tag","renderHTML","mergeAttributes","this","options","renderText","addCommands","setHardBreak","commands","chain","state","editor","first","exitCode","command","selection","storedMarks","$from","parent","type","spec","isolating","splittableMarks","extensionManager","marks","$to","parentOffset","insertContent","tr","dispatch","filteredMarks","filter","mark","includes","ensureMarks","run","addKeyboardShortcuts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../node_modules/@tiptap/extension-hard-break/dist/index.js"],"sourcesContent":["import { Node, mergeAttributes } from '@tiptap/core';\n\n/**\n * This extension allows you to insert hard breaks.\n * @see https://www.tiptap.dev/api/nodes/hard-break\n */\nconst HardBreak = Node.create({\n name: 'hardBreak',\n addOptions() {\n return {\n keepMarks: true,\n HTMLAttributes: {},\n };\n },\n inline: true,\n group: 'inline',\n selectable: false,\n linebreakReplacement: true,\n parseHTML() {\n return [\n { tag: 'br' },\n ];\n },\n renderHTML({ HTMLAttributes }) {\n return ['br', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes)];\n },\n renderText() {\n return '\\n';\n },\n addCommands() {\n return {\n setHardBreak: () => ({ commands, chain, state, editor, }) => {\n return commands.first([\n () => commands.exitCode(),\n () => commands.command(() => {\n const { selection, storedMarks } = state;\n if (selection.$from.parent.type.spec.isolating) {\n return false;\n }\n const { keepMarks } = this.options;\n const { splittableMarks } = editor.extensionManager;\n const marks = storedMarks\n || (selection.$to.parentOffset && selection.$from.marks());\n return chain()\n .insertContent({ type: this.name })\n .command(({ tr, dispatch }) => {\n if (dispatch && marks && keepMarks) {\n const filteredMarks = marks\n .filter(mark => splittableMarks.includes(mark.type.name));\n tr.ensureMarks(filteredMarks);\n }\n return true;\n })\n .run();\n }),\n ]);\n },\n };\n },\n addKeyboardShortcuts() {\n return {\n 'Mod-Enter': () => this.editor.commands.setHardBreak(),\n 'Shift-Enter': () => this.editor.commands.setHardBreak(),\n };\n },\n});\n\nexport { HardBreak, HardBreak as default };\n//# sourceMappingURL=index.js.map\n"],"names":["HardBreak","Node","create","name","addOptions","keepMarks","HTMLAttributes","inline","group","selectable","linebreakReplacement","parseHTML","tag","renderHTML","mergeAttributes","this","options","renderText","addCommands","setHardBreak","commands","chain","state","editor","first","exitCode","command","selection","storedMarks","$from","parent","type","spec","isolating","splittableMarks","extensionManager","marks","$to","parentOffset","insertContent","tr","dispatch","filteredMarks","filter","mark","includes","ensureMarks","run","addKeyboardShortcuts"],"mappings":"8GAMK,MAACA,EAAYC,EAAIA,KAACC,OAAO,CAC1BC,KAAM,YACNC,WAAU,KACC,CACHC,WAAW,EACXC,eAAgB,CAAE,IAG1BC,QAAQ,EACRC,MAAO,SACPC,YAAY,EACZC,sBAAsB,EACtBC,UAAS,IACE,CACH,CAAEC,IAAK,OAGf,UAAAC,EAAWP,eAAEA,IACT,MAAO,CAAC,KAAMQ,kBAAgBC,KAAKC,QAAQV,eAAgBA,GAC9D,EACDW,WAAU,IACC,KAEX,WAAAC,GACI,MAAO,CACHC,aAAc,IAAM,EAAGC,WAAUC,QAAOC,QAAOC,YACpCH,EAASI,MAAM,CAClB,IAAMJ,EAASK,WACf,IAAML,EAASM,SAAQ,KACnB,MAAMC,UAAEA,EAASC,YAAEA,GAAgBN,EACnC,GAAIK,EAAUE,MAAMC,OAAOC,KAAKC,KAAKC,UACjC,OAAO,EAEX,MAAM5B,UAAEA,GAAcU,KAAKC,SACrBkB,gBAAEA,GAAoBX,EAAOY,iBAC7BC,EAAQR,GACND,EAAUU,IAAIC,cAAgBX,EAAUE,MAAMO,QACtD,OAAOf,IACFkB,cAAc,CAAER,KAAMhB,KAAKZ,OAC3BuB,SAAQ,EAAGc,KAAIC,eAChB,GAAIA,GAAYL,GAAS/B,EAAW,CAChC,MAAMqC,EAAgBN,EACjBO,QAAOC,GAAQV,EAAgBW,SAASD,EAAKb,KAAK5B,QACvDqC,EAAGM,YAAYJ,EAClB,CACD,OAAO,CAAI,IAEVK,KAAK,MAK7B,EACD,oBAAAC,GACI,MAAO,CACH,YAAa,IAAMjC,KAAKQ,OAAOH,SAASD,eACxC,cAAe,IAAMJ,KAAKQ,OAAOH,SAASD,eAEjD"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../core/dist/index.js");const t=e.Node.create({name:"heading",addOptions:()=>({levels:[1,2,3,4,5,6],HTMLAttributes:{}}),content:"inline*",group:"block",defining:!0,addAttributes:()=>({level:{default:1,rendered:!1}}),parseHTML(){return this.options.levels.map((e=>({tag:`h${e}`,attrs:{level:e}})))},renderHTML({node:t,HTMLAttributes:s}){return[`h${this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0]}`,e.mergeAttributes(this.options.HTMLAttributes,s),0]},addCommands(){return{setHeading:e=>({commands:t})=>!!this.options.levels.includes(e.level)&&t.setNode(this.name,e),toggleHeading:e=>({commands:t})=>!!this.options.levels.includes(e.level)&&t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return this.options.levels.reduce(((e,t)=>({...e,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})})),{})},addInputRules(){return this.options.levels.map((t=>e.textblockTypeInputRule({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${t}})\\s$`),type:this.type,getAttributes:{level:t}})))}});exports.Heading=t,exports.default=t;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../node_modules/@tiptap/extension-heading/dist/index.js"],"sourcesContent":["import { Node, mergeAttributes, textblockTypeInputRule } from '@tiptap/core';\n\n/**\n * This extension allows you to create headings.\n * @see https://www.tiptap.dev/api/nodes/heading\n */\nconst Heading = Node.create({\n name: 'heading',\n addOptions() {\n return {\n levels: [1, 2, 3, 4, 5, 6],\n HTMLAttributes: {},\n };\n },\n content: 'inline*',\n group: 'block',\n defining: true,\n addAttributes() {\n return {\n level: {\n default: 1,\n rendered: false,\n },\n };\n },\n parseHTML() {\n return this.options.levels\n .map((level) => ({\n tag: `h${level}`,\n attrs: { level },\n }));\n },\n renderHTML({ node, HTMLAttributes }) {\n const hasLevel = this.options.levels.includes(node.attrs.level);\n const level = hasLevel\n ? node.attrs.level\n : this.options.levels[0];\n return [`h${level}`, mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];\n },\n addCommands() {\n return {\n setHeading: attributes => ({ commands }) => {\n if (!this.options.levels.includes(attributes.level)) {\n return false;\n }\n return commands.setNode(this.name, attributes);\n },\n toggleHeading: attributes => ({ commands }) => {\n if (!this.options.levels.includes(attributes.level)) {\n return false;\n }\n return commands.toggleNode(this.name, 'paragraph', attributes);\n },\n };\n },\n addKeyboardShortcuts() {\n return this.options.levels.reduce((items, level) => ({\n ...items,\n ...{\n [`Mod-Alt-${level}`]: () => this.editor.commands.toggleHeading({ level }),\n },\n }), {});\n },\n addInputRules() {\n return this.options.levels.map(level => {\n return textblockTypeInputRule({\n find: new RegExp(`^(#{${Math.min(...this.options.levels)},${level}})\\\\s$`),\n type: this.type,\n getAttributes: {\n level,\n },\n });\n });\n },\n});\n\nexport { Heading, Heading as default };\n//# sourceMappingURL=index.js.map\n"],"names":["Heading","Node","create","name","addOptions","levels","HTMLAttributes","content","group","defining","addAttributes","level","default","rendered","parseHTML","this","options","map","tag","attrs","renderHTML","node","includes","mergeAttributes","addCommands","setHeading","attributes","commands","setNode","toggleHeading","toggleNode","addKeyboardShortcuts","reduce","items","editor","addInputRules","textblockTypeInputRule","find","RegExp","Math","min","type","getAttributes"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../node_modules/@tiptap/extension-heading/dist/index.js"],"sourcesContent":["import { Node, mergeAttributes, textblockTypeInputRule } from '@tiptap/core';\n\n/**\n * This extension allows you to create headings.\n * @see https://www.tiptap.dev/api/nodes/heading\n */\nconst Heading = Node.create({\n name: 'heading',\n addOptions() {\n return {\n levels: [1, 2, 3, 4, 5, 6],\n HTMLAttributes: {},\n };\n },\n content: 'inline*',\n group: 'block',\n defining: true,\n addAttributes() {\n return {\n level: {\n default: 1,\n rendered: false,\n },\n };\n },\n parseHTML() {\n return this.options.levels\n .map((level) => ({\n tag: `h${level}`,\n attrs: { level },\n }));\n },\n renderHTML({ node, HTMLAttributes }) {\n const hasLevel = this.options.levels.includes(node.attrs.level);\n const level = hasLevel\n ? node.attrs.level\n : this.options.levels[0];\n return [`h${level}`, mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];\n },\n addCommands() {\n return {\n setHeading: attributes => ({ commands }) => {\n if (!this.options.levels.includes(attributes.level)) {\n return false;\n }\n return commands.setNode(this.name, attributes);\n },\n toggleHeading: attributes => ({ commands }) => {\n if (!this.options.levels.includes(attributes.level)) {\n return false;\n }\n return commands.toggleNode(this.name, 'paragraph', attributes);\n },\n };\n },\n addKeyboardShortcuts() {\n return this.options.levels.reduce((items, level) => ({\n ...items,\n ...{\n [`Mod-Alt-${level}`]: () => this.editor.commands.toggleHeading({ level }),\n },\n }), {});\n },\n addInputRules() {\n return this.options.levels.map(level => {\n return textblockTypeInputRule({\n find: new RegExp(`^(#{${Math.min(...this.options.levels)},${level}})\\\\s$`),\n type: this.type,\n getAttributes: {\n level,\n },\n });\n });\n },\n});\n\nexport { Heading, Heading as default };\n//# sourceMappingURL=index.js.map\n"],"names":["Heading","Node","create","name","addOptions","levels","HTMLAttributes","content","group","defining","addAttributes","level","default","rendered","parseHTML","this","options","map","tag","attrs","renderHTML","node","includes","mergeAttributes","addCommands","setHeading","attributes","commands","setNode","toggleHeading","toggleNode","addKeyboardShortcuts","reduce","items","editor","addInputRules","textblockTypeInputRule","find","RegExp","Math","min","type","getAttributes"],"mappings":"8GAMK,MAACA,EAAUC,EAAIA,KAACC,OAAO,CACxBC,KAAM,UACNC,WAAU,KACC,CACHC,OAAQ,CAAC,EAAG,EAAG,EAAG,EAAG,EAAG,GACxBC,eAAgB,CAAE,IAG1BC,QAAS,UACTC,MAAO,QACPC,UAAU,EACVC,cAAa,KACF,CACHC,MAAO,CACHC,QAAS,EACTC,UAAU,KAItB,SAAAC,GACI,OAAOC,KAAKC,QAAQX,OACfY,KAAKN,IAAW,CACjBO,IAAK,IAAIP,IACTQ,MAAO,CAAER,YAEhB,EACD,UAAAS,EAAWC,KAAEA,EAAIf,eAAEA,IAKf,MAAO,CAAC,IAJSS,KAAKC,QAAQX,OAAOiB,SAASD,EAAKF,MAAMR,OAEnDU,EAAKF,MAAMR,MACXI,KAAKC,QAAQX,OAAO,KACLkB,EAAeA,gBAACR,KAAKC,QAAQV,eAAgBA,GAAiB,EACtF,EACD,WAAAkB,GACI,MAAO,CACHC,WAAYC,GAAc,EAAGC,gBACpBZ,KAAKC,QAAQX,OAAOiB,SAASI,EAAWf,QAGtCgB,EAASC,QAAQb,KAAKZ,KAAMuB,GAEvCG,cAAeH,GAAc,EAAGC,gBACvBZ,KAAKC,QAAQX,OAAOiB,SAASI,EAAWf,QAGtCgB,EAASG,WAAWf,KAAKZ,KAAM,YAAauB,GAG9D,EACD,oBAAAK,GACI,OAAOhB,KAAKC,QAAQX,OAAO2B,QAAO,CAACC,EAAOtB,KAAW,IAC9CsB,EAEC,CAAC,WAAWtB,KAAU,IAAMI,KAAKmB,OAAOP,SAASE,cAAc,CAAElB,aAErE,CAAE,EACT,EACD,aAAAwB,GACI,OAAOpB,KAAKC,QAAQX,OAAOY,KAAIN,GACpByB,yBAAuB,CAC1BC,KAAM,IAAIC,OAAO,OAAOC,KAAKC,OAAOzB,KAAKC,QAAQX,WAAWM,WAC5D8B,KAAM1B,KAAK0B,KACXC,cAAe,CACX/B,YAIf"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../core/dist/index.js");const e=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/,r=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g,s=t.Mark.create({name:"highlight",addOptions:()=>({multicolor:!1,HTMLAttributes:{}}),addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:t=>t.getAttribute("data-color")||t.style.backgroundColor,renderHTML:t=>t.color?{"data-color":t.color,style:`background-color: ${t.color}; color: inherit`}:{}}}:{}},parseHTML:()=>[{tag:"mark"}],renderHTML({HTMLAttributes:e}){return["mark",t.mergeAttributes(this.options.HTMLAttributes,e),0]},addCommands(){return{setHighlight:t=>({commands:e})=>e.setMark(this.name,t),toggleHighlight:t=>({commands:e})=>e.toggleMark(this.name,t),unsetHighlight:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[t.markInputRule({find:e,type:this.type})]},addPasteRules(){return[t.markPasteRule({find:r,type:this.type})]}});exports.Highlight=s,exports.default=s,exports.inputRegex=e,exports.pasteRegex=r;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../node_modules/@tiptap/extension-highlight/dist/index.js"],"sourcesContent":["import { Mark, mergeAttributes, markInputRule, markPasteRule } from '@tiptap/core';\n\n/**\n * Matches a highlight to a ==highlight== on input.\n */\nconst inputRegex = /(?:^|\\s)(==(?!\\s+==)((?:[^=]+))==(?!\\s+==))$/;\n/**\n * Matches a highlight to a ==highlight== on paste.\n */\nconst pasteRegex = /(?:^|\\s)(==(?!\\s+==)((?:[^=]+))==(?!\\s+==))/g;\n/**\n * This extension allows you to highlight text.\n * @see https://www.tiptap.dev/api/marks/highlight\n */\nconst Highlight = Mark.create({\n name: 'highlight',\n addOptions() {\n return {\n multicolor: false,\n HTMLAttributes: {},\n };\n },\n addAttributes() {\n if (!this.options.multicolor) {\n return {};\n }\n return {\n color: {\n default: null,\n parseHTML: element => element.getAttribute('data-color') || element.style.backgroundColor,\n renderHTML: attributes => {\n if (!attributes.color) {\n return {};\n }\n return {\n 'data-color': attributes.color,\n style: `background-color: ${attributes.color}; color: inherit`,\n };\n },\n },\n };\n },\n parseHTML() {\n return [\n {\n tag: 'mark',\n },\n ];\n },\n renderHTML({ HTMLAttributes }) {\n return ['mark', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];\n },\n addCommands() {\n return {\n setHighlight: attributes => ({ commands }) => {\n return commands.setMark(this.name, attributes);\n },\n toggleHighlight: attributes => ({ commands }) => {\n return commands.toggleMark(this.name, attributes);\n },\n unsetHighlight: () => ({ commands }) => {\n return commands.unsetMark(this.name);\n },\n };\n },\n addKeyboardShortcuts() {\n return {\n 'Mod-Shift-h': () => this.editor.commands.toggleHighlight(),\n };\n },\n addInputRules() {\n return [\n markInputRule({\n find: inputRegex,\n type: this.type,\n }),\n ];\n },\n addPasteRules() {\n return [\n markPasteRule({\n find: pasteRegex,\n type: this.type,\n }),\n ];\n },\n});\n\nexport { Highlight, Highlight as default, inputRegex, pasteRegex };\n//# sourceMappingURL=index.js.map\n"],"names":["inputRegex","pasteRegex","Highlight","Mark","create","name","addOptions","multicolor","HTMLAttributes","addAttributes","this","options","color","default","parseHTML","element","getAttribute","style","backgroundColor","renderHTML","attributes","tag","mergeAttributes","addCommands","setHighlight","commands","setMark","toggleHighlight","toggleMark","unsetHighlight","unsetMark","addKeyboardShortcuts","editor","addInputRules","markInputRule","find","type","addPasteRules","markPasteRule"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../node_modules/@tiptap/extension-highlight/dist/index.js"],"sourcesContent":["import { Mark, mergeAttributes, markInputRule, markPasteRule } from '@tiptap/core';\n\n/**\n * Matches a highlight to a ==highlight== on input.\n */\nconst inputRegex = /(?:^|\\s)(==(?!\\s+==)((?:[^=]+))==(?!\\s+==))$/;\n/**\n * Matches a highlight to a ==highlight== on paste.\n */\nconst pasteRegex = /(?:^|\\s)(==(?!\\s+==)((?:[^=]+))==(?!\\s+==))/g;\n/**\n * This extension allows you to highlight text.\n * @see https://www.tiptap.dev/api/marks/highlight\n */\nconst Highlight = Mark.create({\n name: 'highlight',\n addOptions() {\n return {\n multicolor: false,\n HTMLAttributes: {},\n };\n },\n addAttributes() {\n if (!this.options.multicolor) {\n return {};\n }\n return {\n color: {\n default: null,\n parseHTML: element => element.getAttribute('data-color') || element.style.backgroundColor,\n renderHTML: attributes => {\n if (!attributes.color) {\n return {};\n }\n return {\n 'data-color': attributes.color,\n style: `background-color: ${attributes.color}; color: inherit`,\n };\n },\n },\n };\n },\n parseHTML() {\n return [\n {\n tag: 'mark',\n },\n ];\n },\n renderHTML({ HTMLAttributes }) {\n return ['mark', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];\n },\n addCommands() {\n return {\n setHighlight: attributes => ({ commands }) => {\n return commands.setMark(this.name, attributes);\n },\n toggleHighlight: attributes => ({ commands }) => {\n return commands.toggleMark(this.name, attributes);\n },\n unsetHighlight: () => ({ commands }) => {\n return commands.unsetMark(this.name);\n },\n };\n },\n addKeyboardShortcuts() {\n return {\n 'Mod-Shift-h': () => this.editor.commands.toggleHighlight(),\n };\n },\n addInputRules() {\n return [\n markInputRule({\n find: inputRegex,\n type: this.type,\n }),\n ];\n },\n addPasteRules() {\n return [\n markPasteRule({\n find: pasteRegex,\n type: this.type,\n }),\n ];\n },\n});\n\nexport { Highlight, Highlight as default, inputRegex, pasteRegex };\n//# sourceMappingURL=index.js.map\n"],"names":["inputRegex","pasteRegex","Highlight","Mark","create","name","addOptions","multicolor","HTMLAttributes","addAttributes","this","options","color","default","parseHTML","element","getAttribute","style","backgroundColor","renderHTML","attributes","tag","mergeAttributes","addCommands","setHighlight","commands","setMark","toggleHighlight","toggleMark","unsetHighlight","unsetMark","addKeyboardShortcuts","editor","addInputRules","markInputRule","find","type","addPasteRules","markPasteRule"],"mappings":"8GAKK,MAACA,EAAa,+CAIbC,EAAa,+CAKbC,EAAYC,EAAIA,KAACC,OAAO,CAC1BC,KAAM,YACNC,WAAU,KACC,CACHC,YAAY,EACZC,eAAgB,CAAE,IAG1B,aAAAC,GACI,OAAKC,KAAKC,QAAQJ,WAGX,CACHK,MAAO,CACHC,QAAS,KACTC,UAAWC,GAAWA,EAAQC,aAAa,eAAiBD,EAAQE,MAAMC,gBAC1EC,WAAYC,GACHA,EAAWR,MAGT,CACH,aAAcQ,EAAWR,MACzBK,MAAO,qBAAqBG,EAAWR,yBAJhC,KARZ,EAiBd,EACDE,UAAS,IACE,CACH,CACIO,IAAK,SAIjB,UAAAF,EAAWX,eAAEA,IACT,MAAO,CAAC,OAAQc,EAAAA,gBAAgBZ,KAAKC,QAAQH,eAAgBA,GAAiB,EACjF,EACD,WAAAe,GACI,MAAO,CACHC,aAAcJ,GAAc,EAAGK,cACpBA,EAASC,QAAQhB,KAAKL,KAAMe,GAEvCO,gBAAiBP,GAAc,EAAGK,cACvBA,EAASG,WAAWlB,KAAKL,KAAMe,GAE1CS,eAAgB,IAAM,EAAGJ,cACdA,EAASK,UAAUpB,KAAKL,MAG1C,EACD,oBAAA0B,GACI,MAAO,CACH,cAAe,IAAMrB,KAAKsB,OAAOP,SAASE,kBAEjD,EACD,aAAAM,GACI,MAAO,CACHC,gBAAc,CACVC,KAAMnC,EACNoC,KAAM1B,KAAK0B,OAGtB,EACD,aAAAC,GACI,MAAO,CACHC,gBAAc,CACVH,KAAMlC,EACNmC,KAAM1B,KAAK0B,OAGtB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var o=require("../../core/dist/index.js"),d=require("../../../prosemirror-history/dist/index.js");const e=o.Extension.create({name:"history",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>({state:o,dispatch:e})=>d.undo(o,e),redo:()=>({state:o,dispatch:e})=>d.redo(o,e)}),addProseMirrorPlugins(){return[d.history(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}});exports.History=e,exports.default=e;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../node_modules/@tiptap/extension-history/dist/index.js"],"sourcesContent":["import { Extension } from '@tiptap/core';\nimport { undo, redo, history } from '@tiptap/pm/history';\n\n/**\n * This extension allows you to undo and redo recent changes.\n * @see https://www.tiptap.dev/api/extensions/history\n *\n * **Important**: If the `@tiptap/extension-collaboration` package is used, make sure to remove\n * the `history` extension, as it is not compatible with the `collaboration` extension.\n *\n * `@tiptap/extension-collaboration` uses its own history implementation.\n */\nconst History = Extension.create({\n name: 'history',\n addOptions() {\n return {\n depth: 100,\n newGroupDelay: 500,\n };\n },\n addCommands() {\n return {\n undo: () => ({ state, dispatch }) => {\n return undo(state, dispatch);\n },\n redo: () => ({ state, dispatch }) => {\n return redo(state, dispatch);\n },\n };\n },\n addProseMirrorPlugins() {\n return [\n history(this.options),\n ];\n },\n addKeyboardShortcuts() {\n return {\n 'Mod-z': () => this.editor.commands.undo(),\n 'Shift-Mod-z': () => this.editor.commands.redo(),\n 'Mod-y': () => this.editor.commands.redo(),\n // Russian keyboard layouts\n 'Mod-я': () => this.editor.commands.undo(),\n 'Shift-Mod-я': () => this.editor.commands.redo(),\n };\n },\n});\n\nexport { History, History as default };\n//# sourceMappingURL=index.js.map\n"],"names":["History","Extension","create","name","addOptions","depth","newGroupDelay","addCommands","undo","state","dispatch","redo","addProseMirrorPlugins","history","this","options","addKeyboardShortcuts","editor","commands"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../node_modules/@tiptap/extension-history/dist/index.js"],"sourcesContent":["import { Extension } from '@tiptap/core';\nimport { undo, redo, history } from '@tiptap/pm/history';\n\n/**\n * This extension allows you to undo and redo recent changes.\n * @see https://www.tiptap.dev/api/extensions/history\n *\n * **Important**: If the `@tiptap/extension-collaboration` package is used, make sure to remove\n * the `history` extension, as it is not compatible with the `collaboration` extension.\n *\n * `@tiptap/extension-collaboration` uses its own history implementation.\n */\nconst History = Extension.create({\n name: 'history',\n addOptions() {\n return {\n depth: 100,\n newGroupDelay: 500,\n };\n },\n addCommands() {\n return {\n undo: () => ({ state, dispatch }) => {\n return undo(state, dispatch);\n },\n redo: () => ({ state, dispatch }) => {\n return redo(state, dispatch);\n },\n };\n },\n addProseMirrorPlugins() {\n return [\n history(this.options),\n ];\n },\n addKeyboardShortcuts() {\n return {\n 'Mod-z': () => this.editor.commands.undo(),\n 'Shift-Mod-z': () => this.editor.commands.redo(),\n 'Mod-y': () => this.editor.commands.redo(),\n // Russian keyboard layouts\n 'Mod-я': () => this.editor.commands.undo(),\n 'Shift-Mod-я': () => this.editor.commands.redo(),\n };\n },\n});\n\nexport { History, History as default };\n//# sourceMappingURL=index.js.map\n"],"names":["History","Extension","create","name","addOptions","depth","newGroupDelay","addCommands","undo","state","dispatch","redo","addProseMirrorPlugins","history","this","options","addKeyboardShortcuts","editor","commands"],"mappings":"sKAYK,MAACA,EAAUC,EAASA,UAACC,OAAO,CAC7BC,KAAM,UACNC,WAAU,KACC,CACHC,MAAO,IACPC,cAAe,MAGvBC,YAAW,KACA,CACHC,KAAM,IAAM,EAAGC,QAAOC,cACXF,EAAIA,KAACC,EAAOC,GAEvBC,KAAM,IAAM,EAAGF,QAAOC,cACXC,EAAIA,KAACF,EAAOC,KAI/B,qBAAAE,GACI,MAAO,CACHC,EAAOA,QAACC,KAAKC,SAEpB,EACD,oBAAAC,GACI,MAAO,CACH,QAAS,IAAMF,KAAKG,OAAOC,SAASV,OACpC,cAAe,IAAMM,KAAKG,OAAOC,SAASP,OAC1C,QAAS,IAAMG,KAAKG,OAAOC,SAASP,OAEpC,QAAS,IAAMG,KAAKG,OAAOC,SAASV,OACpC,cAAe,IAAMM,KAAKG,OAAOC,SAASP,OAEjD"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../core/dist/index.js"),t=require("../../../prosemirror-state/dist/index.js");const o=e.Node.create({name:"horizontalRule",addOptions:()=>({HTMLAttributes:{}}),group:"block",parseHTML:()=>[{tag:"hr"}],renderHTML({HTMLAttributes:t}){return["hr",e.mergeAttributes(this.options.HTMLAttributes,t)]},addCommands(){return{setHorizontalRule:()=>({chain:o,state:n})=>{const{selection:r}=n,{$from:s,$to:i}=r,c=o();return 0===s.parentOffset?c.insertContentAt({from:Math.max(s.pos-1,0),to:i.pos},{type:this.name}):e.isNodeSelection(r)?c.insertContentAt(i.pos,{type:this.name}):c.insertContent({type:this.name}),c.command((({tr:e,dispatch:o})=>{var n;if(o){const{$to:o}=e.selection,r=o.end();if(o.nodeAfter)o.nodeAfter.isTextblock?e.setSelection(t.TextSelection.create(e.doc,o.pos+1)):o.nodeAfter.isBlock?e.setSelection(t.NodeSelection.create(e.doc,o.pos)):e.setSelection(t.TextSelection.create(e.doc,o.pos));else{const s=null===(n=o.parent.type.contentMatch.defaultType)||void 0===n?void 0:n.create();s&&(e.insert(r,s),e.setSelection(t.TextSelection.create(e.doc,r+1)))}e.scrollIntoView()}return!0})).run()}}},addInputRules(){return[e.nodeInputRule({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}});exports.HorizontalRule=o,exports.default=o;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../node_modules/@tiptap/extension-horizontal-rule/dist/index.js"],"sourcesContent":["import { Node, mergeAttributes, isNodeSelection, nodeInputRule } from '@tiptap/core';\nimport { TextSelection, NodeSelection } from '@tiptap/pm/state';\n\n/**\n * This extension allows you to insert horizontal rules.\n * @see https://www.tiptap.dev/api/nodes/horizontal-rule\n */\nconst HorizontalRule = Node.create({\n name: 'horizontalRule',\n addOptions() {\n return {\n HTMLAttributes: {},\n };\n },\n group: 'block',\n parseHTML() {\n return [{ tag: 'hr' }];\n },\n renderHTML({ HTMLAttributes }) {\n return ['hr', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes)];\n },\n addCommands() {\n return {\n setHorizontalRule: () => ({ chain, state }) => {\n const { selection } = state;\n const { $from: $originFrom, $to: $originTo } = selection;\n const currentChain = chain();\n if ($originFrom.parentOffset === 0) {\n currentChain.insertContentAt({\n from: Math.max($originFrom.pos - 1, 0),\n to: $originTo.pos,\n }, {\n type: this.name,\n });\n }\n else if (isNodeSelection(selection)) {\n currentChain.insertContentAt($originTo.pos, {\n type: this.name,\n });\n }\n else {\n currentChain.insertContent({ type: this.name });\n }\n return (currentChain\n // set cursor after horizontal rule\n .command(({ tr, dispatch }) => {\n var _a;\n if (dispatch) {\n const { $to } = tr.selection;\n const posAfter = $to.end();\n if ($to.nodeAfter) {\n if ($to.nodeAfter.isTextblock) {\n tr.setSelection(TextSelection.create(tr.doc, $to.pos + 1));\n }\n else if ($to.nodeAfter.isBlock) {\n tr.setSelection(NodeSelection.create(tr.doc, $to.pos));\n }\n else {\n tr.setSelection(TextSelection.create(tr.doc, $to.pos));\n }\n }\n else {\n // add node after horizontal rule if it’s the end of the document\n const node = (_a = $to.parent.type.contentMatch.defaultType) === null || _a === void 0 ? void 0 : _a.create();\n if (node) {\n tr.insert(posAfter, node);\n tr.setSelection(TextSelection.create(tr.doc, posAfter + 1));\n }\n }\n tr.scrollIntoView();\n }\n return true;\n })\n .run());\n },\n };\n },\n addInputRules() {\n return [\n nodeInputRule({\n find: /^(?:---|—-|___\\s|\\*\\*\\*\\s)$/,\n type: this.type,\n }),\n ];\n },\n});\n\nexport { HorizontalRule, HorizontalRule as default };\n//# sourceMappingURL=index.js.map\n"],"names":["HorizontalRule","Node","create","name","addOptions","HTMLAttributes","group","parseHTML","tag","renderHTML","mergeAttributes","this","options","addCommands","setHorizontalRule","chain","state","selection","$from","$originFrom","$to","$originTo","currentChain","parentOffset","insertContentAt","from","Math","max","pos","to","type","isNodeSelection","insertContent","command","tr","dispatch","_a","posAfter","end","nodeAfter","isTextblock","setSelection","TextSelection","doc","isBlock","NodeSelection","node","parent","contentMatch","defaultType","insert","scrollIntoView","run","addInputRules","nodeInputRule","find"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../node_modules/@tiptap/extension-horizontal-rule/dist/index.js"],"sourcesContent":["import { Node, mergeAttributes, isNodeSelection, nodeInputRule } from '@tiptap/core';\nimport { TextSelection, NodeSelection } from '@tiptap/pm/state';\n\n/**\n * This extension allows you to insert horizontal rules.\n * @see https://www.tiptap.dev/api/nodes/horizontal-rule\n */\nconst HorizontalRule = Node.create({\n name: 'horizontalRule',\n addOptions() {\n return {\n HTMLAttributes: {},\n };\n },\n group: 'block',\n parseHTML() {\n return [{ tag: 'hr' }];\n },\n renderHTML({ HTMLAttributes }) {\n return ['hr', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes)];\n },\n addCommands() {\n return {\n setHorizontalRule: () => ({ chain, state }) => {\n const { selection } = state;\n const { $from: $originFrom, $to: $originTo } = selection;\n const currentChain = chain();\n if ($originFrom.parentOffset === 0) {\n currentChain.insertContentAt({\n from: Math.max($originFrom.pos - 1, 0),\n to: $originTo.pos,\n }, {\n type: this.name,\n });\n }\n else if (isNodeSelection(selection)) {\n currentChain.insertContentAt($originTo.pos, {\n type: this.name,\n });\n }\n else {\n currentChain.insertContent({ type: this.name });\n }\n return (currentChain\n // set cursor after horizontal rule\n .command(({ tr, dispatch }) => {\n var _a;\n if (dispatch) {\n const { $to } = tr.selection;\n const posAfter = $to.end();\n if ($to.nodeAfter) {\n if ($to.nodeAfter.isTextblock) {\n tr.setSelection(TextSelection.create(tr.doc, $to.pos + 1));\n }\n else if ($to.nodeAfter.isBlock) {\n tr.setSelection(NodeSelection.create(tr.doc, $to.pos));\n }\n else {\n tr.setSelection(TextSelection.create(tr.doc, $to.pos));\n }\n }\n else {\n // add node after horizontal rule if it’s the end of the document\n const node = (_a = $to.parent.type.contentMatch.defaultType) === null || _a === void 0 ? void 0 : _a.create();\n if (node) {\n tr.insert(posAfter, node);\n tr.setSelection(TextSelection.create(tr.doc, posAfter + 1));\n }\n }\n tr.scrollIntoView();\n }\n return true;\n })\n .run());\n },\n };\n },\n addInputRules() {\n return [\n nodeInputRule({\n find: /^(?:---|—-|___\\s|\\*\\*\\*\\s)$/,\n type: this.type,\n }),\n ];\n },\n});\n\nexport { HorizontalRule, HorizontalRule as default };\n//# sourceMappingURL=index.js.map\n"],"names":["HorizontalRule","Node","create","name","addOptions","HTMLAttributes","group","parseHTML","tag","renderHTML","mergeAttributes","this","options","addCommands","setHorizontalRule","chain","state","selection","$from","$originFrom","$to","$originTo","currentChain","parentOffset","insertContentAt","from","Math","max","pos","to","type","isNodeSelection","insertContent","command","tr","dispatch","_a","posAfter","end","nodeAfter","isTextblock","setSelection","TextSelection","doc","isBlock","NodeSelection","node","parent","contentMatch","defaultType","insert","scrollIntoView","run","addInputRules","nodeInputRule","find"],"mappings":"oKAOK,MAACA,EAAiBC,EAAIA,KAACC,OAAO,CAC/BC,KAAM,iBACNC,WAAU,KACC,CACHC,eAAgB,CAAE,IAG1BC,MAAO,QACPC,UAAS,IACE,CAAC,CAAEC,IAAK,OAEnB,UAAAC,EAAWJ,eAAEA,IACT,MAAO,CAAC,KAAMK,kBAAgBC,KAAKC,QAAQP,eAAgBA,GAC9D,EACD,WAAAQ,GACI,MAAO,CACHC,kBAAmB,IAAM,EAAGC,QAAOC,YAC/B,MAAMC,UAAEA,GAAcD,GACdE,MAAOC,EAAaC,IAAKC,GAAcJ,EACzCK,EAAeP,IAiBrB,OAhBiC,IAA7BI,EAAYI,aACZD,EAAaE,gBAAgB,CACzBC,KAAMC,KAAKC,IAAIR,EAAYS,IAAM,EAAG,GACpCC,GAAIR,EAAUO,KACf,CACCE,KAAMnB,KAAKR,OAGV4B,EAAAA,gBAAgBd,GACrBK,EAAaE,gBAAgBH,EAAUO,IAAK,CACxCE,KAAMnB,KAAKR,OAIfmB,EAAaU,cAAc,CAAEF,KAAMnB,KAAKR,OAEpCmB,EAEHW,SAAQ,EAAGC,KAAIC,eAChB,IAAIC,EACJ,GAAID,EAAU,CACV,MAAMf,IAAEA,GAAQc,EAAGjB,UACboB,EAAWjB,EAAIkB,MACrB,GAAIlB,EAAImB,UACAnB,EAAImB,UAAUC,YACdN,EAAGO,aAAaC,EAAaA,cAACxC,OAAOgC,EAAGS,IAAKvB,EAAIQ,IAAM,IAElDR,EAAImB,UAAUK,QACnBV,EAAGO,aAAaI,EAAAA,cAAc3C,OAAOgC,EAAGS,IAAKvB,EAAIQ,MAGjDM,EAAGO,aAAaC,EAAAA,cAAcxC,OAAOgC,EAAGS,IAAKvB,EAAIQ,UAGpD,CAED,MAAMkB,EAA2D,QAAnDV,EAAKhB,EAAI2B,OAAOjB,KAAKkB,aAAaC,mBAAgC,IAAPb,OAAgB,EAASA,EAAGlC,SACjG4C,IACAZ,EAAGgB,OAAOb,EAAUS,GACpBZ,EAAGO,aAAaC,EAAAA,cAAcxC,OAAOgC,EAAGS,IAAKN,EAAW,IAE/D,CACDH,EAAGiB,gBACN,CACD,OAAO,CAAI,IAEVC,KAAO,EAGvB,EACD,aAAAC,GACI,MAAO,CACHC,gBAAc,CACVC,KAAM,8BACNzB,KAAMnB,KAAKmB,OAGtB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../core/dist/index.js");const e=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,r=t.Node.create({name:"image",addOptions:()=>({inline:!1,allowBase64:!1,HTMLAttributes:{}}),inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes:()=>({src:{default:null},alt:{default:null},title:{default:null}}),parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:e}){return["img",t.mergeAttributes(this.options.HTMLAttributes,e)]},addCommands(){return{setImage:t=>({commands:e})=>e.insertContent({type:this.name,attrs:t})}},addInputRules(){return[t.nodeInputRule({find:e,type:this.type,getAttributes:t=>{const[,,e,r,s]=t;return{src:r,alt:e,title:s}}})]}});exports.Image=r,exports.default=r,exports.inputRegex=e;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../node_modules/@tiptap/extension-image/dist/index.js"],"sourcesContent":["import { Node, mergeAttributes, nodeInputRule } from '@tiptap/core';\n\n/**\n * Matches an image to a  on input.\n */\nconst inputRegex = /(?:^|\\s)(!\\[(.+|:?)]\\((\\S+)(?:(?:\\s+)[\"'](\\S+)[\"'])?\\))$/;\n/**\n * This extension allows you to insert images.\n * @see https://www.tiptap.dev/api/nodes/image\n */\nconst Image = Node.create({\n name: 'image',\n addOptions() {\n return {\n inline: false,\n allowBase64: false,\n HTMLAttributes: {},\n };\n },\n inline() {\n return this.options.inline;\n },\n group() {\n return this.options.inline ? 'inline' : 'block';\n },\n draggable: true,\n addAttributes() {\n return {\n src: {\n default: null,\n },\n alt: {\n default: null,\n },\n title: {\n default: null,\n },\n };\n },\n parseHTML() {\n return [\n {\n tag: this.options.allowBase64\n ? 'img[src]'\n : 'img[src]:not([src^=\"data:\"])',\n },\n ];\n },\n renderHTML({ HTMLAttributes }) {\n return ['img', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes)];\n },\n addCommands() {\n return {\n setImage: options => ({ commands }) => {\n return commands.insertContent({\n type: this.name,\n attrs: options,\n });\n },\n };\n },\n addInputRules() {\n return [\n nodeInputRule({\n find: inputRegex,\n type: this.type,\n getAttributes: match => {\n const [, , alt, src, title] = match;\n return { src, alt, title };\n },\n }),\n ];\n },\n});\n\nexport { Image, Image as default, inputRegex };\n//# sourceMappingURL=index.js.map\n"],"names":["inputRegex","Image","Node","create","name","addOptions","inline","allowBase64","HTMLAttributes","this","options","group","draggable","addAttributes","src","default","alt","title","parseHTML","tag","renderHTML","mergeAttributes","addCommands","setImage","commands","insertContent","type","attrs","addInputRules","nodeInputRule","find","getAttributes","match"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../node_modules/@tiptap/extension-image/dist/index.js"],"sourcesContent":["import { Node, mergeAttributes, nodeInputRule } from '@tiptap/core';\n\n/**\n * Matches an image to a  on input.\n */\nconst inputRegex = /(?:^|\\s)(!\\[(.+|:?)]\\((\\S+)(?:(?:\\s+)[\"'](\\S+)[\"'])?\\))$/;\n/**\n * This extension allows you to insert images.\n * @see https://www.tiptap.dev/api/nodes/image\n */\nconst Image = Node.create({\n name: 'image',\n addOptions() {\n return {\n inline: false,\n allowBase64: false,\n HTMLAttributes: {},\n };\n },\n inline() {\n return this.options.inline;\n },\n group() {\n return this.options.inline ? 'inline' : 'block';\n },\n draggable: true,\n addAttributes() {\n return {\n src: {\n default: null,\n },\n alt: {\n default: null,\n },\n title: {\n default: null,\n },\n };\n },\n parseHTML() {\n return [\n {\n tag: this.options.allowBase64\n ? 'img[src]'\n : 'img[src]:not([src^=\"data:\"])',\n },\n ];\n },\n renderHTML({ HTMLAttributes }) {\n return ['img', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes)];\n },\n addCommands() {\n return {\n setImage: options => ({ commands }) => {\n return commands.insertContent({\n type: this.name,\n attrs: options,\n });\n },\n };\n },\n addInputRules() {\n return [\n nodeInputRule({\n find: inputRegex,\n type: this.type,\n getAttributes: match => {\n const [, , alt, src, title] = match;\n return { src, alt, title };\n },\n }),\n ];\n },\n});\n\nexport { Image, Image as default, inputRegex };\n//# sourceMappingURL=index.js.map\n"],"names":["inputRegex","Image","Node","create","name","addOptions","inline","allowBase64","HTMLAttributes","this","options","group","draggable","addAttributes","src","default","alt","title","parseHTML","tag","renderHTML","mergeAttributes","addCommands","setImage","commands","insertContent","type","attrs","addInputRules","nodeInputRule","find","getAttributes","match"],"mappings":"8GAKK,MAACA,EAAa,2DAKbC,EAAQC,EAAIA,KAACC,OAAO,CACtBC,KAAM,QACNC,WAAU,KACC,CACHC,QAAQ,EACRC,aAAa,EACbC,eAAgB,CAAE,IAG1B,MAAAF,GACI,OAAOG,KAAKC,QAAQJ,MACvB,EACD,KAAAK,GACI,OAAOF,KAAKC,QAAQJ,OAAS,SAAW,OAC3C,EACDM,WAAW,EACXC,cAAa,KACF,CACHC,IAAK,CACDC,QAAS,MAEbC,IAAK,CACDD,QAAS,MAEbE,MAAO,CACHF,QAAS,QAIrB,SAAAG,GACI,MAAO,CACH,CACIC,IAAKV,KAAKC,QAAQH,YACZ,WACA,gCAGjB,EACD,UAAAa,EAAWZ,eAAEA,IACT,MAAO,CAAC,MAAOa,kBAAgBZ,KAAKC,QAAQF,eAAgBA,GAC/D,EACD,WAAAc,GACI,MAAO,CACHC,SAAUb,GAAW,EAAGc,cACbA,EAASC,cAAc,CAC1BC,KAAMjB,KAAKL,KACXuB,MAAOjB,IAItB,EACD,aAAAkB,GACI,MAAO,CACHC,gBAAc,CACVC,KAAM9B,EACN0B,KAAMjB,KAAKiB,KACXK,cAAeC,IACX,MAAW,CAAA,CAAAhB,EAAKF,EAAKG,GAASe,EAC9B,MAAO,CAAElB,MAAKE,MAAKC,QAAO,IAIzC"}
|