astro 0.23.4 → 0.23.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -36,8 +36,8 @@ const { code, lang = 'plaintext', theme = 'github-dark', wrap = false } = Astro.
36
36
 
37
37
  /** Replace the shiki class name with a custom astro class name. */
38
38
  function repairShikiTheme(html: string): string {
39
- // Replace "shiki" class naming with "astro" and add "data-astro-raw".
40
- html = html.replace('<pre class="shiki"', '<pre data-astro-raw class="astro-code"');
39
+ // Replace "shiki" class naming with "astro" and add "is:raw".
40
+ html = html.replace('<pre class="shiki"', '<pre is:raw class="astro-code"');
41
41
  // Replace "shiki" css variable naming with "astro".
42
42
  html = html.replace(/style="(background-)?color: var\(--shiki-/g, 'style="$1color: var(--astro-code-');
43
43
  // Handle code wrapping
package/env.d.ts ADDED
@@ -0,0 +1,12 @@
1
+ /// <reference types="vite/client" />
2
+
3
+ type Astro = import('./dist/types/@types/astro').AstroGlobal;
4
+
5
+ // We duplicate the description here because editors won't show the JSDoc comment from the imported type (but will for its properties, ex: Astro.request will show the AstroGlobal.request description)
6
+ /**
7
+ * Astro.* available in all components
8
+ * Docs: https://docs.astro.build/reference/api-reference/#astro-global
9
+ */
10
+ declare const Astro: Readonly<Astro>;
11
+
12
+ declare const Fragment: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "astro",
3
- "version": "0.23.4",
3
+ "version": "0.23.5",
4
4
  "description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.",
5
5
  "type": "module",
6
6
  "author": "withastro",
@@ -15,6 +15,7 @@
15
15
  "types": "./dist/types/@types/astro.d.ts",
16
16
  "exports": {
17
17
  ".": "./astro.js",
18
+ "./env": "./env.d.ts",
18
19
  "./app/node": "./dist/core/app/node.js",
19
20
  "./client/*": "./dist/runtime/client/*",
20
21
  "./components": "./components/index.js",
@@ -44,6 +45,7 @@
44
45
  "components",
45
46
  "dist",
46
47
  "astro.js",
48
+ "env.d.ts",
47
49
  "README.md",
48
50
  "vendor"
49
51
  ],
@@ -58,7 +60,7 @@
58
60
  "dependencies": {
59
61
  "@astrojs/compiler": "^0.11.4",
60
62
  "@astrojs/language-server": "^0.8.6",
61
- "@astrojs/markdown-remark": "^0.6.3",
63
+ "@astrojs/markdown-remark": "^0.6.4",
62
64
  "@astrojs/prism": "0.4.0",
63
65
  "@astrojs/renderer-preact": "^0.5.0",
64
66
  "@astrojs/renderer-react": "0.5.0",