@bettercms-ai/astro 0.15.0 → 0.17.0
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.
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
* actually contains that block (mirrors render-page.ts's `ctx.flags` gating).
|
|
27
27
|
*/
|
|
28
28
|
import type { ContentBlock } from "@bettercms-ai/types";
|
|
29
|
-
import { blockStyleToCss, componentInstanceAddresses } from "@bettercms-ai/types";
|
|
29
|
+
import { blockStyleToCss, buttonIconOf, buttonIconSvg, buttonVariantOf, componentInstanceAddresses } from "@bettercms-ai/types";
|
|
30
30
|
import { bind, bindProps } from "../dist/bindings.js";
|
|
31
31
|
import type { DeliveryComponent, DeliveryForm } from "@bettercms-ai/sdk";
|
|
32
32
|
import { applyOverrides } from "@bettercms-ai/ui/resolve";
|
|
@@ -313,13 +313,15 @@ const pass = { forms, components, turnstileSiteKey, nested: true, fieldAddresses
|
|
|
313
313
|
case "button":
|
|
314
314
|
return (
|
|
315
315
|
<a
|
|
316
|
-
class={`bcms-btn bcms-btn-${p.variant === "
|
|
316
|
+
class={`bcms-btn bcms-btn-${buttonVariantOf(p.variant)}${p.size === "sm" || p.size === "lg" ? ` bcms-btn-${p.size}` : ""}${p.fullWidth === true ? " bcms-btn-full" : ""}`}
|
|
317
317
|
href={p.href ?? "#"}
|
|
318
318
|
{...bind(block.id, "text", "text", bctx)}
|
|
319
319
|
{...bindProps(block.id, [{ prop: "href", kind: "url", attr: "href", present: p.href != null }], bctx)}
|
|
320
320
|
{...blockAttrs}
|
|
321
321
|
>
|
|
322
|
+
{buttonIconOf(p.icon) && <Fragment set:html={buttonIconSvg(buttonIconOf(p.icon)!, "bcms-btn-icon")} />}
|
|
322
323
|
{p.text}
|
|
324
|
+
{p.arrow === true && <Fragment set:html={buttonIconSvg("arrow-right", "bcms-btn-arrow")} />}
|
|
323
325
|
</a>
|
|
324
326
|
);
|
|
325
327
|
case "spacer":
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bettercms-ai/astro",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "The BetterCMS adapter for Astro — a `bettercms()` integration, a `bettercms:client` virtual module, typed content loaders, draft preview, and native .astro rendering components.",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -54,11 +54,11 @@
|
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"@bettercms-ai/image-url": "^0.3.0",
|
|
57
|
-
"@bettercms-ai/next": "^0.
|
|
57
|
+
"@bettercms-ai/next": "^0.16.0",
|
|
58
58
|
"@bettercms-ai/richtext": "^0.7.0",
|
|
59
|
-
"@bettercms-ai/sdk": "^1.
|
|
60
|
-
"@bettercms-ai/types": "^1.
|
|
61
|
-
"@bettercms-ai/ui": "^0.
|
|
59
|
+
"@bettercms-ai/sdk": "^1.24.0",
|
|
60
|
+
"@bettercms-ai/types": "^1.26.0",
|
|
61
|
+
"@bettercms-ai/ui": "^0.11.0",
|
|
62
62
|
"libphonenumber-js": "^1.13.13"
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|