dothtml-interfaces 0.3.3 → 0.3.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dothtml-interfaces",
3
- "version": "0.3.3",
3
+ "version": "0.3.5",
4
4
  "description": "Dependency injection interfaces for DOTHtml.",
5
5
  "main": "src/index.d.ts",
6
6
  "types": "src/index.d.ts",
@@ -1,6 +1,6 @@
1
- import AngleProp from "./mapped-types/angle-prop";
2
- import { Percentage, ValueOrReactive } from "./css-types";
3
- import LengthProp from "./mapped-types/length-prop";
1
+ import AngleProp from "../mapped-types/angle-prop";
2
+ import { Percentage, ValueOrReactive } from "../css-types";
3
+ import LengthProp from "../mapped-types/length-prop";
4
4
  import IShadowProp from "./i-shadow-prop";
5
5
 
6
6
  export default interface IFilterProp extends
@@ -1,5 +1,5 @@
1
- import ColorProps from "./mapped-types/color-props.js";
2
- import LengthProp from "./mapped-types/length-prop.js";
1
+ import ColorProps from "../mapped-types/color-props.js";
2
+ import LengthProp from "../mapped-types/length-prop.js";
3
3
 
4
4
 
5
5
  export default interface IShadowProp extends
@@ -1,8 +1,10 @@
1
- import AngleProp from "./mapped-types/angle-prop";
2
- import { ValueOrReactive } from "./css-types";
3
- import LengthProp from "./mapped-types/length-prop";
1
+ import AngleProp from "../mapped-types/angle-prop";
2
+ import { ValueOrReactive } from "../css-types";
3
+ import LengthProp from "../mapped-types/length-prop";
4
4
 
5
- export interface ITransformationProp extends
5
+ // Transforms are special because the order matters and functions can be called mulitple times.
6
+ // To support this functionality, we use an array of transform JSON specs.
7
+ export default interface ITransformationProp extends
6
8
  LengthProp<"translate", 1|2>,
7
9
  LengthProp<"translate3d", 3>,
8
10
  LengthProp<"translateX">,
@@ -1,9 +1,9 @@
1
1
 
2
2
  import { IReactive } from "../i-reactive";
3
3
  import { GKV, ValueOrReactive } from "./css-types";
4
- import IFilterProp from "./i-filter-prop";
5
- import IShadowProp from "./i-shadow-prop";
6
- import { ITransformationProp } from "./i-transformation-prop";
4
+ import IFilterProp from "./complex-css-types/i-filter-prop";
5
+ import IShadowProp from "./complex-css-types/i-shadow-prop";
6
+ import ITransformationProp from "./complex-css-types/i-transformation-prop";
7
7
  import ColorProp from "./mapped-types/color-props";
8
8
  import LengthProp from "./mapped-types/length-prop";
9
9
 
@@ -79,7 +79,7 @@ export default interface IDotcssProp extends
79
79
  content?: ValueOrReactive<string>;
80
80
 
81
81
  //complex:
82
- transform?: ValueOrReactive<string>|ITransformationProp;
82
+ transform?: ValueOrReactive<string>|ITransformationProp|Array<ITransformationProp>;
83
83
  filter?: ValueOrReactive<string>|IFilterProp;
84
84
  backdropFilter?: ValueOrReactive<string>|IFilterProp;
85
85
 
@@ -1,6 +1,6 @@
1
1
  import { IReactive } from "../../i-reactive";
2
2
 
3
- type V = IReactive<number|string> | number | string;
3
+ type V = IReactive<any> | number | string;
4
4
 
5
5
  type AngleUnitSuffix = "" | "Deg" | "Grad" | "Rad" | "Turn";
6
6
 
@@ -4,9 +4,9 @@ import { GKV } from "../css-types";
4
4
 
5
5
  type LengthUnitSuffix = "" | "Cm" | "Ch" | "Em" | "Ex" | "In" | "Mm" | "P" | "Pc" | "Pt" | "Px" | "Rem" | "Vh" | "Vw" | "VMax" | "VMin";
6
6
 
7
- type V<S> = IReactive<number|string> | number | S;
7
+ type V<S> = IReactive<any> | number | S;
8
8
 
9
- type LengthProp<Prefix extends string, Qty extends 1|2|3|4 = 1, S extends string|IReactive<number|string> = GKV> = {
9
+ type LengthProp<Prefix extends string, Qty extends 1|2|3|4 = 1, S extends string|IReactive<any> = GKV> = {
10
10
  [Key in LengthUnitSuffix as `${Prefix}${Key}`]?: (
11
11
  (Qty extends 1 ? V<S>|[V<S>] : void) |
12
12
  (Qty extends 2 ? [V<S>, V<S>] : void) |