@datocms/astro 0.1.12 → 0.1.13

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.
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@datocms/astro",
3
3
  "description": "A set of components and utilities to work faster with DatoCMS in Astro projects.",
4
4
  "type": "module",
5
- "version": "0.1.12",
5
+ "version": "0.1.13",
6
6
  "sideEffects": false,
7
7
  "repository": {
8
8
  "type": "git",
@@ -1,13 +1,13 @@
1
1
  ---
2
- import type { Code } from "datocms-structured-text-utils";
2
+ import { Code as AstroCode } from "astro:components";
3
+ import type { Code as CodeNode } from "datocms-structured-text-utils";
3
4
 
4
5
  interface Props {
5
- node: Code;
6
+ // https://www.datocms.com/docs/structured-text/dast#code
7
+ node: CodeNode;
6
8
  }
7
9
 
8
10
  const { node } = Astro.props;
9
-
10
- const { code, language } = node;
11
11
  ---
12
12
 
13
- <pre class={language}>{code}</pre>
13
+ <AstroCode code={node.code} lang={node.language as "js"} />