astro-vtbot
Advanced tools
Comparing version 1.8.4 to 1.8.5
@@ -32,3 +32,3 @@ import { defineToolbarApp } from 'astro/toolbar'; | ||
mask-image: radial-gradient(ellipse at center, white 35%, transparent 71%);" | ||
src=${imgSrc.src} alt="reopen the inspection chamber" /> | ||
src=${imgSrc.src} alt="Reopen the Inspection Chamber" /> | ||
<p>Examine every detail of your view transitions! Put them through their paces! Step through frames and discover how the elements morph.</p><hr> | ||
@@ -76,5 +76,9 @@ <p><span id="inspection-chamber-status">The Bag is cool</span><astro-dev-toolbar-button id="inspection-chamber-button">I love the Bag of Tricks!</astro-dev-toolbar-button></p> | ||
const status = me.querySelector<HTMLSpanElement>('#inspection-chamber-status')!; | ||
const button = me.querySelector('#inspection-chamber-button')!; | ||
const button = me.querySelector<HTMLButtonElement>('#inspection-chamber-button')!; | ||
if (top!.document.querySelector(VTBAG_REOPEN)) { | ||
if (!document.startViewTransition) { | ||
status.textContent = 'Your browser does not support view transitions. You notice a little sign near the power button of The Chamber:'; | ||
button.textContent = 'Out of Order'; | ||
button.disabled = true; | ||
} else if (top!.document.querySelector(VTBAG_REOPEN)) { | ||
status.textContent = 'The Chamber is currently in standby mode.'; | ||
@@ -96,3 +100,3 @@ button.textContent = 'Reactivate the Inspection Chamber'; | ||
status.textContent = 'Chamber was activated via Dev Toolbar.'; | ||
button.textContent = 'Remove the Inspection Chamber'; | ||
button.textContent = 'Turn off the Inspection Chamber'; | ||
@@ -105,3 +109,3 @@ button.addEventListener('click', () => { | ||
status.textContent = 'There is an Inspection Chamber here.'; | ||
button.textContent = 'Use the Inspection Chamber'; | ||
button.textContent = 'Go ahead and power up the Inspection Chamber'; | ||
button.addEventListener('click', () => { | ||
@@ -108,0 +112,0 @@ top!.sessionStorage.removeItem('vtbag-ui-closed'); |
@@ -5,7 +5,4 @@ import type { AstroIntegration } from 'astro'; | ||
import icon from '../assets/bag-of-tricks-mono.svg?raw'; | ||
import inspectionChamber from '@vtbag/inspection-chamber?raw'; | ||
import { fileURLToPath } from 'node:url'; | ||
const DTB_TOKEN = 'vtbot-inspection-chamber'; | ||
type VtBotOptions = { | ||
@@ -30,7 +27,8 @@ autoLint?: boolean; | ||
} | ||
//@ts-expect-error | ||
if (import.meta.env.DEV) { | ||
setupOptions.injectRoute({ | ||
pattern: '/_vtbot_inspection_chamber', | ||
entrypoint: 'node_modules/astro-vtbot/components/InspectionChamber.astro', | ||
pattern: '/_vtbot_inspection_chamber.js', | ||
entrypoint: 'node_modules/astro-vtbot/integration/astro-inspection-chamber.js.ts', | ||
}); | ||
@@ -40,5 +38,3 @@ | ||
'head-inline', | ||
`if (sessionStorage.getItem('${DTB_TOKEN}') === 'true') {${inspectionChamber}}; | ||
const script = document.currentScript; | ||
setTimeout(script.remove(), 1000)` | ||
`(function() {var s=document.createElement('script');s.src='/_vtbot_inspection_chamber.js';document.head.appendChild(s);var t=document.currentScript;setTimeout(()=>{t.remove();s.remove()},1000)})();` | ||
); | ||
@@ -45,0 +41,0 @@ } |
@@ -6,3 +6,3 @@ { | ||
}, | ||
"version": "1.8.4", | ||
"version": "1.8.5", | ||
"description": "The π Bag of Tricks β¨ for Astro's View Transitions", | ||
@@ -77,13 +77,13 @@ "homepage": "https://events-3bg.pages.dev/", | ||
"dependencies": { | ||
"@vtbag/inspection-chamber": "^1.0.6" | ||
"@vtbag/inspection-chamber": "^1.0.8" | ||
}, | ||
"devDependencies": { | ||
"@astrojs/check": "^0.9.2", | ||
"@astrojs/starlight": "^0.25.4", | ||
"@astrojs/starlight": "^0.26.1", | ||
"@changesets/changelog-github": "0.5.0", | ||
"@changesets/cli": "^2.27.7", | ||
"@playwright/test": "^1.46.0", | ||
"@playwright/test": "^1.46.1", | ||
"@types/dom-view-transitions": "^1.0.5", | ||
"@types/node": "^22.2.0", | ||
"astro": "^4.13.3", | ||
"@types/node": "^22.4.0", | ||
"astro": "^4.14.2", | ||
"prettier": "^3.3.3", | ||
@@ -90,0 +90,0 @@ "prettier-plugin-astro": "^0.14.1", |
No, its **_NOT_** a roBOT π€, its a π <b>B</b>ag <b>o</b>f <b>T</b>ricks!β¨ | ||
[βοΈPlease star to support this workβοΈ](https://github.com/martrapp/astro-vtbot) | ||
# **The Bag of Tricks** for Astro's **View Transitions** | ||
@@ -7,4 +9,5 @@ | ||
[![npm version](https://img.shields.io/npm/v/astro-vtbot/latest)](https://www.npmjs.com/package/astro-vtbot) | ||
[![Socket Badge](https://socket.dev/api/badge/npm/package/astro-vtbot/)](https://socket.dev/npm/package/astro-vtbot/overview) | ||
![Build Status](https://github.com/martrapp/astro-vtbot/actions/workflows/run-tests.yml/badge.svg) | ||
[![npm version](https://img.shields.io/npm/v/astro-vtbot/latest)](https://www.npmjs.com/package/astro-vtbot) | ||
[![NPM Downloads](https://img.shields.io/npm/dw/astro-vtbot)](https://www.npmjs.com/package/astro-vtbot) | ||
@@ -16,9 +19,11 @@ | ||
This release introduces an updated version of the Inspection Chamber, now packed with new, shiny displays and knobs. The Chamber is steadily maturing, evolving from a cool prototype into a cool, reliable tool. | ||
V1.18.5 throws a colorful mix of things into the bag. Most notable is support for Starlight's persisted sidebar state, but also various improvements to the chamber and view transition name encoding. See the changelog for details! | ||
See your view transitions like never before: examine every detail, reveal, debug, and optimize! Now, drill down into the effects of each pseudo-element introduced by the view transition API and even selectively toggle individual animations to better understand whatβs happening! | ||
## Recently Learned Tricks ## | ||
> V1.18.4 introduced an updated version of the Inspection Chamber, now packed with new, shiny displays and knobs. The Chamber is steadily maturing, evolving from a cool prototype into a cool, reliable tool. | ||
## Recently Learned Tricks ## | ||
> See your view transitions like never before: examine every detail, reveal, debug, and optimize! Now, drill down into the effects of each pseudo-element introduced by the view transition API and even selectively toggle individual animations to better understand whatβs happening! | ||
> Summon the Inspection Chamber as a component ([<InspectionChamber />](https://events-3bg.pages.dev/library/InspectionChamber/)) or [install The Bag as an integration!](hhttps://events-3bg.pages.dev/library/Installation/#installing-as-an-astro-integration) and access the Chamber from the devToolbar! | ||
@@ -25,0 +30,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
129035
70
1474
100