@40rty/ams-cli 0.3.2 → 0.4.2
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/bin/commands/deploy.mjs +9 -10
- package/bin/commands/dev.mjs +10 -11
- package/bin/commands/doctor.mjs +4 -5
- package/bin/commands/hosting.mjs +1 -1
- package/bin/lib/agentic.mjs +1 -1
- package/bin/lib/build-copy.mjs +6 -81
- package/bin/lib/build.mjs +47 -19
- package/bin/lib/hosted-build.mjs +7 -9
- package/dist/wire.js +433 -405
- package/package.json +1 -1
- package/templates/package/src/blocks.tsx +3 -3
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {renderInline,
|
|
1
|
+
import {renderInline, useCommerceActions, useProductCard} from '@40rty/ams-sdk';
|
|
2
2
|
import type {Collection, Product} from '@40rty/ams-sdk';
|
|
3
3
|
import type {ReactNode} from 'react';
|
|
4
4
|
|
|
@@ -45,7 +45,7 @@ export function ProductGrid({title, products}: {title?: string; products?: Array
|
|
|
45
45
|
|
|
46
46
|
/** Collection tiles; a tile opens that collection on the canvas. */
|
|
47
47
|
export function CollectionList({title, collections}: {title?: string; collections?: Array<Collection | string>}) {
|
|
48
|
-
const actions =
|
|
48
|
+
const actions = useCommerceActions();
|
|
49
49
|
return (
|
|
50
50
|
<section className={`grid gap-6 py-8 ${GUTTER}`}>
|
|
51
51
|
{title && <h2 className="text-2xl font-semibold">{title}</h2>}
|
|
@@ -65,7 +65,7 @@ export function CollectionList({title, collections}: {title?: string; collection
|
|
|
65
65
|
|
|
66
66
|
/** A full-width banner over one collection's image. */
|
|
67
67
|
export function Hero({heading, byline, collection}: {heading?: string; byline?: string; collection?: Collection | string}) {
|
|
68
|
-
const actions =
|
|
68
|
+
const actions = useCommerceActions();
|
|
69
69
|
const target = typeof collection === 'object' ? collection : undefined;
|
|
70
70
|
return (
|
|
71
71
|
<button type="button" className="relative block aspect-[2/1] w-full overflow-hidden text-left" onClick={() => target && actions?.showCollection(target.title)}>
|