@stapel/listings-react 0.4.0 → 0.8.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 (133) hide show
  1. package/CHANGELOG.md +180 -0
  2. package/dist/api/generated/schema.d.ts +94 -4
  3. package/dist/api/generated/schema.d.ts.map +1 -1
  4. package/dist/default/FavoritesPane.d.ts +40 -3
  5. package/dist/default/FavoritesPane.d.ts.map +1 -1
  6. package/dist/default/FavoritesPane.js +30 -18
  7. package/dist/default/FavoritesPane.js.map +1 -1
  8. package/dist/default/ListingCard.d.ts +81 -4
  9. package/dist/default/ListingCard.d.ts.map +1 -1
  10. package/dist/default/ListingCard.js +97 -27
  11. package/dist/default/ListingCard.js.map +1 -1
  12. package/dist/default/ListingComposerPage.d.ts +163 -23
  13. package/dist/default/ListingComposerPage.d.ts.map +1 -1
  14. package/dist/default/ListingComposerPage.js +85 -43
  15. package/dist/default/ListingComposerPage.js.map +1 -1
  16. package/dist/default/ListingDetailPane.d.ts +41 -4
  17. package/dist/default/ListingDetailPane.d.ts.map +1 -1
  18. package/dist/default/ListingDetailPane.js +38 -25
  19. package/dist/default/ListingDetailPane.js.map +1 -1
  20. package/dist/default/ListingPhoto.d.ts +13 -1
  21. package/dist/default/ListingPhoto.d.ts.map +1 -1
  22. package/dist/default/ListingPhoto.js +47 -9
  23. package/dist/default/ListingPhoto.js.map +1 -1
  24. package/dist/default/ListingPrice.d.ts +13 -0
  25. package/dist/default/ListingPrice.d.ts.map +1 -0
  26. package/dist/default/ListingPrice.js +60 -0
  27. package/dist/default/ListingPrice.js.map +1 -0
  28. package/dist/default/MyListingsPane.d.ts +7 -28
  29. package/dist/default/MyListingsPane.d.ts.map +1 -1
  30. package/dist/default/MyListingsPane.js +136 -67
  31. package/dist/default/MyListingsPane.js.map +1 -1
  32. package/dist/default/SignInLink.js +8 -7
  33. package/dist/default/SignInLink.js.map +1 -1
  34. package/dist/default/StatusTags.d.ts +16 -5
  35. package/dist/default/StatusTags.d.ts.map +1 -1
  36. package/dist/default/StatusTags.js +19 -13
  37. package/dist/default/StatusTags.js.map +1 -1
  38. package/dist/default/index.d.ts +15 -9
  39. package/dist/default/index.d.ts.map +1 -1
  40. package/dist/default/index.js +13 -6
  41. package/dist/default/index.js.map +1 -1
  42. package/dist/headless/Favorites.d.ts +6 -0
  43. package/dist/headless/Favorites.d.ts.map +1 -1
  44. package/dist/headless/Favorites.js +23 -7
  45. package/dist/headless/Favorites.js.map +1 -1
  46. package/dist/headless/ListingActions.d.ts +12 -0
  47. package/dist/headless/ListingActions.d.ts.map +1 -1
  48. package/dist/headless/ListingActions.js +3 -0
  49. package/dist/headless/ListingActions.js.map +1 -1
  50. package/dist/headless/ListingComposer.d.ts +23 -0
  51. package/dist/headless/ListingComposer.d.ts.map +1 -1
  52. package/dist/headless/ListingComposer.js +33 -7
  53. package/dist/headless/ListingComposer.js.map +1 -1
  54. package/dist/headless/ListingDetail.d.ts.map +1 -1
  55. package/dist/headless/ListingDetail.js +7 -5
  56. package/dist/headless/ListingDetail.js.map +1 -1
  57. package/dist/headless/useMandateGate.d.ts +33 -2
  58. package/dist/headless/useMandateGate.d.ts.map +1 -1
  59. package/dist/headless/useMandateGate.js +42 -4
  60. package/dist/headless/useMandateGate.js.map +1 -1
  61. package/dist/i18n/es.d.ts +6 -1
  62. package/dist/i18n/es.d.ts.map +1 -1
  63. package/dist/i18n/es.js +23 -5
  64. package/dist/i18n/es.js.map +1 -1
  65. package/dist/i18n/generated/errors.es.gen.d.ts +1 -1
  66. package/dist/i18n/generated/errors.es.gen.js +1 -1
  67. package/dist/i18n/generated/errors.gen.d.ts +6 -0
  68. package/dist/i18n/generated/errors.gen.d.ts.map +1 -1
  69. package/dist/i18n/generated/errors.gen.js +3 -0
  70. package/dist/i18n/generated/errors.gen.js.map +1 -1
  71. package/dist/i18n/generated/errors.ru.gen.d.ts +1 -1
  72. package/dist/i18n/generated/errors.ru.gen.js +1 -1
  73. package/dist/i18n/keys.d.ts +30 -3
  74. package/dist/i18n/keys.d.ts.map +1 -1
  75. package/dist/i18n/keys.js +47 -7
  76. package/dist/i18n/keys.js.map +1 -1
  77. package/dist/i18n/ru.d.ts +16 -1
  78. package/dist/i18n/ru.d.ts.map +1 -1
  79. package/dist/i18n/ru.js +35 -5
  80. package/dist/i18n/ru.js.map +1 -1
  81. package/dist/index.d.ts +1 -1
  82. package/dist/index.d.ts.map +1 -1
  83. package/dist/index.js +1 -1
  84. package/dist/index.js.map +1 -1
  85. package/dist/model/draft.d.ts +9 -6
  86. package/dist/model/draft.d.ts.map +1 -1
  87. package/dist/model/draft.js +3 -1
  88. package/dist/model/draft.js.map +1 -1
  89. package/dist/model/features.d.ts +21 -7
  90. package/dist/model/features.d.ts.map +1 -1
  91. package/dist/model/features.js +26 -0
  92. package/dist/model/features.js.map +1 -1
  93. package/llms.txt +9 -8
  94. package/manifest.json +82 -31
  95. package/nav-manifest.json +1 -1
  96. package/package.json +19 -14
  97. package/src/analytics/generated/events.json +1 -1
  98. package/src/api/generated/schema.ts +94 -4
  99. package/src/default/FavoritesPane.tsx +156 -82
  100. package/src/default/ListingCard.tsx +283 -116
  101. package/src/default/ListingComposerPage.tsx +403 -187
  102. package/src/default/ListingDetailPane.tsx +200 -98
  103. package/src/default/ListingPhoto.tsx +89 -16
  104. package/src/default/ListingPrice.tsx +77 -0
  105. package/src/default/MyListingsPane.tsx +286 -228
  106. package/src/default/SignInLink.tsx +4 -4
  107. package/src/default/StatusTags.tsx +36 -18
  108. package/src/default/index.ts +18 -7
  109. package/src/headless/Favorites.tsx +36 -7
  110. package/src/headless/ListingActions.tsx +19 -0
  111. package/src/headless/ListingComposer.tsx +56 -5
  112. package/src/headless/ListingDetail.tsx +12 -5
  113. package/src/headless/useMandateGate.ts +49 -5
  114. package/src/i18n/es.ts +29 -5
  115. package/src/i18n/generated/errors.es.gen.ts +1 -1
  116. package/src/i18n/generated/errors.gen.ts +3 -0
  117. package/src/i18n/generated/errors.json +7 -0
  118. package/src/i18n/generated/errors.ru.gen.ts +1 -1
  119. package/src/i18n/keys.ts +54 -7
  120. package/src/i18n/ru.ts +41 -5
  121. package/src/index.ts +5 -1
  122. package/src/model/draft.ts +12 -7
  123. package/src/model/features.ts +48 -7
  124. package/dist/default/ErrorAlert.d.ts +0 -9
  125. package/dist/default/ErrorAlert.d.ts.map +0 -1
  126. package/dist/default/ErrorAlert.js +0 -27
  127. package/dist/default/ErrorAlert.js.map +0 -1
  128. package/dist/default/theme.d.ts +0 -25
  129. package/dist/default/theme.d.ts.map +0 -1
  130. package/dist/default/theme.js +0 -40
  131. package/dist/default/theme.js.map +0 -1
  132. package/src/default/ErrorAlert.tsx +0 -46
  133. package/src/default/theme.tsx +0 -67
@@ -1,14 +1,61 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Alert, Badge, Button, Empty, Flex, List, Space, Spin, Tabs, Tooltip, Typography, } from "antd";
3
- import { matchList, matchLoad, useDescribeFlowError, useT } from "@stapel/core";
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ /**
3
+ * `<MyListingsPane>` the seller's dashboard.
4
+ *
5
+ * Three counts and the rows behind them, both real since stapel-listings
6
+ * 0.7.0 gave the owner's own listings a route (`GET my/listings/`). Until
7
+ * then this pane showed the counts and NAMED the missing endpoint where the
8
+ * rows should be; `model/mineSource.ts` keeps that history and the seam it
9
+ * left behind.
10
+ *
11
+ * Three things this pane refuses to smooth over:
12
+ *
13
+ * 1. **Both axes on every row.** "Published" and "changes under review" appear
14
+ * beside each other, which is the entire reason `model/status.ts` exists: a
15
+ * dashboard that derived one from the other would tell a seller their live
16
+ * listing is offline, or never tell them their edit is being screened.
17
+ * `moderation_status` is on the owner card, so the row reads the real
18
+ * value rather than the `"approved"` stand-in it used before 0.7.0.
19
+ * 2. **Takedowns are not in a tab.** The three tabs are the SERVER's status
20
+ * groupings and `blocked` is in none of them, because `my/counters` counts
21
+ * it in none of them. Folding it into one would make a tab's rows and its
22
+ * badge describe different sets; leaving it out entirely would hide the
23
+ * one listing whose owner most needs to know. So it sits above the tabs,
24
+ * where it cannot be missed.
25
+ * 3. **An empty tab says which emptiness it is.** "No drafts" and "nothing
26
+ * sold yet" are different sentences and one generic "nothing here" is
27
+ * neither.
28
+ *
29
+ * ── The row, rebuilt for a 390px screen ────────────────────────────────────
30
+ *
31
+ * The visual pass measured the old one and it failed on a phone in four ways
32
+ * at once: `Edit ¦ Mark sold ¦ Archive ¦ Delete` in antd's `List.Item`
33
+ * `actions` slot overflowed the viewport and clipped "Delete"; the title and
34
+ * the status shared one line with no `min-width: 0`, so the word "Draft" split
35
+ * into "Draf/t"; the status itself was drawn three different ways down one
36
+ * list; and every "why is this off" sentence lived in a `Tooltip`, which a
37
+ * touch device cannot open and a disabled antd button never fires anyway.
38
+ *
39
+ * So: the row is a two-column flex (thumbnail, then a `min-width: 0` column
40
+ * that owns the title, the status and the actions), the actions WRAP instead
41
+ * of overflowing, each one is a shared `<GatedButton>` with its reason as
42
+ * ordinary text beside it, and the status is one `<ListingStatusBlock>`.
43
+ * Delete asks first, through the shared `<SkinConfirm>` — a bottom sheet on a
44
+ * phone. It used to fire the mutation on the first click.
45
+ */
46
+ import { useState } from "react";
47
+ import { Flex, List, Tabs, Typography } from "antd";
48
+ import { ErrorAlert, EmptyState, GatedButton, SkinConfirm, SkinTheme, } from "@stapel/tokens-antd/skin";
49
+ import { matchList, matchLoad, useT, useTPlural } from "@stapel/core";
50
+ import { spacing } from "@stapel/tokens";
4
51
  import { useMyListings } from "../headless/MyListings.js";
5
52
  import { useListingActions } from "../headless/ListingActions.js";
6
- import { myListingTitle, showsDraft } from "../model/mine.js";
53
+ import { myListingTitle } from "../model/mine.js";
7
54
  import { listingStatusView } from "../model/status.js";
8
55
  import { LISTINGS_I18N_KEYS } from "../i18n/keys.js";
9
- import { ErrorAlert } from "./ErrorAlert.js";
56
+ import { ListingPhoto } from "./ListingPhoto.js";
57
+ import { SignInLink } from "./SignInLink.js";
10
58
  import { ListingStatusBlock } from "./StatusTags.js";
11
- import { ListingsSkinTheme } from "./theme.js";
12
59
  const TAB_LABEL = {
13
60
  active: LISTINGS_I18N_KEYS.mineTabActive,
14
61
  drafts: LISTINGS_I18N_KEYS.mineTabDrafts,
@@ -20,18 +67,16 @@ const TAB_EMPTY = {
20
67
  drafts: LISTINGS_I18N_KEYS.mineEmptyDrafts,
21
68
  archived: LISTINGS_I18N_KEYS.mineEmptyArchived,
22
69
  };
23
- /** A control plus the sentence that explains it when it is off. Written once
24
- * here because this pane has six of them and a grey button with no reason is
25
- * the one shape `ActionAvailability` exists to make impossible. */
26
- function GatedButton(props) {
27
- const t = useT();
28
- return (_jsx(Tooltip, { title: props.gate.available
29
- ? props.label
30
- : t(props.gate.block.code, props.gate.block.params), children: _jsx("span", { children: _jsx(Button, { size: "small", danger: props.danger === true, disabled: !props.gate.available, "data-testid": props.testId, "data-analytics": "none", "data-analytics-reason": "business action \u2014 host app wraps with its own tracked()", onClick: props.onClick, children: props.label }) }) }));
31
- }
70
+ /** The thumbnail column. A photo marketplace whose seller dashboard is a
71
+ * column of text is missing the one thing that identifies a row at a glance;
72
+ * a fixed measure because the column must not reflow per row. */
73
+ const THUMB_WIDTH = "4.5rem";
74
+ /** How wide a dashboard row may get. A 1280px window gave the four wrapped
75
+ * action buttons ~560px of empty space to split across, stranding the reason
76
+ * text between them. */
77
+ const MINE_MEASURE = "60rem";
32
78
  function MyListingRow(props) {
33
79
  const t = useT();
34
- const describe = useDescribeFlowError();
35
80
  const actions = useListingActions(props.listing.id, props.listing.status);
36
81
  // Both axes, both real: `MyListingCardSerializer` puts `moderation_status`
37
82
  // on the owner's card, so the row no longer has to pass "approved" as a
@@ -41,60 +86,84 @@ function MyListingRow(props) {
41
86
  ? undefined
42
87
  : listingStatusView(props.listing.status, props.listing.moderation_status ?? "approved");
43
88
  const heading = myListingTitle(props.listing);
44
- return (_jsx(List.Item, { "data-testid": "listings-mine-row", "data-listing-id": props.listing.id, actions: [
45
- _jsx(GatedButton, { "data-analytics": "none", "data-analytics-reason": "passthrough \u2014 GatedButton owns the real click point", gate: { available: true }, label: t(LISTINGS_I18N_KEYS.mineEdit), testId: "listings-mine-edit", onClick: () => {
46
- props.onEdit?.(props.listing.id);
47
- } }, "edit"),
48
- _jsx(GatedButton, { "data-analytics": "none", "data-analytics-reason": "passthrough \u2014 GatedButton owns the real click point", gate: actions.complete, label: t(LISTINGS_I18N_KEYS.mineComplete), testId: "listings-mine-complete", onClick: actions.doComplete }, "complete"),
49
- _jsx(GatedButton, { "data-analytics": "none", "data-analytics-reason": "passthrough \u2014 GatedButton owns the real click point", gate: actions.archive, label: t(LISTINGS_I18N_KEYS.mineArchive), testId: "listings-mine-archive", onClick: actions.doArchive }, "archive"),
50
- _jsx(GatedButton, { "data-analytics": "none", "data-analytics-reason": "passthrough \u2014 GatedButton owns the real click point", danger: true, gate: actions.remove, label: t(LISTINGS_I18N_KEYS.mineDelete), testId: "listings-mine-delete", onClick: actions.doRemove }, "delete"),
51
- ], children: _jsx(List.Item.Meta, { title: _jsxs(Space, { size: 6, children: [heading ?? `#${String(props.listing.id)}`, showsDraft(props.listing) ? (_jsx(Typography.Text, { type: "secondary", "data-testid": "listings-mine-draft-title", children: t(LISTINGS_I18N_KEYS.statusDraft) })) : null] }), description: _jsxs(Flex, { vertical: true, gap: 4, children: [status !== undefined ? _jsx(ListingStatusBlock, { status: status }) : null, actions.error !== undefined && actions.error !== null ? (_jsx(ErrorAlert, { testId: "listings-mine-action-error", error: describe({
52
- code: LISTINGS_I18N_KEYS.unknownError,
53
- params: {},
54
- status: 0,
55
- message: undefined,
56
- language: undefined,
57
- }) })) : null] }) }) }));
89
+ const onEdit = props.onEdit;
90
+ // A control that offers something meaningless in the current state is the
91
+ // one shape §83 forbids: with no `onEdit` — which is exactly how the
92
+ // scripted scaffold mounts this pane — the button used to be enabled,
93
+ // clickable and inert. It is now switched off WITH the reason.
94
+ //
95
+ // "This app has no editing screen" is a fact about the BUILD, not about the
96
+ // row, so with six rows it printed six identical refusals down one column.
97
+ // A build-wide refusal is stated once, by the pane, and the button it
98
+ // refuses is not drawn at all.
99
+ const editGate = actions.editGate(true);
100
+ const hasEditor = onEdit !== undefined;
101
+ const cover = props.listing.images?.[0] ?? props.listing.images_draft?.[0];
102
+ return (_jsx(List.Item, { "data-testid": "listings-mine-row", "data-listing-id": props.listing.id, style: { alignItems: "flex-start" }, children: _jsxs(Flex, { gap: spacing[3], style: { width: "100%", minWidth: 0 }, children: [_jsx("div", { style: { flex: `0 0 ${THUMB_WIDTH}`, width: THUMB_WIDTH }, children: _jsx(ListingPhoto, { imageRef: cover, alt: heading ?? `#${String(props.listing.id)}` }) }), _jsxs(Flex, { vertical: true, gap: spacing[2], style: { flex: "1 1 auto", minWidth: 0 }, children: [_jsx(Typography.Text, { strong: true, ellipsis: true, "data-testid": "listings-mine-title", children: heading ?? `#${String(props.listing.id)}` }), status !== undefined ? _jsx(ListingStatusBlock, { status: status }) : null, actions.error !== undefined && actions.error !== null ? (_jsx(ErrorAlert, { testId: "listings-mine-action-error", thrown: actions.error, variant: "inline" })) : null, _jsxs(Flex, { wrap: true, gap: spacing[2], align: "flex-start", children: [hasEditor ? (_jsx(GatedButton, { gate: editGate, size: "small", testId: "listings-mine-edit", "data-analytics": "none", "data-analytics-reason": "business action \u2014 host app wraps with its own tracked()", onClick: () => {
103
+ onEdit?.(props.listing.id);
104
+ }, children: t(LISTINGS_I18N_KEYS.mineEdit) })) : null, _jsx(GatedButton, { gate: actions.complete, size: "small", testId: "listings-mine-complete", "data-analytics": "none", "data-analytics-reason": "business action \u2014 host app wraps with its own tracked()", onClick: actions.doComplete, children: t(LISTINGS_I18N_KEYS.mineComplete) }), _jsx(GatedButton, { gate: actions.archive, size: "small", testId: "listings-mine-archive", "data-analytics": "none", "data-analytics-reason": "business action \u2014 host app wraps with its own tracked()", onClick: actions.doArchive, children: t(LISTINGS_I18N_KEYS.mineArchive) }), _jsx(GatedButton, { gate: actions.remove, size: "small", danger: true, testId: "listings-mine-delete", "data-analytics": "none", "data-analytics-reason": "opens the delete confirmation", onClick: () => {
105
+ props.onAskRemove(props.listing.id);
106
+ }, children: t(LISTINGS_I18N_KEYS.mineDelete) })] })] })] }) }));
58
107
  }
59
108
  export function MyListingsPane(props) {
60
109
  const t = useT();
61
- const describe = useDescribeFlowError();
110
+ const tPlural = useTPlural();
62
111
  const bag = useMyListings(props.source !== undefined ? { source: props.source } : {});
63
- return (_jsx(ListingsSkinTheme, { ...(props.mode !== undefined ? { mode: props.mode } : {}), children: _jsxs(Flex, { vertical: true, gap: 16, "data-testid": "listings-mine", children: [_jsx(Typography.Title, { level: 3, children: t(LISTINGS_I18N_KEYS.mineTitle) }), !bag.gate.available ? (_jsx(Alert, { type: "info", showIcon: true, "data-testid": "listings-mine-blocked", message: t(bag.gate.block.code, bag.gate.block.params) })) : null, matchList(bag.blockedRows, {
64
- loading: () => null,
65
- failed: () => (_jsx(Typography.Text, { type: "secondary", "data-testid": "listings-mine-takedowns-failed", children: t(LISTINGS_I18N_KEYS.mineBlockedLoadFailed) })),
66
- empty: () => null,
67
- ready: (rows) => (_jsx(Alert, { type: "error", showIcon: true, "data-testid": "listings-mine-takedowns", message: t(LISTINGS_I18N_KEYS.mineBlockedTitle, {
68
- count: rows.length,
69
- }), description: _jsx(List, { dataSource: [...rows], rowKey: (row) => row.id, renderItem: (row) => (_jsx(MyListingRow, { listing: row, ...(props.onEdit !== undefined
70
- ? { onEdit: props.onEdit }
71
- : {}) })) }) })),
72
- }), _jsx(Tabs, { activeKey: bag.tab, "data-testid": "listings-mine-tabs", onChange: (key) => {
73
- bag.setTab(key);
74
- }, items: bag.tabs.map((tab) => ({
75
- key: tab,
76
- label: (_jsxs(Space, { size: 6, children: [t(TAB_LABEL[tab]), matchLoad(bag.counters, {
77
- loading: () => null,
78
- // A count we could not fetch is not zero. The badge is
79
- // simply absent and the failure is stated once, below.
80
- failed: () => null,
81
- ready: (counters) => (_jsx(Badge, { count: counters[tab], showZero: true, "data-testid": `listings-mine-count-${tab}` })),
82
- })] })),
83
- })) }), matchLoad(bag.counters, {
84
- loading: () => null,
85
- failed: () => (_jsx(Typography.Text, { type: "secondary", "data-testid": "listings-mine-counters-failed", children: t(LISTINGS_I18N_KEYS.mineCountersFailed) })),
86
- ready: () => null,
87
- }), matchList(bag.rows, {
88
- loading: () => (_jsx(Flex, { justify: "center", "data-testid": "listings-mine-loading", children: _jsx(Spin, { "aria-label": t(LISTINGS_I18N_KEYS.mineLoading) }) })),
89
- failed: () => (_jsx(ErrorAlert, { testId: "listings-mine-error", error: describe({
90
- code: LISTINGS_I18N_KEYS.mineLoadFailed,
91
- params: {},
92
- status: 0,
93
- message: undefined,
94
- language: undefined,
95
- }), action: _jsx(Button, { size: "small", "data-analytics": "none", "data-analytics-reason": "retrying a read the person already asked for; not a business action", onClick: bag.refetch, children: t(LISTINGS_I18N_KEYS.mineRetry) }) })),
96
- empty: () => (_jsx(Empty, { "data-testid": "listings-mine-empty", "data-empty-tab": bag.tab, description: t(TAB_EMPTY[bag.tab]) })),
97
- ready: (rows) => (_jsx(List, { dataSource: [...rows], rowKey: (row) => row.id, renderItem: (row) => (_jsx(MyListingRow, { listing: row, ...(props.onEdit !== undefined ? { onEdit: props.onEdit } : {}) })) })),
98
- }), _jsxs(Space, { children: [_jsx(Button, { size: "small", disabled: !bag.prevPage.available, "data-testid": "listings-mine-prev", "data-analytics": "none", "data-analytics-reason": "paging a list the person is already reading; not a business action", onClick: bag.goPrev, children: t(LISTINGS_I18N_KEYS.pagePrev) }), _jsx(Button, { size: "small", disabled: !bag.nextPage.available, "data-testid": "listings-mine-next", "data-analytics": "none", "data-analytics-reason": "paging a list the person is already reading; not a business action", onClick: bag.goNext, children: t(LISTINGS_I18N_KEYS.pageNext) })] })] }) }));
112
+ // ONE confirmation for the whole list, keyed by the row that asked not one
113
+ // mounted dialog per row.
114
+ const [removingId, setRemovingId] = useState(null);
115
+ const removal = useListingActions(removingId ?? 0, bag.rows.status === "ready"
116
+ ? bag.rows.data.find((row) => row.id === removingId)?.status
117
+ : undefined);
118
+ const paged = bag.prevPage.available || bag.nextPage.available;
119
+ const renderRow = (row) => (_jsx(MyListingRow, { listing: row, onEdit: props.onEdit, onAskRemove: setRemovingId }));
120
+ return (_jsx(SkinTheme, { surface: "base", style: { padding: spacing[4], maxWidth: MINE_MEASURE }, ...(props.mode !== undefined ? { mode: props.mode } : {}), children: _jsxs(Flex, { vertical: true, gap: spacing[4], "data-testid": "listings-mine", children: [_jsx(Typography.Title, { level: 3, children: t(LISTINGS_I18N_KEYS.mineTitle) }), !bag.gate.available ? (
121
+ // A refused pane is ONE state, not a banner above a live-looking
122
+ // dashboard: the tabs still advertised "Active 2 · Drafts 3" to a
123
+ // visitor who could not read a single row.
124
+ _jsx(EmptyState, { testId: "listings-mine-blocked", title: t(bag.gate.block.code, bag.gate.block.params), action: _jsx(SignInLink, { cta: props.signIn, testId: "listings-mine-sign-in" }) })) : (_jsxs(_Fragment, { children: [matchList(bag.blockedRows, {
125
+ loading: () => null,
126
+ failed: () => (_jsx(Typography.Text, { type: "secondary", "data-testid": "listings-mine-takedowns-failed", children: t(LISTINGS_I18N_KEYS.mineBlockedLoadFailed) })),
127
+ empty: () => null,
128
+ ready: (rows) => (_jsxs(Flex, { vertical: true, gap: spacing[2], "data-testid": "listings-mine-takedowns", children: [_jsx(Typography.Text, { type: "warning", strong: true, children: tPlural(LISTINGS_I18N_KEYS.mineBlockedTitle, {
129
+ count: rows.length,
130
+ }) }), _jsx(List, { dataSource: [...rows], rowKey: (row) => row.id, renderItem: renderRow })] })),
131
+ }), _jsx(Tabs, { activeKey: bag.tab, "data-testid": "listings-mine-tabs", onChange: (key) => {
132
+ bag.setTab(key);
133
+ }, items: bag.tabs.map((tab) => ({
134
+ key: tab,
135
+ label: (_jsxs(_Fragment, { children: [t(TAB_LABEL[tab]), matchLoad(bag.counters, {
136
+ loading: () => null,
137
+ // A count we could not fetch is not zero. The number is
138
+ // simply absent and the failure is stated once, below.
139
+ failed: () => null,
140
+ // A plain secondary number, not a red antd Badge: red is the
141
+ // danger token and "Active 2" is not a warning. It also
142
+ // keeps the tab short enough that three of them fit on a
143
+ // phone instead of collapsing into an overflow menu.
144
+ ready: (counters) => (_jsx(Typography.Text, { type: "secondary", "data-testid": `listings-mine-count-${tab}`, children: ` ${String(counters[tab])}` })),
145
+ })] })),
146
+ })) }), matchLoad(bag.counters, {
147
+ loading: () => null,
148
+ // One failure, one treatment: the rows' failure is an ErrorAlert, so
149
+ // the counters' is one too — inline, because it costs a number, not
150
+ // the screen.
151
+ failed: () => (_jsx(ErrorAlert, { variant: "inline", testId: "listings-mine-counters-failed", message: t(LISTINGS_I18N_KEYS.mineCountersFailed) })),
152
+ ready: () => null,
153
+ }), props.onEdit === undefined ? (_jsx(Typography.Text, { type: "secondary", "data-testid": "listings-mine-no-editor", children: t(LISTINGS_I18N_KEYS.blockedNoEditor) })) : null, matchList(bag.rows, {
154
+ loading: () => (_jsx("div", { role: "status", "aria-busy": "true", "aria-label": t(LISTINGS_I18N_KEYS.mineLoading), "data-testid": "listings-mine-loading", "data-stapel-load-state": "loading" })),
155
+ failed: (error) => (_jsx(ErrorAlert, { testId: "listings-mine-error", thrown: error, message: t(LISTINGS_I18N_KEYS.mineLoadFailed), onRetry: bag.refetch, retryLabel: t(LISTINGS_I18N_KEYS.mineRetry) })),
156
+ empty: () => (
157
+ // The tab is stamped on the wrapper, not only spoken in the copy:
158
+ // "no drafts" and "nothing sold yet" are different emptinesses and
159
+ // a test has to be able to tell which one is on screen.
160
+ _jsx("div", { "data-testid": "listings-mine-empty", "data-empty-tab": bag.tab, children: _jsx(EmptyState, { title: t(TAB_EMPTY[bag.tab]) }) })),
161
+ ready: (rows) => (_jsx(List, { dataSource: [...rows], rowKey: (row) => row.id, renderItem: renderRow })),
162
+ }), paged ? (_jsxs(Flex, { gap: spacing[2], wrap: true, children: [_jsx(GatedButton, { gate: bag.prevPage, size: "small", layout: "inline", testId: "listings-mine-prev", "data-analytics": "none", "data-analytics-reason": "paging a list the person is already reading; not a business action", onClick: bag.goPrev, children: t(LISTINGS_I18N_KEYS.pagePrev) }), _jsx(GatedButton, { gate: bag.nextPage, size: "small", layout: "inline", testId: "listings-mine-next", "data-analytics": "none", "data-analytics-reason": "paging a list the person is already reading; not a business action", onClick: bag.goNext, children: t(LISTINGS_I18N_KEYS.pageNext) })] })) : null] })), _jsx(SkinConfirm, { open: removingId !== null, danger: true, title: t(LISTINGS_I18N_KEYS.mineDeleteConfirmTitle), body: t(LISTINGS_I18N_KEYS.mineDeleteConfirmBody), confirmLabel: t(LISTINGS_I18N_KEYS.mineDelete), confirming: removal.inFlight, "data-testid": "listings-mine-delete-confirm", onConfirm: () => {
163
+ removal.doRemove();
164
+ setRemovingId(null);
165
+ }, onCancel: () => {
166
+ setRemovingId(null);
167
+ } })] }) }));
99
168
  }
100
169
  //# sourceMappingURL=MyListingsPane.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MyListingsPane.js","sourceRoot":"","sources":["../../src/default/MyListingsPane.tsx"],"names":[],"mappings":";AA4BA,OAAO,EACL,KAAK,EACL,KAAK,EACL,MAAM,EACN,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,UAAU,GACX,MAAM,MAAM,CAAC;AACd,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,oBAAoB,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAGhF,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,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IAAI,EAAE,GAAG,CAAC,QAAQ,EAClB,IAAI,EAAC,OAAO,EACZ,MAAM,EAAC,QAAQ,EACf,MAAM,EAAC,oBAAoB,oBACZ,MAAM,2BACC,oEAAoE,EAC1F,OAAO,EAAE,GAAG,CAAC,MAAM,YAElB,CAAC,CAAC,kBAAkB,CAAC,QAAQ,CAAC,GACnB,IACT,CACR,CAAC,CAAC,CAAC,IAAI,IAEH,CACJ,EAED,KAAC,WAAW,IACV,IAAI,EAAE,UAAU,KAAK,IAAI,EACzB,MAAM,QACN,KAAK,EAAE,CAAC,CAAC,kBAAkB,CAAC,sBAAsB,CAAC,EACnD,IAAI,EAAE,CAAC,CAAC,kBAAkB,CAAC,qBAAqB,CAAC,EACjD,YAAY,EAAE,CAAC,CAAC,kBAAkB,CAAC,UAAU,CAAC,EAC9C,UAAU,EAAE,OAAO,CAAC,QAAQ,iBAChB,8BAA8B,EAC1C,SAAS,EAAE,GAAG,EAAE;wBACd,OAAO,CAAC,QAAQ,EAAE,CAAC;wBACnB,aAAa,CAAC,IAAI,CAAC,CAAC;oBACtB,CAAC,EACD,QAAQ,EAAE,GAAG,EAAE;wBACb,aAAa,CAAC,IAAI,CAAC,CAAC;oBACtB,CAAC,GACD,IACG,GACG,CACb,CAAC;AACJ,CAAC"}
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { Typography } from "antd";
3
3
  import { useT } from "@stapel/core";
4
4
  import { LISTINGS_I18N_KEYS } from "../i18n/keys.js";
@@ -7,11 +7,12 @@ export function SignInLink(props) {
7
7
  const { cta } = props;
8
8
  if (cta === undefined)
9
9
  return null;
10
- // The separating space belongs HERE, not at the call site: a reason with no
11
- // door must render as exactly its own sentence, and a `{" "}` left behind by
12
- // an absent link is a trailing space in every caller's assertion.
13
- return (_jsxs(_Fragment, { children: [" ", _jsx(Typography.Link, { "data-testid": props.testId, "data-analytics": "none", "data-analytics-reason": "business action \u2014 host app wraps with its own tracked()", ...(cta.href !== undefined
14
- ? { href: cta.href }
15
- : { onClick: cta.onSignIn }), children: t(LISTINGS_I18N_KEYS.cardSignIn) })] }));
10
+ // No separating space: since the shared `<GatedControl>` prints the reason
11
+ // as its own paragraph, the door is a standalone element rather than the
12
+ // tail of a sentence, and a leading `{" "}` would be a stray space in every
13
+ // caller's assertion.
14
+ return (_jsx(_Fragment, { children: _jsx(Typography.Link, { "data-testid": props.testId, "data-analytics": "none", "data-analytics-reason": "business action \u2014 host app wraps with its own tracked()", ...(cta.href !== undefined
15
+ ? { href: cta.href }
16
+ : { onClick: cta.onSignIn }), children: t(LISTINGS_I18N_KEYS.cardSignIn) }) }));
16
17
  }
17
18
  //# sourceMappingURL=SignInLink.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SignInLink.js","sourceRoot":"","sources":["../../src/default/SignInLink.tsx"],"names":[],"mappings":";AAoBA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAQrD,MAAM,UAAU,UAAU,CAAC,KAAsB;IAC/C,MAAM,CAAC,GAAG,IAAI,EAAE,CAAC;IACjB,MAAM,EAAE,GAAG,EAAE,GAAG,KAAK,CAAC;IACtB,IAAI,GAAG,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC;IACnC,4EAA4E;IAC5E,6EAA6E;IAC7E,kEAAkE;IAClE,OAAO,CACL,8BACG,GAAG,EACJ,KAAC,UAAU,CAAC,IAAI,mBACD,KAAK,CAAC,MAAM,oBACV,MAAM,2BACC,8DAAyD,KAC3E,CAAC,GAAG,CAAC,IAAI,KAAK,SAAS;oBACzB,CAAC,CAAC,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE;oBACpB,CAAC,CAAC,EAAE,OAAO,EAAE,GAAG,CAAC,QAAQ,EAAE,CAAC,YAE7B,CAAC,CAAC,kBAAkB,CAAC,UAAU,CAAC,GACjB,IACjB,CACJ,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"SignInLink.js","sourceRoot":"","sources":["../../src/default/SignInLink.tsx"],"names":[],"mappings":";AAoBA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAQrD,MAAM,UAAU,UAAU,CAAC,KAAsB;IAC/C,MAAM,CAAC,GAAG,IAAI,EAAE,CAAC;IACjB,MAAM,EAAE,GAAG,EAAE,GAAG,KAAK,CAAC;IACtB,IAAI,GAAG,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC;IACnC,2EAA2E;IAC3E,yEAAyE;IACzE,4EAA4E;IAC5E,sBAAsB;IACtB,OAAO,CACL,4BACE,KAAC,UAAU,CAAC,IAAI,mBACD,KAAK,CAAC,MAAM,oBACV,MAAM,2BACC,8DAAyD,KAC3E,CAAC,GAAG,CAAC,IAAI,KAAK,SAAS;gBACzB,CAAC,CAAC,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE;gBACpB,CAAC,CAAC,EAAE,OAAO,EAAE,GAAG,CAAC,QAAQ,EAAE,CAAC,YAE7B,CAAC,CAAC,kBAAkB,CAAC,UAAU,CAAC,GACjB,GACjB,CACJ,CAAC;AACJ,CAAC"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * The two axes, drawn as two.
2
+ * The two axes, drawn as two — in ONE visual treatment.
3
3
  *
4
4
  * `<LifecycleTag>` is the state; `<ModerationNote>` is what the moderation
5
5
  * axis adds ON TOP of it, and it renders nothing when there is nothing to add
@@ -8,6 +8,16 @@
8
8
  * than one overwriting the other — the failure `model/status.ts` exists to
9
9
  * prevent, made visual.
10
10
  *
11
+ * ── Why the note is a line and not an Alert ────────────────────────────────
12
+ *
13
+ * It was an antd `Alert`, toned by the moderation status, and the visual pass
14
+ * measured the result: one concept drawn three ways down a single dashboard —
15
+ * a full-bleed olive bar for one row, a full-bleed grey bar for the next, bare
16
+ * red text for a third — and a phone screen where a 340px khaki box wrapped
17
+ * one sentence over six ragged lines. A status is a status: ONE tag carrying
18
+ * the tone, and the sentence beneath it as ordinary text. Loud is not the
19
+ * same as clear, and a row that shouts three different ways is neither.
20
+ *
11
21
  * A tone maps to an antd preset here and nowhere else. No hex leaves this
12
22
  * file, because none enters it: the presets resolve through the theme, which
13
23
  * resolves through `@stapel/tokens`.
@@ -18,14 +28,15 @@ export interface ListingStatusProps {
18
28
  readonly status: ListingStatusView;
19
29
  }
20
30
  /** The lifecycle state — the field that decides whether anyone else can see
21
- * this listing. */
31
+ * this listing. One tag, never full-bleed, never bare text. */
22
32
  export declare function LifecycleTag(props: ListingStatusProps): ReactElement;
23
33
  /**
24
- * What the moderation axis adds. Renders `null` when it adds nothing, so a
25
- * calm listing shows no banner at all.
34
+ * What the moderation axis adds, as one sentence. Renders `null` when it adds
35
+ * nothing, so a calm listing shows no note at all.
26
36
  */
27
37
  export declare function ModerationNote(props: ListingStatusProps): ReactElement | null;
28
38
  /** Both, in the order a person reads them: what it IS, then what is happening
29
- * to it. */
39
+ * to it. A column so the sentence can never be squeezed beside the tag on a
40
+ * 390px row — the shape that split "Draf/t" across two lines. */
30
41
  export declare function ListingStatusBlock(props: ListingStatusProps): ReactElement;
31
42
  //# sourceMappingURL=StatusTags.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"StatusTags.d.ts","sourceRoot":"","sources":["../../src/default/StatusTags.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAG1C,OAAO,KAAK,EAAqB,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAoB/E,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAC;CACpC;AAED;mBACmB;AACnB,wBAAgB,YAAY,CAAC,KAAK,EAAE,kBAAkB,GAAG,YAAY,CAWpE;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,kBAAkB,GAAG,YAAY,GAAG,IAAI,CAc7E;AAED;YACY;AACZ,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,kBAAkB,GAAG,YAAY,CAO1E"}
1
+ {"version":3,"file":"StatusTags.d.ts","sourceRoot":"","sources":["../../src/default/StatusTags.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAI1C,OAAO,KAAK,EAAqB,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAuB/E,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAC;CACpC;AAED;+DAC+D;AAC/D,wBAAgB,YAAY,CAAC,KAAK,EAAE,kBAAkB,GAAG,YAAY,CAYpE;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,kBAAkB,GAAG,YAAY,GAAG,IAAI,CAgB7E;AAED;;iEAEiE;AACjE,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,kBAAkB,GAAG,YAAY,CAO1E"}
@@ -1,6 +1,7 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Alert, Tag } from "antd";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Flex, Tag, Typography, theme as antdTheme } from "antd";
3
3
  import { useT } from "@stapel/core";
4
+ import { spacing } from "@stapel/tokens";
4
5
  const TONE_COLOR = {
5
6
  neutral: "default",
6
7
  waiting: "processing",
@@ -8,33 +9,38 @@ const TONE_COLOR = {
8
9
  warning: "warning",
9
10
  stopped: "error",
10
11
  };
11
- const TONE_ALERT = {
12
- neutral: "info",
13
- waiting: "info",
12
+ /** How urgent the sentence beneath the tag reads. `warning` is the only tone
13
+ * that asks the owner to DO something, so it is the only one that gets antd's
14
+ * danger colour; the rest are secondary text. */
15
+ const TONE_TEXT = {
16
+ neutral: "secondary",
17
+ waiting: "secondary",
14
18
  good: "success",
15
19
  warning: "warning",
16
- stopped: "error",
20
+ stopped: "warning",
17
21
  };
18
22
  /** The lifecycle state — the field that decides whether anyone else can see
19
- * this listing. */
23
+ * this listing. One tag, never full-bleed, never bare text. */
20
24
  export function LifecycleTag(props) {
21
25
  const t = useT();
22
- return (_jsx(Tag, { color: TONE_COLOR[props.status.lifecycle.tone], "data-testid": "listings-status-tag", "data-listing-status": props.status.lifecycle.status, children: t(props.status.lifecycle.labelKey) }));
26
+ return (_jsx(Tag, { color: TONE_COLOR[props.status.lifecycle.tone], "data-testid": "listings-status-tag", "data-listing-status": props.status.lifecycle.status, style: { marginInlineEnd: 0 }, children: t(props.status.lifecycle.labelKey) }));
23
27
  }
24
28
  /**
25
- * What the moderation axis adds. Renders `null` when it adds nothing, so a
26
- * calm listing shows no banner at all.
29
+ * What the moderation axis adds, as one sentence. Renders `null` when it adds
30
+ * nothing, so a calm listing shows no note at all.
27
31
  */
28
32
  export function ModerationNote(props) {
29
33
  const t = useT();
34
+ const { token } = antdTheme.useToken();
30
35
  const notice = props.status.moderation;
31
36
  if (notice === undefined)
32
37
  return null;
33
- return (_jsx(Alert, { type: TONE_ALERT[notice.tone], showIcon: true, "data-testid": "listings-moderation-note", "data-listing-moderation": notice.moderationStatus, "data-listing-live-under-review": String(notice.liveDuringReview), message: t(notice.messageKey) }));
38
+ return (_jsx(Typography.Text, { type: TONE_TEXT[notice.tone], "data-testid": "listings-moderation-note", "data-listing-moderation": notice.moderationStatus, "data-listing-live-under-review": String(notice.liveDuringReview), style: { fontSize: token.fontSizeSM }, children: t(notice.messageKey) }));
34
39
  }
35
40
  /** Both, in the order a person reads them: what it IS, then what is happening
36
- * to it. */
41
+ * to it. A column so the sentence can never be squeezed beside the tag on a
42
+ * 390px row — the shape that split "Draf/t" across two lines. */
37
43
  export function ListingStatusBlock(props) {
38
- return (_jsxs(_Fragment, { children: [_jsx(LifecycleTag, { status: props.status }), _jsx(ModerationNote, { status: props.status })] }));
44
+ return (_jsxs(Flex, { vertical: true, align: "flex-start", gap: spacing[1], style: { minWidth: 0 }, children: [_jsx(LifecycleTag, { status: props.status }), _jsx(ModerationNote, { status: props.status })] }));
39
45
  }
40
46
  //# sourceMappingURL=StatusTags.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"StatusTags.js","sourceRoot":"","sources":["../../src/default/StatusTags.tsx"],"names":[],"mappings":";AAeA,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAGpC,MAAM,UAAU,GAAgD;IAC9D,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,YAAY;IACrB,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,OAAO;CACjB,CAAC;AAEF,MAAM,UAAU,GAEZ;IACF,OAAO,EAAE,MAAM;IACf,OAAO,EAAE,MAAM;IACf,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,OAAO;CACjB,CAAC;AAMF;mBACmB;AACnB,MAAM,UAAU,YAAY,CAAC,KAAyB;IACpD,MAAM,CAAC,GAAG,IAAI,EAAE,CAAC;IACjB,OAAO,CACL,KAAC,GAAG,IACF,KAAK,EAAE,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,iBAClC,qBAAqB,yBACZ,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,YAEjD,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,GAC/B,CACP,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,U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Q,EAAE,CAAC,EAAE,aACvE,KAAC,YAAY,IAAC,MAAM,EAAE,KAAK,CAAC,MAAM,GAAI,EACtC,KAAC,cAAc,IAAC,MAAM,EAAE,KAAK,CAAC,MAAM,GAAI,IACnC,CACR,CAAC;AACJ,CAAC"}
@@ -13,25 +13,31 @@
13
13
  * // the search pair's card slot — the container is the seam, not an import
14
14
  * <SearchPage renderCard={(item) => <ListingCard listing={item.card} href={`/l/${item.id}`} />} />
15
15
  * ```
16
+ *
17
+ * ── What this barrel no longer exports, and where it went ──────────────────
18
+ *
19
+ * `ListingsSkinTheme` and `ErrorAlert` were this pair's copies of two
20
+ * components nine pairs each carried a copy of. They live in
21
+ * `@stapel/tokens-antd/skin` now, as `SkinTheme` and `ErrorAlert`: one place
22
+ * for the reactive-theme fix, one place for the message/detail split. A host
23
+ * that wrapped its own composition in `<ListingsSkinTheme>` imports
24
+ * `<SkinTheme>` from the substrate instead — same props, plus a `surface`.
16
25
  */
17
26
  export { ListingCard } from "./ListingCard.js";
18
- export type { ListingCardProps, ListingCardBaseProps, ListingCardOpenProps, } from "./ListingCard.js";
19
- export { ListingDetailPane } from "./ListingDetailPane.js";
27
+ export type { ListingCardProps, ListingCardBaseProps, ListingCardOpenProps, ListingCardBlockedReason, } from "./ListingCard.js";
28
+ export { ListingDetailPane, DETAIL_MEASURE, DETAIL_PHOTO_MIN } from "./ListingDetailPane.js";
20
29
  export type { ListingDetailPaneProps } from "./ListingDetailPane.js";
21
- export { ListingComposerPage } from "./ListingComposerPage.js";
22
- export type { ListingComposerPageProps, ComposerCategorySlot, } from "./ListingComposerPage.js";
30
+ export { ListingComposerPage, COMPOSER_MEASURE } from "./ListingComposerPage.js";
31
+ export type { ListingComposerPageProps, ComposerCategorySlot, ComposerCurrencySlot, ComposerLocationSlot, ComposerLocationValue, ComposerLocationPickerProps, } from "./ListingComposerPage.js";
23
32
  export { MyListingsPane } from "./MyListingsPane.js";
24
33
  export type { MyListingsPaneProps } from "./MyListingsPane.js";
25
- export { FavoritesPane } from "./FavoritesPane.js";
34
+ export { FavoritesPane, FAVORITES_CARD_MIN } from "./FavoritesPane.js";
26
35
  export type { FavoritesPaneProps, FavoritesPaneOpenProps, } from "./FavoritesPane.js";
27
36
  export { LifecycleTag, ListingStatusBlock, ModerationNote } from "./StatusTags.js";
28
37
  export type { ListingStatusProps } from "./StatusTags.js";
29
- export { ListingPhoto } from "./ListingPhoto.js";
38
+ export { ListingPhoto, LISTING_PHOTO_ASPECT } from "./ListingPhoto.js";
30
39
  export type { ListingPhotoProps } from "./ListingPhoto.js";
31
- export { ErrorAlert } from "./ErrorAlert.js";
32
40
  export { SignInLink } from "./SignInLink.js";
33
41
  export type { SignInLinkProps } from "./SignInLink.js";
34
- export { ListingsSkinTheme } from "./theme.js";
35
- export type { ListingsSkinThemeProps } from "./theme.js";
36
42
  export type { ThemeModeProp } from "./types.js";
37
43
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/default/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,YAAY,EACV,gBAAgB,EAChB,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,YAAY,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,YAAY,EACV,wBAAwB,EACxB,oBAAoB,GACrB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,YAAY,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,YAAY,EACV,kBAAkB,EAClB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BAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACvE,YAAY,EACV,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACnF,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACvE,YAAY,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,YAAY,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC"}
@@ -13,15 +13,22 @@
13
13
  * // the search pair's card slot — the container is the seam, not an import
14
14
  * <SearchPage renderCard={(item) => <ListingCard listing={item.card} href={`/l/${item.id}`} />} />
15
15
  * ```
16
+ *
17
+ * ── What this barrel no longer exports, and where it went ──────────────────
18
+ *
19
+ * `ListingsSkinTheme` and `ErrorAlert` were this pair's copies of two
20
+ * components nine pairs each carried a copy of. They live in
21
+ * `@stapel/tokens-antd/skin` now, as `SkinTheme` and `ErrorAlert`: one place
22
+ * for the reactive-theme fix, one place for the message/detail split. A host
23
+ * that wrapped its own composition in `<ListingsSkinTheme>` imports
24
+ * `<SkinTheme>` from the substrate instead — same props, plus a `surface`.
16
25
  */
17
26
  export { ListingCard } from "./ListingCard.js";
18
- export { ListingDetailPane } from "./ListingDetailPane.js";
19
- export { ListingComposerPage } from "./ListingComposerPage.js";
27
+ export { ListingDetailPane, DETAIL_MEASURE, DETAIL_PHOTO_MIN } from "./ListingDetailPane.js";
28
+ export { ListingComposerPage, COMPOSER_MEASURE } from "./ListingComposerPage.js";
20
29
  export { MyListingsPane } from "./MyListingsPane.js";
21
- export { FavoritesPane } from "./FavoritesPane.js";
30
+ export { FavoritesPane, FAVORITES_CARD_MIN } from "./FavoritesPane.js";
22
31
  export { LifecycleTag, ListingStatusBlock, ModerationNote } from "./StatusTags.js";
23
- export { ListingPhoto } from "./ListingPhoto.js";
24
- export { ErrorAlert } from "./ErrorAlert.js";
32
+ export { ListingPhoto, LISTING_PHOTO_ASPECT } from "./ListingPhoto.js";
25
33
  export { SignInLink } from "./SignInLink.js";
26
- export { ListingsSkinTheme } from "./theme.js";
27
34
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/default/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAM/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAK/D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAMnD,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEnF,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/default/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAO/C,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE7F,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AASjF,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAMvE,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEnF,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAEvE,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC"}
@@ -32,6 +32,12 @@ export declare function useFavoriteToggle(id: number, favorited: boolean | null
32
32
  export interface FavoritesBag {
33
33
  readonly rows: LoadState<readonly ListingCard[]>;
34
34
  readonly page: ListingPageParams;
35
+ /**
36
+ * Which page is on screen, 1-based. Keyset paging has no offset to read a
37
+ * number off, so it is counted: a pager with no indicator leaves a person
38
+ * unable to tell a second page from a reloaded first one.
39
+ */
40
+ readonly pageNumber: number;
35
41
  readonly nextPage: ActionAvailability;
36
42
  readonly prevPage: ActionAvailability;
37
43
  goNext(): void;
@@ -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;AAMtE;;;;;;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,CAA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