{"$schema":"http://json-schema.org/schema#","$id":"http://btw.mangalam-research.org/schemas/wed/wed-options.json","title":"Wed Options","description":"A schema describing the wed options that modes may set.","definitions":{"simpleAttributesSpec":{"type":"object","properties":{"handling":{"description":"Determines how attributes are handled.","type":"string","enum":["hide"]}},"required":["handling"],"additionalProperties":false},"complexAttributesSpec":{"type":"object","properties":{"handling":{"description":"Determines how attributes are handled. The values are the same as described above with the exception that \"hide\" is not valid here.","type":"string","enum":["show","edit"]},"autohide":{"description":"Describes attributes that may be autohidden. If absent then no attributes are autohidden.","type":"object","properties":{"method":{"description":"The method by which attributes are described.","type":"string","enum":["selector"]},"elements":{"description":"Elements which have autohide enabled.","type":"array","items":{"type":"object","properties":{"selector":{"description":"CSS selector matching one or more elements. This selector must use the prefixes defined by the mode\\'s metadata. This selector is subject to limitations explained in ``domutil.toGUISelector``. The hiding algorithm ceases searching for matches as soon as one selector matches.","type":"string"},"attributes":{"description":"Specifies the attributes to hide. The array is executed in order when matching attributes. Later elements in the array override earlier elements.","type":"array","items":{"oneOf":[{"description":"Local name (optionally prefixed) of the attributes to hide. The specisl special name \"*\" means \"match all attributes\".","type":"string"},{"description":"An exclusion from the attributes to hide.","type":"object","properties":{"except":{"description":"The list of attributes to exclude.","type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["except"]}]}}},"additionalProperties":false,"required":["selector","attributes"]}}},"additionalProperties":false,"required":["method","elements"]}},"additionalProperties":false,"required":["handling"]}},"type":"object","properties":{"metadata":{"description":"Information describing the mode.","type":"object","properties":{"name":{"description":"The mode's name.","type":"string"},"authors":{"description":"The authors of the mode.","type":"array","items":{"type":"string"}},"description":{"description":"The description of the mode.","type":"string"},"license":{"description":"The licence under which the mode is distributed.","type":"string"},"copyright":{"description":"Copyright information (holders, dates, etc.)","type":"string"}},"additionalProperties":false,"required":["name","authors","description","license","copyright"]},"label_levels":{"description":"Options regarding the levels labels may take.","type":"object","properties":{"max":{"description":"The maximum label level that the mode uses.","type":"integer","minimum":1},"initial":{"description":"The initial label level to start. It must be less or equal to \"max\".","type":"integer","minimum":1}},"additionalProperties":false,"required":["max","initial"]},"attributes":{"description":"Options regarding how attributes are handled. If it is a string then it must be \"hide\", \"show\" or \"edit\".  The value \"hide\" means hide all attributes and do not allow direct editing. The value \"show\" means show the attributes but do not allow direct editing. The value \"edit\" means show attributes and allow direct editing of attributes. By \"direct editing\" we mean editing of attributes as attributes. Note that indirect editing of attributes is always allowed. A mode could bring up a modal didalog to perform an action that modifies attributes behind the scenes no matter what the option here says.\nAlso note that a mode may prevent editing of attributes on a case-by-case basis by not returning actions that edit attribute values. The setting here operates coarsely.\nThe value may be an object in order to use more features.","oneOf":[{"type":"string","enum":["hide","show","edit"]},{"$ref":"#/definitions/simpleAttributesSpec"},{"$ref":"#/definitions/complexAttributesSpec"}]}},"additionalProperties":false,"required":["metadata","label_levels"]}