@squiz/formatted-text-editor 2.7.0 → 2.7.1
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/CHANGELOG.md +6 -0
- package/demo/diff/index.scss +1 -1
- package/lib/index.css +1406 -322
- package/package.json +13 -12
- package/src/index.scss +1 -1
- package/src/utils/converters/remirrorNodeToSquizNode/remirrorNodeToSquizNode.ts +1 -5
- package/tests/mockResourceBrowser.tsx +1 -1
- package/tsconfig.json +2 -1
- package/vite.config.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@squiz/formatted-text-editor",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.1",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"types": "lib/index.d.ts",
|
|
6
6
|
"private": false,
|
|
@@ -34,47 +34,48 @@
|
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@squiz/dam-resource-browser-plugin": "^3.4.6",
|
|
37
|
-
"@squiz/dxp-ai-client-react": "^
|
|
37
|
+
"@squiz/dxp-ai-client-react": "^2.0.0",
|
|
38
38
|
"@squiz/matrix-resource-browser-plugin": "^3.3.8",
|
|
39
39
|
"@squiz/resource-browser": "^3.3.12",
|
|
40
|
-
"@squiz/sds": "
|
|
40
|
+
"@squiz/sds": "1.18.1",
|
|
41
41
|
"@testing-library/cypress": "^10.0.2",
|
|
42
42
|
"@testing-library/jest-dom": "5.16.5",
|
|
43
43
|
"@testing-library/react": "14.0.0",
|
|
44
44
|
"@testing-library/user-event": "14.6.1",
|
|
45
|
-
"@types/node": "
|
|
45
|
+
"@types/node": "^24.0.0",
|
|
46
46
|
"@types/react": "^18.2.45",
|
|
47
47
|
"@types/react-dom": "^18.2.18",
|
|
48
|
-
"@vitejs/plugin-react": "
|
|
49
|
-
"autoprefixer": "10.4.
|
|
48
|
+
"@vitejs/plugin-react": "6.0.2",
|
|
49
|
+
"autoprefixer": "10.4.27",
|
|
50
50
|
"cypress": "^13.17.0",
|
|
51
51
|
"deepmerge": "4.3.1",
|
|
52
|
-
"esbuild": "^0.
|
|
53
|
-
"esbuild-sass-plugin": "^
|
|
52
|
+
"esbuild": "^0.28.1",
|
|
53
|
+
"esbuild-sass-plugin": "^3.7.0",
|
|
54
54
|
"eslint-plugin-cypress": "2.12.1",
|
|
55
55
|
"eslint-plugin-jest": "^27.2.1",
|
|
56
56
|
"eslint-plugin-jsx-a11y": "6.7.1",
|
|
57
57
|
"eslint-plugin-react": "7.32.2",
|
|
58
58
|
"jest": "29.4.1",
|
|
59
59
|
"jest-remirror": "2.1.5",
|
|
60
|
-
"postcss": "^8.5.
|
|
60
|
+
"postcss": "^8.5.18",
|
|
61
61
|
"postcss-nested": "6.0.1",
|
|
62
62
|
"postcss-prefix-selector": "1.16.1",
|
|
63
63
|
"react": "18.2.0",
|
|
64
64
|
"react-diff-viewer-continued": "3.2.6",
|
|
65
65
|
"react-dom": "18.2.0",
|
|
66
66
|
"react-query": "^3.19.6",
|
|
67
|
+
"sass": "1.102.0",
|
|
67
68
|
"tailwindcss": "3.2.7",
|
|
68
69
|
"ts-jest": "29.0.5",
|
|
69
70
|
"typescript": "4.9.5",
|
|
70
|
-
"vite": "^
|
|
71
|
+
"vite": "^8.3.5"
|
|
71
72
|
},
|
|
72
73
|
"peerDependencies": {
|
|
73
74
|
"@squiz/dam-resource-browser-plugin": "^3.4.3",
|
|
74
|
-
"@squiz/dxp-ai-client-react": "^
|
|
75
|
+
"@squiz/dxp-ai-client-react": "^2.0.0",
|
|
75
76
|
"@squiz/matrix-resource-browser-plugin": "^3.3.8",
|
|
76
77
|
"@squiz/resource-browser": "^3.3.12",
|
|
77
|
-
"@squiz/sds": "
|
|
78
|
+
"@squiz/sds": "1.18.1",
|
|
78
79
|
"@types/react": "^16.14.0 || ^17 || ^18",
|
|
79
80
|
"@types/react-dom": "^16.9.0 || ^17 || ^18",
|
|
80
81
|
"lib0": "0.2.114",
|
package/src/index.scss
CHANGED
|
@@ -4,10 +4,6 @@ import { FORMATTED_TEXT_MODELS as FormattedTextModels } from '@squiz/dx-json-sch
|
|
|
4
4
|
import { undefinedIfEmpty } from '../../undefinedIfEmpty';
|
|
5
5
|
import { NodeName } from '../../../Extensions/Extensions';
|
|
6
6
|
|
|
7
|
-
type Fragment = ProsemirrorFragment & {
|
|
8
|
-
content?: Fragment[];
|
|
9
|
-
};
|
|
10
|
-
|
|
11
7
|
type FormattingOptions = FormattedTextModels.v1.FormattingOptions;
|
|
12
8
|
type FontOptions = FormattedTextModels.v1.FormattedNodeFontProperties;
|
|
13
9
|
type FormattedText = FormattedTextModels.v1.FormattedText;
|
|
@@ -102,7 +98,7 @@ const transformAttributes = (attributes: Attrs, nodeType?: string): Record<strin
|
|
|
102
98
|
return transformed;
|
|
103
99
|
};
|
|
104
100
|
|
|
105
|
-
const transformFragment = (fragment:
|
|
101
|
+
const transformFragment = (fragment: ProsemirrorFragment): FormattedText => {
|
|
106
102
|
const transformed: FormattedText = [];
|
|
107
103
|
|
|
108
104
|
fragment.forEach((child) => {
|
|
@@ -23,7 +23,7 @@ export const mockResourceBrowser = () => {
|
|
|
23
23
|
},
|
|
24
24
|
mockResourceBrowserImpl: (props: ResourceBrowserProps) => {
|
|
25
25
|
if (!shouldUseMockResourceBrowser) {
|
|
26
|
-
return actual.ResourceBrowser
|
|
26
|
+
return React.createElement(actual.ResourceBrowser, props);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
// This would be easier if this repo allowed 'var' statements given jest mocks don't function easily without them
|
package/tsconfig.json
CHANGED