@atlaskit/editor-slack-transformer 3.2.8 → 3.3.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.
package/CHANGELOG.md CHANGED
@@ -1,16 +1,28 @@
1
1
  # @atlaskit/editor-slack-transformer
2
2
 
3
+ ## 3.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#70008](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/70008) [`0aa6be50ddd3`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/0aa6be50ddd3) - Added support for inline image
8
+
9
+ ## 3.2.9
10
+
11
+ ### Patch Changes
12
+
13
+ - [#42761](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/42761) [`5d1881c7ed0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5d1881c7ed0) - Adds @ak/tokens as a dependency
14
+
3
15
  ## 3.2.8
4
16
 
5
17
  ### Patch Changes
6
18
 
7
- - [`ec4867e1376`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ec4867e1376) - Removed captions flag and replaced with a new media prop `allowCaptions`. `allowCaptions` is set to `false` by default and products will need to opt in to be able to use captions from now on.
19
+ - [#39320](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/39320) [`ec4867e1376`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ec4867e1376) - Removed captions flag and replaced with a new media prop `allowCaptions`. `allowCaptions` is set to `false` by default and products will need to opt in to be able to use captions from now on.
8
20
 
9
21
  ## 3.2.7
10
22
 
11
23
  ### Patch Changes
12
24
 
13
- - [`fd6bb9c9184`](https://bitbucket.org/atlassian/atlassian-frontend/commits/fd6bb9c9184) - Delete version.json
25
+ - [#38162](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/38162) [`fd6bb9c9184`](https://bitbucket.org/atlassian/atlassian-frontend/commits/fd6bb9c9184) - Delete version.json
14
26
 
15
27
  ## 3.2.6
16
28
 
@@ -22,91 +34,91 @@
22
34
 
23
35
  ### Patch Changes
24
36
 
25
- - [`4e6f1bf8511`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4e6f1bf8511) - [ED-19233] Import prosemirror libraries from internal facade package
37
+ - [#37785](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/37785) [`4e6f1bf8511`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4e6f1bf8511) - [ED-19233] Import prosemirror libraries from internal facade package
26
38
 
27
39
  ## 3.2.4
28
40
 
29
41
  ### Patch Changes
30
42
 
31
- - [`61cb5313358`](https://bitbucket.org/atlassian/atlassian-frontend/commits/61cb5313358) - Removing unused dependencies and dev dependencies
43
+ - [#34443](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/34443) [`61cb5313358`](https://bitbucket.org/atlassian/atlassian-frontend/commits/61cb5313358) - Removing unused dependencies and dev dependencies
32
44
 
33
45
  ## 3.2.3
34
46
 
35
47
  ### Patch Changes
36
48
 
37
- - [`9d00501a414`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9d00501a414) - Ensure legacy types are published for TS 4.5-4.8
49
+ - [#33793](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33793) [`9d00501a414`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9d00501a414) - Ensure legacy types are published for TS 4.5-4.8
38
50
 
39
51
  ## 3.2.2
40
52
 
41
53
  ### Patch Changes
42
54
 
43
- - [`a142ba1aa28`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a142ba1aa28) - [ED17172] Bump prosemirror-model to 1.16.0 and prosemirror-view to 1.23.7 and removed work-arounds for fixed issues
55
+ - [#33771](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33771) [`a142ba1aa28`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a142ba1aa28) - [ED17172] Bump prosemirror-model to 1.16.0 and prosemirror-view to 1.23.7 and removed work-arounds for fixed issues
44
56
 
45
57
  ## 3.2.1
46
58
 
47
59
  ### Patch Changes
48
60
 
49
- - [`41fae2c6f68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/41fae2c6f68) - Upgrade Typescript from `4.5.5` to `4.9.5`
61
+ - [#33649](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33649) [`41fae2c6f68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/41fae2c6f68) - Upgrade Typescript from `4.5.5` to `4.9.5`
50
62
 
51
63
  ## 3.2.0
52
64
 
53
65
  ### Minor Changes
54
66
 
55
- - [`56507598609`](https://bitbucket.org/atlassian/atlassian-frontend/commits/56507598609) - Skip minor dependency bump
67
+ - [#33258](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33258) [`56507598609`](https://bitbucket.org/atlassian/atlassian-frontend/commits/56507598609) - Skip minor dependency bump
56
68
 
57
69
  ## 3.1.7
58
70
 
59
71
  ### Patch Changes
60
72
 
61
- - [`0ffb55018c9`](https://bitbucket.org/atlassian/atlassian-frontend/commits/0ffb55018c9) - Revert "[ED-17172] Bumped prosemirror-view from 1.23.2 to 1.23.7 and removed work-around for fixed issues"
73
+ - [#33004](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33004) [`0ffb55018c9`](https://bitbucket.org/atlassian/atlassian-frontend/commits/0ffb55018c9) - Revert "[ED-17172] Bumped prosemirror-view from 1.23.2 to 1.23.7 and removed work-around for fixed issues"
62
74
 
63
75
  ## 3.1.6
64
76
 
65
77
  ### Patch Changes
66
78
 
67
- - [`2e01c9c74b5`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2e01c9c74b5) - DUMMY remove before merging to master; dupe adf-schema via adf-utils
79
+ - [#32424](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/32424) [`2e01c9c74b5`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2e01c9c74b5) - DUMMY remove before merging to master; dupe adf-schema via adf-utils
68
80
 
69
81
  ## 3.1.5
70
82
 
71
83
  ### Patch Changes
72
84
 
73
- - [`8cc2f888c83`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8cc2f888c83) - Upgrade Typescript from `4.3.5` to `4.5.5`
85
+ - [#24874](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/24874) [`8cc2f888c83`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8cc2f888c83) - Upgrade Typescript from `4.3.5` to `4.5.5`
74
86
 
75
87
  ## 3.1.4
76
88
 
77
89
  ### Patch Changes
78
90
 
79
- - [`8d4228767b0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8d4228767b0) - Upgrade Typescript from `4.2.4` to `4.3.5`.
91
+ - [#24492](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/24492) [`8d4228767b0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8d4228767b0) - Upgrade Typescript from `4.2.4` to `4.3.5`.
80
92
 
81
93
  ## 3.1.3
82
94
 
83
95
  ### Patch Changes
84
96
 
85
- - [`4db684dafa6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4db684dafa6) - ED-13895 update editor slack transformer to emotion
97
+ - [#21570](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/21570) [`4db684dafa6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4db684dafa6) - ED-13895 update editor slack transformer to emotion
86
98
 
87
99
  ## 3.1.2
88
100
 
89
101
  ### Patch Changes
90
102
 
91
- - [`cb2392f6d33`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cb2392f6d33) - Upgrade to TypeScript 4.2.4
103
+ - [#20650](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/20650) [`cb2392f6d33`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cb2392f6d33) - Upgrade to TypeScript 4.2.4
92
104
 
93
105
  ## 3.1.1
94
106
 
95
107
  ### Patch Changes
96
108
 
97
- - [`19d72473dfb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/19d72473dfb) - ED-13025 Bump prosemirror-view 1.23.1 -> 1.23.2
109
+ - [#16752](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/16752) [`19d72473dfb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/19d72473dfb) - ED-13025 Bump prosemirror-view 1.23.1 -> 1.23.2
98
110
 
99
111
  ## 3.1.0
100
112
 
101
113
  ### Minor Changes
102
114
 
103
- - [`95c8a998ef1`](https://bitbucket.org/atlassian/atlassian-frontend/commits/95c8a998ef1) - Inline cards with url type attributes are sent as links. Adding a new row after embedded card
115
+ - [#17424](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/17424) [`95c8a998ef1`](https://bitbucket.org/atlassian/atlassian-frontend/commits/95c8a998ef1) - Inline cards with url type attributes are sent as links. Adding a new row after embedded card
104
116
 
105
117
  ## 3.0.0
106
118
 
107
119
  ### Major Changes
108
120
 
109
- - [`8f0577e0eb1`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8f0577e0eb1) - [ux] Promoted captions to full schema and better support of wikimarkup, email and slack renderer
121
+ - [#15998](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/15998) [`8f0577e0eb1`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8f0577e0eb1) - [ux] Promoted captions to full schema and better support of wikimarkup, email and slack renderer
110
122
 
111
123
  ### Minor Changes
112
124
 
@@ -126,19 +138,19 @@
126
138
 
127
139
  ### Major Changes
128
140
 
129
- - [`ad7872a08ed`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ad7872a08ed) - Add media inline component to wikimarkup, slack markdown, email renderer transformers
141
+ - [#14777](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/14777) [`ad7872a08ed`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ad7872a08ed) - Add media inline component to wikimarkup, slack markdown, email renderer transformers
130
142
 
131
143
  ## 1.0.6
132
144
 
133
145
  ### Patch Changes
134
146
 
135
- - [`4855cb64aab`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4855cb64aab) - Fixed typo in the embedded node name
147
+ - [#14969](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/14969) [`4855cb64aab`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4855cb64aab) - Fixed typo in the embedded node name
136
148
 
137
149
  ## 1.0.5
138
150
 
139
151
  ### Patch Changes
140
152
 
141
- - [`5eb1f5c3eb6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5eb1f5c3eb6) - Moved @atlaskit/editor-common to devDependencies. Extracted Transformer interface from it.
153
+ - [#12300](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/12300) [`5eb1f5c3eb6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5eb1f5c3eb6) - Moved @atlaskit/editor-common to devDependencies. Extracted Transformer interface from it.
142
154
 
143
155
  ## 1.0.4
144
156
 
@@ -150,20 +162,20 @@
150
162
 
151
163
  ### Patch Changes
152
164
 
153
- - [`b7d23a07930`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b7d23a07930) - Added/updated unsupported nodes/marks stubs. Added support for decisions, layouts, status, panel.
165
+ - [#12237](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/12237) [`b7d23a07930`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b7d23a07930) - Added/updated unsupported nodes/marks stubs. Added support for decisions, layouts, status, panel.
154
166
  Emojis return text (an emoji itself) instead of a short name.
155
167
 
156
168
  ## 1.0.2
157
169
 
158
170
  ### Patch Changes
159
171
 
160
- - [`a17337cd389`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a17337cd389) - Added stubs for unsupported nodes in Slack markdown such as table, panel, inline card, task, decision as ["node type" attached]
172
+ - [#11502](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/11502) [`a17337cd389`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a17337cd389) - Added stubs for unsupported nodes in Slack markdown such as table, panel, inline card, task, decision as ["node type" attached]
161
173
 
162
174
  ## 1.0.1
163
175
 
164
176
  ### Patch Changes
165
177
 
166
- - [`93a63117404`](https://bitbucket.org/atlassian/atlassian-frontend/commits/93a63117404) - Replaced a [media attached] link (when some file is attached) just with a text [media attached].
178
+ - [#11387](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/11387) [`93a63117404`](https://bitbucket.org/atlassian/atlassian-frontend/commits/93a63117404) - Replaced a [media attached] link (when some file is attached) just with a text [media attached].
167
179
  Added a rule node (serialized to an empty line) and a text color mark (serialized to a pure text). Slack doesn’t have syntax for it.
168
180
  Added a missed description in package.json. Removed unused devDependencies.
169
181
 
@@ -171,6 +183,6 @@
171
183
 
172
184
  ### Major Changes
173
185
 
174
- - [`944b9d04d22`](https://bitbucket.org/atlassian/atlassian-frontend/commits/944b9d04d22) - [ux] TI-210 Implemented a converter to support ADF to Slack markdown transformation.
186
+ - [#11002](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/11002) [`944b9d04d22`](https://bitbucket.org/atlassian/atlassian-frontend/commits/944b9d04d22) - [ux] TI-210 Implemented a converter to support ADF to Slack markdown transformation.
175
187
  Supported bold, italic and strikethrough text, links, quotes, inline code blocks, code blocks, emojis. Mentions are serialised as @id.
176
188
  There’s no specific list syntax in app-published text, but we can mimic list (bullet, numbered) formatting. Also there’s no specific syntax for headers, images/files (will be converted to [image attached] or [media attached] as a link).
package/dist/cjs/index.js CHANGED
@@ -9,7 +9,7 @@ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/cl
9
9
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
10
10
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
11
  var _serializer = require("./serializer");
12
- var SlackTransformer = /*#__PURE__*/function () {
12
+ var SlackTransformer = exports.SlackTransformer = /*#__PURE__*/function () {
13
13
  function SlackTransformer() {
14
14
  (0, _classCallCheck2.default)(this, SlackTransformer);
15
15
  (0, _defineProperty2.default)(this, "serializer", new _serializer.MarkdownSerializer(_serializer.nodes, _serializer.marks));
@@ -26,5 +26,4 @@ var SlackTransformer = /*#__PURE__*/function () {
26
26
  }
27
27
  }]);
28
28
  return SlackTransformer;
29
- }();
30
- exports.SlackTransformer = SlackTransformer;
29
+ }();
@@ -17,7 +17,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
17
17
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
18
18
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
19
19
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
20
- var MarkdownSerializerState = /*#__PURE__*/function (_PMMarkdownSerializer) {
20
+ var MarkdownSerializerState = exports.MarkdownSerializerState = /*#__PURE__*/function (_PMMarkdownSerializer) {
21
21
  (0, _inherits2.default)(MarkdownSerializerState, _PMMarkdownSerializer);
22
22
  var _super = _createSuper(MarkdownSerializerState);
23
23
  function MarkdownSerializerState() {
@@ -42,8 +42,7 @@ var MarkdownSerializerState = /*#__PURE__*/function (_PMMarkdownSerializer) {
42
42
  }]);
43
43
  return MarkdownSerializerState;
44
44
  }(_markdown.MarkdownSerializerState);
45
- exports.MarkdownSerializerState = MarkdownSerializerState;
46
- var MarkdownSerializer = /*#__PURE__*/function (_PMMarkdownSerializer2) {
45
+ var MarkdownSerializer = exports.MarkdownSerializer = /*#__PURE__*/function (_PMMarkdownSerializer2) {
47
46
  (0, _inherits2.default)(MarkdownSerializer, _PMMarkdownSerializer2);
48
47
  var _super2 = _createSuper(MarkdownSerializer);
49
48
  function MarkdownSerializer() {
@@ -63,7 +62,6 @@ var MarkdownSerializer = /*#__PURE__*/function (_PMMarkdownSerializer2) {
63
62
  /**
64
63
  * Stubs for unsupported nodes
65
64
  */
66
- exports.MarkdownSerializer = MarkdownSerializer;
67
65
  var unsupportedNodes = {
68
66
  table: function table(state, node) {
69
67
  state.write('[table]');
@@ -87,8 +85,10 @@ var unsupportedNodes = {
87
85
  inlineExtension: function inlineExtension(state) {
88
86
  state.write('[inline extension]');
89
87
  },
90
- mediaInline: function mediaInline(state) {
91
- state.write('[inline file attached]');
88
+ mediaInline: function mediaInline(state, node) {
89
+ var _node$attrs;
90
+ var content = ((_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.type) === 'image' ? '[inline image attached]' : '[inline file attached]';
91
+ state.write(content);
92
92
  },
93
93
  extension: function extension(state, node) {
94
94
  state.write('[extension]');
@@ -118,7 +118,7 @@ var unsupportedNodes = {
118
118
  state.write('');
119
119
  }
120
120
  };
121
- var nodes = _objectSpread({
121
+ var nodes = exports.nodes = _objectSpread({
122
122
  blockquote: function blockquote(state, node) {
123
123
  state.wrapBlock('> ', undefined, node, function () {
124
124
  return state.renderContent(node);
@@ -289,7 +289,6 @@ var nodes = _objectSpread({
289
289
  /**
290
290
  * Slack markdown does not have specific syntax for (sub|super)script, underline, text color.
291
291
  */
292
- exports.nodes = nodes;
293
292
  var unsupportedMarks = {
294
293
  subsup: {
295
294
  open: '',
@@ -320,7 +319,7 @@ var unsupportedMarks = {
320
319
  close: ''
321
320
  }
322
321
  };
323
- var marks = _objectSpread({
322
+ var marks = exports.marks = _objectSpread({
324
323
  em: {
325
324
  open: '_',
326
325
  close: '_',
@@ -350,5 +349,4 @@ var marks = _objectSpread({
350
349
  close: '`',
351
350
  escape: false
352
351
  }
353
- }, unsupportedMarks);
354
- exports.marks = marks;
352
+ }, unsupportedMarks);
package/dist/cjs/util.js CHANGED
@@ -9,7 +9,7 @@ exports.escapeMarkdown = void 0;
9
9
  * so they must be converted to HTML entities.
10
10
  *
11
11
  */
12
- var escapeMarkdown = function escapeMarkdown(str) {
12
+ var escapeMarkdown = exports.escapeMarkdown = function escapeMarkdown(str) {
13
13
  return str.replace(/[`*_~&<>]/g, function (matched) {
14
14
  switch (matched) {
15
15
  case '&':
@@ -22,5 +22,4 @@ var escapeMarkdown = function escapeMarkdown(str) {
22
22
  return "\\".concat(matched);
23
23
  }
24
24
  });
25
- };
26
- exports.escapeMarkdown = escapeMarkdown;
25
+ };
@@ -48,8 +48,10 @@ const unsupportedNodes = {
48
48
  inlineExtension(state) {
49
49
  state.write('[inline extension]');
50
50
  },
51
- mediaInline(state) {
52
- state.write('[inline file attached]');
51
+ mediaInline(state, node) {
52
+ var _node$attrs;
53
+ const content = ((_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.type) === 'image' ? '[inline image attached]' : '[inline file attached]';
54
+ state.write(content);
53
55
  },
54
56
  extension(state, node) {
55
57
  state.write('[extension]');
@@ -79,8 +79,10 @@ var unsupportedNodes = {
79
79
  inlineExtension: function inlineExtension(state) {
80
80
  state.write('[inline extension]');
81
81
  },
82
- mediaInline: function mediaInline(state) {
83
- state.write('[inline file attached]');
82
+ mediaInline: function mediaInline(state, node) {
83
+ var _node$attrs;
84
+ var content = ((_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.type) === 'image' ? '[inline image attached]' : '[inline file attached]';
85
+ state.write(content);
84
86
  },
85
87
  extension: function extension(state, node) {
86
88
  state.write('[extension]');
@@ -1,5 +1,5 @@
1
1
  import { MarkdownSerializer as PMMarkdownSerializer, MarkdownSerializerState as PMMarkdownSerializerState } from '@atlaskit/editor-prosemirror/markdown';
2
- import { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
2
+ import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
3
3
  export declare class MarkdownSerializerState extends PMMarkdownSerializerState {
4
4
  renderContent(parent: PMNode): void;
5
5
  }
@@ -17,7 +17,7 @@ export declare const nodes: {
17
17
  */
18
18
  inlineCard(state: MarkdownSerializerState, node: PMNode): void;
19
19
  inlineExtension(state: MarkdownSerializerState): void;
20
- mediaInline(state: MarkdownSerializerState): void;
20
+ mediaInline(state: MarkdownSerializerState, node: PMNode): void;
21
21
  extension(state: MarkdownSerializerState, node: PMNode): void;
22
22
  bodiedExtension(state: MarkdownSerializerState, node: PMNode): void;
23
23
  taskList(state: MarkdownSerializerState, node: PMNode): void;
@@ -1,5 +1,5 @@
1
1
  import { MarkdownSerializer as PMMarkdownSerializer, MarkdownSerializerState as PMMarkdownSerializerState } from '@atlaskit/editor-prosemirror/markdown';
2
- import { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
2
+ import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
3
3
  export declare class MarkdownSerializerState extends PMMarkdownSerializerState {
4
4
  renderContent(parent: PMNode): void;
5
5
  }
@@ -17,7 +17,7 @@ export declare const nodes: {
17
17
  */
18
18
  inlineCard(state: MarkdownSerializerState, node: PMNode): void;
19
19
  inlineExtension(state: MarkdownSerializerState): void;
20
- mediaInline(state: MarkdownSerializerState): void;
20
+ mediaInline(state: MarkdownSerializerState, node: PMNode): void;
21
21
  extension(state: MarkdownSerializerState, node: PMNode): void;
22
22
  bodiedExtension(state: MarkdownSerializerState, node: PMNode): void;
23
23
  taskList(state: MarkdownSerializerState, node: PMNode): void;
@@ -1,17 +1,17 @@
1
1
  import { css } from '@emotion/react';
2
-
2
+ import { token } from '@atlaskit/tokens';
3
3
  import { N800 } from '@atlaskit/theme/colors';
4
4
 
5
5
  export const content = css`
6
6
  & div.toolsDrawer {
7
- padding: 8px 16px;
8
- background: ${N800};
7
+ padding: ${token('space.100', '8px')} ${token('space.200', '16px')};
8
+ background: ${token('color.background.neutral.bold', N800)};
9
9
 
10
10
  & label {
11
11
  display: flex;
12
- color: white;
12
+ color: ${token('color.text.inverse', 'white')};
13
13
  align-self: center;
14
- padding-right: 8px;
14
+ padding-right: ${token('space.100', '8px')};
15
15
  }
16
16
 
17
17
  & > div {
@@ -19,12 +19,12 @@ export const content = css`
19
19
  }
20
20
 
21
21
  & button {
22
- margin: 4px 0;
22
+ margin: ${token('space.050', '4px')} 0;
23
23
  }
24
24
  }
25
25
 
26
26
  & legend {
27
- margin: 8px 0;
27
+ margin: ${token('space.100', '8px')} 0;
28
28
  }
29
29
 
30
30
  & input {
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-slack-transformer",
3
- "version": "3.2.8",
3
+ "version": "3.3.0",
4
4
  "description": "Editor Slack transformer",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
7
7
  },
8
- "repository": "https://bitbucket.org/atlassian/atlassian-frontend",
8
+ "repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
9
9
  "author": "Atlassian Pty Ltd",
10
10
  "license": "Apache-2.0",
11
11
  "main": "dist/cjs/index.js",
@@ -28,7 +28,8 @@
28
28
  "releaseModel": "continuous",
29
29
  "website": {
30
30
  "name": "Editor Slack Transformer"
31
- }
31
+ },
32
+ "runReact18": false
32
33
  },
33
34
  "dependencies": {
34
35
  "@atlaskit/editor-prosemirror": "1.1.0",
@@ -39,10 +40,11 @@
39
40
  },
40
41
  "devDependencies": {
41
42
  "@atlaskit/activity": "^1.0.1",
42
- "@atlaskit/editor-core": "^187.43.0",
43
- "@atlaskit/editor-test-helpers": "^18.12.0",
44
- "@atlaskit/emoji": "^67.5.0",
43
+ "@atlaskit/editor-core": "^191.6.0",
44
+ "@atlaskit/editor-test-helpers": "^18.15.0",
45
+ "@atlaskit/emoji": "^67.6.0",
45
46
  "@atlaskit/theme": "^12.6.0",
47
+ "@atlaskit/tokens": "^1.35.0",
46
48
  "@atlaskit/util-data-test": "^17.8.0",
47
49
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
48
50
  "@emotion/react": "^11.7.1",
@@ -1,27 +0,0 @@
1
- ## API Report File for "@atlaskit/editor-slack-transformer"
2
-
3
- > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
-
5
- ```ts
6
-
7
- import { Node as Node_2 } from '@atlaskit/editor-prosemirror/model';
8
-
9
- // @public (undocumented)
10
- export class SlackTransformer implements Transformer_2<string> {
11
- // (undocumented)
12
- encode(node: Node_2): string;
13
- // (undocumented)
14
- parse(_slackMarkdown: string): Node_2;
15
- }
16
-
17
- // @public (undocumented)
18
- interface Transformer_2<T> {
19
- // (undocumented)
20
- encode(node: Node_2): T;
21
- // (undocumented)
22
- parse(content: T): Node_2;
23
- }
24
-
25
- // (No @packageDocumentation comment for this package)
26
-
27
- ```