@stapel/listings-react 0.18.1 → 0.19.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.
Files changed (121) hide show
  1. package/CHANGELOG.md +61 -0
  2. package/dist/api/generated/schema.d.ts +101 -13
  3. package/dist/api/generated/schema.d.ts.map +1 -1
  4. package/dist/api/listingsApi.d.ts +26 -1
  5. package/dist/api/listingsApi.d.ts.map +1 -1
  6. package/dist/api/listingsApi.js +9 -0
  7. package/dist/api/listingsApi.js.map +1 -1
  8. package/dist/api/types.d.ts +91 -6
  9. package/dist/api/types.d.ts.map +1 -1
  10. package/dist/api/types.js +32 -0
  11. package/dist/api/types.js.map +1 -1
  12. package/dist/default/GateReasonPopover.d.ts.map +1 -1
  13. package/dist/default/GateReasonPopover.js +47 -2
  14. package/dist/default/GateReasonPopover.js.map +1 -1
  15. package/dist/default/ListingCard.d.ts +32 -1
  16. package/dist/default/ListingCard.d.ts.map +1 -1
  17. package/dist/default/ListingCard.js +65 -14
  18. package/dist/default/ListingCard.js.map +1 -1
  19. package/dist/default/ListingDetailPane.d.ts.map +1 -1
  20. package/dist/default/ListingDetailPane.js +12 -7
  21. package/dist/default/ListingDetailPane.js.map +1 -1
  22. package/dist/default/ListingFeedCard.d.ts +32 -7
  23. package/dist/default/ListingFeedCard.d.ts.map +1 -1
  24. package/dist/default/ListingFeedCard.js +11 -3
  25. package/dist/default/ListingFeedCard.js.map +1 -1
  26. package/dist/default/ListingPrice.d.ts +13 -2
  27. package/dist/default/ListingPrice.d.ts.map +1 -1
  28. package/dist/default/ListingPrice.js.map +1 -1
  29. package/dist/default/ListingSerpCard.d.ts +9 -0
  30. package/dist/default/ListingSerpCard.d.ts.map +1 -1
  31. package/dist/default/ListingSerpCard.js +13 -3
  32. package/dist/default/ListingSerpCard.js.map +1 -1
  33. package/dist/default/favorite.d.ts +28 -0
  34. package/dist/default/favorite.d.ts.map +1 -1
  35. package/dist/default/favorite.js +31 -6
  36. package/dist/default/favorite.js.map +1 -1
  37. package/dist/default/icons.d.ts +17 -3
  38. package/dist/default/icons.d.ts.map +1 -1
  39. package/dist/default/icons.js +2 -1
  40. package/dist/default/icons.js.map +1 -1
  41. package/dist/default/index.d.ts +1 -1
  42. package/dist/default/index.d.ts.map +1 -1
  43. package/dist/default/index.js +4 -1
  44. package/dist/default/index.js.map +1 -1
  45. package/dist/headless/Engagement.d.ts +62 -0
  46. package/dist/headless/Engagement.d.ts.map +1 -0
  47. package/dist/headless/Engagement.js +116 -0
  48. package/dist/headless/Engagement.js.map +1 -0
  49. package/dist/headless/Favorites.d.ts +50 -0
  50. package/dist/headless/Favorites.d.ts.map +1 -1
  51. package/dist/headless/Favorites.js +63 -3
  52. package/dist/headless/Favorites.js.map +1 -1
  53. package/dist/headless/ListingDetail.d.ts +21 -1
  54. package/dist/headless/ListingDetail.d.ts.map +1 -1
  55. package/dist/headless/ListingDetail.js +39 -3
  56. package/dist/headless/ListingDetail.js.map +1 -1
  57. package/dist/i18n/es.d.ts.map +1 -1
  58. package/dist/i18n/es.js +4 -0
  59. package/dist/i18n/es.js.map +1 -1
  60. package/dist/i18n/generated/errors.es.gen.d.ts +1 -1
  61. package/dist/i18n/generated/errors.es.gen.js +1 -1
  62. package/dist/i18n/generated/errors.gen.d.ts +12 -0
  63. package/dist/i18n/generated/errors.gen.d.ts.map +1 -1
  64. package/dist/i18n/generated/errors.gen.js +6 -0
  65. package/dist/i18n/generated/errors.gen.js.map +1 -1
  66. package/dist/i18n/generated/errors.ru.gen.d.ts +1 -1
  67. package/dist/i18n/generated/errors.ru.gen.js +1 -1
  68. package/dist/i18n/keys.d.ts +7 -0
  69. package/dist/i18n/keys.d.ts.map +1 -1
  70. package/dist/i18n/keys.js +8 -0
  71. package/dist/i18n/keys.js.map +1 -1
  72. package/dist/i18n/ru.d.ts.map +1 -1
  73. package/dist/i18n/ru.js +6 -0
  74. package/dist/i18n/ru.js.map +1 -1
  75. package/dist/index.d.ts +6 -3
  76. package/dist/index.d.ts.map +1 -1
  77. package/dist/index.js +5 -2
  78. package/dist/index.js.map +1 -1
  79. package/dist/model/engagement.d.ts +85 -0
  80. package/dist/model/engagement.d.ts.map +1 -0
  81. package/dist/model/engagement.js +59 -0
  82. package/dist/model/engagement.js.map +1 -0
  83. package/dist/model/queries.d.ts +28 -1
  84. package/dist/model/queries.d.ts.map +1 -1
  85. package/dist/model/queries.js +36 -0
  86. package/dist/model/queries.js.map +1 -1
  87. package/dist/model/queryKeys.d.ts +12 -13
  88. package/dist/model/queryKeys.d.ts.map +1 -1
  89. package/dist/model/queryKeys.js +15 -0
  90. package/dist/model/queryKeys.js.map +1 -1
  91. package/llms.txt +6 -3
  92. package/manifest.json +71 -3
  93. package/nav-manifest.json +1 -1
  94. package/package.json +7 -7
  95. package/src/analytics/generated/events.json +1 -1
  96. package/src/api/generated/schema.ts +101 -13
  97. package/src/api/listingsApi.ts +39 -0
  98. package/src/api/types.ts +115 -6
  99. package/src/default/GateReasonPopover.tsx +62 -3
  100. package/src/default/ListingCard.tsx +84 -10
  101. package/src/default/ListingDetailPane.tsx +48 -16
  102. package/src/default/ListingFeedCard.tsx +45 -8
  103. package/src/default/ListingPrice.tsx +13 -2
  104. package/src/default/ListingSerpCard.tsx +24 -1
  105. package/src/default/favorite.tsx +97 -18
  106. package/src/default/icons.tsx +21 -3
  107. package/src/default/index.ts +4 -0
  108. package/src/headless/Engagement.tsx +177 -0
  109. package/src/headless/Favorites.tsx +93 -3
  110. package/src/headless/ListingDetail.tsx +64 -4
  111. package/src/i18n/es.ts +7 -0
  112. package/src/i18n/generated/errors.es.gen.ts +1 -1
  113. package/src/i18n/generated/errors.gen.ts +6 -0
  114. package/src/i18n/generated/errors.json +14 -0
  115. package/src/i18n/generated/errors.ru.gen.ts +1 -1
  116. package/src/i18n/keys.ts +8 -0
  117. package/src/i18n/ru.ts +9 -0
  118. package/src/index.ts +27 -0
  119. package/src/model/engagement.ts +118 -0
  120. package/src/model/queries.ts +41 -0
  121. package/src/model/queryKeys.ts +14 -0
@@ -0,0 +1,62 @@
1
+ import type { Context, ReactElement, ReactNode } from "react";
2
+ import type { LoadState } from "@stapel/core";
3
+ import type { ListingCard, ListingEngagement, ListingEngagementBatch } from "../api/types.js";
4
+ /** What the scope publishes: the batch, however it is doing. */
5
+ export interface ListingEngagementBag {
6
+ /** This listing's entry, or `undefined` for an id the answer did not carry
7
+ * — which includes "the read has not landed" and "the read failed". */
8
+ overlayFor(id: number): ListingEngagement | undefined;
9
+ /** The read's own state, for a host that wants to know. NOTHING in this
10
+ * pair renders the failed arm: see the file header. */
11
+ readonly state: LoadState<ListingEngagementBatch>;
12
+ /** The normalized ids actually asked for — after the sort, the de-dupe and
13
+ * the server's own cap. A caller can compare it with what it handed in to
14
+ * see that a hundred-and-forty-card page was truncated. */
15
+ readonly ids: readonly number[];
16
+ }
17
+ /**
18
+ * The scope. `null` outside a provider — and `null` is not an error, it is a
19
+ * container that never opted in.
20
+ */
21
+ export declare const ListingEngagementContext: Context<ListingEngagementBag | null>;
22
+ export interface UseListingEngagementOverlayOptions {
23
+ /** Hold the request (a grid that has not resolved its rows yet). */
24
+ readonly enabled?: boolean;
25
+ }
26
+ /**
27
+ * Run the batch read for a page of ids and get the bag back.
28
+ *
29
+ * The headless half: a host rendering its own visuals over its own grid calls
30
+ * this directly. A host using this pair's cards wraps them in
31
+ * {@link ListingEngagementScope} instead, which calls this once and puts the
32
+ * bag where the cards can find it.
33
+ */
34
+ export declare function useListingEngagementOverlay(ids: readonly number[], options?: UseListingEngagementOverlayOptions): ListingEngagementBag;
35
+ export interface ListingEngagementScopeProps extends UseListingEngagementOverlayOptions {
36
+ /** The listing ids on this page — normalized before the request, so the
37
+ * caller may hand them in any order and need not de-duplicate. */
38
+ readonly ids: readonly number[];
39
+ readonly children: ReactNode;
40
+ }
41
+ /**
42
+ * One request for the page, one lookup for every card inside it.
43
+ *
44
+ * Renderless: it draws no element of its own, so it can be wrapped around a
45
+ * grid without entering its layout.
46
+ */
47
+ export declare function ListingEngagementScope(props: ListingEngagementScopeProps): ReactElement;
48
+ /** The scope's bag, or a permanently-empty one outside a scope. Never throws:
49
+ * a card must render everywhere, wired or not. */
50
+ export declare function useListingEngagementScope(): ListingEngagementBag;
51
+ /** One listing's overlay entry, or `undefined`. */
52
+ export declare function useEngagementOverlay(id: number): ListingEngagement | undefined;
53
+ /**
54
+ * A row with the scope's answer laid over it — what every card in this pair
55
+ * actually reads.
56
+ *
57
+ * Outside a scope, or for an id the batch did not carry, this returns the
58
+ * SAME object it was given, so a card that never opted in re-renders exactly
59
+ * as often as it used to.
60
+ */
61
+ export declare function useEngagedListing(row: ListingCard): ListingCard;
62
+ //# sourceMappingURL=Engagement.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Engagement.d.ts","sourceRoot":"","sources":["../../src/headless/Engagement.tsx"],"names":[],"mappings":"AA+CA,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EACV,WAAW,EACX,iBAAiB,EACjB,sBAAsB,EACvB,MAAM,iBAAiB,CAAC;AAKzB,gEAAgE;AAChE,MAAM,WAAW,oBAAoB;IACnC;2EACuE;IACvE,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,iBAAiB,GAAG,SAAS,CAAC;IACtD;2DACuD;IACvD,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC,sBAAsB,CAAC,CAAC;IAClD;;+DAE2D;IAC3D,QAAQ,CAAC,GAAG,EAAE,SAAS,MAAM,EAAE,CAAC;CACjC;AAQD;;;GAGG;AACH,eAAO,MAAM,wBAAwB,EAAE,OAAO,CAAC,oBAAoB,GAAG,IAAI,CACxB,CAAC;AAEnD,MAAM,WAAW,kCAAkC;IACjD,oEAAoE;IACpE,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CACzC,GAAG,EAAE,SAAS,MAAM,EAAE,EACtB,OAAO,GAAE,kCAAuC,GAC/C,oBAAoB,CAoBtB;AAED,MAAM,WAAW,2BACf,SAAQ,kCAAkC;IAC1C;sEACkE;IAClE,QAAQ,CAAC,GAAG,EAAE,SAAS,MAAM,EAAE,CAAC;IAChC,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;CAC9B;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,2BAA2B,GACjC,YAAY,CAUd;AAED;kDACkD;AAClD,wBAAgB,yBAAyB,IAAI,oBAAoB,CAEhE;AAED,mDAAmD;AACnD,wBAAgB,oBAAoB,CAClC,EAAE,EAAE,MAAM,GACT,iBAAiB,GAAG,SAAS,CAE/B;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,WAAW,GAAG,WAAW,CAG/D"}
@@ -0,0 +1,116 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /**
3
+ * The ENGAGEMENT OVERLAY as a scope: one request for a page of cards, read by
4
+ * every card in it without a single extra prop.
5
+ *
6
+ * ── The problem this shape exists to solve ────────────────────────────────
7
+ *
8
+ * `viewed`, `view_count` and `is_favorited` are on stapel-listings' own card
9
+ * and detail serializers, so a listing PAGE and this module's own card list
10
+ * carry them and need nothing here. The two surfaces a buyer actually
11
+ * scrolls do not: a storefront's home feed and its SERP are drawn by
12
+ * `@stapel/search-react` from the search index, whose stored document can
13
+ * hold neither a flag that differs per reader nor a counter that moves faster
14
+ * than a re-index. Those rows reach `<ListingCard>` with no engagement fields
15
+ * at all — so without this, every card on the two screens the feature was
16
+ * built for renders undimmed with an outline heart no matter what the person
17
+ * has done, and nothing anywhere reports a fault.
18
+ *
19
+ * ── Why a SCOPE and not a prop ────────────────────────────────────────────
20
+ *
21
+ * Because the cost is per PAGE and the reader is per CARD, and a design that
22
+ * puts those in the same place gets one of them wrong. A `engagement` prop on
23
+ * the card would make each card responsible for its own answer, and the
24
+ * shortest way to satisfy that is one request per card — forty requests for a
25
+ * decoration, which is the exact N+1 the batch endpoint exists to prevent.
26
+ * The container knows the page; the card knows its id. So the container opens
27
+ * a scope with the ids it just rendered, ONE query runs, and each card looks
28
+ * itself up. It is the arrangement `GateReasonScopeContext` / `<PaneGate>`
29
+ * already use in this fleet for the same shape of problem.
30
+ *
31
+ * ```tsx
32
+ * <ListingEngagementScope ids={items.map((item) => item.id)}>
33
+ * <FeedGrid>
34
+ * {items.map((item) => <ListingFeedCard key={item.id} listing={item.card} … />)}
35
+ * </FeedGrid>
36
+ * </ListingEngagementScope>
37
+ * ```
38
+ *
39
+ * ── No scope is a first-class answer ──────────────────────────────────────
40
+ *
41
+ * A card outside a scope fires NOTHING and draws from its row exactly as it
42
+ * did before this module existed — which is right for this module's own card
43
+ * list and for the listing page, whose rows already carry the fields. Absent,
44
+ * empty, in-flight and FAILED are all the same silent no-op: no dimming, no
45
+ * count, no banner over a grid that is otherwise working. A grid that renders
46
+ * is worth more than a flag.
47
+ */
48
+ import { createContext, useContext, useMemo } from "react";
49
+ import { loadFailed, loadLoading, loadReady } from "@stapel/core";
50
+ import { engagementIds } from "../api/types.js";
51
+ import { useListingEngagement } from "../model/queries.js";
52
+ import { engagementFor, withEngagement } from "../model/engagement.js";
53
+ const NO_OVERLAY = {
54
+ overlayFor: () => undefined,
55
+ state: loadLoading(),
56
+ ids: [],
57
+ };
58
+ /**
59
+ * The scope. `null` outside a provider — and `null` is not an error, it is a
60
+ * container that never opted in.
61
+ */
62
+ export const ListingEngagementContext = createContext(null);
63
+ /**
64
+ * Run the batch read for a page of ids and get the bag back.
65
+ *
66
+ * The headless half: a host rendering its own visuals over its own grid calls
67
+ * this directly. A host using this pair's cards wraps them in
68
+ * {@link ListingEngagementScope} instead, which calls this once and puts the
69
+ * bag where the cards can find it.
70
+ */
71
+ export function useListingEngagementOverlay(ids, options = {}) {
72
+ const query = useListingEngagement(ids, options.enabled !== undefined ? { enabled: options.enabled } : {});
73
+ const wanted = useMemo(() => engagementIds(ids), [ids]);
74
+ const batch = query.data;
75
+ return useMemo(() => ({
76
+ overlayFor: (id) => engagementFor(batch, id),
77
+ state: query.status === "error"
78
+ ? loadFailed(query.error)
79
+ : batch !== undefined
80
+ ? loadReady(batch)
81
+ : loadLoading(),
82
+ ids: wanted,
83
+ }), [batch, query.status, query.error, wanted]);
84
+ }
85
+ /**
86
+ * One request for the page, one lookup for every card inside it.
87
+ *
88
+ * Renderless: it draws no element of its own, so it can be wrapped around a
89
+ * grid without entering its layout.
90
+ */
91
+ export function ListingEngagementScope(props) {
92
+ const bag = useListingEngagementOverlay(props.ids, props.enabled !== undefined ? { enabled: props.enabled } : {});
93
+ return (_jsx(ListingEngagementContext.Provider, { value: bag, children: props.children }));
94
+ }
95
+ /** The scope's bag, or a permanently-empty one outside a scope. Never throws:
96
+ * a card must render everywhere, wired or not. */
97
+ export function useListingEngagementScope() {
98
+ return useContext(ListingEngagementContext) ?? NO_OVERLAY;
99
+ }
100
+ /** One listing's overlay entry, or `undefined`. */
101
+ export function useEngagementOverlay(id) {
102
+ return useListingEngagementScope().overlayFor(id);
103
+ }
104
+ /**
105
+ * A row with the scope's answer laid over it — what every card in this pair
106
+ * actually reads.
107
+ *
108
+ * Outside a scope, or for an id the batch did not carry, this returns the
109
+ * SAME object it was given, so a card that never opted in re-renders exactly
110
+ * as often as it used to.
111
+ */
112
+ export function useEngagedListing(row) {
113
+ const overlay = useEngagementOverlay(row.id);
114
+ return useMemo(() => withEngagement(row, overlay), [row, overlay]);
115
+ }
116
+ //# sourceMappingURL=Engagement.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Engagement.js","sourceRoot":"","sources":["../../src/headless/Engagement.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,OA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AC,WAAW,EAAE;QACrB,GAAG,EAAE,MAAM;KACZ,CAAC,EACF,CAAC,KAAK,EAAE,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAC3C,CAAC;AACJ,CAAC;AAUD;;;;;GAKG;AACH,MAAM,UAAU,sBAAsB,CACpC,KAAkC;IAElC,MAAM,GAAG,GAAG,2BAA2B,CACrC,KAAK,CAAC,GAAG,EACT,KAAK,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAC9D,CAAC;IACF,OAAO,CACL,KAAC,wBAAwB,CAAC,QAAQ,IAAC,KAAK,EAAE,GAAG,YAC1C,KAAK,CAAC,QAAQ,GACmB,CACrC,CAAC;AACJ,CAAC;AAED;kDACkD;AAClD,MAAM,UAAU,yBAAyB;IACvC,OAAO,UAAU,CAAC,wBAAwB,CAAC,IAAI,UAAU,CAAC;AAC5D,CAAC;AAED,mDAAmD;AACnD,MAAM,UAAU,oBAAoB,CAClC,EAAU;IAEV,OAAO,yBAAyB,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;AACpD,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,iBAAiB,CAAC,GAAgB;IAChD,MAAM,OAAO,GAAG,oBAAoB,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAC7C,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,cAAc,CAAC,GAAG,EAAE,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;AACrE,CAAC"}
@@ -9,7 +9,25 @@ import type { ListingCard, ListingPageParams } from "../api/types.js";
9
9
  * card, {@link useFavorites} is the page listing what was saved.
10
10
  */
11
11
  export interface FavoriteToggleBag {
12
+ /**
13
+ * What the heart must DRAW: the predicted state while a toggle is in
14
+ * flight, the row's own answer otherwise. Never `null` — see
15
+ * {@link FavoriteToggleBag.known} for the question `null` answers.
16
+ */
12
17
  readonly favorited: boolean;
18
+ /**
19
+ * Whether the row is AUTHORITATIVE about this reader's saved state.
20
+ *
21
+ * `is_favorited` is `boolean | null` and the null is not a `false`: it is
22
+ * "nobody asked on this person's behalf", which is what every anonymous
23
+ * read of a card list sends. Both draw the outline heart — an unsaved
24
+ * listing and an unasked one look the same, and a third mystery look would
25
+ * be a state nobody could name — but a caller deciding whether it may
26
+ * TRUST the row (a favourites count, a "you saved this" line) must be able
27
+ * to tell them apart, and squeezing that into the boolean is how it stops
28
+ * being tellable.
29
+ */
30
+ readonly known: boolean;
13
31
  /** Blocked with the reason for a visitor, a guest, an unknown mandate, or
14
32
  * while the previous toggle is still in flight. Never a hidden heart: a
15
33
  * control that disappears for a visitor teaches them nothing, and the CTA
@@ -27,6 +45,38 @@ export interface FavoriteToggleBag {
27
45
  * reader (`with_favorited` annotates `Value(None)`), which is a THIRD state
28
46
  * and not `false`: "we did not ask" versus "not saved". The gate is what
29
47
  * renders it, so the distinction never has to be squeezed into the boolean.
48
+ *
49
+ * ── The toggle is OPTIMISTIC, and this is the pair's only such write ───────
50
+ *
51
+ * Measured on a live deployment: a signed-in person taps the heart and
52
+ * nothing on screen moves. The write went out and the invalidation landed,
53
+ * but the row this hook was handed is a PROP — it belongs to a list query one
54
+ * or two components up, and until that query has refetched and re-rendered
55
+ * the grid, the icon is still drawing the state from before the tap. On a
56
+ * phone that is a second or more of a control that looks broken, and the
57
+ * usual response to a control that looks broken is to press it again.
58
+ *
59
+ * So the state the heart draws is the PREDICTION while the write is in
60
+ * flight, and the prediction is allowed here for the reason `mutations.ts`
61
+ * argues at its own hook: the truth is a single boolean the caller already
62
+ * holds, so guessing it is arithmetic rather than invention. Everything else
63
+ * in the pair moves a lifecycle whose next state is the server's to decide.
64
+ *
65
+ * Three ways the prediction ends, and all three are wired:
66
+ *
67
+ * - the write SUCCEEDS → the server's own `favorited` replaces it, so a
68
+ * server that disagreed with the guess wins;
69
+ * - the write FAILS → it rolls back to the state the tap started from,
70
+ * and `error` carries the failure for the surface to
71
+ * show. A heart that stayed filled over a save that
72
+ * never happened is worse than one that never moved;
73
+ * - the MINT fails → `elevation.run` never reaches the write, so there
74
+ * is nothing to roll back FROM; the prediction is
75
+ * dropped the moment the mint's failure appears.
76
+ *
77
+ * And it is tagged with the listing id, because a virtualised grid reuses a
78
+ * hook instance across rows: an untagged prediction would move one card's
79
+ * heart onto its neighbour on scroll.
30
80
  */
31
81
  export declare function useFavoriteToggle(id: number, favorited: boolean | null | undefined): FavoriteToggleBag;
32
82
  export interface FavoritesBag {
@@ -1 +1 @@
1
- {"version":3,"file":"Favorites.d.ts","sourceRoot":"","sources":["../../src/headless/Favorites.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AASrD,OAAO,KAAK,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAStE;;;;;;GAMG;AAEH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B;;;yEAGqE;IACrE,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC;IAClC,MAAM,IAAI,IAAI,CAAC;IACf,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;CACzB;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAC/B,EAAE,EAAE,MAAM,EACV,SAAS,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,GACpC,iBAAiB,CAwBnB;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC,SAAS,WAAW,EAAE,CAAC,CAAC;IACjD,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAC;IAC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CAAC;CACzB;AAQD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,wBAAgB,iBAAiB,CAC/B,EAAE,EAAE,MAAM,EACV,SAAS,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,GACpC,iBAAiB,CA0DnB;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC,SAAS,WAAW,EAAE,CAAC,CAAC;IACjD,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAC;IACjC;;;;OAIG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,kBAAkB,CAAC;IACtC,QAAQ,CAAC,QAAQ,EAAE,kBAAkB,CAAC;IACtC,MAAM,IAAI,IAAI,CAAC;IACf,MAAM,IAAI,IAAI,CAAC;IACf,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC;IAClC,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;yDACyD;AACzD,wBAAgB,YAAY,CAAC,OAAO,GAAE,mBAAwB,GAAG,YAAY,CAsD5E;AAED,oDAAoD;AACpD,wBAAgB,SAAS,CACvB,KAAK,EAAE,mBAAmB,GAAG;IAC3B,QAAQ,EAAE,CAAC,GAAG,EAAE,YAAY,KAAK,SAAS,CAAC;CAC5C,GACA,YAAY,CAGd"}
@@ -1,5 +1,5 @@
1
1
  import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
2
- import { useState } from "react";
2
+ import { useEffect, useState } from "react";
3
3
  import { actionAvailable, actionBlocked, firstBlock, loadFailed, loadLoading, loadReady, } from "@stapel/core";
4
4
  import { useMyFavorites } from "../model/queries.js";
5
5
  import { useFavoriteListing } from "../model/mutations.js";
@@ -13,15 +13,63 @@ import { LISTINGS_ELEVATION_ACTIONS, useElevatableMandateGate, } from "./useMand
13
13
  * reader (`with_favorited` annotates `Value(None)`), which is a THIRD state
14
14
  * and not `false`: "we did not ask" versus "not saved". The gate is what
15
15
  * renders it, so the distinction never has to be squeezed into the boolean.
16
+ *
17
+ * ── The toggle is OPTIMISTIC, and this is the pair's only such write ───────
18
+ *
19
+ * Measured on a live deployment: a signed-in person taps the heart and
20
+ * nothing on screen moves. The write went out and the invalidation landed,
21
+ * but the row this hook was handed is a PROP — it belongs to a list query one
22
+ * or two components up, and until that query has refetched and re-rendered
23
+ * the grid, the icon is still drawing the state from before the tap. On a
24
+ * phone that is a second or more of a control that looks broken, and the
25
+ * usual response to a control that looks broken is to press it again.
26
+ *
27
+ * So the state the heart draws is the PREDICTION while the write is in
28
+ * flight, and the prediction is allowed here for the reason `mutations.ts`
29
+ * argues at its own hook: the truth is a single boolean the caller already
30
+ * holds, so guessing it is arithmetic rather than invention. Everything else
31
+ * in the pair moves a lifecycle whose next state is the server's to decide.
32
+ *
33
+ * Three ways the prediction ends, and all three are wired:
34
+ *
35
+ * - the write SUCCEEDS → the server's own `favorited` replaces it, so a
36
+ * server that disagreed with the guess wins;
37
+ * - the write FAILS → it rolls back to the state the tap started from,
38
+ * and `error` carries the failure for the surface to
39
+ * show. A heart that stayed filled over a save that
40
+ * never happened is worse than one that never moved;
41
+ * - the MINT fails → `elevation.run` never reaches the write, so there
42
+ * is nothing to roll back FROM; the prediction is
43
+ * dropped the moment the mint's failure appears.
44
+ *
45
+ * And it is tagged with the listing id, because a virtualised grid reuses a
46
+ * hook instance across rows: an untagged prediction would move one card's
47
+ * heart onto its neighbour on scroll.
16
48
  */
17
49
  export function useFavoriteToggle(id, favorited) {
18
50
  const { gate: mandate, elevation } = useElevatableMandateGate(LISTINGS_ELEVATION_ACTIONS.favorite);
19
51
  const mutation = useFavoriteListing();
52
+ const [predicted, setPredicted] = useState(undefined);
53
+ const mintError = elevation.error;
54
+ useEffect(() => {
55
+ // The mint failed, so `run` never reached the write — the prediction has
56
+ // nothing behind it and no `onError` coming to retire it.
57
+ if (mintError !== undefined && mintError !== null)
58
+ setPredicted(undefined);
59
+ }, [mintError]);
60
+ const mine = predicted !== undefined && predicted.id === id ? predicted : undefined;
61
+ const shown = mine !== undefined ? mine.value : favorited === true;
62
+ // The row caught up: the prediction has become an opinion about the past.
63
+ // Retiring it here (rather than in the success callback) is what stops a
64
+ // stale guess from shadowing a row that changed for some other reason.
65
+ if (mine !== undefined && favorited === mine.value)
66
+ setPredicted(undefined);
20
67
  const gate = firstBlock(mandate, mutation.isPending || elevation.pending
21
68
  ? actionBlocked(LISTINGS_I18N_KEYS.blockedInFlight)
22
69
  : actionAvailable());
23
70
  return {
24
- favorited: favorited === true,
71
+ favorited: shown,
72
+ known: favorited === true || favorited === false,
25
73
  gate,
26
74
  // On a host with auto-anonymous wired, the first heart an anonymous
27
75
  // visitor presses mints their account and then saves — one press, no
@@ -29,7 +77,19 @@ export function useFavoriteToggle(id, favorited) {
29
77
  toggle: () => {
30
78
  if (!gate.available)
31
79
  return;
32
- elevation.run(() => mutation.mutate({ id, favorited: favorited !== true }));
80
+ const next = !shown;
81
+ const before = shown;
82
+ setPredicted({ id, value: next });
83
+ elevation.run(() => {
84
+ mutation.mutate({ id, favorited: next }, {
85
+ onSuccess: (data) => {
86
+ setPredicted({ id, value: data.favorited ?? next });
87
+ },
88
+ onError: () => {
89
+ setPredicted({ id, value: before });
90
+ },
91
+ });
92
+ });
33
93
  },
34
94
  inFlight: mutation.isPending || elevation.pending,
35
95
  error: mutation.error ?? elevation.error,
@@ -1 +1 @@
1
- {"version":3,"file":"Favorites.js","sourceRoot":"","sources":["../../src/headless/Favorites.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EACL,eAAe,EACf,aAAa,EACb,UAAU,EACV,UAAU,EACV,WAAW,EACX,SAAS,GACV,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,cAAc,EAAE,MAAM,qBAA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CAAC,GAAG,CAAC,GAAI,CAAC;AACpC,CAAC"}
@@ -68,12 +68,32 @@ export interface ListingDetailBag {
68
68
  * (`resolveImage`), because no contract in this fleet resolves a
69
69
  * stranger's reference — see `model/runtime.ts`. */
70
70
  readonly images: readonly string[];
71
- readonly isFavorited: boolean | undefined;
71
+ /**
72
+ * What the heart must DRAW — the prediction while a toggle is in flight,
73
+ * the row's own answer otherwise, and never `null`. See
74
+ * {@link ListingDetailBag.favoriteKnown} for the fact `null` carried.
75
+ */
76
+ readonly isFavorited: boolean;
77
+ /**
78
+ * Whether the row is AUTHORITATIVE about the reader's saved state.
79
+ * `is_favorited: null` is an anonymous read's "nobody asked", not a
80
+ * `false`; both draw the outline heart, and only this tells them apart.
81
+ */
82
+ readonly favoriteKnown: boolean;
72
83
  /** Saving a favourite needs a mandate; the block says which of the four
73
84
  * reasons applies. */
74
85
  readonly favoriteGate: ActionAvailability;
75
86
  toggleFavorite(): void;
76
87
  readonly favoriteInFlight: boolean;
88
+ /** The last favourite write's failure, for the surface to state. The heart
89
+ * has already rolled back by the time this is set. */
90
+ readonly favoriteError: unknown;
91
+ /** Has this reader already opened this listing? See `model/engagement.ts`
92
+ * — absent on every response today, and `false` when it is. */
93
+ readonly isViewed: boolean;
94
+ /** How many times it has been opened, or `undefined` where the server sent
95
+ * no number. Never a zero standing in for an absence. */
96
+ readonly viewCount: number | undefined;
77
97
  refetch(): void;
78
98
  }
79
99
  export interface UseListingDetailOptions {
@@ -1 +1 @@
1
- {"version":3,"file":"ListingDetail.d.ts","sourceRoot":"","sources":["../../src/headless/ListingDetail.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAUrD,OAAO,KAAK,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,KAAK,EACV,UAAU,EACV,aAAa,IAAI,iBAAiB,EAClC,kBAAkB,EAClB,iBAAiB,EAClB,MAA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M,WAAW,uBAAuB;IACtC;mFAC+E;IAC/E,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,SAAS,UAAU,EAAE,CAAC;CACnD;AAED,wBAAgB,gBAAgB,CAC9B,EAAE,EAAE,MAAM,EACV,OAAO,GAAE,uBAA4B,GACpC,gBAAgB,CAuKlB;AAED;oDACoD;AACpD,wBAAgB,aAAa,CAAC,KAAK,EAAE;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,4DAA4D;IAC5D,gBAAgB,CAAC,EAAE,SAAS,UAAU,EAAE,CAAC;IACzC,QAAQ,EAAE,CAAC,GAAG,EAAE,gBAAgB,KAAK,SAAS,CAAC;CAChD,GAAG,YAAY,CAQf"}
@@ -1,9 +1,10 @@
1
1
  import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
2
- import { useMemo } from "react";
2
+ import { useEffect, useMemo, useState } from "react";
3
3
  import { actionAvailable, actionBlocked, errorStatus, firstBlock, loadFailed, loadLoading, loadReady, } from "@stapel/core";
4
4
  import { useListing, useListingStatus } from "../model/queries.js";
5
5
  import { useFavoriteListing } from "../model/mutations.js";
6
6
  import { asFeatureDaoList, featuresFromDaoList, unreadableFeatureCount } from "../model/features.js";
7
+ import { isListingViewed, listingViewCount } from "../model/engagement.js";
7
8
  import { listingStatusView } from "../model/status.js";
8
9
  import { LISTINGS_I18N_KEYS } from "../i18n/keys.js";
9
10
  import { LISTINGS_ELEVATION_ACTIONS, useElevatableMandateGate, } from "./useMandateGate.js";
@@ -68,7 +69,24 @@ export function useListingDetail(id, options = {}) {
68
69
  const features = useMemo(() => featuresFromDaoList(asFeatureDaoList(detail.data?.features), copy), [detail.data, copy]);
69
70
  const titleFeatures = useMemo(() => featuresFromDaoList(asFeatureDaoList(detail.data?.features_title), copy), [detail.data, copy]);
70
71
  const badgeFeatures = useMemo(() => featuresFromDaoList(asFeatureDaoList(detail.data?.features_badges), copy), [detail.data, copy]);
71
- const isFavorited = detail.data?.is_favorited ?? undefined;
72
+ // The row's own answer, and the third state it is allowed to be in: `null`
73
+ // means the read was anonymous and nobody asked on this person's behalf.
74
+ const rowFavorited = detail.data?.is_favorited ?? undefined;
75
+ const [predicted, setPredicted] = useState(undefined);
76
+ const mintError = elevation.error;
77
+ useEffect(() => {
78
+ // A failed mint never reached the write, so no `onError` is coming to
79
+ // retire the prediction — see `useFavoriteToggle` for the whole argument.
80
+ if (mintError !== undefined && mintError !== null)
81
+ setPredicted(undefined);
82
+ }, [mintError]);
83
+ const isFavorited = predicted ?? rowFavorited === true;
84
+ // The detail refetch caught up; the prediction is now an opinion about the
85
+ // past and must stop shadowing a row that may have changed for some other
86
+ // reason.
87
+ if (predicted !== undefined && rowFavorited === predicted) {
88
+ setPredicted(undefined);
89
+ }
72
90
  const favoriteGate = firstBlock(mandate, favorite.isPending || elevation.pending
73
91
  ? actionBlocked(LISTINGS_I18N_KEYS.blockedInFlight)
74
92
  : actionAvailable(), detail.data === undefined
@@ -90,15 +108,33 @@ export function useListingDetail(id, options = {}) {
90
108
  unreadableFeatures: unreadableFeatureCount(asFeatureDaoList(detail.data?.features)),
91
109
  images: detail.data?.images ?? NO_IMAGES,
92
110
  isFavorited,
111
+ favoriteKnown: rowFavorited === true || rowFavorited === false,
93
112
  favoriteGate,
94
113
  toggleFavorite: () => {
95
114
  if (!favoriteGate.available)
96
115
  return;
116
+ const next = !isFavorited;
117
+ const before = isFavorited;
118
+ // The icon flips on the gesture; the invalidation below is what makes
119
+ // it true, and the two callbacks are what make it honest if it is not.
120
+ setPredicted(next);
97
121
  // Mints the anonymous account first where the host permits it for this
98
122
  // action; a direct call everywhere else.
99
- elevation.run(() => favorite.mutate({ id, favorited: isFavorited !== true }));
123
+ elevation.run(() => {
124
+ favorite.mutate({ id, favorited: next }, {
125
+ onSuccess: (data) => {
126
+ setPredicted(data.favorited ?? next);
127
+ },
128
+ onError: () => {
129
+ setPredicted(before);
130
+ },
131
+ });
132
+ });
100
133
  },
101
134
  favoriteInFlight: favorite.isPending || elevation.pending,
135
+ favoriteError: favorite.error ?? elevation.error,
136
+ isViewed: isListingViewed(detail.data),
137
+ viewCount: listingViewCount(detail.data),
102
138
  refetch: () => {
103
139
  void detail.refetch();
104
140
  void probe.refetch();
@@ -1 +1 @@
1
- {"version":3,"file":"ListingDetail.js","sourceRoot":"","sources":["../../src/headless/ListingDetail.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,EACL,eAAe,EACf,aAAa,EACb,WAAW,EACX,UAAU,EACV,UAAU,EACV,WAAW,EACX,SAAS,GACV,MAAM,cAAc,CAAC;AAQtB,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAErG,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EACL,0BAA0B,EAC1B,wBAAwB,GACzB,MAAM,qBAAqB,CAAC;AAE7B;;;;;;;GAOG;AACH,MAAM,SAAS,GAAsB,EAAE,CAAC;AAgGxC,MAAM,UAAU,gBAAgB,CAC9B,EAAU,EACV,UAAmC,EAAE;IAErC,MAAM,MAAM,GAAG,UAAU,CAAC,EAAE,CAAC,CAAC;IAC9B,MAAM,KAAK,GAAG,gBAAgB,CAAC,EAAE,CAAC,CAAC;IACnC,MAAM,QAAQ,GAAG,kBAAkB,EAAE,CAAC;IACtC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,wBAAwB,CAC3D,0BAA0B,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EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACrE,GAAG,CAAC,KAAK,CAAC,gBAAgB,KAAK,SAAS;YACtC,CAAC,CAAC,EAAE,gBAAgB,EAAE,KAAK,CAAC,gBAAgB,EAAE;YAC9C,CAAC,CAAC,EAAE,CAAC;KACR,CAAC,CAAC;IACH,OAAO,4BAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAI,CAAC;AACpC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"es.d.ts","sourceRoot":"","sources":["../../src/i18n/es.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAI/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAErE;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,oBAAoB,EAAE,cAkNlC,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,CAG7D"}
1
+ {"version":3,"file":"es.d.ts","sourceRoot":"","sources":["../../src/i18n/es.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAI/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAErE;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,oBAAoB,EAAE,cAyNlC,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,CAG7D"}
package/dist/i18n/es.js CHANGED
@@ -75,6 +75,7 @@ export const listingsI18nBundleEs = {
75
75
  "listings.detail.published_at": "Publicado el {date}",
76
76
  "listings.detail.expires_at": "A la venta hasta el {date}",
77
77
  "listings.detail.stock": "Disponibles",
78
+ "listings.detail.views": "Visitas",
78
79
  "listings.detail.edit": "Editar el anuncio",
79
80
  "listings.detail.take_down": "Retirarlo",
80
81
  "listings.compose.new_title": "Anuncio nuevo",
@@ -151,6 +152,9 @@ export const listingsI18nBundleEs = {
151
152
  "listings.favorites.empty": "Todavía no has guardado nada",
152
153
  "listings.favorites.empty_hint": "Toca el corazón en cualquier anuncio y te estará esperando aquí.",
153
154
  "listings.favorites.sign_in_hint": "Los favoritos se guardan en tu cuenta, así que te siguen entre dispositivos.",
155
+ // Las dos comprobaciones de publicación que llegaron con el contrato 0.17.
156
+ "error.400.listing_location_required": "Indica dónde está el artículo antes de publicarlo",
157
+ "error.400.listing_zero_price_not_allowed": "En esta categoría no se permite un precio de 0. Deja el precio vacío para «precio no indicado».",
154
158
  "listings.blocked.sign_in": "Inicia sesión para hacer esto",
155
159
  "listings.blocked.guest": "Esta cuenta todavía no puede hacerlo — termina de configurarla primero",
156
160
  "listings.blocked.mandate_unknown": "No pudimos comprobar tu cuenta, así que no adivinamos si puedes hacerlo",
@@ -1 +1 @@
1
- {"version":3,"file":"es.js","sourceRoot":"","sources":["../../src/i18n/es.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAErE,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAErE;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAmB;IAClD,GAAG,qBAAqB;IAExB,4EAA4E;IAC5E,6BAA6B,EAAE,8BAA8B;IAC7D,0BAA0B,EACxB,uDAAuD;IACzD,uCAAuC,EACrC,sDAAsD;IACxD,yCAAyC,EACvC,2CAA2C;IAC7C,qCAAqC,EACnC,gDAAgD;IAClD,yCAAyC,EACvC,2DAA2D;IAC7D,6BAA6B,EAAE,yBAAyB;IACxD,6BAA6B,EAAE,2BAA2B;IAC1D,6BAA6B,EAAE,iCAAiC;IAChE,sCAAsC,EACpC,4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ChC,oBAAoB,EAAE,WAAW;IACjC,yBAAyB,EAAE,eAAe;IAE1C,qBAAqB,EAAE,SAAS;IAChC,sBAAsB,EAAE,kBAAkB;IAC1C,4BAA4B,EAAE,OAAO;IACrC,mBAAmB,EAAE,cAAc;IACnC,yBAAyB,EAAE,MAAM;IACjC,wBAAwB,EAAE,WAAW;CACtC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,UAAU,sBAAsB,CAAC,IAAgB;IACrD,wBAAwB,CAAC,IAAI,CAAC,CAAC;IAC/B,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,oBAAoB,CAAC,CAAC;AAClD,CAAC"}
@@ -2,7 +2,7 @@ import type { ListingsErrorCode } from "./errors.gen.js";
2
2
  /**
3
3
  * `es` texts for the backend error codes this catalog carries.
4
4
  *
5
- * PARTIAL, and deliberately typed to say so: 24 key(s) owned by
5
+ * PARTIAL, and deliberately typed to say so: 26 key(s) owned by
6
6
  * stapel_attributes, stapel_listings are absent, because that owner ships no locale catalog
7
7
  * (ERRORS_LOCALE_EXEMPT_OWNERS). English for them still comes from the registry
8
8
  * artifact via the en bundle; the pair layers its own authored `es`
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * `es` texts for the backend error codes this catalog carries.
3
3
  *
4
- * PARTIAL, and deliberately typed to say so: 24 key(s) owned by
4
+ * PARTIAL, and deliberately typed to say so: 26 key(s) owned by
5
5
  * stapel_attributes, stapel_listings are absent, because that owner ships no locale catalog
6
6
  * (ERRORS_LOCALE_EXEMPT_OWNERS). English for them still comes from the registry
7
7
  * artifact via the en bundle; the pair layers its own authored `es`
@@ -220,6 +220,18 @@ export declare const LISTINGS_ERRORS: {
220
220
  readonly remediation: "fix_input";
221
221
  readonly en: "Unknown listing status '{status}'";
222
222
  };
223
+ readonly "error.400.listing_location_required": {
224
+ readonly status: 400;
225
+ readonly params: readonly [];
226
+ readonly remediation: "fix_input";
227
+ readonly en: "Choose where the item is before publishing";
228
+ };
229
+ readonly "error.400.listing_zero_price_not_allowed": {
230
+ readonly status: 400;
231
+ readonly params: readonly [];
232
+ readonly remediation: "fix_input";
233
+ readonly en: "A price of 0 is not allowed in this category. Leave the price empty for \"price not stated\".";
234
+ };
223
235
  readonly "error.400.publish_validation_failed": {
224
236
  readonly status: 400;
225
237
  readonly params: readonly [];
@@ -1 +1 @@
1
- {"version":3,"file":"errors.gen.d.ts","sourceRoot":"","sources":["../../../src/i18n/generated/errors.gen.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GACnB,OAAO,GACP,gBAAgB,GAChB,gBAAgB,GAChB,QAAQ,GACR,WAAW,GACX,iBAAiB,GACjB,KAAK,CAAC;AAEV,MAAM,WAAW,iBAAiB;IAChC,oDAAoD;IACpD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,4DAA4D;IAC5D,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,0EAA0E;IAC1E,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAClC,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmElB,CAAC;AA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