vira 28.14.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.
@@ -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
@@ -1,5 +1,4 @@
1
1
  export * from './elements/index.js';
2
2
  export * from './icons/index.js';
3
- export * from './re-exports/index.js';
4
3
  export * from './styles/index.js';
5
4
  export * from './util/index.js';
package/dist/index.js CHANGED
@@ -1,5 +1,4 @@
1
1
  export * from './elements/index.js';
2
2
  export * from './icons/index.js';
3
- export * from './re-exports/index.js';
4
3
  export * from './styles/index.js';
5
4
  export * from './util/index.js';
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Use this to set font values so they can be controlled via CSS vars.
3
+ *
4
+ * @category CSS Vars
5
+ * @category Styles
6
+ */
7
+ export declare const viraFontCssVars: import("lit-css-vars").CssVarDefinitions<{
8
+ readonly 'vira-monospace': "monospace";
9
+ }>;
@@ -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
+ });
@@ -1,12 +1,13 @@
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';
10
10
  export * from './shadows.js';
11
11
  export * from './user-select.js';
12
12
  export * from './vira-color-palette.js';
13
+ export * from './vira-color-theme.js';
@@ -1,12 +1,13 @@
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';
10
10
  export * from './shadows.js';
11
11
  export * from './user-select.js';
12
12
  export * from './vira-color-palette.js';
13
+ export * from './vira-color-theme.js';