@base44/app-plugin-commerce 0.6.5 → 0.6.7

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": "@base44/app-plugin-commerce",
3
- "version": "0.6.5",
3
+ "version": "0.6.7",
4
4
  "description": "Base44 Commerce plugin — entities, backend functions, shared commerce engine, admin UI and the commerce skill, shipped as copyable source",
5
5
  "keywords": [
6
6
  "base44",
@@ -7,7 +7,7 @@ carry_forward:
7
7
  - "Admin enforcement is three layers — AuthGuard (UI), admin-only entity RLS, requireAdmin() in every admin function. Never weaken any of them."
8
8
  - "/order-received must exist as a route: every payment link returns there, and confirming is what marks an order paid."
9
9
  - "The storefront header shows a visible \"Store manager\" link to /store-admin when the signed-in user's role is admin, and nothing for everyone else."
10
- - "Interleave: start image generation first → mount admin + build the storefront while images render → seed when the real image_url values are back (never the /__generating__/ placeholder) → payments last."
10
+ - "Interleave: start image generation first → mount admin + build the storefront → seed with the image_url the generate_image result already returned (never poll, never write a function to fetch URLs) → payments last."
11
11
  - "Entities are dotted + bracket-syntax only (`base44.entities[\"commerce.X\"]`); the map is ../docs/entities.md — never scan base44/entities/."
12
12
  ---
13
13
 
@@ -24,9 +24,13 @@ carry_forward:
24
24
  Image generation is the slowest step and nothing depends on it until seed time; the storefront doesn't wait on live data either.
25
25
 
26
26
  1. **Start image generation first** — every product image, before anything else.
27
- ⚑ The tool hands back a `/__generating__/…` placeholder immediately and the real
28
- `image_url` only when it finishes. Never write the placeholder into a file or a
29
- seed payload: it resolves to nothing and ships a broken image.
27
+ **The result already carries the real `image_url`** alongside a `placeholder_url`
28
+ — use `image_url` and move on. Nothing is pending, there is nothing to poll, and a
29
+ backend function calling `Core.GenerateImage` to "fetch the real URLs" is pure waste:
30
+ you already have them. If a `/__generating__/…` value does reach a file or a seed
31
+ payload, the platform swaps it for the real URL after the turn (in files *and* entity
32
+ records) — so a placeholder that renders broken in a mid-build preview is expected and
33
+ must not be "fixed".
30
34
  2. **Mount the admin (below) and build the storefront** while images render. Every
31
35
  request and response shape the pages build against is written out in
32
36
  [`./02-storefront.md`](./02-storefront.md), so they are written from the docs,
@@ -71,7 +71,7 @@ function StoreLayout() {
71
71
 
72
72
  The cost driver of a generated storefront is not wiring — it is decoration repeated inline. Encode identity **once**: in `index.css`, set the palette and type scale, then define the store's recurring surfaces as **10–15 composable classes** in Tailwind's components layer, named in *this* store's language (`.panel`, `.btn-cta`, `.label-mono`, `.field`, `.choice-row`, a heading scale, a price style — whatever *this* store repeats). Pages then carry short class names plus a couple of layout utilities. ⚑ **A utility run that appears twice becomes a class.**
73
73
 
74
- ⚑ **Two `@apply` forms Tailwind rejects, and each breaks the whole build.** An opacity modifier on an arbitrary value is not a class (`text-[var(--ink)]/40`) — write plain CSS: `color: color-mix(in srgb, var(--ink) 40%, transparent)`. And `@apply group` is invalid; `group` is a marker for the element's `className`. Either is a postcss error that fails Vite, so *every* page renders blank — which reads as a broken import and sends you into `src/commerce/`. **Nothing rendering? Read `index.css` first.**
74
+ ⚑ **Two `@apply` forms Tailwind rejects, and each breaks the whole build.** **Any** `/opacity` on a bracketed value is not a class `text-[var(--ink)]/40` and `border-[#1B2422]/8` fail alike so write plain CSS: `border-color: color-mix(in srgb, var(--ink) 40%, transparent)`. Translucent brand colours are the commonest thing a `.panel`/`.field` class wants, so reach for `color-mix` first. And `@apply group` is invalid; `group` is a marker for the element's `className`. Either is a postcss error that fails Vite, so *every* page renders blank — which reads as a broken import and sends you into `src/commerce/`. **Nothing rendering? Read `index.css` first.**
75
75
 
76
76
  The store's words work the same way: the states these hooks hand you recur across pages (an empty bag, an unbuyable product, an undeliverable address), so write that copy once in the store's voice — a small map per surface, as the sections below show. It is the half of a store's identity a kit cannot ship.
77
77