@atlaskit/code 15.6.7 → 15.6.9
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 +14 -0
- package/dist/cjs/bidi-warning/ui/styled.js +3 -1
- package/dist/cjs/code.js +1 -0
- package/dist/cjs/internal/theme/get-theme.js +1 -0
- package/dist/cjs/internal/theme/styles.js +4 -1
- package/dist/cjs/syntax-highlighter/async.js +5 -7
- package/dist/cjs/syntax-highlighter/types.js +4 -5
- package/dist/es2019/bidi-warning/ui/styled.js +3 -1
- package/dist/es2019/code.js +1 -0
- package/dist/es2019/internal/theme/get-theme.js +1 -0
- package/dist/es2019/internal/theme/styles.js +4 -1
- package/dist/esm/bidi-warning/ui/styled.js +3 -1
- package/dist/esm/code.js +1 -0
- package/dist/esm/internal/theme/get-theme.js +1 -0
- package/dist/esm/internal/theme/styles.js +4 -1
- package/dist/esm/syntax-highlighter/async.js +5 -7
- package/dist/esm/syntax-highlighter/types.js +4 -5
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/code
|
|
2
2
|
|
|
3
|
+
## 15.6.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 15.6.8
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#178053](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/178053)
|
|
14
|
+
[`cb318c8c28c26`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/cb318c8c28c26) -
|
|
15
|
+
Internal changes to typography.
|
|
16
|
+
|
|
3
17
|
## 15.6.7
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -33,8 +33,10 @@ var decoration = (0, _react2.css)({
|
|
|
33
33
|
background: "var(--ds-background-warning, ".concat(_colors.Y75, ")"),
|
|
34
34
|
color: "var(--ds-text-warning, #7F5F01)",
|
|
35
35
|
content: '"<"attr(data-bidi-character-code)">"',
|
|
36
|
-
|
|
36
|
+
font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
37
|
+
fontFamily: "var(--ds-font-family-code, ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace)",
|
|
37
38
|
fontStyle: 'normal',
|
|
39
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
38
40
|
lineHeight: '18px',
|
|
39
41
|
/**
|
|
40
42
|
* Ensures the decoration receives pointer events when it occurs with
|
package/dist/cjs/code.js
CHANGED
|
@@ -39,6 +39,7 @@ var styles = (0, _react2.css)({
|
|
|
39
39
|
boxDecorationBreak: 'clone',
|
|
40
40
|
color: "var(--ds-text, #172B4D)",
|
|
41
41
|
font: "var(--ds-font-code, normal 400 0.875em/1 ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace)",
|
|
42
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
42
43
|
lineHeight: 'inherit',
|
|
43
44
|
overflow: 'auto',
|
|
44
45
|
overflowWrap: 'break-word',
|
|
@@ -21,6 +21,7 @@ var Y1100 = '#7A5D1A';
|
|
|
21
21
|
var getBaseTheme = exports.getBaseTheme = function getBaseTheme() {
|
|
22
22
|
return {
|
|
23
23
|
fontFamily: "var(--ds-font-family-code, ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace)",
|
|
24
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
24
25
|
fontFamilyItalic: "SFMono-MediumItalic, ".concat((0, _tokens.getTokenValue)('font.family.code')),
|
|
25
26
|
backgroundColor: "var(--ds-background-neutral, ".concat(colors.N20, ")"),
|
|
26
27
|
textColor: "var(--ds-text, ".concat(colors.N800, ")"),
|
|
@@ -186,7 +186,7 @@ var syntaxKeywordColors = function syntaxKeywordColors(theme) {
|
|
|
186
186
|
},
|
|
187
187
|
'&.important': {
|
|
188
188
|
color: theme.importantColor,
|
|
189
|
-
fontWeight:
|
|
189
|
+
fontWeight: "var(--ds-font-weight-bold, 700)"
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
192
|
};
|
|
@@ -198,6 +198,7 @@ var syntaxKeywordColors = function syntaxKeywordColors(theme) {
|
|
|
198
198
|
var getBaseCodeStyles = exports.getBaseCodeStyles = function getBaseCodeStyles(theme) {
|
|
199
199
|
return {
|
|
200
200
|
fontSize: _constants.CODE_FONT_SIZE,
|
|
201
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
201
202
|
fontFamily: theme.fontFamily,
|
|
202
203
|
fontWeight: "var(--ds-font-weight-regular, 400)",
|
|
203
204
|
backgroundColor: "var(".concat(_constants.VAR_CODE_BG_COLOR, ",").concat(theme.backgroundColor, ")"),
|
|
@@ -223,6 +224,7 @@ var getCodeBlockStyles = exports.getCodeBlockStyles = function getCodeBlockStyle
|
|
|
223
224
|
tabSize: 4
|
|
224
225
|
},
|
|
225
226
|
display: 'flex',
|
|
227
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
226
228
|
lineHeight: _constants.CODE_LINE_HEIGHT,
|
|
227
229
|
overflowX: 'auto',
|
|
228
230
|
whiteSpace: 'pre',
|
|
@@ -309,6 +311,7 @@ var getCodeStyles = exports.getCodeStyles = function getCodeStyles() {
|
|
|
309
311
|
display: 'inline',
|
|
310
312
|
padding: '2px 0.5ch',
|
|
311
313
|
boxDecorationBreak: 'clone',
|
|
314
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
312
315
|
fontSize: '0.875em',
|
|
313
316
|
overflow: 'auto',
|
|
314
317
|
overflowWrap: 'break-word',
|
|
@@ -9,15 +9,15 @@ exports.default = void 0;
|
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
11
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
12
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
13
12
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
14
13
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
14
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
15
15
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
16
16
|
var _react = _interopRequireDefault(require("react"));
|
|
17
17
|
var _highlight = _interopRequireDefault(require("./lib/highlight"));
|
|
18
18
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
19
19
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
20
|
-
function
|
|
20
|
+
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
21
21
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
22
22
|
// Uses the loader method of async bundling
|
|
23
23
|
// Instantiates highligher as a singleton, loading refractor only once per page (refractor/prism are singleton modules)
|
|
@@ -26,13 +26,12 @@ var generator = function generator(options) {
|
|
|
26
26
|
|
|
27
27
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
28
28
|
var AsyncHighlighter = /*#__PURE__*/function (_React$PureComponent) {
|
|
29
|
-
(0, _inherits2.default)(AsyncHighlighter, _React$PureComponent);
|
|
30
|
-
var _super = _createSuper(AsyncHighlighter);
|
|
31
29
|
function AsyncHighlighter() {
|
|
32
30
|
(0, _classCallCheck2.default)(this, AsyncHighlighter);
|
|
33
|
-
return
|
|
31
|
+
return _callSuper(this, AsyncHighlighter, arguments);
|
|
34
32
|
}
|
|
35
|
-
(0,
|
|
33
|
+
(0, _inherits2.default)(AsyncHighlighter, _React$PureComponent);
|
|
34
|
+
return (0, _createClass2.default)(AsyncHighlighter, [{
|
|
36
35
|
key: "componentDidMount",
|
|
37
36
|
value: function componentDidMount() {
|
|
38
37
|
var _this = this;
|
|
@@ -69,7 +68,6 @@ var generator = function generator(options) {
|
|
|
69
68
|
return AsyncHighlighter.astGeneratorPromise;
|
|
70
69
|
}
|
|
71
70
|
}]);
|
|
72
|
-
return AsyncHighlighter;
|
|
73
71
|
}(_react.default.PureComponent);
|
|
74
72
|
(0, _defineProperty2.default)(AsyncHighlighter, "astGenerator", null);
|
|
75
73
|
(0, _defineProperty2.default)(AsyncHighlighter, "highlightInstance", _highlight.default);
|
|
@@ -7,22 +7,21 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.SyntaxHighlighter = void 0;
|
|
8
8
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
9
9
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
10
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
11
10
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
12
11
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
12
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
13
13
|
var _react = _interopRequireDefault(require("react"));
|
|
14
|
-
function
|
|
14
|
+
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
15
15
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
16
16
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
17
17
|
// This wrapper supports the async loading of refractor and language grammars. The internal Highlight is a memo() functional component as expected
|
|
18
18
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
19
19
|
var SyntaxHighlighter = exports.SyntaxHighlighter = /*#__PURE__*/function (_React$PureComponent) {
|
|
20
|
-
(0, _inherits2.default)(SyntaxHighlighter, _React$PureComponent);
|
|
21
|
-
var _super = _createSuper(SyntaxHighlighter);
|
|
22
20
|
function SyntaxHighlighter() {
|
|
23
21
|
(0, _classCallCheck2.default)(this, SyntaxHighlighter);
|
|
24
|
-
return
|
|
22
|
+
return _callSuper(this, SyntaxHighlighter, arguments);
|
|
25
23
|
}
|
|
24
|
+
(0, _inherits2.default)(SyntaxHighlighter, _React$PureComponent);
|
|
26
25
|
return (0, _createClass2.default)(SyntaxHighlighter);
|
|
27
26
|
}(_react.default.PureComponent);
|
|
28
27
|
/**
|
|
@@ -25,8 +25,10 @@ const decoration = css({
|
|
|
25
25
|
background: `var(--ds-background-warning, ${Y75})`,
|
|
26
26
|
color: "var(--ds-text-warning, #7F5F01)",
|
|
27
27
|
content: '"<"attr(data-bidi-character-code)">"',
|
|
28
|
-
|
|
28
|
+
font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
29
|
+
fontFamily: "var(--ds-font-family-code, ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace)",
|
|
29
30
|
fontStyle: 'normal',
|
|
31
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
30
32
|
lineHeight: '18px',
|
|
31
33
|
/**
|
|
32
34
|
* Ensures the decoration receives pointer events when it occurs with
|
package/dist/es2019/code.js
CHANGED
|
@@ -21,6 +21,7 @@ const styles = css({
|
|
|
21
21
|
boxDecorationBreak: 'clone',
|
|
22
22
|
color: "var(--ds-text, #172B4D)",
|
|
23
23
|
font: "var(--ds-font-code, normal 400 0.875em/1 ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace)",
|
|
24
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
24
25
|
lineHeight: 'inherit',
|
|
25
26
|
overflow: 'auto',
|
|
26
27
|
overflowWrap: 'break-word',
|
|
@@ -7,6 +7,7 @@ const T800 = '#067384';
|
|
|
7
7
|
const Y1100 = '#7A5D1A';
|
|
8
8
|
export const getBaseTheme = () => ({
|
|
9
9
|
fontFamily: "var(--ds-font-family-code, ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace)",
|
|
10
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
10
11
|
fontFamilyItalic: `SFMono-MediumItalic, ${getTokenValue('font.family.code')}`,
|
|
11
12
|
backgroundColor: `var(--ds-background-neutral, ${colors.N20})`,
|
|
12
13
|
textColor: `var(--ds-text, ${colors.N800})`,
|
|
@@ -175,7 +175,7 @@ const syntaxKeywordColors = theme => ({
|
|
|
175
175
|
},
|
|
176
176
|
'&.important': {
|
|
177
177
|
color: theme.importantColor,
|
|
178
|
-
fontWeight:
|
|
178
|
+
fontWeight: "var(--ds-font-weight-bold, 700)"
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
181
|
});
|
|
@@ -185,6 +185,7 @@ const syntaxKeywordColors = theme => ({
|
|
|
185
185
|
*/
|
|
186
186
|
export const getBaseCodeStyles = theme => ({
|
|
187
187
|
fontSize: CODE_FONT_SIZE,
|
|
188
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
188
189
|
fontFamily: theme.fontFamily,
|
|
189
190
|
fontWeight: "var(--ds-font-weight-regular, 400)",
|
|
190
191
|
backgroundColor: `var(${VAR_CODE_BG_COLOR},${theme.backgroundColor})`,
|
|
@@ -207,6 +208,7 @@ export const getCodeBlockStyles = theme => (highlightedStartText, highlightedEnd
|
|
|
207
208
|
tabSize: 4
|
|
208
209
|
},
|
|
209
210
|
display: 'flex',
|
|
211
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
210
212
|
lineHeight: CODE_LINE_HEIGHT,
|
|
211
213
|
overflowX: 'auto',
|
|
212
214
|
whiteSpace: 'pre',
|
|
@@ -294,6 +296,7 @@ export const getCodeStyles = () => {
|
|
|
294
296
|
display: 'inline',
|
|
295
297
|
padding: '2px 0.5ch',
|
|
296
298
|
boxDecorationBreak: 'clone',
|
|
299
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
297
300
|
fontSize: '0.875em',
|
|
298
301
|
overflow: 'auto',
|
|
299
302
|
overflowWrap: 'break-word',
|
|
@@ -25,8 +25,10 @@ var decoration = css({
|
|
|
25
25
|
background: "var(--ds-background-warning, ".concat(Y75, ")"),
|
|
26
26
|
color: "var(--ds-text-warning, #7F5F01)",
|
|
27
27
|
content: '"<"attr(data-bidi-character-code)">"',
|
|
28
|
-
|
|
28
|
+
font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
29
|
+
fontFamily: "var(--ds-font-family-code, ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace)",
|
|
29
30
|
fontStyle: 'normal',
|
|
31
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
30
32
|
lineHeight: '18px',
|
|
31
33
|
/**
|
|
32
34
|
* Ensures the decoration receives pointer events when it occurs with
|
package/dist/esm/code.js
CHANGED
|
@@ -24,6 +24,7 @@ var styles = css({
|
|
|
24
24
|
boxDecorationBreak: 'clone',
|
|
25
25
|
color: "var(--ds-text, #172B4D)",
|
|
26
26
|
font: "var(--ds-font-code, normal 400 0.875em/1 ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace)",
|
|
27
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
27
28
|
lineHeight: 'inherit',
|
|
28
29
|
overflow: 'auto',
|
|
29
30
|
overflowWrap: 'break-word',
|
|
@@ -11,6 +11,7 @@ var Y1100 = '#7A5D1A';
|
|
|
11
11
|
export var getBaseTheme = function getBaseTheme() {
|
|
12
12
|
return {
|
|
13
13
|
fontFamily: "var(--ds-font-family-code, ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace)",
|
|
14
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
14
15
|
fontFamilyItalic: "SFMono-MediumItalic, ".concat(getTokenValue('font.family.code')),
|
|
15
16
|
backgroundColor: "var(--ds-background-neutral, ".concat(colors.N20, ")"),
|
|
16
17
|
textColor: "var(--ds-text, ".concat(colors.N800, ")"),
|
|
@@ -181,7 +181,7 @@ var syntaxKeywordColors = function syntaxKeywordColors(theme) {
|
|
|
181
181
|
},
|
|
182
182
|
'&.important': {
|
|
183
183
|
color: theme.importantColor,
|
|
184
|
-
fontWeight:
|
|
184
|
+
fontWeight: "var(--ds-font-weight-bold, 700)"
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
187
|
};
|
|
@@ -193,6 +193,7 @@ var syntaxKeywordColors = function syntaxKeywordColors(theme) {
|
|
|
193
193
|
export var getBaseCodeStyles = function getBaseCodeStyles(theme) {
|
|
194
194
|
return {
|
|
195
195
|
fontSize: CODE_FONT_SIZE,
|
|
196
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
196
197
|
fontFamily: theme.fontFamily,
|
|
197
198
|
fontWeight: "var(--ds-font-weight-regular, 400)",
|
|
198
199
|
backgroundColor: "var(".concat(VAR_CODE_BG_COLOR, ",").concat(theme.backgroundColor, ")"),
|
|
@@ -218,6 +219,7 @@ export var getCodeBlockStyles = function getCodeBlockStyles(theme) {
|
|
|
218
219
|
tabSize: 4
|
|
219
220
|
},
|
|
220
221
|
display: 'flex',
|
|
222
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
221
223
|
lineHeight: CODE_LINE_HEIGHT,
|
|
222
224
|
overflowX: 'auto',
|
|
223
225
|
whiteSpace: 'pre',
|
|
@@ -304,6 +306,7 @@ export var getCodeStyles = function getCodeStyles() {
|
|
|
304
306
|
display: 'inline',
|
|
305
307
|
padding: '2px 0.5ch',
|
|
306
308
|
boxDecorationBreak: 'clone',
|
|
309
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
307
310
|
fontSize: '0.875em',
|
|
308
311
|
overflow: 'auto',
|
|
309
312
|
overflowWrap: 'break-word',
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
7
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
|
-
function
|
|
8
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
9
9
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import highlight from './lib/highlight';
|
|
@@ -16,13 +16,12 @@ var generator = function generator(options) {
|
|
|
16
16
|
|
|
17
17
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
18
18
|
var AsyncHighlighter = /*#__PURE__*/function (_React$PureComponent) {
|
|
19
|
-
_inherits(AsyncHighlighter, _React$PureComponent);
|
|
20
|
-
var _super = _createSuper(AsyncHighlighter);
|
|
21
19
|
function AsyncHighlighter() {
|
|
22
20
|
_classCallCheck(this, AsyncHighlighter);
|
|
23
|
-
return
|
|
21
|
+
return _callSuper(this, AsyncHighlighter, arguments);
|
|
24
22
|
}
|
|
25
|
-
|
|
23
|
+
_inherits(AsyncHighlighter, _React$PureComponent);
|
|
24
|
+
return _createClass(AsyncHighlighter, [{
|
|
26
25
|
key: "componentDidMount",
|
|
27
26
|
value: function componentDidMount() {
|
|
28
27
|
var _this = this;
|
|
@@ -59,7 +58,6 @@ var generator = function generator(options) {
|
|
|
59
58
|
return AsyncHighlighter.astGeneratorPromise;
|
|
60
59
|
}
|
|
61
60
|
}]);
|
|
62
|
-
return AsyncHighlighter;
|
|
63
61
|
}(React.PureComponent);
|
|
64
62
|
_defineProperty(AsyncHighlighter, "astGenerator", null);
|
|
65
63
|
_defineProperty(AsyncHighlighter, "highlightInstance", highlight);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
2
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
4
3
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
4
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
-
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
7
7
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
8
8
|
import React from 'react';
|
|
9
9
|
|
|
@@ -12,12 +12,11 @@ import React from 'react';
|
|
|
12
12
|
// This wrapper supports the async loading of refractor and language grammars. The internal Highlight is a memo() functional component as expected
|
|
13
13
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
14
14
|
export var SyntaxHighlighter = /*#__PURE__*/function (_React$PureComponent) {
|
|
15
|
-
_inherits(SyntaxHighlighter, _React$PureComponent);
|
|
16
|
-
var _super = _createSuper(SyntaxHighlighter);
|
|
17
15
|
function SyntaxHighlighter() {
|
|
18
16
|
_classCallCheck(this, SyntaxHighlighter);
|
|
19
|
-
return
|
|
17
|
+
return _callSuper(this, SyntaxHighlighter, arguments);
|
|
20
18
|
}
|
|
19
|
+
_inherits(SyntaxHighlighter, _React$PureComponent);
|
|
21
20
|
return _createClass(SyntaxHighlighter);
|
|
22
21
|
}(React.PureComponent);
|
|
23
22
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/code",
|
|
3
|
-
"version": "15.6.
|
|
3
|
+
"version": "15.6.9",
|
|
4
4
|
"description": "Code highlights short strings of code snippets inline with body text.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@atlaskit/codemod-utils": "^4.2.0",
|
|
32
32
|
"@atlaskit/theme": "^14.0.0",
|
|
33
|
-
"@atlaskit/tokens": "^
|
|
33
|
+
"@atlaskit/tokens": "^3.0.0",
|
|
34
34
|
"@atlaskit/tooltip": "^19.0.0",
|
|
35
35
|
"@atlaskit/visually-hidden": "^1.5.0",
|
|
36
36
|
"@babel/runtime": "^7.0.0",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@af/visual-regression": "*",
|
|
48
48
|
"@atlaskit/ds-lib": "^3.3.0",
|
|
49
49
|
"@atlaskit/ssr": "*",
|
|
50
|
-
"@atlaskit/toggle": "^
|
|
50
|
+
"@atlaskit/toggle": "^14.0.0",
|
|
51
51
|
"@atlaskit/visual-regression": "*",
|
|
52
52
|
"@testing-library/react": "^12.1.5",
|
|
53
53
|
"@types/jscodeshift": "^0.11.0",
|