@stapel/search-react 0.3.1 → 0.7.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 (153) hide show
  1. package/CHANGELOG.md +180 -0
  2. package/MODULE.md +43 -4
  3. package/README.md +1 -1
  4. package/dist/api/generated/schema.d.ts +5 -1
  5. package/dist/api/generated/schema.d.ts.map +1 -1
  6. package/dist/default/DegradationNotice.d.ts +34 -0
  7. package/dist/default/DegradationNotice.d.ts.map +1 -1
  8. package/dist/default/DegradationNotice.js +28 -6
  9. package/dist/default/DegradationNotice.js.map +1 -1
  10. package/dist/default/FacetPanelPane.d.ts +54 -3
  11. package/dist/default/FacetPanelPane.d.ts.map +1 -1
  12. package/dist/default/FacetPanelPane.js +119 -19
  13. package/dist/default/FacetPanelPane.js.map +1 -1
  14. package/dist/default/LanguageSelect.d.ts +9 -0
  15. package/dist/default/LanguageSelect.d.ts.map +1 -0
  16. package/dist/default/LanguageSelect.js +72 -0
  17. package/dist/default/LanguageSelect.js.map +1 -0
  18. package/dist/default/PageSizeSelect.d.ts +29 -0
  19. package/dist/default/PageSizeSelect.d.ts.map +1 -0
  20. package/dist/default/PageSizeSelect.js +25 -0
  21. package/dist/default/PageSizeSelect.js.map +1 -0
  22. package/dist/default/RangeFilterRow.d.ts +12 -0
  23. package/dist/default/RangeFilterRow.d.ts.map +1 -0
  24. package/dist/default/RangeFilterRow.js +75 -0
  25. package/dist/default/RangeFilterRow.js.map +1 -0
  26. package/dist/default/RankingDisclosurePane.d.ts +5 -0
  27. package/dist/default/RankingDisclosurePane.d.ts.map +1 -1
  28. package/dist/default/RankingDisclosurePane.js +15 -15
  29. package/dist/default/RankingDisclosurePane.js.map +1 -1
  30. package/dist/default/SearchBox.d.ts +13 -0
  31. package/dist/default/SearchBox.d.ts.map +1 -0
  32. package/dist/default/SearchBox.js +67 -0
  33. package/dist/default/SearchBox.js.map +1 -0
  34. package/dist/default/SearchPage.d.ts +58 -16
  35. package/dist/default/SearchPage.d.ts.map +1 -1
  36. package/dist/default/SearchPage.js +155 -6
  37. package/dist/default/SearchPage.js.map +1 -1
  38. package/dist/default/SearchResultCard.d.ts +19 -18
  39. package/dist/default/SearchResultCard.d.ts.map +1 -1
  40. package/dist/default/SearchResultCard.js +178 -5
  41. package/dist/default/SearchResultCard.js.map +1 -1
  42. package/dist/default/SearchResultsPane.d.ts +54 -3
  43. package/dist/default/SearchResultsPane.d.ts.map +1 -1
  44. package/dist/default/SearchResultsPane.js +45 -25
  45. package/dist/default/SearchResultsPane.js.map +1 -1
  46. package/dist/default/SortSelect.d.ts +10 -2
  47. package/dist/default/SortSelect.d.ts.map +1 -1
  48. package/dist/default/SortSelect.js +27 -24
  49. package/dist/default/SortSelect.js.map +1 -1
  50. package/dist/default/UrlIssueNotice.d.ts.map +1 -1
  51. package/dist/default/UrlIssueNotice.js +19 -1
  52. package/dist/default/UrlIssueNotice.js.map +1 -1
  53. package/dist/default/index.d.ts +33 -16
  54. package/dist/default/index.d.ts.map +1 -1
  55. package/dist/default/index.js +26 -12
  56. package/dist/default/index.js.map +1 -1
  57. package/dist/default/sortLabels.d.ts +5 -0
  58. package/dist/default/sortLabels.d.ts.map +1 -0
  59. package/dist/default/sortLabels.js +32 -0
  60. package/dist/default/sortLabels.js.map +1 -0
  61. package/dist/headless/FacetPanel.d.ts +17 -0
  62. package/dist/headless/FacetPanel.d.ts.map +1 -1
  63. package/dist/headless/FacetPanel.js +23 -2
  64. package/dist/headless/FacetPanel.js.map +1 -1
  65. package/dist/headless/SearchResults.d.ts +20 -3
  66. package/dist/headless/SearchResults.d.ts.map +1 -1
  67. package/dist/headless/SearchResults.js +3 -1
  68. package/dist/headless/SearchResults.js.map +1 -1
  69. package/dist/headless/useAppliedCount.d.ts +8 -0
  70. package/dist/headless/useAppliedCount.d.ts.map +1 -0
  71. package/dist/headless/useAppliedCount.js +30 -0
  72. package/dist/headless/useAppliedCount.js.map +1 -0
  73. package/dist/headless/useScorerNames.d.ts +4 -0
  74. package/dist/headless/useScorerNames.d.ts.map +1 -0
  75. package/dist/headless/useScorerNames.js +34 -0
  76. package/dist/headless/useScorerNames.js.map +1 -0
  77. package/dist/headless/useSearchBox.d.ts +44 -0
  78. package/dist/headless/useSearchBox.d.ts.map +1 -0
  79. package/dist/headless/useSearchBox.js +116 -0
  80. package/dist/headless/useSearchBox.js.map +1 -0
  81. package/dist/i18n/es.d.ts.map +1 -1
  82. package/dist/i18n/es.js +32 -4
  83. package/dist/i18n/es.js.map +1 -1
  84. package/dist/i18n/keys.d.ts +46 -2
  85. package/dist/i18n/keys.d.ts.map +1 -1
  86. package/dist/i18n/keys.js +86 -6
  87. package/dist/i18n/keys.js.map +1 -1
  88. package/dist/i18n/ru.d.ts.map +1 -1
  89. package/dist/i18n/ru.js +38 -4
  90. package/dist/i18n/ru.js.map +1 -1
  91. package/dist/index.d.ts +9 -3
  92. package/dist/index.d.ts.map +1 -1
  93. package/dist/index.js +6 -3
  94. package/dist/index.js.map +1 -1
  95. package/dist/model/queries.d.ts +26 -2
  96. package/dist/model/queries.d.ts.map +1 -1
  97. package/dist/model/queries.js +38 -1
  98. package/dist/model/queries.js.map +1 -1
  99. package/dist/state/degradations.d.ts +41 -0
  100. package/dist/state/degradations.d.ts.map +1 -1
  101. package/dist/state/degradations.js +41 -0
  102. package/dist/state/degradations.js.map +1 -1
  103. package/dist/state/limits.d.ts +44 -0
  104. package/dist/state/limits.d.ts.map +1 -0
  105. package/dist/state/limits.js +44 -0
  106. package/dist/state/limits.js.map +1 -0
  107. package/dist/state/ranges.d.ts +52 -0
  108. package/dist/state/ranges.d.ts.map +1 -0
  109. package/dist/state/ranges.js +108 -0
  110. package/dist/state/ranges.js.map +1 -0
  111. package/llms.txt +16 -5
  112. package/manifest.json +245 -22
  113. package/nav-manifest.json +1 -1
  114. package/package.json +15 -10
  115. package/src/analytics/generated/events.json +1 -1
  116. package/src/api/generated/schema.ts +5 -1
  117. package/src/default/DegradationNotice.tsx +84 -14
  118. package/src/default/FacetPanelPane.tsx +343 -64
  119. package/src/default/LanguageSelect.tsx +93 -0
  120. package/src/default/PageSizeSelect.tsx +80 -0
  121. package/src/default/RangeFilterRow.tsx +148 -0
  122. package/src/default/RankingDisclosurePane.tsx +67 -35
  123. package/src/default/SearchBox.tsx +130 -0
  124. package/src/default/SearchPage.tsx +356 -41
  125. package/src/default/SearchResultCard.tsx +231 -24
  126. package/src/default/SearchResultsPane.tsx +147 -76
  127. package/src/default/SortSelect.tsx +50 -37
  128. package/src/default/UrlIssueNotice.tsx +21 -3
  129. package/src/default/index.ts +42 -16
  130. package/src/default/sortLabels.ts +34 -0
  131. package/src/headless/FacetPanel.tsx +30 -2
  132. package/src/headless/SearchResults.tsx +32 -4
  133. package/src/headless/useAppliedCount.ts +41 -0
  134. package/src/headless/useScorerNames.ts +36 -0
  135. package/src/headless/useSearchBox.ts +189 -0
  136. package/src/i18n/es.ts +39 -4
  137. package/src/i18n/keys.ts +97 -6
  138. package/src/i18n/ru.ts +45 -4
  139. package/src/index.ts +30 -3
  140. package/src/model/queries.ts +51 -1
  141. package/src/state/degradations.ts +60 -0
  142. package/src/state/limits.ts +50 -0
  143. package/src/state/ranges.ts +144 -0
  144. package/dist/default/ErrorAlert.d.ts +0 -9
  145. package/dist/default/ErrorAlert.d.ts.map +0 -1
  146. package/dist/default/ErrorAlert.js +0 -27
  147. package/dist/default/ErrorAlert.js.map +0 -1
  148. package/dist/default/theme.d.ts +0 -24
  149. package/dist/default/theme.d.ts.map +0 -1
  150. package/dist/default/theme.js +0 -39
  151. package/dist/default/theme.js.map +0 -1
  152. package/src/default/ErrorAlert.tsx +0 -46
  153. package/src/default/theme.tsx +0 -66
@@ -1 +1 @@
1
- {"version":3,"file":"SearchResultCard.js","sourceRoot":"","sources":["../../src/default/SearchResultCard.tsx"],"names":[],"mappings":";AAmBA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,C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AAgB,CAAC,eAAe,CAAC,GAC/B,EAKP,KAAC,UAAU,CAAC,IAAI,IACd,IAAI,EAAC,WAAW,EAChB,KAAK,EAAE,EAAE,QAAQ,EAAE,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,iBAC7B,6BAA6B,YAExC,CAAC,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,GACxB,IACb,CACR,IACI,GACF,CACR,CAAC;AACJ,CAAC"}
@@ -2,9 +2,9 @@
2
2
  * `<SearchResultsPane>` — the antd result page: the count, the degradation
3
3
  * banner, the cards, and the keyset controls.
4
4
  *
5
- * Rendered through core's `matchList`, whose FOUR required arms are the point.
6
- * "Nothing matches this search" is reachable only from a search that actually
7
- * ran; a 5xx renders "we could not run this search" plus a retry. The
5
+ * Rendered through the shared substrate's `LoadList`, whose FOUR arms are the
6
+ * point. "Nothing matches this search" is reachable only from a search that
7
+ * actually ran; a 5xx renders "we could not run this search" plus a retry. The
8
8
  * substitution of one for the other is what cost the 2026-08-09 incident, and
9
9
  * the spec's §7.4 negative leg exercises this exact pane against a forced 5xx.
10
10
  *
@@ -12,9 +12,21 @@
12
12
  * is "narrow the search", not "there is nothing here" — it arrives as a 400
13
13
  * with an empty body, which is precisely how it would otherwise render as an
14
14
  * empty page.
15
+ *
16
+ * ── Two things the pager used to get wrong ────────────────────────────────
17
+ *
18
+ * 1. **Its reasons were in `title=`.** A disabled antd Button receives no
19
+ * pointer events, so the browser tooltip never fires — on any device — and
20
+ * a phone has no hover to begin with. Both buttons are `GatedButton` now:
21
+ * the block's reason is ordinary text beside the control and the button's
22
+ * `aria-describedby` points at it.
23
+ * 2. **It rendered when there was nothing to page.** Two dead buttons under an
24
+ * empty state is the fleet's C-DEADPAGER defect; the pager now appears only
25
+ * when the answer actually has another page in some direction.
15
26
  */
16
27
  import type { ReactElement, ReactNode } from "react";
17
28
  import type { SearchItem } from "../api/types.js";
29
+ import type { DegradationNoticeVariant } from "./DegradationNotice.js";
18
30
  import type { SearchCardRenderer } from "./SearchResultCard.js";
19
31
  import type { ThemeModeProp } from "./types.js";
20
32
  /**
@@ -25,6 +37,16 @@ import type { ThemeModeProp } from "./types.js";
25
37
  * problem.
26
38
  */
27
39
  export type SearchResultsRenderer = (items: readonly SearchItem[]) => ReactNode;
40
+ /**
41
+ * The widest a column of results is allowed to get.
42
+ *
43
+ * Off the spacing scale and named for it: it is a MEASURE, the reading-width
44
+ * decision every long page has to take. Without it the pane spread the full
45
+ * width of whatever it was dropped into — the visual pass measured a 2560px
46
+ * pane with four cards floating at the top of it and a status row 1350px from
47
+ * the buttons that act on it (class C-NOMAXW).
48
+ */
49
+ export declare const RESULTS_MAX_WIDTH = 1120;
28
50
  export interface SearchResultsPaneProps extends ThemeModeProp {
29
51
  /**
30
52
  * The card slot (spec §6.2 item 1). A storefront passes
@@ -44,9 +66,38 @@ export interface SearchResultsPaneProps extends ThemeModeProp {
44
66
  * toolbar in here instead of printing a second caption above the pane.
45
67
  */
46
68
  readonly toolbar?: ReactNode;
69
+ /**
70
+ * What this list is CALLED on this surface. Default: "Results".
71
+ *
72
+ * The pane owning the heading row is what stops a screen printing two
73
+ * captions — but "Results" is only the right word when the person performed
74
+ * a search. A landing's newest-first strip is "Fresh listings"; a seller's
75
+ * page is "This seller's listings"; a category page's is the category. Every
76
+ * one of those surfaces had written its own `<Title>` above the pane and got
77
+ * the pane's "Results" underneath it a moment later — two headings, one
78
+ * list, on the three busiest screens of the storefront.
79
+ *
80
+ * So the name comes IN, to the row that already exists, instead of being
81
+ * printed a second time above it. Still exactly one heading either way.
82
+ */
83
+ readonly heading?: ReactNode;
47
84
  /** Rendered under the pager — where the container puts the ranking link. */
48
85
  readonly footer?: ReactNode;
86
+ /**
87
+ * How this surface says what the engine could not do (default `"banner"`).
88
+ *
89
+ * A catalogue page wants the warning box. A landing page showing six cards
90
+ * under a hero has no room for one and passes `"inline"` or `"off"` — a
91
+ * decision about THIS surface, not about whether the degradation matters.
92
+ * Note that an `exact_total`-only degradation never raises a banner under
93
+ * any variant: it is a count nuance the count itself already speaks as
94
+ * "N+", not a failed search.
95
+ */
96
+ readonly degradationNotice?: DegradationNoticeVariant;
49
97
  readonly enabled?: boolean;
98
+ /** Widest the column of results may grow (default {@link RESULTS_MAX_WIDTH});
99
+ * `null` lets the container decide. */
100
+ readonly maxWidth?: number | null;
50
101
  }
51
102
  export declare function SearchResultsPane(props: SearchResultsPaneProps): ReactElement;
52
103
  //# sourceMappingURL=SearchResultsPane.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SearchResultsPane.d.ts","sourceRoot":"","sources":["../../src/default/SearchResultsPane.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,EAAiB,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAUpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAQlD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD;;;;;;GAMG;AACH,MAAM,MAAM,qBAAqB,GAAG,CAClC,KAAK,EAAE,SAAS,UAAU,EAAE,KACzB,SAAS,CAAC;AAiBf,MAAM,WAAW,sBAAuB,SAAQ,aAAa;IAC3D;;;;;OAKG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,kBAAkB,CAAC;IACzC;;;OAGG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,qBAAqB,CAAC;IAC/C;;;;OAIG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC;IAC7B,4EAA4E;IAC5E,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC;IAC5B,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;CAC5B;AAiDD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,GAAG,YAAY,CA0F7E"}
1
+ {"version":3,"file":"SearchResultsPane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,13 +1,24 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Button, Empty, Flex, Spin, Typography } from "antd";
3
- import { errorCode, matchList, toFlowError, useDescribeFlowError, useT, useTPlural, } from "@stapel/core";
2
+ import { Flex, Typography } from "antd";
3
+ import { errorCode, useT, useTPlural } from "@stapel/core";
4
+ import { EmptyState, ErrorAlert, GatedButton, LoadList, SkinTheme, } from "@stapel/tokens-antd/skin";
5
+ import { spacing } from "@stapel/tokens";
4
6
  import { SearchResults } from "../headless/SearchResults.js";
7
+ import { useScorerNames } from "../headless/useScorerNames.js";
5
8
  import { SEARCH_WINDOW_EXCEEDED } from "../i18n/errorsMap.js";
6
9
  import { SEARCH_I18N_KEYS } from "../i18n/keys.js";
7
10
  import { DegradationNotice } from "./DegradationNotice.js";
8
- import { ErrorAlert } from "./ErrorAlert.js";
9
11
  import { SearchResultCard } from "./SearchResultCard.js";
10
- import { SearchSkinTheme } from "./theme.js";
12
+ /**
13
+ * The widest a column of results is allowed to get.
14
+ *
15
+ * Off the spacing scale and named for it: it is a MEASURE, the reading-width
16
+ * decision every long page has to take. Without it the pane spread the full
17
+ * width of whatever it was dropped into — the visual pass measured a 2560px
18
+ * pane with four cards floating at the top of it and a status row 1350px from
19
+ * the buttons that act on it (class C-NOMAXW).
20
+ */
21
+ export const RESULTS_MAX_WIDTH = 1120;
11
22
  /**
12
23
  * The results grid. `auto-fill` + `minmax(280px, 1fr)`: as many columns as fit,
13
24
  * each at least a readable card and never wider than its share — a catalogue
@@ -19,7 +30,7 @@ import { SearchSkinTheme } from "./theme.js";
19
30
  const RESULTS_GRID = {
20
31
  display: "grid",
21
32
  gridTemplateColumns: "repeat(auto-fill, minmax(280px, 1fr))",
22
- gap: 12,
33
+ gap: spacing[3],
23
34
  alignItems: "stretch",
24
35
  };
25
36
  function Count(props) {
@@ -30,36 +41,45 @@ function Count(props) {
30
41
  const page = props.bag.page;
31
42
  if (page === null)
32
43
  return null;
33
- return (_jsx(Typography.Text, { type: "secondary", "data-testid": "search-count", children: page.countIsEstimate
34
- ? tPlural(SEARCH_I18N_KEYS.resultsCountApproximate, {
35
- count: page.count,
36
- })
44
+ // No count line at all when the server cannot say. The alternative — some
45
+ // number — is how "About 0 listings" ended up printed over four visible
46
+ // cards: an unknown total rendered as a claim about the catalogue.
47
+ if (page.countKind === "unknown" || page.count === null)
48
+ return null;
49
+ return (_jsx(Typography.Text, { type: "secondary", "data-testid": "search-count", "data-count-kind": page.countKind, children: page.countKind === "at_least"
50
+ ? tPlural(SEARCH_I18N_KEYS.resultsCountAtLeast, { count: page.count })
37
51
  : tPlural(SEARCH_I18N_KEYS.resultsCountExact, { count: page.count }) }));
38
52
  }
53
+ /**
54
+ * The keyset controls — rendered only when there IS another page.
55
+ *
56
+ * Keyset paging has no page numbers to jump to: there is a next, a previous,
57
+ * and a server-side depth cap. When neither direction exists the pager is not
58
+ * "disabled", it is absent — a control that can never do anything is not a
59
+ * control that needs explaining.
60
+ */
39
61
  function Pager(props) {
40
62
  const t = useT();
41
- const { prev, next, goPrev, goNext } = props.bag;
42
- return (_jsxs(Flex, { gap: 8, justify: "center", "data-testid": "search-pager", children: [_jsx(Button, { disabled: !prev.available, title: prev.available ? undefined : t(prev.block.code, prev.block.params), onClick: goPrev, "data-analytics": "none", "data-analytics-reason": "keyset paging is a read, not a flow step", "data-testid": "search-prev", children: t(SEARCH_I18N_KEYS.resultsPrev) }), _jsx(Button, { disabled: !next.available, title: next.available ? undefined : t(next.block.code, next.block.params), onClick: goNext, "data-analytics": "none", "data-analytics-reason": "keyset paging is a read, not a flow step", "data-testid": "search-next", children: t(SEARCH_I18N_KEYS.resultsNext) })] }));
63
+ const { page, prev, next, goPrev, goNext } = props.bag;
64
+ if (page === null || (!page.hasNext && !page.hasPrev))
65
+ return null;
66
+ return (_jsxs(Flex, { gap: spacing[2], justify: "center", wrap: true, "data-testid": "search-pager", children: [_jsx(GatedButton, { gate: prev, onClick: goPrev, testId: "search-prev", "data-analytics": "none", "data-analytics-reason": "keyset paging is a read, not a flow step", children: t(SEARCH_I18N_KEYS.resultsPrev) }), _jsx(GatedButton, { gate: next, onClick: goNext, testId: "search-next", "data-analytics": "none", "data-analytics-reason": "keyset paging is a read, not a flow step", children: t(SEARCH_I18N_KEYS.resultsNext) })] }));
43
67
  }
44
68
  export function SearchResultsPane(props) {
45
69
  const t = useT();
46
- const describe = useDescribeFlowError();
47
70
  const { renderCard, renderResults } = props;
48
- return (_jsx(SearchSkinTheme, { ...(props.mode !== undefined ? { mode: props.mode } : {}), children: _jsx(SearchResults, { ...(props.enabled !== undefined ? { enabled: props.enabled } : {}), children: (bag) => (_jsxs(Flex, { vertical: true, gap: 16, children: [_jsxs(Flex, { justify: "space-between", align: "center", wrap: true, gap: 8, children: [_jsx(Typography.Title, { level: 4, style: { margin: 0 }, children: t(SEARCH_I18N_KEYS.resultsTitle) }), _jsxs(Flex, { align: "center", wrap: true, gap: 12, children: [_jsx(Count, { bag: bag }), props.toolbar] })] }), _jsx(DegradationNotice, { degradations: bag.degradations }), matchList(bag.state, {
49
- loading: () => (_jsx(Flex, { justify: "center", style: { padding: 24 }, children: _jsx(Spin, { "data-testid": "search-loading" }) })),
50
- failed: (error) => {
71
+ const scorerName = useScorerNames();
72
+ const maxWidth = props.maxWidth === undefined ? RESULTS_MAX_WIDTH : props.maxWidth;
73
+ return (_jsx(SkinTheme, { surface: "base", ...(props.mode !== undefined ? { mode: props.mode } : {}), style: {
74
+ width: "100%",
75
+ ...(maxWidth !== null ? { maxWidth } : {}),
76
+ }, children: _jsx(SearchResults, { ...(props.enabled !== undefined ? { enabled: props.enabled } : {}), children: (bag) => (_jsxs(Flex, { vertical: true, gap: spacing[4], children: [_jsxs(Flex, { justify: "space-between", align: "center", wrap: true, gap: spacing[2], children: [_jsx(Typography.Title, { level: 4, style: { margin: 0 }, "data-testid": "search-results-heading", children: props.heading ?? t(SEARCH_I18N_KEYS.resultsTitle) }), _jsxs(Flex, { align: "center", wrap: true, gap: spacing[3], children: [_jsx(Count, { bag: bag }), props.toolbar] })] }), _jsx(DegradationNotice, { degradations: bag.degradations, variant: props.degradationNotice ?? "banner", scorerName: scorerName }), _jsx(LoadList, { state: bag.state, testId: "search", skeletonRows: 6, onRetry: bag.refetch, empty: _jsx(EmptyState, { title: t(SEARCH_I18N_KEYS.resultsEmpty), testId: "search-empty" }), failed: (error) => {
51
77
  // The window refusal is a DIFFERENT sentence from a failed
52
78
  // search, and both are different from "nothing found".
53
79
  const isWindow = errorCode(error) === SEARCH_WINDOW_EXCEEDED;
54
- return (_jsx(ErrorAlert, { testId: isWindow ? "search-window-exceeded" : "search-failed", error: {
55
- ...describe(toFlowError(error)),
56
- message: t(isWindow
57
- ? SEARCH_I18N_KEYS.resultsWindowExceeded
58
- : SEARCH_I18N_KEYS.resultsLoadFailed),
59
- }, action: _jsx(Button, { size: "small", onClick: bag.refetch, "data-analytics": "none", "data-analytics-reason": "retry of a failed read; no flow to step", children: t(SEARCH_I18N_KEYS.resultsRetry) }) }));
60
- },
61
- empty: () => (_jsx(Empty, { "data-testid": "search-empty", description: t(SEARCH_I18N_KEYS.resultsEmpty) })),
62
- ready: (items) => (_jsx("div", { "data-testid": "search-results", children: renderResults !== undefined ? (renderResults(items)) : (_jsx("div", { style: RESULTS_GRID, "data-testid": "search-results-grid", children: items.map((item) => (_jsx("div", { children: renderCard !== undefined ? (renderCard(item)) : (_jsx(SearchResultCard, { item: item })) }, item.key))) })) })),
63
- }), _jsx(Pager, { bag: bag }), props.footer] })) }) }));
80
+ return (_jsx(ErrorAlert, { testId: isWindow ? "search-window-exceeded" : "search-failed", thrown: error, message: t(isWindow
81
+ ? SEARCH_I18N_KEYS.resultsWindowExceeded
82
+ : SEARCH_I18N_KEYS.resultsLoadFailed), retryLabel: t(SEARCH_I18N_KEYS.resultsRetry), onRetry: bag.refetch }));
83
+ }, children: (items) => (_jsx("div", { "data-testid": "search-results", children: renderResults !== undefined ? (renderResults(items)) : (_jsx("div", { style: RESULTS_GRID, "data-testid": "search-results-grid", children: items.map((item) => (_jsx("div", { children: renderCard !== undefined ? (renderCard(item)) : (_jsx(SearchResultCard, { item: item })) }, item.key))) })) })) }), _jsx(Pager, { bag: bag }), props.footer] })) }) }));
64
84
  }
65
85
  //# sourceMappingURL=SearchResultsPane.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SearchResultsPane.js","sourceRoot":"","sources":["../../src/default/SearchResultsPane.tsx"],"names":[],"mappings":";AAgBA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAC7D,OAAO,EACL,SAAS,EACT,SAAS,EACT,WAAW,EACX,oBAAoB,EACpB,IAAI,EACJ,UAAU,GACX,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAE7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAc7C;;;;;;;GAOG;AACH,MAAM,YAAY,GAAkB;IAClC,OAAO,EAAE,MAAM;IACf,mBAAmB,EAAE,uCAAuC;IAC5D,GAAG,EAAE,EAAE;IACP,UAAU,EAAE,SAAS;CACtB,CAAC;AA0BF,SAAS,KAAK,CAAC,KAAgC;IAC7C,uEAAuE;IACvE,4EAA4E;IAC5E,uEAAuE;IACvE,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;IAC7B,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC;IAC5B,IAAI,IAAI,KAAK,IAAI;Q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AO,EAAE,CAAC,CACR,QAAQ;oCACN,CAAC,CAAC,gBAAgB,CAAC,qBAAqB;oCACxC,CAAC,CAAC,gBAAgB,CAAC,iBAAiB,CACvC,EACD,UAAU,EAAE,CAAC,CAAC,gBAAgB,CAAC,YAAY,CAAC,EAC5C,OAAO,EAAE,GAAG,CAAC,OAAO,GACpB,CACH,CAAC;wBACJ,CAAC,YAEA,CAAC,KAAK,EAAE,EAAE,CAAC,CACV,6BAAiB,gBAAgB,YAC9B,aAAa,KAAK,SAAS,CAAC,CAAC,CAAC,CAC7B,aAAa,CAAC,KAAK,CAAC,CACrB,CAAC,CAAC,CAAC,CACF,cAAK,KAAK,EAAE,YAAY,iBAAc,qBAAqB,YACxD,KAAK,CAAC,GAAG,CAAC,CAAC,IAAgB,EAAE,EAAE,CAAC,CAC/B,wBACG,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,CAC1B,UAAU,CAAC,IAAI,CAAC,CACjB,CAAC,CAAC,CAAC,CACF,KAAC,gBAAgB,IAAC,IAAI,EAAE,IAAI,GAAI,CACjC,IALO,IAAI,CAAC,GAAG,CAMZ,CACP,CAAC,GACE,CACP,GACG,CACP,GACQ,EAEX,KAAC,KAAK,IAAC,GAAG,EAAE,GAAG,GAAI,EAClB,KAAK,CAAC,MAAM,IACR,CACR,GACa,GACN,CACb,CAAC;AACJ,CAAC"}
@@ -10,10 +10,18 @@
10
10
  *
11
11
  * `sort=distance` needs a centre — the server answers
12
12
  * `error.400.search_sort_needs_center` without one. The option is therefore
13
- * DISABLED with the reason named when no geo centre is set, rather than
14
- * offered and then refused.
13
+ * DISABLED when no geo centre is set, and the REASON is rendered beside the
14
+ * control through `GatedControl`, not in a `title=` a phone can never surface.
15
+ * That is the whole defect this file used to carry: the one sort a person
16
+ * would most want on a phone was greyed out with its explanation in a hover.
15
17
  */
16
18
  import type { ReactElement } from "react";
19
+ /**
20
+ * The select's floor width. Off the spacing scale on purpose and named for it:
21
+ * it is the width of the longest shipped sort label ("Price: low to high") at
22
+ * the default type step, so the control does not resize as the choice changes.
23
+ */
24
+ export declare const SORT_SELECT_MIN_WIDTH = 200;
17
25
  export interface SortSelectProps {
18
26
  /** The sort the SERVER applied, shown when the URL names none. Omitted, it
19
27
  * is read from the page already in cache — see {@link useAppliedSort}. */
@@ -1 +1 @@
1
- {"version":3,"file":"SortSelect.d.ts","sourceRoot":"","sources":["../../src/default/SortSelect.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAgB1C,MAAM,WAAW,eAAe;IAC9B;8EAC0E;IAC1E,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3C;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,YAAY,CAgD/D"}
1
+ {"version":3,"file":"SortSelect.d.ts","sourceRoot":"","sources":["../../src/default/SortSelect.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAY1C;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,MAAM,CAAC;AAEzC,MAAM,WAAW,eAAe;IAC9B;8EAC0E;IAC1E,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3C;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,YAAY,CAwD/D"}
@@ -1,17 +1,19 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Flex, Select, Typography } from "antd";
3
- import { useT } from "@stapel/core";
3
+ import { actionAvailable, actionBlocked, useT } from "@stapel/core";
4
+ import { GatedControl } from "@stapel/tokens-antd/skin";
5
+ import { spacing } from "@stapel/tokens";
4
6
  import { SEARCH_SORTS } from "../api/types.js";
5
7
  import { useAppliedSort } from "../headless/useAppliedSort.js";
6
8
  import { useSearchState } from "../headless/SearchStateProvider.js";
7
9
  import { SEARCH_I18N_KEYS } from "../i18n/keys.js";
8
- const SORT_LABEL_KEY = {
9
- relevance: SEARCH_I18N_KEYS.sortRelevance,
10
- newest: SEARCH_I18N_KEYS.sortNewest,
11
- price_asc: SEARCH_I18N_KEYS.sortPriceAsc,
12
- price_desc: SEARCH_I18N_KEYS.sortPriceDesc,
13
- distance: SEARCH_I18N_KEYS.sortDistance,
14
- };
10
+ import { sortLabelKey } from "./sortLabels.js";
11
+ /**
12
+ * The select's floor width. Off the spacing scale on purpose and named for it:
13
+ * it is the width of the longest shipped sort label ("Price: low to high") at
14
+ * the default type step, so the control does not resize as the choice changes.
15
+ */
16
+ export const SORT_SELECT_MIN_WIDTH = 200;
15
17
  export function SortSelect(props) {
16
18
  const t = useT();
17
19
  const { state, setSort } = useSearchState();
@@ -28,21 +30,22 @@ export function SortSelect(props) {
28
30
  const values = active !== undefined && !known.has(active)
29
31
  ? [...SEARCH_SORTS, active]
30
32
  : SEARCH_SORTS;
31
- return (_jsxs(Flex, { gap: 8, align: "center", children: [_jsx(Typography.Text, { type: "secondary", children: t(SEARCH_I18N_KEYS.sortLabel) }), _jsx(Select, { "data-testid": "search-sort", style: { minWidth: 180 }, value: active ?? null, onChange: (next) => {
32
- setSort(next);
33
- }, options: values.map((value) => {
34
- const key = SORT_LABEL_KEY[value];
35
- const needsCentre = value === "distance" && !hasCentre;
36
- return {
37
- value,
38
- label: key !== undefined ? t(key) : value,
39
- disabled: needsCentre,
40
- // A disabled control states its reason (the ActionAvailability
41
- // canon), even inside a select.
42
- ...(needsCentre
43
- ? { title: t("error.400.search_sort_needs_center") }
44
- : {}),
45
- };
46
- }) })] }));
33
+ // The gate is about ONE option, not the whole control so the binding's
34
+ // `aria-describedby` is spread onto the select (a screen reader hears the
35
+ // reason with the control) and its `disabled` deliberately is not: the other
36
+ // four sorts work perfectly well without a location.
37
+ const distance = hasCentre
38
+ ? actionAvailable()
39
+ : actionBlocked("error.400.search_sort_needs_center");
40
+ return (_jsx(GatedControl, { gate: distance, testId: "search-sort-gate", children: (bind) => (_jsxs(Flex, { gap: spacing[2], align: "center", children: [_jsx(Typography.Text, { type: "secondary", "aria-hidden": "true", children: t(SEARCH_I18N_KEYS.sortLabel) }), _jsx(Select, { "data-testid": "search-sort", "aria-label": t(SEARCH_I18N_KEYS.sortLabel), "aria-describedby": bind["aria-describedby"], style: { minWidth: SORT_SELECT_MIN_WIDTH }, value: active ?? null, onChange: (next) => {
41
+ setSort(next);
42
+ }, options: values.map((value) => {
43
+ const key = sortLabelKey(value);
44
+ return {
45
+ value,
46
+ label: key !== undefined ? t(key) : value,
47
+ disabled: value === "distance" && !hasCentre,
48
+ };
49
+ }) })] })) }));
47
50
  }
48
51
  //# sourceMappingURL=SortSelect.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SortSelect.js","sourceRoot":"","sources":["../../src/default/SortSelect.tsx"],"names":[],"mappings":";AAgBA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD,MAAM,cAAc,GAAqC;IACvD,SAAS,EAAE,gBAAgB,CAAC,aAAa;IACzC,MAAM,EAAE,gBAAgB,CAAC,UAAU;IACnC,SAAS,EAAE,gBAAgB,CAAC,YAAY;IACxC,UAAU,EAAE,gBAAgB,CAAC,aAAa;IAC1C,QAAQ,EAAE,gBAAgB,CAAC,YAAY;CACxC,CAAC;AAQF,MAAM,UAAU,UAAU,CAAC,KAAsB;IAC/C,MAAM,CAAC,GAAG,IAAI,EAAE,CAAC;IACjB,MA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;wBAC5B,MAAM,GAAG,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;wBAChC,OAAO;4BACL,KAAK;4BACL,KAAK,EAAE,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK;4BACzC,QAAQ,EAAE,KAAK,KAAK,UAAU,IAAI,CAAC,SAAS;yBAC7C,CAAC;oBACJ,CAAC,CAAC,GACF,IACG,CACR,GACY,CAChB,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"UrlIssueNotice.d.ts","sourceRoot":"","sources":["../../src/default/UrlIssueNotice.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAM1C,wBAAgB,cAAc,IAAI,YAAY,GAAG,IAAI,CAqBpD"}
1
+ {"version":3,"file":"UrlIssueNotice.d.ts","sourceRoot":"","sources":["../../src/default/UrlIssueNotice.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAwB1C,wBAAgB,cAAc,IAAI,YAAY,GAAG,IAAI,CAqBpD"}
@@ -1,13 +1,31 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Alert } from "antd";
3
+ import { spacing } from "@stapel/tokens";
3
4
  import { useT } from "@stapel/core";
5
+ import { FILTER_PREFIX, RANGE_PREFIX } from "../state/urlState.js";
4
6
  import { useSearchState } from "../headless/SearchStateProvider.js";
5
7
  import { SEARCH_I18N_KEYS } from "../i18n/keys.js";
8
+ /**
9
+ * The parameter as a person can recognise it.
10
+ *
11
+ * The codec reports the WIRE name, which for a facet or a range carries the
12
+ * prefix that tells the backend which family it belongs to (`r.price`,
13
+ * `f.brand`). That prefix is a protocol detail: the sentence is read by
14
+ * somebody who followed a link, and "price" is the part of `r.price` they
15
+ * have any chance of recognising.
16
+ */
17
+ function readableParam(param) {
18
+ for (const prefix of [RANGE_PREFIX, FILTER_PREFIX]) {
19
+ if (param.startsWith(prefix))
20
+ return param.slice(prefix.length);
21
+ }
22
+ return param;
23
+ }
6
24
  export function UrlIssueNotice() {
7
25
  const t = useT();
8
26
  const { issues } = useSearchState();
9
27
  if (issues.length === 0)
10
28
  return null;
11
- return (_jsx(Alert, { type: "warning", showIcon: true, "data-testid": "search-url-issues", message: t(SEARCH_I18N_KEYS.urlIssuesTitle), description: _jsx("ul", { style: { margin: 0, paddingInlineStart: 20 }, children: issues.map((issue) => (_jsx("li", { children: t(issue.messageKey, { param: issue.param }) }, `${issue.param}:${issue.code}`))) }) }));
29
+ return (_jsx(Alert, { type: "warning", showIcon: true, "data-testid": "search-url-issues", title: t(SEARCH_I18N_KEYS.urlIssuesTitle), description: _jsx("ul", { style: { margin: 0, paddingInlineStart: spacing[5] }, children: issues.map((issue) => (_jsx("li", { children: t(issue.messageKey, { param: readableParam(issue.param) }) }, `${issue.param}:${issue.code}`))) }) }));
12
30
  }
13
31
  //# sourceMappingURL=UrlIssueNotice.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"UrlIssueNotice.js","sourceRoot":"","sources":["../../src/default/UrlIssueNotice.tsx"],"names":[],"mappings":";AAUA,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD,MAAM,UAAU,cAAc;IAC5B,MAAM,CAAC,GAAG,IAAI,EAAE,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,GAAG,cAAc,EAAE,CAAC;IACpC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACrC,OAAO,CACL,KAAC,KAAK,IACJ,IAAI,EAAC,SAAS,EACd,QA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AAE,CAAC;IACpC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACrC,OAAO,CACL,KAAC,KAAK,IACJ,IAAI,EAAC,SAAS,EACd,QAAQ,uBACI,mBAAmB,EAC/B,KAAK,EAAE,CAAC,CAAC,gBAAgB,CAAC,cAAc,CAAC,EACzC,WAAW,EACT,aAAI,KAAK,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,kBAAkB,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,YACrD,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CACrB,uBACG,CAAC,CAAC,KAAK,CAAC,UAAU,EAAE,EAAE,KAAK,EAAE,aAAa,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,IADpD,GAAG,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,IAAI,EAAE,CAElC,CACN,CAAC,GACC,GAEP,CACH,CAAC;AACJ,CAAC"}
@@ -6,37 +6,54 @@
6
6
  * never pays for this bundle (enforced by size-limit and the bundle-purity
7
7
  * test).
8
8
  *
9
- * Three override levers, none of which requires forking anything:
9
+ * Five override levers, none of which requires forking anything:
10
10
  *
11
11
  * 1. **`renderCard`** — the card slot. A storefront passes
12
12
  * `<ListingCard>` from `@stapel/listings-react/default`; the generic card
13
13
  * here is the documented default, not the intended end state (spec §3.7).
14
14
  * `renderResults` is the level above it: the whole layout, for a container
15
15
  * whose arrangement is not "cards in a grid".
16
- * 2. **`categoryFeatures`** — the facet-label slot. The server sends
17
- * `{value: count}` and no labels; the schema that names them lives in
18
- * categories, and the container hands it in (spec §6.2 item 2).
19
- * 3. **retheming through the §68 token JSON** — every surface wraps itself
20
- * in `<SearchSkinTheme>`, so a host's regenerated `--stapel-*` custom
16
+ * 2. **`categoryFeatures`** — the facet-label slot, and the source of which
17
+ * slugs get a numeric range row. The server sends `{value: count}` and no
18
+ * labels; the schema that names them lives in categories, and the
19
+ * container hands it in (spec §6.2 item 2).
20
+ * 3. **`renderCategoryFilter`** the catalogue picker. `categories-react`
21
+ * owns walking the tree; this pair owns the `category` parameter.
22
+ * 4. **`renderGeoFilter`** — the location control. `geo-react` owns the map
23
+ * and the geocoder; this pair owns `lat`/`lon`/`radius_km`/`bbox`, and
24
+ * keeps the controls that WIDEN a location a link already carries.
25
+ * 5. **retheming through the §68 token JSON** — every surface wraps itself
26
+ * in the shared `SkinTheme`, so a host's regenerated `--stapel-*` custom
21
27
  * properties reach this skin with zero code.
28
+ *
29
+ * The pair's own `theme.tsx` and `ErrorAlert.tsx` are GONE as of 0.6.0: both
30
+ * were copies of a decision now stated once in `@stapel/tokens-antd/skin`
31
+ * (`SkinTheme`, `ErrorAlert`). A host that imported `SearchSkinTheme` imports
32
+ * `SkinTheme` from the substrate instead — same props, one implementation, and
33
+ * a runtime `data-theme` flip actually repaints it.
22
34
  */
23
35
  export { SearchPage } from "./SearchPage.js";
24
- export type { SearchPageProps } from "./SearchPage.js";
25
- export { SearchResultsPane } from "./SearchResultsPane.js";
36
+ export type { SearchPageProps, SearchFiltersLayout } from "./SearchPage.js";
37
+ export { SearchResultsPane, RESULTS_MAX_WIDTH } from "./SearchResultsPane.js";
26
38
  export type { SearchResultsPaneProps, SearchResultsRenderer, } from "./SearchResultsPane.js";
27
39
  export { FacetPanelPane } from "./FacetPanelPane.js";
28
- export type { FacetPanelPaneProps } from "./FacetPanelPane.js";
29
- export { RankingDisclosurePane } from "./RankingDisclosurePane.js";
40
+ export type { FacetPanelPaneProps, CategoryFilterSlotProps, GeoFilterSlotProps, } from "./FacetPanelPane.js";
41
+ export { RankingDisclosurePane, RANKING_MAX_WIDTH } from "./RankingDisclosurePane.js";
30
42
  export type { RankingDisclosurePaneProps } from "./RankingDisclosurePane.js";
43
+ export { SearchBox } from "./SearchBox.js";
44
+ export type { SearchBoxProps } from "./SearchBox.js";
45
+ export { SortSelect, SORT_SELECT_MIN_WIDTH } from "./SortSelect.js";
46
+ export type { SortSelectProps } from "./SortSelect.js";
47
+ export { PageSizeSelect, SEARCH_PAGE_SIZES } from "./PageSizeSelect.js";
48
+ export type { PageSizeSelectProps } from "./PageSizeSelect.js";
49
+ export { LanguageSelect } from "./LanguageSelect.js";
50
+ export type { LanguageSelectProps } from "./LanguageSelect.js";
31
51
  export { SearchResultCard, GENERIC_CARD_FIELDS } from "./SearchResultCard.js";
32
52
  export type { SearchCardProps, SearchCardRenderer } from "./SearchResultCard.js";
33
53
  export { DegradationNotice } from "./DegradationNotice.js";
34
- export type { DegradationNoticeProps } from "./DegradationNotice.js";
54
+ export type { DegradationNoticeProps, DegradationNoticeVariant, } from "./DegradationNotice.js";
35
55
  export { UrlIssueNotice } from "./UrlIssueNotice.js";
36
- export { SortSelect } from "./SortSelect.js";
37
- export type { SortSelectProps } from "./SortSelect.js";
38
- export { ErrorAlert } from "./ErrorAlert.js";
39
- export { SearchSkinTheme } from "./theme.js";
40
- export type { SearchSkinThemeProps } from "./theme.js";
56
+ export { RangeFilterRow } from "./RangeFilterRow.js";
57
+ export type { RangeFilterRowProps } from "./RangeFilterRow.js";
41
58
  export type { ThemeModeProp } from "./types.js";
42
59
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/default/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,YAAY,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,YAAY,EACV,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,YAAY,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CA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,YAAY,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AAG7E,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,YAAY,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACpE,YAAY,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxE,YAAY,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,YAAY,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAG/D,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC9E,YAAY,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AACjF,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,YAAY,EACV,sBAAsB,EACtB,wBAAwB,GACzB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,YAAY,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAG/D,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC"}
@@ -6,31 +6,45 @@
6
6
  * never pays for this bundle (enforced by size-limit and the bundle-purity
7
7
  * test).
8
8
  *
9
- * Three override levers, none of which requires forking anything:
9
+ * Five override levers, none of which requires forking anything:
10
10
  *
11
11
  * 1. **`renderCard`** — the card slot. A storefront passes
12
12
  * `<ListingCard>` from `@stapel/listings-react/default`; the generic card
13
13
  * here is the documented default, not the intended end state (spec §3.7).
14
14
  * `renderResults` is the level above it: the whole layout, for a container
15
15
  * whose arrangement is not "cards in a grid".
16
- * 2. **`categoryFeatures`** — the facet-label slot. The server sends
17
- * `{value: count}` and no labels; the schema that names them lives in
18
- * categories, and the container hands it in (spec §6.2 item 2).
19
- * 3. **retheming through the §68 token JSON** — every surface wraps itself
20
- * in `<SearchSkinTheme>`, so a host's regenerated `--stapel-*` custom
16
+ * 2. **`categoryFeatures`** — the facet-label slot, and the source of which
17
+ * slugs get a numeric range row. The server sends `{value: count}` and no
18
+ * labels; the schema that names them lives in categories, and the
19
+ * container hands it in (spec §6.2 item 2).
20
+ * 3. **`renderCategoryFilter`** the catalogue picker. `categories-react`
21
+ * owns walking the tree; this pair owns the `category` parameter.
22
+ * 4. **`renderGeoFilter`** — the location control. `geo-react` owns the map
23
+ * and the geocoder; this pair owns `lat`/`lon`/`radius_km`/`bbox`, and
24
+ * keeps the controls that WIDEN a location a link already carries.
25
+ * 5. **retheming through the §68 token JSON** — every surface wraps itself
26
+ * in the shared `SkinTheme`, so a host's regenerated `--stapel-*` custom
21
27
  * properties reach this skin with zero code.
28
+ *
29
+ * The pair's own `theme.tsx` and `ErrorAlert.tsx` are GONE as of 0.6.0: both
30
+ * were copies of a decision now stated once in `@stapel/tokens-antd/skin`
31
+ * (`SkinTheme`, `ErrorAlert`). A host that imported `SearchSkinTheme` imports
32
+ * `SkinTheme` from the substrate instead — same props, one implementation, and
33
+ * a runtime `data-theme` flip actually repaints it.
22
34
  */
23
35
  // ── surfaces ────────────────────────────────────────────────────────────────
24
36
  export { SearchPage } from "./SearchPage.js";
25
- export { SearchResultsPane } from "./SearchResultsPane.js";
37
+ export { SearchResultsPane, RESULTS_MAX_WIDTH } from "./SearchResultsPane.js";
26
38
  export { FacetPanelPane } from "./FacetPanelPane.js";
27
- export { RankingDisclosurePane } from "./RankingDisclosurePane.js";
39
+ export { RankingDisclosurePane, RANKING_MAX_WIDTH } from "./RankingDisclosurePane.js";
40
+ // ── controls, exported so a host can compose its own layout ─────────────────
41
+ export { SearchBox } from "./SearchBox.js";
42
+ export { SortSelect, SORT_SELECT_MIN_WIDTH } from "./SortSelect.js";
43
+ export { PageSizeSelect, SEARCH_PAGE_SIZES } from "./PageSizeSelect.js";
44
+ export { LanguageSelect } from "./LanguageSelect.js";
28
45
  // ── parts, exported so a host can compose or wrap one ───────────────────────
29
46
  export { SearchResultCard, GENERIC_CARD_FIELDS } from "./SearchResultCard.js";
30
47
  export { DegradationNotice } from "./DegradationNotice.js";
31
48
  export { UrlIssueNotice } from "./UrlIssueNotice.js";
32
- export { SortSelect } from "./SortSelect.js";
33
- export { ErrorAlert } from "./ErrorAlert.js";
34
- // ── theming ─────────────────────────────────────────────────────────────────
35
- export { SearchSkinTheme } from "./theme.js";
49
+ export { RangeFilterRow } from "./RangeFilterRow.js";
36
50
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/default/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,+EAA+E;AAC/E,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAG7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAM3D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAGrD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAGnE,+EAA+E;AAC/E,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,+EAA+E;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/default/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,+EAA+E;AAC/E,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAG7C,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAM9E,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAOrD,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAGtF,+EAA+E;AAC/E,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,OAAO,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAEpE,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAGrD,+EAA+E;AAC/E,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAK3D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,5 @@
1
+ /** The i18n key for a shipped sort, or `undefined` for a deployment's own. */
2
+ export declare function sortLabelKey(sort: string): string | undefined;
3
+ /** The sort's name for a reader, falling back to the slug. */
4
+ export declare function sortLabel(t: (key: string) => string, sort: string): string;
5
+ //# sourceMappingURL=sortLabels.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sortLabels.d.ts","sourceRoot":"","sources":["../../src/default/sortLabels.ts"],"names":[],"mappings":"AAwBA,8EAA8E;AAC9E,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAE7D;AAED,8DAA8D;AAC9D,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAG1E"}