@electrovir/color 1.7.7 → 1.7.8
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.
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { virAllSpacesColorPickerBookPage } from '../elements/vir-all-spaces-color-picker.element.book.js';
|
|
2
2
|
import { virColorPairContrastSummaryBookPage } from '../elements/vir-color-pair-contrast-summary.element.book.js';
|
|
3
|
+
import { virColorPairBookPage } from '../elements/vir-color-pair.element.book.js';
|
|
3
4
|
import { virColorPickerBookPage } from '../elements/vir-color-picker.element.book.js';
|
|
4
5
|
import { colorExamplesPage } from './color-examples.book.js';
|
|
5
6
|
import { elementsBookPage, examplesBookPage } from './top-level-pages.js';
|
|
@@ -8,6 +9,7 @@ export const allBookPages = [
|
|
|
8
9
|
examplesBookPage,
|
|
9
10
|
colorExamplesPage,
|
|
10
11
|
virAllSpacesColorPickerBookPage,
|
|
12
|
+
virColorPairBookPage,
|
|
11
13
|
virColorPairContrastSummaryBookPage,
|
|
12
14
|
virColorPickerBookPage,
|
|
13
15
|
];
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
/* node:coverage disable */
|
|
2
2
|
import { assertWrap, check } from '@augment-vir/assert';
|
|
3
3
|
import { css, defineElement, html, listen, nothing, onDomCreated, unsafeCSS } from 'element-vir';
|
|
4
|
-
import { setCssVarValue } from 'lit-css-vars';
|
|
5
4
|
import { noNativeFormStyles, noNativeSpacing, viraFontCssVars } from 'vira';
|
|
6
|
-
import { colorCss } from '../data/color-css.js';
|
|
7
5
|
import { calculateContrast } from '../data/contrast/contrast.js';
|
|
8
6
|
import { VirContrastIndicator } from './vir-contrast-indicator.element.js';
|
|
9
7
|
/**
|
|
@@ -110,17 +108,7 @@ export const VirColorPair = defineElement()({
|
|
|
110
108
|
margin-top: 1px;
|
|
111
109
|
}
|
|
112
110
|
`,
|
|
113
|
-
render({ state, updateState, inputs
|
|
114
|
-
setCssVarValue({
|
|
115
|
-
onElement: host,
|
|
116
|
-
forCssVar: inputs.color.background,
|
|
117
|
-
toValue: inputs.color.background.default,
|
|
118
|
-
});
|
|
119
|
-
setCssVarValue({
|
|
120
|
-
onElement: host,
|
|
121
|
-
forCssVar: inputs.color.foreground,
|
|
122
|
-
toValue: inputs.color.foreground.default,
|
|
123
|
-
});
|
|
111
|
+
render({ state, updateState, inputs }) {
|
|
124
112
|
const colorRows = [
|
|
125
113
|
'foreground',
|
|
126
114
|
'background',
|
|
@@ -179,7 +167,10 @@ export const VirColorPair = defineElement()({
|
|
|
179
167
|
});
|
|
180
168
|
})}
|
|
181
169
|
class="color-preview"
|
|
182
|
-
style=${
|
|
170
|
+
style=${css `
|
|
171
|
+
color: ${unsafeCSS(inputs.color.foreground.default)};
|
|
172
|
+
background: ${unsafeCSS(inputs.color.background.default)};
|
|
173
|
+
`}
|
|
183
174
|
>
|
|
184
175
|
<div class="square"></div>
|
|
185
176
|
<b>Aa</b>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@electrovir/color",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.8",
|
|
4
4
|
"description": "A wrapper for culori with an extremely simple API.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"color",
|
|
@@ -49,6 +49,9 @@
|
|
|
49
49
|
"test:spelling": "virmator spellcheck",
|
|
50
50
|
"test:update": "npm test update"
|
|
51
51
|
},
|
|
52
|
+
"overrides": {
|
|
53
|
+
"@electrovir/color": "file:./"
|
|
54
|
+
},
|
|
52
55
|
"dependencies": {
|
|
53
56
|
"@augment-vir/assert": "^31.59.0",
|
|
54
57
|
"@augment-vir/common": "^31.59.0",
|
|
@@ -64,48 +67,48 @@
|
|
|
64
67
|
"@augment-vir/test": "^31.59.0",
|
|
65
68
|
"@eslint/eslintrc": "^3.3.3",
|
|
66
69
|
"@eslint/js": "^9.39.2",
|
|
67
|
-
"@stylistic/eslint-plugin": "^5.7.
|
|
70
|
+
"@stylistic/eslint-plugin": "^5.7.1",
|
|
68
71
|
"@stylistic/eslint-plugin-ts": "^4.4.1",
|
|
69
72
|
"@types/color-name": "^2.0.0",
|
|
70
73
|
"@types/culori": "^4.0.1",
|
|
71
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
74
|
+
"@typescript-eslint/eslint-plugin": "^8.54.0",
|
|
72
75
|
"@web/dev-server-esbuild": "^1.0.4",
|
|
73
76
|
"@web/test-runner": "^0.20.2",
|
|
74
77
|
"@web/test-runner-commands": "^0.9.0",
|
|
75
78
|
"@web/test-runner-playwright": "^0.11.1",
|
|
76
79
|
"@web/test-runner-visual-regression": "^0.10.0",
|
|
77
|
-
"cspell": "^9.6.
|
|
78
|
-
"dependency-cruiser": "^17.3.
|
|
79
|
-
"element-book": "^26.
|
|
80
|
+
"cspell": "^9.6.2",
|
|
81
|
+
"dependency-cruiser": "^17.3.7",
|
|
82
|
+
"element-book": "^26.16.0",
|
|
80
83
|
"element-vir": "^26.14.3",
|
|
81
84
|
"esbuild": "^0.27.2",
|
|
82
85
|
"eslint": "^9.39.2",
|
|
83
86
|
"eslint-config-prettier": "^10.1.8",
|
|
84
|
-
"eslint-plugin-jsdoc": "^62.
|
|
87
|
+
"eslint-plugin-jsdoc": "^62.5.0",
|
|
85
88
|
"eslint-plugin-monorepo-cop": "^1.0.2",
|
|
86
|
-
"eslint-plugin-playwright": "^2.5.
|
|
89
|
+
"eslint-plugin-playwright": "^2.5.1",
|
|
87
90
|
"eslint-plugin-prettier": "^5.5.5",
|
|
88
91
|
"eslint-plugin-require-extensions": "^0.1.3",
|
|
89
|
-
"eslint-plugin-sonarjs": "^3.0.
|
|
92
|
+
"eslint-plugin-sonarjs": "^3.0.6",
|
|
90
93
|
"eslint-plugin-unicorn": "^62.0.0",
|
|
91
94
|
"execute-in-browser": "^1.0.9",
|
|
92
95
|
"istanbul-smart-text-reporter": "^1.1.5",
|
|
93
|
-
"lit-css-vars": "^3.
|
|
96
|
+
"lit-css-vars": "^3.4.0",
|
|
94
97
|
"markdown-code-example-inserter": "^3.0.3",
|
|
95
|
-
"npm-check-updates": "^19.3.
|
|
98
|
+
"npm-check-updates": "^19.3.2",
|
|
96
99
|
"prettier": "~3.3.3",
|
|
97
100
|
"prettier-plugin-interpolated-html-tags": "^2.0.1",
|
|
98
101
|
"prettier-plugin-jsdoc": "^1.8.0",
|
|
99
102
|
"prettier-plugin-multiline-arrays": "^4.1.3",
|
|
100
103
|
"prettier-plugin-organize-imports": "^4.3.0",
|
|
101
|
-
"prettier-plugin-packagejson": "^
|
|
104
|
+
"prettier-plugin-packagejson": "^3.0.0",
|
|
102
105
|
"prettier-plugin-sort-json": "^4.2.0",
|
|
103
106
|
"prettier-plugin-toml": "^2.0.6",
|
|
104
107
|
"runstorm": "^1.0.0",
|
|
105
108
|
"typedoc": "^0.28.16",
|
|
106
109
|
"typescript": "^5.9.3",
|
|
107
|
-
"typescript-eslint": "^8.
|
|
108
|
-
"vira": "^
|
|
110
|
+
"typescript-eslint": "^8.54.0",
|
|
111
|
+
"vira": "^29.2.0",
|
|
109
112
|
"virmator": "^14.4.3",
|
|
110
113
|
"vite": "^7.3.1"
|
|
111
114
|
},
|