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

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 (63) hide show
  1. package/dist/cjs/tiptap/TiptapEditorView.js +2 -1
  2. package/dist/cjs/tiptap/tiptapNodeView.js +26 -13
  3. package/dist/esm/tiptap/TiptapEditorView.js +2 -1
  4. package/dist/esm/tiptap/tiptapNodeView.js +27 -14
  5. package/dist/tsconfig.tsbuildinfo +1 -1
  6. package/dist/types/constants.d.ts +1 -1
  7. package/dist/types/props.d.ts +26 -26
  8. package/dist/types/tiptap/TiptapEditorView.d.ts +2 -1
  9. package/package.json +1 -1
  10. package/dist/esm/@jest/pattern/src/__tests__/TestPathPatterns.test.js +0 -241
  11. package/dist/esm/@swc/cli/lib/swc/__tests__/compile.test.js +0 -19
  12. package/dist/esm/@swc/cli/lib/swc/__tests__/options.test.js +0 -315
  13. package/dist/esm/@swc/cli/lib/swc/__tests__/sources.test.js +0 -161
  14. package/dist/esm/@uiw/react-codemirror/src/__tests__/index.test.js +0 -111
  15. package/dist/esm/cheerio/src/__tests__/deprecated.spec.js +0 -249
  16. package/dist/esm/cheerio/src/__tests__/xml.spec.js +0 -55
  17. package/dist/esm/components/__tests__/ProseMirror.composition.test.js +0 -395
  18. package/dist/esm/components/__tests__/ProseMirror.domchange.test.js +0 -266
  19. package/dist/esm/components/__tests__/ProseMirror.draw-decoration.test.js +0 -968
  20. package/dist/esm/components/__tests__/ProseMirror.draw.test.js +0 -335
  21. package/dist/esm/components/__tests__/ProseMirror.mobile.test.js +0 -54
  22. package/dist/esm/components/__tests__/ProseMirror.node-view.test.js +0 -553
  23. package/dist/esm/components/__tests__/ProseMirror.selection.test.js +0 -440
  24. package/dist/esm/components/__tests__/ProseMirror.test.js +0 -324
  25. package/dist/esm/contexts/__tests__/DeferredLayoutEffects.test.js +0 -98
  26. package/dist/esm/hooks/__tests__/useEditorEffect.test.js +0 -134
  27. package/dist/esm/jsx-ast-utils/__tests__/helper.js +0 -83
  28. package/dist/esm/jsx-ast-utils/__tests__/src/elementType-test.js +0 -76
  29. package/dist/esm/jsx-ast-utils/__tests__/src/eventHandlers-test.js +0 -98
  30. package/dist/esm/jsx-ast-utils/__tests__/src/getProp-parser-test.js +0 -188
  31. package/dist/esm/jsx-ast-utils/__tests__/src/getProp-test.js +0 -119
  32. package/dist/esm/jsx-ast-utils/__tests__/src/getPropLiteralValue-babelparser-test.js +0 -393
  33. package/dist/esm/jsx-ast-utils/__tests__/src/getPropLiteralValue-flowparser-test.js +0 -379
  34. package/dist/esm/jsx-ast-utils/__tests__/src/getPropValue-babelparser-test.js +0 -925
  35. package/dist/esm/jsx-ast-utils/__tests__/src/getPropValue-flowparser-test.js +0 -700
  36. package/dist/esm/jsx-ast-utils/__tests__/src/hasProp-test.js +0 -350
  37. package/dist/esm/jsx-ast-utils/__tests__/src/index-test.js +0 -24
  38. package/dist/esm/jsx-ast-utils/__tests__/src/propName-test.js +0 -37
  39. package/dist/esm/plugins/__tests__/reactKeys.test.js +0 -77
  40. package/dist/esm/tsconfig-paths/lib/__tests__/config-loader.test.d.js +0 -1
  41. package/dist/esm/tsconfig-paths/lib/__tests__/config-loader.test.js +0 -97
  42. package/dist/esm/tsconfig-paths/lib/__tests__/data/match-path-data.d.js +0 -1
  43. package/dist/esm/tsconfig-paths/lib/__tests__/data/match-path-data.js +0 -319
  44. package/dist/esm/tsconfig-paths/lib/__tests__/filesystem.test.d.js +0 -1
  45. package/dist/esm/tsconfig-paths/lib/__tests__/filesystem.test.js +0 -62
  46. package/dist/esm/tsconfig-paths/lib/__tests__/mapping-entry.test.d.js +0 -1
  47. package/dist/esm/tsconfig-paths/lib/__tests__/mapping-entry.test.js +0 -80
  48. package/dist/esm/tsconfig-paths/lib/__tests__/match-path-async.test.d.js +0 -1
  49. package/dist/esm/tsconfig-paths/lib/__tests__/match-path-async.test.js +0 -22
  50. package/dist/esm/tsconfig-paths/lib/__tests__/match-path-sync.test.d.js +0 -1
  51. package/dist/esm/tsconfig-paths/lib/__tests__/match-path-sync.test.js +0 -20
  52. package/dist/esm/tsconfig-paths/lib/__tests__/try-path.test.d.js +0 -1
  53. package/dist/esm/tsconfig-paths/lib/__tests__/try-path.test.js +0 -219
  54. package/dist/esm/tsconfig-paths/lib/__tests__/tsconfig-loader.test.d.js +0 -1
  55. package/dist/esm/tsconfig-paths/lib/__tests__/tsconfig-loader.test.js +0 -323
  56. package/dist/esm/tsconfig-paths/src/__tests__/config-loader.test.js +0 -89
  57. package/dist/esm/tsconfig-paths/src/__tests__/data/match-path-data.js +0 -314
  58. package/dist/esm/tsconfig-paths/src/__tests__/filesystem.test.js +0 -58
  59. package/dist/esm/tsconfig-paths/src/__tests__/mapping-entry.test.js +0 -76
  60. package/dist/esm/tsconfig-paths/src/__tests__/match-path-async.test.js +0 -12
  61. package/dist/esm/tsconfig-paths/src/__tests__/match-path-sync.test.js +0 -10
  62. package/dist/esm/tsconfig-paths/src/__tests__/try-path.test.js +0 -214
  63. package/dist/esm/tsconfig-paths/src/__tests__/tsconfig-loader.test.js +0 -296
@@ -1,319 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- exports.tests = void 0;
6
- var path_1 = require("path");
7
- var filesystem_1 = require("../../filesystem");
8
- var defaultExtensionsWhenRunningInTsNode = [
9
- ".js",
10
- ".json",
11
- ".node",
12
- ".ts",
13
- ".tsx"
14
- ];
15
- exports.tests = [
16
- {
17
- name: "should locate path that matches with star and exists",
18
- absoluteBaseUrl: "/root/",
19
- paths: {
20
- "lib/*": [
21
- "location/*"
22
- ]
23
- },
24
- existingFiles: [
25
- (0, path_1.join)("/root", "location", "mylib", "index.ts")
26
- ],
27
- requestedModule: "lib/mylib",
28
- expectedPath: (0, path_1.dirname)((0, path_1.join)("/root", "location", "mylib", "index.ts")),
29
- extensions: defaultExtensionsWhenRunningInTsNode
30
- },
31
- {
32
- name: "should resolve to correct path when many are specified",
33
- absoluteBaseUrl: "/root/",
34
- paths: {
35
- "lib/*": [
36
- "foo1/*",
37
- "foo2/*",
38
- "location/*",
39
- "foo3/*"
40
- ]
41
- },
42
- existingFiles: [
43
- (0, path_1.join)("/root", "location", "mylib", "index.ts")
44
- ],
45
- requestedModule: "lib/mylib",
46
- extensions: [
47
- ".ts"
48
- ],
49
- expectedPath: (0, path_1.dirname)((0, path_1.join)("/root", "location", "mylib", "index.ts"))
50
- },
51
- {
52
- name: "should locate path that matches with star and prioritize pattern with longest prefix",
53
- absoluteBaseUrl: "/root/",
54
- paths: {
55
- "*": [
56
- "location/*"
57
- ],
58
- "lib/*": [
59
- "location/*"
60
- ]
61
- },
62
- existingFiles: [
63
- (0, path_1.join)("/root", "location", "lib", "mylib", "index.ts"),
64
- (0, path_1.join)("/root", "location", "mylib", "index.ts")
65
- ],
66
- requestedModule: "lib/mylib",
67
- expectedPath: (0, path_1.dirname)((0, path_1.join)("/root", "location", "mylib", "index.ts")),
68
- extensions: defaultExtensionsWhenRunningInTsNode
69
- },
70
- {
71
- name: "should locate path that matches with star and exists with extension",
72
- absoluteBaseUrl: "/root/",
73
- paths: {
74
- "lib/*": [
75
- "location/*"
76
- ]
77
- },
78
- existingFiles: [
79
- (0, path_1.join)("/root", "location", "mylib.myext")
80
- ],
81
- requestedModule: "lib/mylib",
82
- extensions: [
83
- ".js",
84
- ".myext"
85
- ],
86
- expectedPath: (0, filesystem_1.removeExtension)((0, path_1.join)("/root", "location", "mylib.myext"))
87
- },
88
- {
89
- name: "should resolve request with extension specified",
90
- absoluteBaseUrl: "/root/",
91
- paths: {
92
- "lib/*": [
93
- "location/*"
94
- ]
95
- },
96
- existingFiles: [
97
- (0, path_1.join)("/root", "location", "test.jpg")
98
- ],
99
- requestedModule: "lib/test.jpg",
100
- expectedPath: (0, path_1.join)("/root", "location", "test.jpg"),
101
- extensions: defaultExtensionsWhenRunningInTsNode
102
- },
103
- {
104
- name: "should locate path that matches without star and exists",
105
- absoluteBaseUrl: "/root/",
106
- paths: {
107
- "lib/foo": [
108
- "location/foo"
109
- ]
110
- },
111
- existingFiles: [
112
- (0, path_1.join)("/root", "location", "foo.ts")
113
- ],
114
- requestedModule: "lib/foo",
115
- expectedPath: (0, filesystem_1.removeExtension)((0, path_1.join)("/root", "location", "foo.ts")),
116
- extensions: defaultExtensionsWhenRunningInTsNode
117
- },
118
- {
119
- name: "should resolve to parent folder when filename is in subfolder",
120
- absoluteBaseUrl: "/root/",
121
- paths: {
122
- "lib/*": [
123
- "location/*"
124
- ]
125
- },
126
- existingFiles: [
127
- (0, path_1.join)("/root", "location", "mylib", "index.ts")
128
- ],
129
- requestedModule: "lib/mylib",
130
- expectedPath: (0, path_1.dirname)((0, path_1.join)("/root", "location", "mylib", "index.ts")),
131
- extensions: defaultExtensionsWhenRunningInTsNode
132
- },
133
- {
134
- name: "should resolve from main field in package.json",
135
- absoluteBaseUrl: "/root/",
136
- paths: {
137
- "lib/*": [
138
- "location/*"
139
- ]
140
- },
141
- existingFiles: [
142
- (0, path_1.join)("/root", "location", "mylib", "kalle.ts")
143
- ],
144
- packageJson: {
145
- main: "./kalle.ts"
146
- },
147
- requestedModule: "lib/mylib",
148
- expectedPath: (0, path_1.join)("/root", "location", "mylib", "kalle.ts"),
149
- extensions: defaultExtensionsWhenRunningInTsNode
150
- },
151
- {
152
- name: "should resolve from main field in package.json (js)",
153
- absoluteBaseUrl: "/root",
154
- paths: {
155
- "lib/*": [
156
- "location/*"
157
- ]
158
- },
159
- existingFiles: [
160
- (0, path_1.join)("/root", "location", "mylib.js", "kalle.js")
161
- ],
162
- packageJson: {
163
- main: "./kalle.js"
164
- },
165
- requestedModule: "lib/mylib.js",
166
- extensions: [
167
- ".ts",
168
- ".js"
169
- ],
170
- expectedPath: (0, path_1.join)("/root", "location", "mylib.js", "kalle.js")
171
- },
172
- {
173
- name: "should resolve from list of fields by priority in package.json",
174
- absoluteBaseUrl: "/root/",
175
- paths: {
176
- "lib/*": [
177
- "location/*"
178
- ]
179
- },
180
- mainFields: [
181
- "missing",
182
- "browser",
183
- "main"
184
- ],
185
- packageJson: {
186
- main: "./main.js",
187
- browser: "./browser.js"
188
- },
189
- existingFiles: [
190
- (0, path_1.join)("/root", "location", "mylibjs", "main.js"),
191
- (0, path_1.join)("/root", "location", "mylibjs", "browser.js")
192
- ],
193
- extensions: [
194
- ".ts",
195
- ".js"
196
- ],
197
- requestedModule: "lib/mylibjs",
198
- expectedPath: (0, path_1.join)("/root", "location", "mylibjs", "browser.js")
199
- },
200
- {
201
- name: "should ignore field mappings to missing files in package.json",
202
- absoluteBaseUrl: "/root/",
203
- paths: {
204
- "lib/*": [
205
- "location/*"
206
- ]
207
- },
208
- mainFields: [
209
- "browser",
210
- "main"
211
- ],
212
- existingFiles: [
213
- (0, path_1.join)("/root", "location", "mylibjs", "kalle.js")
214
- ],
215
- requestedModule: "lib/mylibjs",
216
- packageJson: {
217
- main: "./kalle.js",
218
- browser: "./nope.js"
219
- },
220
- extensions: [
221
- ".ts",
222
- ".js"
223
- ],
224
- expectedPath: (0, path_1.join)("/root", "location", "mylibjs", "kalle.js")
225
- },
226
- {
227
- name: "should ignore advanced field mappings in package.json",
228
- absoluteBaseUrl: "/root/",
229
- paths: {
230
- "lib/*": [
231
- "location/*"
232
- ]
233
- },
234
- existingFiles: [
235
- (0, path_1.join)("/root", "location", "mylibjs", "kalle.js"),
236
- (0, path_1.join)("/root", "location", "mylibjs", "browser.js")
237
- ],
238
- requestedModule: "lib/mylibjs",
239
- packageJson: {
240
- main: "./kalle.js",
241
- browser: {
242
- mylibjs: "./browser.js",
243
- "./kalle.js": "./browser.js"
244
- }
245
- },
246
- extensions: [
247
- ".ts",
248
- ".js"
249
- ],
250
- expectedPath: (0, path_1.join)("/root", "location", "mylibjs", "kalle.js")
251
- },
252
- {
253
- name: "should resolve to with the help of baseUrl when not explicitly set",
254
- absoluteBaseUrl: "/root/",
255
- paths: {},
256
- existingFiles: [
257
- (0, path_1.join)("/root", "mylib", "index.ts")
258
- ],
259
- requestedModule: "mylib",
260
- expectedPath: (0, path_1.dirname)((0, path_1.join)("/root", "mylib", "index.ts")),
261
- extensions: defaultExtensionsWhenRunningInTsNode
262
- },
263
- {
264
- name: "should not resolve with the help of baseUrl when asked not to",
265
- absoluteBaseUrl: "/root/",
266
- paths: {},
267
- addMatchAll: false,
268
- existingFiles: [
269
- (0, path_1.join)("/root", "mylib", "index.ts")
270
- ],
271
- requestedModule: "mylib",
272
- expectedPath: undefined,
273
- extensions: defaultExtensionsWhenRunningInTsNode
274
- },
275
- {
276
- name: "should not locate path that does not match",
277
- absoluteBaseUrl: "/root/",
278
- paths: {
279
- "lib/*": [
280
- "location/*"
281
- ]
282
- },
283
- existingFiles: [
284
- (0, path_1.join)("root", "location", "mylib")
285
- ],
286
- requestedModule: "mylib",
287
- expectedPath: undefined,
288
- extensions: defaultExtensionsWhenRunningInTsNode
289
- },
290
- {
291
- name: "should not resolve typings file (index.d.ts)",
292
- absoluteBaseUrl: "/root/",
293
- paths: {
294
- "lib/*": [
295
- "location/*"
296
- ]
297
- },
298
- existingFiles: [
299
- (0, path_1.join)("/root", "location", "mylib", "index.d.ts")
300
- ],
301
- requestedModule: "lib/mylib",
302
- expectedPath: undefined,
303
- extensions: defaultExtensionsWhenRunningInTsNode
304
- },
305
- {
306
- name: "should resolve main file with cjs file extension",
307
- absoluteBaseUrl: "/root/",
308
- paths: {},
309
- existingFiles: [
310
- (0, path_1.join)("/root", "mylib", "index.cjs")
311
- ],
312
- packageJson: {
313
- main: "./index.cjs"
314
- },
315
- requestedModule: "mylib",
316
- expectedPath: (0, path_1.join)("/root", "mylib", "index.cjs"),
317
- extensions: defaultExtensionsWhenRunningInTsNode
318
- }
319
- ]; //# sourceMappingURL=match-path-data.js.map
@@ -1,62 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- var Filesystem = require("../filesystem");
6
- var path = require("path");
7
- describe("filesystem", function() {
8
- var fileThatExists = path.join(__dirname, "../../package.json");
9
- var fileThatNotExists = path.join(__dirname, "../../package2.json");
10
- it("should find file that exists, sync", function() {
11
- var result = Filesystem.fileExistsSync(fileThatExists);
12
- // assert.equal(result, true);
13
- expect(result).toBe(true);
14
- });
15
- it("should not find file that not exists, sync", function() {
16
- var result = Filesystem.fileExistsSync(fileThatNotExists);
17
- // assert.equal(result, false);
18
- expect(result).toBe(false);
19
- });
20
- it("should find file that exists, async", function(done) {
21
- Filesystem.fileExistsAsync(fileThatExists, function(_err, result) {
22
- try {
23
- // assert.equal(result, true);
24
- expect(result).toBe(true);
25
- done();
26
- } catch (error) {
27
- done(error);
28
- }
29
- });
30
- });
31
- it("should not find file that not exists, async", function(done) {
32
- Filesystem.fileExistsAsync(fileThatNotExists, function(_err, result) {
33
- try {
34
- // assert.equal(result, false);
35
- expect(result).toBe(false);
36
- done();
37
- } catch (error) {
38
- done(error);
39
- }
40
- });
41
- });
42
- it("should load json, sync", function() {
43
- var result = Filesystem.readJsonFromDiskSync(fileThatExists);
44
- // assert.isOk(result);
45
- expect(result);
46
- // assert.equal(result.main, "lib/index.js");
47
- expect(result.main).toBe("lib/index.js");
48
- });
49
- it("should load json, async", function(done) {
50
- Filesystem.readJsonFromDiskAsync(fileThatExists, function(_err, result) {
51
- try {
52
- // assert.isOk(result); // Asserts that object is truthy.
53
- expect(result).toBeTruthy();
54
- // assert.equal(result.main, "lib/index.js");
55
- expect(result.main).toBe("lib/index.js");
56
- done();
57
- } catch (error) {
58
- done(error);
59
- }
60
- });
61
- });
62
- }); //# sourceMappingURL=filesystem.test.js.map
@@ -1,80 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- var mapping_entry_1 = require("../mapping-entry");
6
- var path_1 = require("path");
7
- describe("mapping-entry", function() {
8
- it("should change to absolute paths and sort in longest prefix order", function() {
9
- var result = (0, mapping_entry_1.getAbsoluteMappingEntries)("/absolute/base/url", {
10
- "*": [
11
- "/foo1",
12
- "/foo2"
13
- ],
14
- "longest/pre/fix/*": [
15
- "/foo2/bar"
16
- ],
17
- "pre/fix/*": [
18
- "/foo3"
19
- ]
20
- }, true);
21
- // assert.deepEqual(result, [
22
- // {
23
- // pattern: "longest/pre/fix/*",
24
- // paths: [join("/absolute", "base", "url", "foo2", "bar")],
25
- // },
26
- // {
27
- // pattern: "pre/fix/*",
28
- // paths: [join("/absolute", "base", "url", "foo3")],
29
- // },
30
- // {
31
- // pattern: "*",
32
- // paths: [
33
- // join("/absolute", "base", "url", "foo1"),
34
- // join("/absolute", "base", "url", "foo2"),
35
- // ],
36
- // },
37
- // ]);
38
- expect(result).toEqual([
39
- {
40
- pattern: "longest/pre/fix/*",
41
- paths: [
42
- (0, path_1.join)("/absolute", "base", "url", "foo2", "bar")
43
- ]
44
- },
45
- {
46
- pattern: "pre/fix/*",
47
- paths: [
48
- (0, path_1.join)("/absolute", "base", "url", "foo3")
49
- ]
50
- },
51
- {
52
- pattern: "*",
53
- paths: [
54
- (0, path_1.join)("/absolute", "base", "url", "foo1"),
55
- (0, path_1.join)("/absolute", "base", "url", "foo2")
56
- ]
57
- }
58
- ]);
59
- });
60
- it("should should add a match-all pattern when requested", function() {
61
- var result = (0, mapping_entry_1.getAbsoluteMappingEntries)("/absolute/base/url", {}, true);
62
- // assert.deepEqual(result, [
63
- // {
64
- // pattern: "*",
65
- // paths: [join("/absolute", "base", "url", "*")],
66
- // },
67
- // ]);
68
- expect(result).toEqual([
69
- {
70
- pattern: "*",
71
- paths: [
72
- (0, path_1.join)("/absolute", "base", "url", "*")
73
- ]
74
- }
75
- ]);
76
- result = (0, mapping_entry_1.getAbsoluteMappingEntries)("/absolute/base/url", {}, false);
77
- // assert.deepEqual(result, []);
78
- expect(result).toEqual([]);
79
- });
80
- }); //# sourceMappingURL=mapping-entry.test.js.map
@@ -1,22 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- var match_path_async_1 = require("../match-path-async");
6
- var Tests = require("./data/match-path-data");
7
- describe("match-path-async", function() {
8
- Tests.tests.forEach(function(t) {
9
- return it(t.name, function(done) {
10
- var matchPath = (0, match_path_async_1.createMatchPathAsync)(t.absoluteBaseUrl, t.paths, t.mainFields, t.addMatchAll);
11
- matchPath(t.requestedModule, function(_path, callback) {
12
- return callback(undefined, t.packageJson);
13
- }, function(path, callback) {
14
- return callback(undefined, t.existingFiles.indexOf(path) !== -1);
15
- }, t.extensions, function(_err, result) {
16
- // assert.equal(result, t.expectedPath);
17
- expect(result).toBe(t.expectedPath);
18
- done();
19
- });
20
- });
21
- });
22
- }); //# sourceMappingURL=match-path-async.test.js.map
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- var match_path_sync_1 = require("../match-path-sync");
6
- var Tests = require("./data/match-path-data");
7
- describe("match-path-sync", function() {
8
- Tests.tests.forEach(function(t) {
9
- return it(t.name, function() {
10
- var matchPath = (0, match_path_sync_1.createMatchPath)(t.absoluteBaseUrl, t.paths, t.mainFields, t.addMatchAll);
11
- var result = matchPath(t.requestedModule, function(_) {
12
- return t.packageJson;
13
- }, function(name) {
14
- return t.existingFiles.indexOf(name) !== -1;
15
- }, t.extensions);
16
- // assert.equal(result, t.expectedPath);
17
- expect(result).toBe(t.expectedPath);
18
- });
19
- });
20
- }); //# sourceMappingURL=match-path-sync.test.js.map