@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squiz/formatted-text-editor",
3
- "version": "2.7.0",
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": "^1.0.0",
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": "^1.5.0",
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": "22.10.5",
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": "3.0.0",
49
- "autoprefixer": "10.4.21",
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.24.2",
53
- "esbuild-sass-plugin": "^2.8.0",
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.15",
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": "^4.5.3"
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": "^1.0.0",
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": "^1.5.0",
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
@@ -3,7 +3,7 @@
3
3
  @import 'tailwindcss/components';
4
4
  @import 'tailwindcss/utilities';
5
5
 
6
- @import '@squiz/sds/lib/package.css';
6
+ @import '@squiz/sds/dist/package.css';
7
7
  @import '@squiz/dxp-content-tools-modal/lib/package.css';
8
8
 
9
9
  /* So we can use icons inside of FTE content */
@@ -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: Fragment): FormattedText => {
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(props);
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
@@ -16,7 +16,8 @@
16
16
  "isolatedModules": true,
17
17
  "jsx": "react",
18
18
  "declaration": true,
19
- "outDir": "./lib"
19
+ "outDir": "./lib",
20
+ "types": ["react", "react-dom"]
20
21
  },
21
22
  "files": ["src/index.ts"]
22
23
  }
package/vite.config.ts CHANGED
@@ -7,7 +7,7 @@ import react from '@vitejs/plugin-react';
7
7
  export default defineConfig({
8
8
  root: 'demo',
9
9
  optimizeDeps: {
10
- include: [],
10
+ include: ['@squiz/sds', 'antd'],
11
11
  },
12
12
  build: {
13
13
  outDir: 'build/demo',