@contentful/field-editor-markdown 1.11.1 → 1.11.2
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/dist/cjs/components/InsertLinkSelector.js +3 -3
- package/dist/cjs/components/MarkdownToolbar.js +10 -10
- package/dist/cjs/dialogs/ZenModeModalDialog.js +4 -4
- package/dist/esm/components/InsertLinkSelector.js +4 -4
- package/dist/esm/components/MarkdownToolbar.js +11 -11
- package/dist/esm/dialogs/ZenModeModalDialog.js +5 -5
- package/package.json +7 -7
|
@@ -58,7 +58,7 @@ const InsertLinkSelector = (props)=>{
|
|
|
58
58
|
} else {
|
|
59
59
|
return /*#__PURE__*/ _react.createElement(_f36components.Button, {
|
|
60
60
|
isDisabled: props.disabled,
|
|
61
|
-
startIcon: /*#__PURE__*/ _react.createElement(_f36icons.
|
|
61
|
+
startIcon: /*#__PURE__*/ _react.createElement(_f36icons.ImageSquareIcon, null),
|
|
62
62
|
testId: "markdownEditor.linkExistingAssets",
|
|
63
63
|
size: "small",
|
|
64
64
|
variant: "secondary",
|
|
@@ -72,9 +72,9 @@ const MultipleMediaContextMenu = (props)=>{
|
|
|
72
72
|
return /*#__PURE__*/ _react.createElement(_f36components.Menu, {
|
|
73
73
|
placement: "bottom-end"
|
|
74
74
|
}, /*#__PURE__*/ _react.createElement(_f36components.Menu.Trigger, null, /*#__PURE__*/ _react.createElement(_f36components.Button, {
|
|
75
|
-
endIcon: /*#__PURE__*/ _react.createElement(_f36icons.
|
|
75
|
+
endIcon: /*#__PURE__*/ _react.createElement(_f36icons.CaretDownIcon, null),
|
|
76
76
|
isDisabled: props.disabled,
|
|
77
|
-
startIcon: /*#__PURE__*/ _react.createElement(_f36icons.
|
|
77
|
+
startIcon: /*#__PURE__*/ _react.createElement(_f36icons.ImageSquareIcon, null),
|
|
78
78
|
testId: "markdownEditor.insertMediaDropdownTrigger",
|
|
79
79
|
size: "small",
|
|
80
80
|
variant: "secondary"
|
|
@@ -136,7 +136,7 @@ function MainButtons(props) {
|
|
|
136
136
|
testId: "markdown-action-button-heading",
|
|
137
137
|
tooltip: "Headings",
|
|
138
138
|
tooltipPlace: tooltipPlace
|
|
139
|
-
}, /*#__PURE__*/ _react.createElement(_f36icons.
|
|
139
|
+
}, /*#__PURE__*/ _react.createElement(_f36icons.TextHIcon, {
|
|
140
140
|
"aria-label": "Headings",
|
|
141
141
|
className: styles.icon
|
|
142
142
|
}))), /*#__PURE__*/ _react.createElement(ToolbarButton, {
|
|
@@ -145,7 +145,7 @@ function MainButtons(props) {
|
|
|
145
145
|
tooltip: "Bold",
|
|
146
146
|
tooltipPlace: tooltipPlace,
|
|
147
147
|
onClick: props.actions.simple.bold
|
|
148
|
-
}, /*#__PURE__*/ _react.createElement(_f36icons.
|
|
148
|
+
}, /*#__PURE__*/ _react.createElement(_f36icons.TextBIcon, {
|
|
149
149
|
"aria-label": "Bold",
|
|
150
150
|
className: styles.icon
|
|
151
151
|
})), /*#__PURE__*/ _react.createElement(ToolbarButton, {
|
|
@@ -154,7 +154,7 @@ function MainButtons(props) {
|
|
|
154
154
|
tooltip: "Italic",
|
|
155
155
|
tooltipPlace: tooltipPlace,
|
|
156
156
|
onClick: props.actions.simple.italic
|
|
157
|
-
}, /*#__PURE__*/ _react.createElement(_f36icons.
|
|
157
|
+
}, /*#__PURE__*/ _react.createElement(_f36icons.TextItalicIcon, {
|
|
158
158
|
"aria-label": "Italic",
|
|
159
159
|
className: styles.icon
|
|
160
160
|
})), /*#__PURE__*/ _react.createElement(ToolbarButton, {
|
|
@@ -163,7 +163,7 @@ function MainButtons(props) {
|
|
|
163
163
|
tooltip: "Quote",
|
|
164
164
|
tooltipPlace: tooltipPlace,
|
|
165
165
|
onClick: props.actions.simple.quote
|
|
166
|
-
}, /*#__PURE__*/ _react.createElement(_f36icons.
|
|
166
|
+
}, /*#__PURE__*/ _react.createElement(_f36icons.QuotesIcon, {
|
|
167
167
|
"aria-label": "Quote",
|
|
168
168
|
className: styles.icon
|
|
169
169
|
})), /*#__PURE__*/ _react.createElement(ToolbarButton, {
|
|
@@ -172,7 +172,7 @@ function MainButtons(props) {
|
|
|
172
172
|
tooltip: "Unordered list",
|
|
173
173
|
tooltipPlace: tooltipPlace,
|
|
174
174
|
onClick: props.actions.simple.ul
|
|
175
|
-
}, /*#__PURE__*/ _react.createElement(_f36icons.
|
|
175
|
+
}, /*#__PURE__*/ _react.createElement(_f36icons.ListBulletsIcon, {
|
|
176
176
|
"aria-label": "Unordered list",
|
|
177
177
|
className: styles.icon
|
|
178
178
|
})), /*#__PURE__*/ _react.createElement(ToolbarButton, {
|
|
@@ -181,7 +181,7 @@ function MainButtons(props) {
|
|
|
181
181
|
tooltip: "Ordered list",
|
|
182
182
|
tooltipPlace: tooltipPlace,
|
|
183
183
|
onClick: props.actions.simple.ol
|
|
184
|
-
}, /*#__PURE__*/ _react.createElement(_f36icons.
|
|
184
|
+
}, /*#__PURE__*/ _react.createElement(_f36icons.ListNumbersIcon, {
|
|
185
185
|
"aria-label": "Ordered list",
|
|
186
186
|
className: styles.icon
|
|
187
187
|
})), /*#__PURE__*/ _react.createElement(ToolbarButton, {
|
|
@@ -190,7 +190,7 @@ function MainButtons(props) {
|
|
|
190
190
|
tooltip: "Link",
|
|
191
191
|
tooltipPlace: tooltipPlace,
|
|
192
192
|
onClick: props.actions.insertLink
|
|
193
|
-
}, /*#__PURE__*/ _react.createElement(_f36icons.
|
|
193
|
+
}, /*#__PURE__*/ _react.createElement(_f36icons.LinkSimpleIcon, {
|
|
194
194
|
"aria-label": "Link",
|
|
195
195
|
className: styles.icon
|
|
196
196
|
})));
|
|
@@ -212,7 +212,7 @@ function AdditionalButtons(props) {
|
|
|
212
212
|
tooltip: "Code block",
|
|
213
213
|
tooltipPlace: tooltipPlace,
|
|
214
214
|
onClick: props.actions.simple.code
|
|
215
|
-
}, /*#__PURE__*/ _react.createElement(_f36icons.
|
|
215
|
+
}, /*#__PURE__*/ _react.createElement(_f36icons.CodeSimpleIcon, {
|
|
216
216
|
"aria-label": "Code block",
|
|
217
217
|
className: styles.icon
|
|
218
218
|
})), /*#__PURE__*/ _react.createElement(ToolbarButton, {
|
|
@@ -221,7 +221,7 @@ function AdditionalButtons(props) {
|
|
|
221
221
|
tooltip: "Horizontal rule",
|
|
222
222
|
tooltipPlace: tooltipPlace,
|
|
223
223
|
onClick: props.actions.simple.hr
|
|
224
|
-
}, /*#__PURE__*/ _react.createElement(_f36icons.
|
|
224
|
+
}, /*#__PURE__*/ _react.createElement(_f36icons.MinusIcon, {
|
|
225
225
|
"aria-label": "Horizontal rule",
|
|
226
226
|
className: styles.icon
|
|
227
227
|
})), /*#__PURE__*/ _react.createElement(ToolbarButton, {
|
|
@@ -314,7 +314,7 @@ function DefaultMarkdownToolbar(props) {
|
|
|
314
314
|
onClick: ()=>{
|
|
315
315
|
setShowAdditional(!showAdditional);
|
|
316
316
|
}
|
|
317
|
-
}, /*#__PURE__*/ _react.createElement(_f36icons.
|
|
317
|
+
}, /*#__PURE__*/ _react.createElement(_f36icons.DotsThreeIcon, {
|
|
318
318
|
className: styles.icon
|
|
319
319
|
}))), /*#__PURE__*/ _react.createElement(_f36components.Flex, null, /*#__PURE__*/ _react.createElement(_InsertLinkSelector.InsertLinkSelector, {
|
|
320
320
|
disabled: props.disabled,
|
|
@@ -212,8 +212,8 @@ const ZenModeModalDialog = (props)=>{
|
|
|
212
212
|
onClick: ()=>{
|
|
213
213
|
setShowPreview(false);
|
|
214
214
|
}
|
|
215
|
-
}, /*#__PURE__*/ _react.createElement(_f36icons.
|
|
216
|
-
|
|
215
|
+
}, /*#__PURE__*/ _react.createElement(_f36icons.CaretRightIcon, {
|
|
216
|
+
color: _f36tokens.default.gray600,
|
|
217
217
|
size: "tiny",
|
|
218
218
|
className: styles.icon
|
|
219
219
|
})), !showPreview && /*#__PURE__*/ _react.createElement("button", {
|
|
@@ -222,8 +222,8 @@ const ZenModeModalDialog = (props)=>{
|
|
|
222
222
|
onClick: ()=>{
|
|
223
223
|
setShowPreview(true);
|
|
224
224
|
}
|
|
225
|
-
}, /*#__PURE__*/ _react.createElement(_f36icons.
|
|
226
|
-
|
|
225
|
+
}, /*#__PURE__*/ _react.createElement(_f36icons.CaretLeftIcon, {
|
|
226
|
+
color: _f36tokens.default.gray600,
|
|
227
227
|
size: "tiny",
|
|
228
228
|
className: styles.icon
|
|
229
229
|
})), /*#__PURE__*/ _react.createElement(_f36components.Grid.Item, {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Button, Menu } from '@contentful/f36-components';
|
|
3
|
-
import {
|
|
3
|
+
import { ImageSquareIcon, CaretDownIcon } from '@contentful/f36-icons';
|
|
4
4
|
export const InsertLinkSelector = (props)=>{
|
|
5
5
|
if (props.canAddNew) {
|
|
6
6
|
return /*#__PURE__*/ React.createElement(MultipleMediaContextMenu, props);
|
|
7
7
|
} else {
|
|
8
8
|
return /*#__PURE__*/ React.createElement(Button, {
|
|
9
9
|
isDisabled: props.disabled,
|
|
10
|
-
startIcon: /*#__PURE__*/ React.createElement(
|
|
10
|
+
startIcon: /*#__PURE__*/ React.createElement(ImageSquareIcon, null),
|
|
11
11
|
testId: "markdownEditor.linkExistingAssets",
|
|
12
12
|
size: "small",
|
|
13
13
|
variant: "secondary",
|
|
@@ -21,9 +21,9 @@ const MultipleMediaContextMenu = (props)=>{
|
|
|
21
21
|
return /*#__PURE__*/ React.createElement(Menu, {
|
|
22
22
|
placement: "bottom-end"
|
|
23
23
|
}, /*#__PURE__*/ React.createElement(Menu.Trigger, null, /*#__PURE__*/ React.createElement(Button, {
|
|
24
|
-
endIcon: /*#__PURE__*/ React.createElement(
|
|
24
|
+
endIcon: /*#__PURE__*/ React.createElement(CaretDownIcon, null),
|
|
25
25
|
isDisabled: props.disabled,
|
|
26
|
-
startIcon: /*#__PURE__*/ React.createElement(
|
|
26
|
+
startIcon: /*#__PURE__*/ React.createElement(ImageSquareIcon, null),
|
|
27
27
|
testId: "markdownEditor.insertMediaDropdownTrigger",
|
|
28
28
|
size: "small",
|
|
29
29
|
variant: "secondary"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Flex, IconButton, Tooltip } from '@contentful/f36-components';
|
|
3
|
-
import {
|
|
3
|
+
import { CodeSimpleIcon, TextBIcon, TextItalicIcon, TextHIcon, MinusIcon, LinkSimpleIcon, ListBulletsIcon, ListNumbersIcon, DotsThreeIcon, QuotesIcon } from '@contentful/f36-icons';
|
|
4
4
|
import tokens from '@contentful/f36-tokens';
|
|
5
5
|
import { css, cx } from 'emotion';
|
|
6
6
|
import { HeadingSelector } from './HeadingSelector';
|
|
@@ -69,7 +69,7 @@ function MainButtons(props) {
|
|
|
69
69
|
testId: "markdown-action-button-heading",
|
|
70
70
|
tooltip: "Headings",
|
|
71
71
|
tooltipPlace: tooltipPlace
|
|
72
|
-
}, /*#__PURE__*/ React.createElement(
|
|
72
|
+
}, /*#__PURE__*/ React.createElement(TextHIcon, {
|
|
73
73
|
"aria-label": "Headings",
|
|
74
74
|
className: styles.icon
|
|
75
75
|
}))), /*#__PURE__*/ React.createElement(ToolbarButton, {
|
|
@@ -78,7 +78,7 @@ function MainButtons(props) {
|
|
|
78
78
|
tooltip: "Bold",
|
|
79
79
|
tooltipPlace: tooltipPlace,
|
|
80
80
|
onClick: props.actions.simple.bold
|
|
81
|
-
}, /*#__PURE__*/ React.createElement(
|
|
81
|
+
}, /*#__PURE__*/ React.createElement(TextBIcon, {
|
|
82
82
|
"aria-label": "Bold",
|
|
83
83
|
className: styles.icon
|
|
84
84
|
})), /*#__PURE__*/ React.createElement(ToolbarButton, {
|
|
@@ -87,7 +87,7 @@ function MainButtons(props) {
|
|
|
87
87
|
tooltip: "Italic",
|
|
88
88
|
tooltipPlace: tooltipPlace,
|
|
89
89
|
onClick: props.actions.simple.italic
|
|
90
|
-
}, /*#__PURE__*/ React.createElement(
|
|
90
|
+
}, /*#__PURE__*/ React.createElement(TextItalicIcon, {
|
|
91
91
|
"aria-label": "Italic",
|
|
92
92
|
className: styles.icon
|
|
93
93
|
})), /*#__PURE__*/ React.createElement(ToolbarButton, {
|
|
@@ -96,7 +96,7 @@ function MainButtons(props) {
|
|
|
96
96
|
tooltip: "Quote",
|
|
97
97
|
tooltipPlace: tooltipPlace,
|
|
98
98
|
onClick: props.actions.simple.quote
|
|
99
|
-
}, /*#__PURE__*/ React.createElement(
|
|
99
|
+
}, /*#__PURE__*/ React.createElement(QuotesIcon, {
|
|
100
100
|
"aria-label": "Quote",
|
|
101
101
|
className: styles.icon
|
|
102
102
|
})), /*#__PURE__*/ React.createElement(ToolbarButton, {
|
|
@@ -105,7 +105,7 @@ function MainButtons(props) {
|
|
|
105
105
|
tooltip: "Unordered list",
|
|
106
106
|
tooltipPlace: tooltipPlace,
|
|
107
107
|
onClick: props.actions.simple.ul
|
|
108
|
-
}, /*#__PURE__*/ React.createElement(
|
|
108
|
+
}, /*#__PURE__*/ React.createElement(ListBulletsIcon, {
|
|
109
109
|
"aria-label": "Unordered list",
|
|
110
110
|
className: styles.icon
|
|
111
111
|
})), /*#__PURE__*/ React.createElement(ToolbarButton, {
|
|
@@ -114,7 +114,7 @@ function MainButtons(props) {
|
|
|
114
114
|
tooltip: "Ordered list",
|
|
115
115
|
tooltipPlace: tooltipPlace,
|
|
116
116
|
onClick: props.actions.simple.ol
|
|
117
|
-
}, /*#__PURE__*/ React.createElement(
|
|
117
|
+
}, /*#__PURE__*/ React.createElement(ListNumbersIcon, {
|
|
118
118
|
"aria-label": "Ordered list",
|
|
119
119
|
className: styles.icon
|
|
120
120
|
})), /*#__PURE__*/ React.createElement(ToolbarButton, {
|
|
@@ -123,7 +123,7 @@ function MainButtons(props) {
|
|
|
123
123
|
tooltip: "Link",
|
|
124
124
|
tooltipPlace: tooltipPlace,
|
|
125
125
|
onClick: props.actions.insertLink
|
|
126
|
-
}, /*#__PURE__*/ React.createElement(
|
|
126
|
+
}, /*#__PURE__*/ React.createElement(LinkSimpleIcon, {
|
|
127
127
|
"aria-label": "Link",
|
|
128
128
|
className: styles.icon
|
|
129
129
|
})));
|
|
@@ -145,7 +145,7 @@ function AdditionalButtons(props) {
|
|
|
145
145
|
tooltip: "Code block",
|
|
146
146
|
tooltipPlace: tooltipPlace,
|
|
147
147
|
onClick: props.actions.simple.code
|
|
148
|
-
}, /*#__PURE__*/ React.createElement(
|
|
148
|
+
}, /*#__PURE__*/ React.createElement(CodeSimpleIcon, {
|
|
149
149
|
"aria-label": "Code block",
|
|
150
150
|
className: styles.icon
|
|
151
151
|
})), /*#__PURE__*/ React.createElement(ToolbarButton, {
|
|
@@ -154,7 +154,7 @@ function AdditionalButtons(props) {
|
|
|
154
154
|
tooltip: "Horizontal rule",
|
|
155
155
|
tooltipPlace: tooltipPlace,
|
|
156
156
|
onClick: props.actions.simple.hr
|
|
157
|
-
}, /*#__PURE__*/ React.createElement(
|
|
157
|
+
}, /*#__PURE__*/ React.createElement(MinusIcon, {
|
|
158
158
|
"aria-label": "Horizontal rule",
|
|
159
159
|
className: styles.icon
|
|
160
160
|
})), /*#__PURE__*/ React.createElement(ToolbarButton, {
|
|
@@ -247,7 +247,7 @@ export function DefaultMarkdownToolbar(props) {
|
|
|
247
247
|
onClick: ()=>{
|
|
248
248
|
setShowAdditional(!showAdditional);
|
|
249
249
|
}
|
|
250
|
-
}, /*#__PURE__*/ React.createElement(
|
|
250
|
+
}, /*#__PURE__*/ React.createElement(DotsThreeIcon, {
|
|
251
251
|
className: styles.icon
|
|
252
252
|
}))), /*#__PURE__*/ React.createElement(Flex, null, /*#__PURE__*/ React.createElement(InsertLinkSelector, {
|
|
253
253
|
disabled: props.disabled,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Grid } from '@contentful/f36-components';
|
|
3
|
-
import {
|
|
3
|
+
import { CaretLeftIcon, CaretRightIcon } from '@contentful/f36-icons';
|
|
4
4
|
import tokens from '@contentful/f36-tokens';
|
|
5
5
|
import { css, cx } from 'emotion';
|
|
6
6
|
import { MarkdownBottomBar, MarkdownHelp } from '../components/MarkdownBottomBar';
|
|
@@ -148,8 +148,8 @@ export const ZenModeModalDialog = (props)=>{
|
|
|
148
148
|
onClick: ()=>{
|
|
149
149
|
setShowPreview(false);
|
|
150
150
|
}
|
|
151
|
-
}, /*#__PURE__*/ React.createElement(
|
|
152
|
-
|
|
151
|
+
}, /*#__PURE__*/ React.createElement(CaretRightIcon, {
|
|
152
|
+
color: tokens.gray600,
|
|
153
153
|
size: "tiny",
|
|
154
154
|
className: styles.icon
|
|
155
155
|
})), !showPreview && /*#__PURE__*/ React.createElement("button", {
|
|
@@ -158,8 +158,8 @@ export const ZenModeModalDialog = (props)=>{
|
|
|
158
158
|
onClick: ()=>{
|
|
159
159
|
setShowPreview(true);
|
|
160
160
|
}
|
|
161
|
-
}, /*#__PURE__*/ React.createElement(
|
|
162
|
-
|
|
161
|
+
}, /*#__PURE__*/ React.createElement(CaretLeftIcon, {
|
|
162
|
+
color: tokens.gray600,
|
|
163
163
|
size: "tiny",
|
|
164
164
|
className: styles.icon
|
|
165
165
|
})), /*#__PURE__*/ React.createElement(Grid.Item, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/field-editor-markdown",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.2",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -36,10 +36,10 @@
|
|
|
36
36
|
"tsc": "tsc -p ./ --noEmit"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@contentful/f36-components": "
|
|
40
|
-
"@contentful/f36-icons": "
|
|
41
|
-
"@contentful/f36-tokens": "
|
|
42
|
-
"@contentful/field-editor-shared": "^2.11.
|
|
39
|
+
"@contentful/f36-components": "5.1.1",
|
|
40
|
+
"@contentful/f36-icons": "5.1.1",
|
|
41
|
+
"@contentful/f36-tokens": "5.1.0",
|
|
42
|
+
"@contentful/field-editor-shared": "^2.11.2",
|
|
43
43
|
"@types/codemirror": "0.0.109",
|
|
44
44
|
"codemirror": "^5.65.11",
|
|
45
45
|
"constate": "^3.3.2",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@babel/core": "^7.5.5",
|
|
55
55
|
"@contentful/app-sdk": "^4.29.0",
|
|
56
|
-
"@contentful/field-editor-test-utils": "^1.6.
|
|
56
|
+
"@contentful/field-editor-test-utils": "^1.6.1",
|
|
57
57
|
"@lingui/core": "5.3.0"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"publishConfig": {
|
|
65
65
|
"registry": "https://npm.pkg.github.com/"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "8ab6bd7a3ce2979634ab53673c6b122a6b1b5efb"
|
|
68
68
|
}
|