@fayz-ai/storefront 0.79.0 → 0.80.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.
package/dist/lib/seo.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { Product } from '@fayz-ai/shop/types';
1
+ import type { Category, Product } from '@fayz-ai/shop/types';
2
2
  import type { ResolvedStorefrontConfig } from '../document/config';
3
3
  import type { StaticHeadInput } from '../app/static-render';
4
4
  export interface StorefrontSeoContext {
@@ -23,4 +23,60 @@ export declare function pageSeo(ctx: StorefrontSeoContext, input: {
23
23
  title: string;
24
24
  description?: string | null;
25
25
  }): StaticHeadInput;
26
+ /**
27
+ * Who serves the menu, as the store knows itself. Everything optional: a
28
+ * field the store has not filled is left out of the JSON-LD rather than
29
+ * guessed, because a wrong phone number in a rich result is worse than none.
30
+ */
31
+ export interface MenuBusiness {
32
+ /** schema.org type. 'Restaurant' unless the house is better described by
33
+ * another FoodEstablishment subtype (e.g. 'FastFoodRestaurant', 'Bakery'). */
34
+ type?: string;
35
+ description?: string;
36
+ telephone?: string;
37
+ email?: string;
38
+ /** Absolute URL. */
39
+ logo?: string;
40
+ /** Absolute URL; the cover photo. */
41
+ image?: string;
42
+ servesCuisine?: string | string[];
43
+ priceRange?: string;
44
+ address?: {
45
+ streetAddress?: string;
46
+ locality?: string;
47
+ region?: string;
48
+ postalCode?: string;
49
+ country?: string;
50
+ };
51
+ /** Cities or neighbourhoods delivered to, by name. */
52
+ areaServed?: string[];
53
+ /** schema.org openingHours, e.g. ['Mo-Fr 11:00-22:00']. */
54
+ openingHours?: string[];
55
+ sameAs?: string[];
56
+ }
57
+ /**
58
+ * schema.org Restaurant with its Menu — what lets a search engine answer
59
+ * "delivery de costela defumada" with this house, and read every dish and
60
+ * price without running the page's JavaScript.
61
+ *
62
+ * Each dish links to its own product page, where the full Product entity
63
+ * lives; here it is a MenuItem, which is what a dish on a menu is.
64
+ */
65
+ export declare function menuJsonLd(input: {
66
+ products: Product[];
67
+ categories: Category[];
68
+ business?: MenuBusiness;
69
+ }, ctx: StorefrontSeoContext): Record<string, unknown>;
70
+ /**
71
+ * The head declaration for the delivery menu: its own title and description
72
+ * (the store passes copy written for the query it should answer), the
73
+ * Restaurant + Menu entity, and a breadcrumb back to the home page.
74
+ */
75
+ export declare function menuSeo(input: {
76
+ products: Product[];
77
+ categories: Category[];
78
+ title?: string;
79
+ description?: string | null;
80
+ business?: MenuBusiness;
81
+ }, ctx: StorefrontSeoContext): StaticHeadInput;
26
82
  //# sourceMappingURL=seo.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"seo.d.ts","sourceRoot":"","sources":["../../src/lib/seo.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAElD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAA;AAClE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAiB3D,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,wBAAwB,CAAA;IAChC,8CAA8C;IAC9C,IAAI,EAAE,MAAM,CAAA;IACZ,wDAAwD;IACxD,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAUD,6EAA6E;AAC7E,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAEpE;AAaD;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,oBAAoB,GACxB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAqBzB;AAED,+CAA+C;AAC/C,wBAAgB,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,oBAAoB,GAAG,eAAe,CAuBvF;AAED,sEAAsE;AACtE,wBAAgB,OAAO,CACrB,GAAG,EAAE,oBAAoB,EACzB,KAAK,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,WAA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,EAAE,MAAM,CAAA;IACb,qCAAqC;IACrC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IACjC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,OAAO,CAAC,EAAE;QAAE,aAAa,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;IAC/G,sDAAsD;IACtD,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,2DAA2D;IAC3D,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;IACvB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;CAClB;AAoBD;;;;;;;GAOG;AACH,wBAAgB,UAAU,CACxB,KAAK,EAAE;IAAE,QAAQ,EAAE,OAAO,EAAE,CAAC;IAAC,UAAU,EAAE,QAAQ,EAAE,CAAC;IAAC,QAAQ,CAAC,EAAE,YAAY,CAAA;CAAE,EAC/E,GAAG,EAAE,oBAAoB,GACxB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAuEzB;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CACrB,KAAK,EAAE;IACL,QAAQ,EAAE,OAAO,EAAE,CAAA;IACnB,UAAU,EAAE,QAAQ,EAAE,CAAA;IACtB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,QAAQ,CAAC,EAAE,YAAY,CAAA;CACxB,EACD,GAAG,EAAE,oBAAoB,GACxB,eAAe,CAkBjB"}
package/dist/render.js CHANGED
@@ -1,4 +1,4 @@
1
- import { validateStore, resolveConfig, registerStorefrontBlocks, registerStorefrontEntities, resetPageDiagnostics, withStaticRenderPass, StorefrontConfigProvider, StorefrontShell, resolvePageData, themeToCss, serializePageData, hydrateStoreDocument, storefrontPaths, isPublicPath, resolveStorefrontProvider } from './chunk-3C4WJIOI.js';
1
+ import { validateStore, resolveConfig, registerStorefrontBlocks, registerStorefrontEntities, resetPageDiagnostics, withStaticRenderPass, StorefrontConfigProvider, StorefrontShell, resolvePageData, themeToCss, serializePageData, hydrateStoreDocument, storefrontPaths, isPublicPath, resolveStorefrontProvider } from './chunk-V7CGLOEN.js';
2
2
  import { renderToStaticMarkup } from 'react-dom/server';
3
3
  import { historyRouterAdapter, setBlockErrorVisibility, setBlockEditorMode, staticRouterAdapter, buildSeoTags, errorMessage } from '@fayz-ai/core';
4
4
  import { createMockShopProvider } from '@fayz-ai/shop/mock';
@@ -1,23 +1,9 @@
1
1
  import React from 'react';
2
- /**
3
- * O cardápio — a vitrine do modo delivery (0094).
4
- *
5
- * A ordem da página é a ordem das perguntas, e ela é fixa: quem é a loja e se
6
- * está aberta (capa) → como isso chega e quanto custa (faixa de endereço) →
7
- * onde está o que eu quero (busca + categorias) → o que tem (seções). É o
8
- * esqueleto que os cinco produtos medidos compartilham
9
- * (`docs/artorius/delivery-reference/patterns/`), e cada passo depende da
10
- * resposta do anterior: descobrir a taxa de entrega depois de montar o
11
- * carrinho é a pior hora possível para descobrir.
12
- *
13
- * Categorias como SEÇÕES numa página só, e não como um filtro que troca a
14
- * página. Um cardápio se lê rolando: a pessoa quer ver que existe sobremesa
15
- * sem ter decidido antes que quer sobremesa. Um filtro esconde exatamente essa
16
- * descoberta, e é por isso que nenhum app de delivery usa um.
17
- *
18
- * A `/catalog` com grade e facetas continua existindo e não foi tocada. As duas
19
- * respondem perguntas diferentes: o catálogo é para quem procura, o cardápio é
20
- * para quem escolhe.
21
- */
2
+ /** The menu's data needs, keyed exactly as its `useLoader` calls will ask. */
3
+ export declare function menuDataNeeds(): Array<{
4
+ key: string;
5
+ loader: string;
6
+ params: Record<string, unknown>;
7
+ }>;
22
8
  export declare function MenuPage(): React.JSX.Element;
23
9
  //# sourceMappingURL=MenuPage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MenuPage.d.ts","sourceRoot":"","sources":["../../src/views/MenuPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAwBzB;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,QAAQ,sBAuWvB"}
1
+ {"version":3,"file":"MenuPage.d.ts","sourceRoot":"","sources":["../../src/views/MenuPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAyDzB,8EAA8E;AAC9E,wBAAgB,aAAa,IAAI,KAAK,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,CAAC,CAEvG;AAED,wBAAgB,QAAQ,sBAuWvB"}
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "fayz": {
4
4
  "status": "beta"
5
5
  },
6
- "version": "0.79.0",
6
+ "version": "0.80.0",
7
7
  "description": "Fayz SDK storefront kit — Shopify-style customer-facing ecommerce template components",
8
8
  "type": "module",
9
9
  "sideEffects": false,
@@ -46,8 +46,8 @@
46
46
  "dependencies": {
47
47
  "posthog-js": "^1.444.0",
48
48
  "@fayz-ai/auth": "^0.79.0",
49
- "@fayz-ai/core": "^0.79.0",
50
49
  "@fayz-ai/sdk": "^0.79.0",
50
+ "@fayz-ai/core": "^0.79.0",
51
51
  "@fayz-ai/shop": "^0.79.0",
52
52
  "@fayz-ai/ui": "^0.79.0"
53
53
  },