@vskstudio/takt-astro 0.3.0 → 0.3.1
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/Badge.astro +1 -1
- package/Embed.astro +1 -1
- package/README.md +1 -1
- package/package.json +1 -1
package/Badge.astro
CHANGED
|
@@ -11,4 +11,4 @@ type Props = {
|
|
|
11
11
|
|
|
12
12
|
const { domain, variant, glyph, lang, host, ...rest } = Astro.props
|
|
13
13
|
---
|
|
14
|
-
<img src={badgeUrl(domain, { variant, glyph, lang, host })}
|
|
14
|
+
<img alt="takt" {...rest} loading="lazy" decoding="async" src={badgeUrl(domain, { variant, glyph, lang, host })} />
|
package/Embed.astro
CHANGED
|
@@ -13,4 +13,4 @@ type Props = {
|
|
|
13
13
|
|
|
14
14
|
const { domain, theme, lang, host, width = 404, height = 264, title = 'takt', ...rest } = Astro.props
|
|
15
15
|
---
|
|
16
|
-
<iframe
|
|
16
|
+
<iframe title={title} referrerpolicy="strict-origin-when-cross-origin" {...rest} width={width} height={height} loading="lazy" style="border:0" src={embedUrl(domain, { theme, lang, host })}></iframe>
|
package/README.md
CHANGED
|
@@ -78,7 +78,7 @@ import Embed from '@vskstudio/takt-astro/Embed.astro'
|
|
|
78
78
|
<Embed domain="example.com" theme="dark" />
|
|
79
79
|
```
|
|
80
80
|
|
|
81
|
-
`Badge` renders an `<img>` (props: `domain`, `variant`, `glyph`, `lang`, `host`); `Embed` renders an `<iframe>` (props: `domain`, `theme`, `lang`, `host`, `width`, `height`, `title`). Extra attributes pass through to the underlying element.
|
|
81
|
+
`Badge` renders an `<img>` (props: `domain`, `variant`, `glyph`, `lang`, `host`); `Embed` renders an `<iframe>` (props: `domain`, `theme`, `lang`, `host`, `width`, `height`, `title`). Extra attributes pass through to the underlying element, but the built `src` is locked and cannot be overridden. The optional `host` must be an absolute `http(s)` URL — core validates it and throws on anything else (e.g. a `javascript:` URL).
|
|
82
82
|
|
|
83
83
|
## Public stats
|
|
84
84
|
|