Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: withastro/astro
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: astro@4.8.6
Choose a base ref
...
head repository: withastro/astro
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: astro@4.8.7
Choose a head ref

Commits on May 17, 2024

  1. Prevent cache content from being left in dist folder (#11073)

    matthewp authored May 17, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    IvanGoncharov Ivan Goncharov
    Copy the full SHA
    f5c8fee View commit details
  2. [ci] format

    matthewp authored and astrobot-houston committed May 17, 2024
    Copy the full SHA
    b41cec6 View commit details

Commits on May 18, 2024

  1. Upgrade web-vitals to v4 (#11094)

    delucis authored May 18, 2024
    Copy the full SHA
    3c7a4fa View commit details
  2. [ci] format

    delucis authored and astrobot-houston committed May 18, 2024
    Copy the full SHA
    8e465d6 View commit details

Commits on May 20, 2024

  1. Support deprecating Web Vitals table (#11096)

    delucis authored May 20, 2024
    Copy the full SHA
    0dbd8ee View commit details
  2. fix: set status on error with progressive fallback (#11054)

    * fix: set status on error with progressive fallback
    
    * chore: changeset
    
    * fix: obscure statusText in prod
    
    * refactor: use error.name for statusText
    
    ---------
    
    Co-authored-by: bholmesdev <bholmesdev@gmail.com>
    bholmesdev and bholmesdev authored May 20, 2024
    Copy the full SHA
    f6b171e View commit details
  3. [ci] format

    bholmesdev authored and astrobot-houston committed May 20, 2024
    Copy the full SHA
    df7e56c View commit details

Commits on May 21, 2024

  1. fix type definition of IntrinsicAttributes's slot attribute (#11092)

    duckycoding-dev authored May 21, 2024
    Copy the full SHA
    bfe9c73 View commit details
  2. Makes view transition e2e tests compatible with Firefox (#11093)

    martrapp authored May 21, 2024
    Copy the full SHA
    a514bbe View commit details
  3. [ci] format

    martrapp authored and astrobot-houston committed May 21, 2024
    Copy the full SHA
    026f50a View commit details
  4. Make status code check more strict for sitemap plugin (#10779)

    Co-authored-by: Ben Holmes <hey@bholmes.dev>
    Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
    3 people authored May 21, 2024
    Copy the full SHA
    cefeadf View commit details
  5. docs: updated comment from Accept-Header to Accept-Language (#10875)

    Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
    W1M0R and florian-lefebvre authored May 21, 2024
    Copy the full SHA
    b5f95b2 View commit details
  6. fix(astro): positioning of inspection tooltip in RTL mode (#11081)

    * fix: prevent overlay from going out of the view
    
    * test: add test case for positioning
    
    * chore: add changeset entry
    
    ---------
    
    Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
    V3RON and Princesseuh authored May 21, 2024
    Copy the full SHA
    af42e05 View commit details
  7. [ci] format

    Princesseuh authored and astrobot-houston committed May 21, 2024
    Copy the full SHA
    fcd19fb View commit details
  8. fix(renderer): omitting internal symbol from mdx props (#10813)

    Xetera authored May 21, 2024
    Copy the full SHA
    3cc3e2c View commit details
  9. Actions: stop warning about headers usage on prerendered routes (#1…

    …1111)
    
    * fix: handle GET requests and prerendered routes
    
    * chore: changeset
    bholmesdev authored May 21, 2024
    Copy the full SHA
    a5d79dd View commit details
  10. [ci] format

    bholmesdev authored and astrobot-houston committed May 21, 2024
    Copy the full SHA
    8daf2d4 View commit details
  11. prompt for workspace in db link (#11032)

    Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
    itsMapleLeaf and delucis authored May 21, 2024
    Copy the full SHA
    b78e83f View commit details
  12. Fix inconsistent results from raw SQL (#11091)

    * Fix inconsistent results from raw SQL
    
    * Remove .only
    
    * Fix
    
    * Update packages/db/src/runtime/db-client.ts
    
    Co-authored-by: Ben Holmes <hey@bholmes.dev>
    
    ---------
    
    Co-authored-by: Ben Holmes <hey@bholmes.dev>
    matthewp and bholmesdev authored May 21, 2024
    Copy the full SHA
    e14ce57 View commit details
  13. [ci] format

    matthewp authored and astrobot-houston committed May 21, 2024
    Copy the full SHA
    f00ecd4 View commit details

Commits on May 22, 2024

  1. [ci] release (#11086)

    Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    astrobot-houston and github-actions[bot] authored May 22, 2024
    Copy the full SHA
    9ddd638 View commit details
Showing with 681 additions and 252 deletions.
  1. +1 −1 examples/basics/package.json
  2. +3 −3 examples/blog/package.json
  3. +1 −1 examples/component/package.json
  4. +1 −1 examples/framework-alpine/package.json
  5. +1 −1 examples/framework-lit/package.json
  6. +1 −1 examples/framework-multiple/package.json
  7. +1 −1 examples/framework-preact/package.json
  8. +1 −1 examples/framework-react/package.json
  9. +1 −1 examples/framework-solid/package.json
  10. +1 −1 examples/framework-svelte/package.json
  11. +1 −1 examples/framework-vue/package.json
  12. +1 −1 examples/hackernews/package.json
  13. +1 −1 examples/integration/package.json
  14. +1 −1 examples/middleware/package.json
  15. +1 −1 examples/minimal/package.json
  16. +1 −1 examples/non-html-pages/package.json
  17. +1 −1 examples/portfolio/package.json
  18. +1 −1 examples/ssr/package.json
  19. +1 −1 examples/starlog/package.json
  20. +1 −1 examples/toolbar-app/package.json
  21. +1 −1 examples/view-transitions/package.json
  22. +1 −1 examples/with-markdoc/package.json
  23. +1 −1 examples/with-markdown-plugins/package.json
  24. +1 −1 examples/with-markdown-shiki/package.json
  25. +2 −2 examples/with-mdx/package.json
  26. +1 −1 examples/with-nanostores/package.json
  27. +2 −2 examples/with-tailwindcss/package.json
  28. +1 −1 examples/with-vitest/package.json
  29. +21 −0 packages/astro/CHANGELOG.md
  30. +1 −1 packages/astro/astro-jsx.d.ts
  31. +29 −0 packages/astro/e2e/dev-toolbar.test.js
  32. +19 −0 packages/astro/e2e/fixtures/dev-toolbar/src/pages/xray-overlay-positioning.astro
  33. +4 −5 packages/astro/e2e/fixtures/view-transitions/src/pages/abort2.astro
  34. +63 −116 packages/astro/e2e/view-transitions.test.js
  35. +1 −1 packages/astro/package.json
  36. +1 −1 packages/astro/playwright.firefox.config.js
  37. +36 −1 packages/astro/src/actions/runtime/middleware.ts
  38. +1 −0 packages/astro/src/core/build/consts.ts
  39. +2 −2 packages/astro/src/core/build/index.ts
  40. +19 −3 packages/astro/src/core/build/plugins/plugin-content.ts
  41. +10 −5 packages/astro/src/core/build/static-build.ts
  42. +1 −1 packages/astro/src/i18n/utils.ts
  43. +3 −0 packages/astro/src/runtime/client/dev-toolbar/apps/utils/highlight.ts
  44. +2 −0 packages/astro/src/runtime/server/jsx.ts
  45. +15 −0 packages/astro/test/experimental-content-collections-render.test.js
  46. +13 −0 packages/db/CHANGELOG.md
  47. +1 −1 packages/db/package.json
  48. +44 −14 packages/db/src/core/cli/commands/link/index.ts
  49. +17 −1 packages/db/src/runtime/db-client.ts
  50. +17 −0 packages/db/test/fixtures/static-remote/src/pages/run.astro
  51. +7 −0 packages/db/test/static-remote.test.js
  52. +6 −0 packages/integrations/mdx/CHANGELOG.md
  53. +1 −1 packages/integrations/mdx/package.json
  54. +6 −0 packages/integrations/mdx/test/fixtures/mdx-plus-react-errors/astro.config.mjs
  55. +11 −0 packages/integrations/mdx/test/fixtures/mdx-plus-react-errors/package.json
  56. +8 −0 packages/integrations/mdx/test/fixtures/mdx-plus-react-errors/src/components/BrokenComponent.jsx
  57. +12 −0 packages/integrations/mdx/test/fixtures/mdx-plus-react-errors/src/content/config.js
  58. +4 −0 packages/integrations/mdx/test/fixtures/mdx-plus-react-errors/src/content/files/file.mdx
  59. +9 −0 packages/integrations/mdx/test/fixtures/mdx-plus-react-errors/src/pages/broken.astro
  60. +33 −0 packages/integrations/mdx/test/mdx-plus-react-errors.test.js
  61. +6 −0 packages/integrations/sitemap/CHANGELOG.md
  62. +1 −1 packages/integrations/sitemap/package.json
  63. +20 −11 packages/integrations/sitemap/src/index.ts
  64. +9 −1 packages/integrations/sitemap/test/fixtures/static/astro.config.mjs
  65. +11 −0 packages/integrations/sitemap/test/fixtures/static/src/pages/products-by-id/[id].astro
  66. +5 −0 packages/integrations/sitemap/test/staticPaths.test.js
  67. +10 −0 packages/integrations/web-vitals/CHANGELOG.md
  68. +49 −0 packages/integrations/web-vitals/README.md
  69. +2 −2 packages/integrations/web-vitals/package.json
  70. +2 −2 packages/integrations/web-vitals/src/client-script.ts
  71. +1 −0 packages/integrations/web-vitals/src/db-config.ts
  72. +2 −1 packages/integrations/web-vitals/src/index.ts
  73. +3 −3 packages/integrations/web-vitals/src/schemas.ts
  74. +47 −12 packages/integrations/web-vitals/test/basics.test.js
  75. +8 −0 packages/integrations/web-vitals/test/fixtures/basics/src/pages/rows.json.ts
  76. +56 −34 pnpm-lock.yaml
2 changes: 1 addition & 1 deletion examples/basics/package.json
Original file line number Diff line number Diff line change
@@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^4.8.6"
"astro": "^4.8.7"
}
}
6 changes: 3 additions & 3 deletions examples/blog/package.json
Original file line number Diff line number Diff line change
@@ -11,9 +11,9 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/mdx": "^3.0.0",
"@astrojs/mdx": "^3.0.1",
"@astrojs/rss": "^4.0.6",
"@astrojs/sitemap": "^3.1.4",
"astro": "^4.8.6"
"@astrojs/sitemap": "^3.1.5",
"astro": "^4.8.7"
}
}
2 changes: 1 addition & 1 deletion examples/component/package.json
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
],
"scripts": {},
"devDependencies": {
"astro": "^4.8.6"
"astro": "^4.8.7"
},
"peerDependencies": {
"astro": "^4.0.0"
2 changes: 1 addition & 1 deletion examples/framework-alpine/package.json
Original file line number Diff line number Diff line change
@@ -14,6 +14,6 @@
"@astrojs/alpinejs": "^0.4.0",
"@types/alpinejs": "^3.13.10",
"alpinejs": "^3.13.10",
"astro": "^4.8.6"
"astro": "^4.8.7"
}
}
2 changes: 1 addition & 1 deletion examples/framework-lit/package.json
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/lit": "^4.0.1",
"@webcomponents/template-shadowroot": "^0.2.1",
"astro": "^4.8.6",
"astro": "^4.8.7",
"lit": "^3.1.3"
}
}
2 changes: 1 addition & 1 deletion examples/framework-multiple/package.json
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@
"@astrojs/vue": "^4.2.0",
"@types/react": "^18.3.2",
"@types/react-dom": "^18.3.0",
"astro": "^4.8.6",
"astro": "^4.8.7",
"preact": "^10.21.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
2 changes: 1 addition & 1 deletion examples/framework-preact/package.json
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/preact": "^3.3.0",
"@preact/signals": "^1.2.3",
"astro": "^4.8.6",
"astro": "^4.8.7",
"preact": "^10.21.0"
}
}
2 changes: 1 addition & 1 deletion examples/framework-react/package.json
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@
"@astrojs/react": "^3.3.4",
"@types/react": "^18.3.2",
"@types/react-dom": "^18.3.0",
"astro": "^4.8.6",
"astro": "^4.8.7",
"react": "^18.3.1",
"react-dom": "^18.3.1"
}
2 changes: 1 addition & 1 deletion examples/framework-solid/package.json
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/solid-js": "^4.2.0",
"astro": "^4.8.6",
"astro": "^4.8.7",
"solid-js": "^1.8.17"
}
}
2 changes: 1 addition & 1 deletion examples/framework-svelte/package.json
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/svelte": "^5.4.0",
"astro": "^4.8.6",
"astro": "^4.8.7",
"svelte": "^4.2.16"
}
}
2 changes: 1 addition & 1 deletion examples/framework-vue/package.json
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/vue": "^4.2.0",
"astro": "^4.8.6",
"astro": "^4.8.7",
"vue": "^3.4.27"
}
}
2 changes: 1 addition & 1 deletion examples/hackernews/package.json
Original file line number Diff line number Diff line change
@@ -12,6 +12,6 @@
},
"dependencies": {
"@astrojs/node": "^8.2.5",
"astro": "^4.8.6"
"astro": "^4.8.7"
}
}
2 changes: 1 addition & 1 deletion examples/integration/package.json
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
],
"scripts": {},
"devDependencies": {
"astro": "^4.8.6"
"astro": "^4.8.7"
},
"peerDependencies": {
"astro": "^4.0.0"
2 changes: 1 addition & 1 deletion examples/middleware/package.json
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@
},
"dependencies": {
"@astrojs/node": "^8.2.5",
"astro": "^4.8.6",
"astro": "^4.8.7",
"html-minifier": "^4.0.0"
},
"devDependencies": {
2 changes: 1 addition & 1 deletion examples/minimal/package.json
Original file line number Diff line number Diff line change
@@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^4.8.6"
"astro": "^4.8.7"
}
}
2 changes: 1 addition & 1 deletion examples/non-html-pages/package.json
Original file line number Diff line number Diff line change
@@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^4.8.6"
"astro": "^4.8.7"
}
}
2 changes: 1 addition & 1 deletion examples/portfolio/package.json
Original file line number Diff line number Diff line change
@@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^4.8.6"
"astro": "^4.8.7"
}
}
2 changes: 1 addition & 1 deletion examples/ssr/package.json
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@
"dependencies": {
"@astrojs/node": "^8.2.5",
"@astrojs/svelte": "^5.4.0",
"astro": "^4.8.6",
"astro": "^4.8.7",
"svelte": "^4.2.16"
}
}
2 changes: 1 addition & 1 deletion examples/starlog/package.json
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^4.8.6",
"astro": "^4.8.7",
"sass": "^1.77.1",
"sharp": "^0.33.3"
}
2 changes: 1 addition & 1 deletion examples/toolbar-app/package.json
Original file line number Diff line number Diff line change
@@ -15,6 +15,6 @@
"./app": "./dist/app.js"
},
"devDependencies": {
"astro": "^4.8.6"
"astro": "^4.8.7"
}
}
2 changes: 1 addition & 1 deletion examples/view-transitions/package.json
Original file line number Diff line number Diff line change
@@ -12,6 +12,6 @@
"devDependencies": {
"@astrojs/tailwind": "^5.1.0",
"@astrojs/node": "^8.2.5",
"astro": "^4.8.6"
"astro": "^4.8.7"
}
}
2 changes: 1 addition & 1 deletion examples/with-markdoc/package.json
Original file line number Diff line number Diff line change
@@ -12,6 +12,6 @@
},
"dependencies": {
"@astrojs/markdoc": "^0.11.0",
"astro": "^4.8.6"
"astro": "^4.8.7"
}
}
2 changes: 1 addition & 1 deletion examples/with-markdown-plugins/package.json
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/markdown-remark": "^5.1.0",
"astro": "^4.8.6",
"astro": "^4.8.7",
"hast-util-select": "^6.0.2",
"rehype-autolink-headings": "^7.1.0",
"rehype-slug": "^6.0.0",
2 changes: 1 addition & 1 deletion examples/with-markdown-shiki/package.json
Original file line number Diff line number Diff line change
@@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^4.8.6"
"astro": "^4.8.7"
}
}
4 changes: 2 additions & 2 deletions examples/with-mdx/package.json
Original file line number Diff line number Diff line change
@@ -11,9 +11,9 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/mdx": "^3.0.0",
"@astrojs/mdx": "^3.0.1",
"@astrojs/preact": "^3.3.0",
"astro": "^4.8.6",
"astro": "^4.8.7",
"preact": "^10.21.0"
}
}
2 changes: 1 addition & 1 deletion examples/with-nanostores/package.json
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/preact": "^3.3.0",
"@nanostores/preact": "^0.5.1",
"astro": "^4.8.6",
"astro": "^4.8.7",
"nanostores": "^0.10.3",
"preact": "^10.21.0"
}
4 changes: 2 additions & 2 deletions examples/with-tailwindcss/package.json
Original file line number Diff line number Diff line change
@@ -11,10 +11,10 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/mdx": "^3.0.0",
"@astrojs/mdx": "^3.0.1",
"@astrojs/tailwind": "^5.1.0",
"@types/canvas-confetti": "^1.6.4",
"astro": "^4.8.6",
"astro": "^4.8.7",
"autoprefixer": "^10.4.19",
"canvas-confetti": "^1.9.3",
"postcss": "^8.4.38",
2 changes: 1 addition & 1 deletion examples/with-vitest/package.json
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@
"test": "vitest"
},
"dependencies": {
"astro": "^4.8.6",
"astro": "^4.8.7",
"vitest": "^1.6.0"
}
}
21 changes: 21 additions & 0 deletions packages/astro/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# astro

## 4.8.7

### Patch Changes

- [#11073](https://github.com/withastro/astro/pull/11073) [`f5c8fee`](https://github.com/withastro/astro/commit/f5c8fee76c5e688ef23c18be79705b18f1750415) Thanks [@matthewp](https://github.com/matthewp)! - Prevent cache content from being left in dist folder

When `contentCollectionsCache` is enabled temporary cached content is copied into the `outDir` for processing. This fixes it so that this content is cleaned out, along with the rest of the temporary build JS.

- [#11054](https://github.com/withastro/astro/pull/11054) [`f6b171e`](https://github.com/withastro/astro/commit/f6b171ed50eed253b8ac005bd5e9d1841a8003dd) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Respect error status when handling Actions with a progressive fallback.

- [#11092](https://github.com/withastro/astro/pull/11092) [`bfe9c73`](https://github.com/withastro/astro/commit/bfe9c73536f0794e4f5ede5040adabbe0e705984) Thanks [@duckycoding-dev](https://github.com/duckycoding-dev)! - Change `slot` attribute of `IntrinsicAttributes` to match the definition of `HTMLAttributes`'s own `slot` attribute of type `string | undefined | null`

- [#10875](https://github.com/withastro/astro/pull/10875) [`b5f95b2`](https://github.com/withastro/astro/commit/b5f95b2fb156152fabf2a22e150037a8255006f9) Thanks [@W1M0R](https://github.com/W1M0R)! - Fixes a typo in a JSDoc annotation

- [#11111](https://github.com/withastro/astro/pull/11111) [`a5d79dd`](https://github.com/withastro/astro/commit/a5d79ddeb2d592de9eb2468471fdcf3eea5ef730) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Fix unexpected `headers` warning on prerendered routes when using Astro Actions.

- [#11081](https://github.com/withastro/astro/pull/11081) [`af42e05`](https://github.com/withastro/astro/commit/af42e0552054b3b4ac784ed78c60f80bfc38d8ca) Thanks [@V3RON](https://github.com/V3RON)! - Correctly position inspection tooltip in RTL mode

When RTL mode is turned on, the inspection tooltip tend to overflow the window on the left side.
Additional check has been added to prevent that.

## 4.8.6

### Patch Changes
2 changes: 1 addition & 1 deletion packages/astro/astro-jsx.d.ts
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ declare namespace astroHTML.JSX {
extends AstroBuiltinProps,
AstroBuiltinAttributes,
AstroClientDirectives {
slot?: string;
slot?: string | undefined | null;
children?: Children;
}

29 changes: 29 additions & 0 deletions packages/astro/e2e/dev-toolbar.test.js
Original file line number Diff line number Diff line change
@@ -100,6 +100,35 @@ test.describe('Dev Toolbar', () => {
await expect(xrayHighlightTooltip).not.toBeVisible();
});

test("xray tooltips don't overflow", async ({ page, astro }) => {
await page.goto(astro.resolveUrl('/xray-overlay-positioning'));

const toolbar = page.locator('astro-dev-toolbar');
const appButton = toolbar.locator('button[data-app-id="astro:xray"]');
await appButton.click();

const executeTest = async () => {
const xrayCanvas = toolbar.locator('astro-dev-toolbar-app-canvas[data-app-id="astro:xray"]');
const xrayHighlights = xrayCanvas.locator('astro-dev-toolbar-highlight');
const xrayHighlightsCount = await xrayHighlights.count();

for (let i = 0; i < xrayHighlightsCount; i++) {
const currentHighlight = xrayHighlights.nth(i);
await currentHighlight.hover();
await expect(currentHighlight.locator('astro-dev-toolbar-tooltip')).toBeInViewport({
ratio: 0.9,
});
}
};

// LTR
await executeTest();

// RTL
await page.locator('body').evaluate((element) => (element.dir = 'rtl'));
await executeTest();
});

test('xray escapes props content', async ({ page, astro }) => {
let isAlertCalled = false;
page.on('dialog', async (dialog) => {
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
import { HelloWorld } from '../components/HelloWorld';
---

<div style="position: absolute; left: 0; top: 0;">
<HelloWorld name={"Left top"} client:load />
</div>

<div style="position: absolute; right: 0; top: 0;">
<HelloWorld name={"Right top"} client:load />
</div>

<div style="position: absolute; left: 0; bottom: 0;">
<HelloWorld name={"Left bottom"} client:load />
</div>

<div style="position: absolute; right: 0; bottom: 0;">
<HelloWorld name={"Right bottom"} client:load />
</div>
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ import { ViewTransitions, fade } from 'astro:transitions';
<ViewTransitions />
</head>
<body>
<h1 transition:name="h1" transition:animate={fade({duration:10000})}>Abort</h1>
<h1 transition:name="h1" transition:animate={fade({duration:500})}>Abort</h1>
</body>
</html>

@@ -15,11 +15,10 @@ import { ViewTransitions, fade } from 'astro:transitions';
import {navigate } from 'astro:transitions/client';

setTimeout(()=>{
[...document.getAnimations()].forEach((a) => a.addEventListener('cancel',
(e) => console.log("[test]",e.type, a.animationName)));
console.log("[test] navigate to /one")
[...document.getAnimations()].forEach((a) => a.addEventListener('cancel', (e) => console.log("[test]", e.type, a.animationName)));
console.log("[test] navigate to /one");
navigate("/one");
}, 1000);
}, 200);
console.log('[test] navigate to "."')
navigate("/abort2");
</script>
Loading