fulldev-ui 0.5.0-beta.8 → 0.5.0-beta.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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fulldev-ui",
3
- "version": "0.5.0-beta.8",
3
+ "version": "0.5.0-beta.9",
4
4
  "description": "A component library built for Astro",
5
5
  "homepage": "https://ui.full.dev",
6
6
  "bugs": "https://github.com/fulldotdev/ui/issues",
@@ -1,4 +1,5 @@
1
1
  ---
2
+ import { getImage } from 'astro:assets'
2
3
  import CartForm from 'fulldev-ui/components/CartForm.astro'
3
4
  import Element from 'fulldev-ui/components/Element.astro'
4
5
  import Gallery from 'fulldev-ui/components/experimental/Gallery.astro'
@@ -27,8 +28,11 @@ const {
27
28
  ...rest
28
29
  } = Astro.props
29
30
 
30
- const slug = Astro.params.page || 'index'
31
+ const slug = Astro.url.pathname.replace(/^\/|\/$/g, '') || 'index'
31
32
  const src = `/src/images/${images?.[0].id}`
33
+ const gotImage = await getImage({ src, width: 200, height: 200 })
34
+
35
+ console.log({ hoi: gotImage.src })
32
36
  ---
33
37
 
34
38
  <Section
@@ -60,7 +64,7 @@ const src = `/src/images/${images?.[0].id}`
60
64
  style={{ marginTop: 'var(--space-5)' }}
61
65
  />
62
66
  <CartForm
63
- image={src}
67
+ image={gotImage.src}
64
68
  {title}
65
69
  {price}
66
70
  {slug}
@@ -44,7 +44,7 @@ const { title, slug, image, price, variants, ...rest } = Astro.props
44
44
  <Input
45
45
  type="hidden"
46
46
  name="image"
47
- value={image}
47
+ value={Astro.url.origin ? Astro.url.origin + image : undefined}
48
48
  />
49
49
  {
50
50
  Object.entries(variants ?? {}).map(([key, options]) => (
@@ -128,6 +128,7 @@ const { ...rest } = Astro.props
128
128
  currency: 'eur',
129
129
  product_data: {
130
130
  name: item.name,
131
+ images: [window],
131
132
  },
132
133
  unit_amount: Math.round(item.price * 100),
133
134
  },