@handlewithcare/react-prosemirror 2.8.0-tiptap.10 → 2.8.0-tiptap.11

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.
Files changed (60) hide show
  1. package/dist/cjs/tiptap/tiptapNodeView.js +26 -13
  2. package/dist/esm/tiptap/tiptapNodeView.js +27 -14
  3. package/dist/tsconfig.tsbuildinfo +1 -1
  4. package/dist/types/constants.d.ts +1 -1
  5. package/dist/types/props.d.ts +26 -26
  6. package/package.json +1 -1
  7. package/dist/esm/@jest/pattern/src/__tests__/TestPathPatterns.test.js +0 -241
  8. package/dist/esm/@swc/cli/lib/swc/__tests__/compile.test.js +0 -19
  9. package/dist/esm/@swc/cli/lib/swc/__tests__/options.test.js +0 -315
  10. package/dist/esm/@swc/cli/lib/swc/__tests__/sources.test.js +0 -161
  11. package/dist/esm/@uiw/react-codemirror/src/__tests__/index.test.js +0 -111
  12. package/dist/esm/cheerio/src/__tests__/deprecated.spec.js +0 -249
  13. package/dist/esm/cheerio/src/__tests__/xml.spec.js +0 -55
  14. package/dist/esm/components/__tests__/ProseMirror.composition.test.js +0 -395
  15. package/dist/esm/components/__tests__/ProseMirror.domchange.test.js +0 -266
  16. package/dist/esm/components/__tests__/ProseMirror.draw-decoration.test.js +0 -968
  17. package/dist/esm/components/__tests__/ProseMirror.draw.test.js +0 -335
  18. package/dist/esm/components/__tests__/ProseMirror.mobile.test.js +0 -54
  19. package/dist/esm/components/__tests__/ProseMirror.node-view.test.js +0 -553
  20. package/dist/esm/components/__tests__/ProseMirror.selection.test.js +0 -440
  21. package/dist/esm/components/__tests__/ProseMirror.test.js +0 -324
  22. package/dist/esm/contexts/__tests__/DeferredLayoutEffects.test.js +0 -98
  23. package/dist/esm/hooks/__tests__/useEditorEffect.test.js +0 -134
  24. package/dist/esm/jsx-ast-utils/__tests__/helper.js +0 -83
  25. package/dist/esm/jsx-ast-utils/__tests__/src/elementType-test.js +0 -76
  26. package/dist/esm/jsx-ast-utils/__tests__/src/eventHandlers-test.js +0 -98
  27. package/dist/esm/jsx-ast-utils/__tests__/src/getProp-parser-test.js +0 -188
  28. package/dist/esm/jsx-ast-utils/__tests__/src/getProp-test.js +0 -119
  29. package/dist/esm/jsx-ast-utils/__tests__/src/getPropLiteralValue-babelparser-test.js +0 -393
  30. package/dist/esm/jsx-ast-utils/__tests__/src/getPropLiteralValue-flowparser-test.js +0 -379
  31. package/dist/esm/jsx-ast-utils/__tests__/src/getPropValue-babelparser-test.js +0 -925
  32. package/dist/esm/jsx-ast-utils/__tests__/src/getPropValue-flowparser-test.js +0 -700
  33. package/dist/esm/jsx-ast-utils/__tests__/src/hasProp-test.js +0 -350
  34. package/dist/esm/jsx-ast-utils/__tests__/src/index-test.js +0 -24
  35. package/dist/esm/jsx-ast-utils/__tests__/src/propName-test.js +0 -37
  36. package/dist/esm/plugins/__tests__/reactKeys.test.js +0 -77
  37. package/dist/esm/tsconfig-paths/lib/__tests__/config-loader.test.d.js +0 -1
  38. package/dist/esm/tsconfig-paths/lib/__tests__/config-loader.test.js +0 -97
  39. package/dist/esm/tsconfig-paths/lib/__tests__/data/match-path-data.d.js +0 -1
  40. package/dist/esm/tsconfig-paths/lib/__tests__/data/match-path-data.js +0 -319
  41. package/dist/esm/tsconfig-paths/lib/__tests__/filesystem.test.d.js +0 -1
  42. package/dist/esm/tsconfig-paths/lib/__tests__/filesystem.test.js +0 -62
  43. package/dist/esm/tsconfig-paths/lib/__tests__/mapping-entry.test.d.js +0 -1
  44. package/dist/esm/tsconfig-paths/lib/__tests__/mapping-entry.test.js +0 -80
  45. package/dist/esm/tsconfig-paths/lib/__tests__/match-path-async.test.d.js +0 -1
  46. package/dist/esm/tsconfig-paths/lib/__tests__/match-path-async.test.js +0 -22
  47. package/dist/esm/tsconfig-paths/lib/__tests__/match-path-sync.test.d.js +0 -1
  48. package/dist/esm/tsconfig-paths/lib/__tests__/match-path-sync.test.js +0 -20
  49. package/dist/esm/tsconfig-paths/lib/__tests__/try-path.test.d.js +0 -1
  50. package/dist/esm/tsconfig-paths/lib/__tests__/try-path.test.js +0 -219
  51. package/dist/esm/tsconfig-paths/lib/__tests__/tsconfig-loader.test.d.js +0 -1
  52. package/dist/esm/tsconfig-paths/lib/__tests__/tsconfig-loader.test.js +0 -323
  53. package/dist/esm/tsconfig-paths/src/__tests__/config-loader.test.js +0 -89
  54. package/dist/esm/tsconfig-paths/src/__tests__/data/match-path-data.js +0 -314
  55. package/dist/esm/tsconfig-paths/src/__tests__/filesystem.test.js +0 -58
  56. package/dist/esm/tsconfig-paths/src/__tests__/mapping-entry.test.js +0 -76
  57. package/dist/esm/tsconfig-paths/src/__tests__/match-path-async.test.js +0 -12
  58. package/dist/esm/tsconfig-paths/src/__tests__/match-path-sync.test.js +0 -10
  59. package/dist/esm/tsconfig-paths/src/__tests__/try-path.test.js +0 -214
  60. package/dist/esm/tsconfig-paths/src/__tests__/tsconfig-loader.test.js +0 -296
@@ -1,296 +0,0 @@
1
- import { loadTsconfig, tsConfigLoader, walkForTsConfig } from "../tsconfig-loader";
2
- import { join } from "path";
3
- describe("tsconfig-loader", ()=>{
4
- it("should find tsconfig in cwd", ()=>{
5
- const result = tsConfigLoader({
6
- cwd: "/foo/bar",
7
- getEnv: (_)=>undefined,
8
- loadSync: (cwd)=>{
9
- return {
10
- tsConfigPath: `${cwd}/tsconfig.json`,
11
- baseUrl: "./",
12
- paths: {}
13
- };
14
- }
15
- });
16
- // assert.equal(result.tsConfigPath, "/foo/bar/tsconfig.json");
17
- expect(result.tsConfigPath).toBe("/foo/bar/tsconfig.json");
18
- });
19
- it("should return loaderResult.tsConfigPath as undefined when not found", ()=>{
20
- const result = tsConfigLoader({
21
- cwd: "/foo/bar",
22
- getEnv: (_)=>undefined,
23
- loadSync: (_)=>{
24
- return {
25
- tsConfigPath: undefined,
26
- baseUrl: "./",
27
- paths: {}
28
- };
29
- }
30
- });
31
- // assert.isUndefined(result.tsConfigPath);
32
- expect(result.tsConfigPath).toBeUndefined();
33
- });
34
- it("should use TS_NODE_PROJECT env if exists", ()=>{
35
- const result = tsConfigLoader({
36
- cwd: "/foo/bar",
37
- getEnv: (key)=>key === "TS_NODE_PROJECT" ? "/foo/baz" : undefined,
38
- loadSync: (cwd, fileName)=>{
39
- if (cwd === "/foo/bar" && fileName === "/foo/baz") {
40
- return {
41
- tsConfigPath: "/foo/baz/tsconfig.json",
42
- baseUrl: "./",
43
- paths: {}
44
- };
45
- }
46
- return {
47
- tsConfigPath: undefined,
48
- baseUrl: "./",
49
- paths: {}
50
- };
51
- }
52
- });
53
- // assert.equal(result.tsConfigPath, "/foo/baz/tsconfig.json");
54
- expect(result.tsConfigPath).toBe("/foo/baz/tsconfig.json");
55
- });
56
- it("should use TS_NODE_BASEURL env if exists", ()=>{
57
- const result = tsConfigLoader({
58
- cwd: "/foo/bar",
59
- getEnv: (key)=>key === "TS_NODE_BASEURL" ? "SOME_BASEURL" : undefined,
60
- loadSync: (_0, _1, baseUrl)=>{
61
- return {
62
- tsConfigPath: undefined,
63
- baseUrl,
64
- paths: {}
65
- };
66
- }
67
- });
68
- // assert.equal(result.baseUrl, "SOME_BASEURL");
69
- expect(result.baseUrl).toBe("SOME_BASEURL");
70
- });
71
- it("should not use TS_NODE_BASEURL env if it does not exist", ()=>{
72
- const result = tsConfigLoader({
73
- cwd: "/foo/bar",
74
- getEnv: (_)=>{
75
- return undefined;
76
- },
77
- loadSync: (_0, _1, baseUrl)=>{
78
- return {
79
- tsConfigPath: undefined,
80
- baseUrl,
81
- paths: {}
82
- };
83
- }
84
- });
85
- // assert.equal(result.baseUrl, undefined);
86
- expect(result.baseUrl).toBeUndefined();
87
- });
88
- });
89
- describe("walkForTsConfig", ()=>{
90
- it("should find tsconfig in starting directory", ()=>{
91
- const pathToTsconfig = join("/root", "dir1", "tsconfig.json");
92
- const res = walkForTsConfig(join("/root", "dir1"), (path)=>path === pathToTsconfig);
93
- // assert.equal(res, pathToTsconfig);
94
- expect(res).toBe(pathToTsconfig);
95
- });
96
- it("should find tsconfig in parent directory", ()=>{
97
- const pathToTsconfig = join("/root", "tsconfig.json");
98
- const res = walkForTsConfig(join("/root", "dir1"), (path)=>path === pathToTsconfig);
99
- // assert.equal(res, pathToTsconfig);
100
- expect(res).toBe(pathToTsconfig);
101
- });
102
- it("should return undefined when reaching the top", ()=>{
103
- const res = walkForTsConfig(join("/root", "dir1", "kalle"), ()=>false);
104
- // assert.equal(res, undefined);
105
- expect(res).toBeUndefined();
106
- });
107
- });
108
- describe("loadConfig", ()=>{
109
- it("It should load a config", ()=>{
110
- const config = {
111
- compilerOptions: {
112
- baseUrl: "hej"
113
- }
114
- };
115
- const res = loadTsconfig("/root/dir1/tsconfig.json", (path)=>path === "/root/dir1/tsconfig.json", (_)=>JSON.stringify(config));
116
- // assert.deepEqual(res, config);
117
- expect(res).toStrictEqual(config);
118
- });
119
- it("It should load a config with comments", ()=>{
120
- const config = {
121
- compilerOptions: {
122
- baseUrl: "hej"
123
- }
124
- };
125
- const res = loadTsconfig("/root/dir1/tsconfig.json", (path)=>path === "/root/dir1/tsconfig.json", (_)=>`{
126
- // my comment
127
- "compilerOptions": {
128
- "baseUrl": "hej"
129
- }
130
- }`);
131
- // assert.deepEqual(res, config);
132
- expect(res).toStrictEqual(config);
133
- });
134
- it("It should load a config with trailing commas", ()=>{
135
- const config = {
136
- compilerOptions: {
137
- baseUrl: "hej"
138
- }
139
- };
140
- const res = loadTsconfig("/root/dir1/tsconfig.json", (path)=>path === "/root/dir1/tsconfig.json", (_)=>`{
141
- "compilerOptions": {
142
- "baseUrl": "hej",
143
- },
144
- }`);
145
- // assert.deepEqual(res, config);
146
- expect(res).toStrictEqual(config);
147
- });
148
- it("It should load a config with extends and overwrite all options", ()=>{
149
- const firstConfig = {
150
- extends: "../base-config.json",
151
- compilerOptions: {
152
- baseUrl: "kalle",
153
- paths: {
154
- foo: [
155
- "bar2"
156
- ]
157
- }
158
- }
159
- };
160
- const firstConfigPath = join("/root", "dir1", "tsconfig.json");
161
- const baseConfig = {
162
- compilerOptions: {
163
- baseUrl: "olle",
164
- paths: {
165
- foo: [
166
- "bar1"
167
- ]
168
- },
169
- strict: true
170
- }
171
- };
172
- const baseConfigPath = join("/root", "base-config.json");
173
- const res = loadTsconfig(join("/root", "dir1", "tsconfig.json"), (path)=>path === firstConfigPath || path === baseConfigPath, (path)=>{
174
- if (path === firstConfigPath) {
175
- return JSON.stringify(firstConfig);
176
- }
177
- if (path === baseConfigPath) {
178
- return JSON.stringify(baseConfig);
179
- }
180
- return "";
181
- });
182
- // assert.deepEqual(res, {
183
- // extends: "../base-config.json",
184
- // compilerOptions: {
185
- // baseUrl: "kalle",
186
- // paths: { foo: ["bar2"] },
187
- // strict: true,
188
- // },
189
- // });
190
- expect(res).toEqual({
191
- extends: "../base-config.json",
192
- compilerOptions: {
193
- baseUrl: "kalle",
194
- paths: {
195
- foo: [
196
- "bar2"
197
- ]
198
- },
199
- strict: true
200
- }
201
- });
202
- });
203
- it("It should load a config with extends from node_modules and overwrite all options", ()=>{
204
- const firstConfig = {
205
- extends: "my-package/base-config.json",
206
- compilerOptions: {
207
- baseUrl: "kalle",
208
- paths: {
209
- foo: [
210
- "bar2"
211
- ]
212
- }
213
- }
214
- };
215
- const firstConfigPath = join("/root", "dir1", "tsconfig.json");
216
- const baseConfig = {
217
- compilerOptions: {
218
- baseUrl: "olle",
219
- paths: {
220
- foo: [
221
- "bar1"
222
- ]
223
- },
224
- strict: true
225
- }
226
- };
227
- const baseConfigPath = join("/root", "dir1", "node_modules", "my-package", "base-config.json");
228
- const res = loadTsconfig(join("/root", "dir1", "tsconfig.json"), (path)=>path === firstConfigPath || path === baseConfigPath, (path)=>{
229
- if (path === firstConfigPath) {
230
- return JSON.stringify(firstConfig);
231
- }
232
- if (path === baseConfigPath) {
233
- return JSON.stringify(baseConfig);
234
- }
235
- return "";
236
- });
237
- // assert.deepEqual(res, {
238
- // extends: "my-package/base-config.json",
239
- // compilerOptions: {
240
- // baseUrl: "kalle",
241
- // paths: { foo: ["bar2"] },
242
- // strict: true,
243
- // },
244
- // });
245
- expect(res).toEqual({
246
- extends: "my-package/base-config.json",
247
- compilerOptions: {
248
- baseUrl: "kalle",
249
- paths: {
250
- foo: [
251
- "bar2"
252
- ]
253
- },
254
- strict: true
255
- }
256
- });
257
- });
258
- it("Should use baseUrl relative to location of extended tsconfig", ()=>{
259
- const firstConfig = {
260
- compilerOptions: {
261
- baseUrl: "."
262
- }
263
- };
264
- const firstConfigPath = join("/root", "first-config.json");
265
- const secondConfig = {
266
- extends: "../first-config.json"
267
- };
268
- const secondConfigPath = join("/root", "dir1", "second-config.json");
269
- const thirdConfig = {
270
- extends: "../second-config.json"
271
- };
272
- const thirdConfigPath = join("/root", "dir1", "dir2", "third-config.json");
273
- const res = loadTsconfig(join("/root", "dir1", "dir2", "third-config.json"), (path)=>path === firstConfigPath || path === secondConfigPath || path === thirdConfigPath, (path)=>{
274
- if (path === firstConfigPath) {
275
- return JSON.stringify(firstConfig);
276
- }
277
- if (path === secondConfigPath) {
278
- return JSON.stringify(secondConfig);
279
- }
280
- if (path === thirdConfigPath) {
281
- return JSON.stringify(thirdConfig);
282
- }
283
- return "";
284
- });
285
- // assert.deepEqual(res, {
286
- // extends: "../second-config.json",
287
- // compilerOptions: { baseUrl: join("..", "..") },
288
- // });
289
- expect(res).toEqual({
290
- extends: "../second-config.json",
291
- compilerOptions: {
292
- baseUrl: join("..", "..")
293
- }
294
- });
295
- });
296
- });