@atlaskit/code 14.5.2 → 14.5.3
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 +6 -0
- package/dist/cjs/internal/theme/styles.js +1 -1
- package/dist/cjs/syntax-highlighter/lib/process/create-line-element.js +7 -2
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/internal/theme/styles.js +1 -1
- package/dist/es2019/syntax-highlighter/lib/process/create-line-element.js +5 -2
- package/dist/es2019/version.json +1 -1
- package/dist/esm/internal/theme/styles.js +1 -1
- package/dist/esm/syntax-highlighter/lib/process/create-line-element.js +7 -2
- package/dist/esm/version.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/code
|
|
2
2
|
|
|
3
|
+
## 14.5.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`74750bef5c4`](https://bitbucket.org/atlassian/atlassian-frontend/commits/74750bef5c4) - Fixes some bugs with the long line wrapping and syntax-highlighting changes that were released in v14.5.0.
|
|
8
|
+
|
|
3
9
|
## 14.5.2
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -50,7 +50,7 @@ var syntaxKeywordColors = function syntaxKeywordColors(theme) {
|
|
|
50
50
|
return {
|
|
51
51
|
'.token': {
|
|
52
52
|
// this specifically stops prism css cascading.
|
|
53
|
-
'&:not([class=token],[data-ds--code--row--highlight])': {
|
|
53
|
+
'&:not([class=token],[data-ds--code--row--highlight],[data-ds--code--row])': {
|
|
54
54
|
all: 'unset'
|
|
55
55
|
},
|
|
56
56
|
// additional specificity required to match the all: unset
|
|
@@ -6,7 +6,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = createLineElement;
|
|
8
8
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
9
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
10
|
var _getInlineLineNumber = _interopRequireDefault(require("./get-inline-line-number"));
|
|
11
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
12
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
10
13
|
function createLineElement(_ref) {
|
|
11
14
|
var children = _ref.children,
|
|
12
15
|
lineNumber = _ref.lineNumber,
|
|
@@ -15,8 +18,10 @@ function createLineElement(_ref) {
|
|
|
15
18
|
lineProps = _ref$lineProps === void 0 ? {} : _ref$lineProps,
|
|
16
19
|
_ref$className = _ref.className,
|
|
17
20
|
className = _ref$className === void 0 ? [] : _ref$className;
|
|
18
|
-
var
|
|
19
|
-
properties
|
|
21
|
+
var propsPassedInFromCodeBlock = typeof lineProps === 'function' ? lineProps(lineNumber) : lineProps;
|
|
22
|
+
var properties = _objectSpread(_objectSpread({}, propsPassedInFromCodeBlock), {}, {
|
|
23
|
+
className: className
|
|
24
|
+
});
|
|
20
25
|
var currentChildren = children;
|
|
21
26
|
if (lineNumber && showLineNumbers) {
|
|
22
27
|
// When syntax highlighting is NOT turned on, the entire LOC is just a single
|
package/dist/cjs/version.json
CHANGED
|
@@ -36,7 +36,7 @@ const lineNumberStyle = theme => ({
|
|
|
36
36
|
const syntaxKeywordColors = theme => ({
|
|
37
37
|
'.token': {
|
|
38
38
|
// this specifically stops prism css cascading.
|
|
39
|
-
'&:not([class=token],[data-ds--code--row--highlight])': {
|
|
39
|
+
'&:not([class=token],[data-ds--code--row--highlight],[data-ds--code--row])': {
|
|
40
40
|
all: 'unset'
|
|
41
41
|
},
|
|
42
42
|
// additional specificity required to match the all: unset
|
|
@@ -6,8 +6,11 @@ export default function createLineElement({
|
|
|
6
6
|
lineProps = {},
|
|
7
7
|
className = []
|
|
8
8
|
}) {
|
|
9
|
-
const
|
|
10
|
-
properties
|
|
9
|
+
const propsPassedInFromCodeBlock = typeof lineProps === 'function' ? lineProps(lineNumber) : lineProps;
|
|
10
|
+
const properties = {
|
|
11
|
+
...propsPassedInFromCodeBlock,
|
|
12
|
+
className
|
|
13
|
+
};
|
|
11
14
|
let currentChildren = children;
|
|
12
15
|
if (lineNumber && showLineNumbers) {
|
|
13
16
|
// When syntax highlighting is NOT turned on, the entire LOC is just a single
|
package/dist/es2019/version.json
CHANGED
|
@@ -42,7 +42,7 @@ var syntaxKeywordColors = function syntaxKeywordColors(theme) {
|
|
|
42
42
|
return {
|
|
43
43
|
'.token': {
|
|
44
44
|
// this specifically stops prism css cascading.
|
|
45
|
-
'&:not([class=token],[data-ds--code--row--highlight])': {
|
|
45
|
+
'&:not([class=token],[data-ds--code--row--highlight],[data-ds--code--row])': {
|
|
46
46
|
all: 'unset'
|
|
47
47
|
},
|
|
48
48
|
// additional specificity required to match the all: unset
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
2
5
|
import getInlineLineNumber from './get-inline-line-number';
|
|
3
6
|
export default function createLineElement(_ref) {
|
|
4
7
|
var children = _ref.children,
|
|
@@ -8,8 +11,10 @@ export default function createLineElement(_ref) {
|
|
|
8
11
|
lineProps = _ref$lineProps === void 0 ? {} : _ref$lineProps,
|
|
9
12
|
_ref$className = _ref.className,
|
|
10
13
|
className = _ref$className === void 0 ? [] : _ref$className;
|
|
11
|
-
var
|
|
12
|
-
properties
|
|
14
|
+
var propsPassedInFromCodeBlock = typeof lineProps === 'function' ? lineProps(lineNumber) : lineProps;
|
|
15
|
+
var properties = _objectSpread(_objectSpread({}, propsPassedInFromCodeBlock), {}, {
|
|
16
|
+
className: className
|
|
17
|
+
});
|
|
13
18
|
var currentChildren = children;
|
|
14
19
|
if (lineNumber && showLineNumbers) {
|
|
15
20
|
// When syntax highlighting is NOT turned on, the entire LOC is just a single
|
package/dist/esm/version.json
CHANGED