Specifically perspective SVGs, not finding that subclass in the docs/appendix
Here's the schema JSON (this should live somewhere in a Perspective jar as a resource file; I'm not giving you anything special here):
Schema
{
"id": "ia.shapes.svg",
"palette": {
"category": "display",
"name": "Drawing",
"description": "A vector drawing, symbol, schematic, or diagram that uses SVG format"
},
"defaultMetaName": "Drawing",
"showOnPalette": false,
"schema": {
"definitions": {
"Element": {
"type": "object",
"properties": {
"type": {
"type": "string",
"suggestions": [
"circle",
"clipPath",
"defs",
"ellipse",
"group",
"line",
"linearGradient",
"mask",
"pattern",
"path",
"polygon",
"polyline",
"radialGradient",
"rect",
"text",
"textPath",
"tspan",
"use"
]
},
"fill": {
"type": ["string", "object"],
"properties": {
"opacity": {
"type": ["string" , "number"]
},
"paint": {
"type": ["string", "object"],
"format": "color"
},
"rule": {
"type": "string",
"enum": [
"nonzero",
"evenodd",
"inherit"
]
},
"url": {
"type": "string"
}
}
},
"stroke": {
"type": ["string", "object"],
"properties": {
"dasharray": {
"type": "string"
},
"dashoffset": {
"type": "string"
},
"linecap": {
"type": "string",
"enum": [
"butt",
"round",
"square",
"inherit"
]
},
"linejoin": {
"type": "string",
"enum": [
"miter",
"round",
"bevel",
"inherit"
]
},
"miterlimit": {
"type": "string"
},
"opacity": {
"type": ["string" , "number"]
},
"paint": {
"type": ["string", "object"],
"format": "color"
},
"url": {
"type": "string"
},
"width": {
"type": ["string", "number"]
}
}
},
"clipPath": {
"type": "string"
},
"clipRule": {
"type": "string",
"enum": [
"nonzero",
"evenodd",
"inherit"
]
},
"id": {
"description": "A DOM id that will be automatically prepended with prefix to prevent collisions with other DOM ids.",
"type": "string"
},
"mask": {
"type": "string"
},
"opacity": {
"description": "How transparent an element and its children are.",
"type": [ "number", "string"]
},
"overflow": {
"description": "Sets what to do when an element's content is too big to fit in its block formatting context. Browser support varies.",
"type": "string",
"enum": [
"visible",
"hidden",
"scroll",
"auto"
]
},
"pathLength": {
"description": "Advanced SVG attribute representing the total length for the path, in user units.",
"type": [ "number", "string"]
},
"transform": {
"description": "A string of SVG transform definitions that are applied to an element and the element's children.",
"type": "string"
},
"visibility": {
"type": "string",
"enum": [
"visible",
"hidden",
"collapse"
]
},
"style": {
"$ref": "urn:ignition-schema:schemas/style-properties.schema.json"
},
"elements": {
"type": "array",
"items": {
"$ref": "#/definitions/Element"
}
}
},
"default": {
"type": "group"
},
"required": [
"type"
]
}
},
"type": "object",
"properties": {
"viewBox": {
"type": "string",
"default": ""
},
"preserveAspectRatio": {
"type": "string",
"default": "xMidYMid",
"enum": [
"none",
"xMinYMin",
"xMidYMin",
"xMaxYMin",
"xMinYMid",
"xMidYMid",
"xMaxYMid",
"xMinYMax",
"xMidYMax",
"xMaxYMax"
]
},
"elements": {
"type": "array",
"items": {
"$ref": "#/definitions/Element"
},
"default": []
},
"style": {
"$ref": "urn:ignition-schema:schemas/style-properties.schema.json"
}
}
},
"resources": [
{
"name": "perspective-components-css",
"path": "/res/perspective/css/PerspectiveComponents.css",
"type": "css"
},
{
"name": "perspective-components-js",
"path": "/res/perspective/js/PerspectiveComponents.js",
"type": "js"
}
]
}
tyvm!
Any chance of getting this added to the appendix components on the docs site?
Probably not in the docs team's interest. I'd like to see us publish these schemas automatically like our Javadocs, if anything, as an "offsite" reference, but probably not embedded inline in the manual.
5 Likes