@pie-lib/editable-html 11.1.1 → 11.2.1-beta.0

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 (166) hide show
  1. package/CHANGELOG.md +43 -167
  2. package/NEXT.CHANGELOG.json +1 -0
  3. package/package.json +10 -6
  4. package/src/__tests__/editor.test.jsx +363 -0
  5. package/src/__tests__/serialization.test.js +291 -0
  6. package/src/__tests__/utils.js +36 -0
  7. package/src/block-tags.js +17 -0
  8. package/src/constants.js +7 -0
  9. package/src/editor.jsx +303 -49
  10. package/src/index.jsx +19 -10
  11. package/src/plugins/characters/index.jsx +11 -3
  12. package/src/plugins/characters/utils.js +12 -12
  13. package/src/plugins/css/icons/index.jsx +17 -0
  14. package/src/plugins/css/index.jsx +346 -0
  15. package/src/plugins/customPlugin/index.jsx +85 -0
  16. package/src/plugins/html/index.jsx +9 -6
  17. package/src/plugins/image/__tests__/__snapshots__/component.test.jsx.snap +51 -0
  18. package/src/plugins/image/__tests__/__snapshots__/image-toolbar-logic.test.jsx.snap +27 -0
  19. package/src/plugins/image/__tests__/__snapshots__/image-toolbar.test.jsx.snap +44 -0
  20. package/src/plugins/image/__tests__/component.test.jsx +41 -0
  21. package/src/plugins/image/__tests__/image-toolbar-logic.test.jsx +42 -0
  22. package/src/plugins/image/__tests__/image-toolbar.test.jsx +11 -0
  23. package/src/plugins/image/__tests__/index.test.js +95 -0
  24. package/src/plugins/image/__tests__/insert-image-handler.test.js +113 -0
  25. package/src/plugins/image/__tests__/mock-change.js +15 -0
  26. package/src/plugins/image/index.jsx +2 -1
  27. package/src/plugins/image/insert-image-handler.js +13 -6
  28. package/src/plugins/index.jsx +248 -5
  29. package/src/plugins/list/__tests__/index.test.js +54 -0
  30. package/src/plugins/list/index.jsx +130 -0
  31. package/src/plugins/math/__tests__/__snapshots__/index.test.jsx.snap +48 -0
  32. package/src/plugins/math/__tests__/index.test.jsx +245 -0
  33. package/src/plugins/math/index.jsx +87 -56
  34. package/src/plugins/media/__tests__/index.test.js +75 -0
  35. package/src/plugins/media/index.jsx +3 -2
  36. package/src/plugins/media/media-dialog.js +106 -57
  37. package/src/plugins/rendering/index.js +31 -0
  38. package/src/plugins/respArea/drag-in-the-blank/choice.jsx +4 -1
  39. package/src/plugins/respArea/explicit-constructed-response/index.jsx +10 -8
  40. package/src/plugins/respArea/index.jsx +53 -7
  41. package/src/plugins/respArea/inline-dropdown/index.jsx +13 -6
  42. package/src/plugins/respArea/math-templated/index.jsx +104 -0
  43. package/src/plugins/respArea/utils.jsx +11 -0
  44. package/src/plugins/table/CustomTablePlugin.js +113 -0
  45. package/src/plugins/table/__tests__/__snapshots__/table-toolbar.test.jsx.snap +44 -0
  46. package/src/plugins/table/__tests__/index.test.jsx +401 -0
  47. package/src/plugins/table/__tests__/table-toolbar.test.jsx +42 -0
  48. package/src/plugins/table/index.jsx +46 -59
  49. package/src/plugins/table/table-toolbar.jsx +39 -2
  50. package/src/plugins/textAlign/icons/index.jsx +139 -0
  51. package/src/plugins/textAlign/index.jsx +23 -0
  52. package/src/plugins/toolbar/__tests__/__snapshots__/default-toolbar.test.jsx.snap +923 -0
  53. package/src/plugins/toolbar/__tests__/__snapshots__/editor-and-toolbar.test.jsx.snap +20 -0
  54. package/src/plugins/toolbar/__tests__/__snapshots__/toolbar-buttons.test.jsx.snap +36 -0
  55. package/src/plugins/toolbar/__tests__/__snapshots__/toolbar.test.jsx.snap +46 -0
  56. package/src/plugins/toolbar/__tests__/default-toolbar.test.jsx +94 -0
  57. package/src/plugins/toolbar/__tests__/editor-and-toolbar.test.jsx +37 -0
  58. package/src/plugins/toolbar/__tests__/toolbar-buttons.test.jsx +51 -0
  59. package/src/plugins/toolbar/__tests__/toolbar.test.jsx +106 -0
  60. package/src/plugins/toolbar/default-toolbar.jsx +82 -20
  61. package/src/plugins/toolbar/done-button.jsx +3 -1
  62. package/src/plugins/toolbar/editor-and-toolbar.jsx +18 -13
  63. package/src/plugins/toolbar/toolbar-buttons.jsx +52 -11
  64. package/src/plugins/toolbar/toolbar.jsx +31 -8
  65. package/src/serialization.jsx +213 -38
  66. package/README.md +0 -45
  67. package/deploy.sh +0 -16
  68. package/lib/editor.js +0 -1094
  69. package/lib/editor.js.map +0 -1
  70. package/lib/index.js +0 -253
  71. package/lib/index.js.map +0 -1
  72. package/lib/parse-html.js +0 -16
  73. package/lib/parse-html.js.map +0 -1
  74. package/lib/plugins/characters/custom-popper.js +0 -73
  75. package/lib/plugins/characters/custom-popper.js.map +0 -1
  76. package/lib/plugins/characters/index.js +0 -300
  77. package/lib/plugins/characters/index.js.map +0 -1
  78. package/lib/plugins/characters/utils.js +0 -381
  79. package/lib/plugins/characters/utils.js.map +0 -1
  80. package/lib/plugins/html/icons/index.js +0 -38
  81. package/lib/plugins/html/icons/index.js.map +0 -1
  82. package/lib/plugins/html/index.js +0 -76
  83. package/lib/plugins/html/index.js.map +0 -1
  84. package/lib/plugins/image/alt-dialog.js +0 -129
  85. package/lib/plugins/image/alt-dialog.js.map +0 -1
  86. package/lib/plugins/image/component.js +0 -419
  87. package/lib/plugins/image/component.js.map +0 -1
  88. package/lib/plugins/image/image-toolbar.js +0 -177
  89. package/lib/plugins/image/image-toolbar.js.map +0 -1
  90. package/lib/plugins/image/index.js +0 -262
  91. package/lib/plugins/image/index.js.map +0 -1
  92. package/lib/plugins/image/insert-image-handler.js +0 -152
  93. package/lib/plugins/image/insert-image-handler.js.map +0 -1
  94. package/lib/plugins/index.js +0 -143
  95. package/lib/plugins/index.js.map +0 -1
  96. package/lib/plugins/list/index.js +0 -204
  97. package/lib/plugins/list/index.js.map +0 -1
  98. package/lib/plugins/math/index.js +0 -419
  99. package/lib/plugins/math/index.js.map +0 -1
  100. package/lib/plugins/media/index.js +0 -384
  101. package/lib/plugins/media/index.js.map +0 -1
  102. package/lib/plugins/media/media-dialog.js +0 -668
  103. package/lib/plugins/media/media-dialog.js.map +0 -1
  104. package/lib/plugins/media/media-toolbar.js +0 -101
  105. package/lib/plugins/media/media-toolbar.js.map +0 -1
  106. package/lib/plugins/media/media-wrapper.js +0 -93
  107. package/lib/plugins/media/media-wrapper.js.map +0 -1
  108. package/lib/plugins/respArea/drag-in-the-blank/choice.js +0 -251
  109. package/lib/plugins/respArea/drag-in-the-blank/choice.js.map +0 -1
  110. package/lib/plugins/respArea/drag-in-the-blank/index.js +0 -97
  111. package/lib/plugins/respArea/drag-in-the-blank/index.js.map +0 -1
  112. package/lib/plugins/respArea/explicit-constructed-response/index.js +0 -55
  113. package/lib/plugins/respArea/explicit-constructed-response/index.js.map +0 -1
  114. package/lib/plugins/respArea/icons/index.js +0 -95
  115. package/lib/plugins/respArea/icons/index.js.map +0 -1
  116. package/lib/plugins/respArea/index.js +0 -293
  117. package/lib/plugins/respArea/index.js.map +0 -1
  118. package/lib/plugins/respArea/inline-dropdown/index.js +0 -70
  119. package/lib/plugins/respArea/inline-dropdown/index.js.map +0 -1
  120. package/lib/plugins/respArea/utils.js +0 -110
  121. package/lib/plugins/respArea/utils.js.map +0 -1
  122. package/lib/plugins/table/icons/index.js +0 -69
  123. package/lib/plugins/table/icons/index.js.map +0 -1
  124. package/lib/plugins/table/index.js +0 -499
  125. package/lib/plugins/table/index.js.map +0 -1
  126. package/lib/plugins/table/table-toolbar.js +0 -158
  127. package/lib/plugins/table/table-toolbar.js.map +0 -1
  128. package/lib/plugins/toolbar/default-toolbar.js +0 -174
  129. package/lib/plugins/toolbar/default-toolbar.js.map +0 -1
  130. package/lib/plugins/toolbar/done-button.js +0 -50
  131. package/lib/plugins/toolbar/done-button.js.map +0 -1
  132. package/lib/plugins/toolbar/editor-and-toolbar.js +0 -287
  133. package/lib/plugins/toolbar/editor-and-toolbar.js.map +0 -1
  134. package/lib/plugins/toolbar/index.js +0 -34
  135. package/lib/plugins/toolbar/index.js.map +0 -1
  136. package/lib/plugins/toolbar/toolbar-buttons.js +0 -161
  137. package/lib/plugins/toolbar/toolbar-buttons.js.map +0 -1
  138. package/lib/plugins/toolbar/toolbar.js +0 -352
  139. package/lib/plugins/toolbar/toolbar.js.map +0 -1
  140. package/lib/plugins/utils.js +0 -62
  141. package/lib/plugins/utils.js.map +0 -1
  142. package/lib/serialization.js +0 -488
  143. package/lib/serialization.js.map +0 -1
  144. package/lib/theme.js +0 -9
  145. package/lib/theme.js.map +0 -1
  146. package/playground/image/data.js +0 -59
  147. package/playground/image/index.html +0 -22
  148. package/playground/image/index.jsx +0 -81
  149. package/playground/index.html +0 -25
  150. package/playground/mathquill/index.html +0 -22
  151. package/playground/mathquill/index.jsx +0 -155
  152. package/playground/package.json +0 -15
  153. package/playground/prod-test/index.html +0 -22
  154. package/playground/prod-test/index.jsx +0 -28
  155. package/playground/schema-override/data.js +0 -29
  156. package/playground/schema-override/image-plugin.jsx +0 -41
  157. package/playground/schema-override/index.html +0 -21
  158. package/playground/schema-override/index.jsx +0 -97
  159. package/playground/serialization/data.js +0 -29
  160. package/playground/serialization/image-plugin.jsx +0 -41
  161. package/playground/serialization/index.html +0 -22
  162. package/playground/serialization/index.jsx +0 -12
  163. package/playground/static.json +0 -3
  164. package/playground/table-examples.html +0 -70
  165. package/playground/webpack.config.js +0 -42
  166. package/static.json +0 -1
@@ -0,0 +1,923 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`default-toolbar snapshot renders 1`] = `undefined`;
4
+
5
+ exports[`default-toolbar snapshot renders 1 plugins 1`] = `
6
+ <div
7
+ onFocus={[Function]}
8
+ tabIndex="1"
9
+ >
10
+ <div>
11
+ <ToolbarButton
12
+ key="0"
13
+ onChange={[MockFunction]}
14
+ value={
15
+ Immutable.Record {
16
+ "data": Immutable.Map {},
17
+ "decorations": null,
18
+ "document": Immutable.Record {
19
+ "data": Immutable.Map {},
20
+ "key": "2",
21
+ "nodes": Immutable.List [],
22
+ },
23
+ "history": Immutable.Record {
24
+ "redos": Immutable.Stack [],
25
+ "undos": Immutable.Stack [],
26
+ },
27
+ "schema": Immutable.Record {
28
+ "stack": Immutable.Record {
29
+ "plugins": Array [
30
+ Object {
31
+ "schema": Object {},
32
+ },
33
+ ],
34
+ },
35
+ "rules": Array [
36
+ Object {
37
+ "match": Object {
38
+ "object": "document",
39
+ },
40
+ "nodes": Array [
41
+ Object {
42
+ "match": Object {
43
+ "object": "block",
44
+ },
45
+ },
46
+ ],
47
+ },
48
+ Object {
49
+ "match": Object {
50
+ "first": Object {
51
+ "object": "block",
52
+ },
53
+ "object": "block",
54
+ },
55
+ "nodes": Array [
56
+ Object {
57
+ "match": Object {
58
+ "object": "block",
59
+ },
60
+ },
61
+ ],
62
+ },
63
+ Object {
64
+ "match": Object {
65
+ "first": Array [
66
+ Object {
67
+ "object": "inline",
68
+ },
69
+ Object {
70
+ "object": "text",
71
+ },
72
+ ],
73
+ "object": "block",
74
+ },
75
+ "nodes": Array [
76
+ Object {
77
+ "match": Array [
78
+ Object {
79
+ "object": "inline",
80
+ },
81
+ Object {
82
+ "object": "text",
83
+ },
84
+ ],
85
+ },
86
+ ],
87
+ },
88
+ Object {
89
+ "match": Object {
90
+ "object": "inline",
91
+ },
92
+ "nodes": Array [
93
+ Object {
94
+ "match": Array [
95
+ Object {
96
+ "object": "inline",
97
+ },
98
+ Object {
99
+ "object": "text",
100
+ },
101
+ ],
102
+ },
103
+ ],
104
+ },
105
+ Object {
106
+ "match": Array [
107
+ Object {
108
+ "object": "block",
109
+ },
110
+ Object {
111
+ "object": "inline",
112
+ },
113
+ ],
114
+ "nodes": Array [
115
+ Object {
116
+ "min": 1,
117
+ },
118
+ ],
119
+ "normalize": [Function],
120
+ },
121
+ Object {
122
+ "match": Object {
123
+ "isVoid": false,
124
+ "nodes": Array [
125
+ Object {
126
+ "match": Object {
127
+ "object": "text",
128
+ },
129
+ },
130
+ ],
131
+ "object": "inline",
132
+ },
133
+ "text": /\\[\\\\w\\\\W\\]\\+/,
134
+ },
135
+ Object {
136
+ "first": Array [
137
+ Object {
138
+ "object": "block",
139
+ },
140
+ Object {
141
+ "object": "text",
142
+ },
143
+ ],
144
+ "last": Array [
145
+ Object {
146
+ "object": "block",
147
+ },
148
+ Object {
149
+ "object": "text",
150
+ },
151
+ ],
152
+ "match": Object {
153
+ "object": "block",
154
+ },
155
+ "normalize": [Function],
156
+ },
157
+ Object {
158
+ "first": Array [
159
+ Object {
160
+ "object": "block",
161
+ },
162
+ Object {
163
+ "object": "text",
164
+ },
165
+ ],
166
+ "last": Array [
167
+ Object {
168
+ "object": "block",
169
+ },
170
+ Object {
171
+ "object": "text",
172
+ },
173
+ ],
174
+ "match": Object {
175
+ "object": "inline",
176
+ },
177
+ "next": Array [
178
+ Object {
179
+ "object": "block",
180
+ },
181
+ Object {
182
+ "object": "text",
183
+ },
184
+ ],
185
+ "normalize": [Function],
186
+ "previous": Array [
187
+ Object {
188
+ "object": "block",
189
+ },
190
+ Object {
191
+ "object": "text",
192
+ },
193
+ ],
194
+ },
195
+ Object {
196
+ "match": Object {
197
+ "object": "text",
198
+ },
199
+ "next": Array [
200
+ Object {
201
+ "object": "block",
202
+ },
203
+ Object {
204
+ "object": "inline",
205
+ },
206
+ ],
207
+ "normalize": [Function],
208
+ },
209
+ ],
210
+ },
211
+ "selection": Immutable.Record {
212
+ "anchorKey": null,
213
+ "anchorOffset": 0,
214
+ "anchorPath": null,
215
+ "focusKey": null,
216
+ "focusOffset": 0,
217
+ "focusPath": null,
218
+ "isAtomic": false,
219
+ "isBackward": false,
220
+ "isFocused": false,
221
+ "marks": null,
222
+ },
223
+ }
224
+ }
225
+ />
226
+ </div>
227
+ <WithStyles(RawDoneButton)
228
+ onClick={[MockFunction]}
229
+ />
230
+ </div>
231
+ `;
232
+
233
+ exports[`default-toolbar snapshot renders 1 plugins, 1 is disabled 1`] = `
234
+ <div
235
+ onFocus={[Function]}
236
+ tabIndex="1"
237
+ >
238
+ <div>
239
+ <ToolbarButton
240
+ key="0"
241
+ onChange={[MockFunction]}
242
+ value={
243
+ Immutable.Record {
244
+ "data": Immutable.Map {},
245
+ "decorations": null,
246
+ "document": Immutable.Record {
247
+ "data": Immutable.Map {},
248
+ "key": "4",
249
+ "nodes": Immutable.List [],
250
+ },
251
+ "history": Immutable.Record {
252
+ "redos": Immutable.Stack [],
253
+ "undos": Immutable.Stack [],
254
+ },
255
+ "schema": Immutable.Record {
256
+ "stack": Immutable.Record {
257
+ "plugins": Array [
258
+ Object {
259
+ "schema": Object {},
260
+ },
261
+ ],
262
+ },
263
+ "rules": Array [
264
+ Object {
265
+ "match": Object {
266
+ "object": "document",
267
+ },
268
+ "nodes": Array [
269
+ Object {
270
+ "match": Object {
271
+ "object": "block",
272
+ },
273
+ },
274
+ ],
275
+ },
276
+ Object {
277
+ "match": Object {
278
+ "first": Object {
279
+ "object": "block",
280
+ },
281
+ "object": "block",
282
+ },
283
+ "nodes": Array [
284
+ Object {
285
+ "match": Object {
286
+ "object": "block",
287
+ },
288
+ },
289
+ ],
290
+ },
291
+ Object {
292
+ "match": Object {
293
+ "first": Array [
294
+ Object {
295
+ "object": "inline",
296
+ },
297
+ Object {
298
+ "object": "text",
299
+ },
300
+ ],
301
+ "object": "block",
302
+ },
303
+ "nodes": Array [
304
+ Object {
305
+ "match": Array [
306
+ Object {
307
+ "object": "inline",
308
+ },
309
+ Object {
310
+ "object": "text",
311
+ },
312
+ ],
313
+ },
314
+ ],
315
+ },
316
+ Object {
317
+ "match": Object {
318
+ "object": "inline",
319
+ },
320
+ "nodes": Array [
321
+ Object {
322
+ "match": Array [
323
+ Object {
324
+ "object": "inline",
325
+ },
326
+ Object {
327
+ "object": "text",
328
+ },
329
+ ],
330
+ },
331
+ ],
332
+ },
333
+ Object {
334
+ "match": Array [
335
+ Object {
336
+ "object": "block",
337
+ },
338
+ Object {
339
+ "object": "inline",
340
+ },
341
+ ],
342
+ "nodes": Array [
343
+ Object {
344
+ "min": 1,
345
+ },
346
+ ],
347
+ "normalize": [Function],
348
+ },
349
+ Object {
350
+ "match": Object {
351
+ "isVoid": false,
352
+ "nodes": Array [
353
+ Object {
354
+ "match": Object {
355
+ "object": "text",
356
+ },
357
+ },
358
+ ],
359
+ "object": "inline",
360
+ },
361
+ "text": /\\[\\\\w\\\\W\\]\\+/,
362
+ },
363
+ Object {
364
+ "first": Array [
365
+ Object {
366
+ "object": "block",
367
+ },
368
+ Object {
369
+ "object": "text",
370
+ },
371
+ ],
372
+ "last": Array [
373
+ Object {
374
+ "object": "block",
375
+ },
376
+ Object {
377
+ "object": "text",
378
+ },
379
+ ],
380
+ "match": Object {
381
+ "object": "block",
382
+ },
383
+ "normalize": [Function],
384
+ },
385
+ Object {
386
+ "first": Array [
387
+ Object {
388
+ "object": "block",
389
+ },
390
+ Object {
391
+ "object": "text",
392
+ },
393
+ ],
394
+ "last": Array [
395
+ Object {
396
+ "object": "block",
397
+ },
398
+ Object {
399
+ "object": "text",
400
+ },
401
+ ],
402
+ "match": Object {
403
+ "object": "inline",
404
+ },
405
+ "next": Array [
406
+ Object {
407
+ "object": "block",
408
+ },
409
+ Object {
410
+ "object": "text",
411
+ },
412
+ ],
413
+ "normalize": [Function],
414
+ "previous": Array [
415
+ Object {
416
+ "object": "block",
417
+ },
418
+ Object {
419
+ "object": "text",
420
+ },
421
+ ],
422
+ },
423
+ Object {
424
+ "match": Object {
425
+ "object": "text",
426
+ },
427
+ "next": Array [
428
+ Object {
429
+ "object": "block",
430
+ },
431
+ Object {
432
+ "object": "inline",
433
+ },
434
+ ],
435
+ "normalize": [Function],
436
+ },
437
+ ],
438
+ },
439
+ "selection": Immutable.Record {
440
+ "anchorKey": null,
441
+ "anchorOffset": 0,
442
+ "anchorPath": null,
443
+ "focusKey": null,
444
+ "focusOffset": 0,
445
+ "focusPath": null,
446
+ "isAtomic": false,
447
+ "isBackward": false,
448
+ "isFocused": false,
449
+ "marks": null,
450
+ },
451
+ }
452
+ }
453
+ />
454
+ </div>
455
+ <WithStyles(RawDoneButton)
456
+ onClick={[MockFunction]}
457
+ />
458
+ </div>
459
+ `;
460
+
461
+ exports[`default-toolbar snapshot renders 2 plugins 1`] = `
462
+ <div
463
+ onFocus={[Function]}
464
+ tabIndex="1"
465
+ >
466
+ <div>
467
+ <ToolbarButton
468
+ key="0"
469
+ onChange={[MockFunction]}
470
+ value={
471
+ Immutable.Record {
472
+ "data": Immutable.Map {},
473
+ "decorations": null,
474
+ "document": Immutable.Record {
475
+ "data": Immutable.Map {},
476
+ "key": "3",
477
+ "nodes": Immutable.List [],
478
+ },
479
+ "history": Immutable.Record {
480
+ "redos": Immutable.Stack [],
481
+ "undos": Immutable.Stack [],
482
+ },
483
+ "schema": Immutable.Record {
484
+ "stack": Immutable.Record {
485
+ "plugins": Array [
486
+ Object {
487
+ "schema": Object {},
488
+ },
489
+ ],
490
+ },
491
+ "rules": Array [
492
+ Object {
493
+ "match": Object {
494
+ "object": "document",
495
+ },
496
+ "nodes": Array [
497
+ Object {
498
+ "match": Object {
499
+ "object": "block",
500
+ },
501
+ },
502
+ ],
503
+ },
504
+ Object {
505
+ "match": Object {
506
+ "first": Object {
507
+ "object": "block",
508
+ },
509
+ "object": "block",
510
+ },
511
+ "nodes": Array [
512
+ Object {
513
+ "match": Object {
514
+ "object": "block",
515
+ },
516
+ },
517
+ ],
518
+ },
519
+ Object {
520
+ "match": Object {
521
+ "first": Array [
522
+ Object {
523
+ "object": "inline",
524
+ },
525
+ Object {
526
+ "object": "text",
527
+ },
528
+ ],
529
+ "object": "block",
530
+ },
531
+ "nodes": Array [
532
+ Object {
533
+ "match": Array [
534
+ Object {
535
+ "object": "inline",
536
+ },
537
+ Object {
538
+ "object": "text",
539
+ },
540
+ ],
541
+ },
542
+ ],
543
+ },
544
+ Object {
545
+ "match": Object {
546
+ "object": "inline",
547
+ },
548
+ "nodes": Array [
549
+ Object {
550
+ "match": Array [
551
+ Object {
552
+ "object": "inline",
553
+ },
554
+ Object {
555
+ "object": "text",
556
+ },
557
+ ],
558
+ },
559
+ ],
560
+ },
561
+ Object {
562
+ "match": Array [
563
+ Object {
564
+ "object": "block",
565
+ },
566
+ Object {
567
+ "object": "inline",
568
+ },
569
+ ],
570
+ "nodes": Array [
571
+ Object {
572
+ "min": 1,
573
+ },
574
+ ],
575
+ "normalize": [Function],
576
+ },
577
+ Object {
578
+ "match": Object {
579
+ "isVoid": false,
580
+ "nodes": Array [
581
+ Object {
582
+ "match": Object {
583
+ "object": "text",
584
+ },
585
+ },
586
+ ],
587
+ "object": "inline",
588
+ },
589
+ "text": /\\[\\\\w\\\\W\\]\\+/,
590
+ },
591
+ Object {
592
+ "first": Array [
593
+ Object {
594
+ "object": "block",
595
+ },
596
+ Object {
597
+ "object": "text",
598
+ },
599
+ ],
600
+ "last": Array [
601
+ Object {
602
+ "object": "block",
603
+ },
604
+ Object {
605
+ "object": "text",
606
+ },
607
+ ],
608
+ "match": Object {
609
+ "object": "block",
610
+ },
611
+ "normalize": [Function],
612
+ },
613
+ Object {
614
+ "first": Array [
615
+ Object {
616
+ "object": "block",
617
+ },
618
+ Object {
619
+ "object": "text",
620
+ },
621
+ ],
622
+ "last": Array [
623
+ Object {
624
+ "object": "block",
625
+ },
626
+ Object {
627
+ "object": "text",
628
+ },
629
+ ],
630
+ "match": Object {
631
+ "object": "inline",
632
+ },
633
+ "next": Array [
634
+ Object {
635
+ "object": "block",
636
+ },
637
+ Object {
638
+ "object": "text",
639
+ },
640
+ ],
641
+ "normalize": [Function],
642
+ "previous": Array [
643
+ Object {
644
+ "object": "block",
645
+ },
646
+ Object {
647
+ "object": "text",
648
+ },
649
+ ],
650
+ },
651
+ Object {
652
+ "match": Object {
653
+ "object": "text",
654
+ },
655
+ "next": Array [
656
+ Object {
657
+ "object": "block",
658
+ },
659
+ Object {
660
+ "object": "inline",
661
+ },
662
+ ],
663
+ "normalize": [Function],
664
+ },
665
+ ],
666
+ },
667
+ "selection": Immutable.Record {
668
+ "anchorKey": null,
669
+ "anchorOffset": 0,
670
+ "anchorPath": null,
671
+ "focusKey": null,
672
+ "focusOffset": 0,
673
+ "focusPath": null,
674
+ "isAtomic": false,
675
+ "isBackward": false,
676
+ "isFocused": false,
677
+ "marks": null,
678
+ },
679
+ }
680
+ }
681
+ />
682
+ <ToolbarButton
683
+ key="1"
684
+ onChange={[MockFunction]}
685
+ value={
686
+ Immutable.Record {
687
+ "data": Immutable.Map {},
688
+ "decorations": null,
689
+ "document": Immutable.Record {
690
+ "data": Immutable.Map {},
691
+ "key": "3",
692
+ "nodes": Immutable.List [],
693
+ },
694
+ "history": Immutable.Record {
695
+ "redos": Immutable.Stack [],
696
+ "undos": Immutable.Stack [],
697
+ },
698
+ "schema": Immutable.Record {
699
+ "stack": Immutable.Record {
700
+ "plugins": Array [
701
+ Object {
702
+ "schema": Object {},
703
+ },
704
+ ],
705
+ },
706
+ "rules": Array [
707
+ Object {
708
+ "match": Object {
709
+ "object": "document",
710
+ },
711
+ "nodes": Array [
712
+ Object {
713
+ "match": Object {
714
+ "object": "block",
715
+ },
716
+ },
717
+ ],
718
+ },
719
+ Object {
720
+ "match": Object {
721
+ "first": Object {
722
+ "object": "block",
723
+ },
724
+ "object": "block",
725
+ },
726
+ "nodes": Array [
727
+ Object {
728
+ "match": Object {
729
+ "object": "block",
730
+ },
731
+ },
732
+ ],
733
+ },
734
+ Object {
735
+ "match": Object {
736
+ "first": Array [
737
+ Object {
738
+ "object": "inline",
739
+ },
740
+ Object {
741
+ "object": "text",
742
+ },
743
+ ],
744
+ "object": "block",
745
+ },
746
+ "nodes": Array [
747
+ Object {
748
+ "match": Array [
749
+ Object {
750
+ "object": "inline",
751
+ },
752
+ Object {
753
+ "object": "text",
754
+ },
755
+ ],
756
+ },
757
+ ],
758
+ },
759
+ Object {
760
+ "match": Object {
761
+ "object": "inline",
762
+ },
763
+ "nodes": Array [
764
+ Object {
765
+ "match": Array [
766
+ Object {
767
+ "object": "inline",
768
+ },
769
+ Object {
770
+ "object": "text",
771
+ },
772
+ ],
773
+ },
774
+ ],
775
+ },
776
+ Object {
777
+ "match": Array [
778
+ Object {
779
+ "object": "block",
780
+ },
781
+ Object {
782
+ "object": "inline",
783
+ },
784
+ ],
785
+ "nodes": Array [
786
+ Object {
787
+ "min": 1,
788
+ },
789
+ ],
790
+ "normalize": [Function],
791
+ },
792
+ Object {
793
+ "match": Object {
794
+ "isVoid": false,
795
+ "nodes": Array [
796
+ Object {
797
+ "match": Object {
798
+ "object": "text",
799
+ },
800
+ },
801
+ ],
802
+ "object": "inline",
803
+ },
804
+ "text": /\\[\\\\w\\\\W\\]\\+/,
805
+ },
806
+ Object {
807
+ "first": Array [
808
+ Object {
809
+ "object": "block",
810
+ },
811
+ Object {
812
+ "object": "text",
813
+ },
814
+ ],
815
+ "last": Array [
816
+ Object {
817
+ "object": "block",
818
+ },
819
+ Object {
820
+ "object": "text",
821
+ },
822
+ ],
823
+ "match": Object {
824
+ "object": "block",
825
+ },
826
+ "normalize": [Function],
827
+ },
828
+ Object {
829
+ "first": Array [
830
+ Object {
831
+ "object": "block",
832
+ },
833
+ Object {
834
+ "object": "text",
835
+ },
836
+ ],
837
+ "last": Array [
838
+ Object {
839
+ "object": "block",
840
+ },
841
+ Object {
842
+ "object": "text",
843
+ },
844
+ ],
845
+ "match": Object {
846
+ "object": "inline",
847
+ },
848
+ "next": Array [
849
+ Object {
850
+ "object": "block",
851
+ },
852
+ Object {
853
+ "object": "text",
854
+ },
855
+ ],
856
+ "normalize": [Function],
857
+ "previous": Array [
858
+ Object {
859
+ "object": "block",
860
+ },
861
+ Object {
862
+ "object": "text",
863
+ },
864
+ ],
865
+ },
866
+ Object {
867
+ "match": Object {
868
+ "object": "text",
869
+ },
870
+ "next": Array [
871
+ Object {
872
+ "object": "block",
873
+ },
874
+ Object {
875
+ "object": "inline",
876
+ },
877
+ ],
878
+ "normalize": [Function],
879
+ },
880
+ ],
881
+ },
882
+ "selection": Immutable.Record {
883
+ "anchorKey": null,
884
+ "anchorOffset": 0,
885
+ "anchorPath": null,
886
+ "focusKey": null,
887
+ "focusOffset": 0,
888
+ "focusPath": null,
889
+ "isAtomic": false,
890
+ "isBackward": false,
891
+ "isFocused": false,
892
+ "marks": null,
893
+ },
894
+ }
895
+ }
896
+ />
897
+ </div>
898
+ <WithStyles(RawDoneButton)
899
+ onClick={[MockFunction]}
900
+ />
901
+ </div>
902
+ `;
903
+
904
+ exports[`default-toolbar snapshot renders with done button 1`] = `
905
+ <div
906
+ onFocus={[Function]}
907
+ tabIndex="1"
908
+ >
909
+ <div />
910
+ </div>
911
+ `;
912
+
913
+ exports[`default-toolbar snapshot renders without done button 1`] = `
914
+ <div
915
+ onFocus={[Function]}
916
+ tabIndex="1"
917
+ >
918
+ <div />
919
+ <WithStyles(RawDoneButton)
920
+ onClick={[MockFunction]}
921
+ />
922
+ </div>
923
+ `;