Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .specs/2026-09-15--images-placeholders-in-schema/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Feature: Share `IMAGES_PLACEHOLDERS` from `@weaverse/schema`

| Field | Value |
| ---------------- | ------------------------------------------------------ |
| **Status** | in-progress |
| **Owner** | @hta218 |
| **Issue** | N/A |
| **Branch** | `update/move-images-placeholders-to-schema` |
| **Base** | `main` at `a509c37cae680a68dba123e3bb22442b05da1ec0` |
| **Created** | 2026-09-15 |
| **Last Updated** | 2026-09-15 |

## Initiating Requirement

> `@weaverse/next` does not export `IMAGES_PLACEHOLDERS`, which `@weaverse/hydrogen` defines and exports from `packages/hydrogen/src/index.ts`. Move the constant into a shared package so both storefront adapters expose it, and remove the definition from `@weaverse/hydrogen`. The shared home is `@weaverse/schema`: both `@weaverse/hydrogen` and `@weaverse/next` already `export * from '@weaverse/schema'`, the constant exists to supply component schema defaults and theme previews, and the package has no internal dependencies. `@weaverse/core` and `@weaverse/react` were rejected because the constant is unrelated to the runtime engine or React rendering, and both adapters only re-export selected `@weaverse/react` symbols. Leave the change ready to publish. The existing import `import { IMAGES_PLACEHOLDERS } from '@weaverse/hydrogen'` must keep working.

## Summary

`IMAGES_PLACEHOLDERS` moves from `@weaverse/hydrogen` into `@weaverse/schema`, so
both `@weaverse/hydrogen` and `@weaverse/next` expose it through their existing
`export * from '@weaverse/schema'`. The values and member docs are unchanged.
46 changes: 46 additions & 0 deletions .specs/2026-09-15--images-placeholders-in-schema/plan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Plan

## Change

1. Move the `IMAGES_PLACEHOLDERS` constant, with its TSDoc, from
`packages/hydrogen/src/index.ts` to `packages/schema/src/images-placeholders.ts`
and export it from `packages/schema/src/index.ts`.
2. Pin `@weaverse/schema` to `0.15.0` in `@weaverse/hydrogen` and
`@weaverse/next` (was `0.14.0`), and refresh `pnpm-lock.yaml`.
3. Regenerate `api-reports/` with `pnpm run api:report`.

## Why the pins move to the workspace schema version

Internal `@weaverse/*` dependencies resolve from npm, not as workspace links.
`scripts/api-reports.mjs` resolves `export * from '@weaverse/schema'` against the
workspace build, while `scripts/check-packed-packages.mjs` only substitutes the
packed schema tarball for an edge whose pin equals the workspace schema version.
With the old `0.14.0` pins, the packed adapters installed a registry schema
without the constant, so their runtime exports disagreed with the report.
Pinning to `0.15.0` (the current workspace version, already on npm) keeps
`pnpm install --frozen-lockfile` working and makes the packed check exercise the
schema that carries the constant.

## Release order (required)

Publishing `@weaverse/hydrogen` with a schema pin that lacks the constant would
remove `IMAGES_PLACEHOLDERS` from its public API. Release in this order:

1. `@weaverse/schema` minor: `0.15.0` → `0.16.0`.
2. Re-pin `@weaverse/schema` to `0.16.0` in `packages/hydrogen/package.json` and
`packages/next/package.json` before building them.
3. Fixed group (core, react, hydrogen), then the next `@weaverse/next` prerelease.
4. `pnpm install` once the new versions are on npm, then commit the lockfile.

## Files touched

- `packages/schema/src/images-placeholders.ts` (new)
- `packages/schema/src/index.ts`
- `packages/hydrogen/src/index.ts`
- `packages/hydrogen/package.json`
- `packages/next/package.json`
- `pnpm-lock.yaml`
- `api-reports/hydrogen.api.md`
- `api-reports/schema.api.md`
- `api-reports/runtime-exports.api.md`
- `.specs/2026-09-15--images-placeholders-in-schema/`
33 changes: 0 additions & 33 deletions api-reports/hydrogen.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -283,39 +283,6 @@ export type HydrogenThemeSettings = {
[key: string]: any;
};

// @public
export const IMAGES_PLACEHOLDERS: {
logo_white: string;
logo_black: string;
image: string;
banner_1: string;
banner_2: string;
collection_1: string;
collection_2: string;
collection_3: string;
collection_4: string;
collection_5: string;
collection_6: string;
product_1: string;
product_2: string;
product_3: string;
product_4: string;
product_5: string;
product_6: string;
product_7: string;
product_8: string;
product_9: string;
product_10: string;
product_11: string;
product_12: string;
product_13: string;
product_14: string;
product_15: string;
product_16: string;
product_17: string;
product_18: string;
};

export { InputType }

export { InspectorGroup }
Expand Down
2 changes: 2 additions & 0 deletions api-reports/runtime-exports.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"ConfigsPropsSchema",
"ElementSchema",
"HeadingInputSchema",
"IMAGES_PLACEHOLDERS",
"InputSchema",
"InspectorGroupSchema",
"PageTypeSchema",
Expand Down Expand Up @@ -147,6 +148,7 @@
"DEFAULT_REVALIDATE_ENDPOINT",
"ElementSchema",
"HeadingInputSchema",
"IMAGES_PLACEHOLDERS",
"InputSchema",
"InspectorGroupSchema",
"PageTypeSchema",
Expand Down
33 changes: 33 additions & 0 deletions api-reports/schema.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,39 @@ export const HeadingInputSchema: z.ZodObject<{
label: z.ZodString;
}, z.core.$loose>;

// @public
export const IMAGES_PLACEHOLDERS: {
logo_white: string;
logo_black: string;
image: string;
banner_1: string;
banner_2: string;
collection_1: string;
collection_2: string;
collection_3: string;
collection_4: string;
collection_5: string;
collection_6: string;
product_1: string;
product_2: string;
product_3: string;
product_4: string;
product_5: string;
product_6: string;
product_7: string;
product_8: string;
product_9: string;
product_10: string;
product_11: string;
product_12: string;
product_13: string;
product_14: string;
product_15: string;
product_16: string;
product_17: string;
product_18: string;
};

// @public
export type Input = BasicInput | HeadingInput;

Expand Down
2 changes: 1 addition & 1 deletion packages/hydrogen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"@shopify/hydrogen": ">=2025.5",
"@shopify/remix-oxygen": "3",
"@weaverse/react": "5.21.0",
"@weaverse/schema": "0.14.0",
"@weaverse/schema": "0.15.0",
"react": ">=19",
"react-dom": ">=19",
"react-error-boundary": "^6",
Expand Down
91 changes: 0 additions & 91 deletions packages/hydrogen/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,97 +40,6 @@ export function getSelectedProductOptions(
)
}

/** Placeholder asset URLs for component schema defaults and theme previews. */
export const IMAGES_PLACEHOLDERS = {
/** White Weaverse logo placeholder. */
logo_white:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-logo-w-600x200.svg',
/** Black Weaverse logo placeholder. */
logo_black:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-logo-k-600x200.svg',
/** Generic square image placeholder. */
image:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-image-1024x1024.svg',
/** First landscape banner placeholder. */
banner_1:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-lifestyle-1-1800x900.svg',
/** Second landscape banner placeholder. */
banner_2:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-lifestyle-2-1800x900.svg',
/** Hats collection placeholder. */
collection_1:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-collection-hats-1024x1024.svg',
/** Shoes collection placeholder. */
collection_2:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-collection-shoes-1024x1024.svg',
/** Glasses collection placeholder. */
collection_3:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-collection-glasses-1024x1024.svg',
/** Lamps collection placeholder. */
collection_4:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-collection-lamps-1024x1024.svg',
/** Bags collection placeholder. */
collection_5:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-collection-bags-1024x1024.svg',
/** Watches collection placeholder. */
collection_6:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-collection-watches-1024x1024.svg',
/** Third watch product placeholder. */
product_1:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-watch-3-1024x1024.svg',
/** Second bag product placeholder. */
product_2:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-bag-2-1024x1024.svg',
/** First shoe product placeholder. */
product_3:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-shoe-1-1024x1024.svg',
/** Second lamp product placeholder. */
product_4:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-lamp-2-1024x1024.svg',
/** First glasses product placeholder. */
product_5:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-glasses-1-1024x1024.svg',
/** First lamp product placeholder. */
product_6:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-lamp-1-1024x1024.svg',
/** Second glasses product placeholder. */
product_7:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-glasses-2-1024x1024.svg',
/** Third hat product placeholder. */
product_8:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-hat-3-1024x1024.svg',
/** First bag product placeholder. */
product_9:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-bag-1-1024x1024.svg',
/** Second shoe product placeholder. */
product_10:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-shoe-2-1024x1024.svg',
/** Second hat product placeholder. */
product_11:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-hat-2-1024x1024.svg',
/** Third glasses product placeholder. */
product_12:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-glasses-3-1024x1024.svg',
/** Third shoe product placeholder. */
product_13:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-shoe-3-1024x1024.svg',
/** Third bag product placeholder. */
product_14:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-bag-3-1024x1024.svg',
/** First hat product placeholder. */
product_15:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-hat-1-1024x1024.svg',
/** Third lamp product placeholder. */
product_16:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-lamp-3-1024x1024.svg',
/** First watch product placeholder. */
product_17:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-watch-1-1024x1024.svg',
/** Second watch product placeholder. */
product_18:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-watch-2-1024x1024.svg',
}

// Re-export all types and utilities from schema package
export * from '@weaverse/schema'
export * from './components'
Expand Down
2 changes: 1 addition & 1 deletion packages/next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
},
"dependencies": {
"@weaverse/react": "5.20.3",
"@weaverse/schema": "0.14.0"
"@weaverse/schema": "0.15.0"
},
"devDependencies": {
"next": "16.3.4"
Expand Down
90 changes: 90 additions & 0 deletions packages/schema/src/images-placeholders.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
/** Placeholder asset URLs for component schema defaults and theme previews. */
export const IMAGES_PLACEHOLDERS = {
/** White Weaverse logo placeholder. */
logo_white:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-logo-w-600x200.svg',
/** Black Weaverse logo placeholder. */
logo_black:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-logo-k-600x200.svg',
/** Generic square image placeholder. */
image:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-image-1024x1024.svg',
/** First landscape banner placeholder. */
banner_1:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-lifestyle-1-1800x900.svg',
/** Second landscape banner placeholder. */
banner_2:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-lifestyle-2-1800x900.svg',
/** Hats collection placeholder. */
collection_1:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-collection-hats-1024x1024.svg',
/** Shoes collection placeholder. */
collection_2:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-collection-shoes-1024x1024.svg',
/** Glasses collection placeholder. */
collection_3:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-collection-glasses-1024x1024.svg',
/** Lamps collection placeholder. */
collection_4:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-collection-lamps-1024x1024.svg',
/** Bags collection placeholder. */
collection_5:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-collection-bags-1024x1024.svg',
/** Watches collection placeholder. */
collection_6:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-collection-watches-1024x1024.svg',
/** Third watch product placeholder. */
product_1:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-watch-3-1024x1024.svg',
/** Second bag product placeholder. */
product_2:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-bag-2-1024x1024.svg',
/** First shoe product placeholder. */
product_3:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-shoe-1-1024x1024.svg',
/** Second lamp product placeholder. */
product_4:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-lamp-2-1024x1024.svg',
/** First glasses product placeholder. */
product_5:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-glasses-1-1024x1024.svg',
/** First lamp product placeholder. */
product_6:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-lamp-1-1024x1024.svg',
/** Second glasses product placeholder. */
product_7:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-glasses-2-1024x1024.svg',
/** Third hat product placeholder. */
product_8:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-hat-3-1024x1024.svg',
/** First bag product placeholder. */
product_9:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-bag-1-1024x1024.svg',
/** Second shoe product placeholder. */
product_10:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-shoe-2-1024x1024.svg',
/** Second hat product placeholder. */
product_11:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-hat-2-1024x1024.svg',
/** Third glasses product placeholder. */
product_12:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-glasses-3-1024x1024.svg',
/** Third shoe product placeholder. */
product_13:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-shoe-3-1024x1024.svg',
/** Third bag product placeholder. */
product_14:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-bag-3-1024x1024.svg',
/** First hat product placeholder. */
product_15:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-hat-1-1024x1024.svg',
/** Third lamp product placeholder. */
product_16:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-lamp-3-1024x1024.svg',
/** First watch product placeholder. */
product_17:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-watch-1-1024x1024.svg',
/** Second watch product placeholder. */
product_18:
'https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-watch-2-1024x1024.svg',
}
1 change: 1 addition & 0 deletions packages/schema/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,7 @@ export const groupHelpers = {
}),
}

export { IMAGES_PLACEHOLDERS } from './images-placeholders.js'
export type {
BasicInput,
ComponentAvailabilityContext,
Expand Down
Loading
Loading