Selbstauskunft
Schema & Press
Das JSON-Schema, die Grammatik als Daten, die Press-Kennung — und der Abgleich mit dem, was der Server prüft.
01Die Press-KennungEin opaker Vergleichswert, nie eine Ordnung.
Die Press-Version entsteht aus der Format-Version, einer handgepflegten Verhaltens-Revision und einem Fingerabdruck über Grammatik und Flächen-Deklaration. Sie wird nur auf Gleichheit geprüft, nie auf Ordnung.
| press | s1.p22.899c6d64 |
| stencil_version | 1 |
| press revision | 22 |
Abgleich mit dem, was der Server prüft
Die Grammatik reist als Daten ins Manifest und von dort zur PHP-Schreibkante. Diese Seite liest beides und vergleicht:
| manifest | apps/backend/database/seeds/static-posts/manifest.json |
| manifestVersion | 17 |
| pressVersion (Manifest) | s1.p22.899c6d64 |
| pressVersion (laufender Kern) | s1.p22.899c6d64 |
| Befund | gleich — Seite, Manifest und Schreibkante meinen dieselbe Sprache |
| templateCount | 57 |
02Die Sprache als DatenFür alles, was kein TypeScript spricht.
Das vollständige JSON-Schema (Draft-07)
Die Namenslisten darin kommen aus der Registry — das Schema kann von ihr nicht abdriften.
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://trybe.so/schemas/stencil-v1.json",
"title": "Stencil",
"type": "object",
"required": [
"stencil_version",
"key",
"layers"
],
"additionalProperties": false,
"properties": {
"stencil_version": {
"const": 1
},
"key": {
"type": "string",
"minLength": 1
},
"layers": {
"type": "array",
"items": {
"$ref": "#/definitions/layerEntry"
}
}
},
"definitions": {
"scalar": {
"type": [
"string",
"number",
"boolean",
"null"
]
},
"value": {
"anyOf": [
{
"type": [
"string",
"number",
"boolean",
"null"
]
},
{
"type": "array",
"items": {
"$ref": "#/definitions/value"
}
},
{
"$ref": "#/definitions/valueNode"
}
]
},
"valueNode": {
"type": "object",
"required": [
"$"
],
"properties": {
"$": {
"enum": [
"const",
"state",
"var",
"ctx",
"item",
"call",
"cond",
"match"
]
}
},
"allOf": [
{
"if": {
"properties": {
"$": {
"const": "const"
}
}
},
"then": {
"required": [
"value"
],
"additionalProperties": false,
"properties": {
"$": {},
"value": {}
}
}
},
{
"if": {
"properties": {
"$": {
"enum": [
"state",
"item"
]
}
}
},
"then": {
"required": [
"path"
],
"additionalProperties": false,
"properties": {
"$": {},
"path": {
"type": "string",
"minLength": 1
}
}
}
},
{
"if": {
"properties": {
"$": {
"const": "ctx"
}
}
},
"then": {
"required": [
"path"
],
"additionalProperties": false,
"properties": {
"$": {},
"path": {
"type": "string",
"pattern": "^(brand|format|height|motion|page|pages|t|width)(\\..+)?$"
}
}
}
},
{
"if": {
"properties": {
"$": {
"const": "var"
}
}
},
"then": {
"required": [
"name"
],
"additionalProperties": false,
"properties": {
"$": {},
"name": {
"type": "string",
"minLength": 1
},
"path": {
"type": "string"
}
}
}
},
{
"if": {
"properties": {
"$": {
"const": "call"
}
}
},
"then": {
"required": [
"fn"
],
"additionalProperties": false,
"properties": {
"$": {},
"fn": {
"enum": [
"concat",
"join",
"fallback",
"coalesce",
"add",
"sub",
"mul",
"div",
"mod",
"round",
"floor",
"ceil",
"abs",
"min",
"max",
"number",
"int",
"string",
"upper",
"lower",
"trim",
"split",
"splitTrim",
"before",
"after",
"range",
"at",
"get",
"startsWith",
"length",
"contains",
"eq",
"gt",
"gte",
"lt",
"lte",
"not",
"and",
"or",
"isPhoto",
"textColor",
"logoColor",
"cardShadow",
"darkCss",
"headFontCss"
]
},
"args": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/value"
}
}
}
}
},
{
"if": {
"properties": {
"$": {
"const": "cond"
}
}
},
"then": {
"required": [
"when",
"then"
],
"additionalProperties": false,
"properties": {
"$": {},
"when": {
"$ref": "#/definitions/condition"
},
"then": {
"$ref": "#/definitions/value"
},
"else": {
"$ref": "#/definitions/value"
}
}
}
},
{
"if": {
"properties": {
"$": {
"const": "match"
}
}
},
"then": {
"required": [
"value",
"cases"
],
"additionalProperties": false,
"properties": {
"$": {},
"value": {
"$ref": "#/definitions/value"
},
"cases": {
"type": "array",
"items": {
"type": "object",
"required": [
"when",
"then"
],
"additionalProperties": false,
"properties": {
"when": {
"type": [
"string",
"number",
"boolean",
"null"
]
},
"then": {
"$ref": "#/definitions/value"
}
}
}
},
"else": {
"$ref": "#/definitions/value"
}
}
}
}
]
},
"condition": {
"type": "object",
"additionalProperties": false,
"anyOf": [
{
"required": [
"path"
]
},
{
"required": [
"value"
]
}
],
"properties": {
"path": {
"type": "string"
},
"value": {
"$ref": "#/definitions/value"
},
"equals": {
"type": [
"string",
"number",
"boolean",
"null"
]
},
"notEquals": {
"type": [
"string",
"number",
"boolean",
"null"
]
},
"oneOf": {
"type": "array",
"items": {
"type": [
"string",
"number",
"boolean",
"null"
]
}
},
"contains": {
"type": "string"
},
"not": {
"type": "boolean"
}
}
},
"motion": {
"type": "object",
"required": [
"name"
],
"additionalProperties": false,
"properties": {
"name": {
"anyOf": [
{
"enum": [
"schweben",
"pulsieren",
"wiegen",
"blinzeln"
]
},
{
"$ref": "#/definitions/value"
}
]
},
"duration": {
"$ref": "#/definitions/value"
},
"delay": {
"$ref": "#/definitions/value"
},
"iterations": {
"$ref": "#/definitions/value"
},
"when": {
"$ref": "#/definitions/condition"
}
}
},
"styleEntry": {
"type": "object",
"oneOf": [
{
"required": [
"prop",
"value"
],
"additionalProperties": false,
"properties": {
"prop": {
"type": "string",
"pattern": "^-{0,2}[a-zA-Z][a-zA-Z0-9-]*$"
},
"value": {
"$ref": "#/definitions/value"
},
"unit": {
"type": "string"
},
"when": {
"$ref": "#/definitions/condition"
}
}
},
{
"required": [
"chunk"
],
"additionalProperties": false,
"properties": {
"chunk": {
"$ref": "#/definitions/value"
},
"when": {
"$ref": "#/definitions/condition"
}
}
}
]
},
"attribute": {
"type": "object",
"required": [
"name",
"value"
],
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"pattern": "^(?![oO][nN])[a-zA-Z][a-zA-Z0-9-]*$"
},
"value": {
"$ref": "#/definitions/value"
},
"when": {
"$ref": "#/definitions/condition"
}
}
},
"node": {
"type": "object",
"required": [
"$"
],
"properties": {
"$": {
"enum": [
"el",
"text",
"if",
"each",
"partial",
"stack",
"anchor",
"use",
"slot"
]
}
},
"allOf": [
{
"if": {
"properties": {
"$": {
"const": "el"
}
}
},
"then": {
"required": [
"tag"
],
"additionalProperties": false,
"properties": {
"$": {},
"tag": {
"enum": [
"a",
"b",
"br",
"circle",
"div",
"ellipse",
"em",
"g",
"h1",
"h2",
"h3",
"h4",
"h5",
"h6",
"hr",
"i",
"img",
"li",
"line",
"ol",
"p",
"path",
"polygon",
"polyline",
"rect",
"s",
"section",
"small",
"span",
"strong",
"svg",
"table",
"tbody",
"td",
"tfoot",
"th",
"thead",
"tr",
"u",
"ul"
]
},
"attrs": {
"type": "array",
"items": {
"$ref": "#/definitions/attribute"
}
},
"style": {
"type": "array",
"items": {
"$ref": "#/definitions/styleEntry"
}
},
"children": {
"type": "array",
"items": {
"$ref": "#/definitions/node"
}
},
"selfClose": {
"type": "boolean"
},
"role": {
"enum": [
"headline",
"body",
"cta",
"legal",
"source",
"caption"
]
},
"motion": {
"$ref": "#/definitions/motion"
},
"when": {
"$ref": "#/definitions/condition"
}
}
}
},
{
"if": {
"properties": {
"$": {
"const": "stack"
}
}
},
"then": {
"required": [
"gap"
],
"additionalProperties": false,
"properties": {
"$": {},
"tag": {
"enum": [
"a",
"b",
"br",
"circle",
"div",
"ellipse",
"em",
"g",
"h1",
"h2",
"h3",
"h4",
"h5",
"h6",
"hr",
"i",
"img",
"li",
"line",
"ol",
"p",
"path",
"polygon",
"polyline",
"rect",
"s",
"section",
"small",
"span",
"strong",
"svg",
"table",
"tbody",
"td",
"tfoot",
"th",
"thead",
"tr",
"u",
"ul"
]
},
"direction": {
"enum": [
"column",
"row"
]
},
"gap": {
"$ref": "#/definitions/value"
},
"unit": {
"type": "string"
},
"align": {
"$ref": "#/definitions/value"
},
"justify": {
"$ref": "#/definitions/value"
},
"attrs": {
"type": "array",
"items": {
"$ref": "#/definitions/attribute"
}
},
"style": {
"type": "array",
"items": {
"$ref": "#/definitions/styleEntry"
}
},
"children": {
"type": "array",
"items": {
"$ref": "#/definitions/node"
}
},
"role": {
"enum": [
"headline",
"body",
"cta",
"legal",
"source",
"caption"
]
},
"motion": {
"$ref": "#/definitions/motion"
},
"when": {
"$ref": "#/definitions/condition"
}
}
}
},
{
"if": {
"properties": {
"$": {
"const": "anchor"
}
}
},
"then": {
"additionalProperties": false,
"properties": {
"$": {},
"tag": {
"enum": [
"a",
"b",
"br",
"circle",
"div",
"ellipse",
"em",
"g",
"h1",
"h2",
"h3",
"h4",
"h5",
"h6",
"hr",
"i",
"img",
"li",
"line",
"ol",
"p",
"path",
"polygon",
"polyline",
"rect",
"s",
"section",
"small",
"span",
"strong",
"svg",
"table",
"tbody",
"td",
"tfoot",
"th",
"thead",
"tr",
"u",
"ul"
]
},
"vertical": {
"anyOf": [
{
"enum": [
"top",
"bottom",
"center",
"stretch"
]
},
{
"$ref": "#/definitions/value"
}
]
},
"horizontal": {
"anyOf": [
{
"enum": [
"left",
"right",
"center",
"stretch"
]
},
{
"$ref": "#/definitions/value"
}
]
},
"offset": {
"$ref": "#/definitions/value"
},
"inset": {
"$ref": "#/definitions/value"
},
"basis": {
"enum": [
"px",
"width",
"height",
"min",
"axis"
]
},
"offsetBasis": {
"enum": [
"px",
"width",
"height",
"min",
"axis"
]
},
"insetBasis": {
"enum": [
"px",
"width",
"height",
"min",
"axis"
]
},
"unit": {
"type": "string"
},
"maxWidth": {
"$ref": "#/definitions/value"
},
"attrs": {
"type": "array",
"items": {
"$ref": "#/definitions/attribute"
}
},
"style": {
"type": "array",
"items": {
"$ref": "#/definitions/styleEntry"
}
},
"children": {
"type": "array",
"items": {
"$ref": "#/definitions/node"
}
},
"role": {
"enum": [
"headline",
"body",
"cta",
"legal",
"source",
"caption"
]
},
"motion": {
"$ref": "#/definitions/motion"
},
"when": {
"$ref": "#/definitions/condition"
}
}
}
},
{
"if": {
"properties": {
"$": {
"const": "text"
}
}
},
"then": {
"required": [
"value"
],
"additionalProperties": false,
"properties": {
"$": {},
"value": {
"$ref": "#/definitions/value"
},
"role": {
"enum": [
"headline",
"body",
"cta",
"legal",
"source",
"caption"
]
},
"when": {
"$ref": "#/definitions/condition"
}
}
}
},
{
"if": {
"properties": {
"$": {
"const": "if"
}
}
},
"then": {
"required": [
"when",
"then"
],
"additionalProperties": false,
"properties": {
"$": {},
"when": {
"$ref": "#/definitions/condition"
},
"then": {
"type": "array",
"items": {
"$ref": "#/definitions/node"
}
},
"else": {
"type": "array",
"items": {
"$ref": "#/definitions/node"
}
}
}
}
},
{
"if": {
"properties": {
"$": {
"const": "each"
}
}
},
"then": {
"required": [
"as",
"children"
],
"additionalProperties": false,
"anyOf": [
{
"required": [
"path"
]
},
{
"required": [
"value"
]
}
],
"properties": {
"$": {},
"path": {
"type": "string"
},
"value": {
"$ref": "#/definitions/value"
},
"as": {
"type": "string",
"minLength": 1
},
"index": {
"type": "string",
"minLength": 1
},
"children": {
"type": "array",
"items": {
"$ref": "#/definitions/node"
}
},
"when": {
"$ref": "#/definitions/condition"
}
}
}
},
{
"if": {
"properties": {
"$": {
"const": "use"
}
}
},
"then": {
"required": [
"stencil"
],
"additionalProperties": false,
"properties": {
"$": {},
"stencil": {
"enum": [
"bau.karussell",
"rzk.rahmen",
"rzc.rahmen"
]
},
"state": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/value"
}
},
"slots": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"$ref": "#/definitions/node"
}
}
},
"when": {
"$ref": "#/definitions/condition"
}
}
}
},
{
"if": {
"properties": {
"$": {
"const": "slot"
}
}
},
"then": {
"required": [
"name"
],
"additionalProperties": false,
"properties": {
"$": {},
"name": {
"type": "string",
"minLength": 1
},
"children": {
"type": "array",
"items": {
"$ref": "#/definitions/node"
}
},
"when": {
"$ref": "#/definitions/condition"
}
}
}
},
{
"if": {
"properties": {
"$": {
"const": "partial"
}
}
},
"then": {
"required": [
"name"
],
"additionalProperties": false,
"properties": {
"$": {},
"name": {
"enum": [
"photoL",
"darkL",
"markL",
"fmtL",
"sig",
"btn",
"toplineEl",
"markHL",
"stickerEl",
"kopfHTML"
]
},
"args": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/value"
}
},
"when": {
"$ref": "#/definitions/condition"
}
}
}
}
]
},
"layerEntry": {
"oneOf": [
{
"type": "object",
"required": [
"layer",
"children"
],
"additionalProperties": false,
"properties": {
"layer": {
"enum": [
"chrome",
"content",
"sticker"
]
},
"children": {
"type": "array",
"items": {
"$ref": "#/definitions/node"
}
}
}
},
{
"type": "object",
"required": [
"$",
"partial"
],
"additionalProperties": false,
"properties": {
"$": {
"const": "layers"
},
"partial": {
"enum": [
"chrome"
]
},
"args": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/value"
}
}
}
}
]
}
}
}Die Grammatik als Daten (was im Manifest reist)
{
"stencilVersion": 1,
"maxDepth": 40,
"nodeKinds": [
"anchor",
"each",
"el",
"if",
"partial",
"slot",
"stack",
"text",
"use"
],
"valueKinds": [
"call",
"cond",
"const",
"ctx",
"item",
"match",
"state",
"var"
],
"conditionKeys": [
"contains",
"equals",
"not",
"notEquals",
"oneOf",
"path",
"value"
],
"stackDirections": [
"column",
"row"
],
"roles": [
"body",
"caption",
"cta",
"headline",
"legal",
"source"
],
"anchorEdges": [
"bottom",
"center",
"stretch",
"top"
],
"anchorSides": [
"center",
"left",
"right",
"stretch"
],
"anchorBases": [
"axis",
"height",
"min",
"px",
"width"
],
"maxEmbedDepth": 8,
"embeddable": {
"bau.karussell": [
"body"
],
"rzc.rahmen": [
"body",
"hinter"
],
"rzk.rahmen": [
"body",
"hinter"
]
},
"motions": [
"blinzeln",
"pulsieren",
"schweben",
"wiegen"
],
"motionDelivery": "css",
"motionMaxDurationMs": 600000,
"motionMaxIterations": 10000,
"contextPaths": [
"brand",
"format",
"height",
"motion",
"page",
"pages",
"t",
"width"
],
"layers": [
"chrome",
"content",
"sticker"
],
"tags": [
"a",
"b",
"br",
"circle",
"div",
"ellipse",
"em",
"g",
"h1",
"h2",
"h3",
"h4",
"h5",
"h6",
"hr",
"i",
"img",
"li",
"line",
"ol",
"p",
"path",
"polygon",
"polyline",
"rect",
"s",
"section",
"small",
"span",
"strong",
"svg",
"table",
"tbody",
"td",
"tfoot",
"th",
"thead",
"tr",
"u",
"ul"
],
"voidTags": [
"br",
"hr",
"img"
],
"urlAttributes": [
"href",
"poster",
"src",
"srcset"
],
"blockedAttributes": [
"action",
"background",
"dynsrc",
"formaction",
"lowsrc",
"srcdoc",
"style"
],
"blockedStyleProperties": [
"-moz-binding",
"-ms-behavior",
"behavior"
],
"urlSchemes": [
"blob",
"http",
"https"
],
"helpers": {
"abs": [
"value"
],
"add": [
"a",
"b"
],
"after": [
"search",
"value"
],
"and": [
"values"
],
"at": [
"index",
"values"
],
"before": [
"search",
"value"
],
"cardShadow": [],
"ceil": [
"value"
],
"coalesce": [
"otherwise",
"value"
],
"concat": [
"values"
],
"contains": [
"search",
"value"
],
"darkCss": [],
"div": [
"a",
"b"
],
"eq": [
"a",
"b"
],
"fallback": [
"otherwise",
"value"
],
"floor": [
"value"
],
"get": [
"path",
"value"
],
"gt": [
"a",
"b"
],
"gte": [
"a",
"b"
],
"headFontCss": [
"font"
],
"int": [
"value"
],
"isPhoto": [],
"join": [
"separator",
"values"
],
"length": [
"value"
],
"logoColor": [],
"lower": [
"value"
],
"lt": [
"a",
"b"
],
"lte": [
"a",
"b"
],
"max": [
"a",
"b"
],
"min": [
"a",
"b"
],
"mod": [
"a",
"b"
],
"mul": [
"a",
"b"
],
"not": [
"value"
],
"number": [
"value"
],
"or": [
"values"
],
"range": [
"count"
],
"round": [
"value"
],
"split": [
"separator",
"value"
],
"splitTrim": [
"separators",
"value"
],
"startsWith": [
"search",
"value"
],
"string": [
"value"
],
"sub": [
"a",
"b"
],
"textColor": [],
"trim": [
"value"
],
"upper": [
"value"
]
},
"partials": {
"btn": [
"size",
"text",
"variant"
],
"darkL": [],
"fmtL": [
"color"
],
"kopfHTML": [
"color",
"subColor"
],
"markHL": [
"text"
],
"markL": [
"color"
],
"photoL": [],
"sig": [
"color"
],
"stickerEl": [
"bgColor",
"color",
"rot",
"text",
"textColor",
"type",
"width",
"x",
"y"
],
"toplineEl": [
"color",
"text"
]
},
"layerPartials": {
"chrome": []
},
"helperArgValues": {
"headFontCss": {
"font": [
"caps",
"mynerve",
"sans",
"wulkan",
"wulkan-italic"
]
}
},
"partialArgValues": {
"btn": {
"variant": [
"primary",
"secondary",
"tertiary"
]
},
"stickerEl": {
"type": [
"tag",
"washi"
]
}
},
"layerPartialArgValues": {}
}