net.anisota.observatory.layout

A saved Observatory grid layout. Each record is a complete, self-contained snapshot of a layout — built-in button configuration, the row geometry, the flattened tile order, and embedded element snapshots — so it can be shared by URL and saved ('learned') into another user's PDS without depending on the original author's element records, mirroring the spell architecture. Tile references are 'builtin:<key>' for built-in tiles or 'element:<index>' pointing into the embedded elements array. layout.rows is the authority for geometry; layout.tileOrder is the flattened reading order of the same tiles, kept in sync so clients that predate the row model still render the layout. An optional schedule makes the layout activate automatically during a daily time window.

Repository @anisota.net did:plc:lcieujcfkv4jx7gehsvok3pr not from the namespace authority
Details · record, key any
Kindrecord
Record keyany
Authorityobservatory.anisota.net
Commit rev3n2tvobnom626
Indexed

Showing version bafyreigwc4dcau5aljbpqfh3behov57lpq4e2yd3sy3qjetpj76dfjlvxy. Show the latest

cid bafyreigwc4dcau5aljbpqfh3behov57lpq4e2yd3sy3qjetpj76dfjlvxy

Checks

Valid
  • unlimited-string defs.source.properties.typeNo maxLength, maxGraphemes or format limits this string.
JSONDownload
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "createdBy": {
      "description": "Attribution for the original crafter of this layout.",
      "properties": {
        "did": {
          "format": "did",
          "type": "string"
        },
        "handle": {
          "format": "handle",
          "type": "string"
        }
      },
      "type": "object"
    },
    "layout": {
      "description": "The grid configuration captured by this layout.",
      "properties": {
        "buttons": {
          "description": "Built-in button overrides keyed by button key (enter, atmosphere, post, chronicle, harvest, tutorial). Each value may carry enabled, order, size, and variant. A stored inventory key, from the retired inventory button, is kept as written.",
          "type": "unknown"
        },
        "patternsIndicator": {
          "description": "Patterns visualization configuration captured with this layout",
          "type": "unknown"
        },
        "rows": {
          "description": "Row-based layout. Each row sits on a shared six-column track; tile spans are derived from the row's tile count and balance and always sum to 6. Rows are the authority for geometry; tileOrder is the flattened reading order of the same tiles, kept in sync so clients that predate the row model still render the layout. When rows is absent, or disagrees with tileOrder, a client re-derives rows from tileOrder. No maxLength: every row holds at least one tile, so rows.length can never exceed tileOrder.length, which is itself uncapped — a cap here and not there would make a legal tileOrder unrepresentable.",
          "items": {
            "ref": "#row",
            "type": "ref"
          },
          "type": "array"
        },
        "shuffleLayout": {
          "description": "Whether tiles shuffle within divider-bounded groups each session. Retained for compatibility with clients that still shuffle; a client using the row model preserves the stored value on write but does not act on it, because rows describe a stable layout.",
          "type": "boolean"
        },
        "tileOrder": {
          "description": "The flattened projection of rows: rows in order, tiles in order within each row. Entries are 'builtin:<key>' or 'element:<index>' into the record's elements array. rows is the geometry authority and this field is the compatibility flattening kept for clients that predate the row model — a reader that understands rows uses it only to reconcile (dropping tokens no row claims, appending tokens no row carries).",
          "items": {
            "maxLength": 64,
            "type": "string"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "main": {
      "description": "A saved Observatory grid layout. Each record is a complete, self-contained snapshot of a layout — built-in button configuration, the row geometry, the flattened tile order, and embedded element snapshots — so it can be shared by URL and saved ('learned') into another user's PDS without depending on the original author's element records, mirroring the spell architecture. Tile references are 'builtin:<key>' for built-in tiles or 'element:<index>' pointing into the embedded elements array. layout.rows is the authority for geometry; layout.tileOrder is the flattened reading order of the same tiles, kept in sync so clients that predate the row model still render the layout. An optional schedule makes the layout activate automatically during a daily time window.",
      "key": "any",
      "record": {
        "properties": {
          "createdAt": {
            "description": "When this layout was first saved",
            "format": "datetime",
            "type": "string"
          },
          "createdBy": {
            "ref": "#createdBy",
            "type": "ref"
          },
          "description": {
            "description": "Optional description of what this layout is for",
            "maxLength": 500,
            "type": "string"
          },
          "elements": {
            "description": "Embedded snapshots of the custom elements this layout uses. Each entry mirrors the shape of a net.anisota.observatory.element record body (type, name, description, plus the type-specific payload: button, note, quote, reminder, divider, spacer, heading, or widget).",
            "items": {
              "type": "unknown"
            },
            "type": "array"
          },
          "layout": {
            "ref": "#layout",
            "type": "ref"
          },
          "name": {
            "description": "Display name for this layout",
            "maxLength": 80,
            "type": "string"
          },
          "schedule": {
            "ref": "#schedule",
            "type": "ref"
          },
          "source": {
            "ref": "#source",
            "type": "ref"
          },
          "updatedAt": {
            "description": "When this layout was last modified",
            "format": "datetime",
            "type": "string"
          }
        },
        "required": [
          "name",
          "createdAt",
          "updatedAt"
        ],
        "type": "object"
      },
      "type": "record"
    },
    "row": {
      "description": "One row of the Observatory grid. 'tiles' rows hold 1-3 tiles across the six-column track. 'ledger' rows render their tiles as hairline lines (label left, meta right) and absorb the long tail. 'structure' rows hold exactly one divider, heading or empty-space element and act as a boundary between rows. Entries in the tiles array use the same token vocabulary as tileOrder: 'builtin:<key>' or 'element:<index>'. kind, band and balance use knownValues and are therefore open: a reader that does not recognise a value clamps it for that session only and must not rewrite the stored value.",
      "properties": {
        "balance": {
          "description": "How a two-tile row divides the track: even 3:3, left 4:2, right 2:4. Meaningless (and canonically 'even') for any other tile count.",
          "knownValues": [
            "even",
            "left",
            "right"
          ],
          "maxLength": 32,
          "type": "string"
        },
        "band": {
          "description": "The one height every tile in this row takes. Ignored by ledger rows, and by structure rows whose tile is a divider or heading.",
          "knownValues": [
            "compact",
            "standard",
            "tall",
            "panel"
          ],
          "maxLength": 32,
          "type": "string"
        },
        "kind": {
          "knownValues": [
            "tiles",
            "ledger",
            "structure"
          ],
          "maxLength": 32,
          "type": "string"
        },
        "tiles": {
          "items": {
            "maxLength": 64,
            "type": "string"
          },
          "maxLength": 12,
          "type": "array"
        }
      },
      "required": [
        "tiles"
      ],
      "type": "object"
    },
    "schedule": {
      "description": "Optional daily activation window. When enabled, the layout takes over the Observatory between startTime and endTime (wrapping past midnight when startTime > endTime), optionally restricted to certain days of the week.",
      "properties": {
        "daysOfWeek": {
          "description": "Days the window applies to (0 = Sunday … 6 = Saturday). Empty or absent means every day.",
          "items": {
            "maximum": 6,
            "minimum": 0,
            "type": "integer"
          },
          "maxLength": 7,
          "type": "array"
        },
        "enabled": {
          "description": "Whether the schedule is active",
          "type": "boolean"
        },
        "endTime": {
          "description": "Window end as 'HH:MM' (24-hour, local time)",
          "maxLength": 5,
          "type": "string"
        },
        "startTime": {
          "description": "Window start as 'HH:MM' (24-hour, local time)",
          "maxLength": 5,
          "type": "string"
        }
      },
      "type": "object"
    },
    "source": {
      "description": "Provenance for this layout. 'original' was crafted here, 'learned' was saved from another user's shared layout (see originalUri/originalDid), 'migrated' marks the layout the one-time unify migration captured from the user's live grid, and 'starter' marks the layout a published generation of the starter grid wrote when it moved an account onto that generation. The last two are those passes' idempotency sentinels and must be preserved when a record is re-saved, or the pass will run again and duplicate the layout.",
      "properties": {
        "originalDid": {
          "description": "DID of the user this layout was learned from",
          "format": "did",
          "type": "string"
        },
        "originalUri": {
          "description": "AT URI of the record this layout was learned from",
          "format": "at-uri",
          "type": "string"
        },
        "type": {
          "knownValues": [
            "original",
            "learned",
            "migrated",
            "starter"
          ],
          "type": "string"
        }
      },
      "type": "object"
    }
  },
  "id": "net.anisota.observatory.layout",
  "lexicon": 1
}