{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/twee-ts/latest.json",
  "title": "twee-ts Configuration",
  "description": "Configuration file for twee-ts, a TypeScript Twee-to-HTML compiler.",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/twee-ts.config.json",
    "sourceSha256": "30321ae55a8fa8962aac8e5d372d5ca312f24ca0d59b793a1452684ab70bfa02",
    "fileMatch": [
      "twee-ts.config.json"
    ],
    "parsers": [
      "json"
    ]
  },
  "type": "object",
  "properties": {
    "$schema": {
      "type": "string",
      "description": "JSON Schema reference for editor support."
    },
    "sources": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Files or directories to compile."
    },
    "output": {
      "type": "string",
      "description": "Output file path."
    },
    "outputMode": {
      "type": "string",
      "enum": [
        "html",
        "twee3",
        "twee1",
        "twine2-archive",
        "twine1-archive",
        "json"
      ],
      "default": "html",
      "description": "Output mode."
    },
    "formatId": {
      "type": "string",
      "description": "Story format directory ID (e.g. 'sugarcube-2')."
    },
    "startPassage": {
      "type": "string",
      "description": "Name of the starting passage.",
      "default": "Start"
    },
    "formatPaths": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Extra directories to search for story formats."
    },
    "formatIndices": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "URLs to SFA-compatible index.json files for remote format lookup."
    },
    "formatUrls": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Direct URLs to format.js files."
    },
    "useTweegoPath": {
      "type": "boolean",
      "default": true,
      "description": "Also search TWEEGO_PATH env for formats."
    },
    "modules": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Module files to inject into <head>."
    },
    "headFile": {
      "type": "string",
      "description": "Raw HTML file to append to <head>."
    },
    "trim": {
      "type": "boolean",
      "default": true,
      "description": "Trim passage whitespace."
    },
    "twee2Compat": {
      "type": "boolean",
      "default": false,
      "description": "Twee2 compatibility mode."
    },
    "testMode": {
      "type": "boolean",
      "default": false,
      "description": "Enable debug/test mode option."
    },
    "noRemote": {
      "type": "boolean",
      "default": false,
      "description": "Disable remote format fetching."
    },
    "tagAliases": {
      "type": "object",
      "description": "Map alias tags to canonical special tags (e.g. { \"library\": \"script\" }).",
      "additionalProperties": {
        "type": "string"
      }
    },
    "sourceInfo": {
      "type": "boolean",
      "default": false,
      "description": "Emit source file and line as data- attributes on passage elements."
    },
    "wordCountMethod": {
      "type": "string",
      "enum": [
        "tweego",
        "whitespace"
      ],
      "default": "tweego",
      "description": "Word counting method. 'tweego': NFKD normalize, divide chars by 5 (matches Tweego). 'whitespace': split on whitespace after stripping comments and markup."
    }
  },
  "additionalProperties": false
}
