@zipify/wysiwyg 1.3.0-0 → 2.0.0-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/.eslintrc.js +1 -1
- package/config/build/lib.config.js +4 -2
- package/dist/cli.js +10 -2
- package/dist/wysiwyg.css +43 -48
- package/dist/wysiwyg.mjs +1928 -787
- package/example/ExampleApp.vue +3 -1
- package/lib/__tests__/utils/buildTestExtensions.js +14 -0
- package/lib/__tests__/utils/index.js +1 -0
- package/lib/components/base/Button.vue +0 -7
- package/lib/components/base/dropdown/Dropdown.vue +1 -7
- package/lib/components/base/dropdown/DropdownActivator.vue +4 -19
- package/lib/components/base/dropdown/__tests__/DropdownActivator.test.js +1 -23
- package/lib/components/toolbar/controls/AlignmentControl.vue +1 -11
- package/lib/components/toolbar/controls/FontColorControl.vue +0 -13
- package/lib/components/toolbar/controls/FontFamilyControl.vue +0 -4
- package/lib/components/toolbar/controls/FontSizeControl.vue +1 -6
- package/lib/components/toolbar/controls/FontWeightControl.vue +0 -12
- package/lib/components/toolbar/controls/ItalicControl.vue +0 -13
- package/lib/components/toolbar/controls/LineHeightControl.vue +0 -14
- package/lib/components/toolbar/controls/StylePresetControl.vue +1 -1
- package/lib/components/toolbar/controls/SuperscriptControl.vue +2 -2
- package/lib/components/toolbar/controls/UnderlineControl.vue +0 -12
- package/lib/components/toolbar/controls/__tests__/AlignmentControl.test.js +5 -72
- package/lib/components/toolbar/controls/__tests__/FontColorControl.test.js +1 -22
- package/lib/components/toolbar/controls/__tests__/FontFamilyControl.test.js +0 -1
- package/lib/components/toolbar/controls/__tests__/FontSizeControl.test.js +0 -1
- package/lib/components/toolbar/controls/__tests__/FontWeightControl.test.js +0 -1
- package/lib/components/toolbar/controls/__tests__/ItalicControl.test.js +1 -23
- package/lib/components/toolbar/controls/__tests__/LineHeightControl.test.js +1 -23
- package/lib/components/toolbar/controls/__tests__/StylePresetControl.test.js +2 -2
- package/lib/components/toolbar/controls/__tests__/SuperscriptControl.test.js +2 -2
- package/lib/components/toolbar/controls/__tests__/UnderlineControl.test.js +1 -25
- package/lib/composables/__tests__/useEditor.test.js +2 -2
- package/lib/enums/TextSettings.js +5 -5
- package/lib/extensions/BackgroundColor.js +4 -4
- package/lib/extensions/FontColor.js +4 -5
- package/lib/extensions/FontFamily.js +4 -5
- package/lib/extensions/FontSize.js +5 -7
- package/lib/extensions/FontStyle.js +13 -11
- package/lib/extensions/FontWeight.js +6 -9
- package/lib/extensions/Link.js +1 -1
- package/lib/extensions/StylePreset.js +1 -15
- package/lib/extensions/Superscript.js +23 -1
- package/lib/extensions/TextDecoration.js +16 -20
- package/lib/extensions/__tests__/Alignment.test.js +10 -7
- package/lib/extensions/__tests__/BackgroundColor.test.js +6 -3
- package/lib/extensions/__tests__/CaseStyle.test.js +11 -7
- package/lib/extensions/__tests__/FontColor.test.js +6 -3
- package/lib/extensions/__tests__/FontFamily.test.js +29 -22
- package/lib/extensions/__tests__/FontSize.test.js +24 -17
- package/lib/extensions/__tests__/FontStyle.test.js +22 -16
- package/lib/extensions/__tests__/FontWeight.test.js +28 -21
- package/lib/extensions/__tests__/LineHeight.test.js +14 -11
- package/lib/extensions/__tests__/Link.test.js +14 -10
- package/lib/extensions/__tests__/Margin.test.js +2 -2
- package/lib/extensions/__tests__/StylePreset.test.js +49 -100
- package/lib/extensions/__tests__/TextDecoration.test.js +59 -37
- package/lib/extensions/__tests__/__snapshots__/BackgroundColor.test.js.snap +25 -25
- package/lib/extensions/__tests__/__snapshots__/FontColor.test.js.snap +25 -25
- package/lib/extensions/__tests__/__snapshots__/FontFamily.test.js.snap +105 -105
- package/lib/extensions/__tests__/__snapshots__/FontSize.test.js.snap +72 -72
- package/lib/extensions/__tests__/__snapshots__/FontStyle.test.js.snap +54 -46
- package/lib/extensions/__tests__/__snapshots__/FontWeight.test.js.snap +77 -77
- package/lib/extensions/__tests__/__snapshots__/TextDecoration.test.js.snap +68 -3
- package/lib/extensions/core/Document.js +5 -0
- package/lib/extensions/core/Heading.js +10 -0
- package/lib/extensions/core/NodeProcessor.js +112 -10
- package/lib/extensions/core/Paragraph.js +9 -0
- package/lib/extensions/core/TextProcessor.js +9 -16
- package/lib/extensions/core/__tests__/NodeProcessor.test.js +137 -10
- package/lib/extensions/core/__tests__/SelectionProcessor.test.js +2 -2
- package/lib/extensions/core/__tests__/TextProcessor.test.js +18 -41
- package/lib/extensions/core/__tests__/__snapshots__/NodeProcessor.test.js.snap +192 -0
- package/lib/extensions/core/__tests__/__snapshots__/TextProcessor.test.js.snap +7 -27
- package/lib/extensions/core/index.js +5 -5
- package/lib/extensions/core/steps/AddNodeMarkStep.js +60 -0
- package/lib/extensions/core/steps/AttrStep.js +54 -0
- package/lib/extensions/core/steps/RemoveNodeMarkStep.js +50 -0
- package/lib/extensions/core/steps/index.js +3 -0
- package/lib/extensions/list/List.js +1 -0
- package/lib/extensions/list/ListItem.js +5 -0
- package/lib/extensions/list/__tests__/List.test.js +30 -25
- package/lib/services/NodeFactory.js +25 -21
- package/lib/services/index.js +1 -1
- package/lib/services/normalizer/BaseNormalizer.js +11 -0
- package/lib/services/{BrowserDomParser.js → normalizer/BrowserDomParser.js} +0 -0
- package/lib/services/normalizer/ContentNormalizer.js +24 -0
- package/lib/services/normalizer/HtmlNormalizer.js +245 -0
- package/lib/services/normalizer/JsonNormalizer.js +81 -0
- package/lib/services/{__tests__/ContentNormalizer.test.js → normalizer/__tests__/HtmlNormalizer.test.js} +27 -67
- package/lib/services/normalizer/__tests__/JsonNormalizer.test.js +70 -0
- package/lib/services/normalizer/__tests__/__snapshots__/JsonNormalizer.test.js.snap +159 -0
- package/lib/services/normalizer/index.js +1 -0
- package/lib/styles/content.css +8 -0
- package/lib/utils/findMarkByType.js +5 -0
- package/lib/utils/index.js +5 -0
- package/lib/utils/isMarkAppliedToParent.js +10 -0
- package/lib/utils/isNodeFullySelected.js +10 -0
- package/lib/utils/resolveNodePosition.js +6 -0
- package/lib/utils/resolveTextPosition.js +6 -0
- package/package.json +3 -1
- package/lib/assets/icons/indicator.svg +0 -5
- package/lib/services/ContentNormalizer.js +0 -293
|
@@ -6,30 +6,30 @@ Object {
|
|
|
6
6
|
Object {
|
|
7
7
|
"content": Array [
|
|
8
8
|
Object {
|
|
9
|
-
"marks": Array [
|
|
10
|
-
Object {
|
|
11
|
-
"attrs": Object {
|
|
12
|
-
"value": "Bungee",
|
|
13
|
-
},
|
|
14
|
-
"type": "font_family",
|
|
15
|
-
},
|
|
16
|
-
Object {
|
|
17
|
-
"attrs": Object {
|
|
18
|
-
"value": "400",
|
|
19
|
-
},
|
|
20
|
-
"type": "font_weight",
|
|
21
|
-
},
|
|
22
|
-
Object {
|
|
23
|
-
"attrs": Object {
|
|
24
|
-
"italic": false,
|
|
25
|
-
},
|
|
26
|
-
"type": "font_style",
|
|
27
|
-
},
|
|
28
|
-
],
|
|
29
9
|
"text": "hello world",
|
|
30
10
|
"type": "text",
|
|
31
11
|
},
|
|
32
12
|
],
|
|
13
|
+
"marks": Array [
|
|
14
|
+
Object {
|
|
15
|
+
"attrs": Object {
|
|
16
|
+
"value": "Bungee",
|
|
17
|
+
},
|
|
18
|
+
"type": "font_family",
|
|
19
|
+
},
|
|
20
|
+
Object {
|
|
21
|
+
"attrs": Object {
|
|
22
|
+
"value": "400",
|
|
23
|
+
},
|
|
24
|
+
"type": "font_weight",
|
|
25
|
+
},
|
|
26
|
+
Object {
|
|
27
|
+
"attrs": Object {
|
|
28
|
+
"italic": false,
|
|
29
|
+
},
|
|
30
|
+
"type": "font_style",
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
33
|
"type": "paragraph",
|
|
34
34
|
},
|
|
35
35
|
],
|
|
@@ -43,24 +43,24 @@ Object {
|
|
|
43
43
|
Object {
|
|
44
44
|
"content": Array [
|
|
45
45
|
Object {
|
|
46
|
-
"marks": Array [
|
|
47
|
-
Object {
|
|
48
|
-
"attrs": Object {
|
|
49
|
-
"value": "Bungee",
|
|
50
|
-
},
|
|
51
|
-
"type": "font_family",
|
|
52
|
-
},
|
|
53
|
-
Object {
|
|
54
|
-
"attrs": Object {
|
|
55
|
-
"italic": false,
|
|
56
|
-
},
|
|
57
|
-
"type": "font_style",
|
|
58
|
-
},
|
|
59
|
-
],
|
|
60
46
|
"text": "hello world",
|
|
61
47
|
"type": "text",
|
|
62
48
|
},
|
|
63
49
|
],
|
|
50
|
+
"marks": Array [
|
|
51
|
+
Object {
|
|
52
|
+
"attrs": Object {
|
|
53
|
+
"value": "Bungee",
|
|
54
|
+
},
|
|
55
|
+
"type": "font_family",
|
|
56
|
+
},
|
|
57
|
+
Object {
|
|
58
|
+
"attrs": Object {
|
|
59
|
+
"italic": false,
|
|
60
|
+
},
|
|
61
|
+
"type": "font_style",
|
|
62
|
+
},
|
|
63
|
+
],
|
|
64
64
|
"type": "paragraph",
|
|
65
65
|
},
|
|
66
66
|
],
|
|
@@ -74,24 +74,24 @@ Object {
|
|
|
74
74
|
Object {
|
|
75
75
|
"content": Array [
|
|
76
76
|
Object {
|
|
77
|
-
"marks": Array [
|
|
78
|
-
Object {
|
|
79
|
-
"attrs": Object {
|
|
80
|
-
"value": "Lato",
|
|
81
|
-
},
|
|
82
|
-
"type": "font_family",
|
|
83
|
-
},
|
|
84
|
-
Object {
|
|
85
|
-
"attrs": Object {
|
|
86
|
-
"value": "700",
|
|
87
|
-
},
|
|
88
|
-
"type": "font_weight",
|
|
89
|
-
},
|
|
90
|
-
],
|
|
91
77
|
"text": "hello world",
|
|
92
78
|
"type": "text",
|
|
93
79
|
},
|
|
94
80
|
],
|
|
81
|
+
"marks": Array [
|
|
82
|
+
Object {
|
|
83
|
+
"attrs": Object {
|
|
84
|
+
"value": "Lato",
|
|
85
|
+
},
|
|
86
|
+
"type": "font_family",
|
|
87
|
+
},
|
|
88
|
+
Object {
|
|
89
|
+
"attrs": Object {
|
|
90
|
+
"value": "700",
|
|
91
|
+
},
|
|
92
|
+
"type": "font_weight",
|
|
93
|
+
},
|
|
94
|
+
],
|
|
95
95
|
"type": "paragraph",
|
|
96
96
|
},
|
|
97
97
|
],
|
|
@@ -105,30 +105,30 @@ Object {
|
|
|
105
105
|
Object {
|
|
106
106
|
"content": Array [
|
|
107
107
|
Object {
|
|
108
|
-
"marks": Array [
|
|
109
|
-
Object {
|
|
110
|
-
"attrs": Object {
|
|
111
|
-
"value": "Lato",
|
|
112
|
-
},
|
|
113
|
-
"type": "font_family",
|
|
114
|
-
},
|
|
115
|
-
Object {
|
|
116
|
-
"attrs": Object {
|
|
117
|
-
"value": "700",
|
|
118
|
-
},
|
|
119
|
-
"type": "font_weight",
|
|
120
|
-
},
|
|
121
|
-
Object {
|
|
122
|
-
"attrs": Object {
|
|
123
|
-
"italic": true,
|
|
124
|
-
},
|
|
125
|
-
"type": "font_style",
|
|
126
|
-
},
|
|
127
|
-
],
|
|
128
108
|
"text": "hello world",
|
|
129
109
|
"type": "text",
|
|
130
110
|
},
|
|
131
111
|
],
|
|
112
|
+
"marks": Array [
|
|
113
|
+
Object {
|
|
114
|
+
"attrs": Object {
|
|
115
|
+
"value": "Lato",
|
|
116
|
+
},
|
|
117
|
+
"type": "font_family",
|
|
118
|
+
},
|
|
119
|
+
Object {
|
|
120
|
+
"attrs": Object {
|
|
121
|
+
"value": "700",
|
|
122
|
+
},
|
|
123
|
+
"type": "font_weight",
|
|
124
|
+
},
|
|
125
|
+
Object {
|
|
126
|
+
"attrs": Object {
|
|
127
|
+
"italic": true,
|
|
128
|
+
},
|
|
129
|
+
"type": "font_style",
|
|
130
|
+
},
|
|
131
|
+
],
|
|
132
132
|
"type": "paragraph",
|
|
133
133
|
},
|
|
134
134
|
],
|
|
@@ -142,30 +142,30 @@ Object {
|
|
|
142
142
|
Object {
|
|
143
143
|
"content": Array [
|
|
144
144
|
Object {
|
|
145
|
-
"marks": Array [
|
|
146
|
-
Object {
|
|
147
|
-
"attrs": Object {
|
|
148
|
-
"value": "Bungee",
|
|
149
|
-
},
|
|
150
|
-
"type": "font_family",
|
|
151
|
-
},
|
|
152
|
-
Object {
|
|
153
|
-
"attrs": Object {
|
|
154
|
-
"value": "400",
|
|
155
|
-
},
|
|
156
|
-
"type": "font_weight",
|
|
157
|
-
},
|
|
158
|
-
Object {
|
|
159
|
-
"attrs": Object {
|
|
160
|
-
"italic": false,
|
|
161
|
-
},
|
|
162
|
-
"type": "font_style",
|
|
163
|
-
},
|
|
164
|
-
],
|
|
165
145
|
"text": "hello world",
|
|
166
146
|
"type": "text",
|
|
167
147
|
},
|
|
168
148
|
],
|
|
149
|
+
"marks": Array [
|
|
150
|
+
Object {
|
|
151
|
+
"attrs": Object {
|
|
152
|
+
"value": "Bungee",
|
|
153
|
+
},
|
|
154
|
+
"type": "font_family",
|
|
155
|
+
},
|
|
156
|
+
Object {
|
|
157
|
+
"attrs": Object {
|
|
158
|
+
"value": "400",
|
|
159
|
+
},
|
|
160
|
+
"type": "font_weight",
|
|
161
|
+
},
|
|
162
|
+
Object {
|
|
163
|
+
"attrs": Object {
|
|
164
|
+
"italic": false,
|
|
165
|
+
},
|
|
166
|
+
"type": "font_style",
|
|
167
|
+
},
|
|
168
|
+
],
|
|
169
169
|
"type": "paragraph",
|
|
170
170
|
},
|
|
171
171
|
],
|
|
@@ -237,18 +237,18 @@ Object {
|
|
|
237
237
|
Object {
|
|
238
238
|
"content": Array [
|
|
239
239
|
Object {
|
|
240
|
-
"marks": Array [
|
|
241
|
-
Object {
|
|
242
|
-
"attrs": Object {
|
|
243
|
-
"value": "Lato",
|
|
244
|
-
},
|
|
245
|
-
"type": "font_family",
|
|
246
|
-
},
|
|
247
|
-
],
|
|
248
240
|
"text": "test",
|
|
249
241
|
"type": "text",
|
|
250
242
|
},
|
|
251
243
|
],
|
|
244
|
+
"marks": Array [
|
|
245
|
+
Object {
|
|
246
|
+
"attrs": Object {
|
|
247
|
+
"value": "Lato",
|
|
248
|
+
},
|
|
249
|
+
"type": "font_family",
|
|
250
|
+
},
|
|
251
|
+
],
|
|
252
252
|
"type": "paragraph",
|
|
253
253
|
},
|
|
254
254
|
],
|
|
@@ -332,18 +332,18 @@ Object {
|
|
|
332
332
|
"type": "text",
|
|
333
333
|
},
|
|
334
334
|
Object {
|
|
335
|
-
"marks": Array [
|
|
336
|
-
Object {
|
|
337
|
-
"attrs": Object {
|
|
338
|
-
"value": "Lato",
|
|
339
|
-
},
|
|
340
|
-
"type": "font_family",
|
|
341
|
-
},
|
|
342
|
-
],
|
|
343
335
|
"text": " ipsum",
|
|
344
336
|
"type": "text",
|
|
345
337
|
},
|
|
346
338
|
],
|
|
339
|
+
"marks": Array [
|
|
340
|
+
Object {
|
|
341
|
+
"attrs": Object {
|
|
342
|
+
"value": "Lato",
|
|
343
|
+
},
|
|
344
|
+
"type": "font_family",
|
|
345
|
+
},
|
|
346
|
+
],
|
|
347
347
|
"type": "paragraph",
|
|
348
348
|
},
|
|
349
349
|
],
|
|
@@ -351,4 +351,4 @@ Object {
|
|
|
351
351
|
}
|
|
352
352
|
`;
|
|
353
353
|
|
|
354
|
-
exports[`rendering should render html 1`] = `"<
|
|
354
|
+
exports[`rendering should render html 1`] = `"<span style="--zw-font-family:"Bungee";" class="zw-style"><p class="zw-style">hello world</p></span>"`;
|
|
@@ -6,20 +6,20 @@ Object {
|
|
|
6
6
|
Object {
|
|
7
7
|
"content": Array [
|
|
8
8
|
Object {
|
|
9
|
-
"marks": Array [
|
|
10
|
-
Object {
|
|
11
|
-
"attrs": Object {
|
|
12
|
-
"desktop": "16",
|
|
13
|
-
"mobile": null,
|
|
14
|
-
"tablet": "16",
|
|
15
|
-
},
|
|
16
|
-
"type": "font_size",
|
|
17
|
-
},
|
|
18
|
-
],
|
|
19
9
|
"text": "hello world",
|
|
20
10
|
"type": "text",
|
|
21
11
|
},
|
|
22
12
|
],
|
|
13
|
+
"marks": Array [
|
|
14
|
+
Object {
|
|
15
|
+
"attrs": Object {
|
|
16
|
+
"desktop": "16",
|
|
17
|
+
"mobile": null,
|
|
18
|
+
"tablet": "16",
|
|
19
|
+
},
|
|
20
|
+
"type": "font_size",
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
23
|
"type": "paragraph",
|
|
24
24
|
},
|
|
25
25
|
],
|
|
@@ -33,20 +33,20 @@ Object {
|
|
|
33
33
|
Object {
|
|
34
34
|
"content": Array [
|
|
35
35
|
Object {
|
|
36
|
-
"marks": Array [
|
|
37
|
-
Object {
|
|
38
|
-
"attrs": Object {
|
|
39
|
-
"desktop": "13",
|
|
40
|
-
"mobile": null,
|
|
41
|
-
"tablet": "13",
|
|
42
|
-
},
|
|
43
|
-
"type": "font_size",
|
|
44
|
-
},
|
|
45
|
-
],
|
|
46
36
|
"text": "hello world",
|
|
47
37
|
"type": "text",
|
|
48
38
|
},
|
|
49
39
|
],
|
|
40
|
+
"marks": Array [
|
|
41
|
+
Object {
|
|
42
|
+
"attrs": Object {
|
|
43
|
+
"desktop": "13",
|
|
44
|
+
"mobile": null,
|
|
45
|
+
"tablet": "13",
|
|
46
|
+
},
|
|
47
|
+
"type": "font_size",
|
|
48
|
+
},
|
|
49
|
+
],
|
|
50
50
|
"type": "paragraph",
|
|
51
51
|
},
|
|
52
52
|
],
|
|
@@ -60,20 +60,20 @@ Object {
|
|
|
60
60
|
Object {
|
|
61
61
|
"content": Array [
|
|
62
62
|
Object {
|
|
63
|
-
"marks": Array [
|
|
64
|
-
Object {
|
|
65
|
-
"attrs": Object {
|
|
66
|
-
"desktop": "15",
|
|
67
|
-
"mobile": null,
|
|
68
|
-
"tablet": "15",
|
|
69
|
-
},
|
|
70
|
-
"type": "font_size",
|
|
71
|
-
},
|
|
72
|
-
],
|
|
73
63
|
"text": "hello world",
|
|
74
64
|
"type": "text",
|
|
75
65
|
},
|
|
76
66
|
],
|
|
67
|
+
"marks": Array [
|
|
68
|
+
Object {
|
|
69
|
+
"attrs": Object {
|
|
70
|
+
"desktop": "15",
|
|
71
|
+
"mobile": null,
|
|
72
|
+
"tablet": "15",
|
|
73
|
+
},
|
|
74
|
+
"type": "font_size",
|
|
75
|
+
},
|
|
76
|
+
],
|
|
77
77
|
"type": "paragraph",
|
|
78
78
|
},
|
|
79
79
|
],
|
|
@@ -87,20 +87,20 @@ Object {
|
|
|
87
87
|
Object {
|
|
88
88
|
"content": Array [
|
|
89
89
|
Object {
|
|
90
|
-
"marks": Array [
|
|
91
|
-
Object {
|
|
92
|
-
"attrs": Object {
|
|
93
|
-
"desktop": "5",
|
|
94
|
-
"mobile": null,
|
|
95
|
-
"tablet": "5",
|
|
96
|
-
},
|
|
97
|
-
"type": "font_size",
|
|
98
|
-
},
|
|
99
|
-
],
|
|
100
90
|
"text": "hello world",
|
|
101
91
|
"type": "text",
|
|
102
92
|
},
|
|
103
93
|
],
|
|
94
|
+
"marks": Array [
|
|
95
|
+
Object {
|
|
96
|
+
"attrs": Object {
|
|
97
|
+
"desktop": "5",
|
|
98
|
+
"mobile": null,
|
|
99
|
+
"tablet": "5",
|
|
100
|
+
},
|
|
101
|
+
"type": "font_size",
|
|
102
|
+
},
|
|
103
|
+
],
|
|
104
104
|
"type": "paragraph",
|
|
105
105
|
},
|
|
106
106
|
],
|
|
@@ -114,20 +114,20 @@ Object {
|
|
|
114
114
|
Object {
|
|
115
115
|
"content": Array [
|
|
116
116
|
Object {
|
|
117
|
-
"marks": Array [
|
|
118
|
-
Object {
|
|
119
|
-
"attrs": Object {
|
|
120
|
-
"desktop": "20",
|
|
121
|
-
"mobile": null,
|
|
122
|
-
"tablet": "20",
|
|
123
|
-
},
|
|
124
|
-
"type": "font_size",
|
|
125
|
-
},
|
|
126
|
-
],
|
|
127
117
|
"text": "hello world",
|
|
128
118
|
"type": "text",
|
|
129
119
|
},
|
|
130
120
|
],
|
|
121
|
+
"marks": Array [
|
|
122
|
+
Object {
|
|
123
|
+
"attrs": Object {
|
|
124
|
+
"desktop": "20",
|
|
125
|
+
"mobile": null,
|
|
126
|
+
"tablet": "20",
|
|
127
|
+
},
|
|
128
|
+
"type": "font_size",
|
|
129
|
+
},
|
|
130
|
+
],
|
|
131
131
|
"type": "paragraph",
|
|
132
132
|
},
|
|
133
133
|
],
|
|
@@ -141,20 +141,20 @@ Object {
|
|
|
141
141
|
Object {
|
|
142
142
|
"content": Array [
|
|
143
143
|
Object {
|
|
144
|
-
"marks": Array [
|
|
145
|
-
Object {
|
|
146
|
-
"attrs": Object {
|
|
147
|
-
"desktop": "24",
|
|
148
|
-
"mobile": null,
|
|
149
|
-
"tablet": "24",
|
|
150
|
-
},
|
|
151
|
-
"type": "font_size",
|
|
152
|
-
},
|
|
153
|
-
],
|
|
154
144
|
"text": "test",
|
|
155
145
|
"type": "text",
|
|
156
146
|
},
|
|
157
147
|
],
|
|
148
|
+
"marks": Array [
|
|
149
|
+
Object {
|
|
150
|
+
"attrs": Object {
|
|
151
|
+
"desktop": "24",
|
|
152
|
+
"mobile": null,
|
|
153
|
+
"tablet": "24",
|
|
154
|
+
},
|
|
155
|
+
"type": "font_size",
|
|
156
|
+
},
|
|
157
|
+
],
|
|
158
158
|
"type": "paragraph",
|
|
159
159
|
},
|
|
160
160
|
],
|
|
@@ -244,20 +244,20 @@ Object {
|
|
|
244
244
|
"type": "text",
|
|
245
245
|
},
|
|
246
246
|
Object {
|
|
247
|
-
"marks": Array [
|
|
248
|
-
Object {
|
|
249
|
-
"attrs": Object {
|
|
250
|
-
"desktop": "24",
|
|
251
|
-
"mobile": null,
|
|
252
|
-
"tablet": "24",
|
|
253
|
-
},
|
|
254
|
-
"type": "font_size",
|
|
255
|
-
},
|
|
256
|
-
],
|
|
257
247
|
"text": " ipsum",
|
|
258
248
|
"type": "text",
|
|
259
249
|
},
|
|
260
250
|
],
|
|
251
|
+
"marks": Array [
|
|
252
|
+
Object {
|
|
253
|
+
"attrs": Object {
|
|
254
|
+
"desktop": "24",
|
|
255
|
+
"mobile": null,
|
|
256
|
+
"tablet": "24",
|
|
257
|
+
},
|
|
258
|
+
"type": "font_size",
|
|
259
|
+
},
|
|
260
|
+
],
|
|
261
261
|
"type": "paragraph",
|
|
262
262
|
},
|
|
263
263
|
],
|
|
@@ -265,6 +265,6 @@ Object {
|
|
|
265
265
|
}
|
|
266
266
|
`;
|
|
267
267
|
|
|
268
|
-
exports[`rendering should render all devices 1`] = `"<
|
|
268
|
+
exports[`rendering should render all devices 1`] = `"<span style="--zw-font-size-mobile:12px;--zw-font-size-tablet:14px;--zw-font-size-desktop:16px;" class="zw-style"><p class="zw-style">hello world</p></span>"`;
|
|
269
269
|
|
|
270
|
-
exports[`rendering should render only desktop 1`] = `"<
|
|
270
|
+
exports[`rendering should render only desktop 1`] = `"<span style="--zw-font-size-desktop:14px;" class="zw-style"><p class="zw-style">hello world</p></span>"`;
|
|
@@ -6,18 +6,18 @@ Object {
|
|
|
6
6
|
Object {
|
|
7
7
|
"content": Array [
|
|
8
8
|
Object {
|
|
9
|
-
"marks": Array [
|
|
10
|
-
Object {
|
|
11
|
-
"attrs": Object {
|
|
12
|
-
"italic": true,
|
|
13
|
-
},
|
|
14
|
-
"type": "font_style",
|
|
15
|
-
},
|
|
16
|
-
],
|
|
17
9
|
"text": "hello world",
|
|
18
10
|
"type": "text",
|
|
19
11
|
},
|
|
20
12
|
],
|
|
13
|
+
"marks": Array [
|
|
14
|
+
Object {
|
|
15
|
+
"attrs": Object {
|
|
16
|
+
"italic": true,
|
|
17
|
+
},
|
|
18
|
+
"type": "font_style",
|
|
19
|
+
},
|
|
20
|
+
],
|
|
21
21
|
"type": "paragraph",
|
|
22
22
|
},
|
|
23
23
|
],
|
|
@@ -31,18 +31,18 @@ Object {
|
|
|
31
31
|
Object {
|
|
32
32
|
"content": Array [
|
|
33
33
|
Object {
|
|
34
|
-
"marks": Array [
|
|
35
|
-
Object {
|
|
36
|
-
"attrs": Object {
|
|
37
|
-
"italic": false,
|
|
38
|
-
},
|
|
39
|
-
"type": "font_style",
|
|
40
|
-
},
|
|
41
|
-
],
|
|
42
34
|
"text": "hello world",
|
|
43
35
|
"type": "text",
|
|
44
36
|
},
|
|
45
37
|
],
|
|
38
|
+
"marks": Array [
|
|
39
|
+
Object {
|
|
40
|
+
"attrs": Object {
|
|
41
|
+
"italic": false,
|
|
42
|
+
},
|
|
43
|
+
"type": "font_style",
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
46
|
"type": "paragraph",
|
|
47
47
|
},
|
|
48
48
|
],
|
|
@@ -56,18 +56,18 @@ Object {
|
|
|
56
56
|
Object {
|
|
57
57
|
"content": Array [
|
|
58
58
|
Object {
|
|
59
|
-
"marks": Array [
|
|
60
|
-
Object {
|
|
61
|
-
"attrs": Object {
|
|
62
|
-
"italic": false,
|
|
63
|
-
},
|
|
64
|
-
"type": "font_style",
|
|
65
|
-
},
|
|
66
|
-
],
|
|
67
59
|
"text": "hello world",
|
|
68
60
|
"type": "text",
|
|
69
61
|
},
|
|
70
62
|
],
|
|
63
|
+
"marks": Array [
|
|
64
|
+
Object {
|
|
65
|
+
"attrs": Object {
|
|
66
|
+
"italic": false,
|
|
67
|
+
},
|
|
68
|
+
"type": "font_style",
|
|
69
|
+
},
|
|
70
|
+
],
|
|
71
71
|
"type": "paragraph",
|
|
72
72
|
},
|
|
73
73
|
],
|
|
@@ -81,18 +81,18 @@ Object {
|
|
|
81
81
|
Object {
|
|
82
82
|
"content": Array [
|
|
83
83
|
Object {
|
|
84
|
-
"marks": Array [
|
|
85
|
-
Object {
|
|
86
|
-
"attrs": Object {
|
|
87
|
-
"italic": true,
|
|
88
|
-
},
|
|
89
|
-
"type": "font_style",
|
|
90
|
-
},
|
|
91
|
-
],
|
|
92
84
|
"text": "hello world",
|
|
93
85
|
"type": "text",
|
|
94
86
|
},
|
|
95
87
|
],
|
|
88
|
+
"marks": Array [
|
|
89
|
+
Object {
|
|
90
|
+
"attrs": Object {
|
|
91
|
+
"italic": true,
|
|
92
|
+
},
|
|
93
|
+
"type": "font_style",
|
|
94
|
+
},
|
|
95
|
+
],
|
|
96
96
|
"type": "paragraph",
|
|
97
97
|
},
|
|
98
98
|
],
|
|
@@ -135,18 +135,18 @@ Object {
|
|
|
135
135
|
Object {
|
|
136
136
|
"content": Array [
|
|
137
137
|
Object {
|
|
138
|
-
"marks": Array [
|
|
139
|
-
Object {
|
|
140
|
-
"attrs": Object {
|
|
141
|
-
"italic": true,
|
|
142
|
-
},
|
|
143
|
-
"type": "font_style",
|
|
144
|
-
},
|
|
145
|
-
],
|
|
146
138
|
"text": "test",
|
|
147
139
|
"type": "text",
|
|
148
140
|
},
|
|
149
141
|
],
|
|
142
|
+
"marks": Array [
|
|
143
|
+
Object {
|
|
144
|
+
"attrs": Object {
|
|
145
|
+
"italic": true,
|
|
146
|
+
},
|
|
147
|
+
"type": "font_style",
|
|
148
|
+
},
|
|
149
|
+
],
|
|
150
150
|
"type": "paragraph",
|
|
151
151
|
},
|
|
152
152
|
],
|
|
@@ -217,23 +217,31 @@ Object {
|
|
|
217
217
|
"content": Array [
|
|
218
218
|
Object {
|
|
219
219
|
"content": Array [
|
|
220
|
-
Object {
|
|
221
|
-
"text": "lorem",
|
|
222
|
-
"type": "text",
|
|
223
|
-
},
|
|
224
220
|
Object {
|
|
225
221
|
"marks": Array [
|
|
226
222
|
Object {
|
|
227
223
|
"attrs": Object {
|
|
228
|
-
"italic":
|
|
224
|
+
"italic": false,
|
|
229
225
|
},
|
|
230
226
|
"type": "font_style",
|
|
231
227
|
},
|
|
232
228
|
],
|
|
229
|
+
"text": "lorem",
|
|
230
|
+
"type": "text",
|
|
231
|
+
},
|
|
232
|
+
Object {
|
|
233
233
|
"text": " ipsum",
|
|
234
234
|
"type": "text",
|
|
235
235
|
},
|
|
236
236
|
],
|
|
237
|
+
"marks": Array [
|
|
238
|
+
Object {
|
|
239
|
+
"attrs": Object {
|
|
240
|
+
"italic": true,
|
|
241
|
+
},
|
|
242
|
+
"type": "font_style",
|
|
243
|
+
},
|
|
244
|
+
],
|
|
237
245
|
"type": "paragraph",
|
|
238
246
|
},
|
|
239
247
|
],
|
|
@@ -241,4 +249,4 @@ Object {
|
|
|
241
249
|
}
|
|
242
250
|
`;
|
|
243
251
|
|
|
244
|
-
exports[`rendering should render html 1`] = `"<
|
|
252
|
+
exports[`rendering should render html 1`] = `"<span style="--zw-font-style:italic;" class="zw-style"><p class="zw-style">hello world</p></span>"`;
|