@kithinji/arcane 1.0.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/build.js +46 -0
- package/package.json +31 -0
- package/src/assert/index.ts +0 -0
- package/src/index.ts +1 -0
- package/src/style/index.ts +1 -0
- package/src/style/style.ts +523 -0
- package/src/style/style_types.ts +102 -0
- package/src/style/types.ts +1569 -0
- package/src/style/var_types.ts +73 -0
- package/tsconfig.json +27 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
export type ValueWithDefault<T> =
|
|
2
|
+
| T
|
|
3
|
+
| Readonly<{
|
|
4
|
+
[key: string]: ValueWithDefault<T>;
|
|
5
|
+
default: ValueWithDefault<T>;
|
|
6
|
+
}>;
|
|
7
|
+
|
|
8
|
+
type InnerValue = null | string | number;
|
|
9
|
+
|
|
10
|
+
export interface ICSSType<T extends InnerValue = InnerValue> {
|
|
11
|
+
readonly value: ValueWithDefault<string>;
|
|
12
|
+
readonly syntax: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export declare class CSSProperty<T extends InnerValue> implements ICSSType<T> {
|
|
16
|
+
readonly value: ValueWithDefault<string>;
|
|
17
|
+
readonly syntax: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export declare class Angle<
|
|
21
|
+
T extends InnerValue = InnerValue
|
|
22
|
+
> extends CSSProperty<T> {}
|
|
23
|
+
export declare class Color<
|
|
24
|
+
T extends InnerValue = InnerValue
|
|
25
|
+
> extends CSSProperty<T> {}
|
|
26
|
+
export declare class Url<
|
|
27
|
+
T extends InnerValue = InnerValue
|
|
28
|
+
> extends CSSProperty<T> {}
|
|
29
|
+
export declare class Image<
|
|
30
|
+
T extends InnerValue = InnerValue
|
|
31
|
+
> extends CSSProperty<T> {}
|
|
32
|
+
export declare class Integer<
|
|
33
|
+
T extends InnerValue = InnerValue
|
|
34
|
+
> extends CSSProperty<T> {}
|
|
35
|
+
export declare class LengthPercentage<
|
|
36
|
+
T extends InnerValue = InnerValue
|
|
37
|
+
> extends CSSProperty<T> {}
|
|
38
|
+
export declare class Length<
|
|
39
|
+
T extends InnerValue = InnerValue
|
|
40
|
+
> extends CSSProperty<T> {}
|
|
41
|
+
export declare class Percentage<
|
|
42
|
+
T extends InnerValue = InnerValue
|
|
43
|
+
> extends CSSProperty<T> {}
|
|
44
|
+
export declare class Num<
|
|
45
|
+
T extends InnerValue = InnerValue
|
|
46
|
+
> extends CSSProperty<T> {}
|
|
47
|
+
export declare class Resolution<
|
|
48
|
+
T extends InnerValue = InnerValue
|
|
49
|
+
> extends CSSProperty<T> {}
|
|
50
|
+
export declare class Time<
|
|
51
|
+
T extends InnerValue = InnerValue
|
|
52
|
+
> extends CSSProperty<T> {}
|
|
53
|
+
export declare class TransformFunction<
|
|
54
|
+
T extends InnerValue = InnerValue
|
|
55
|
+
> extends CSSProperty<T> {}
|
|
56
|
+
export declare class TransformList<
|
|
57
|
+
T extends InnerValue = InnerValue
|
|
58
|
+
> extends CSSProperty<T> {}
|
|
59
|
+
|
|
60
|
+
export type CSSType<T extends InnerValue = InnerValue> =
|
|
61
|
+
| Angle<T>
|
|
62
|
+
| Color<T>
|
|
63
|
+
| Url<T>
|
|
64
|
+
| Image<T>
|
|
65
|
+
| Integer<T>
|
|
66
|
+
| LengthPercentage<T>
|
|
67
|
+
| Length<T>
|
|
68
|
+
| Percentage<T>
|
|
69
|
+
| Num<T>
|
|
70
|
+
| Resolution<T>
|
|
71
|
+
| Time<T>
|
|
72
|
+
| TransformFunction<T>
|
|
73
|
+
| TransformList<T>;
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"lib": ["ES2020", "DOM"],
|
|
6
|
+
"moduleResolution": "bundler",
|
|
7
|
+
"resolveJsonModule": true,
|
|
8
|
+
"declaration": true,
|
|
9
|
+
"declarationMap": true,
|
|
10
|
+
"emitDeclarationOnly": false,
|
|
11
|
+
"outDir": "./dist/types",
|
|
12
|
+
"rootDir": "./src",
|
|
13
|
+
"strict": true,
|
|
14
|
+
"esModuleInterop": true,
|
|
15
|
+
"skipLibCheck": true,
|
|
16
|
+
"forceConsistentCasingInFileNames": true,
|
|
17
|
+
"experimentalDecorators": true,
|
|
18
|
+
"emitDecoratorMetadata": true,
|
|
19
|
+
"baseUrl": ".",
|
|
20
|
+
"paths": {
|
|
21
|
+
"@/*": ["src/*"]
|
|
22
|
+
},
|
|
23
|
+
"typeRoots": ["./node_modules/@types", "./src/types"]
|
|
24
|
+
},
|
|
25
|
+
"include": ["src/**/*"],
|
|
26
|
+
"exclude": ["node_modules", "dist"]
|
|
27
|
+
}
|