element-vir 6.3.3 → 6.3.4

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,5 @@
1
1
  import { CSSResult } from 'lit';
2
- export type CssVarsInitMap<CssVarKeys extends string> = Record<CssVarKeys, string>;
2
+ export type CssVarsInitMap<CssVarKeys extends string> = Record<CssVarKeys, string | CSSResult>;
3
3
  export type CssVarName<TagName extends string> = `--${TagName}-string`;
4
4
  export type CssVarNameOrValueMap<CssVarKeys extends string> = Record<CssVarKeys, CSSResult>;
5
5
  export declare function createCssVarNamesMap<TagName extends string, CssVarKeys extends string>(tagName: TagName, cssVarsInit: CssVarsInitMap<CssVarKeys> | undefined): CssVarNameOrValueMap<CssVarKeys>;
@@ -25,6 +25,16 @@ export type DeclarativeElementInit<InputsGeneric extends PropertyInitMapBase, St
25
25
  * will only be manually set.
26
26
  */
27
27
  hostClasses?: HostClassesInitMap<HostClassKeys, InputsGeneric, StateInit>;
28
+ /**
29
+ * CSS Vars for the component. Keys of this object should be camelCased (or whatever your casing
30
+ * convention is). They will be transformed, at runtime, to CSS vars with kebab-casing, to match
31
+ * CSS standards.
32
+ *
33
+ * Values of this object represent the default fallback value for the given CSS var. These are
34
+ * then passed to the styles property, which must be a callback to take advantage of these.
35
+ * cssVarValues or cssVarNames can then be destructured from the styles property's callback
36
+ * input.
37
+ */
28
38
  cssVars?: CssVarsInitMap<CssVarKeys>;
29
39
  /** Called as part of the first renderCallback call, before the first renderCallback call. */
30
40
  initCallback?: InitCallback<InputsGeneric, StateInit, EventsInitGeneric, HostClassKeys, CssVarKeys>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "element-vir",
3
- "version": "6.3.3",
3
+ "version": "6.3.4",
4
4
  "keywords": [
5
5
  "custom",
6
6
  "web",
@@ -29,7 +29,6 @@
29
29
  "compile": "rm -rf dist && tsc --project tsconfig.json",
30
30
  "docs:update": "virmator code-in-markdown",
31
31
  "format": "virmator format",
32
- "prepublishOnly": "npm run compile && npm run test:all",
33
32
  "preview": "virmator frontend preview",
34
33
  "publish": "npm run compile && npm run test:all && virmator publish",
35
34
  "spellcheck": "virmator spellcheck",
@@ -44,7 +43,7 @@
44
43
  "dependencies": {
45
44
  "@augment-vir/browser": "^6.1.5",
46
45
  "@augment-vir/common": "^6.1.5",
47
- "lit": "2.4.1"
46
+ "lit": "2.5.0"
48
47
  },
49
48
  "devDependencies": {
50
49
  "@augment-vir/browser-testing": "^6.1.5",
@@ -60,9 +59,9 @@
60
59
  "chai": "^4.3.7",
61
60
  "cspell": "^6.17.0",
62
61
  "istanbul-smart-text-reporter": "^1.0.1",
63
- "markdown-code-example-inserter": "^0.1.12",
64
- "mocha": "^10.1.0",
65
- "mocha-spec-reporter-with-file-names": "^0.0.2",
62
+ "markdown-code-example-inserter": "^0.1.13",
63
+ "mocha": "^10.2.0",
64
+ "mocha-spec-reporter-with-file-names": "^0.0.3",
66
65
  "nyc": "^15.1.0",
67
66
  "prettier": "^2.8.1",
68
67
  "prettier-plugin-jsdoc": "^0.4.2",
@@ -72,7 +71,7 @@
72
71
  "prettier-plugin-sort-json": "^0.0.3",
73
72
  "prettier-plugin-toml": "^0.3.1",
74
73
  "ts-node": "^10.9.1",
75
- "virmator": "^5.0.3",
76
- "vite": "^3.2.5"
74
+ "virmator": "^5.2.1",
75
+ "vite": "^4.0.1"
77
76
  }
78
77
  }