{
 "id": "page-error",
 "name": "Something went wrong page",
 "purpose": "A 500 page that says the problem is on our side, that the person's work is safe, and gives a retry and a reference code for support.",
 "use_when": [
  "when the server or a service fails and the page can't load",
  "the server returned an error page could not recover from",
  "a page-level request failed twice"
 ],
 "avoid_when": [
  "one part of the page failed: show an error banner in that part (page-banners)",
  "there is no connection: use page-offline",
  "a planned outage: use page-maintenance"
 ],
 "type": "states",
 "style": "quiet",
 "width": "wide",
 "tags": {
  "audience": "work",
  "industries": [
   "any"
  ],
  "keywords": [
   "500",
   "server error",
   "retry",
   "reference code",
   "error page"
  ]
 },
 "root": ".odl-page-error",
 "parts": [
  {
   "name": "code",
   "selector": ".odl-page-error [data-od-slot=\"code\"]",
   "what": "the error code, small, above the heading, as in “Error 500”",
   "slot": "text"
  },
  {
   "name": "title",
   "selector": ".odl-page-error [data-od-slot=\"title\"]",
   "what": "the heading: what happened, in plain words, as in “Something went wrong on our side”",
   "slot": "text"
  },
  {
   "name": "message",
   "selector": ".odl-page-error [data-od-slot=\"message\"]",
   "what": "one or two sentences: what it means and what to do next, as in “This page didn't load, but your work is saved. T”",
   "slot": "text"
  },
  {
   "name": "reference",
   "selector": ".odl-page-error [data-od-slot=\"reference\"]",
   "what": "the reference code a person gives support, as in “LRK-500-7Q2K-91D”",
   "slot": "text"
  },
  {
   "name": "copy",
   "selector": ".odl-page-error [data-od-action=\"copy\"]",
   "what": "the Copy code action",
   "slot": "action"
  },
  {
   "name": "retry",
   "selector": ".odl-page-error [data-od-action=\"retry\"]",
   "what": "the Try again action",
   "slot": "action"
  },
  {
   "name": "support",
   "selector": ".odl-page-error [data-od-action=\"support\"]",
   "what": "the Contact support action",
   "slot": "action"
  }
 ],
 "data": {
  "type": "object",
  "properties": {
   "code": {
    "type": "string",
    "maxLength": 24,
    "part": "code"
   },
   "title": {
    "type": "string",
    "maxLength": 48,
    "part": "title"
   },
   "message": {
    "type": "string",
    "maxLength": 176,
    "part": "message"
   },
   "reference": {
    "type": "string",
    "maxLength": 24,
    "part": "reference"
   },
   "retry": {
    "type": "object",
    "required": [
     "label",
     "event"
    ],
    "properties": {
     "label": {
      "type": "string",
      "maxLength": 40
     },
     "event": {
      "type": "object"
     }
    }
   },
   "copy": {
    "type": "object",
    "required": [
     "label",
     "event"
    ],
    "properties": {
     "label": {
      "type": "string",
      "maxLength": 40
     },
     "event": {
      "type": "object"
     }
    }
   },
   "support": {
    "type": "object",
    "required": [
     "label",
     "event"
    ],
    "properties": {
     "label": {
      "type": "string",
      "maxLength": 40
     },
     "event": {
      "type": "object"
     }
    }
   }
  },
  "required": [
   "code",
   "title",
   "message",
   "reference"
  ]
 },
 "states": {
  "shown": [
   "error",
   "retrying",
   "copied",
   "hover",
   "focus"
  ],
  "edge": {
   "empty": {
    "status": "not_built",
    "how": "Not applicable: this state screen shows no list of records."
   },
   "loading": {
    "status": "shown",
    "how": "Try again shows a spinner and is aria-disabled while it retries.",
    "evidence": "is-busy"
   },
   "error": {
    "status": "shown",
    "how": "The part is itself an error or system state, written in plain words with a next step.",
    "evidence": "class=\"odl-lead\""
   },
   "disabled": {
    "status": "shown",
    "how": "Try again is aria-disabled during a retry, so it can't be pressed twice.",
    "evidence": "aria-disabled"
   },
   "overflow": {
    "status": "handled",
    "how": "Actions stack full width under 30rem; the panel caps its width.",
    "evidence": "@container"
   },
   "long_text": {
    "status": "handled",
    "how": "Titles balance and body text wraps at word boundaries inside a capped measure.",
    "evidence": "text-wrap"
   },
   "missing_image": {
    "status": "none",
    "how": "the part has no photo"
   }
  }
 },
 "tokens": [
  "--ds-border-width-default",
  "--ds-color-bg-action-primary",
  "--ds-color-bg-action-primary-hover",
  "--ds-color-bg-action-primary-pressed",
  "--ds-color-bg-neutral-subtle",
  "--ds-color-border-default",
  "--ds-color-border-focus",
  "--ds-color-border-subtle",
  "--ds-color-icon-default",
  "--ds-color-surface-base",
  "--ds-color-surface-raised",
  "--ds-color-surface-sunken",
  "--ds-color-text-link",
  "--ds-color-text-on-action",
  "--ds-color-text-primary",
  "--ds-color-text-secondary",
  "--ds-color-text-tertiary",
  "--ds-focus-ring-offset",
  "--ds-focus-ring-width",
  "--ds-font-weight-heading",
  "--ds-font-weight-label",
  "--ds-icon-stroke-md",
  "--ds-icon-stroke-sm",
  "--ds-motion-duration-long",
  "--ds-motion-duration-short",
  "--ds-motion-easing-linear",
  "--ds-motion-easing-standard",
  "--ds-opacity-disabled-container",
  "--ds-radius-container",
  "--ds-radius-control",
  "--ds-size-control-lg",
  "--ds-size-control-md",
  "--ds-size-icon-lg",
  "--ds-size-icon-sm",
  "--ds-size-target-min",
  "--ds-space-inline-sm",
  "--ds-space-inset-lg",
  "--ds-space-inset-md",
  "--ds-space-inset-sm",
  "--ds-space-inset-xl",
  "--ds-space-section-md",
  "--ds-space-section-sm",
  "--ds-space-stack-lg",
  "--ds-space-stack-md",
  "--ds-space-stack-sm",
  "--ds-space-stack-xl",
  "--ds-space-stack-xs",
  "--ds-text-body-md",
  "--ds-text-body-sm",
  "--ds-text-code-md",
  "--ds-text-headline-sm",
  "--ds-text-label-lg",
  "--ds-text-label-md"
 ],
 "a11y": {
  "summary": "A polite status line under the buttons says when a retry starts, how it ended and when the code is copied; the reference code is plain text people can select.",
  "roles": [
   "region",
   "status"
  ],
  "keyboard": [
   "Tab reaches Copy code, Try again and Contact support",
   "Enter or Space presses a button; focus stays on Try again while it retries"
  ],
  "controls": {
   "button": 2,
   "input": 0,
   "link": 1,
   "select": 0,
   "textarea": 0,
   "summary": 0
  },
  "focus_visible": true,
  "reduced_motion": true,
  "min_target": true
 },
 "files": {
  "html": "components/page-error/component.html",
  "bytes": 9250,
  "script": true
 },
 "source": null,
 "photos": 0,
 "urls": {
  "html": "https://opendesigner.dev/library/page-error.html",
  "json": "https://opendesigner.dev/library/page-error.json",
  "page": "https://opendesigner.dev/library/page-error/"
 },
 "get": {
  "curl": "curl -fsSLo page-error.html https://opendesigner.dev/library/page-error.html",
  "opendesigner": "python3 path/to/skills/opendesigner/scripts/library.py add page-error --from https://opendesigner.dev",
  "prompt": "Add the OpenDesigner component page-error to this project: https://opendesigner.dev/library/page-error.html. Keep its markup and states; map its --ds-* variables to my tokens."
 }
}
