@electrovir/color 1.7.8 → 1.7.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.
@@ -47,7 +47,9 @@ export function calculateContrast({ background, foreground, }) {
47
47
  if (cached) {
48
48
  return cached;
49
49
  }
50
- const contrast = round(Number(calcAPCA(foreground, background)), { digits: 1 });
50
+ const contrast = round(Number(calcAPCA(foreground, background)), {
51
+ digits: 1,
52
+ });
51
53
  const result = {
52
54
  contrast,
53
55
  fontSizes: calculateFontSizes(contrast),
@@ -1,7 +1,7 @@
1
1
  /* node:coverage disable */
2
- import { ElementBookApp, ElementBookSlotName } from 'element-book';
2
+ import { ElementBookApp } from 'element-book';
3
3
  import { css, defineElement, html } from 'element-vir';
4
- import { noNativeSpacing } from 'vira';
4
+ import { noNativeSpacing } from 'vira/dist/styles/native-styles.js';
5
5
  import { allBookPages } from './all-book-pages.js';
6
6
  export const VirDemo = defineElement()({
7
7
  tagName: 'vir-demo',
@@ -36,7 +36,7 @@ export const VirDemo = defineElement()({
36
36
  basePath: 'color',
37
37
  },
38
38
  })}>
39
- <h1 slot=${ElementBookSlotName.NavHeader}>@electrovir/color</h1>
39
+ <h1 slot=${ElementBookApp.slotNames.navHeader}>@electrovir/color</h1>
40
40
  </${ElementBookApp}>
41
41
  `;
42
42
  },
@@ -53,7 +53,9 @@ export const VirAllSpacesColorPicker = defineElement()({
53
53
  dispatch(new events.colorChange(event.detail));
54
54
  })}
55
55
  ></${VirColorDetails}>
56
- <${VirAllColorSpaceSliders.assign({ color })}
56
+ <${VirAllColorSpaceSliders.assign({
57
+ color,
58
+ })}
57
59
  ${listen(VirAllColorSpaceSliders.events.colorChange, (event) => {
58
60
  const colorSyntax = getColorSyntaxFromCssString(state.inputColorString || '#');
59
61
  updateState({
@@ -2,7 +2,10 @@
2
2
  import { check } from '@augment-vir/assert';
3
3
  import { getObjectTypedEntries, mapObject } from '@augment-vir/common';
4
4
  import { css, defineElement, defineElementEvent, html, listen } from 'element-vir';
5
- import { defineTable, noNativeSpacing, viraFontCssVars, ViraInput } from 'vira';
5
+ import { ViraInput } from 'vira/dist/elements/vira-input.element.js';
6
+ import { viraFontCssVars } from 'vira/dist/styles/font.js';
7
+ import { noNativeSpacing } from 'vira/dist/styles/native-styles.js';
8
+ import { defineTable } from 'vira/dist/util/define-table.js';
6
9
  import { ColorSyntaxName } from '../data/color-class/color-formats.js';
7
10
  import { Color } from '../data/color-class/color.js';
8
11
  import { VirColorSwatch } from './vir-color-swatch.element.js';
@@ -1,7 +1,7 @@
1
1
  /* node:coverage disable */
2
2
  import { getObjectTypedKeys } from '@augment-vir/common';
3
3
  import { css, defineElement, defineElementEvent, html, listen, nothing } from 'element-vir';
4
- import { noNativeSpacing } from 'vira';
4
+ import { noNativeSpacing } from 'vira/dist/styles/native-styles.js';
5
5
  import { colorFormats, } from '../data/color-class/color-formats.js';
6
6
  import { VirColorSlider } from './vir-color-slider.element.js';
7
7
  /**
@@ -2,7 +2,10 @@
2
2
  import { assertWrap } from '@augment-vir/assert';
3
3
  import { getObjectTypedEntries, round } from '@augment-vir/common';
4
4
  import { classMap, css, defineElement, html, unsafeCSS } from 'element-vir';
5
- import { defineTable, noNativeSpacing, ViraBoldText, viraFontCssVars } from 'vira';
5
+ import { ViraBoldText } from 'vira/dist/elements/vira-bold-text.element.js';
6
+ import { viraFontCssVars } from 'vira/dist/styles/font.js';
7
+ import { noNativeSpacing } from 'vira/dist/styles/native-styles.js';
8
+ import { defineTable } from 'vira/dist/util/define-table.js';
6
9
  import { Color } from '../data/color-class/color.js';
7
10
  import { calculateContrast, calculateFontSizes, contrastLevelLabel, contrastLevels, fontWeightByName, } from '../data/contrast/contrast.js';
8
11
  import { VirColorSwatch } from './vir-color-swatch.element.js';
@@ -153,7 +156,9 @@ export const VirColorPairContrastSummary = defineElement()({
153
156
  };
154
157
  }), ({ size, weight }) => {
155
158
  return {
156
- size: `${round(size, { digits: 1 })}px`,
159
+ size: `${round(size, {
160
+ digits: 1,
161
+ })}px`,
157
162
  weight: html `
158
163
  <span
159
164
  style=${css `
@@ -1,7 +1,8 @@
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 { noNativeFormStyles, noNativeSpacing, viraFontCssVars } from 'vira';
4
+ import { viraFontCssVars } from 'vira/dist/styles/font.js';
5
+ import { noNativeFormStyles, noNativeSpacing } from 'vira/dist/styles/native-styles.js';
5
6
  import { calculateContrast } from '../data/contrast/contrast.js';
6
7
  import { VirContrastIndicator } from './vir-contrast-indicator.element.js';
7
8
  /**
@@ -3,7 +3,15 @@ import { checkWrap } from '@augment-vir/assert';
3
3
  import { getObjectTypedValues } from '@augment-vir/common';
4
4
  import { css, defineElement, defineElementEvent, html, listen, nothing } from 'element-vir';
5
5
  import { CssVarSyntaxName } from 'lit-css-vars';
6
- import { Copy24Icon, noNativeFormStyles, viraFontCssVars, viraFormCssVars, ViraIcon, ViraInput, ViraPopUpTrigger, ViraSelect, viraShadows, } from 'vira';
6
+ import { ViraPopUpTrigger } from 'vira/dist/elements/pop-up/vira-pop-up-trigger.element.js';
7
+ import { ViraIcon } from 'vira/dist/elements/vira-icon.element.js';
8
+ import { ViraInput } from 'vira/dist/elements/vira-input.element.js';
9
+ import { ViraSelect } from 'vira/dist/elements/vira-select.element.js';
10
+ import { Copy24Icon } from 'vira/dist/icons/icon-svgs/24/copy-24.icon.js';
11
+ import { viraFontCssVars } from 'vira/dist/styles/font.js';
12
+ import { viraFormCssVars } from 'vira/dist/styles/form-styles.js';
13
+ import { noNativeFormStyles } from 'vira/dist/styles/native-styles.js';
14
+ import { viraShadows } from 'vira/dist/styles/shadows.js';
7
15
  import { ColorFormatName, colorFormats } from '../data/color-class/color-formats.js';
8
16
  import { Color } from '../data/color-class/color.js';
9
17
  import { colorLocalStorageClient } from '../data/local-storage.client.js';
@@ -3,7 +3,8 @@ import { assert, assertWrap } from '@augment-vir/assert';
3
3
  import { createArray } from '@augment-vir/common';
4
4
  import { extractEventTarget } from '@augment-vir/web';
5
5
  import { css, defineElement, defineElementEvent, html, listen, onDomRendered, unsafeCSS, } from 'element-vir';
6
- import { viraFontCssVars, ViraInput } from 'vira';
6
+ import { ViraInput } from 'vira/dist/elements/vira-input.element.js';
7
+ import { viraFontCssVars } from 'vira/dist/styles/font.js';
7
8
  import { colorFormats, } from '../data/color-class/color-formats.js';
8
9
  import { Color } from '../data/color-class/color.js';
9
10
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@electrovir/color",
3
- "version": "1.7.8",
3
+ "version": "1.7.9",
4
4
  "description": "A wrapper for culori with an extremely simple API.",
5
5
  "keywords": [
6
6
  "color",
@@ -53,63 +53,63 @@
53
53
  "@electrovir/color": "file:./"
54
54
  },
55
55
  "dependencies": {
56
- "@augment-vir/assert": "^31.59.0",
57
- "@augment-vir/common": "^31.59.0",
58
- "@augment-vir/web": "^31.59.0",
59
- "@electrovir/local-storage-client": "^0.0.2",
56
+ "@augment-vir/assert": "^31.68.1",
57
+ "@augment-vir/common": "^31.68.1",
58
+ "@augment-vir/web": "^31.68.1",
59
+ "@electrovir/local-storage-client": "^0.1.0",
60
60
  "apca-w3": "^0.1.9",
61
61
  "color-name": "^2.1.0",
62
62
  "culori": "^4.0.2",
63
63
  "object-shape-tester": "^6.11.0",
64
- "type-fest": "^5.4.1"
64
+ "type-fest": "^5.4.4"
65
65
  },
66
66
  "devDependencies": {
67
- "@augment-vir/test": "^31.59.0",
68
- "@eslint/eslintrc": "^3.3.3",
67
+ "@augment-vir/test": "^31.68.1",
68
+ "@eslint/eslintrc": "^3.3.5",
69
69
  "@eslint/js": "^9.39.2",
70
- "@stylistic/eslint-plugin": "^5.7.1",
70
+ "@stylistic/eslint-plugin": "^5.10.0",
71
71
  "@stylistic/eslint-plugin-ts": "^4.4.1",
72
72
  "@types/color-name": "^2.0.0",
73
73
  "@types/culori": "^4.0.1",
74
- "@typescript-eslint/eslint-plugin": "^8.54.0",
75
- "@web/dev-server-esbuild": "^1.0.4",
74
+ "@typescript-eslint/eslint-plugin": "^8.56.1",
75
+ "@web/dev-server-esbuild": "^1.0.5",
76
76
  "@web/test-runner": "^0.20.2",
77
77
  "@web/test-runner-commands": "^0.9.0",
78
78
  "@web/test-runner-playwright": "^0.11.1",
79
79
  "@web/test-runner-visual-regression": "^0.10.0",
80
- "cspell": "^9.6.2",
81
- "dependency-cruiser": "^17.3.7",
82
- "element-book": "^26.16.0",
83
- "element-vir": "^26.14.3",
84
- "esbuild": "^0.27.2",
80
+ "cspell": "^9.7.0",
81
+ "dependency-cruiser": "^17.3.8",
82
+ "element-book": "^26.17.0",
83
+ "element-vir": "^26.14.6",
84
+ "esbuild": "^0.27.3",
85
85
  "eslint": "^9.39.2",
86
86
  "eslint-config-prettier": "^10.1.8",
87
- "eslint-plugin-jsdoc": "^62.5.0",
87
+ "eslint-plugin-jsdoc": "^62.7.1",
88
88
  "eslint-plugin-monorepo-cop": "^1.0.2",
89
- "eslint-plugin-playwright": "^2.5.1",
89
+ "eslint-plugin-playwright": "^2.9.0",
90
90
  "eslint-plugin-prettier": "^5.5.5",
91
91
  "eslint-plugin-require-extensions": "^0.1.3",
92
- "eslint-plugin-sonarjs": "^3.0.6",
93
- "eslint-plugin-unicorn": "^62.0.0",
92
+ "eslint-plugin-sonarjs": "^4.0.1",
93
+ "eslint-plugin-unicorn": "^63.0.0",
94
94
  "execute-in-browser": "^1.0.9",
95
95
  "istanbul-smart-text-reporter": "^1.1.5",
96
- "lit-css-vars": "^3.4.0",
96
+ "lit-css-vars": "^3.6.2",
97
97
  "markdown-code-example-inserter": "^3.0.3",
98
- "npm-check-updates": "^19.3.2",
98
+ "npm-check-updates": "^19.6.3",
99
99
  "prettier": "~3.3.3",
100
100
  "prettier-plugin-interpolated-html-tags": "^2.0.1",
101
101
  "prettier-plugin-jsdoc": "^1.8.0",
102
- "prettier-plugin-multiline-arrays": "^4.1.3",
102
+ "prettier-plugin-multiline-arrays": "^4.1.4",
103
103
  "prettier-plugin-organize-imports": "^4.3.0",
104
- "prettier-plugin-packagejson": "^3.0.0",
104
+ "prettier-plugin-packagejson": "^3.0.2",
105
105
  "prettier-plugin-sort-json": "^4.2.0",
106
106
  "prettier-plugin-toml": "^2.0.6",
107
107
  "runstorm": "^1.0.0",
108
- "typedoc": "^0.28.16",
108
+ "typedoc": "^0.28.17",
109
109
  "typescript": "^5.9.3",
110
- "typescript-eslint": "^8.54.0",
111
- "vira": "^29.2.0",
112
- "virmator": "^14.4.3",
110
+ "typescript-eslint": "^8.56.1",
111
+ "vira": "^31.5.2",
112
+ "virmator": "^14.8.3",
113
113
  "vite": "^7.3.1"
114
114
  },
115
115
  "peerDependencies": {