@gardenerim/css 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/CHANGELOG.md +121 -0
- package/LICENSE +21 -0
- package/README.md +591 -0
- package/dist/components/ai-compositions.min.css +2 -0
- package/dist/components/ai-extended.min.css +2 -0
- package/dist/components/ai.min.css +2 -0
- package/dist/components/auth-compositions.min.css +2 -0
- package/dist/components/basic.min.css +2 -0
- package/dist/components/catalog.min.css +2 -0
- package/dist/components/commerce-compositions.min.css +2 -0
- package/dist/components/content-compositions.min.css +2 -0
- package/dist/components/data-compositions.min.css +2 -0
- package/dist/components/data.min.css +2 -0
- package/dist/components/desktop-compositions.min.css +2 -0
- package/dist/components/desktop.min.css +2 -0
- package/dist/components/extended.min.css +2 -0
- package/dist/components/feedback.min.css +2 -0
- package/dist/components/form-compositions.min.css +2 -0
- package/dist/components/forms.min.css +2 -0
- package/dist/components/grid.min.css +2 -0
- package/dist/components/help.min.css +2 -0
- package/dist/components/layouts.min.css +2 -0
- package/dist/components/mobile-compositions.min.css +2 -0
- package/dist/components/navigation-compositions.min.css +2 -0
- package/dist/components/navigation.min.css +2 -0
- package/dist/components/page.min.css +2 -0
- package/dist/components/primitives.min.css +2 -0
- package/dist/components/recipes.min.css +2 -0
- package/dist/components/regions.min.css +2 -0
- package/dist/components/selection-compositions.min.css +2 -0
- package/dist/components/solution-compositions.min.css +2 -0
- package/dist/gardener.ai.css +236 -0
- package/dist/gardener.ai.min.css +3 -0
- package/dist/gardener.ai.min.css.map +7 -0
- package/dist/gardener.builds.json +7491 -0
- package/dist/gardener.capabilities.json +3784 -0
- package/dist/gardener.compatibility.json +1209 -0
- package/dist/gardener.components.css +3496 -0
- package/dist/gardener.components.min.css +3 -0
- package/dist/gardener.components.min.css.map +7 -0
- package/dist/gardener.core.css +1486 -0
- package/dist/gardener.core.min.css +3 -0
- package/dist/gardener.core.min.css.map +7 -0
- package/dist/gardener.css +7153 -0
- package/dist/gardener.d.ts +42 -0
- package/dist/gardener.electron.d.ts +5 -0
- package/dist/gardener.electron.js +24 -0
- package/dist/gardener.electron.min.js +3 -0
- package/dist/gardener.electron.min.js.map +7 -0
- package/dist/gardener.manifest.json +14557 -0
- package/dist/gardener.min.css +3 -0
- package/dist/gardener.min.css.map +7 -0
- package/dist/gardener.performance.json +1628 -0
- package/dist/gardener.public-api.json +2169 -0
- package/dist/gardener.recipes.json +1444 -0
- package/dist/gardener.runtime.js +2224 -0
- package/dist/gardener.runtime.min.js +3 -0
- package/dist/gardener.runtime.min.js.map +7 -0
- package/dist/gardener.tauri.d.ts +5 -0
- package/dist/gardener.tauri.js +28 -0
- package/dist/gardener.tauri.min.js +3 -0
- package/dist/gardener.tauri.min.js.map +7 -0
- package/dist/gardener.themes.css +1415 -0
- package/dist/gardener.themes.min.css +3 -0
- package/dist/gardener.themes.min.css.map +7 -0
- package/dist/gardener.utilities.css +1940 -0
- package/dist/gardener.utilities.json +92279 -0
- package/dist/gardener.utilities.min.css +3 -0
- package/dist/gardener.utilities.min.css.map +7 -0
- package/dist/platforms/gardener.desktop.min.css +2 -0
- package/dist/platforms/gardener.electron.min.css +2 -0
- package/dist/platforms/gardener.mobile.min.css +2 -0
- package/dist/platforms/gardener.tauri.min.css +2 -0
- package/dist/platforms/gardener.web.min.css +2 -0
- package/metadata/builds.schema.json +148 -0
- package/metadata/capabilities.json +3784 -0
- package/metadata/capabilities.schema.json +61 -0
- package/metadata/compatibility.json +1209 -0
- package/metadata/compatibility.schema.json +85 -0
- package/metadata/components.json +9082 -0
- package/metadata/components.schema.json +58 -0
- package/metadata/custom-build.schema.json +46 -0
- package/metadata/manifest.schema.json +47 -0
- package/metadata/performance-budgets.schema.json +103 -0
- package/metadata/performance-report.schema.json +194 -0
- package/metadata/public-api.json +2169 -0
- package/metadata/public-api.schema.json +165 -0
- package/metadata/recipes.json +1444 -0
- package/metadata/recipes.schema.json +39 -0
- package/metadata/schema.json +7 -0
- package/metadata/utilities.schema.json +29 -0
- package/package.json +177 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://gardener.style/schema/components.schema.json",
|
|
4
|
+
"title": "Gardener component catalog",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["$schema", "schemaVersion", "components", "requiredStateMatrix", "requiredEnvironmentMatrix", "compositionAliases"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"$schema": { "const": "./components.schema.json" },
|
|
10
|
+
"schemaVersion": { "const": 3 },
|
|
11
|
+
"components": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "$ref": "#/$defs/component" } },
|
|
12
|
+
"requiredStateMatrix": { "$ref": "#/$defs/identifiers" },
|
|
13
|
+
"requiredEnvironmentMatrix": { "$ref": "#/$defs/identifiers" },
|
|
14
|
+
"compositionAliases": { "type": "object", "minProperties": 1, "propertyNames": { "$ref": "#/$defs/name" }, "additionalProperties": { "$ref": "#/$defs/name" } }
|
|
15
|
+
},
|
|
16
|
+
"$defs": {
|
|
17
|
+
"name": { "type": "string", "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$" },
|
|
18
|
+
"selector": { "type": "string", "pattern": "^(?:\\.g-|\\[data-g-).+" },
|
|
19
|
+
"classSelector": { "type": "string", "pattern": "^\\.g-[a-z0-9-]+$" },
|
|
20
|
+
"part": { "type": "string", "pattern": "^g-[a-z0-9]+(?:-[a-z0-9*]+)*$" },
|
|
21
|
+
"platform": { "enum": ["web", "mobile", "tablet", "desktop", "tauri", "electron", "pwa", "desktop-webview", "print"] },
|
|
22
|
+
"uniqueNames": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 }, "uniqueItems": true },
|
|
23
|
+
"identifiers": { "type": "array", "minItems": 1, "items": { "type": "string", "pattern": "^[a-z0-9]+(?:-[a-z0-9*]+)*$" }, "uniqueItems": true },
|
|
24
|
+
"accessibility": {
|
|
25
|
+
"type": "object",
|
|
26
|
+
"additionalProperties": false,
|
|
27
|
+
"properties": {
|
|
28
|
+
"roles": { "$ref": "#/$defs/uniqueNames" },
|
|
29
|
+
"keyboard": { "$ref": "#/$defs/uniqueNames" },
|
|
30
|
+
"attributes": { "$ref": "#/$defs/uniqueNames" },
|
|
31
|
+
"focusTrap": { "type": "boolean" }
|
|
32
|
+
},
|
|
33
|
+
"minProperties": 1
|
|
34
|
+
},
|
|
35
|
+
"component": {
|
|
36
|
+
"type": "object",
|
|
37
|
+
"additionalProperties": false,
|
|
38
|
+
"required": ["name", "category", "type", "status", "selector", "platforms"],
|
|
39
|
+
"properties": {
|
|
40
|
+
"name": { "$ref": "#/$defs/name" },
|
|
41
|
+
"category": { "$ref": "#/$defs/name" },
|
|
42
|
+
"type": { "enum": ["css", "interactive"] },
|
|
43
|
+
"status": { "enum": ["css-ready", "runtime-ready", "experimental", "planned", "deprecated"] },
|
|
44
|
+
"selector": { "$ref": "#/$defs/selector" },
|
|
45
|
+
"cssSelector": { "$ref": "#/$defs/classSelector" },
|
|
46
|
+
"behaviors": { "type": "array", "items": { "$ref": "#/$defs/name" }, "minItems": 1, "uniqueItems": true },
|
|
47
|
+
"adapters": { "type": "array", "items": { "enum": ["tauri", "electron"] }, "minItems": 1, "uniqueItems": true },
|
|
48
|
+
"platforms": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/platform" }, "uniqueItems": true },
|
|
49
|
+
"parts": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/part" }, "uniqueItems": true },
|
|
50
|
+
"states": { "$ref": "#/$defs/identifiers" },
|
|
51
|
+
"variants": { "$ref": "#/$defs/identifiers" },
|
|
52
|
+
"features": { "$ref": "#/$defs/identifiers" },
|
|
53
|
+
"accessibility": { "$ref": "#/$defs/accessibility" }
|
|
54
|
+
},
|
|
55
|
+
"allOf": [{ "if": { "properties": { "type": { "const": "interactive" } }, "required": ["type"] }, "then": { "anyOf": [{ "properties": { "behaviors": {} }, "required": ["behaviors"] }, { "properties": { "adapters": {} }, "required": ["adapters"] }] } }]
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://gardener.style/schema/custom-build.schema.json",
|
|
4
|
+
"title": "Gardener custom build result",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["$schema", "schemaVersion", "gardenerVersion", "kind", "platform", "requestedComponents", "requestedPacks", "resolvedPacks", "includedComponents", "includeUtilities", "files", "css", "minCss", "sourceMap", "runtime", "adapters", "minifier", "compression", "outputIntegrity", "metrics"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"$schema": { "type": "string" },
|
|
10
|
+
"schemaVersion": { "const": 1 },
|
|
11
|
+
"gardenerVersion": { "type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$" },
|
|
12
|
+
"kind": { "enum": ["platform", "components"] },
|
|
13
|
+
"platform": { "type": ["string", "null"], "enum": ["web", "mobile", "desktop", "tauri", "electron", null] },
|
|
14
|
+
"requestedComponents": { "$ref": "#/$defs/strings" },
|
|
15
|
+
"requestedPacks": { "$ref": "#/$defs/strings" },
|
|
16
|
+
"resolvedPacks": { "$ref": "#/$defs/nonEmptyStrings" },
|
|
17
|
+
"includedComponents": { "$ref": "#/$defs/nonEmptyStrings" },
|
|
18
|
+
"includeUtilities": { "type": "boolean" },
|
|
19
|
+
"files": { "$ref": "#/$defs/nonEmptyStrings" },
|
|
20
|
+
"css": { "type": "string", "minLength": 1 },
|
|
21
|
+
"minCss": { "type": "string", "minLength": 1 },
|
|
22
|
+
"sourceMap": { "type": "string", "pattern": "\\.min\\.css\\.map$" },
|
|
23
|
+
"runtime": { "type": "string", "minLength": 1 },
|
|
24
|
+
"adapters": { "$ref": "#/$defs/strings" },
|
|
25
|
+
"minifier": { "$ref": "builds.schema.json#/$defs/minifier" },
|
|
26
|
+
"compression": { "$ref": "builds.schema.json#/$defs/compression" },
|
|
27
|
+
"outputIntegrity": {
|
|
28
|
+
"type": "object",
|
|
29
|
+
"minProperties": 3,
|
|
30
|
+
"additionalProperties": { "$ref": "builds.schema.json#/$defs/integrity" }
|
|
31
|
+
},
|
|
32
|
+
"metrics": {
|
|
33
|
+
"type": "object",
|
|
34
|
+
"additionalProperties": false,
|
|
35
|
+
"required": ["css", "minCss"],
|
|
36
|
+
"properties": {
|
|
37
|
+
"css": { "$ref": "builds.schema.json#/$defs/metrics" },
|
|
38
|
+
"minCss": { "$ref": "builds.schema.json#/$defs/metrics" }
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"$defs": {
|
|
43
|
+
"strings": { "type": "array", "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
|
|
44
|
+
"nonEmptyStrings": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "minLength": 1 } }
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://gardener.style/schema/manifest.schema.json",
|
|
4
|
+
"title": "Gardener combined distribution manifest",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["$schema", "schemaVersion", "name", "version", "classPrefix", "defaultTheme", "themes", "modes", "axes", "breakpoints", "grid", "regions", "primitives", "pageComponents", "helpComponents", "formCompositions", "navigationCompositions", "dataCompositions", "selectionCompositions", "contentCompositions", "authCompositions", "commerceCompositions", "mobileCompositions", "desktopCompositions", "aiCompositions", "solutionCompositions", "behaviors", "runtimeBehaviors", "components", "requiredStateMatrix", "requiredEnvironmentMatrix", "compositionAliases", "recipes"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"$schema": { "const": "../metadata/manifest.schema.json" },
|
|
10
|
+
"schemaVersion": { "const": 3 },
|
|
11
|
+
"name": { "const": "Gardener" },
|
|
12
|
+
"version": { "type": "string", "pattern": "^\\d+\\.\\d+\\.\\d+$" },
|
|
13
|
+
"classPrefix": { "const": "g-" },
|
|
14
|
+
"defaultTheme": { "type": "string" },
|
|
15
|
+
"themes": { "$ref": "#/$defs/uniqueStrings" },
|
|
16
|
+
"modes": { "$ref": "#/$defs/uniqueStrings" },
|
|
17
|
+
"axes": { "type": "object", "propertyNames": { "pattern": "^[a-z][a-z0-9-]*$" }, "additionalProperties": { "$ref": "#/$defs/uniqueStrings" } },
|
|
18
|
+
"breakpoints": { "type": "object", "propertyNames": { "pattern": "^[a-z0-9-]+$" }, "additionalProperties": { "type": "number", "minimum": 0 } },
|
|
19
|
+
"grid": { "$ref": "./capabilities.schema.json#/$defs/capability" },
|
|
20
|
+
"regions": { "$ref": "./capabilities.schema.json#/$defs/capability" },
|
|
21
|
+
"primitives": { "$ref": "./capabilities.schema.json#/$defs/capability" },
|
|
22
|
+
"pageComponents": { "$ref": "./capabilities.schema.json#/$defs/capability" },
|
|
23
|
+
"helpComponents": { "$ref": "./capabilities.schema.json#/$defs/capability" },
|
|
24
|
+
"formCompositions": { "$ref": "./capabilities.schema.json#/$defs/capability" },
|
|
25
|
+
"navigationCompositions": { "$ref": "./capabilities.schema.json#/$defs/capability" },
|
|
26
|
+
"dataCompositions": { "$ref": "./capabilities.schema.json#/$defs/capability" },
|
|
27
|
+
"selectionCompositions": { "$ref": "./capabilities.schema.json#/$defs/capability" },
|
|
28
|
+
"contentCompositions": { "$ref": "./capabilities.schema.json#/$defs/capability" },
|
|
29
|
+
"authCompositions": { "$ref": "./capabilities.schema.json#/$defs/capability" },
|
|
30
|
+
"commerceCompositions": { "$ref": "./capabilities.schema.json#/$defs/capability" },
|
|
31
|
+
"mobileCompositions": { "$ref": "./capabilities.schema.json#/$defs/capability" },
|
|
32
|
+
"desktopCompositions": { "$ref": "./capabilities.schema.json#/$defs/capability" },
|
|
33
|
+
"aiCompositions": { "$ref": "./capabilities.schema.json#/$defs/capability" },
|
|
34
|
+
"solutionCompositions": { "$ref": "./capabilities.schema.json#/$defs/capability" },
|
|
35
|
+
"behaviors": { "type": "array", "items": { "$ref": "#/$defs/name" }, "uniqueItems": true },
|
|
36
|
+
"runtimeBehaviors": { "type": "array", "items": { "$ref": "#/$defs/name" }, "uniqueItems": true, "deprecated": true },
|
|
37
|
+
"components": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "$ref": "./components.schema.json#/$defs/component" } },
|
|
38
|
+
"requiredStateMatrix": { "$ref": "#/$defs/uniqueStrings" },
|
|
39
|
+
"requiredEnvironmentMatrix": { "$ref": "#/$defs/uniqueStrings" },
|
|
40
|
+
"compositionAliases": { "type": "object", "minProperties": 1, "propertyNames": { "$ref": "#/$defs/name" }, "additionalProperties": { "$ref": "#/$defs/name" } },
|
|
41
|
+
"recipes": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "$ref": "./recipes.schema.json#/$defs/recipe" } }
|
|
42
|
+
},
|
|
43
|
+
"$defs": {
|
|
44
|
+
"name": { "type": "string", "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$" },
|
|
45
|
+
"uniqueStrings": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 }, "uniqueItems": true }
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://gardener.style/schema/performance-budgets.schema.json",
|
|
4
|
+
"title": "Gardener performance budgets",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["$schema", "schemaVersion", "version", "compression", "packageMeasurement", "baseline", "artifacts", "ratios", "package"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"$schema": { "type": "string" },
|
|
10
|
+
"schemaVersion": { "const": 1 },
|
|
11
|
+
"version": { "type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$" },
|
|
12
|
+
"compression": { "$ref": "builds.schema.json#/$defs/compression" },
|
|
13
|
+
"packageMeasurement": { "$ref": "#/$defs/packageMeasurement" },
|
|
14
|
+
"baseline": { "$ref": "#/$defs/baseline" },
|
|
15
|
+
"artifacts": { "type": "object", "minProperties": 1, "additionalProperties": { "$ref": "#/$defs/limits" } },
|
|
16
|
+
"ratios": { "type": "object", "minProperties": 1, "additionalProperties": { "$ref": "#/$defs/ratio" } },
|
|
17
|
+
"package": { "$ref": "#/$defs/packageLimits" }
|
|
18
|
+
},
|
|
19
|
+
"$defs": {
|
|
20
|
+
"packageMeasurement": {
|
|
21
|
+
"type": "object",
|
|
22
|
+
"additionalProperties": false,
|
|
23
|
+
"required": ["packedQuantum", "unpackedQuantum"],
|
|
24
|
+
"properties": {
|
|
25
|
+
"packedQuantum": { "type": "integer", "minimum": 1 },
|
|
26
|
+
"unpackedQuantum": { "type": "integer", "minimum": 1 }
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"baseline": {
|
|
30
|
+
"type": "object",
|
|
31
|
+
"additionalProperties": false,
|
|
32
|
+
"required": ["version", "artifactAliases", "artifacts", "package", "maxGrowthPercent"],
|
|
33
|
+
"properties": {
|
|
34
|
+
"version": { "type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$" },
|
|
35
|
+
"artifactAliases": {
|
|
36
|
+
"type": "object",
|
|
37
|
+
"additionalProperties": { "type": "string", "minLength": 1 }
|
|
38
|
+
},
|
|
39
|
+
"artifacts": { "type": "object", "minProperties": 1, "additionalProperties": { "$ref": "builds.schema.json#/$defs/metrics" } },
|
|
40
|
+
"package": { "$ref": "#/$defs/packageLimits" },
|
|
41
|
+
"maxGrowthPercent": {
|
|
42
|
+
"type": "object",
|
|
43
|
+
"additionalProperties": false,
|
|
44
|
+
"required": ["artifacts", "package"],
|
|
45
|
+
"properties": {
|
|
46
|
+
"artifacts": { "$ref": "#/$defs/artifactGrowthLimits" },
|
|
47
|
+
"package": { "$ref": "#/$defs/packageGrowthLimits" }
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"artifactGrowthLimits": {
|
|
53
|
+
"type": "object",
|
|
54
|
+
"additionalProperties": false,
|
|
55
|
+
"required": ["raw", "gzip", "brotli"],
|
|
56
|
+
"properties": {
|
|
57
|
+
"raw": { "$ref": "#/$defs/percent" },
|
|
58
|
+
"gzip": { "$ref": "#/$defs/percent" },
|
|
59
|
+
"brotli": { "$ref": "#/$defs/percent" }
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"packageGrowthLimits": {
|
|
63
|
+
"type": "object",
|
|
64
|
+
"additionalProperties": false,
|
|
65
|
+
"required": ["packed", "unpacked", "files"],
|
|
66
|
+
"properties": {
|
|
67
|
+
"packed": { "$ref": "#/$defs/percent" },
|
|
68
|
+
"unpacked": { "$ref": "#/$defs/percent" },
|
|
69
|
+
"files": { "$ref": "#/$defs/percent" }
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"percent": { "type": "number", "minimum": 0, "maximum": 100 },
|
|
73
|
+
"limits": {
|
|
74
|
+
"type": "object",
|
|
75
|
+
"additionalProperties": false,
|
|
76
|
+
"required": ["raw", "gzip", "brotli"],
|
|
77
|
+
"properties": {
|
|
78
|
+
"raw": { "type": "integer", "minimum": 1 },
|
|
79
|
+
"gzip": { "type": "integer", "minimum": 1 },
|
|
80
|
+
"brotli": { "type": "integer", "minimum": 1 }
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"ratio": {
|
|
84
|
+
"type": "object",
|
|
85
|
+
"additionalProperties": false,
|
|
86
|
+
"required": ["source", "max"],
|
|
87
|
+
"properties": {
|
|
88
|
+
"source": { "type": "string", "minLength": 1 },
|
|
89
|
+
"max": { "type": "number", "exclusiveMinimum": 0, "maximum": 1 }
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"packageLimits": {
|
|
93
|
+
"type": "object",
|
|
94
|
+
"additionalProperties": false,
|
|
95
|
+
"required": ["packed", "unpacked", "files"],
|
|
96
|
+
"properties": {
|
|
97
|
+
"packed": { "type": "integer", "minimum": 1 },
|
|
98
|
+
"unpacked": { "type": "integer", "minimum": 1 },
|
|
99
|
+
"files": { "type": "integer", "minimum": 1 }
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://gardener.style/schema/performance-report.schema.json",
|
|
4
|
+
"title": "Gardener performance report",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["$schema", "schemaVersion", "version", "generatedAt", "status", "compression", "artifacts", "ratios", "package", "regressions"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"$schema": { "type": "string" },
|
|
10
|
+
"schemaVersion": { "const": 1 },
|
|
11
|
+
"version": { "type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$" },
|
|
12
|
+
"generatedAt": { "type": "string", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T" },
|
|
13
|
+
"status": { "enum": ["passed", "failed"] },
|
|
14
|
+
"compression": { "$ref": "builds.schema.json#/$defs/compression" },
|
|
15
|
+
"artifacts": { "type": "object", "minProperties": 1, "additionalProperties": { "$ref": "#/$defs/artifact" } },
|
|
16
|
+
"ratios": { "type": "object", "minProperties": 1, "additionalProperties": { "$ref": "#/$defs/ratioResult" } },
|
|
17
|
+
"package": { "$ref": "#/$defs/packageResult" },
|
|
18
|
+
"regressions": { "$ref": "#/$defs/regressionsResult" }
|
|
19
|
+
},
|
|
20
|
+
"allOf": [
|
|
21
|
+
{
|
|
22
|
+
"if": { "properties": { "status": { "const": "passed" } }, "required": ["status"] },
|
|
23
|
+
"then": {
|
|
24
|
+
"properties": {
|
|
25
|
+
"artifacts": { "type": "object", "additionalProperties": { "$ref": "#/$defs/passingArtifact" } },
|
|
26
|
+
"ratios": { "type": "object", "additionalProperties": { "$ref": "#/$defs/passingRatioResult" } },
|
|
27
|
+
"package": { "$ref": "#/$defs/passingPackageResult" },
|
|
28
|
+
"regressions": { "$ref": "#/$defs/passingRegressionsResult" }
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"$defs": {
|
|
34
|
+
"metrics": { "$ref": "builds.schema.json#/$defs/metrics" },
|
|
35
|
+
"artifact": {
|
|
36
|
+
"type": "object",
|
|
37
|
+
"additionalProperties": false,
|
|
38
|
+
"required": ["limits", "actual", "pass"],
|
|
39
|
+
"properties": {
|
|
40
|
+
"limits": { "$ref": "performance-budgets.schema.json#/$defs/limits" },
|
|
41
|
+
"actual": { "$ref": "#/$defs/metrics" },
|
|
42
|
+
"pass": { "type": "boolean" }
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"passingArtifact": {
|
|
46
|
+
"type": "object",
|
|
47
|
+
"additionalProperties": false,
|
|
48
|
+
"required": ["limits", "actual", "pass"],
|
|
49
|
+
"properties": {
|
|
50
|
+
"limits": { "$ref": "performance-budgets.schema.json#/$defs/limits" },
|
|
51
|
+
"actual": { "$ref": "#/$defs/metrics" },
|
|
52
|
+
"pass": { "const": true }
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"ratioResult": {
|
|
56
|
+
"type": "object",
|
|
57
|
+
"additionalProperties": false,
|
|
58
|
+
"required": ["source", "max", "actual", "pass"],
|
|
59
|
+
"properties": {
|
|
60
|
+
"source": { "type": "string", "minLength": 1 },
|
|
61
|
+
"max": { "type": "number", "exclusiveMinimum": 0, "maximum": 1 },
|
|
62
|
+
"actual": { "type": "number", "exclusiveMinimum": 0 },
|
|
63
|
+
"pass": { "type": "boolean" }
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"passingRatioResult": {
|
|
67
|
+
"type": "object",
|
|
68
|
+
"additionalProperties": false,
|
|
69
|
+
"required": ["source", "max", "actual", "pass"],
|
|
70
|
+
"properties": {
|
|
71
|
+
"source": { "type": "string", "minLength": 1 },
|
|
72
|
+
"max": { "type": "number", "exclusiveMinimum": 0, "maximum": 1 },
|
|
73
|
+
"actual": { "type": "number", "exclusiveMinimum": 0 },
|
|
74
|
+
"pass": { "const": true }
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"packageResult": {
|
|
78
|
+
"type": "object",
|
|
79
|
+
"additionalProperties": false,
|
|
80
|
+
"required": ["measurement", "rounding", "limits", "actual", "pass"],
|
|
81
|
+
"properties": {
|
|
82
|
+
"measurement": { "const": "self-report-conservative-upper-bound" },
|
|
83
|
+
"rounding": { "$ref": "performance-budgets.schema.json#/$defs/packageMeasurement" },
|
|
84
|
+
"limits": { "$ref": "performance-budgets.schema.json#/$defs/packageLimits" },
|
|
85
|
+
"actual": { "$ref": "performance-budgets.schema.json#/$defs/packageLimits" },
|
|
86
|
+
"pass": { "type": "boolean" }
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"passingPackageResult": {
|
|
90
|
+
"type": "object",
|
|
91
|
+
"additionalProperties": false,
|
|
92
|
+
"required": ["measurement", "rounding", "limits", "actual", "pass"],
|
|
93
|
+
"properties": {
|
|
94
|
+
"measurement": { "const": "self-report-conservative-upper-bound" },
|
|
95
|
+
"rounding": { "$ref": "performance-budgets.schema.json#/$defs/packageMeasurement" },
|
|
96
|
+
"limits": { "$ref": "performance-budgets.schema.json#/$defs/packageLimits" },
|
|
97
|
+
"actual": { "$ref": "performance-budgets.schema.json#/$defs/packageLimits" },
|
|
98
|
+
"pass": { "const": true }
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"growthMetrics": {
|
|
102
|
+
"type": "object",
|
|
103
|
+
"additionalProperties": false,
|
|
104
|
+
"required": ["raw", "gzip", "brotli"],
|
|
105
|
+
"properties": {
|
|
106
|
+
"raw": { "type": "number" },
|
|
107
|
+
"gzip": { "type": "number" },
|
|
108
|
+
"brotli": { "type": "number" }
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"packageGrowthMetrics": {
|
|
112
|
+
"type": "object",
|
|
113
|
+
"additionalProperties": false,
|
|
114
|
+
"required": ["packed", "unpacked", "files"],
|
|
115
|
+
"properties": {
|
|
116
|
+
"packed": { "type": "number" },
|
|
117
|
+
"unpacked": { "type": "number" },
|
|
118
|
+
"files": { "type": "number" }
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
"regressionArtifact": {
|
|
122
|
+
"type": "object",
|
|
123
|
+
"additionalProperties": false,
|
|
124
|
+
"required": ["baselineArtifact", "baseline", "actual", "growthPercent", "limits", "pass"],
|
|
125
|
+
"properties": {
|
|
126
|
+
"baselineArtifact": { "type": "string", "minLength": 1 },
|
|
127
|
+
"baseline": { "$ref": "builds.schema.json#/$defs/metrics" },
|
|
128
|
+
"actual": { "$ref": "builds.schema.json#/$defs/metrics" },
|
|
129
|
+
"growthPercent": { "$ref": "#/$defs/growthMetrics" },
|
|
130
|
+
"limits": { "$ref": "performance-budgets.schema.json#/$defs/artifactGrowthLimits" },
|
|
131
|
+
"pass": { "type": "boolean" }
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
"passingRegressionArtifact": {
|
|
135
|
+
"type": "object",
|
|
136
|
+
"additionalProperties": false,
|
|
137
|
+
"required": ["baselineArtifact", "baseline", "actual", "growthPercent", "limits", "pass"],
|
|
138
|
+
"properties": {
|
|
139
|
+
"baselineArtifact": { "type": "string", "minLength": 1 },
|
|
140
|
+
"baseline": { "$ref": "builds.schema.json#/$defs/metrics" },
|
|
141
|
+
"actual": { "$ref": "builds.schema.json#/$defs/metrics" },
|
|
142
|
+
"growthPercent": { "$ref": "#/$defs/growthMetrics" },
|
|
143
|
+
"limits": { "$ref": "performance-budgets.schema.json#/$defs/artifactGrowthLimits" },
|
|
144
|
+
"pass": { "const": true }
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
"packageRegression": {
|
|
148
|
+
"type": "object",
|
|
149
|
+
"additionalProperties": false,
|
|
150
|
+
"required": ["baseline", "actual", "growthPercent", "limits", "pass"],
|
|
151
|
+
"properties": {
|
|
152
|
+
"baseline": { "$ref": "performance-budgets.schema.json#/$defs/packageLimits" },
|
|
153
|
+
"actual": { "$ref": "performance-budgets.schema.json#/$defs/packageLimits" },
|
|
154
|
+
"growthPercent": { "$ref": "#/$defs/packageGrowthMetrics" },
|
|
155
|
+
"limits": { "$ref": "performance-budgets.schema.json#/$defs/packageGrowthLimits" },
|
|
156
|
+
"pass": { "type": "boolean" }
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
"passingPackageRegression": {
|
|
160
|
+
"type": "object",
|
|
161
|
+
"additionalProperties": false,
|
|
162
|
+
"required": ["baseline", "actual", "growthPercent", "limits", "pass"],
|
|
163
|
+
"properties": {
|
|
164
|
+
"baseline": { "$ref": "performance-budgets.schema.json#/$defs/packageLimits" },
|
|
165
|
+
"actual": { "$ref": "performance-budgets.schema.json#/$defs/packageLimits" },
|
|
166
|
+
"growthPercent": { "$ref": "#/$defs/packageGrowthMetrics" },
|
|
167
|
+
"limits": { "$ref": "performance-budgets.schema.json#/$defs/packageGrowthLimits" },
|
|
168
|
+
"pass": { "const": true }
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
"regressionsResult": {
|
|
172
|
+
"type": "object",
|
|
173
|
+
"additionalProperties": false,
|
|
174
|
+
"required": ["baselineVersion", "artifacts", "package", "pass"],
|
|
175
|
+
"properties": {
|
|
176
|
+
"baselineVersion": { "type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$" },
|
|
177
|
+
"artifacts": { "type": "object", "minProperties": 1, "additionalProperties": { "$ref": "#/$defs/regressionArtifact" } },
|
|
178
|
+
"package": { "$ref": "#/$defs/packageRegression" },
|
|
179
|
+
"pass": { "type": "boolean" }
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
"passingRegressionsResult": {
|
|
183
|
+
"type": "object",
|
|
184
|
+
"additionalProperties": false,
|
|
185
|
+
"required": ["baselineVersion", "artifacts", "package", "pass"],
|
|
186
|
+
"properties": {
|
|
187
|
+
"baselineVersion": { "type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$" },
|
|
188
|
+
"artifacts": { "type": "object", "minProperties": 1, "additionalProperties": { "$ref": "#/$defs/passingRegressionArtifact" } },
|
|
189
|
+
"package": { "$ref": "#/$defs/passingPackageRegression" },
|
|
190
|
+
"pass": { "const": true }
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|