@contentful/field-editor-rich-text 6.4.4-canary.8 → 6.4.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.
|
@@ -81,7 +81,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
81
81
|
}
|
|
82
82
|
return newObj;
|
|
83
83
|
}
|
|
84
|
-
const ConnectedRichTextEditor = (props)
|
|
84
|
+
const ConnectedRichTextEditor = /*#__PURE__*/ _react.memo(function ConnectedRichTextEditor(props) {
|
|
85
85
|
const { sdk, onAction, restrictedMarks, withCharValidation } = props;
|
|
86
86
|
const id = (0, _ContentfulEditorProvider.getContentfulEditorId)(sdk);
|
|
87
87
|
const plugins = _react.useMemo(()=>(0, _plugins.getPlugins)(sdk, onAction ?? _noop.default, restrictedMarks, withCharValidation), [
|
|
@@ -130,7 +130,7 @@ const ConnectedRichTextEditor = (props)=>{
|
|
|
130
130
|
readOnly: props.isDisabled,
|
|
131
131
|
scrollSelectionIntoView: _editoroverrides.defaultScrollSelectionIntoView
|
|
132
132
|
}), props.withCharValidation && /*#__PURE__*/ _react.createElement(_CharConstraints.CharConstraints, null))))));
|
|
133
|
-
};
|
|
133
|
+
});
|
|
134
134
|
const RichTextEditor = (props)=>{
|
|
135
135
|
const { sdk, isInitiallyDisabled, onAction, restrictedMarks, onChange, isDisabled, queryClient, ...otherProps } = props;
|
|
136
136
|
const isEmptyValue = _react.useCallback((value)=>!value || (0, _fastdeepequal.default)(value, _richtexttypes.EMPTY_DOCUMENT), []);
|
|
@@ -17,7 +17,7 @@ import { SdkProvider } from './SdkProvider';
|
|
|
17
17
|
import { SyncEditorChanges } from './SyncEditorChanges';
|
|
18
18
|
import Toolbar from './Toolbar';
|
|
19
19
|
import StickyToolbarWrapper from './Toolbar/components/StickyToolbarWrapper';
|
|
20
|
-
export const ConnectedRichTextEditor = (props)
|
|
20
|
+
export const ConnectedRichTextEditor = /*#__PURE__*/ React.memo(function ConnectedRichTextEditor(props) {
|
|
21
21
|
const { sdk, onAction, restrictedMarks, withCharValidation } = props;
|
|
22
22
|
const id = getContentfulEditorId(sdk);
|
|
23
23
|
const plugins = React.useMemo(()=>getPlugins(sdk, onAction ?? noop, restrictedMarks, withCharValidation), [
|
|
@@ -66,7 +66,7 @@ export const ConnectedRichTextEditor = (props)=>{
|
|
|
66
66
|
readOnly: props.isDisabled,
|
|
67
67
|
scrollSelectionIntoView: defaultScrollSelectionIntoView
|
|
68
68
|
}), props.withCharValidation && /*#__PURE__*/ React.createElement(CharConstraints, null))))));
|
|
69
|
-
};
|
|
69
|
+
});
|
|
70
70
|
const RichTextEditor = (props)=>{
|
|
71
71
|
const { sdk, isInitiallyDisabled, onAction, restrictedMarks, onChange, isDisabled, queryClient, ...otherProps } = props;
|
|
72
72
|
const isEmptyValue = React.useCallback((value)=>!value || deepEquals(value, Contentful.EMPTY_DOCUMENT), []);
|
|
@@ -36,6 +36,6 @@ type ConnectedRichTextProps = {
|
|
|
36
36
|
withCharValidation?: boolean;
|
|
37
37
|
queryClient?: QueryClient;
|
|
38
38
|
};
|
|
39
|
-
export declare const ConnectedRichTextEditor:
|
|
39
|
+
export declare const ConnectedRichTextEditor: React.NamedExoticComponent<ConnectedRichTextProps>;
|
|
40
40
|
declare const RichTextEditor: (props: RichTextProps) => React.JSX.Element;
|
|
41
41
|
export default RichTextEditor;
|
|
@@ -8,5 +8,5 @@ type LinkPopoverProps = {
|
|
|
8
8
|
handleCopyLink?: () => void;
|
|
9
9
|
isEditorFocused: boolean;
|
|
10
10
|
};
|
|
11
|
-
export declare const LinkPopover: ({ isLinkFocused, popoverText, handleEditLink, handleRemoveLink, children, handleCopyLink, isEditorFocused }: LinkPopoverProps) => React.JSX.Element;
|
|
11
|
+
export declare const LinkPopover: ({ isLinkFocused, popoverText, handleEditLink, handleRemoveLink, children, handleCopyLink, isEditorFocused, }: LinkPopoverProps) => React.JSX.Element;
|
|
12
12
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/field-editor-rich-text",
|
|
3
|
-
"version": "6.4.4
|
|
3
|
+
"version": "6.4.4",
|
|
4
4
|
"source": "./src/index.tsx",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -35,8 +35,7 @@
|
|
|
35
35
|
"test": "vitest",
|
|
36
36
|
"test:ci": "vitest run",
|
|
37
37
|
"tsc": "tsc -p ./ --noEmit",
|
|
38
|
-
"lint": "eslint src"
|
|
39
|
-
"lint-staged": "lint-staged"
|
|
38
|
+
"lint": "eslint ./src --ext .js,.jsx,.ts,.tsx"
|
|
40
39
|
},
|
|
41
40
|
"dependencies": {
|
|
42
41
|
"@contentful/app-sdk": "^4.42.0",
|
|
@@ -46,8 +45,8 @@
|
|
|
46
45
|
"@contentful/f36-icons": "^6.7.1",
|
|
47
46
|
"@contentful/f36-tokens": "^6.1.2",
|
|
48
47
|
"@contentful/f36-utils": "^6.1.0",
|
|
49
|
-
"@contentful/field-editor-reference": "^8.4.
|
|
50
|
-
"@contentful/field-editor-shared": "^4.5.
|
|
48
|
+
"@contentful/field-editor-reference": "^8.4.2",
|
|
49
|
+
"@contentful/field-editor-shared": "^4.5.2",
|
|
51
50
|
"@contentful/rich-text-plain-text-renderer": "^17.0.0",
|
|
52
51
|
"@contentful/rich-text-types": "^17.2.5",
|
|
53
52
|
"@emotion/css": "^11.13.5",
|
|
@@ -95,11 +94,5 @@
|
|
|
95
94
|
"publishConfig": {
|
|
96
95
|
"registry": "https://npm.pkg.github.com/"
|
|
97
96
|
},
|
|
98
|
-
"
|
|
99
|
-
"*.{js,jsx,ts,tsx}": [
|
|
100
|
-
"eslint --fix --prune-suppressions",
|
|
101
|
-
"prettier --write"
|
|
102
|
-
]
|
|
103
|
-
},
|
|
104
|
-
"gitHead": "572a3f3305f0b53a3736164dd80079c3c6a8c91e"
|
|
97
|
+
"gitHead": "515df2cbdfa9ce00c1d1843c757d50bef08f5446"
|
|
105
98
|
}
|