shadow-claw 1.26.0 → 1.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/skills/main/skill-creator/SKILL.md +39 -0
- package/.agents/skills/main/skill-creator/references/declarative-pipelines.md +44 -0
- package/.agents/skills/main/skill-creator/references/declarative-tools.md +35 -0
- package/.agents/skills/main/skill-creator/references/frontmatter-spec.md +50 -0
- package/.well-known/agent-skills/index.json +14 -0
- package/README.md +5 -3
- package/bin/build/build.mjs +146 -15
- package/bin/build/build.test.mjs +57 -0
- package/bin/cli.mjs +26 -0
- package/bin/commands/mcp.mjs +277 -55
- package/bin/commands/mcp.test.mjs +275 -1
- package/bin/commands/skills-index.mjs +328 -0
- package/bin/commands/skills-index.test.mjs +161 -0
- package/bin/site-config/utils/custom-elements/get-approved-custom-element-scripts.test.mjs +2 -0
- package/bin/site-config/utils/custom-elements/sanitize-embedded-custom-element-scripts.test.mjs +10 -1
- package/dist/lib/components/index.js +25 -25
- package/dist/lib/components/settings/shadow-claw-accounts.js +1 -1
- package/dist/lib/components/settings/shadow-claw-channel-config.js +1 -1
- package/dist/lib/components/settings/shadow-claw-control-plane.js +1 -1
- package/dist/lib/components/settings/shadow-claw-git.js +1 -1
- package/dist/lib/components/settings/shadow-claw-integrations.js +1 -1
- package/dist/lib/components/settings/shadow-claw-llm.js +1 -1
- package/dist/lib/components/settings/shadow-claw-mcp-remote.js +1 -1
- package/dist/lib/components/settings/shadow-claw-networking.js +1 -1
- package/dist/lib/components/settings/shadow-claw-peerjs.js +1 -1
- package/dist/lib/components/settings/shadow-claw-storage.js +1 -1
- package/dist/lib/components/settings/shadow-claw-task-server.js +1 -1
- package/dist/lib/components/settings/shadow-claw-webvm.js +1 -1
- package/dist/lib/components/shadow-claw-a2ui.js +1 -1
- package/dist/lib/components/shadow-claw-accounts.js +1 -1
- package/dist/lib/components/shadow-claw-channel-config.js +1 -1
- package/dist/lib/components/shadow-claw-channels.js +1 -1
- package/dist/lib/components/shadow-claw-chat.js +1 -1
- package/dist/lib/components/shadow-claw-control-plane.js +1 -1
- package/dist/lib/components/shadow-claw-conversations.js +1 -1
- package/dist/lib/components/shadow-claw-file-viewer.js +1 -1
- package/dist/lib/components/shadow-claw-files.js +1 -1
- package/dist/lib/components/shadow-claw-git.js +1 -1
- package/dist/lib/components/shadow-claw-integrations.js +1 -1
- package/dist/lib/components/shadow-claw-llm.js +1 -1
- package/dist/lib/components/shadow-claw-mcp-remote.js +1 -1
- package/dist/lib/components/shadow-claw-networking.js +1 -1
- package/dist/lib/components/shadow-claw-page-header.js +1 -1
- package/dist/lib/components/shadow-claw-pages.js +1 -1
- package/dist/lib/components/shadow-claw-peerjs.js +1 -1
- package/dist/lib/components/shadow-claw-settings.js +1 -1
- package/dist/lib/components/shadow-claw-storage.js +1 -1
- package/dist/lib/components/shadow-claw-task-server.js +1 -1
- package/dist/lib/components/shadow-claw-tasks.js +1 -1
- package/dist/lib/components/shadow-claw-terminal.js +1 -1
- package/dist/lib/components/shadow-claw-tools.js +1 -1
- package/dist/lib/components/shadow-claw-webvm.js +1 -1
- package/dist/lib/components/shadow-claw.js +1 -1
- package/dist/lib/{configurePeerJs-CrlGan0m.js → configurePeerJs-oODzltaC.js} +2 -2
- package/dist/lib/{configurePeerJs-CrlGan0m.js.map → configurePeerJs-oODzltaC.js.map} +1 -1
- package/dist/lib/core/control-plane-client.d.ts +1 -0
- package/dist/lib/{downloadGroupFile-DboUjmp2.js → downloadGroupFile-DmcBQU1n.js} +2 -2
- package/dist/lib/{downloadGroupFile-DboUjmp2.js.map → downloadGroupFile-DmcBQU1n.js.map} +1 -1
- package/dist/lib/{file-viewer-BrK2Wxgh.js → file-viewer-C3YKnq_-.js} +4 -3
- package/dist/lib/{file-viewer-BrK2Wxgh.js.map → file-viewer-C3YKnq_-.js.map} +1 -1
- package/dist/lib/index.js +26 -26
- package/dist/lib/{initControlPlane-CsO4UR6_.js → initControlPlane-C2zURVIS.js} +86 -13
- package/dist/lib/initControlPlane-C2zURVIS.js.map +1 -0
- package/dist/lib/{markdown-eeSTFnMA.js → markdown-C6EHl9zs.js} +3 -3
- package/dist/lib/{markdown-eeSTFnMA.js.map → markdown-C6EHl9zs.js.map} +1 -1
- package/dist/lib/{orchestrator-CJvoC2Uu.js → orchestrator-CACLa_Ro.js} +7 -6
- package/dist/lib/{orchestrator-CJvoC2Uu.js.map → orchestrator-CACLa_Ro.js.map} +1 -1
- package/dist/lib/{orchestrator-DCfomsn9.js → orchestrator-KRjx0eba.js} +6 -534
- package/dist/lib/{orchestrator-DCfomsn9.js.map → orchestrator-KRjx0eba.js.map} +1 -1
- package/dist/lib/parsePath-DwC_YZjw.js +16 -0
- package/dist/lib/parsePath-DwC_YZjw.js.map +1 -0
- package/dist/lib/{peerjs-Dp02bXcG.js → peerjs-DFWOBcXf.js} +4 -4
- package/dist/lib/{peerjs-Dp02bXcG.js.map → peerjs-DFWOBcXf.js.map} +1 -1
- package/dist/lib/{readGroupFileBytes-Bve-e5e_.js → readGroupFileBytes-C8oOe8Iu.js} +3 -16
- package/dist/lib/readGroupFileBytes-C8oOe8Iu.js.map +1 -0
- package/dist/lib/security/custom-element-security.d.ts +8 -0
- package/dist/lib/server/control-plane-types.d.ts +1 -1
- package/dist/lib/{shadow-claw-D8xINM3c.js → shadow-claw-6UHdiy4a.js} +5 -5
- package/dist/lib/{shadow-claw-D8xINM3c.js.map → shadow-claw-6UHdiy4a.js.map} +1 -1
- package/dist/lib/{shadow-claw-a2ui-7rJqG4Ke.js → shadow-claw-a2ui-CpZUTzlh.js} +5 -4
- package/dist/lib/{shadow-claw-a2ui-7rJqG4Ke.js.map → shadow-claw-a2ui-CpZUTzlh.js.map} +1 -1
- package/dist/lib/{shadow-claw-accounts-CdruwN8A.js → shadow-claw-accounts-03oJ__XC.js} +2 -2
- package/dist/lib/{shadow-claw-accounts-CdruwN8A.js.map → shadow-claw-accounts-03oJ__XC.js.map} +1 -1
- package/dist/lib/{shadow-claw-channel-config-Bj0-Nk3t.js → shadow-claw-channel-config-DmfwJc6G.js} +3 -3
- package/dist/lib/{shadow-claw-channel-config-Bj0-Nk3t.js.map → shadow-claw-channel-config-DmfwJc6G.js.map} +1 -1
- package/dist/lib/{shadow-claw-channels-C_jI4KhP.js → shadow-claw-channels-1N6Jl-By.js} +3 -3
- package/dist/lib/{shadow-claw-channels-C_jI4KhP.js.map → shadow-claw-channels-1N6Jl-By.js.map} +1 -1
- package/dist/lib/{shadow-claw-chat-B16MspoP.js → shadow-claw-chat-BMoqQJRK.js} +10 -10
- package/dist/lib/{shadow-claw-chat-B16MspoP.js.map → shadow-claw-chat-BMoqQJRK.js.map} +1 -1
- package/dist/lib/{shadow-claw-control-plane-x8Ldid_h.js → shadow-claw-control-plane-UG0o7pCz.js} +6 -6
- package/dist/lib/{shadow-claw-control-plane-x8Ldid_h.js.map → shadow-claw-control-plane-UG0o7pCz.js.map} +1 -1
- package/dist/lib/{shadow-claw-conversations-Ct1kAYdB.js → shadow-claw-conversations-BwXep3iu.js} +4 -3
- package/dist/lib/{shadow-claw-conversations-Ct1kAYdB.js.map → shadow-claw-conversations-BwXep3iu.js.map} +1 -1
- package/dist/lib/{shadow-claw-file-viewer-BfDHHgpA.js → shadow-claw-file-viewer-DUxzVxDT.js} +14 -10
- package/dist/lib/shadow-claw-file-viewer-DUxzVxDT.js.map +1 -0
- package/dist/lib/{shadow-claw-files-EYhOPYIH.js → shadow-claw-files-DIREEnT2.js} +7 -7
- package/dist/lib/{shadow-claw-files-EYhOPYIH.js.map → shadow-claw-files-DIREEnT2.js.map} +1 -1
- package/dist/lib/{shadow-claw-git-tcSpT-P0.js → shadow-claw-git-Bg1SWgsF.js} +4 -4
- package/dist/lib/{shadow-claw-git-tcSpT-P0.js.map → shadow-claw-git-Bg1SWgsF.js.map} +1 -1
- package/dist/lib/{shadow-claw-integrations-NbcCx_ZI.js → shadow-claw-integrations-Ds-CLPhj.js} +2 -2
- package/dist/lib/{shadow-claw-integrations-NbcCx_ZI.js.map → shadow-claw-integrations-Ds-CLPhj.js.map} +1 -1
- package/dist/lib/{shadow-claw-llm-BazJdD5f.js → shadow-claw-llm-CazBrVpM.js} +3 -3
- package/dist/lib/{shadow-claw-llm-BazJdD5f.js.map → shadow-claw-llm-CazBrVpM.js.map} +1 -1
- package/dist/lib/{shadow-claw-mcp-remote-CYmhpg7a.js → shadow-claw-mcp-remote-CT5Q-54E.js} +2 -2
- package/dist/lib/{shadow-claw-mcp-remote-CYmhpg7a.js.map → shadow-claw-mcp-remote-CT5Q-54E.js.map} +1 -1
- package/dist/lib/{shadow-claw-networking-DImPxe0H.js → shadow-claw-networking-Df85tCbO.js} +2 -2
- package/dist/lib/{shadow-claw-networking-DImPxe0H.js.map → shadow-claw-networking-Df85tCbO.js.map} +1 -1
- package/dist/lib/{shadow-claw-page-header-CcHUfFUx.js → shadow-claw-page-header-Cti2fzf-.js} +2 -2
- package/dist/lib/{shadow-claw-page-header-CcHUfFUx.js.map → shadow-claw-page-header-Cti2fzf-.js.map} +1 -1
- package/dist/lib/{shadow-claw-pages-D54jF1Qq.js → shadow-claw-pages-BgPyIEZO.js} +15 -11
- package/dist/lib/shadow-claw-pages-BgPyIEZO.js.map +1 -0
- package/dist/lib/{shadow-claw-peerjs-B9-T8Nlx.js → shadow-claw-peerjs-xkBXILed.js} +3 -3
- package/dist/lib/{shadow-claw-peerjs-B9-T8Nlx.js.map → shadow-claw-peerjs-xkBXILed.js.map} +1 -1
- package/dist/lib/{shadow-claw-settings-Bt1VAe-1.js → shadow-claw-settings-CN89xRVU.js} +4 -4
- package/dist/lib/{shadow-claw-settings-Bt1VAe-1.js.map → shadow-claw-settings-CN89xRVU.js.map} +1 -1
- package/dist/lib/{shadow-claw-storage-CFOjGf1d.js → shadow-claw-storage-VnhcObCe.js} +3 -3
- package/dist/lib/{shadow-claw-storage-CFOjGf1d.js.map → shadow-claw-storage-VnhcObCe.js.map} +1 -1
- package/dist/lib/{shadow-claw-task-server-BiKa2GOm.js → shadow-claw-task-server-jgEC2hHB.js} +2 -2
- package/dist/lib/{shadow-claw-task-server-BiKa2GOm.js.map → shadow-claw-task-server-jgEC2hHB.js.map} +1 -1
- package/dist/lib/{shadow-claw-tasks-DDHd8W4d.js → shadow-claw-tasks-i_evIufy.js} +6 -6
- package/dist/lib/{shadow-claw-tasks-DDHd8W4d.js.map → shadow-claw-tasks-i_evIufy.js.map} +1 -1
- package/dist/lib/{shadow-claw-terminal-kB6_tWKz.js → shadow-claw-terminal-CwScROlu.js} +2 -2
- package/dist/lib/{shadow-claw-terminal-kB6_tWKz.js.map → shadow-claw-terminal-CwScROlu.js.map} +1 -1
- package/dist/lib/{shadow-claw-tools-DxXIm0ku.js → shadow-claw-tools-DD3fyXP4.js} +5 -4
- package/dist/lib/{shadow-claw-tools-DxXIm0ku.js.map → shadow-claw-tools-DD3fyXP4.js.map} +1 -1
- package/dist/lib/{shadow-claw-webvm-Dc8oo7ao.js → shadow-claw-webvm-DbJq4I3-.js} +2 -2
- package/dist/lib/{shadow-claw-webvm-Dc8oo7ao.js.map → shadow-claw-webvm-DbJq4I3-.js.map} +1 -1
- package/dist/lib/{syncWebMcpRegistration-jyRGbC9w.js → syncWebMcpRegistration-DNLnQ-jz.js} +3 -2
- package/dist/lib/{syncWebMcpRegistration-jyRGbC9w.js.map → syncWebMcpRegistration-DNLnQ-jz.js.map} +1 -1
- package/dist/lib/tools-DwwB9RBa.js +546 -0
- package/dist/lib/tools-DwwB9RBa.js.map +1 -0
- package/dist/lib/{trusted-types-CkLDpLiZ.js → trusted-types-Dx0RZlrd.js} +19 -8
- package/dist/lib/trusted-types-Dx0RZlrd.js.map +1 -0
- package/dist/lib/utils/index.js +1 -1
- package/dist/lib/utils/utils.js +1 -1
- package/dist/public/.well-known/agent-skills/index.json +14 -0
- package/dist/public/AGENTS.md +5 -3
- package/dist/public/README.md +5 -3
- package/dist/public/agent.worker.js +1 -1
- package/dist/public/{configurePeerJs-COcwE0E7.js → configurePeerJs-BqgeBjP7.js} +1 -1
- package/dist/public/custom-element-security-FU04Cq05.js +1 -0
- package/dist/public/dist-B9m1QM9v.js +58 -0
- package/dist/public/docs/README.md +31 -31
- package/dist/public/docs/example/article/index.html +1 -1
- package/dist/public/docs/publishing/index.html +1 -1
- package/dist/public/docs/skill-creator/index.html +1 -1
- package/dist/public/docs/subsystems/a2ui.md +11 -1
- package/dist/public/docs/subsystems/cli.md +29 -0
- package/dist/public/docs/subsystems/control-plane.md +8 -2
- package/dist/public/docs/subsystems/custom-element-security.md +19 -9
- package/dist/public/docs/subsystems/mcp-server.md +39 -15
- package/dist/public/docs/subsystems/skills.md +30 -0
- package/dist/public/docs/subsystems/webmcp.md +9 -0
- package/dist/public/downloadGroupFile-D8KRJGGL.js +1 -0
- package/dist/public/e2e/README.md +7 -4
- package/dist/public/{e2e-bridge-CHARpbpW.js → e2e-bridge-Ceqr5kGc.js} +1 -1
- package/dist/public/effect-BJCrpFdp.js +1 -0
- package/dist/public/file-viewer-C-6Jc_tb.js +1 -0
- package/dist/public/index.html +1 -1
- package/dist/public/index.js +1 -1
- package/dist/public/initControlPlane-BN9cWyO0.js +1 -0
- package/dist/public/main/index.html +1 -1
- package/dist/public/main/memory/index.html +1 -1
- package/dist/public/{markdown-1I3O6Mmd.js → markdown-C3M4OW_A.js} +1 -1
- package/dist/public/{orchestrator-Cl95w2vb.js → orchestrator-CMbCTjBf.js} +7 -7
- package/dist/public/{orchestrator-D-xlXG92.js → orchestrator-DHjdLtqa.js} +663 -663
- package/dist/public/peerjs-DUCKH-m9.js +1 -0
- package/dist/public/service-worker.js +1 -1
- package/dist/public/{shadow-claw-CaoKmIIB.js → shadow-claw-EAt2ml5Y.js} +3 -3
- package/dist/public/{shadow-claw-accounts-CJvYC4li.js → shadow-claw-accounts-xUOLBsQZ.js} +1 -1
- package/dist/public/{shadow-claw-channels-3K62sU5f.js → shadow-claw-channels-XsfuWFF8.js} +4 -4
- package/dist/public/{shadow-claw-chat-Cu2keU2I.js → shadow-claw-chat-CbSaOZ4q.js} +7 -7
- package/dist/public/{shadow-claw-control-plane-D1OwlQI_.js → shadow-claw-control-plane-DHvN3Ukg.js} +2 -2
- package/dist/public/{shadow-claw-conversations-DDtg3BEZ.js → shadow-claw-conversations-BWs5VVfs.js} +2 -2
- package/dist/public/{shadow-claw-file-viewer-BR__1z9S.js → shadow-claw-file-viewer-BWsoW5QS.js} +5 -4
- package/dist/public/{shadow-claw-files-BJSyZ-Bl.js → shadow-claw-files-CG7MqWiV.js} +8 -8
- package/dist/public/{shadow-claw-git-MAjhXRLc.js → shadow-claw-git-DBRPZNav.js} +6 -6
- package/dist/public/{shadow-claw-integrations-82UoFuDR.js → shadow-claw-integrations-BBVnO0Fc.js} +8 -8
- package/dist/public/{shadow-claw-llm-R8j0lwPP.js → shadow-claw-llm-DMvLgKXo.js} +2 -2
- package/dist/public/{shadow-claw-mcp-remote-BzZoz4LX.js → shadow-claw-mcp-remote-Bkx0gsmF.js} +2 -2
- package/dist/public/{shadow-claw-networking-DLEd9cNm.js → shadow-claw-networking-Dd8Rw31D.js} +2 -2
- package/dist/public/{shadow-claw-notifications-1vwR7TbT.js → shadow-claw-notifications-Dbevj-lq.js} +2 -2
- package/dist/public/{shadow-claw-page-header-DMKbkv3s.js → shadow-claw-page-header-BccSHItx.js} +1 -1
- package/dist/public/{shadow-claw-pages-CjyeIV__.js → shadow-claw-pages-3_lQAv0t.js} +4 -3
- package/dist/public/{shadow-claw-settings-BfbT4dBU.js → shadow-claw-settings-t8TIlgrM.js} +5 -5
- package/dist/public/{shadow-claw-storage-C-mWQQML.js → shadow-claw-storage-CfEXoSIE.js} +2 -2
- package/dist/public/{shadow-claw-task-server-D3lHp0Nc.js → shadow-claw-task-server-DxQSsgRZ.js} +2 -2
- package/dist/public/{shadow-claw-tasks-DVVWEm-c.js → shadow-claw-tasks-DNpicQwz.js} +14 -14
- package/dist/public/{shadow-claw-terminal-BwuTRp-O.js → shadow-claw-terminal-DpY6zU_r.js} +1 -1
- package/dist/public/{shadow-claw-toast-ClCwgzFG.js → shadow-claw-toast-BkrQIP-3.js} +1 -1
- package/dist/public/{shadow-claw-tools-zFLk2nbV.js → shadow-claw-tools-WSwWohnk.js} +2 -2
- package/dist/public/{shadow-claw-webvm-qR9X7fg7.js → shadow-claw-webvm-CP6oFjg5.js} +2 -2
- package/dist/public/syncWebMcpRegistration-DOn9gLnD.js +1 -0
- package/dist/public/toast-BXgUfbyh.js +1 -0
- package/dist/public/tools-DvckJZG2.js +1 -0
- package/dist/server.js +188 -188
- package/package.json +3 -1
- package/src/components/shadow-claw-a2ui/shadow-claw-a2ui.stories.ts +1380 -93
- package/src/components/shadow-claw-a2ui/shadow-claw-a2ui.ts +11 -6
- package/src/components/shadow-claw-file-viewer/shadow-claw-file-viewer.test.ts +8 -1
- package/src/components/shadow-claw-file-viewer/shadow-claw-file-viewer.ts +13 -5
- package/src/components/shadow-claw-pages/utils/buildHtmlPageSrcdoc.ts +13 -5
- package/src/core/control-plane-client.ts +15 -0
- package/src/core/utils/initControlPlane.test.ts +187 -0
- package/src/core/utils/initControlPlane.ts +194 -20
- package/src/security/custom-element-security.test.ts +51 -0
- package/src/security/custom-element-security.ts +33 -15
- package/src/server/control-plane-types.ts +1 -0
- package/src/server/control-plane.test.ts +69 -0
- package/src/server/control-plane.ts +45 -3
- package/src/server/mcp/tools/built-in-tools.ts +80 -5
- package/src/server/mcp/tools/client-tool-relay.ts +183 -26
- package/src/server/mcp/tools/mcp-tools.test.ts +140 -0
- package/src/server/middleware/static-files.test.ts +142 -0
- package/src/server/middleware/static-files.ts +66 -8
- package/src/testing/jest-setup.ts +1 -0
- package/src/worker/utils/handleMessage.ts +4 -1
- package/dist/lib/initControlPlane-CsO4UR6_.js.map +0 -1
- package/dist/lib/readGroupFileBytes-Bve-e5e_.js.map +0 -1
- package/dist/lib/shadow-claw-file-viewer-BfDHHgpA.js.map +0 -1
- package/dist/lib/shadow-claw-pages-D54jF1Qq.js.map +0 -1
- package/dist/lib/trusted-types-CkLDpLiZ.js.map +0 -1
- package/dist/public/custom-element-security-NCqQ5lmC.js +0 -1
- package/dist/public/downloadGroupFile-G0BZQgQg.js +0 -1
- package/dist/public/effect-rHYr4nfu.js +0 -1
- package/dist/public/file-viewer-8PdCURDD.js +0 -1
- package/dist/public/initControlPlane-CcGXax0A.js +0 -1
- package/dist/public/peerjs-BZdxWQFv.js +0 -1
- package/dist/public/syncWebMcpRegistration-DD42YsYV.js +0 -1
- package/dist/public/toast-HAq8XWFj.js +0 -58
|
@@ -1,105 +1,198 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from "@storybook/web-components";
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import "./shadow-claw-a2ui.js";
|
|
4
|
+
import type { ShadowClawA2UI } from "./shadow-claw-a2ui.js";
|
|
5
|
+
import type { A2UIEnvelope } from "../../ui/a2ui/types.js";
|
|
6
|
+
|
|
7
|
+
function renderA2UIEnvelope(
|
|
8
|
+
envelope: A2UIEnvelope,
|
|
9
|
+
maxWidth = "38rem",
|
|
10
|
+
): HTMLElement {
|
|
11
|
+
const container = document.createElement("div");
|
|
12
|
+
container.style.maxWidth = maxWidth;
|
|
13
|
+
container.style.width = "100%";
|
|
14
|
+
container.style.boxSizing = "border-box";
|
|
15
|
+
|
|
16
|
+
const el = document.createElement("shadow-claw-a2ui") as ShadowClawA2UI;
|
|
17
|
+
if (
|
|
18
|
+
typeof customElements !== "undefined" &&
|
|
19
|
+
typeof customElements.upgrade === "function"
|
|
20
|
+
) {
|
|
21
|
+
customElements.upgrade(el);
|
|
22
|
+
}
|
|
23
|
+
container.append(el);
|
|
24
|
+
|
|
25
|
+
const apply = () => {
|
|
26
|
+
if (typeof el.applyEnvelope === "function") {
|
|
27
|
+
el.applyEnvelope(envelope);
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
apply();
|
|
32
|
+
|
|
33
|
+
if (
|
|
34
|
+
typeof customElements !== "undefined" &&
|
|
35
|
+
typeof customElements.whenDefined === "function"
|
|
36
|
+
) {
|
|
37
|
+
customElements.whenDefined("shadow-claw-a2ui").then(apply);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// Microtask and tick fallbacks to guarantee envelope rendering
|
|
41
|
+
queueMicrotask(apply);
|
|
42
|
+
setTimeout(apply, 0);
|
|
43
|
+
|
|
44
|
+
return container;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const sampleSvgImage =
|
|
48
|
+
"data:image/svg+xml;utf8," +
|
|
49
|
+
encodeURIComponent(
|
|
50
|
+
'<svg xmlns="http://www.w3.org/2000/svg" width="640" height="240" viewBox="0 0 640 240">' +
|
|
51
|
+
'<defs><linearGradient id="g" x1="0%" y1="0%" x2="100%" y2="100%">' +
|
|
52
|
+
'<stop offset="0%" stop-color="#3b82f6"/><stop offset="100%" stop-color="#8b5cf6"/>' +
|
|
53
|
+
"</linearGradient></defs>" +
|
|
54
|
+
'<rect width="100%" height="100%" rx="12" fill="url(#g)"/>' +
|
|
55
|
+
'<text x="50%" y="45%" dominant-baseline="middle" text-anchor="middle" fill="#ffffff" font-family="system-ui, sans-serif" font-weight="700" font-size="22">A2UI Responsive Media</text>' +
|
|
56
|
+
'<text x="50%" y="62%" dominant-baseline="middle" text-anchor="middle" fill="#e0e7ff" font-family="system-ui, sans-serif" font-size="14">v1.0 Basic Catalog Vector Preview</text>' +
|
|
57
|
+
"</svg>",
|
|
58
|
+
);
|
|
59
|
+
|
|
60
|
+
const samplePosterImage =
|
|
61
|
+
"data:image/svg+xml;utf8," +
|
|
62
|
+
encodeURIComponent(
|
|
63
|
+
'<svg xmlns="http://www.w3.org/2000/svg" width="640" height="360" viewBox="0 0 640 360">' +
|
|
64
|
+
'<rect width="100%" height="100%" rx="12" fill="#0f172a"/>' +
|
|
65
|
+
'<circle cx="320" cy="180" r="44" fill="#38bdf8" opacity="0.85"/>' +
|
|
66
|
+
'<polygon points="312,162 336,180 312,198" fill="#ffffff"/>' +
|
|
67
|
+
'<text x="320" y="260" dominant-baseline="middle" text-anchor="middle" fill="#94a3b8" font-family="system-ui, sans-serif" font-size="16">Video Player Preview</text>' +
|
|
68
|
+
"</svg>",
|
|
69
|
+
);
|
|
4
70
|
|
|
5
71
|
const meta: Meta = {
|
|
6
72
|
title: "Components/A2UI/ShadowClawA2UI",
|
|
7
73
|
component: "shadow-claw-a2ui",
|
|
8
74
|
tags: ["autodocs"],
|
|
9
75
|
render: (args) => {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
id: "root",
|
|
31
|
-
component: "Card",
|
|
32
|
-
child: "main-col",
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
id: "main-col",
|
|
36
|
-
component: "Column",
|
|
37
|
-
children: ["title", "desc", "divider1", "slider1", "actions-row"],
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
id: "title",
|
|
41
|
-
component: "Text",
|
|
42
|
-
text: args.title ?? "Generative AI Surface",
|
|
43
|
-
variant: "heading",
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
id: "desc",
|
|
47
|
-
component: "Text",
|
|
48
|
-
text:
|
|
49
|
-
args.description ??
|
|
50
|
-
"Rendered via the A2UI v1.0 protocol dynamically from assistant instructions.",
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
id: "divider1",
|
|
54
|
-
component: "Divider",
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
id: "slider1",
|
|
58
|
-
component: "Slider",
|
|
59
|
-
label: "Creativity Level",
|
|
60
|
-
min: 0,
|
|
61
|
-
max: 100,
|
|
62
|
-
value: 65,
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
id: "actions-row",
|
|
66
|
-
component: "Row",
|
|
67
|
-
children: ["btn-submit", "btn-cancel"],
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
id: "btn-submit",
|
|
71
|
-
component: "Button",
|
|
72
|
-
text: "Execute Plan",
|
|
73
|
-
variant: "primary",
|
|
74
|
-
action: { id: "execute-plan" },
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
id: "btn-cancel",
|
|
78
|
-
component: "Button",
|
|
79
|
-
text: "Dismiss",
|
|
80
|
-
variant: "secondary",
|
|
81
|
-
action: { id: "dismiss" },
|
|
82
|
-
},
|
|
76
|
+
return renderA2UIEnvelope({
|
|
77
|
+
type: "createSurface",
|
|
78
|
+
surfaceId: "demo-surface",
|
|
79
|
+
components: [
|
|
80
|
+
{
|
|
81
|
+
id: "root",
|
|
82
|
+
component: "Card",
|
|
83
|
+
child: "main-col",
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
id: "main-col",
|
|
87
|
+
component: "Column",
|
|
88
|
+
children: [
|
|
89
|
+
"header-row",
|
|
90
|
+
"divider-top",
|
|
91
|
+
"prompt-field",
|
|
92
|
+
"options-row",
|
|
93
|
+
"slider-item",
|
|
94
|
+
"divider-bottom",
|
|
95
|
+
"actions-row",
|
|
83
96
|
],
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
id: "header-row",
|
|
100
|
+
component: "Row",
|
|
101
|
+
align: "center",
|
|
102
|
+
justify: "spaceBetween",
|
|
103
|
+
children: ["header-texts", "header-icon"],
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
id: "header-texts",
|
|
107
|
+
component: "Column",
|
|
108
|
+
children: ["title", "desc"],
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
id: "title",
|
|
112
|
+
component: "Text",
|
|
113
|
+
text: args.title ?? "Generative AI Surface",
|
|
114
|
+
variant: "h2",
|
|
115
|
+
weight: "bold",
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
id: "desc",
|
|
119
|
+
component: "Text",
|
|
120
|
+
text:
|
|
121
|
+
args.description ??
|
|
122
|
+
"Rendered via the A2UI v1.0 protocol dynamically from assistant instructions.",
|
|
123
|
+
variant: "caption",
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
id: "header-icon",
|
|
127
|
+
component: "Icon",
|
|
128
|
+
name: "smart_toy",
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
id: "divider-top",
|
|
132
|
+
component: "Divider",
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
id: "prompt-field",
|
|
136
|
+
component: "TextField",
|
|
137
|
+
label: "Agent Instructions",
|
|
138
|
+
variant: "longText",
|
|
139
|
+
value:
|
|
140
|
+
"Analyze current cluster telemetry, verify health status, and draft resolution steps.",
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
id: "options-row",
|
|
144
|
+
component: "Row",
|
|
145
|
+
justify: "spaceBetween",
|
|
146
|
+
align: "center",
|
|
147
|
+
children: ["stream-check", "auto-exec-check"],
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
id: "stream-check",
|
|
151
|
+
component: "CheckBox",
|
|
152
|
+
label: "Enable Streaming",
|
|
153
|
+
value: true,
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
id: "auto-exec-check",
|
|
157
|
+
component: "CheckBox",
|
|
158
|
+
label: "Tool Allowlist Only",
|
|
159
|
+
value: true,
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
id: "slider-item",
|
|
163
|
+
component: "Slider",
|
|
164
|
+
label: "Creativity Level",
|
|
165
|
+
min: 0,
|
|
166
|
+
max: 100,
|
|
167
|
+
value: 65,
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
id: "divider-bottom",
|
|
171
|
+
component: "Divider",
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
id: "actions-row",
|
|
175
|
+
component: "Row",
|
|
176
|
+
justify: "end",
|
|
177
|
+
children: ["btn-cancel", "btn-submit"],
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
id: "btn-cancel",
|
|
181
|
+
component: "Button",
|
|
182
|
+
text: "Dismiss",
|
|
183
|
+
variant: "secondary",
|
|
184
|
+
action: { event: { name: "dismiss" } },
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
id: "btn-submit",
|
|
188
|
+
component: "Button",
|
|
189
|
+
text: "Execute Plan",
|
|
190
|
+
variant: "primary",
|
|
191
|
+
action: { event: { name: "execute-plan" } },
|
|
192
|
+
},
|
|
193
|
+
],
|
|
194
|
+
dataModel: {},
|
|
195
|
+
});
|
|
103
196
|
},
|
|
104
197
|
args: {
|
|
105
198
|
title: "Generative AI Surface",
|
|
@@ -117,3 +210,1197 @@ export default meta;
|
|
|
117
210
|
type Story = StoryObj;
|
|
118
211
|
|
|
119
212
|
export const InteractiveSurface: Story = {};
|
|
213
|
+
|
|
214
|
+
export const AllComponents: Story = {
|
|
215
|
+
render: () => {
|
|
216
|
+
return renderA2UIEnvelope(
|
|
217
|
+
{
|
|
218
|
+
type: "createSurface",
|
|
219
|
+
surfaceId: "all-components-surface",
|
|
220
|
+
components: [
|
|
221
|
+
{
|
|
222
|
+
id: "root",
|
|
223
|
+
component: "Card",
|
|
224
|
+
child: "main-container",
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
id: "main-container",
|
|
228
|
+
component: "Column",
|
|
229
|
+
children: [
|
|
230
|
+
"header-bar",
|
|
231
|
+
"div-1",
|
|
232
|
+
"catalog-tabs",
|
|
233
|
+
"div-2",
|
|
234
|
+
"footer-actions",
|
|
235
|
+
],
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
id: "header-bar",
|
|
239
|
+
component: "Row",
|
|
240
|
+
align: "center",
|
|
241
|
+
justify: "spaceBetween",
|
|
242
|
+
children: ["header-title-group", "header-badge-icon"],
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
id: "header-title-group",
|
|
246
|
+
component: "Column",
|
|
247
|
+
children: ["catalog-heading", "catalog-caption"],
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
id: "catalog-heading",
|
|
251
|
+
component: "Text",
|
|
252
|
+
text: "A2UI v1.0 Basic Catalog (All 18 Components)",
|
|
253
|
+
variant: "h2",
|
|
254
|
+
weight: "bold",
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
id: "catalog-caption",
|
|
258
|
+
component: "Text",
|
|
259
|
+
text: "Complete showcase of all 18 official A2UI Basic catalog components in one surface.",
|
|
260
|
+
variant: "caption",
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
id: "header-badge-icon",
|
|
264
|
+
component: "Icon",
|
|
265
|
+
name: "verified",
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
id: "div-1",
|
|
269
|
+
component: "Divider",
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
id: "catalog-tabs",
|
|
273
|
+
component: "Tabs",
|
|
274
|
+
tabs: [
|
|
275
|
+
{ title: "Inputs & Selection", child: "tab-inputs" },
|
|
276
|
+
{ title: "Layout & Data", child: "tab-layout" },
|
|
277
|
+
{ title: "Media & Modals", child: "tab-media" },
|
|
278
|
+
],
|
|
279
|
+
},
|
|
280
|
+
// ── Tab 1: Inputs & Selection ────────────────────────────────────
|
|
281
|
+
{
|
|
282
|
+
id: "tab-inputs",
|
|
283
|
+
component: "Column",
|
|
284
|
+
children: [
|
|
285
|
+
"text-field-std",
|
|
286
|
+
"text-field-obscured",
|
|
287
|
+
"text-field-long",
|
|
288
|
+
"checkbox-group",
|
|
289
|
+
"choice-picker-single",
|
|
290
|
+
"choice-picker-multi",
|
|
291
|
+
"slider-ctrl",
|
|
292
|
+
"datetime-ctrl",
|
|
293
|
+
],
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
id: "text-field-std",
|
|
297
|
+
component: "TextField",
|
|
298
|
+
label: "Model Name (TextField)",
|
|
299
|
+
value: { path: "/model" },
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
id: "text-field-obscured",
|
|
303
|
+
component: "TextField",
|
|
304
|
+
label: "API Access Key (TextField variant: obscured)",
|
|
305
|
+
variant: "obscured",
|
|
306
|
+
value: "sk-ant-live-mock-token-9982",
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
id: "text-field-long",
|
|
310
|
+
component: "TextField",
|
|
311
|
+
label: "System Prompt Instructions (TextField variant: longText)",
|
|
312
|
+
variant: "longText",
|
|
313
|
+
value:
|
|
314
|
+
"You are an autonomous engineering agent configured with A2UI surfaces.",
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
id: "checkbox-group",
|
|
318
|
+
component: "Row",
|
|
319
|
+
justify: "spaceBetween",
|
|
320
|
+
children: ["cb-1", "cb-2"],
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
id: "cb-1",
|
|
324
|
+
component: "CheckBox",
|
|
325
|
+
label: "Enable Streaming (CheckBox)",
|
|
326
|
+
value: { path: "/streaming" },
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
id: "cb-2",
|
|
330
|
+
component: "CheckBox",
|
|
331
|
+
label: "Sandboxed WebVM (CheckBox)",
|
|
332
|
+
value: { path: "/sandboxed" },
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
id: "choice-picker-single",
|
|
336
|
+
component: "ChoicePicker",
|
|
337
|
+
variant: "singleSelection",
|
|
338
|
+
value: { path: "/activeModel" },
|
|
339
|
+
options: [
|
|
340
|
+
{
|
|
341
|
+
label: "Claude 3.7 Sonnet (ChoicePicker Single)",
|
|
342
|
+
value: "sonnet",
|
|
343
|
+
},
|
|
344
|
+
{ label: "GPT-4o", value: "gpt4o" },
|
|
345
|
+
{ label: "Gemini 2.5 Flash", value: "gemini" },
|
|
346
|
+
],
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
id: "choice-picker-multi",
|
|
350
|
+
component: "ChoicePicker",
|
|
351
|
+
variant: "multipleSelection",
|
|
352
|
+
value: { path: "/selectedTools" },
|
|
353
|
+
options: [
|
|
354
|
+
{ label: "Code Search (ChoicePicker Multi)", value: "search" },
|
|
355
|
+
{ label: "Bash Tool", value: "bash" },
|
|
356
|
+
{ label: "Web Fetch", value: "fetch" },
|
|
357
|
+
],
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
id: "slider-ctrl",
|
|
361
|
+
component: "Slider",
|
|
362
|
+
label: "Generation Temperature (Slider)",
|
|
363
|
+
min: 0,
|
|
364
|
+
max: 100,
|
|
365
|
+
steps: 5,
|
|
366
|
+
value: { path: "/temperature" },
|
|
367
|
+
},
|
|
368
|
+
{
|
|
369
|
+
id: "datetime-ctrl",
|
|
370
|
+
component: "DateTimeInput",
|
|
371
|
+
label: "Trigger Execution Timestamp (DateTimeInput)",
|
|
372
|
+
enableDate: true,
|
|
373
|
+
enableTime: true,
|
|
374
|
+
value: "2026-09-03T14:00",
|
|
375
|
+
},
|
|
376
|
+
// ── Tab 2: Layout & Data ─────────────────────────────────────────
|
|
377
|
+
{
|
|
378
|
+
id: "tab-layout",
|
|
379
|
+
component: "Column",
|
|
380
|
+
children: ["row-demo", "list-demo"],
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
id: "row-demo",
|
|
384
|
+
component: "Row",
|
|
385
|
+
justify: "spaceBetween",
|
|
386
|
+
align: "center",
|
|
387
|
+
children: ["chip-a", "chip-b", "chip-c"],
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
id: "chip-a",
|
|
391
|
+
component: "Button",
|
|
392
|
+
variant: "secondary",
|
|
393
|
+
text: "Row Item A",
|
|
394
|
+
action: { event: { name: "item-a" } },
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
id: "chip-b",
|
|
398
|
+
component: "Button",
|
|
399
|
+
variant: "secondary",
|
|
400
|
+
text: "Row Item B",
|
|
401
|
+
action: { event: { name: "item-b" } },
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
id: "chip-c",
|
|
405
|
+
component: "Button",
|
|
406
|
+
variant: "secondary",
|
|
407
|
+
text: "Row Item C",
|
|
408
|
+
action: { event: { name: "item-c" } },
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
id: "list-demo",
|
|
412
|
+
component: "List",
|
|
413
|
+
direction: "vertical",
|
|
414
|
+
children: ["list-card-1", "list-card-2"],
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
id: "list-card-1",
|
|
418
|
+
component: "Card",
|
|
419
|
+
child: "list-item-1-row",
|
|
420
|
+
},
|
|
421
|
+
{
|
|
422
|
+
id: "list-item-1-row",
|
|
423
|
+
component: "Row",
|
|
424
|
+
justify: "spaceBetween",
|
|
425
|
+
align: "center",
|
|
426
|
+
children: ["list-item-1-text", "list-item-1-icon"],
|
|
427
|
+
},
|
|
428
|
+
{
|
|
429
|
+
id: "list-item-1-text",
|
|
430
|
+
component: "Text",
|
|
431
|
+
text: "List Item 1 (Inside Card component)",
|
|
432
|
+
variant: "body",
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
id: "list-item-1-icon",
|
|
436
|
+
component: "Icon",
|
|
437
|
+
name: "check_circle",
|
|
438
|
+
},
|
|
439
|
+
{
|
|
440
|
+
id: "list-card-2",
|
|
441
|
+
component: "Card",
|
|
442
|
+
child: "list-item-2-row",
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
id: "list-item-2-row",
|
|
446
|
+
component: "Row",
|
|
447
|
+
justify: "spaceBetween",
|
|
448
|
+
align: "center",
|
|
449
|
+
children: ["list-item-2-text", "list-item-2-icon"],
|
|
450
|
+
},
|
|
451
|
+
{
|
|
452
|
+
id: "list-item-2-text",
|
|
453
|
+
component: "Text",
|
|
454
|
+
text: "List Item 2 (Inside Card component)",
|
|
455
|
+
variant: "body",
|
|
456
|
+
},
|
|
457
|
+
{
|
|
458
|
+
id: "list-item-2-icon",
|
|
459
|
+
component: "Icon",
|
|
460
|
+
name: "bolt",
|
|
461
|
+
},
|
|
462
|
+
// ── Tab 3: Media & Modals ────────────────────────────────────────
|
|
463
|
+
{
|
|
464
|
+
id: "tab-media",
|
|
465
|
+
component: "Column",
|
|
466
|
+
children: [
|
|
467
|
+
"img-preview",
|
|
468
|
+
"audio-preview",
|
|
469
|
+
"video-preview",
|
|
470
|
+
"modal-preview",
|
|
471
|
+
],
|
|
472
|
+
},
|
|
473
|
+
{
|
|
474
|
+
id: "img-preview",
|
|
475
|
+
component: "Image",
|
|
476
|
+
url: sampleSvgImage,
|
|
477
|
+
description: "A2UI Vector Image Component",
|
|
478
|
+
variant: "mediumFeature",
|
|
479
|
+
fit: "cover",
|
|
480
|
+
},
|
|
481
|
+
{
|
|
482
|
+
id: "audio-preview",
|
|
483
|
+
component: "AudioPlayer",
|
|
484
|
+
url: "https://actions.google.com/sounds/v1/alarms/beep_short.ogg",
|
|
485
|
+
description: "Notification Chime (AudioPlayer Component)",
|
|
486
|
+
},
|
|
487
|
+
{
|
|
488
|
+
id: "video-preview",
|
|
489
|
+
component: "Video",
|
|
490
|
+
url: "https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerBlazes.mp4",
|
|
491
|
+
posterUrl: samplePosterImage,
|
|
492
|
+
},
|
|
493
|
+
{
|
|
494
|
+
id: "modal-preview",
|
|
495
|
+
component: "Modal",
|
|
496
|
+
trigger: "modal-trigger-btn",
|
|
497
|
+
content: "modal-inner-card",
|
|
498
|
+
},
|
|
499
|
+
{
|
|
500
|
+
id: "modal-trigger-btn",
|
|
501
|
+
component: "Button",
|
|
502
|
+
variant: "primary",
|
|
503
|
+
text: "Open Dialog (Modal Component)",
|
|
504
|
+
},
|
|
505
|
+
{
|
|
506
|
+
id: "modal-inner-card",
|
|
507
|
+
component: "Card",
|
|
508
|
+
child: "modal-inner-col",
|
|
509
|
+
},
|
|
510
|
+
{
|
|
511
|
+
id: "modal-inner-col",
|
|
512
|
+
component: "Column",
|
|
513
|
+
children: ["modal-title", "modal-body", "modal-close-btn"],
|
|
514
|
+
},
|
|
515
|
+
{
|
|
516
|
+
id: "modal-title",
|
|
517
|
+
component: "Text",
|
|
518
|
+
text: "A2UI Modal Overlay Active",
|
|
519
|
+
variant: "h3",
|
|
520
|
+
weight: "bold",
|
|
521
|
+
},
|
|
522
|
+
{
|
|
523
|
+
id: "modal-body",
|
|
524
|
+
component: "Text",
|
|
525
|
+
text: "This dialog content is dynamically rendered inside the surface modal container.",
|
|
526
|
+
variant: "body",
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
id: "modal-close-btn",
|
|
530
|
+
component: "Button",
|
|
531
|
+
variant: "secondary",
|
|
532
|
+
text: "Close Dialog",
|
|
533
|
+
action: { event: { name: "closeModal" } },
|
|
534
|
+
},
|
|
535
|
+
// ── Footer Actions ───────────────────────────────────────────────
|
|
536
|
+
{
|
|
537
|
+
id: "div-2",
|
|
538
|
+
component: "Divider",
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
id: "footer-actions",
|
|
542
|
+
component: "Row",
|
|
543
|
+
justify: "end",
|
|
544
|
+
children: ["btn-reset", "btn-save"],
|
|
545
|
+
},
|
|
546
|
+
{
|
|
547
|
+
id: "btn-reset",
|
|
548
|
+
component: "Button",
|
|
549
|
+
variant: "secondary",
|
|
550
|
+
text: "Reset Surface",
|
|
551
|
+
action: { event: { name: "reset" } },
|
|
552
|
+
},
|
|
553
|
+
{
|
|
554
|
+
id: "btn-save",
|
|
555
|
+
component: "Button",
|
|
556
|
+
variant: "primary",
|
|
557
|
+
text: "Apply Changes",
|
|
558
|
+
action: { event: { name: "save" } },
|
|
559
|
+
},
|
|
560
|
+
],
|
|
561
|
+
dataModel: {
|
|
562
|
+
model: "claude-3-7-sonnet",
|
|
563
|
+
streaming: true,
|
|
564
|
+
sandboxed: false,
|
|
565
|
+
activeModel: "sonnet",
|
|
566
|
+
selectedTools: ["search", "bash"],
|
|
567
|
+
temperature: 70,
|
|
568
|
+
},
|
|
569
|
+
},
|
|
570
|
+
"42rem",
|
|
571
|
+
);
|
|
572
|
+
},
|
|
573
|
+
};
|
|
574
|
+
|
|
575
|
+
export const Text: Story = {
|
|
576
|
+
render: () =>
|
|
577
|
+
renderA2UIEnvelope({
|
|
578
|
+
type: "createSurface",
|
|
579
|
+
surfaceId: "text-surface",
|
|
580
|
+
components: [
|
|
581
|
+
{ id: "root", component: "Card", child: "col" },
|
|
582
|
+
{
|
|
583
|
+
id: "col",
|
|
584
|
+
component: "Column",
|
|
585
|
+
children: [
|
|
586
|
+
"h1",
|
|
587
|
+
"h2",
|
|
588
|
+
"h3",
|
|
589
|
+
"h4",
|
|
590
|
+
"h5",
|
|
591
|
+
"body",
|
|
592
|
+
"caption",
|
|
593
|
+
"data-bound",
|
|
594
|
+
],
|
|
595
|
+
},
|
|
596
|
+
{
|
|
597
|
+
id: "h1",
|
|
598
|
+
component: "Text",
|
|
599
|
+
text: "Heading 1 (h1)",
|
|
600
|
+
variant: "h1",
|
|
601
|
+
weight: "bold",
|
|
602
|
+
},
|
|
603
|
+
{ id: "h2", component: "Text", text: "Heading 2 (h2)", variant: "h2" },
|
|
604
|
+
{ id: "h3", component: "Text", text: "Heading 3 (h3)", variant: "h3" },
|
|
605
|
+
{ id: "h4", component: "Text", text: "Heading 4 (h4)", variant: "h4" },
|
|
606
|
+
{ id: "h5", component: "Text", text: "Heading 5 (h5)", variant: "h5" },
|
|
607
|
+
{
|
|
608
|
+
id: "body",
|
|
609
|
+
component: "Text",
|
|
610
|
+
text: "Standard body text providing clear readability with theme typography variables.",
|
|
611
|
+
variant: "body",
|
|
612
|
+
},
|
|
613
|
+
{
|
|
614
|
+
id: "caption",
|
|
615
|
+
component: "Text",
|
|
616
|
+
text: "Small caption note supporting lightweight metadata or timestamp annotations.",
|
|
617
|
+
variant: "caption",
|
|
618
|
+
},
|
|
619
|
+
{
|
|
620
|
+
id: "data-bound",
|
|
621
|
+
component: "Text",
|
|
622
|
+
text: { path: "/dynamicStatus" },
|
|
623
|
+
variant: "body",
|
|
624
|
+
weight: "bold",
|
|
625
|
+
},
|
|
626
|
+
],
|
|
627
|
+
dataModel: {
|
|
628
|
+
dynamicStatus: "Live Data-Bound String via JSON Pointer /dynamicStatus",
|
|
629
|
+
},
|
|
630
|
+
}),
|
|
631
|
+
};
|
|
632
|
+
|
|
633
|
+
export const Button: Story = {
|
|
634
|
+
render: () =>
|
|
635
|
+
renderA2UIEnvelope({
|
|
636
|
+
type: "createSurface",
|
|
637
|
+
surfaceId: "button-surface",
|
|
638
|
+
components: [
|
|
639
|
+
{ id: "root", component: "Card", child: "col" },
|
|
640
|
+
{
|
|
641
|
+
id: "col",
|
|
642
|
+
component: "Column",
|
|
643
|
+
children: ["btn-heading", "btn-row"],
|
|
644
|
+
},
|
|
645
|
+
{
|
|
646
|
+
id: "btn-heading",
|
|
647
|
+
component: "Text",
|
|
648
|
+
text: "A2UI Button Variants",
|
|
649
|
+
variant: "h3",
|
|
650
|
+
weight: "bold",
|
|
651
|
+
},
|
|
652
|
+
{ id: "btn-row", component: "Row", children: ["b1", "b2", "b3", "b4"] },
|
|
653
|
+
{
|
|
654
|
+
id: "b1",
|
|
655
|
+
component: "Button",
|
|
656
|
+
text: "Primary Button",
|
|
657
|
+
variant: "primary",
|
|
658
|
+
action: { event: { name: "click-primary" } },
|
|
659
|
+
},
|
|
660
|
+
{
|
|
661
|
+
id: "b2",
|
|
662
|
+
component: "Button",
|
|
663
|
+
text: "Secondary Button",
|
|
664
|
+
variant: "secondary",
|
|
665
|
+
action: { event: { name: "click-secondary" } },
|
|
666
|
+
},
|
|
667
|
+
{
|
|
668
|
+
id: "b3",
|
|
669
|
+
component: "Button",
|
|
670
|
+
text: "Text Action",
|
|
671
|
+
variant: "text",
|
|
672
|
+
action: { event: { name: "click-text" } },
|
|
673
|
+
},
|
|
674
|
+
{
|
|
675
|
+
id: "b4",
|
|
676
|
+
component: "Button",
|
|
677
|
+
child: "b4-label",
|
|
678
|
+
variant: "primary",
|
|
679
|
+
checked: true,
|
|
680
|
+
action: { event: { name: "click-checked" } },
|
|
681
|
+
},
|
|
682
|
+
{ id: "b4-label", component: "Text", text: "Checked Button" },
|
|
683
|
+
],
|
|
684
|
+
dataModel: {},
|
|
685
|
+
}),
|
|
686
|
+
};
|
|
687
|
+
|
|
688
|
+
export const TextField: Story = {
|
|
689
|
+
render: () =>
|
|
690
|
+
renderA2UIEnvelope({
|
|
691
|
+
type: "createSurface",
|
|
692
|
+
surfaceId: "textfield-surface",
|
|
693
|
+
components: [
|
|
694
|
+
{ id: "root", component: "Card", child: "col" },
|
|
695
|
+
{
|
|
696
|
+
id: "col",
|
|
697
|
+
component: "Column",
|
|
698
|
+
children: ["tf-title", "f-text", "f-obscured", "f-number", "f-long"],
|
|
699
|
+
},
|
|
700
|
+
{
|
|
701
|
+
id: "tf-title",
|
|
702
|
+
component: "Text",
|
|
703
|
+
text: "A2UI TextField Variants",
|
|
704
|
+
variant: "h3",
|
|
705
|
+
weight: "bold",
|
|
706
|
+
},
|
|
707
|
+
{
|
|
708
|
+
id: "f-text",
|
|
709
|
+
component: "TextField",
|
|
710
|
+
label: "User Name (Standard Input)",
|
|
711
|
+
value: { path: "/username" },
|
|
712
|
+
},
|
|
713
|
+
{
|
|
714
|
+
id: "f-obscured",
|
|
715
|
+
component: "TextField",
|
|
716
|
+
label: "API Token (Obscured / Password)",
|
|
717
|
+
variant: "obscured",
|
|
718
|
+
value: "secret-token-key-123",
|
|
719
|
+
},
|
|
720
|
+
{
|
|
721
|
+
id: "f-number",
|
|
722
|
+
component: "TextField",
|
|
723
|
+
label: "Port Number (Number Input)",
|
|
724
|
+
variant: "number",
|
|
725
|
+
value: "8080",
|
|
726
|
+
},
|
|
727
|
+
{
|
|
728
|
+
id: "f-long",
|
|
729
|
+
component: "TextField",
|
|
730
|
+
label: "Execution Instructions (LongText / Textarea)",
|
|
731
|
+
variant: "longText",
|
|
732
|
+
value:
|
|
733
|
+
"Multi-line agent instructions with automatic two-way binding.",
|
|
734
|
+
},
|
|
735
|
+
],
|
|
736
|
+
dataModel: { username: "ShadowClaw Operator" },
|
|
737
|
+
}),
|
|
738
|
+
};
|
|
739
|
+
|
|
740
|
+
export const Row: Story = {
|
|
741
|
+
render: () =>
|
|
742
|
+
renderA2UIEnvelope({
|
|
743
|
+
type: "createSurface",
|
|
744
|
+
surfaceId: "row-surface",
|
|
745
|
+
components: [
|
|
746
|
+
{ id: "root", component: "Card", child: "main-col" },
|
|
747
|
+
{
|
|
748
|
+
id: "main-col",
|
|
749
|
+
component: "Column",
|
|
750
|
+
children: ["title", "r-between", "r-center", "r-end"],
|
|
751
|
+
},
|
|
752
|
+
{
|
|
753
|
+
id: "title",
|
|
754
|
+
component: "Text",
|
|
755
|
+
text: "A2UI Row Justify Layouts",
|
|
756
|
+
variant: "h3",
|
|
757
|
+
weight: "bold",
|
|
758
|
+
},
|
|
759
|
+
{
|
|
760
|
+
id: "r-between",
|
|
761
|
+
component: "Row",
|
|
762
|
+
justify: "spaceBetween",
|
|
763
|
+
align: "center",
|
|
764
|
+
children: ["b1", "b2"],
|
|
765
|
+
},
|
|
766
|
+
{
|
|
767
|
+
id: "b1",
|
|
768
|
+
component: "Button",
|
|
769
|
+
text: "Left (Start)",
|
|
770
|
+
variant: "secondary",
|
|
771
|
+
},
|
|
772
|
+
{
|
|
773
|
+
id: "b2",
|
|
774
|
+
component: "Button",
|
|
775
|
+
text: "Right (End)",
|
|
776
|
+
variant: "primary",
|
|
777
|
+
},
|
|
778
|
+
{
|
|
779
|
+
id: "r-center",
|
|
780
|
+
component: "Row",
|
|
781
|
+
justify: "center",
|
|
782
|
+
children: ["b3"],
|
|
783
|
+
},
|
|
784
|
+
{
|
|
785
|
+
id: "b3",
|
|
786
|
+
component: "Button",
|
|
787
|
+
text: "Centered Button",
|
|
788
|
+
variant: "secondary",
|
|
789
|
+
},
|
|
790
|
+
{
|
|
791
|
+
id: "r-end",
|
|
792
|
+
component: "Row",
|
|
793
|
+
justify: "end",
|
|
794
|
+
children: ["b4", "b5"],
|
|
795
|
+
},
|
|
796
|
+
{ id: "b4", component: "Button", text: "Cancel", variant: "text" },
|
|
797
|
+
{ id: "b5", component: "Button", text: "Save", variant: "primary" },
|
|
798
|
+
],
|
|
799
|
+
dataModel: {},
|
|
800
|
+
}),
|
|
801
|
+
};
|
|
802
|
+
|
|
803
|
+
export const Column: Story = {
|
|
804
|
+
render: () =>
|
|
805
|
+
renderA2UIEnvelope({
|
|
806
|
+
type: "createSurface",
|
|
807
|
+
surfaceId: "column-surface",
|
|
808
|
+
components: [
|
|
809
|
+
{ id: "root", component: "Card", child: "col" },
|
|
810
|
+
{
|
|
811
|
+
id: "col",
|
|
812
|
+
component: "Column",
|
|
813
|
+
align: "stretch",
|
|
814
|
+
children: ["t1", "t2", "d1", "btn-stack"],
|
|
815
|
+
},
|
|
816
|
+
{
|
|
817
|
+
id: "t1",
|
|
818
|
+
component: "Text",
|
|
819
|
+
text: "Vertical Column Container",
|
|
820
|
+
variant: "h3",
|
|
821
|
+
weight: "bold",
|
|
822
|
+
},
|
|
823
|
+
{
|
|
824
|
+
id: "t2",
|
|
825
|
+
component: "Text",
|
|
826
|
+
text: "Stacks child items vertically with responsive spacing.",
|
|
827
|
+
variant: "body",
|
|
828
|
+
},
|
|
829
|
+
{ id: "d1", component: "Divider" },
|
|
830
|
+
{
|
|
831
|
+
id: "btn-stack",
|
|
832
|
+
component: "Column",
|
|
833
|
+
children: ["action1", "action2"],
|
|
834
|
+
},
|
|
835
|
+
{
|
|
836
|
+
id: "action1",
|
|
837
|
+
component: "Button",
|
|
838
|
+
text: "Top Action",
|
|
839
|
+
variant: "primary",
|
|
840
|
+
},
|
|
841
|
+
{
|
|
842
|
+
id: "action2",
|
|
843
|
+
component: "Button",
|
|
844
|
+
text: "Bottom Action",
|
|
845
|
+
variant: "secondary",
|
|
846
|
+
},
|
|
847
|
+
],
|
|
848
|
+
dataModel: {},
|
|
849
|
+
}),
|
|
850
|
+
};
|
|
851
|
+
|
|
852
|
+
export const Card: Story = {
|
|
853
|
+
render: () =>
|
|
854
|
+
renderA2UIEnvelope({
|
|
855
|
+
type: "createSurface",
|
|
856
|
+
surfaceId: "card-surface",
|
|
857
|
+
components: [
|
|
858
|
+
{ id: "root", component: "Column", children: ["card-1", "card-2"] },
|
|
859
|
+
{ id: "card-1", component: "Card", child: "c1-content" },
|
|
860
|
+
{
|
|
861
|
+
id: "c1-content",
|
|
862
|
+
component: "Column",
|
|
863
|
+
children: ["c1-title", "c1-body"],
|
|
864
|
+
},
|
|
865
|
+
{
|
|
866
|
+
id: "c1-title",
|
|
867
|
+
component: "Text",
|
|
868
|
+
text: "Elevated Card Container",
|
|
869
|
+
variant: "h3",
|
|
870
|
+
weight: "bold",
|
|
871
|
+
},
|
|
872
|
+
{
|
|
873
|
+
id: "c1-body",
|
|
874
|
+
component: "Text",
|
|
875
|
+
text: "Cards provide a themed container surface with border radius and subtle drop shadows.",
|
|
876
|
+
variant: "body",
|
|
877
|
+
},
|
|
878
|
+
{ id: "card-2", component: "Card", child: "c2-content" },
|
|
879
|
+
{
|
|
880
|
+
id: "c2-content",
|
|
881
|
+
component: "Row",
|
|
882
|
+
justify: "spaceBetween",
|
|
883
|
+
align: "center",
|
|
884
|
+
children: ["c2-text", "c2-btn"],
|
|
885
|
+
},
|
|
886
|
+
{
|
|
887
|
+
id: "c2-text",
|
|
888
|
+
component: "Text",
|
|
889
|
+
text: "Card with action bar",
|
|
890
|
+
variant: "body",
|
|
891
|
+
weight: "bold",
|
|
892
|
+
},
|
|
893
|
+
{
|
|
894
|
+
id: "c2-btn",
|
|
895
|
+
component: "Button",
|
|
896
|
+
text: "View Details",
|
|
897
|
+
variant: "primary",
|
|
898
|
+
},
|
|
899
|
+
],
|
|
900
|
+
dataModel: {},
|
|
901
|
+
}),
|
|
902
|
+
};
|
|
903
|
+
|
|
904
|
+
export const CheckBox: Story = {
|
|
905
|
+
render: () =>
|
|
906
|
+
renderA2UIEnvelope({
|
|
907
|
+
type: "createSurface",
|
|
908
|
+
surfaceId: "checkbox-surface",
|
|
909
|
+
components: [
|
|
910
|
+
{ id: "root", component: "Card", child: "col" },
|
|
911
|
+
{
|
|
912
|
+
id: "col",
|
|
913
|
+
component: "Column",
|
|
914
|
+
children: ["title", "cb1", "cb2", "cb3"],
|
|
915
|
+
},
|
|
916
|
+
{
|
|
917
|
+
id: "title",
|
|
918
|
+
component: "Text",
|
|
919
|
+
text: "A2UI CheckBox Bindings",
|
|
920
|
+
variant: "h3",
|
|
921
|
+
weight: "bold",
|
|
922
|
+
},
|
|
923
|
+
{
|
|
924
|
+
id: "cb1",
|
|
925
|
+
component: "CheckBox",
|
|
926
|
+
label: "Real-time Telemetry (Checked)",
|
|
927
|
+
value: { path: "/telemetry" },
|
|
928
|
+
},
|
|
929
|
+
{
|
|
930
|
+
id: "cb2",
|
|
931
|
+
component: "CheckBox",
|
|
932
|
+
label: "Verbose Audit Logging (Unchecked)",
|
|
933
|
+
value: { path: "/logging" },
|
|
934
|
+
},
|
|
935
|
+
{
|
|
936
|
+
id: "cb3",
|
|
937
|
+
component: "CheckBox",
|
|
938
|
+
label: "Static Boolean Value",
|
|
939
|
+
value: true,
|
|
940
|
+
},
|
|
941
|
+
],
|
|
942
|
+
dataModel: { telemetry: true, logging: false },
|
|
943
|
+
}),
|
|
944
|
+
};
|
|
945
|
+
|
|
946
|
+
export const ChoicePicker: Story = {
|
|
947
|
+
render: () =>
|
|
948
|
+
renderA2UIEnvelope({
|
|
949
|
+
type: "createSurface",
|
|
950
|
+
surfaceId: "choice-picker-surface",
|
|
951
|
+
components: [
|
|
952
|
+
{ id: "root", component: "Card", child: "col" },
|
|
953
|
+
{
|
|
954
|
+
id: "col",
|
|
955
|
+
component: "Column",
|
|
956
|
+
children: [
|
|
957
|
+
"title",
|
|
958
|
+
"single-heading",
|
|
959
|
+
"cp-single",
|
|
960
|
+
"div",
|
|
961
|
+
"multi-heading",
|
|
962
|
+
"cp-multi",
|
|
963
|
+
],
|
|
964
|
+
},
|
|
965
|
+
{
|
|
966
|
+
id: "title",
|
|
967
|
+
component: "Text",
|
|
968
|
+
text: "A2UI ChoicePicker Controls",
|
|
969
|
+
variant: "h3",
|
|
970
|
+
weight: "bold",
|
|
971
|
+
},
|
|
972
|
+
{
|
|
973
|
+
id: "single-heading",
|
|
974
|
+
component: "Text",
|
|
975
|
+
text: "Single Selection (Radio)",
|
|
976
|
+
variant: "body",
|
|
977
|
+
weight: "bold",
|
|
978
|
+
},
|
|
979
|
+
{
|
|
980
|
+
id: "cp-single",
|
|
981
|
+
component: "ChoicePicker",
|
|
982
|
+
variant: "singleSelection",
|
|
983
|
+
value: { path: "/provider" },
|
|
984
|
+
options: [
|
|
985
|
+
{ label: "Anthropic Claude", value: "anthropic" },
|
|
986
|
+
{ label: "OpenAI GPT", value: "openai" },
|
|
987
|
+
{ label: "Google Gemini", value: "google" },
|
|
988
|
+
],
|
|
989
|
+
},
|
|
990
|
+
{ id: "div", component: "Divider" },
|
|
991
|
+
{
|
|
992
|
+
id: "multi-heading",
|
|
993
|
+
component: "Text",
|
|
994
|
+
text: "Multiple Selection (Checkboxes)",
|
|
995
|
+
variant: "body",
|
|
996
|
+
weight: "bold",
|
|
997
|
+
},
|
|
998
|
+
{
|
|
999
|
+
id: "cp-multi",
|
|
1000
|
+
component: "ChoicePicker",
|
|
1001
|
+
variant: "multipleSelection",
|
|
1002
|
+
value: { path: "/features" },
|
|
1003
|
+
options: [
|
|
1004
|
+
{ label: "Automatic Backups", value: "backup" },
|
|
1005
|
+
{ label: "WebRTC Peer Sync", value: "webrtc" },
|
|
1006
|
+
{ label: "In-Browser WebVM", value: "webvm" },
|
|
1007
|
+
],
|
|
1008
|
+
},
|
|
1009
|
+
],
|
|
1010
|
+
dataModel: { provider: "anthropic", features: ["backup", "webrtc"] },
|
|
1011
|
+
}),
|
|
1012
|
+
};
|
|
1013
|
+
|
|
1014
|
+
export const Slider: Story = {
|
|
1015
|
+
render: () =>
|
|
1016
|
+
renderA2UIEnvelope({
|
|
1017
|
+
type: "createSurface",
|
|
1018
|
+
surfaceId: "slider-surface",
|
|
1019
|
+
components: [
|
|
1020
|
+
{ id: "root", component: "Card", child: "col" },
|
|
1021
|
+
{ id: "col", component: "Column", children: ["title", "s1", "s2"] },
|
|
1022
|
+
{
|
|
1023
|
+
id: "title",
|
|
1024
|
+
component: "Text",
|
|
1025
|
+
text: "A2UI Slider Range Controls",
|
|
1026
|
+
variant: "h3",
|
|
1027
|
+
weight: "bold",
|
|
1028
|
+
},
|
|
1029
|
+
{
|
|
1030
|
+
id: "s1",
|
|
1031
|
+
component: "Slider",
|
|
1032
|
+
label: "Creativity Level (0 - 100)",
|
|
1033
|
+
min: 0,
|
|
1034
|
+
max: 100,
|
|
1035
|
+
value: { path: "/creativity" },
|
|
1036
|
+
},
|
|
1037
|
+
{
|
|
1038
|
+
id: "s2",
|
|
1039
|
+
component: "Slider",
|
|
1040
|
+
label: "Max Context Budget (1024 - 8192, step 512)",
|
|
1041
|
+
min: 1024,
|
|
1042
|
+
max: 8192,
|
|
1043
|
+
steps: 512,
|
|
1044
|
+
value: { path: "/maxTokens" },
|
|
1045
|
+
},
|
|
1046
|
+
],
|
|
1047
|
+
dataModel: { creativity: 70, maxTokens: 4096 },
|
|
1048
|
+
}),
|
|
1049
|
+
};
|
|
1050
|
+
|
|
1051
|
+
export const DateTimeInput: Story = {
|
|
1052
|
+
render: () =>
|
|
1053
|
+
renderA2UIEnvelope({
|
|
1054
|
+
type: "createSurface",
|
|
1055
|
+
surfaceId: "datetime-surface",
|
|
1056
|
+
components: [
|
|
1057
|
+
{ id: "root", component: "Card", child: "col" },
|
|
1058
|
+
{
|
|
1059
|
+
id: "col",
|
|
1060
|
+
component: "Column",
|
|
1061
|
+
children: ["title", "dt-both", "dt-date", "dt-time"],
|
|
1062
|
+
},
|
|
1063
|
+
{
|
|
1064
|
+
id: "title",
|
|
1065
|
+
component: "Text",
|
|
1066
|
+
text: "A2UI DateTimeInput Variants",
|
|
1067
|
+
variant: "h3",
|
|
1068
|
+
weight: "bold",
|
|
1069
|
+
},
|
|
1070
|
+
{
|
|
1071
|
+
id: "dt-both",
|
|
1072
|
+
component: "DateTimeInput",
|
|
1073
|
+
label: "Date & Time (datetime-local)",
|
|
1074
|
+
enableDate: true,
|
|
1075
|
+
enableTime: true,
|
|
1076
|
+
value: "2026-09-03T15:30",
|
|
1077
|
+
},
|
|
1078
|
+
{
|
|
1079
|
+
id: "dt-date",
|
|
1080
|
+
component: "DateTimeInput",
|
|
1081
|
+
label: "Date Only (date)",
|
|
1082
|
+
enableDate: true,
|
|
1083
|
+
enableTime: false,
|
|
1084
|
+
value: "2026-09-03",
|
|
1085
|
+
},
|
|
1086
|
+
{
|
|
1087
|
+
id: "dt-time",
|
|
1088
|
+
component: "DateTimeInput",
|
|
1089
|
+
label: "Time Only (time)",
|
|
1090
|
+
enableDate: false,
|
|
1091
|
+
enableTime: true,
|
|
1092
|
+
value: "15:30",
|
|
1093
|
+
},
|
|
1094
|
+
],
|
|
1095
|
+
dataModel: {},
|
|
1096
|
+
}),
|
|
1097
|
+
};
|
|
1098
|
+
|
|
1099
|
+
export const Divider: Story = {
|
|
1100
|
+
render: () =>
|
|
1101
|
+
renderA2UIEnvelope({
|
|
1102
|
+
type: "createSurface",
|
|
1103
|
+
surfaceId: "divider-surface",
|
|
1104
|
+
components: [
|
|
1105
|
+
{ id: "root", component: "Card", child: "col" },
|
|
1106
|
+
{
|
|
1107
|
+
id: "col",
|
|
1108
|
+
component: "Column",
|
|
1109
|
+
children: ["t1", "d1", "t2", "d2", "t3"],
|
|
1110
|
+
},
|
|
1111
|
+
{
|
|
1112
|
+
id: "t1",
|
|
1113
|
+
component: "Text",
|
|
1114
|
+
text: "Section One Content",
|
|
1115
|
+
variant: "body",
|
|
1116
|
+
},
|
|
1117
|
+
{ id: "d1", component: "Divider", axis: "horizontal" },
|
|
1118
|
+
{
|
|
1119
|
+
id: "t2",
|
|
1120
|
+
component: "Text",
|
|
1121
|
+
text: "Section Two Content",
|
|
1122
|
+
variant: "body",
|
|
1123
|
+
},
|
|
1124
|
+
{ id: "d2", component: "Divider", axis: "horizontal" },
|
|
1125
|
+
{
|
|
1126
|
+
id: "t3",
|
|
1127
|
+
component: "Text",
|
|
1128
|
+
text: "Section Three Content",
|
|
1129
|
+
variant: "body",
|
|
1130
|
+
},
|
|
1131
|
+
],
|
|
1132
|
+
dataModel: {},
|
|
1133
|
+
}),
|
|
1134
|
+
};
|
|
1135
|
+
|
|
1136
|
+
export const Icon: Story = {
|
|
1137
|
+
render: () =>
|
|
1138
|
+
renderA2UIEnvelope({
|
|
1139
|
+
type: "createSurface",
|
|
1140
|
+
surfaceId: "icon-surface",
|
|
1141
|
+
components: [
|
|
1142
|
+
{ id: "root", component: "Card", child: "col" },
|
|
1143
|
+
{ id: "col", component: "Column", children: ["title", "icon-row"] },
|
|
1144
|
+
{
|
|
1145
|
+
id: "title",
|
|
1146
|
+
component: "Text",
|
|
1147
|
+
text: "A2UI Material Symbols Icons",
|
|
1148
|
+
variant: "h3",
|
|
1149
|
+
weight: "bold",
|
|
1150
|
+
},
|
|
1151
|
+
{
|
|
1152
|
+
id: "icon-row",
|
|
1153
|
+
component: "Row",
|
|
1154
|
+
justify: "spaceBetween",
|
|
1155
|
+
children: ["i1", "i2", "i3", "i4", "i5", "i6"],
|
|
1156
|
+
},
|
|
1157
|
+
{ id: "i1", component: "Icon", name: "smart_toy" },
|
|
1158
|
+
{ id: "i2", component: "Icon", name: "bolt" },
|
|
1159
|
+
{ id: "i3", component: "Icon", name: "verified" },
|
|
1160
|
+
{ id: "i4", component: "Icon", name: "terminal" },
|
|
1161
|
+
{ id: "i5", component: "Icon", name: "settings" },
|
|
1162
|
+
{ id: "i6", component: "Icon", name: "folder" },
|
|
1163
|
+
],
|
|
1164
|
+
dataModel: {},
|
|
1165
|
+
}),
|
|
1166
|
+
};
|
|
1167
|
+
|
|
1168
|
+
export const Image: Story = {
|
|
1169
|
+
render: () =>
|
|
1170
|
+
renderA2UIEnvelope({
|
|
1171
|
+
type: "createSurface",
|
|
1172
|
+
surfaceId: "image-surface",
|
|
1173
|
+
components: [
|
|
1174
|
+
{ id: "root", component: "Card", child: "col" },
|
|
1175
|
+
{ id: "col", component: "Column", children: ["title", "img"] },
|
|
1176
|
+
{
|
|
1177
|
+
id: "title",
|
|
1178
|
+
component: "Text",
|
|
1179
|
+
text: "A2UI Image Component",
|
|
1180
|
+
variant: "h3",
|
|
1181
|
+
weight: "bold",
|
|
1182
|
+
},
|
|
1183
|
+
{
|
|
1184
|
+
id: "img",
|
|
1185
|
+
component: "Image",
|
|
1186
|
+
url: sampleSvgImage,
|
|
1187
|
+
description: "Responsive banner graphic",
|
|
1188
|
+
variant: "mediumFeature",
|
|
1189
|
+
fit: "cover",
|
|
1190
|
+
},
|
|
1191
|
+
],
|
|
1192
|
+
dataModel: {},
|
|
1193
|
+
}),
|
|
1194
|
+
};
|
|
1195
|
+
|
|
1196
|
+
export const Video: Story = {
|
|
1197
|
+
render: () =>
|
|
1198
|
+
renderA2UIEnvelope({
|
|
1199
|
+
type: "createSurface",
|
|
1200
|
+
surfaceId: "video-surface",
|
|
1201
|
+
components: [
|
|
1202
|
+
{ id: "root", component: "Card", child: "col" },
|
|
1203
|
+
{ id: "col", component: "Column", children: ["title", "vid"] },
|
|
1204
|
+
{
|
|
1205
|
+
id: "title",
|
|
1206
|
+
component: "Text",
|
|
1207
|
+
text: "A2UI Video Player Component",
|
|
1208
|
+
variant: "h3",
|
|
1209
|
+
weight: "bold",
|
|
1210
|
+
},
|
|
1211
|
+
{
|
|
1212
|
+
id: "vid",
|
|
1213
|
+
component: "Video",
|
|
1214
|
+
url: "https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerBlazes.mp4",
|
|
1215
|
+
posterUrl: samplePosterImage,
|
|
1216
|
+
},
|
|
1217
|
+
],
|
|
1218
|
+
dataModel: {},
|
|
1219
|
+
}),
|
|
1220
|
+
};
|
|
1221
|
+
|
|
1222
|
+
export const AudioPlayer: Story = {
|
|
1223
|
+
render: () =>
|
|
1224
|
+
renderA2UIEnvelope({
|
|
1225
|
+
type: "createSurface",
|
|
1226
|
+
surfaceId: "audio-surface",
|
|
1227
|
+
components: [
|
|
1228
|
+
{ id: "root", component: "Card", child: "col" },
|
|
1229
|
+
{ id: "col", component: "Column", children: ["title", "aud"] },
|
|
1230
|
+
{
|
|
1231
|
+
id: "title",
|
|
1232
|
+
component: "Text",
|
|
1233
|
+
text: "A2UI AudioPlayer Component",
|
|
1234
|
+
variant: "h3",
|
|
1235
|
+
weight: "bold",
|
|
1236
|
+
},
|
|
1237
|
+
{
|
|
1238
|
+
id: "aud",
|
|
1239
|
+
component: "AudioPlayer",
|
|
1240
|
+
url: "https://actions.google.com/sounds/v1/alarms/beep_short.ogg",
|
|
1241
|
+
description: "Assistant alert chime sound effect",
|
|
1242
|
+
},
|
|
1243
|
+
],
|
|
1244
|
+
dataModel: {},
|
|
1245
|
+
}),
|
|
1246
|
+
};
|
|
1247
|
+
|
|
1248
|
+
export const List: Story = {
|
|
1249
|
+
render: () =>
|
|
1250
|
+
renderA2UIEnvelope({
|
|
1251
|
+
type: "createSurface",
|
|
1252
|
+
surfaceId: "list-surface",
|
|
1253
|
+
components: [
|
|
1254
|
+
{ id: "root", component: "Card", child: "col" },
|
|
1255
|
+
{ id: "col", component: "Column", children: ["title", "list-items"] },
|
|
1256
|
+
{
|
|
1257
|
+
id: "title",
|
|
1258
|
+
component: "Text",
|
|
1259
|
+
text: "A2UI List Container",
|
|
1260
|
+
variant: "h3",
|
|
1261
|
+
weight: "bold",
|
|
1262
|
+
},
|
|
1263
|
+
{
|
|
1264
|
+
id: "list-items",
|
|
1265
|
+
component: "List",
|
|
1266
|
+
direction: "vertical",
|
|
1267
|
+
children: ["card-1", "card-2", "card-3"],
|
|
1268
|
+
},
|
|
1269
|
+
{ id: "card-1", component: "Card", child: "c1-text" },
|
|
1270
|
+
{
|
|
1271
|
+
id: "c1-text",
|
|
1272
|
+
component: "Text",
|
|
1273
|
+
text: "Task 1: Compile Rolldown bundles",
|
|
1274
|
+
},
|
|
1275
|
+
{ id: "card-2", component: "Card", child: "c2-text" },
|
|
1276
|
+
{
|
|
1277
|
+
id: "c2-text",
|
|
1278
|
+
component: "Text",
|
|
1279
|
+
text: "Task 2: Launch WebRTC signalling mesh",
|
|
1280
|
+
},
|
|
1281
|
+
{ id: "card-3", component: "Card", child: "c3-text" },
|
|
1282
|
+
{
|
|
1283
|
+
id: "c3-text",
|
|
1284
|
+
component: "Text",
|
|
1285
|
+
text: "Task 3: Seed offline service worker cache",
|
|
1286
|
+
},
|
|
1287
|
+
],
|
|
1288
|
+
dataModel: {},
|
|
1289
|
+
}),
|
|
1290
|
+
};
|
|
1291
|
+
|
|
1292
|
+
export const Tabs: Story = {
|
|
1293
|
+
render: () =>
|
|
1294
|
+
renderA2UIEnvelope({
|
|
1295
|
+
type: "createSurface",
|
|
1296
|
+
surfaceId: "tabs-surface",
|
|
1297
|
+
components: [
|
|
1298
|
+
{ id: "root", component: "Card", child: "col" },
|
|
1299
|
+
{ id: "col", component: "Column", children: ["title", "tabs-ctrl"] },
|
|
1300
|
+
{
|
|
1301
|
+
id: "title",
|
|
1302
|
+
component: "Text",
|
|
1303
|
+
text: "A2UI Tabs Container",
|
|
1304
|
+
variant: "h3",
|
|
1305
|
+
weight: "bold",
|
|
1306
|
+
},
|
|
1307
|
+
{
|
|
1308
|
+
id: "tabs-ctrl",
|
|
1309
|
+
component: "Tabs",
|
|
1310
|
+
tabs: [
|
|
1311
|
+
{ title: "General", child: "tab-1-content" },
|
|
1312
|
+
{ title: "Security", child: "tab-2-content" },
|
|
1313
|
+
{ title: "Network", child: "tab-3-content" },
|
|
1314
|
+
],
|
|
1315
|
+
},
|
|
1316
|
+
{
|
|
1317
|
+
id: "tab-1-content",
|
|
1318
|
+
component: "Text",
|
|
1319
|
+
text: "General system overview, diagnostics, and active session telemetry.",
|
|
1320
|
+
},
|
|
1321
|
+
{
|
|
1322
|
+
id: "tab-2-content",
|
|
1323
|
+
component: "Text",
|
|
1324
|
+
text: "Access control policies, Trusted Types filters, and CSP sandboxes.",
|
|
1325
|
+
},
|
|
1326
|
+
{
|
|
1327
|
+
id: "tab-3-content",
|
|
1328
|
+
component: "Text",
|
|
1329
|
+
text: "WebRTC peer endpoints, WebSocket bridges, and relay signaling status.",
|
|
1330
|
+
},
|
|
1331
|
+
],
|
|
1332
|
+
dataModel: {},
|
|
1333
|
+
}),
|
|
1334
|
+
};
|
|
1335
|
+
|
|
1336
|
+
export const Modal: Story = {
|
|
1337
|
+
render: () =>
|
|
1338
|
+
renderA2UIEnvelope({
|
|
1339
|
+
type: "createSurface",
|
|
1340
|
+
surfaceId: "modal-surface",
|
|
1341
|
+
components: [
|
|
1342
|
+
{ id: "root", component: "Card", child: "col" },
|
|
1343
|
+
{
|
|
1344
|
+
id: "col",
|
|
1345
|
+
component: "Column",
|
|
1346
|
+
children: ["title", "desc", "modal-ctrl"],
|
|
1347
|
+
},
|
|
1348
|
+
{
|
|
1349
|
+
id: "title",
|
|
1350
|
+
component: "Text",
|
|
1351
|
+
text: "A2UI Modal Dialog",
|
|
1352
|
+
variant: "h3",
|
|
1353
|
+
weight: "bold",
|
|
1354
|
+
},
|
|
1355
|
+
{
|
|
1356
|
+
id: "desc",
|
|
1357
|
+
component: "Text",
|
|
1358
|
+
text: "Clicking the trigger button opens a focused dialog overlay.",
|
|
1359
|
+
variant: "body",
|
|
1360
|
+
},
|
|
1361
|
+
{
|
|
1362
|
+
id: "modal-ctrl",
|
|
1363
|
+
component: "Modal",
|
|
1364
|
+
trigger: "open-btn",
|
|
1365
|
+
content: "dialog-card",
|
|
1366
|
+
},
|
|
1367
|
+
{
|
|
1368
|
+
id: "open-btn",
|
|
1369
|
+
component: "Button",
|
|
1370
|
+
text: "Trigger Dialog",
|
|
1371
|
+
variant: "primary",
|
|
1372
|
+
},
|
|
1373
|
+
{
|
|
1374
|
+
id: "dialog-card",
|
|
1375
|
+
component: "Card",
|
|
1376
|
+
child: "dialog-col",
|
|
1377
|
+
},
|
|
1378
|
+
{
|
|
1379
|
+
id: "dialog-col",
|
|
1380
|
+
component: "Column",
|
|
1381
|
+
children: ["dialog-title", "dialog-body", "dialog-close"],
|
|
1382
|
+
},
|
|
1383
|
+
{
|
|
1384
|
+
id: "dialog-title",
|
|
1385
|
+
component: "Text",
|
|
1386
|
+
text: "Modal Dialog Active",
|
|
1387
|
+
variant: "h3",
|
|
1388
|
+
weight: "bold",
|
|
1389
|
+
},
|
|
1390
|
+
{
|
|
1391
|
+
id: "dialog-body",
|
|
1392
|
+
component: "Text",
|
|
1393
|
+
text: "Interactive dialog overlay with focus trap and escape-key dismissal.",
|
|
1394
|
+
variant: "body",
|
|
1395
|
+
},
|
|
1396
|
+
{
|
|
1397
|
+
id: "dialog-close",
|
|
1398
|
+
component: "Button",
|
|
1399
|
+
text: "Dismiss",
|
|
1400
|
+
variant: "secondary",
|
|
1401
|
+
action: { event: { name: "closeModal" } },
|
|
1402
|
+
},
|
|
1403
|
+
],
|
|
1404
|
+
dataModel: {},
|
|
1405
|
+
}),
|
|
1406
|
+
};
|