diff --git a/package-lock.json b/package-lock.json index 430fda5..5e3eb60 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,13 +14,13 @@ "@expressive-code/plugin-line-numbers": "^0.40.2", "@inox-tools/portal-gun": "^1.0.3", "@playwright/test": "^1.51.1", - "@types/node": "^22.13.14", + "@types/node": "^22.14.0", "@vtbag/cam-shaft": "^1.0.6", "@vtbag/element-crossing": "^1.1.0", "@vtbag/inspection-chamber": "^1.0.21", "@vtbag/turn-signal": "^1.3.1", - "@vtbag/utensil-drawer": "0.0.0-vector-20250331", - "astro": "^5.5.5", + "@vtbag/utensil-drawer": "^1.2.1", + "astro": "^5.5.6", "astro-d2": "^0.7.0", "astro-vtbot": "^2.1.2", "rehype-autolink-headings": "^7.1.0", @@ -1978,13 +1978,13 @@ } }, "node_modules/@types/node": { - "version": "22.13.14", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.14.tgz", - "integrity": "sha512-Zs/Ollc1SJ8nKUAgc7ivOEdIBM8JAKgrqqUYi2J997JuKO7/tpQC+WCetQ1sypiKCQWHdvdg9wBNpUPEWZae7w==", + "version": "22.14.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.14.0.tgz", + "integrity": "sha512-Kmpl+z84ILoG+3T/zQFyAJsU6EPTmOCj8/2+83fSN6djd6I4o7uOuGIH6vq3PrjY5BGitSbFuMN18j3iknubbA==", "dev": true, "license": "MIT", "dependencies": { - "undici-types": "~6.20.0" + "undici-types": "~6.21.0" } }, "node_modules/@types/sax": { @@ -2154,9 +2154,9 @@ } }, "node_modules/@vtbag/utensil-drawer": { - "version": "0.0.0-vector-20250331", - "resolved": "https://registry.npmjs.org/@vtbag/utensil-drawer/-/utensil-drawer-0.0.0-vector-20250331.tgz", - "integrity": "sha512-37M+QC96RvE38uLZuOoYRJvhRRC9LQFBP+PrxYykNTczYupEcI61n7KTQWX69M72XkucYXWSPnsJkl6NfwiZxA==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@vtbag/utensil-drawer/-/utensil-drawer-1.2.1.tgz", + "integrity": "sha512-Er6I1NUaYrO/BB0NubJ9PK/wM7UJB2vNP/mU+ewS6KzpNi+Za/eOeGO4kb9pjerCJu7ntKUPQEJgl7m+jPl4uw==", "dev": true, "license": "ISC", "funding": { @@ -2371,9 +2371,9 @@ } }, "node_modules/astro": { - "version": "5.5.5", - "resolved": "https://registry.npmjs.org/astro/-/astro-5.5.5.tgz", - "integrity": "sha512-fdnnK5dhWNIQT/cXzvaGs9il4T5noi4jafobdntbuNOrRxI1JnOxDfrtBadUo6cknCRCFhYrXh4VndCqj1a4Sg==", + "version": "5.5.6", + "resolved": "https://registry.npmjs.org/astro/-/astro-5.5.6.tgz", + "integrity": "sha512-SjU6zAlRe/gQrZ558Qhm211Yl8XOZBfjMpZig3XtQpG6zlyHJkElbWQIWXAVPzMg17cFVdv/qZPVHfcP2YOGGw==", "dev": true, "license": "MIT", "dependencies": { @@ -2413,12 +2413,12 @@ "neotraverse": "^0.6.18", "p-limit": "^6.2.0", "p-queue": "^8.1.0", - "package-manager-detector": "^1.0.0", + "package-manager-detector": "^1.1.0", "picomatch": "^4.0.2", "prompts": "^2.4.2", "rehype": "^13.0.2", "semver": "^7.7.1", - "shiki": "^3.0.0", + "shiki": "^3.2.1", "tinyexec": "^0.3.2", "tinyglobby": "^0.2.12", "tsconfck": "^3.1.5", @@ -2426,13 +2426,13 @@ "unist-util-visit": "^5.0.0", "unstorage": "^1.15.0", "vfile": "^6.0.3", - "vite": "^6.2.3", + "vite": "^6.2.4", "vitefu": "^1.0.6", "xxhash-wasm": "^1.1.0", "yargs-parser": "^21.1.1", "yocto-spinner": "^0.2.1", "zod": "^3.24.2", - "zod-to-json-schema": "^3.24.3", + "zod-to-json-schema": "^3.24.5", "zod-to-ts": "^1.2.0" }, "bin": { @@ -2514,17 +2514,6 @@ "url": "https://github.com/sponsors/martrapp" } }, - "node_modules/astro-vtbot/node_modules/@vtbag/utensil-drawer": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@vtbag/utensil-drawer/-/utensil-drawer-1.2.0.tgz", - "integrity": "sha512-o1LoA2QtXesonezCoVVXK0irvGymGu+JFxlyr4knu0tRKenaBoIilMt2W1eTfarWp8X1JTK88oHSIVnXUA1odw==", - "dev": true, - "license": "ISC", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/martrapp" - } - }, "node_modules/astro/node_modules/@astrojs/markdown-remark": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/@astrojs/markdown-remark/-/markdown-remark-6.3.1.tgz", @@ -7246,9 +7235,9 @@ "license": "MIT" }, "node_modules/undici-types": { - "version": "6.20.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", - "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", "dev": true, "license": "MIT" }, @@ -7564,9 +7553,9 @@ } }, "node_modules/vite": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/vite/-/vite-6.2.3.tgz", - "integrity": "sha512-IzwM54g4y9JA/xAeBPNaDXiBF8Jsgl3VBQ2YQ/wOY6fyW3xMdSoltIV3Bo59DErdqdE6RxUfv8W69DvUorE4Eg==", + "version": "6.2.4", + "resolved": "https://registry.npmjs.org/vite/-/vite-6.2.4.tgz", + "integrity": "sha512-veHMSew8CcRzhL5o8ONjy8gkfmFJAd5Ac16oxBUjlwgX3Gq2Wqr+qNC3TjPIpy7TPV/KporLga5GT9HqdrCizw==", "dev": true, "license": "MIT", "dependencies": { @@ -8236,9 +8225,9 @@ } }, "node_modules/zod-to-json-schema": { - "version": "3.24.3", - "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.24.3.tgz", - "integrity": "sha512-HIAfWdYIt1sssHfYZFCXp4rU1w2r8hVVXYIlmoa0r0gABLs5di3RCqPU5DDROogVz1pAdYBaz7HK5n9pSUNs3A==", + "version": "3.24.5", + "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.24.5.tgz", + "integrity": "sha512-/AuWwMP+YqiPbsJx5D6TfgRTc4kTLjsh5SOcd4bLsfUg2RcEXrFMJl1DGgdHy2aCfsIA/cr/1JM0xcB2GZji8g==", "dev": true, "license": "ISC", "peerDependencies": { diff --git a/package.json b/package.json index f55b17e..85a380a 100644 --- a/package.json +++ b/package.json @@ -15,13 +15,13 @@ "@expressive-code/plugin-line-numbers": "^0.40.2", "@inox-tools/portal-gun": "^1.0.3", "@playwright/test": "^1.51.1", - "@types/node": "^22.13.14", + "@types/node": "^22.14.0", "@vtbag/cam-shaft": "^1.0.6", "@vtbag/element-crossing": "^1.1.0", "@vtbag/inspection-chamber": "^1.0.21", "@vtbag/turn-signal": "^1.3.1", - "@vtbag/utensil-drawer": "0.0.0-vector-20250331", - "astro": "^5.5.5", + "@vtbag/utensil-drawer": "^1.2.1", + "astro": "^5.5.6", "astro-d2": "^0.7.0", "astro-vtbot": "^2.1.2", "rehype-autolink-headings": "^7.1.0", diff --git a/src/content/docs/basics/pseudos.mdx b/src/content/docs/basics/pseudos.mdx index c296763..fac4aa8 100644 --- a/src/content/docs/basics/pseudos.mdx +++ b/src/content/docs/basics/pseudos.mdx @@ -257,7 +257,7 @@ These pseudo-elements represent images of their original elements. For `::view-t The `::view-transition-new` images are no simple screenshots but _life replaced elements_. While they behave similarly to screenshots in that they are bitmap images whose height and width can be adjusted, they aren't static: If the underlying elements in the new DOM change, the pixels of the replaced element update as well. -This might be confusing, as the original element is usually hidden behind the `::view-transition` pseudo-element (the “curtain”). Here's the key difference: old images are immutable. For example, if you show the _old image_ of a video player during a view transition, the image is frozen. New images, however, are _live_. If you display a _new image_ of a video player, the video will continue to play during the transition. +This might be confusing, as the original element is usually hidden behind the `::view-transition` pseudo-element (the "curtain"). Here's the key difference: old images are immutable. For example, if you show the _old image_ of a video player during a view transition, the image is frozen. New images, however, are _live_. If you display a _new image_ of a video player, the video will continue to play during the transition. If you capture an element with width _w_ and height _h_, the pseudo-element will have the same height and width. But in addition it will also show the _overflowing ink_, like box-shadows, of the original element outside the _w x h_ rectangle. @@ -318,7 +318,7 @@ For same-document view transitions, the creation of old images is the first step The process for creating new images is similar to the creation of old image pseudos. The key difference is that a `::view-transition-group` for a specific `view-transition-name` may already exist when the `::view-transition-new` image is created. In such cases, the new image is added to the existing `::view-transition-image-pair` of that group. The image pair will then contain both the old and new images, always in that order. -If no existing group is found, a `new ::view-transition-image-pair` and `::view-transition-group` pseudo-element is created for the view-transition-name and added to the end of the `::view-transition` pseudo-element's group list. This pair will then contain only the new image. +If no existing group is found, a `new ::view-transition-image-pair` and `::view-transition-group` pseudo-element is created for the `view-transition-name` and added to the end of the `::view-transition` pseudo-element's group list. This pair will then contain only the new image.
@@ -345,7 +345,9 @@ When examining the `::view-transition-groups` in order, the elements at the star Before the view transition starts, the pseudo elements are rendered on top of the current page. -The first pseudo-element that is rendered for a view transition is `::view-transition`. It has the size of the viewport and is full transparent by default. It works like a glass pane that prevents the user from interacting with elements below it (as long as you don't set `pointer-events: none` on it). +The first pseudo-element that is rendered for a view transition is `::view-transition`. It has the size of the viewport[^scb] and is full transparent by default. It works like a glass pane that prevents the user from interacting with elements below it (as long as you don't set `pointer-events: none` on it). + +[^scb]: To be precise, it has the size of the viewport, plus scrollbars, and retractable UI parts on mobile. The spec refers to this as the _snapshot containing block_. The transition groups are rendered [in the order they were created](#creation-of-pseudo-elements) and appear as children of the `::view-transition` pseudo-element. Groups at the beginning of the list are rendered first, with later groups painted on top. diff --git a/src/content/docs/tools/utensil-drawer.mdx b/src/content/docs/tools/utensil-drawer.mdx index 820e00e..7a58ea5 100644 --- a/src/content/docs/tools/utensil-drawer.mdx +++ b/src/content/docs/tools/utensil-drawer.mdx @@ -39,6 +39,12 @@ One day, when it grows up, this will be an eclectic collection of snippets for v description="Escape view transition names to unlock characters beyond basic ASCII letters and digits." href="#escapeviewtransitionname" /> + `); - styleMap.set(name, styles = document.head.querySelector(`#vtbag-dynamic-styles-${name}`)); - } - styles.innerHTML = ''; -} -export function addStyle(name: string, rule: string) { - styleMap.get(name).innerHTML += rule; -} diff --git a/src/pages/vector-demo/index.astro b/src/pages/vector-demo/index.astro index d11b086..269991e 100644 --- a/src/pages/vector-demo/index.astro +++ b/src/pages/vector-demo/index.astro @@ -1,5 +1,5 @@ --- - +const SIZE = 12; --- @@ -10,13 +10,15 @@ Vector Demo | vtbag.dev +

Click somewhere,
Esc to exit

-
+ + +