@webstudio-is/css-data 0.1.0 → 0.2.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/cjs/index.cjs +20 -0
- package/lib/cjs/index.d.ts +5 -0
- package/lib/cjs/index.d.ts.map +1 -0
- package/lib/cjs/keyword-values.cjs +6619 -0
- package/lib/cjs/keyword-values.d.ts +302 -0
- package/lib/cjs/keyword-values.d.ts.map +1 -0
- package/lib/cjs/popularity-index.cjs +4614 -0
- package/lib/cjs/popularity-index.d.ts +7 -0
- package/lib/cjs/popularity-index.d.ts.map +1 -0
- package/lib/cjs/properties.cjs +3202 -0
- package/lib/cjs/properties.d.ts +3199 -0
- package/lib/cjs/properties.d.ts.map +1 -0
- package/lib/cjs/schema.cjs +58 -0
- package/lib/cjs/schema.d.ts +598 -0
- package/lib/cjs/schema.d.ts.map +1 -0
- package/lib/cjs/units.cjs +35 -0
- package/lib/cjs/units.d.ts +2 -0
- package/lib/cjs/units.d.ts.map +1 -0
- package/lib/index.js +4 -20
- package/lib/keyword-values.js +1 -4
- package/lib/popularity-index.js +1 -4
- package/lib/properties.js +1 -4
- package/lib/schema.js +46 -49
- package/lib/tsconfig.tsbuildinfo +1 -0
- package/lib/units.js +1 -4
- package/package.json +11 -6
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"properties.d.ts","sourceRoot":"","sources":["../../src/properties.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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ports.StyleValue = exports.VarValue = exports.ValidStaticStyleValue = exports.validStaticValueTypes = exports.UnsetValue = exports.InvalidValue = exports.FontFamilyValue = exports.KeywordValue = exports.UnitValue = exports.Unit = void 0;
|
|
4
|
+
const units_1 = require("./units");
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
exports.Unit = zod_1.z.union([zod_1.z.enum(units_1.units), zod_1.z.literal("number")]);
|
|
7
|
+
exports.UnitValue = zod_1.z.object({
|
|
8
|
+
type: zod_1.z.literal("unit"),
|
|
9
|
+
unit: exports.Unit,
|
|
10
|
+
value: zod_1.z.number(),
|
|
11
|
+
});
|
|
12
|
+
exports.KeywordValue = zod_1.z.object({
|
|
13
|
+
type: zod_1.z.literal("keyword"),
|
|
14
|
+
// @todo use exact type
|
|
15
|
+
value: zod_1.z.string(),
|
|
16
|
+
});
|
|
17
|
+
exports.FontFamilyValue = zod_1.z.object({
|
|
18
|
+
type: zod_1.z.literal("fontFamily"),
|
|
19
|
+
value: zod_1.z.array(zod_1.z.string()),
|
|
20
|
+
});
|
|
21
|
+
// We want to be able to render the invalid value
|
|
22
|
+
// and show it is invalid visually, without saving it to the db
|
|
23
|
+
exports.InvalidValue = zod_1.z.object({
|
|
24
|
+
type: zod_1.z.literal("invalid"),
|
|
25
|
+
value: zod_1.z.string(),
|
|
26
|
+
});
|
|
27
|
+
exports.UnsetValue = zod_1.z.object({
|
|
28
|
+
type: zod_1.z.literal("unset"),
|
|
29
|
+
value: zod_1.z.literal(""),
|
|
30
|
+
});
|
|
31
|
+
exports.validStaticValueTypes = ["unit", "keyword", "fontFamily"];
|
|
32
|
+
exports.ValidStaticStyleValue = zod_1.z.union([
|
|
33
|
+
exports.UnitValue,
|
|
34
|
+
exports.KeywordValue,
|
|
35
|
+
exports.FontFamilyValue,
|
|
36
|
+
]);
|
|
37
|
+
exports.VarValue = zod_1.z.object({
|
|
38
|
+
type: zod_1.z.literal("var"),
|
|
39
|
+
value: zod_1.z.string(),
|
|
40
|
+
fallbacks: zod_1.z.array(exports.ValidStaticStyleValue),
|
|
41
|
+
});
|
|
42
|
+
exports.StyleValue = zod_1.z.union([
|
|
43
|
+
exports.ValidStaticStyleValue,
|
|
44
|
+
exports.InvalidValue,
|
|
45
|
+
exports.UnsetValue,
|
|
46
|
+
exports.VarValue,
|
|
47
|
+
]);
|
|
48
|
+
exports.Style = zod_1.z.record(zod_1.z.string(), exports.StyleValue);
|
|
49
|
+
exports.CssRule = zod_1.z.object({
|
|
50
|
+
style: exports.Style,
|
|
51
|
+
breakpoint: zod_1.z.string(),
|
|
52
|
+
});
|
|
53
|
+
exports.Breakpoint = zod_1.z.object({
|
|
54
|
+
id: zod_1.z.string(),
|
|
55
|
+
label: zod_1.z.string(),
|
|
56
|
+
minWidth: zod_1.z.number(),
|
|
57
|
+
});
|
|
58
|
+
exports.Breakpoints = zod_1.z.array(exports.Breakpoint);
|