@scalar/astro 0.2.8 → 0.2.9

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
@@ -17,7 +17,7 @@
17
17
  "openapi",
18
18
  "swagger"
19
19
  ],
20
- "version": "0.2.8",
20
+ "version": "0.2.9",
21
21
  "engines": {
22
22
  "node": ">=22"
23
23
  },
@@ -45,7 +45,7 @@
45
45
  "documentation": "https://scalar.com/products/api-references/integrations/astro"
46
46
  },
47
47
  "dependencies": {
48
- "@scalar/core": "0.5.1"
48
+ "@scalar/client-side-rendering": "0.1.2"
49
49
  },
50
50
  "devDependencies": {
51
51
  "astro": "^4.0.0 || ^5.0.0"
@@ -1,5 +1,5 @@
1
1
  ---
2
- import { getHtmlDocument, type HtmlRenderingConfiguration } from '@scalar/core/libs/html-rendering'
2
+ import { renderApiReference, type HtmlRenderingConfiguration } from '@scalar/client-side-rendering'
3
3
 
4
4
  export interface Props {
5
5
  configuration: Partial<HtmlRenderingConfiguration>
@@ -15,9 +15,15 @@ const DEFAULT_CONFIGURATION: Partial<HtmlRenderingConfiguration> = {
15
15
 
16
16
  const { configuration } = Astro.props
17
17
 
18
- const html = getHtmlDocument({
18
+ const finalConfiguration = {
19
19
  ...DEFAULT_CONFIGURATION,
20
20
  ...configuration,
21
+ }
22
+ const { cdn, pageTitle, ...config } = finalConfiguration
23
+ const html = renderApiReference({
24
+ config,
25
+ cdn,
26
+ pageTitle,
21
27
  })
22
28
  ---
23
29