{"version":3,"file":"viewer-theme.mjs","names":[],"sources":["../../src/theme/viewer-theme.ts"],"sourcesContent":["/*\n Copyright 2025 Google LLC\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n https://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n */\n\nimport { v0_8 } from \"@a2ui/lit\";\n\n/** Elements */\n\nconst a = {\n \"typography-f-sf\": true,\n \"typography-fs-n\": true,\n \"typography-w-500\": true,\n \"layout-as-n\": true,\n \"layout-dis-iflx\": true,\n \"layout-al-c\": true,\n};\n\nconst audio = {\n \"layout-w-100\": true,\n};\n\nconst body = {\n \"typography-f-s\": true,\n \"typography-fs-n\": true,\n \"typography-w-400\": true,\n \"layout-mt-0\": true,\n \"layout-mb-2\": true,\n \"typography-sz-bm\": true,\n \"color-c-n10\": true,\n};\n\nconst button = {\n \"typography-f-sf\": true,\n \"typography-fs-n\": true,\n \"typography-w-500\": true,\n \"layout-pt-3\": true,\n \"layout-pb-3\": true,\n \"layout-pl-5\": true,\n \"layout-pr-5\": true,\n \"layout-mb-1\": true,\n \"border-br-16\": true,\n \"border-bw-0\": true,\n \"border-c-n70\": true,\n \"border-bs-s\": true,\n \"color-bgc-s30\": true,\n \"color-c-n100\": true,\n \"behavior-ho-80\": true,\n};\n\nconst heading = {\n \"typography-f-sf\": true,\n \"typography-fs-n\": true,\n \"typography-w-500\": true,\n \"layout-mt-0\": true,\n \"layout-mb-2\": true,\n \"color-c-n10\": true,\n};\n\nconst h1 = {\n ...heading,\n \"typography-sz-tl\": true,\n};\n\nconst h2 = {\n ...heading,\n \"typography-sz-tm\": true,\n};\n\nconst h3 = {\n ...heading,\n \"typography-sz-ts\": true,\n};\n\nconst iframe = {\n \"behavior-sw-n\": true,\n};\n\nconst input = {\n \"typography-f-sf\": true,\n \"typography-fs-n\": true,\n \"typography-w-400\": true,\n \"layout-pl-4\": true,\n \"layout-pr-4\": true,\n \"layout-pt-2\": true,\n \"layout-pb-2\": true,\n \"border-br-6\": true,\n \"border-bw-1\": true,\n \"color-bc-s70\": true,\n \"border-bs-s\": true,\n \"layout-as-n\": true,\n \"color-c-n10\": true,\n};\n\nconst p = {\n \"typography-f-s\": true,\n \"typography-fs-n\": true,\n \"typography-w-400\": true,\n \"layout-m-0\": true,\n \"typography-sz-bm\": true,\n \"layout-as-n\": true,\n \"color-c-n10\": true,\n};\n\nconst orderedList = {\n \"typography-f-s\": true,\n \"typography-fs-n\": true,\n \"typography-w-400\": true,\n \"layout-m-0\": true,\n \"typography-sz-bm\": true,\n \"layout-as-n\": true,\n};\n\nconst unorderedList = {\n \"typography-f-s\": true,\n \"typography-fs-n\": true,\n \"typography-w-400\": true,\n \"layout-m-0\": true,\n \"typography-sz-bm\": true,\n \"layout-as-n\": true,\n};\n\nconst listItem = {\n \"typography-f-s\": true,\n \"typography-fs-n\": true,\n \"typography-w-400\": true,\n \"layout-m-0\": true,\n \"typography-sz-bm\": true,\n \"layout-as-n\": true,\n};\n\nconst pre = {\n \"typography-f-c\": true,\n \"typography-fs-n\": true,\n \"typography-w-400\": true,\n \"typography-sz-bm\": true,\n \"typography-ws-p\": true,\n \"layout-as-n\": true,\n};\n\nconst textarea = {\n ...input,\n \"layout-r-none\": true,\n \"layout-fs-c\": true,\n};\n\nconst video = {\n \"layout-el-cv\": true,\n};\n\nconst aLight = v0_8.Styles.merge(a, { \"color-c-n5\": true });\nconst inputLight = v0_8.Styles.merge(input, { \"color-c-n5\": true });\nconst textareaLight = v0_8.Styles.merge(textarea, { \"color-c-n5\": true });\nconst buttonLight = v0_8.Styles.merge(button, { \"color-c-n100\": true });\nconst h1Light = v0_8.Styles.merge(h1, { \"color-c-n5\": true });\nconst h2Light = v0_8.Styles.merge(h2, { \"color-c-n5\": true });\nconst h3Light = v0_8.Styles.merge(h3, { \"color-c-n5\": true });\nconst bodyLight = v0_8.Styles.merge(body, { \"color-c-n5\": true });\nconst pLight = v0_8.Styles.merge(p, { \"color-c-n35\": true });\nconst preLight = v0_8.Styles.merge(pre, { \"color-c-n35\": true });\nconst orderedListLight = v0_8.Styles.merge(orderedList, {\n \"color-c-n35\": true,\n});\nconst unorderedListLight = v0_8.Styles.merge(unorderedList, {\n \"color-c-n35\": true,\n});\nconst listItemLight = v0_8.Styles.merge(listItem, {\n \"color-c-n35\": true,\n});\n\nexport const theme: v0_8.Types.Theme = {\n additionalStyles: {\n Button: {\n background: \"var(--primary, oklch(0.205 0 0))\",\n color: \"var(--primary-foreground, oklch(0.985 0 0))\",\n \"border-radius\": \"calc(var(--radius, 0.625rem) - 2px)\",\n cursor: \"pointer\",\n width: \"100%\",\n \"--n-10\": \"var(--primary-foreground, oklch(0.985 0 0))\",\n \"--n-35\": \"var(--primary-foreground, oklch(0.985 0 0))\",\n \"--n-60\": \"var(--primary-foreground, oklch(0.985 0 0))\",\n },\n Card: {\n background: \"var(--card, oklch(1 0 0))\",\n border: \"1px solid var(--border, oklch(0.922 0 0))\",\n \"border-radius\": \"var(--radius, 0.625rem)\",\n padding: \"16px\",\n },\n // Applied directly to /