@atlaskit/tokens 0.6.0 → 0.6.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 +7 -0
- package/css/atlassian-dark.css +1 -1
- package/dist/cjs/artifacts/rename-mapping.js +1 -1
- package/dist/cjs/artifacts/tokens-raw/atlassian-dark.js +2 -2
- package/dist/cjs/get-token.js +1 -1
- package/dist/cjs/tokens/atlassian-dark/elevation/surface.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/artifacts/rename-mapping.js +1 -1
- package/dist/es2019/artifacts/tokens-raw/atlassian-dark.js +2 -2
- package/dist/es2019/get-token.js +1 -1
- package/dist/es2019/tokens/atlassian-dark/elevation/surface.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/artifacts/rename-mapping.js +1 -1
- package/dist/esm/artifacts/tokens-raw/atlassian-dark.js +2 -2
- package/dist/esm/get-token.js +1 -1
- package/dist/esm/tokens/atlassian-dark/elevation/surface.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/artifacts/rename-mapping.d.ts +1 -1
- package/package.json +16 -8
- package/tokens-browser-extension/README.md +0 -28
- package/tokens-browser-extension/atlassian-theme.css +0 -449
- package/tokens-browser-extension/background.js +0 -75
- package/tokens-browser-extension/content-script.js +0 -75
- package/tokens-browser-extension/devtools.html +0 -1
- package/tokens-browser-extension/devtools.js +0 -14
- package/tokens-browser-extension/manifest.json +0 -35
- package/tokens-browser-extension/messageback-script.js +0 -10
- package/tokens-browser-extension/messaging.js +0 -36
- package/tokens-browser-extension/panel.html +0 -25
- package/tokens-browser-extension/panel.js +0 -46
- package/tokens-browser-extension/toast.png +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/tokens
|
|
2
2
|
|
|
3
|
+
## 0.6.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`3ed3071ee35`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3ed3071ee35) - Updates elevation.surface.sunken base token in darkmode to DN-100A
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
|
|
3
10
|
## 0.6.0
|
|
4
11
|
|
|
5
12
|
### Minor Changes
|
package/css/atlassian-dark.css
CHANGED
|
@@ -214,7 +214,7 @@ html[data-theme="dark"] {
|
|
|
214
214
|
--ds-shadow-raised: 0px 1px 1px #03040480, 0px 0px 1px #03040480;
|
|
215
215
|
--ds-shadow-overlay: inset 0px 0px 0px 1px #BCD6F00A, 0px 8px 12px #0304045C, 0px 0px 1px #03040480;
|
|
216
216
|
--ds-surface: #161A1D;
|
|
217
|
-
--ds-surface-sunken: #
|
|
217
|
+
--ds-surface-sunken: #03040442;
|
|
218
218
|
--ds-surface-raised: #1D2125;
|
|
219
219
|
--ds-surface-overlay: #22272B;
|
|
220
220
|
--ds-UNSAFE_util-transparent: transparent;
|
|
@@ -12,7 +12,7 @@ exports.default = void 0;
|
|
|
12
12
|
* 1. Mark the old token's 'state' as deprecated
|
|
13
13
|
* 2. Add a 'rename' attribute to the token with the value 'my.new.token'
|
|
14
14
|
* 3. Create a new token matching the token above: 'my.new.token'
|
|
15
|
-
* 4. Run '
|
|
15
|
+
* 4. Run 'yarn build tokens' to have you changes reflected in this map
|
|
16
16
|
* 5. eslint and other tools will now use this to automate replacing tokens
|
|
17
17
|
*
|
|
18
18
|
* These changes will then be picked up by our tooling, which will attempt to
|
|
@@ -4387,7 +4387,7 @@ var tokens = [{
|
|
|
4387
4387
|
"state": "active",
|
|
4388
4388
|
"description": "A secondary background for the UI commonly used for grouping items, such as Jira cards in columns."
|
|
4389
4389
|
},
|
|
4390
|
-
"value": "#
|
|
4390
|
+
"value": "#03040442",
|
|
4391
4391
|
"filePath": "src/tokens/atlassian-dark/elevation/surface.tsx",
|
|
4392
4392
|
"isSource": true,
|
|
4393
4393
|
"original": {
|
|
@@ -4396,7 +4396,7 @@ var tokens = [{
|
|
|
4396
4396
|
"state": "active",
|
|
4397
4397
|
"description": "A secondary background for the UI commonly used for grouping items, such as Jira cards in columns."
|
|
4398
4398
|
},
|
|
4399
|
-
"value": "
|
|
4399
|
+
"value": "DN-100A"
|
|
4400
4400
|
},
|
|
4401
4401
|
"name": "elevation.surface.sunken",
|
|
4402
4402
|
"path": ["elevation", "surface", "sunken"]
|
package/dist/cjs/get-token.js
CHANGED
|
@@ -12,7 +12,7 @@ var _warnOnce = _interopRequireDefault(require("@atlaskit/ds-lib/warn-once"));
|
|
|
12
12
|
var _tokenNames = _interopRequireDefault(require("./artifacts/token-names"));
|
|
13
13
|
|
|
14
14
|
var name = "@atlaskit/tokens";
|
|
15
|
-
var version = "0.6.
|
|
15
|
+
var version = "0.6.1";
|
|
16
16
|
|
|
17
17
|
function token(path, fallback) {
|
|
18
18
|
var token = _tokenNames.default[path];
|
package/dist/cjs/version.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* 1. Mark the old token's 'state' as deprecated
|
|
7
7
|
* 2. Add a 'rename' attribute to the token with the value 'my.new.token'
|
|
8
8
|
* 3. Create a new token matching the token above: 'my.new.token'
|
|
9
|
-
* 4. Run '
|
|
9
|
+
* 4. Run 'yarn build tokens' to have you changes reflected in this map
|
|
10
10
|
* 5. eslint and other tools will now use this to automate replacing tokens
|
|
11
11
|
*
|
|
12
12
|
* These changes will then be picked up by our tooling, which will attempt to
|
|
@@ -4381,7 +4381,7 @@ const tokens = [{
|
|
|
4381
4381
|
"state": "active",
|
|
4382
4382
|
"description": "A secondary background for the UI commonly used for grouping items, such as Jira cards in columns."
|
|
4383
4383
|
},
|
|
4384
|
-
"value": "#
|
|
4384
|
+
"value": "#03040442",
|
|
4385
4385
|
"filePath": "src/tokens/atlassian-dark/elevation/surface.tsx",
|
|
4386
4386
|
"isSource": true,
|
|
4387
4387
|
"original": {
|
|
@@ -4390,7 +4390,7 @@ const tokens = [{
|
|
|
4390
4390
|
"state": "active",
|
|
4391
4391
|
"description": "A secondary background for the UI commonly used for grouping items, such as Jira cards in columns."
|
|
4392
4392
|
},
|
|
4393
|
-
"value": "
|
|
4393
|
+
"value": "DN-100A"
|
|
4394
4394
|
},
|
|
4395
4395
|
"name": "elevation.surface.sunken",
|
|
4396
4396
|
"path": ["elevation", "surface", "sunken"]
|
package/dist/es2019/get-token.js
CHANGED
package/dist/es2019/version.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* 1. Mark the old token's 'state' as deprecated
|
|
7
7
|
* 2. Add a 'rename' attribute to the token with the value 'my.new.token'
|
|
8
8
|
* 3. Create a new token matching the token above: 'my.new.token'
|
|
9
|
-
* 4. Run '
|
|
9
|
+
* 4. Run 'yarn build tokens' to have you changes reflected in this map
|
|
10
10
|
* 5. eslint and other tools will now use this to automate replacing tokens
|
|
11
11
|
*
|
|
12
12
|
* These changes will then be picked up by our tooling, which will attempt to
|
|
@@ -4381,7 +4381,7 @@ var tokens = [{
|
|
|
4381
4381
|
"state": "active",
|
|
4382
4382
|
"description": "A secondary background for the UI commonly used for grouping items, such as Jira cards in columns."
|
|
4383
4383
|
},
|
|
4384
|
-
"value": "#
|
|
4384
|
+
"value": "#03040442",
|
|
4385
4385
|
"filePath": "src/tokens/atlassian-dark/elevation/surface.tsx",
|
|
4386
4386
|
"isSource": true,
|
|
4387
4387
|
"original": {
|
|
@@ -4390,7 +4390,7 @@ var tokens = [{
|
|
|
4390
4390
|
"state": "active",
|
|
4391
4391
|
"description": "A secondary background for the UI commonly used for grouping items, such as Jira cards in columns."
|
|
4392
4392
|
},
|
|
4393
|
-
"value": "
|
|
4393
|
+
"value": "DN-100A"
|
|
4394
4394
|
},
|
|
4395
4395
|
"name": "elevation.surface.sunken",
|
|
4396
4396
|
"path": ["elevation", "surface", "sunken"]
|
package/dist/esm/get-token.js
CHANGED
package/dist/esm/version.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* 1. Mark the old token's 'state' as deprecated
|
|
5
5
|
* 2. Add a 'rename' attribute to the token with the value 'my.new.token'
|
|
6
6
|
* 3. Create a new token matching the token above: 'my.new.token'
|
|
7
|
-
* 4. Run '
|
|
7
|
+
* 4. Run 'yarn build tokens' to have you changes reflected in this map
|
|
8
8
|
* 5. eslint and other tools will now use this to automate replacing tokens
|
|
9
9
|
*
|
|
10
10
|
* These changes will then be picked up by our tooling, which will attempt to
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/tokens",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"author": "Atlassian Pty Ltd",
|
|
5
5
|
"description": "Tokens are a single source of truth to name and store Atlassian design decisions.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -26,23 +26,31 @@
|
|
|
26
26
|
"./css": "./css"
|
|
27
27
|
},
|
|
28
28
|
"scripts": {
|
|
29
|
-
"ak-postbuild": "yarn codegen-tokens && yarn check-clean-git",
|
|
30
|
-
"check-clean-git": "git diff --exit-code -- packages/design-system/tokens/ || (echo 'tokens are is out of date, run
|
|
31
|
-
"codegen-tokens": "ts-node --project ../../../tsconfig.node.json ./scripts/style-dictionary/build"
|
|
29
|
+
"ak-postbuild": "yarn codegen-tokens && yarn check-clean-git && yarn build-chrome-extension",
|
|
30
|
+
"check-clean-git": "git diff --exit-code -- packages/design-system/tokens/ || (echo 'tokens are is out of date, run yarn build tokens' && false)",
|
|
31
|
+
"codegen-tokens": "ts-node --project ../../../tsconfig.node.json ./scripts/style-dictionary/build",
|
|
32
|
+
"build-chrome-extension": "yarn --cwd tokens-browser-extension build-chrome-extension"
|
|
32
33
|
},
|
|
33
34
|
"dependencies": {
|
|
34
|
-
"@atlaskit/ds-lib": "^1.
|
|
35
|
+
"@atlaskit/ds-lib": "^1.4.0",
|
|
35
36
|
"@babel/runtime": "^7.0.0",
|
|
36
37
|
"@babel/traverse": "^7.15.0",
|
|
37
38
|
"@babel/types": "^7.15.0"
|
|
38
39
|
},
|
|
39
40
|
"devDependencies": {
|
|
40
|
-
"@atlaskit/code": "
|
|
41
|
-
"@atlaskit/
|
|
42
|
-
"@atlaskit/
|
|
41
|
+
"@atlaskit/code": "^14.3.0",
|
|
42
|
+
"@atlaskit/icon": "^21.10.2",
|
|
43
|
+
"@atlaskit/lozenge": "^11.0.0",
|
|
44
|
+
"@atlaskit/section-message": "^6.1.7",
|
|
45
|
+
"@atlaskit/tabs": "^13.2.4",
|
|
46
|
+
"@atlaskit/textfield": "^5.1.5",
|
|
47
|
+
"@atlaskit/theme": "^12.1.2",
|
|
48
|
+
"@atlaskit/toggle": "^12.4.2",
|
|
43
49
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
44
50
|
"@babel/core": "^7.12.3",
|
|
45
51
|
"@emotion/core": "^10.0.9",
|
|
52
|
+
"@types/chrome": "^0.0.171",
|
|
53
|
+
"copy-webpack-plugin": "^6.4.0",
|
|
46
54
|
"lodash": "^4.17.21",
|
|
47
55
|
"prettier": "^2.1.1",
|
|
48
56
|
"react": "^16.8.0",
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
Atlaskit Tokens Browser Extension
|
|
2
|
-
===
|
|
3
|
-
|
|
4
|
-
This extension was made to help development of different themes using `@atlaskit/tokens`
|
|
5
|
-
|
|
6
|
-
Installation
|
|
7
|
-
===
|
|
8
|
-
The extension currently is not available on any extension store and can only be installed in its unpacked form
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
Chrome
|
|
12
|
-
* Open [chrome://extensions](chrome://extensions)
|
|
13
|
-
* Enable 'Developer Mode' checkbox
|
|
14
|
-
* Click 'Load unpacked extensions...'
|
|
15
|
-
* Select the `packages/design-system/tokens/tokens-browser-extension` folder
|
|
16
|
-
|
|
17
|
-
Firefox
|
|
18
|
-
* You can also install the extension in Firefox:
|
|
19
|
-
* Unzip the extension and follow the instructions at [Temporary installation in Firefox](https://extensionworkshop.com/documentation/develop/temporary-installation-in-firefox/).
|
|
20
|
-
|
|
21
|
-
Note: When you quit the browser it will remove the extension so you will have to follow the guide above to install it again. We can look at packaging the extension up properly if there is enough demand ;)
|
|
22
|
-
|
|
23
|
-
Usage
|
|
24
|
-
===
|
|
25
|
-
|
|
26
|
-
While on any page, launch the devtools, you should see a new tab called 'Tokens theming controls'.
|
|
27
|
-
|
|
28
|
-
You can toggle between the themes or disable the theme to see the legacy appearance
|
|
@@ -1,449 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* These styles have been copy-pasted from the output
|
|
3
|
-
* in packages/design-system/tokens/css
|
|
4
|
-
* this now includes namespaced tokens only
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
html[data-theme='light'] {
|
|
8
|
-
--ds-text-accent-blue: #0055CC;
|
|
9
|
-
--ds-text-accent-red: #AE2A19;
|
|
10
|
-
--ds-text-accent-orange: #974F0C;
|
|
11
|
-
--ds-text-accent-yellow: #7F5F01;
|
|
12
|
-
--ds-text-accent-green: #216E4E;
|
|
13
|
-
--ds-text-accent-purple: #5E4DB2;
|
|
14
|
-
--ds-text-accent-teal: #206B74;
|
|
15
|
-
--ds-text-accent-magenta: #943D73;
|
|
16
|
-
--ds-text: #172B4D;
|
|
17
|
-
--ds-text-subtle: #44546F;
|
|
18
|
-
--ds-text-subtlest: #626F86;
|
|
19
|
-
--ds-text-disabled: #8993A5;
|
|
20
|
-
--ds-text-inverse: #FFFFFF;
|
|
21
|
-
--ds-text-brand: #0C66E4;
|
|
22
|
-
--ds-text-danger: #AE2A19;
|
|
23
|
-
--ds-text-warning: #974F0C;
|
|
24
|
-
--ds-text-warning-inverse: #172B4D;
|
|
25
|
-
--ds-text-success: #216E4E;
|
|
26
|
-
--ds-text-discovery: #5E4DB2;
|
|
27
|
-
--ds-text-information: #0055CC;
|
|
28
|
-
--ds-text-highEmphasis: #172B4D;
|
|
29
|
-
--ds-text-link-pressed: #0055CC;
|
|
30
|
-
--ds-text-link-resting: #0C66E4;
|
|
31
|
-
--ds-text-lowEmphasis: #626F86;
|
|
32
|
-
--ds-text-mediumEmphasis: #44546F;
|
|
33
|
-
--ds-text-onBold: #FFFFFF;
|
|
34
|
-
--ds-text-onBoldWarning: #172B4D;
|
|
35
|
-
--ds-text-selected: #0C66E4;
|
|
36
|
-
--ds-icon-accent-blue: #1D7AFC;
|
|
37
|
-
--ds-icon-accent-red: #E34935;
|
|
38
|
-
--ds-icon-accent-orange: #D97008;
|
|
39
|
-
--ds-icon-accent-yellow: #B38600;
|
|
40
|
-
--ds-icon-accent-green: #22A06B;
|
|
41
|
-
--ds-icon-accent-purple: #8270DB;
|
|
42
|
-
--ds-icon-accent-teal: #1D9AAA;
|
|
43
|
-
--ds-icon-accent-magenta: #CD519D;
|
|
44
|
-
--ds-icon: #44546F;
|
|
45
|
-
--ds-icon-subtle: #626F86;
|
|
46
|
-
--ds-icon-inverse: #FFFFFF;
|
|
47
|
-
--ds-icon-disabled: #8993A5;
|
|
48
|
-
--ds-icon-brand: #0C66E4;
|
|
49
|
-
--ds-icon-danger: #E34935;
|
|
50
|
-
--ds-icon-warning: #D97008;
|
|
51
|
-
--ds-icon-warning-inverse: #172B4D;
|
|
52
|
-
--ds-icon-success: #22A06B;
|
|
53
|
-
--ds-icon-discovery: #8270DB;
|
|
54
|
-
--ds-icon-information: #1D7AFC;
|
|
55
|
-
--ds-border-accent-blue: #1D7AFC;
|
|
56
|
-
--ds-border-accent-red: #E34935;
|
|
57
|
-
--ds-border-accent-orange: #D97008;
|
|
58
|
-
--ds-border-accent-yellow: #B38600;
|
|
59
|
-
--ds-border-accent-green: #22A06B;
|
|
60
|
-
--ds-border-accent-purple: #8270DB;
|
|
61
|
-
--ds-border-accent-teal: #1D9AAA;
|
|
62
|
-
--ds-border-accent-magenta: #CD519D;
|
|
63
|
-
--ds-border: #091E4224;
|
|
64
|
-
--ds-border-focused: #388BFF;
|
|
65
|
-
--ds-border-input: #091E4224;
|
|
66
|
-
--ds-border-disabled: #091E420F;
|
|
67
|
-
--ds-border-brand: #0C66E4;
|
|
68
|
-
--ds-border-danger: #E34935;
|
|
69
|
-
--ds-border-warning: #D97008;
|
|
70
|
-
--ds-border-success: #22A06B;
|
|
71
|
-
--ds-border-discovery: #8270DB;
|
|
72
|
-
--ds-border-information: #1D7AFC;
|
|
73
|
-
--ds-border-focus: #388BFF;
|
|
74
|
-
--ds-border-neutral: #091E4224;
|
|
75
|
-
--ds-background-accent-blue: #CCE0FF;
|
|
76
|
-
--ds-background-accent-blue-bold: #579DFF;
|
|
77
|
-
--ds-background-accent-red: #FFD2CC;
|
|
78
|
-
--ds-background-accent-red-bold: #F87462;
|
|
79
|
-
--ds-background-accent-orange: #FFE2BD;
|
|
80
|
-
--ds-background-accent-orange-bold: #FAA53D;
|
|
81
|
-
--ds-background-accent-yellow: #F8E6A0;
|
|
82
|
-
--ds-background-accent-yellow-bold: #E2B203;
|
|
83
|
-
--ds-background-accent-green: #BAF3DB;
|
|
84
|
-
--ds-background-accent-green-bold: #4BCE97;
|
|
85
|
-
--ds-background-accent-teal: #C1F0F5;
|
|
86
|
-
--ds-background-accent-teal-bold: #60C6D2;
|
|
87
|
-
--ds-background-accent-purple: #DFD8FD;
|
|
88
|
-
--ds-background-accent-purple-bold: #9F8FEF;
|
|
89
|
-
--ds-background-accent-magenta: #FDD0EC;
|
|
90
|
-
--ds-background-accent-magenta-bold: #E774BB;
|
|
91
|
-
--ds-background-disabled: #091E420F;
|
|
92
|
-
--ds-background-inverse: #00000029;
|
|
93
|
-
--ds-background-input: #091E4208;
|
|
94
|
-
--ds-background-input-hovered: #FFFFFF;
|
|
95
|
-
--ds-background-input-pressed: #091E420F;
|
|
96
|
-
--ds-background-neutral: #091E420F;
|
|
97
|
-
--ds-background-neutral-hovered: #091E4224;
|
|
98
|
-
--ds-background-neutral-pressed: #091E424F;
|
|
99
|
-
--ds-background-neutral-subtle: #00000000;
|
|
100
|
-
--ds-background-neutral-subtle-hovered: #091E420F;
|
|
101
|
-
--ds-background-neutral-subtle-pressed: #091E4224;
|
|
102
|
-
--ds-background-neutral-bold: #44546F;
|
|
103
|
-
--ds-background-neutral-bold-hovered: #2C3E5D;
|
|
104
|
-
--ds-background-neutral-bold-pressed: #172B4D;
|
|
105
|
-
--ds-background-brand: #E9F2FF;
|
|
106
|
-
--ds-background-brand-hovered: #CCE0FF;
|
|
107
|
-
--ds-background-brand-pressed: #85B8FF;
|
|
108
|
-
--ds-background-brand-bold: #0C66E4;
|
|
109
|
-
--ds-background-brand-bold-hovered: #0055CC;
|
|
110
|
-
--ds-background-brand-bold-pressed: #09326C;
|
|
111
|
-
--ds-background-danger: #FFEDEB;
|
|
112
|
-
--ds-background-danger-hovered: #FFD2CC;
|
|
113
|
-
--ds-background-danger-pressed: #FF9C8F;
|
|
114
|
-
--ds-background-danger-bold: #CA3521;
|
|
115
|
-
--ds-background-danger-bold-hovered: #AE2A19;
|
|
116
|
-
--ds-background-danger-bold-pressed: #601E16;
|
|
117
|
-
--ds-background-warning: #FFF7D6;
|
|
118
|
-
--ds-background-warning-hovered: #F8E6A0;
|
|
119
|
-
--ds-background-warning-pressed: #F5CD47;
|
|
120
|
-
--ds-background-warning-bold: #E2B203;
|
|
121
|
-
--ds-background-warning-bold-hovered: #CF9F02;
|
|
122
|
-
--ds-background-warning-bold-pressed: #B38600;
|
|
123
|
-
--ds-background-success: #DFFCF0;
|
|
124
|
-
--ds-background-success-hovered: #BAF3DB;
|
|
125
|
-
--ds-background-success-pressed: #7EE2B8;
|
|
126
|
-
--ds-background-success-bold: #1F845A;
|
|
127
|
-
--ds-background-success-bold-hovered: #216E4E;
|
|
128
|
-
--ds-background-success-bold-pressed: #164B35;
|
|
129
|
-
--ds-background-discovery: #F3F0FF;
|
|
130
|
-
--ds-background-discovery-hovered: #DFD8FD;
|
|
131
|
-
--ds-background-discovery-pressed: #B8ACF6;
|
|
132
|
-
--ds-background-discovery-bold: #6E5DC6;
|
|
133
|
-
--ds-background-discovery-bold-hovered: #5E4DB2;
|
|
134
|
-
--ds-background-discovery-bold-pressed: #352C63;
|
|
135
|
-
--ds-background-information: #E9F2FF;
|
|
136
|
-
--ds-background-information-hovered: #CCE0FF;
|
|
137
|
-
--ds-background-information-pressed: #85B8FF;
|
|
138
|
-
--ds-background-information-bold: #0C66E4;
|
|
139
|
-
--ds-background-information-bold-hovered: #0055CC;
|
|
140
|
-
--ds-background-information-bold-pressed: #09326C;
|
|
141
|
-
--ds-background-blanket: #091E427A;
|
|
142
|
-
--ds-background-boldBrand-hover: #0055CC;
|
|
143
|
-
--ds-background-boldBrand-pressed: #09326C;
|
|
144
|
-
--ds-background-boldBrand-resting: #0C66E4;
|
|
145
|
-
--ds-background-boldDanger-hover: #AE2A19;
|
|
146
|
-
--ds-background-boldDanger-pressed: #601E16;
|
|
147
|
-
--ds-background-boldDanger-resting: #CA3521;
|
|
148
|
-
--ds-background-boldDiscovery-hover: #5E4DB2;
|
|
149
|
-
--ds-background-boldDiscovery-pressed: #352C63;
|
|
150
|
-
--ds-background-boldDiscovery-resting: #6E5DC6;
|
|
151
|
-
--ds-background-boldNeutral-hover: #2C3E5D;
|
|
152
|
-
--ds-background-boldNeutral-pressed: #172B4D;
|
|
153
|
-
--ds-background-boldNeutral-resting: #44546F;
|
|
154
|
-
--ds-background-boldSuccess-hover: #216E4E;
|
|
155
|
-
--ds-background-boldSuccess-pressed: #164B35;
|
|
156
|
-
--ds-background-boldSuccess-resting: #1F845A;
|
|
157
|
-
--ds-background-boldWarning-hover: #CF9F02;
|
|
158
|
-
--ds-background-boldWarning-pressed: #B38600;
|
|
159
|
-
--ds-background-boldWarning-resting: #E2B203;
|
|
160
|
-
--ds-background-card: #FFFFFF;
|
|
161
|
-
--ds-background-default: #FFFFFF;
|
|
162
|
-
--ds-background-overlay: #FFFFFF;
|
|
163
|
-
--ds-background-selected-resting: #E9F2FF;
|
|
164
|
-
--ds-background-selected-hover: #CCE0FF;
|
|
165
|
-
--ds-background-selected-pressed: #85B8FF;
|
|
166
|
-
--ds-background-subtleBorderedNeutral-pressed: #091E420F;
|
|
167
|
-
--ds-background-subtleBorderedNeutral-resting: #091E4208;
|
|
168
|
-
--ds-background-subtleBrand-hover: #CCE0FF;
|
|
169
|
-
--ds-background-subtleBrand-pressed: #85B8FF;
|
|
170
|
-
--ds-background-subtleBrand-resting: #E9F2FF;
|
|
171
|
-
--ds-background-subtleDanger-hover: #FFD2CC;
|
|
172
|
-
--ds-background-subtleDanger-pressed: #FF9C8F;
|
|
173
|
-
--ds-background-subtleDanger-resting: #FFEDEB;
|
|
174
|
-
--ds-background-subtleDiscovery-hover: #DFD8FD;
|
|
175
|
-
--ds-background-subtleDiscovery-pressed: #B8ACF6;
|
|
176
|
-
--ds-background-subtleDiscovery-resting: #F3F0FF;
|
|
177
|
-
--ds-background-subtleNeutral-hover: #091E4224;
|
|
178
|
-
--ds-background-subtleNeutral-pressed: #091E424F;
|
|
179
|
-
--ds-background-subtleNeutral-resting: #091E420F;
|
|
180
|
-
--ds-background-subtleSuccess-hover: #BAF3DB;
|
|
181
|
-
--ds-background-subtleSuccess-pressed: #7EE2B8;
|
|
182
|
-
--ds-background-subtleSuccess-resting: #DFFCF0;
|
|
183
|
-
--ds-background-subtleWarning-hover: #F8E6A0;
|
|
184
|
-
--ds-background-subtleWarning-pressed: #F5CD47;
|
|
185
|
-
--ds-background-subtleWarning-resting: #FFF7D6;
|
|
186
|
-
--ds-background-sunken: #091E4208;
|
|
187
|
-
--ds-background-transparentNeutral-hover: #091E420F;
|
|
188
|
-
--ds-background-transparentNeutral-pressed: #091E4224;
|
|
189
|
-
--ds-blanket: #091E427A;
|
|
190
|
-
--ds-interaction-hovered: #ffffff33;
|
|
191
|
-
--ds-interaction-pressed: #ffffff5c;
|
|
192
|
-
--ds-interaction-inverse-hovered: #00000029;
|
|
193
|
-
--ds-interaction-inverse-pressed: #00000052;
|
|
194
|
-
--ds-link: #0C66E4;
|
|
195
|
-
--ds-link-pressed: #0055CC;
|
|
196
|
-
--ds-accent-boldBlue: #579DFF;
|
|
197
|
-
--ds-accent-boldGreen: #4BCE97;
|
|
198
|
-
--ds-accent-boldOrange: #FAA53D;
|
|
199
|
-
--ds-accent-boldPurple: #9F8FEF;
|
|
200
|
-
--ds-accent-boldRed: #F87462;
|
|
201
|
-
--ds-accent-boldTeal: #60C6D2;
|
|
202
|
-
--ds-accent-subtleBlue: #CCE0FF;
|
|
203
|
-
--ds-accent-subtleGreen: #BAF3DB;
|
|
204
|
-
--ds-accent-subtleMagenta: #FDD0EC;
|
|
205
|
-
--ds-accent-subtleOrange: #FFE2BD;
|
|
206
|
-
--ds-accent-subtlePurple: #DFD8FD;
|
|
207
|
-
--ds-accent-subtleRed: #FFD2CC;
|
|
208
|
-
--ds-accent-subtleTeal: #C1F0F5;
|
|
209
|
-
--ds-iconBorder-brand: #1D7AFC;
|
|
210
|
-
--ds-iconBorder-danger: #E34935;
|
|
211
|
-
--ds-iconBorder-discovery: #8270DB;
|
|
212
|
-
--ds-iconBorder-success: #22A06B;
|
|
213
|
-
--ds-iconBorder-warning: #D97008;
|
|
214
|
-
--ds-overlay-hover: #091E424F;
|
|
215
|
-
--ds-overlay-pressed: #091E427A;
|
|
216
|
-
--ds-card: 0px 1px 1px #091E4240, 0px 0px 1px #091E424F;
|
|
217
|
-
--ds-overlay: 0px 8px 12px #091E4226, 0px 0px 1px #091E424F;
|
|
218
|
-
--ds-shadow-raised: 0px 1px 1px #091E4240, 0px 0px 1px #091E424F;
|
|
219
|
-
--ds-shadow-overlay: 0px 8px 12px #091E4226, 0px 0px 1px #091E424F;
|
|
220
|
-
--ds-surface: #FFFFFF;
|
|
221
|
-
--ds-surface-sunken: #091E4208;
|
|
222
|
-
--ds-surface-raised: #FFFFFF;
|
|
223
|
-
--ds-surface-overlay: #FFFFFF;
|
|
224
|
-
--ds-UNSAFE_util-transparent: transparent;
|
|
225
|
-
--ds-UNSAFE_util-MISSING_TOKEN: #FA11F2;
|
|
226
|
-
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
html[data-theme='dark'] {
|
|
230
|
-
--ds-text-accent-blue: #85B8FF;
|
|
231
|
-
--ds-text-accent-red: #FF9C8F;
|
|
232
|
-
--ds-text-accent-orange: #FEC57B;
|
|
233
|
-
--ds-text-accent-yellow: #F5CD47;
|
|
234
|
-
--ds-text-accent-green: #7EE2B8;
|
|
235
|
-
--ds-text-accent-purple: #B8ACF6;
|
|
236
|
-
--ds-text-accent-teal: #8BDBE5;
|
|
237
|
-
--ds-text-accent-magenta: #F797D2;
|
|
238
|
-
--ds-text: #C7D1DB;
|
|
239
|
-
--ds-text-subtle: #9FADBC;
|
|
240
|
-
--ds-text-subtlest: #8696A7;
|
|
241
|
-
--ds-text-disabled: #5C6C7A;
|
|
242
|
-
--ds-text-inverse: #161A1D;
|
|
243
|
-
--ds-text-brand: #579DFF;
|
|
244
|
-
--ds-text-danger: #FF9C8F;
|
|
245
|
-
--ds-text-warning: #F5CD47;
|
|
246
|
-
--ds-text-warning-inverse: #161A1D;
|
|
247
|
-
--ds-text-success: #7EE2B8;
|
|
248
|
-
--ds-text-discovery: #B8ACF6;
|
|
249
|
-
--ds-text-information: #85B8FF;
|
|
250
|
-
--ds-text-highEmphasis: #C7D1DB;
|
|
251
|
-
--ds-text-link-pressed: #85B8FF;
|
|
252
|
-
--ds-text-link-resting: #579DFF;
|
|
253
|
-
--ds-text-lowEmphasis: #8696A7;
|
|
254
|
-
--ds-text-mediumEmphasis: #9FADBC;
|
|
255
|
-
--ds-text-onBold: #161A1D;
|
|
256
|
-
--ds-text-onBoldWarning: #161A1D;
|
|
257
|
-
--ds-text-selected: #579DFF;
|
|
258
|
-
--ds-icon-accent-blue: #388BFF;
|
|
259
|
-
--ds-icon-accent-red: #EF5C48;
|
|
260
|
-
--ds-icon-accent-orange: #F18D13;
|
|
261
|
-
--ds-icon-accent-yellow: #CF9F02;
|
|
262
|
-
--ds-icon-accent-green: #2ABB7F;
|
|
263
|
-
--ds-icon-accent-purple: #8F7EE7;
|
|
264
|
-
--ds-icon-accent-teal: #37B4C3;
|
|
265
|
-
--ds-icon-accent-magenta: #DA62AC;
|
|
266
|
-
--ds-icon: #9FADBC;
|
|
267
|
-
--ds-icon-subtle: #8696A7;
|
|
268
|
-
--ds-icon-inverse: #161A1D;
|
|
269
|
-
--ds-icon-disabled: #5C6C7A;
|
|
270
|
-
--ds-icon-brand: #579DFF;
|
|
271
|
-
--ds-icon-danger: #EF5C48;
|
|
272
|
-
--ds-icon-warning: #CF9F02;
|
|
273
|
-
--ds-icon-warning-inverse: #161A1D;
|
|
274
|
-
--ds-icon-success: #2ABB7F;
|
|
275
|
-
--ds-icon-discovery: #8F7EE7;
|
|
276
|
-
--ds-icon-information: #388BFF;
|
|
277
|
-
--ds-border-accent-blue: #388BFF;
|
|
278
|
-
--ds-border-accent-red: #EF5C48;
|
|
279
|
-
--ds-border-accent-orange: #F18D13;
|
|
280
|
-
--ds-border-accent-yellow: #CF9F02;
|
|
281
|
-
--ds-border-accent-green: #2ABB7F;
|
|
282
|
-
--ds-border-accent-purple: #8F7EE7;
|
|
283
|
-
--ds-border-accent-teal: #37B4C3;
|
|
284
|
-
--ds-border-accent-magenta: #DA62AC;
|
|
285
|
-
--ds-border: #A6C5E229;
|
|
286
|
-
--ds-border-focused: #85B8FF;
|
|
287
|
-
--ds-border-input: #A6C5E229;
|
|
288
|
-
--ds-border-disabled: #A1BDD914;
|
|
289
|
-
--ds-border-brand: #579DFF;
|
|
290
|
-
--ds-border-danger: #EF5C48;
|
|
291
|
-
--ds-border-warning: #CF9F02;
|
|
292
|
-
--ds-border-success: #2ABB7F;
|
|
293
|
-
--ds-border-discovery: #8F7EE7;
|
|
294
|
-
--ds-border-information: #388BFF;
|
|
295
|
-
--ds-border-focus: #85B8FF;
|
|
296
|
-
--ds-border-neutral: #A6C5E229;
|
|
297
|
-
--ds-background-accent-blue: #09326C;
|
|
298
|
-
--ds-background-accent-blue-bold: #0C66E4;
|
|
299
|
-
--ds-background-accent-red: #601E16;
|
|
300
|
-
--ds-background-accent-red-bold: #CA3521;
|
|
301
|
-
--ds-background-accent-orange: #5F3811;
|
|
302
|
-
--ds-background-accent-orange-bold: #B65C02;
|
|
303
|
-
--ds-background-accent-yellow: #533F04;
|
|
304
|
-
--ds-background-accent-yellow-bold: #946F00;
|
|
305
|
-
--ds-background-accent-green: #164B35;
|
|
306
|
-
--ds-background-accent-green-bold: #1F845A;
|
|
307
|
-
--ds-background-accent-teal: #1D474C;
|
|
308
|
-
--ds-background-accent-teal-bold: #1D7F8C;
|
|
309
|
-
--ds-background-accent-purple: #352C63;
|
|
310
|
-
--ds-background-accent-purple-bold: #6E5DC6;
|
|
311
|
-
--ds-background-accent-magenta: #50253F;
|
|
312
|
-
--ds-background-accent-magenta-bold: #AE4787;
|
|
313
|
-
--ds-background-disabled: #A1BDD914;
|
|
314
|
-
--ds-background-inverse: #ffffff33;
|
|
315
|
-
--ds-background-input: #BCD6F00A;
|
|
316
|
-
--ds-background-input-hovered: #161A1D;
|
|
317
|
-
--ds-background-input-pressed: #A1BDD914;
|
|
318
|
-
--ds-background-neutral: #A1BDD914;
|
|
319
|
-
--ds-background-neutral-hovered: #A6C5E229;
|
|
320
|
-
--ds-background-neutral-pressed: #BFDBF847;
|
|
321
|
-
--ds-background-neutral-subtle: #00000000;
|
|
322
|
-
--ds-background-neutral-subtle-hovered: #A1BDD914;
|
|
323
|
-
--ds-background-neutral-subtle-pressed: #A6C5E229;
|
|
324
|
-
--ds-background-neutral-bold: #9FADBC;
|
|
325
|
-
--ds-background-neutral-bold-hovered: #B6C2CF;
|
|
326
|
-
--ds-background-neutral-bold-pressed: #C7D1DB;
|
|
327
|
-
--ds-background-brand: #A1BDD914;
|
|
328
|
-
--ds-background-brand-hovered: #A6C5E229;
|
|
329
|
-
--ds-background-brand-pressed: #BFDBF847;
|
|
330
|
-
--ds-background-brand-bold: #579DFF;
|
|
331
|
-
--ds-background-brand-bold-hovered: #85B8FF;
|
|
332
|
-
--ds-background-brand-bold-pressed: #CCE0FF;
|
|
333
|
-
--ds-background-danger: #391813;
|
|
334
|
-
--ds-background-danger-hovered: #601E16;
|
|
335
|
-
--ds-background-danger-pressed: #AE2A19;
|
|
336
|
-
--ds-background-danger-bold: #F87462;
|
|
337
|
-
--ds-background-danger-bold-hovered: #FF9C8F;
|
|
338
|
-
--ds-background-danger-bold-pressed: #FFD2CC;
|
|
339
|
-
--ds-background-warning: #3D2E00;
|
|
340
|
-
--ds-background-warning-hovered: #533F04;
|
|
341
|
-
--ds-background-warning-pressed: #7F5F01;
|
|
342
|
-
--ds-background-warning-bold: #E2B203;
|
|
343
|
-
--ds-background-warning-bold-hovered: #F5CD47;
|
|
344
|
-
--ds-background-warning-bold-pressed: #F8E6A0;
|
|
345
|
-
--ds-background-success: #133527;
|
|
346
|
-
--ds-background-success-hovered: #164B35;
|
|
347
|
-
--ds-background-success-pressed: #216E4E;
|
|
348
|
-
--ds-background-success-bold: #4BCE97;
|
|
349
|
-
--ds-background-success-bold-hovered: #7EE2B8;
|
|
350
|
-
--ds-background-success-bold-pressed: #BAF3DB;
|
|
351
|
-
--ds-background-discovery: #231C3F;
|
|
352
|
-
--ds-background-discovery-hovered: #352C63;
|
|
353
|
-
--ds-background-discovery-pressed: #5E4DB2;
|
|
354
|
-
--ds-background-discovery-bold: #9F8FEF;
|
|
355
|
-
--ds-background-discovery-bold-hovered: #B8ACF6;
|
|
356
|
-
--ds-background-discovery-bold-pressed: #DFD8FD;
|
|
357
|
-
--ds-background-information: #082145;
|
|
358
|
-
--ds-background-information-hovered: #09326C;
|
|
359
|
-
--ds-background-information-pressed: #0055CC;
|
|
360
|
-
--ds-background-information-bold: #579DFF;
|
|
361
|
-
--ds-background-information-bold-hovered: #85B8FF;
|
|
362
|
-
--ds-background-information-bold-pressed: #CCE0FF;
|
|
363
|
-
--ds-background-blanket: #03040442;
|
|
364
|
-
--ds-background-boldBrand-hover: #85B8FF;
|
|
365
|
-
--ds-background-boldBrand-pressed: #CCE0FF;
|
|
366
|
-
--ds-background-boldBrand-resting: #579DFF;
|
|
367
|
-
--ds-background-boldDanger-hover: #FF9C8F;
|
|
368
|
-
--ds-background-boldDanger-pressed: #FFD2CC;
|
|
369
|
-
--ds-background-boldDanger-resting: #F87462;
|
|
370
|
-
--ds-background-boldDiscovery-hover: #B8ACF6;
|
|
371
|
-
--ds-background-boldDiscovery-pressed: #DFD8FD;
|
|
372
|
-
--ds-background-boldDiscovery-resting: #9F8FEF;
|
|
373
|
-
--ds-background-boldNeutral-hover: #B6C2CF;
|
|
374
|
-
--ds-background-boldNeutral-pressed: #C7D1DB;
|
|
375
|
-
--ds-background-boldNeutral-resting: #9FADBC;
|
|
376
|
-
--ds-background-boldSuccess-hover: #7EE2B8;
|
|
377
|
-
--ds-background-boldSuccess-pressed: #BAF3DB;
|
|
378
|
-
--ds-background-boldSuccess-resting: #4BCE97;
|
|
379
|
-
--ds-background-boldWarning-hover: #F5CD47;
|
|
380
|
-
--ds-background-boldWarning-pressed: #F8E6A0;
|
|
381
|
-
--ds-background-boldWarning-resting: #E2B203;
|
|
382
|
-
--ds-background-card: #1D2125;
|
|
383
|
-
--ds-background-default: #161A1D;
|
|
384
|
-
--ds-background-overlay: #22272B;
|
|
385
|
-
--ds-background-selected-resting: #A1BDD914;
|
|
386
|
-
--ds-background-selected-hover: #A6C5E229;
|
|
387
|
-
--ds-background-selected-pressed: #BFDBF847;
|
|
388
|
-
--ds-background-subtleBorderedNeutral-pressed: #A1BDD914;
|
|
389
|
-
--ds-background-subtleBorderedNeutral-resting: #BCD6F00A;
|
|
390
|
-
--ds-background-subtleBrand-hover: #09326C;
|
|
391
|
-
--ds-background-subtleBrand-pressed: #0055CC;
|
|
392
|
-
--ds-background-subtleBrand-resting: #082145;
|
|
393
|
-
--ds-background-subtleDanger-hover: #601E16;
|
|
394
|
-
--ds-background-subtleDanger-pressed: #AE2A19;
|
|
395
|
-
--ds-background-subtleDanger-resting: #391813;
|
|
396
|
-
--ds-background-subtleDiscovery-hover: #352C63;
|
|
397
|
-
--ds-background-subtleDiscovery-pressed: #5E4DB2;
|
|
398
|
-
--ds-background-subtleDiscovery-resting: #231C3F;
|
|
399
|
-
--ds-background-subtleNeutral-hover: #A6C5E229;
|
|
400
|
-
--ds-background-subtleNeutral-pressed: #BFDBF847;
|
|
401
|
-
--ds-background-subtleNeutral-resting: #A1BDD914;
|
|
402
|
-
--ds-background-subtleSuccess-hover: #164B35;
|
|
403
|
-
--ds-background-subtleSuccess-pressed: #216E4E;
|
|
404
|
-
--ds-background-subtleSuccess-resting: #133527;
|
|
405
|
-
--ds-background-subtleWarning-hover: #533F04;
|
|
406
|
-
--ds-background-subtleWarning-pressed: #7F5F01;
|
|
407
|
-
--ds-background-subtleWarning-resting: #3D2E00;
|
|
408
|
-
--ds-background-sunken: #03040442;
|
|
409
|
-
--ds-background-transparentNeutral-hover: #A1BDD914;
|
|
410
|
-
--ds-background-transparentNeutral-pressed: #A6C5E229;
|
|
411
|
-
--ds-blanket: #03040442;
|
|
412
|
-
--ds-interaction-hovered: #00000029;
|
|
413
|
-
--ds-interaction-pressed: #00000052;
|
|
414
|
-
--ds-interaction-inverse-hovered: #ffffff33;
|
|
415
|
-
--ds-interaction-inverse-pressed: #ffffff5c;
|
|
416
|
-
--ds-link: #579DFF;
|
|
417
|
-
--ds-link-pressed: #85B8FF;
|
|
418
|
-
--ds-accent-boldBlue: #0C66E4;
|
|
419
|
-
--ds-accent-boldGreen: #1F845A;
|
|
420
|
-
--ds-accent-boldOrange: #B65C02;
|
|
421
|
-
--ds-accent-boldPurple: #6E5DC6;
|
|
422
|
-
--ds-accent-boldRed: #CA3521;
|
|
423
|
-
--ds-accent-boldTeal: #1D7F8C;
|
|
424
|
-
--ds-accent-subtleBlue: #09326C;
|
|
425
|
-
--ds-accent-subtleGreen: #164B35;
|
|
426
|
-
--ds-accent-subtleMagenta: #50253F;
|
|
427
|
-
--ds-accent-subtleOrange: #5F3811;
|
|
428
|
-
--ds-accent-subtlePurple: #352C63;
|
|
429
|
-
--ds-accent-subtleRed: #601E16;
|
|
430
|
-
--ds-accent-subtleTeal: #1D474C;
|
|
431
|
-
--ds-iconBorder-brand: #388BFF;
|
|
432
|
-
--ds-iconBorder-danger: #EF5C48;
|
|
433
|
-
--ds-iconBorder-discovery: #8F7EE7;
|
|
434
|
-
--ds-iconBorder-success: #2ABB7F;
|
|
435
|
-
--ds-iconBorder-warning: #CF9F02;
|
|
436
|
-
--ds-overlay-hover: #BFDBF847;
|
|
437
|
-
--ds-overlay-pressed: #A9C5DF7A;
|
|
438
|
-
--ds-card: 0px 1px 1px #03040480, 0px 0px 1px #03040480;
|
|
439
|
-
--ds-overlay: inset 0px 0px 0px 1px #BCD6F00A, 0px 8px 12px #0304045C, 0px 0px 1px #03040480;
|
|
440
|
-
--ds-shadow-raised: 0px 1px 1px #03040480, 0px 0px 1px #03040480;
|
|
441
|
-
--ds-shadow-overlay: inset 0px 0px 0px 1px #BCD6F00A, 0px 8px 12px #0304045C, 0px 0px 1px #03040480;
|
|
442
|
-
--ds-surface: #161A1D;
|
|
443
|
-
--ds-surface-sunken: #03040442;
|
|
444
|
-
--ds-surface-raised: #1D2125;
|
|
445
|
-
--ds-surface-overlay: #22272B;
|
|
446
|
-
--ds-UNSAFE_util-transparent: transparent;
|
|
447
|
-
--ds-UNSAFE_util-MISSING_TOKEN: #FA11F2;
|
|
448
|
-
|
|
449
|
-
}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
/* eslint-disable func-names */
|
|
2
|
-
/* eslint-disable no-console */
|
|
3
|
-
/* eslint-disable no-undef */
|
|
4
|
-
/* eslint-disable no-unused-vars */
|
|
5
|
-
|
|
6
|
-
// Chrome automatically creates a background.html page for this to execute.
|
|
7
|
-
// This can access the inspected page via executeScript
|
|
8
|
-
//
|
|
9
|
-
// Can use:
|
|
10
|
-
// chrome.tabs.*
|
|
11
|
-
// chrome.extension.*
|
|
12
|
-
|
|
13
|
-
// sync options settings
|
|
14
|
-
function setOptions(data = {}) {
|
|
15
|
-
chrome.storage.sync.set(data, function () {
|
|
16
|
-
console.log('Settings saved');
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
function getOptions(keys, callback) {
|
|
21
|
-
chrome.storage.sync.get(keys, function (data) {
|
|
22
|
-
console.log('Settings retrieved', data);
|
|
23
|
-
callback(data);
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
function queryTheme() {
|
|
28
|
-
const theme = window.localStorage && window.localStorage.theme;
|
|
29
|
-
console.log('theme', theme);
|
|
30
|
-
chrome.runtime.sendMessage({ theme });
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
// when the extension is loaded when opening devtools
|
|
34
|
-
chrome.runtime.onConnect.addListener(function (port) {
|
|
35
|
-
// check for the theme in the running tab
|
|
36
|
-
chrome.tabs.query({ active: true, currentWindow: true }, function (tabs) {
|
|
37
|
-
chrome.tabs.executeScript(tabs[0].id, {
|
|
38
|
-
code: `(${queryTheme})()`,
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
|
-
const extensionListener = function (message, sender, sendResponse) {
|
|
42
|
-
if (message.tabId && message.action) {
|
|
43
|
-
// handle changing theme from extension into inspected page
|
|
44
|
-
// these messages come from panel.js
|
|
45
|
-
|
|
46
|
-
console.log('background', message);
|
|
47
|
-
switch (message.action) {
|
|
48
|
-
case 'removeTheme':
|
|
49
|
-
chrome.tabs.sendMessage(message.tabId, 'none');
|
|
50
|
-
break;
|
|
51
|
-
case 'setTheme-light':
|
|
52
|
-
chrome.tabs.sendMessage(message.tabId, 'light');
|
|
53
|
-
break;
|
|
54
|
-
case 'setTheme-dark':
|
|
55
|
-
chrome.tabs.sendMessage(message.tabId, 'dark');
|
|
56
|
-
break;
|
|
57
|
-
default:
|
|
58
|
-
break;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
// This accepts messages from the inspected page and
|
|
62
|
-
// sends them to the panel
|
|
63
|
-
} else {
|
|
64
|
-
port.postMessage(message);
|
|
65
|
-
}
|
|
66
|
-
sendResponse(message);
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
// Listens to messages sent from the panel
|
|
70
|
-
chrome.runtime.onMessage.addListener(extensionListener);
|
|
71
|
-
|
|
72
|
-
port.onDisconnect.addListener(function () {
|
|
73
|
-
chrome.runtime.onMessage.removeListener(extensionListener);
|
|
74
|
-
});
|
|
75
|
-
});
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
/* eslint-disable func-names */
|
|
2
|
-
/* eslint-disable no-console */
|
|
3
|
-
/* eslint-disable no-undef */
|
|
4
|
-
/* eslint-disable no-unused-vars */
|
|
5
|
-
|
|
6
|
-
// This is included and executed in the inspected page
|
|
7
|
-
|
|
8
|
-
// local storage helpers
|
|
9
|
-
// we store the theme name here for when users refresh the page
|
|
10
|
-
// we can quickly check and add the theme tokens back into the page
|
|
11
|
-
function getLocalStorage(key) {
|
|
12
|
-
if (typeof window === 'undefined') {
|
|
13
|
-
return undefined;
|
|
14
|
-
}
|
|
15
|
-
return window.localStorage && window.localStorage[key];
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
function setLocalStorage(key, value) {
|
|
19
|
-
if (window && window.localStorage) {
|
|
20
|
-
window.localStorage[key] = value;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
// these functions are almost identical to the ones in background.js
|
|
25
|
-
// we need them here because the extension is isolated from the inspected page
|
|
26
|
-
// and has no idea if someone were to delete local storage or change the theme value
|
|
27
|
-
// in local storage
|
|
28
|
-
// This file is also run on document_start - https://developer.chrome.com/docs/extensions/mv3/content_scripts/#run_time
|
|
29
|
-
// which allows the theme CSS to seemingly persist across page refreshes
|
|
30
|
-
function removeTheme() {
|
|
31
|
-
const html = document.querySelector('html');
|
|
32
|
-
if (html) {
|
|
33
|
-
html.removeAttribute('data-theme');
|
|
34
|
-
setLocalStorage('theme', 'none');
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function setTheme(themeName = 'light') {
|
|
39
|
-
const html = document.querySelector('html');
|
|
40
|
-
html.setAttribute('data-theme', themeName);
|
|
41
|
-
setLocalStorage('theme', themeName);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
function handleTheme(theme) {
|
|
45
|
-
if (!theme || theme === 'none') {
|
|
46
|
-
removeTheme();
|
|
47
|
-
} else if (theme === 'light') {
|
|
48
|
-
setTheme(theme);
|
|
49
|
-
} else if (theme === 'dark') {
|
|
50
|
-
setTheme(theme);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
function init() {
|
|
55
|
-
console.log('tokens extension script attached');
|
|
56
|
-
const theme = getLocalStorage('theme');
|
|
57
|
-
handleTheme(theme);
|
|
58
|
-
|
|
59
|
-
const port = chrome.runtime.connect({
|
|
60
|
-
name: 'Theming Communication',
|
|
61
|
-
});
|
|
62
|
-
// tell extension what the theme value was from local storage
|
|
63
|
-
port.postMessage({ theme });
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
function main() {
|
|
67
|
-
init();
|
|
68
|
-
|
|
69
|
-
chrome.runtime.onMessage.addListener(function (message) {
|
|
70
|
-
// the theme value from panel.html
|
|
71
|
-
const theme = message || 'none';
|
|
72
|
-
handleTheme(theme);
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
main();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<script src="devtools.js"></script>
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/* eslint-disable func-names */
|
|
2
|
-
/* eslint-disable no-undef */
|
|
3
|
-
|
|
4
|
-
// Can use
|
|
5
|
-
// chrome.devtools.*
|
|
6
|
-
// chrome.extension.*
|
|
7
|
-
|
|
8
|
-
// Create a tab in the devtools area
|
|
9
|
-
chrome.devtools.panels.create(
|
|
10
|
-
'Tokens theming controls',
|
|
11
|
-
'toast.png',
|
|
12
|
-
'panel.html',
|
|
13
|
-
function () {},
|
|
14
|
-
);
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "Tokens Test Theming Extension",
|
|
3
|
-
"version": "0.2",
|
|
4
|
-
"description": "An extension to test theming implementations with @atlaskit/tokens",
|
|
5
|
-
"devtools_page": "devtools.html",
|
|
6
|
-
"background": {
|
|
7
|
-
"scripts": [
|
|
8
|
-
"background.js"
|
|
9
|
-
]
|
|
10
|
-
},
|
|
11
|
-
"permissions": [
|
|
12
|
-
"tabs",
|
|
13
|
-
"activeTab",
|
|
14
|
-
"http://*/*",
|
|
15
|
-
"https://*/*",
|
|
16
|
-
"storage",
|
|
17
|
-
"webNavigation"
|
|
18
|
-
],
|
|
19
|
-
"content_scripts": [
|
|
20
|
-
{
|
|
21
|
-
"matches": [
|
|
22
|
-
"http://*/*",
|
|
23
|
-
"https://*/*"
|
|
24
|
-
],
|
|
25
|
-
"js": [
|
|
26
|
-
"content-script.js"
|
|
27
|
-
],
|
|
28
|
-
"css": [
|
|
29
|
-
"atlassian-theme.css"
|
|
30
|
-
],
|
|
31
|
-
"run_at": "document_start"
|
|
32
|
-
}
|
|
33
|
-
],
|
|
34
|
-
"manifest_version": 2
|
|
35
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/* eslint-disable func-names */
|
|
2
|
-
/* eslint-disable no-undef */
|
|
3
|
-
|
|
4
|
-
document.querySelector('button').addEventListener('click', function () {
|
|
5
|
-
sendObjectToDevTools({ content: 'Changed by page' });
|
|
6
|
-
});
|
|
7
|
-
function sendObjectToDevTools(message) {
|
|
8
|
-
// The callback here can be used to execute something on receipt
|
|
9
|
-
chrome.extension.sendMessage(message, function () {});
|
|
10
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/* eslint-disable no-param-reassign */
|
|
2
|
-
/* eslint-disable func-names */
|
|
3
|
-
/* eslint-disable no-undef */
|
|
4
|
-
/* eslint-disable no-unused-vars */
|
|
5
|
-
|
|
6
|
-
// This creates and maintains the communication channel between
|
|
7
|
-
// the inspectedPage and the dev tools panel.
|
|
8
|
-
//
|
|
9
|
-
// In this example, messages are JSON objects
|
|
10
|
-
// {
|
|
11
|
-
// action: ['code'|'script'|'message'], // What action to perform on the inspected page
|
|
12
|
-
// content: [String|Path to script|Object], // data to be passed through
|
|
13
|
-
// tabId: [Automatically added]
|
|
14
|
-
// }
|
|
15
|
-
|
|
16
|
-
(function createChannel() {
|
|
17
|
-
// Create a port with background page for continous message communication
|
|
18
|
-
const port = chrome.runtime.connect({
|
|
19
|
-
name: 'Theming Communication',
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
// Listen to messages from the background page
|
|
23
|
-
port.onMessage.addListener(function (message) {
|
|
24
|
-
// the theme value from local storage in the inspected page
|
|
25
|
-
const theme = message.theme || 'none';
|
|
26
|
-
// update the extension panel.html with the theme value
|
|
27
|
-
document.querySelector('#selected-theme').innerHTML = theme;
|
|
28
|
-
});
|
|
29
|
-
})();
|
|
30
|
-
|
|
31
|
-
// This sends an object to the background page
|
|
32
|
-
// where it can be relayed to the inspected page
|
|
33
|
-
function sendObjectToInspectedPage(message) {
|
|
34
|
-
message.tabId = chrome.devtools.inspectedWindow.tabId;
|
|
35
|
-
chrome.runtime.sendMessage(message);
|
|
36
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html style="background: white">
|
|
3
|
-
<head>
|
|
4
|
-
<style>
|
|
5
|
-
button {
|
|
6
|
-
margin: 1rem 0;
|
|
7
|
-
padding: 0.5rem 1rem;
|
|
8
|
-
}
|
|
9
|
-
p {
|
|
10
|
-
font-size: 1rem;
|
|
11
|
-
}
|
|
12
|
-
</style>
|
|
13
|
-
</head>
|
|
14
|
-
<body>
|
|
15
|
-
<div style="display: flex; flex-direction: column">
|
|
16
|
-
<h1>Settings</h1>
|
|
17
|
-
<p>Theme: <span id="selected-theme">none</span></p>
|
|
18
|
-
<button id="disable-theme">Disable theme</button>
|
|
19
|
-
<button id="enable-light-theme">Enable Atlassian light theme</button>
|
|
20
|
-
<button id="enable-dark-theme">Enable Atlassian dark theme</button>
|
|
21
|
-
</div>
|
|
22
|
-
<script src="messaging.js"></script>
|
|
23
|
-
<script src="panel.js"></script>
|
|
24
|
-
</body>
|
|
25
|
-
</html>
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/* eslint-disable func-names */
|
|
2
|
-
/* eslint-disable no-console */
|
|
3
|
-
/* eslint-disable no-undef */
|
|
4
|
-
/* eslint-disable no-unused-vars */
|
|
5
|
-
|
|
6
|
-
// This one acts in the context of the panel in the Dev Tools
|
|
7
|
-
//
|
|
8
|
-
// Can use
|
|
9
|
-
// chrome.devtools.*
|
|
10
|
-
// chrome.extension.*
|
|
11
|
-
|
|
12
|
-
// handle interactivity for panel.html
|
|
13
|
-
const themeValue = document.querySelector('#selected-theme');
|
|
14
|
-
|
|
15
|
-
document.querySelector('#disable-theme').addEventListener(
|
|
16
|
-
'click',
|
|
17
|
-
function () {
|
|
18
|
-
sendObjectToInspectedPage({
|
|
19
|
-
action: 'removeTheme',
|
|
20
|
-
});
|
|
21
|
-
themeValue.innerText = 'none';
|
|
22
|
-
},
|
|
23
|
-
false,
|
|
24
|
-
);
|
|
25
|
-
|
|
26
|
-
document.querySelector('#enable-light-theme').addEventListener(
|
|
27
|
-
'click',
|
|
28
|
-
function () {
|
|
29
|
-
sendObjectToInspectedPage({
|
|
30
|
-
action: 'setTheme-light',
|
|
31
|
-
});
|
|
32
|
-
themeValue.innerText = 'light';
|
|
33
|
-
},
|
|
34
|
-
false,
|
|
35
|
-
);
|
|
36
|
-
|
|
37
|
-
document.querySelector('#enable-dark-theme').addEventListener(
|
|
38
|
-
'click',
|
|
39
|
-
function () {
|
|
40
|
-
sendObjectToInspectedPage({
|
|
41
|
-
action: 'setTheme-dark',
|
|
42
|
-
});
|
|
43
|
-
themeValue.innerText = 'dark';
|
|
44
|
-
},
|
|
45
|
-
false,
|
|
46
|
-
);
|
|
Binary file
|