{
  "schema": "https://miscsubjects.com/schemas/jarticle.json",
  "status": "published",
  "slug": "widget-library",
  "title": "Widget Library",
  "kind": "guide",
  "listed": false,
  "summary": "Try the social, prompt, and API widgets. See the source cards and JSON blocks that can be placed inside an article.",
  "body": [
    "## Interactive widgets\nChoose a social source, copy or edit a prompt, or build a request from a documented contract. Start with a preset, review its fields, then copy the body, complete request JSON, or cURL.",
    "## Social sources\nA source card keeps the platform’s presentation and opens the original. The player controls above load provider-hosted media on request.",
    {
      "type": "youtube",
      "id": "nasa-webb-video",
      "channel": "NASA",
      "title": "Highlights from Webb’s first images",
      "url": "https://www.youtube.com/watch?v=1C_zuHf6lP4",
      "thumbnail": "https://i.ytimg.com/vi/1C_zuHf6lP4/hqdefault.jpg"
    },
    {
      "type": "reddit",
      "id": "nasa-webb-reddit",
      "author": "u/nasa",
      "subreddit": "r/nasa",
      "title": "The first full-color images from the James Webb Space Telescope",
      "url": "https://www.reddit.com/r/nasa/comments/vxdrpy/",
      "date": "2022-07-12"
    },
    "See a [Facebook profile card](/a/mark-zuckerberg-facebook), [documentation sources in a research article](/a/mcp-as-a-projection), and [government and place records](/a/marin-county).",
    "## Prompt text\nChoose a template, edit the text, then copy it as plain text. Variables such as `{{city}}` stay visible until you replace them.",
    "## API invocation\nThe builder covers Google Places Text Search, OpenRouter chat, Higgsfield image and video, Apify actor input, and the build’s FILES tool over MCP and Directory REST. The Fields panel explains required inputs, optional values, and how to read the response. Run copied requests from your authorized client with its environment credentials.",
    {
      "type": "json",
      "title": "Places city-only request body",
      "value": {
        "textQuery": "Mill Valley, CA"
      }
    },
    "## Source and layout catalog\nOpen any example to compare the rendered widget with its JSON. Keep the source URL and its date with the item they support.",
    {
      "type": "example",
      "title": "County object",
      "widget": {
        "type": "entity",
        "ref": "marin-county"
      }
    },
    {
      "type": "example",
      "title": "Facebook profile object",
      "widget": {
        "type": "entity",
        "ref": "mark-zuckerberg-facebook"
      }
    },
    {
      "type": "example",
      "title": "Documentation evidence",
      "widget": {
        "type": "source",
        "source_type": "statement",
        "title": "Tools specification",
        "publisher": "Model Context Protocol",
        "url": "https://modelcontextprotocol.io/specification/2025-11-25/server/tools"
      }
    },
    {
      "type": "table",
      "columns": [
        {
          "key": "family",
          "label": "Widget family"
        },
        {
          "key": "type",
          "label": "Types"
        },
        {
          "key": "use",
          "label": "Placement"
        }
      ],
      "rows": [
        {
          "family": "Social",
          "type": "youtube · reddit · x · instagram · facebook · linkedin · tiktok",
          "use": "Use a direct public URL and the supported source fields."
        },
        {
          "family": "Source evidence",
          "type": "source · wikipedia",
          "use": "Use source IDs or documented source fields and URLs."
        },
        {
          "family": "Objects",
          "type": "entity · article · object_image · object_field · object_group",
          "use": "Reference the stored object or a field of it."
        },
        {
          "family": "Reading aids",
          "type": "note · quote · stat · caveat · thread",
          "use": "Place text, callouts or expandable context in the reading flow."
        },
        {
          "family": "Data and media",
          "type": "json · table · image · gallery",
          "use": "Display values, rows, images or a group of images."
        },
        {
          "family": "Live workspace",
          "type": "space · object",
          "use": "Reference a workspace or an application object."
        }
      ]
    },
    "## Place a widget in an article\nInclude an approved typed block in `body` or place a widget from the `widgets` array with `[[widget:id]]` on its own line. An `entity` block points at a stored object. A `source` block can point at a source ID on the article. Open the article’s JSON to see how its examples are stored.",
    {
      "type": "json",
      "title": "Article placement example",
      "value": {
        "widgets": [
          {
            "id": "webb-video",
            "type": "youtube",
            "channel": "NASA",
            "title": "Highlights from Webb’s first images",
            "url": "https://www.youtube.com/watch?v=1C_zuHf6lP4"
          }
        ],
        "body": [
          "## Social sources",
          "[[widget:webb-video]]"
        ]
      }
    },
    "[Widget and workspace catalog](/console/widgets.html) · [Standalone widget layouts](/console/designs/presentation/index.html?editorial=1&mode=library) · [JSON Rules and REST](/a/json-articles-how-they-work)"
  ],
  "sources": [
    {
      "id": "nasa-video",
      "title": "Highlights from Webb’s first images",
      "publisher": "NASA",
      "url": "https://www.youtube.com/watch?v=1C_zuHf6lP4",
      "date": "2022-07-12"
    },
    {
      "id": "nasa-reddit",
      "title": "The first full-color images from the James Webb Space Telescope",
      "publisher": "NASA on Reddit",
      "url": "https://www.reddit.com/r/nasa/comments/vxdrpy/",
      "date": "2022-07-12"
    },
    {
      "id": "places-docs",
      "title": "Text Search (New)",
      "publisher": "Google for Developers",
      "url": "https://developers.google.com/maps/documentation/places/web-service/text-search"
    }
  ],
  "type": "article",
  "created": "2026-11-10T10:20:03.696Z",
  "updated": "2026-11-10T10:32:25.091Z",
  "version": 2,
  "hash": "f86676ff091456123b760dc125d0db9be3dbdd3a27ca8a5130fbadfdeaad98b6",
  "theme": "https://miscsubjects.com/article-theme.json",
  "styling": {
    "scope": "shared",
    "theme_ref": "https://miscsubjects.com/article-theme.json"
  },
  "page": "https://miscsubjects.com/a/widget-library",
  "json": "https://miscsubjects.com/a/widget-library.json",
  "markdown": "https://miscsubjects.com/a/widget-library.md",
  "calls": [
    {
      "what": "this article as a page (no key)",
      "method": "GET",
      "url": "https://miscsubjects.com/a/widget-library",
      "headers": {}
    },
    {
      "what": "this article as its object (no key)",
      "method": "GET",
      "url": "https://miscsubjects.com/a/widget-library.json",
      "headers": {}
    },
    {
      "what": "this article as Markdown (no key)",
      "method": "GET",
      "url": "https://miscsubjects.com/a/widget-library.md",
      "headers": {}
    },
    {
      "what": "the object with its hash, drafts too",
      "method": "GET",
      "url": "https://miscsubjects.com/api/jarticles/widget-library",
      "headers": {
        "x-terminal-key": "<YOUR_TERMINAL_KEY>"
      }
    },
    {
      "what": "one piece and that piece’s hash",
      "method": "GET",
      "url": "https://miscsubjects.com/api/jarticles/widget-library/at?path=facts",
      "headers": {
        "x-terminal-key": "<YOUR_TERMINAL_KEY>"
      }
    },
    {
      "what": "grep: every key or value that matches, with the path to change it",
      "method": "GET",
      "url": "https://miscsubjects.com/api/jarticles/widget-library/grep?q=owner",
      "headers": {
        "x-terminal-key": "<YOUR_TERMINAL_KEY>"
      }
    },
    {
      "what": "change pieces (set, merge, delete, append, insert, move); if-match is the hash",
      "method": "PATCH",
      "url": "https://miscsubjects.com/api/jarticles/widget-library",
      "headers": {
        "x-terminal-key": "<YOUR_TERMINAL_KEY>",
        "content-type": "application/json",
        "if-match": "<hash from the read>"
      },
      "body": {
        "ops": [
          {
            "op": "set",
            "path": "facts.example",
            "value": 1
          }
        ]
      }
    },
    {
      "what": "replace the whole object",
      "method": "PUT",
      "url": "https://miscsubjects.com/api/jarticles/widget-library",
      "headers": {
        "x-terminal-key": "<YOUR_TERMINAL_KEY>",
        "content-type": "application/json",
        "if-match": "<hash>"
      },
      "body": {
        "slug": "widget-library",
        "title": "…"
      }
    },
    {
      "what": "fetch every source, hash what came back and check the quote is in it",
      "method": "POST",
      "url": "https://miscsubjects.com/api/jarticles/widget-library/verify",
      "headers": {
        "x-terminal-key": "<YOUR_TERMINAL_KEY>",
        "content-type": "application/json"
      },
      "body": {}
    },
    {
      "what": "an Obsidian-style command",
      "method": "POST",
      "url": "https://miscsubjects.com/api/jarticles/cli",
      "headers": {
        "x-terminal-key": "<YOUR_TERMINAL_KEY>",
        "content-type": "application/json"
      },
      "body": {
        "command": "backlinks",
        "file": "widget-library"
      }
    }
  ],
  "entities": {
    "widget-library": {
      "id": "widget-library",
      "label": "Widget Library",
      "type": "guide",
      "page": "https://miscsubjects.com/a/widget-library",
      "json": "https://miscsubjects.com/a/widget-library.json"
    },
    "marin-county": {
      "id": "marin-county",
      "label": "Marin County",
      "type": "county",
      "page": "https://miscsubjects.com/a/marin-county",
      "json": "https://miscsubjects.com/a/marin-county.json",
      "source_url": "https://www.marincounty.gov/"
    },
    "mark-zuckerberg-facebook": {
      "id": "mark-zuckerberg-facebook",
      "label": "Mark Zuckerberg · Facebook",
      "type": "social_profile",
      "page": "https://miscsubjects.com/a/mark-zuckerberg-facebook",
      "json": "https://miscsubjects.com/a/mark-zuckerberg-facebook.json",
      "source_url": "https://www.facebook.com/zuck/"
    }
  },
  "relationships": {
    "upward": {
      "total": 0,
      "offset": 0,
      "limit": 50,
      "items": [],
      "next": null
    },
    "downward": {
      "total": 0,
      "offset": 0,
      "limit": 50,
      "items": [],
      "next": null
    },
    "sideways": {
      "total": 0,
      "offset": 0,
      "limit": 50,
      "items": [],
      "next": null
    },
    "references": {
      "total": 2,
      "offset": 0,
      "limit": 50,
      "items": [
        {
          "ref": "marin-county",
          "predicate": "references",
          "subject": "widget-library",
          "object": "marin-county"
        },
        {
          "ref": "mark-zuckerberg-facebook",
          "predicate": "references",
          "subject": "widget-library",
          "object": "mark-zuckerberg-facebook"
        }
      ],
      "next": null
    },
    "referenced_by": {
      "total": 0,
      "offset": 0,
      "limit": 50,
      "items": [],
      "next": null
    }
  },
  "hierarchy": {
    "paths": [],
    "order": "subject to parent to ancestor",
    "complete": true,
    "cycles": [],
    "limits": {
      "depth": 12,
      "objects": 250
    },
    "unresolved_refs": []
  },
  "reference_contract": {
    "canonical_id": "slug",
    "entity_lookup": "entities[ref]; # resolves to this object via self_ref",
    "self_ref": "widget-library",
    "entity_fields": "page and json are canonical object links; source_url is the external source",
    "directions": {
      "upward": "Parents and collections containing this object; predicate distinguishes location from membership.",
      "downward": "Objects naming this object as their parent, container or collection.",
      "sideways": "Associations and objects sharing a direct parent.",
      "references": "Objects referenced by this record.",
      "referenced_by": "Published articles referencing this record."
    },
    "predicates": {
      "part_of": "Declared parent hierarchy.",
      "located_in": "Location asserted on this object.",
      "associated_parcel": "Associated parcel, a separate object with its own jurisdiction and facts.",
      "member_of": "Collection membership, not geographic containment.",
      "included_in": "Editorial nesting, not geographic containment.",
      "shares_parent": "Shares the identified parent; no other relationship is implied.",
      "related_to": "An association with no more specific predicate recorded."
    },
    "scope": "Published article objects; Atlas inventories have their own counted, paged links. An association does not transfer facts or jurisdiction. An absent neighborhood means no neighborhood relationship is recorded."
  },
  "hash_spec": {
    "algorithm": "sha256",
    "encoding": "lowercase hexadecimal",
    "scope": "stored record; hash is also the write concurrency token",
    "included_keys": [
      "body",
      "created",
      "kind",
      "listed",
      "schema",
      "slug",
      "sources",
      "status",
      "summary",
      "title",
      "type",
      "updated",
      "version"
    ],
    "field_overrides": {
      "schema": "jarticle/1"
    },
    "canonicalization": "Select included_keys from this response, apply field_overrides, recursively sort object keys using JavaScript Object.keys().sort(), retain array order, serialize primitives with JSON.stringify, join without whitespace, hash UTF-8 bytes.",
    "updated_included": true,
    "generated_fields": "All fields absent from included_keys are excluded. Relationship counts and theme references are generated and can change without changing the stored-record hash."
  }
}