@atlaskit/tokens 1.20.0 → 1.20.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/CHANGELOG.md +6 -0
- package/dist/cjs/babel-plugin/plugin.js +1 -0
- package/dist/cjs/get-token-value.js +1 -1
- package/dist/cjs/get-token.js +1 -1
- package/dist/cjs/utils/custom-theme-loading-utils.js +1 -1
- package/dist/es2019/babel-plugin/plugin.js +1 -0
- package/dist/es2019/get-token-value.js +1 -1
- package/dist/es2019/get-token.js +1 -1
- package/dist/es2019/utils/custom-theme-loading-utils.js +1 -1
- package/dist/esm/babel-plugin/plugin.js +1 -0
- package/dist/esm/get-token-value.js +1 -1
- package/dist/esm/get-token.js +1 -1
- package/dist/esm/utils/custom-theme-loading-utils.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -45,6 +45,7 @@ function plugin() {
|
|
|
45
45
|
visitor: {
|
|
46
46
|
Program: {
|
|
47
47
|
enter: function enter(path, state) {
|
|
48
|
+
// @ts-expect-error TS2339: Property 'file' does not exist on type 'Hub'
|
|
48
49
|
var sourceFile = path.hub.file.opts.filename;
|
|
49
50
|
if (sourceFile && sourceFile.includes('node_modules')) {
|
|
50
51
|
return;
|
|
@@ -8,7 +8,7 @@ exports.default = void 0;
|
|
|
8
8
|
var _warnOnce = _interopRequireDefault(require("@atlaskit/ds-lib/warn-once"));
|
|
9
9
|
var _tokenNames = _interopRequireDefault(require("./artifacts/token-names"));
|
|
10
10
|
var name = "@atlaskit/tokens";
|
|
11
|
-
var version = "1.20.
|
|
11
|
+
var version = "1.20.1";
|
|
12
12
|
/**
|
|
13
13
|
* Takes a dot-separated token name and and an optional fallback, and returns the current computed CSS value for the
|
|
14
14
|
* resulting CSS Custom Property.
|
package/dist/cjs/get-token.js
CHANGED
|
@@ -9,7 +9,7 @@ var _warnOnce = _interopRequireDefault(require("@atlaskit/ds-lib/warn-once"));
|
|
|
9
9
|
var _tokenNames = _interopRequireDefault(require("./artifacts/token-names"));
|
|
10
10
|
var _constants = require("./constants");
|
|
11
11
|
var name = "@atlaskit/tokens";
|
|
12
|
-
var version = "1.20.
|
|
12
|
+
var version = "1.20.1";
|
|
13
13
|
/**
|
|
14
14
|
* Takes a dot-separated token name and an optional fallback, and returns the CSS custom property for the corresponding token.
|
|
15
15
|
* This should be used to implement design decisions throughout your application.
|
|
@@ -28,7 +28,7 @@ function findMissingCustomStyleElements(UNSAFE_themeOptions, mode) {
|
|
|
28
28
|
return attrOfMissingCustomStyles;
|
|
29
29
|
}
|
|
30
30
|
function limitSizeOfCustomStyleElements(sizeThreshold) {
|
|
31
|
-
var styleTags = (0, _toConsumableArray2.default)(document.head.querySelectorAll("style[".concat(_constants.CUSTOM_THEME_ATTRIBUTE, "][").concat(_constants.THEME_DATA_ATTRIBUTE, "]")));
|
|
31
|
+
var styleTags = (0, _toConsumableArray2.default)(Array.from(document.head.querySelectorAll("style[".concat(_constants.CUSTOM_THEME_ATTRIBUTE, "][").concat(_constants.THEME_DATA_ATTRIBUTE, "]"))));
|
|
32
32
|
if (styleTags.length < sizeThreshold) {
|
|
33
33
|
return;
|
|
34
34
|
}
|
|
@@ -35,6 +35,7 @@ export default function plugin() {
|
|
|
35
35
|
visitor: {
|
|
36
36
|
Program: {
|
|
37
37
|
enter(path, state) {
|
|
38
|
+
// @ts-expect-error TS2339: Property 'file' does not exist on type 'Hub'
|
|
38
39
|
const sourceFile = path.hub.file.opts.filename;
|
|
39
40
|
if (sourceFile && sourceFile.includes('node_modules')) {
|
|
40
41
|
return;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import warnOnce from '@atlaskit/ds-lib/warn-once';
|
|
2
2
|
import tokens from './artifacts/token-names';
|
|
3
3
|
const name = "@atlaskit/tokens";
|
|
4
|
-
const version = "1.20.
|
|
4
|
+
const version = "1.20.1";
|
|
5
5
|
/**
|
|
6
6
|
* Takes a dot-separated token name and and an optional fallback, and returns the current computed CSS value for the
|
|
7
7
|
* resulting CSS Custom Property.
|
package/dist/es2019/get-token.js
CHANGED
|
@@ -2,7 +2,7 @@ import warnOnce from '@atlaskit/ds-lib/warn-once';
|
|
|
2
2
|
import tokens from './artifacts/token-names';
|
|
3
3
|
import { TOKEN_NOT_FOUND_CSS_VAR } from './constants';
|
|
4
4
|
const name = "@atlaskit/tokens";
|
|
5
|
-
const version = "1.20.
|
|
5
|
+
const version = "1.20.1";
|
|
6
6
|
/**
|
|
7
7
|
* Takes a dot-separated token name and an optional fallback, and returns the CSS custom property for the corresponding token.
|
|
8
8
|
* This should be used to implement design decisions throughout your application.
|
|
@@ -17,7 +17,7 @@ export function findMissingCustomStyleElements(UNSAFE_themeOptions, mode) {
|
|
|
17
17
|
return attrOfMissingCustomStyles;
|
|
18
18
|
}
|
|
19
19
|
export function limitSizeOfCustomStyleElements(sizeThreshold) {
|
|
20
|
-
const styleTags = [...document.head.querySelectorAll(`style[${CUSTOM_THEME_ATTRIBUTE}][${THEME_DATA_ATTRIBUTE}]`)];
|
|
20
|
+
const styleTags = [...Array.from(document.head.querySelectorAll(`style[${CUSTOM_THEME_ATTRIBUTE}][${THEME_DATA_ATTRIBUTE}]`))];
|
|
21
21
|
if (styleTags.length < sizeThreshold) {
|
|
22
22
|
return;
|
|
23
23
|
}
|
|
@@ -35,6 +35,7 @@ export default function plugin() {
|
|
|
35
35
|
visitor: {
|
|
36
36
|
Program: {
|
|
37
37
|
enter: function enter(path, state) {
|
|
38
|
+
// @ts-expect-error TS2339: Property 'file' does not exist on type 'Hub'
|
|
38
39
|
var sourceFile = path.hub.file.opts.filename;
|
|
39
40
|
if (sourceFile && sourceFile.includes('node_modules')) {
|
|
40
41
|
return;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import warnOnce from '@atlaskit/ds-lib/warn-once';
|
|
2
2
|
import tokens from './artifacts/token-names';
|
|
3
3
|
var name = "@atlaskit/tokens";
|
|
4
|
-
var version = "1.20.
|
|
4
|
+
var version = "1.20.1";
|
|
5
5
|
/**
|
|
6
6
|
* Takes a dot-separated token name and and an optional fallback, and returns the current computed CSS value for the
|
|
7
7
|
* resulting CSS Custom Property.
|
package/dist/esm/get-token.js
CHANGED
|
@@ -2,7 +2,7 @@ import warnOnce from '@atlaskit/ds-lib/warn-once';
|
|
|
2
2
|
import tokens from './artifacts/token-names';
|
|
3
3
|
import { TOKEN_NOT_FOUND_CSS_VAR } from './constants';
|
|
4
4
|
var name = "@atlaskit/tokens";
|
|
5
|
-
var version = "1.20.
|
|
5
|
+
var version = "1.20.1";
|
|
6
6
|
/**
|
|
7
7
|
* Takes a dot-separated token name and an optional fallback, and returns the CSS custom property for the corresponding token.
|
|
8
8
|
* This should be used to implement design decisions throughout your application.
|
|
@@ -19,7 +19,7 @@ export function findMissingCustomStyleElements(UNSAFE_themeOptions, mode) {
|
|
|
19
19
|
return attrOfMissingCustomStyles;
|
|
20
20
|
}
|
|
21
21
|
export function limitSizeOfCustomStyleElements(sizeThreshold) {
|
|
22
|
-
var styleTags = _toConsumableArray(document.head.querySelectorAll("style[".concat(CUSTOM_THEME_ATTRIBUTE, "][").concat(THEME_DATA_ATTRIBUTE, "]")));
|
|
22
|
+
var styleTags = _toConsumableArray(Array.from(document.head.querySelectorAll("style[".concat(CUSTOM_THEME_ATTRIBUTE, "][").concat(THEME_DATA_ATTRIBUTE, "]"))));
|
|
23
23
|
if (styleTags.length < sizeThreshold) {
|
|
24
24
|
return;
|
|
25
25
|
}
|
package/package.json
CHANGED