diff --git a/packages/console/app/public/brand/badges/opencode-built-with-a-dark-20-mono-caps.png b/packages/console/app/public/brand/badges/opencode-built-with-a-dark-20-mono-caps.png new file mode 100644 index 00000000000..64b9fefef9d Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-a-dark-20-mono-caps.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-a-dark-20-mono-caps.svg b/packages/console/app/public/brand/badges/opencode-built-with-a-dark-20-mono-caps.svg new file mode 100644 index 00000000000..77be2634751 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-a-dark-20-mono-caps.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-a-dark-20-mono.png b/packages/console/app/public/brand/badges/opencode-built-with-a-dark-20-mono.png new file mode 100644 index 00000000000..5cb67ac56cc Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-a-dark-20-mono.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-a-dark-20-mono.svg b/packages/console/app/public/brand/badges/opencode-built-with-a-dark-20-mono.svg new file mode 100644 index 00000000000..a25e8f2b027 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-a-dark-20-mono.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-a-dark-20.png b/packages/console/app/public/brand/badges/opencode-built-with-a-dark-20.png new file mode 100644 index 00000000000..6afcb486cfe Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-a-dark-20.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-a-dark-20.svg b/packages/console/app/public/brand/badges/opencode-built-with-a-dark-20.svg new file mode 100644 index 00000000000..1bc58dd26da --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-a-dark-20.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-a-dark-32-mono-caps.png b/packages/console/app/public/brand/badges/opencode-built-with-a-dark-32-mono-caps.png new file mode 100644 index 00000000000..bc1bcad1546 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-a-dark-32-mono-caps.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-a-dark-32-mono-caps.svg b/packages/console/app/public/brand/badges/opencode-built-with-a-dark-32-mono-caps.svg new file mode 100644 index 00000000000..97033839d2e --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-a-dark-32-mono-caps.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-a-dark-32-mono.png b/packages/console/app/public/brand/badges/opencode-built-with-a-dark-32-mono.png new file mode 100644 index 00000000000..6aef80b213b Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-a-dark-32-mono.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-a-dark-32-mono.svg b/packages/console/app/public/brand/badges/opencode-built-with-a-dark-32-mono.svg new file mode 100644 index 00000000000..da879d2482a --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-a-dark-32-mono.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-a-dark-32.png b/packages/console/app/public/brand/badges/opencode-built-with-a-dark-32.png new file mode 100644 index 00000000000..69989ad0119 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-a-dark-32.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-a-dark-32.svg b/packages/console/app/public/brand/badges/opencode-built-with-a-dark-32.svg new file mode 100644 index 00000000000..ccf9e68a5f1 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-a-dark-32.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-a-dark-44-mono-caps.png b/packages/console/app/public/brand/badges/opencode-built-with-a-dark-44-mono-caps.png new file mode 100644 index 00000000000..463012256a0 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-a-dark-44-mono-caps.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-a-dark-44-mono-caps.svg b/packages/console/app/public/brand/badges/opencode-built-with-a-dark-44-mono-caps.svg new file mode 100644 index 00000000000..014f0de584a --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-a-dark-44-mono-caps.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-a-dark-44-mono.png b/packages/console/app/public/brand/badges/opencode-built-with-a-dark-44-mono.png new file mode 100644 index 00000000000..c6a8533e3f7 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-a-dark-44-mono.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-a-dark-44-mono.svg b/packages/console/app/public/brand/badges/opencode-built-with-a-dark-44-mono.svg new file mode 100644 index 00000000000..4f56fc4bbd0 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-a-dark-44-mono.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-a-dark-44.png b/packages/console/app/public/brand/badges/opencode-built-with-a-dark-44.png new file mode 100644 index 00000000000..af661eba091 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-a-dark-44.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-a-dark-44.svg b/packages/console/app/public/brand/badges/opencode-built-with-a-dark-44.svg new file mode 100644 index 00000000000..80469eda2ff --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-a-dark-44.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-a-light-20-mono-caps.png b/packages/console/app/public/brand/badges/opencode-built-with-a-light-20-mono-caps.png new file mode 100644 index 00000000000..6af31e123e6 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-a-light-20-mono-caps.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-a-light-20-mono-caps.svg b/packages/console/app/public/brand/badges/opencode-built-with-a-light-20-mono-caps.svg new file mode 100644 index 00000000000..acedf64112f --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-a-light-20-mono-caps.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-a-light-20-mono.png b/packages/console/app/public/brand/badges/opencode-built-with-a-light-20-mono.png new file mode 100644 index 00000000000..b420c515f98 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-a-light-20-mono.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-a-light-20-mono.svg b/packages/console/app/public/brand/badges/opencode-built-with-a-light-20-mono.svg new file mode 100644 index 00000000000..a41a0efa1da --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-a-light-20-mono.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-a-light-20.png b/packages/console/app/public/brand/badges/opencode-built-with-a-light-20.png new file mode 100644 index 00000000000..40629da08e6 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-a-light-20.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-a-light-20.svg b/packages/console/app/public/brand/badges/opencode-built-with-a-light-20.svg new file mode 100644 index 00000000000..e54d29d6f16 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-a-light-20.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-a-light-32-mono-caps.png b/packages/console/app/public/brand/badges/opencode-built-with-a-light-32-mono-caps.png new file mode 100644 index 00000000000..73305b80605 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-a-light-32-mono-caps.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-a-light-32-mono-caps.svg b/packages/console/app/public/brand/badges/opencode-built-with-a-light-32-mono-caps.svg new file mode 100644 index 00000000000..fd6735a86fa --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-a-light-32-mono-caps.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-a-light-32-mono.png b/packages/console/app/public/brand/badges/opencode-built-with-a-light-32-mono.png new file mode 100644 index 00000000000..f67bf92f018 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-a-light-32-mono.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-a-light-32-mono.svg b/packages/console/app/public/brand/badges/opencode-built-with-a-light-32-mono.svg new file mode 100644 index 00000000000..5b16466d518 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-a-light-32-mono.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-a-light-32.png b/packages/console/app/public/brand/badges/opencode-built-with-a-light-32.png new file mode 100644 index 00000000000..cf8a5823b55 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-a-light-32.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-a-light-32.svg b/packages/console/app/public/brand/badges/opencode-built-with-a-light-32.svg new file mode 100644 index 00000000000..d33baeaf8a7 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-a-light-32.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-a-light-44-mono-caps.png b/packages/console/app/public/brand/badges/opencode-built-with-a-light-44-mono-caps.png new file mode 100644 index 00000000000..d11b0016dfa Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-a-light-44-mono-caps.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-a-light-44-mono-caps.svg b/packages/console/app/public/brand/badges/opencode-built-with-a-light-44-mono-caps.svg new file mode 100644 index 00000000000..0f60f75e52f --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-a-light-44-mono-caps.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-a-light-44-mono.png b/packages/console/app/public/brand/badges/opencode-built-with-a-light-44-mono.png new file mode 100644 index 00000000000..aaede2607df Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-a-light-44-mono.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-a-light-44-mono.svg b/packages/console/app/public/brand/badges/opencode-built-with-a-light-44-mono.svg new file mode 100644 index 00000000000..c675c539a44 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-a-light-44-mono.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-a-light-44.png b/packages/console/app/public/brand/badges/opencode-built-with-a-light-44.png new file mode 100644 index 00000000000..f71946b47b0 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-a-light-44.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-a-light-44.svg b/packages/console/app/public/brand/badges/opencode-built-with-a-light-44.svg new file mode 100644 index 00000000000..e9f3cfbfd3d --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-a-light-44.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-c-dark-20-mono-caps.png b/packages/console/app/public/brand/badges/opencode-built-with-c-dark-20-mono-caps.png new file mode 100644 index 00000000000..b680b5e25c0 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-c-dark-20-mono-caps.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-c-dark-20-mono-caps.svg b/packages/console/app/public/brand/badges/opencode-built-with-c-dark-20-mono-caps.svg new file mode 100644 index 00000000000..f2644c0ebde --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-c-dark-20-mono-caps.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-c-dark-20-mono.png b/packages/console/app/public/brand/badges/opencode-built-with-c-dark-20-mono.png new file mode 100644 index 00000000000..3a5f1e3c30c Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-c-dark-20-mono.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-c-dark-20-mono.svg b/packages/console/app/public/brand/badges/opencode-built-with-c-dark-20-mono.svg new file mode 100644 index 00000000000..7ad49635cad --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-c-dark-20-mono.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-c-dark-20.png b/packages/console/app/public/brand/badges/opencode-built-with-c-dark-20.png new file mode 100644 index 00000000000..4c65cc33bb1 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-c-dark-20.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-c-dark-20.svg b/packages/console/app/public/brand/badges/opencode-built-with-c-dark-20.svg new file mode 100644 index 00000000000..843b431e990 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-c-dark-20.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-c-dark-32-mono-caps.png b/packages/console/app/public/brand/badges/opencode-built-with-c-dark-32-mono-caps.png new file mode 100644 index 00000000000..ec0cc830ac1 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-c-dark-32-mono-caps.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-c-dark-32-mono-caps.svg b/packages/console/app/public/brand/badges/opencode-built-with-c-dark-32-mono-caps.svg new file mode 100644 index 00000000000..831bc8c9fc7 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-c-dark-32-mono-caps.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-c-dark-32-mono.png b/packages/console/app/public/brand/badges/opencode-built-with-c-dark-32-mono.png new file mode 100644 index 00000000000..926398610a4 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-c-dark-32-mono.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-c-dark-32-mono.svg b/packages/console/app/public/brand/badges/opencode-built-with-c-dark-32-mono.svg new file mode 100644 index 00000000000..5faeb28b1de --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-c-dark-32-mono.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-c-dark-32.png b/packages/console/app/public/brand/badges/opencode-built-with-c-dark-32.png new file mode 100644 index 00000000000..77321c93570 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-c-dark-32.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-c-dark-32.svg b/packages/console/app/public/brand/badges/opencode-built-with-c-dark-32.svg new file mode 100644 index 00000000000..706cf17f74d --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-c-dark-32.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-c-dark-44-mono-caps.png b/packages/console/app/public/brand/badges/opencode-built-with-c-dark-44-mono-caps.png new file mode 100644 index 00000000000..2afd49b04ef Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-c-dark-44-mono-caps.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-c-dark-44-mono-caps.svg b/packages/console/app/public/brand/badges/opencode-built-with-c-dark-44-mono-caps.svg new file mode 100644 index 00000000000..5888b60dc49 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-c-dark-44-mono-caps.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-c-dark-44-mono.png b/packages/console/app/public/brand/badges/opencode-built-with-c-dark-44-mono.png new file mode 100644 index 00000000000..8130aa24c72 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-c-dark-44-mono.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-c-dark-44-mono.svg b/packages/console/app/public/brand/badges/opencode-built-with-c-dark-44-mono.svg new file mode 100644 index 00000000000..4611d529b29 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-c-dark-44-mono.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-c-dark-44.png b/packages/console/app/public/brand/badges/opencode-built-with-c-dark-44.png new file mode 100644 index 00000000000..3dccdb28cbe Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-c-dark-44.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-c-dark-44.svg b/packages/console/app/public/brand/badges/opencode-built-with-c-dark-44.svg new file mode 100644 index 00000000000..4a55a517971 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-c-dark-44.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-c-light-20-mono-caps.png b/packages/console/app/public/brand/badges/opencode-built-with-c-light-20-mono-caps.png new file mode 100644 index 00000000000..c1b5beb190f Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-c-light-20-mono-caps.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-c-light-20-mono-caps.svg b/packages/console/app/public/brand/badges/opencode-built-with-c-light-20-mono-caps.svg new file mode 100644 index 00000000000..f22ce0d53f1 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-c-light-20-mono-caps.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-c-light-20-mono.png b/packages/console/app/public/brand/badges/opencode-built-with-c-light-20-mono.png new file mode 100644 index 00000000000..3693da8dce7 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-c-light-20-mono.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-c-light-20-mono.svg b/packages/console/app/public/brand/badges/opencode-built-with-c-light-20-mono.svg new file mode 100644 index 00000000000..9be856829bc --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-c-light-20-mono.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-c-light-20.png b/packages/console/app/public/brand/badges/opencode-built-with-c-light-20.png new file mode 100644 index 00000000000..e0d268e2051 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-c-light-20.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-c-light-20.svg b/packages/console/app/public/brand/badges/opencode-built-with-c-light-20.svg new file mode 100644 index 00000000000..4f909a810ab --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-c-light-20.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-c-light-32-mono-caps.png b/packages/console/app/public/brand/badges/opencode-built-with-c-light-32-mono-caps.png new file mode 100644 index 00000000000..e3f830b55ec Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-c-light-32-mono-caps.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-c-light-32-mono-caps.svg b/packages/console/app/public/brand/badges/opencode-built-with-c-light-32-mono-caps.svg new file mode 100644 index 00000000000..fa5da7f6ff6 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-c-light-32-mono-caps.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-c-light-32-mono.png b/packages/console/app/public/brand/badges/opencode-built-with-c-light-32-mono.png new file mode 100644 index 00000000000..7ff6031287b Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-c-light-32-mono.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-c-light-32-mono.svg b/packages/console/app/public/brand/badges/opencode-built-with-c-light-32-mono.svg new file mode 100644 index 00000000000..729d2022bf3 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-c-light-32-mono.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-c-light-32.png b/packages/console/app/public/brand/badges/opencode-built-with-c-light-32.png new file mode 100644 index 00000000000..5deba8142c9 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-c-light-32.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-c-light-32.svg b/packages/console/app/public/brand/badges/opencode-built-with-c-light-32.svg new file mode 100644 index 00000000000..35c601fec1b --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-c-light-32.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-c-light-44-mono-caps.png b/packages/console/app/public/brand/badges/opencode-built-with-c-light-44-mono-caps.png new file mode 100644 index 00000000000..e4e812f3a3e Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-c-light-44-mono-caps.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-c-light-44-mono-caps.svg b/packages/console/app/public/brand/badges/opencode-built-with-c-light-44-mono-caps.svg new file mode 100644 index 00000000000..e55e6dc996c --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-c-light-44-mono-caps.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-c-light-44-mono.png b/packages/console/app/public/brand/badges/opencode-built-with-c-light-44-mono.png new file mode 100644 index 00000000000..b836a815803 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-c-light-44-mono.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-c-light-44-mono.svg b/packages/console/app/public/brand/badges/opencode-built-with-c-light-44-mono.svg new file mode 100644 index 00000000000..6566377f733 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-c-light-44-mono.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-c-light-44.png b/packages/console/app/public/brand/badges/opencode-built-with-c-light-44.png new file mode 100644 index 00000000000..4754c6d1092 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-c-light-44.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-c-light-44.svg b/packages/console/app/public/brand/badges/opencode-built-with-c-light-44.svg new file mode 100644 index 00000000000..88b0530cbf5 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-c-light-44.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-f-dark-20-mono-caps.png b/packages/console/app/public/brand/badges/opencode-built-with-f-dark-20-mono-caps.png new file mode 100644 index 00000000000..7fec8e23aea Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-f-dark-20-mono-caps.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-f-dark-20-mono-caps.svg b/packages/console/app/public/brand/badges/opencode-built-with-f-dark-20-mono-caps.svg new file mode 100644 index 00000000000..1a2fa100f25 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-f-dark-20-mono-caps.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-f-dark-20-mono.png b/packages/console/app/public/brand/badges/opencode-built-with-f-dark-20-mono.png new file mode 100644 index 00000000000..577cb8d7899 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-f-dark-20-mono.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-f-dark-20-mono.svg b/packages/console/app/public/brand/badges/opencode-built-with-f-dark-20-mono.svg new file mode 100644 index 00000000000..82e96ea8a95 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-f-dark-20-mono.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-f-dark-20.png b/packages/console/app/public/brand/badges/opencode-built-with-f-dark-20.png new file mode 100644 index 00000000000..f7e473c6417 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-f-dark-20.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-f-dark-20.svg b/packages/console/app/public/brand/badges/opencode-built-with-f-dark-20.svg new file mode 100644 index 00000000000..29c40ce15f3 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-f-dark-20.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-f-dark-32-mono-caps.png b/packages/console/app/public/brand/badges/opencode-built-with-f-dark-32-mono-caps.png new file mode 100644 index 00000000000..6732cd86439 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-f-dark-32-mono-caps.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-f-dark-32-mono-caps.svg b/packages/console/app/public/brand/badges/opencode-built-with-f-dark-32-mono-caps.svg new file mode 100644 index 00000000000..5d6a44fcfb7 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-f-dark-32-mono-caps.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-f-dark-32-mono.png b/packages/console/app/public/brand/badges/opencode-built-with-f-dark-32-mono.png new file mode 100644 index 00000000000..fdb0c81e4eb Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-f-dark-32-mono.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-f-dark-32-mono.svg b/packages/console/app/public/brand/badges/opencode-built-with-f-dark-32-mono.svg new file mode 100644 index 00000000000..0b27fad2495 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-f-dark-32-mono.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-f-dark-32.png b/packages/console/app/public/brand/badges/opencode-built-with-f-dark-32.png new file mode 100644 index 00000000000..86972958f9d Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-f-dark-32.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-f-dark-32.svg b/packages/console/app/public/brand/badges/opencode-built-with-f-dark-32.svg new file mode 100644 index 00000000000..d70e5b47a33 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-f-dark-32.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-f-dark-44-mono-caps.png b/packages/console/app/public/brand/badges/opencode-built-with-f-dark-44-mono-caps.png new file mode 100644 index 00000000000..419bec5fc51 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-f-dark-44-mono-caps.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-f-dark-44-mono-caps.svg b/packages/console/app/public/brand/badges/opencode-built-with-f-dark-44-mono-caps.svg new file mode 100644 index 00000000000..7f86467641f --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-f-dark-44-mono-caps.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-f-dark-44-mono.png b/packages/console/app/public/brand/badges/opencode-built-with-f-dark-44-mono.png new file mode 100644 index 00000000000..60767a5dbb8 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-f-dark-44-mono.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-f-dark-44-mono.svg b/packages/console/app/public/brand/badges/opencode-built-with-f-dark-44-mono.svg new file mode 100644 index 00000000000..4873d89fd22 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-f-dark-44-mono.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-f-dark-44.png b/packages/console/app/public/brand/badges/opencode-built-with-f-dark-44.png new file mode 100644 index 00000000000..07759fe4327 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-f-dark-44.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-f-dark-44.svg b/packages/console/app/public/brand/badges/opencode-built-with-f-dark-44.svg new file mode 100644 index 00000000000..b40926f0f4b --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-f-dark-44.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-f-light-20-mono-caps.png b/packages/console/app/public/brand/badges/opencode-built-with-f-light-20-mono-caps.png new file mode 100644 index 00000000000..4c6fb661f48 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-f-light-20-mono-caps.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-f-light-20-mono-caps.svg b/packages/console/app/public/brand/badges/opencode-built-with-f-light-20-mono-caps.svg new file mode 100644 index 00000000000..f2a6510c74f --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-f-light-20-mono-caps.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-f-light-20-mono.png b/packages/console/app/public/brand/badges/opencode-built-with-f-light-20-mono.png new file mode 100644 index 00000000000..433764e406b Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-f-light-20-mono.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-f-light-20-mono.svg b/packages/console/app/public/brand/badges/opencode-built-with-f-light-20-mono.svg new file mode 100644 index 00000000000..d6d9fffb9b0 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-f-light-20-mono.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-f-light-20.png b/packages/console/app/public/brand/badges/opencode-built-with-f-light-20.png new file mode 100644 index 00000000000..cbc3fb8ba41 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-f-light-20.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-f-light-20.svg b/packages/console/app/public/brand/badges/opencode-built-with-f-light-20.svg new file mode 100644 index 00000000000..7e155a49c1a --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-f-light-20.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-f-light-32-mono-caps.png b/packages/console/app/public/brand/badges/opencode-built-with-f-light-32-mono-caps.png new file mode 100644 index 00000000000..21f4ef6a0ee Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-f-light-32-mono-caps.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-f-light-32-mono-caps.svg b/packages/console/app/public/brand/badges/opencode-built-with-f-light-32-mono-caps.svg new file mode 100644 index 00000000000..573efc72280 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-f-light-32-mono-caps.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-f-light-32-mono.png b/packages/console/app/public/brand/badges/opencode-built-with-f-light-32-mono.png new file mode 100644 index 00000000000..1720da4ffec Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-f-light-32-mono.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-f-light-32-mono.svg b/packages/console/app/public/brand/badges/opencode-built-with-f-light-32-mono.svg new file mode 100644 index 00000000000..d89a75422e3 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-f-light-32-mono.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-f-light-32.png b/packages/console/app/public/brand/badges/opencode-built-with-f-light-32.png new file mode 100644 index 00000000000..597d49b3a56 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-f-light-32.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-f-light-32.svg b/packages/console/app/public/brand/badges/opencode-built-with-f-light-32.svg new file mode 100644 index 00000000000..5831358398f --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-f-light-32.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-f-light-44-mono-caps.png b/packages/console/app/public/brand/badges/opencode-built-with-f-light-44-mono-caps.png new file mode 100644 index 00000000000..1fe0c3457e0 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-f-light-44-mono-caps.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-f-light-44-mono-caps.svg b/packages/console/app/public/brand/badges/opencode-built-with-f-light-44-mono-caps.svg new file mode 100644 index 00000000000..7462813cc07 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-f-light-44-mono-caps.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-f-light-44-mono.png b/packages/console/app/public/brand/badges/opencode-built-with-f-light-44-mono.png new file mode 100644 index 00000000000..66eb4cc55f9 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-f-light-44-mono.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-f-light-44-mono.svg b/packages/console/app/public/brand/badges/opencode-built-with-f-light-44-mono.svg new file mode 100644 index 00000000000..7836c19f3ed --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-f-light-44-mono.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-f-light-44.png b/packages/console/app/public/brand/badges/opencode-built-with-f-light-44.png new file mode 100644 index 00000000000..b8abe19d718 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-f-light-44.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-f-light-44.svg b/packages/console/app/public/brand/badges/opencode-built-with-f-light-44.svg new file mode 100644 index 00000000000..ae9facd4b4b --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-f-light-44.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-g-dark-20-mono-caps.png b/packages/console/app/public/brand/badges/opencode-built-with-g-dark-20-mono-caps.png new file mode 100644 index 00000000000..89d4fb83560 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-g-dark-20-mono-caps.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-g-dark-20-mono-caps.svg b/packages/console/app/public/brand/badges/opencode-built-with-g-dark-20-mono-caps.svg new file mode 100644 index 00000000000..8c3fdd5e07c --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-g-dark-20-mono-caps.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-g-dark-20-mono.png b/packages/console/app/public/brand/badges/opencode-built-with-g-dark-20-mono.png new file mode 100644 index 00000000000..19dad0b8275 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-g-dark-20-mono.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-g-dark-20-mono.svg b/packages/console/app/public/brand/badges/opencode-built-with-g-dark-20-mono.svg new file mode 100644 index 00000000000..5eb64011356 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-g-dark-20-mono.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-g-dark-20.png b/packages/console/app/public/brand/badges/opencode-built-with-g-dark-20.png new file mode 100644 index 00000000000..a7db3be81ad Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-g-dark-20.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-g-dark-20.svg b/packages/console/app/public/brand/badges/opencode-built-with-g-dark-20.svg new file mode 100644 index 00000000000..18580f47a94 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-g-dark-20.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-g-light-20-mono-caps.png b/packages/console/app/public/brand/badges/opencode-built-with-g-light-20-mono-caps.png new file mode 100644 index 00000000000..3dc7ef51a83 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-g-light-20-mono-caps.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-g-light-20-mono-caps.svg b/packages/console/app/public/brand/badges/opencode-built-with-g-light-20-mono-caps.svg new file mode 100644 index 00000000000..234c6bbc4ee --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-g-light-20-mono-caps.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-g-light-20-mono.png b/packages/console/app/public/brand/badges/opencode-built-with-g-light-20-mono.png new file mode 100644 index 00000000000..01eaf546a96 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-g-light-20-mono.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-g-light-20-mono.svg b/packages/console/app/public/brand/badges/opencode-built-with-g-light-20-mono.svg new file mode 100644 index 00000000000..ad1828b4724 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-g-light-20-mono.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-built-with-g-light-20.png b/packages/console/app/public/brand/badges/opencode-built-with-g-light-20.png new file mode 100644 index 00000000000..ff94ed65136 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-built-with-g-light-20.png differ diff --git a/packages/console/app/public/brand/badges/opencode-built-with-g-light-20.svg b/packages/console/app/public/brand/badges/opencode-built-with-g-light-20.svg new file mode 100644 index 00000000000..daaca2c8eff --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-built-with-g-light-20.svg @@ -0,0 +1 @@ +Built with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-a-dark-20-mono-caps.png b/packages/console/app/public/brand/badges/opencode-works-with-a-dark-20-mono-caps.png new file mode 100644 index 00000000000..faef324c479 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-a-dark-20-mono-caps.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-a-dark-20-mono-caps.svg b/packages/console/app/public/brand/badges/opencode-works-with-a-dark-20-mono-caps.svg new file mode 100644 index 00000000000..17d80954f9c --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-a-dark-20-mono-caps.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-a-dark-20-mono.png b/packages/console/app/public/brand/badges/opencode-works-with-a-dark-20-mono.png new file mode 100644 index 00000000000..c1a642cd2c4 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-a-dark-20-mono.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-a-dark-20-mono.svg b/packages/console/app/public/brand/badges/opencode-works-with-a-dark-20-mono.svg new file mode 100644 index 00000000000..a2fc0f2d929 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-a-dark-20-mono.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-a-dark-20.png b/packages/console/app/public/brand/badges/opencode-works-with-a-dark-20.png new file mode 100644 index 00000000000..02d98384cd9 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-a-dark-20.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-a-dark-20.svg b/packages/console/app/public/brand/badges/opencode-works-with-a-dark-20.svg new file mode 100644 index 00000000000..ea3471f8292 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-a-dark-20.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-a-dark-32-mono-caps.png b/packages/console/app/public/brand/badges/opencode-works-with-a-dark-32-mono-caps.png new file mode 100644 index 00000000000..46db67f67c5 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-a-dark-32-mono-caps.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-a-dark-32-mono-caps.svg b/packages/console/app/public/brand/badges/opencode-works-with-a-dark-32-mono-caps.svg new file mode 100644 index 00000000000..5fbf7d64315 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-a-dark-32-mono-caps.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-a-dark-32-mono.png b/packages/console/app/public/brand/badges/opencode-works-with-a-dark-32-mono.png new file mode 100644 index 00000000000..444301fa477 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-a-dark-32-mono.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-a-dark-32-mono.svg b/packages/console/app/public/brand/badges/opencode-works-with-a-dark-32-mono.svg new file mode 100644 index 00000000000..1231faf4d8d --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-a-dark-32-mono.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-a-dark-32.png b/packages/console/app/public/brand/badges/opencode-works-with-a-dark-32.png new file mode 100644 index 00000000000..ce69f9022a7 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-a-dark-32.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-a-dark-32.svg b/packages/console/app/public/brand/badges/opencode-works-with-a-dark-32.svg new file mode 100644 index 00000000000..573f4184070 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-a-dark-32.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-a-dark-44-mono-caps.png b/packages/console/app/public/brand/badges/opencode-works-with-a-dark-44-mono-caps.png new file mode 100644 index 00000000000..3b5c3453af5 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-a-dark-44-mono-caps.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-a-dark-44-mono-caps.svg b/packages/console/app/public/brand/badges/opencode-works-with-a-dark-44-mono-caps.svg new file mode 100644 index 00000000000..f69e2f372d8 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-a-dark-44-mono-caps.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-a-dark-44-mono.png b/packages/console/app/public/brand/badges/opencode-works-with-a-dark-44-mono.png new file mode 100644 index 00000000000..4d99efb7ff2 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-a-dark-44-mono.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-a-dark-44-mono.svg b/packages/console/app/public/brand/badges/opencode-works-with-a-dark-44-mono.svg new file mode 100644 index 00000000000..b075fb70f1b --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-a-dark-44-mono.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-a-dark-44.png b/packages/console/app/public/brand/badges/opencode-works-with-a-dark-44.png new file mode 100644 index 00000000000..e995e95d4ec Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-a-dark-44.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-a-dark-44.svg b/packages/console/app/public/brand/badges/opencode-works-with-a-dark-44.svg new file mode 100644 index 00000000000..afd86af81ee --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-a-dark-44.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-a-light-20-mono-caps.png b/packages/console/app/public/brand/badges/opencode-works-with-a-light-20-mono-caps.png new file mode 100644 index 00000000000..f908e91c6dc Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-a-light-20-mono-caps.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-a-light-20-mono-caps.svg b/packages/console/app/public/brand/badges/opencode-works-with-a-light-20-mono-caps.svg new file mode 100644 index 00000000000..da36989ddb9 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-a-light-20-mono-caps.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-a-light-20-mono.png b/packages/console/app/public/brand/badges/opencode-works-with-a-light-20-mono.png new file mode 100644 index 00000000000..27c0bd3d89c Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-a-light-20-mono.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-a-light-20-mono.svg b/packages/console/app/public/brand/badges/opencode-works-with-a-light-20-mono.svg new file mode 100644 index 00000000000..d09524a873e --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-a-light-20-mono.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-a-light-20.png b/packages/console/app/public/brand/badges/opencode-works-with-a-light-20.png new file mode 100644 index 00000000000..1a85a0625ef Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-a-light-20.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-a-light-20.svg b/packages/console/app/public/brand/badges/opencode-works-with-a-light-20.svg new file mode 100644 index 00000000000..f82ecfd5ea9 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-a-light-20.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-a-light-32-mono-caps.png b/packages/console/app/public/brand/badges/opencode-works-with-a-light-32-mono-caps.png new file mode 100644 index 00000000000..8640f352b6c Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-a-light-32-mono-caps.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-a-light-32-mono-caps.svg b/packages/console/app/public/brand/badges/opencode-works-with-a-light-32-mono-caps.svg new file mode 100644 index 00000000000..c5ec77c873e --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-a-light-32-mono-caps.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-a-light-32-mono.png b/packages/console/app/public/brand/badges/opencode-works-with-a-light-32-mono.png new file mode 100644 index 00000000000..e475ff6eacb Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-a-light-32-mono.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-a-light-32-mono.svg b/packages/console/app/public/brand/badges/opencode-works-with-a-light-32-mono.svg new file mode 100644 index 00000000000..c61c6a0a949 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-a-light-32-mono.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-a-light-32.png b/packages/console/app/public/brand/badges/opencode-works-with-a-light-32.png new file mode 100644 index 00000000000..7756bee6170 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-a-light-32.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-a-light-32.svg b/packages/console/app/public/brand/badges/opencode-works-with-a-light-32.svg new file mode 100644 index 00000000000..d68c036ad51 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-a-light-32.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-a-light-44-mono-caps.png b/packages/console/app/public/brand/badges/opencode-works-with-a-light-44-mono-caps.png new file mode 100644 index 00000000000..92584e71dbb Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-a-light-44-mono-caps.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-a-light-44-mono-caps.svg b/packages/console/app/public/brand/badges/opencode-works-with-a-light-44-mono-caps.svg new file mode 100644 index 00000000000..e925bff150f --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-a-light-44-mono-caps.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-a-light-44-mono.png b/packages/console/app/public/brand/badges/opencode-works-with-a-light-44-mono.png new file mode 100644 index 00000000000..ee8379d8fea Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-a-light-44-mono.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-a-light-44-mono.svg b/packages/console/app/public/brand/badges/opencode-works-with-a-light-44-mono.svg new file mode 100644 index 00000000000..6331318afa6 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-a-light-44-mono.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-a-light-44.png b/packages/console/app/public/brand/badges/opencode-works-with-a-light-44.png new file mode 100644 index 00000000000..2d6ed4b780e Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-a-light-44.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-a-light-44.svg b/packages/console/app/public/brand/badges/opencode-works-with-a-light-44.svg new file mode 100644 index 00000000000..9fbf4f8de18 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-a-light-44.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-c-dark-20-mono-caps.png b/packages/console/app/public/brand/badges/opencode-works-with-c-dark-20-mono-caps.png new file mode 100644 index 00000000000..d6a4316d370 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-c-dark-20-mono-caps.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-c-dark-20-mono-caps.svg b/packages/console/app/public/brand/badges/opencode-works-with-c-dark-20-mono-caps.svg new file mode 100644 index 00000000000..3477f9ef815 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-c-dark-20-mono-caps.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-c-dark-20-mono.png b/packages/console/app/public/brand/badges/opencode-works-with-c-dark-20-mono.png new file mode 100644 index 00000000000..94f96e5964b Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-c-dark-20-mono.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-c-dark-20-mono.svg b/packages/console/app/public/brand/badges/opencode-works-with-c-dark-20-mono.svg new file mode 100644 index 00000000000..1e25801431f --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-c-dark-20-mono.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-c-dark-20.png b/packages/console/app/public/brand/badges/opencode-works-with-c-dark-20.png new file mode 100644 index 00000000000..cea638da06c Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-c-dark-20.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-c-dark-20.svg b/packages/console/app/public/brand/badges/opencode-works-with-c-dark-20.svg new file mode 100644 index 00000000000..d88a6c508fa --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-c-dark-20.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-c-dark-32-mono-caps.png b/packages/console/app/public/brand/badges/opencode-works-with-c-dark-32-mono-caps.png new file mode 100644 index 00000000000..374df66a91e Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-c-dark-32-mono-caps.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-c-dark-32-mono-caps.svg b/packages/console/app/public/brand/badges/opencode-works-with-c-dark-32-mono-caps.svg new file mode 100644 index 00000000000..06163d0068e --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-c-dark-32-mono-caps.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-c-dark-32-mono.png b/packages/console/app/public/brand/badges/opencode-works-with-c-dark-32-mono.png new file mode 100644 index 00000000000..fdc8a521f17 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-c-dark-32-mono.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-c-dark-32-mono.svg b/packages/console/app/public/brand/badges/opencode-works-with-c-dark-32-mono.svg new file mode 100644 index 00000000000..7cd2abe94a1 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-c-dark-32-mono.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-c-dark-32.png b/packages/console/app/public/brand/badges/opencode-works-with-c-dark-32.png new file mode 100644 index 00000000000..5f5878b77e7 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-c-dark-32.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-c-dark-32.svg b/packages/console/app/public/brand/badges/opencode-works-with-c-dark-32.svg new file mode 100644 index 00000000000..84014c4ff05 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-c-dark-32.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-c-dark-44-mono-caps.png b/packages/console/app/public/brand/badges/opencode-works-with-c-dark-44-mono-caps.png new file mode 100644 index 00000000000..0ec7140e2ae Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-c-dark-44-mono-caps.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-c-dark-44-mono-caps.svg b/packages/console/app/public/brand/badges/opencode-works-with-c-dark-44-mono-caps.svg new file mode 100644 index 00000000000..2534e3af311 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-c-dark-44-mono-caps.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-c-dark-44-mono.png b/packages/console/app/public/brand/badges/opencode-works-with-c-dark-44-mono.png new file mode 100644 index 00000000000..7d81c556437 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-c-dark-44-mono.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-c-dark-44-mono.svg b/packages/console/app/public/brand/badges/opencode-works-with-c-dark-44-mono.svg new file mode 100644 index 00000000000..6145c11a1fb --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-c-dark-44-mono.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-c-dark-44.png b/packages/console/app/public/brand/badges/opencode-works-with-c-dark-44.png new file mode 100644 index 00000000000..22ec6c20ac3 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-c-dark-44.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-c-dark-44.svg b/packages/console/app/public/brand/badges/opencode-works-with-c-dark-44.svg new file mode 100644 index 00000000000..2108ed1db83 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-c-dark-44.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-c-light-20-mono-caps.png b/packages/console/app/public/brand/badges/opencode-works-with-c-light-20-mono-caps.png new file mode 100644 index 00000000000..5d78476a2da Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-c-light-20-mono-caps.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-c-light-20-mono-caps.svg b/packages/console/app/public/brand/badges/opencode-works-with-c-light-20-mono-caps.svg new file mode 100644 index 00000000000..8f5977b0fd4 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-c-light-20-mono-caps.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-c-light-20-mono.png b/packages/console/app/public/brand/badges/opencode-works-with-c-light-20-mono.png new file mode 100644 index 00000000000..5f5c95bab92 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-c-light-20-mono.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-c-light-20-mono.svg b/packages/console/app/public/brand/badges/opencode-works-with-c-light-20-mono.svg new file mode 100644 index 00000000000..67002ba8c3f --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-c-light-20-mono.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-c-light-20.png b/packages/console/app/public/brand/badges/opencode-works-with-c-light-20.png new file mode 100644 index 00000000000..6db45e4a30b Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-c-light-20.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-c-light-20.svg b/packages/console/app/public/brand/badges/opencode-works-with-c-light-20.svg new file mode 100644 index 00000000000..008af4fdc0e --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-c-light-20.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-c-light-32-mono-caps.png b/packages/console/app/public/brand/badges/opencode-works-with-c-light-32-mono-caps.png new file mode 100644 index 00000000000..7e51a9be772 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-c-light-32-mono-caps.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-c-light-32-mono-caps.svg b/packages/console/app/public/brand/badges/opencode-works-with-c-light-32-mono-caps.svg new file mode 100644 index 00000000000..4d7ae9c1ac1 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-c-light-32-mono-caps.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-c-light-32-mono.png b/packages/console/app/public/brand/badges/opencode-works-with-c-light-32-mono.png new file mode 100644 index 00000000000..eae9e703ecc Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-c-light-32-mono.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-c-light-32-mono.svg b/packages/console/app/public/brand/badges/opencode-works-with-c-light-32-mono.svg new file mode 100644 index 00000000000..744769e7f22 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-c-light-32-mono.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-c-light-32.png b/packages/console/app/public/brand/badges/opencode-works-with-c-light-32.png new file mode 100644 index 00000000000..2a031b088ab Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-c-light-32.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-c-light-32.svg b/packages/console/app/public/brand/badges/opencode-works-with-c-light-32.svg new file mode 100644 index 00000000000..4e0bec627e9 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-c-light-32.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-c-light-44-mono-caps.png b/packages/console/app/public/brand/badges/opencode-works-with-c-light-44-mono-caps.png new file mode 100644 index 00000000000..0e8abbd64e6 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-c-light-44-mono-caps.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-c-light-44-mono-caps.svg b/packages/console/app/public/brand/badges/opencode-works-with-c-light-44-mono-caps.svg new file mode 100644 index 00000000000..2399ab054cf --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-c-light-44-mono-caps.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-c-light-44-mono.png b/packages/console/app/public/brand/badges/opencode-works-with-c-light-44-mono.png new file mode 100644 index 00000000000..9386e6a14b3 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-c-light-44-mono.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-c-light-44-mono.svg b/packages/console/app/public/brand/badges/opencode-works-with-c-light-44-mono.svg new file mode 100644 index 00000000000..f2c9b10c2bb --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-c-light-44-mono.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-c-light-44.png b/packages/console/app/public/brand/badges/opencode-works-with-c-light-44.png new file mode 100644 index 00000000000..361794542b0 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-c-light-44.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-c-light-44.svg b/packages/console/app/public/brand/badges/opencode-works-with-c-light-44.svg new file mode 100644 index 00000000000..4ca0440df56 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-c-light-44.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-f-dark-20-mono-caps.png b/packages/console/app/public/brand/badges/opencode-works-with-f-dark-20-mono-caps.png new file mode 100644 index 00000000000..691dfa27fa6 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-f-dark-20-mono-caps.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-f-dark-20-mono-caps.svg b/packages/console/app/public/brand/badges/opencode-works-with-f-dark-20-mono-caps.svg new file mode 100644 index 00000000000..3d97a9a4725 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-f-dark-20-mono-caps.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-f-dark-20-mono.png b/packages/console/app/public/brand/badges/opencode-works-with-f-dark-20-mono.png new file mode 100644 index 00000000000..43a18c39c44 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-f-dark-20-mono.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-f-dark-20-mono.svg b/packages/console/app/public/brand/badges/opencode-works-with-f-dark-20-mono.svg new file mode 100644 index 00000000000..c1e8cf9becc --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-f-dark-20-mono.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-f-dark-20.png b/packages/console/app/public/brand/badges/opencode-works-with-f-dark-20.png new file mode 100644 index 00000000000..cbf625e5e49 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-f-dark-20.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-f-dark-20.svg b/packages/console/app/public/brand/badges/opencode-works-with-f-dark-20.svg new file mode 100644 index 00000000000..fcb2d74ee51 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-f-dark-20.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-f-dark-32-mono-caps.png b/packages/console/app/public/brand/badges/opencode-works-with-f-dark-32-mono-caps.png new file mode 100644 index 00000000000..0bf5aef2e35 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-f-dark-32-mono-caps.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-f-dark-32-mono-caps.svg b/packages/console/app/public/brand/badges/opencode-works-with-f-dark-32-mono-caps.svg new file mode 100644 index 00000000000..c3b6d781293 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-f-dark-32-mono-caps.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-f-dark-32-mono.png b/packages/console/app/public/brand/badges/opencode-works-with-f-dark-32-mono.png new file mode 100644 index 00000000000..1ce4facdc7d Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-f-dark-32-mono.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-f-dark-32-mono.svg b/packages/console/app/public/brand/badges/opencode-works-with-f-dark-32-mono.svg new file mode 100644 index 00000000000..b7666d9afdb --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-f-dark-32-mono.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-f-dark-32.png b/packages/console/app/public/brand/badges/opencode-works-with-f-dark-32.png new file mode 100644 index 00000000000..1cb4e506525 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-f-dark-32.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-f-dark-32.svg b/packages/console/app/public/brand/badges/opencode-works-with-f-dark-32.svg new file mode 100644 index 00000000000..66caa1ddaf7 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-f-dark-32.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-f-dark-44-mono-caps.png b/packages/console/app/public/brand/badges/opencode-works-with-f-dark-44-mono-caps.png new file mode 100644 index 00000000000..d9d0e6bd78c Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-f-dark-44-mono-caps.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-f-dark-44-mono-caps.svg b/packages/console/app/public/brand/badges/opencode-works-with-f-dark-44-mono-caps.svg new file mode 100644 index 00000000000..c00ccb3d991 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-f-dark-44-mono-caps.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-f-dark-44-mono.png b/packages/console/app/public/brand/badges/opencode-works-with-f-dark-44-mono.png new file mode 100644 index 00000000000..6c122afff93 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-f-dark-44-mono.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-f-dark-44-mono.svg b/packages/console/app/public/brand/badges/opencode-works-with-f-dark-44-mono.svg new file mode 100644 index 00000000000..99f7623539f --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-f-dark-44-mono.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-f-dark-44.png b/packages/console/app/public/brand/badges/opencode-works-with-f-dark-44.png new file mode 100644 index 00000000000..a3ea88ede1f Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-f-dark-44.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-f-dark-44.svg b/packages/console/app/public/brand/badges/opencode-works-with-f-dark-44.svg new file mode 100644 index 00000000000..cea23ed7066 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-f-dark-44.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-f-light-20-mono-caps.png b/packages/console/app/public/brand/badges/opencode-works-with-f-light-20-mono-caps.png new file mode 100644 index 00000000000..c8e79647c4b Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-f-light-20-mono-caps.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-f-light-20-mono-caps.svg b/packages/console/app/public/brand/badges/opencode-works-with-f-light-20-mono-caps.svg new file mode 100644 index 00000000000..1c14f2d64e0 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-f-light-20-mono-caps.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-f-light-20-mono.png b/packages/console/app/public/brand/badges/opencode-works-with-f-light-20-mono.png new file mode 100644 index 00000000000..b22cb884803 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-f-light-20-mono.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-f-light-20-mono.svg b/packages/console/app/public/brand/badges/opencode-works-with-f-light-20-mono.svg new file mode 100644 index 00000000000..3c2bb95bf1e --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-f-light-20-mono.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-f-light-20.png b/packages/console/app/public/brand/badges/opencode-works-with-f-light-20.png new file mode 100644 index 00000000000..b4e7c625a6c Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-f-light-20.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-f-light-20.svg b/packages/console/app/public/brand/badges/opencode-works-with-f-light-20.svg new file mode 100644 index 00000000000..a7e784fd76a --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-f-light-20.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-f-light-32-mono-caps.png b/packages/console/app/public/brand/badges/opencode-works-with-f-light-32-mono-caps.png new file mode 100644 index 00000000000..22b24e1edb4 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-f-light-32-mono-caps.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-f-light-32-mono-caps.svg b/packages/console/app/public/brand/badges/opencode-works-with-f-light-32-mono-caps.svg new file mode 100644 index 00000000000..c5b5ff46acd --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-f-light-32-mono-caps.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-f-light-32-mono.png b/packages/console/app/public/brand/badges/opencode-works-with-f-light-32-mono.png new file mode 100644 index 00000000000..c0276aea4c1 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-f-light-32-mono.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-f-light-32-mono.svg b/packages/console/app/public/brand/badges/opencode-works-with-f-light-32-mono.svg new file mode 100644 index 00000000000..fee683cc8dc --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-f-light-32-mono.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-f-light-32.png b/packages/console/app/public/brand/badges/opencode-works-with-f-light-32.png new file mode 100644 index 00000000000..9fff6ae1f63 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-f-light-32.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-f-light-32.svg b/packages/console/app/public/brand/badges/opencode-works-with-f-light-32.svg new file mode 100644 index 00000000000..b626001b1c2 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-f-light-32.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-f-light-44-mono-caps.png b/packages/console/app/public/brand/badges/opencode-works-with-f-light-44-mono-caps.png new file mode 100644 index 00000000000..2f9905c3723 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-f-light-44-mono-caps.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-f-light-44-mono-caps.svg b/packages/console/app/public/brand/badges/opencode-works-with-f-light-44-mono-caps.svg new file mode 100644 index 00000000000..a08c1e1a42e --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-f-light-44-mono-caps.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-f-light-44-mono.png b/packages/console/app/public/brand/badges/opencode-works-with-f-light-44-mono.png new file mode 100644 index 00000000000..7e61358f2d8 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-f-light-44-mono.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-f-light-44-mono.svg b/packages/console/app/public/brand/badges/opencode-works-with-f-light-44-mono.svg new file mode 100644 index 00000000000..d9de7a54e4f --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-f-light-44-mono.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-f-light-44.png b/packages/console/app/public/brand/badges/opencode-works-with-f-light-44.png new file mode 100644 index 00000000000..f1b40c32e7d Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-f-light-44.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-f-light-44.svg b/packages/console/app/public/brand/badges/opencode-works-with-f-light-44.svg new file mode 100644 index 00000000000..fc779dc7b1c --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-f-light-44.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-g-dark-20-mono-caps.png b/packages/console/app/public/brand/badges/opencode-works-with-g-dark-20-mono-caps.png new file mode 100644 index 00000000000..71ee71e7485 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-g-dark-20-mono-caps.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-g-dark-20-mono-caps.svg b/packages/console/app/public/brand/badges/opencode-works-with-g-dark-20-mono-caps.svg new file mode 100644 index 00000000000..33d672c46fd --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-g-dark-20-mono-caps.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-g-dark-20-mono.png b/packages/console/app/public/brand/badges/opencode-works-with-g-dark-20-mono.png new file mode 100644 index 00000000000..0c9877f146e Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-g-dark-20-mono.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-g-dark-20-mono.svg b/packages/console/app/public/brand/badges/opencode-works-with-g-dark-20-mono.svg new file mode 100644 index 00000000000..22d98401ecf --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-g-dark-20-mono.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-g-dark-20.png b/packages/console/app/public/brand/badges/opencode-works-with-g-dark-20.png new file mode 100644 index 00000000000..5101d7a2592 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-g-dark-20.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-g-dark-20.svg b/packages/console/app/public/brand/badges/opencode-works-with-g-dark-20.svg new file mode 100644 index 00000000000..46bc266cd3d --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-g-dark-20.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-g-light-20-mono-caps.png b/packages/console/app/public/brand/badges/opencode-works-with-g-light-20-mono-caps.png new file mode 100644 index 00000000000..f04f13ce413 Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-g-light-20-mono-caps.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-g-light-20-mono-caps.svg b/packages/console/app/public/brand/badges/opencode-works-with-g-light-20-mono-caps.svg new file mode 100644 index 00000000000..f7469b35806 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-g-light-20-mono-caps.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-g-light-20-mono.png b/packages/console/app/public/brand/badges/opencode-works-with-g-light-20-mono.png new file mode 100644 index 00000000000..c88d948b8be Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-g-light-20-mono.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-g-light-20-mono.svg b/packages/console/app/public/brand/badges/opencode-works-with-g-light-20-mono.svg new file mode 100644 index 00000000000..e07d724cd1d --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-g-light-20-mono.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/badges/opencode-works-with-g-light-20.png b/packages/console/app/public/brand/badges/opencode-works-with-g-light-20.png new file mode 100644 index 00000000000..a51828f344a Binary files /dev/null and b/packages/console/app/public/brand/badges/opencode-works-with-g-light-20.png differ diff --git a/packages/console/app/public/brand/badges/opencode-works-with-g-light-20.svg b/packages/console/app/public/brand/badges/opencode-works-with-g-light-20.svg new file mode 100644 index 00000000000..a4e87ed6406 --- /dev/null +++ b/packages/console/app/public/brand/badges/opencode-works-with-g-light-20.svg @@ -0,0 +1 @@ +Works with OpenCode \ No newline at end of file diff --git a/packages/console/app/public/brand/files/opencode-avatar-dark-1024.png b/packages/console/app/public/brand/files/opencode-avatar-dark-1024.png new file mode 100644 index 00000000000..a09dd978d4f Binary files /dev/null and b/packages/console/app/public/brand/files/opencode-avatar-dark-1024.png differ diff --git a/packages/console/app/public/brand/files/opencode-avatar-light-1024.png b/packages/console/app/public/brand/files/opencode-avatar-light-1024.png new file mode 100644 index 00000000000..7d894587187 Binary files /dev/null and b/packages/console/app/public/brand/files/opencode-avatar-light-1024.png differ diff --git a/packages/console/app/public/brand/files/opencode-logo-dark-square.png b/packages/console/app/public/brand/files/opencode-logo-dark-square.png new file mode 100644 index 00000000000..b0668b3416b Binary files /dev/null and b/packages/console/app/public/brand/files/opencode-logo-dark-square.png differ diff --git a/packages/console/app/public/brand/files/opencode-logo-dark-square.svg b/packages/console/app/public/brand/files/opencode-logo-dark-square.svg new file mode 100644 index 00000000000..dffac0e08d1 --- /dev/null +++ b/packages/console/app/public/brand/files/opencode-logo-dark-square.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/packages/console/app/public/brand/files/opencode-logo-dark.png b/packages/console/app/public/brand/files/opencode-logo-dark.png new file mode 100644 index 00000000000..4a6aac79038 Binary files /dev/null and b/packages/console/app/public/brand/files/opencode-logo-dark.png differ diff --git a/packages/console/app/public/brand/files/opencode-logo-dark.svg b/packages/console/app/public/brand/files/opencode-logo-dark.svg new file mode 100644 index 00000000000..e30cf42bafa --- /dev/null +++ b/packages/console/app/public/brand/files/opencode-logo-dark.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/packages/console/app/public/brand/files/opencode-logo-light-square.png b/packages/console/app/public/brand/files/opencode-logo-light-square.png new file mode 100644 index 00000000000..6372e4fb771 Binary files /dev/null and b/packages/console/app/public/brand/files/opencode-logo-light-square.png differ diff --git a/packages/console/app/public/brand/files/opencode-logo-light-square.svg b/packages/console/app/public/brand/files/opencode-logo-light-square.svg new file mode 100644 index 00000000000..8d925731462 --- /dev/null +++ b/packages/console/app/public/brand/files/opencode-logo-light-square.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/packages/console/app/public/brand/files/opencode-logo-light.png b/packages/console/app/public/brand/files/opencode-logo-light.png new file mode 100644 index 00000000000..3f2891fa644 Binary files /dev/null and b/packages/console/app/public/brand/files/opencode-logo-light.png differ diff --git a/packages/console/app/public/brand/files/opencode-logo-light.svg b/packages/console/app/public/brand/files/opencode-logo-light.svg new file mode 100644 index 00000000000..b97db9460ea --- /dev/null +++ b/packages/console/app/public/brand/files/opencode-logo-light.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/packages/console/app/public/brand/files/opencode-logo-transparent-dark.png b/packages/console/app/public/brand/files/opencode-logo-transparent-dark.png new file mode 100644 index 00000000000..8982c1c6a56 Binary files /dev/null and b/packages/console/app/public/brand/files/opencode-logo-transparent-dark.png differ diff --git a/packages/console/app/public/brand/files/opencode-logo-transparent-dark.svg b/packages/console/app/public/brand/files/opencode-logo-transparent-dark.svg new file mode 100644 index 00000000000..24c1b7efdc3 --- /dev/null +++ b/packages/console/app/public/brand/files/opencode-logo-transparent-dark.svg @@ -0,0 +1,4 @@ + + + + diff --git a/packages/console/app/public/brand/files/opencode-logo-transparent-light.png b/packages/console/app/public/brand/files/opencode-logo-transparent-light.png new file mode 100644 index 00000000000..5bccb844551 Binary files /dev/null and b/packages/console/app/public/brand/files/opencode-logo-transparent-light.png differ diff --git a/packages/console/app/public/brand/files/opencode-logo-transparent-light.svg b/packages/console/app/public/brand/files/opencode-logo-transparent-light.svg new file mode 100644 index 00000000000..33848070d2e --- /dev/null +++ b/packages/console/app/public/brand/files/opencode-logo-transparent-light.svg @@ -0,0 +1,4 @@ + + + + diff --git a/packages/console/app/public/brand/files/opencode-wordmark-dark.png b/packages/console/app/public/brand/files/opencode-wordmark-dark.png new file mode 100644 index 00000000000..bd94b4d13bd Binary files /dev/null and b/packages/console/app/public/brand/files/opencode-wordmark-dark.png differ diff --git a/packages/console/app/public/brand/files/opencode-wordmark-dark.svg b/packages/console/app/public/brand/files/opencode-wordmark-dark.svg new file mode 100644 index 00000000000..8d5e401ff04 --- /dev/null +++ b/packages/console/app/public/brand/files/opencode-wordmark-dark.svg @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/console/app/public/brand/files/opencode-wordmark-light.png b/packages/console/app/public/brand/files/opencode-wordmark-light.png new file mode 100644 index 00000000000..7d56ce6256d Binary files /dev/null and b/packages/console/app/public/brand/files/opencode-wordmark-light.png differ diff --git a/packages/console/app/public/brand/files/opencode-wordmark-light.svg b/packages/console/app/public/brand/files/opencode-wordmark-light.svg new file mode 100644 index 00000000000..4da560cbf7c --- /dev/null +++ b/packages/console/app/public/brand/files/opencode-wordmark-light.svg @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/console/app/public/brand/files/opencode-wordmark-simple-dark.png b/packages/console/app/public/brand/files/opencode-wordmark-simple-dark.png new file mode 100644 index 00000000000..22a324fabb4 Binary files /dev/null and b/packages/console/app/public/brand/files/opencode-wordmark-simple-dark.png differ diff --git a/packages/console/app/public/brand/files/opencode-wordmark-simple-dark.svg b/packages/console/app/public/brand/files/opencode-wordmark-simple-dark.svg new file mode 100644 index 00000000000..afc323e4d55 --- /dev/null +++ b/packages/console/app/public/brand/files/opencode-wordmark-simple-dark.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/console/app/public/brand/files/opencode-wordmark-simple-light.png b/packages/console/app/public/brand/files/opencode-wordmark-simple-light.png new file mode 100644 index 00000000000..d111ce9cf29 Binary files /dev/null and b/packages/console/app/public/brand/files/opencode-wordmark-simple-light.png differ diff --git a/packages/console/app/public/brand/files/opencode-wordmark-simple-light.svg b/packages/console/app/public/brand/files/opencode-wordmark-simple-light.svg new file mode 100644 index 00000000000..29be24534d2 --- /dev/null +++ b/packages/console/app/public/brand/files/opencode-wordmark-simple-light.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/console/app/public/brand/files/opencode-wordmark-solid-dark.png b/packages/console/app/public/brand/files/opencode-wordmark-solid-dark.png new file mode 100644 index 00000000000..a0078569900 Binary files /dev/null and b/packages/console/app/public/brand/files/opencode-wordmark-solid-dark.png differ diff --git a/packages/console/app/public/brand/files/opencode-wordmark-solid-dark.svg b/packages/console/app/public/brand/files/opencode-wordmark-solid-dark.svg new file mode 100644 index 00000000000..68326569302 --- /dev/null +++ b/packages/console/app/public/brand/files/opencode-wordmark-solid-dark.svg @@ -0,0 +1,3 @@ + + + diff --git a/packages/console/app/public/brand/files/opencode-wordmark-solid-light.png b/packages/console/app/public/brand/files/opencode-wordmark-solid-light.png new file mode 100644 index 00000000000..51e472db2d6 Binary files /dev/null and b/packages/console/app/public/brand/files/opencode-wordmark-solid-light.png differ diff --git a/packages/console/app/public/brand/files/opencode-wordmark-solid-light.svg b/packages/console/app/public/brand/files/opencode-wordmark-solid-light.svg new file mode 100644 index 00000000000..132ad3b7ecf --- /dev/null +++ b/packages/console/app/public/brand/files/opencode-wordmark-solid-light.svg @@ -0,0 +1,3 @@ + + + diff --git a/packages/console/app/public/brand/files/opencode-wordmark-transparent-dark.png b/packages/console/app/public/brand/files/opencode-wordmark-transparent-dark.png new file mode 100644 index 00000000000..b9c1783cbd2 Binary files /dev/null and b/packages/console/app/public/brand/files/opencode-wordmark-transparent-dark.png differ diff --git a/packages/console/app/public/brand/files/opencode-wordmark-transparent-dark.svg b/packages/console/app/public/brand/files/opencode-wordmark-transparent-dark.svg new file mode 100644 index 00000000000..73611fb4554 --- /dev/null +++ b/packages/console/app/public/brand/files/opencode-wordmark-transparent-dark.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/packages/console/app/public/brand/files/opencode-wordmark-transparent-light.png b/packages/console/app/public/brand/files/opencode-wordmark-transparent-light.png new file mode 100644 index 00000000000..39dd1d8169c Binary files /dev/null and b/packages/console/app/public/brand/files/opencode-wordmark-transparent-light.png differ diff --git a/packages/console/app/public/brand/files/opencode-wordmark-transparent-light.svg b/packages/console/app/public/brand/files/opencode-wordmark-transparent-light.svg new file mode 100644 index 00000000000..4d3ed31b44f --- /dev/null +++ b/packages/console/app/public/brand/files/opencode-wordmark-transparent-light.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/packages/console/app/public/brand/screenshots/manifest.json b/packages/console/app/public/brand/screenshots/manifest.json new file mode 100644 index 00000000000..4c7a1492c22 --- /dev/null +++ b/packages/console/app/public/brand/screenshots/manifest.json @@ -0,0 +1,78 @@ +{ + "schema": 1, + "opencodeVersion": "2.2.5", + "capturedAt": "2026-11-05T16:18:52.884Z", + "generator": { + "script": "packages/console/app/script/capture-assets.ts", + "commit": "4617210822", + "vhs": "vhs version 0.12.1" + }, + "window": { + "width": 1600, + "height": 1000, + "scale": 2, + "fontSize": 20 + }, + "assets": [ + { + "surface": "terminal", + "id": "home", + "mode": "dark", + "file": "terminal/terminal-home-dark@2x.png", + "width": 3200, + "height": 2000, + "bytes": 98582, + "sha256": "9475d25e0ae48e6adce223a57f4cfededea0b13bdc118d23e0260800df9ce467" + }, + { + "surface": "terminal", + "id": "permission", + "mode": "dark", + "file": "terminal/terminal-permission-dark@2x.png", + "width": 3200, + "height": 2000, + "bytes": 581794, + "sha256": "463dc153f879f74143a07b2371f2454fa3a47ff2b207af5ee6f943431d92d706" + }, + { + "surface": "terminal", + "id": "done", + "mode": "dark", + "file": "terminal/terminal-done-dark@2x.png", + "width": 3200, + "height": 2000, + "bytes": 603678, + "sha256": "43ffcaaf6d18b63eac8bdb1a92b070d9bf2a74bd573e094b8704b4e26e5da824" + }, + { + "surface": "terminal", + "id": "home", + "mode": "light", + "file": "terminal/terminal-home-light@2x.png", + "width": 3200, + "height": 2000, + "bytes": 96674, + "sha256": "5b36854f18476dc8cc072d3fe0d47c83abf0518147d7e73600768aaf223cf31b" + }, + { + "surface": "terminal", + "id": "permission", + "mode": "light", + "file": "terminal/terminal-permission-light@2x.png", + "width": 3200, + "height": 2000, + "bytes": 579396, + "sha256": "2dd8852c15cbbd5cf72910fdda06126b027a5d38b97c95b4e804dea4982d7cd9" + }, + { + "surface": "terminal", + "id": "done", + "mode": "light", + "file": "terminal/terminal-done-light@2x.png", + "width": 3200, + "height": 2000, + "bytes": 599948, + "sha256": "6bcf981e5e0760705c49052ac7f6d4fcfa705b2394a7e2aa4073734385149e09" + } + ] +} diff --git a/packages/console/app/public/brand/screenshots/opencode-desktop.png b/packages/console/app/public/brand/screenshots/opencode-desktop.png new file mode 100644 index 00000000000..c351d44235e Binary files /dev/null and b/packages/console/app/public/brand/screenshots/opencode-desktop.png differ diff --git a/packages/console/app/public/brand/screenshots/opencode-desktop.webp b/packages/console/app/public/brand/screenshots/opencode-desktop.webp new file mode 100644 index 00000000000..ac700df957a Binary files /dev/null and b/packages/console/app/public/brand/screenshots/opencode-desktop.webp differ diff --git a/packages/console/app/public/brand/screenshots/opencode-mobile.png b/packages/console/app/public/brand/screenshots/opencode-mobile.png new file mode 100644 index 00000000000..5daa4308f78 Binary files /dev/null and b/packages/console/app/public/brand/screenshots/opencode-mobile.png differ diff --git a/packages/console/app/public/brand/screenshots/opencode-mobile.webp b/packages/console/app/public/brand/screenshots/opencode-mobile.webp new file mode 100644 index 00000000000..306edb626c8 Binary files /dev/null and b/packages/console/app/public/brand/screenshots/opencode-mobile.webp differ diff --git a/packages/console/app/public/brand/screenshots/opencode-terminal-dark.png b/packages/console/app/public/brand/screenshots/opencode-terminal-dark.png new file mode 100644 index 00000000000..0f3ee0b8b99 Binary files /dev/null and b/packages/console/app/public/brand/screenshots/opencode-terminal-dark.png differ diff --git a/packages/console/app/public/brand/screenshots/opencode-terminal-dark.webp b/packages/console/app/public/brand/screenshots/opencode-terminal-dark.webp new file mode 100644 index 00000000000..783fb8adb12 Binary files /dev/null and b/packages/console/app/public/brand/screenshots/opencode-terminal-dark.webp differ diff --git a/packages/console/app/public/brand/screenshots/opencode-terminal-light.png b/packages/console/app/public/brand/screenshots/opencode-terminal-light.png new file mode 100644 index 00000000000..c412758a062 Binary files /dev/null and b/packages/console/app/public/brand/screenshots/opencode-terminal-light.png differ diff --git a/packages/console/app/public/brand/screenshots/opencode-terminal-light.webp b/packages/console/app/public/brand/screenshots/opencode-terminal-light.webp new file mode 100644 index 00000000000..eb0fb647898 Binary files /dev/null and b/packages/console/app/public/brand/screenshots/opencode-terminal-light.webp differ diff --git a/packages/console/app/public/font/confetti.mjs b/packages/console/app/public/font/confetti.mjs new file mode 100644 index 00000000000..28a2e6a6b3c --- /dev/null +++ b/packages/console/app/public/font/confetti.mjs @@ -0,0 +1,117 @@ +export const CONFETTI_DURATION = 6200; +export const LETTER_PERSPECTIVE = 3.2; + +export function letterCelebrationAt(index, elapsed) { + const idle = { rotation: 0, lift: 0, scale: 1 }; + if (index < 0 || index >= 8 || elapsed < 0) return idle; + // Forward flips travel left-to-right, then return in the opposite order. + for (const [start, order] of [[40, index], [1300, 7 - index]]) { + const progress = (elapsed - start - order * 70) / 550; + if (progress < 0 || progress >= 1) continue; + const eased = progress * progress * (3 - 2 * progress); + const bounce = Math.sin(progress * Math.PI); + return { + rotation: -Math.PI * 2 * eased, + lift: -.26 * bounce, + scale: 1 + .18 * bounce, + }; + } + return idle; +} + +export function projectLetterSlice(y, height, motion) { + const scaledY = y * motion.scale; + const perspective = height * LETTER_PERSPECTIVE; + const depth = scaledY * Math.sin(motion.rotation); + const projection = perspective / (perspective - depth); + return { + y: scaledY * Math.cos(motion.rotation) * projection, + widthScale: motion.scale * projection, + }; +} + +export function isPerfectAnagram(text) { + const letters = text.toLowerCase().replace(/\s/gu, ''); + return letters !== 'opencode' && letters.length === 8 && [...letters].sort().join('') === 'cdeenoop'; +} + +export function confettiColors() { + // The site's palette: its link blues, ink and greys. + return ['#3b5cf6', '#4f8bff', '#141414', '#8a8a8a', '#cecece']; +} + +export function createConfetti(seed) { + // A seeded particle field lets the GIF replay the same burst as the screen. + let state = seed >>> 0; + function random() { + state += 0x6d2b79f5; + let value = Math.imul(state ^ state >>> 15, 1 | state); + value ^= value + Math.imul(value ^ value >>> 7, 61 | value); + return ((value ^ value >>> 14) >>> 0) / 4294967296; + } + return Array.from({ length: 1600 }, (_, index) => { + const left = index % 2 === 0; + const shower = index >= 1280; + const burst = Math.floor(index / 320); + const centerBurst = !shower && burst === 2; + return { + x: shower ? random() : centerBurst ? .4 + random() * .2 : left ? .03 : .97, + y: shower ? -.05 - random() * .2 : centerBurst ? .62 : .86 + random() * .1, + vx: shower ? (random() - .5) * .2 : (left ? 1 : -1) * (.35 + random() * .7), + vy: shower ? .12 + random() * .2 : -1.05 - random() * .6, + gravity: shower ? .12 + random() * .05 : .42 + random() * .12, + delay: shower ? .8 + random() * 2.6 : burst * .8 + random() * .24, + size: 7 + random() * 9, + rotation: random() * Math.PI * 2, + spin: (random() - .5) * 12, + phase: random() * Math.PI * 2, + color: index % 5, + shape: index % 11 === 0 ? 'star' : index % 7 === 0 ? 'ribbon' : index % 5 === 0 ? 'round' : 'paper', + }; + }); +} + +export function drawConfetti(context, particles, elapsed, width, height) { + if (elapsed < 0 || elapsed >= CONFETTI_DURATION) return; + const colors = confettiColors(); + const sizeScale = Math.min(width, height) / 900; + const opacity = Math.min(1, (CONFETTI_DURATION - elapsed) / 900); + context.save(); + context.globalAlpha = opacity; + for (const particle of particles) { + const time = elapsed / 1000 - particle.delay; + if (time < 0) continue; + const x = (particle.x + particle.vx * time / (1 + .5 * time)) * width; + const y = (particle.y + particle.vy * time + particle.gravity * time * time) * height; + const size = particle.size * sizeScale; + if (x < -size * 4 || x > width + size * 4 || y < -size * 4 || y > height + size * 4) continue; + context.save(); + context.translate(x + Math.sin(time * 5 + particle.phase) * size, y); + context.rotate(particle.rotation + particle.spin * time); + context.scale(1, .25 + .75 * Math.abs(Math.cos(time * 7 + particle.phase))); + context.fillStyle = colors[particle.color]; + if (particle.shape === 'round') { + context.beginPath(); + context.arc(0, 0, size * .42, 0, Math.PI * 2); + context.fill(); + } else if (particle.shape === 'star') { + context.beginPath(); + for (let point = 0; point < 10; point++) { + const radius = size * (point % 2 === 0 ? .7 : .3); + const angle = point * Math.PI / 5 - Math.PI / 2; + const x = Math.cos(angle) * radius; + const y = Math.sin(angle) * radius; + if (point === 0) context.moveTo(x, y); + else context.lineTo(x, y); + } + context.closePath(); + context.fill(); + } else if (particle.shape === 'ribbon') { + context.fillRect(-size * .16, -size * 1.4, size * .32, size * 2.8); + } else { + context.fillRect(-size / 2, -size * .35, size, size * .7); + } + context.restore(); + } + context.restore(); +} diff --git a/packages/console/app/public/font/film/opencode-font-film-v3.en.vtt b/packages/console/app/public/font/film/opencode-font-film-v3.en.vtt new file mode 100644 index 00000000000..c4eeaf0b0f9 --- /dev/null +++ b/packages/console/app/public/font/film/opencode-font-film-v3.en.vtt @@ -0,0 +1,73 @@ +WEBVTT + +1 +00:00:00.600 --> 00:00:03.410 +In the beginning… there was a square. + +2 +00:00:03.410 --> 00:00:07.750 +One hundred and twenty units. No more. No less. + +3 +00:00:07.770 --> 00:00:11.880 +The logo demanded letters that obey the grid. Absolutely. + +4 +00:00:11.880 --> 00:00:23.050 +It was born in the terminal. One module: half a character cell. One letter: four cells wide. If it doesn’t render in a terminal… it doesn’t exist. + +5 +00:00:23.070 --> 00:00:26.940 +So we did not draw twenty-six letters. We drew six. + +6 +00:00:26.940 --> 00:00:30.840 +O. P. E. N. C. D. + +7 +00:00:30.840 --> 00:00:36.120 +The wordmark only ever needed six. Every other letter… was a compromise. + +8 +00:00:36.320 --> 00:00:39.290 +No curves. Curves are indecision. + +9 +00:00:39.290 --> 00:00:41.740 +No diagonals. No shortcuts. + +10 +00:00:41.740 --> 00:00:45.660 +Every edge on the grid. Every corner on a whole module. + +11 +00:00:45.660 --> 00:00:51.670 +Symmetry: measured. Ink coverage: counted. The shade: calibrated to the module. + +12 +00:00:51.670 --> 00:00:55.500 +The o carries fourteen modules of ink. Exactly half. + +13 +00:00:55.500 --> 00:00:59.340 +Thirty-six kerning pairs. Every value… zero. + +14 +00:00:59.340 --> 00:01:03.110 +Not because we didn’t care. Because we cared… completely. + +15 +00:01:03.130 --> 00:01:06.970 +Forty-nine kilobytes. Not one byte of decoration. + +16 +00:01:06.970 --> 00:01:12.170 +Some typefaces have thousands of glyphs. This one has the only six that matter. + +17 +00:01:12.370 --> 00:01:24.630 +Only six letters. Yet every visit maps the other 3,591 characters afresh. A number of combinations 2,795 digits long. + +18 +00:01:24.740 --> 00:01:28.130 +Download it… and the typeface is yours alone. diff --git a/packages/console/app/public/font/font.mjs b/packages/console/app/public/font/font.mjs new file mode 100644 index 00000000000..eada06e139b --- /dev/null +++ b/packages/console/app/public/font/font.mjs @@ -0,0 +1,90 @@ +import { GLYPHS } from './glyphs.mjs'; + +export const FONT_FAMILY = 'OpenCode'; +export const FONT_FILENAME = 'OpenCode.otf'; +const LETTERS = Object.keys(GLYPHS); +const INVISIBLE = [0, 9, 10, 13, 0x200b, 0x200c, 0x200d, 0x2060, 0xfe0e, 0xfe0f, 0xfeff]; +const RANGES = [ + [0x20, 0x7e], // Every printable character on a standard keyboard. + [0xa0, 0x24f], // Latin-1 and Latin Extended A/B. + [0x370, 0x52f], // Greek and Cyrillic. + [0x1e00, 0x1eff], // Latin Extended Additional. + [0x2000, 0x206f], // Punctuation and spaces. + [0x20a0, 0x214f], // Currency and letterlike symbols. + [0x2190, 0x23ff], // Arrows, mathematics, and technical symbols. + [0x2600, 0x27bf], // Miscellaneous symbols and dingbats. + [0x1f1e6, 0x1f1ff], // Regional indicators. + [0x1f300, 0x1f6ff], // Common emoji, pictographs, and transport symbols. + [0x1f900, 0x1faff], // Supplemental emoji. +]; + +export const FONT_CODE_POINTS = RANGES.flatMap(([start, end]) => + Array.from({ length: end - start + 1 }, (_, index) => start + index), +).filter(codePoint => !INVISIBLE.includes(codePoint)); + +export function defaultFontMapping(character) { + const key = character.toLowerCase(); + if (Object.hasOwn(GLYPHS, key)) return key; + let hash = 2166136261; + for (const letter of key) hash = Math.imul(hash ^ letter.codePointAt(0), 16777619) >>> 0; + return LETTERS[hash % LETTERS.length]; +} + +export function createLogoFont(opentype, mapCharacter = defaultFontMapping) { + const path = data => opentype.Path.fromSVG(data, { + flipY: true, flipYBase: 36, scale: 20, x: 60, y: 0, + }); + const glyphs = [ + new opentype.Glyph({ name: '.notdef', advanceWidth: 600, path: path(GLYPHS.o.ink) }), + new opentype.Glyph({ name: '.null', unicodes: [...INVISIBLE], advanceWidth: 0, path: new opentype.Path() }), + new opentype.Glyph({ name: 'space', advanceWidth: 480, path: new opentype.Path() }), + ]; + + const letterIndices = new Map(); + for (const letter of LETTERS) { + letterIndices.set(letter, glyphs.length); + glyphs.push(new opentype.Glyph({ name: letter, advanceWidth: 600, path: path(GLYPHS[letter].ink) })); + } + + let mappingHash = 2166136261; + for (const codePoint of FONT_CODE_POINTS) { + const character = String.fromCodePoint(codePoint); + if (/\s/u.test(character)) { + glyphs[2].addUnicode(codePoint); + continue; + } + // Original logo letters always keep their identity, regardless of the map. + const key = character.toLowerCase(); + const letter = Object.hasOwn(GLYPHS, key) ? key : mapCharacter(character); + if (!letterIndices.has(letter)) throw new Error(`Invalid font mapping for U+${codePoint.toString(16)}`); + glyphs[letterIndices.get(letter)].addUnicode(codePoint); + mappingHash = Math.imul(mappingHash ^ letter.charCodeAt(0), 16777619) >>> 0; + } + // opentype.js selects cmap format 12 using each glyph's primary Unicode. + // Promote a supplementary alias so emoji aliases are actually serialized. + for (const glyph of glyphs) { + const supplementary = glyph.unicodes.find(codePoint => codePoint > 0xffff); + if (supplementary !== undefined) glyph.unicode = supplementary; + } + + const signature = mappingHash.toString(16).padStart(8, '0'); + const font = new opentype.Font({ + familyName: FONT_FAMILY, + styleName: 'Regular', + postScriptName: `OpenCode-${signature}-Regular`, + unitsPerEm: 1000, + ascender: 800, + descender: -200, + weightClass: 400, + version: 'Version 1.001', + description: 'A single-color, six-letter OpenCode logo alphabet. Other characters have fixed substitutions. Original text is preserved.', + manufacturer: 'OpenType', + designer: 'OpenCode wordmark', + designerURL: 'https://opencode.ai', + glyphs, + }); + for (const names of Object.values(font.names)) { + names.uniqueID = { en: `OpenCode-1.001-${signature}` }; + } + return font; +} diff --git a/packages/console/app/public/font/gif-worker.mjs b/packages/console/app/public/font/gif-worker.mjs new file mode 100644 index 00000000000..e3f06938ef7 --- /dev/null +++ b/packages/console/app/public/font/gif-worker.mjs @@ -0,0 +1,157 @@ +import { GIFEncoder, applyPalette } from './vendor/gifenc.js'; +import { CONFETTI_DURATION, confettiColors, createConfetti, drawConfetti, letterCelebrationAt, projectLetterSlice } from './confetti.mjs'; + +function rgb(color) { + if (color.startsWith('#')) { + return [1, 3, 5].map(offset => parseInt(color.slice(offset, offset + 2), 16)); + } + return color.match(/[\d.]+/g).slice(0, 3).map(Number); +} + +function createPalette(composition) { + const background = rgb(composition.background); + const shadow = rgb(composition.shadow); + const ink = rgb(composition.ink); + const caret = rgb(composition.caret); + const palette = [background, shadow, ink, caret]; + // Include anti-aliasing shades without changing the exact theme colours. + for (const [from, to] of [[background, shadow], [background, ink], [shadow, ink], [background, caret]]) { + for (let step = 1; step < 16; step++) { + palette.push(from.map((value, channel) => Math.round(value + (to[channel] - value) * step / 16))); + } + } + if (composition.confettiEnabled) { + for (const color of confettiColors()) { + const target = rgb(color); + palette.push(target); + for (let step = 1; step < 8; step++) { + palette.push(background.map((value, channel) => Math.round(value + (target[channel] - value) * step / 8))); + } + } + } + return palette; +} + +self.onmessage = ({ data: composition }) => { + try { + const { width, height } = composition; + const particles = createConfetti(composition.confettiSeed); + const frames = []; + let time = 0; + let celebrationStart = null; + function appendFrame(frame) { + if (composition.confettiEnabled && frame.anagram && celebrationStart === null) celebrationStart = time; + let remaining = frame.delay; + while (remaining > 0) { + const celebrating = celebrationStart !== null && time < celebrationStart + CONFETTI_DURATION; + const delay = celebrating ? Math.min(50, remaining) : remaining; + frames.push({ ...frame, delay, confettiTime: celebrating ? time - celebrationStart + delay / 2 : -1 }); + time += delay; + remaining -= delay; + } + } + composition.frames.forEach(appendFrame); + // Let the full burst play before holding the finished composition and looping. + if (celebrationStart !== null && time < celebrationStart + CONFETTI_DURATION + 650) { + appendFrame({ ...composition.frames.at(-1), delay: celebrationStart + CONFETTI_DURATION + 650 - time }); + } + const canvas = new OffscreenCanvas(width, height); + const context = canvas.getContext('2d', { willReadFrequently: true }); + const paths = Object.fromEntries(Object.entries(composition.paths).map(([letter, glyph]) => [letter, { + ink: new Path2D(glyph.ink), + shadow: new Path2D(glyph.shadow), + }])); + const palette = createPalette(composition); + const gif = GIFEncoder(); + const textures = new Map(); + + function letterTexture(letter) { + if (textures.has(letter)) return textures.get(letter); + const texture = new OffscreenCanvas(192, 336); + const ctx = texture.getContext('2d'); + ctx.scale(8, 8); + ctx.fillStyle = composition.shadow; + ctx.fill(paths[letter].shadow); + ctx.fillStyle = composition.ink; + ctx.fill(paths[letter].ink); + textures.set(letter, texture); + return texture; + } + + function drawFlippingLetter(glyph, motion) { + const texture = letterTexture(glyph.letter); + // Project horizontal strips through the same perspective used by CSS + // rotateX, including the vertically reversed back face of the letter. + const strips = 84; + const stripHeight = texture.height / strips; + for (let strip = 0; strip < strips; strip++) { + // Overlap the samples slightly to avoid hairline seams when the face + // becomes almost edge-on and several strips share a destination pixel. + const sourceY = Math.max(0, strip * stripHeight - 2); + const sourceEnd = Math.min(texture.height, (strip + 1) * stripHeight + 2); + const sourceHeight = sourceEnd - sourceY; + const top = projectLetterSlice((sourceY / texture.height - .5) * glyph.height, glyph.height, motion); + const bottom = projectLetterSlice((sourceEnd / texture.height - .5) * glyph.height, glyph.height, motion); + const projectedHeight = bottom.y - top.y; + if (Math.abs(projectedHeight) < .0001) continue; + const projectedWidth = glyph.width * (top.widthScale + bottom.widthScale) / 2; + context.save(); + context.translate(-projectedWidth / 2, top.y); + context.scale(projectedWidth / texture.width, projectedHeight / sourceHeight); + context.drawImage(texture, 0, sourceY, texture.width, sourceHeight, 0, 0, texture.width, sourceHeight); + context.restore(); + } + } + + function draw(layout, showCaret, celebrationTime) { + context.setTransform(1, 0, 0, 1, 0, 0); + context.fillStyle = composition.background; + context.fillRect(0, 0, width, height); + const scale = Math.min(composition.scale, (height - composition.padding * 2) / layout.height); + context.setTransform(scale, 0, 0, scale, width / 2, height / 2); + let letterIndex = 0; + for (const glyph of layout.glyphs) { + if (!glyph.letter) continue; + const motion = letterCelebrationAt(letterIndex++, celebrationTime); + context.save(); + context.translate(glyph.x + glyph.width / 2, glyph.y + glyph.height / 2 + motion.lift * glyph.height); + if (motion.rotation !== 0) { + drawFlippingLetter(glyph, motion); + } else { + context.translate(-glyph.width / 2, -glyph.height / 2); + context.scale(glyph.width / 24, glyph.height / 42); + context.fillStyle = composition.shadow; + context.fill(paths[glyph.letter].shadow); + context.fillStyle = composition.ink; + context.fill(paths[glyph.letter].ink); + } + context.restore(); + } + if (showCaret) { + context.fillStyle = composition.caret; + // Match the editor's 2px caret regardless of the frame's text scale. + context.fillRect(layout.caret.x, layout.caret.y, 2 / scale, layout.caret.height); + } + } + + frames.forEach((frame, index) => { + draw(frame.layout, frame.caret, frame.confettiTime); + context.setTransform(1, 0, 0, 1, 0, 0); + drawConfetti(context, particles, frame.confettiTime, width, height); + const pixels = context.getImageData(0, 0, width, height).data; + const indexed = applyPalette(pixels, palette); + gif.writeFrame(indexed, width, height, { + palette: index === 0 ? palette : undefined, + delay: frame.delay, + repeat: 0, + dispose: 1, + }); + self.postMessage({ type: 'progress', percent: Math.round((index + 1) / frames.length * 100) }); + }); + gif.finish(); + const buffer = gif.bytes().buffer; + self.postMessage({ type: 'done', buffer }, [buffer]); + } catch (error) { + self.postMessage({ type: 'error', message: error.message }); + } +}; diff --git a/packages/console/app/public/font/glyphs.mjs b/packages/console/app/public/font/glyphs.mjs new file mode 100644 index 00000000000..e3db2d58c8e --- /dev/null +++ b/packages/console/app/public/font/glyphs.mjs @@ -0,0 +1,10 @@ +// Normalized outlines from the official OpenCode SVG wordmark (24 × 42). +// https://github.com/anomalyco/opencode/blob/dev/packages/ui/src/components/logo.tsx +export const GLYPHS = { + o: { shadow: 'M18 30H6V18H18V30Z', ink: 'M18 12H6V30H18V12ZM24 36H0V6H24V36Z' }, + p: { shadow: 'M18 30H6V18H18V30Z', ink: 'M6 30H18V12H6V30ZM24 36H6V42H0V6H24V36Z' }, + e: { shadow: 'M24 24V30H6V24H24Z', ink: 'M24 24H6V30H24V36H0V6H24V24ZM6 18H18V12H6V18Z' }, + n: { shadow: 'M18 36H6V18H18V36Z', ink: 'M18 12H6V36H0V6H18V12ZM24 36H18V12H24V36Z' }, + c: { shadow: 'M24 30H6V18H24V30Z', ink: 'M24 12H6V30H24V36H0V6H24V12Z' }, + d: { shadow: 'M18 30H6V18H18V30Z', ink: 'M18 12H6V30H18V12ZM24 36H0V6H18V0H24V36Z' }, +}; diff --git a/packages/console/app/public/font/vendor/gifenc.js b/packages/console/app/public/font/vendor/gifenc.js new file mode 100644 index 00000000000..355398b7191 --- /dev/null +++ b/packages/console/app/public/font/vendor/gifenc.js @@ -0,0 +1,2 @@ +var X={signature:"GIF",version:"89a",trailer:59,extensionIntroducer:33,applicationExtensionLabel:255,graphicControlExtensionLabel:249,imageSeparator:44,signatureSize:3,versionSize:3,globalColorTableFlagMask:128,colorResolutionMask:112,sortFlagMask:8,globalColorTableSizeMask:7,applicationIdentifierSize:8,applicationAuthCodeSize:3,disposalMethodMask:28,userInputFlagMask:2,transparentColorFlagMask:1,localColorTableFlagMask:128,interlaceFlagMask:64,idSortFlagMask:32,localColorTableSizeMask:7};function F(t=256){let e=0,s=new Uint8Array(t);return{get buffer(){return s.buffer},reset(){e=0},bytesView(){return s.subarray(0,e)},bytes(){return s.slice(0,e)},writeByte(r){n(e+1),s[e]=r,e++},writeBytes(r,o=0,i=r.length){n(e+i);for(let c=0;c=r)return;var i=1024*1024;r=Math.max(r,o*(o>>0),o!=0&&(r=Math.max(r,256));let c=s;s=new Uint8Array(r),e>0&&s.set(c.subarray(0,e),0)}}var O=12,J=5003,lt=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535];function at(t,e,s,n,r=F(512),o=new Uint8Array(256),i=new Int32Array(J),c=new Int32Array(J)){let x=i.length,a=Math.max(2,n);o.fill(0),c.fill(0),i.fill(-1);let l=0,f=0,g=a+1,h=g,b=!1,w=h,_=(1<=0;)if(M-=V,M<0&&(M+=x),i[M]===v){A=c[M];break t}I(A),A=m,B<1<0?l|=y<=8;)o[p++]=l&255,p>=254&&(r.writeByte(p),r.writeBytesView(o,0,p),p=0),l>>=8,f-=8;if((B>_||b)&&(b?(w=h,_=(1<0;)o[p++]=l&255,p>=254&&(r.writeByte(p),r.writeBytesView(o,0,p),p=0),l>>=8,f-=8;p>0&&(r.writeByte(p),r.writeBytesView(o,0,p),p=0)}}}var $=at;function D(t,e,s){return t<<8&63488|e<<2&992|s>>3}function G(t,e,s,n){return t>>4|e&240|(s&240)<<4|(n&240)<<8}function j(t,e,s){return t>>4<<8|e&240|s>>4}function R(t,e,s){return ts?s:t}function T(t){return t*t}function tt(t,e,s){var n=0,r=1e100;let o=t[e],i=o.cnt,c=o.ac,x=o.rc,a=o.gc,l=o.bc;for(var f=o.fw;f!=0;f=t[f].fw){let h=t[f],b=h.cnt,w=i*b/(i+b);if(!(w>=r)){var g=0;s&&(g+=w*T(h.ac-c),g>=r)||(g+=w*T(h.rc-x),!(g>=r)&&(g+=w*T(h.gc-a),!(g>=r)&&(g+=w*T(h.bc-l),!(g>=r)&&(r=g,n=f))))}}o.err=r,o.nn=n}function Q(){return{ac:0,rc:0,gc:0,bc:0,cnt:0,nn:0,fw:0,bk:0,tm:0,mtm:0,err:0}}function ut(t,e){let s=e==="rgb444"?4096:65536,n=new Array(s),r=t.length;if(e==="rgba4444")for(let o=0;o>24&255,x=i>>16&255,a=i>>8&255,l=i&255,f=G(l,a,x,c),g=f in n?n[f]:n[f]=Q();g.rc+=l,g.gc+=a,g.bc+=x,g.ac+=c,g.cnt++}else if(e==="rgb444")for(let o=0;o>16&255,x=i>>8&255,a=i&255,l=j(a,x,c),f=l in n?n[l]:n[l]=Q();f.rc+=a,f.gc+=x,f.bc+=c,f.cnt++}else for(let o=0;o>16&255,x=i>>8&255,a=i&255,l=D(a,x,c),f=l in n?n[l]:n[l]=Q();f.rc+=a,f.gc+=x,f.bc+=c,f.cnt++}return n}function H(t,e,s={}){let{format:n="rgb565",clearAlpha:r=!0,clearAlphaColor:o=0,clearAlphaThreshold:i=0,oneBitAlpha:c=!1}=s;if(!t||!t.buffer)throw new Error("quantize() expected RGBA Uint8Array data");if(!(t instanceof Uint8Array)&&!(t instanceof Uint8ClampedArray))throw new Error("quantize() expected RGBA Uint8Array data");let x=new Uint32Array(t.buffer),a=s.useSqrt!==!1,l=n==="rgba4444",f=ut(x,n),g=f.length,h=g-1,b=new Uint32Array(g+1);for(var w=0,u=0;u1&&(p=B>>1,!(f[k=b[p]].err<=A));B=p)b[B]=k;b[B]=u}var z=w-e;for(u=0;u=d.mtm&&f[d.nn].mtm<=d.tm)break;d.mtm==h?I=b[1]=b[b[0]--]:(tt(f,I,!1),d.tm=u);var A=f[I].err;for(B=1;(p=B+B)<=b[0]&&(pf[b[p+1]].err&&p++,!(A<=f[k=b[p]].err));B=p)b[B]=k;b[B]=I}var y=f[d.nn],m=d.cnt,v=y.cnt,_=1/(m+v);l&&(d.ac=_*(m*d.ac+v*y.ac)),d.rc=_*(m*d.rc+v*y.rc),d.gc=_*(m*d.gc+v*y.gc),d.bc=_*(m*d.bc+v*y.bc),d.cnt+=y.cnt,d.mtm=++u,f[y.bk].fw=y.fw,f[y.fw].bk=y.bk,y.mtm=h}let M=[];var V=0;for(u=0;;++V){let L=R(Math.round(f[u].rc),0,255),C=R(Math.round(f[u].gc),0,255),Y=R(Math.round(f[u].bc),0,255),E=255;if(l){if(E=R(Math.round(f[u].ac),0,255),c){let st=typeof c=="number"?c:127;E=E<=st?0:255}r&&E<=i&&(L=C=Y=o,E=0)}let K=l?[L,C,Y,E]:[L,C,Y];if(xt(M,K)||M.push(K),(u=f[u].fw)==0)break}return M}function xt(t,e){for(let s=0;s=4&&e.length>=4?n[3]===e[3]:!0;if(r&&o)return!0}return!1}function U(t,e){var s=0,n;for(n=0;n1?Math.round(t/e)*e:t}function et(t,{roundRGB:e=5,roundAlpha:s=10,oneBitAlpha:n=null}={}){let r=new Uint32Array(t.buffer);for(let o=0;o>24&255,x=i>>16&255,a=i>>8&255,l=i&255;if(c=P(c,s),n){let f=typeof n=="number"?n:127;c=c<=f?0:255}l=P(l,e),a=P(a,e),x=P(x,e),r[o]=c<<24|x<<16|a<<8|l<<0}}function nt(t,e,s="rgb565"){if(!t||!t.buffer)throw new Error("quantize() expected RGBA Uint8Array data");if(!(t instanceof Uint8Array)&&!(t instanceof Uint8ClampedArray))throw new Error("quantize() expected RGBA Uint8Array data");if(e.length>256)throw new Error("applyPalette() only works with 256 colors or less");let n=new Uint32Array(t.buffer),r=n.length,o=s==="rgb444"?4096:65536,i=new Uint8Array(r),c=new Array(o),x=s==="rgba4444";if(s==="rgba4444")for(let a=0;a>24&255,g=l>>16&255,h=l>>8&255,b=l&255,w=G(b,h,g,f),_=w in c?c[w]:c[w]=gt(b,h,g,f,e);i[a]=_}else{let a=s==="rgb444"?j:D;for(let l=0;l>16&255,h=f>>8&255,b=f&255,w=a(b,h,g),_=w in c?c[w]:c[w]=bt(b,h,g,e);i[l]=_}}return i}function gt(t,e,s,n,r){let o=0,i=1e100;for(let c=0;ci)continue;let f=x[0];if(l+=q(f-t),l>i)continue;let g=x[1];if(l+=q(g-e),l>i)continue;let h=x[2];l+=q(h-s),!(l>i)&&(i=l,o=c)}return o}function bt(t,e,s,n){let r=0,o=1e100;for(let i=0;io)continue;let l=c[1];if(a+=q(l-e),a>o)continue;let f=c[2];a+=q(f-s),!(a>o)&&(o=a,r=i)}return r}function rt(t,e,s=5){if(!t.length||!e.length)return;let n=t.map(i=>i.slice(0,3)),r=s*s,o=t[0].length;for(let i=0;io?c=c.slice(0,3):c=c.slice();let x=N(n,c.slice(0,3),U),a=x[0],l=x[1];l>0&&l<=r&&(t[a]=c)}}function q(t){return t*t}function W(t,e,s=U){let n=Infinity,r=-1;for(let o=0;o=0&&dt(n,k)}let z=Math.round(_/10);wt(n,p,z,b,w);let d=Boolean(u)&&!A;ht(n,f,g,d?u:null),d&&it(n,u),yt(n,l,f,g,B,o,i,c)}};function a(){ft(n,"GIF89a")}}function wt(t,e,s,n,r){t.writeByte(33),t.writeByte(249),t.writeByte(4),r<0&&(r=0,n=!1);var o,i;n?(o=1,i=2):(o=0,i=0),e>=0&&(i=e&7),i<<=2;let c=0;t.writeByte(0|i|c|o),S(t,s),t.writeByte(r||0),t.writeByte(0)}function pt(t,e,s,n,r=8){let o=1,i=0,c=Z(n.length)-1,x=o<<7|r-1<<4|i<<3|c,a=0,l=0;S(t,e),S(t,s),t.writeBytes([x,a,l])}function dt(t,e){t.writeByte(33),t.writeByte(255),t.writeByte(11),ft(t,"NETSCAPE2.0"),t.writeByte(3),t.writeByte(1),S(t,e),t.writeByte(0)}function it(t,e){let s=1<>8&255)}function ft(t,e){for(var s=0;s>>=1,t}function ve(e,t,n){if(!t)return n;for(;e.bitcount<24;)e.tag|=e.source[e.sourceIndex++]<>>16-t;return e.tag>>>=t,e.bitcount-=t,s+n}function vn(e,t){for(;e.bitcount<24;)e.tag|=e.source[e.sourceIndex++]<>>=1,++r,n+=t.table[r],s-=t.table[r];while(s>=0);return e.tag=o,e.bitcount-=r,t.trans[n+s]}function yo(e,t,n){var s,r,o,a,i,l;for(s=ve(e,5,257),r=ve(e,5,1),o=ve(e,4,4),a=0;a<19;++a)be[a]=0;for(a=0;a8;)e.sourceIndex--,e.bitcount-=8;if(t=e.source[e.sourceIndex+1],t=256*t+e.source[e.sourceIndex],n=e.source[e.sourceIndex+3],n=256*n+e.source[e.sourceIndex+2],t!==(~n&65535))return as;for(e.sourceIndex+=4,s=t;s;--s)e.dest[e.destLen++]=e.source[e.sourceIndex++];return e.bitcount=0,Sn}function Tt(e,t){var n=new po(e,t),s,r,o;do{switch(s=go(n),r=ve(n,2,0),r){case 0:o=xo(n);break;case 1:o=os(n,is,ls);break;case 2:yo(n,n.ltree,n.dtree),o=os(n,n.ltree,n.dtree);break;default:o=as}if(o!==Sn)throw new Error("Data error")}while(!s);return n.destLenthis.x2&&(this.x2=e)),typeof t=="number"&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=t,this.y2=t),tthis.y2&&(this.y2=t))};He.prototype.addX=function(e){this.addPoint(e,null)};He.prototype.addY=function(e){this.addPoint(null,e)};He.prototype.addBezier=function(e,t,n,s,r,o,a,i){let l=[e,t],u=[n,s],c=[r,o],p=[a,i];this.addPoint(e,t),this.addPoint(a,i);for(let f=0;f<=1;f++){let h=6*l[f]-12*u[f]+6*c[f],m=-3*l[f]+9*u[f]-9*c[f]+3*p[f],d=3*u[f]-3*l[f];if(m===0){if(h===0)continue;let I=-d/h;01||Math.abs(a.y-s)>1||o.pop():a.type==="L"&&u&&u.x===a.x&&u.y===a.y?o.pop():a.type==="Z"&&(i&&l&&u&&i.type==="M"&&l.type==="L"&&u.type==="L"&&u.x===i.x&&u.y===i.y&&(o.shift(),o[0].type="M"),r+1d.length).map(d=>{let y=parseFloat(d);return(t.decimalPlaces||t.decimalPlaces===0)&&(y=ps(y,t.decimalPlaces)),y})}function c(m){if(!this.commands.length)return m;let d=this.commands[this.commands.length-1];for(let y=0;y-1)i[i.length-1]+=d;else if(o.indexOf(d)>-1)if(!a.type&&!this.commands.length&&(a.type="L"),d==="-")!a.type||y.indexOf("-")>0?l=!0:y.length?i.push("-"):i[i.length-1]=d;else if(!a.type||y.length>0)l=!0;else continue;else if(s.indexOf(d)>-1)a.type?(p.apply(this),a={type:d}):a.type=d;else{if(r.indexOf(d)>-1)throw new Error("Unsupported path command: "+d+". Currently supported commands are "+s.split("").join(", ")+".");` , +\r\f\v`.indexOf(d)>-1?i.push(""):d==="."?!a.type||y.indexOf(d)>-1?l=!0:i[i.length-1]+=d:l=!0}if(l)throw new Error("Unexpected character: "+d+" at offset "+m)}p.apply(this),t.optimize&&(this.commands=hs(this.commands));let f=t.flipY,h=t.flipYBase;if(f===!0&&t.flipYBase===void 0){let m=this.getBoundingBox();h=m.y1+m.y2}for(let m in this.commands){let d=this.commands[m];for(let y in d)["x","x1","x2"].includes(y)?this.commands[m][y]=t.x+d[y]*t.scale:["y","y1","y2"].includes(y)&&(this.commands[m][y]=t.y+(f?h-d[y]:d[y])*t.scale)}return this};z.fromSVG=function(e,t){return new z().fromSVG(e,t)};z.prototype.moveTo=function(e,t){this.commands.push({type:"M",x:e,y:t})};z.prototype.lineTo=function(e,t){this.commands.push({type:"L",x:e,y:t})};z.prototype.curveTo=z.prototype.bezierCurveTo=function(e,t,n,s,r,o){this.commands.push({type:"C",x1:e,y1:t,x2:n,y2:s,x:r,y:o})};z.prototype.quadTo=z.prototype.quadraticCurveTo=function(e,t,n,s){this.commands.push({type:"Q",x1:e,y1:t,x:n,y:s})};z.prototype.close=z.prototype.closePath=function(){this.commands.push({type:"Z"})};z.prototype.extend=function(e){if(e.commands)e=e.commands;else if(e instanceof kt){let t=e;this.moveTo(t.x1,t.y1),this.lineTo(t.x2,t.y1),this.lineTo(t.x2,t.y2),this.lineTo(t.x1,t.y2),this.close();return}Array.prototype.push.apply(this.commands,e)};z.prototype.getBoundingBox=function(){let e=new kt,t=0,n=0,s=0,r=0;for(let o=0;o=0&&l>0&&(i+=" "),i+=t(u)}return i}let s=this.commands;e.optimize&&(s=JSON.parse(JSON.stringify(this.commands)),s=hs(s));let r=e.flipY,o=e.flipYBase;if(r===!0&&o===void 0){let i=new z;i.extend(s);let l=i.getBoundingBox();o=l.y1+l.y2}let a="";for(let i=0;i=0&&e<=255,"Byte value should be between 0 and 255."),[e]};R.BYTE=he(1);S.CHAR=function(e){return[e.charCodeAt(0)]};R.CHAR=he(1);S.CHARARRAY=function(e){(e===null||typeof e=="undefined")&&(e="",console.warn("CHARARRAY with undefined or null value encountered and treated as an empty string. This is probably caused by a missing glyph name."));let t=[];for(let n=0;n>8&255,e&255]};R.USHORT=he(2);S.SHORT=function(e){return e>=gs&&(e=-(2*gs-e)),[e>>8&255,e&255]};R.SHORT=he(2);S.UINT24=function(e){return[e>>16&255,e>>8&255,e&255]};R.UINT24=he(3);S.ULONG=function(e){return[e>>24&255,e>>16&255,e>>8&255,e&255]};R.ULONG=he(4);S.LONG=function(e){return e>=ys&&(e=-(2*ys-e)),[e>>24&255,e>>16&255,e>>8&255,e&255]};R.LONG=he(4);S.FLOAT=function(e){if(e>To||e>24&255,e>>16&255,e>>8&255,e&255]};R.LONGDATETIME=he(8);S.TAG=function(e){return v.argument(e.length===4,"Tag should be exactly 4 ASCII characters."),[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]};R.TAG=he(4);S.Card8=S.BYTE;R.Card8=R.BYTE;S.Card16=S.USHORT;R.Card16=R.USHORT;S.OffSize=S.BYTE;R.OffSize=R.BYTE;S.SID=S.USHORT;R.SID=R.USHORT;S.NUMBER=function(e){return e>=-107&&e<=107?[e+139]:e>=108&&e<=1131?(e=e-108,[(e>>8)+247,e&255]):e>=-1131&&e<=-108?(e=-e-108,[(e>>8)+251,e&255]):e>=-32768&&e<=32767?S.NUMBER16(e):S.NUMBER32(e)};R.NUMBER=function(e){return S.NUMBER(e).length};S.NUMBER16=function(e){return[28,e>>8&255,e&255]};R.NUMBER16=he(3);S.NUMBER32=function(e){return[29,e>>24&255,e>>16&255,e>>8&255,e&255]};R.NUMBER32=he(5);S.REAL=function(e){let t=e.toString(),n=/\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/.exec(t);if(n){let o=parseFloat("1e"+((n[2]?+n[2]:0)+n[1].length));t=(Math.round(e*o)/o).toString()}let s="";for(let o=0,a=t.length;o>8&255,t[t.length]=s&255}return t};R.UTF16=function(e){return e.length*2};var tt={"x-mac-croatian":"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\u0160\u2122\xB4\xA8\u2260\u017D\xD8\u221E\xB1\u2264\u2265\u2206\xB5\u2202\u2211\u220F\u0161\u222B\xAA\xBA\u03A9\u017E\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u0106\xAB\u010C\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u0110\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\uF8FF\xA9\u2044\u20AC\u2039\u203A\xC6\xBB\u2013\xB7\u201A\u201E\u2030\xC2\u0107\xC1\u010D\xC8\xCD\xCE\xCF\xCC\xD3\xD4\u0111\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u03C0\xCB\u02DA\xB8\xCA\xE6\u02C7","x-mac-cyrillic":"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u2020\xB0\u0490\xA3\xA7\u2022\xB6\u0406\xAE\xA9\u2122\u0402\u0452\u2260\u0403\u0453\u221E\xB1\u2264\u2265\u0456\xB5\u0491\u0408\u0404\u0454\u0407\u0457\u0409\u0459\u040A\u045A\u0458\u0405\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\u040B\u045B\u040C\u045C\u0455\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u201E\u040E\u045E\u040F\u045F\u2116\u0401\u0451\u044F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E","x-mac-gaelic":"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u1E02\xB1\u2264\u2265\u1E03\u010A\u010B\u1E0A\u1E0B\u1E1E\u1E1F\u0120\u0121\u1E40\xE6\xF8\u1E41\u1E56\u1E57\u027C\u0192\u017F\u1E60\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\u1E61\u1E9B\xFF\u0178\u1E6A\u20AC\u2039\u203A\u0176\u0177\u1E6B\xB7\u1EF2\u1EF3\u204A\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\u2663\xD2\xDA\xDB\xD9\u0131\xDD\xFD\u0174\u0175\u1E84\u1E85\u1E80\u1E81\u1E82\u1E83","x-mac-greek":"\xC4\xB9\xB2\xC9\xB3\xD6\xDC\u0385\xE0\xE2\xE4\u0384\xA8\xE7\xE9\xE8\xEA\xEB\xA3\u2122\xEE\xEF\u2022\xBD\u2030\xF4\xF6\xA6\u20AC\xF9\xFB\xFC\u2020\u0393\u0394\u0398\u039B\u039E\u03A0\xDF\xAE\xA9\u03A3\u03AA\xA7\u2260\xB0\xB7\u0391\xB1\u2264\u2265\xA5\u0392\u0395\u0396\u0397\u0399\u039A\u039C\u03A6\u03AB\u03A8\u03A9\u03AC\u039D\xAC\u039F\u03A1\u2248\u03A4\xAB\xBB\u2026\xA0\u03A5\u03A7\u0386\u0388\u0153\u2013\u2015\u201C\u201D\u2018\u2019\xF7\u0389\u038A\u038C\u038E\u03AD\u03AE\u03AF\u03CC\u038F\u03CD\u03B1\u03B2\u03C8\u03B4\u03B5\u03C6\u03B3\u03B7\u03B9\u03BE\u03BA\u03BB\u03BC\u03BD\u03BF\u03C0\u03CE\u03C1\u03C3\u03C4\u03B8\u03C9\u03C2\u03C7\u03C5\u03B6\u03CA\u03CB\u0390\u03B0\xAD","x-mac-icelandic":"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\xDD\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u03A9\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\u20AC\xD0\xF0\xDE\xFE\xFD\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uF8FF\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7","x-mac-inuit":"\u1403\u1404\u1405\u1406\u140A\u140B\u1431\u1432\u1433\u1434\u1438\u1439\u1449\u144E\u144F\u1450\u1451\u1455\u1456\u1466\u146D\u146E\u146F\u1470\u1472\u1473\u1483\u148B\u148C\u148D\u148E\u1490\u1491\xB0\u14A1\u14A5\u14A6\u2022\xB6\u14A7\xAE\xA9\u2122\u14A8\u14AA\u14AB\u14BB\u14C2\u14C3\u14C4\u14C5\u14C7\u14C8\u14D0\u14EF\u14F0\u14F1\u14F2\u14F4\u14F5\u1505\u14D5\u14D6\u14D7\u14D8\u14DA\u14DB\u14EA\u1528\u1529\u152A\u152B\u152D\u2026\xA0\u152E\u153E\u1555\u1556\u1557\u2013\u2014\u201C\u201D\u2018\u2019\u1558\u1559\u155A\u155D\u1546\u1547\u1548\u1549\u154B\u154C\u1550\u157F\u1580\u1581\u1582\u1583\u1584\u1585\u158F\u1590\u1591\u1592\u1593\u1594\u1595\u1671\u1672\u1673\u1674\u1675\u1676\u1596\u15A0\u15A1\u15A2\u15A3\u15A4\u15A5\u15A6\u157C\u0141\u0142","x-mac-ce":"\xC4\u0100\u0101\xC9\u0104\xD6\xDC\xE1\u0105\u010C\xE4\u010D\u0106\u0107\xE9\u0179\u017A\u010E\xED\u010F\u0112\u0113\u0116\xF3\u0117\xF4\xF6\xF5\xFA\u011A\u011B\xFC\u2020\xB0\u0118\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\u0119\xA8\u2260\u0123\u012E\u012F\u012A\u2264\u2265\u012B\u0136\u2202\u2211\u0142\u013B\u013C\u013D\u013E\u0139\u013A\u0145\u0146\u0143\xAC\u221A\u0144\u0147\u2206\xAB\xBB\u2026\xA0\u0148\u0150\xD5\u0151\u014C\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\u014D\u0154\u0155\u0158\u2039\u203A\u0159\u0156\u0157\u0160\u201A\u201E\u0161\u015A\u015B\xC1\u0164\u0165\xCD\u017D\u017E\u016A\xD3\xD4\u016B\u016E\xDA\u016F\u0170\u0171\u0172\u0173\xDD\xFD\u0137\u017B\u0141\u017C\u0122\u02C7",macintosh:"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u03A9\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\u20AC\u2039\u203A\uFB01\uFB02\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uF8FF\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7","x-mac-romanian":"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\u0102\u0218\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u03A9\u0103\u0219\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\u20AC\u2039\u203A\u021A\u021B\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uF8FF\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7","x-mac-turkish":"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u03A9\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u011E\u011F\u0130\u0131\u015E\u015F\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uF8FF\xD2\xDA\xDB\xD9\uF8A0\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7"};Re.MACSTRING=function(e,t,n,s){let r=tt[s];if(r===void 0)return;let o="";for(let a=0;a=128&&(o=n[o],o===void 0))return;s[r]=o}return s};R.MACSTRING=function(e,t){let n=S.MACSTRING(e,t);return n!==void 0?n.length:0};function On(e){return e>=-128&&e<=127}function Oo(e,t,n){let s=0,r=e.length;for(;t>8&255,i+256&255)}return o}S.VARDELTAS=function(e){let t=0,n=[];for(;t=-128&&s<=127?t=Co(e,t,n):t=Fo(e,t,n)}return n};S.INDEX=function(e){let t=1,n=[t],s=[];for(let i=0;i>8,t[a+1]=i&255;for(let l=0;l0)return new g(this.data,this.offset+t).parseStruct(e)};g.prototype.parsePointer32=function(e){let t=this.parseOffset32();if(t>0)return new g(this.data,this.offset+t).parseStruct(e)};g.prototype.parseListOfLists=function(e){let t=this.parseOffset16List(),n=t.length,s=this.relativeOffset,r=new Array(n);for(let o=0;o>4)+1;for(let a=0;a>r,u=i&(1<[]),r=t&q.LONG_WORDS,o=t&q.WORD_DELTA_COUNT_MASK;if(o>n)throw Error("wordCount must be less than or equal to regionIndexCount");let a=(r?this.parseLong:this.parseShort).bind(this),i=(r?this.parseShort:this.parseChar).bind(this);for(let l=0;l{let E,D,P=()=>{let M=0;if(n==="gvar"){if(M=d.privatePoints.length||p.length,!M){let _=s.get(r);_.path,M=_.points.length,M+=4}}else n==="cvar"&&(M=s.length);this.offset=y,this.relativeOffset=T,E=this.parsePackedDeltas(M),n==="gvar"&&(D=this.parsePackedDeltas(M))};return{configurable:!0,get:function(){return E===void 0&&P(),I==="deltasY"?D:E},set:function(M){E===void 0&&P(),I==="deltasY"?D=M:E=M}}};Object.defineProperty(d,"deltas",O.call(this,"deltas")),n==="gvar"&&Object.defineProperty(d,"deltasY",O.call(this,"deltasY")),f+=d.variationDataSize,delete d.variationDataSize}this.relativeOffset=o;let h={headers:c};return h.sharedPoints=p,h};g.prototype.parseTupleVariationHeader=function(e,t){let n=this.parseUShort(),s=this.parseUShort(),r=!!(s&q.EMBEDDED_PEAK_TUPLE),o=!!(s&q.INTERMEDIATE_REGION),a=!!(s&q.PRIVATE_POINT_NUMBERS),i=r?void 0:s&q.TUPLE_INDEX_MASK,l=r?this.parseTupleRecords(1,e)[0]:void 0,u=o?this.parseTupleRecords(1,e)[0]:void 0,c=o?this.parseTupleRecords(1,e)[0]:void 0,p={variationDataSize:n,peakTuple:l,intermediateStartTuple:u,intermediateEndTuple:c,flags:{embeddedPeakTuple:r,intermediateRegion:o,privatePointNumbers:a}};return t==="gvar"&&(p.sharedTupleRecordsIndex=i),p};g.prototype.parsePackedPointNumbers=function(){let e=this.parseByte(),t=[],n=e;if(e>=128){let r=this.parseByte();n=(e&q.POINT_RUN_COUNT_MASK)<<8|r}let s=0;for(;t.length>1,t.skip("uShort",3),e.glyphIndexMap={};let a=new b.Parser(n,s+r+14),i=new b.Parser(n,s+r+16+o*2),l=new b.Parser(n,s+r+16+o*4),u=new b.Parser(n,s+r+16+o*6),c=s+r+16+o*8;for(let p=0;p=0;p-=1)if(a=b.getUShort(e,t+4+p*8),i=b.getUShort(e,t+4+p*8+2),a===3&&u.includes(i)||a===0&&l.includes(i)||a===1&&i===0){if(o>0)continue;if(o=b.getULong(e,t+4+p*8+4),s)break}else if(a===0&&i===5){if(r=b.getULong(e,t+4+p*8+4),s=new b.Parser(e,t+r),s.parseUShort()!==14)r=-1,s=null;else if(o>0)break}if(o===-1)throw new Error("No valid cmap sub-tables found.");let c=new b.Parser(e,t+o);if(n.format=c.parseUShort(),n.format===0)_o(n,c,a,i);else if(n.format===12||n.format===13)zo(n,c,n.format);else if(n.format===4)jo(n,c,e,t,o);else throw new Error("Only format 0 (platformId 1, encodingId 0), 4, 12 and 14 cmap tables are supported (found format "+n.format+", platformId "+a+", encodingId "+i+").");return s&&Wo(n,s),n}function $o(e,t,n){e.segments.push({end:t,start:t,delta:-(t-n),offset:0,glyphIndex:n})}function Xo(e){e.segments.push({end:65535,start:65535,delta:1,offset:0})}function Yo(e){if(e.length===0)return e;let t=[e[0]];for(let n=1;n0;n-=1)if(e.get(n).unicode>65535){t=!1;break}let s=[{name:"version",type:"USHORT",value:0},{name:"numTables",type:"USHORT",value:t?1:2},{name:"platformID",type:"USHORT",value:3},{name:"encodingID",type:"USHORT",value:1},{name:"offset",type:"ULONG",value:t?12:20}];t||s.push({name:"cmap12PlatformID",type:"USHORT",value:3},{name:"cmap12EncodingID",type:"USHORT",value:10},{name:"cmap12Offset",type:"ULONG",value:0}),s.push({name:"format",type:"USHORT",value:4},{name:"cmap4Length",type:"USHORT",value:0},{name:"language",type:"USHORT",value:0},{name:"segCountX2",type:"USHORT",value:0},{name:"searchRange",type:"USHORT",value:0},{name:"entrySelector",type:"USHORT",value:0},{name:"rangeShift",type:"USHORT",value:0});let r=new x.Table("cmap",s);for(r.segments=[],n=0;n1&&v.argument(t,"Can't infer numPaletteEntries on multiple colorRecordIndices"),new x.Table("CPAL",[{name:"version",type:"USHORT",value:e},{name:"numPaletteEntries",type:"USHORT",value:t||n.length},{name:"numPalettes",type:"USHORT",value:s.length},{name:"numColorRecords",type:"USHORT",value:n.length},{name:"colorRecordsArrayOffset",type:"ULONG",value:12+2*s.length},...s.map((r,o)=>({name:"colorRecordIndices_"+o,type:"USHORT",value:r})),...n.map((r,o)=>({name:"colorRecords_"+o,type:"ULONG",value:r}))])}function ws(e){var t=(e&4278190080)>>24,n=(e&16711680)>>16,s=(e&65280)>>8,r=e&255;return t=t+256&255,n=n+256&255,s=s+256&255,r=(r+256&255)/255,{b:t,g:n,r:s,a:r}}function rt(e,t,n=0,s="hexa"){if(t==65535)return"currentColor";let r=e&&e.tables&&e.tables.cpal;if(!r)return"currentColor";if(n>r.colorRecordIndices.length-1)throw new Error(`Palette index out of range (colorRecordIndices.length: ${r.colorRecordIndices.length}, index: ${t})`);if(t>r.numPaletteEntries)throw new Error(`Color index out of range (numPaletteEntries: ${r.numPaletteEntries}, index: ${t})`);let o=r.colorRecordIndices[n]+t;if(o>r.colorRecords)throw new Error(`Color index out of range (colorRecords.length: ${r.colorRecords.length}, lookupIndex: ${o})`);let a=ws(r.colorRecords[o]);return s==="bgra"?a:we(a,s)}function de(e){return("0"+parseInt(e).toString(16)).slice(-2)}function na(e){let t=e.r/255,n=e.g/255,s=e.b/255,r=Math.max(t,n,s),o=Math.min(t,n,s),a,i,l=(r+o)/2;if(r===o)a=i=0;else{let u=r-o;switch(i=l>.5?u/(2-r-o):u/(r+o),r){case t:a=(n-s)/u+(ntypeof i!="undefined");e={r:Math.round(parseFloat(a[1])/(a[2]?100/255:1)),g:Math.round(parseFloat(a[3])/(a[4]?100/255:1)),b:Math.round(parseFloat(a[5])/(a[6]?100/255:1)),a:a[7]?parseFloat(a[7])/(a[8]?100:1):1}}else{let a=/hsla?\(\s*(?:(\d*\.\d+|\d+)(deg|turn|))\s*(?:,|\s*)\s*(?:(\d*\.\d+)%?|(\d+)%?)\s*(?:,|\s*)\s*(?:(\d*\.\d+)%?|(\d+)%?)\s*(?:(?:,|\s|\/)\s*(?:(0*(?:\.\d+)?()|0*1(?:\.0+)?())|(?:\.\d+)|(\d+)(%)|(\d*\.\d+)(%)))?\s*\)/;if(a.test(e)){let i=e.match(a).filter(l=>typeof l!="undefined");e=sa({h:parseFloat(i[1])*(i[2]==="turn"?360:1),s:parseFloat(i[3]),l:parseFloat(i[4]),a:i[5]?parseFloat(i[5])/(i[6]?100:1):1})}else r=!1}}if(!r)throw new Error(`Invalid color format: ${e}`);return we(e,t)}function we(e,t="hexa"){if(e==="currentColor")return e;if(Number.isInteger(e)){if(t=="raw"||t=="cpal")return e;e=ws(e)}else typeof e!="object"&&(e=ot(e,"bgra"));let n=["hsl","hsla"].includes(t)?na(e):null;switch(t){case"rgba":return`rgba(${e.r}, ${e.g}, ${e.b}, ${parseFloat(e.a.toFixed(3))})`;case"rgb":return`rgb(${e.r}, ${e.g}, ${e.b})`;case"hex":case"hex6":case"hex-6":return`#${de(e.r)}${de(e.g)}${de(e.b)}`;case"hexa":case"hex8":case"hex-8":return`#${de(e.r)}${de(e.g)}${de(e.b)}${de(e.a*255)}`;case"hsl":return`hsl(${n.h.toFixed(2)}, ${n.s.toFixed(2)}%, ${n.l.toFixed(2)}%)`;case"hsla":return`hsla(${n.h.toFixed(2)}, ${n.s.toFixed(2)}%, ${n.l.toFixed(2)}%, ${parseFloat(e.a.toFixed(3))})`;case"bgra":return e;case"raw":case"cpal":return Ds(e);default:throw new Error("Unknown color format: "+t)}}var Ht={parse:ea,make:ta,getPaletteColor:rt,parseColor:ot,formatColor:we};function ra(e,t){let n=t||new pe;return{configurable:!0,get:function(){return typeof n=="function"&&(n=n()),n},set:function(s){n=s}}}function $(e){this.bindConstructorValues(e)}$.prototype.bindConstructorValues=function(e){if(this.index=e.index||0,e.name===".notdef"?e.unicode=void 0:e.name===".null"&&(e.unicode=0),e.unicode===0&&e.name!==".null")throw new Error('The unicode value "0" is reserved for the glyph name ".null" and cannot be used by any other glyph.');this.name=e.name||null,this.unicode=e.unicode,this.unicodes=e.unicodes||(e.unicode!==void 0?[e.unicode]:[]),"xMin"in e&&(this.xMin=e.xMin),"yMin"in e&&(this.yMin=e.yMin),"xMax"in e&&(this.xMax=e.xMax),"yMax"in e&&(this.yMax=e.yMax),"advanceWidth"in e&&(this.advanceWidth=e.advanceWidth),"leftSideBearing"in e&&(this.leftSideBearing=e.leftSideBearing),"points"in e&&(this.points=e.points),Object.defineProperty(this,"path",ra(this,e.path))};$.prototype.addUnicode=function(e){this.unicodes.length===0&&(this.unicode=e),this.unicodes.push(e)};$.prototype.getBoundingBox=function(){return this.path.getBoundingBox()};$.prototype.getPath=function(e,t,n,s,r){e=e!==void 0?e:0,t=t!==void 0?t:0,n=n!==void 0?n:72,s=Object.assign({},r&&r.defaultRenderOptions,s);let o,a,i=s.xScale,l=s.yScale,u=1/(this.path.unitsPerEm||1e3)*n,c=this;r&&r.variation&&(c=r.variation.getTransform(this,s.variation),o=c.path.commands),s.hinting&&r&&r.hinting&&(a=c.path&&r.hinting.exec(c,n,s)),a?(o=r.hinting.getCommands(a),e=Math.round(e),t=Math.round(t),i=l=1):(o=c.path.commands,i===void 0&&(i=u),l===void 0&&(l=u));let p=new pe;if(s.drawSVG){let f=this.getSvgImage(r);if(f){let h=new pe;return h._image={image:f.image,x:e+f.leftSideBearing*u,y:t-f.baseline*u,width:f.image.width*u,height:f.image.height*u},p._layers=[h],p}}if(s.drawLayers){let f=this.getLayers(r);if(f&&f.length){p._layers=[];for(let h=0;h=this.length-1;return{value:this.get(e),done:t}}.bind(this)}});Vt.prototype.get=function(e){if(this.font._push&&this.glyphs[e]===void 0){this.font._push(e),typeof this.glyphs[e]=="function"&&(this.glyphs[e]=this.glyphs[e]());let t=this.glyphs[e],n=this.font._IndexToUnicodeMap[e];if(n)for(let s=0;s1?b.getULong(e,t):b.getCard16(e,t),i=s>1?4:2,l,u;if(a!==0){let c=b.getByte(e,t+i);l=t+(a+1)*c+i;let p=t+i+1;for(let f=0;f1?b.getULong(e,t):b.getCard16(e,t),o=n>1?4:2,a,i;if(r!==0){let l=b.getByte(e,t+o);a=t+(r+1)*l+o;let u=t+o+1;for(let c=0;c1?b.getULong(n,s):b.getCard16(n,s),i=o>1?4:2,l=0;if(a!==0){let c=b.getByte(n,s+i);l=s+(a+1)*c+i}let u=b.getBytes(n,l+t[e],l+t[e+1]);return r&&(u=r(u)),u}function ua(e){let t="",s=["0","1","2","3","4","5","6","7","8","9",".","E","E-",null,"-"];for(;;){let r=e.parseByte(),o=r>>4,a=r&15;if(o===15||(t+=s[o],a===15))break;t+=s[a]}return parseFloat(t)}function fa(e,t){let n,s,r,o;if(t===28)return n=e.parseByte(),s=e.parseByte(),n<<8|s;if(t===29)return n=e.parseByte(),s=e.parseByte(),r=e.parseByte(),o=e.parseByte(),n<<24|s<<16|r<<8|o;if(t===30)return ua(e);if(t>=32&&t<=246)return t-139;if(t>=247&&t<=250)return n=e.parseByte(),(t-247)*256+n+108;if(t>=251&&t<=254)return n=e.parseByte(),-(t-251)*256-n-108;throw new Error("Invalid b0 "+t)}function pa(e){let t={};for(let n=0;n1&&l===23){va(a);continue}o.push([l,a]),a=[]}else a.push(fa(r,l,s))}return pa(o)}function at(e,t){return t<=390?t=st[t]:e?t=e[t-391]:t=void 0,t}function An(e,t,n){let s={},r;for(let o=0;o2)throw new Error(`Unsupported CFF table version ${n.formatMajor}.${n.formatMinor}`);return n.size=b.getCard8(e,t+2),n.formatMajor<2?(n.offsetSize=b.getCard8(e,t+3),n.startOffset=t,n.endOffset=t+4):(n.topDictLength=b.getCard16(e,t+3),n.endOffset=t+8),n}var Gs=[{name:"version",op:0,type:"SID"},{name:"notice",op:1,type:"SID"},{name:"copyright",op:1200,type:"SID"},{name:"fullName",op:2,type:"SID"},{name:"familyName",op:3,type:"SID"},{name:"weight",op:4,type:"SID"},{name:"isFixedPitch",op:1201,type:"number",value:0},{name:"italicAngle",op:1202,type:"number",value:0},{name:"underlinePosition",op:1203,type:"number",value:-100},{name:"underlineThickness",op:1204,type:"number",value:50},{name:"paintType",op:1205,type:"number",value:0},{name:"charstringType",op:1206,type:"number",value:2},{name:"fontMatrix",op:1207,type:["real","real","real","real","real","real"],value:[.001,0,0,.001,0,0]},{name:"uniqueId",op:13,type:"number"},{name:"fontBBox",op:5,type:["number","number","number","number"],value:[0,0,0,0]},{name:"strokeWidth",op:1208,type:"number",value:0},{name:"xuid",op:14,type:[],value:null},{name:"charset",op:15,type:"offset",value:0},{name:"encoding",op:16,type:"offset",value:0},{name:"charStrings",op:17,type:"offset",value:0},{name:"private",op:18,type:["number","offset"],value:[0,0]},{name:"ros",op:1230,type:["SID","SID","number"]},{name:"cidFontVersion",op:1231,type:"number",value:0},{name:"cidFontRevision",op:1232,type:"number",value:0},{name:"cidFontType",op:1233,type:"number",value:0},{name:"cidCount",op:1234,type:"number",value:8720},{name:"uidBase",op:1235,type:"number"},{name:"fdArray",op:1236,type:"offset"},{name:"fdSelect",op:1237,type:"offset"},{name:"fontName",op:1238,type:"SID"}],Hs=[{name:"fontMatrix",op:1207,type:["real","real","real","real","real","real"],value:[.001,0,0,.001,0,0]},{name:"charStrings",op:17,type:"offset"},{name:"fdArray",op:1236,type:"offset"},{name:"fdSelect",op:1237,type:"offset"},{name:"vstore",op:24,type:"offset"}],Vs=[{name:"subrs",op:19,type:"offset",value:0},{name:"defaultWidthX",op:20,type:"number",value:0},{name:"nominalWidthX",op:21,type:"number",value:0}],_s=[{name:"blueValues",op:6,type:"delta"},{name:"otherBlues",op:7,type:"delta"},{name:"familyBlues",op:7,type:"delta"},{name:"familyBlues",op:8,type:"delta"},{name:"familyOtherBlues",op:9,type:"delta"},{name:"blueScale",op:1209,type:"number",value:.039625},{name:"blueShift",op:1210,type:"number",value:7},{name:"blueFuzz",op:1211,type:"number",value:1},{name:"stdHW",op:10,type:"number"},{name:"stdVW",op:11,type:"number"},{name:"stemSnapH",op:1212,type:"number"},{name:"stemSnapV",op:1213,type:"number"},{name:"languageGroup",op:1217,type:"number",value:0},{name:"expansionFactor",op:1218,type:"number",value:.06},{name:"vsindex",op:22,type:"number",value:0},{name:"subrs",op:19,type:"offset"}],da=[{name:"private",op:18,type:["number","offset"],value:[0,0]}];function ma(e,t,n,s){let r=Dn(e,t,e.byteLength,s);return An(r,s>1?Hs:Gs,n)}function Pn(e,t,n,s,r){let o=Dn(e,t,n,r);return An(o,r>1?_s:Vs,s)}function ga(e,t,n){let s=Dn(e,t,void 0,n);return An(s,da)}function ya(e,t,n){let s=[];for(let r=0;rt;)e.pop()}function Mn(e,t){let n=e.tables.cff&&e.tables.cff.topDict&&e.tables.cff.topDict.paintType||0;return n===2&&(t.fill=null,t.stroke="black",t.strokeWidth=e.tables.cff.topDict.strokeWidth||0),n}function wn(e,t,n,s,r){let o,a,i,l,u=new pe,c=[],p=0,f=!1,h=!1,m=0,d=0,y,T,O,I,E=0,D=[],P,M=0,_=e.tables.cff2||e.tables.cff;if(O=_.topDict._defaultWidthX,I=_.topDict._nominalWidthX,r=r||e.variation&&e.variation.get(),t.getBlendPath||(t.getBlendPath=function(k){return wn(e,t,n,s,k)}),e.isCIDFont||s>1){let k=_.topDict._fdSelect?_.topDict._fdSelect[t.index]:0,C=_.topDict._fdArray[k];y=C._subrs,T=C._subrsBias,s>1?(D=_.topDict._vstore.itemVariationStore,E=C._privateDict.vsindex):(O=C._defaultWidthX,I=C._nominalWidthX)}else y=_.topDict._subrs,T=_.topDict._subrsBias;let ce=Mn(e,u),L=O;function ee(k,C){h&&ce!==2&&u.closePath(),u.moveTo(k,C),h=!0}function X(){let k;k=(c.length&1)!==0,k&&!f&&(L=c.shift()+I),p+=c.length>>1,c.length=0,f=!0}function U(k){let C,j,Ie,bt,Be,ue,Y,oe,W,te,Z,K,H=0;for(;H1&&!f&&(L=c.shift()+I,f=!0),d+=c.pop(),ee(m,d);break;case 5:for(;c.length>0;)m+=c.shift(),d+=c.shift(),u.lineTo(m,d);break;case 6:for(;c.length>0&&(m+=c.shift(),u.lineTo(m,d),c.length!==0);)d+=c.shift(),u.lineTo(m,d);break;case 7:for(;c.length>0&&(d+=c.shift(),u.lineTo(m,d),c.length!==0);)m+=c.shift(),u.lineTo(m,d);break;case 8:for(;c.length>0;)o=m+c.shift(),a=d+c.shift(),i=o+c.shift(),l=a+c.shift(),m=i+c.shift(),d=l+c.shift(),u.curveTo(o,a,i,l,m,d);break;case 10:if(Be=c.pop()+T,ue=y[Be],ue){if(M>=As){console.warn("CFF charstring subroutine call depth exceeded, skipping callsubr");break}M++,U(ue),M--}break;case 11:if(s>1){console.error("CFF CharString operator return (11) is not supported in CFF2");break}return;case 12:switch(ie=k[H],H+=1,ie){case 35:o=m+c.shift(),a=d+c.shift(),i=o+c.shift(),l=a+c.shift(),Y=i+c.shift(),oe=l+c.shift(),W=Y+c.shift(),te=oe+c.shift(),Z=W+c.shift(),K=te+c.shift(),m=Z+c.shift(),d=K+c.shift(),c.shift(),u.curveTo(o,a,i,l,Y,oe),u.curveTo(W,te,Z,K,m,d);break;case 34:o=m+c.shift(),a=d,i=o+c.shift(),l=a+c.shift(),Y=i+c.shift(),oe=l,W=Y+c.shift(),te=l,Z=W+c.shift(),K=d,m=Z+c.shift(),u.curveTo(o,a,i,l,Y,oe),u.curveTo(W,te,Z,K,m,d);break;case 36:o=m+c.shift(),a=d+c.shift(),i=o+c.shift(),l=a+c.shift(),Y=i+c.shift(),oe=l,W=Y+c.shift(),te=l,Z=W+c.shift(),K=te+c.shift(),m=Z+c.shift(),u.curveTo(o,a,i,l,Y,oe),u.curveTo(W,te,Z,K,m,d);break;case 37:o=m+c.shift(),a=d+c.shift(),i=o+c.shift(),l=a+c.shift(),Y=i+c.shift(),oe=l+c.shift(),W=Y+c.shift(),te=oe+c.shift(),Z=W+c.shift(),K=te+c.shift(),Math.abs(Z-m)>Math.abs(K-d)?m=Z+c.shift():d=K+c.shift(),u.curveTo(o,a,i,l,Y,oe),u.curveTo(W,te,Z,K,m,d);break;default:console.log("Glyph "+t.index+": unknown operator 1200"+ie),c.length=0}break;case 14:if(s>1){console.error("CFF CharString operator endchar (14) is not supported in CFF2");break}if(c.length>=4){let Ge=Bt[c.pop()],ze=Bt[c.pop()],vt=c.pop(),St=c.pop();if(Ge&&ze){t.isComposite=!0,t.components=[];let ts=e.cffEncoding.charset.indexOf(Ge),ns=e.cffEncoding.charset.indexOf(ze);t.components.push({glyphIndex:ns,dx:0,dy:0}),t.components.push({glyphIndex:ts,dx:St,dy:vt}),u.extend(e.glyphs.get(ns).path);let fo=e.glyphs.get(ts),yn=JSON.parse(JSON.stringify(fo.path.commands));for(let xn=0;xn0&&!f&&(L=c.shift()+I,f=!0);h&&ce!==2&&(u.closePath(),h=!1);break;case 15:if(s<2){console.error("CFF2 CharString operator vsindex (15) is not supported in CFF");break}E=c.pop();break;case 16:if(s<2){console.error("CFF2 CharString operator blend (16) is not supported in CFF");break}P||(P=e.variation&&r&&e.variation.process.getBlendVector(D,E,r));var N=c.pop(),Q=P?P.length:D.itemVariationSubtables[E].regionIndexes.length,ae=N*Q,fe=c.length-ae,Ce=fe-N;if(P)for(let Ge=0;Ge>3;break;case 21:c.length>2&&!f&&(L=c.shift()+I,f=!0),d+=c.pop(),m+=c.pop(),ee(m,d);break;case 22:c.length>1&&!f&&(L=c.shift()+I,f=!0),m+=c.pop(),ee(m,d);break;case 23:X();break;case 24:for(;c.length>2;)o=m+c.shift(),a=d+c.shift(),i=o+c.shift(),l=a+c.shift(),m=i+c.shift(),d=l+c.shift(),u.curveTo(o,a,i,l,m,d);m+=c.shift(),d+=c.shift(),u.lineTo(m,d);break;case 25:for(;c.length>6;)m+=c.shift(),d+=c.shift(),u.lineTo(m,d);o=m+c.shift(),a=d+c.shift(),i=o+c.shift(),l=a+c.shift(),m=i+c.shift(),d=l+c.shift(),u.curveTo(o,a,i,l,m,d);break;case 26:for(c.length&1&&(m+=c.shift());c.length>0;)o=m,a=d+c.shift(),i=o+c.shift(),l=a+c.shift(),m=i,d=l+c.shift(),u.curveTo(o,a,i,l,m,d);break;case 27:for(c.length&1&&(d+=c.shift());c.length>0;)o=m+c.shift(),a=d,i=o+c.shift(),l=a+c.shift(),m=i+c.shift(),d=l,u.curveTo(o,a,i,l,m,d);break;case 28:C=k[H],j=k[H+1],c.push((C<<24|j<<16)>>16),H+=2;break;case 29:if(Be=c.pop()+e.gsubrsBias,ue=e.gsubrs[Be],ue){if(M>=As){console.warn("CFF charstring subroutine call depth exceeded, skipping callgsubr");break}M++,U(ue),M--}break;case 30:for(;c.length>0&&(o=m,a=d+c.shift(),i=o+c.shift(),l=a+c.shift(),m=i+c.shift(),d=l+(c.length===1?c.shift():0),u.curveTo(o,a,i,l,m,d),c.length!==0);)o=m+c.shift(),a=d,i=o+c.shift(),l=a+c.shift(),d=l+c.shift(),m=i+(c.length===1?c.shift():0),u.curveTo(o,a,i,l,m,d);break;case 31:for(;c.length>0&&(o=m+c.shift(),a=d,i=o+c.shift(),l=a+c.shift(),d=l+c.shift(),m=i+(c.length===1?c.shift():0),u.curveTo(o,a,i,l,m,d),c.length!==0);)o=m,a=d+c.shift(),i=o+c.shift(),l=a+c.shift(),m=i+c.shift(),d=l+(c.length===1?c.shift():0),u.curveTo(o,a,i,l,m,d);break;default:ie<32?console.log("Glyph "+t.index+": unknown operator "+ie):ie<247?c.push(ie-139):ie<251?(C=k[H],H+=1,c.push((ie-247)*256+C+108)):ie<255?(C=k[H],H+=1,c.push(-(ie-251)*256-C-108)):(C=k[H],j=k[H+1],Ie=k[H+2],bt=k[H+3],H+=4,c.push((C<<24|j<<16|Ie<<8|bt)/65536))}}}return U(n),e.variation&&r&&(u.commands=u.commands.map(k=>{let C=Object.keys(k);for(let j=0;j=s)throw new Error("CFF table CID Font FDSelect has bad FD index value "+a+" (FD count "+s+")");o.push(a)}else if(l===3||r>1&&l===4){let u=l===4?i.parseULong():i.parseCard16(),c=l===4?i.parseULong():i.parseCard16();if(c!==0)throw new Error(`CFF Table CID Font FDSelect format ${l} range has bad initial GID ${c}`);let p;for(let f=0;f=s)throw new Error("CFF table CID Font FDSelect has bad FD index value "+a+" (FD count "+s+")");if(p>n)throw new Error(`CFF Table CID Font FDSelect format ${r} range has bad GID ${p}`);for(;c1?null:Se(e,o.endOffset,b.bytesToString),i=o.formatMajor>1?null:Se(e,a.endOffset),l=o.formatMajor>1?null:Se(e,i.endOffset,b.bytesToString),u=Se(e,o.formatMajor>1?t+o.size+o.topDictLength:l.endOffset,void 0,o.formatMajor);n.gsubrs=u.objects,n.gsubrsBias=_t(n.gsubrs);let c;if(o.formatMajor>1){let f=t+o.size,h=b.getBytes(e,f,f+o.topDictLength);c=Ln(e,0,[h],void 0,o.formatMajor)[0]}else{let f=Ln(e,t,i.objects,l.objects,o.formatMajor);if(f.length!==1)throw new Error("CFF table has too many fonts in 'FontSet' - count of fonts NameIndex.length = "+f.length);c=f[0]}if(r.topDict=c,c._privateDict&&(n.defaultWidthX=c._privateDict.defaultWidthX,n.nominalWidthX=c._privateDict.nominalWidthX),o.formatMajor<2&&c.ros[0]!==void 0&&c.ros[1]!==void 0&&(n.isCIDFont=!0),o.formatMajor>1){let f=c.fdArray,h=c.fdSelect;if(!f)throw new Error("This is a CFF2 font, but FDArray information is missing");let m=Se(e,t+f,null,o.formatMajor),d=ya(e,t,m.objects);c._fdArray=d,h&&(c._fdSelect=Ps(e,t+h,n.numGlyphs,d.length,o.formatMajor))}else if(n.isCIDFont){let f=c.fdArray,h=c.fdSelect;if(f===0||h===0)throw new Error("Font is marked as a CID font, but FDArray and/or FDSelect information is missing");f+=t;let m=Se(e,f),d=Ln(e,t,m.objects,l.objects,o.formatMajor);c._fdArray=d,h+=t,c._fdSelect=Ps(e,h,n.numGlyphs,d.length,o.formatMajor)}if(o.formatMajor<2){let f=t+c.private[1],h=Pn(e,f,c.private[0],l.objects,o.formatMajor);if(n.defaultWidthX=h.defaultWidthX,n.nominalWidthX=h.nominalWidthX,h.subrs!==0){let m=f+h.subrs,d=Se(e,m);n.subrs=d.objects,n.subrsBias=_t(n.subrs)}else n.subrs=[],n.subrsBias=0}let p;if(s.lowMemory?(p=la(e,t+c.charStrings,o.formatMajor),n.nGlyphs=p.offsets.length-(o.formatMajor>1?1:0)):(p=Se(e,t+c.charStrings,null,o.formatMajor),n.nGlyphs=p.objects.length),o.formatMajor>1&&n.tables.maxp&&n.nGlyphs!==n.tables.maxp.numGlyphs&&console.error(`Glyph count in the CFF2 table (${n.nGlyphs}) must correspond to the glyph count in the maxp table (${n.tables.maxp.numGlyphs})`),o.formatMajor<2){let f=[],h=[];c.charset===0?f=Us:c.charset===1?f=Is:c.charset===2?f=Rs:f=xa(e,t+c.charset,n.nGlyphs,l.objects,n.isCIDFont),c.encoding===0?h=Bt:c.encoding===1?h=Es:h=ba(e,t+c.encoding),n.cffEncoding=new En(h,f),n.encoding=n.encoding||n.cffEncoding}if(n.glyphs=new ne.GlyphSet(n),s.lowMemory)n._push=function(f){let h=ca(f,p.offsets,e,t+c.charStrings,void 0,o.formatMajor);n.glyphs.push(f,ne.cffGlyphLoader(n,f,wn,h,o.formatMajor))};else for(let f=0;f=0&&(n=s),s=t.indexOf(e),s>=0?n=s+st.length:(n=st.length+t.length,t.push(e)),n}function Ta(){return new x.Record("Header",[{name:"major",type:"Card8",value:1},{name:"minor",type:"Card8",value:0},{name:"hdrSize",type:"Card8",value:4},{name:"major",type:"Card8",value:1}])}function ka(e){let t=new x.Record("Name INDEX",[{name:"names",type:"INDEX",value:[]}]);t.names=[];for(let n=0;n1?Hs:Gs,e,t),s}function Ns(e){let t=new x.Record("Top DICT INDEX",[{name:"topDicts",type:"INDEX",value:[]}]);return t.topDicts=[{name:"topDict_0",type:"TABLE",value:e}],t}function Oa(e){let t=new x.Record("String INDEX",[{name:"strings",type:"INDEX",value:[]}]);t.strings=[];for(let n=0;n1?_s:Vs,e,t),s}function Ea(e,t){let s=new x.Table("CFF ",[{name:"header",type:"RECORD"},{name:"nameIndex",type:"RECORD"},{name:"topDictIndex",type:"RECORD"},{name:"stringIndex",type:"RECORD"},{name:"globalSubrIndex",type:"RECORD"},{name:"charsets",type:"RECORD"},{name:"charStringsIndex",type:"RECORD"},{name:"privateDict",type:"RECORD"}]),r=1/t.unitsPerEm,o={version:t.version,fullName:t.fullName,familyName:t.familyName,weight:t.weightName,fontBBox:t.fontBBox||[0,0,0,0],fontMatrix:[r,0,0,r,0,0],charset:999,encoding:0,charStrings:999,private:[0,999]},a=t&&t.topDict||{};a.paintType&&(o.paintType=a.paintType,o.strokeWidth=a.strokeWidth||0);let i={},l=[],u;for(let h=1;h=n.begin&&e=1&&(n.ulCodePageRange1=s.parseULong(),n.ulCodePageRange2=s.parseULong()),n.version>=2&&(n.sxHeight=s.parseShort(),n.sCapHeight=s.parseShort(),n.usDefaultChar=s.parseUShort(),n.usBreakChar=s.parseUShort(),n.usMaxContent=s.parseUShort()),n}function Wa(e){return new x.Table("OS/2",[{name:"version",type:"USHORT",value:3},{name:"xAvgCharWidth",type:"SHORT",value:0},{name:"usWeightClass",type:"USHORT",value:0},{name:"usWidthClass",type:"USHORT",value:0},{name:"fsType",type:"USHORT",value:0},{name:"ySubscriptXSize",type:"SHORT",value:650},{name:"ySubscriptYSize",type:"SHORT",value:699},{name:"ySubscriptXOffset",type:"SHORT",value:0},{name:"ySubscriptYOffset",type:"SHORT",value:140},{name:"ySuperscriptXSize",type:"SHORT",value:650},{name:"ySuperscriptYSize",type:"SHORT",value:699},{name:"ySuperscriptXOffset",type:"SHORT",value:0},{name:"ySuperscriptYOffset",type:"SHORT",value:479},{name:"yStrikeoutSize",type:"SHORT",value:49},{name:"yStrikeoutPosition",type:"SHORT",value:258},{name:"sFamilyClass",type:"SHORT",value:0},{name:"bFamilyType",type:"BYTE",value:0},{name:"bSerifStyle",type:"BYTE",value:0},{name:"bWeight",type:"BYTE",value:0},{name:"bProportion",type:"BYTE",value:0},{name:"bContrast",type:"BYTE",value:0},{name:"bStrokeVariation",type:"BYTE",value:0},{name:"bArmStyle",type:"BYTE",value:0},{name:"bLetterform",type:"BYTE",value:0},{name:"bMidline",type:"BYTE",value:0},{name:"bXHeight",type:"BYTE",value:0},{name:"ulUnicodeRange1",type:"ULONG",value:0},{name:"ulUnicodeRange2",type:"ULONG",value:0},{name:"ulUnicodeRange3",type:"ULONG",value:0},{name:"ulUnicodeRange4",type:"ULONG",value:0},{name:"achVendID",type:"CHARARRAY",value:"XXXX"},{name:"fsSelection",type:"USHORT",value:0},{name:"usFirstCharIndex",type:"USHORT",value:0},{name:"usLastCharIndex",type:"USHORT",value:0},{name:"sTypoAscender",type:"SHORT",value:0},{name:"sTypoDescender",type:"SHORT",value:0},{name:"sTypoLineGap",type:"SHORT",value:0},{name:"usWinAscent",type:"USHORT",value:0},{name:"usWinDescent",type:"USHORT",value:0},{name:"ulCodePageRange1",type:"ULONG",value:0},{name:"ulCodePageRange2",type:"ULONG",value:0},{name:"sxHeight",type:"SHORT",value:0},{name:"sCapHeight",type:"SHORT",value:0},{name:"usDefaultChar",type:"USHORT",value:0},{name:"usBreakChar",type:"USHORT",value:0},{name:"usMaxContext",type:"USHORT",value:0}],e)}var lt={parse:ja,make:Wa,unicodeRanges:Nn,getUnicodeRange:za};function qa(e,t){let n={},s=new b.Parser(e,t);switch(n.version=s.parseVersion(),n.italicAngle=s.parseFixed(),n.underlinePosition=s.parseShort(),n.underlineThickness=s.parseShort(),n.isFixedPitch=s.parseULong(),n.minMemType42=s.parseULong(),n.maxMemType42=s.parseULong(),n.minMemType1=s.parseULong(),n.maxMemType1=s.parseULong(),n.version){case 1:n.names=Ee.slice();break;case 2:n.numberOfGlyphs=s.parseUShort(),n.glyphNameIndex=new Array(n.numberOfGlyphs);for(let r=0;r=Ee.length){let o=s.parseChar();n.names.push(s.parseString(o))}break;case 2.5:n.numberOfGlyphs=s.parseUShort(),n.offset=new Array(n.numberOfGlyphs);for(let r=0;r[{name:"glyphID_"+a,type:"USHORT",value:o.glyphID},{name:"firstLayerIndex_"+a,type:"USHORT",value:o.firstLayerIndex},{name:"numLayers_"+a,type:"USHORT",value:o.numLayers}]).flat(),...n.map((o,a)=>[{name:"LayerGlyphID_"+a,type:"USHORT",value:o.glyphID},{name:"paletteIndex_"+a,type:"USHORT",value:o.paletteIndex}]).flat()])}var Kt={parse:Qa,make:Ja};function ei(e,t){return[{name:"tag_"+e,type:"TAG",value:t.tag},{name:"minValue_"+e,type:"FIXED",value:t.minValue<<16},{name:"defaultValue_"+e,type:"FIXED",value:t.defaultValue<<16},{name:"maxValue_"+e,type:"FIXED",value:t.maxValue<<16},{name:"flags_"+e,type:"USHORT",value:0},{name:"nameID_"+e,type:"USHORT",value:t.axisNameID}]}function ti(e,t,n){let s={},r=new b.Parser(e,t);s.tag=r.parseTag(),s.minValue=r.parseFixed(),s.defaultValue=r.parseFixed(),s.maxValue=r.parseFixed(),r.skip("uShort",1);let o=r.parseUShort();return s.axisNameID=o,s.name=nt(n,o),s}function ni(e,t,n,s={}){let r=[{name:"nameID_"+e,type:"USHORT",value:t.subfamilyNameID},{name:"flags_"+e,type:"USHORT",value:0}];for(let o=0;o1||o>0?s.parseUShort():void 0;n!==void 0&&v.argument(l>=n.axes.length,"STAT axis count must be greater than or equal to fvar axis count"),c>0&&v.argument(l>=0,"STAT axis count must be greater than 0 if STAT axis value count is greater than 0");let h=[];for(let y=0;yi.value.tag?1:-1}),t.fields=t.fields.concat(s),t.fields=t.fields.concat(r),t}function $s(e,t,n){for(let s=0;s0)return e.glyphs.get(r).getMetrics()}return n}function Oi(e){let t=0;for(let n=0;nae||l===void 0)&&ae>0&&(l=ae),u 123 are reserved for internal usage");if(Q.name===".notdef")continue;let Ce=Q.getMetrics();t.push(Ce.xMin),n.push(Ce.yMin),s.push(Ce.xMax),r.push(Ce.yMax),a.push(Ce.leftSideBearing),i.push(Ce.rightSideBearing),o.push(Q.advanceWidth)}let m={xMin:Math.min.apply(null,t),yMin:Math.min.apply(null,n),xMax:Math.max.apply(null,s),yMax:Math.max.apply(null,r),advanceWidthMax:Math.max.apply(null,o),advanceWidthAvg:Oi(o),minLeftSideBearing:Math.min.apply(null,a),maxLeftSideBearing:Math.max.apply(null,a),minRightSideBearing:Math.min.apply(null,i)};m.ascender=e.ascender,m.descender=e.descender;let d=0;e.weightClass>=600&&(d|=e.macStyleValues.BOLD),e.italicAngle<0&&(d|=e.macStyleValues.ITALIC);let y=zt.make({flags:3,unitsPerEm:e.unitsPerEm,xMin:m.xMin,yMin:m.yMin,xMax:m.xMax,yMax:m.yMax,lowestRecPPEM:3,macStyle:d,createdTimestamp:e.createdTimestamp}),T=jt.make({ascender:m.ascender,descender:m.descender,advanceWidthMax:m.advanceWidthMax,minLeftSideBearing:m.minLeftSideBearing,minRightSideBearing:m.minRightSideBearing,xMaxExtent:m.maxLeftSideBearing+(m.xMax-m.xMin),numberOfHMetrics:e.glyphs.length}),O=$t.make(e.glyphs.length),I=lt.make(Object.assign({xAvgCharWidth:Math.round(m.advanceWidthAvg),usFirstCharIndex:l,usLastCharIndex:u,ulUnicodeRange1:c,ulUnicodeRange2:p,ulUnicodeRange3:f,ulUnicodeRange4:h,sTypoAscender:m.ascender,sTypoDescender:m.descender,sTypoLineGap:0,usWinAscent:m.yMax,usWinDescent:Math.abs(m.yMin),ulCodePageRange1:1,sxHeight:$s(e,"xyvw",{yMax:Math.round(m.ascender/2)}).yMax,sCapHeight:$s(e,"HIKLEFJMNTZBDPRAGOQSUVWXY",m).yMax,usDefaultChar:e.hasChar(" ")?32:0,usBreakChar:e.hasChar(" ")?32:0},e.tables.os2)),E=Wt.make(e.glyphs),D=Nt.make(e.glyphs),P=e.getEnglishName("fontFamily"),M=e.getEnglishName("fontSubfamily"),_=P+" "+M,ce=e.getEnglishName("postScriptName");ce||(ce=P.replace(/\s/g,"")+"-"+M);let L={};for(let N in e.names)L[N]=e.names[N];L.unicode=L.unicode||{},L.macintosh=L.macintosh||{},L.windows=L.windows||{};let ee=e.names.unicode||{},X=e.names.macintosh||{},U=e.names.windows||{};for(let N in L){if(L[N]=L[N]||{},!L[N].uniqueID){let Q=e.getEnglishName("manufacturer")||"";L[N].uniqueID={en:`${Q}: ${_}`}}L[N].postScriptName||(L[N].postScriptName={en:ce})}L.unicode.preferredFamily||(L.unicode.preferredFamily=ee.fontFamily||X.fontFamily||U.fontFamily),L.macintosh.preferredFamily||(L.macintosh.preferredFamily=X.fontFamily||ee.fontFamily||U.fontFamily),L.windows.preferredFamily||(L.windows.preferredFamily=U.fontFamily||ee.fontFamily||X.fontFamily),L.unicode.preferredSubfamily||(L.unicode.preferredSubfamily=ee.fontSubfamily||X.fontSubfamily||U.fontSubfamily),L.macintosh.preferredSubfamily||(L.macintosh.preferredSubfamily=X.fontSubfamily||ee.fontSubfamily||U.fontSubfamily),L.windows.preferredSubfamily||(L.windows.preferredSubfamily=U.fontSubfamily||ee.fontSubfamily||X.fontSubfamily);let k=[],C=Mt.make(L,k),j=k.length>0?qt.make(k):void 0,Ie=Xt.make(e),bt=it.make(e.glyphs,{version:e.getEnglishName("version"),fullName:_,familyName:P,weightName:M,postScriptName:ce,unitsPerEm:e.unitsPerEm,fontBBox:[0,m.yMin,m.ascender,m.advanceWidthMax],topDict:e.tables.cff&&e.tables.cff.topDict||{}}),Be=e.metas&&Object.keys(e.metas).length>0?Zt.make(e.metas):void 0,ue=[y,T,O,I,C,D,Ie,bt,E];j&&ue.push(j);let Y={gsub:Yt,cpal:Ht,colr:Kt,stat:Jt,avar:en,cvar:tn,fvar:Qt,gvar:nn,gasp:sn,svg:rn},oe={avar:[e.tables.fvar],fvar:[e.names]};for(let N in Y){let Q=e.tables[N];if(Q){let ae=Y[N].make.call(e,Q,...oe[N]||[]);ae&&ue.push(ae)}}Be&&ue.push(Be);let W=Xs(ue),te=W.encode(),Z=Bn(te),K=W.fields,H=!1;for(let N=0;N>>1,o=e[r].tag;if(o===t)return r;o>>1,o=e[r];if(o===t)return r;o>>1;n=e[o];let a=n.start;if(a===t)return n;a0)return n=e[s-1],t>n.end?0:n}function Qs(e,t){this.font=e,this.tableName=t}Qs.prototype={searchTag:Gn,binSearch:Zs,getTable:function(e){let t=this.font.tables[this.tableName];return!t&&e&&(t=this.font.tables[this.tableName]=this.createDefaultTable()),t},getScriptNames:function(){let e=this.getTable();return e?e.scripts.map(function(t){return t.tag}):[]},getDefaultScriptName:function(){let e=this.getTable();if(!e)return;let t=!1;for(let n=0;n=0)return s[r].script;if(t){let o={tag:e,script:{defaultLangSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]},langSysRecords:[]}};return s.splice(-1-r,0,o),o.script}}},getLangSysTable:function(e,t,n){let s=this.getScriptTable(e,n);if(s){if(!t||t==="dflt"||t==="DFLT")return s.defaultLangSys;let r=Gn(s.langSysRecords,t);if(r>=0)return s.langSysRecords[r].langSys;if(n){let o={tag:t,langSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]}};return s.langSysRecords.splice(-1-r,0,o),o.langSys}}},getFeatureTable:function(e,t,n,s){let r=this.getLangSysTable(e,t,s);if(r){let o,a=r.featureIndexes,i=this.font.tables[this.tableName].features;for(let l=0;l=i[l-1].tag,"Features must be added in alphabetical order."),o={tag:n,feature:{params:0,lookupListIndexes:[]}},i.push(o),a.push(l),o.feature}}},getLookupTables:function(e,t,n,s,r){let o=this.getFeatureTable(e,t,n,r),a=[];if(o){let i,l=o.lookupListIndexes,u=this.font.tables[this.tableName].lookups;for(let c=0;c=0?n:-1}case 2:{let n=Ks(e.ranges,t);return n?n.index+t-n.start:-1}}},expandCoverage:function(e){if(e.format===1)return e.glyphs;{let t=[],n=e.ranges;for(let s=0;sn)r=a-1;else{o=i;break}}return o}function nr(e,t,n){let s=0,r=e.length-1;for(;s<=r;){let o=Math.floor((s+r)/2),a=e[o];if(a[t]n)r=o-1;else return o}return-1}function sr(e,t,n){let s=0,r=e.length,o=(a,i)=>a[t]-i[t];for(;s>>1;o(e[a],n)<0?s=a+1:r=a}return e.splice(s,0,n),s}function Hn(e){return e[0]===31&&e[1]===139&&e[2]===8}function rr(e){let t=new DataView(e.buffer,e.byteOffset,e.byteLength),n=10,s=e.byteLength-8,r=t.getInt8(3);if(r&4&&(n+=2+t.getUint16(n,!0)),r&8)for(;n=s)throw new Error("Can't find compressed blocks");let o=t.getUint32(t.byteLength-4,!0);return Tt(e.subarray(n,s),new Uint8Array(o))}function Vn(e){return{x:e.x,y:e.y,onCurve:e.onCurve,lastPointOfContour:e.lastPointOfContour}}function or(e){return{glyphIndex:e.glyphIndex,xScale:e.xScale,scale01:e.scale01,scale10:e.scale10,yScale:e.yScale,dx:e.dx,dy:e.dy}}function se(e){Ye.call(this,e,"gsub")}function _n(e,t,n){let s=e.subtables;for(let r=0;r1,'Multiple: "by" must be an array of two or more ids');let r=this.getLookupTables(n,s,e,2,!0)[0],o=_n(r,1,{substFormat:1,coverage:{format:1,glyphs:[]},sequences:[]});v.assert(o.coverage.format===1,"Multiple: unable to modify coverage table format "+o.coverage.format);let a=t.sub,i=this.binSearch(o.coverage.glyphs,a);i<0&&(i=-1-i,o.coverage.glyphs.splice(i,0,a),o.sequences.splice(i,0,0)),o.sequences[i]=t.by};se.prototype.addAlternate=function(e,t,n,s){let r=this.getLookupTables(n,s,e,3,!0)[0],o=_n(r,1,{substFormat:1,coverage:{format:1,glyphs:[]},alternateSets:[]});v.assert(o.coverage.format===1,"Alternate: unable to modify coverage table format "+o.coverage.format);let a=t.sub,i=this.binSearch(o.coverage.glyphs,a);i<0&&(i=-1-i,o.coverage.glyphs.splice(i,0,a),o.alternateSets.splice(i,0,0)),o.alternateSets[i]=t.by};se.prototype.addLigature=function(e,t,n,s){let r=this.getLookupTables(n,s,e,4,!0)[0],o=r.subtables[0];o||(o={substFormat:1,coverage:{format:1,glyphs:[]},ligatureSets:[]},r.subtables[0]=o),v.assert(o.coverage.format===1,"Ligature: unable to modify coverage table format "+o.coverage.format);let a=t.sub[0],i=t.sub.slice(1),l={ligGlyph:t.by,components:i},u=this.binSearch(o.coverage.glyphs,a);if(u>=0){let c=o.ligatureSets[u];for(let p=0;pot(n,"raw")):ot(t,"raw")}fillPalette(t,n=[],s=this.cpal().numPaletteEntries){return t=Number.isInteger(t)?this.get(t,"raw"):t,Object.assign(Array(s).fill(this.defaultValue),this.toCPALcolor(t).concat(this.toCPALcolor(n)))}extend(t){if(this.ensureCPAL(Array(t).fill(this.defaultValue)))return;let n=this.cpal(),s=n.numPaletteEntries+t,r=this.getAll().map(o=>this.fillPalette(o,[],s));n.numPaletteEntries=s,n.colorRecords=this.toCPALcolor(r.flat()),this.updateIndices()}get(t,n="hexa"){return this.getAll(n)[t]||null}getColor(t,n=0,s="hexa"){return rt(this.font,t,n,s)}setColor(t,n,s=0){t=parseInt(t),s=parseInt(s);let r=this.getAll("raw"),o=r[s];if(!o)throw Error(`paletteIndex ${s} out of range`);let a=this.cpal(),i=a.numPaletteEntries;Array.isArray(n)||(n=[n]),n.length+t>i&&(this.extend(n.length+t-i),r=this.getAll("raw"),o=r[s]);for(let l=0;ls?this.extend(t.length-s):t.lengths.numPaletteEntries-1)throw Error(`Replacement index out of range: numPaletteEntries after deletion: ${s.numPaletteEntries-1}, replacementIndex: ${n})`);for(let l=0;lf!==t);o.push(c)}let a=this.font.tables.colr;if(a){let l=a.layerRecords;for(let u=0;ut)l[u].paletteIndex-=1;else if(c===t){let p=0;for(let f=0;ft&&n<=t+r[f].length){p++;break}l[u].paletteIndex=n-p}}this.font.tables.colr={...a,layerRecords:l}}let i=o.flat();for(let l=0;lr.length?s=r.length:s<0&&(s=r.length+1+s%(r.length+1),s>=r.length+1&&(s-=r.length+1));let o=[];for(let a=0;a({glyphID:o.glyph.index,paletteIndex:a===n?s:o.paletteIndex})),this.updateColrTable(t,r)):console.error("Invalid layer index")}remove(t,n,s=n){let r=this.get(t);r=r.map(o=>({glyphID:o.glyph.index,paletteIndex:o.paletteIndex})),r.splice(n,s-n+1),this.updateColrTable(t,r)}updateColrTable(t,n){this.ensureCOLR();let r=this.font.tables.colr,o=nr(r.baseGlyphRecords,"glyphID",t);if(o===-1){let p={glyphID:t,firstLayerIndex:r.layerRecords.length,numLayers:0};o=sr(r.baseGlyphRecords,"glyphID",p)}let i=r.baseGlyphRecords[o],l=i.numLayers,u=n.length,c=u-l;if(c>0){let p=n.slice(l).map(f=>({glyphID:f.glyphID,paletteIndex:f.paletteIndex}));r.layerRecords.splice(i.firstLayerIndex+l,0,...p)}else c<0&&r.layerRecords.splice(i.firstLayerIndex+u,-c);for(let p=0;p{if(o.image=a,typeof this.font.onGlyphUpdated=="function")try{this.font.onGlyphUpdated(t)}catch(i){console.error("font.onGlyphUpdated",t,i)}}),r.images.set(t,o)),o}};function Fi(e){return{template:Ii(e).then(Li),images:new Map}}function Ui(e,t,n){return{promise:t.then(s=>{let r;typeof s=="string"?r=s:(s[4]=n,r=s.join(""));let o=wi(r,e.unitsPerEm);return o.image.decode().then(()=>o)}),image:void 0}}var Ii=typeof DecompressionStream=="function"?Ei:Ri;function Ri(e){try{return Promise.resolve(new TextDecoder().decode(Hn(e)?rr(e):e))}catch(t){return Promise.reject(t)}}function Ei(e){if(Hn(e))return new Response(new Response(e).body.pipeThrough(new DecompressionStream("gzip"))).text();try{return Promise.resolve(new TextDecoder().decode(e))}catch(t){return Promise.reject(t)}}function Li(e){let t=e.indexOf("",t+4)+1;if(/ id=['"]glyph\d+['"]/.test(e.substring(t,n)))return e;let s=e.lastIndexOf("");return[e.substring(0,n),"",e.substring(n,s),'',e.substring(s)]}function wi(e,t){let s=new DOMParser().parseFromString(e,"image/svg+xml").documentElement,r=s.viewBox.baseVal,o=s.width.baseVal,a=s.height.baseVal,i=1,l=1;r.width>0&&r.height>0&&(o.unitType===1?(i=o.valueInSpecifiedUnits/r.width,l=a.unitType===1?a.valueInSpecifiedUnits/r.height:i):a.unitType===1?(l=a.valueInSpecifiedUnits/r.height,i=l):t&&(i=t/r.width,l=t/r.height));let u=document.createElement("div");u.style.position="fixed",u.style.visibility="hidden",u.appendChild(s),document.body.appendChild(u);let c=s.getBBox();document.body.removeChild(u);let p=(c.x-r.x)*i,f=(r.y-c.y)*l,h=c.width*i,m=c.height*l;s.setAttribute("viewBox",[c.x,c.y,c.width,c.height].join(" ")),i!==1&&s.setAttribute("width",h),l!==1&&s.setAttribute("height",m);let d=new Image(h,m);return d.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(s.outerHTML),{leftSideBearing:p,baseline:f,image:d}}var zn=new WeakMap;function ir(e,t,n,s,r){let o;return(t&s)>0?(o=e.parseByte(),t&r||(o=-o),o=n+o):(t&r)>0?o=n:o=n+e.parseShort(),o}function lr(e,t,n){let s=new b.Parser(t,n);e._numberOfContours=s.parseShort(),e._xMin=s.parseShort(),e._yMin=s.parseShort(),e._xMax=s.parseShort(),e._yMax=s.parseShort();let r,o;if(e._numberOfContours>0){let a=e.endPointIndices=[];for(let l=0;l0){let u=s.parseByte();for(let c=0;c0){let l=[],u;if(i>0){for(let f=0;f=0,l.push(u);let c=0;for(let f=0;f0?(r&2)>0?(i.dx=s.parseShort(),i.dy=s.parseShort()):i.matchedPoints=[s.parseUShort(),s.parseUShort()]:(r&2)>0?(i.dx=s.parseChar(),i.dy=s.parseChar()):i.matchedPoints=[s.parseByte(),s.parseByte()],(r&8)>0?i.xScale=i.yScale=s.parseF2Dot14():(r&64)>0?(i.xScale=s.parseF2Dot14(),i.yScale=s.parseF2Dot14()):(r&128)>0&&(i.xScale=s.parseF2Dot14(),i.scale01=s.parseF2Dot14(),i.scale10=s.parseF2Dot14(),i.yScale=s.parseF2Dot14()),e.components.push(i),a=!!(r&32)}if(r&256){e.instructionLength=s.parseUShort(),e.instructions=[];for(let i=0;it.points.length-1||r.matchedPoints[1]>o.points.length-1)throw Error("Matched points out of range in "+t.name);let i=t.points[r.matchedPoints[0]],l=o.points[r.matchedPoints[1]],u={xScale:r.xScale,scale01:r.scale01,scale10:r.scale10,yScale:r.yScale,dx:0,dy:0};l=pt([l],u)[0],u.dx=i.x-l.x,u.dy=i.y-l.y,a=pt(o.points,u)}t.points=t.points.concat(a)}}}finally{n.delete(t.index)}}return ln(t.points)}function Ai(e,t,n,s){let r=new ne.GlyphSet(s);for(let o=0;o=1&&n[s]a)continue;let l=r,u=r;for(r++;r<=a;)s[r]&&(this.deltaInterpolate(u+1,r-1,u,r,n,t),u=r),r++;u===l?this.deltaShift(o,a,u,n,t):(this.deltaInterpolate(u+1,a,u,l,n,t),l>0&&this.deltaInterpolate(o,l-1,u,l,n,t)),r=a+1}}deltaInterpolate(t,n,s,r,o,a){if(t>n)return;let i=["x","y"];for(let u=0;uo[r][c]){var l=s;s=r,r=l}let p=o[s][c],f=o[r][c],h=a[s][c],m=a[r][c];if(p!==f||h===m){let d=p===f?0:(m-h)/(f-p);for(let y=t;y<=n;y++){let T=o[y][c];T<=p?T+=h-p:T>=f?T+=m-f:T=h+(T-p)*d,a[y][c]=T}}}}deltaShift(t,n,s,r,o){let a=o[s].x-r[s].x,i=o[s].y-r[s].y;if(!(a===0&&i===0))for(let l=t;l<=n;l++)l!==s&&(o[l].x+=a,o[l].y+=i)}transformComponents(t,n,s,r,o,a){let i=0;for(let l=0;l-1&&(p.dx+=Math.round(o.deltas[f]*a),p.dy+=Math.round(o.deltasY[f]*a));let h=pt(this.getTransform(c,s).points,p);n.splice(i,h.length,...h),i+=c.points.length}}applyTupleVariationStore(t,n,s,r="gvar",o={}){s||(s=this.font.variation.get());let a=this.getNormalizedCoords(s),{headers:i,sharedPoints:l}=t,u=this.fvar().axes.length,c;r==="gvar"?c=n.map(Vn):r==="cvar"&&(c=[...n]);for(let p=0;pf.intermediateEndTuple[d]){h=0;break}else a[d]Math.max(0,y[d])){h=0;break}h=(h*a[d]+Number.EPSILON)/(y[d]+Number.EPSILON)}}}if(h===0)continue;let m=f.privatePoints.length?f.privatePoints:l;if(r==="gvar"&&o.glyph&&o.glyph.isComposite)this.transformComponents(o.glyph,c,s,m,f,h);else if(m.length===0)for(let d=0;d=l&&(u=l-1),{outerIndex:o,innerIndex:a}=i[s].map[u]}else o=0,a=t;return this.getDelta(i.itemVariationStore,o,a,r)}getDelta(t,n,s,r){if(n>=t.itemVariationSubtables.length)return 0;let o=t.itemVariationSubtables[n];if(s>=o.deltaSets.length)return 0;let a=o.deltaSets[s],i=this.getBlendVector(t,n,r),l=0;for(let u=0;uf.peakCoord||f.peakCoord>f.endCoord||f.startCoord<0&&f.endCoord>0&&f.peakCoord!==0||f.peakCoord===0?h=1:o[p]f.endCoord?h=0:o[p]===f.peakCoord?h=1:o[p]-1?this.set(t):this.set(this.getDefaultCoordinates())}getDefaultCoordinates(){return this.fvar().axes.reduce((t,n)=>(t[n.tag]=n.defaultValue,t),{})}getDefaultInstanceIndex(){let t=this.getDefaultCoordinates(),n=this.getInstanceIndex(t);return n<0&&(n=this.fvar().instances.findIndex(s=>s.name&&s.name.en==="Regular")),n}getInstanceIndex(t){return this.fvar().instances.findIndex(n=>Object.keys(t).every(s=>n.coordinates[s]===t[s]))}getInstance(t){return this.fvar().instances&&this.fvar().instances[t]}set(t){let n;if(Number.isInteger(t)){let s=this.getInstance(t);if(!s)throw Error(`Invalid instance index ${t}`);n={...s.coordinates}}else n=t,this.process.normalizeCoordTags(n);n=Object.assign({},this.font.defaultRenderOptions.variation,n),this.font.defaultRenderOptions=Object.assign({},this.font.defaultRenderOptions,{variation:n})}get(){return Object.assign({},this.font.defaultRenderOptions.variation)}avar(){return this.font.tables.avar}cvar(){return this.font.tables.cvar}fvar(){return this.font.tables.fvar}gvar(){return this.font.tables.gvar}hvar(){return this.font.tables.hvar}};var ur=1e6,hn=64,dn=1e4,Fr,_e,Ur,$n;function Ir(e){this.font=e,this.getCommands=function(t){return cn.getPath(t).commands},this._fpgmState=this._prepState=void 0,this._errorState=0}function Ni(e){return e}function Rr(e){return Math.sign(e)*Math.round(Math.abs(e))}function Bi(e){return Math.sign(e)*Math.round(Math.abs(e*2))/2}function Gi(e){return Math.sign(e)*(Math.round(Math.abs(e)+.5)-.5)}function Hi(e){return Math.sign(e)*Math.ceil(Math.abs(e))}function Vi(e){return Math.sign(e)*Math.floor(Math.abs(e))}var Er=function(e){let t=this.srPeriod,n=this.srPhase,s=this.srThreshold,r=1;return e<0&&(e=-e,r=-1),e+=s-n,e=Math.trunc(e/t)*t,e+=n,e<0?n*r:e*r},Te={x:1,y:0,axis:"x",distance:function(e,t,n,s){return(n?e.xo:e.x)-(s?t.xo:t.x)},interpolate:function(e,t,n,s){let r,o,a,i,l,u,c;if(!s||s===this){if(r=e.xo-t.xo,o=e.xo-n.xo,l=t.x-t.xo,u=n.x-n.xo,a=Math.abs(r),i=Math.abs(o),c=a+i,c===0){e.x=e.xo+(l+u)/2;return}e.x=e.xo+(l*i+u*a)/c;return}if(r=s.distance(e,t,!0,!0),o=s.distance(e,n,!0,!0),l=s.distance(t,t,!1,!0),u=s.distance(n,n,!1,!0),a=Math.abs(r),i=Math.abs(o),c=a+i,c===0){Te.setRelative(e,e,(l+u)/2,s,!0);return}Te.setRelative(e,e,(l*i+u*a)/c,s,!0)},normalSlope:Number.NEGATIVE_INFINITY,setRelative:function(e,t,n,s,r){if(!s||s===this){e.x=(r?t.xo:t.x)+n;return}let o=r?t.xo:t.x,a=r?t.yo:t.y,i=o+n*s.x,l=a+n*s.y;e.x=i+(e.y-l)/s.normalSlope},slope:0,touch:function(e){e.xTouched=!0},touched:function(e){return e.xTouched},untouch:function(e){e.xTouched=!1}},Fe={x:0,y:1,axis:"y",distance:function(e,t,n,s){return(n?e.yo:e.y)-(s?t.yo:t.y)},interpolate:function(e,t,n,s){let r,o,a,i,l,u,c;if(!s||s===this){if(r=e.yo-t.yo,o=e.yo-n.yo,l=t.y-t.yo,u=n.y-n.yo,a=Math.abs(r),i=Math.abs(o),c=a+i,c===0){e.y=e.yo+(l+u)/2;return}e.y=e.yo+(l*i+u*a)/c;return}if(r=s.distance(e,t,!0,!0),o=s.distance(e,n,!0,!0),l=s.distance(t,t,!1,!0),u=s.distance(n,n,!1,!0),a=Math.abs(r),i=Math.abs(o),c=a+i,c===0){Fe.setRelative(e,e,(l+u)/2,s,!0);return}Fe.setRelative(e,e,(l*i+u*a)/c,s,!0)},normalSlope:0,setRelative:function(e,t,n,s,r){if(!s||s===this){e.y=(r?t.yo:t.y)+n;return}let o=r?t.xo:t.x,a=r?t.yo:t.y,i=o+n*s.x,l=a+n*s.y;e.y=l+s.normalSlope*(e.x-i)},slope:Number.POSITIVE_INFINITY,touch:function(e){e.yTouched=!0},touched:function(e){return e.yTouched},untouch:function(e){e.yTouched=!1}};Object.freeze(Te);Object.freeze(Fe);function dt(e,t){this.x=e,this.y=t,this.axis=void 0,this.slope=t/e,this.normalSlope=-e/t,Object.freeze(this)}dt.prototype.distance=function(e,t,n,s){return this.x*Te.distance(e,t,n,s)+this.y*Fe.distance(e,t,n,s)};dt.prototype.interpolate=function(e,t,n,s){let r,o,a,i,l,u,c;if(a=s.distance(e,t,!0,!0),i=s.distance(e,n,!0,!0),r=s.distance(t,t,!1,!0),o=s.distance(n,n,!1,!0),l=Math.abs(a),u=Math.abs(i),c=l+u,c===0){this.setRelative(e,e,(r+o)/2,s,!0);return}this.setRelative(e,e,(r*u+o*l)/c,s,!0)};dt.prototype.setRelative=function(e,t,n,s,r){s=s||this;let o=r?t.xo:t.x,a=r?t.yo:t.y,i=o+n*s.x,l=a+n*s.y,u=s.normalSlope,c=this.slope,p=e.x,f=e.y;e.x=(c*p-u*i+l-f)/(c-u),e.y=c*(e.x-p)+f};dt.prototype.touch=function(e){e.xTouched=!0,e.yTouched=!0};function mt(e,t){let n=Math.sqrt(e*e+t*t);return e/=n,t/=n,e===1&&t===0?Te:e===0&&t===1?Fe:new dt(e,t)}function Ue(e,t,n,s){this.x=this.xo=Math.round(e*64)/64,this.y=this.yo=Math.round(t*64)/64,this.lastPointOfContour=n,this.onCurve=s,this.prevPointOnContour=void 0,this.nextPointOnContour=void 0,this.xTouched=!1,this.yTouched=!1,Object.preventExtensions(this)}Ue.prototype.nextTouched=function(e){let t=this.nextPointOnContour;for(;!e.touched(t)&&t!==this;)t=t.nextPointOnContour;return t};Ue.prototype.prevTouched=function(e){let t=this.prevPointOnContour;for(;!e.touched(t)&&t!==this;)t=t.prevPointOnContour;return t};var ht=Object.freeze(new Ue(0,0)),_i={cvCutIn:17/16,deltaBase:9,deltaShift:.125,loop:1,minDis:1,autoFlip:!0};function Me(e,t){switch(this.env=e,this.stack=[],this.prog=t,e){case"glyf":this.zp0=this.zp1=this.zp2=1,this.rp0=this.rp1=this.rp2=0;case"prep":this.fv=this.pv=this.dpv=Te,this.round=Rr}}Ir.prototype.exec=function(e,t){if(typeof t!="number")throw new Error("Point size is not a number!");if(this._errorState>2)return;let n=this.font,s=this._prepState;if(!s||s.ppem!==t){let r=this._fpgmState;if(!r){Me.prototype=_i,r=this._fpgmState=new Me("fpgm",n.tables.fpgm),r.funcs=[],r.font=n,r.instructionCount=0,r.callDepth=0;try{_e(r)}catch(a){console.log("Hinting error in FPGM:"+a),this._errorState=3;return}}Me.prototype=r,s=this._prepState=new Me("prep",n.tables.prep),s.ppem=t,s.instructionCount=0,s.callDepth=0;let o=n.variation&&n.variation.process.getCvarTransform()||n.tables.cvt;if(o){let a=s.cvt=new Array(o.length),i=t/n.unitsPerEm;for(let l=0;l1))try{return Ur(e,s)}catch(r){this._errorState<1&&(console.log("Hinting error:"+r),console.log("Note: further hinting errors are silenced")),this._errorState=1;return}};Ur=function(e,t){let n=t.ppem/t.font.unitsPerEm,s=n,r=e.components,o,a,i;if(Me.prototype=t,!r)i=new Me("glyf",e.instructions),i.instructionCount=0,i.callDepth=0,$n(e,i,n,s),a=i.gZone;else{let l=t.font;a=[],o=[];for(let u=0;uur)throw new Error("Hinting instructions exceeded maximum of "+ur);if(s=Fr[t[e.ip]],!s)throw new Error("unknown instruction: 0x"+Number(t[e.ip]).toString(16));s(e)}};function mn(e){let t=e.tZone=new Array(e.gZone.length);for(let n=0;n=176&&o<=183)s+=o-176+1;else if(o>=184&&o<=191)s+=(o-184+1)*2;else if(t&&r===1&&o===27)break;while(r>0);e.ip=s}function fr(e,t){t.fv=t.pv=t.dpv=e}function pr(e,t){t.pv=t.dpv=e}function hr(e,t){t.fv=e}function dr(e,t){let n=t.stack,s=n.pop(),r=n.pop(),o=t.z2[s],a=t.z1[r],i,l;e?(i=o.y-a.y,l=a.x-o.x):(i=a.x-o.x,l=a.y-o.y),t.pv=t.dpv=mt(i,l)}function mr(e,t){let n=t.stack,s=n.pop(),r=n.pop(),o=t.z2[s],a=t.z1[r],i,l;e?(i=o.y-a.y,l=a.x-o.x):(i=a.x-o.x,l=a.y-o.y),t.fv=mt(i,l)}function zi(e){let t=e.stack,n=t.pop(),s=t.pop();e.pv=e.dpv=mt(s,n)}function ji(e){let t=e.stack,n=t.pop(),s=t.pop();e.fv=mt(s,n)}function Wi(e){let t=e.stack,n=e.pv;t.push(n.x*16384),t.push(n.y*16384)}function qi(e){let t=e.stack,n=e.fv;t.push(n.x*16384),t.push(n.y*16384)}function $i(e){e.fv=e.pv}function Xi(e){let t=e.stack,n=t.pop(),s=t.pop(),r=t.pop(),o=t.pop(),a=t.pop(),i=e.z0,l=e.z1,u=i[n],c=i[s],p=l[r],f=l[o],h=e.z2[a],m=u.x,d=u.y,y=c.x,T=c.y,O=p.x,I=p.y,E=f.x,D=f.y,P=(m-y)*(I-D)-(d-T)*(O-E),M=m*T-d*y,_=O*D-I*E;h.x=(M*(O-E)-_*(m-y))/P,h.y=(M*(I-D)-_*(d-T))/P}function Yi(e){e.rp0=e.stack.pop()}function Zi(e){e.rp1=e.stack.pop()}function Ki(e){e.rp2=e.stack.pop()}function Qi(e){let t=e.stack.pop();switch(e.zp0=t,t){case 0:e.tZone||mn(e),e.z0=e.tZone;break;case 1:e.z0=e.gZone;break;default:throw new Error("Invalid zone pointer")}}function Ji(e){let t=e.stack.pop();switch(e.zp1=t,t){case 0:e.tZone||mn(e),e.z1=e.tZone;break;case 1:e.z1=e.gZone;break;default:throw new Error("Invalid zone pointer")}}function el(e){let t=e.stack.pop();switch(e.zp2=t,t){case 0:e.tZone||mn(e),e.z2=e.tZone;break;case 1:e.z2=e.gZone;break;default:throw new Error("Invalid zone pointer")}}function tl(e){let t=e.stack.pop();switch(e.zp0=e.zp1=e.zp2=t,t){case 0:e.tZone||mn(e),e.z0=e.z1=e.z2=e.tZone;break;case 1:e.z0=e.z1=e.z2=e.gZone;break;default:throw new Error("Invalid zone pointer")}}function nl(e){e.loop=e.stack.pop(),e.loop>dn&&(e.loop=dn)}function sl(e){e.round=Rr}function rl(e){e.round=Gi}function ol(e){let t=e.stack.pop();e.minDis=t/64}function al(e){Lr(e,!1)}function il(e){let t=e.stack.pop();e.ip+=t-1}function ll(e){let t=e.stack.pop();e.cvCutIn=t/64}function cl(e){let t=e.stack;t.push(t[t.length-1])}function jn(e){e.stack.pop()}function ul(e){e.stack.length=0}function fl(e){let t=e.stack,n=t.pop(),s=t.pop();t.push(n),t.push(s)}function pl(e){let t=e.stack;t.push(t.length)}function hl(e){let t=e.stack,n=t.pop(),s=t.pop();if(s>dn&&(s=dn),++e.callDepth>hn)throw new Error("Hinting call depth exceeded maximum of "+hn);let r=e.ip,o=e.prog;e.prog=e.funcs[n];for(let a=0;ahn)throw new Error("Hinting call depth exceeded maximum of "+hn);let n=e.ip,s=e.prog;e.prog=e.funcs[t],_e(e),e.ip=n,e.prog=s,e.callDepth--}function ml(e){let t=e.stack,n=t.pop();t.push(t[t.length-n])}function gl(e){let t=e.stack,n=t.pop();t.push(t.splice(t.length-n,1)[0])}function yl(e){if(e.env!=="fpgm")throw new Error("FDEF not allowed here");let t=e.stack,n=e.prog,s=e.ip,r=t.pop(),o=s;for(;n[++s]!==45;);e.ip=s,e.funcs[r]=n.slice(o+1,s)}function gr(e,t){let n=t.stack.pop(),s=t.z0[n],r=t.fv,o=t.pv,a=o.distance(s,ht);e&&(a=t.round(a)),r.setRelative(s,ht,a,o),r.touch(s),t.rp0=t.rp1=n}function yr(e,t){let n=t.z2,s=n.length-2,r,o,a;for(let i=0;in?1:0)}function Dl(e){let t=e.stack,n=t.pop(),s=t.pop();t.push(s>=n?1:0)}function Al(e){let t=e.stack,n=t.pop(),s=t.pop();t.push(n===s?1:0)}function Pl(e){let t=e.stack,n=t.pop(),s=t.pop();t.push(n!==s?1:0)}function Ml(e){let t=e.stack,n=t.pop();t.push(Math.trunc(n)&1?1:0)}function Nl(e){let t=e.stack,n=t.pop();t.push(Math.trunc(n)&1?0:1)}function Bl(e){let t=e.stack.pop(),n;t||Lr(e,!0)}function Gl(e){}function Hl(e){let t=e.stack,n=t.pop(),s=t.pop();t.push(n&&s?1:0)}function Vl(e){let t=e.stack,n=t.pop(),s=t.pop();t.push(n||s?1:0)}function _l(e){let t=e.stack,n=t.pop();t.push(n?0:1)}function Wn(e,t){let n=t.stack,s=n.pop(),r=t.fv,o=t.pv,a=t.ppem,i=t.deltaBase+(e-1)*16,l=t.deltaShift,u=t.z0;for(let c=0;c>4)!==a)continue;let m=(f&15)-8;m>=0&&m++;let d=u[p];r.setRelative(d,d,m*l,o)}}function zl(e){let n=e.stack.pop();e.deltaBase=n}function jl(e){let n=e.stack.pop();e.deltaShift=Math.pow(.5,n)}function Wl(e){let t=e.stack,n=t.pop(),s=t.pop();t.push(s+n)}function ql(e){let t=e.stack,n=t.pop(),s=t.pop();t.push(s-n)}function $l(e){let t=e.stack,n=t.pop(),s=t.pop();t.push(s*64/n)}function Xl(e){let t=e.stack,n=t.pop(),s=t.pop();t.push(s*n/64)}function Yl(e){let t=e.stack,n=t.pop();t.push(Math.abs(n))}function Zl(e){let t=e.stack,n=t.pop();t.push(-n)}function Kl(e){let t=e.stack,n=t.pop();t.push(Math.floor(n/64)*64)}function Ql(e){let t=e.stack,n=t.pop();t.push(Math.ceil(n/64)*64)}function pn(e,t){let n=t.stack,s=n.pop();n.push(t.round(s/64)*64)}function Jl(e){let t=e.stack,n=t.pop(),s=t.pop();e.cvt[s]=n*e.ppem/e.font.unitsPerEm}function qn(e,t){let n=t.stack,s=n.pop(),r=t.ppem,o=t.deltaBase+(e-1)*16,a=t.deltaShift;for(let i=0;i>4)!==r)continue;let p=(u&15)-8;p>=0&&p++;let f=p*a;t.cvt[l]+=f}}function ec(e){let t=e.stack.pop();e.round=Er;let n;switch(t&192){case 0:n=.5;break;case 64:n=1;break;case 128:n=2;break;default:throw new Error("invalid SROUND value")}switch(e.srPeriod=n,t&48){case 0:e.srPhase=0;break;case 16:e.srPhase=.25*n;break;case 32:e.srPhase=.5*n;break;case 48:e.srPhase=.75*n;break;default:throw new Error("invalid SROUND value")}t&=15,t===0?e.srThreshold=0:e.srThreshold=(t/8-.5)*n}function tc(e){let t=e.stack.pop();e.round=Er;let n;switch(t&192){case 0:n=Math.sqrt(2)/2;break;case 64:n=Math.sqrt(2);break;case 128:n=2*Math.sqrt(2);break;default:throw new Error("invalid S45ROUND value")}switch(e.srPeriod=n,t&48){case 0:e.srPhase=0;break;case 16:e.srPhase=.25*n;break;case 32:e.srPhase=.5*n;break;case 48:e.srPhase=.75*n;break;default:throw new Error("invalid S45ROUND value")}t&=15,t===0?e.srThreshold=0:e.srThreshold=(t/8-.5)*n}function nc(e){e.round=Ni}function sc(e){e.round=Hi}function rc(e){e.round=Vi}function oc(e){let t=e.stack.pop()}function Cr(e,t){let n=t.stack,s=n.pop(),r=n.pop(),o=t.z2[s],a=t.z1[r],i,l;e?(i=o.y-a.y,l=a.x-o.x):(i=a.x-o.x,l=a.y-o.y),t.dpv=mt(i,l)}function ac(e){let t=e.stack,n=t.pop(),s=0;n&1&&(s=35),n&32&&(s|=4096),t.push(s)}function ic(e){let t=e.stack,n=t.pop(),s=t.pop(),r=t.pop();t.push(s),t.push(n),t.push(r)}function lc(e){let t=e.stack,n=t.pop(),s=t.pop();t.push(Math.max(s,n))}function cc(e){let t=e.stack,n=t.pop(),s=t.pop();t.push(Math.min(s,n))}function uc(e){let t=e.stack.pop()}function fc(e){let t=e.stack.pop(),n=e.stack.pop();switch(t){case 1:e.inhibitGridFit=!!n;return;case 2:e.ignoreCvt=!!n;return;default:throw new Error("invalid INSTCTRL[] selector")}}function Ae(e,t){let n=t.stack,s=t.prog,r=t.ip;for(let o=0;o=0?1:-1,y=Math.abs(y),e&&(O=o.cvt[i],s&&Math.abs(y-O)=0&&ethis[r[0]].apply(this,r.slice(1).concat(!0))),s=r=>typeof r=="object"&&Object.prototype.hasOwnProperty.call(r,"FAIL");if(n.every(s))return{FAIL:"composeRUD: one or more operations hasn't completed successfully",report:n.filter(s)};this.dispatch("composeRUD",[n.filter(r=>!s(r))])};G.prototype.replaceRange=function(e,t,n,s){t=t!==null?t:this.tokens.length;let r=n.every(o=>o instanceof Ke);if(!isNaN(e)&&this.inboundIndex(e)&&r){let o=this.tokens.splice.apply(this.tokens,[e,t].concat(n));return s||this.dispatch("replaceToken",[e,t,n]),[o,n]}else return{FAIL:"replaceRange: invalid tokens or startIndex."}};G.prototype.replaceToken=function(e,t,n){if(!isNaN(e)&&this.inboundIndex(e)&&t instanceof Ke){let s=this.tokens.splice(e,1,t);return n||this.dispatch("replaceToken",[e,t]),[s[0],t]}else return{FAIL:"replaceToken: invalid token or index."}};G.prototype.removeRange=function(e,t,n){t=isNaN(t)?this.tokens.length:t;let s=this.tokens.splice(e,t);return n||this.dispatch("removeRange",[s,e,t]),s};G.prototype.removeToken=function(e,t){if(!isNaN(e)&&this.inboundIndex(e)){let n=this.tokens.splice(e,1);return t||this.dispatch("removeToken",[n,e]),n}else return{FAIL:"removeToken: invalid token index."}};G.prototype.insertToken=function(e,t,n){return e.every(r=>r instanceof Ke)?(this.tokens.splice.apply(this.tokens,[t,0].concat(e)),n||this.dispatch("insertToken",[e,t]),e):{FAIL:"insertToken: invalid token(s)."}};G.prototype.registerModifier=function(e,t,n){this.events.newToken.subscribe(function(s,r){let o=[s,r],a=t===null||t.apply(this,o)===!0,i=[s,r];if(a){let l=n.apply(this,i);s.setState(e,l)}}),this.registeredModifiers.push(e)};gn.prototype.subscribe=function(e){return typeof e=="function"?this.subscribers.push(e)-1:{FAIL:`invalid '${this.eventId}' event handler`}};gn.prototype.unsubscribe=function(e){this.subscribers.splice(e,1)};B.prototype.setCurrentIndex=function(e){this.index=e,this.current=this.context[e],this.backtrack=this.context.slice(0,e),this.lookahead=this.context.slice(e+1)};B.prototype.get=function(e){switch(!0){case e===0:return this.current;case(e<0&&Math.abs(e)<=this.backtrack.length):return this.backtrack.slice(e)[0];case(e>0&&e<=this.lookahead.length):return this.lookahead[e-1];default:return null}};G.prototype.rangeToText=function(e){if(e instanceof Xn)return this.getRangeTokens(e).map(t=>t.char).join("")};G.prototype.getText=function(){return this.tokens.map(e=>e.char).join("")};G.prototype.getContext=function(e){let t=this.registeredContexts[e];return t||null};G.prototype.on=function(e,t){let n=this.events[e];return n?n.subscribe(t):null};G.prototype.dispatch=function(e,t){let n=this.events[e];if(n instanceof gn)for(let s=0;st.char);for(let t=0;t=r.start&&e<=r.end){let o=e-r.start;return r.index+o}}break}default:return-1}return-1}function dc(e,t){return Ne(e,t.coverage)===-1?null:e+t.deltaGlyphId}function mc(e,t){let n=Ne(e,t.coverage);return n===-1?null:t.substitute[n]}function Zn(e,t){let n=[];for(let s=0;s{let{lookupListIndex:p,sequenceIndex:f}=c,{subtables:h}=this.getLookupByIndex(p);for(let m of h)Ne(u[f],m.coverage)!==-1&&(u[f]=m.deltaGlyphId)};for(let u=0;us.features[r]),this.features[e]=t,this.mapTagsToFeatures(t,e),t};re.prototype.getSubstitutionType=function(e,t){let n=e.lookupType.toString(),s=t.substFormat.toString();return n+s};re.prototype.getLookupMethod=function(e,t){let n=this.getSubstitutionType(e,t);switch(n){case"11":return s=>dc.apply(this,[s,t]);case"12":return s=>mc.apply(this,[s,t]);case"63":return s=>gc.apply(this,[s,t]);case"41":return s=>yc.apply(this,[s,t]);case"21":return s=>vc.apply(this,[s,t]);case"51":return s=>xc.apply(this,[s,t]);case"53":return s=>bc.apply(this,[s,t]);default:throw new Error(`substitutionType : ${n} lookupType: ${e.lookupType} - substFormat: ${t.substFormat} is not yet supported`)}};re.prototype.lookupFeature=function(e){let t=e.contextParams,n=t.index,s=this.getFeature({tag:e.tag,script:e.script});if(!s)return new Error(`font '${(this.font.names.unicode||this.font.names.windows||this.font.names.macintosh).fullName.en}' doesn't support feature '${e.tag}' for script '${e.script}'.`);let r=this.getFeatureLookups(s),o=[].concat(t.context);for(let a=0;as.tag===e.tag);return t&&n};re.prototype.getLookupSubtables=function(e){return e.subtables||null};re.prototype.getLookupByIndex=function(e){return this.font.tables.gsub.lookups[e]||null};re.prototype.getFeatureLookups=function(e){return e.lookupListIndexes.map(this.getLookupByIndex.bind(this))};re.prototype.getFeature=function(t){if(!this.font)return{FAIL:"No font was found"};Object.prototype.hasOwnProperty.call(this.features,t.script)||this.getScriptFeatures(t.script);let n=this.features[t.script];return n?n.tags[t.tag]?this.features[t.script].tags[t.tag]:null:{FAIL:`No feature for script ${t.script}`}};var Pr=re;function Sc(e){let t=e.current,n=e.get(-1);return n===null&&ke(t)||!ke(n)&&ke(t)}function Tc(e){let t=e.get(1);return t===null||!ke(t)}var Mr={startCheck:Sc,endCheck:Tc};function kc(e){let t=e.current,n=e.get(-1);return(ke(t)||ge(t))&&!ke(n)}function Oc(e){let t=e.get(1);switch(!0){case t===null:return!0;case(!ke(t)&&!ge(t)):{let n=Ar(t);if(!n)return!0;if(n){let s=!1;if(s=e.lookahead.some(r=>ke(r)||ge(r)),!s)return!0}break}default:return!1}}var Nr={startCheck:kc,endCheck:Oc};function Cc(e,t,n){t[n].setState(e.tag,e.substitution)}function Fc(e,t,n){t[n].setState(e.tag,e.substitution)}function Kn(e,t,n){for(let s=0;s=0;n--){let s=t[n],r=Yn(s),o=ge(s);if(!r&&!o)return!0;if(r)return!1}return!1}function Ec(e){if(Yn(e.current))return!1;for(let t=0;ta.getState("glyphIndex")),0),o=new B(s.map(a=>a.char),0);for(let a=0;as.activeState.value);return new B(n,t||0)}function wc(e){let t="arab",n=this.tokenizer.getRangeTokens(e),s=Hr(n);for(let r=0;r1}function Ac(e){return e.index===e.context.length-1}var _r={startCheck:Dc,endCheck:Ac};function zr(e,t){let n=e.map(s=>s.activeState.value);return new B(n,t||0)}function Pc(e){let t="delf",n="ccmp",s=this.tokenizer.getRangeTokens(e),r=zr(s);for(let o=0;os.activeState.value);return new B(n,t||0)}function Bc(e){let t="latn",n=this.tokenizer.getRangeTokens(e),s=qr(n);for(let r=0;rs.activeState.value);return new B(n,t||0)}function Vc(e){let t="thai",n=this.tokenizer.getRangeTokens(e),s=Yr(n,0);for(let r=0;rs.activeState.value);return new B(n,t||0)}function _c(e){let t="thai",n=this.tokenizer.getRangeTokens(e),s=Kr(n,0);for(let r=0;rs.activeState.value);return new B(n,t||0)}function zc(e){let t="thai",n=this.tokenizer.getRangeTokens(e),s=Jr(n,0);for(let r=0;r=6155&&t<=6157||t>=65024&&t<=65039||t>=917760&&t<=917999}function jc(e){let t=e.current,n=e.get(1);return n===null&&Qn(t)||Qn(n)}function Wc(e){let t=e.get(1);return t===null||!Qn(t)}var to={startCheck:jc,endCheck:Wc};function qc(e){let t=this.query.font,n=this.tokenizer.getRangeTokens(e);if(n[1].setState("deleted",!0),t.tables.cmap&&t.tables.cmap.varSelectorList){let s=n[0].char.codePointAt(0),r=n[1].char.codePointAt(0),o=t.tables.cmap.varSelectorList[r];if(o!==void 0&&o.nonDefaultUVS){let a=o.nonDefaultUVS.uvsMappings;if(a[s]){let i=a[s].glyphID;t.glyphs.glyphs[i]!==void 0&&n[0].setState("glyphIndex",i)}}}}var no=qc;function le(e){this.baseDir=e||"ltr",this.tokenizer=new Dr,this.featuresTags={}}le.prototype.setText=function(e){this.text=e};le.prototype.contextChecks={ccmpReplacementCheck:_r,latinWordCheck:Wr,arabicWordCheck:Mr,arabicSentenceCheck:Nr,thaiWordCheck:Xr,unicodeVariationSequenceCheck:to};function Qe(e){let t=this.contextChecks[`${e}Check`];return this.tokenizer.registerContextChecker(e,t.startCheck,t.endCheck)}function $c(){return Qe.call(this,"ccmpReplacement"),Qe.call(this,"latinWord"),Qe.call(this,"arabicWord"),Qe.call(this,"arabicSentence"),Qe.call(this,"thaiWord"),Qe.call(this,"unicodeVariationSequence"),this.tokenizer.tokenize(this.text)}function Xc(){let e=this.tokenizer.getContextRanges("arabicSentence");for(let t=0;tthis.query.supports({script:e,tag:s}));Object.prototype.hasOwnProperty.call(this.featuresTags,e)?this.featuresTags[e]=this.featuresTags[e].concat(n):this.featuresTags[e]=n};le.prototype.applyFeatures=function(e,t){if(!e)throw new Error("No valid font was provided to apply features");this.query||(this.query=new Pr(e));for(let n=0;n0)throw new Error("When creating a new Font object, negative descender value is required.");this.names={},this.names.unicode=Jn(e),this.names.macintosh=Jn(e),this.names.windows=Jn(e),this.unitsPerEm=e.unitsPerEm||1e3,this.ascender=e.ascender,this.descender=e.descender,this.createdTimestamp=e.createdTimestamp,this.italicAngle=e.italicAngle||0,this.weightClass=e.weightClass||0;let t=0;e.fsSelection?t=e.fsSelection:(this.italicAngle<0?t|=this.fsSelectionValues.ITALIC:this.italicAngle>0&&(t|=this.fsSelectionValues.OBLIQUE),this.weightClass>=600&&(t|=this.fsSelectionValues.BOLD),t===0&&(t=this.fsSelectionValues.REGULAR)),(!e.panose||!Array.isArray(e.panose))&&(e.panose=[0,0,0,0,0,0,0,0,0]),this.tables=Object.assign(e.tables,{os2:Object.assign({usWeightClass:e.weightClass||this.usWeightClasses.MEDIUM,usWidthClass:e.widthClass||this.usWidthClasses.MEDIUM,bFamilyType:e.panose[0]||0,bSerifStyle:e.panose[1]||0,bWeight:e.panose[2]||0,bProportion:e.panose[3]||0,bContrast:e.panose[4]||0,bStrokeVariation:e.panose[5]||0,bArmStyle:e.panose[6]||0,bLetterform:e.panose[7]||0,bMidline:e.panose[8]||0,bXHeight:e.panose[9]||0,fsSelection:t},e.tables.os2)})}this.supported=!0,this.glyphs=new ne.GlyphSet(this,e.glyphs||[]),this.encoding=new In(this),this.position=new Js(this),this.substitution=new ar(this),this.tables=this.tables||{},this.tables=new Proxy(this.tables,{set:(t,n,s)=>(t[n]=s,t.fvar&&(t.gvar||t.cff2)&&!this.variation&&(this.variation=new fn(this)),!0)}),this.palettes=new Ze(this),this.layers=new on(this),this.svgImages=new an(this),this._push=null,this._hmtxTableData={},Object.defineProperty(this,"hinting",{get:function(){return this._hinting?this._hinting:this.outlinesFormat==="truetype"?this._hinting=new wr(this):null}})}A.prototype.hasChar=function(e){return this.encoding.charToGlyphIndex(e)>0};A.prototype.charToGlyphIndex=function(e){return this.encoding.charToGlyphIndex(e)};A.prototype.charToGlyph=function(e){let t=this.charToGlyphIndex(e),n=this.glyphs.get(t);return n||(n=this.glyphs.get(0)),n};A.prototype.updateFeatures=function(e){return this.defaultRenderOptions.features.map(t=>t.script==="latn"?{script:"latn",tags:t.tags.filter(n=>e[n])}:t)};A.prototype.stringToGlyphIndexes=function(e,t){let n=new so,s=o=>this.charToGlyphIndex(o.char);n.registerModifier("glyphIndex",null,s);let r=t?this.updateFeatures(t.features):this.defaultRenderOptions.features;return n.applyFeatures(this,r),n.getTextGlyphs(e)};A.prototype.stringToGlyphs=function(e,t){let n=this.stringToGlyphIndexes(e,t),s=n.length,r=new Array(s),o=this.glyphs.get(0);for(let a=0;a{let c=a.getPath(i,l,u,r,this);if(r.drawSVG||r.drawLayers){let p=c._layers;if(p&&p.length){for(let f=0;f0,"No English "+r+" specified.")}if(s("fontFamily"),s("weightName"),s("manufacturer"),s("copyright"),s("version"),n(this.unitsPerEm>0,"No unitsPerEm specified."),this.tables.colr){let r=this.tables.colr.baseGlyphRecords,o=-1;for(let a=0;ar[a].glyphID)break;o=i}}return e};A.prototype.toTables=function(){return Ys.fontToTable(this)};A.prototype.toBuffer=function(){return console.warn("Font.toBuffer is deprecated. Use Font.toArrayBuffer instead."),this.toArrayBuffer()};A.prototype.toArrayBuffer=function(){let t=this.toTables().encode(),n=new ArrayBuffer(t.length),s=new Uint8Array(n);for(let r=0;r=1.2&&(r.markGlyphSets=n.parsePointer(iu)),r}var ao={parse:lu};var ye=new Array(10);ye[1]=function(){let t=this.offset+this.relativeOffset,n=this.parseUShort();if(n===1)return{posFormat:1,coverage:this.parsePointer(g.coverage),value:this.parseValueRecord()};if(n===2)return{posFormat:2,coverage:this.parsePointer(g.coverage),values:this.parseValueRecordList()};v.assert(!1,"0x"+t.toString(16)+": GPOS lookup type 1 format must be 1 or 2.")};ye[2]=function(){let t=this.offset+this.relativeOffset,n=this.parseUShort();v.assert(n===1||n===2,"0x"+t.toString(16)+": GPOS lookup type 2 format must be 1 or 2.");let s=this.parsePointer(g.coverage),r=this.parseUShort(),o=this.parseUShort();if(n===1)return{posFormat:n,coverage:s,valueFormat1:r,valueFormat2:o,pairSets:this.parseList(g.pointer(g.list(function(){return{secondGlyph:this.parseUShort(),value1:this.parseValueRecord(r),value2:this.parseValueRecord(o)}})))};if(n===2){let a=this.parsePointer(g.classDef),i=this.parsePointer(g.classDef),l=this.parseUShort(),u=this.parseUShort();return{posFormat:n,coverage:s,valueFormat1:r,valueFormat2:o,classDef1:a,classDef2:i,class1Count:l,class2Count:u,classRecords:this.parseList(l,g.list(u,function(){return{value1:this.parseValueRecord(r),value2:this.parseValueRecord(o)}}))}}};ye[3]=function(){return{error:"GPOS Lookup 3 not supported"}};ye[4]=function(){return{error:"GPOS Lookup 4 not supported"}};ye[5]=function(){return{error:"GPOS Lookup 5 not supported"}};ye[6]=function(){return{error:"GPOS Lookup 6 not supported"}};ye[7]=function(){return{error:"GPOS Lookup 7 not supported"}};ye[8]=function(){return{error:"GPOS Lookup 8 not supported"}};ye[9]=function(){return{error:"GPOS Lookup 9 not supported"}};function cu(e,t){t=t||0;let n=new g(e,t),s=n.parseVersion(1);return v.argument(s===1||s===1.1,"Unsupported GPOS table version "+s),s===1?{version:s,scripts:n.parseScriptList(),features:n.parseFeatureList(),lookups:n.parseLookupList(ye)}:{version:s,scripts:n.parseScriptList(),features:n.parseFeatureList(),lookups:n.parseLookupList(ye),variations:n.parseFeatureVariationsList()}}var uu=new Array(10);function fu(e){return new x.Table("GPOS",[{name:"version",type:"ULONG",value:65536},{name:"scripts",type:"TABLE",value:new x.ScriptList(e.scripts)},{name:"features",type:"TABLE",value:new x.FeatureList(e.features)},{name:"lookups",type:"TABLE",value:new x.LookupList(e.lookups,uu)}])}var io={parse:cu,make:fu};function pu(e){let t={};e.skip("uShort");let n=e.parseUShort();v.argument(n===0,"Unsupported kern sub-table version."),e.skip("uShort",2);let s=e.parseUShort();e.skip("uShort",3);for(let r=0;r1&&console.warn("Only the first kern subtable is supported."),e.skip("uLong");let r=e.parseUShort()&255;if(e.skip("uShort"),r===0){let o=e.parseUShort();e.skip("uShort",3);for(let a=0;a + + + diff --git a/packages/console/app/public/press/anomaly/anomaly-mark.png b/packages/console/app/public/press/anomaly/anomaly-mark.png new file mode 100644 index 00000000000..9e681578620 Binary files /dev/null and b/packages/console/app/public/press/anomaly/anomaly-mark.png differ diff --git a/packages/console/app/public/press/anomaly/anomaly-mark.svg b/packages/console/app/public/press/anomaly/anomaly-mark.svg new file mode 100644 index 00000000000..b21a6e6eab0 --- /dev/null +++ b/packages/console/app/public/press/anomaly/anomaly-mark.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/console/app/public/press/anomaly/anomaly-wordmark-white.png b/packages/console/app/public/press/anomaly/anomaly-wordmark-white.png new file mode 100644 index 00000000000..c5e5e821d64 Binary files /dev/null and b/packages/console/app/public/press/anomaly/anomaly-wordmark-white.png differ diff --git a/packages/console/app/public/press/anomaly/anomaly-wordmark-white.svg b/packages/console/app/public/press/anomaly/anomaly-wordmark-white.svg new file mode 100644 index 00000000000..a91cae11563 --- /dev/null +++ b/packages/console/app/public/press/anomaly/anomaly-wordmark-white.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/packages/console/app/public/press/anomaly/anomaly-wordmark.png b/packages/console/app/public/press/anomaly/anomaly-wordmark.png new file mode 100644 index 00000000000..26ca9108c40 Binary files /dev/null and b/packages/console/app/public/press/anomaly/anomaly-wordmark.png differ diff --git a/packages/console/app/public/press/anomaly/anomaly-wordmark.svg b/packages/console/app/public/press/anomaly/anomaly-wordmark.svg new file mode 100644 index 00000000000..5d240265850 --- /dev/null +++ b/packages/console/app/public/press/anomaly/anomaly-wordmark.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/console/app/src/i18n/en.ts b/packages/console/app/src/i18n/en.ts index 76f785f72eb..0881681fa4e 100644 --- a/packages/console/app/src/i18n/en.ts +++ b/packages/console/app/src/i18n/en.ts @@ -665,9 +665,6 @@ export const dict = { "enterprise.form.inferenceSpend.over100k": "$100K or more", "enterprise.form.error.invalidInferenceSpend": "Select a valid inference spend range.", "enterprise.form.error.captcha": "Captcha verification failed. Please try again.", - // Still used by dev's old changelog page until its replacement lands in a later commit. - "changelog.empty": "No changelog entries found.", - "changelog.viewJson": "View JSON", } as const export type Key = keyof typeof dict diff --git a/packages/console/app/src/routes/brand/index.css b/packages/console/app/src/routes/brand/index.css index 7fc2e743e74..372b9cf7004 100644 --- a/packages/console/app/src/routes/brand/index.css +++ b/packages/console/app/src/routes/brand/index.css @@ -1,556 +1,1872 @@ -::selection { - background: var(--color-background-interactive); - color: var(--color-text-strong); +[data-page="brand"] { + /* Verdict colors for the don'ts. Both pass 4.5:1 on the page and on --bg-weak, light and dark. */ + --brand-dont: light-dark(hsl(4, 72%, 45%), hsl(4, 90%, 68%)); + --brand-do: light-dark(hsl(145, 60%, 28%), hsl(145, 50%, 58%)); + /* The "clay and slate" color fields of the Transparent backgrounds. Solid tiles take them in order, + so the sections rhyme. */ + --brand-light-1: #f3c4a6; + --brand-light-2: #c6d2e0; + --brand-light-3: #ead7c3; + --brand-light-4: #d9e2ea; + --brand-light-base: #f7f3ee; + --brand-dark-1: #9a3f1e; + --brand-dark-2: #334e6e; + --brand-dark-3: #5b3a29; + --brand-dark-base: #11151a; + /* Film grain over the blurred fields: greyscale noise, overlaid. */ + --brand-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='2.2' numOctaves='1' stitchTiles='stitch'/%3E%3CfeColorMatrix values='1.8 0 0 0 -0.4 1.8 0 0 0 -0.4 1.8 0 0 0 -0.4 0 0 0 0 0.5'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); - @media (prefers-color-scheme: dark) { - background: var(--color-background-interactive); - color: var(--color-text-inverted); - } -} - -[data-page="enterprise"], -[data-page="legal"] { - --color-background: hsl(0, 20%, 99%); - --color-background-weak: hsl(0, 8%, 97%); - --color-background-weak-hover: hsl(0, 8%, 94%); - --color-background-strong: hsl(0, 5%, 12%); - --color-background-strong-hover: hsl(0, 5%, 18%); - --color-background-interactive: hsl(62, 84%, 88%); - --color-background-interactive-weaker: hsl(64, 74%, 95%); - - --color-text: hsl(0, 1%, 39%); - --color-text-weak: hsl(0, 1%, 60%); - --color-text-weaker: hsl(30, 2%, 81%); - --color-text-strong: hsl(0, 5%, 12%); - --color-text-inverted: hsl(0, 20%, 99%); - --color-text-success: hsl(119, 100%, 35%); - - --color-border: hsl(30, 2%, 81%); - --color-border-weak: hsl(0, 1%, 85%); - - --color-icon: hsl(0, 1%, 55%); - --color-success: hsl(142, 76%, 36%); - - background: var(--color-background); - font-family: var(--font-mono); - color: var(--color-text); - padding-bottom: 5rem; - - @media (prefers-color-scheme: dark) { - --color-background: hsl(0, 9%, 7%); - --color-background-weak: hsl(0, 6%, 10%); - --color-background-weak-hover: hsl(0, 6%, 15%); - --color-background-strong: hsl(0, 15%, 94%); - --color-background-strong-hover: hsl(0, 15%, 97%); - --color-background-interactive: hsl(62, 100%, 90%); - --color-background-interactive-weaker: hsl(60, 20%, 8%); - - --color-text: hsl(0, 4%, 71%); - --color-text-weak: hsl(0, 2%, 49%); - --color-text-weaker: hsl(0, 3%, 28%); - --color-text-strong: hsl(0, 15%, 94%); - --color-text-inverted: hsl(0, 9%, 7%); - --color-text-success: hsl(119, 60%, 72%); - - --color-border: hsl(0, 3%, 28%); - --color-border-weak: hsl(0, 4%, 23%); - - --color-icon: hsl(10, 3%, 43%); - --color-success: hsl(142, 76%, 46%); - } - - /* Header and Footer styles - copied from index.css */ - [data-component="top"] { - padding: 24px 5rem; - height: 80px; - position: sticky; - top: 0; + [data-slot="hero-actions"] { display: flex; - justify-content: space-between; - align-items: center; - background: var(--color-background); - border-bottom: 1px solid var(--color-border-weak); - z-index: 10; + flex-wrap: wrap; + gap: 0.75rem; + } - @media (max-width: 60rem) { - padding: 24px 1.5rem; + /* Both labels share one cell, so the copy button keeps the width of the longer one. */ + [data-slot="copy-labels"] { + display: inline-grid; + + > span { + grid-area: 1 / 1; + visibility: hidden; } - img { - height: 34px; - width: auto; - } - - [data-component="nav-desktop"] { - ul { - display: flex; - justify-content: space-between; - align-items: center; - gap: 32px; - - @media (max-width: 55rem) { - gap: 24px; - } - - @media (max-width: 48rem) { - gap: 24px; - } - li { - display: inline-block; - a { - text-decoration: none; - span { - color: var(--color-text-weak); - } - } - a:hover { - text-decoration: underline; - text-underline-offset: 2px; - text-decoration-thickness: 1px; - } - [data-slot="cta-button"] { - background: var(--color-background-strong); - color: var(--color-text-inverted); - padding: 8px 16px 8px 10px; - border-radius: 4px; - font-weight: 500; - text-decoration: none; - display: flex; - align-items: center; - gap: 8px; - white-space: nowrap; - - @media (max-width: 55rem) { - display: none; - } - } - [data-slot="cta-button"]:hover { - background: var(--color-background-strong-hover); - text-decoration: none; - } - } - } - - @media (max-width: 40rem) { - display: none; - } - } - - [data-component="nav-mobile"] { - button > svg { - color: var(--color-icon); - } - } - - [data-component="nav-mobile-toggle"] { - border: none; - background: none; - outline: none; - height: 40px; - width: 40px; - cursor: pointer; - margin-right: -8px; - } - - [data-component="nav-mobile-toggle"]:hover { - background: var(--color-background-weak); - } - - [data-component="nav-mobile"] { - display: none; - - @media (max-width: 40rem) { - display: block; - - [data-component="nav-mobile-icon"] { - cursor: pointer; - height: 40px; - width: 40px; - display: flex; - align-items: center; - justify-content: center; - } - - [data-component="nav-mobile-menu-list"] { - position: fixed; - background: var(--color-background); - top: 80px; - left: 0; - right: 0; - height: 100vh; - - ul { - list-style: none; - padding: 20px 0; - - li { - a { - text-decoration: none; - padding: 20px; - display: block; - - span { - color: var(--color-text-weak); - } - } - - a:hover { - background: var(--color-background-weak); - } - } - } - } - } - } - - [data-slot="logo dark"] { - display: none; - } - - @media (prefers-color-scheme: dark) { - [data-slot="logo light"] { - display: none; - } - [data-slot="logo dark"] { - display: block; - } + > [data-active] { + visibility: visible; } } - [data-component="footer"] { - border-top: 1px solid var(--color-border-weak); - display: flex; - flex-direction: row; + [data-slot="sr-only"] { + position: absolute; + width: 1px; + height: 1px; + overflow: hidden; + clip-path: inset(50%); + white-space: nowrap; + } - @media (max-width: 65rem) { - border-bottom: 1px solid var(--color-border-weak); + /* Landscape preview tiles, 2:1 like every other preview on the page. Each tile keeps its own color scheme so light logos stay on light and dark on dark. */ + [data-component="brand-tiles"] { + display: grid; + grid-template-columns: repeat(2, minmax(0, 1fr)); + gap: 2rem var(--gutter); + + li { + display: flex; + flex-direction: column; + gap: 0.75rem; + min-width: 0; } - [data-slot="cell"] { - flex: 1; - text-align: center; + [data-slot="preview"] { + aspect-ratio: 2; + display: grid; + place-items: center; - a { - text-decoration: none; - padding: 2rem 0; - width: 100%; + /* Each tile keeps the background its files are made for, whatever the page's theme: fixed + colours, and "only" so a browser's automatic dark mode (Chrome's forced dark, which some device + previews turn on) can't darken the light tile or invert its artwork. */ + &[data-tone="light"] { + color-scheme: only light; + background: #f5f5f5; + } + + &[data-tone="dark"] { + color-scheme: only dark; + background: #0a0a0a; + box-shadow: inset 0 0 0 1px var(--border); + } + + img { display: block; - - span { - color: var(--color-text-weak); - - @media (max-width: 40rem) { - display: none; - } - } + max-width: 100%; } - a:hover { - background: var(--color-background-weak); - text-decoration: underline; - text-underline-offset: 2px; - text-decoration-thickness: 1px; + /* Whole-pixel steps: the logo at 48 × 60px (4:5, 12px stroke), the wordmark at 156 × 28px + (39 × 7 strokes of 4px). The square files pad the logo to 60 × 60px. */ + &[data-kind="logo"] img { + width: 48px; + height: 60px; + } + + &[data-kind="logo"][data-square] img { + width: 60px; + } + + &[data-kind="wordmark"] img { + width: 156px; + height: 28px; } } - [data-slot="cell"] + [data-slot="cell"] { - border-left: 1px solid var(--color-border-weak); - - @media (max-width: 40rem) { - border-left: none; - } + /* The caption above the thumbnail and the buttons under it: the meta row dissolves into the + tile's column, and the caption moves first. */ + [data-slot="meta"] { + display: contents; } - /* Mobile: third column on its own row */ - @media (max-width: 25rem) { + li > [data-slot="meta"] > [data-slot="name"] { + order: -1; + } + + /* The buttons at the inline end under the tile (the right, or the left in right-to-left text). */ + li > [data-slot="meta"] > :is([data-slot="actions"], [data-slot="badge-actions"]) { + align-self: end; + margin-inline-start: 0; + } + + /* The file name beside the PNG and SVG buttons: sans, at the row title's size ("Logo"), + in grey under the dark title. */ + [data-slot="name"] { + font-family: var(--font-sans); + font-size: var(--fs-small); + color: var(--text-weak); + } + + [data-slot="actions"] { + display: flex; flex-wrap: wrap; + gap: 0.5rem; + margin-inline-start: auto; + } - [data-slot="cell"] { - flex: 1 0 100%; - border-left: none; - border-top: 1px solid var(--color-border-weak); + [data-component="site-button"] { + padding: 0 0.75rem; + } + + [data-slot="note"] { + margin-inline-start: 0.375rem; + color: var(--text-weak); + } + + /* The app icons at 96px; the avatars cropped to a circle, the way profiles show them. */ + /* The light avatar on the dark tile and the dark one on the light tile, as a profile picture on + a UI of the other scheme. */ + [data-kind="avatar"] img { + width: 96px; + height: 96px; + } + + [data-kind="avatar"] img { + border-radius: 50%; + } + + [data-kind="badge"] img { + width: 200px; + height: 44px; + } + } + + /* Settings › Brand asset actions. Every style keeps the actions on the right of the asset's name. */ + [data-slot="actions"] { + /* Only the chosen style shows; every style is in the markup (see Actions in index.tsx). */ + /* Every asset's buttons sit at the inline end of their row (the right, or the left in right-to-left + text), in their order; a row that wraps keeps each line at that end too. */ + > [data-variant] { + display: none; + flex-wrap: wrap; + justify-content: flex-end; + align-items: center; + gap: 0.5rem; + } + + &[data-style="menu copy"] > [data-variant="menu copy"], + &[data-style="menu"] > [data-variant="menu"], + &[data-style="split"] > [data-variant="split"], + &[data-style="icons"] > [data-variant="icons"], + &[data-style="text links"] > [data-variant="text links"], + &[data-style="svg copy"] > [data-variant="svg copy"], + &[data-style="hover reveal"] > [data-variant="hover reveal"] { + display: flex; + } + + /* One "Download" button and a grey menu, as the site's other menus: a tint and a mid-grey bar on + hover and keyboard focus. */ + [data-slot="asset-menu"] { + position: relative; + + > [data-component="site-button"] { + gap: 0.375rem; + } + } + + /* As wide as its button and lined up with its left edge; a long label ends in "…". Rows as in + the logo menu (site.css), but OpenTUI Mono at 14px rather than its 12px (David found 12px too small); + 0.5rem × 0.875rem padding, 14px icons, the popover + background and shadow, and the grey menu states (a tint and a mid-grey bar on hover and + keyboard focus). */ + [data-slot="menu"] { + position: absolute; + top: calc(100% + 0.25rem); + inset-inline-start: 0; + z-index: 20; + display: flex; + flex-direction: column; + width: max-content; + min-width: 100%; + background: var(--popover-bg); + box-shadow: var(--popover-shadow); + font-family: var(--font-mono); + font-size: var(--fs-small); + color: var(--text-strong); + animation: settings-in 140ms var(--ease-out); + + > * { + position: relative; + display: flex; + align-items: center; + justify-content: space-between; + gap: 0.625rem; + min-width: 0; + padding: 0.5rem 0.875rem; + background: none; + font: inherit; + color: inherit; + text-align: start; + text-decoration: none; + white-space: nowrap; + cursor: pointer; + + svg { + flex-shrink: 0; + width: 14px; + height: 14px; + } + + &::before { + content: ""; + position: absolute; + top: 0; + bottom: 0; + inset-inline-start: -1px; + width: 2px; + background: var(--menu-hint); + opacity: 0; + } + + &:focus-visible { + outline: none; + background: var(--menu-hover); + + &::before { + opacity: 1; + } + } + + @media (hover: hover) and (pointer: fine) { + &:hover { + outline: none; + background: var(--menu-hover); + + &::before { + opacity: 1; + } + } + } + + &:active { + background: var(--menu-press); + } + } + } + + /* A part of the menu: a small grey title (or, untitled, just a hairline) above its items. */ + [data-slot="menu"] > [data-slot="menu-group"] { + padding: 0.625rem 0.875rem 0.25rem; + font-size: var(--fs-meta); + color: var(--text-weak); + cursor: default; + + &:not(:first-child) { + border-top: 1px solid var(--border); } - [data-slot="cell"]:nth-child(1) { - border-top: none; + &:empty { + padding: 0; + } + + &::before { + display: none; + } + + @media (hover: hover) and (pointer: fine) { + &:hover { + background: none; + } + } + + &:active { + background: none; + } + } + + > [data-variant="menu copy"] { + gap: 0.25rem; + } + + /* PNG, SVG and the copy square: tight, and kept to the right when they wrap under the caption. */ + [data-slot="meta"] > & { + margin-inline-start: auto; + } + + > [data-variant="svg copy"] { + gap: 0.25rem; + + > [data-component="site-button"] { + padding: 0 0.625rem; + } + } + + /* Menu + copy: a square copy icon next to Download, as tall as it. */ + [data-slot="copy-square"] { + justify-content: center; + width: 2.25rem; + padding: 0; + } + + [data-slot="item-label"] { + min-width: 0; + overflow: hidden; + text-overflow: ellipsis; + } + + /* Split: the main part downloads the PNG; the chevron opens the other formats. */ + > [data-variant="split"] { + gap: 1px; + } + + [data-slot="chevron-button"] { + padding: 0 0.5rem; + } + + /* Like the product cards' split button, the chevron fills blue while its menu is open. */ + [data-site]:is([data-button-hover="blue"], [data-button-hover="blue-ring"]) + & + > [data-variant="split"] + [data-slot="chevron-button"][aria-expanded="true"] { + background: var(--link); + color: #fff; + } + + /* Icons: square buttons, named by their tooltips and labels. */ + > [data-variant="icons"] [data-component="site-button"] { + justify-content: center; + width: 2.25rem; + padding: 0; + } + + /* Text links: no button chrome, underlined on hover. */ + [data-slot="links"] { + font-size: var(--fs-small); + color: var(--text-weak); + + :is(a, button) { + padding: 0; + background: none; + font: inherit; + color: var(--text); + text-decoration: underline; + text-decoration-color: transparent; + text-underline-offset: 0.2em; + cursor: pointer; + transition: + color 150ms ease, + text-decoration-color 150ms ease; + + @media (hover: hover) and (pointer: fine) { + &:hover { + color: var(--text-strong); + text-decoration-color: currentColor; + } + } + + &:active { + color: var(--text-strong); + text-decoration-color: currentColor; + } + + &:focus-visible { + color: var(--text-strong); + } + } + } + + /* Hover reveal: the buttons wait for the card to be hovered or focused; touch always shows them. */ + &[data-style="hover reveal"] { + opacity: 0; + transition: opacity 150ms ease; + + @media (hover: none), (pointer: coarse) { + opacity: 1; } } } - [data-component="container"] { - max-width: 67.5rem; - margin: 0 auto; - border: 1px solid var(--color-border-weak); - border-top: none; + li:focus-within [data-slot="actions"][data-style="hover reveal"] { + opacity: 1; + } - @media (max-width: 65rem) { - border: none; + @media (hover: hover) and (pointer: fine) { + li:hover [data-slot="actions"][data-style="hover reveal"] { + opacity: 1; } } - [data-component="content"] { + [data-slot="download-icon"] { + flex-shrink: 0; } - [data-component="brand-content"] { - padding: 4rem 5rem; - - h1 { - font-size: 1.5rem; - font-weight: 700; - color: var(--color-text-strong); - margin-bottom: 1rem; - } + [data-component="palette"] { + container-type: inline-size; + display: flex; + flex-direction: column; + gap: 1rem; h3 { - font-size: 1.25rem; - font-weight: 500; - color: var(--color-text-strong); - margin: 2rem 0 1rem 0; - } - - p { - line-height: 1.6; - margin-bottom: 2.5rem; - color: var(--color-text); - } - - [data-component="download-button"] { - padding: 8px 12px 8px 20px; - background: var(--color-background-strong); - color: var(--color-text-inverted); - border: none; - border-radius: 4px; - font-weight: 500; - cursor: pointer; - display: flex; - width: fit-content; - align-items: center; - gap: 12px; - transition: all 0.2s ease; - text-decoration: none; - - &:hover:not(:disabled) { - background: var(--color-background-strong-hover); - } - - &:active { - transform: scale(0.98); - } - - &:disabled { - opacity: 0.6; - cursor: not-allowed; - } - } - - [data-component="brand-grid"] { - display: grid; - grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); - gap: 2rem; - margin-top: 4rem; - margin-bottom: 2rem; - } - - [data-component="brand-grid"] img { - width: 100%; - height: auto; - display: block; - border-radius: 4px; - border: 1px solid var(--color-border-weak); - } - - [data-component="brand-grid"] > div { - position: relative; - } - - [data-component="actions"] { - position: absolute; - background: rgba(4, 0, 0, 0.08); - border-radius: 4px; - bottom: 0; - right: 0; - top: 0; - left: 0; - display: flex; - justify-content: center; - align-items: center; - gap: 16px; - opacity: 0; - - @media (max-width: 40rem) { - position: static; - opacity: 1; - background: none; - margin-top: 1rem; - justify-content: start; - } - } - - [data-component="brand-grid"] > div:hover [data-component="actions"], - [data-component="brand-grid"] > div:focus-within [data-component="actions"] { - opacity: 1; - - @media (max-width: 40rem) { - opacity: 1; - } - } - - [data-component="actions"] button { - padding: 6px 12px; - background: var(--color-background); - color: var(--color-text); - border: none; - border-radius: 4px; - font-weight: 500; - display: flex; - align-items: center; - gap: 12px; - transition: all 0.2s ease; - cursor: pointer; - box-shadow: - 0 0 0 1px rgba(19, 16, 16, 0.08), - 0 6px 8px -4px rgba(19, 16, 16, 0.12), - 0 4px 3px -2px rgba(19, 16, 16, 0.12), - 0 1px 2px -1px rgba(19, 16, 16, 0.12); - - @media (max-width: 40rem) { - box-shadow: 0 0 0 1px rgba(19, 16, 16, 0.16); - } - - &:hover { - background: var(--color-background); - } - - &:active { - transform: scale(0.98); - box-shadow: - 0 0 0 1px rgba(19, 16, 16, 0.08), - 0 6px 8px -8px rgba(19, 16, 16, 0.5); - } - } - - @media (max-width: 60rem) { - padding: 2rem 1.5rem; - } - } - - [data-component="faq"] { - border-top: 1px solid var(--color-border-weak); - padding: 4rem 5rem; - - @media (max-width: 60rem) { - padding: 2rem 1.5rem; - } - - [data-slot="section-title"] { - margin-bottom: 24px; - - h3 { - font-size: 16px; - font-weight: 500; - color: var(--color-text-strong); - margin-bottom: 12px; - } - - p { - margin-bottom: 12px; - color: var(--color-text); - } + font-size: var(--mono-size); + font-weight: 400; + color: var(--text-weak); } ul { - padding: 0; + display: grid; + grid-template-columns: repeat(3, minmax(0, 1fr)); + gap: var(--gutter); + } + + /* The swatch, the name and role, then HEX, RGB and OKLCH to copy. Rows start at the top, so + every column's swatch, name and values line up. */ + li { + display: grid; + grid-template-columns: minmax(0, 1fr); + align-content: start; + min-width: 0; + } + + /* The exact colour, which a browser's automatic dark mode must not alter. */ + [data-slot="swatch"] { + display: block; + height: 6rem; + margin-bottom: 0.75rem; + color-scheme: only light; + } + + [data-slot="title-row"] { + display: flex; + flex-direction: column; + gap: 0.25rem; + } + + [data-slot="name"] { + font-family: var(--font-mono); + font-size: var(--mono-size); + white-space: nowrap; + } + + /* Always two lines tall, so the value rows line up across the three swatches. */ + [data-slot="use"] { + min-height: calc(2lh); + font-size: var(--fs-small); + line-height: 1.4; + color: var(--text-weak); + } + + [data-slot="formats"] { + display: flex; + flex-direction: column; + margin-top: 0.75rem; + } + + /* A whole row copies its value, with a grey tint across it on hover as in the legal lists. The + hairline and tint run the swatch's full width; the label is inset as far as the copy icon. */ + [data-slot="format"] { + display: flex; + flex-wrap: wrap; + justify-content: space-between; + align-items: center; + gap: 0 0.75rem; + padding: 0.375rem 0.5rem; + background: none; + box-shadow: inset 0 1px 0 var(--border); + text-align: start; + cursor: pointer; + transition: background-color 150ms ease; + + @media (hover: hover) and (pointer: fine) { + &:hover { + background-color: var(--bg-weak); + } + } + + &:focus-visible { + outline: 2px solid var(--link); + outline-offset: -2px; + background-color: var(--bg-weak); + } + + &:active { + background-color: var(--bg-weaker); + } + } + + [data-slot="format-name"] { + font-family: var(--font-mono); + font-size: var(--fs-meta); + color: var(--text-weak); + } + + /* The value never breaks; if it can't fit beside its label it drops under it. */ + [data-slot="value"] { + display: inline-flex; + align-items: center; + gap: 0.375rem; + margin-inline-start: auto; + font-family: var(--font-mono); + font-size: var(--fs-small); + color: var(--text); + white-space: nowrap; + + svg { + flex-shrink: 0; + width: 14px; + height: 14px; + } + } + + /* Where a column would be narrower than about 240px: one colour per row. In the three columns the + big swatch stays on top, as a swatch beside the values would leave them too little room. */ + @container (max-width: 46rem) { + ul { + grid-template-columns: minmax(0, 1fr); + gap: 1.5rem; + } + + /* Two columns that every part shares: the name over a tall swatch on the left, the role over + the values on the right, so the role and the value rows start at one edge. The swatch is as + tall as the three value rows. */ + li { + grid-template-columns: 5.5rem minmax(0, 1fr); + grid-template-rows: auto auto; + gap: 0.5rem 1rem; + } + + [data-slot="title-row"] { + display: contents; + } + + [data-slot="name"] { + grid-column: 1; + grid-row: 1; + } + + [data-slot="use"] { + grid-column: 2; + grid-row: 1; + min-height: 0; + } + + /* The labels line up with the role above them again, as in this layout it isn't inset. */ + [data-slot="format"] { + padding-inline-start: 0; + } + + [data-slot="swatch"] { + grid-column: 1; + grid-row: 2; + align-self: stretch; + height: auto; + margin: 0; + } + + [data-slot="formats"] { + grid-column: 2; + grid-row: 2; + margin: 0; + } + } + + /* Phones: the name on its own line, the role under it across the full width, then the swatch + beside its values. */ + @container (max-width: 30rem) { + li { + grid-template-columns: 4rem minmax(0, 1fr); + grid-template-rows: auto auto auto; + row-gap: 0.25rem; + } + + [data-slot="name"] { + grid-column: 1 / -1; + } + + [data-slot="use"] { + grid-column: 1 / -1; + grid-row: 2; + margin-bottom: 0.5rem; + } + + [data-slot="swatch"], + [data-slot="formats"] { + grid-row: 3; + } + } + } + + [data-component="usage"] { + display: grid; + grid-template-columns: repeat(2, minmax(0, 1fr)); + gap: 2rem var(--gutter); + + li { + display: flex; + flex-direction: column; + gap: 0.375rem; + min-width: 0; + } + + :is(strong, h3, h4) { + font-family: var(--font-mono); + font-size: var(--mono-size); + font-weight: 400; + color: var(--text-strong); + } + + span { + color: var(--text-weak); + line-height: 1.4; + } + + [data-slot="figure"] { + aspect-ratio: 16 / 10; + display: grid; + place-items: center; + margin-bottom: 0.875rem; + background: var(--bg-weak); + } + + /* Every sub-section title has the same 48px above it: after a figure (its 0.875rem margin and the + item's 0.375rem gap, plus 28px), or at the top of a row (the list's 2rem row gap, plus 16px). */ + li > h3[id]:not(:first-child) { + margin-top: 28px; + } + + /* "Minimum sizes" spans the row above its two figures. */ + [data-slot="group-heading"] { + grid-column: 1 / -1; + margin-top: 16px; + margin-bottom: -1rem; + } + + /* Settings › Stroke diagram "off" (the default) hides the "One stroke" figure; the clear-space + text still says what a stroke is. */ + [data-slot="stroke"][data-hidden] { + display: none; + } + + :is([data-slot="clear-space"], [data-slot="stroke"]) { + grid-column: 1 / -1; + + [data-slot="figure"] { + aspect-ratio: auto; + padding: 2.5rem 1rem; + } + } + + /* The logo's clear space above the wordmark's, each centred: their drawings are symmetric about + the logo and the wordmark, so those sit on the figure's centre line (snapLogos keeps them on + whole pixels). */ + [data-slot="clear-space"] [data-slot="figure"] { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + gap: 2.5rem; + } + + /* Each minimum-size specimen stands alone at its real size: the artwork, its width marked under + it, then the size. The artwork sits on the bottom of a 24px row, so both specimens' marks and + labels line up. */ + [data-slot="minimum"] { + display: grid; + grid-template-rows: 24px auto auto; + justify-items: center; + row-gap: 0.5rem; + + svg { + display: block; + } + + > :first-child { + align-self: end; + } + } + + /* The measurement, as the other blue measurement labels on the page. */ + [data-slot="value"] { + font-family: var(--font-mono); + font-size: var(--fs-micro); + color: var(--link); + } + + [data-slot="dimension"] { + stroke: var(--link); + fill: none; + } + } + + /* Settings › Stroke diagram: what one stroke is. Only the chosen style shows. */ + [data-component="stroke-diagram"] { + > svg { + display: none; + max-width: 100%; + height: auto; + } + + &[data-style="highlight"] > [data-variant="highlight"], + &[data-style="ruler"] > [data-variant="ruler"], + &[data-style="zoom"] > [data-variant="zoom"], + &[data-style="tiles"] > [data-variant="tiles"], + &[data-style="animated"] > [data-variant="animated"] { + display: block; + } + + [data-slot="unit"] { + fill: color-mix(in srgb, var(--link) 12%, transparent); + stroke: var(--link); + + &[data-source] { + fill: light-dark( + color-mix(in srgb, var(--link) 70%, transparent), + color-mix(in srgb, var(--link) 45%, transparent) + ); + } + } + + [data-slot="band"] { + fill: color-mix(in srgb, var(--link) 30%, transparent); + } + + [data-slot="dimension"], + [data-slot="crop"] { + fill: none; + stroke: var(--link); + } + + [data-slot="extension"] { + fill: none; + stroke: color-mix(in srgb, var(--link) 45%, transparent); + } + + [data-slot="grid"] { + fill: none; + stroke: var(--border); + } + + [data-slot="tile"] { + fill: none; + stroke: var(--border-strong); + } + + [data-slot="space"] { + fill: none; + stroke: var(--border-strong); + stroke-dasharray: 4 4; + } + + text { + font-family: var(--font-mono); + font-size: var(--fs-micro); + fill: var(--link); + } + + [data-slot="note"] { + fill: var(--text-weak); + } + + /* Animated: the stroke lifts out of the logo, steps one stroke left into the clear space and + settles, then the clear space and its measurement appear. Steps, not tweens. Reduced motion + shows the end state. */ + [data-variant="animated"] { + [data-slot="lift"] { + transform-box: view-box; + } + + :is([data-slot="space"], [data-late]) { + opacity: 0; + } + } + + &[data-play] [data-variant="animated"] { + [data-slot="lift"] { + animation: stroke-step 1.8s steps(1, end) 0.3s both; + } + + :is([data-slot="space"], [data-late]) { + animation: stroke-late 1.8s steps(1, end) 0.3s both; + } + } + + @media (prefers-reduced-motion: reduce) { + [data-variant="animated"] { + [data-slot="lift"] { + animation: none !important; + translate: -24px 0; + } + + :is([data-slot="space"], [data-late]) { + animation: none !important; + opacity: 1; + } + } + } + } + + /* One blue layer: the stroke squares, leader and label in the measurement blue; the hatching, + guides and crop marks in lighter tints of it. */ + [data-component="clear-space"] { + display: block; + max-width: 100%; + height: auto; + + [data-slot="hatch"] { + stroke: color-mix(in srgb, var(--link) 28%, transparent); + stroke-width: 1; + } + + [data-slot="outline"] { + fill: none; + stroke: color-mix(in srgb, var(--link) 40%, transparent); + } + + [data-slot="crop"] { + fill: none; + stroke: color-mix(in srgb, var(--link) 55%, transparent); + } + + [data-slot="unit"] { + fill: color-mix(in srgb, var(--link) 22%, transparent); + stroke: var(--link); + + &[data-source] { + fill: light-dark( + color-mix(in srgb, var(--link) 70%, transparent), + color-mix(in srgb, var(--link) 40%, transparent) + ); + } + } + + [data-slot="leader"] { + fill: none; + stroke: var(--link); + } + + [data-slot="leader-dot"] { + fill: var(--link); + } + + text { + font-family: var(--font-mono); + font-size: var(--fs-micro); + fill: var(--link); + } + } + + [data-component="brand-variant"] { + display: flex; + flex-direction: column; + gap: 0.5rem; + + & + & { + margin-top: 3rem; + } + + h3 { + font-family: var(--font-mono); + font-size: var(--mono-size); + font-weight: 400; + } + + > p { + color: var(--text-weak); + line-height: 1.4; + margin-bottom: 0.75rem; + } + + [data-slot="row"] { + display: flex; + flex-direction: column; + gap: 0.75rem; + + & + & { + margin-top: 1.5rem; + } + } + + h4 { + font-size: var(--fs-small); + font-weight: 400; + color: var(--text-strong); + } + + [data-slot="preview"] { + &[data-variant="standard"][data-tone="light"] { + background: #f4f4f4; + } + + /* Photo-like multicolor backgrounds: wide, heavily blurred color fields (the last listed field + lies at the bottom) with film grain on top. */ + /* The picker's "Blur + grain": each field is a circle whose radius is a share of the tile's diagonal + (x 1.35 spread), written as an ellipse in a 2:1 tile. Only the grain blends; one mode per layer, + or the list repeats and overlays the color fields too. */ + &[data-variant="transparent"][data-tone="light"] { + background: + var(--brand-grain), radial-gradient(67.9% 135.8% at 30% 100%, var(--brand-light-4), transparent), + radial-gradient(87.5% 175% at 62% 92%, var(--brand-light-3), transparent), + radial-gradient(83% 166% at 82% 18%, var(--brand-light-2), transparent), + radial-gradient(78.5% 157% at 18% 28%, var(--brand-light-1), transparent), var(--brand-light-base); + background-blend-mode: overlay, normal, normal, normal, normal; + } + + &[data-variant="transparent"][data-tone="dark"] { + background: + var(--brand-grain), radial-gradient(90.5% 181% at 50% 105%, var(--brand-dark-3), transparent), + radial-gradient(83% 166% at 85% 30%, var(--brand-dark-2), transparent), + radial-gradient(75.5% 151% at 15% 25%, var(--brand-dark-1), transparent), var(--brand-dark-base); + background-blend-mode: overlay, normal, normal, normal; + } + + &[data-variant="solid"] { + box-shadow: none; + } + + &[data-variant="solid"][data-tone="light"][data-stop="0"] { + background: var(--brand-light-1); + } + + &[data-variant="solid"][data-tone="light"][data-stop="1"] { + background: var(--brand-light-2); + } + + &[data-variant="solid"][data-tone="dark"][data-stop="0"] { + background: var(--brand-dark-1); + } + + &[data-variant="solid"][data-tone="dark"][data-stop="1"] { + background: var(--brand-dark-2); + } + } + } + + /* Every card's buttons (assets, avatars, badges) share one size with /press: asset-buttons.css. */ + + /* Links in this page's own running text, the same as the site's inline links. */ + :is([data-slot="text"], [data-slot="prose"], [data-slot="note"]) a { + color: var(--inline-link-color, var(--text-strong)); + text-decoration: underline; + text-decoration-thickness: 1px; + text-underline-offset: 0.15em; + transition: color 150ms ease; + + @media (hover: hover) and (pointer: fine) { + &:hover { + color: var(--link); + } + } + + &:focus-visible, + &:active { + color: var(--link); + } + } + + :is([data-slot="prose"], [data-slot="note"]) { + line-height: 1.5; + color: var(--text-weak); + } + + /* Paragraphs that belong together keep the body's paragraph gap, not the section's. */ + [data-slot="paragraphs"] { + display: flex; + flex-direction: column; + gap: 0.75rem; + } + + /* Every section's intro: the site's body size and colour, not the larger lead. */ + [data-slot="text"] { + font-size: var(--body-size); + line-height: 1.5; + color: var(--text); + text-wrap: pretty; + } + + /* Inline names and commands: OpenTUI Mono on a grey chip. */ + code { + padding: 0.0625rem 0.3125rem; + background: var(--bg-weaker); + font-family: var(--font-mono); + font-size: calc(0.875em + 1px); + color: var(--text-strong); + box-decoration-break: clone; + } + + [data-component="brand-sub"] { + display: flex; + flex-direction: column; + gap: 0.5rem; + + h3 { + font-family: var(--font-mono); + font-size: var(--mono-size); + font-weight: 400; + color: var(--text-strong); + } + + > p { + margin-bottom: 0.75rem; + line-height: 1.4; + color: var(--text-weak); + } + + [data-slot="figure"] { + display: grid; + place-items: center; + padding: 2.5rem 1rem; + background: var(--bg-weak); + } + } + + /* Partner lockups: OpenCode × a partner in light and dark tiles. */ + [data-slot="lockups"] [data-slot="preview"] svg { + display: block; + max-width: 100%; + height: auto; + } + + /* Badges: a row per style, as the logo and wordmark sections, with a Light and a Dark card side by + side (one column where two would be too narrow). Settings › Badge font shows the Inter, OpenTUI Mono + or uppercase OpenTUI Mono files. */ + /* Straight after the description: its 12px margin and the 8px gap put the tabs about as far below + it as the cards sit below the tabs. */ + [data-component="badges"] { + container-type: inline-size; + + > [data-variant] { + display: none; + flex-direction: column; + gap: 1.5rem; + } + + &[data-style="sans"] > [data-variant="sans"], + &[data-style="mono"] > [data-variant="mono"], + &[data-style="mono caps"] > [data-variant="mono caps"] { + display: flex; + } + + /* Settings › Badge layout: only the chosen layout shows. */ + [data-slot="tabs-layout"], + [data-slot="rows-layout"] { + display: none; + flex-direction: column; + gap: 1.5rem; + } + + &[data-layout="tabs"] [data-slot="tabs-layout"], + &[data-layout="rows"] [data-slot="rows-layout"] { + display: flex; + } + + [data-slot="tabs-layout"] { + gap: clamp(0.75rem, 1.5vw, 1.25rem); + } + + /* The style tabs: plain text at the group title's size, the chosen style in ink and the others + muted (darker on hover); they wrap on narrow screens. */ + [data-slot="style-tabs"] { + position: relative; + display: flex; + flex-wrap: wrap; + gap: 0 1.25rem; + + button { + display: inline-flex; + align-items: center; + padding: 0.25rem 0; + background: none; + font-family: var(--font-mono); + font-size: var(--mono-size); + color: var(--text-weak); + cursor: pointer; + transition: color 150ms ease; + + &[aria-selected="true"] { + color: var(--text-strong); + } + + @media (hover: hover) and (pointer: fine) { + &:hover { + color: var(--text-strong); + } + } + + &:active { + color: var(--text-strong); + } + + &:focus-visible { + outline: 2px solid var(--link); + outline-offset: 2px; + } + } + } + + [data-slot="tab-indicator"] { + display: none; + } + + /* Settings › Badge tab style › underline: a 2px ink line under the chosen tab that slides to the + next one. */ + &[data-tab-style="underline"] [data-slot="tab-indicator"] { + position: absolute; + top: 0; + inset-inline-start: 0; + display: block; + width: 0; + height: 2px; + background: var(--text-strong); + transition: + transform 200ms var(--ease-out), + width 200ms var(--ease-out); + + @media (prefers-reduced-motion: reduce) { + transition: none; + } + } + + /* Settings › Badge tab style › square: a 6px ink square before the chosen tab's label, about the + x-height. Every tab keeps the square's space, so the labels never move. */ + &[data-tab-style="square"] [data-slot="style-tabs"] button { + &::before { + content: ""; + width: 6px; + height: 6px; + margin-inline-end: 0.5rem; + background: transparent; + transition: background-color 150ms ease; + } + + &[aria-selected="true"]::before { + background: var(--text-strong); + } + } + + [data-slot="row"] { + display: flex; + flex-direction: column; + gap: 0.75rem; + } + + h4 { + font-size: var(--fs-small); + font-weight: 400; + color: var(--text-strong); + } + + [data-slot="badge-grid"] { + display: grid; + grid-template-columns: minmax(0, 1fr); + gap: 1.5rem var(--gutter); li { - list-style: none; - margin-bottom: 24px; - line-height: 200%; - - @media (max-width: 60rem) { - line-height: 180%; - } + display: flex; + flex-direction: column; + gap: 0.75rem; + min-width: 0; } } - [data-slot="faq-question"] { + @container (min-width: 30rem) { + [data-slot="badge-grid"] { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } + } + + [data-slot="preview"] { + position: relative; + display: grid; + place-items: center; + aspect-ratio: 2; + + &[data-tone="light"] { + color-scheme: only light; + background: #f4f4f4; + --size-muted: #6b6b6b; + --size-strong: #1f1f1f; + } + + &[data-tone="dark"] { + color-scheme: only dark; + background: #0a0a0a; + box-shadow: inset 0 0 0 1px var(--border); + --size-muted: #8f8f8f; + --size-strong: #eeeeee; + } + + img { + display: block; + width: auto; + max-width: calc(100% - 1rem); + } + + /* Cells: the tiles step away from the badge's grey cells (#eeeeee, #1f1f1f) so the cell edges + and the gap between them read. */ + /* White, so a faint inset edge shows where the tile ends. */ + &[data-badge="c"][data-tone="light"] { + background: #ffffff; + box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.1); + } + + /* Sizes on #4f4f4f: #d0d0d0 is 5.3:1, white 8.2:1. */ + &[data-badge="c"][data-tone="dark"] { + background: #4f4f4f; + --size-muted: #d0d0d0; + --size-strong: #ffffff; + } + } + + /* The size switcher: plain mono text in the tile's top-left corner, shown while the tile is + hovered or holds focus, and always on touch screens. Muted sizes pass 4.5:1 on their tile. */ + [data-slot="sizes"] { + position: absolute; + top: 0.25rem; + inset-inline-start: 0.25rem; display: flex; - gap: 16px; - margin-bottom: 8px; - color: var(--color-text-strong); - font-weight: 500; - cursor: pointer; - background: none; - border: none; - padding: 0; + opacity: 0; + transition: opacity 150ms ease; - [data-slot="faq-icon-plus"] { - flex-shrink: 0; - color: var(--color-text-weak); - margin-top: 2px; + button { + padding: 0.25rem 0.375rem; + background: none; + font-family: var(--font-mono); + font-size: var(--fs-meta); + line-height: 1; + color: var(--size-muted); + cursor: pointer; - [data-closed] & { - display: block; + &[aria-pressed="true"] { + color: var(--size-strong); } - [data-expanded] & { - display: none; - } - } - [data-slot="faq-icon-minus"] { - flex-shrink: 0; - color: var(--color-text-weak); - margin-top: 2px; - [data-closed] & { - display: none; + @media (hover: hover) and (pointer: fine) { + &:hover { + color: var(--size-strong); + } } - [data-expanded] & { - display: block; + + &:active { + color: var(--size-strong); + } + + &:focus-visible { + outline: 1px solid var(--size-strong); + outline-offset: -1px; } - } - [data-slot="faq-question-text"] { - flex-grow: 1; - text-align: left; } } - [data-slot="faq-answer"] { - margin-left: 40px; - margin-bottom: 32px; - color: var(--color-text); + [data-slot="preview"]:focus-within [data-slot="sizes"] { + opacity: 1; + } + + @media (hover: hover) and (pointer: fine) { + [data-slot="preview"]:hover [data-slot="sizes"] { + opacity: 1; + } + } + + [data-slot="preview"]:active [data-slot="sizes"] { + opacity: 1; + } + + /* Touch: always shown, set further in from the corner and lower, and each size a real 44px tall + target (the whole box, inside the tile) with 8px between neighbours. */ + @media (hover: none), (pointer: coarse) { + [data-slot="sizes"] { + top: 0; + inset-inline-start: 0.75rem; + gap: 0.5rem; + opacity: 1; + + button { + display: inline-flex; + align-items: center; + min-width: 44px; + min-height: 44px; + padding: 0 0.625rem; + } + } + } + + [data-slot="meta"] { + display: flex; + flex-wrap: wrap; + align-items: center; + justify-content: space-between; + gap: 0.5rem; + } + + [data-slot="name"] { + font-family: var(--font-sans); + font-size: var(--fs-small); + color: var(--text-weak); + } + + [data-slot="badge-actions"] { + display: flex; + flex-wrap: wrap; + justify-content: flex-end; + gap: 0.25rem; + margin-inline-start: auto; + + > [data-component="site-button"] { + gap: 0.375rem; + } } } - [data-component="legal"] { - color: var(--color-text-weak); - text-align: center; - padding: 2rem 5rem; - display: flex; - gap: 32px; - justify-content: center; + [data-component="partner-lockup"] { + display: block; + max-width: 100%; + height: auto; - @media (max-width: 60rem) { - padding: 2rem 1.5rem; - } - - a { - color: var(--color-text-weak); - text-decoration: none; - } - - a:hover { - color: var(--color-text); - text-decoration: underline; + /* The ×: two 1.5px lines in the logo's inner shade (#d2d2d2 on the light tile, #4b4b4b on the + dark). */ + [data-slot="times"] { + fill: none; + stroke: var(--logo-inner); + stroke-width: 1.5; } } - a { - color: var(--color-text-strong); - text-decoration: underline; - text-underline-offset: 2px; - text-decoration-thickness: 1px; + [data-slot="defs"] { + position: absolute; + } - &:hover { - text-decoration-thickness: 2px; + [data-component="brand-dont-grid"] { + display: grid; + grid-template-columns: repeat(2, minmax(0, 1fr)); + gap: 1.5rem var(--gutter); + + [data-slot="preview"] { + position: relative; + aspect-ratio: 2; + display: grid; + place-items: center; + background: var(--bg-weak); + + > svg[data-slot="mark"] { + width: 48px; + height: 60px; + } + + > svg[data-slot="wordmark"] { + width: 156px; + height: 28px; + } + + &[data-example="low-contrast"] { + background: #b0b0b0; + } + + &[data-example="color"] { + background: var(--brand-dark-2); + } + + /* 140% wide. */ + &[data-example="stretch"] svg { + transform: scaleX(1.4); + } + + &[data-example="shadow"] svg { + filter: drop-shadow(4px 6px 3px light-dark(rgb(0 0 0 / 0.5), rgb(255 255 255 / 0.35))); + } + + &[data-example="glow"] svg { + filter: drop-shadow(0 0 1px #22d3ee) drop-shadow(0 0 8px #22d3ee); + } + } + + [data-slot="lockup"] { + display: flex; + align-items: center; + gap: 0.75rem; + + svg { + display: block; + width: 32px; + height: 40px; + } + + span { + font-family: var(--font-sans); + font-size: 1.75rem; + font-weight: 600; + letter-spacing: -0.02em; + color: var(--logo-code); + } + } + } + + /* Shared by the don'ts and the whole-pixel Do and Don't figures. */ + :is([data-component="brand-dont-grid"], [data-component="brand-pixels"]) { + figure { + display: flex; + flex-direction: column; + gap: 0.75rem; + min-width: 0; + margin: 0; + } + + /* The verdict, then the caption on the same line; a long caption wraps under itself, not under the verdict. */ + /* One sentence that starts with "Do" or "Do not": it wraps under its first word, not beside it. */ + figcaption { + color: var(--text-weak); + line-height: 1.4; + } + + /* "Do" and "Do not" read as the start of the rule: same face and size, only the colour differs. */ + [data-slot="verdict"] { + font: inherit; + } + + [data-verdict="dont"] [data-slot="verdict"] { + color: var(--brand-dont); + } + + [data-verdict="do"] [data-slot="verdict"] { + color: var(--brand-do); + } + } + + [data-component="brand-pixels"] { + display: grid; + grid-template-columns: repeat(2, minmax(0, 1fr)); + gap: 1.5rem var(--gutter); + margin-bottom: 0.875rem; + + [data-slot="preview"] { + display: grid; + place-items: center; + padding: 1.5rem 0; + background: var(--bg-weak); + } + + /* The grid at the largest whole-pixel cell that fits its figure: 16px cells need 340px, 12px + cells 268px, 8px cells 196px. */ + [data-slot="preview"] { + container-type: inline-size; + } + + :is([data-cell="12"], [data-cell="8"]) { + display: none; + } + + @container (max-width: 339px) { + [data-cell="16"] { + display: none; + } + + [data-cell="12"] { + display: block; + } + } + + @container (max-width: 267px) { + [data-cell="12"] { + display: none; + } + + [data-cell="8"] { + display: block; + } + } + } + + [data-component="pixel-grid"] { + display: block; + + [data-slot="grid"] { + fill: none; + stroke: var(--border); + } + + [data-slot="dimension"] { + fill: none; + stroke: var(--link); + } + + text { + font-family: var(--font-mono); + font-size: var(--fs-micro); + fill: var(--link); + } + } + + [data-component="usage"] [data-slot="pixels"] { + grid-column: 1 / -1; + + /* The logo and wordmark size tables each take half the width, filling the row. */ + [data-slot="sizes"] { + display: grid; + grid-template-columns: repeat(2, minmax(0, 1fr)); + align-items: start; + gap: 0.75rem var(--gutter, 2rem); + /* With the list's 0.375rem gap, 20px after the text, as between other sub-sections' text and + their figures. */ + margin-top: 0.875rem; + } + + table { + width: 100%; + border-collapse: collapse; + font-family: var(--font-mono); + font-size: var(--fs-small); + font-variant-numeric: tabular-nums; + } + + th { + font-weight: 400; + text-align: start; + color: var(--text-strong); + } + + td { + color: var(--text-weak); + } + + :is(th, td) { + padding-block: 0.25rem; + padding-inline: 0 2rem; + border-bottom: 1px solid var(--border); + } + } + + @media (max-width: 40rem) { + [data-component="brand-dont-grid"], + [data-component="brand-pixels"], + [data-component="brand-tiles"] { + grid-template-columns: minmax(0, 1fr); + } + + [data-component="usage"] { + grid-template-columns: minmax(0, 1fr); + } + } + + /* The logo and wordmark size tables need about 396px in two equal columns (the wider one is 190px), + and the two-across rule outranks the phone rule above, so under 448px they stack (at 320px they + overlapped by 10px and "Stroke" was cut off; at 410px the second ran 17px past the row). */ + @media (max-width: 28rem) { + [data-component="usage"] [data-slot="pixels"] [data-slot="sizes"] { + grid-template-columns: minmax(0, 1fr); } } } + +/* Brand only: a tighter gap under each section title (12px; 14px on phones, keeping their +2px), so the + title groups with its text while the 72px above it stays clearly larger. The shared 24px + (on-this-page.css) stays for Press, legal and the product pages. */ +[data-site][data-page="brand"] { + --heading-gap: 12px; + + @media (max-width: 40rem) { + --heading-gap: 14px; + } +} + +/* Scrolling (set by the page for 150ms after each scroll): hover states wait, so rows and tiles don't + light up one by one as they pass under a resting pointer. Pointers that hover only: on touch it + would swallow a tap made just after a scroll stops. */ +@media (hover: hover) and (pointer: fine) { + html[data-scrolling] [data-page="brand"] [data-component="content"] { + pointer-events: none; + } +} + +/* Settings › Brand colours › blue + clay: the Default and Simple fields in on-brand blues (the + Simple tiles still take the first two light and dark fields, in order). The slate and clay + defaults above stay for "clay + slate". */ +[data-page="brand"] [data-palette="blue"] { + --brand-light-1: #b9caff; + --brand-light-2: #d5e0ff; + --brand-light-3: #c7d3f4; + --brand-light-4: #e4ebff; + --brand-light-base: #f3f6ff; + --brand-dark-1: #2c4bd6; + --brand-dark-2: #142a6b; + --brand-dark-3: #1d3aa6; + --brand-dark-base: #070b1a; +} + +/* Settings › Variant background: what sits behind the Default (transparent) tiles (default "mesh"). + "flat" keeps the faint blurred fields above; the others build on the same palette fields, CSS only. The logo stays + centred on whole pixels above them. */ +[data-page="brand"] [data-variant-background] [data-slot="preview"][data-variant="transparent"] { + position: relative; + isolation: isolate; + + > img { + position: relative; + } +} + +/* Two close tints of the blue: a soft diagonal with a lighter glow in one corner. */ +[data-page="brand"] [data-variant-background="gradient"] [data-slot="preview"][data-variant="transparent"] { + &[data-tone="light"] { + background: + radial-gradient(90% 120% at 15% 10%, var(--brand-light-4), transparent 70%), + linear-gradient(150deg, var(--brand-light-2), var(--brand-light-1)); + background-blend-mode: normal; + } + + &[data-tone="dark"] { + background: + radial-gradient(90% 120% at 85% 10%, var(--brand-dark-3), transparent 70%), + linear-gradient(150deg, var(--brand-dark-1), var(--brand-dark-2)); + background-blend-mode: normal; + } +} + +/* A plain fill under strong film grain, like a photo of a coloured wall. */ +[data-page="brand"] [data-variant-background="grain"] [data-slot="preview"][data-variant="transparent"] { + &[data-tone="light"] { + background: + var(--brand-grain) 0 0 / 120px, + var(--brand-light-1); + background-blend-mode: overlay, normal; + } + + &[data-tone="dark"] { + background: + var(--brand-grain) 0 0 / 120px, + var(--brand-dark-1); + background-blend-mode: soft-light, normal; + } +} + +/* Soft out-of-focus shapes: a bright highlight, a deeper shadow and two mid tones, then grain. */ +[data-page="brand"] [data-variant-background="photo-like"] [data-slot="preview"][data-variant="transparent"] { + &[data-tone="light"] { + background: + var(--brand-grain), radial-gradient(30% 55% at 78% 30%, rgb(255 255 255 / 0.9), transparent), + radial-gradient(45% 80% at 22% 85%, color-mix(in oklab, var(--brand-dark-1) 45%, transparent), transparent), + radial-gradient(55% 100% at 18% 15%, var(--brand-light-1), transparent), + radial-gradient(60% 110% at 90% 95%, var(--brand-light-3), transparent), var(--brand-light-2); + background-blend-mode: overlay, normal, normal, normal, normal, normal; + } + + &[data-tone="dark"] { + background: + var(--brand-grain), + radial-gradient(28% 50% at 75% 28%, color-mix(in oklab, var(--brand-dark-1), white 35%), transparent), + radial-gradient(50% 90% at 20% 20%, var(--brand-dark-1), transparent), + radial-gradient(55% 100% at 85% 100%, var(--brand-dark-3), transparent), + radial-gradient(40% 70% at 10% 95%, var(--brand-dark-base), transparent), var(--brand-dark-2); + background-blend-mode: overlay, normal, normal, normal, normal, normal; + } +} + +/* A gradient with a 2px pixel checker that fades across it, in the site's pixel style. The 4px + tile keeps every square on whole pixels at 1× and 2×. */ +[data-page="brand"] [data-variant-background="dither"] [data-slot="preview"][data-variant="transparent"] { + &[data-tone="light"] { + background-blend-mode: normal; + background: linear-gradient(90deg, var(--brand-light-1), var(--brand-light-4)); + --dither: color-mix(in oklab, var(--brand-dark-1) 22%, transparent); + } + + &[data-tone="dark"] { + background-blend-mode: normal; + background: linear-gradient(90deg, var(--brand-dark-1), var(--brand-dark-2)); + --dither: rgb(255 255 255 / 0.12); + } + + &::before { + content: ""; + position: absolute; + inset: 0; + background: repeating-conic-gradient(var(--dither) 0 25%, transparent 0 50%) 0 0 / 4px 4px; + mask-image: linear-gradient(90deg, transparent 15%, #000); + } +} + +/* Faint 24px module lines over a fill, as on the font page: a 24px SVG tile with a 1px line on its + top and left edge, so both directions land on whole pixels. */ +[data-page="brand"] [data-variant-background="grid"] [data-slot="preview"][data-variant="transparent"] { + &[data-tone="light"] { + background: + url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' shape-rendering='crispEdges'%3E%3Cpath d='M0 0h24v1H1v23H0z' fill='%232c4bd6' fill-opacity='.16'/%3E%3C/svg%3E") + 0 0 / 24px 24px, + var(--brand-light-2); + background-blend-mode: normal; + } + + &[data-tone="dark"] { + background: + url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' shape-rendering='crispEdges'%3E%3Cpath d='M0 0h24v1H1v23H0z' fill='%23fff' fill-opacity='.1'/%3E%3C/svg%3E") + 0 0 / 24px 24px, + var(--brand-dark-2); + background-blend-mode: normal; + } +} + +/* Mesh (default): soft colour from each corner and a lighter centre, like a mesh gradient. No + texture, so the logo's see-through shade reads as a clean tint of whatever is behind it. */ +[data-page="brand"] [data-variant-background="mesh"] [data-slot="preview"][data-variant="transparent"] { + &[data-tone="light"] { + background: + radial-gradient(60% 90% at 50% 50%, var(--brand-light-base), transparent), + radial-gradient(70% 120% at 0% 0%, var(--brand-light-1), transparent), + radial-gradient(70% 120% at 100% 0%, var(--brand-light-4), transparent), + radial-gradient(70% 120% at 100% 100%, var(--brand-light-3), transparent), + radial-gradient( + 70% 120% at 0% 100%, + color-mix(in oklab, var(--brand-light-1), var(--brand-dark-1) 20%), + transparent + ), + var(--brand-light-2); + background-blend-mode: normal; + } + + &[data-tone="dark"] { + background: + radial-gradient(60% 90% at 50% 50%, color-mix(in oklab, var(--brand-dark-1), var(--brand-dark-2)), transparent), + radial-gradient(70% 120% at 0% 0%, var(--brand-dark-1), transparent), + radial-gradient(70% 120% at 100% 0%, var(--brand-dark-3), transparent), + radial-gradient(70% 120% at 100% 100%, var(--brand-dark-base), transparent), + radial-gradient(70% 120% at 0% 100%, var(--brand-dark-2), transparent), var(--brand-dark-2); + background-blend-mode: normal; + } +} + +/* Aurora: soft diagonal bands of the palette blues. */ +[data-page="brand"] [data-variant-background="aurora"] [data-slot="preview"][data-variant="transparent"] { + &[data-tone="light"] { + background: linear-gradient( + 115deg, + var(--brand-light-2) 0%, + var(--brand-light-1) 28%, + var(--brand-light-base) 48%, + var(--brand-light-3) 68%, + var(--brand-light-1) 100% + ); + background-blend-mode: normal; + } + + &[data-tone="dark"] { + background: linear-gradient( + 115deg, + var(--brand-dark-2) 0%, + var(--brand-dark-1) 30%, + var(--brand-dark-base) 50%, + var(--brand-dark-3) 72%, + var(--brand-dark-2) 100% + ); + background-blend-mode: normal; + } +} + +/* Spotlight: one soft light from the top left, darker towards the far edges. */ +[data-page="brand"] [data-variant-background="spotlight"] [data-slot="preview"][data-variant="transparent"] { + &[data-tone="light"] { + background: radial-gradient( + 90% 160% at 15% 0%, + var(--brand-light-base), + var(--brand-light-1) 55%, + color-mix(in oklab, var(--brand-light-1), var(--brand-dark-1) 25%) 100% + ); + background-blend-mode: normal; + } + + &[data-tone="dark"] { + background: radial-gradient( + 90% 160% at 15% 0%, + color-mix(in oklab, var(--brand-dark-1), white 15%), + var(--brand-dark-1) 40%, + var(--brand-dark-base) 100% + ); + background-blend-mode: normal; + } +} + +/* Halftone: 1.5px dots on a 6px grid that fade in across a soft gradient. */ +[data-page="brand"] [data-variant-background="halftone"] [data-slot="preview"][data-variant="transparent"] { + &[data-tone="light"] { + background: linear-gradient(90deg, var(--brand-light-4), var(--brand-light-1)); + background-blend-mode: normal; + --dot: color-mix(in oklab, var(--brand-dark-1) 45%, transparent); + } + + &[data-tone="dark"] { + background: linear-gradient(90deg, var(--brand-dark-2), var(--brand-dark-1)); + background-blend-mode: normal; + --dot: color-mix(in oklab, var(--brand-light-1) 35%, transparent); + } + + &::before { + content: ""; + position: absolute; + inset: 0; + background: radial-gradient(circle, var(--dot) 0.75px, transparent 1.25px) 0 0 / 6px 6px; + mask-image: linear-gradient(90deg, transparent 10%, #000 90%); + } +} + +/* Isometric: faint 2:1 pixel-art isometric lines from a 32 × 16px SVG tile, stepped on whole pixels. */ +[data-page="brand"] [data-variant-background="isometric"] [data-slot="preview"][data-variant="transparent"] { + &[data-tone="light"] { + background: + url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='16' shape-rendering='crispEdges'%3E%3Cpath d='M0 8L16 0L32 8L16 16Z' fill='none' stroke='%232c4bd6' stroke-opacity='.18'/%3E%3C/svg%3E") + 0 0 / 32px 16px, + linear-gradient(160deg, var(--brand-light-4), var(--brand-light-2)); + background-blend-mode: normal; + } + + &[data-tone="dark"] { + background: + url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='16' shape-rendering='crispEdges'%3E%3Cpath d='M0 8L16 0L32 8L16 16Z' fill='none' stroke='%23fff' stroke-opacity='.1'/%3E%3C/svg%3E") + 0 0 / 32px 16px, + linear-gradient(160deg, var(--brand-dark-1), var(--brand-dark-2)); + background-blend-mode: normal; + } +} + +@keyframes stroke-step { + 0% { + translate: 0 0; + } + 25% { + translate: 0 -8px; + } + 50% { + translate: -24px -8px; + } + 75%, + 100% { + translate: -24px 0; + } +} + +@keyframes stroke-late { + 0%, + 74% { + opacity: 0; + } + 75%, + 100% { + opacity: 1; + } +} + +/* The hero's subtitle spans the content column, like the sections under it. */ +[data-site][data-page="brand"] [data-component="hero"] p { + max-width: none; +} diff --git a/packages/console/app/src/routes/brand/index.tsx b/packages/console/app/src/routes/brand/index.tsx index 145ca1aa3e3..909f62c2096 100644 --- a/packages/console/app/src/routes/brand/index.tsx +++ b/packages/console/app/src/routes/brand/index.tsx @@ -1,317 +1,1850 @@ +import { Marked } from "~/component/site/marked" +import { onCloseMenus } from "~/component/site/menu-open" import "./index.css" import { Title, Meta } from "@solidjs/meta" -import { Header } from "~/component/header" -import { Footer } from "~/component/footer" -import { Legal } from "~/component/legal" -import { useI18n } from "~/context/i18n" +import { + createEffect, + createMemo, + createSignal, + For, + Match, + on, + onCleanup, + onMount, + Show, + Switch, + type JSX, +} from "solid-js" import { LocaleLinks } from "~/component/locale-links" -import { SocialMeta } from "~/component/social-meta" -import previewLogoLight from "../../asset/brand/preview-opencode-logo-light.png" -import previewLogoDark from "../../asset/brand/preview-opencode-logo-dark.png" -import previewLogoLightSquare from "../../asset/brand/preview-opencode-logo-light-square.png" -import previewLogoDarkSquare from "../../asset/brand/preview-opencode-logo-dark-square.png" -import previewWordmarkLight from "../../asset/brand/preview-opencode-wordmark-light.png" -import previewWordmarkDark from "../../asset/brand/preview-opencode-wordmark-dark.png" -import previewWordmarkSimpleLight from "../../asset/brand/preview-opencode-wordmark-simple-light.png" -import previewWordmarkSimpleDark from "../../asset/brand/preview-opencode-wordmark-simple-dark.png" -import logoLightPng from "../../asset/brand/opencode-logo-light.png" -import logoDarkPng from "../../asset/brand/opencode-logo-dark.png" -import logoLightSquarePng from "../../asset/brand/opencode-logo-light-square.png" -import logoDarkSquarePng from "../../asset/brand/opencode-logo-dark-square.png" -import wordmarkLightPng from "../../asset/brand/opencode-wordmark-light.png" -import wordmarkDarkPng from "../../asset/brand/opencode-wordmark-dark.png" -import wordmarkSimpleLightPng from "../../asset/brand/opencode-wordmark-simple-light.png" -import wordmarkSimpleDarkPng from "../../asset/brand/opencode-wordmark-simple-dark.png" -import logoLightSvg from "../../asset/brand/opencode-logo-light.svg" -import logoDarkSvg from "../../asset/brand/opencode-logo-dark.svg" -import logoLightSquareSvg from "../../asset/brand/opencode-logo-light-square.svg" -import logoDarkSquareSvg from "../../asset/brand/opencode-logo-dark-square.svg" -import wordmarkLightSvg from "../../asset/brand/opencode-wordmark-light.svg" -import wordmarkDarkSvg from "../../asset/brand/opencode-wordmark-dark.svg" -import wordmarkSimpleLightSvg from "../../asset/brand/opencode-wordmark-simple-light.svg" -import wordmarkSimpleDarkSvg from "../../asset/brand/opencode-wordmark-simple-dark.svg" -const brandAssets = "/opencode-brand-assets.zip" +import { ShareMeta } from "~/component/share-meta" +import { ogImage } from "~/lib/og" +import { breadcrumbData, JsonLd } from "~/component/structured-data" +import { useLanguage } from "~/context/language" +import { englishText, localize } from "~/i18n/content" +import { source } from "~/i18n/content/source" +import { Site } from "~/component/site/site" +import { useI18n } from "~/context/i18n" +import { + badgeFile, + badgeHtml, + badgeMarkdown, + badgeZip, + brandContent, + brandMarkdown, + colorFormats, + type BadgeFont, +} from "~/lib/brand-content" +import { useMarkdown } from "~/component/site/use-markdown" +import { siteSettings } from "~/component/site/settings" +import { ContentsMenu, OnThisPage, SectionHeading, slug } from "~/component/site/on-this-page" +import { PageTitle } from "~/component/site/sticky-title" +import { AgentRulesButton } from "~/component/site/agent-rules-button" +import { inlineKey } from "~/lib/direction" export default function Brand() { const i18n = useI18n() - const alt = i18n.t("brand.meta.description") - const downloadFile = async (url: string, filename: string) => { - try { - const response = await fetch(url) - const blob = await response.blob() - const blobUrl = window.URL.createObjectURL(blob) + const language = useLanguage() + const [copied, setCopied] = createSignal() + const content = createMemo(() => localize(language.locale(), "brand", brandContent(i18n.t))) + // Heading ids stay English in every locale, so links to /brand#naming keep working. + const english = createMemo(() => englishText(content(), source.brand)) + const anchor = (text: string) => slug(english().get(text) ?? text) + const lower = (text: string) => (language.locale() === "en" ? text.toLowerCase() : text) + // A tone ("light", "dark") in the page's language, lower case in English as in a sentence. + const tone = (value: string) => lower(themeName(value)) + const themeName = (value: string) => i18n.t(value === "dark" ? "site.theme.dark" : "site.theme.light") + const markdown = useMarkdown("/brand", brandMarkdown) - const link = document.createElement("a") - link.href = blobUrl - link.download = filename - document.body.appendChild(link) - link.click() - document.body.removeChild(link) + // The sections in page order, for the "Contents" list. + const sections = createMemo(() => + [ + content().naming.title, + ...content().families.map((family) => family.title), + content().variants.title, + content().colors.title, + content().usage.title, + content().donts.title, + content().integrations.title, + content().trademarks.title, + ].map((title) => ({ id: anchor(title), title })), + ) - window.URL.revokeObjectURL(blobUrl) - } catch (error) { - console.error("Download failed:", error) - const link = document.createElement("a") - link.href = url - link.target = "_blank" - link.rel = "noopener noreferrer" - document.body.appendChild(link) - link.click() - document.body.removeChild(link) + // Translated labels change length: refit the drawings around them once the new text has rendered. + createEffect(on(language.locale, () => requestAnimationFrame(() => (fitDrawings(), snapLogos())), { defer: true })) + + onMount(() => { + // While the page scrolls, rows passing under a resting pointer would light up one after another + // (a flicker). The content ignores the pointer until scrolling has stopped for 150ms. + const state: { idle?: ReturnType } = {} + const scrolling = () => { + document.documentElement.dataset.scrolling = "" + clearTimeout(state.idle) + state.idle = setTimeout(() => delete document.documentElement.dataset.scrolling, 150) } + window.addEventListener("scroll", scrolling, { passive: true }) + onCleanup(() => { + window.removeEventListener("scroll", scrolling) + clearTimeout(state.idle) + delete document.documentElement.dataset.scrolling + }) + const observer = new ResizeObserver(snapLogos) + observer.observe(document.documentElement) + void document.fonts.ready.then(() => { + fitDrawings() + snapLogos() + }) + // The animated stroke diagram plays once, when it first comes into view. + const play = new IntersectionObserver( + (entries) => { + entries + .filter((entry) => entry.isIntersecting) + .forEach((entry) => { + ;(entry.target as HTMLElement).dataset.play = "" + play.unobserve(entry.target) + }) + }, + { threshold: 0.6 }, + ) + document.querySelectorAll('[data-component="stroke-diagram"]').forEach((element) => play.observe(element)) + onCleanup(() => { + observer.disconnect() + play.disconnect() + }) + }) + + /** Copies text, or the text a URL serves, and marks `key` as copied for a moment. */ + const copy = (key: string, value: string | { url: string }) => { + // A promised ClipboardItem keeps the click's user activation while the file loads (Safari needs it). + void (typeof value === "string" + ? navigator.clipboard.writeText(value) + : navigator.clipboard.write([ + new ClipboardItem({ + "text/plain": fetch(value.url) + .then((response) => response.text()) + .then((text) => new Blob([text], { type: "text/plain" })), + }), + ])) + setCopied(key) + setTimeout(() => setCopied((current) => (current === key ? undefined : current)), 1500) } - return ( -
- {i18n.t("brand.title")} - - - -
-
+ /** A section or sub-section heading: a plain title that copies its section's address when clicked. */ + const Heading = (props: { level: 2 | 3; id: string; children: string; label?: boolean }) => ( + + ) -
-
-

{i18n.t("brand.heading")}

-

{i18n.t("brand.subtitle")}

- + ) + + /** + * An asset's downloads and Copy SVG, in the style from Settings › Brand asset actions. Every asset + * (logos, wordmarks, avatars, the badge) gets the same treatment; avatars have two PNG sizes and no + * SVG. Copying shows a check and is announced. + */ + const Actions = (props: { actions: AssetAction[]; detail: string }) => { + const copyKey = (action: AssetAction) => `copy:${action.href}` + const run = (action: AssetAction) => copy(copyKey(action), { url: action.href }) + const done = (action: AssetAction) => action.copy && copied() === copyKey(action) + const live = () => (props.actions.some(done) ? i18n.t("site.action.copied") : "") + const style = () => siteSettings.brandAssetActions + // Plain strings for the label and tooltip: reading a JSX prop twice would build it twice and break + // hydration. + const Item = (item: { action: AssetAction; class?: string; icon?: JSX.Element; label?: string; tip?: string }) => + item.action.copy ? ( + + ) : ( + + {item.label} + {item.icon} + + ) + // Every style is in the markup and CSS shows the chosen one (data-style), so the server's default + // and the saved setting hydrate the same nodes. + const copyAction = props.actions.find((action) => action.copy) + return ( +
+
+ !action.copy)} + detail={props.detail} + done={done} + run={run} + /> + {copyAction ? ( + run(copyAction)} + /> + ) : null} +
+
+ +
+
+ + +
+
+ + {(action) => ( + : action.label.includes("SVG") ? : } + tip={action.copy ? action.label : i18n.t("brand.ui.downloadLabel", { label: action.label })} + /> + )} + +
+
+ + + {(action, index) => ( + <> + {index() > 0 ? : null} + + + )} + + +
+
+ !action.copy)}> + {(action) => ( + } + tip={i18n.t("brand.ui.downloadLabel", { label: action.label })} + /> + )} + + {copyAction ? ( + run(copyAction)} + /> + ) : null} +
+
+ + {(action) => ( + : } + /> + )} + +
+ + {live()} + +
+ ) + } + + /** "Download" (or a chevron next to the split button's main part) opening a grey menu of the actions. */ + const AssetMenu = (props: { + actions: AssetAction[] + detail: string + done: (action: AssetAction) => boolean | undefined + run: (action: AssetAction) => void + chevronOnly?: boolean + }) => { + const [open, setOpen] = createSignal(false) + onCloseMenus(() => setOpen(false)) + const state: { root?: HTMLDivElement } = {} + const items = () => [...(state.root?.querySelectorAll('[role="menuitem"]') ?? [])] + const close = (focus?: boolean) => { + setOpen(false) + if (focus) state.root?.querySelector("[aria-haspopup]")?.focus() + } + createEffect(() => { + if (!open()) return + requestAnimationFrame(() => items()[0]?.focus()) + const outside = (event: MouseEvent) => { + if (!state.root?.contains(event.target as Node)) close() + } + const keys = (event: KeyboardEvent) => { + if (event.key === "Escape") return close(true) + if (event.key !== "ArrowDown" && event.key !== "ArrowUp") return + event.preventDefault() + const list = items() + const index = list.indexOf(document.activeElement as HTMLElement) + list[(index + (event.key === "ArrowDown" ? 1 : -1) + list.length) % list.length]?.focus() + } + document.addEventListener("click", outside) + document.addEventListener("keydown", keys) + onCleanup(() => { + document.removeEventListener("click", outside) + document.removeEventListener("keydown", keys) + }) + }) + return ( +
(state.root = element)}> + + +
+ + {(action, index) => ( + <> + + + {action.group} + + + {action.copy ? ( + + ) : ( + close(true)}> + {action.label} + + + )} + + )} + +
+
+
+ ) + } + + type BadgeGroup = { label: string; title: string; alt: string; body: string } + const badgeFonts: BadgeFont[] = ["sans", "mono", "mono caps"] + + // The badge size shown in every preview and used by every Markdown copy; Shields stays at 20px. + const [badgeSize, setBadgeSize] = createSignal(20) + const badgeSizes = [20, 32, 44] + // The style the "tabs" layout shows, shared by Works with and Built with like the size. + const [badgeStyle, setBadgeStyle] = createSignal("a") + // Loads every badge file a change will show before making it, so the crossfade never shows a blank + // tile while a file downloads. + const preloadBadges = (size: number, styleIds: string[]) => { + const badges = content().integrations.badges + return Promise.all( + badges.groups.flatMap((group) => + badges.styles + .filter((style) => styleIds.includes(style.id)) + .flatMap((style) => + (["light", "dark"] as const).map((theme) => { + const image = new Image() + image.src = badgeFile( + group.label, + style.id, + theme, + style.sizes.includes(size) ? size : style.sizes[0], + "svg", + siteSettings.badgeFont, + ) + return image.decode().catch(() => undefined) + }), + ), + ), + ) + } + const chooseBadgeSize = async (size: number) => { + await preloadBadges( + size, + content().integrations.badges.styles.map((style) => style.id), + ) + setBadgeSize(size) + } + const chooseBadgeStyle = async (id: string) => { + await preloadBadges(badgeSize(), [id]) + setBadgeStyle(id) + } + /** + * A badge preview that eases between sizes and styles: the new file starts at the old size (transform only) + * and fading in, then settles at full size, where it is the crisp file on whole pixels. Reduced + * motion swaps instantly. + */ + const BadgePreview = (props: { src: string; size: number; alt: string }) => { + const state: { image?: HTMLImageElement } = {} + createEffect( + on( + () => [props.src, props.size] as const, + (next, previous) => { + if (!state.image || previous === undefined || previous[0] === next[0]) return + if (window.matchMedia("(prefers-reduced-motion: reduce)").matches) return + state.image.animate( + [ + { transform: `scale(${previous[1] / next[1]})`, opacity: 0.4 }, + { transform: "scale(1)", opacity: 1 }, + ], + { duration: 200, easing: "cubic-bezier(0.23, 1, 0.32, 1)" }, + ) + }, + ), + ) + // Lazy, so the hidden fonts and layouts never download. + return ( + (state.image = element)} + src={props.src} + height={props.size} + alt={props.alt} + loading="lazy" + /> + ) + } + + /** + * The sizes in a preview's top-left corner: plain text buttons, the chosen one in the strong colour. + * One tab stop per group (the chosen size); the arrow keys move between sizes and choose them. + */ + const SizeSwitcher = () => ( +
+ + {(size) => ( + + )} + +
+ ) + + type BadgeStyle = { id: string; name: string; sizes: number[] } + + /** One badge card: the preview with its size switcher, then the caption, Download (ZIP) and copy. */ + const BadgeCard = (props: { group: BadgeGroup; style: BadgeStyle; theme: "light" | "dark"; font: BadgeFont }) => { + const size = () => (props.style.sizes.includes(badgeSize()) ? badgeSize() : props.style.sizes[0]) + const theme = () => lower(i18n.t(props.theme === "light" ? "site.theme.light" : "site.theme.dark")) + const detail = () => + i18n.t("brand.ui.badgeName", { + style: props.style.name.toLowerCase(), + group: lower(props.group.title), + theme: theme(), + }) + const zip = () => badgeZip(props.group.label, props.style.id, props.font, props.theme) + const markdown = () => `markdown:${props.group.label}-${props.style.id}-${props.theme}-${props.font}` + return ( +
  • +
    + 1}> + + + +
    +
    + + {props.theme === "light" ? i18n.t("site.theme.light") : i18n.t("site.theme.dark")} + +
    + - {i18n.t("brand.downloadAll")} - - - - + {i18n.t("download.action.download")} + + + + copy( + markdown(), + badgeMarkdown(props.group.label, props.group.alt, props.style.id, size(), props.font, props.theme), + ) + } + /> + + {copied() === markdown() ? i18n.t("site.action.copied") : ""} + +
    +
    +
  • + ) + } -
    -
    - {alt} -
    - - -
    -
    -
    - {alt} -
    - - -
    -
    -
    - {alt} -
    - - -
    -
    -
    - {alt} -
    - - -
    -
    -
    - {alt} -
    - - -
    -
    -
    - {alt} -
    - - -
    -
    -
    - {alt} -
    - - -
    -
    -
    - {alt} -
    - - -
    + /** + * The style tabs: quiet text like the size switcher, a tablist with one tab stop (the chosen style) + * and the arrow keys to move and choose. + */ + const StyleTabs = (props: { panel: string }) => { + const styles = () => content().integrations.badges.styles + const state: { list?: HTMLDivElement; indicator?: HTMLSpanElement } = {} + // The "underline" style's line: under the chosen tab's text, moved there on every change, and when + // the tabs first show or resize (a hidden layout or font measures nothing). + const place = () => { + const tab = state.list?.querySelector('[aria-selected="true"]') + if (!tab || !state.indicator) return + state.indicator.style.width = `${tab.offsetWidth}px` + state.indicator.style.transform = `translate(${tab.offsetLeft}px, ${tab.offsetTop + tab.offsetHeight - 2}px)` + } + createEffect(on(badgeStyle, () => requestAnimationFrame(place))) + onMount(() => { + const observer = new ResizeObserver(place) + if (state.list) observer.observe(state.list) + onCleanup(() => observer.disconnect()) + }) + return ( +
    (state.list = element)} + > + + {(style, index) => ( + + )} + +
    + ) + } + + /** + * The badges in the layout from Settings › Badge layout: "tabs" (default), quiet style tabs over one + * Light and Dark pair; or "rows", a row per style with its pair, as the logo and wordmark sections. + * Every font and both layouts are in the markup and CSS shows the chosen ones, so the server and the + * saved settings hydrate the same nodes. + */ + const Badges = (props: { group: BadgeGroup }) => ( +
    + + {(font) => ( +
    +
    + +
    +
      + + {(theme) => { + const style = () => + content().integrations.badges.styles.find((item) => item.id === badgeStyle()) ?? + content().integrations.badges.styles[0] + return + }} + +
    -
    +
    + + {(style) => ( +
    +

    {style.name}

    +
      + + {(theme) => } + +
    +
    + )} +
    +
    +
    + )} + +
    + ) + + // Created once: Site reads its aside more than once, and a fresh element each time breaks hydration. + const aside = + + return ( + + {content().title} + + + + + +
    + +

    {content().hero.body}

    + -
    - - -
    + + + + +
    + + {content().naming.title} + +
    +
    +

    {content().naming.body}

    +

    + + {(part, index) => (index() % 2 ? {part} : part)} + +

    +
    +
    +
    + + + {(family, familyIndex) => ( +
    + + {family.title} + +
    +

    {family.body}

    +
      + + {(asset) => ( +
    • +
      + {`OpenCode +
      +
      + {asset.name} + +
      +
    • + )} +
      +
    + +
    + + {content().icons.title} + +

    {content().icons.body}

    +
      + + {(item) => ( +
    • +
      + {i18n.t("brand.ui.avatarAlt", +
      +
      + {item.name} + +
      +
    • + )} +
      +
    +
    +
    +
    +
    + )} +
    + +
    + + {content().variants.title} + +
    +

    {content().variants.body}

    + + {(group) => ( +
    + + {group.name} + +

    {group.body}

    + + {(row, rowIndex) => ( +
    +

    {row.title}

    +
      + + {(tile) => ( +
    • +
      + {`OpenCode +
      +
      + {tile.name} + +
      +
    • + )} +
      +
    +
    + )} +
    +
    + )} +
    +
    +
    + +
    + + {content().colors.title} + +
    +

    {content().colors.body}

    + + {(palette) => ( +
    + + {palette.name} + +
      + + {(swatch) => { + const formats = colorFormats(swatch.hex) + return ( +
    • + +
      + {swatch.name} + + {swatch.use} + {(ink) => <> {ink()}} + +
      + {/* Each row copies its value: the icon turns into a check and "Copied" is announced. */} +
      + + {(format) => { + const key = `${palette.name}-${format[1]}` + return ( + + ) + }} + +
      +
    • + ) + }} +
      +
    +
    + )} +
    +
    +
    + +
    + + {content().usage.title} + +
    +

    {content().usage.body}

    +
      +
    • +
      + +
      + + {content().usage.stroke.title} + + {content().usage.stroke.body} +
    • +
    • +
      + + +
      + + {content().usage.clearSpace.title} + + {content().usage.clearSpace.body} +
    • +
    • +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + + {content().usage.pixels.title} + + {content().usage.pixels.body} +
      + + {(size) => ( + + + + + + + + + + {(step) => ( + + + + + )} + + +
      {size.title}{i18n.t("brand.ui.stroke")}
      + {step[0]} × {step[1]}px + {step[0] / size.strokes}px
      + )} +
      +
      +
    • +
    • + + {content().usage.minimumTitle} + +
    • + + {(rule) => ( +
    • + +

      {rule.title}

      + {rule.body} +
    • + )} +
      +
    +
    +
    + +
    + + {content().donts.title} + +
    +

    {content().donts.body}

    + +
      + + {(example) => ( +
    • +
      + +
      + +
      +
      +
    • + )} +
      +
    +
    +
    + +
    + + {content().integrations.title} + +
    +

    {content().integrations.body}

    + +

    + {content().integrations.badges.body} {content().integrations.badges.sizes} +

    + + {(group) => ( +
    + + {group.title} + +

    {group.body}

    + +
    + )} +
    +
    +
    + + {content().integrations.lockup.title} + +

    {content().integrations.lockup.body}

    +
      + + {(partner) => ( + + {(tone) => ( +
    • +
      + +
      + + OpenCode × {partner.name}, {themeName(tone)} + +
    • + )} +
      + )} +
      +
    +
    +
    + + {content().integrations.naming.title} + +

    {content().integrations.naming.body}

    +

    + + {(part, index) => (index() % 2 ? {part} : part)} + +

    +
    +
    +
    + +
    + + {content().trademarks.title} + +
    +

    + {content().trademarks.body} {content().trademarks.contact.before} + {content().trademarks.contact.email} + {content().trademarks.contact.after} +

    +
    +
    + ) } + +// The partner marks from public/logos/tools (24 × 24 viewBox), drawn in the logo's ink. +const partnerMarks: Record = { + // The round mark fills its box, so it is drawn smaller than the logo's 60px to look as tall. + GitHub: { + path: "M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12", + size: 36, + }, + Figma: { + path: "M15.852 8.981h-4.588V0h4.588c2.476 0 4.49 2.014 4.49 4.49s-2.014 4.491-4.49 4.491zM12.735 7.51h3.117c1.665 0 3.019-1.355 3.019-3.019s-1.355-3.019-3.019-3.019h-3.117V7.51zm0 1.471H8.148c-2.476 0-4.49-2.014-4.49-4.49S5.672 0 8.148 0h4.588v8.981zm-4.587-7.51c-1.665 0-3.019 1.355-3.019 3.019s1.354 3.02 3.019 3.02h3.117V1.471H8.148zm4.587 15.019H8.148c-2.476 0-4.49-2.014-4.49-4.49s2.014-4.49 4.49-4.49h4.588v8.98zM8.148 8.981c-1.665 0-3.019 1.355-3.019 3.019s1.355 3.019 3.019 3.019h3.117V8.981H8.148zM8.172 24c-2.489 0-4.515-2.014-4.515-4.49s2.014-4.49 4.49-4.49h4.588v4.441c0 2.503-2.047 4.539-4.563 4.539zm-.024-7.51a3.023 3.023 0 0 0-3.019 3.019c0 1.665 1.365 3.019 3.044 3.019 1.705 0 3.093-1.376 3.093-3.068v-2.97H8.148zm7.704 0h-.098c-2.476 0-4.49-2.014-4.49-4.49s2.014-4.49 4.49-4.49h.098c2.476 0 4.49 2.014 4.49 4.49s-2.014 4.49-4.49 4.49zm-.097-7.509c-1.665 0-3.019 1.355-3.019 3.019s1.355 3.019 3.019 3.019h.098c1.665 0 3.019-1.355 3.019-3.019s-1.355-3.019-3.019-3.019h-.098z", + size: 40, + }, +} + +/** + * The OpenCode logo at 32 × 40px (an 8px stroke), a 12px ×, and a partner's logo, with 3 strokes (24px) + * on each side of the ×. + */ +function PartnerLockup(props: { partner: string }) { + const i18n = useI18n() + const mark = () => partnerMarks[props.partner] + return ( + + + + + + + + + + + ) +} + +function DownloadIcon() { + return ( + + ) +} + +const markInner = "M180 240H60V120H180V240Z" +const markOuter = "M180 60H60V240H180V60ZM240 300H0V0H240V300Z" + +// The wordmark letters from opencode-wordmark-light.svg: [inner shade, outer shape]. The first four spell "open". +const letters = [ + [ + "M49.2346 82.1433H16.4141V49.2861H49.2346V82.1433Z", + "M49.2308 32.8573H16.4103V82.143H49.2308V32.8573ZM65.641 98.5716H0V16.4287H65.641V98.5716Z", + ], + [ + "M131.281 82.1433H98.4609V49.2861H131.281V82.1433Z", + "M98.4649 82.143H131.285V32.8573H98.4649V82.143ZM147.696 98.5716H98.4649V115H82.0547V16.4287H147.696V98.5716Z", + ], + [ + "M229.746 65.7139V82.1424H180.516V65.7139H229.746Z", + "M229.743 65.7144H180.512V82.143H229.743V98.5716H164.102V16.4287H229.743V65.7144ZM180.512 49.2859H213.332V32.8573H180.512V49.2859Z", + ], + [ + "M295.383 98.5718H262.562V49.2861H295.383V98.5718Z", + "M295.387 32.8573H262.567V98.5716H246.156V16.4287H295.387V32.8573ZM311.797 98.5716H295.387V32.8573H311.797V98.5716Z", + ], + [ + "M393.848 82.1433H344.617V49.2861H393.848V82.1433Z", + "M393.844 32.8573H344.613V82.143H393.844V98.5716H328.203V16.4287H393.844V32.8573Z", + ], + [ + "M459.485 82.1433H426.664V49.2861H459.485V82.1433Z", + "M459.489 32.8573H426.668V82.143H459.489V32.8573ZM475.899 98.5716H410.258V16.4287H475.899V98.5716Z", + ], + [ + "M541.539 82.1433H508.719V49.2861H541.539V82.1433Z", + "M541.535 32.8571H508.715V82.1428H541.535V32.8571ZM557.946 98.5714H492.305V16.4286H541.535V0H557.946V98.5714Z", + ], + [ + "M639.996 65.7139V82.1424H590.766V65.7139H639.996Z", + "M590.77 32.8573V49.2859H623.59V32.8573H590.77ZM640 65.7144H590.77V82.143H640V98.5716H574.359V16.4287H640V65.7144Z", + ], +] + +/** The logo drawn inline, so specimens can take any colors. */ +function Mark(props: { code: string; inner: string; style?: JSX.CSSProperties }) { + return ( + + ) +} + +/** The wordmark drawn inline, so specimens can take any colors. */ +function Wordmark(props: { code: string; open: string; inner: string; style?: JSX.CSSProperties }) { + return ( + + ) +} + +/** A thin dimension line with end ticks, drawn on whole pixels. */ +function Dimension(props: { kind: "vertical" | "horizontal"; size: number }) { + const vertical = () => props.kind === "vertical" + return ( + + ) +} + +/** + * What one stroke is, in the style from Settings › Stroke diagram. Every style is in the markup and CSS + * shows the chosen one, so the server's default and the saved setting hydrate the same nodes. The + * logo is 96 × 120px, so one stroke is 24px; measurements are blue, lines are 1px on half pixels. + */ +function StrokeDiagrams() { + const i18n = useI18n() + const logo = (x: number, y: number) => ( + + + + + ) + // The 16 × 20px logo's pixels at the bottom-left corner (columns 0–7, rows 12–19): outline or inner shade. + const corner = Array.from({ length: 64 }, (_, index) => { + const col = index % 8 + const row = 12 + Math.floor(index / 8) + return { col, row: row - 12, fill: col < 4 || row > 15 ? "var(--logo-code)" : "var(--logo-inner)" } + }) + const ring = Array.from({ length: 6 * 7 }, (_, index) => ({ + col: (index % 6) - 1, + row: Math.floor(index / 6) - 1, + })).filter((tile) => tile.col < 0 || tile.col > 3 || tile.row < 0 || tile.row > 4) + return ( +
    + + + + + + + + + +
    + ) +} + +/** + * The logo's clear space as a technical drawing. The logo is 96 by 120px, so one stroke, the outline's + * thickness and a quarter of the width, is 24px. Straight lines sit on half pixels to stay 1px sharp. + */ +function ClearSpace() { + const i18n = useI18n() + // Corners of the clear-space box (two strokes out), with the direction each crop mark points. + const corners = [ + [72, 40, -1, -1], + [264, 40, 1, -1], + [72, 256, -1, 1], + [264, 256, 1, 1], + ] + const edge = (value: number, direction: number) => value - direction * 0.5 + return ( + + + + + + + + + + + + + + + + `M${corner[0] + corner[2] * 4} ${edge(corner[1], corner[3])}H${corner[0] + corner[2] * 18}` + + `M${edge(corner[0], corner[2])} ${corner[1] + corner[3] * 4}V${corner[1] + corner[3] * 18}`, + ) + .join("")} + /> + {/* One stroke-sized square of the logo's outline, then two of them in the margin to its left and + below. Each square's outline is inset half a pixel inside its own cell, as the tiles in the + stroke diagram are, so no square runs past the clear-space outline. */} + + + + + + + + + ) +} + +/** + * The wordmark with two strokes of clear space: the wordmark at 312 × 56px, so a stroke (a seventh of + * its height, the thickness of its letters) is 8px. Marked as the logo is: the wordmark's bottom-left + * square (the descender row, under the "o"), two of them in the margin to its left and two below the + * wordmark, so the squares make one L on the 8px module grid, and the label down left. + */ +function ClearSpaceWordmark() { + const i18n = useI18n() + const corners = [ + [32, 56, -1, -1], + [376, 56, 1, -1], + [32, 144, -1, 1], + [376, 144, 1, 1], + ] + const edge = (value: number, direction: number) => value - direction * 0.5 + return ( + + + + + + + + + + {(letter, index) => ( + <> + + + + )} + + + + + + + `M${corner[0] + corner[2] * 4} ${edge(corner[1], corner[3])}H${corner[0] + corner[2] * 18}` + + `M${edge(corner[0], corner[2])} ${corner[1] + corner[3] * 4}V${corner[1] + corner[3] * 18}`, + ) + .join("")} + /> + + + + + + + + + ) +} + +/** + * A measurement callout: a dot on the marked cell, a leader at exactly 45° down and to the left (it + * drops as far as it runs), a short horizontal tick, then the label, right-aligned to the tick. Every + * position comes from the dot, so the angle holds however the drawing is placed or scaled. + */ +function Callout(props: { x: number; y: number; drop: number; label: string }) { + const language = useLanguage() + // Toward the inline start: left in left-to-right text, right in right-to-left (Arabic). The label's + // logical end meets the tick either way. + const side = () => (language.dir(language.locale()) === "rtl" ? 1 : -1) + const end = () => ({ x: props.x + side() * props.drop, y: props.y + props.drop }) + return ( + <> + + + + {props.label} + + + ) +} + +/** + * Widens each annotated drawing's viewBox (and its size, so it keeps 1:1) to take in its labels, whose + * length depends on the language and the font: an clips anything outside its viewBox. The clear- + * space drawings grow on both sides by the same amount, so the logo stays on the figure's centre line. + */ +function fitDrawings() { + document + .querySelectorAll( + '[data-page="brand"] :is(svg[data-component="clear-space"], svg[data-component="pixel-grid"])', + ) + .forEach((svg) => { + const original = (svg.dataset.viewBox ??= svg.getAttribute("viewBox") ?? "").split(" ").map(Number) + const texts = [...svg.querySelectorAll("text")].map((text) => text.getBBox()) + if (original.length !== 4 || texts.every((box) => box.width === 0)) return + const pad = 2 + const left = Math.max(0, ...texts.map((box) => original[0] - box.x + pad)) + const right = Math.max(0, ...texts.map((box) => box.x + box.width - (original[0] + original[2]) + pad)) + const top = Math.max(0, ...texts.map((box) => original[1] - box.y + pad)) + const bottom = Math.max(0, ...texts.map((box) => box.y + box.height - (original[1] + original[3]) + pad)) + const symmetric = svg.dataset.component === "clear-space" + const grow = { + left: Math.ceil(symmetric ? Math.max(left, right) : left), + right: Math.ceil(symmetric ? Math.max(left, right) : right), + top: Math.ceil(top), + bottom: Math.ceil(bottom), + } + const box = [ + original[0] - grow.left, + original[1] - grow.top, + original[2] + grow.left + grow.right, + original[3] + grow.top + grow.bottom, + ] + svg.setAttribute("viewBox", box.join(" ")) + svg.setAttribute("width", String(box[2])) + svg.setAttribute("height", String(box[3])) + }) +} + +/** + * Nudges every logo on the page onto whole pixels. Sizes are whole-pixel steps already; centering and the + * text above can still leave a fractional offset, so each logo is translated by the remainder. + */ +function snapLogos() { + const logos = [ + ...document.querySelectorAll( + '[data-page="brand"] :is([data-slot="preview"] img, svg[data-slot="mark"], svg[data-slot="wordmark"], [data-component="clear-space"], [data-component="pixel-grid"])', + ), + ] + logos.forEach((logo) => (logo.style.translate = "")) + const rects = logos.map((logo) => logo.getBoundingClientRect()) + logos.forEach((logo, index) => { + const dx = Math.round(rects[index].x) - rects[index].x + const dy = Math.round(rects[index].y) - rects[index].y + if (dx || dy) logo.style.translate = `${dx}px ${dy}px` + }) +} + +/** One action on an asset: a download, or copying the SVG at `href`. */ +// `group` starts a titled part of the menu ("" for a plain divider); `value` is text to copy instead of +// the file at `href`. +type AssetAction = { label: string; href: string; download?: string; copy?: boolean; group?: string; value?: string } + +/** PNG, SVG and Copy SVG for an asset that has both files. */ +function svgActions(file: string, png: string, svg: string, copy: string): AssetAction[] { + return [ + { label: "PNG", href: png, download: `${file}.png` }, + { label: "SVG", href: svg, download: `${file}.svg` }, + { label: copy, href: svg, copy: true }, + ] +} + +function CheckIcon() { + return ( + + ) +} + +function ChevronIcon() { + return ( + + ) +} + +/** A picture frame: the PNG. */ +function ImageIcon() { + return ( + + ) +} + +/** A path with its anchor points: the SVG. */ +function VectorIcon() { + return ( + + ) +} + +function CopyIcon() { + return ( + + ) +} + +/** The pixel-grid columns and rows: the 16 × 20px logo with one empty pixel around it. */ +const gridSize = [18, 22] + +/** + * A 16 × 20px logo magnified on its pixel grid, or the same logo at 15 × 19px and off the grid. Each cell is + * filled by how much of it the logo covers, the way a browser anti-aliases it, so off-grid edges turn grey. + * Drawn at whole-pixel cell sizes; the page shows one size per breakpoint. + */ +function PixelGrid(props: { good: boolean; cell: number }) { + const logo = props.good ? { x: 1, y: 1, w: 16, h: 20 } : { x: 1.4, y: 1.5, w: 15, h: 19 } + const c = props.cell + const left = 44 + const top = 30 + const width = gridSize[0] * c + const height = gridSize[1] * c + const lx = left + logo.x * c + const rx = left + (logo.x + logo.w) * c + const ty = top + logo.y * c + const by = top + (logo.y + logo.h) * c + const sx = lx + (logo.w / 4) * c + const cells = Array.from({ length: gridSize[0] * gridSize[1] }, (_, index) => { + const i = index % gridSize[0] + const j = Math.floor(index / gridSize[0]) + const cover = (x0: number, x1: number, y0: number, y1: number) => + Math.max(0, Math.min(i + 1, x1) - Math.max(i, x0)) * Math.max(0, Math.min(j + 1, y1) - Math.max(j, y0)) + const x = [logo.x, logo.x + logo.w / 4, logo.x + (logo.w * 3) / 4, logo.x + logo.w] + const y = [logo.y, logo.y + logo.h / 5, logo.y + (logo.h * 2) / 5, logo.y + (logo.h * 4) / 5, logo.y + logo.h] + const code = cover(x[0], x[3], y[0], y[4]) - cover(x[1], x[2], y[1], y[3]) + const inner = cover(x[1], x[2], y[2], y[3]) + return { i, j, fill: cellFill(code, inner) } + }).filter((cell) => cell.fill) + const grid = [ + ...Array.from({ length: gridSize[0] + 1 }, (_, k) => { + const x = left + k * c + (k === gridSize[0] ? -0.5 : 0.5) + return `M${x} ${top}V${top + height}` + }), + ...Array.from({ length: gridSize[1] + 1 }, (_, k) => { + const y = top + k * c + (k === gridSize[1] ? -0.5 : 0.5) + return `M${left} ${y}H${left + width}` + }), + ].join("") + return ( + + + + {(cell) => ( + + )} + + + + + + {logo.w}px + + + {logo.h}px + + + {logo.w / 4}px stroke + + + ) +} + +/** A cell's color from how much of it the outline and the inner shade cover, mixed over the figure background. */ +function cellFill(code: number, inner: number) { + if (code > 0.999) return "var(--logo-code)" + if (inner > 0.999) return "var(--logo-inner)" + if (code + inner < 0.001) return undefined + const shade = code < 1 ? (inner / (1 - code)) * 100 : 0 + return `color-mix(in srgb, var(--logo-code) ${(code * 100).toFixed(1)}%, color-mix(in srgb, var(--logo-inner) ${shade.toFixed(1)}%, var(--bg-weak)))` +} diff --git a/packages/console/app/src/routes/changelog/[tag].tsx b/packages/console/app/src/routes/changelog/[tag].tsx new file mode 100644 index 00000000000..a8968a67f77 --- /dev/null +++ b/packages/console/app/src/routes/changelog/[tag].tsx @@ -0,0 +1,166 @@ +import { Link, Meta, Title } from "@solidjs/meta" +import { createAsync, useParams } from "@solidjs/router" +import { HttpStatusCode } from "@solidjs/start" +import { Show, Suspense } from "solid-js" +import { LocaleLinks } from "~/component/locale-links" +import { ShareMeta } from "~/component/share-meta" +import { ogImage } from "~/lib/og" +import { breadcrumbData, JsonLd, techArticleData } from "~/component/structured-data" +import { ChangelogSettings, ChangelogTimeline, ChangelogUnavailable, entryPath } from "~/component/site/changelog-entry" +import { Site } from "~/component/site/site" +import { useMarkdown } from "~/component/site/use-markdown" +import { useI18n } from "~/context/i18n" +import { useLanguage } from "~/context/language" +import { changelogEntry } from "~/lib/changelog" +import { changelogEntryPageMarkdown } from "~/lib/changelog-markdown" +import { PageTitle } from "~/component/site/sticky-title" + +/** One release's page, `/changelog/`: the entry in full, with Share, and the newer and older entries. */ +export default function ChangelogRelease() { + const i18n = useI18n() + const language = useLanguage() + const params = useParams() + const view = createAsync(() => changelogEntry(params.tag ?? "")) + const entry = () => view()?.entries[0] + const markdown = useMarkdown(`/changelog/${params.tag}`, changelogEntryPageMarkdown, { changelog: view }) + const description = () => { + const current = entry() + if (!current) return i18n.t("changelog.meta.description") + const text = current.summary || current.features[0]?.title || current.title + const plain = withoutColons(text.replace(/[`*]/g, "").replace(/\[([^\]]+)\]\([^)]*\)/g, "$1")) + // Search results show 140 to 160 characters: a short summary gets a line about the release, and + // a long one ends on a whole word. Release notes are English, so this line is too. + const full = + plain.length >= 140 + ? plain + : `${plain.replace(/[.!]?$/, ".")} Release notes for OpenCode ${current.releases[0].tag}, with every new feature, improvement and fix.` + return full.length <= 160 ? full : `${full.slice(0, 159).replace(/\s+\S*$/, "")}…` + } + // Titles fit in 60 characters: a long release title drops "changelog", then ends on a whole word. + const headline = () => { + const title = entry()?.title.replace(/`/g, "") ?? "" + return title.length <= 60 ? title : `${title.slice(0, 59).replace(/\s+\S*$/, "")}…` + } + const pageTitle = () => { + const full = i18n.t("changelog.entry.title", { title: headline() }) + if (full.length <= 60) return full + const short = `${headline()} | OpenCode` + return short.length <= 60 ? short : headline() + } + + return ( + : undefined} + markdown={markdown} + > + + ← {i18n.t("changelog.entry.back")} + + + + + + {(current) => ( + + + + + {i18n.t("changelog.title")} +
    + + }> +

    {i18n.t("changelog.entry.notFound", { tag: params.tag ?? "" })}

    +
    +
    + + } + > + {(item) => ( + <> + {pageTitle()} + + {/* A merged entry answers to each of its tags; the newest one is the page's address. */} + + + + +
    + + +
    + + )} +
    + )} +
    +
    + + ) +} + +/** + * The site's copy has no colons, so a release note's description drops a leading "Label:" and a + * trailing "see: ", and a colon that joins two clauses becomes a full stop. A colon in a + * setting such as "persist-credentials: false" stays. The release notes themselves are unchanged. + */ +function withoutColons(text: string) { + return text + .replace(/^[A-Z][\w&/+-]*(?: [A-Z][\w&/+-]*)?:\s+(\S)/, (_, first: string) => first.toUpperCase()) + .replace(/,?\s+see:\s+\S+\s*$/i, "") + .replace( + /^((?:\S+\s+){3,}\S+?):\s+([a-z])/, + (_, before: string, first: string) => `${before}. ${first.toUpperCase()}`, + ) +} diff --git a/packages/console/app/src/routes/changelog/index.css b/packages/console/app/src/routes/changelog/index.css deleted file mode 100644 index 27b44f06275..00000000000 --- a/packages/console/app/src/routes/changelog/index.css +++ /dev/null @@ -1,604 +0,0 @@ -::selection { - background: var(--color-background-interactive); - color: var(--color-text-strong); - - @media (prefers-color-scheme: dark) { - background: var(--color-background-interactive); - color: var(--color-text-inverted); - } -} - -[data-page="changelog"] { - --color-background: hsl(0, 20%, 99%); - --color-background-weak: hsl(0, 8%, 97%); - --color-background-weak-hover: hsl(0, 8%, 94%); - --color-background-strong: hsl(0, 5%, 12%); - --color-background-strong-hover: hsl(0, 5%, 18%); - --color-background-interactive: hsl(62, 84%, 88%); - --color-background-interactive-weaker: hsl(64, 74%, 95%); - - --color-text: hsl(0, 1%, 39%); - --color-text-weak: hsl(0, 1%, 60%); - --color-text-weaker: hsl(30, 2%, 81%); - --color-text-strong: hsl(0, 5%, 12%); - --color-text-inverted: hsl(0, 20%, 99%); - - --color-border: hsl(30, 2%, 81%); - --color-border-weak: hsl(0, 1%, 85%); - - --color-icon: hsl(0, 1%, 55%); - - background: var(--color-background); - font-family: var(--font-mono); - color: var(--color-text); - padding-bottom: 5rem; - - @media (prefers-color-scheme: dark) { - --color-background: hsl(0, 9%, 7%); - --color-background-weak: hsl(0, 6%, 10%); - --color-background-weak-hover: hsl(0, 6%, 15%); - --color-background-strong: hsl(0, 15%, 94%); - --color-background-strong-hover: hsl(0, 15%, 97%); - --color-background-interactive: hsl(62, 100%, 90%); - --color-background-interactive-weaker: hsl(60, 20%, 8%); - - --color-text: hsl(0, 4%, 71%); - --color-text-weak: hsl(0, 2%, 49%); - --color-text-weaker: hsl(0, 3%, 28%); - --color-text-strong: hsl(0, 15%, 94%); - --color-text-inverted: hsl(0, 9%, 7%); - - --color-border: hsl(0, 3%, 28%); - --color-border-weak: hsl(0, 4%, 23%); - - --color-icon: hsl(10, 3%, 43%); - } - - /* Header styles - copied from download */ - [data-component="top"] { - padding: 24px 5rem; - height: 80px; - position: sticky; - top: 0; - display: flex; - justify-content: space-between; - align-items: center; - background: var(--color-background); - border-bottom: 1px solid var(--color-border-weak); - z-index: 10; - - @media (max-width: 60rem) { - padding: 24px 1.5rem; - } - - img { - height: 34px; - width: auto; - } - - [data-component="nav-desktop"] { - ul { - display: flex; - justify-content: space-between; - align-items: center; - gap: 32px; - - @media (max-width: 55rem) { - gap: 24px; - } - - @media (max-width: 48rem) { - gap: 24px; - } - li { - display: inline-block; - a { - text-decoration: none; - span { - color: var(--color-text-weak); - } - } - a:hover { - text-decoration: underline; - text-underline-offset: 2px; - text-decoration-thickness: 1px; - } - [data-slot="cta-button"] { - background: var(--color-background-strong); - color: var(--color-text-inverted); - padding: 8px 16px 8px 10px; - border-radius: 4px; - font-weight: 500; - text-decoration: none; - display: flex; - align-items: center; - gap: 8px; - white-space: nowrap; - - @media (max-width: 55rem) { - display: none; - } - } - [data-slot="cta-button"]:hover { - background: var(--color-background-strong-hover); - text-decoration: none; - } - } - } - - @media (max-width: 40rem) { - display: none; - } - } - - [data-component="nav-mobile"] { - button > svg { - color: var(--color-icon); - } - } - - [data-component="nav-mobile-toggle"] { - border: none; - background: none; - outline: none; - height: 40px; - width: 40px; - cursor: pointer; - margin-right: -8px; - } - - [data-component="nav-mobile-toggle"]:hover { - background: var(--color-background-weak); - } - - [data-component="nav-mobile"] { - display: none; - - @media (max-width: 40rem) { - display: block; - - [data-component="nav-mobile-icon"] { - cursor: pointer; - height: 40px; - width: 40px; - display: flex; - align-items: center; - justify-content: center; - } - - [data-component="nav-mobile-menu-list"] { - position: fixed; - background: var(--color-background); - top: 80px; - left: 0; - right: 0; - height: 100vh; - - ul { - list-style: none; - padding: 20px 0; - - li { - a { - text-decoration: none; - padding: 20px; - display: block; - - span { - color: var(--color-text-weak); - } - } - - a:hover { - background: var(--color-background-weak); - } - } - } - } - } - } - - [data-slot="logo dark"] { - display: none; - } - - @media (prefers-color-scheme: dark) { - [data-slot="logo light"] { - display: none; - } - [data-slot="logo dark"] { - display: block; - } - } - } - - [data-component="footer"] { - border-top: 1px solid var(--color-border-weak); - display: flex; - flex-direction: row; - margin-top: 4rem; - - @media (max-width: 65rem) { - border-bottom: 1px solid var(--color-border-weak); - } - - [data-slot="cell"] { - flex: 1; - text-align: center; - - a { - text-decoration: none; - padding: 2rem 0; - width: 100%; - display: block; - - span { - color: var(--color-text-weak); - - @media (max-width: 40rem) { - display: none; - } - } - } - - a:hover { - background: var(--color-background-weak); - text-decoration: underline; - text-underline-offset: 2px; - text-decoration-thickness: 1px; - } - } - - [data-slot="cell"] + [data-slot="cell"] { - border-left: 1px solid var(--color-border-weak); - - @media (max-width: 40rem) { - border-left: none; - } - } - - @media (max-width: 25rem) { - flex-wrap: wrap; - - [data-slot="cell"] { - flex: 1 0 100%; - border-left: none; - border-top: 1px solid var(--color-border-weak); - } - - [data-slot="cell"]:nth-child(1) { - border-top: none; - } - } - } - - [data-component="container"] { - max-width: 67.5rem; - margin: 0 auto; - border: 1px solid var(--color-border-weak); - border-top: none; - - @media (max-width: 65rem) { - border: none; - } - } - - [data-component="content"] { - padding: 6rem 5rem; - - @media (max-width: 60rem) { - padding: 4rem 1.5rem; - } - } - - [data-component="legal"] { - color: var(--color-text-weak); - text-align: center; - padding: 2rem 5rem; - display: flex; - gap: 32px; - justify-content: center; - - @media (max-width: 60rem) { - padding: 2rem 1.5rem; - } - - a { - color: var(--color-text-weak); - text-decoration: none; - } - - a:hover { - color: var(--color-text); - text-decoration: underline; - } - } - - /* Changelog Hero */ - [data-component="changelog-hero"] { - margin-bottom: 4rem; - padding-bottom: 2rem; - border-bottom: 1px solid var(--color-border-weak); - - @media (max-width: 50rem) { - margin-bottom: 2rem; - padding-bottom: 1.5rem; - } - - h1 { - font-size: 1.5rem; - font-weight: 700; - color: var(--color-text-strong); - margin-bottom: 8px; - } - - p { - color: var(--color-text); - } - } - - /* Releases */ - [data-component="releases"] { - display: flex; - flex-direction: column; - gap: 0; - } - - [data-component="release"] { - display: grid; - grid-template-columns: 180px 1fr; - gap: 3rem; - padding: 2rem 0; - border-bottom: 1px solid var(--color-border-weak); - - @media (max-width: 50rem) { - grid-template-columns: 1fr; - gap: 1rem; - } - - &:first-child { - padding-top: 0; - } - - &:last-child { - border-bottom: none; - } - - header { - display: flex; - flex-direction: column; - gap: 4px; - position: sticky; - top: 80px; - align-self: start; - background: var(--color-background); - padding: 44px 0 8px; - - @media (max-width: 50rem) { - position: static; - flex-direction: row; - align-items: center; - gap: 12px; - padding: 0; - } - - [data-slot="version"] { - a { - font-weight: 600; - color: var(--color-text-strong); - text-decoration: none; - - &:hover { - text-decoration: underline; - text-underline-offset: 2px; - text-decoration-thickness: 1px; - } - } - } - - time { - color: var(--color-text-weak); - font-size: 14px; - } - } - - [data-slot="content"] { - display: flex; - flex-direction: column; - gap: 1.5rem; - } - - [data-component="section"] { - h3 { - font-size: 13px; - font-weight: 600; - color: var(--color-text-strong); - margin-bottom: 6px; - } - - ul { - list-style: none; - padding: 0; - margin: 0; - padding-left: 16px; - display: flex; - flex-direction: column; - gap: 4px; - - li { - color: var(--color-text); - font-size: 13px; - line-height: 1.5; - padding-left: 12px; - position: relative; - - &::before { - content: "-"; - position: absolute; - left: 0; - color: var(--color-text-weak); - } - - [data-slot="author"] { - color: var(--color-text-weak); - font-size: 12px; - margin-left: 4px; - text-decoration: none; - - &:hover { - text-decoration: underline; - text-underline-offset: 2px; - text-decoration-thickness: 1px; - } - } - } - } - } - - [data-component="contributors"] { - font-size: 13px; - color: var(--color-text-weak); - padding-top: 0.5rem; - - span { - color: var(--color-text-weak); - } - - a { - color: var(--color-text); - text-decoration: none; - - &:hover { - text-decoration: underline; - text-underline-offset: 2px; - text-decoration-thickness: 1px; - } - } - } - - [data-component="highlights"] { - display: flex; - flex-direction: column; - gap: 3rem; - margin-bottom: 0.75rem; - } - - [data-component="collapsible-sections"] { - display: flex; - flex-direction: column; - gap: 0; - } - - [data-component="collapsible-section"] { - [data-slot="toggle"] { - display: flex; - align-items: center; - gap: 6px; - background: none; - border: none; - padding: 6px 0; - cursor: pointer; - font-family: inherit; - font-size: 13px; - font-weight: 600; - color: var(--color-text-weak); - - &:hover { - color: var(--color-text); - } - - [data-slot="icon"] { - font-size: 10px; - } - } - - ul { - list-style: none; - padding: 0; - margin: 0; - padding-left: 16px; - padding-bottom: 8px; - - li { - color: var(--color-text); - font-size: 13px; - line-height: 1.5; - padding-left: 12px; - position: relative; - - &::before { - content: "-"; - position: absolute; - left: 0; - color: var(--color-text-weak); - } - - [data-slot="author"] { - color: var(--color-text-weak); - font-size: 12px; - margin-left: 4px; - text-decoration: none; - - &:hover { - text-decoration: underline; - text-underline-offset: 2px; - text-decoration-thickness: 1px; - } - } - } - } - } - - [data-component="highlight"] { - h4 { - font-size: 14px; - font-weight: 600; - color: var(--color-text-strong); - margin-bottom: 8px; - } - - hr { - border: none; - border-top: 1px solid var(--color-border-weak); - margin-bottom: 16px; - } - - [data-slot="highlight-item"] { - margin-bottom: 48px; - - &:last-child { - margin-bottom: 0; - } - - p[data-slot="title"] { - font-weight: 600; - font-size: 16px; - margin-bottom: 4px; - } - - p { - font-size: 14px; - margin-bottom: 12px; - } - } - - img, - video { - max-width: 100%; - height: auto; - border-radius: 4px; - } - } - } - - a { - color: var(--color-text-strong); - text-decoration: underline; - text-underline-offset: 2px; - text-decoration-thickness: 1px; - - &:hover { - text-decoration-thickness: 2px; - } - } -} diff --git a/packages/console/app/src/routes/changelog/index.tsx b/packages/console/app/src/routes/changelog/index.tsx index 21c4c6ec7cb..e206cf20244 100644 --- a/packages/console/app/src/routes/changelog/index.tsx +++ b/packages/console/app/src/routes/changelog/index.tsx @@ -1,174 +1,95 @@ -import "./index.css" -import { Title, Meta } from "@solidjs/meta" -import { createAsync } from "@solidjs/router" -import { Header } from "~/component/header" -import { Footer } from "~/component/footer" -import { Legal } from "~/component/legal" -import { changelog } from "~/lib/changelog" -import type { HighlightGroup } from "~/lib/changelog" -import { For, Show, createSignal } from "solid-js" +import { Link, Meta, Title } from "@solidjs/meta" +import { createAsync, useSearchParams } from "@solidjs/router" +import { Show, Suspense } from "solid-js" +import { Site } from "~/component/site/site" +import { LocaleLinks } from "~/component/locale-links" +import { ShareMeta } from "~/component/share-meta" +import { ogImage } from "~/lib/og" +import { breadcrumbData, JsonLd } from "~/component/structured-data" +import { changelogPage } from "~/lib/changelog" +import { areaKeys, changelogQuery } from "~/lib/changelog-notes" import { useI18n } from "~/context/i18n" import { useLanguage } from "~/context/language" - -function formatDate(dateString: string, locale: string) { - const date = new Date(dateString) - return date.toLocaleDateString(locale, { - year: "numeric", - month: "short", - day: "numeric", - }) -} - -function ReleaseItem(props: { item: string }) { - const parts = () => { - const match = props.item.match(/^(.+?)(\s*\(@([\w-]+)\))?$/) - if (match) { - return { - text: match[1], - username: match[3], - } - } - return { text: props.item, username: undefined } - } - - return ( -
  • - {parts().text} - - - (@{parts().username}) - - -
  • - ) -} - -function HighlightSection(props: { group: HighlightGroup }) { - return ( -
    -

    {props.group.source}

    -
    - - {(item) => ( -
    -

    {item.title}

    -

    {item.description}

    - - - - {item.title} - -
    - )} -
    -
    - ) -} - -function CollapsibleSection(props: { section: { title: string; items: string[] } }) { - const [open, setOpen] = createSignal(false) - - return ( -
    - - -
      - {(item) => } -
    -
    -
    - ) -} - -function CollapsibleSections(props: { sections: { title: string; items: string[] }[] }) { - return ( -
    - {(section) => } -
    - ) -} +import { + ChangelogPages, + ChangelogSettings, + ChangelogTimeline, + ChangelogToolbar, + ChangelogUnavailable, +} from "~/component/site/changelog-entry" +import { useMarkdown } from "~/component/site/use-markdown" +import { changelogMarkdown } from "~/lib/changelog-markdown" +import { PageTitle } from "~/component/site/sticky-title" export default function Changelog() { const i18n = useI18n() const language = useLanguage() - const data = createAsync(() => changelog()) - const releases = () => data() ?? [] + const [params] = useSearchParams() + // `?page=2` for older updates and `?area=desktop,terminal` to filter; both are shareable URLs. + const page = () => Number(params.page ?? 1) || 1 + const filter = () => areaKeys(params.area) + const view = createAsync(() => changelogPage(page(), filter())) + const markdown = useMarkdown("/changelog", changelogMarkdown, { changelog: view }) + const feed = () => language.route(`/changelog.xml${changelogQuery({ filter: filter() })}`) return ( -
    + : undefined} + markdown={markdown} + > {i18n.t("changelog.title")} + + {/* Filtered views point to the full changelog; older pages are their own pages. English only. */} + + + -
    -
    +
    + +

    {i18n.t("changelog.hero.subtitle")}

    +
    -
    -
    -

    {i18n.t("changelog.hero.title")}

    -

    {i18n.t("changelog.hero.subtitle")}

    -
    - -
    - -

    - {i18n.t("changelog.empty")}{" "} - {i18n.t("changelog.viewJson")} -

    + {/* Its own boundary, as on the product pages: without it the whole page renders again on the + server once GitHub's releases arrive, and the head tags it adds show twice. */} + + + {(current) => ( + +
    + +
    +
    + } + > +
    + + 0} + fallback={

    {i18n.t("changelog.filter.empty")}

    } + > + +
    + +
    - - {(release) => { - return ( -
    -
    - - -
    -
    - 0}> -
    - {(group) => } -
    -
    - 0 && release.sections.length > 0}> - - - - - {(section) => ( -
    -

    {section.title}

    -
      - {(item) => } -
    -
    - )} -
    -
    -
    -
    - ) - }} -
    - -
    - -
    -
    - - -
    + )} + + + ) } diff --git a/packages/console/app/src/routes/font/index.css b/packages/console/app/src/routes/font/index.css new file mode 100644 index 00000000000..0e685fe4a88 --- /dev/null +++ b/packages/console/app/src/routes/font/index.css @@ -0,0 +1,2870 @@ +/* The font page: no site nav or footer (Site's `bare`), the live typewriter as the hero, then a + type specimen in its own layout system. Colours come only from the site theme. */ + +[data-site][data-page="font"] { + --glyph-ink: var(--text-strong); + /* How strong the shade is: a share of the ink colour, never a fixed grey. */ + --shade-alpha: 22%; + + /* The shade is always the ink at --shade-alpha. Declared on every element, so wherever a panel, + a selected tab or a highlighted word changes --glyph-ink, its shade follows: a lighter blue on + blue, a translucent white on dark, a light grey only on paper. */ + &, + & * { + --glyph-shadow: color-mix(in srgb, var(--glyph-ink) var(--shade-alpha), transparent); + } + --on-link: light-dark(#fff, #0c0c0c); + --pad: clamp(1rem, 2.4vw, 2.5rem); + --anno: 11px; + --hair: color-mix(in srgb, currentColor 16%, transparent); + --hair-strong: color-mix(in srgb, currentColor 32%, transparent); + + [data-component="content"] { + margin: 0; + padding: 0; + } + + /* Elements toggled with the hidden attribute (the confetti canvas, the anagram status) must + really hide, whatever display a slot rule gives them. */ + [hidden] { + display: none !important; + } + + /* Bare chrome: the logo where the sidebar's would be, the GitHub mark in the top-right corner + (github-link.css) and the theme switcher pinned bottom-left. The header itself is fixed (a + 0 × 0 box at the window's corner), so the logo stays put while the page scrolls, level with + the GitHub mark, and the logo menus, placed from the logo's offsets, open under it. */ + + [data-component="bare-chrome"] { + position: fixed; + /* Below the announcement banner while it is on screen (site-banner.css). */ + top: var(--banner-offset, 0px); + left: 0; + z-index: 40; + + [data-slot="logo"] { + position: absolute; + /* The insets keep it clear of the notch in landscape and the status bar when installed; the + banner's height (the header's top) already includes the top inset. */ + top: calc(var(--top) + max(0px, env(safe-area-inset-top, 0px) - var(--banner-offset, 0px))); + left: calc(var(--page-offset) + var(--edge) - var(--bracket-bearing) + env(safe-area-inset-left, 0px)); + } + + /* No backing behind the logo: over a dark or light surface it takes that scheme's artwork + instead (surface.ts, github-link.css). That artwork is the brand's transparent logo + (public/brand/files/opencode-logo-transparent-*.svg): the ink at 20% (light) or 28% (dark) + for the inner square and 70% / 72% for the open letters, so they tint with what is behind. */ + [data-slot="logo"] { + [data-slot="inner"] { + fill: light-dark(rgb(31 31 31 / 0.2), rgb(238 238 238 / 0.28)); + } + + [data-slot="open"] { + fill: light-dark(rgb(31 31 31 / 0.7), rgb(238 238 238 / 0.72)); + } + } + + [data-slot="bare-theme"] { + position: fixed; + z-index: 40; + left: calc(var(--page-offset) + var(--edge) + env(safe-area-inset-left, 0px)); + bottom: calc(var(--edge) + env(safe-area-inset-bottom, 0px)); + background: var(--bg); + color: var(--text-strong); + } + } + + /* Specimen type: mono annotations, huge numerals. */ + + [data-anno] { + font-family: var(--font-mono); + font-size: var(--anno); + font-weight: 400; + line-height: 1.35; + letter-spacing: 0.04em; + text-transform: uppercase; + font-variant-numeric: tabular-nums; + } + + [data-slot="numeral"] { + font-family: var(--font-mono); + font-size: clamp(2.5rem, 5vw, 4.5rem); + font-weight: 400; + line-height: 0.9; + letter-spacing: -0.05em; + font-variant-numeric: tabular-nums; + + &[data-size="xl"] { + font-size: clamp(4rem, 10vw, 9rem); + } + + &[data-size="xxl"] { + font-size: clamp(6rem, 22vw, 20rem); + letter-spacing: -0.07em; + } + } + + /* ───────────────────────── Hero: the live typewriter ───────────────────────── */ + + [data-component="font-hero"] { + position: relative; + height: 100vh; + height: 100svh; + min-height: 32rem; + background: var(--bg); + color: var(--glyph-ink); + + [data-slot="canvas"] { + /* The letters' first size comes from this width (see .letter-output). */ + container-type: inline-size; + position: absolute; + inset: 0; + padding: clamp(88px, 18vh, 100px) 48px; + overflow-x: hidden; + overflow-y: auto; + cursor: text; + display: flex; + flex-direction: column; + align-items: center; + outline: none; + background: var(--bg); + } + + [data-slot="top-bar"] { + position: absolute; + inset: 0 0 auto; + z-index: 3; + display: grid; + grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); + /* The first row is the logo row (--top down, --logo-height tall), so the claim and the + Download button centre on the line the fixed logo and GitHub mark share; taller items + overflow it evenly above and below. */ + grid-template-rows: var(--logo-height); + align-items: center; + /* The right end clears the fixed GitHub mark in the corner (github-link.css). */ + padding: var(--top) var(--github-clear) 0 var(--edge); + pointer-events: none; + } + + [data-slot="top-copy"] { + grid-column: 2; + justify-self: center; + margin: 0; + padding: 9px 16px; + background: var(--bg); + font-family: var(--font-mono); + font-size: var(--mono-size); + line-height: 1.2; + text-align: center; + white-space: nowrap; + pointer-events: auto; + + sup { + font-size: 0.72em; + line-height: 0; + } + } + + [data-slot="tools"] { + grid-column: 3; + justify-self: end; + display: flex; + align-items: center; + pointer-events: auto; + } + + .gif-control { + flex-shrink: 0; + margin-right: 0.5rem; + opacity: 0; + visibility: hidden; + pointer-events: none; + transform: translateX(8px); + transition: + opacity 0.2s linear, + transform 0.2s linear; + + [data-component="site-button"] { + position: relative; + } + } + + .gif-control.is-visible { + opacity: 1; + visibility: visible; + pointer-events: auto; + transform: none; + } + + [data-slot="tooltip"] { + position: absolute; + top: calc(100% + 8px); + right: 0; + padding: 0.375rem 0.625rem; + background: var(--bg-strong); + color: var(--text-inverted); + font-size: 11px; + line-height: 1.4; + white-space: nowrap; + visibility: hidden; + opacity: 0; + pointer-events: none; + transition: opacity 0.12s; + } + + button:is(:focus-visible, [aria-busy="true"]) [data-slot="tooltip"] { + visibility: visible; + opacity: 1; + } + + /* Hover only where it exists: a tap would leave the tip showing. */ + @media (hover: hover) and (pointer: fine) { + button:hover [data-slot="tooltip"] { + visibility: visible; + opacity: 1; + } + } + + [data-component="site-button"]:disabled { + cursor: progress; + opacity: 0.6; + } + + [data-slot="download-icon"] { + flex-shrink: 0; + } + + [data-slot="typing-input"] { + position: absolute; + left: 50%; + top: 50%; + width: 1px; + height: 1px; + opacity: 0; + resize: none; + padding: 0; + border: 0; + font-size: 16px; + overflow: hidden; + } + + [data-slot="confetti"] { + position: fixed; + inset: 0; + width: 100vw; + height: 100vh; + pointer-events: none; + z-index: 30; + } + + [data-slot="anagram-status"] { + position: absolute; + bottom: 5rem; + left: 50%; + z-index: 3; + transform: translateX(-50%); + font-family: var(--font-mono); + font-size: 11px; + letter-spacing: 0.12em; + white-space: nowrap; + pointer-events: none; + } + + @media (max-width: 840px), (pointer: coarse) { + /* The bar spans the hero, so the claim can sit at its bottom. */ + [data-slot="top-bar"] { + bottom: 0; + align-content: start; + grid-template-columns: minmax(0, 1fr) auto; + } + + [data-slot="tools"] { + grid-column: 2; + grid-row: 1; + } + + /* As on the live page, the claim moves to the bottom on small screens, here clear of the + pinned theme switcher. */ + [data-slot="top-copy"] { + /* Spanning the whole bar makes the bar, not one grid column, its containing block. */ + grid-column: 1 / -1; + grid-row: 1; + position: absolute; + top: auto; + bottom: calc(var(--edge) + 2.75rem); + left: 50%; + width: max-content; + max-width: calc(100vw - 40px); + transform: translateX(-50%); + font-size: clamp(9.5px, 2.8vw, 11px); + white-space: normal; + } + + [data-slot="anagram-status"] { + bottom: calc(var(--edge) + 6rem); + } + } + + @media (max-width: 760px) { + [data-slot="canvas"] { + padding: 88px 24px; + } + } + + [data-slot="phone-copy"] { + display: none; + } + + /* On phones the claim sits centred under the wordmark, and the pair is centred together. It + follows the wordmark in the DOM, so it also reads after it. */ + @media (pointer: coarse) and (max-width: 40rem) { + [data-slot="top-copy"] { + display: none; + } + + .letter-output { + margin-block: auto 0; + } + + [data-slot="phone-copy"] { + display: block; + flex-shrink: 0; + max-width: 22rem; + margin: 24px 0 auto; + font-family: var(--font-mono); + font-size: var(--fs-small); + line-height: 1.5; + text-align: center; + text-wrap: balance; + + sup { + font-size: 0.72em; + line-height: 0; + } + } + } + } + + .letter-output { + /* Before the script sets --glyph-size, the same size its renderLetters gives "opencode" (the + width's fit, capped at 161px, in whole multiples of 7px, at least 49px), so the server-rendered + wordmark is already the size it keeps: on phones the 161px default wrapped it onto four lines, + then it shrank to one (a 0.2 layout shift). */ + --render-size: var(--glyph-size, max(49px, round(down, min(161px, (100cqw - 8px) * 42 / 234), 7px))); + flex-shrink: 0; + width: 100%; + margin-block: auto; + position: relative; + text-align: center; + line-height: 0; + overflow-wrap: anywhere; + } + + .export-measurement { + position: fixed; + top: 0; + left: 0; + visibility: hidden; + pointer-events: none; + } + + .glyph { + display: inline-block; + width: calc(var(--render-size) * 24 / 42); + height: var(--render-size); + margin-right: calc(var(--render-size) * 6 / 42); + vertical-align: top; + position: relative; + user-select: none; + + svg { + position: relative; + z-index: 1; + display: block; + width: 100%; + height: 100%; + overflow: visible; + transform-origin: 50% 50%; + transform-box: border-box; + } + } + + .glyph:last-child, + .glyph:has(+ .end-caret) { + margin-right: 0; + } + + .glyph.space { + width: calc(var(--render-size) * 18 / 42); + } + + .glyph.selected { + background: color-mix(in srgb, var(--link) 24%, transparent); + } + + .glyph.break { + width: 0; + margin: 0; + } + + .glyph.before-caret::before, + .end-caret::after { + content: ""; + position: absolute; + left: -5px; + top: -5%; + height: 110%; + width: 2px; + background: currentColor; + animation: font-blink 1s step-end infinite; + } + + .end-caret { + position: relative; + display: inline-block; + height: var(--render-size); + width: 0; + vertical-align: top; + } + + .end-caret::after { + left: 2px; + } + + .letter-output:not(.focused) .end-caret::after, + .letter-output:not(.focused) .before-caret::before { + display: none; + } + + /* ───────────────────────── Shared glyph drawing ───────────────────────── */ + + [data-slot="ink"] { + fill: var(--glyph-ink); + } + + [data-slot="shadow"] { + fill: var(--glyph-shadow); + } + + [data-slot="outline"] { + fill: none; + stroke: var(--glyph-ink); + stroke-width: 1px; + } + + [data-slot="ghost"] { + fill: none; + stroke: var(--hair-strong); + stroke-width: 1px; + stroke-dasharray: 4 3; + } + + [data-component="font-word"] { + display: block; + flex-shrink: 0; + max-width: none; + width: calc(var(--m, 4px) * var(--cols)); + height: calc(var(--m, 4px) * 7); + overflow: visible; + } + + /* A word sized to fill its container on whole-pixel modules. The container sets --cols. */ + [data-fill] { + container-type: inline-size; + + [data-component="font-word"] { + --m: calc(100cqw / var(--cols)); + + @supports (width: round(down, 1px, 1px)) { + --m: round(down, calc(100cqw / var(--cols)), 1px); + } + } + } + + /* One continuous strip: an outer border once, a single 1px divider between squares. */ + [data-slot="letter-tabs"] { + --tab-line: var(--hair); + display: flex; + align-self: flex-start; + border: 1px solid var(--tab-line); + + button { + display: grid; + place-items: center; + width: 2.75rem; + height: 3.25rem; + transition: background-color 150ms ease; + + & + button { + border-left: 1px solid var(--tab-line); + } + + svg { + width: 12px; + height: 21px; + } + + &[aria-pressed="true"] { + background: var(--link); + --glyph-ink: var(--on-link); + --shade-alpha: 38%; + } + + /* The focus ring sits inside the square, so the strip's edges never clip it. */ + &:focus-visible { + outline: 2px solid var(--link); + outline-offset: -2px; + } + + &[aria-pressed="true"]:focus-visible { + outline-color: var(--on-link); + outline-offset: -4px; + } + + @media (hover: hover) and (pointer: fine) { + &:hover:not([aria-pressed="true"]) { + background: var(--hair); + } + } + + &:active:not([aria-pressed="true"]) { + background: var(--hair); + } + } + } + + [data-slot="axis"] { + display: grid; + grid-template-columns: 5.5rem minmax(6rem, 1fr) 3.5rem; + align-items: center; + gap: 0.75rem; + + input { + width: 100%; + accent-color: var(--link); + } + + output { + text-align: right; + } + } + + /* ───────────────────────── Plates ───────────────────────── */ + + [data-component="specimen"] { + font-family: var(--font-sans); + } + + [data-plate] { + position: relative; + padding: 1rem var(--pad) clamp(5rem, 10vw, 9rem); + background: var(--bg); + color: var(--text-strong); + scroll-margin-top: 0; + } + + [data-tone="ink"] { + /* The inverted panel takes the other theme's blue, so blue text keeps its contrast on it. */ + --link: light-dark(var(--link-dark), #3b5cf6); + --bg: var(--bg-strong); + --glyph-ink: var(--text-inverted); + --shade-alpha: 30%; + background: var(--bg-strong); + color: var(--text-inverted); + } + + [data-tone="blue"] { + --bg: var(--link); + --glyph-ink: var(--on-link); + --shade-alpha: 38%; + background: var(--link); + color: var(--on-link); + } + + /* Windows wider than the layout centre it (site.css); two copies of the box, shifted out by the + room on each side, carry the plates' colour (and the blue universe bands') to the window's + edges without changing their layout. Zero below 1728px. */ + :is([data-plate], [data-slot="universe-stage"], [data-slot="universe-notes"]) { + box-shadow: + calc(-1 * var(--page-offset)) 0 0 var(--plate-bleed, var(--bg)), + var(--page-offset-end) 0 0 var(--plate-bleed, var(--bg)); + } + + :is([data-slot="universe-stage"], [data-slot="universe-notes"]) { + --plate-bleed: var(--universe-blue); + } + + [data-slot="plate-head"] { + display: grid; + grid-template-columns: 8rem minmax(0, 1fr) auto; + gap: 1rem; + padding-bottom: 0.75rem; + border-bottom: 1px solid currentColor; + + h2 { + margin: 0; + } + + @media (max-width: 40rem) { + grid-template-columns: 4.5rem minmax(0, 1fr); + + [data-slot="plate-aside"] { + display: none; + } + } + } + + [data-slot="plate-lead"] { + max-width: 24ch; + margin: clamp(2.5rem, 5vw, 4rem) 0 clamp(3rem, 5vw, 4rem); + font-size: clamp(1.625rem, 3vw, 2.75rem); + font-weight: 400; + line-height: 1.04; + letter-spacing: -0.035em; + text-wrap: balance; + } + + [data-plate] button:not([data-component="site-button"], [role="gridcell"], [data-slot="letter-tabs"] button) { + font-family: var(--font-mono); + font-size: var(--anno); + letter-spacing: 0.04em; + text-transform: uppercase; + } + + [data-slot="transport"], + [data-slot="anagram-controls"], + [data-slot="toggles"] { + button { + height: 2rem; + padding: 0 0.75rem; + border: 1px solid var(--hair-strong); + color: inherit; + transition: background-color 150ms ease; + + &[aria-pressed="true"] { + background: var(--glyph-ink); + border-color: var(--glyph-ink); + color: var(--bg); + } + + &:disabled { + opacity: 0.45; + cursor: default; + } + + @media (hover: hover) and (pointer: fine) { + &:hover:not(:disabled, [aria-pressed="true"]) { + background: var(--hair); + } + } + + &:active:not(:disabled, [aria-pressed="true"]) { + background: var(--hair); + } + } + } + + /* 01 Cover */ + + [data-slot="cover"] { + position: relative; + display: grid; + grid-template-columns: repeat(12, minmax(0, 1fr)); + gap: 2rem var(--pad); + padding-top: clamp(2.5rem, 6vw, 5rem); + overflow: hidden; + margin-inline: calc(-1 * var(--pad)); + padding-inline: var(--pad); + } + + /* The title and its facts take the left seven columns, the contents the right four. */ + [data-slot="cover-copy"] { + grid-column: 1 / span 7; + position: relative; + z-index: 1; + display: flex; + flex-direction: column; + gap: 2.5rem; + } + + [data-slot="cover-title"] { + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 1rem; + + [data-fill] { + display: block; + width: 100%; + } + } + + /* The plotted title. The canvas reads its colours from these properties. */ + [data-slot="cover-word"] { + display: block; + width: 100%; + cursor: pointer; + + canvas { + display: block; + width: 100%; + max-width: 100%; + aspect-ratio: 41 / 11.1; + color: var(--glyph-ink); + border-top-color: var(--link); + outline-color: var(--text-weaker); + } + } + + [data-slot="cover-font"] { + font-family: var(--font-mono); + font-size: 1.125rem; + line-height: 1; + letter-spacing: 0.02em; + } + + [data-slot="cover-lead"] { + max-width: 30ch; + font-size: clamp(1.125rem, 1.6vw, 1.375rem); + line-height: 1.3; + letter-spacing: -0.01em; + } + + [data-slot="cover-facts"], + [data-slot="credits"] { + display: grid; + grid-template-columns: repeat(2, minmax(0, 1fr)); + max-width: 32rem; + border-top: 1px solid currentColor; + + div { + display: flex; + justify-content: space-between; + align-items: baseline; + gap: 1rem; + padding: 0.5rem 0; + border-bottom: 1px solid var(--hair); + } + + div:nth-child(odd) { + padding-right: 1rem; + } + } + + [data-slot="contents"] { + grid-column: 9 / span 4; + position: relative; + z-index: 1; + + ol { + margin: 0.75rem 0 0; + padding: 0; + list-style: none; + border-top: 1px solid currentColor; + } + + a { + display: flex; + gap: 1rem; + padding: 0.4rem 0; + border-bottom: 1px solid var(--hair); + font-size: 0.9375rem; + transition: color 150ms ease; + + @media (hover: hover) and (pointer: fine) { + &:hover { + color: var(--link); + } + } + + &:active { + color: var(--link); + } + } + } + + [data-slot="cover-stats"] { + grid-column: 1 / -1; + display: grid; + grid-template-columns: repeat(4, minmax(0, 1fr)); + gap: var(--pad); + margin-top: clamp(3rem, 8vw, 7rem); + border-top: 1px solid currentColor; + padding-top: 1rem; + + div { + display: flex; + flex-direction: column-reverse; + justify-content: flex-end; + gap: 0.75rem; + } + } + + @media (max-width: 60rem) { + [data-slot="cover-copy"], + [data-slot="contents"] { + grid-column: 1 / -1; + } + + [data-slot="cover-stats"] { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } + } + + /* 02 Construction */ + + [data-component="construction-figure"] { + display: block; + width: 100%; + height: auto; + overflow: visible; + font-family: var(--font-mono); + + [data-slot="grid"] line { + stroke: var(--hair-strong); + stroke-width: 0.08; + } + + [data-slot="metrics"] { + line { + stroke: var(--link); + stroke-width: 0.1; + } + + text { + fill: var(--link); + font-size: 1.15px; + letter-spacing: 0.04em; + text-transform: uppercase; + } + } + + [data-slot="modules"] rect { + fill: var(--glyph-ink); + + &[data-new] { + fill: var(--link); + } + } + + /* The shade is a translucent wash of the ink, so the grid stays visible through the counter. */ + [data-slot="shade"] rect { + fill: var(--glyph-ink); + fill-opacity: 0.2; + } + + [data-slot="trace"] { + fill: none; + stroke: var(--link); + stroke-width: 0.3; + stroke-linejoin: miter; + } + + [data-slot="anchors"] rect { + fill: var(--bg); + stroke: var(--link); + stroke-width: 1px; + } + + [data-slot="callouts"] { + path { + fill: none; + stroke: currentColor; + stroke-width: 0.1; + } + + text { + fill: currentColor; + font-size: 1.25px; + } + } + + [data-slot="readout"] { + fill: currentColor; + font-size: 1.25px; + letter-spacing: 0.04em; + text-transform: uppercase; + } + } + + [data-slot="construction-stage"] { + display: grid; + grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); + gap: var(--pad); + align-items: start; + + @media (max-width: 60rem) { + grid-template-columns: minmax(0, 1fr); + } + } + + /* As large as the window allows: the figure is 48 × 64 units. */ + [data-slot="construction-main"] { + width: min(100%, calc(82vh * 48 / 64)); + margin-inline: auto; + } + + [data-slot="construction-side"] { + display: flex; + flex-direction: column; + gap: 2rem; + + [data-slot="letter-tabs"] { + --tab-line: var(--hair-strong); + } + } + + [data-slot="phases"] { + margin: 0; + padding: 0; + list-style: none; + border-top: 1px solid currentColor; + + li { + position: relative; + display: grid; + grid-template-columns: 2.5rem minmax(0, 1fr) auto; + align-items: baseline; + gap: 1rem; + padding: 0.75rem 0; + border-bottom: 1px solid var(--hair); + font-size: 1.25rem; + letter-spacing: -0.01em; + opacity: 0.55; + transition: opacity 150ms ease; + + &[data-active], + &[data-done] { + opacity: 1; + } + } + + [data-slot="phase-bar"] { + position: absolute; + left: 0; + bottom: -1px; + height: 2px; + width: 100%; + background: var(--link); + transform-origin: left; + transform: scaleX(var(--progress)); + } + } + + [data-slot="transport"] { + display: flex; + flex-wrap: wrap; + align-items: center; + gap: 0.5rem 0.75rem; + + label { + flex: 1 1 10rem; + display: flex; + } + + input { + width: 100%; + accent-color: var(--link); + } + } + + [data-slot="construction-row"] { + display: grid; + grid-template-columns: repeat(6, minmax(0, 1fr)); + gap: var(--pad); + margin-top: clamp(4rem, 8vw, 7rem); + padding-top: 1rem; + border-top: 1px solid var(--hair-strong); + + figure { + margin: 0; + display: flex; + flex-direction: column; + gap: 0.75rem; + } + + /* Too small to read: the small figures keep the drawing and drop the labels. */ + [data-component="construction-figure"] text { + display: none; + } + + @media (max-width: 60rem) { + grid-template-columns: repeat(3, minmax(0, 1fr)); + } + } + + /* 03 Timeline */ + + [data-slot="gantt"] { + position: relative; + display: flex; + flex-direction: column; + gap: 0.75rem; + padding-left: 5rem; + } + + [data-slot="gantt-ticks"] { + position: relative; + height: 1.5rem; + border-bottom: 1px solid currentColor; + + span { + position: absolute; + bottom: 0.375rem; + transform: translateX(-50%); + color: var(--text-weak); + } + + span:first-child { + transform: none; + } + } + + [data-slot="gantt-row"] { + position: relative; + height: 3.5rem; + border-bottom: 1px solid var(--hair); + } + + [data-slot="gantt-label"] { + position: absolute; + left: -5rem; + top: 0; + bottom: 0; + display: flex; + align-items: center; + gap: 0.75rem; + + svg { + width: 16px; + height: 28px; + } + } + + [data-slot="gantt-track"] { + position: absolute; + inset: 0.5rem 0; + } + + [data-slot="gantt-bar"] { + position: absolute; + top: 0; + bottom: 0; + display: flex; + align-items: center; + padding-left: 0.375rem; + overflow: hidden; + background: var(--text-strong); + color: var(--text-inverted); + /* Bars appear whole on their step, staggered by start time: nothing on /font grows into place. */ + visibility: hidden; + transition: visibility 0s var(--delay); + + &[data-phase="grid"], + &[data-phase="metrics"] { + background: var(--bg-weaker); + color: var(--text-strong); + } + + &[data-phase="modules"] { + background: var(--link); + color: var(--on-link); + } + + &[data-phase="shade"] { + background: var(--logo-inner); + color: var(--text-strong); + } + + &[data-phase="outline"] { + background: transparent; + color: var(--link); + box-shadow: inset 0 0 0 1px var(--link); + } + + span { + white-space: nowrap; + font-size: 10px; + } + } + + [data-slot="gantt"][data-seen] [data-slot="gantt-bar"] { + visibility: visible; + } + + [data-slot="gantt-playhead"] { + position: absolute; + top: 0; + bottom: 0; + left: 5rem; + width: 1px; + background: var(--link); + opacity: 0; + } + + [data-slot="gantt"][data-seen] [data-slot="gantt-playhead"] { + opacity: 1; + animation: font-playhead var(--total) linear 800ms infinite; + } + + /* Phones (under 34rem): the bars are 20–40px wide, too short for GRID or METRICS, so their names + go transparent (still read out) and a legend under the chart names the phase colours, the + bars' own fills. Wider screens keep the names in the bars and no legend. */ + [data-slot="gantt-legend"] { + display: none; + } + + @media (max-width: 34rem) { + [data-slot="gantt-bar"] > span { + color: transparent; + } + + [data-slot="gantt-legend"] { + display: flex; + flex-wrap: wrap; + gap: 0.5rem 1rem; + margin: 1rem 0 0; + padding: 0; + list-style: none; + + li { + display: flex; + align-items: center; + gap: 0.5rem; + } + } + + [data-slot="gantt-swatch"] { + flex: none; + width: 0.75rem; + height: 0.75rem; + background: var(--text-strong); + + &[data-phase="grid"], + &[data-phase="metrics"] { + background: var(--bg-weaker); + } + + &[data-phase="modules"] { + background: var(--link); + } + + &[data-phase="shade"] { + background: var(--logo-inner); + } + + &[data-phase="outline"] { + background: transparent; + box-shadow: inset 0 0 0 1px var(--link); + } + } + } + + /* 04 Exploded */ + + [data-slot="exploded-scroll"] { + height: 240vh; + + > [data-plate] { + position: sticky; + top: 0; + min-height: 100vh; + min-height: 100svh; + overflow: hidden; + } + + [data-slot="plate-lead"] { + margin-block: 2rem 0; + font-size: clamp(1.25rem, 2.2vw, 2rem); + max-width: 30ch; + } + + @media (prefers-reduced-motion: reduce) { + height: auto; + + > [data-plate] { + position: relative; + } + } + } + + [data-slot="exploded-stage"] { + display: grid; + grid-template-columns: minmax(0, 1fr) 20rem; + gap: var(--pad); + align-items: end; + + svg { + display: block; + width: 100%; + max-height: 72vh; + overflow: visible; + } + + [data-slot="footprint"] line { + stroke: var(--hair-strong); + stroke-width: 0.3; + } + + [data-tone="ink"] { + [data-face="top"] { + fill: var(--link); + } + + [data-face="front"] { + fill: var(--text-strong); + } + + [data-face="right"] { + fill: color-mix(in srgb, var(--link) 45%, var(--text-strong)); + } + } + + /* Shade blocks are translucent, so the footprint grid shows through them. */ + [data-tone="shade"] { + polygon { + fill: var(--text-strong); + fill-opacity: 0.18; + stroke: var(--text-strong); + stroke-opacity: 0.35; + } + + [data-face="top"] { + fill-opacity: 0.1; + } + } + + polygon { + stroke: var(--bg); + stroke-width: 0.25; + stroke-linejoin: round; + } + + [data-slot="leader"] { + polyline { + fill: none; + stroke: currentColor; + stroke-width: 0.3; + } + + circle { + fill: currentColor; + } + + text { + fill: currentColor; + font-family: var(--font-mono); + font-size: 3px; + letter-spacing: 0.04em; + text-transform: uppercase; + } + + [data-slot="leader-sub"] { + fill: var(--link); + } + } + + @media (max-width: 60rem) { + grid-template-columns: minmax(0, 1fr); + + [data-slot="leader"] { + display: none; + } + } + } + + [data-slot="exploded-controls"] { + display: flex; + flex-direction: column; + gap: 1.5rem; + + [data-slot="axis"] { + grid-template-columns: 4.5rem minmax(0, 1fr) 3rem; + } + } + + /* The rule, written out: the formula large in mono, its terms below. */ + [data-slot="formula"] { + display: flex; + flex-direction: column; + gap: 0.5rem; + padding: 0.75rem 0; + border-block: 1px solid var(--hair); + + p:first-child { + font-family: var(--font-mono); + font-size: 1.25rem; + letter-spacing: -0.01em; + color: var(--link); + } + + [data-anno] { + color: var(--text-weak); + } + } + + [data-slot="exploded-controls"] [data-slot="toggles"] { + display: flex; + gap: 0.25rem; + } + + /* Cast shadows: the ink at low opacity, set per polygon from the block's height. */ + [data-slot="shadows"] polygon { + fill: var(--text-strong); + stroke: none; + } + + [data-slot="centroid"] circle { + fill: var(--link); + } + + [data-slot="exploded-stats"] { + display: grid; + grid-template-columns: 1fr 1fr; + border-top: 1px solid currentColor; + + div { + padding-top: 0.5rem; + } + + dd { + font-family: var(--font-mono); + font-size: 2.5rem; + letter-spacing: -0.04em; + } + } + + /* 05 Passports */ + + [data-slot="passports"] { + display: grid; + grid-template-columns: repeat(3, minmax(0, 1fr)); + gap: var(--pad); + + @media (max-width: 70rem) { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } + + @media (max-width: 40rem) { + grid-template-columns: minmax(0, 1fr); + } + } + + [data-slot="passport"] { + display: flex; + flex-direction: column; + border: 1px solid currentColor; + + > header { + display: flex; + justify-content: space-between; + padding: 0.5rem 0.75rem; + background: var(--text-strong); + color: var(--text-inverted); + } + } + + [data-slot="passport-body"] { + display: grid; + grid-template-columns: 40% minmax(0, 1fr); + border-bottom: 1px solid currentColor; + } + + [data-slot="passport-photo"] { + /* Translucent shade over the photo's grid. */ + [data-slot="shadow"] { + fill: var(--glyph-ink); + fill-opacity: 0.2; + } + + padding: 0.75rem; + border-right: 1px solid currentColor; + background: var(--bg-weak); + outline-offset: -3px; + + svg { + display: block; + width: 100%; + overflow: visible; + } + + [data-slot="photo-grid"] line { + stroke: var(--hair-strong); + stroke-width: 1px; + vector-effect: non-scaling-stroke; + } + + [data-slot="photo-measure"] { + opacity: 0; + transition: opacity 200ms ease; + + line, + path { + fill: none; + stroke: var(--link); + stroke-width: 1px; + vector-effect: non-scaling-stroke; + } + + text { + fill: var(--link); + font-family: var(--font-mono); + font-size: 2.6px; + } + } + + &:focus-visible [data-slot="photo-measure"] { + opacity: 1; + } + + @media (hover: hover) and (pointer: fine) { + &:hover [data-slot="photo-measure"] { + opacity: 1; + } + } + + /* Touch: a tap focuses the photo (it has a tab stop), which shows the measurements. */ + @media (hover: none), (pointer: coarse) { + &:focus [data-slot="photo-measure"] { + opacity: 1; + } + } + } + + [data-slot="passport-fields"] { + margin: 0; + + div { + display: flex; + flex-direction: column; + gap: 0.125rem; + padding: 0.4rem 0.75rem; + border-bottom: 1px solid var(--hair); + } + + div:last-child { + border-bottom: 0; + } + + dt { + color: var(--text-weak); + font-size: 10px; + } + + dd { + margin: 0; + font-size: 0.875rem; + } + } + + /* Every outline point shows; no scrolling inside the card. */ + [data-slot="points"] { + display: table; + width: 100%; + border-collapse: collapse; + font-family: var(--font-mono); + font-size: 11px; + font-variant-numeric: tabular-nums; + + caption { + display: block; + padding: 0.5rem 0.75rem; + text-align: left; + color: var(--text-weak); + } + + thead, + tbody { + display: block; + } + + tr { + display: grid; + grid-template-columns: 2.5rem 4.5rem 1fr 1fr; + } + + thead { + position: sticky; + top: 0; + background: var(--bg); + } + + th, + td { + padding: 0.2rem 0.75rem; + text-align: left; + font-weight: 400; + border-bottom: 1px solid var(--hair); + } + + th { + color: var(--text-weak); + } + } + + [data-slot="mrz"] { + display: flex; + flex-direction: column; + margin-top: auto; + padding: 0.75rem; + border-top: 1px solid currentColor; + font-family: var(--font-mono); + font-size: clamp(8px, 0.72vw, 11px); + letter-spacing: 0.08em; + white-space: nowrap; + overflow: hidden; + } + + /* 06 Analysis */ + + [data-slot="charts"] { + display: grid; + grid-template-columns: repeat(3, minmax(0, 1fr)); + border-top: 1px solid currentColor; + border-left: 1px solid var(--hair); + + @media (max-width: 70rem) { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } + + @media (max-width: 40rem) { + grid-template-columns: minmax(0, 1fr); + } + } + + [data-slot="chart"] { + display: flex; + flex-direction: column; + gap: 1.5rem; + margin: 0; + padding: 1rem 1rem 1.5rem; + border-right: 1px solid var(--hair); + border-bottom: 1px solid var(--hair); + + &[data-wide] { + grid-column: span 2; + + @media (max-width: 40rem) { + grid-column: auto; + } + } + + > header { + display: flex; + justify-content: space-between; + gap: 1rem; + } + + /* The figure sits in the middle of the space between the header and the caption; fixed-size + figures also centre horizontally, while bar charts keep the full width. */ + > :not(header, figcaption) { + margin-block: auto; + } + + > :is(svg, [data-slot="numerals"], [data-slot="contrast"], [data-slot="heatmap"], [data-slot="matrix"]) { + align-self: center; + } + + figcaption { + color: var(--text-weak); + font-size: 0.875rem; + line-height: 1.4; + text-wrap: pretty; + } + } + + [data-slot="mini"] { + display: block; + width: 10px; + height: 17.5px; + } + + [data-slot="bars"], + [data-slot="symmetry"] { + display: flex; + flex-direction: column; + gap: 0.5rem; + + > div { + display: grid; + grid-template-columns: 1rem minmax(0, 1fr) 4.5rem; + align-items: center; + gap: 0.75rem; + } + + [data-anno] { + text-align: right; + } + } + + [data-slot="symmetry"] > div { + grid-template-columns: 1rem minmax(0, 1fr) minmax(0, 1fr) 6rem; + } + + [data-slot="bar-track"] { + display: flex; + height: 0.875rem; + background: var(--bg-weak); + } + + [data-slot="bar"] { + height: 100%; + visibility: hidden; + transition: visibility 0s calc(var(--i, 0) * 90ms); + + &[data-tone="ink"] { + background: var(--link); + } + + &[data-tone="shade"] { + background: var(--logo-inner); + } + + &[data-tone="dark"] { + background: var(--text-strong); + } + } + + [data-slot="charts"][data-seen] [data-slot="bar"] { + visibility: visible; + } + + [data-slot="numerals"] { + display: grid; + grid-template-columns: repeat(6, minmax(0, 1fr)); + gap: 1rem; + + div { + display: flex; + flex-direction: column; + gap: 0.5rem; + padding-top: 0.5rem; + border-top: 1px solid currentColor; + } + + [data-slot="numeral"] { + font-size: clamp(1.75rem, 3.6vw, 3.5rem); + } + + @media (max-width: 40rem) { + grid-template-columns: repeat(3, minmax(0, 1fr)); + } + } + + [data-slot="scatter"] { + width: 100%; + overflow: visible; + font-family: var(--font-mono); + + [data-slot="axis-line"] { + stroke: var(--hair); + stroke-width: 0.3; + } + + [data-slot="axis"] { + stroke: currentColor; + stroke-width: 0.4; + } + + [data-slot="trend"] { + stroke: var(--link); + stroke-width: 0.4; + stroke-dasharray: 1.5 1; + } + + rect { + fill: var(--link); + } + + text { + fill: currentColor; + font-size: 3.6px; + } + } + + [data-slot="contrast"] { + display: flex; + flex-direction: column; + gap: 0.75rem; + color: var(--link); + } + + [data-slot="heatmap"], + [data-slot="matrix"] { + display: flex; + flex-direction: column; + gap: 2px; + align-self: start; + + > div { + display: flex; + gap: 2px; + } + + [role="cell"] { + display: grid; + place-items: center; + width: 2.25rem; + height: 2.25rem; + /* Capped at 70% blue, so the count in the text colour stays readable on every cell. */ + background: color-mix(in srgb, var(--link) calc(var(--heat) * 70%), var(--bg-weak)); + color: var(--text-strong); + font-family: var(--font-mono); + font-size: 0.75rem; + } + } + + [data-slot="matrix"] { + > div > span { + display: grid; + place-items: center; + width: 2rem; + height: 2rem; + } + + [role="cell"] { + width: 2rem; + height: 2rem; + } + } + + [data-slot="columns"] { + display: grid; + grid-template-columns: repeat(6, minmax(0, 1fr)); + align-items: end; + gap: 0.75rem; + height: 12rem; + + > div { + display: flex; + flex-direction: column; + align-items: center; + justify-content: flex-end; + gap: 0.5rem; + height: 100%; + } + } + + [data-slot="column-bar"] { + display: flex; + justify-content: center; + align-items: flex-start; + width: 100%; + height: calc(var(--value) * 100%); + padding-top: 0.25rem; + background: var(--link); + color: var(--on-link); + visibility: hidden; + transition: visibility 0s calc(var(--i) * 90ms); + } + + [data-slot="charts"][data-seen] [data-slot="column-bar"] { + visibility: visible; + } + + /* 07 Kerning */ + + [data-slot="kerning"] { + /* Whole-pixel cells, so the table's rows land on pixels. */ + --kern-cell: round(down, clamp(2.5rem, 6vw, 5rem), 1px); + display: grid; + grid-template-columns: auto minmax(0, 1fr); + gap: var(--pad); + align-items: start; + container-type: inline-size; + + @media (max-width: 60rem) { + grid-template-columns: minmax(0, 1fr); + } + } + + /* Side by side, the table's cells (below the header row) centre on the pair's x-height body. + The o's ink runs rows 1–6 of its 7, so its centre is the word's: 3.5 modules down, with the + module m as the word computes it (the pair column's width / 9). The cells' centre is the + header row plus three rows. */ + @media (min-width: 60.0625rem) { + [data-slot="kerning"]:not([data-share] *) { + --kern-m: round(down, calc((100cqw - 7 * var(--kern-cell) - var(--pad)) / 9), 1px); + --kern-offset: round(calc(4 * var(--kern-cell) - 3.5 * var(--kern-m)), 1px); + + [data-slot="kern-table"] { + margin-top: max(0px, -1 * var(--kern-offset)); + } + + [data-slot="kern-pair"] { + margin-top: max(0px, var(--kern-offset)); + } + } + } + + [data-slot="kern-table"] { + display: flex; + flex-direction: column; + + > div { + display: flex; + } + + > div > span, + button { + display: grid; + place-items: center; + width: var(--kern-cell); + height: var(--kern-cell); + } + + button { + border: 1px solid var(--hair); + margin: 0 -1px -1px 0; + font-family: var(--font-mono); + font-size: clamp(1.25rem, 3vw, 2.5rem); + letter-spacing: -0.04em; + color: inherit; + transition: background-color 120ms ease; + + &[aria-selected="true"] { + background: var(--link); + color: var(--on-link); + } + } + } + + [data-slot="kern-pair"] { + display: flex; + flex-direction: column; + gap: 1.5rem; + container-type: inline-size; + + [data-component="font-word"] { + --m: round(down, calc(100cqw / 9), 1px); + } + } + + [data-slot="kern-gap"] { + position: relative; + width: calc(100cqw / 9 * 1); + width: round(down, calc(100cqw / 9), 1px); + height: 0; + margin-left: round(down, calc(100cqw / 9 * 4), 1px); + margin-top: -1rem; + border-top: 1px solid var(--link); + color: var(--link); + + span { + position: absolute; + top: 0.25rem; + left: 50%; + transform: translateX(-50%); + font-family: var(--font-mono); + font-size: 0.75rem; + } + } + + /* The totals in one row on the plate's columns: 36 under the table, 0 under the pair, each + label beside its number on a shared baseline. Narrow: they wrap only if they can't fit. */ + [data-slot="kern-total"] { + grid-column: 1 / -1; + display: grid; + grid-template-columns: subgrid; + align-items: last baseline; + margin-top: clamp(3rem, 8vw, 6rem); + + > div { + display: flex; + align-items: last baseline; + gap: 1.5rem; + } + + > div:nth-child(2) [data-slot="numeral"] { + color: var(--link); + } + + @media (max-width: 60rem) { + display: flex; + flex-wrap: wrap; + gap: 0 var(--pad); + } + } + + /* 08 Performance */ + + [data-slot="performance"] { + display: grid; + grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); + gap: var(--pad); + + @media (max-width: 60rem) { + grid-template-columns: minmax(0, 1fr); + } + } + + [data-slot="stats"] { + display: grid; + grid-template-columns: repeat(2, minmax(0, 1fr)); + border-top: 1px solid currentColor; + + > div { + display: flex; + flex-direction: column; + gap: 0.5rem; + padding: 1rem 1rem 1.5rem 0; + border-bottom: 1px solid var(--hair); + } + + dd { + display: flex; + flex-wrap: wrap; + align-items: baseline; + gap: 0.25rem 0.75rem; + margin: 0; + } + + dt { + color: var(--text-weak); + font-size: 0.875rem; + } + + /* Small phones: one stat a row. Two across left "19,832" (40px mono) a 136px column at 320px, + so the number ran into the next stat. */ + @media (max-width: 24rem) { + grid-template-columns: minmax(0, 1fr); + } + } + + [data-slot="benchmark"] { + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 1rem; + padding: 1rem; + background: var(--link); + color: var(--on-link); + + [data-component="site-button"] { + margin-top: auto; + } + } + + [data-slot="points-table"] { + grid-column: 1 / -1; + display: grid; + grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); + gap: var(--pad); + + table { + width: 100%; + border-collapse: collapse; + font-family: var(--font-mono); + font-size: 0.8125rem; + font-variant-numeric: tabular-nums; + } + + caption { + padding-bottom: 0.5rem; + text-align: left; + } + + th, + td { + padding: 0.4rem 0.75rem 0.4rem 0; + text-align: left; + font-weight: 400; + border-bottom: 1px solid var(--hair); + } + + thead th { + border-bottom-color: currentColor; + color: var(--text-weak); + } + + @media (max-width: 60rem) { + grid-template-columns: minmax(0, 1fr); + } + } + + /* 09 Poster */ + + [data-slot="poster"] { + position: relative; + display: flex; + flex-direction: column; + gap: clamp(1.5rem, 4vw, 3rem); + margin-top: 3rem; + padding: clamp(2rem, 5vw, 4rem); + } + + /* Crop marks: short hairlines just outside each corner of the trim. */ + [data-slot="crop"] { + position: absolute; + width: 0; + height: 0; + + &::before, + &::after { + content: ""; + position: absolute; + background: currentColor; + } + + &::before { + width: 1.25rem; + height: 1px; + } + + &::after { + width: 1px; + height: 1.25rem; + } + + &[data-corner="tl"] { + top: 0; + left: 0; + } + + &[data-corner="tr"] { + top: 0; + right: 0; + } + + &[data-corner="bl"] { + bottom: 0; + left: 0; + } + + &[data-corner="br"] { + bottom: 0; + right: 0; + } + + &:is([data-corner="tl"], [data-corner="bl"])::before { + right: 0.5rem; + } + + &:is([data-corner="tr"], [data-corner="br"])::before { + left: 0.5rem; + } + + &:is([data-corner="tl"], [data-corner="tr"])::after { + bottom: 0.5rem; + } + + &:is([data-corner="bl"], [data-corner="br"])::after { + top: 0.5rem; + } + } + + [data-slot="registration"] { + position: absolute; + top: -0.75rem; + left: 50%; + width: 1.5rem; + transform: translate(-50%, -50%); + fill: none; + stroke: currentColor; + stroke-width: 0.8; + } + + [data-slot="poster-line"] { + display: flex; + flex-direction: column; + gap: 0.75rem; + container-type: inline-size; + + &[data-align="end"] { + align-items: flex-end; + flex-direction: column-reverse; + } + + [data-component="font-word"] { + --m: round(down, calc(100cqw / var(--cols)), 1px); + } + } + + [data-slot="poster-row"] { + display: grid; + grid-template-columns: 1fr 1fr; + gap: clamp(1rem, 3vw, 3rem); + + > div { + container-type: inline-size; + } + + [data-component="font-word"] { + --m: round(down, calc(100cqw / var(--cols)), 1px); + } + } + + [data-slot="colour-bar"] { + display: flex; + align-items: center; + gap: 0; + + span[data-swatch] { + width: 2rem; + height: 1rem; + border: 1px solid currentColor; + } + + [data-swatch="paper"] { + background: light-dark(var(--bg), #fff); + } + + [data-swatch="ink"] { + background: #141414; + } + + [data-swatch="blue"] { + background: var(--link); + } + + [data-swatch="shade"] { + background: #cecece; + } + + [data-anno] { + margin-left: 1rem; + } + } + + /* 10 Waterfall */ + + [data-slot="waterfall"] { + margin: 0 calc(-1 * var(--pad)); + padding: 0; + list-style: none; + border-top: 1px solid currentColor; + + li { + display: grid; + grid-template-columns: 12rem minmax(0, 1fr); + align-items: center; + /* At least 1.5rem above and below, so the 7–21px rows breathe; larger rows scale with their module. */ + min-height: 4.5rem; + padding: max(1.5rem, calc(var(--m) * 1.5)) 0 max(1.5rem, calc(var(--m) * 1.5)) var(--pad); + border-bottom: 1px solid var(--hair); + + /* Phones put the size and its ruler above the line, so the line gets the full width and the + large rulers are not cut off. */ + @media (max-width: 40rem) { + grid-template-columns: minmax(0, 1fr); + gap: 12px; + padding-block: max(1.5rem, calc(var(--m) * 0.75)); + } + } + } + + /* The size, then a ruler of four modules drawn at that size; centred in the row like the line. */ + [data-slot="waterfall-scale"] { + display: flex; + flex-direction: column; + gap: 0.5rem; + min-width: 0; + padding-right: 1rem; + overflow: hidden; + + [data-anno] { + color: var(--text-weak); + white-space: nowrap; + } + + @media (max-width: 40rem) { + flex-direction: row; + align-items: center; + gap: 12px; + padding-right: var(--pad); + } + } + + [data-slot="ruler"] { + display: flex; + + span { + flex-shrink: 0; + width: var(--m); + height: var(--m); + box-shadow: inset 0 0 0 1px var(--link); + } + + span:nth-child(odd) { + background: var(--link); + } + } + + [data-slot="waterfall-line"] { + overflow: hidden; + } + + /* 11 Anagrams */ + + [data-slot="anagram"] { + display: grid; + grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); + gap: 2rem var(--pad); + + @media (max-width: 60rem) { + grid-template-columns: minmax(0, 1fr); + } + } + + [data-slot="anagram-counter"] { + display: flex; + align-items: baseline; + gap: 1rem; + } + + [data-slot="anagram-word"] { + grid-column: 1 / -1; + container-type: inline-size; + padding-block: 2rem; + border-block: 1px solid var(--hair-strong); + + [data-component="font-word"] { + --m: round(down, calc(100cqw / 39), 1px); + } + + &[data-real] { + --glyph-ink: var(--link); + } + } + + [data-slot="anagram-controls"] { + display: flex; + flex-wrap: wrap; + align-items: center; + gap: 0.5rem; + align-self: start; + + > [data-anno] { + flex-basis: 100%; + margin-bottom: 0.5rem; + } + } + + [data-slot="anagram-words"] { + grid-column: 1 / -1; + + ul { + display: flex; + flex-wrap: wrap; + gap: 1.5rem 2.5rem; + margin: 1.25rem 0 0; + padding: 0; + list-style: none; + --m: 4px; + } + } + + /* 12 Field */ + + [data-slot="field"] { + margin-inline: calc(-1 * var(--pad)); + /* No rules above and below; the 1px each side keeps the spacing the hairlines had. */ + padding-block: 1px; + + /* The canvas reads the theme's colours from these properties. */ + canvas { + display: block; + cursor: crosshair; + touch-action: pan-y; + color: var(--text-strong); + background-color: var(--bg); + border-top-color: var(--link); + outline-color: var(--text-weakest); + } + } + + /* Loupe */ + + [data-tone="night"] { + --bg: #0c0c0c; + --link: var(--link-dark); + --glyph-ink: #fff; + --shade-alpha: 30%; + --text-weak: hsl(0, 0%, 62%); + background: #0c0c0c; + color: hsl(0, 0%, 95%); + border-top: 1px solid hsl(0 0% 100% / 0.12); + } + + [data-slot="loupe-stage"] { + position: relative; + padding-block: clamp(2rem, 6vw, 5rem) 3rem; + cursor: none; + user-select: none; + -webkit-user-select: none; + -webkit-touch-callout: none; + } + + [data-slot="loupe-word"] { + display: block; + width: 100%; + } + + [data-slot="loupe-lens"] { + --size: clamp(160px, 22vw, 280px); + position: absolute; + top: 0; + left: 0; + width: var(--size); + height: var(--size); + pointer-events: none; + opacity: 0; + transition: opacity 150ms ease; + /* The canvas reads its blue from here: the Console blue in both themes, as white on it keeps + 5.2:1 (the lighter dark-mode blue would give the chip's white text only 3.3:1). */ + border-top-color: #3b5cf6; + + &[data-shown] { + opacity: 1; + } + + canvas { + display: block; + width: 100%; + height: 100%; + border-radius: 50%; + box-shadow: 0 0 0 1px hsl(0 0% 100% / 0.4); + } + } + + /* A faint reticle: a cross with an open centre. */ + [data-slot="reticle"] { + position: absolute; + inset: 0; + border-radius: 50%; + background: + linear-gradient(#fff, #fff) center top / 1px 38% no-repeat, + linear-gradient(#fff, #fff) center bottom / 1px 38% no-repeat, + linear-gradient(#fff, #fff) left center / 38% 1px no-repeat, + linear-gradient(#fff, #fff) right center / 38% 1px no-repeat; + opacity: 0.35; + } + + [data-slot="loupe-readout"] { + position: absolute; + top: calc(100% + 0.5rem); + left: 50%; + transform: translateX(-50%); + padding: 0.125rem 0.375rem; + background: #3b5cf6; + color: #fff; + white-space: nowrap; + } + + [data-slot="loupe-hint"] { + margin-top: 1.5rem; + color: var(--text-weak); + } + + @media (prefers-reduced-motion: reduce) { + [data-slot="loupe-lens"] { + transition: none; + } + } + + /* 13 Tester */ + + [data-slot="tester"] { + border: 1px solid currentColor; + } + + [data-slot="tester-controls"] { + display: flex; + flex-wrap: wrap; + align-items: center; + gap: 1rem 2rem; + padding: 1rem; + border-bottom: 1px solid currentColor; + + [data-slot="axis"] { + flex: 0 1 15rem; + grid-template-columns: 4.5rem minmax(4rem, 1fr) 2.75rem; + } + } + + [data-slot="toggles"] { + display: flex; + gap: 0.25rem; + } + + [data-slot="tester-preview"] { + position: relative; + display: flex; + flex-wrap: wrap; + align-content: flex-start; + column-gap: calc(var(--m) * var(--gap)); + row-gap: calc(var(--m) * var(--leading)); + min-height: 26rem; + padding: calc(var(--m) * 2); + overflow: hidden; + /* Empty space keeps the snapping module cursor; over the letters it's a text cursor. */ + cursor: none; + + &[data-over-text] { + cursor: text; + } + + /* The preview is the text field: it carries the focus ring, drawn inside so nothing clips it. */ + &[data-focused] { + outline: 2px solid var(--link); + outline-offset: -2px; + } + + [data-slot="selection"] { + fill: var(--link); + fill-opacity: 0.22; + } + + &[data-grid] { + background-image: + linear-gradient(to right, var(--hair) 1px, transparent 1px), + linear-gradient(to bottom, var(--hair) 1px, transparent 1px); + background-size: var(--m) var(--m); + + /* Over the grid the shade turns translucent, so the grid shows through the counters. */ + [data-slot="shadow"] { + fill: var(--glyph-ink); + fill-opacity: 0.2; + } + } + + svg { + flex-shrink: 0; + overflow: visible; + } + } + + /* The real input: invisible, one pixel, kept at the caret so mobile keyboards scroll to it. */ + [data-slot="tester-input"] { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + border: 0; + opacity: 0; + font-size: 16px; + pointer-events: none; + } + + /* The caret: one module wide and seven tall, like a glyph cell, blinking. */ + [data-slot="tester-caret"] { + position: absolute; + width: var(--m); + height: calc(var(--m) * 7); + background: var(--link); + pointer-events: none; + animation: font-blink 1s step-end infinite; + + @media (prefers-reduced-motion: reduce) { + animation: none; + } + } + + /* The cursor: one module, snapped to the grid, with its coordinates. */ + [data-slot="snap"] { + position: absolute; + width: var(--m); + height: var(--m); + outline: 1px solid var(--link); + background: color-mix(in srgb, var(--link) 18%, transparent); + pointer-events: none; + + &::before, + &::after { + content: ""; + position: absolute; + background: color-mix(in srgb, var(--link) 50%, transparent); + } + + &::before { + left: 50%; + top: -100vh; + bottom: -100vh; + width: 1px; + } + + &::after { + top: 50%; + left: -100vw; + right: -100vw; + height: 1px; + } + + span { + position: absolute; + left: calc(100% + 6px); + top: calc(100% + 4px); + padding: 0.125rem 0.25rem; + background: var(--link); + color: var(--on-link); + white-space: nowrap; + z-index: 1; + } + } + + [data-slot="tester-footer"] { + display: flex; + flex-wrap: wrap; + justify-content: space-between; + align-items: center; + gap: 0.75rem; + padding: 0.75rem 1rem; + border-top: 1px solid currentColor; + } + + [data-slot="presets"] { + display: flex; + flex-wrap: wrap; + gap: 0.25rem 1rem; + + button { + text-decoration: underline; + text-decoration-thickness: 1px; + text-underline-offset: 0.25em; + + @media (hover: hover) and (pointer: fine) { + &:hover { + color: var(--link); + } + } + + &:active { + color: var(--link); + } + } + } + + /* How big is 6^3591: the story, pinned while its track scrolls past. */ + + /* One blue: the pinned stage and the notes under it run on into the colophon, so the plate keeps + no white foot. The link blue (the blue bars' colour) in light, the Console blue in dark, as the + lighter dark-mode blue gives white text only 3.3:1; white on either passes 4.5:1, so all text + on it is full white. */ + [data-plate="universe"] { + --universe-blue: light-dark(var(--link), #3b5cf6); + padding-bottom: 0; + } + + [data-slot="universe"] { + display: grid; + margin-top: 2rem; + } + + /* Full-bleed: the stage runs edge to edge and the story sits on the content grid. The track's + height is the scroll distance for the whole story, fixed in CSS so nothing shifts. */ + [data-slot="universe-track"] { + margin-inline: calc(-1 * var(--pad)); + height: 420vh; + + @media (max-width: 40rem) { + height: 320vh; + } + } + + /* A solid blue stage with white type: the link blue (the blue bars' colour) in light, and the + Console blue in dark, as the lighter dark-mode blue gives white text only 3.3:1. White on + either passes 4.5:1. Sentences hang from one fixed line below the counter and grow down. */ + [data-slot="universe-stage"] { + --story-top: calc(var(--top) + var(--logo-height) + 9rem); + position: sticky; + top: 0; + display: grid; + align-content: start; + height: 100vh; + height: 100svh; + padding: var(--story-top) var(--pad) 0; + background: var(--universe-blue); + color: #fff; + overflow: hidden; + + @media (max-width: 40rem) { + --story-top: calc(var(--top) + var(--logo-height) + 7.5rem); + } + } + + /* The nested squares, behind the story: right half on wide screens, low in the frame on narrow. */ + [data-slot="universe-nesting"] { + position: absolute; + inset: 0; + width: 100%; + height: 100%; + } + + /* Below the logo row, so the fixed logo (bare chrome above) never sits on it. */ + [data-slot="universe-counter"] { + position: absolute; + top: calc(var(--top) + var(--logo-height) + 1.5rem); + left: var(--pad); + display: flex; + flex-direction: column; + gap: 0.375rem; + opacity: 0; + pointer-events: none; + } + + [data-slot="universe-power"] { + font-family: var(--font-mono); + font-size: 1.75rem; + line-height: 1; + letter-spacing: -0.02em; + font-variant-numeric: tabular-nums; + + sup { + font-size: 0.55em; + vertical-align: 0.8em; + line-height: 0; + } + } + + /* Every sentence shares one grid cell, hung from its top. */ + [data-slot="universe-story"] { + position: relative; + display: grid; + align-items: start; + font-size: clamp(2rem, 4.6vw, 4.5rem); + font-weight: 400; + line-height: 1.06; + letter-spacing: -0.035em; + + @media (max-width: 40rem) { + font-size: 1.75rem; + line-height: 1.12; + } + + &[data-editing] { + display: flex; + flex-direction: column; + gap: 0.5em; + } + } + + /* All the sentences share one cell, so the story is as tall as its tallest and never resizes; the + one in play shows and the others fade out in place, crossfading over 250ms, never moving. */ + [data-slot="universe-sentence"] { + grid-area: 1 / 1; + max-width: min(18ch, 50vw); + margin: 0; + text-wrap: balance; + opacity: 0; + transition: opacity 250ms var(--ease-out); + will-change: opacity; + + &[data-active], + [data-editing] > & { + opacity: 1; + } + + @media (max-width: 40rem) { + max-width: none; + } + } + + /* Unread words sit at 35% white (set per frame); numbers are always semibold, so lighting them + never reflows the line. */ + [data-slot="universe-word"][data-number] { + font-weight: 600; + font-variant-numeric: tabular-nums; + } + + /* Reduced motion: no pinning; the whole story lit, beside (or above) a still diagram. */ + @media (prefers-reduced-motion: reduce) { + [data-slot="universe-track"] { + height: auto; + } + + [data-slot="universe-stage"] { + position: relative; + height: auto; + grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); + grid-template-areas: "counter nesting" "story nesting"; + gap: 2rem var(--pad); + padding-block: clamp(4rem, 8vw, 6rem); + + @media (max-width: 40rem) { + grid-template-columns: minmax(0, 1fr); + grid-template-areas: "counter" "story" "nesting"; + } + } + + [data-slot="universe-nesting"] { + position: static; + grid-area: nesting; + align-self: center; + width: 100%; + max-width: 28rem; + height: auto; + aspect-ratio: 1; + } + + [data-slot="universe-counter"] { + position: static; + grid-area: counter; + opacity: 1; + } + + [data-slot="universe-story"] { + display: block; + grid-area: story; + font-size: clamp(1.625rem, 3vw, 2.75rem); + } + + [data-slot="universe-sentence"] { + display: inline; + max-width: none; + opacity: 1; + transition: none; + + &::after { + content: " "; + } + } + } + + /* The working, line by line, on a full-bleed band of the same blue. */ + [data-slot="universe-notes"] { + margin-inline: calc(-1 * var(--pad)); + padding: 2rem var(--pad) clamp(5rem, 10vw, 9rem); + background: var(--universe-blue); + color: #fff; + } + + [data-slot="universe-working"] { + display: flex; + flex-direction: column; + gap: 0.25rem; + max-width: 34rem; + margin: 0; + padding-top: 0.75rem; + border-top: 1px solid rgb(255 255 255 / 0.4); + text-transform: none; + } + + /* 14 Colophon */ + + [data-slot="colophon"] { + display: grid; + grid-template-columns: minmax(0, 1fr) auto; + gap: 3rem var(--pad); + align-items: end; + + @media (max-width: 40rem) { + grid-template-columns: minmax(0, 1fr); + } + } + + /* Two halves of exactly 50%, each a label and its value, with the same 0.75rem either side of the + middle; wide enough that "OpenCode, OpenTUI Mono and Inter" stays on one line from 1280px. */ + [data-slot="credits"] { + max-width: 56rem; + + div:nth-child(odd) { + padding-right: 0; + padding-inline-end: 0.75rem; + } + + div:nth-child(even) { + padding-inline-start: 0.75rem; + } + + dt { + opacity: 0.75; + } + + /* Small phones: one credit a row, so "OpenCode 1.001" no longer runs into the next label. */ + @media (max-width: 24rem) { + grid-template-columns: minmax(0, 1fr); + + div:nth-child(odd), + div:nth-child(even) { + padding-inline: 0; + } + } + } + + [data-slot="colophon-action"] [data-component="site-button"] { + height: 3rem; + padding: 0 1.5rem; + background: var(--text-inverted); + color: var(--text-strong); + } + + /* The last word fills the content width on whole-pixel modules (any remainder split evenly + either side) and stands on the bottom edge of the page: "done" has no descender, so the empty + seventh row is cropped and the baseline is the plate's last pixel. */ + [data-slot="colophon-word"] { + grid-column: 1 / -1; + container-type: inline-size; + margin-top: calc(clamp(2rem, 6vw, 5rem) + var(--snap, 0px)); + overflow: hidden; + + [data-component="font-word"] { + --m: round(down, calc(100cqw / var(--cols)), 1px); + margin: 0 auto calc(-1 * var(--m)); + } + } + + [data-plate="colophon"] { + padding-bottom: 0; + } + + /* The search's live region sits after the page in the flow; pinned, it no longer adds a pixel + below the last plate. */ + [data-slot="search-status"] { + position: fixed; + top: 0; + } +} + +@keyframes font-blink { + 50% { + opacity: 0; + } +} + +/* The line's square runs down the hairline in 7px steps, then starts again at the top. */ +@keyframes font-hint-run { + 0% { + transform: translateY(0); + } + 20% { + transform: translateY(7px); + } + 40% { + transform: translateY(14px); + } + 60% { + transform: translateY(21px); + } + 80% { + transform: translateY(28px); + } + 100% { + transform: translateY(35px); + } +} + +@keyframes font-playhead { + from { + left: 5rem; + } + to { + left: 100%; + } +} + +@media (prefers-reduced-motion: reduce) { + [data-site][data-page="font"] { + .glyph.before-caret::before, + .end-caret::after, + [data-slot="gantt-playhead"] { + animation: none !important; + } + + [data-slot="bar"], + [data-slot="column-bar"], + [data-slot="gantt-bar"], + .gif-control { + transition: none; + } + } +} diff --git a/packages/console/app/src/routes/font/index.tsx b/packages/console/app/src/routes/font/index.tsx new file mode 100644 index 00000000000..110ccd659de --- /dev/null +++ b/packages/console/app/src/routes/font/index.tsx @@ -0,0 +1,42 @@ +import "./index.css" +import { Title, Meta } from "@solidjs/meta" +import { LocaleLinks } from "~/component/locale-links" +import { ShareMeta } from "~/component/share-meta" +import { ogImage } from "~/lib/og" +import { Specimen } from "~/component/font/specimen" +import { FilmPlate } from "~/component/font-film/section" +import { Typewriter } from "~/component/font/typewriter" +import { Site } from "~/component/site/site" +import { breadcrumbData, JsonLd } from "~/component/structured-data" +import { useMarkdown } from "~/component/site/use-markdown" +import { useI18n } from "~/context/i18n" +import { fontContent, fontMarkdown } from "~/lib/font-content" + +export default function Font() { + const i18n = useI18n() + const markdown = useMarkdown("/font", fontMarkdown) + return ( + + {fontContent.metaTitle} + {/* English only: its locale URLs redirect here. */} + + + + + + + + + + ) +} diff --git a/packages/console/app/src/routes/press/index.css b/packages/console/app/src/routes/press/index.css new file mode 100644 index 00000000000..aa9daeea0c3 --- /dev/null +++ b/packages/console/app/src/routes/press/index.css @@ -0,0 +1,951 @@ +[data-page="press"] { + [data-component="facts"] { + display: grid; + grid-template-columns: repeat(3, minmax(0, 1fr)); + gap: 2rem var(--gutter); + + div { + display: flex; + flex-direction: column; + gap: 0.5rem; + } + + dt { + font-family: var(--font-mono); + font-size: var(--fs-small); + color: var(--text-weak); + } + + dd { + font-family: var(--font-mono); + font-size: var(--fs-h1); + line-height: 1.1; + letter-spacing: -0.02em; + } + } + + [data-slot="links"] { + display: flex; + flex-wrap: wrap; + gap: 0.5rem; + } + + /* [data-variant] outranks the shared product list's icon grid (product-list.css), which loads later. */ + [data-component="product-list"][data-variant="cards"] { + display: grid; + grid-template-columns: repeat(2, minmax(0, 1fr)); + gap: 2rem var(--gutter); + + li { + display: flex; + min-width: 0; + } + + strong { + font-family: var(--font-mono); + font-size: var(--mono-size); + font-weight: 400; + color: var(--text-strong); + } + + [data-slot="row-link"] > span { + color: var(--text-weak); + line-height: 1.4; + } + + /* Side by side, each tint reaches half the gutter past its text (not the full 1rem below), so + two neighbours' tints and tap areas meet in the gutter instead of overlapping by 16px. Rows + keep the 1rem above and below: the 2rem row gap holds both. */ + [data-slot="row-link"][data-slot] { + margin-inline: calc(var(--gutter) / -2); + padding-inline: calc(var(--gutter) / 2); + } + } + + /* Each product or project is one link row, like the legal index's rows (legal.css, Settings › Legal + row hover "grey", the default): on hover, focus or press, a light grey tint and a 2px mid-grey + bar on the left edge, fading in over 150ms; no radius. The tint and bar sit outside the text + (padding and equal negative margins), so the name and description keep their exact place. */ + [data-slot="row-link"] { + position: relative; + flex: 1; + display: flex; + flex-direction: column; + gap: 0.375rem; + margin: -1rem; + padding: 1rem; + color: var(--text); + text-decoration: none; + outline: 2px solid transparent; + outline-offset: 0; + transition: + background-color 150ms ease, + outline-color 150ms ease; + + &::before { + content: ""; + position: absolute; + top: 0; + bottom: 0; + inset-inline-start: 0; + width: 2px; + background: light-dark(hsl(0, 0%, 50%), hsl(0, 0%, 46%)); + opacity: 0; + transition: opacity 150ms ease; + } + + &:focus-visible { + outline-color: var(--link); + background: var(--bg-weak); + + &::before { + opacity: 1; + } + } + + @media (hover: hover) and (pointer: fine) { + &:hover { + background: var(--bg-weak); + + &::before { + opacity: 1; + } + } + } + + &:active { + background: var(--bg-weak); + + &::before { + opacity: 1; + } + } + + @media (hover: none) { + -webkit-touch-callout: none; + } + + @media (prefers-reduced-motion: reduce) { + transition: none; + + &::before { + transition: none; + } + } + + [data-slot="external"] { + color: var(--text-weak); + } + } + + /* Settings › Press Anomaly projects "list": one line per project, name and line side by side. */ + [data-component="product-list"][data-style="list"] { + grid-template-columns: minmax(0, 1fr); + gap: 0.75rem; + + [data-slot="row-link"] { + display: grid; + grid-template-columns: 9rem minmax(0, 1fr); + gap: var(--gutter); + align-items: baseline; + } + } + + /* Links in running text and notes, the same as the site's inline links. */ + :is( + [data-slot="text"], + [data-slot="note"], + [data-component="press-rows"], + [data-component="press-contacts"], + [data-slot="portrait"] + ) + a { + color: var(--text-strong); + text-decoration: underline; + text-decoration-thickness: 1px; + text-underline-offset: 0.15em; + transition: color 150ms ease; + + @media (hover: hover) and (pointer: fine) { + &:hover { + color: var(--link); + } + } + + &:focus-visible, + &:active { + color: var(--link); + } + } + + [data-slot="note"] { + line-height: 1.5; + color: var(--text-weak); + } + + /* Every section's text: the site's body size and colour, not the larger lead (as on /brand). */ + [data-slot="text"] { + font-size: var(--body-size); + line-height: 1.5; + color: var(--text); + text-wrap: pretty; + } + + /* Paragraphs that belong together keep the body's paragraph gap, not the section's. */ + [data-slot="paragraphs"] { + display: flex; + flex-direction: column; + gap: 0.75rem; + } + + [data-slot="download-icon"] { + flex-shrink: 0; + } + + /* A download's size, lighter than its label (60% of the button's text colour). */ + [data-slot="size"] { + font-weight: 400; + opacity: 0.6; + } + + /* Both labels share one cell, so the copy button keeps the width of the longer one. */ + [data-slot="copy-labels"] { + display: inline-grid; + + > span { + grid-area: 1 / 1; + visibility: hidden; + } + + > [data-active] { + visibility: visible; + } + } + + [data-slot="sr-only"] { + position: absolute; + width: 1px; + height: 1px; + overflow: hidden; + clip-path: inset(50%); + white-space: nowrap; + } + + /* The boilerplate accordion: the site's FAQ rows (component/faq.tsx, styles in site.css), one per + product, full width. Until a row is toggled the answers don't animate, so the row that is open + from the server render paints at once. */ + [data-slot="boilerplate-accordion"] { + display: flex; + flex-direction: column; + margin: 0; + padding: 0; + list-style: none; + + [data-slot="faq-heading"] { + margin: 0; + font: inherit; + } + + /* A divider between rows. Each row gets a little more room around its divider. */ + > li + li { + border-top: 1px solid var(--border); + } + + /* A line under the last row too; the next section drops its own divider (below), so the two + never stack. */ + > li:last-child { + border-bottom: 1px solid var(--border); + } + + [data-slot="faq-question"] { + --padding-top: 1rem; + padding-bottom: 1rem; + } + + [data-slot="faq-answer"] { + max-width: none; + } + + /* Room under the last line to the divider, equal to the room from the row title to the first + label (measured text to text: the label row is taller than a FAQ answer's first line). */ + [data-slot="faq-answer-inner"][data-slot] { + padding-bottom: 1.1875rem; + + @media (max-width: 60rem) { + padding-bottom: 0.9375rem; + } + } + + /* [data-expanded] outranks the shared open animation, which would otherwise grow the row that is + open from the server render on hydration and push the page down. */ + &:not([data-ready]) [data-slot="faq-answer"], + &:not([data-ready]) [data-slot="faq-answer"][data-expanded] { + animation: none; + } + + @media (prefers-reduced-motion: reduce) { + [data-slot="faq-answer"] { + animation: none; + } + + [data-slot="faq-question"]::after { + transition: none; + } + } + } + + /* The section after the accordion: no divider of its own, whatever Settings › Spacer draws (the + border keeps its width, so the spacing is the same). Doubled to outrank the shared spacer rules. */ + [data-component="block"]:has(#about-opencode) + [data-component="block"][data-component="block"] { + border-top-color: transparent; + border-image: none; + background-image: none; + + &::before, + &::after { + display: none; + } + } + + /* One product's boilerplate in its row: the long and short versions. */ + [data-component="boilerplate-group"] { + display: flex; + flex-direction: column; + gap: 1.5rem; + + /* Under a product name, "Long version" and "Short version" are grey labels; hover and focus + darken them (see copy-label). */ + h4, + h4 [data-slot="copy-label"] { + color: var(--text-weak); + } + + @media (hover: hover) and (pointer: fine) { + h4 [data-slot="copy-label"]:hover { + color: var(--text-strong); + } + } + + h4 [data-slot="copy-label"]:active { + color: var(--text-strong); + } + + h4 [data-slot="copy-label"]:focus-visible { + color: var(--text-strong); + } + } + + [data-component="boilerplate"] { + display: flex; + flex-direction: column; + gap: 0.75rem; + + /* The label on the left and the copy action at the top right, on one row. */ + [data-slot="head"] { + display: flex; + align-items: center; + justify-content: space-between; + gap: 1rem; + min-height: 2rem; + } + + :is(h3, h4) { + font-family: var(--font-mono); + font-size: var(--mono-size); + font-weight: 400; + color: var(--text-strong); + } + + /* "label": the label and the home install row's copy icon as one button. Hover or focus brings + the label to the strong text colour and the icon up from faint. */ + [data-slot="copy-label"] { + display: inline-flex; + align-items: center; + gap: 0.5rem; + padding: 0.25rem 0; + border: 0; + background: none; + font: inherit; + color: var(--text-strong); + cursor: pointer; + transition: color 150ms ease; + + [data-slot="download-icon"] { + color: var(--text-faint); + transition: color 150ms ease; + } + + @media (hover: hover) and (pointer: fine) { + &:hover, + &:hover [data-slot="download-icon"] { + color: var(--text-strong); + } + } + + &:active, + &:active [data-slot="download-icon"] { + color: var(--text-strong); + } + + &:focus-visible { + color: var(--text-strong); + outline: 1px solid var(--link); + outline-offset: 2px; + + [data-slot="download-icon"] { + color: var(--text-strong); + } + } + } + + &[data-copied] [data-slot="copy-label"] [data-slot="download-icon"] { + color: var(--text-strong); + } + + /* "link": a mono Copy with no underline, in the text colour, blue on hover or focus. */ + [data-slot="copy-link"] { + padding: 0.25rem 0; + border: 0; + background: none; + font-family: var(--font-mono); + font-size: var(--mono-size); + color: var(--text-strong); + text-decoration: none; + cursor: pointer; + transition: color 150ms ease; + + @media (hover: hover) and (pointer: fine) { + &:hover { + color: var(--link); + } + } + + &:active { + color: var(--link); + } + + &:focus-visible { + color: var(--link); + outline: 1px solid var(--link); + outline-offset: 2px; + } + } + + &[data-copied] [data-slot="copy-link"] { + color: var(--text-weak); + } + + /* "icon": a 16px icon at the top right, shown on hover or focus of the block (always on touch). */ + [data-slot="copy-icon"] { + display: grid; + place-items: center; + width: 2rem; + height: 2rem; + margin-inline-end: -0.5rem; + padding: 0; + border: 0; + background: none; + color: var(--text-weak); + cursor: pointer; + opacity: 0; + transition: + opacity 150ms ease, + color 150ms ease; + + @media (hover: hover) and (pointer: fine) { + &:hover { + color: var(--text-strong); + } + } + + &:active { + color: var(--text-strong); + } + + &:focus-visible { + opacity: 1; + color: var(--text-strong); + outline: 1px solid var(--link); + } + + @media (hover: none), (pointer: coarse) { + opacity: 1; + } + } + + &[data-copied] [data-slot="copy-icon"] { + opacity: 1; + color: var(--text-strong); + } + + @media (hover: hover) and (pointer: fine) { + &:hover [data-slot="copy-icon"] { + opacity: 1; + } + } + + &:active [data-slot="copy-icon"] { + opacity: 1; + } + + /* "click": the text is the button; a hint at the top right says so. */ + [data-slot="copy-hint"] { + font-family: var(--font-mono); + font-size: var(--mono-size); + color: var(--text-weak); + opacity: 0; + transition: opacity 150ms ease; + + @media (hover: none), (pointer: coarse) { + opacity: 1; + } + } + + &[data-copied] [data-slot="copy-hint"], + &:has([data-slot="copy-text"]:is(:hover, :focus-visible)) [data-slot="copy-hint"] { + opacity: 1; + } + + [data-slot="copy-text"] { + display: block; + width: calc(100% + 1rem); + margin: -0.5rem; + padding: 0.5rem; + border: 0; + background: none; + text-align: start; + font: inherit; + color: inherit; + cursor: copy; + transition: background-color 150ms ease; + + @media (hover: hover) and (pointer: fine) { + &:hover { + background: var(--bg-weak); + } + } + + &:active { + background: var(--bg-weak); + } + + &:focus-visible { + outline: 1px solid var(--link); + } + + [data-slot="text"] { + display: block; + } + } + } + + /* Milestones and releases: a 1px rail down the left through an outlined 9px square per item, as + in the changelog timeline (same marker, rail colour and mono dates). */ + [data-component="press-timeline"] { + --marker: 9px; + --rail-gap: 1.25rem; + /* The room before each row's text for the marker and rail. */ + --rail-pad: calc(var(--marker) + var(--rail-gap)); + display: flex; + flex-direction: column; + margin: 0; + padding: 0; + list-style: none; + + li { + position: relative; + padding-inline-start: var(--rail-pad); + padding-bottom: 1.5rem; + + &:last-child { + padding-bottom: 0; + } + + /* The rail runs from this marker down to the next one. */ + &:not(:last-child)::before { + content: ""; + position: absolute; + inset-inline-start: calc(var(--marker) / 2 - 0.5px); + top: var(--marker-top); + bottom: calc(-1 * var(--marker-top)); + width: 1px; + background: var(--border); + } + } + + [data-slot="marker"] { + position: absolute; + z-index: 1; + inset-inline-start: 0; + top: var(--marker-top); + width: var(--marker); + height: var(--marker); + box-sizing: border-box; + border: 1px solid var(--border-strong); + background: var(--bg); + transition: + background-color 150ms ease, + border-color 150ms ease; + + @media (prefers-reduced-motion: reduce) { + transition: none; + } + } + + /* Hovering an entry, or focus inside it (the release's version link), fills its square with ink. */ + li:focus-within [data-slot="marker"] { + border-color: var(--text-strong); + background: var(--text-strong); + } + + @media (hover: hover) and (pointer: fine) { + li:hover [data-slot="marker"] { + border-color: var(--text-strong); + background: var(--text-strong); + } + } + + /* Dates are sans-serif and muted, like every date on the site; versions stay mono. */ + [data-slot="date"] { + font-family: var(--font-sans); + font-size: var(--fs-small); + color: var(--text-weak); + white-space: nowrap; + } + + /* Milestones: the date, then the text on the same line. */ + /* The date column fits the longest date (at least --date-min), shared by every row through + subgrid, so translations can use their own month names. The rows' rail padding counts in the + first column, so the minimum adds it. */ + &[data-variant="milestones"] { + --marker-top: 0.4rem; + --date-min: 6.5rem; + display: grid; + grid-template-columns: minmax(calc(var(--date-min) + var(--rail-pad)), max-content) minmax(0, 1fr); + column-gap: 1.5rem; + + li { + grid-column: 1 / -1; + display: grid; + grid-template-columns: subgrid; + align-items: baseline; + line-height: 1.4; + } + + [data-slot="text"] { + line-height: inherit; + color: var(--text); + white-space: nowrap; + } + } + + /* Releases: the date and version, then the first feature as the title and the rest under it. */ + &[data-variant="releases"] { + /* The square is centred on the date's line (Inter's cap centre is its line's centre). */ + --date-leading: calc(var(--fs-small) * 1.6); + --marker-top: calc((var(--date-leading) - var(--marker)) / 2); + + [data-slot="date"] { + line-height: var(--date-leading); + } + + li { + display: grid; + grid-template-columns: 11rem minmax(0, 1fr); + column-gap: 1.5rem; + padding-bottom: 2rem; + } + + [data-slot="meta"] { + display: flex; + flex-direction: column; + gap: 0.375rem; + } + + /* The whole row is the version link: a grey tint on hover, a ring on keyboard focus. */ + /* Stretched over the row (not the 2rem gap below it) and above its text, so every part of the + row clicks through. Hover shows no tint and no blue: the square fills with ink and the title + is underlined, like the site's inline links. */ + [data-slot="version"]::after { + content: ""; + position: absolute; + z-index: 2; + inset-block: -0.5rem 1.5rem; + inset-inline: calc(var(--marker) + var(--rail-gap) - 0.75rem) -0.75rem; + } + + @media (hover: hover) and (pointer: fine) { + li:has([data-slot="version"]:hover) strong { + text-decoration: underline; + text-decoration-thickness: 1px; + text-underline-offset: 0.15em; + } + } + + li:last-child [data-slot="version"]::after { + bottom: -0.5rem; + } + + [data-slot="version"]:focus-visible { + outline: none; + + &::after { + outline: 2px solid var(--link); + outline-offset: 0; + } + } + + [data-slot="version"] { + align-self: start; + font-family: var(--font-mono); + font-size: var(--fs-meta); + color: var(--text-strong); + text-decoration: none; + } + + [data-slot="entry"] { + display: flex; + flex-direction: column; + gap: 0.375rem; + line-height: 1.4; + } + + strong { + font-weight: 500; + color: var(--text-strong); + } + + [data-slot="entry"] span { + color: var(--text-weak); + } + } + } + + /* Milestones, releases and coverage: a mono date or outlet, then the text. */ + [data-component="press-rows"] { + display: flex; + flex-direction: column; + margin: 0; + padding: 0; + list-style: none; + + li { + display: grid; + grid-template-columns: 9rem minmax(0, 1fr); + gap: var(--gutter); + padding: 0.75rem 0; + border-top: 1px solid var(--border); + line-height: 1.4; + + &:last-child { + border-bottom: 1px solid var(--border); + } + } + + [data-slot="meta"] { + font-family: var(--font-mono); + font-size: var(--mono-size); + color: var(--text-weak); + } + + [data-slot="text"] { + color: var(--text-weak); + } + + a { + font-family: var(--font-mono); + font-size: var(--mono-size); + margin-inline-end: 0.5ch; + } + } + + [data-component="press-people"] { + display: grid; + grid-template-columns: repeat(2, minmax(0, 1fr)); + gap: 2rem var(--gutter); + margin: 0; + padding: 0; + list-style: none; + + li { + display: flex; + flex-direction: column; + gap: 0.375rem; + } + + img { + width: 100%; + aspect-ratio: 1; + object-fit: cover; + margin-bottom: 0.5rem; + } + + :is(strong, a) { + font-family: var(--font-mono); + font-size: var(--mono-size); + font-weight: 400; + color: var(--text-strong); + } + + span { + color: var(--text-weak); + line-height: 1.4; + } + } + + /* Anomaly logo: each file on a light and a dark tile, like the logo tiles on /brand. */ + [data-component="logo-tiles"] { + display: grid; + grid-template-columns: repeat(2, minmax(0, 1fr)); + gap: 2rem var(--gutter); + margin: 0; + padding: 0; + list-style: none; + + li { + display: flex; + flex-direction: column; + gap: 0.75rem; + min-width: 0; + } + + [data-slot="preview"] { + display: grid; + place-items: center; + aspect-ratio: 2 / 1; + + &[data-tone="light"] { + background: #f5f5f5; + } + + &[data-tone="dark"] { + background: #0a0a0a; + box-shadow: inset 0 0 0 1px var(--border); + } + + /* Sized by width (a percentage height would stretch the 2:1 tile). */ + img { + display: block; + height: auto; + } + + &[data-kind="mark"] img { + width: 24%; + } + + &[data-kind="wordmark"] img { + width: 46%; + } + } + + /* The downloads under each tile at the inline end (the right, or the left in right-to-left text), + as on /brand; a line that wraps ends there too. */ + [data-slot="meta"] { + display: flex; + flex-wrap: wrap; + align-items: center; + justify-content: flex-end; + gap: 0.5rem 1rem; + } + + [data-slot="name"] { + font-family: var(--font-mono); + font-size: var(--mono-size); + color: var(--text-strong); + } + + /* The buttons' size and spacing match /brand: asset-buttons.css. */ + [data-slot="actions"] { + display: flex; + flex-wrap: wrap; + justify-content: flex-end; + } + } + + /* Contacts: each a title, then its text and links below, like every other section. */ + [data-component="press-contacts"] { + display: flex; + flex-direction: column; + gap: 2rem; + margin: 0; + padding: 0; + list-style: none; + + li { + display: flex; + flex-direction: column; + gap: 0.5rem; + } + + h3 { + font-family: var(--font-mono); + font-size: var(--mono-size); + font-weight: 400; + color: var(--text-strong); + } + + /* Settings › Press contacts "cards": the same, in bordered tiles. */ + &[data-style="cards"] li { + padding: 1.25rem; + border: 1px solid var(--border); + background: var(--bg-weak); + } + } + + /* The page's intro under the title: hero copy size, in body colour. */ + [data-component="hero"] > p[data-slot="intro"] { + font-size: var(--hero-copy-size); + line-height: var(--hero-copy-leading); + color: var(--text); + } + + /* Narrow screens: the rail runs through the centre of the top bar's logo mark (--timeline-x, shared + with the changelog), like the changelog's. On wider screens the timeline sits in the content + column, away from the logo, and keeps its own place. */ + @media (max-width: 60rem) { + [data-component="press-timeline"] { + --rail-pad: round(calc(var(--timeline-x) + var(--marker) / 2 + var(--rail-gap)), 1px); + + li:not(:last-child)::before { + inset-inline-start: calc(var(--timeline-x) - 0.5px); + } + + [data-slot="marker"] { + inset-inline-start: calc(var(--timeline-x) - var(--marker) / 2); + } + + &[data-variant="releases"] [data-slot="version"]::after { + inset-inline-start: round(calc(var(--timeline-x) + var(--marker) / 2 + var(--rail-gap) - 0.75rem), 1px); + } + } + } + + @media (max-width: 40rem) { + [data-component="press-timeline"][data-variant="milestones"] { + /* Narrow enough that every milestone stays on one line at 360px. */ + --date-min: 4.5rem; + column-gap: 0.75rem; + + [data-slot="text"] { + white-space: normal; + } + } + + [data-component="facts"] { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } + + [data-component="product-list"][data-variant="cards"], + [data-component="press-people"], + [data-component="logo-tiles"] { + grid-template-columns: minmax(0, 1fr); + } + + [data-component="press-rows"] li, + [data-component="press-timeline"][data-variant="releases"] li, + [data-component="product-list"][data-style="list"] [data-slot="row-link"] { + grid-template-columns: minmax(0, 1fr); + row-gap: 0.25rem; + } + } +} diff --git a/packages/console/app/src/routes/press/index.tsx b/packages/console/app/src/routes/press/index.tsx new file mode 100644 index 00000000000..06f689d84b2 --- /dev/null +++ b/packages/console/app/src/routes/press/index.tsx @@ -0,0 +1,717 @@ +import { Rich } from "~/component/site/rich-text" +import { rich } from "~/i18n/rich" +import { Marked } from "~/component/site/marked" +import "~/component/site/doc-list.css" +import "./index.css" +import { Title, Meta } from "@solidjs/meta" +import { createAsync } from "@solidjs/router" +import { Dynamic } from "solid-js/web" +import { createMemo, createSignal, For, Match, onCleanup, onMount, Show, Switch, type JSX } from "solid-js" +import { LocaleLinks } from "~/component/locale-links" +import { ShareMeta } from "~/component/share-meta" +import { ogImage } from "~/lib/og" +import { breadcrumbData, JsonLd } from "~/component/structured-data" +import { Site, SettingsSelect, type SettingsSectionID } from "~/component/site/site" +import { + pressBoilerplates, + pressCompanyStyles, + pressContactStyles, + pressCopyStyles, + pressMediaLayouts, + setSiteSetting, + siteSettings, + toggles, +} from "~/component/site/settings" +import { useMarkdown } from "~/component/site/use-markdown" +import { Faq } from "~/component/faq" +import { ContentsMenu, OnThisPage, SectionHeading, slug } from "~/component/site/on-this-page" +import { AgentRulesButton } from "~/component/site/agent-rules-button" +import { useI18n } from "~/context/i18n" +import { useLanguage } from "~/context/language" +import { englishText, localize } from "~/i18n/content" +import { source } from "~/i18n/content/source" +import { changelog } from "~/lib/changelog" +import { brandContent, brandMarkdown } from "~/lib/brand-content" +import { pressContent, pressMarkdown, pressReleases } from "~/lib/press-content" +import { MediaGallery } from "./media-gallery" +import { PageTitle } from "~/component/site/sticky-title" +import { ExternalArrow } from "~/component/site/icons" + +// One-line Anomaly projects for Settings › Press Anomaly projects "list". +const projectLines: Record = { + OpenCode: "The open source coding agent.", + SST: "Build full-stack apps on your own infrastructure.", + OpenTUI: "A library to build terminal user interfaces.", + "Models.dev": "An open source database of AI models.", + Hex: "Local voice dictation for Mac, Windows and Linux.", + OpenTunnel: "Encrypted public URLs for apps on your machine.", +} + +export default function Press() { + const i18n = useI18n() + const language = useLanguage() + const content = createMemo(() => localize(language.locale(), "press", pressContent(i18n.t, language.route))) + // Heading ids stay English in every locale, so links to /press#contact keep working. + const english = createMemo(() => englishText(content(), source.press)) + const anchor = (text: string) => slug(english().get(text) ?? text) + const data = createAsync(() => changelog()) + const releases = createMemo(() => pressReleases(data() ?? [], language.route, language.tag(language.locale()))) + const markdown = useMarkdown("/press", pressMarkdown, { releases: () => data() ?? [] }) + const [copied, setCopied] = createSignal() + // The boilerplate accordion: OpenCode open from the server render. Rows animate only once someone + // has toggled one, so the first paint never runs the opening animation. + const [openProducts, setOpenProducts] = createSignal(["OpenCode"]) + const [accordionReady, setAccordionReady] = createSignal(false) + onMount(() => { + // A link to a closed row (#boilerplate-…, or anything inside one) opens it. + const reveal = () => { + const target = location.hash ? document.getElementById(decodeURIComponent(location.hash.slice(1))) : null + const row = target?.closest('[data-slot="boilerplate-accordion"] > li') + const name = row?.querySelector('[data-slot="faq-question-text"]')?.textContent + if (!row || !name) return + setOpenProducts((list) => (list.includes(name) ? list : [...list, name])) + requestAnimationFrame(() => target?.scrollIntoView()) + } + reveal() + window.addEventListener("hashchange", reveal) + onCleanup(() => window.removeEventListener("hashchange", reveal)) + }) + // "Copy rules for your agent" copies the Brand page's own Markdown, so the two never drift. + const brandRules = useMarkdown("/brand", brandMarkdown) + const rulesLabel = createMemo(() => localize(language.locale(), "brand", brandContent(i18n.t)).hero.copy) + + // The sections in page order, for "Contents". Hidden sections leave the list too. + const sections = createMemo(() => + [ + content().about.title, + content().facts.title, + siteSettings.pressMilestones === "on" ? content().milestones.title : undefined, + content().product.title, + siteSettings.pressNews === "on" ? content().news.title : undefined, + siteSettings.pressMedia === "on" ? content().media.title : undefined, + content().brand.title, + content().people.items.length > 0 ? content().people.title : undefined, + content().company.title, + content().anomalyLogo.title, + content().coverage.items.length > 0 ? content().coverage.title : undefined, + content().contact.title, + ] + .filter((title) => title !== undefined) + .map((title) => ({ id: anchor(title), title })), + ) + + /** Copies text and marks `key` as copied for a moment. */ + const copy = (key: string, value: string) => { + void navigator.clipboard.writeText(value) + setCopied(key) + setTimeout(() => setCopied((current) => (current === key ? undefined : current)), 1500) + } + + /** Copies an SVG file's text (a promised ClipboardItem keeps the click's activation in Safari). */ + const copySvg = (file: string, url: string) => { + void navigator.clipboard.write([ + new ClipboardItem({ + "text/plain": fetch(url) + .then((response) => response.text()) + .then((text) => new Blob([text], { type: "text/plain" })), + }), + ]) + setCopied(`svg:${file}`) + setTimeout(() => setCopied((current) => (current === `svg:${file}` ? undefined : current)), 1500) + } + + /** A section heading: a plain title above the section that copies its address when clicked. */ + const Heading = (props: { id: string; children: string }) => ( + + ) + + /** + * A boilerplate paragraph with a label and a way to copy it, by Settings › Press copy style: the + * label and a copy icon as one button (default), a mono "Copy" link, an icon that shows on hover or + * focus, the text itself as the button, or a small neutral button. Each is a real button, with "Copied" announced. + */ + const Boilerplate = (props: { id: string; label: string; value: string; level?: 3 | 4; product?: string }) => { + const done = () => copied() === props.id + const run = () => copy(props.id, props.value) + const style = () => siteSettings.pressCopyStyle + const label = () => (language.locale() === "en" ? props.label.toLowerCase() : props.label) + const name = () => + props.product + ? i18n.t("press.ui.copyFor", { label: label(), product: props.product }) + : i18n.t("press.ui.copy", { label: label() }) + return ( +
    + {/* The label on the left; the copy action at the top right, on the same row. */} +
    + {props.label}} + > + {/* "label": the label and the copy icon are one button; the icon turns into a check. */} + + + + + + + + + + + + + + + + + + +
    + {props.value}

    }> + +
    + + {done() ? i18n.t("site.action.copied") : ""} + +
    + ) + } + + const Section = (props: { title: string; design?: string; children: JSX.Element }) => ( +
    + {props.title} +
    {props.children}
    +
    + ) + + // Created once: Site reads its aside more than once, and a fresh element each time breaks hydration. + const aside = + + return ( + : undefined} + aside={siteSettings.pressToc === "on" ? aside : undefined} + > + {content().title} + + + + + +
    + +

    {content().hero.body}

    +
    + + + + + +
    + {/* OpenCode first, then the company's other products, each a row of the site's FAQ accordion + with its long and short text. OpenCode starts open; any number of rows can be open. */} +
      + + {(product) => ( +
    • + { + setAccordionReady(true) + setOpenProducts((list) => + next ? [...list, product.name] : list.filter((name) => name !== product.name), + ) + }} + > +
      + + + + +
      +
      +
    • + )} +
      +
    +
    + +
    +
    + + {(fact) => ( +
    +
    {fact.label}
    +
    {fact.value}
    +
    + )} +
    +
    +
    + + +
    +
      + + {(item) => ( +
    1. +
    2. + )} +
      +
    +
    +
    + +
    + +
    + + +
    +

    {content().news.intro}

    + {/* Releases load from GitHub after the page; the links work either way. */} + 0}> +
      + + {(release) => ( +
    1. +
    2. + )} +
      +
    +
    +

    + {content().news.changelog.text} + {" · "} + {content().news.feed.text} +

    +
    +
    + + +
    +
    +

    {content().media.intro}

    +

    {content().media.note}

    +
    + + +
    +
    + +
    +
    +

    + {content().brand.before} + {content().brand.link.text} + {content().brand.after} +

    +

    {content().brand.usage}

    +
    + +
    + + 0}> +
    +
      + + {(person) => ( +
    • + {(photo) => {person.name}} + {person.name}}> + {(href) => {person.name}} + + {person.role} + {person.bio} +
    • + )} +
      +
    + + {(zip) => ( + + )} + +
    +
    + +
    +
    +

    {content().company.lead}

    +

    + +

    +
    + {/* The legal index's list (doc-list.css): the same rows, type, spacing and hover. */} + +

    + +

    +
    + +
    +

    {content().anomalyLogo.body}

    + +
      + + {(asset) => { + const detail = i18n.t("press.ui.anomalyAsset", { + name: language.locale() === "en" ? asset.name.toLowerCase() : asset.name, + }) + return ( +
    • + {asset.name} +
      + {`Anomaly +
      +
      +
      + + + + + + + + + +
      +
      +
    • + ) + }} +
      +
    + + {copied()?.startsWith("svg:") ? i18n.t("site.action.copied") : ""} + +
    + + 0}> +
    +
      + + {(item) => ( +
    1. + {item.outlet} + + {item.title} {item.type} · {item.date} + +
    2. + )} +
      +
    +
    +
    + +
    +
      + + {(item) => ( +
    • +

      {item.title}

      +

      {item.body}

      +

      + + {(entry, index) => ( + <> + 0}>{" · "} + {entry.text} + + )} + +

      +
    • + )} +
      +
    +
    +
    + ) +} + +/** Settings › Other rows for this page's judgement calls. */ +function PressSettings(props: { section: SettingsSectionID }) { + return ( + + setSiteSetting("pressToc", value)} + /> + setSiteSetting("pressBoilerplate", value)} + /> + setSiteSetting("pressMilestones", value)} + /> + setSiteSetting("pressNews", value)} + /> + setSiteSetting("pressMedia", value)} + /> + setSiteSetting("pressCompany", value)} + /> + setSiteSetting("pressContact", value)} + /> + setSiteSetting("pressCopyStyle", value)} + /> + setSiteSetting("pressMediaLayout", value)} + /> + + ) +} + +function DownloadIcon() { + return ( + + ) +} + +function CheckIcon() { + return ( + + ) +} + +function CopyIcon() { + return ( + + ) +} diff --git a/packages/console/app/src/routes/press/media-gallery.css b/packages/console/app/src/routes/press/media-gallery.css new file mode 100644 index 00000000000..02e3383fff0 --- /dev/null +++ b/packages/console/app/src/routes/press/media-gallery.css @@ -0,0 +1,644 @@ +[data-component="press-gallery"] { + display: flex; + flex-direction: column; + gap: 3rem; + + [data-slot="group"] { + display: flex; + flex-direction: column; + gap: 1rem; + min-width: 0; + } + + [data-slot="group-head"] { + display: flex; + align-items: center; + gap: 0.75rem; + + h3 { + font-family: var(--font-mono); + font-size: var(--mono-size); + font-weight: 400; + color: var(--text-strong); + } + } + + [data-slot="count"] { + font-family: var(--font-mono); + font-size: var(--fs-meta); + color: var(--text-weak); + } + + [data-slot="group-download"] { + margin-inline-start: auto; + } + + /* Every layout's thumbnails: a button with the image, dark behind it, and a play mark on videos. */ + [data-slot="thumb"], + [data-slot="preview"] { + position: relative; + display: block; + width: 100%; + padding: 0; + border: 0; + /* A surface grey until the image loads, not a black box. */ + background: var(--bg-weak); + box-shadow: inset 0 0 0 1px var(--border); + cursor: zoom-in; + overflow: hidden; + + img { + display: block; + width: 100%; + height: 100%; + object-fit: cover; + transition: opacity 150ms ease; + } + + &:focus-visible { + outline: 1px solid var(--link); + outline-offset: 2px; + } + + @media (hover: hover) and (pointer: fine) { + &:hover img { + opacity: 0.85; + } + } + + &:active img { + opacity: 0.85; + } + } + + [data-slot="play"] { + position: absolute; + inset-inline-start: 0.5rem; + bottom: 0.5rem; + display: grid; + place-items: center; + width: 1.5rem; + height: 1.5rem; + background: rgb(0 0 0 / 0.7); + color: #fff; + } + + /* "products" (default): the four products side by side in the page's columns (2 × 2 at medium + widths, stacked on phones), each with one image and one Download all button. */ + &[data-style="products"] { + display: grid; + grid-template-columns: repeat(4, minmax(0, 1fr)); + gap: 2rem var(--gutter); + + [data-slot="group"] { + gap: 0.75rem; + min-width: 0; + container-type: inline-size; + } + + [data-slot="zip-size"] { + display: none; + align-self: end; + margin-top: -0.25rem; + font-size: var(--fs-meta); + color: var(--text-weak); + } + + /* Below 13rem the button can't hold "Download all", the size and the icon: the size moves + under it. */ + @container (max-width: 13rem) { + [data-slot="product-download"] [data-slot="size"] { + display: none; + } + + [data-slot="zip-size"] { + display: block; + } + } + + /* One line: the name, then the count, which truncates with "…" when the column is narrow. */ + [data-slot="group-head"] { + align-items: baseline; + gap: 0.5rem; + min-width: 0; + white-space: nowrap; + + h3 { + flex: none; + } + } + + [data-slot="count"] { + min-width: 0; + overflow: hidden; + text-overflow: ellipsis; + } + + [data-slot="thumb"] { + width: 100%; + aspect-ratio: 16 / 9; + } + + /* Never wider than its column; the label truncates before it overflows. */ + /* Under its tile, at the inline end (the right, or the left in right-to-left text), as on /brand. */ + [data-slot="product-download"] { + align-self: end; + max-width: 100%; + min-width: 0; + overflow: hidden; + } + + /* The content column is too narrow for four below 75rem (the Contents rail takes a column). */ + @media (max-width: 75rem) { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } + + @media (max-width: 40rem) { + grid-template-columns: minmax(0, 1fr); + + [data-slot="count"] { + display: inline; + } + } + } + + /* "strip": a sideways carousel of small 16:9 thumbnails with captions and actions. The + track snaps to each thumbnail; a fade masks whichever edge has more to scroll. */ + [data-slot="strip-carousel"] { + position: relative; + --strip-fade: 3rem; + } + + [data-slot="strip-track"] { + display: flex; + gap: 1rem; + margin: 0; + padding: 0 0 0.5rem; + list-style: none; + overflow-x: auto; + overscroll-behavior-x: contain; + /* Proximity, not mandatory: mandatory snapping can jump the strip when the window resizes. */ + scroll-snap-type: x proximity; + scrollbar-width: none; + mask-image: linear-gradient( + to right, + transparent, + #000 var(--strip-fade), + #000 calc(100% - var(--strip-fade)), + transparent + ); + + &::-webkit-scrollbar { + display: none; + } + + li { + flex: none; + display: flex; + flex-direction: column; + gap: 0.5rem; + width: 15rem; + scroll-snap-align: start; + } + + [data-slot="thumb"] { + aspect-ratio: 16 / 9; + } + } + + [data-slot="strip-carousel"][data-at-start] [data-slot="strip-track"] { + mask-image: linear-gradient(to var(--x-end, right), #000 calc(100% - var(--strip-fade)), transparent); + } + + [data-slot="strip-carousel"][data-at-end] [data-slot="strip-track"] { + mask-image: linear-gradient(to var(--x-end, right), transparent, #000 var(--strip-fade)); + } + + [data-slot="strip-carousel"][data-at-start][data-at-end] [data-slot="strip-track"] { + mask-image: none; + } + + /* Square arrow buttons over the thumbnails' edges; hidden at an end. */ + [data-slot="strip-arrow"] { + position: absolute; + top: calc(15rem * 9 / 16 / 2 - 1rem); + display: grid; + place-items: center; + width: 2rem; + height: 2rem; + padding: 0; + border: 1px solid var(--border); + background: var(--bg); + color: var(--text-strong); + cursor: pointer; + transition: + opacity 150ms ease, + background-color 150ms ease; + + &[data-direction="previous"] { + inset-inline-start: 0; + } + + &[data-direction="next"] { + inset-inline-end: 0; + } + + &:disabled { + opacity: 0; + pointer-events: none; + } + + @media (hover: hover) and (pointer: fine) { + &:hover { + background: var(--bg-weak); + } + } + + &:active { + background: var(--bg-weak); + } + + &:focus-visible { + outline: 2px solid var(--link); + outline-offset: 2px; + } + } + + /* "thumbnails": uniform 16:9 thumbnails, three to a row (two on phones), each with its + caption and actions under it. */ + [data-slot="thumbnails"] { + display: grid; + grid-template-columns: repeat(3, minmax(0, 1fr)); + gap: 1.5rem 1rem; + margin: 0; + padding: 0; + list-style: none; + + li { + display: flex; + flex-direction: column; + gap: 0.5rem; + min-width: 0; + } + + [data-slot="thumb"] { + aspect-ratio: 16 / 9; + } + } + + [data-slot="tile-meta"] { + display: flex; + align-items: flex-start; + justify-content: space-between; + gap: 0.5rem; + } + + [data-slot="caption-text"] { + min-width: 0; + font-size: var(--fs-small); + line-height: 1.4; + color: var(--text); + } + + [data-slot="tile-actions"] { + display: flex; + flex: none; + align-items: center; + justify-content: flex-end; + gap: 0.5rem; + } + + /* Small text actions in grey that turn strong on hover or focus; 24px tall for touch. */ + [data-slot="tile-action"] { + display: inline-flex; + align-items: center; + gap: 0.25rem; + min-height: 1.5rem; + padding: 0; + border: 0; + background: none; + font-family: var(--font-sans); + font-size: var(--fs-meta); + color: var(--text-weak); + text-decoration: none; + cursor: pointer; + transition: color 150ms ease; + + @media (hover: hover) and (pointer: fine) { + &:hover { + color: var(--text-strong); + } + } + + &:active { + color: var(--text-strong); + } + + &:focus-visible { + color: var(--text-strong); + outline: 1px solid var(--link); + outline-offset: 2px; + } + } + + /* (a) "grid": large tiles, two to a row; portrait items take half a cell's width. */ + &[data-style="grid"] [data-slot="tiles"] { + display: grid; + grid-template-columns: repeat(2, minmax(0, 1fr)); + gap: 1rem; + margin: 0; + padding: 0; + list-style: none; + + [data-slot="thumb"] { + aspect-ratio: 16 / 9; + } + + [data-orientation="portrait"] [data-slot="thumb"] img { + object-fit: contain; + } + } + + /* (b) "filmstrip": a big preview over a strip of every item. */ + [data-slot="filmstrip"] { + display: flex; + flex-direction: column; + gap: 0.75rem; + min-width: 0; + } + + [data-slot="preview"] { + aspect-ratio: 16 / 9; + + img { + object-fit: contain; + } + } + + [data-slot="caption"] { + position: absolute; + inset-inline-end: 0.5rem; + bottom: 0.5rem; + padding: 0.25rem 0.5rem; + background: rgb(0 0 0 / 0.7); + font-family: var(--font-mono); + font-size: var(--fs-meta); + color: #fff; + } + + [data-slot="strip"] { + display: flex; + gap: 0.5rem; + margin: 0; + padding: 0 0 0.5rem; + list-style: none; + overflow-x: auto; + scroll-snap-type: x proximity; + scrollbar-width: thin; + + li { + flex: none; + height: 4.5rem; + aspect-ratio: 16 / 9; + scroll-snap-align: start; + + &[data-orientation="portrait"] { + aspect-ratio: 4 / 5; + } + } + + [data-slot="thumb"] { + height: 100%; + cursor: pointer; + } + + [data-slot="thumb"][aria-current] { + outline: 1px solid var(--text-strong); + outline-offset: 2px; + } + + [data-slot="play"] { + inset-inline-start: 0.25rem; + bottom: 0.25rem; + width: 1.125rem; + height: 1.125rem; + } + } + + /* (c) "wall": a collage in three columns, each item at its own shape. */ + &[data-style="wall"] [data-slot="tiles"] { + columns: 3; + column-gap: 0.75rem; + margin: 0; + padding: 0; + list-style: none; + + li { + break-inside: avoid; + margin-bottom: 0.75rem; + } + + [data-slot="thumb"] img { + height: auto; + } + } + + /* (d) "fan": a stacked deck; opening it fans the cards into a grid (media-gallery.tsx animates it). */ + [data-slot="fan"] { + display: flex; + flex-direction: column; + gap: 1rem; + } + + [data-slot="deck"] { + display: flex; + align-items: center; + gap: 1.5rem; + width: fit-content; + padding-block: 1rem; + padding-inline: 1rem 1.5rem; + border: 0; + background: none; + cursor: pointer; + text-align: start; + + &:focus-visible { + outline: 1px solid var(--link); + } + } + + [data-slot="cards"] { + position: relative; + display: block; + width: 13rem; + aspect-ratio: 16 / 9; + + img { + position: absolute; + inset: 0; + width: 100%; + height: 100%; + object-fit: cover; + background: var(--bg-weak); + box-shadow: var(--fan-shadow); + /* Each card below the top one sits a little lower and turned. */ + transform: translate(calc(var(--card) * 6px), calc(var(--card) * 5px)) rotate(calc(var(--card) * 2.5deg)); + transition: transform 320ms var(--ease-out); + } + } + + @media (hover: hover) and (pointer: fine) { + [data-slot="deck"]:hover [data-slot="cards"] img { + transform: translate(calc(var(--card) * 10px), calc(var(--card) * 7px)) rotate(calc(var(--card) * 4deg)); + } + } + + [data-slot="deck"]:active [data-slot="cards"] img { + transform: translate(calc(var(--card) * 10px), calc(var(--card) * 7px)) rotate(calc(var(--card) * 4deg)); + } + + [data-slot="fan"][data-open] [data-slot="cards"] img { + transform: none; + } + + [data-slot="deck-label"] { + font-family: var(--font-mono); + font-size: var(--mono-size); + color: var(--text-strong); + } + + [data-slot="fanned"] { + display: grid; + grid-template-columns: repeat(3, minmax(0, 1fr)); + gap: 1rem; + margin: 0; + padding: 0; + list-style: none; + + li { + transition: box-shadow 320ms var(--ease-out); + } + + [data-slot="thumb"] { + aspect-ratio: 16 / 9; + box-shadow: var(--fan-shadow); + } + + li[data-lift] [data-slot="thumb"] { + box-shadow: var(--fan-shadow-lifted); + } + + [data-orientation="portrait"] [data-slot="thumb"] img { + object-fit: contain; + } + } + + @media (max-width: 40rem) { + &[data-style="grid"] [data-slot="tiles"], + [data-slot="fanned"] { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } + + &[data-style="wall"] [data-slot="tiles"] { + columns: 2; + } + + [data-slot="thumbnails"] { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } + + [data-slot="strip-track"] li { + width: 70%; + } + + [data-slot="strip-arrow"] { + display: none; + } + + [data-slot="tile-meta"] { + flex-direction: column; + } + + /* Stacked under the caption, the downloads keep to the inline end. */ + [data-slot="tile-actions"] { + align-self: end; + flex-wrap: wrap; + justify-content: flex-end; + } + + [data-slot="count"] { + display: none; + } + } +} + +/* The lightbox: the item as large as the window allows, with a bar of actions under it. */ +[data-component="press-gallery"] [data-component="press-lightbox"] { + position: fixed; + inset: 0; + z-index: 1000; + display: flex; + flex-direction: column; + gap: 1rem; + padding: 2rem; + background: rgb(0 0 0 / 0.94); + backdrop-filter: blur(8px); + color-scheme: dark; + + [data-slot="stage"] { + flex: 1; + min-height: 0; + display: grid; + place-items: center; + pointer-events: none; + + :is(img, video) { + max-width: 100%; + max-height: 100%; + width: auto; + height: auto; + object-fit: contain; + background: #0a0a0a; + pointer-events: auto; + } + } + + [data-slot="bar"] { + display: flex; + flex-wrap: wrap; + align-items: center; + justify-content: space-between; + gap: 0.75rem 1.5rem; + } + + [data-slot="title"] { + display: flex; + gap: 1rem; + font-family: var(--font-mono); + font-size: var(--mono-size); + color: #fff; + } + + [data-slot="counter"] { + color: hsl(0, 0%, 64%); + } + + [data-slot="actions"] { + display: flex; + flex-wrap: wrap; + gap: 0.5rem; + } + + [data-slot="sr-only"] { + position: absolute; + width: 1px; + height: 1px; + overflow: hidden; + clip-path: inset(50%); + white-space: nowrap; + } + + @media (max-width: 40rem) { + padding: 1rem; + } +} diff --git a/packages/console/app/src/routes/press/media-gallery.tsx b/packages/console/app/src/routes/press/media-gallery.tsx new file mode 100644 index 00000000000..892dc7d21b3 --- /dev/null +++ b/packages/console/app/src/routes/press/media-gallery.tsx @@ -0,0 +1,609 @@ +import { Marked } from "~/component/site/marked" +import { useI18n } from "~/context/i18n" +import "./media-gallery.css" +import { createEffect, createSignal, For, Match, on, onCleanup, onMount, Show, Switch } from "solid-js" +import { fanMotion } from "~/component/site/logo-fan" +import type { PressMediaItem } from "~/lib/press-content" +import { Still } from "~/component/site/media" +import { inlineKey, scrollLeftFor, scrollStart } from "~/lib/direction" + +type Product = { + name: string + slug: string + zip: { href: string; size: string } + items: PressMediaItem[] +} + +type Style = "products" | "strip" | "thumbnails" | "filmstrip" | "grid" | "wall" | "fan" + +/** + * The press media, one group per product, in one of seven layouts (Settings › Press media layout). + * Every layout opens the same lightbox: arrow keys move through the product's media, Escape closes, + * focus stays inside, and each still or video downloads from there. + */ +export function MediaGallery(props: { products: Product[]; style: Style }) { + const i18n = useI18n() + const [open, setOpen] = createSignal<{ product: number; item: number; from: HTMLElement }>() + const show = (product: number, item: number, event: MouseEvent) => + setOpen({ product, item, from: event.currentTarget as HTMLElement }) + + return ( +
    + + {(product, productIndex) => ( + +
    +

    {product.name}

    + {i18n.t("press.ui.items", { count: product.items.length })} +
    + show(productIndex(), 0, event)} /> + + + {product.zip.size} + + + {/* In a narrow column the size moves out of the button to a muted line under it. */} + + + } + > +
    +
    +

    {product.name}

    + {i18n.t("press.ui.items", { count: product.items.length })} + + + {product.zip.size} + + +
    + + + show(productIndex(), item, event)} /> + + + show(productIndex(), item, event)} /> + + + show(productIndex(), item, event)} /> + + + show(productIndex(), item, event)} /> + + +
      + + {(item, index) => ( +
    • item.width ? "portrait" : "landscape"}> + show(productIndex(), index(), event)} /> +
    • + )} +
      +
    +
    +
    +
    +
    + )} +
    + + {(state) => ( + setOpen({ ...state(), item })} + onClose={() => { + const from = state().from + setOpen(undefined) + from.focus() + }} + /> + )} + +
    + ) +} + +// The thumbnails are drawn at most 385px wide: their copies (media.tsx) are 800px. +const thumbSizes = "385px" + +/** A thumbnail button; videos carry a small play mark. */ +function Thumb(props: { item: PressMediaItem; onClick: (event: MouseEvent) => void; current?: boolean }) { + const i18n = useI18n() + return ( + + ) +} + +/** A thumbnail with its caption, then its downloads and a copy-link icon. */ +function Tile(props: { + item: PressMediaItem + copied: boolean + onOpen: (event: MouseEvent) => void + onCopy: () => void +}) { + const i18n = useI18n() + const file = (src: string) => src.split("/").pop() ?? src + return ( + <> + +
    + {props.item.title} +
    + + + + + + {(video) => ( + + + + + )} + + +
    +
    + + ) +} + +/** Copies an item's absolute link and marks it as copied for a moment. */ +function useCopyLink() { + const [copied, setCopied] = createSignal() + const copy = (item: PressMediaItem) => { + void navigator.clipboard.writeText(new URL(item.video ?? item.image, location.href).href) + setCopied(item.id) + setTimeout(() => setCopied((current) => (current === item.id ? undefined : current)), 1500) + } + return { copied, copy } +} + +/** + * "strip" (default): one row of small thumbnails per product, no big image. It scrolls sideways + * (swipe, trackpad, the arrow buttons, or ←/→ between thumbnails) and snaps to each thumbnail; the + * edges fade where there is more to scroll. A thumbnail opens the lightbox. + */ +function Strip(props: { product: Product; onOpen: (item: number, event: MouseEvent) => void }) { + const i18n = useI18n() + const link = useCopyLink() + const [edges, setEdges] = createSignal({ start: true, end: false }) + let track!: HTMLUListElement + const measure = () => + setEdges({ + start: scrollStart(track) <= 1, + end: scrollStart(track) + track.clientWidth >= track.scrollWidth - 1, + }) + onMount(() => { + measure() + const observer = new ResizeObserver(measure) + observer.observe(track) + onCleanup(() => observer.disconnect()) + }) + const page = (direction: 1 | -1) => + track.scrollBy({ left: scrollLeftFor(track, direction * track.clientWidth * 0.8), behavior: "smooth" }) + // ←/→ move focus between thumbnails, scrolling the next one into view. + const keys = (event: KeyboardEvent) => { + const key = inlineKey(event) + if (key !== "ArrowRight" && key !== "ArrowLeft") return + const thumbs = [...track.querySelectorAll('[data-slot="thumb"]')] + const index = thumbs.indexOf(document.activeElement as HTMLElement) + if (index < 0) return + event.preventDefault() + const next = thumbs[Math.min(thumbs.length - 1, Math.max(0, index + (key === "ArrowRight" ? 1 : -1)))] + next.focus({ preventScroll: true }) + next.scrollIntoView({ block: "nearest", inline: "nearest", behavior: "smooth" }) + } + return ( +
    +
      + + {(item, index) => ( +
    • + props.onOpen(index(), event)} + onCopy={() => link.copy(item)} + /> +
    • + )} +
      +
    + + + + {link.copied() ? i18n.t("site.action.copied") : ""} + +
    + ) +} + +/** + * "thumbnails": uniform 16:9 cover-cropped thumbnails in a grid, each with its caption, downloads + * and a copy-link icon under it. A thumbnail opens the lightbox. + */ +function Thumbnails(props: { product: Product; onOpen: (item: number, event: MouseEvent) => void }) { + const i18n = useI18n() + const link = useCopyLink() + return ( +
      + + {(item, index) => ( +
    • + props.onOpen(index(), event)} + onCopy={() => link.copy(item)} + /> +
    • + )} +
      +
    • + {link.copied() ? i18n.t("site.action.copied") : ""} +
    • +
    + ) +} + +/** A big preview of the chosen item over a strip of every item; the preview opens the lightbox. */ +function Filmstrip(props: { product: Product; onOpen: (item: number, event: MouseEvent) => void }) { + const i18n = useI18n() + const [current, setCurrent] = createSignal(0) + const item = () => props.product.items[current()] + return ( +
    + +
      + + {(entry, index) => ( +
    • entry.width ? "portrait" : "landscape"}> + setCurrent(index())} /> +
    • + )} +
      +
    +
    + ) +} + +/** + * A stacked deck of the product's media. Opening it fans the cards out into a grid with the logo + * fan's spring, stagger and lifted shadows; each card then opens the lightbox. + */ +function Fan(props: { product: Product; onOpen: (item: number, event: MouseEvent) => void }) { + const i18n = useI18n() + const [fanned, setFanned] = createSignal(false) + let deck!: HTMLButtonElement + let grid!: HTMLUListElement + const still = () => window.matchMedia("(prefers-reduced-motion: reduce)").matches + + createEffect( + on( + fanned, + (open) => { + if (!open || still()) return + const origin = deck.getBoundingClientRect() + const cards = [...grid.children] as HTMLElement[] + cards.forEach((card, index) => { + const box = card.getBoundingClientRect() + // Each card springs out from the deck's place, one after another. + const dx = origin.left + origin.width / 2 - (box.left + box.width / 2) + const dy = origin.top + origin.height / 2 - (box.top + box.height / 2) + const turn = ((index % 3) - 1) * 4 + const timing = { delay: index * fanMotion.stagger, fill: "backwards" as const } + card.animate( + [{ transform: `translate(${dx}px, ${dy}px) rotate(${turn}deg) scale(0.6)` }, { transform: fanMotion.rest }], + { ...timing, duration: 520, easing: fanMotion.spring }, + ) + card.animate([{ opacity: 0 }, { opacity: 1 }], { ...timing, duration: 140, easing: "ease-out" }) + card.toggleAttribute("data-lift", true) + setTimeout(() => card.removeAttribute("data-lift"), timing.delay + 260) + }) + }, + { defer: true }, + ), + ) + + return ( +
    + + +
      + + {(item, index) => ( +
    • item.width ? "portrait" : "landscape"}> + props.onOpen(index(), event)} /> +
    • + )} +
      +
    +
    +
    + ) +} + +/** The enlarged item, with the previous and next items, downloads and a close button. */ +function Lightbox(props: { product: Product; index: number; onIndex: (index: number) => void; onClose: () => void }) { + const i18n = useI18n() + let root!: HTMLDivElement + const item = () => props.product.items[props.index] + const count = () => props.product.items.length + const step = (by: number) => props.onIndex((props.index + by + count()) % count()) + const file = (src: string) => src.split("/").pop() ?? src + + const keys = (event: KeyboardEvent) => { + if (event.key === "Escape") return props.onClose() + if (inlineKey(event) === "ArrowRight") return step(1) + if (inlineKey(event) === "ArrowLeft") return step(-1) + if (event.key !== "Tab") return + // Keep focus inside the lightbox. + const focusable = [...root.querySelectorAll("button, a[href], video[controls]")] + const first = focusable[0] + const last = focusable.at(-1) + if (event.shiftKey && document.activeElement === first) { + event.preventDefault() + last?.focus() + } + if (!event.shiftKey && document.activeElement === last) { + event.preventDefault() + first?.focus() + } + } + + createEffect(() => { + document.addEventListener("keydown", keys) + const overflow = document.documentElement.style.overflow + document.documentElement.style.overflow = "hidden" + root.querySelector('[data-slot="close"]')?.focus() + onCleanup(() => { + document.removeEventListener("keydown", keys) + document.documentElement.style.overflow = overflow + }) + }) + + // Rendered in place (not in a portal) so the site's button styles still apply; it is fixed to the window. + return ( +
    event.target === event.currentTarget && props.onClose()} + > +
    + } + > + {(video) => ( + +
    +
    +

    + {item().title} + + {props.index + 1} / {count()} + +

    +
    + + + + + + + + {(video) => ( + + + + + )} + + +
    +
    + + {item().title}, {props.index + 1} of {count()} + +
    + ) +} + +function CopyIcon() { + return ( + + ) +} + +function CheckIcon() { + return ( + + ) +} + +function PlayIcon() { + return ( + + ) +} + +function DownloadIcon() { + return ( + + ) +} diff --git a/packages/console/app/test/sitemap.test.ts b/packages/console/app/test/sitemap.test.ts new file mode 100644 index 00000000000..754fe5378cf --- /dev/null +++ b/packages/console/app/test/sitemap.test.ts @@ -0,0 +1,147 @@ +import { describe, expect, test } from "bun:test" +import { fileURLToPath } from "node:url" +// SolidStart's own file router, which builds the route manifest the app serves /sitemap-pages.xml from. +import { DEFAULT_EXTENSIONS } from "../node_modules/@solidjs/start/dist/config/constants.js" +import { SolidStartServerFileRouter } from "../node_modules/@solidjs/start/dist/config/fs-router.js" +import { config } from "~/config" +import type { ChangelogRelease } from "~/lib/changelog" +import { LOCALES, strip } from "~/lib/language" +import { legalDocuments } from "~/lib/legal" +import { + sitemapExclusion, + sitemapExclusions, + sitemapFiles, + sitemapIndexXml, + sitemapLimits, + sitemapPages, + sitemapXml, + unlistedRoutes, +} from "~/lib/sitemap" + +const router = new SolidStartServerFileRouter({ + dir: fileURLToPath(new URL("../src/routes", import.meta.url)), + extensions: DEFAULT_EXTENSIONS, +}) +const manifest: { path: string; page?: boolean }[] = await router.getRoutes() +const routes = manifest.filter((route) => route.page).map((route) => route.path) + +const release = (index: number): ChangelogRelease => ({ + tag: `v2.0.${index}`, + name: `v2.0.${index}`, + // One release a day, so none merge. + date: new Date(Date.UTC(2026, 0, 1) + index * 86_400_000).toISOString(), + url: `https://github.com/anomalyco/opencode/releases/tag/v2.0.${index}`, + highlights: [], + sections: [], + notes: { + features: [{ title: `Feature ${index}`, body: "", areas: ["Core"], prs: [], credits: [] }], + breaking: [], + improved: [{ text: `Improvement ${index}`, areas: ["Core"], prs: [], credits: [] }], + fixed: [], + media: [], + }, +}) +const releases = Array.from({ length: 3 }, (_, index) => release(index + 1)).toReversed() +const xml = sitemapXml(sitemapPages(routes, { releases })) +const urls = [...xml.matchAll(/([^<]+)<\/loc>/g)].map((match) => match[1]) + +describe("sitemap", () => { + test("/sitemap.xml is an index of this site's sitemaps, with the pages and the V2 docs at /v2", () => { + const index = sitemapIndexXml(sitemapFiles) + const files = [...index.matchAll(/([^<]+)<\/loc><\/sitemap>/g)].map((match) => match[1]) + expect(index).toContain('') + expect(files).toEqual(sitemapFiles.map((file) => `${config.baseUrl}${file}`)) + expect(files).toContain(`${config.baseUrl}/sitemap-pages.xml`) + expect(files).toContain(`${config.baseUrl}/v2/sitemap.xml`) + expect(files.some((file) => file === `${config.baseUrl}/sitemap.xml`)).toBe(false) + }) + + test("lists every public page route, or excludes it with a reason", () => { + expect(unlistedRoutes(routes)).toEqual([]) + const listed = new Set(urls.map((url) => strip(new URL(url).pathname))) + const missing = routes + .map((path) => (path.length > 1 ? path.replace(/\/$/, "") : path)) + .filter((path) => !/[:*]/.test(path) && !sitemapExclusion(path) && !listed.has(path)) + expect(missing).toEqual([]) + }) + + test("every exclusion still matches a route", () => { + const stale = Object.keys(sitemapExclusions).filter( + (pattern) => + !routes.some((path) => + pattern.endsWith("/*") ? path.startsWith(pattern.slice(0, -2)) : path.replace(/(.)\/$/, "$1") === pattern, + ), + ) + expect(stale).toEqual([]) + }) + + test("every URL is served by a page route", () => { + const patterns = routes + .filter((path) => !sitemapExclusion(path.replace(/(.)\/$/, "$1"))) + .map((path) => ({ + path, + regex: new RegExp( + `^${path + .replace(/(.)\/$/, "$1") + .replace(/\*[^/]*/g, ".+") + .replace(/:[^/]+/g, "[^/]+")}$`, + ), + })) + const tags = new Set(releases.map((item) => item.tag)) + const unserved = urls.filter((url) => { + expect(url.startsWith(`${config.baseUrl}/`)).toBe(true) + const path = strip(new URL(url).pathname) + // A dynamic URL must come from the data its page reads: the catch-all 404 is excluded above. + const tag = path.match(/^\/changelog\/([^/]+)$/)?.[1] + if (tag) return !tags.has(tag) + return !patterns.some((pattern) => pattern.regex.test(path)) + }) + expect(unserved).toEqual([]) + expect(new Set(urls).size).toBe(urls.length) + }) + + test("lists localized pages in every locale with hreflang alternates, and legal pages once", () => { + expect(urls.filter((url) => strip(new URL(url).pathname) === "/")).toHaveLength(LOCALES.length) + expect(xml).toContain(``) + expect(xml).toContain(``) + legalDocuments.forEach((document) => { + expect(urls.filter((url) => url.endsWith(document.path))).toEqual([`${config.baseUrl}${document.path}`]) + }) + expect(xml).toContain(`${config.baseUrl}/changelog/v2.0.32026-01-04`) + expect(urls.some((url) => /\/(dev|workspace|legal\/subprocessors)(\/|$)/.test(url))).toBe(false) + }) + + test("lists the changelog once, in English, with only en and x-default alternates", () => { + const changelog = urls.filter((url) => /\/changelog(\/|$)/.test(new URL(url).pathname)) + expect(changelog).toEqual([ + `${config.baseUrl}/changelog`, + ...releases.map((item) => `${config.baseUrl}/changelog/${item.tag}`), + ]) + const entry = xml.split("\n").find((line) => line.includes(`${config.baseUrl}/changelog/v2.0.3`)) + expect( + [...(entry ?? "").matchAll(/hreflang="([^"]+)" href="([^"]+)"/g)].map((match) => [match[1], match[2]]), + ).toEqual([ + ["en", `${config.baseUrl}/changelog/v2.0.3`], + ["x-default", `${config.baseUrl}/changelog/v2.0.3`], + ]) + }) + + test("lists the font once, in English, with only en and x-default alternates", () => { + expect(urls.filter((url) => new URL(url).pathname.endsWith("/font"))).toEqual([`${config.baseUrl}/font`]) + expect(xml).toContain( + `${config.baseUrl}/font`, + ) + }) + + test("leaves out /zen, which redirects to the Console", () => { + expect(urls.some((url) => /\/zen(\/|$)/.test(new URL(url).pathname))).toBe(false) + }) + + test("stays inside the single-file limits with the most releases the changelog loads", () => { + const most = sitemapXml( + sitemapPages(routes, { releases: Array.from({ length: 300 }, (_, index) => release(index + 1)) }), + ) + expect(most.match(//g)?.length ?? 0).toBeLessThan(sitemapLimits.urls) + expect(new TextEncoder().encode(most).length).toBeLessThan(sitemapLimits.bytes) + }) +})