vira 28.15.0 → 28.16.0
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/dist/icons/icon-svg.js +13 -2
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/styles/font.d.ts +9 -0
- package/dist/styles/font.js +10 -0
- package/dist/styles/index.d.ts +1 -1
- package/dist/styles/index.js +1 -1
- package/package.json +3 -3
- package/dist/re-exports/colorjs-io.d.ts +0 -17
- package/dist/re-exports/colorjs-io.js +0 -8
- package/dist/re-exports/index.d.ts +0 -2
- package/dist/re-exports/index.js +0 -2
- package/dist/styles/color.d.ts +0 -14
- package/dist/styles/color.js +0 -32
package/dist/icons/icon-svg.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { getObjectTypedKeys } from '@augment-vir/common';
|
|
1
|
+
import { getObjectTypedKeys, stringify } from '@augment-vir/common';
|
|
2
|
+
import Color from 'colorjs.io';
|
|
2
3
|
import { html } from 'element-vir';
|
|
3
|
-
import { getAssertedValidColor } from '../styles/color.js';
|
|
4
4
|
import { viraIconCssVars } from './icon-css-vars.js';
|
|
5
5
|
/**
|
|
6
6
|
* A function used to define an individual Vira icon SVG.
|
|
@@ -14,6 +14,17 @@ export function defineIcon({ name, svgTemplate, }) {
|
|
|
14
14
|
};
|
|
15
15
|
return iconSvg;
|
|
16
16
|
}
|
|
17
|
+
function getAssertedValidColor(input) {
|
|
18
|
+
try {
|
|
19
|
+
if (!input) {
|
|
20
|
+
throw new Error('invalid empty color');
|
|
21
|
+
}
|
|
22
|
+
return new Color(input);
|
|
23
|
+
}
|
|
24
|
+
catch {
|
|
25
|
+
throw new Error(`Invalid color: ${stringify(input)}`);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
17
28
|
/**
|
|
18
29
|
* Wraps an existing icon with a specific color and outputs another icon that can be used anywhere
|
|
19
30
|
* the original icon can be used.
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { defineCssVars } from 'lit-css-vars';
|
|
2
|
+
/**
|
|
3
|
+
* Use this to set font values so they can be controlled via CSS vars.
|
|
4
|
+
*
|
|
5
|
+
* @category CSS Vars
|
|
6
|
+
* @category Styles
|
|
7
|
+
*/
|
|
8
|
+
export const viraFontCssVars = defineCssVars({
|
|
9
|
+
'vira-monospace': 'monospace',
|
|
10
|
+
});
|
package/dist/styles/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/** This file is automatically updated by update-index-exports.ts */
|
|
2
2
|
export * from './border.js';
|
|
3
|
-
export * from './color.js';
|
|
4
3
|
export * from './disabled.js';
|
|
5
4
|
export * from './durations.js';
|
|
6
5
|
export * from './focus.js';
|
|
6
|
+
export * from './font.js';
|
|
7
7
|
export * from './form-styles.js';
|
|
8
8
|
export * from './native-styles.js';
|
|
9
9
|
export * from './scrollbar.js';
|
package/dist/styles/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/** This file is automatically updated by update-index-exports.ts */
|
|
2
2
|
export * from './border.js';
|
|
3
|
-
export * from './color.js';
|
|
4
3
|
export * from './disabled.js';
|
|
5
4
|
export * from './durations.js';
|
|
6
5
|
export * from './focus.js';
|
|
6
|
+
export * from './font.js';
|
|
7
7
|
export * from './form-styles.js';
|
|
8
8
|
export * from './native-styles.js';
|
|
9
9
|
export * from './scrollbar.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vira",
|
|
3
|
-
"version": "28.
|
|
3
|
+
"version": "28.16.0",
|
|
4
4
|
"description": "A simple and highly versatile design system using element-vir.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"design",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@augment-vir/assert": "^31.57.3",
|
|
42
42
|
"@augment-vir/common": "^31.57.3",
|
|
43
43
|
"@augment-vir/web": "^31.57.3",
|
|
44
|
-
"colorjs.io": "0.
|
|
44
|
+
"colorjs.io": "^0.6.0",
|
|
45
45
|
"date-vir": "^8.1.0",
|
|
46
46
|
"device-navigation": "^4.5.5",
|
|
47
47
|
"lit-css-vars": "^3.0.11",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"esbuild": "^0.27.2",
|
|
62
62
|
"istanbul-smart-text-reporter": "^1.1.5",
|
|
63
63
|
"markdown-code-example-inserter": "^3.0.3",
|
|
64
|
-
"theme-vir": "^28.15.
|
|
64
|
+
"theme-vir": "^28.15.3",
|
|
65
65
|
"typedoc": "^0.28.15",
|
|
66
66
|
"typescript": "5.9.3",
|
|
67
67
|
"vite": "^7.3.0",
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import ColorImport from 'colorjs.io';
|
|
2
|
-
export type { ColorTypes } from 'colorjs.io/types/src/color';
|
|
3
|
-
export type { Format } from 'colorjs.io/types/src/space';
|
|
4
|
-
/**
|
|
5
|
-
* An individual color represented as a class. This is from the
|
|
6
|
-
* [colorjs.io](https://www.npmjs.com/package/colorjs.io) package.
|
|
7
|
-
*
|
|
8
|
-
* @category Internal
|
|
9
|
-
*/
|
|
10
|
-
export type Color = typeof ColorImport;
|
|
11
|
-
/**
|
|
12
|
-
* An individual color represented as a class. This is from the
|
|
13
|
-
* [colorjs.io](https://www.npmjs.com/package/colorjs.io) package.
|
|
14
|
-
*
|
|
15
|
-
* @category Internal
|
|
16
|
-
*/
|
|
17
|
-
export declare const Color: Color;
|
package/dist/re-exports/index.js
DELETED
package/dist/styles/color.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { type Format } from 'colorjs.io/types/src/space';
|
|
2
|
-
import { type ColorTypes } from '../re-exports/colorjs-io.js';
|
|
3
|
-
/**
|
|
4
|
-
* Asserts that the given color type is valid.
|
|
5
|
-
*
|
|
6
|
-
* @category Internal
|
|
7
|
-
*/
|
|
8
|
-
export declare function getAssertedValidColor(input: ColorTypes | undefined): import("colorjs.io/types/index.js").default;
|
|
9
|
-
/**
|
|
10
|
-
* The colorjs format for CSS RGB colors.
|
|
11
|
-
*
|
|
12
|
-
* @category Internal
|
|
13
|
-
*/
|
|
14
|
-
export declare const rgbCssColorFormat: Format;
|
package/dist/styles/color.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { stringify } from '@augment-vir/common';
|
|
2
|
-
import { Color } from '../re-exports/colorjs-io.js';
|
|
3
|
-
/**
|
|
4
|
-
* Asserts that the given color type is valid.
|
|
5
|
-
*
|
|
6
|
-
* @category Internal
|
|
7
|
-
*/
|
|
8
|
-
export function getAssertedValidColor(input) {
|
|
9
|
-
try {
|
|
10
|
-
if (!input) {
|
|
11
|
-
throw new Error('invalid empty color');
|
|
12
|
-
}
|
|
13
|
-
return new Color(input);
|
|
14
|
-
}
|
|
15
|
-
catch {
|
|
16
|
-
throw new Error(`Invalid color: ${stringify(input)}`);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* The colorjs format for CSS RGB colors.
|
|
21
|
-
*
|
|
22
|
-
* @category Internal
|
|
23
|
-
*/
|
|
24
|
-
export const rgbCssColorFormat = {
|
|
25
|
-
name: 'rgb',
|
|
26
|
-
coords: [
|
|
27
|
-
'<number>[0, 255]',
|
|
28
|
-
'<number>[0, 255]',
|
|
29
|
-
'<number>[0, 255]',
|
|
30
|
-
],
|
|
31
|
-
commas: true,
|
|
32
|
-
};
|