{
  "element": "nve-workspace",
  "entrypoint": "@nvidia-elements/core/workspace/workspace.examples.json",
  "items": [
    {
      "id": "workspace",
      "name": "Default",
      "template": "<nve-workspace\n  groupable\n  rearrangeable\n  resizable\n  style=\"height: 600px\"\n  value='{\"version\":1,\"closed\":[],\"root\":{\"type\":\"split\",\"axis\":\"horizontal\",\"weights\":[1,4],\"children\":[{\"type\":\"group\",\"panels\":[\"workspace-outline\"],\"active\":\"workspace-outline\"},{\"type\":\"split\",\"axis\":\"vertical\",\"weights\":[3,2],\"children\":[{\"type\":\"split\",\"axis\":\"horizontal\",\"weights\":[3,2],\"children\":[{\"type\":\"group\",\"panels\":[\"workspace-editor\"],\"active\":\"workspace-editor\"},{\"type\":\"group\",\"panels\":[\"workspace-preview\"],\"active\":\"workspace-preview\"}]},{\"type\":\"group\",\"panels\":[\"workspace-notes\",\"workspace-activity\",\"workspace-tasks\"],\"active\":\"workspace-notes\"}]}]}}'\n>\n  <nve-workspace-panel id=\"workspace-outline\">\n    <nve-workspace-panel-header>Outline</nve-workspace-panel-header>\n    <nve-workspace-panel-content>Outline content</nve-workspace-panel-content>\n  </nve-workspace-panel>\n  <nve-workspace-panel id=\"workspace-editor\">\n    <nve-workspace-panel-header>Editor</nve-workspace-panel-header>\n    <nve-workspace-panel-content>\n      <nve-textarea><textarea aria-label=\"Editor\">Editor content</textarea></nve-textarea>\n    </nve-workspace-panel-content>\n    <nve-workspace-panel-footer>Ready</nve-workspace-panel-footer>\n  </nve-workspace-panel>\n  <nve-workspace-panel id=\"workspace-preview\">\n    <nve-workspace-panel-header>Preview</nve-workspace-panel-header>\n    <nve-workspace-panel-content>Preview content</nve-workspace-panel-content>\n  </nve-workspace-panel>\n  <nve-workspace-panel id=\"workspace-notes\">\n    <nve-workspace-panel-header>Notes</nve-workspace-panel-header>\n    <nve-workspace-panel-content>Notes content</nve-workspace-panel-content>\n  </nve-workspace-panel>\n  <nve-workspace-panel id=\"workspace-activity\">\n    <nve-workspace-panel-header>Activity</nve-workspace-panel-header>\n    <nve-workspace-panel-content>Activity content</nve-workspace-panel-content>\n  </nve-workspace-panel>\n  <nve-workspace-panel id=\"workspace-tasks\">\n    <nve-workspace-panel-header>Tasks</nve-workspace-panel-header>\n    <nve-workspace-panel-content>Tasks content</nve-workspace-panel-content>\n  </nve-workspace-panel>\n</nve-workspace>\n",
      "summary": "Arrange panels in nested groups while retaining application content. Drag panel headers or tabs to move panels, group handles to move tabs together, and separators to resize.",
      "description": "",
      "composition": false,
      "tags": []
    },
    {
      "id": "workspace-resizable",
      "name": "Resizable",
      "template": "<nve-workspace\n  resizable\n  value='{\"version\":1,\"root\":{\"type\":\"split\",\"axis\":\"horizontal\",\"weights\":[2,1],\"children\":[{\"type\":\"group\",\"panels\":[\"editor\",\"notes\"],\"active\":\"editor\"},{\"type\":\"group\",\"panels\":[\"preview\"],\"active\":\"preview\"}]},\"closed\":[]}'\n  style=\"height: 420px\"\n>\n  <nve-workspace-panel id=\"editor\">\n    <nve-workspace-panel-header>Editor</nve-workspace-panel-header>\n    <nve-workspace-panel-content>\n      <nve-textarea><textarea aria-label=\"Editor\">Editor content</textarea></nve-textarea>\n    </nve-workspace-panel-content>\n  </nve-workspace-panel>\n  <nve-workspace-panel id=\"preview\">\n    <nve-workspace-panel-header>Preview</nve-workspace-panel-header>\n    <nve-workspace-panel-content>Preview content</nve-workspace-panel-content>\n  </nve-workspace-panel>\n  <nve-workspace-panel id=\"notes\">\n    <nve-workspace-panel-header>Notes</nve-workspace-panel-header>\n    <nve-workspace-panel-content>Notes content</nve-workspace-panel-content>\n  </nve-workspace-panel>\n</nve-workspace>\n",
      "summary": "Resize groups within a fixed arrangement and switch tabs while retaining application content.",
      "description": "",
      "composition": false,
      "tags": []
    },
    {
      "id": "workspace-rearrangeable",
      "name": "Rearrangeable",
      "template": "<nve-workspace\n  rearrangeable\n  resizable\n  style=\"height: 420px\"\n  value='{\"version\":1,\"closed\":[],\"root\":{\"type\":\"split\",\"axis\":\"horizontal\",\"weights\":[2,1],\"children\":[{\"type\":\"group\",\"panels\":[\"editor\",\"notes\"],\"active\":\"editor\"},{\"type\":\"group\",\"panels\":[\"preview\"],\"active\":\"preview\"}]}}'\n>\n  <nve-workspace-panel id=\"editor\">\n    <nve-workspace-panel-header>Editor</nve-workspace-panel-header>\n    <nve-workspace-panel-content>\n      <nve-textarea><textarea aria-label=\"Editor\">Editor content</textarea></nve-textarea>\n    </nve-workspace-panel-content>\n  </nve-workspace-panel>\n  <nve-workspace-panel id=\"preview\">\n    <nve-workspace-panel-header>Preview</nve-workspace-panel-header>\n    <nve-workspace-panel-content>Preview content</nve-workspace-panel-content>\n  </nve-workspace-panel>\n  <nve-workspace-panel id=\"notes\">\n    <nve-workspace-panel-header>Notes</nve-workspace-panel-header>\n    <nve-workspace-panel-content>Notes content</nve-workspace-panel-content>\n  </nve-workspace-panel>\n</nve-workspace>\n",
      "summary": "Rearrange panels while keeping tabbed panels together.",
      "description": "",
      "composition": false,
      "tags": []
    },
    {
      "id": "workspace-groupable",
      "name": "Groupable",
      "template": "<div id=\"regroup-example\" nve-layout=\"column gap:md\">\n  <nve-button>Reset layout</nve-button>\n  <nve-workspace rearrangeable groupable resizable style=\"height: 420px\">\n    <nve-workspace-panel id=\"group-editor\">\n      <nve-workspace-panel-header>Editor</nve-workspace-panel-header>\n      <nve-workspace-panel-content>\n        <nve-textarea><textarea aria-label=\"Editor\">Editor content</textarea></nve-textarea>\n      </nve-workspace-panel-content>\n    </nve-workspace-panel>\n    <nve-workspace-panel id=\"group-notes\">\n      <nve-workspace-panel-header>Notes</nve-workspace-panel-header>\n      <nve-workspace-panel-content>Notes content</nve-workspace-panel-content>\n    </nve-workspace-panel>\n    <nve-workspace-panel id=\"group-preview\">\n      <nve-workspace-panel-header>Preview</nve-workspace-panel-header>\n      <nve-workspace-panel-content>Preview content</nve-workspace-panel-content>\n    </nve-workspace-panel>\n  </nve-workspace>\n  <script type=\"module\">\n    const example = document.querySelector(\"#regroup-example\");\n    const workspace = example.querySelector(\"nve-workspace\");\n    const initialValue = {\n      version: 1,\n      closed: [],\n      root: {\n        type: \"split\",\n        axis: \"horizontal\",\n        weights: [2, 1],\n        children: [\n          { type: \"group\", panels: [\"group-editor\", \"group-notes\"], active: \"group-editor\" },\n          { type: \"group\", panels: [\"group-preview\"], active: \"group-preview\" },\n        ],\n      },\n    };\n    workspace.value = initialValue;\n    example.querySelector(\"nve-button\").addEventListener(\"click\", () => {\n      workspace.value = initialValue;\n    });\n  </script>\n</div>\n",
      "summary": "Join panels into tabbed groups or move individual tabs out.",
      "description": "",
      "composition": true,
      "tags": []
    },
    {
      "id": "workspace-closable",
      "name": "Closable",
      "template": "<div id=\"open-close-example\" nve-layout=\"column gap:md\">\n  <div nve-layout=\"row gap:md align:space-between align:wrap\">\n    <nve-button id=\"reset-open-close\">Reset layout</nve-button>\n    <div nve-layout=\"row gap:sm\">\n      <nve-button command=\"--open\" commandfor=\"retained-editor\">Open editor</nve-button>\n      <nve-button command=\"--close\" commandfor=\"retained-editor\">Close editor</nve-button>\n    </div>\n  </div>\n  <nve-workspace closable groupable rearrangeable resizable style=\"height: 420px\">\n    <nve-workspace-panel id=\"retained-editor\">\n      <nve-workspace-panel-header>Editor</nve-workspace-panel-header>\n      <nve-workspace-panel-content>\n        <nve-textarea><textarea aria-label=\"Editor\">Editor content</textarea></nve-textarea>\n      </nve-workspace-panel-content>\n    </nve-workspace-panel>\n    <nve-workspace-panel id=\"restorable-preview\">\n      <nve-workspace-panel-header>Preview</nve-workspace-panel-header>\n      <nve-workspace-panel-content>Preview content</nve-workspace-panel-content>\n    </nve-workspace-panel>\n    <nve-workspace-panel id=\"retained-notes\">\n      <nve-workspace-panel-header>Notes</nve-workspace-panel-header>\n      <nve-workspace-panel-content>Notes content</nve-workspace-panel-content>\n    </nve-workspace-panel>\n  </nve-workspace>\n  <script type=\"module\">\n    const example = document.querySelector(\"#open-close-example\");\n    const workspace = example.querySelector(\"nve-workspace\");\n    const initialValue = {\n      version: 1,\n      root: {\n        type: \"split\",\n        axis: \"horizontal\",\n        weights: [2, 1],\n        children: [\n          { type: \"group\", panels: [\"retained-editor\", \"retained-notes\"], active: \"retained-editor\" },\n          { type: \"group\", panels: [\"restorable-preview\"], active: \"restorable-preview\" },\n        ],\n      },\n      closed: [],\n    };\n    workspace.value = initialValue;\n    example.querySelector(\"#reset-open-close\").addEventListener(\"click\", () => {\n      workspace.value = initialValue;\n    });\n  </script>\n</div>\n",
      "summary": "Close and reopen panels while retaining their positions and application content.",
      "description": "",
      "composition": true,
      "tags": []
    },
    {
      "id": "workspace-fullscreenable",
      "name": "Fullscreenable",
      "template": "<div id=\"fullscreen-example\" nve-layout=\"column gap:md\">\n  <nve-button>Reset layout</nve-button>\n  <nve-workspace fullscreenable closable rearrangeable groupable resizable style=\"height: 420px\">\n    <nve-workspace-panel id=\"fullscreen-editor\">\n      <nve-workspace-panel-header>Editor</nve-workspace-panel-header>\n      <nve-workspace-panel-content>\n        <nve-textarea><textarea aria-label=\"Editor\">Editor content</textarea></nve-textarea>\n      </nve-workspace-panel-content>\n    </nve-workspace-panel>\n    <nve-workspace-panel id=\"fullscreen-notes\">\n      <nve-workspace-panel-header>Notes</nve-workspace-panel-header>\n      <nve-workspace-panel-content>Notes content</nve-workspace-panel-content>\n    </nve-workspace-panel>\n    <nve-workspace-panel id=\"fullscreen-preview\">\n      <nve-workspace-panel-header>Preview</nve-workspace-panel-header>\n      <nve-workspace-panel-content>Preview content</nve-workspace-panel-content>\n    </nve-workspace-panel>\n  </nve-workspace>\n  <script type=\"module\">\n    const example = document.querySelector(\"#fullscreen-example\");\n    const workspace = example.querySelector(\"nve-workspace\");\n    const initialValue = {\n      version: 1,\n      closed: [],\n      root: {\n        type: \"split\",\n        axis: \"horizontal\",\n        weights: [2, 1],\n        children: [\n          {\n            type: \"group\",\n            panels: [\"fullscreen-editor\", \"fullscreen-notes\"],\n            active: \"fullscreen-editor\",\n          },\n          { type: \"group\", panels: [\"fullscreen-preview\"], active: \"fullscreen-preview\" },\n        ],\n      },\n    };\n    workspace.value = initialValue;\n    example.querySelector(\"nve-button\").addEventListener(\"click\", () => {\n      workspace.value = initialValue;\n    });\n  </script>\n</div>\n",
      "summary": "Expand a group and its tabs to full screen.",
      "description": "",
      "composition": true,
      "tags": []
    },
    {
      "id": "workspace-custom-panel-actions",
      "name": "CustomPanelActions",
      "template": "<div nve-layout=\"column gap:md\">\n  <nve-button id=\"a-reopen\" popovertarget=\"a-open\" disabled>Reopen</nve-button>\n  <nve-workspace id=\"a-demo\" fullscreenable groupable rearrangeable closable resizable style=\"height: 420px\">\n    <nve-workspace-panel id=\"a-editor\">\n      <nve-workspace-panel-header>\n        Editor\n        <nve-icon-button slot=\"suffix\" icon-name=\"more-actions\" container=\"flat\" size=\"sm\" aria-label=\"Editor actions\" value=\"a-editor\" popovertarget=\"a-menu\"></nve-icon-button>\n      </nve-workspace-panel-header>\n      <nve-workspace-panel-content>\n        <nve-textarea><textarea aria-label=\"Editor\">Editor content</textarea></nve-textarea>\n      </nve-workspace-panel-content>\n    </nve-workspace-panel>\n    <nve-workspace-panel id=\"a-notes\">\n      <nve-workspace-panel-header>\n        Notes\n        <nve-icon-button slot=\"suffix\" icon-name=\"more-actions\" container=\"flat\" size=\"sm\" aria-label=\"Notes actions\" value=\"a-notes\" popovertarget=\"a-menu\"></nve-icon-button>\n      </nve-workspace-panel-header>\n      <nve-workspace-panel-content>Notes content</nve-workspace-panel-content>\n    </nve-workspace-panel>\n    <nve-workspace-panel id=\"a-preview\">\n      <nve-workspace-panel-header>\n        Preview\n        <nve-icon-button slot=\"suffix\" icon-name=\"more-actions\" container=\"flat\" size=\"sm\" aria-label=\"Preview actions\" value=\"a-preview\" popovertarget=\"a-menu\"></nve-icon-button>\n      </nve-workspace-panel-header>\n      <nve-workspace-panel-content>Preview content</nve-workspace-panel-content>\n    </nve-workspace-panel>\n    <nve-dropdown-group>\n      <nve-dropdown id=\"a-menu\">\n        <nve-menu>\n          <nve-menu-item command=\"--toggle-fullscreen\">Fullscreen</nve-menu-item>\n          <nve-menu-item popovertarget=\"a-move\">\n            Move to\n            <nve-icon name=\"caret\" direction=\"right\" size=\"sm\" slot=\"suffix\"></nve-icon>\n          </nve-menu-item>\n          <nve-menu-item popovertarget=\"a-split\">\n            Split\n            <nve-icon name=\"caret\" direction=\"right\" size=\"sm\" slot=\"suffix\"></nve-icon>\n          </nve-menu-item>\n          <nve-menu-item command=\"--close\">Close</nve-menu-item>\n        </nve-menu>\n      </nve-dropdown>\n      <nve-dropdown id=\"a-move\" position=\"right\">\n        <nve-menu>\n          <nve-menu-item command=\"--place\" data-target=\"a-editor\">Editor</nve-menu-item>\n          <nve-menu-item command=\"--place\" data-target=\"a-notes\">Notes</nve-menu-item>\n          <nve-menu-item command=\"--place\" data-target=\"a-preview\">Preview</nve-menu-item>\n        </nve-menu>\n      </nve-dropdown>\n      <nve-dropdown id=\"a-open\" position=\"bottom\">\n        <nve-menu>\n          <nve-menu-item command=\"--open\" data-target=\"a-editor\">Editor</nve-menu-item>\n          <nve-menu-item command=\"--open\" data-target=\"a-notes\">Notes</nve-menu-item>\n          <nve-menu-item command=\"--open\" data-target=\"a-preview\">Preview</nve-menu-item>\n        </nve-menu>\n      </nve-dropdown>\n      <nve-dropdown id=\"a-split\" position=\"right\">\n        <nve-menu>\n          <nve-menu-item command=\"--place\" data-side=\"left\">Left</nve-menu-item>\n          <nve-menu-item command=\"--place\" data-side=\"right\">Right</nve-menu-item>\n          <nve-menu-item command=\"--place\" data-side=\"top\">Above</nve-menu-item>\n          <nve-menu-item command=\"--place\" data-side=\"bottom\">Below</nve-menu-item>\n        </nve-menu>\n      </nve-dropdown>\n    </nve-dropdown-group>\n  </nve-workspace>\n  <script type=\"module\">\n    const workspace = document.querySelector(\"#a-demo\");\n    const initialValue = {\n      version: 1,\n      closed: [],\n      root: {\n        type: \"split\",\n        axis: \"horizontal\",\n        weights: [2, 1],\n        children: [\n          { type: \"group\", panels: [\"a-editor\", \"a-notes\"], active: \"a-editor\" },\n          { type: \"group\", panels: [\"a-preview\"], active: \"a-preview\" },\n        ],\n      },\n    };\n    workspace.value = initialValue;\n    const dropdownGroup = workspace.querySelector(\"nve-dropdown-group\");\n    const reopen = document.querySelector(\"#a-reopen\");\n    let panelId;\n\n    function refresh() {\n      const { root, closed } = workspace.value;\n      const labels = new Map([...workspace.querySelectorAll(\":scope > nve-workspace-panel\")].map((panel) => [panel.id, panel.querySelector(\"nve-workspace-panel-header\").textContent.trim()]));\n      const groups = getOpenPanelGroups(root, labels, closed);\n      const currentGroup = groups.find((ids) => ids.includes(panelId));\n      const splitTarget = currentGroup?.find((id) => id !== panelId);\n\n      updateMoveMenu(groups, currentGroup, labels);\n      updateReopenMenu(closed, labels);\n\n      for (const item of dropdownGroup.querySelectorAll(\"[command]\")) {\n        item.commandForElement = workspace;\n        item.value = item.command === \"--open\" ? item.dataset.target : panelId;\n        if (item.dataset.side) {\n          item.placement = { operation: \"split\", target: splitTarget, position: item.dataset.side };\n        }\n        item.disabled = item.style.display === \"none\" || !workspace.isCommandAvailable(item.command, item);\n      }\n\n      for (const trigger of dropdownGroup.querySelectorAll(\"[popovertarget]\")) {\n        const items = trigger.popoverTargetElement.querySelectorAll(\"[command]\");\n        trigger.disabled = [...items].every((item) => item.disabled);\n      }\n      reopen.disabled = !closed.some((id) => labels.has(id));\n    }\n\n    function getOpenPanelGroups(node, labels, closed) {\n      if (!node) return [];\n      if (node.type === \"group\") {\n        return [node.panels.filter((id) => labels.has(id) && !closed.includes(id))];\n      }\n      return node.children.flatMap((child) => getOpenPanelGroups(child, labels, closed));\n    }\n\n    function updateMoveMenu(groups, currentGroup, labels) {\n      for (const item of dropdownGroup.querySelectorAll(\"#a-move [data-target]\")) {\n        const target = item.dataset.target;\n        const members = groups.find((ids) => ids[0] === target && ids !== currentGroup);\n        item.style.display = members ? \"\" : \"none\";\n        item.placement = { operation: \"join\", target };\n        if (members) {\n          item.textContent = members.map((id) => labels.get(id)).join(\", \");\n        }\n      }\n    }\n\n    function updateReopenMenu(closed, labels) {\n      for (const item of dropdownGroup.querySelectorAll(\"#a-open [data-target]\")) {\n        const target = item.dataset.target;\n        item.style.display = labels.has(target) && closed.includes(target) ? \"\" : \"none\";\n      }\n    }\n\n    dropdownGroup.addEventListener(\n      \"beforetoggle\",\n      (event) => {\n        if (event.newState !== \"open\") return;\n        if (event.target.id === \"a-menu\") panelId = event.source?.value;\n        refresh();\n      },\n      true,\n    );\n    workspace.addEventListener(\"commandavailabilitychange\", refresh);\n    workspace.addEventListener(\"command\", () => dropdownGroup.close());\n  </script>\n</div>\n",
      "summary": "Add custom menus that use invoker commands to move, split, or close panels and toggle group fullscreen alongside application actions.",
      "description": "",
      "composition": true,
      "tags": []
    },
    {
      "id": "workspace-container",
      "name": "Container",
      "template": "<div nve-layout=\"column gap:md\">\n  <nve-workspace\n    container=\"inset\"\n    resizable\n    style=\"height: 220px\"\n    value='{\"version\":1,\"closed\":[],\"root\":{\"type\":\"split\",\"axis\":\"horizontal\",\"weights\":[1,1],\"children\":[{\"type\":\"group\",\"panels\":[\"container-inset\"],\"active\":\"container-inset\"},{\"type\":\"group\",\"panels\":[\"container-inset-preview\"],\"active\":\"container-inset-preview\"}]}}'\n  >\n    <nve-workspace-panel id=\"container-inset\">\n      <nve-workspace-panel-header>Editor (inset)</nve-workspace-panel-header>\n      <nve-workspace-panel-content>\n        <nve-textarea><textarea aria-label=\"Editor\">Editor content</textarea></nve-textarea>\n      </nve-workspace-panel-content>\n      <nve-workspace-panel-footer>Ready</nve-workspace-panel-footer>\n    </nve-workspace-panel>\n    <nve-workspace-panel id=\"container-inset-preview\">\n      <nve-workspace-panel-header>Preview</nve-workspace-panel-header>\n      <nve-workspace-panel-content>Preview content</nve-workspace-panel-content>\n    </nve-workspace-panel>\n  </nve-workspace>\n  <nve-workspace\n    container=\"flat\"\n    resizable\n    style=\"height: 220px\"\n    value='{\"version\":1,\"closed\":[],\"root\":{\"type\":\"split\",\"axis\":\"horizontal\",\"weights\":[1,1],\"children\":[{\"type\":\"group\",\"panels\":[\"container-flat\"],\"active\":\"container-flat\"},{\"type\":\"group\",\"panels\":[\"container-flat-preview\"],\"active\":\"container-flat-preview\"}]}}'\n  >\n    <nve-workspace-panel id=\"container-flat\">\n      <nve-workspace-panel-header>Editor (flat)</nve-workspace-panel-header>\n      <nve-workspace-panel-content>\n        <nve-textarea><textarea aria-label=\"Editor\">Editor content</textarea></nve-textarea>\n      </nve-workspace-panel-content>\n      <nve-workspace-panel-footer>Ready</nve-workspace-panel-footer>\n    </nve-workspace-panel>\n    <nve-workspace-panel id=\"container-flat-preview\">\n      <nve-workspace-panel-header>Preview</nve-workspace-panel-header>\n      <nve-workspace-panel-content>Preview content</nve-workspace-panel-content>\n    </nve-workspace-panel>\n  </nve-workspace>\n  <nve-workspace\n    container=\"full\"\n    resizable\n    style=\"height: 220px\"\n    value='{\"version\":1,\"closed\":[],\"root\":{\"type\":\"split\",\"axis\":\"horizontal\",\"weights\":[1,1],\"children\":[{\"type\":\"group\",\"panels\":[\"container-full\"],\"active\":\"container-full\"},{\"type\":\"group\",\"panels\":[\"container-full-preview\"],\"active\":\"container-full-preview\"}]}}'\n  >\n    <nve-workspace-panel id=\"container-full\">\n      <nve-workspace-panel-header>Editor (full)</nve-workspace-panel-header>\n      <nve-workspace-panel-content>\n        <nve-textarea><textarea aria-label=\"Editor\">Editor content</textarea></nve-textarea>\n      </nve-workspace-panel-content>\n      <nve-workspace-panel-footer>Ready</nve-workspace-panel-footer>\n    </nve-workspace-panel>\n    <nve-workspace-panel id=\"container-full-preview\">\n      <nve-workspace-panel-header>Preview</nve-workspace-panel-header>\n      <nve-workspace-panel-content>Preview content</nve-workspace-panel-content>\n    </nve-workspace-panel>\n  </nve-workspace>\n</div>\n",
      "summary": "Match the surrounding layout with inset, flat, or full container framing.",
      "description": "",
      "composition": false,
      "tags": [
        "test-case"
      ]
    },
    {
      "id": "workspace-compact-styling",
      "name": "CompactStyling",
      "template": "<div id=\"compact-example\" nve-layout=\"column gap:md\">\n  <nve-button>Reset layout</nve-button>\n  <style>\n    #condensed-workspace > nve-workspace-panel {\n      --box-shadow: none;\n    }\n    #condensed-workspace nve-workspace-panel-header {\n      --min-height: var(--nve-ref-size-800);\n      --padding: var(--nve-ref-size-100) var(--nve-ref-size-100) var(--nve-ref-size-100) var(--nve-ref-size-250);\n    }\n    #condensed-workspace nve-workspace-panel-footer {\n      --min-height: var(--nve-ref-size-800);\n      --padding: var(--nve-ref-size-200) var(--nve-ref-size-250);\n    }\n  </style>\n  <nve-workspace\n    id=\"condensed-workspace\"\n    rearrangeable\n    groupable\n    closable\n    resizable\n    fullscreenable\n    style=\"--gap: 0; --border-radius: 0; --header-control-size: var(--nve-ref-size-600); --close-button-inset: var(--nve-ref-size-100); height: 300px\"\n  >\n    <nve-workspace-panel id=\"condensed-editor\">\n      <nve-workspace-panel-header>Editor</nve-workspace-panel-header>\n      <nve-workspace-panel-content>\n        <nve-textarea><textarea aria-label=\"Editor\">Editor content</textarea></nve-textarea>\n      </nve-workspace-panel-content>\n      <nve-workspace-panel-footer>\n        <span nve-text=\"body sm trim:none\">Ready</span>\n      </nve-workspace-panel-footer>\n    </nve-workspace-panel>\n    <nve-workspace-panel id=\"condensed-notes\">\n      <nve-workspace-panel-header>Notes</nve-workspace-panel-header>\n      <nve-workspace-panel-content>Notes content</nve-workspace-panel-content>\n    </nve-workspace-panel>\n    <nve-workspace-panel id=\"condensed-preview\">\n      <nve-workspace-panel-header>Preview</nve-workspace-panel-header>\n      <nve-workspace-panel-content>Preview content</nve-workspace-panel-content>\n    </nve-workspace-panel>\n  </nve-workspace>\n  <script type=\"module\">\n    const example = document.querySelector(\"#compact-example\");\n    const workspace = example.querySelector(\"nve-workspace\");\n    const initialValue = {\n      version: 1,\n      closed: [],\n      root: {\n        type: \"split\",\n        axis: \"horizontal\",\n        weights: [2, 1],\n        children: [\n          {\n            type: \"group\",\n            panels: [\"condensed-editor\", \"condensed-notes\"],\n            active: \"condensed-editor\",\n          },\n          { type: \"group\", panels: [\"condensed-preview\"], active: \"condensed-preview\" },\n        ],\n      },\n    };\n    workspace.value = initialValue;\n    example.querySelector(\"nve-button\").addEventListener(\"click\", () => {\n      workspace.value = initialValue;\n    });\n  </script>\n</div>\n",
      "summary": "Customize spacing, controls, headers, and footers for a compact workspace.",
      "description": "",
      "composition": true,
      "tags": [
        "theme"
      ]
    },
    {
      "id": "workspace-save-restore",
      "name": "SaveRestore",
      "template": "<div nve-layout=\"column gap:md\">\n  <div nve-layout=\"row gap:md align:space-between align:wrap\">\n    <nve-button id=\"reset-arrangement\">Reset layout</nve-button>\n    <div nve-layout=\"row gap:sm\">\n      <nve-button id=\"save-arrangement\">Save layout</nve-button>\n      <nve-button id=\"restore-arrangement\">Restore layout</nve-button>\n    </div>\n  </div>\n  <nve-workspace id=\"saved-arrangement\" groupable rearrangeable closable resizable style=\"height: 420px\">\n    <nve-workspace-panel id=\"saved-editor\">\n      <nve-workspace-panel-header>Editor</nve-workspace-panel-header>\n      <nve-workspace-panel-content>\n        <nve-textarea><textarea aria-label=\"Editor\">Editor content</textarea></nve-textarea>\n      </nve-workspace-panel-content>\n    </nve-workspace-panel>\n    <nve-workspace-panel id=\"saved-notes\">\n      <nve-workspace-panel-header>Notes</nve-workspace-panel-header>\n      <nve-workspace-panel-content>Notes content</nve-workspace-panel-content>\n    </nve-workspace-panel>\n    <nve-workspace-panel id=\"saved-preview\">\n      <nve-workspace-panel-header>Preview</nve-workspace-panel-header>\n      <nve-workspace-panel-content>Preview content</nve-workspace-panel-content>\n    </nve-workspace-panel>\n  </nve-workspace>\n  <script type=\"module\">\n    const workspace = document.querySelector(\"#saved-arrangement\");\n    const save = document.querySelector(\"#save-arrangement\");\n    const restore = document.querySelector(\"#restore-arrangement\");\n    const reset = document.querySelector(\"#reset-arrangement\");\n    const initialValue = {\n      version: 1,\n      root: {\n        type: \"split\",\n        axis: \"horizontal\",\n        weights: [2, 1],\n        children: [\n          { type: \"group\", panels: [\"saved-editor\", \"saved-notes\"], active: \"saved-editor\" },\n          { type: \"group\", panels: [\"saved-preview\"], active: \"saved-preview\" },\n        ],\n      },\n      closed: [],\n    };\n    workspace.value = initialValue;\n    let savedValue = initialValue;\n    save.addEventListener(\"click\", () => {\n      savedValue = workspace.value;\n    });\n    restore.addEventListener(\"click\", () => {\n      workspace.animateTo(savedValue);\n    });\n    reset.addEventListener(\"click\", () => {\n      workspace.animateTo(initialValue);\n    });\n  </script>\n</div>\n",
      "summary": "Save and restore groups, split proportions, and closed panels without recreating application content.",
      "description": "",
      "composition": true,
      "tags": []
    },
    {
      "id": "workspace-constrained-space",
      "name": "ConstrainedSpace",
      "template": "<div id=\"constrained-example\" nve-layout=\"column gap:md\">\n  <nve-range>\n    <label>\n      Workspace height:\n      <output for=\"workspace-height\">180</output>\n      px\n    </label>\n    <input id=\"workspace-height\" type=\"range\" min=\"180\" max=\"420\" value=\"180\" />\n  </nve-range>\n  <nve-button>Reset layout</nve-button>\n  <nve-workspace groupable rearrangeable resizable style=\"height: 180px\">\n    <nve-workspace-panel id=\"top\" min-height=\"110\">\n      <nve-workspace-panel-header>Top</nve-workspace-panel-header>\n      <nve-workspace-panel-content>Top content</nve-workspace-panel-content>\n    </nve-workspace-panel>\n    <nve-workspace-panel id=\"bottom\" min-height=\"110\">\n      <nve-workspace-panel-header>Bottom</nve-workspace-panel-header>\n      <nve-workspace-panel-content>Bottom content</nve-workspace-panel-content>\n    </nve-workspace-panel>\n  </nve-workspace>\n  <script type=\"module\">\n    const example = document.querySelector(\"#constrained-example\");\n    const workspace = example.querySelector(\"nve-workspace\");\n    const range = example.querySelector(\"input\");\n    const output = example.querySelector(\"output\");\n    const initialValue = {\n      version: 1,\n      root: {\n        type: \"split\",\n        axis: \"vertical\",\n        weights: [1, 1],\n        children: [\n          { type: \"group\", panels: [\"top\"], active: \"top\" },\n          { type: \"group\", panels: [\"bottom\"], active: \"bottom\" },\n        ],\n      },\n      closed: [],\n    };\n    workspace.value = initialValue;\n    const updateHeight = () => {\n      workspace.style.height = range.value + \"px\";\n      output.value = range.value;\n    };\n    range.addEventListener(\"input\", updateHeight);\n    example.querySelector(\"nve-button\").addEventListener(\"click\", () => {\n      workspace.value = initialValue;\n      range.value = \"180\";\n      updateHeight();\n    });\n  </script>\n</div>\n",
      "summary": "The workspace scrolls when panel minimum heights exceed the available space. Increasing its height restores resizing.",
      "description": "",
      "composition": true,
      "tags": [
        "test-case"
      ]
    },
    {
      "id": "workspace-tab-overflow",
      "name": "TabOverflow",
      "template": "<nve-workspace style=\"width: 260px; height: 260px\">\n  <nve-workspace-panel id=\"view-0\">\n    <nve-workspace-panel-header>Editor</nve-workspace-panel-header>\n    <nve-workspace-panel-content>\n      <nve-textarea><textarea aria-label=\"Editor\">Editor content</textarea></nve-textarea>\n    </nve-workspace-panel-content>\n  </nve-workspace-panel>\n\n  <nve-workspace-panel id=\"view-1\">\n    <nve-workspace-panel-header>Preview</nve-workspace-panel-header>\n    <nve-workspace-panel-content> Preview content </nve-workspace-panel-content>\n  </nve-workspace-panel>\n\n  <nve-workspace-panel id=\"view-2\">\n    <nve-workspace-panel-header>Terminal</nve-workspace-panel-header>\n    <nve-workspace-panel-content> Terminal content </nve-workspace-panel-content>\n  </nve-workspace-panel>\n\n  <nve-workspace-panel id=\"view-3\">\n    <nve-workspace-panel-header>Notes</nve-workspace-panel-header>\n    <nve-workspace-panel-content> Notes content </nve-workspace-panel-content>\n  </nve-workspace-panel>\n\n  <nve-workspace-panel id=\"view-4\">\n    <nve-workspace-panel-header>Project outline</nve-workspace-panel-header>\n    <nve-workspace-panel-content> Project outline content </nve-workspace-panel-content>\n  </nve-workspace-panel>\n\n  <nve-workspace-panel id=\"view-5\">\n    <nve-workspace-panel-header>Recent activity</nve-workspace-panel-header>\n    <nve-workspace-panel-content> Recent activity content </nve-workspace-panel-content>\n  </nve-workspace-panel>\n\n  <nve-workspace-panel id=\"view-6\">\n    <nve-workspace-panel-header>Task history</nve-workspace-panel-header>\n    <nve-workspace-panel-content> Task history content </nve-workspace-panel-content>\n  </nve-workspace-panel>\n\n  <nve-workspace-panel id=\"view-7\">\n    <nve-workspace-panel-header>Search results</nve-workspace-panel-header>\n    <nve-workspace-panel-content> Search results content </nve-workspace-panel-content>\n  </nve-workspace-panel>\n</nve-workspace>\n",
      "summary": "Keep tab titles readable in a narrow group with scrolling and keyboard selection.",
      "description": "",
      "composition": false,
      "tags": [
        "test-case"
      ]
    },
    {
      "id": "workspace-gap",
      "name": "Gap",
      "template": "<div id=\"workspace-gap-example\" nve-layout=\"column gap:md\">\n  <nve-range>\n    <label>\n      Gap:\n      <output for=\"workspace-gap-range\">0</output>\n      px\n    </label>\n    <input id=\"workspace-gap-range\" type=\"range\" min=\"0\" max=\"24\" value=\"0\" />\n  </nve-range>\n  <nve-workspace\n    container=\"full\"\n    resizable\n    style=\"--gap: 0px; height: 360px\"\n    value='{\"version\":1,\"closed\":[],\"root\":{\"type\":\"split\",\"axis\":\"horizontal\",\"weights\":[1,1],\"children\":[{\"type\":\"group\",\"panels\":[\"gap-editor\"],\"active\":\"gap-editor\"},{\"type\":\"group\",\"panels\":[\"gap-preview\"],\"active\":\"gap-preview\"}]}}'\n  >\n    <nve-workspace-panel id=\"gap-editor\">\n      <nve-workspace-panel-header>Editor</nve-workspace-panel-header>\n      <nve-workspace-panel-content>\n        <nve-textarea><textarea aria-label=\"Editor\">Editor content</textarea></nve-textarea>\n      </nve-workspace-panel-content>\n    </nve-workspace-panel>\n    <nve-workspace-panel id=\"gap-preview\">\n      <nve-workspace-panel-header>Preview</nve-workspace-panel-header>\n      <nve-workspace-panel-content>Preview content</nve-workspace-panel-content>\n    </nve-workspace-panel>\n  </nve-workspace>\n  <script type=\"module\">\n    const example = document.querySelector(\"#workspace-gap-example\");\n    const workspace = example.querySelector(\"nve-workspace\");\n    const range = example.querySelector(\"input\");\n    const output = example.querySelector(\"output\");\n    range.addEventListener(\"input\", () => {\n      workspace.style.setProperty(\"--gap\", range.value + \"px\");\n      output.value = range.value;\n    });\n  </script>\n</div>\n",
      "summary": "Adjust spacing between groups with --gap. Zero joins the group frames.",
      "description": "",
      "composition": true,
      "tags": [
        "test-case"
      ]
    }
  ]
}