OPF

Search docs

Loading documentation…
    OpenPresentation/opf
    Browse docs
    On this page
    View source

    Icon Set

    Schema for icon-set records: one set of icons that share a viewBox and a style, each icon as SVG path data. An OPF icon names one as <set>:<name> (docs/icons.md). @openpresentation/gallery ships Lucide and Tabler outline, generated from their npm packages; a host registers them as galleryIconSets() of @openpresentation/gallery/icon-sets and loads only the icons a deck uses, and a document embeds only the icons it uses under catalogs.<group>.iconSets.<id> (a record without $schema, id, licenseText or tags).

    Schema $id
    https://openpresentation.org/schema/opf-icon-set/v1
    Type
    object
    Source
    spec/schemas/icon-set.schema.json
    Fields
    18 · 8 required

    Field index

    FieldTypeReq.DefaultDescription
    $schemaconstyes—Identifies this record as an icon set.
    $schema · Allowed values
    "https://openpresentation.org/schema/opf-icon-set/v1"
    idrestrictionyes—The set's id, the part of an icon reference before the colon. asset is not a set id: asset:<id> is an asset reference.
    namestringyes—Human-readable set name shown in pickers.
    summarystring——One line on what the set looks like.
    versionstring——The version of the source the icons were taken from, such as the npm package version.
    packagestring——The npm package the icons were generated from.
    homepagestring——Where the set is published.
    licensestringyes—The SPDX license id of the icons.
    copyrightstringyes—The copyright notice the license asks every copy to keep.
    licenseTextstring——The full license text, as the source package ships it.
    viewBoxarrayyes—The one viewBox every icon of the set is drawn in: min-x, min-y, width, height.
    styleenumyes—How a string icon draws: stroke strokes its path at strokeWidth with no fill, fill fills it (nonzero rule).
    style · Allowed values
    "stroke""fill"
    strokeWidthnumber——The stroke width in viewBox units (stroke sets). Default 2.
    strokeLinecapenum——The stroke's line caps. Default round.
    strokeLinecap · Allowed values
    "butt""round""square"
    strokeLinejoinenum——The stroke's line joins. Default round.
    strokeLinejoin · Allowed values
    "miter""round""bevel"
    iconsobjectyes—The icons by name. A string is the icon's path data, drawn as style says; an object separates the parts a stroke set strokes (stroke) from those it fills (fill). Every icon is one color: the engines draw it in the accent.
    renamedobject——Former icon names by current name, from the source package's aliases. Only a finding and an icon search read it; an old name is never an icon.
    tagsobject——Search keywords by icon name, from the source package: what an icon search (the MCP's search_icons, pptx.gallery) matches besides the name.

    $schema

    typeconstrequiredyesdefault—

    Identifies this record as an icon set.

    $schema · Allowed values
    "https://openpresentation.org/schema/opf-icon-set/v1"
    $schema.json
    {
      "$schema": "https://openpresentation.org/schema/opf-icon-set/v1"
    }

    id

    typerestrictionrequiredyesdefault—pattern^[a-z][a-z0-9-]*$

    The set's id, the part of an icon reference before the colon. asset is not a set id: asset:<id> is an asset reference.

    id.json
    {
      "id": "lucide"
    }

    name

    typestringrequiredyesdefault—

    Human-readable set name shown in pickers.

    name.json
    {
      "name": "Lucide"
    }

    summary

    typestringrequirednodefault—

    One line on what the set looks like.

    version

    typestringrequirednodefault—

    The version of the source the icons were taken from, such as the npm package version.

    version.json
    {
      "version": "1.68.0"
    }

    package

    typestringrequirednodefault—

    The npm package the icons were generated from.

    package.json
    {
      "package": "lucide-static"
    }

    homepage

    typestringrequirednodefault—

    Where the set is published.

    license

    typestringrequiredyesdefault—

    The SPDX license id of the icons.

    license.json
    {
      "license": "ISC"
    }

    licenseText

    typestringrequirednodefault—

    The full license text, as the source package ships it.

    viewBox

    typearrayrequiredyesdefault—

    The one viewBox every icon of the set is drawn in: min-x, min-y, width, height.

    viewBox.json
    {
      "viewBox": [
        0,
        0,
        24,
        24
      ]
    }

    style

    typeenumrequiredyesdefault—

    How a string icon draws: stroke strokes its path at strokeWidth with no fill, fill fills it (nonzero rule).

    style · Allowed values
    "stroke""fill"
    style.json
    {
      "style": "stroke"
    }

    strokeWidth

    typenumberrequirednodefault—

    The stroke width in viewBox units (stroke sets). Default 2.

    strokeLinecap

    typeenumrequirednodefault—

    The stroke's line caps. Default round.

    strokeLinecap · Allowed values
    "butt""round""square"
    strokeLinecap.json
    {
      "strokeLinecap": "butt"
    }

    strokeLinejoin

    typeenumrequirednodefault—

    The stroke's line joins. Default round.

    strokeLinejoin · Allowed values
    "miter""round""bevel"
    strokeLinejoin.json
    {
      "strokeLinejoin": "miter"
    }

    icons

    typeobjectrequiredyesdefault—

    The icons by name. A string is the icon's path data, drawn as style says; an object separates the parts a stroke set strokes (stroke) from those it fills (fill). Every icon is one color: the engines draw it in the accent.

    renamed

    typeobjectrequirednodefault—

    Former icon names by current name, from the source package's aliases. Only a finding and an icon search read it; an old name is never an icon.

    tags

    typeobjectrequirednodefault—

    Search keywords by icon name, from the source package: what an icon search (the MCP's search_icons, pptx.gallery) matches besides the name.

    Complete definition constraints
    Schema constraints
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "$id": "https://openpresentation.org/schema/opf-icon-set/v1",
      "$comment": "The v1 in the $id is the pre-1.0 line, not a frozen contract: this schema may change in any 0.x minor release. The release that produced this copy is the version of the @openpresentation/opf package it came from (opf --version; opf schemas lists it next to each id). See docs/schema-versioning.md.",
      "title": "Icon Set",
      "description": "Schema for icon-set records: one set of icons that share a viewBox and a style, each icon as SVG path data. An OPF `icon` names one as `<set>:<name>` (docs/icons.md). @openpresentation/gallery ships Lucide and Tabler outline, generated from their npm packages; a host registers them as `galleryIconSets()` of `@openpresentation/gallery/icon-sets` and loads only the icons a deck uses, and a document embeds only the icons it uses under `catalogs.<group>.iconSets.<id>` (a record without `$schema`, `id`, `licenseText` or `tags`).",
      "type": "object",
      "required": [
        "$schema",
        "id",
        "name",
        "license",
        "copyright",
        "viewBox",
        "style",
        "icons"
      ],
      "additionalProperties": false,
      "patternProperties": {
        "^x-": {
          "description": "Publisher extension member, ignored by engines and stripped when a record is embedded."
        }
      },
      "properties": {
        "$schema": {
          "type": "string",
          "const": "https://openpresentation.org/schema/opf-icon-set/v1",
          "description": "Identifies this record as an icon set."
        },
        "id": {
          "type": "string",
          "pattern": "^[a-z][a-z0-9-]*$",
          "description": "The set's id, the part of an icon reference before the colon. `asset` is not a set id: `asset:<id>` is an asset reference.",
          "not": {
            "const": "asset"
          },
          "examples": [
            "lucide",
            "tabler"
          ]
        },
        "name": {
          "type": "string",
          "description": "Human-readable set name shown in pickers.",
          "examples": [
            "Lucide",
            "Tabler outline"
          ]
        },
        "summary": {
          "type": "string",
          "description": "One line on what the set looks like."
        },
        "version": {
          "type": "string",
          "description": "The version of the source the icons were taken from, such as the npm package version.",
          "examples": [
            "1.68.0"
          ]
        },
        "package": {
          "type": "string",
          "description": "The npm package the icons were generated from.",
          "examples": [
            "lucide-static",
            "@tabler/icons"
          ]
        },
        "homepage": {
          "type": "string",
          "format": "uri",
          "description": "Where the set is published."
        },
        "license": {
          "type": "string",
          "description": "The SPDX license id of the icons.",
          "examples": [
            "ISC",
            "MIT"
          ]
        },
        "copyright": {
          "type": "string",
          "description": "The copyright notice the license asks every copy to keep."
        },
        "licenseText": {
          "type": "string",
          "description": "The full license text, as the source package ships it."
        },
        "viewBox": {
          "type": "array",
          "description": "The one viewBox every icon of the set is drawn in: min-x, min-y, width, height.",
          "prefixItems": [
            {
              "type": "number"
            },
            {
              "type": "number"
            },
            {
              "type": "number",
              "exclusiveMinimum": 0
            },
            {
              "type": "number",
              "exclusiveMinimum": 0
            }
          ],
          "items": false,
          "minItems": 4,
          "examples": [
            [
              0,
              0,
              24,
              24
            ]
          ]
        },
        "style": {
          "type": "string",
          "enum": [
            "stroke",
            "fill"
          ],
          "description": "How a string icon draws: `stroke` strokes its path at `strokeWidth` with no fill, `fill` fills it (nonzero rule)."
        },
        "strokeWidth": {
          "type": "number",
          "exclusiveMinimum": 0,
          "description": "The stroke width in viewBox units (stroke sets). Default 2."
        },
        "strokeLinecap": {
          "type": "string",
          "enum": [
            "butt",
            "round",
            "square"
          ],
          "description": "The stroke's line caps. Default round."
        },
        "strokeLinejoin": {
          "type": "string",
          "enum": [
            "miter",
            "round",
            "bevel"
          ],
          "description": "The stroke's line joins. Default round."
        },
        "icons": {
          "type": "object",
          "description": "The icons by name. A string is the icon's path data, drawn as `style` says; an object separates the parts a stroke set strokes (`stroke`) from those it fills (`fill`). Every icon is one color: the engines draw it in the accent.",
          "propertyNames": {
            "pattern": "^[a-z0-9][a-z0-9-]*$"
          },
          "additionalProperties": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "object",
                "additionalProperties": false,
                "minProperties": 1,
                "properties": {
                  "stroke": {
                    "type": "string",
                    "minLength": 1
                  },
                  "fill": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            ]
          }
        },
        "renamed": {
          "type": "object",
          "description": "Former icon names by current name, from the source package's aliases. Only a finding and an icon search read it; an old name is never an icon.",
          "additionalProperties": {
            "type": "string",
            "pattern": "^[a-z0-9][a-z0-9-]*$"
          }
        },
        "tags": {
          "type": "object",
          "description": "Search keywords by icon name, from the source package: what an icon search (the MCP's search_icons, pptx.gallery) matches besides the name.",
          "additionalProperties": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      }
    }