@wix/patterns-fields 1.66.0 → 1.68.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/auto-field-types/validations.js +9 -13
- package/dist/cjs/auto-field-types/validations.js.map +1 -1
- package/dist/cjs/components/address/input/address-input.st.css.js +3 -3
- package/dist/cjs/components/address/input/address-input.st.css.js.map +1 -1
- package/dist/cjs/components/audio/actions/actions-menu/actions-menu.st.css.js +3 -3
- package/dist/cjs/components/audio/actions/actions-menu/actions-menu.st.css.js.map +1 -1
- package/dist/cjs/components/audio/audio-field/form-audio-field.st.css.js +4 -4
- package/dist/cjs/components/audio/audio-field/form-audio-field.st.css.js.map +1 -1
- package/dist/cjs/components/audio/audio-player/audio-player.st.css.js +2 -2
- package/dist/cjs/components/audio/audio-player/audio-player.st.css.js.map +1 -1
- package/dist/cjs/components/color-view/cell-color-view.js +10 -9
- package/dist/cjs/components/color-view/cell-color-view.js.map +1 -1
- package/dist/cjs/components/color-view/cell-color-view.st.css.js +3 -3
- package/dist/cjs/components/color-view/cell-color-view.st.css.js.map +1 -1
- package/dist/cjs/components/color-view/color-view.js +5 -3
- package/dist/cjs/components/color-view/color-view.js.map +1 -1
- package/dist/cjs/components/color-view/color-view.st.css.js +4 -4
- package/dist/cjs/components/color-view/color-view.st.css.js.map +1 -1
- package/dist/cjs/components/delete-dialog/delete-dialog.st.css.js +3 -3
- package/dist/cjs/components/delete-dialog/delete-dialog.st.css.js.map +1 -1
- package/dist/cjs/components/document/form-document-field.st.css.js +7 -7
- package/dist/cjs/components/document/form-document-field.st.css.js.map +1 -1
- package/dist/cjs/components/exclamation/exclamation.st.css.js +5 -5
- package/dist/cjs/components/exclamation/exclamation.st.css.js.map +1 -1
- package/dist/cjs/components/highlighted-text/highlighted-text.st.css.js +5 -5
- package/dist/cjs/components/highlighted-text/highlighted-text.st.css.js.map +1 -1
- package/dist/cjs/components/image/thumbnail-replace-overlay.st.css.js +3 -3
- package/dist/cjs/components/image/thumbnail-replace-overlay.st.css.js.map +1 -1
- package/dist/cjs/components/media-control/cell-media-edit-shell.st.css.js +2 -2
- package/dist/cjs/components/media-control/cell-media-edit-shell.st.css.js.map +1 -1
- package/dist/cjs/components/media-control/paste-url-button.st.css.js +4 -4
- package/dist/cjs/components/media-control/paste-url-button.st.css.js.map +1 -1
- package/dist/cjs/components/media-gallery/cell-media-gallery-view.js +3 -3
- package/dist/cjs/components/media-gallery/cell-media-gallery-view.js.map +1 -1
- package/dist/cjs/components/media-gallery/form-media-gallery-field.st.css.js +10 -10
- package/dist/cjs/components/media-gallery/form-media-gallery-field.st.css.js.map +1 -1
- package/dist/cjs/components/media-image/media-image.st.css.js +4 -4
- package/dist/cjs/components/media-image/media-image.st.css.js.map +1 -1
- package/dist/cjs/components/media-image/overlays/overlay.st.css.js +3 -3
- package/dist/cjs/components/media-image/overlays/overlay.st.css.js.map +1 -1
- package/dist/cjs/components/media-loader/media-loader.st.css.js +3 -3
- package/dist/cjs/components/media-loader/media-loader.st.css.js.map +1 -1
- package/dist/cjs/components/media-tag/web-media-tag/media-tag.st.css.js +2 -2
- package/dist/cjs/components/media-tag/web-media-tag/media-tag.st.css.js.map +1 -1
- package/dist/cjs/components/multi-document/cell-multi-document-edit.st.css.js +3 -3
- package/dist/cjs/components/multi-document/cell-multi-document-edit.st.css.js.map +1 -1
- package/dist/cjs/components/multi-document/cell-multi-document-view.js +1 -1
- package/dist/cjs/components/multi-document/cell-multi-document-view.js.map +1 -1
- package/dist/cjs/components/multi-document/multi-document-input/form-multi-document.st.css.js +5 -5
- package/dist/cjs/components/multi-document/multi-document-input/form-multi-document.st.css.js.map +1 -1
- package/dist/cjs/components/reference/cell-multi-reference-input.st.css.js +2 -2
- package/dist/cjs/components/reference/cell-multi-reference-input.st.css.js.map +1 -1
- package/dist/cjs/components/reference/cell-reference-input.st.css.js +3 -3
- package/dist/cjs/components/reference/cell-reference-input.st.css.js.map +1 -1
- package/dist/cjs/components/reference/reference-avatar.js +4 -2
- package/dist/cjs/components/reference/reference-avatar.js.map +1 -1
- package/dist/cjs/components/rich-content/cdn/load-ricos.js +135 -0
- package/dist/cjs/components/rich-content/cdn/load-ricos.js.map +1 -0
- package/dist/cjs/components/rich-content/cdn/types.js +4 -0
- package/dist/cjs/components/rich-content/cdn/types.js.map +1 -0
- package/dist/cjs/components/rich-content/cell-rich-content-input.js +3 -3
- package/dist/cjs/components/rich-content/cell-rich-content-input.js.map +1 -1
- package/dist/cjs/components/rich-content/cell-rich-content-view.js +2 -2
- package/dist/cjs/components/rich-content/cell-rich-content-view.js.map +1 -1
- package/dist/cjs/components/rich-content/editor.js.map +1 -1
- package/dist/cjs/components/rich-content/form-rich-content.js +2 -2
- package/dist/cjs/components/rich-content/form-rich-content.js.map +1 -1
- package/dist/cjs/components/rich-content/hooks/use-plain-text-rich-content.js +5 -3
- package/dist/cjs/components/rich-content/hooks/use-plain-text-rich-content.js.map +1 -1
- package/dist/cjs/components/rich-content/rich-content-input/default-value-input/rich-content-default-value-input.js.map +1 -1
- package/dist/cjs/components/rich-content/rich-content-input/default-value-input/rich-content-default-value-input.st.css.js +4 -4
- package/dist/cjs/components/rich-content/rich-content-input/default-value-input/rich-content-default-value-input.st.css.js.map +1 -1
- package/dist/cjs/components/rich-content/rich-content-input/default-value-read-only-input/rich-content-form-read-only-input.js.map +1 -1
- package/dist/cjs/components/rich-content/rich-content-input/form-input/rich-content-form-input.js.map +1 -1
- package/dist/cjs/components/rich-content/rich-content-input/form-input/rich-content-form-input.st.css.js +3 -3
- package/dist/cjs/components/rich-content/rich-content-input/form-input/rich-content-form-input.st.css.js.map +1 -1
- package/dist/cjs/components/rich-content/rich-content-input/form-input/use-rich-content-form-input.js.map +1 -1
- package/dist/cjs/components/rich-content/rich-content-input/form-read-only-input/rich-content-form-read-only-input.js.map +1 -1
- package/dist/cjs/components/rich-content/rich-content-input/form-read-only-input/rich-content-form-read-only-input.st.css.js +2 -2
- package/dist/cjs/components/rich-content/rich-content-input/form-read-only-input/rich-content-form-read-only-input.st.css.js.map +1 -1
- package/dist/cjs/components/rich-content/rich-content-input/hooks.js +7 -8
- package/dist/cjs/components/rich-content/rich-content-input/hooks.js.map +1 -1
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-common/fullscreen-modal/fullscreen-modal.st.css.js +3 -3
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-common/fullscreen-modal/fullscreen-modal.st.css.js.map +1 -1
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-common/hooks.js +15 -3
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-common/hooks.js.map +1 -1
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-common/publish-loader/publish-loader.st.css.js +3 -3
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-common/publish-loader/publish-loader.st.css.js.map +1 -1
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-common/toggle-fullscreen-button/toggle-fullscreen-button.st.css.js +2 -2
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-common/toggle-fullscreen-button/toggle-fullscreen-button.st.css.js.map +1 -1
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-common/types.js.map +1 -1
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-editor/plugins.js +38 -31
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-editor/plugins.js.map +1 -1
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.js +27 -22
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.js.map +1 -1
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.st.css.js +7 -7
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.st.css.js.map +1 -1
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.js +10 -9
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.js.map +1 -1
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.st.css.js +5 -5
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.st.css.js.map +1 -1
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-viewer/plugins.js +11 -17
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-viewer/plugins.js.map +1 -1
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-viewer/rich-content-viewer.js +47 -15
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-viewer/rich-content-viewer.js.map +1 -1
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-viewer/rich-content-viewer.st.css.js +4 -4
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-viewer/rich-content-viewer.st.css.js.map +1 -1
- package/dist/cjs/components/rich-content/rich-content-input/services/rich-content-document-http-service.js.map +1 -1
- package/dist/cjs/components/rich-content/rich-content-input/services/types.js.map +1 -1
- package/dist/cjs/components/rich-text/rich-text-input/rich-text-editor/rich-editor.st.css.js +18 -18
- package/dist/cjs/components/rich-text/rich-text-input/rich-text-editor/rich-editor.st.css.js.map +1 -1
- package/dist/cjs/components/rich-text/rich-text-input/rich-text-editor/rich-text-editor.st.css.js +4 -4
- package/dist/cjs/components/rich-text/rich-text-input/rich-text-editor/rich-text-editor.st.css.js.map +1 -1
- package/dist/cjs/components/rich-text/rich-text-input/rich-text-editor/toolbar/toolbar.st.css.js +18 -18
- package/dist/cjs/components/rich-text/rich-text-input/rich-text-editor/toolbar/toolbar.st.css.js.map +1 -1
- package/dist/cjs/components/text/text-view.st.css.js +3 -3
- package/dist/cjs/components/text/text-view.st.css.js.map +1 -1
- package/dist/cjs/components/url/url-view.js +10 -9
- package/dist/cjs/components/url/url-view.js.map +1 -1
- package/dist/cjs/exports/ricos-statics-legacy.js +10 -0
- package/dist/cjs/exports/ricos-statics-legacy.js.map +1 -0
- package/dist/cjs/exports/ricos-statics.js +10 -0
- package/dist/cjs/exports/ricos-statics.js.map +1 -0
- package/dist/cjs/styles.global.css +1 -1
- package/dist/cjs/utils/request-idle-callback.js +4 -1
- package/dist/cjs/utils/request-idle-callback.js.map +1 -1
- package/dist/cjs/validations/rich-content.js +26 -6
- package/dist/cjs/validations/rich-content.js.map +1 -1
- package/dist/esm/auto-field-types/validations.js +10 -13
- package/dist/esm/auto-field-types/validations.js.map +1 -1
- package/dist/esm/components/address/input/address-input.st.css.js +2 -2
- package/dist/esm/components/audio/actions/actions-menu/actions-menu.st.css.js +2 -2
- package/dist/esm/components/audio/audio-field/form-audio-field.st.css.js +2 -2
- package/dist/esm/components/audio/audio-field/form-audio-field.st.css.js.map +1 -1
- package/dist/esm/components/audio/audio-player/audio-player.st.css.js +2 -2
- package/dist/esm/components/color-view/cell-color-view.js +4 -3
- package/dist/esm/components/color-view/cell-color-view.js.map +1 -1
- package/dist/esm/components/color-view/cell-color-view.st.css.js +2 -2
- package/dist/esm/components/color-view/color-view.js +3 -2
- package/dist/esm/components/color-view/color-view.js.map +1 -1
- package/dist/esm/components/color-view/color-view.st.css.js +2 -2
- package/dist/esm/components/delete-dialog/delete-dialog.st.css.js +2 -2
- package/dist/esm/components/document/form-document-field.st.css.js +2 -2
- package/dist/esm/components/document/form-document-field.st.css.js.map +1 -1
- package/dist/esm/components/exclamation/exclamation.st.css.js +2 -2
- package/dist/esm/components/highlighted-text/highlighted-text.st.css.js +3 -3
- package/dist/esm/components/image/thumbnail-replace-overlay.st.css.js +2 -2
- package/dist/esm/components/image/thumbnail-replace-overlay.st.css.js.map +1 -1
- package/dist/esm/components/media-control/cell-media-edit-shell.st.css.js +2 -2
- package/dist/esm/components/media-control/paste-url-button.st.css.js +2 -2
- package/dist/esm/components/media-gallery/cell-media-gallery-view.js +3 -1
- package/dist/esm/components/media-gallery/cell-media-gallery-view.js.map +1 -1
- package/dist/esm/components/media-gallery/form-media-gallery-field.st.css.js +2 -2
- package/dist/esm/components/media-gallery/form-media-gallery-field.st.css.js.map +1 -1
- package/dist/esm/components/media-image/media-image.st.css.js +3 -3
- package/dist/esm/components/media-image/media-image.st.css.js.map +1 -1
- package/dist/esm/components/media-image/overlays/overlay.st.css.js +2 -2
- package/dist/esm/components/media-loader/media-loader.st.css.js +2 -2
- package/dist/esm/components/media-loader/media-loader.st.css.js.map +1 -1
- package/dist/esm/components/media-tag/web-media-tag/media-tag.st.css.js +2 -2
- package/dist/esm/components/media-tag/web-media-tag/media-tag.st.css.js.map +1 -1
- package/dist/esm/components/multi-document/cell-multi-document-edit.st.css.js +2 -2
- package/dist/esm/components/multi-document/cell-multi-document-view.js +1 -1
- package/dist/esm/components/multi-document/cell-multi-document-view.js.map +1 -1
- package/dist/esm/components/multi-document/multi-document-input/form-multi-document.st.css.js +2 -2
- package/dist/esm/components/reference/cell-multi-reference-input.st.css.js +2 -2
- package/dist/esm/components/reference/cell-reference-input.st.css.js +2 -2
- package/dist/esm/components/reference/reference-avatar.js +2 -1
- package/dist/esm/components/reference/reference-avatar.js.map +1 -1
- package/dist/esm/components/rich-content/cdn/load-ricos.js +126 -0
- package/dist/esm/components/rich-content/cdn/load-ricos.js.map +1 -0
- package/dist/esm/components/rich-content/cdn/types.js +2 -0
- package/dist/esm/components/rich-content/cdn/types.js.map +1 -0
- package/dist/esm/components/rich-content/cell-rich-content-input.js +1 -1
- package/dist/esm/components/rich-content/cell-rich-content-input.js.map +1 -1
- package/dist/esm/components/rich-content/cell-rich-content-view.js +1 -1
- package/dist/esm/components/rich-content/cell-rich-content-view.js.map +1 -1
- package/dist/esm/components/rich-content/editor.js +1 -1
- package/dist/esm/components/rich-content/editor.js.map +1 -1
- package/dist/esm/components/rich-content/form-rich-content.js +1 -1
- package/dist/esm/components/rich-content/form-rich-content.js.map +1 -1
- package/dist/esm/components/rich-content/hooks/use-plain-text-rich-content.js +3 -2
- package/dist/esm/components/rich-content/hooks/use-plain-text-rich-content.js.map +1 -1
- package/dist/esm/components/rich-content/rich-content-input/default-value-input/rich-content-default-value-input.st.css.js +2 -2
- package/dist/esm/components/rich-content/rich-content-input/form-input/rich-content-form-input.st.css.js +2 -2
- package/dist/esm/components/rich-content/rich-content-input/form-input/rich-content-form-input.st.css.js.map +1 -1
- package/dist/esm/components/rich-content/rich-content-input/form-read-only-input/rich-content-form-read-only-input.st.css.js +2 -2
- package/dist/esm/components/rich-content/rich-content-input/form-read-only-input/rich-content-form-read-only-input.st.css.js.map +1 -1
- package/dist/esm/components/rich-content/rich-content-input/hooks.js +4 -7
- package/dist/esm/components/rich-content/rich-content-input/hooks.js.map +1 -1
- package/dist/esm/components/rich-content/rich-content-input/rich-content-common/fullscreen-modal/fullscreen-modal.st.css.js +2 -2
- package/dist/esm/components/rich-content/rich-content-input/rich-content-common/hooks.js +14 -2
- package/dist/esm/components/rich-content/rich-content-input/rich-content-common/hooks.js.map +1 -1
- package/dist/esm/components/rich-content/rich-content-input/rich-content-common/publish-loader/publish-loader.st.css.js +2 -2
- package/dist/esm/components/rich-content/rich-content-input/rich-content-common/toggle-fullscreen-button/toggle-fullscreen-button.st.css.js +2 -2
- package/dist/esm/components/rich-content/rich-content-input/rich-content-common/toggle-fullscreen-button/toggle-fullscreen-button.st.css.js.map +1 -1
- package/dist/esm/components/rich-content/rich-content-input/rich-content-editor/plugins.js +49 -41
- package/dist/esm/components/rich-content/rich-content-input/rich-content-editor/plugins.js.map +1 -1
- package/dist/esm/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.js +10 -5
- package/dist/esm/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.js.map +1 -1
- package/dist/esm/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.st.css.js +2 -2
- package/dist/esm/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.st.css.js.map +1 -1
- package/dist/esm/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.js +3 -1
- package/dist/esm/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.js.map +1 -1
- package/dist/esm/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.st.css.js +2 -2
- package/dist/esm/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.st.css.js.map +1 -1
- package/dist/esm/components/rich-content/rich-content-input/rich-content-viewer/plugins.js +31 -37
- package/dist/esm/components/rich-content/rich-content-input/rich-content-viewer/plugins.js.map +1 -1
- package/dist/esm/components/rich-content/rich-content-input/rich-content-viewer/rich-content-viewer.js +11 -5
- package/dist/esm/components/rich-content/rich-content-input/rich-content-viewer/rich-content-viewer.js.map +1 -1
- package/dist/esm/components/rich-content/rich-content-input/rich-content-viewer/rich-content-viewer.st.css.js +2 -2
- package/dist/esm/components/rich-text/rich-text-input/rich-text-editor/rich-editor.st.css.js +2 -2
- package/dist/esm/components/rich-text/rich-text-input/rich-text-editor/rich-text-editor.st.css.js +2 -2
- package/dist/esm/components/rich-text/rich-text-input/rich-text-editor/toolbar/toolbar.st.css.js +2 -2
- package/dist/esm/components/text/text-view.st.css.js +2 -2
- package/dist/esm/components/text/text-view.st.css.js.map +1 -1
- package/dist/esm/components/url/url-view.js +3 -2
- package/dist/esm/components/url/url-view.js.map +1 -1
- package/dist/esm/exports/ricos-statics-legacy.js +6 -0
- package/dist/esm/exports/ricos-statics-legacy.js.map +1 -0
- package/dist/esm/exports/ricos-statics.js +10 -0
- package/dist/esm/exports/ricos-statics.js.map +1 -0
- package/dist/esm/styles.global.css +1 -1
- package/dist/esm/utils/request-idle-callback.js +6 -1
- package/dist/esm/utils/request-idle-callback.js.map +1 -1
- package/dist/esm/validations/rich-content.js +18 -1
- package/dist/esm/validations/rich-content.js.map +1 -1
- package/dist/types/auto-field-types/validations.d.ts +8 -0
- package/dist/types/auto-field-types/validations.d.ts.map +1 -1
- package/dist/types/components/audio/audio-field/form-audio-field.st.css.d.ts.map +1 -1
- package/dist/types/components/color-view/cell-color-view.d.ts.map +1 -1
- package/dist/types/components/color-view/color-view.d.ts.map +1 -1
- package/dist/types/components/document/form-document-field.st.css.d.ts.map +1 -1
- package/dist/types/components/image/thumbnail-replace-overlay.st.css.d.ts.map +1 -1
- package/dist/types/components/media-gallery/cell-media-gallery-view.d.ts.map +1 -1
- package/dist/types/components/media-gallery/form-media-gallery-field.st.css.d.ts.map +1 -1
- package/dist/types/components/media-image/media-image.st.css.d.ts.map +1 -1
- package/dist/types/components/media-loader/media-loader.st.css.d.ts.map +1 -1
- package/dist/types/components/media-tag/web-media-tag/media-tag.st.css.d.ts.map +1 -1
- package/dist/types/components/reference/reference-avatar.d.ts.map +1 -1
- package/dist/types/components/rich-content/cdn/load-ricos.d.ts +11 -0
- package/dist/types/components/rich-content/cdn/load-ricos.d.ts.map +1 -0
- package/dist/types/components/rich-content/cdn/types.d.ts +20 -0
- package/dist/types/components/rich-content/cdn/types.d.ts.map +1 -0
- package/dist/types/components/rich-content/cell-rich-content-input.d.ts +1 -1
- package/dist/types/components/rich-content/cell-rich-content-input.d.ts.map +1 -1
- package/dist/types/components/rich-content/form-rich-content.d.ts +1 -1
- package/dist/types/components/rich-content/form-rich-content.d.ts.map +1 -1
- package/dist/types/components/rich-content/hooks/use-plain-text-rich-content.d.ts +1 -1
- package/dist/types/components/rich-content/hooks/use-plain-text-rich-content.d.ts.map +1 -1
- package/dist/types/components/rich-content/rich-content-input/default-value-input/rich-content-default-value-input.d.ts +1 -1
- package/dist/types/components/rich-content/rich-content-input/default-value-input/rich-content-default-value-input.d.ts.map +1 -1
- package/dist/types/components/rich-content/rich-content-input/default-value-read-only-input/rich-content-form-read-only-input.d.ts +1 -1
- package/dist/types/components/rich-content/rich-content-input/default-value-read-only-input/rich-content-form-read-only-input.d.ts.map +1 -1
- package/dist/types/components/rich-content/rich-content-input/form-input/rich-content-form-input.d.ts +1 -1
- package/dist/types/components/rich-content/rich-content-input/form-input/rich-content-form-input.d.ts.map +1 -1
- package/dist/types/components/rich-content/rich-content-input/form-input/rich-content-form-input.st.css.d.ts.map +1 -1
- package/dist/types/components/rich-content/rich-content-input/form-input/use-rich-content-form-input.d.ts +3 -3
- package/dist/types/components/rich-content/rich-content-input/form-input/use-rich-content-form-input.d.ts.map +1 -1
- package/dist/types/components/rich-content/rich-content-input/form-read-only-input/rich-content-form-read-only-input.d.ts +1 -1
- package/dist/types/components/rich-content/rich-content-input/form-read-only-input/rich-content-form-read-only-input.d.ts.map +1 -1
- package/dist/types/components/rich-content/rich-content-input/form-read-only-input/rich-content-form-read-only-input.st.css.d.ts.map +1 -1
- package/dist/types/components/rich-content/rich-content-input/hooks.d.ts +2 -2
- package/dist/types/components/rich-content/rich-content-input/hooks.d.ts.map +1 -1
- package/dist/types/components/rich-content/rich-content-input/rich-content-common/hooks.d.ts +11 -1
- package/dist/types/components/rich-content/rich-content-input/rich-content-common/hooks.d.ts.map +1 -1
- package/dist/types/components/rich-content/rich-content-input/rich-content-common/toggle-fullscreen-button/toggle-fullscreen-button.st.css.d.ts.map +1 -1
- package/dist/types/components/rich-content/rich-content-input/rich-content-common/types.d.ts +1 -1
- package/dist/types/components/rich-content/rich-content-input/rich-content-common/types.d.ts.map +1 -1
- package/dist/types/components/rich-content/rich-content-input/rich-content-editor/plugins.d.ts +7 -2
- package/dist/types/components/rich-content/rich-content-input/rich-content-editor/plugins.d.ts.map +1 -1
- package/dist/types/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.d.ts +2 -1
- package/dist/types/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.d.ts.map +1 -1
- package/dist/types/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.st.css.d.ts.map +1 -1
- package/dist/types/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.d.ts +1 -1
- package/dist/types/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.d.ts.map +1 -1
- package/dist/types/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.st.css.d.ts.map +1 -1
- package/dist/types/components/rich-content/rich-content-input/rich-content-viewer/plugins.d.ts +6 -15
- package/dist/types/components/rich-content/rich-content-input/rich-content-viewer/plugins.d.ts.map +1 -1
- package/dist/types/components/rich-content/rich-content-input/rich-content-viewer/rich-content-viewer.d.ts +2 -2
- package/dist/types/components/rich-content/rich-content-input/rich-content-viewer/rich-content-viewer.d.ts.map +1 -1
- package/dist/types/components/rich-content/rich-content-input/services/types.d.ts +1 -1
- package/dist/types/components/rich-content/rich-content-input/services/types.d.ts.map +1 -1
- package/dist/types/components/text/text-view.st.css.d.ts.map +1 -1
- package/dist/types/components/url/url-view.d.ts.map +1 -1
- package/dist/types/exports/ricos-statics-legacy.d.ts +6 -0
- package/dist/types/exports/ricos-statics-legacy.d.ts.map +1 -0
- package/dist/types/exports/ricos-statics.d.ts +10 -0
- package/dist/types/exports/ricos-statics.d.ts.map +1 -0
- package/dist/types/utils/request-idle-callback.d.ts.map +1 -1
- package/dist/types/validations/rich-content.d.ts +9 -1
- package/dist/types/validations/rich-content.d.ts.map +1 -1
- package/package.json +24 -7
- package/src/__tests__/components/rich-content/form-rich-content.spec.tsx +1 -1
- package/src/__tests__/components/rich-content/load-ricos.spec.ts +17 -0
- package/src/__tests__/components/rich-content-editor.spec.tsx +40 -32
- package/src/__tests__/utils/request-idle-callback.spec.ts +20 -0
- package/src/__tests__/validations/rich-content.spec.ts +1 -1
- package/src/auto-field-types/validations.ts +25 -13
- package/src/components/address/input/address-input.st.css.ts +2 -2
- package/src/components/audio/actions/actions-menu/actions-menu.st.css.ts +2 -2
- package/src/components/audio/audio-field/form-audio-field.st.css.ts +2 -2
- package/src/components/audio/audio-player/audio-player.st.css.ts +2 -2
- package/src/components/color-view/cell-color-view.st.css.ts +2 -2
- package/src/components/color-view/cell-color-view.tsx +4 -3
- package/src/components/color-view/color-view.st.css.ts +2 -2
- package/src/components/color-view/color-view.tsx +4 -2
- package/src/components/delete-dialog/delete-dialog.st.css.ts +2 -2
- package/src/components/document/form-document-field.st.css.ts +2 -2
- package/src/components/exclamation/exclamation.st.css.ts +2 -2
- package/src/components/highlighted-text/highlighted-text.st.css.ts +3 -3
- package/src/components/image/thumbnail-replace-overlay.st.css.ts +2 -2
- package/src/components/media-control/cell-media-edit-shell.st.css.ts +2 -2
- package/src/components/media-control/paste-url-button.st.css.ts +2 -2
- package/src/components/media-gallery/cell-media-gallery-view.tsx +5 -3
- package/src/components/media-gallery/form-media-gallery-field.st.css.ts +2 -2
- package/src/components/media-image/media-image.st.css.ts +3 -3
- package/src/components/media-image/overlays/overlay.st.css.ts +2 -2
- package/src/components/media-loader/media-loader.st.css.ts +2 -2
- package/src/components/media-tag/web-media-tag/media-tag.st.css.ts +2 -2
- package/src/components/multi-document/cell-multi-document-edit.st.css.ts +2 -2
- package/src/components/multi-document/cell-multi-document-view.tsx +1 -1
- package/src/components/multi-document/multi-document-input/form-multi-document.st.css.ts +2 -2
- package/src/components/reference/cell-multi-reference-input.st.css.ts +2 -2
- package/src/components/reference/cell-reference-input.st.css.ts +2 -2
- package/src/components/reference/reference-avatar.tsx +3 -1
- package/src/components/rich-content/cdn/load-ricos.ts +184 -0
- package/src/components/rich-content/cdn/types.ts +21 -0
- package/src/components/rich-content/cell-rich-content-input.tsx +2 -2
- package/src/components/rich-content/cell-rich-content-view.tsx +1 -1
- package/src/components/rich-content/editor.ts +1 -1
- package/src/components/rich-content/form-rich-content.tsx +2 -2
- package/src/components/rich-content/hooks/use-plain-text-rich-content.ts +4 -3
- package/src/components/rich-content/rich-content-input/default-value-input/rich-content-default-value-input.st.css.ts +2 -2
- package/src/components/rich-content/rich-content-input/default-value-input/rich-content-default-value-input.tsx +1 -1
- package/src/components/rich-content/rich-content-input/default-value-read-only-input/rich-content-form-read-only-input.tsx +1 -1
- package/src/components/rich-content/rich-content-input/form-input/rich-content-form-input.st.css.ts +2 -2
- package/src/components/rich-content/rich-content-input/form-input/rich-content-form-input.tsx +1 -1
- package/src/components/rich-content/rich-content-input/form-input/use-rich-content-form-input.ts +1 -1
- package/src/components/rich-content/rich-content-input/form-read-only-input/rich-content-form-read-only-input.st.css.ts +2 -2
- package/src/components/rich-content/rich-content-input/form-read-only-input/rich-content-form-read-only-input.tsx +1 -1
- package/src/components/rich-content/rich-content-input/hooks.ts +5 -8
- package/src/components/rich-content/rich-content-input/rich-content-common/fullscreen-modal/fullscreen-modal.st.css.ts +2 -2
- package/src/components/rich-content/rich-content-input/rich-content-common/hooks.ts +15 -3
- package/src/components/rich-content/rich-content-input/rich-content-common/publish-loader/publish-loader.st.css.ts +2 -2
- package/src/components/rich-content/rich-content-input/rich-content-common/toggle-fullscreen-button/toggle-fullscreen-button.st.css.ts +2 -2
- package/src/components/rich-content/rich-content-input/rich-content-common/types.ts +1 -1
- package/src/components/rich-content/rich-content-input/rich-content-editor/plugins.ts +59 -72
- package/src/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.st.css.ts +2 -2
- package/src/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.tsx +11 -7
- package/src/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.st.css.ts +2 -2
- package/src/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.tsx +4 -2
- package/src/components/rich-content/rich-content-input/rich-content-viewer/plugins.ts +33 -63
- package/src/components/rich-content/rich-content-input/rich-content-viewer/rich-content-viewer.st.css.ts +2 -2
- package/src/components/rich-content/rich-content-input/rich-content-viewer/rich-content-viewer.tsx +26 -10
- package/src/components/rich-content/rich-content-input/services/rich-content-document-http-service.ts +1 -1
- package/src/components/rich-content/rich-content-input/services/types.ts +1 -1
- package/src/components/rich-text/rich-text-input/rich-text-editor/rich-editor.st.css.ts +2 -2
- package/src/components/rich-text/rich-text-input/rich-text-editor/rich-text-editor.st.css.ts +2 -2
- package/src/components/rich-text/rich-text-input/rich-text-editor/toolbar/toolbar.st.css.ts +2 -2
- package/src/components/text/text-view.st.css.ts +2 -2
- package/src/components/url/url-view.tsx +3 -2
- package/src/exports/ricos-statics-legacy.ts +5 -0
- package/src/exports/ricos-statics.ts +9 -0
- package/src/styles.global.css +1 -1
- package/src/utils/request-idle-callback.ts +7 -1
- package/src/validations/rich-content.ts +20 -2
- package/utils/@wix/patterns-fields-ricos-statics/legacy/package.json +5 -0
- package/utils/@wix/patterns-fields-ricos-statics/package.json +5 -0
|
@@ -5,14 +5,14 @@ exports.vars = exports.style = exports.stVars = exports.st = exports.namespace =
|
|
|
5
5
|
var _stylableEsmRuntime = require("../../../../stylable-esm-runtime.js");
|
|
6
6
|
// @ts-nocheck
|
|
7
7
|
|
|
8
|
-
var _namespace_ = "
|
|
8
|
+
var _namespace_ = "richcontentformreadonlyinput636004872";
|
|
9
9
|
var _style_ = _stylableEsmRuntime.classesRuntime.bind(null, _namespace_);
|
|
10
10
|
var cssStates = exports.cssStates = _stylableEsmRuntime.statesRuntime.bind(null, _namespace_);
|
|
11
11
|
var style = exports.style = _style_;
|
|
12
12
|
var st = exports.st = _style_;
|
|
13
13
|
var namespace = exports.namespace = _namespace_;
|
|
14
14
|
var classes = exports.classes = {
|
|
15
|
-
"root": "
|
|
15
|
+
"root": "richcontentformreadonlyinput636004872__root"
|
|
16
16
|
};
|
|
17
17
|
var keyframes = exports.keyframes = {};
|
|
18
18
|
var layers = exports.layers = {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_stylableEsmRuntime","require","_namespace_","_style_","classesRuntime","bind","cssStates","exports","statesRuntime","style","st","namespace","classes","keyframes","layers","containers","stVars","vars"],"sources":["../../../../../../src/components/rich-content/rich-content-input/form-read-only-input/rich-content-form-read-only-input.st.css.ts"],"sourcesContent":["// @ts-nocheck\n\n\nimport { classesRuntime, statesRuntime } from \"../../../../stylable-esm-runtime.js\";\n\n\n\nvar _namespace_ = \"
|
|
1
|
+
{"version":3,"names":["_stylableEsmRuntime","require","_namespace_","_style_","classesRuntime","bind","cssStates","exports","statesRuntime","style","st","namespace","classes","keyframes","layers","containers","stVars","vars"],"sources":["../../../../../../src/components/rich-content/rich-content-input/form-read-only-input/rich-content-form-read-only-input.st.css.ts"],"sourcesContent":["// @ts-nocheck\n\n\nimport { classesRuntime, statesRuntime } from \"../../../../stylable-esm-runtime.js\";\n\n\n\nvar _namespace_ = \"richcontentformreadonlyinput636004872\";\nvar _style_ = classesRuntime.bind(null, _namespace_);\n\nexport var cssStates = statesRuntime.bind(null, _namespace_);\nexport var style: import(\"@stylable/runtime\").STFunction = _style_;\nexport var st: import(\"@stylable/runtime\").STFunction = _style_;\n\nexport var namespace = _namespace_;\nexport var classes = {\"root\":\"richcontentformreadonlyinput636004872__root\"};\nexport var keyframes = {}; \nexport var layers = {};\nexport var containers = {};\nexport var stVars = {}; \nexport var vars = {\"wds-color-black-600\":\"--wds-color-black-600\",\"wds-border-radius-300\":\"--wds-border-radius-300\",\"wds-color-blue-100\":\"--wds-color-blue-100\",\"wds-input-shadow-focus-standard\":\"--wds-input-shadow-focus-standard\",\"wds-color-blue-300\":\"--wds-color-blue-300\"}; \n\n\n\n\n"],"mappings":";;;;AAGA,IAAAA,mBAAA,GAAAC,OAAA;AAHA;;AAOA,IAAIC,WAAW,GAAG,uCAAuC;AACzD,IAAIC,OAAO,GAAGC,kCAAc,CAACC,IAAI,CAAC,IAAI,EAAEH,WAAW,CAAC;AAE7C,IAAII,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAGE,iCAAa,CAACH,IAAI,CAAC,IAAI,EAAEH,WAAW,CAAC;AACrD,IAAIO,KAA6C,GAAAF,OAAA,CAAAE,KAAA,GAAGN,OAAO;AAC3D,IAAIO,EAA0C,GAAAH,OAAA,CAAAG,EAAA,GAAGP,OAAO;AAExD,IAAIQ,SAAS,GAAAJ,OAAA,CAAAI,SAAA,GAAGT,WAAW;AAC3B,IAAIU,OAAO,GAAAL,OAAA,CAAAK,OAAA,GAAG;EAAC,MAAM,EAAC;AAA6C,CAAC;AACpE,IAAIC,SAAS,GAAAN,OAAA,CAAAM,SAAA,GAAG,CAAC,CAAC;AAClB,IAAIC,MAAM,GAAAP,OAAA,CAAAO,MAAA,GAAG,CAAC,CAAC;AACf,IAAIC,UAAU,GAAAR,OAAA,CAAAQ,UAAA,GAAG,CAAC,CAAC;AACnB,IAAIC,MAAM,GAAAT,OAAA,CAAAS,MAAA,GAAG,CAAC,CAAC;AACf,IAAIC,IAAI,GAAAV,OAAA,CAAAU,IAAA,GAAG;EAAC,qBAAqB,EAAC,uBAAuB;EAAC,uBAAuB,EAAC,yBAAyB;EAAC,oBAAoB,EAAC,sBAAsB;EAAC,iCAAiC,EAAC,mCAAmC;EAAC,oBAAoB,EAAC;AAAsB,CAAC","ignoreList":[]}
|
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.useRichContentAutofix = exports.useRCEPublishPromises = void 0;
|
|
5
5
|
var _react = require("react");
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var _wixDataSchemaTypes = require("@wix/patterns-fields-utils/@wix/wix-data-schema-types");
|
|
6
|
+
var _loadRicos = require("../cdn/load-ricos");
|
|
7
|
+
var _richContent = require("../../../validations/rich-content");
|
|
9
8
|
var _utils = require("../../../utils");
|
|
10
9
|
var _services = require("./services");
|
|
11
10
|
const useRCEPublishPromises = () => {
|
|
@@ -38,17 +37,17 @@ const useRichContentAutofix = ({
|
|
|
38
37
|
if (!data) {
|
|
39
38
|
return;
|
|
40
39
|
}
|
|
41
|
-
|
|
42
|
-
strict: true
|
|
43
|
-
});
|
|
44
|
-
if (isStrictValid) {
|
|
40
|
+
if (await (0, _richContent.isStrictValidAsync)(data)) {
|
|
45
41
|
return;
|
|
46
42
|
}
|
|
47
43
|
const fixedData = await richContentDocumentService.convertToRichContent(data);
|
|
48
44
|
if (!fixedData) {
|
|
49
45
|
return;
|
|
50
46
|
}
|
|
51
|
-
const
|
|
47
|
+
const {
|
|
48
|
+
toPlainText
|
|
49
|
+
} = await (0, _loadRicos.loadRicosFromCdn)();
|
|
50
|
+
const [plainText, fixedPlainText] = await Promise.all([toPlainText(data), toPlainText(fixedData)]);
|
|
52
51
|
if (plainText !== fixedPlainText) {
|
|
53
52
|
return;
|
|
54
53
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","
|
|
1
|
+
{"version":3,"names":["_react","require","_loadRicos","_richContent","_utils","_services","useRCEPublishPromises","rcePublishPromises","useRef","useMemo","push","promise","current","clean","getAll","allSettled","Promise","exports","useRichContentAutofix","data","onChange","richContentDocumentService","useRichContentDocumentService","useEffect","autofixRichContent","isStrictValidAsync","fixedData","convertToRichContent","toPlainText","loadRicosFromCdn","plainText","fixedPlainText","all","catch","noop"],"sources":["../../../../../src/components/rich-content/rich-content-input/hooks.ts"],"sourcesContent":["import { useEffect, useMemo, useRef } from 'react';\n\nimport type { RichContent } from '@wix/patterns-fields-utils/@wix/patterns-fields-bundled-ricos';\n\nimport { loadRicosFromCdn } from '../cdn/load-ricos';\nimport { isStrictValidAsync } from '../../../validations/rich-content';\nimport { noop } from '../../../utils';\n\nimport { useRichContentDocumentService } from './services';\nimport type { RichContentInputProps } from './rich-content-common';\n\ntype RCEPublishPromise = Promise<RichContent>;\n\nexport const useRCEPublishPromises = () => {\n const rcePublishPromises = useRef<RCEPublishPromise[]>([]);\n\n return useMemo(() => {\n const push = (promise: RCEPublishPromise) => {\n rcePublishPromises.current.push(promise);\n };\n\n const clean = () => {\n rcePublishPromises.current = [];\n };\n\n const getAll = () => rcePublishPromises.current;\n\n const allSettled = () => Promise.allSettled(getAll());\n\n return {\n push,\n clean,\n getAll,\n allSettled,\n };\n }, []);\n};\n\nexport const useRichContentAutofix = ({\n data,\n onChange,\n}: Pick<RichContentInputProps, 'data' | 'onChange'>) => {\n const richContentDocumentService = useRichContentDocumentService();\n\n useEffect(() => {\n const autofixRichContent = async () => {\n if (!data) {\n return;\n }\n\n if (await isStrictValidAsync(data)) {\n return;\n }\n\n const fixedData = await richContentDocumentService.convertToRichContent(\n data,\n );\n\n if (!fixedData) {\n return;\n }\n\n const { toPlainText } = await loadRicosFromCdn();\n const [plainText, fixedPlainText] = await Promise.all([\n toPlainText(data),\n toPlainText(fixedData),\n ]);\n\n if (plainText !== fixedPlainText) {\n return;\n }\n\n onChange(fixedData);\n };\n\n autofixRichContent().catch(noop);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n};\n"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAIA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAEA,IAAAI,SAAA,GAAAJ,OAAA;AAKO,MAAMK,qBAAqB,GAAGA,CAAA,KAAM;EACzC,MAAMC,kBAAkB,GAAG,IAAAC,aAAM,EAAsB,EAAE,CAAC;EAE1D,OAAO,IAAAC,cAAO,EAAC,MAAM;IACnB,MAAMC,IAAI,GAAIC,OAA0B,IAAK;MAC3CJ,kBAAkB,CAACK,OAAO,CAACF,IAAI,CAACC,OAAO,CAAC;IAC1C,CAAC;IAED,MAAME,KAAK,GAAGA,CAAA,KAAM;MAClBN,kBAAkB,CAACK,OAAO,GAAG,EAAE;IACjC,CAAC;IAED,MAAME,MAAM,GAAGA,CAAA,KAAMP,kBAAkB,CAACK,OAAO;IAE/C,MAAMG,UAAU,GAAGA,CAAA,KAAMC,OAAO,CAACD,UAAU,CAACD,MAAM,CAAC,CAAC,CAAC;IAErD,OAAO;MACLJ,IAAI;MACJG,KAAK;MACLC,MAAM;MACNC;IACF,CAAC;EACH,CAAC,EAAE,EAAE,CAAC;AACR,CAAC;AAACE,OAAA,CAAAX,qBAAA,GAAAA,qBAAA;AAEK,MAAMY,qBAAqB,GAAGA,CAAC;EACpCC,IAAI;EACJC;AACgD,CAAC,KAAK;EACtD,MAAMC,0BAA0B,GAAG,IAAAC,uCAA6B,EAAC,CAAC;EAElE,IAAAC,gBAAS,EAAC,MAAM;IACd,MAAMC,kBAAkB,GAAG,MAAAA,CAAA,KAAY;MACrC,IAAI,CAACL,IAAI,EAAE;QACT;MACF;MAEA,IAAI,MAAM,IAAAM,+BAAkB,EAACN,IAAI,CAAC,EAAE;QAClC;MACF;MAEA,MAAMO,SAAS,GAAG,MAAML,0BAA0B,CAACM,oBAAoB,CACrER,IACF,CAAC;MAED,IAAI,CAACO,SAAS,EAAE;QACd;MACF;MAEA,MAAM;QAAEE;MAAY,CAAC,GAAG,MAAM,IAAAC,2BAAgB,EAAC,CAAC;MAChD,MAAM,CAACC,SAAS,EAAEC,cAAc,CAAC,GAAG,MAAMf,OAAO,CAACgB,GAAG,CAAC,CACpDJ,WAAW,CAACT,IAAI,CAAC,EACjBS,WAAW,CAACF,SAAS,CAAC,CACvB,CAAC;MAEF,IAAII,SAAS,KAAKC,cAAc,EAAE;QAChC;MACF;MAEAX,QAAQ,CAACM,SAAS,CAAC;IACrB,CAAC;IAEDF,kBAAkB,CAAC,CAAC,CAACS,KAAK,CAACC,WAAI,CAAC;IAChC;EACF,CAAC,EAAE,EAAE,CAAC;AACR,CAAC;AAACjB,OAAA,CAAAC,qBAAA,GAAAA,qBAAA","ignoreList":[]}
|
|
@@ -5,15 +5,15 @@ exports.vars = exports.style = exports.stVars = exports.st = exports.namespace =
|
|
|
5
5
|
var _stylableEsmRuntime = require("../../../../../stylable-esm-runtime.js");
|
|
6
6
|
// @ts-nocheck
|
|
7
7
|
|
|
8
|
-
var _namespace_ = "
|
|
8
|
+
var _namespace_ = "fullscreenmodal4177253419";
|
|
9
9
|
var _style_ = _stylableEsmRuntime.classesRuntime.bind(null, _namespace_);
|
|
10
10
|
var cssStates = exports.cssStates = _stylableEsmRuntime.statesRuntime.bind(null, _namespace_);
|
|
11
11
|
var style = exports.style = _style_;
|
|
12
12
|
var st = exports.st = _style_;
|
|
13
13
|
var namespace = exports.namespace = _namespace_;
|
|
14
14
|
var classes = exports.classes = {
|
|
15
|
-
"root": "
|
|
16
|
-
"modalContent": "
|
|
15
|
+
"root": "fullscreenmodal4177253419__root",
|
|
16
|
+
"modalContent": "fullscreenmodal4177253419__modalContent"
|
|
17
17
|
};
|
|
18
18
|
var keyframes = exports.keyframes = {};
|
|
19
19
|
var layers = exports.layers = {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_stylableEsmRuntime","require","_namespace_","_style_","classesRuntime","bind","cssStates","exports","statesRuntime","style","st","namespace","classes","keyframes","layers","containers","stVars","vars"],"sources":["../../../../../../../src/components/rich-content/rich-content-input/rich-content-common/fullscreen-modal/fullscreen-modal.st.css.ts"],"sourcesContent":["// @ts-nocheck\n\n\nimport { classesRuntime, statesRuntime } from \"../../../../../stylable-esm-runtime.js\";\n\n\n\nvar _namespace_ = \"
|
|
1
|
+
{"version":3,"names":["_stylableEsmRuntime","require","_namespace_","_style_","classesRuntime","bind","cssStates","exports","statesRuntime","style","st","namespace","classes","keyframes","layers","containers","stVars","vars"],"sources":["../../../../../../../src/components/rich-content/rich-content-input/rich-content-common/fullscreen-modal/fullscreen-modal.st.css.ts"],"sourcesContent":["// @ts-nocheck\n\n\nimport { classesRuntime, statesRuntime } from \"../../../../../stylable-esm-runtime.js\";\n\n\n\nvar _namespace_ = \"fullscreenmodal4177253419\";\nvar _style_ = classesRuntime.bind(null, _namespace_);\n\nexport var cssStates = statesRuntime.bind(null, _namespace_);\nexport var style: import(\"@stylable/runtime\").STFunction = _style_;\nexport var st: import(\"@stylable/runtime\").STFunction = _style_;\n\nexport var namespace = _namespace_;\nexport var classes = {\"root\":\"fullscreenmodal4177253419__root\",\"modalContent\":\"fullscreenmodal4177253419__modalContent\"};\nexport var keyframes = {}; \nexport var layers = {};\nexport var containers = {};\nexport var stVars = {}; \nexport var vars = {\"wds-color-white\":\"--wds-color-white\",\"wsr-color-D80\":\"--wsr-color-D80\",\"wds-border-radius-300\":\"--wds-border-radius-300\",\"wsr-border-radius-06\":\"--wsr-border-radius-06\"}; \n\n\n\n\n"],"mappings":";;;;AAGA,IAAAA,mBAAA,GAAAC,OAAA;AAHA;;AAOA,IAAIC,WAAW,GAAG,2BAA2B;AAC7C,IAAIC,OAAO,GAAGC,kCAAc,CAACC,IAAI,CAAC,IAAI,EAAEH,WAAW,CAAC;AAE7C,IAAII,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAGE,iCAAa,CAACH,IAAI,CAAC,IAAI,EAAEH,WAAW,CAAC;AACrD,IAAIO,KAA6C,GAAAF,OAAA,CAAAE,KAAA,GAAGN,OAAO;AAC3D,IAAIO,EAA0C,GAAAH,OAAA,CAAAG,EAAA,GAAGP,OAAO;AAExD,IAAIQ,SAAS,GAAAJ,OAAA,CAAAI,SAAA,GAAGT,WAAW;AAC3B,IAAIU,OAAO,GAAAL,OAAA,CAAAK,OAAA,GAAG;EAAC,MAAM,EAAC,iCAAiC;EAAC,cAAc,EAAC;AAAyC,CAAC;AACjH,IAAIC,SAAS,GAAAN,OAAA,CAAAM,SAAA,GAAG,CAAC,CAAC;AAClB,IAAIC,MAAM,GAAAP,OAAA,CAAAO,MAAA,GAAG,CAAC,CAAC;AACf,IAAIC,UAAU,GAAAR,OAAA,CAAAQ,UAAA,GAAG,CAAC,CAAC;AACnB,IAAIC,MAAM,GAAAT,OAAA,CAAAS,MAAA,GAAG,CAAC,CAAC;AACf,IAAIC,IAAI,GAAAV,OAAA,CAAAU,IAAA,GAAG;EAAC,iBAAiB,EAAC,mBAAmB;EAAC,eAAe,EAAC,iBAAiB;EAAC,uBAAuB,EAAC,yBAAyB;EAAC,sBAAsB,EAAC;AAAwB,CAAC","ignoreList":[]}
|
|
@@ -5,11 +5,23 @@ exports.__esModule = true;
|
|
|
5
5
|
exports.useWixRicosProps = exports.useRicosBISettings = exports.useRichContentState = exports.INITIAL_INJECTED_RICH_CONTENT = void 0;
|
|
6
6
|
var _isEqual = _interopRequireDefault(require("lodash/isEqual"));
|
|
7
7
|
var _react = require("react");
|
|
8
|
-
var
|
|
8
|
+
var _patternsFieldsBundledRicos = require("@wix/patterns-fields-utils/@wix/patterns-fields-bundled-ricos");
|
|
9
9
|
var _react2 = require("@wix/bex-core/react");
|
|
10
10
|
var _consts = require("../consts");
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Sentinel for "nothing has been injected into the editor yet".
|
|
13
|
+
*
|
|
14
|
+
* A plain frozen literal rather than `fromPlainText('')`: every use is either an
|
|
15
|
+
* identity comparison against this exact object (`isEqual` in
|
|
16
|
+
* `rich-content-editor.tsx`, which the effect uses to skip injecting) or an empty
|
|
17
|
+
* fallback returned from an async publish that failed. It is never handed to
|
|
18
|
+
* ricos as content, so it does not need ricos to build it — and building it
|
|
19
|
+
* eagerly is what forced the content helpers into module scope.
|
|
20
|
+
*/
|
|
21
|
+
const INITIAL_INJECTED_RICH_CONTENT = exports.INITIAL_INJECTED_RICH_CONTENT = Object.freeze({
|
|
22
|
+
nodes: []
|
|
23
|
+
});
|
|
24
|
+
const ensureRichContent = content => content && (0, _patternsFieldsBundledRicos.ensureContentId)(content);
|
|
13
25
|
const useRichContentState = propsContent => {
|
|
14
26
|
const [content, setContent] = (0, _react.useState)(ensureRichContent(propsContent));
|
|
15
27
|
const [injectedContent, setInjectedContent] = (0, _react.useState)(INITIAL_INJECTED_RICH_CONTENT);
|
package/dist/cjs/components/rich-content/rich-content-input/rich-content-common/hooks.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_isEqual","_interopRequireDefault","require","_react","
|
|
1
|
+
{"version":3,"names":["_isEqual","_interopRequireDefault","require","_react","_patternsFieldsBundledRicos","_react2","_consts","INITIAL_INJECTED_RICH_CONTENT","exports","Object","freeze","nodes","ensureRichContent","content","ensureContentId","useRichContentState","propsContent","setContent","useState","injectedContent","setInjectedContent","prevContentRef","useRef","useEffect","isEqual","current","richContent","injectedRichContent","useWixRicosProps","patternsContainer","useWixPatternsContainer","locale","environment","language","CMS_RICOS_CONSUMER","CMS_RICOS_PLATFORM","useRicosBISettings","usage","itemId","useMemo","containerId","CMS_RICOS_APP_ID","consumer","platform","postId"],"sources":["../../../../../../src/components/rich-content/rich-content-input/rich-content-common/hooks.ts"],"sourcesContent":["import isEqual from 'lodash/isEqual';\nimport { useRef, useMemo, useState, useEffect } from 'react';\n\nimport type { BISettings, RicosDocument } from '@wix/patterns-fields-utils/@wix/patterns-fields-bundled-ricos';\nimport { ensureContentId } from '@wix/patterns-fields-utils/@wix/patterns-fields-bundled-ricos';\nimport { useWixPatternsContainer } from '@wix/bex-core/react';\n\nimport { CMS_RICOS_APP_ID } from '../consts';\n\n/**\n * Sentinel for \"nothing has been injected into the editor yet\".\n *\n * A plain frozen literal rather than `fromPlainText('')`: every use is either an\n * identity comparison against this exact object (`isEqual` in\n * `rich-content-editor.tsx`, which the effect uses to skip injecting) or an empty\n * fallback returned from an async publish that failed. It is never handed to\n * ricos as content, so it does not need ricos to build it — and building it\n * eagerly is what forced the content helpers into module scope.\n */\nexport const INITIAL_INJECTED_RICH_CONTENT = Object.freeze({\n nodes: [],\n}) as RicosDocument;\n\nconst ensureRichContent = (content?: RicosDocument) =>\n content && ensureContentId(content);\n\nexport const useRichContentState = (propsContent?: RicosDocument) => {\n const [content, setContent] = useState(ensureRichContent(propsContent));\n const [injectedContent, setInjectedContent] = useState(\n INITIAL_INJECTED_RICH_CONTENT,\n );\n\n const prevContentRef = useRef(propsContent);\n useEffect(() => {\n if (isEqual(propsContent, prevContentRef.current)) {\n return;\n }\n\n const richContent = ensureRichContent(propsContent);\n\n setContent(richContent);\n setInjectedContent((injectedRichContent) => {\n if (!richContent) {\n return INITIAL_INJECTED_RICH_CONTENT;\n }\n\n return !isEqual(richContent, injectedRichContent)\n ? richContent\n : injectedRichContent;\n });\n\n prevContentRef.current = propsContent;\n }, [propsContent]);\n\n return [content, setContent, injectedContent] as const;\n};\n\nexport const useWixRicosProps = () => {\n const patternsContainer = useWixPatternsContainer();\n // console.log('[Rich Content] environment:', patternsContainer.environment);\n const locale = patternsContainer.environment.language || 'en';\n\n return { locale };\n};\n\nconst CMS_RICOS_CONSUMER = 'wix-data-editor';\nconst CMS_RICOS_PLATFORM = 'BM';\n\nexport const useRicosBISettings = (usage?: string, itemId = '$new') =>\n useMemo<BISettings>(\n () => ({\n containerId: CMS_RICOS_APP_ID,\n consumer: CMS_RICOS_CONSUMER,\n platform: CMS_RICOS_PLATFORM,\n postId: itemId,\n usage,\n }),\n [usage, itemId],\n );\n"],"mappings":";;;;;AAAA,IAAAA,QAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAGA,IAAAE,2BAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAEA,IAAAI,OAAA,GAAAJ,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMK,6BAA6B,GAAAC,OAAA,CAAAD,6BAAA,GAAGE,MAAM,CAACC,MAAM,CAAC;EACzDC,KAAK,EAAE;AACT,CAAC,CAAkB;AAEnB,MAAMC,iBAAiB,GAAIC,OAAuB,IAChDA,OAAO,IAAI,IAAAC,2CAAe,EAACD,OAAO,CAAC;AAE9B,MAAME,mBAAmB,GAAIC,YAA4B,IAAK;EACnE,MAAM,CAACH,OAAO,EAAEI,UAAU,CAAC,GAAG,IAAAC,eAAQ,EAACN,iBAAiB,CAACI,YAAY,CAAC,CAAC;EACvE,MAAM,CAACG,eAAe,EAAEC,kBAAkB,CAAC,GAAG,IAAAF,eAAQ,EACpDX,6BACF,CAAC;EAED,MAAMc,cAAc,GAAG,IAAAC,aAAM,EAACN,YAAY,CAAC;EAC3C,IAAAO,gBAAS,EAAC,MAAM;IACd,IAAI,IAAAC,gBAAO,EAACR,YAAY,EAAEK,cAAc,CAACI,OAAO,CAAC,EAAE;MACjD;IACF;IAEA,MAAMC,WAAW,GAAGd,iBAAiB,CAACI,YAAY,CAAC;IAEnDC,UAAU,CAACS,WAAW,CAAC;IACvBN,kBAAkB,CAAEO,mBAAmB,IAAK;MAC1C,IAAI,CAACD,WAAW,EAAE;QAChB,OAAOnB,6BAA6B;MACtC;MAEA,OAAO,CAAC,IAAAiB,gBAAO,EAACE,WAAW,EAAEC,mBAAmB,CAAC,GAC7CD,WAAW,GACXC,mBAAmB;IACzB,CAAC,CAAC;IAEFN,cAAc,CAACI,OAAO,GAAGT,YAAY;EACvC,CAAC,EAAE,CAACA,YAAY,CAAC,CAAC;EAElB,OAAO,CAACH,OAAO,EAAEI,UAAU,EAAEE,eAAe,CAAC;AAC/C,CAAC;AAACX,OAAA,CAAAO,mBAAA,GAAAA,mBAAA;AAEK,MAAMa,gBAAgB,GAAGA,CAAA,KAAM;EACpC,MAAMC,iBAAiB,GAAG,IAAAC,+BAAuB,EAAC,CAAC;EACnD;EACA,MAAMC,MAAM,GAAGF,iBAAiB,CAACG,WAAW,CAACC,QAAQ,IAAI,IAAI;EAE7D,OAAO;IAAEF;EAAO,CAAC;AACnB,CAAC;AAACvB,OAAA,CAAAoB,gBAAA,GAAAA,gBAAA;AAEF,MAAMM,kBAAkB,GAAG,iBAAiB;AAC5C,MAAMC,kBAAkB,GAAG,IAAI;AAExB,MAAMC,kBAAkB,GAAGA,CAACC,KAAc,EAAEC,MAAM,GAAG,MAAM,KAChE,IAAAC,cAAO,EACL,OAAO;EACLC,WAAW,EAAEC,wBAAgB;EAC7BC,QAAQ,EAAER,kBAAkB;EAC5BS,QAAQ,EAAER,kBAAkB;EAC5BS,MAAM,EAAEN,MAAM;EACdD;AACF,CAAC,CAAC,EACF,CAACA,KAAK,EAAEC,MAAM,CAChB,CAAC;AAAC9B,OAAA,CAAA4B,kBAAA,GAAAA,kBAAA","ignoreList":[]}
|
|
@@ -5,15 +5,15 @@ exports.vars = exports.style = exports.stVars = exports.st = exports.namespace =
|
|
|
5
5
|
var _stylableEsmRuntime = require("../../../../../stylable-esm-runtime.js");
|
|
6
6
|
// @ts-nocheck
|
|
7
7
|
|
|
8
|
-
var _namespace_ = "
|
|
8
|
+
var _namespace_ = "publishloader2154525844";
|
|
9
9
|
var _style_ = _stylableEsmRuntime.classesRuntime.bind(null, _namespace_);
|
|
10
10
|
var cssStates = exports.cssStates = _stylableEsmRuntime.statesRuntime.bind(null, _namespace_);
|
|
11
11
|
var style = exports.style = _style_;
|
|
12
12
|
var st = exports.st = _style_;
|
|
13
13
|
var namespace = exports.namespace = _namespace_;
|
|
14
14
|
var classes = exports.classes = {
|
|
15
|
-
"root": "
|
|
16
|
-
"publishLoader": "
|
|
15
|
+
"root": "publishloader2154525844__root",
|
|
16
|
+
"publishLoader": "publishloader2154525844__publishLoader"
|
|
17
17
|
};
|
|
18
18
|
var keyframes = exports.keyframes = {};
|
|
19
19
|
var layers = exports.layers = {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_stylableEsmRuntime","require","_namespace_","_style_","classesRuntime","bind","cssStates","exports","statesRuntime","style","st","namespace","classes","keyframes","layers","containers","stVars","vars"],"sources":["../../../../../../../src/components/rich-content/rich-content-input/rich-content-common/publish-loader/publish-loader.st.css.ts"],"sourcesContent":["// @ts-nocheck\n\n\nimport { classesRuntime, statesRuntime } from \"../../../../../stylable-esm-runtime.js\";\n\n\n\nvar _namespace_ = \"
|
|
1
|
+
{"version":3,"names":["_stylableEsmRuntime","require","_namespace_","_style_","classesRuntime","bind","cssStates","exports","statesRuntime","style","st","namespace","classes","keyframes","layers","containers","stVars","vars"],"sources":["../../../../../../../src/components/rich-content/rich-content-input/rich-content-common/publish-loader/publish-loader.st.css.ts"],"sourcesContent":["// @ts-nocheck\n\n\nimport { classesRuntime, statesRuntime } from \"../../../../../stylable-esm-runtime.js\";\n\n\n\nvar _namespace_ = \"publishloader2154525844\";\nvar _style_ = classesRuntime.bind(null, _namespace_);\n\nexport var cssStates = statesRuntime.bind(null, _namespace_);\nexport var style: import(\"@stylable/runtime\").STFunction = _style_;\nexport var st: import(\"@stylable/runtime\").STFunction = _style_;\n\nexport var namespace = _namespace_;\nexport var classes = {\"root\":\"publishloader2154525844__root\",\"publishLoader\":\"publishloader2154525844__publishLoader\"};\nexport var keyframes = {}; \nexport var layers = {};\nexport var containers = {};\nexport var stVars = {}; \nexport var vars = {\"wds-color-white\":\"--wds-color-white\"}; \n\n\n\n\n"],"mappings":";;;;AAGA,IAAAA,mBAAA,GAAAC,OAAA;AAHA;;AAOA,IAAIC,WAAW,GAAG,yBAAyB;AAC3C,IAAIC,OAAO,GAAGC,kCAAc,CAACC,IAAI,CAAC,IAAI,EAAEH,WAAW,CAAC;AAE7C,IAAII,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAGE,iCAAa,CAACH,IAAI,CAAC,IAAI,EAAEH,WAAW,CAAC;AACrD,IAAIO,KAA6C,GAAAF,OAAA,CAAAE,KAAA,GAAGN,OAAO;AAC3D,IAAIO,EAA0C,GAAAH,OAAA,CAAAG,EAAA,GAAGP,OAAO;AAExD,IAAIQ,SAAS,GAAAJ,OAAA,CAAAI,SAAA,GAAGT,WAAW;AAC3B,IAAIU,OAAO,GAAAL,OAAA,CAAAK,OAAA,GAAG;EAAC,MAAM,EAAC,+BAA+B;EAAC,eAAe,EAAC;AAAwC,CAAC;AAC/G,IAAIC,SAAS,GAAAN,OAAA,CAAAM,SAAA,GAAG,CAAC,CAAC;AAClB,IAAIC,MAAM,GAAAP,OAAA,CAAAO,MAAA,GAAG,CAAC,CAAC;AACf,IAAIC,UAAU,GAAAR,OAAA,CAAAQ,UAAA,GAAG,CAAC,CAAC;AACnB,IAAIC,MAAM,GAAAT,OAAA,CAAAS,MAAA,GAAG,CAAC,CAAC;AACf,IAAIC,IAAI,GAAAV,OAAA,CAAAU,IAAA,GAAG;EAAC,iBAAiB,EAAC;AAAmB,CAAC","ignoreList":[]}
|
|
@@ -5,14 +5,14 @@ exports.vars = exports.style = exports.stVars = exports.st = exports.namespace =
|
|
|
5
5
|
var _stylableEsmRuntime = require("../../../../../stylable-esm-runtime.js");
|
|
6
6
|
// @ts-nocheck
|
|
7
7
|
|
|
8
|
-
var _namespace_ = "
|
|
8
|
+
var _namespace_ = "togglefullscreenbutton3469017194";
|
|
9
9
|
var _style_ = _stylableEsmRuntime.classesRuntime.bind(null, _namespace_);
|
|
10
10
|
var cssStates = exports.cssStates = _stylableEsmRuntime.statesRuntime.bind(null, _namespace_);
|
|
11
11
|
var style = exports.style = _style_;
|
|
12
12
|
var st = exports.st = _style_;
|
|
13
13
|
var namespace = exports.namespace = _namespace_;
|
|
14
14
|
var classes = exports.classes = {
|
|
15
|
-
"root": "
|
|
15
|
+
"root": "togglefullscreenbutton3469017194__root"
|
|
16
16
|
};
|
|
17
17
|
var keyframes = exports.keyframes = {};
|
|
18
18
|
var layers = exports.layers = {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_stylableEsmRuntime","require","_namespace_","_style_","classesRuntime","bind","cssStates","exports","statesRuntime","style","st","namespace","classes","keyframes","layers","containers","stVars","vars"],"sources":["../../../../../../../src/components/rich-content/rich-content-input/rich-content-common/toggle-fullscreen-button/toggle-fullscreen-button.st.css.ts"],"sourcesContent":["// @ts-nocheck\n\n\nimport { classesRuntime, statesRuntime } from \"../../../../../stylable-esm-runtime.js\";\n\n\n\nvar _namespace_ = \"
|
|
1
|
+
{"version":3,"names":["_stylableEsmRuntime","require","_namespace_","_style_","classesRuntime","bind","cssStates","exports","statesRuntime","style","st","namespace","classes","keyframes","layers","containers","stVars","vars"],"sources":["../../../../../../../src/components/rich-content/rich-content-input/rich-content-common/toggle-fullscreen-button/toggle-fullscreen-button.st.css.ts"],"sourcesContent":["// @ts-nocheck\n\n\nimport { classesRuntime, statesRuntime } from \"../../../../../stylable-esm-runtime.js\";\n\n\n\nvar _namespace_ = \"togglefullscreenbutton3469017194\";\nvar _style_ = classesRuntime.bind(null, _namespace_);\n\nexport var cssStates = statesRuntime.bind(null, _namespace_);\nexport var style: import(\"@stylable/runtime\").STFunction = _style_;\nexport var st: import(\"@stylable/runtime\").STFunction = _style_;\n\nexport var namespace = _namespace_;\nexport var classes = {\"root\":\"togglefullscreenbutton3469017194__root\"};\nexport var keyframes = {}; \nexport var layers = {};\nexport var containers = {};\nexport var stVars = {}; \nexport var vars = {}; \n\n\n\n\n"],"mappings":";;;;AAGA,IAAAA,mBAAA,GAAAC,OAAA;AAHA;;AAOA,IAAIC,WAAW,GAAG,kCAAkC;AACpD,IAAIC,OAAO,GAAGC,kCAAc,CAACC,IAAI,CAAC,IAAI,EAAEH,WAAW,CAAC;AAE7C,IAAII,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAGE,iCAAa,CAACH,IAAI,CAAC,IAAI,EAAEH,WAAW,CAAC;AACrD,IAAIO,KAA6C,GAAAF,OAAA,CAAAE,KAAA,GAAGN,OAAO;AAC3D,IAAIO,EAA0C,GAAAH,OAAA,CAAAG,EAAA,GAAGP,OAAO;AAExD,IAAIQ,SAAS,GAAAJ,OAAA,CAAAI,SAAA,GAAGT,WAAW;AAC3B,IAAIU,OAAO,GAAAL,OAAA,CAAAK,OAAA,GAAG;EAAC,MAAM,EAAC;AAAwC,CAAC;AAC/D,IAAIC,SAAS,GAAAN,OAAA,CAAAM,SAAA,GAAG,CAAC,CAAC;AAClB,IAAIC,MAAM,GAAAP,OAAA,CAAAO,MAAA,GAAG,CAAC,CAAC;AACf,IAAIC,UAAU,GAAAR,OAAA,CAAAQ,UAAA,GAAG,CAAC,CAAC;AACnB,IAAIC,MAAM,GAAAT,OAAA,CAAAS,MAAA,GAAG,CAAC,CAAC;AACf,IAAIC,IAAI,GAAAV,OAAA,CAAAU,IAAA,GAAG,CAAC,CAAC","ignoreList":[]}
|
package/dist/cjs/components/rich-content/rich-content-input/rich-content-common/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["../../../../../../src/components/rich-content/rich-content-input/rich-content-common/types.ts"],"sourcesContent":["import type Experiments from '@wix/wix-experiments';\nimport type { RichContent, RicosTheme } from '@wix/ricos';\n\nimport type { ColorScheme } from '../../types';\n\nexport interface RichContentInputProps {\n theme: RicosTheme;\n colorScheme?: ColorScheme;\n experiments: Experiments;\n data?: RichContent;\n onChange: (data?: RichContent) => void;\n}\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../../../../src/components/rich-content/rich-content-input/rich-content-common/types.ts"],"sourcesContent":["import type Experiments from '@wix/wix-experiments';\nimport type { RichContent, RicosTheme } from '@wix/patterns-fields-utils/@wix/patterns-fields-bundled-ricos';\n\nimport type { ColorScheme } from '../../types';\n\nexport interface RichContentInputProps {\n theme: RicosTheme;\n colorScheme?: ColorScheme;\n experiments: Experiments;\n data?: RichContent;\n onChange: (data?: RichContent) => void;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -3,44 +3,51 @@
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.usePlugins = void 0;
|
|
5
5
|
var _react = require("react");
|
|
6
|
-
var _ricos = require("@wix/ricos");
|
|
7
6
|
var _utils = require("../../../../utils");
|
|
8
7
|
var _consts = require("../consts");
|
|
9
|
-
const {
|
|
10
|
-
Instagram,
|
|
11
|
-
Twitter,
|
|
12
|
-
TikTok
|
|
13
|
-
} = _ricos.LinkPreviewProviders;
|
|
14
|
-
const {
|
|
15
|
-
event,
|
|
16
|
-
booking,
|
|
17
|
-
product
|
|
18
|
-
} = _ricos.verticalEmbedProviders;
|
|
19
8
|
const layoutPlugin = {
|
|
20
9
|
type: 'LAYOUT',
|
|
21
10
|
showInQuickActions: true,
|
|
22
11
|
showInToolbars: true
|
|
23
12
|
};
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Plugin creators come from the CDN module, so this returns an empty list until
|
|
16
|
+
* it has loaded. The editor is not rendered before then, so nothing sees it.
|
|
17
|
+
*/
|
|
18
|
+
const usePlugins = (ricos, colorScheme) => {
|
|
19
|
+
return (0, _react.useMemo)(() => {
|
|
20
|
+
if (!ricos) {
|
|
21
|
+
return [];
|
|
22
|
+
}
|
|
23
|
+
const {
|
|
24
|
+
Instagram,
|
|
25
|
+
Twitter,
|
|
26
|
+
TikTok
|
|
27
|
+
} = ricos.LinkPreviewProviders;
|
|
28
|
+
const {
|
|
29
|
+
event,
|
|
30
|
+
booking,
|
|
31
|
+
product
|
|
32
|
+
} = ricos.verticalEmbedProviders;
|
|
33
|
+
return [ricos.pluginHeadings(), ricos.pluginTextColor({
|
|
34
|
+
inlinePopups: true,
|
|
35
|
+
colorScheme
|
|
36
|
+
}), ricos.pluginTextHighlight({
|
|
37
|
+
inlinePopups: true,
|
|
38
|
+
colorScheme
|
|
39
|
+
}), ricos.pluginLineSpacing({
|
|
40
|
+
inlinePopups: true
|
|
41
|
+
}), ricos.pluginIndent(), ricos.pluginLink(), ricos.pluginImage(), ricos.pluginVideo(), ricos.pluginGallery(), ricos.pluginDivider(), ricos.pluginTable({
|
|
42
|
+
toolbar: {}
|
|
43
|
+
}), ricos.pluginAi({
|
|
44
|
+
appDefId: _consts.CMS_RICOS_APP_ID
|
|
45
|
+
}), ricos.pluginFileUpload(), ricos.pluginHtml(), ricos.pluginLinkPreview({
|
|
46
|
+
exposeEmbedButtons: [Instagram, Twitter, TikTok]
|
|
47
|
+
}), ricos.pluginVerticalEmbed({
|
|
48
|
+
exposeEmbedButtons: [event, booking, product]
|
|
49
|
+
}), ricos.pluginCodeBlock(), ricos.pluginEmoji(), ricos.pluginSpoiler(), ricos.pluginGiphy(), ricos.pluginCollapsibleList(), ricos.pluginLinkButton(), layoutPlugin].filter(_utils.isTruthy);
|
|
50
|
+
}, [ricos, colorScheme]);
|
|
44
51
|
};
|
|
45
52
|
exports.usePlugins = usePlugins;
|
|
46
53
|
//# sourceMappingURL=plugins.js.map
|
package/dist/cjs/components/rich-content/rich-content-input/rich-content-editor/plugins.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","
|
|
1
|
+
{"version":3,"names":["_react","require","_utils","_consts","layoutPlugin","type","showInQuickActions","showInToolbars","usePlugins","ricos","colorScheme","useMemo","Instagram","Twitter","TikTok","LinkPreviewProviders","event","booking","product","verticalEmbedProviders","pluginHeadings","pluginTextColor","inlinePopups","pluginTextHighlight","pluginLineSpacing","pluginIndent","pluginLink","pluginImage","pluginVideo","pluginGallery","pluginDivider","pluginTable","toolbar","pluginAi","appDefId","CMS_RICOS_APP_ID","pluginFileUpload","pluginHtml","pluginLinkPreview","exposeEmbedButtons","pluginVerticalEmbed","pluginCodeBlock","pluginEmoji","pluginSpoiler","pluginGiphy","pluginCollapsibleList","pluginLinkButton","filter","isTruthy","exports"],"sources":["../../../../../../src/components/rich-content/rich-content-input/rich-content-editor/plugins.ts"],"sourcesContent":["import { useMemo } from 'react';\n\nimport type {\n EditorPlugin,\n EditorPluginOptions,\n} from '@wix/patterns-fields-utils/@wix/patterns-fields-ricos-statics';\n\nimport type { RicosCdnModule } from '../../cdn/types';\nimport { isTruthy } from '../../../../utils';\nimport type { ColorScheme } from '../../types';\nimport { CMS_RICOS_APP_ID } from '../consts';\n\nconst layoutPlugin: EditorPluginOptions = {\n type: 'LAYOUT',\n showInQuickActions: true,\n showInToolbars: true,\n};\n\n/**\n * Plugin creators come from the CDN module, so this returns an empty list until\n * it has loaded. The editor is not rendered before then, so nothing sees it.\n */\nexport const usePlugins = (\n ricos: RicosCdnModule | undefined,\n colorScheme?: ColorScheme,\n) => {\n return useMemo<(EditorPlugin | EditorPluginOptions)[]>(() => {\n if (!ricos) {\n return [];\n }\n\n const { Instagram, Twitter, TikTok } = ricos.LinkPreviewProviders;\n const { event, booking, product } = ricos.verticalEmbedProviders;\n\n return [\n ricos.pluginHeadings(),\n ricos.pluginTextColor({\n inlinePopups: true,\n colorScheme,\n }),\n ricos.pluginTextHighlight({\n inlinePopups: true,\n colorScheme,\n }),\n ricos.pluginLineSpacing({ inlinePopups: true }),\n ricos.pluginIndent(),\n ricos.pluginLink(),\n ricos.pluginImage(),\n ricos.pluginVideo(),\n ricos.pluginGallery(),\n ricos.pluginDivider(),\n ricos.pluginTable({ toolbar: {} }),\n ricos.pluginAi({\n appDefId: CMS_RICOS_APP_ID,\n }) as unknown as EditorPlugin,\n ricos.pluginFileUpload(),\n ricos.pluginHtml(),\n ricos.pluginLinkPreview({\n exposeEmbedButtons: [Instagram, Twitter, TikTok],\n }),\n ricos.pluginVerticalEmbed({\n exposeEmbedButtons: [event, booking, product],\n }),\n ricos.pluginCodeBlock(),\n ricos.pluginEmoji(),\n ricos.pluginSpoiler(),\n ricos.pluginGiphy(),\n ricos.pluginCollapsibleList(),\n ricos.pluginLinkButton(),\n layoutPlugin,\n ].filter(isTruthy);\n }, [ricos, colorScheme]);\n};\n"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAQA,IAAAC,MAAA,GAAAD,OAAA;AAEA,IAAAE,OAAA,GAAAF,OAAA;AAEA,MAAMG,YAAiC,GAAG;EACxCC,IAAI,EAAE,QAAQ;EACdC,kBAAkB,EAAE,IAAI;EACxBC,cAAc,EAAE;AAClB,CAAC;;AAED;AACA;AACA;AACA;AACO,MAAMC,UAAU,GAAGA,CACxBC,KAAiC,EACjCC,WAAyB,KACtB;EACH,OAAO,IAAAC,cAAO,EAAyC,MAAM;IAC3D,IAAI,CAACF,KAAK,EAAE;MACV,OAAO,EAAE;IACX;IAEA,MAAM;MAAEG,SAAS;MAAEC,OAAO;MAAEC;IAAO,CAAC,GAAGL,KAAK,CAACM,oBAAoB;IACjE,MAAM;MAAEC,KAAK;MAAEC,OAAO;MAAEC;IAAQ,CAAC,GAAGT,KAAK,CAACU,sBAAsB;IAEhE,OAAO,CACLV,KAAK,CAACW,cAAc,CAAC,CAAC,EACtBX,KAAK,CAACY,eAAe,CAAC;MACpBC,YAAY,EAAE,IAAI;MAClBZ;IACF,CAAC,CAAC,EACFD,KAAK,CAACc,mBAAmB,CAAC;MACxBD,YAAY,EAAE,IAAI;MAClBZ;IACF,CAAC,CAAC,EACFD,KAAK,CAACe,iBAAiB,CAAC;MAAEF,YAAY,EAAE;IAAK,CAAC,CAAC,EAC/Cb,KAAK,CAACgB,YAAY,CAAC,CAAC,EACpBhB,KAAK,CAACiB,UAAU,CAAC,CAAC,EAClBjB,KAAK,CAACkB,WAAW,CAAC,CAAC,EACnBlB,KAAK,CAACmB,WAAW,CAAC,CAAC,EACnBnB,KAAK,CAACoB,aAAa,CAAC,CAAC,EACrBpB,KAAK,CAACqB,aAAa,CAAC,CAAC,EACrBrB,KAAK,CAACsB,WAAW,CAAC;MAAEC,OAAO,EAAE,CAAC;IAAE,CAAC,CAAC,EAClCvB,KAAK,CAACwB,QAAQ,CAAC;MACbC,QAAQ,EAAEC;IACZ,CAAC,CAAC,EACF1B,KAAK,CAAC2B,gBAAgB,CAAC,CAAC,EACxB3B,KAAK,CAAC4B,UAAU,CAAC,CAAC,EAClB5B,KAAK,CAAC6B,iBAAiB,CAAC;MACtBC,kBAAkB,EAAE,CAAC3B,SAAS,EAAEC,OAAO,EAAEC,MAAM;IACjD,CAAC,CAAC,EACFL,KAAK,CAAC+B,mBAAmB,CAAC;MACxBD,kBAAkB,EAAE,CAACvB,KAAK,EAAEC,OAAO,EAAEC,OAAO;IAC9C,CAAC,CAAC,EACFT,KAAK,CAACgC,eAAe,CAAC,CAAC,EACvBhC,KAAK,CAACiC,WAAW,CAAC,CAAC,EACnBjC,KAAK,CAACkC,aAAa,CAAC,CAAC,EACrBlC,KAAK,CAACmC,WAAW,CAAC,CAAC,EACnBnC,KAAK,CAACoC,qBAAqB,CAAC,CAAC,EAC7BpC,KAAK,CAACqC,gBAAgB,CAAC,CAAC,EACxB1C,YAAY,CACb,CAAC2C,MAAM,CAACC,eAAQ,CAAC;EACpB,CAAC,EAAE,CAACvC,KAAK,EAAEC,WAAW,CAAC,CAAC;AAC1B,CAAC;AAACuC,OAAA,CAAAzC,UAAA,GAAAA,UAAA","ignoreList":[]}
|
|
@@ -9,7 +9,7 @@ var _cloneDeep = _interopRequireDefault(require("lodash/cloneDeep"));
|
|
|
9
9
|
var _defaultsDeep = _interopRequireDefault(require("lodash/defaultsDeep"));
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _designSystem = require("@wix/design-system");
|
|
12
|
-
var
|
|
12
|
+
var _loadRicos = require("../../cdn/load-ricos");
|
|
13
13
|
var _hooks = require("../../../../hooks");
|
|
14
14
|
var _utils = require("../../../../utils");
|
|
15
15
|
var _userSiteFonts = require("../../../user-site-fonts");
|
|
@@ -32,7 +32,7 @@ const InsertToolbarSync = ({
|
|
|
32
32
|
// Ricos 11's next-runtime proxy is supposed to convert the legacy
|
|
33
33
|
// `Record<string, ToolbarButtonProps>` into a v2 `ExternalToolbarButton[]`,
|
|
34
34
|
// but some consumer bundles end up calling through to the inner adapter
|
|
35
|
-
// (duplicate
|
|
35
|
+
// (duplicate ricos copies / unwrapped ref) and we receive the
|
|
36
36
|
// record shape. Normalize to an array so `.map` is safe, and treat the
|
|
37
37
|
// non-array (record) shape as ready — otherwise the absolute-positioned
|
|
38
38
|
// RCELoader overlay stays mounted and the editor row becomes unclickable.
|
|
@@ -48,7 +48,10 @@ const InsertToolbarSync = ({
|
|
|
48
48
|
return null;
|
|
49
49
|
};
|
|
50
50
|
InsertToolbarSync.displayName = 'InsertToolbarSync';
|
|
51
|
-
const filterStaticToolbarButtons = button =>
|
|
51
|
+
const filterStaticToolbarButtons = button =>
|
|
52
|
+
// Inlined rather than read off the CDN module's `FORMATTING_BUTTONS`: this is
|
|
53
|
+
// a plain string constant and the filter runs before the module has loaded.
|
|
54
|
+
button !== 'CODE_BLOCK';
|
|
52
55
|
const RCE = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
53
56
|
content,
|
|
54
57
|
injectedContent,
|
|
@@ -197,7 +200,9 @@ const RCE = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
|
197
200
|
}
|
|
198
201
|
}, [triggerBlur, requestEditorBlur]);
|
|
199
202
|
const wixRicosProps = (0, _richContentCommon.useWixRicosProps)();
|
|
200
|
-
const
|
|
203
|
+
const ricos = (0, _loadRicos.useRicosFromCdn)();
|
|
204
|
+
const plugins = (0, _plugins.usePlugins)(ricos, colorScheme);
|
|
205
|
+
const RicosEditor = ricos == null ? void 0 : ricos.RicosEditor;
|
|
201
206
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
202
207
|
ref: containerRef,
|
|
203
208
|
"data-hook": "rich-content.editor",
|
|
@@ -211,7 +216,7 @@ const RCE = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
|
211
216
|
__self: void 0,
|
|
212
217
|
__source: {
|
|
213
218
|
fileName: _jsxFileName,
|
|
214
|
-
lineNumber:
|
|
219
|
+
lineNumber: 308,
|
|
215
220
|
columnNumber: 7
|
|
216
221
|
}
|
|
217
222
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -219,7 +224,7 @@ const RCE = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
|
219
224
|
__self: void 0,
|
|
220
225
|
__source: {
|
|
221
226
|
fileName: _jsxFileName,
|
|
222
|
-
lineNumber:
|
|
227
|
+
lineNumber: 319,
|
|
223
228
|
columnNumber: 9
|
|
224
229
|
}
|
|
225
230
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -228,7 +233,7 @@ const RCE = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
|
228
233
|
__self: void 0,
|
|
229
234
|
__source: {
|
|
230
235
|
fileName: _jsxFileName,
|
|
231
|
-
lineNumber:
|
|
236
|
+
lineNumber: 320,
|
|
232
237
|
columnNumber: 11
|
|
233
238
|
}
|
|
234
239
|
}), !hidden && isToolbarReady && /*#__PURE__*/_react.default.createElement(_richContentCommon.ToggleFullscreenButton, {
|
|
@@ -237,7 +242,7 @@ const RCE = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
|
237
242
|
__self: void 0,
|
|
238
243
|
__source: {
|
|
239
244
|
fileName: _jsxFileName,
|
|
240
|
-
lineNumber:
|
|
245
|
+
lineNumber: 322,
|
|
241
246
|
columnNumber: 13
|
|
242
247
|
}
|
|
243
248
|
})), editor && /*#__PURE__*/_react.default.createElement(InsertToolbarSync, {
|
|
@@ -247,19 +252,19 @@ const RCE = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
|
247
252
|
__self: void 0,
|
|
248
253
|
__source: {
|
|
249
254
|
fileName: _jsxFileName,
|
|
250
|
-
lineNumber:
|
|
255
|
+
lineNumber: 330,
|
|
251
256
|
columnNumber: 11
|
|
252
257
|
}
|
|
253
|
-
}), !hidden ? /*#__PURE__*/_react.default.createElement("div", {
|
|
258
|
+
}), !hidden && RicosEditor ? /*#__PURE__*/_react.default.createElement("div", {
|
|
254
259
|
"data-hook": dataHook,
|
|
255
260
|
className: _richContentEditorStCss.classes.editor,
|
|
256
261
|
__self: void 0,
|
|
257
262
|
__source: {
|
|
258
263
|
fileName: _jsxFileName,
|
|
259
|
-
lineNumber:
|
|
264
|
+
lineNumber: 338,
|
|
260
265
|
columnNumber: 11
|
|
261
266
|
}
|
|
262
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
267
|
+
}, /*#__PURE__*/_react.default.createElement(RicosEditor, (0, _extends2.default)({
|
|
263
268
|
ref: setEditorInstance,
|
|
264
269
|
plugins: plugins,
|
|
265
270
|
initialContent: content,
|
|
@@ -272,14 +277,14 @@ const RCE = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
|
272
277
|
__self: void 0,
|
|
273
278
|
__source: {
|
|
274
279
|
fileName: _jsxFileName,
|
|
275
|
-
lineNumber:
|
|
280
|
+
lineNumber: 339,
|
|
276
281
|
columnNumber: 13
|
|
277
282
|
}
|
|
278
283
|
}))) : null, !isToolbarReady && /*#__PURE__*/_react.default.createElement(RCELoader, {
|
|
279
284
|
__self: void 0,
|
|
280
285
|
__source: {
|
|
281
286
|
fileName: _jsxFileName,
|
|
282
|
-
lineNumber:
|
|
287
|
+
lineNumber: 354,
|
|
283
288
|
columnNumber: 29
|
|
284
289
|
}
|
|
285
290
|
}), !hidden && isToolbarReady && /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -288,7 +293,7 @@ const RCE = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
|
288
293
|
__self: void 0,
|
|
289
294
|
__source: {
|
|
290
295
|
fileName: _jsxFileName,
|
|
291
|
-
lineNumber:
|
|
296
|
+
lineNumber: 356,
|
|
292
297
|
columnNumber: 11
|
|
293
298
|
}
|
|
294
299
|
}, /*#__PURE__*/_react.default.createElement(_richContentToolbar.ExternalToolbar, {
|
|
@@ -296,7 +301,7 @@ const RCE = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
|
296
301
|
__self: void 0,
|
|
297
302
|
__source: {
|
|
298
303
|
fileName: _jsxFileName,
|
|
299
|
-
lineNumber:
|
|
304
|
+
lineNumber: 360,
|
|
300
305
|
columnNumber: 13
|
|
301
306
|
}
|
|
302
307
|
})));
|
|
@@ -312,7 +317,7 @@ const RCELoader = () => /*#__PURE__*/_react.default.createElement(_designSystem.
|
|
|
312
317
|
__self: void 0,
|
|
313
318
|
__source: {
|
|
314
319
|
fileName: _jsxFileName,
|
|
315
|
-
lineNumber:
|
|
320
|
+
lineNumber: 370,
|
|
316
321
|
columnNumber: 3
|
|
317
322
|
}
|
|
318
323
|
}, /*#__PURE__*/_react.default.createElement(_designSystem.Loader, {
|
|
@@ -320,7 +325,7 @@ const RCELoader = () => /*#__PURE__*/_react.default.createElement(_designSystem.
|
|
|
320
325
|
__self: void 0,
|
|
321
326
|
__source: {
|
|
322
327
|
fileName: _jsxFileName,
|
|
323
|
-
lineNumber:
|
|
328
|
+
lineNumber: 378,
|
|
324
329
|
columnNumber: 5
|
|
325
330
|
}
|
|
326
331
|
}));
|
|
@@ -448,7 +453,7 @@ const RichContentEditor = ({
|
|
|
448
453
|
__self: void 0,
|
|
449
454
|
__source: {
|
|
450
455
|
fileName: _jsxFileName,
|
|
451
|
-
lineNumber:
|
|
456
|
+
lineNumber: 574,
|
|
452
457
|
columnNumber: 7
|
|
453
458
|
}
|
|
454
459
|
}), !fullScreenOnly && /*#__PURE__*/_react.default.createElement(RCE, (0, _extends2.default)({}, props, rceProps, {
|
|
@@ -463,7 +468,7 @@ const RichContentEditor = ({
|
|
|
463
468
|
__self: void 0,
|
|
464
469
|
__source: {
|
|
465
470
|
fileName: _jsxFileName,
|
|
466
|
-
lineNumber:
|
|
471
|
+
lineNumber: 576,
|
|
467
472
|
columnNumber: 9
|
|
468
473
|
}
|
|
469
474
|
})), /*#__PURE__*/_react.default.createElement(_richContentCommon.FullscreenModal, {
|
|
@@ -472,7 +477,7 @@ const RichContentEditor = ({
|
|
|
472
477
|
__self: void 0,
|
|
473
478
|
__source: {
|
|
474
479
|
fileName: _jsxFileName,
|
|
475
|
-
lineNumber:
|
|
480
|
+
lineNumber: 589,
|
|
476
481
|
columnNumber: 7
|
|
477
482
|
}
|
|
478
483
|
}, /*#__PURE__*/_react.default.createElement(RCE, (0, _extends2.default)({}, props, rceProps, {
|
|
@@ -486,7 +491,7 @@ const RichContentEditor = ({
|
|
|
486
491
|
__self: void 0,
|
|
487
492
|
__source: {
|
|
488
493
|
fileName: _jsxFileName,
|
|
489
|
-
lineNumber:
|
|
494
|
+
lineNumber: 590,
|
|
490
495
|
columnNumber: 9
|
|
491
496
|
}
|
|
492
497
|
}))));
|