{
  "$schema": "https://etalii.net/adp/fbl/schema/0.1/fbl.schema.json#/$defs/Document",
  "fbl": "0.1",
  "doc": "The timeline's .tml body (definitions/diagrams/timeline.dis, timeline.md): ADP's own YAML, owned outright by the timeline. The simplest complete binding, and the one the timeline specification would name as persistence.binding.",
  "bindings": {
    "timeline": {
      "title": "Timeline Markup Language",
      "claims": {
        "extensions": [".tml"],
        "origins": ["generic/timeline"]
      },
      "body": { "kind": "file", "family": "yaml" },
      "reader": "declared",
      "text": { "newline": "crlf", "indent": 2, "sequenceIndent": "indented", "finalNewline": true, "quote": "double" },
      "header": { "key": "timeline", "value": 1 },
      "elements": [
        {
          "name": "period",
          "type": "Period",
          "at": "/elements/*",
          "when": "has(entry.end)",
          "id": { "from": { "key": "id" } },
          "attributes": {
            "label": { "key": "label", "empty": "keep" },
            "begin": { "key": "begin", "time": "keep-precision" },
            "end": { "key": "end", "time": "keep-precision", "empty": "remove" },
            "row": { "key": "row", "default": 0 }
          },
          "insert": { "place": "after-last", "container": "/elements", "keys": ["id", "label", "begin", "end", "row"] },
          "remove": { "cascade": ["connection"] }
        },
        {
          "name": "moment",
          "type": "Moment",
          "at": "/elements/*",
          "when": "!has(entry.end)",
          "id": { "from": { "key": "id" } },
          "attributes": {
            "label": { "key": "label", "empty": "keep" },
            "begin": { "key": "begin", "time": "keep-precision" },
            "row": { "key": "row", "default": 0 }
          },
          "insert": { "place": "after-last", "container": "/elements", "keys": ["id", "label", "begin", "row"] },
          "remove": { "cascade": ["connection"] }
        }
      ],
      "relations": [
        {
          "name": "connection",
          "type": "Connection",
          "at": "/connections/*",
          "id": { "from": { "key": "id" } },
          "source": { "key": "from" },
          "target": { "key": "to" },
          "attributes": {
            "label": { "key": "label", "empty": "remove" }
          },
          "insert": {
            "place": "after-last",
            "container": "/connections",
            "create": { "at": "end-of-document" },
            "keys": ["id", "from", "to", "label"]
          },
          "remove": { "container": "keep" }
        }
      ],
      "registration": { "createOnFirstPlacement": false },
      "template": { "text": "timeline: 1\r\nelements: []\r\n" }
    }
  }
}
