@webstudio-is/css-data 0.3.0 → 0.15.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/lib/__generated__/keyword-values.js +6617 -6615
- package/lib/__generated__/properties.js +3200 -3198
- package/lib/__generated__/units.js +33 -31
- package/lib/cjs/__generated__/keyword-values.cjs +6636 -6617
- package/lib/cjs/__generated__/properties.cjs +3219 -3200
- package/lib/cjs/__generated__/units.cjs +52 -33
- package/lib/cjs/index.cjs +19 -18
- package/lib/cjs/popularity-index.cjs +4631 -4612
- package/lib/cjs/schema.cjs +87 -53
- package/lib/popularity-index.js +4612 -4610
- package/lib/schema.js +66 -49
- package/package.json +11 -19
- package/src/__generated__/keyword-values.ts +6616 -0
- package/src/__generated__/properties.ts +3200 -0
- package/src/__generated__/units.ts +32 -0
- package/{lib/cjs/index.d.ts → src/index.ts} +0 -1
- package/src/popularity-index.ts +4611 -0
- package/src/schema.ts +119 -0
- package/lib/__generated__/keyword-values.d.ts +0 -302
- package/lib/__generated__/keyword-values.d.ts.map +0 -1
- package/lib/__generated__/properties.d.ts +0 -3199
- package/lib/__generated__/properties.d.ts.map +0 -1
- package/lib/__generated__/units.d.ts +0 -2
- package/lib/__generated__/units.d.ts.map +0 -1
- package/lib/cjs/__generated__/keyword-values.d.ts +0 -302
- package/lib/cjs/__generated__/keyword-values.d.ts.map +0 -1
- package/lib/cjs/__generated__/properties.d.ts +0 -3199
- package/lib/cjs/__generated__/properties.d.ts.map +0 -1
- package/lib/cjs/__generated__/units.d.ts +0 -2
- package/lib/cjs/__generated__/units.d.ts.map +0 -1
- package/lib/cjs/index.d.ts.map +0 -1
- package/lib/cjs/popularity-index.d.ts +0 -7
- package/lib/cjs/popularity-index.d.ts.map +0 -1
- package/lib/cjs/schema.d.ts +0 -607
- package/lib/cjs/schema.d.ts.map +0 -1
- package/lib/index.d.ts +0 -5
- package/lib/index.d.ts.map +0 -1
- package/lib/popularity-index.d.ts +0 -7
- package/lib/popularity-index.d.ts.map +0 -1
- package/lib/schema.d.ts +0 -607
- package/lib/schema.d.ts.map +0 -1
- package/lib/tsconfig.tsbuildinfo +0 -1
package/lib/cjs/schema.cjs
CHANGED
|
@@ -1,58 +1,92 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var schema_exports = {};
|
|
20
|
+
__export(schema_exports, {
|
|
21
|
+
Breakpoint: () => Breakpoint,
|
|
22
|
+
Breakpoints: () => Breakpoints,
|
|
23
|
+
CssRule: () => CssRule,
|
|
24
|
+
validStaticValueTypes: () => validStaticValueTypes
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(schema_exports);
|
|
27
|
+
var import_units = require("./__generated__/units");
|
|
28
|
+
var import_zod = require("zod");
|
|
29
|
+
const Unit = import_zod.z.union([import_zod.z.enum(import_units.units), import_zod.z.literal("number")]);
|
|
30
|
+
const UnitValue = import_zod.z.object({
|
|
31
|
+
type: import_zod.z.literal("unit"),
|
|
32
|
+
unit: Unit,
|
|
33
|
+
value: import_zod.z.number()
|
|
34
|
+
});
|
|
35
|
+
const KeywordValue = import_zod.z.object({
|
|
36
|
+
type: import_zod.z.literal("keyword"),
|
|
37
|
+
value: import_zod.z.string()
|
|
38
|
+
});
|
|
39
|
+
const FontFamilyValue = import_zod.z.object({
|
|
40
|
+
type: import_zod.z.literal("fontFamily"),
|
|
41
|
+
value: import_zod.z.array(import_zod.z.string())
|
|
42
|
+
});
|
|
43
|
+
const RgbValue = import_zod.z.object({
|
|
44
|
+
type: import_zod.z.literal("rgb"),
|
|
45
|
+
r: import_zod.z.number(),
|
|
46
|
+
g: import_zod.z.number(),
|
|
47
|
+
b: import_zod.z.number(),
|
|
48
|
+
alpha: import_zod.z.number()
|
|
49
|
+
});
|
|
50
|
+
const InvalidValue = import_zod.z.object({
|
|
51
|
+
type: import_zod.z.literal("invalid"),
|
|
52
|
+
value: import_zod.z.string()
|
|
53
|
+
});
|
|
54
|
+
const UnsetValue = import_zod.z.object({
|
|
55
|
+
type: import_zod.z.literal("unset"),
|
|
56
|
+
value: import_zod.z.literal("")
|
|
57
|
+
});
|
|
58
|
+
const validStaticValueTypes = [
|
|
59
|
+
"unit",
|
|
60
|
+
"keyword",
|
|
61
|
+
"fontFamily",
|
|
62
|
+
"rgb"
|
|
63
|
+
];
|
|
64
|
+
const ValidStaticStyleValue = import_zod.z.union([
|
|
65
|
+
UnitValue,
|
|
66
|
+
KeywordValue,
|
|
67
|
+
FontFamilyValue,
|
|
68
|
+
RgbValue
|
|
36
69
|
]);
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
70
|
+
const VarValue = import_zod.z.object({
|
|
71
|
+
type: import_zod.z.literal("var"),
|
|
72
|
+
value: import_zod.z.string(),
|
|
73
|
+
fallbacks: import_zod.z.array(ValidStaticStyleValue)
|
|
74
|
+
});
|
|
75
|
+
const StyleValue = import_zod.z.union([
|
|
76
|
+
ValidStaticStyleValue,
|
|
77
|
+
InvalidValue,
|
|
78
|
+
UnsetValue,
|
|
79
|
+
VarValue,
|
|
80
|
+
RgbValue
|
|
47
81
|
]);
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
82
|
+
const Style = import_zod.z.record(import_zod.z.string(), StyleValue);
|
|
83
|
+
const CssRule = import_zod.z.object({
|
|
84
|
+
style: Style,
|
|
85
|
+
breakpoint: import_zod.z.optional(import_zod.z.string())
|
|
52
86
|
});
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
87
|
+
const Breakpoint = import_zod.z.object({
|
|
88
|
+
id: import_zod.z.string(),
|
|
89
|
+
label: import_zod.z.string(),
|
|
90
|
+
minWidth: import_zod.z.number()
|
|
57
91
|
});
|
|
58
|
-
|
|
92
|
+
const Breakpoints = import_zod.z.array(Breakpoint);
|