@pie-lib/editable-html-tip-tap 1.0.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 (167) hide show
  1. package/CHANGELOG.json +32 -0
  2. package/CHANGELOG.md +2280 -0
  3. package/lib/__tests__/editor.test.js +470 -0
  4. package/lib/__tests__/serialization.test.js +246 -0
  5. package/lib/__tests__/utils.js +106 -0
  6. package/lib/block-tags.js +25 -0
  7. package/lib/constants.js +16 -0
  8. package/lib/editor.js +1356 -0
  9. package/lib/extensions/MediaView.js +112 -0
  10. package/lib/extensions/characters.js +65 -0
  11. package/lib/extensions/component.js +325 -0
  12. package/lib/extensions/css.js +252 -0
  13. package/lib/extensions/custom-toolbar-wrapper.js +124 -0
  14. package/lib/extensions/image.js +106 -0
  15. package/lib/extensions/math.js +330 -0
  16. package/lib/extensions/media.js +276 -0
  17. package/lib/extensions/responseArea.js +278 -0
  18. package/lib/index.js +1213 -0
  19. package/lib/old-index.js +269 -0
  20. package/lib/parse-html.js +16 -0
  21. package/lib/plugins/characters/custom-popper.js +73 -0
  22. package/lib/plugins/characters/index.js +305 -0
  23. package/lib/plugins/characters/utils.js +381 -0
  24. package/lib/plugins/css/icons/index.js +37 -0
  25. package/lib/plugins/css/index.js +390 -0
  26. package/lib/plugins/customPlugin/index.js +114 -0
  27. package/lib/plugins/html/icons/index.js +38 -0
  28. package/lib/plugins/html/index.js +81 -0
  29. package/lib/plugins/image/__tests__/component.test.js +51 -0
  30. package/lib/plugins/image/__tests__/image-toolbar-logic.test.js +56 -0
  31. package/lib/plugins/image/__tests__/image-toolbar.test.js +26 -0
  32. package/lib/plugins/image/__tests__/index.test.js +98 -0
  33. package/lib/plugins/image/__tests__/insert-image-handler.test.js +125 -0
  34. package/lib/plugins/image/__tests__/mock-change.js +25 -0
  35. package/lib/plugins/image/alt-dialog.js +129 -0
  36. package/lib/plugins/image/component.js +419 -0
  37. package/lib/plugins/image/image-toolbar.js +177 -0
  38. package/lib/plugins/image/index.js +263 -0
  39. package/lib/plugins/image/insert-image-handler.js +117 -0
  40. package/lib/plugins/index.js +413 -0
  41. package/lib/plugins/list/__tests__/index.test.js +79 -0
  42. package/lib/plugins/list/index.js +334 -0
  43. package/lib/plugins/math/__tests__/index.test.js +300 -0
  44. package/lib/plugins/math/index.js +454 -0
  45. package/lib/plugins/media/__tests__/index.test.js +71 -0
  46. package/lib/plugins/media/index.js +387 -0
  47. package/lib/plugins/media/media-dialog.js +709 -0
  48. package/lib/plugins/media/media-toolbar.js +101 -0
  49. package/lib/plugins/media/media-wrapper.js +93 -0
  50. package/lib/plugins/rendering/index.js +46 -0
  51. package/lib/plugins/respArea/drag-in-the-blank/choice.js +289 -0
  52. package/lib/plugins/respArea/drag-in-the-blank/index.js +94 -0
  53. package/lib/plugins/respArea/explicit-constructed-response/index.js +120 -0
  54. package/lib/plugins/respArea/icons/index.js +95 -0
  55. package/lib/plugins/respArea/index.js +341 -0
  56. package/lib/plugins/respArea/inline-dropdown/index.js +126 -0
  57. package/lib/plugins/respArea/math-templated/index.js +130 -0
  58. package/lib/plugins/respArea/utils.js +125 -0
  59. package/lib/plugins/table/CustomTablePlugin.js +133 -0
  60. package/lib/plugins/table/__tests__/index.test.js +442 -0
  61. package/lib/plugins/table/__tests__/table-toolbar.test.js +54 -0
  62. package/lib/plugins/table/icons/index.js +69 -0
  63. package/lib/plugins/table/index.js +483 -0
  64. package/lib/plugins/table/table-toolbar.js +187 -0
  65. package/lib/plugins/textAlign/icons/index.js +194 -0
  66. package/lib/plugins/textAlign/index.js +34 -0
  67. package/lib/plugins/toolbar/__tests__/default-toolbar.test.js +128 -0
  68. package/lib/plugins/toolbar/__tests__/editor-and-toolbar.test.js +51 -0
  69. package/lib/plugins/toolbar/__tests__/toolbar-buttons.test.js +54 -0
  70. package/lib/plugins/toolbar/__tests__/toolbar.test.js +120 -0
  71. package/lib/plugins/toolbar/default-toolbar.js +229 -0
  72. package/lib/plugins/toolbar/done-button.js +53 -0
  73. package/lib/plugins/toolbar/editor-and-toolbar.js +286 -0
  74. package/lib/plugins/toolbar/index.js +34 -0
  75. package/lib/plugins/toolbar/toolbar-buttons.js +194 -0
  76. package/lib/plugins/toolbar/toolbar.js +376 -0
  77. package/lib/plugins/utils.js +62 -0
  78. package/lib/serialization.js +677 -0
  79. package/lib/shared/alert-dialog.js +75 -0
  80. package/lib/theme.js +9 -0
  81. package/package.json +69 -0
  82. package/src/__tests__/editor.test.jsx +363 -0
  83. package/src/__tests__/serialization.test.js +291 -0
  84. package/src/__tests__/utils.js +36 -0
  85. package/src/block-tags.js +17 -0
  86. package/src/constants.js +7 -0
  87. package/src/editor.jsx +1197 -0
  88. package/src/extensions/characters.js +46 -0
  89. package/src/extensions/component.jsx +294 -0
  90. package/src/extensions/css.js +217 -0
  91. package/src/extensions/custom-toolbar-wrapper.jsx +100 -0
  92. package/src/extensions/image.js +55 -0
  93. package/src/extensions/math.js +259 -0
  94. package/src/extensions/media.js +182 -0
  95. package/src/extensions/responseArea.js +205 -0
  96. package/src/index.jsx +1462 -0
  97. package/src/old-index.jsx +162 -0
  98. package/src/parse-html.js +8 -0
  99. package/src/plugins/README.md +27 -0
  100. package/src/plugins/characters/custom-popper.js +48 -0
  101. package/src/plugins/characters/index.jsx +284 -0
  102. package/src/plugins/characters/utils.js +447 -0
  103. package/src/plugins/css/icons/index.jsx +17 -0
  104. package/src/plugins/css/index.jsx +340 -0
  105. package/src/plugins/customPlugin/index.jsx +85 -0
  106. package/src/plugins/html/icons/index.jsx +19 -0
  107. package/src/plugins/html/index.jsx +72 -0
  108. package/src/plugins/image/__tests__/__snapshots__/component.test.jsx.snap +51 -0
  109. package/src/plugins/image/__tests__/__snapshots__/image-toolbar-logic.test.jsx.snap +27 -0
  110. package/src/plugins/image/__tests__/__snapshots__/image-toolbar.test.jsx.snap +44 -0
  111. package/src/plugins/image/__tests__/component.test.jsx +41 -0
  112. package/src/plugins/image/__tests__/image-toolbar-logic.test.jsx +42 -0
  113. package/src/plugins/image/__tests__/image-toolbar.test.jsx +11 -0
  114. package/src/plugins/image/__tests__/index.test.js +95 -0
  115. package/src/plugins/image/__tests__/insert-image-handler.test.js +113 -0
  116. package/src/plugins/image/__tests__/mock-change.js +15 -0
  117. package/src/plugins/image/alt-dialog.jsx +82 -0
  118. package/src/plugins/image/component.jsx +343 -0
  119. package/src/plugins/image/image-toolbar.jsx +100 -0
  120. package/src/plugins/image/index.jsx +227 -0
  121. package/src/plugins/image/insert-image-handler.js +79 -0
  122. package/src/plugins/index.jsx +377 -0
  123. package/src/plugins/list/__tests__/index.test.js +54 -0
  124. package/src/plugins/list/index.jsx +305 -0
  125. package/src/plugins/math/__tests__/__snapshots__/index.test.jsx.snap +48 -0
  126. package/src/plugins/math/__tests__/index.test.jsx +245 -0
  127. package/src/plugins/math/index.jsx +379 -0
  128. package/src/plugins/media/__tests__/index.test.js +75 -0
  129. package/src/plugins/media/index.jsx +325 -0
  130. package/src/plugins/media/media-dialog.js +624 -0
  131. package/src/plugins/media/media-toolbar.jsx +56 -0
  132. package/src/plugins/media/media-wrapper.jsx +43 -0
  133. package/src/plugins/rendering/index.js +31 -0
  134. package/src/plugins/respArea/drag-in-the-blank/choice.jsx +215 -0
  135. package/src/plugins/respArea/drag-in-the-blank/index.jsx +70 -0
  136. package/src/plugins/respArea/explicit-constructed-response/index.jsx +92 -0
  137. package/src/plugins/respArea/icons/index.jsx +71 -0
  138. package/src/plugins/respArea/index.jsx +299 -0
  139. package/src/plugins/respArea/inline-dropdown/index.jsx +108 -0
  140. package/src/plugins/respArea/math-templated/index.jsx +104 -0
  141. package/src/plugins/respArea/utils.jsx +90 -0
  142. package/src/plugins/table/CustomTablePlugin.js +113 -0
  143. package/src/plugins/table/__tests__/__snapshots__/table-toolbar.test.jsx.snap +44 -0
  144. package/src/plugins/table/__tests__/index.test.jsx +401 -0
  145. package/src/plugins/table/__tests__/table-toolbar.test.jsx +42 -0
  146. package/src/plugins/table/icons/index.jsx +53 -0
  147. package/src/plugins/table/index.jsx +427 -0
  148. package/src/plugins/table/table-toolbar.jsx +136 -0
  149. package/src/plugins/textAlign/icons/index.jsx +114 -0
  150. package/src/plugins/textAlign/index.jsx +23 -0
  151. package/src/plugins/toolbar/__tests__/__snapshots__/default-toolbar.test.jsx.snap +923 -0
  152. package/src/plugins/toolbar/__tests__/__snapshots__/editor-and-toolbar.test.jsx.snap +20 -0
  153. package/src/plugins/toolbar/__tests__/__snapshots__/toolbar-buttons.test.jsx.snap +36 -0
  154. package/src/plugins/toolbar/__tests__/__snapshots__/toolbar.test.jsx.snap +46 -0
  155. package/src/plugins/toolbar/__tests__/default-toolbar.test.jsx +94 -0
  156. package/src/plugins/toolbar/__tests__/editor-and-toolbar.test.jsx +37 -0
  157. package/src/plugins/toolbar/__tests__/toolbar-buttons.test.jsx +51 -0
  158. package/src/plugins/toolbar/__tests__/toolbar.test.jsx +106 -0
  159. package/src/plugins/toolbar/default-toolbar.jsx +206 -0
  160. package/src/plugins/toolbar/done-button.jsx +38 -0
  161. package/src/plugins/toolbar/editor-and-toolbar.jsx +257 -0
  162. package/src/plugins/toolbar/index.jsx +23 -0
  163. package/src/plugins/toolbar/toolbar-buttons.jsx +138 -0
  164. package/src/plugins/toolbar/toolbar.jsx +338 -0
  165. package/src/plugins/utils.js +31 -0
  166. package/src/serialization.jsx +621 -0
  167. package/src/theme.js +1 -0
@@ -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
+ `;