@stapel/search-react 0.32.8 → 0.33.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +101 -0
- package/README.md +76 -1
- package/dist/default/PartitionChips.d.ts.map +1 -1
- package/dist/default/PartitionChips.js +83 -2
- package/dist/default/PartitionChips.js.map +1 -1
- package/dist/default/SearchPage.d.ts +59 -2
- package/dist/default/SearchPage.d.ts.map +1 -1
- package/dist/default/SearchPage.js +24 -4
- package/dist/default/SearchPage.js.map +1 -1
- package/dist/default/SearchResultsPane.d.ts +55 -0
- package/dist/default/SearchResultsPane.d.ts.map +1 -1
- package/dist/default/SearchResultsPane.js +133 -2
- package/dist/default/SearchResultsPane.js.map +1 -1
- package/dist/default/index.d.ts +3 -3
- package/dist/default/index.d.ts.map +1 -1
- package/dist/default/index.js +2 -2
- package/dist/default/index.js.map +1 -1
- package/llms.txt +3 -3
- package/manifest.json +3 -1
- package/nav-manifest.json +1 -1
- package/package.json +3 -3
- package/src/analytics/generated/events.json +1 -1
- package/src/default/PartitionChips.tsx +86 -1
- package/src/default/SearchPage.tsx +73 -1
- package/src/default/SearchResultsPane.tsx +209 -13
- package/src/default/index.ts +3 -0
|
@@ -77,6 +77,34 @@ export type SearchResultsWrapper = (items: readonly SearchItem[], results: React
|
|
|
77
77
|
* and the 2560px pane the constant was written against is still capped.
|
|
78
78
|
*/
|
|
79
79
|
export declare const RESULTS_MAX_WIDTH = 1400;
|
|
80
|
+
/**
|
|
81
|
+
* The class on the row that carries the results toolbar — the sort control, the
|
|
82
|
+
* view switch, the page size, the count and the surface's own action.
|
|
83
|
+
*
|
|
84
|
+
* The row had no element of its own: no class, no `data-testid`, and in the
|
|
85
|
+
* compact header it was one child of a 112px vertical stack. A host that wanted
|
|
86
|
+
* it pinned under a fixed header therefore had to reach it with a `:has()` on
|
|
87
|
+
* the heading beside it, a `display: contents` to drop the stack's box, and the
|
|
88
|
+
* pane's own breakpoint restated in a media query — three rules aimed at a
|
|
89
|
+
* shape the pane could change under them at any release.
|
|
90
|
+
*
|
|
91
|
+
* It is the same class in BOTH header shapes, and in both it names THE SAME
|
|
92
|
+
* THING: the controls' own line, and never the heading beside it (D452). The
|
|
93
|
+
* compact shape always drew it that way; the wide shape did not, and pinning a
|
|
94
|
+
* block that carried the `<h1>` pinned 100px of chrome at 1440 and 150px at
|
|
95
|
+
* 1280 — see `WIDE_HEADING_ROW`.
|
|
96
|
+
*/
|
|
97
|
+
export declare const RESULTS_TOOLBAR_CLASS = "stapel-search-results-toolbar";
|
|
98
|
+
/**
|
|
99
|
+
* Where {@link SearchResultsPaneProps.stickyToolbar} pins the row.
|
|
100
|
+
*
|
|
101
|
+
* `top` is a CSS length — a number is pixels, a string is taken as written, so
|
|
102
|
+
* `top: "var(--stapel-header-height)"` reads the height `<PublicShell>`
|
|
103
|
+
* publishes rather than restating it. Default `0`.
|
|
104
|
+
*/
|
|
105
|
+
export interface SearchToolbarPin {
|
|
106
|
+
readonly top?: number | string;
|
|
107
|
+
}
|
|
80
108
|
/**
|
|
81
109
|
* The results grid. `auto-fill` + `minmax(260px, 1fr)`: as many columns as fit,
|
|
82
110
|
* each at least a readable card and never wider than its share — and the same
|
|
@@ -280,6 +308,33 @@ export interface SearchResultsPaneProps extends ThemeModeProp {
|
|
|
280
308
|
* viewport is not spent saying "Results" over a list of results.
|
|
281
309
|
*/
|
|
282
310
|
readonly header?: "banner" | "compact";
|
|
311
|
+
/**
|
|
312
|
+
* PIN the toolbar row under whatever chrome is above this pane.
|
|
313
|
+
*
|
|
314
|
+
* ```tsx
|
|
315
|
+
* // the height <PublicShell> publishes, read rather than restated
|
|
316
|
+
* <SearchResultsPane stickyToolbar={{ top: "var(--stapel-header-height)" }} />
|
|
317
|
+
* ```
|
|
318
|
+
*
|
|
319
|
+
* A catalogue page is thirty cards long and the control that reorders them is
|
|
320
|
+
* at the top of it, so by the fourth row the sort is a screenful above the
|
|
321
|
+
* list it sorts — the same argument that made the filter rail sticky, applied
|
|
322
|
+
* to the other column.
|
|
323
|
+
*
|
|
324
|
+
* It pins the row the pane ACTUALLY DREW, which is why this is a prop and not
|
|
325
|
+
* a host's stylesheet: the pane knows which of its two header shapes it is in
|
|
326
|
+
* and a sheet has to guess. In `"banner"` the whole header block pins (it is
|
|
327
|
+
* one line: heading, count, toolbar). In `"compact"` the toolbar alone pins —
|
|
328
|
+
* one row, the height of one phone control — because the stack it sits in is
|
|
329
|
+
* ~112px and that is not a bar anybody can pin under a 56px header.
|
|
330
|
+
*
|
|
331
|
+
* Two things it does NOT do, both deliberate: it adds no padding (see
|
|
332
|
+
* {@link toolbarPinStyle} — a pinned bar that grows to breathe has to give
|
|
333
|
+
* the room back, and which spacing that is belongs to the host), and it draws
|
|
334
|
+
* no second sort control. There is exactly one on a results page, and this
|
|
335
|
+
* pins it where it stands.
|
|
336
|
+
*/
|
|
337
|
+
readonly stickyToolbar?: SearchToolbarPin;
|
|
283
338
|
/**
|
|
284
339
|
* The category's feature schema, used ONLY to name an applied filter in the
|
|
285
340
|
* empty state's exits ("Without Brand" rather than "Without vendor").
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchResultsPane.d.ts","sourceRoot":"","sources":["../../src/default/SearchResultsPane.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,KAAK,EAAiB,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAYpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAQlD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAEvE,OAAO,KAAK,EACV,yBAAyB,EACzB,kBAAkB,EACnB,MAAM,0BAA0B,CAAC;AAElC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO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ACH,QAAQ,CAAC,MAAM,CAAC,EAAE,mBAAmB,CAAC;IACtC;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,cAAc,CAAC;IAClC;;;;;;;;OAQG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC1C;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IACvC;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,gBAAgB,CAAC;IAC1C;;;;;OAKG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,SAAS,UAAU,EAAE,CAAC;IAClD;;;;;OAKG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,SAAS,CAAC;IAC5C;;;;;;;;;OASG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC;IACnC;wDACoD;IACpD,QAAQ,CAAC,YAAY,CAAC,EAAE,kBAAkB,CAAC;IAC3C;wDACoD;IACpD,QAAQ,CAAC,YAAY,CAAC,EAAE,yBAAyB,CAAC;IAClD;;gEAE4D;IAC5D,QAAQ,CAAC,oBAAoB,CAAC,EAAE,OAAO,CAAC;CACzC;AA8DD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,GAAG,YAAY,CA2O7E"}
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
2
2
|
import { Flex, Typography } from "antd";
|
|
3
3
|
import { errorCode, useT, useTPlural } from "@stapel/core";
|
|
4
4
|
import { EmptyState, ErrorAlert, GatedButton, LoadList, SkinTheme, visuallyHidden, } from "@stapel/tokens-antd/skin";
|
|
5
|
-
import { breakpoints, spacing } from "@stapel/tokens";
|
|
5
|
+
import { breakpoints, cssVar, spacing } from "@stapel/tokens";
|
|
6
6
|
import { SearchResults } from "../headless/SearchResults.js";
|
|
7
7
|
import { useScorerNames } from "../headless/useScorerNames.js";
|
|
8
8
|
import { SEARCH_WINDOW_EXCEEDED } from "../i18n/errorsMap.js";
|
|
@@ -29,6 +29,126 @@ import { SearchResultCard } from "./SearchResultCard.js";
|
|
|
29
29
|
* and the 2560px pane the constant was written against is still capped.
|
|
30
30
|
*/
|
|
31
31
|
export const RESULTS_MAX_WIDTH = 1400;
|
|
32
|
+
/**
|
|
33
|
+
* The class on the row that carries the results toolbar — the sort control, the
|
|
34
|
+
* view switch, the page size, the count and the surface's own action.
|
|
35
|
+
*
|
|
36
|
+
* The row had no element of its own: no class, no `data-testid`, and in the
|
|
37
|
+
* compact header it was one child of a 112px vertical stack. A host that wanted
|
|
38
|
+
* it pinned under a fixed header therefore had to reach it with a `:has()` on
|
|
39
|
+
* the heading beside it, a `display: contents` to drop the stack's box, and the
|
|
40
|
+
* pane's own breakpoint restated in a media query — three rules aimed at a
|
|
41
|
+
* shape the pane could change under them at any release.
|
|
42
|
+
*
|
|
43
|
+
* It is the same class in BOTH header shapes, and in both it names THE SAME
|
|
44
|
+
* THING: the controls' own line, and never the heading beside it (D452). The
|
|
45
|
+
* compact shape always drew it that way; the wide shape did not, and pinning a
|
|
46
|
+
* block that carried the `<h1>` pinned 100px of chrome at 1440 and 150px at
|
|
47
|
+
* 1280 — see `WIDE_HEADING_ROW`.
|
|
48
|
+
*/
|
|
49
|
+
export const RESULTS_TOOLBAR_CLASS = "stapel-search-results-toolbar";
|
|
50
|
+
/**
|
|
51
|
+
* The controls' own line: it may not become two.
|
|
52
|
+
*
|
|
53
|
+
* A wrapping row changes height when the count lands — the count arrives with
|
|
54
|
+
* the answer, one render after the toolbar was already on screen — and a bar
|
|
55
|
+
* that grows while it is pinned pushes the first cards of the feed down under
|
|
56
|
+
* the reader's eye. `nowrap` makes the height a constant; `min-inline-size: 0`
|
|
57
|
+
* plus `overflow-x: auto` is what a row that cannot wrap does with the overflow
|
|
58
|
+
* instead, which on a phone is the scroll strip every sort row already is.
|
|
59
|
+
*/
|
|
60
|
+
const TOOLBAR_ROW = {
|
|
61
|
+
flexWrap: "nowrap",
|
|
62
|
+
minInlineSize: 0,
|
|
63
|
+
overflowX: "auto",
|
|
64
|
+
// Thin, and only when there is something to scroll to — the same reason the
|
|
65
|
+
// filter rail states its own: an invisible scroll port is indistinguishable
|
|
66
|
+
// from a row that ends where it was cut.
|
|
67
|
+
scrollbarWidth: "thin",
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* The compact header's stack, WITHOUT its box.
|
|
71
|
+
*
|
|
72
|
+
* `position: sticky` travels inside its parent, so a toolbar nested in a 112px
|
|
73
|
+
* stack can move 112px and no further — the parent has to be the results
|
|
74
|
+
* column, which is as tall as the feed. `display: contents` drops the stack's
|
|
75
|
+
* box and hands its three rows straight to that column, which is the same
|
|
76
|
+
* device the fleet's storefront was writing in its own sheet.
|
|
77
|
+
*
|
|
78
|
+
* The one visible consequence: the gap between heading, toolbar and count
|
|
79
|
+
* becomes the column's rather than the stack's.
|
|
80
|
+
*/
|
|
81
|
+
const COMPACT_STACK = { display: "contents" };
|
|
82
|
+
/**
|
|
83
|
+
* The WIDE shape's heading row — a row of its own, at the results column's
|
|
84
|
+
* full measure (D452).
|
|
85
|
+
*
|
|
86
|
+
* The heading used to be the leading flex item of the block that pins, with
|
|
87
|
+
* the controls as the trailing one. Two things followed, and both were
|
|
88
|
+
* measured on the stand:
|
|
89
|
+
*
|
|
90
|
+
* - the controls row is `nowrap` and holds a count, a sort select, a page
|
|
91
|
+
* size and a view switch, so it took whatever width it needed and left the
|
|
92
|
+
* heading **415px** of a 1200px column. An `<h1>` at 42px (50 at 1280) then
|
|
93
|
+
* wrapped to TWO LINES;
|
|
94
|
+
* - those two lines were inside the pinned box, so what stood under the
|
|
95
|
+
* header while the feed scrolled was **100px** of chrome at 1440 and
|
|
96
|
+
* **150px** at 1280 — a third of the fold on a laptop.
|
|
97
|
+
*
|
|
98
|
+
* Nothing about the heading belongs in a pinned bar: it names the page once,
|
|
99
|
+
* it is read once, and it is the one element on the page whose length the pair
|
|
100
|
+
* does not control (`resultsHeading` is the host's sentence — "Buy a
|
|
101
|
+
* Samsung Galaxy S23 in Kazan"). So it takes its own line at the full width,
|
|
102
|
+
* where it has room not to wrap, and the pin acts on the controls alone —
|
|
103
|
+
* which is what `header="compact"` already did.
|
|
104
|
+
*
|
|
105
|
+
* `100%` is DECLARED rather than left to the column's `align-items: stretch`:
|
|
106
|
+
* the row is what a host reads to know the heading is not in the pinned box,
|
|
107
|
+
* and a width that only happens to be full is not a contract.
|
|
108
|
+
*/
|
|
109
|
+
const WIDE_HEADING_ROW = { inlineSize: "100%", minInlineSize: 0 };
|
|
110
|
+
/** The wide heading itself: no margin of its own — the column's gap is the
|
|
111
|
+
* rhythm — and free to shrink inside its row rather than forcing it wider. */
|
|
112
|
+
const WIDE_HEADING = { margin: 0, minInlineSize: 0 };
|
|
113
|
+
/**
|
|
114
|
+
* The wide row's trailing group — the surface's controls.
|
|
115
|
+
*
|
|
116
|
+
* `flex: 0 0 auto`: the count on the leading end is the elastic half (it is
|
|
117
|
+
* one short string and it arrives late), and the controls keep every pixel
|
|
118
|
+
* they need. Both ends shrinking is how a sort select ends up narrower than
|
|
119
|
+
* its own longest option.
|
|
120
|
+
*/
|
|
121
|
+
const TOOLBAR_END = { flex: "0 0 auto" };
|
|
122
|
+
/** The compact shape's toolbar box — the row the pin acts on. */
|
|
123
|
+
const COMPACT_TOOLBAR = {
|
|
124
|
+
display: "flex",
|
|
125
|
+
alignItems: "center",
|
|
126
|
+
...TOOLBAR_ROW,
|
|
127
|
+
};
|
|
128
|
+
/**
|
|
129
|
+
* The pin itself, and it is NET-ZERO in flow: `position` and a layer and a
|
|
130
|
+
* background, and not one pixel of padding.
|
|
131
|
+
*
|
|
132
|
+
* A pinned bar that grows padding to breathe over the cards passing under it
|
|
133
|
+
* has to take the same padding back as negative margin or the column pays for
|
|
134
|
+
* it, and the pair does not know which of those two a host's spacing wants. A
|
|
135
|
+
* row that occupies exactly the box it already occupied cannot shift anything.
|
|
136
|
+
*/
|
|
137
|
+
function toolbarPinStyle(pin) {
|
|
138
|
+
if (pin === undefined)
|
|
139
|
+
return undefined;
|
|
140
|
+
return {
|
|
141
|
+
position: "sticky",
|
|
142
|
+
top: pin.top ?? 0,
|
|
143
|
+
// Over the cards, under the page's own chrome — and under antd's popups,
|
|
144
|
+
// so the sort select still opens over its own bar.
|
|
145
|
+
zIndex: 1,
|
|
146
|
+
// Opaque, or the cards scroll THROUGH the bar. The theme's own surface
|
|
147
|
+
// role, resolved at paint time, so it follows the brand and the dark side
|
|
148
|
+
// without a second colour being written here.
|
|
149
|
+
background: cssVar("surface"),
|
|
150
|
+
};
|
|
151
|
+
}
|
|
32
152
|
/**
|
|
33
153
|
* The results grid. `auto-fill` + `minmax(260px, 1fr)`: as many columns as fit,
|
|
34
154
|
* each at least a readable card and never wider than its share — and the same
|
|
@@ -174,6 +294,7 @@ export function SearchResultsPane(props) {
|
|
|
174
294
|
// The compact arm's caption: the host's word is drawn, the pair's own is
|
|
175
295
|
// not, and `headingVisible` overrides either way — see that prop.
|
|
176
296
|
const compactHeadingSeen = props.headingVisible ?? props.heading !== undefined;
|
|
297
|
+
const toolbarPin = toolbarPinStyle(props.stickyToolbar);
|
|
177
298
|
const columnRules = props.columns === undefined || props.layout === "list"
|
|
178
299
|
? null
|
|
179
300
|
: resultsColumnsCss(props.columns);
|
|
@@ -197,7 +318,17 @@ export function SearchResultsPane(props) {
|
|
|
197
318
|
return (_jsx(SkinTheme, { surface: "base", ...(props.mode !== undefined ? { mode: props.mode } : {}), style: {
|
|
198
319
|
width: "100%",
|
|
199
320
|
...(maxWidth !== null ? { maxWidth } : {}),
|
|
200
|
-
}, children: _jsx(SearchResults, { ...(props.enabled !== undefined ? { enabled: props.enabled } : {}), children: (bag) => (_jsxs(Flex, { vertical: true, gap: spacing[4], children: [props.lead !== undefined && (_jsx("div", { "data-testid": "search-results-lead", children: props.lead })), props.header === "compact" ? (
|
|
321
|
+
}, children: _jsx(SearchResults, { ...(props.enabled !== undefined ? { enabled: props.enabled } : {}), children: (bag) => (_jsxs(Flex, { vertical: true, gap: spacing[4], children: [props.lead !== undefined && (_jsx("div", { "data-testid": "search-results-lead", children: props.lead })), props.header === "compact" ? (
|
|
322
|
+
/* No box of its own — see `COMPACT_STACK`. The three rows are
|
|
323
|
+
items of the results COLUMN, so the toolbar between them has a
|
|
324
|
+
parent as tall as the feed to travel in. */
|
|
325
|
+
_jsxs(Flex, { vertical: true, gap: spacing[2], style: COMPACT_STACK, "data-testid": "search-results-header-compact", children: [_jsx(Typography.Title, { level: props.headingLevel ?? 4, style: compactHeadingSeen ? { margin: 0 } : visuallyHidden, "data-testid": "search-results-heading", "data-heading": compactHeadingSeen ? "seen" : "hidden", children: props.heading ?? t(SEARCH_I18N_KEYS.resultsTitle) }), _jsx("div", { className: RESULTS_TOOLBAR_CLASS, "data-testid": "search-results-toolbar", style: { ...COMPACT_TOOLBAR, ...toolbarPin }, children: props.toolbar }), _jsx(Count, { bag: bag })] })) : (
|
|
326
|
+
/* D452 — the heading is its OWN row, at the column's full width,
|
|
327
|
+
and the row that pins is the controls. See `WIDE_HEADING_ROW`.
|
|
328
|
+
Both are direct children of the results column: the toolbar
|
|
329
|
+
has a parent as tall as the feed to travel in, and the heading
|
|
330
|
+
has the whole measure to set its line in. */
|
|
331
|
+
_jsxs(_Fragment, { children: [_jsx("div", { style: WIDE_HEADING_ROW, "data-testid": "search-results-heading-row", children: _jsx(Typography.Title, { level: props.headingLevel ?? 4, style: WIDE_HEADING, "data-testid": "search-results-heading", children: props.heading ?? t(SEARCH_I18N_KEYS.resultsTitle) }) }), _jsxs(Flex, { justify: "space-between", align: "center", gap: spacing[3], className: RESULTS_TOOLBAR_CLASS, "data-testid": "search-results-toolbar", style: { ...TOOLBAR_ROW, ...toolbarPin }, children: [_jsx(Count, { bag: bag }), _jsx(Flex, { align: "center", gap: spacing[3], style: TOOLBAR_END, children: props.toolbar })] })] })), _jsx(DegradationNotice, { degradations: bag.degradations, variant: props.degradationNotice ?? "banner", scorerName: scorerName }), props.otherCategories === true && (_jsx(OtherCategoriesLine, { ...(props.enabled !== undefined ? { enabled: props.enabled } : {}), ...(props.categoryName !== undefined
|
|
201
332
|
? { categoryName: props.categoryName }
|
|
202
333
|
: {}), ...(props.categoryHref !== undefined
|
|
203
334
|
? { categoryHref: props.categoryHref }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchResultsPane.js","sourceRoot":"","sources":["../../src/default/SearchResultsPane.tsx"],"names":[],"mappings":";AA2BA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,EACL,UAAU,EACV,UAAU,EACV,WAAW,EACX,QAAQ,EACR,SAAS,EACT,cAAc,GACf,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAGtD,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAE7D,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,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;AAE7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAK/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAuCzD;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,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AAC,aAEN,WAAW,KAAK,IAAI,CAAC,CAAC,CAAC,CACtB,gBACE,IAAI,EAAE,0BAA0B,EAChC,UAAU,EAAC,SAAS,YAEnB,WAAW,GACN,CACT,CAAC,CAAC,CAAC,IAAI,EACP,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,IACE,CACP,CAAC;4BACJ,OAAO,CACL,6BAAiB,gBAAgB,YAC9B,WAAW,KAAK,SAAS;oCACxB,CAAC,CAAC,WAAW,CAAC,KAAK,EAAE,WAAW,CAAC;oCACjC,CAAC,CAAC,WAAW,GACX,CACP,CAAC;wBACJ,CAAC,GACQ,EAEX,KAAC,KAAK,IAAC,GAAG,EAAE,GAAG,GAAI,EAClB,KAAK,CAAC,MAAM,IACR,CACR,GACa,GACN,CACb,CAAC;AACJ,CAAC"}
|
|
1
|
+
{"version":3,"file":"SearchResultsPane.js","sourceRoot":"","sources":["../../src/default/SearchResultsPane.tsx"],"names":[],"mappings":";AA2BA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,EACL,UAAU,EACV,UAAU,EACV,WAAW,EACX,QAAQ,EACR,SAAS,EACT,cAAc,GACf,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAG9D,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAE7D,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D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GACX,CACP,CAAC;wBACJ,CAAC,GACQ,EAEX,KAAC,KAAK,IAAC,GAAG,EAAE,GAAG,GAAI,EAClB,KAAK,CAAC,MAAM,IACR,CACR,GACa,GACN,CACb,CAAC;AACJ,CAAC"}
|
package/dist/default/index.d.ts
CHANGED
|
@@ -38,12 +38,12 @@
|
|
|
38
38
|
* `SkinTheme` from the substrate instead — same props, one implementation, and
|
|
39
39
|
* a runtime `data-theme` flip actually repaints it.
|
|
40
40
|
*/
|
|
41
|
-
export { SearchPage, RAIL_CLASS, RAIL_STYLE_HREF, railScrollbarCss, } from "./SearchPage.js";
|
|
41
|
+
export { SearchPage, RAIL_CLASS, RAIL_STYLE_HREF, railScrollbarCss, railStyle, } from "./SearchPage.js";
|
|
42
42
|
export type { SearchPageProps, SearchFiltersLayout, SearchRailFrom, } from "./SearchPage.js";
|
|
43
43
|
export { OtherCategoriesLine, OTHER_CATEGORIES_CLASS, OTHER_CATEGORIES_PHONE_ROWS, OTHER_CATEGORIES_SLOT_MIN_HEIGHT, OTHER_CATEGORIES_STYLE_HREF, otherCategoriesCss, otherCategoriesSlotHeight, } from "./OtherCategoriesLine.js";
|
|
44
44
|
export type { OtherCategoriesLineProps, OtherCategoryHrefResolver, OtherCategoryNamer, } from "./OtherCategoriesLine.js";
|
|
45
|
-
export { SearchResultsPane, RESULTS_MAX_WIDTH, RESULTS_AUTO_FILL_COLUMNS, RESULTS_COLUMNS_CLASS, RESULTS_COLUMNS_STYLE_HREF, resultsColumnsCss, } from "./SearchResultsPane.js";
|
|
46
|
-
export type { ResultsColumns, SearchResultsPaneProps, SearchResultsRenderer, SearchResultsWrapper, } from "./SearchResultsPane.js";
|
|
45
|
+
export { SearchResultsPane, RESULTS_MAX_WIDTH, RESULTS_AUTO_FILL_COLUMNS, RESULTS_COLUMNS_CLASS, RESULTS_COLUMNS_STYLE_HREF, RESULTS_TOOLBAR_CLASS, resultsColumnsCss, } from "./SearchResultsPane.js";
|
|
46
|
+
export type { ResultsColumns, SearchResultsPaneProps, SearchResultsRenderer, SearchResultsWrapper, SearchToolbarPin, } from "./SearchResultsPane.js";
|
|
47
47
|
export { FilterChips, CHIP_BAND_ORDER, CHIP_ROW_CAP, CHIP_ROW_CLASS, CHIP_ROW_MIN_HEIGHT, CHIP_ROW_STYLE_HREF, appliedChipTestId, appliedRowMinHeight, buildAppliedChips, capChipRow, categoryLeaf, chipRowCss, orderChipFilters, rangeChipText, rangeLabelSource, } from "./FilterChips.js";
|
|
48
48
|
export type { AppliedChip, AppliedChipTarget, ChipBand, ChipSpec, FilterChipsAppliedProps, FilterChipsCommonProps, FilterChipsMode, FilterChipsOpenerProps, FilterChipsProps, } from "./FilterChips.js";
|
|
49
49
|
export { EmptyExits, RADIUS_WIDEN_FACTOR, parentCategory } from "./EmptyExits.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/default/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAGH,OAAO,EACL,UAAU,EACV,UAAU,EACV,eAAe,EACf,gBAAgB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/default/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAGH,OAAO,EACL,UAAU,EACV,UAAU,EACV,eAAe,EACf,gBAAgB,EAChB,SAAS,GACV,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,eAAe,EACf,mBAAmB,EACnB,cAAc,GACf,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,2BAA2B,EAC3B,gCAAgC,EAChC,2BAA2B,EAC3B,kBAAkB,EAClB,yBAAyB,GAC1B,MAAM,0BAA0B,CAAC;AAClC,YAAY,EACV,wBAAwB,EACxB,yBAAyB,EACzB,kBAAkB,GACnB,MAAM,0BAA0B,C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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,UAAU,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAG3E,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC"}
|
package/dist/default/index.js
CHANGED
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
* a runtime `data-theme` flip actually repaints it.
|
|
40
40
|
*/
|
|
41
41
|
// ── surfaces ────────────────────────────────────────────────────────────────
|
|
42
|
-
export { SearchPage, RAIL_CLASS, RAIL_STYLE_HREF, railScrollbarCss, } from "./SearchPage.js";
|
|
42
|
+
export { SearchPage, RAIL_CLASS, RAIL_STYLE_HREF, railScrollbarCss, railStyle, } from "./SearchPage.js";
|
|
43
43
|
export { OtherCategoriesLine, OTHER_CATEGORIES_CLASS, OTHER_CATEGORIES_PHONE_ROWS, OTHER_CATEGORIES_SLOT_MIN_HEIGHT, OTHER_CATEGORIES_STYLE_HREF, otherCategoriesCss, otherCategoriesSlotHeight, } from "./OtherCategoriesLine.js";
|
|
44
|
-
export { SearchResultsPane, RESULTS_MAX_WIDTH, RESULTS_AUTO_FILL_COLUMNS, RESULTS_COLUMNS_CLASS, RESULTS_COLUMNS_STYLE_HREF, resultsColumnsCss, } from "./SearchResultsPane.js";
|
|
44
|
+
export { SearchResultsPane, RESULTS_MAX_WIDTH, RESULTS_AUTO_FILL_COLUMNS, RESULTS_COLUMNS_CLASS, RESULTS_COLUMNS_STYLE_HREF, RESULTS_TOOLBAR_CLASS, resultsColumnsCss, } from "./SearchResultsPane.js";
|
|
45
45
|
export { FilterChips, CHIP_BAND_ORDER, CHIP_ROW_CAP, CHIP_ROW_CLASS, CHIP_ROW_MIN_HEIGHT, CHIP_ROW_STYLE_HREF, appliedChipTestId, appliedRowMinHeight, buildAppliedChips, capChipRow, categoryLeaf, chipRowCss, orderChipFilters, rangeChipText, rangeLabelSource, } from "./FilterChips.js";
|
|
46
46
|
export { EmptyExits, RADIUS_WIDEN_FACTOR, parentCategory } from "./EmptyExits.js";
|
|
47
47
|
export { LocationSummaryLine } from "./LocationSummaryLine.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/default/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH,+EAA+E;AAC/E,OAAO,EACL,UAAU,EACV,UAAU,EACV,eAAe,EACf,gBAAgB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/default/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH,+EAA+E;AAC/E,OAAO,EACL,UAAU,EACV,UAAU,EACV,eAAe,EACf,gBAAgB,EAChB,SAAS,GACV,MAAM,iBAAiB,CAAC;AAOzB,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,2BAA2B,EAC3B,gCAAgC,EAChC,2BAA2B,EAC3B,kBAAkB,EAClB,yBAAyB,GAC1B,MAAM,0BAA0B,CAAC;AAOlC,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,yBAAyB,EACzB,qBAAqB,EACrB,0BAA0B,EAC1B,qBAAqB,EACrB,iBAAiB,GAClB,MAAM,wBAAwB,CAAC;AAShC,OAAO,EACL,WAAW,EACX,eAAe,EACf,YAAY,EACZ,cAAc,EACd,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EACjB,UAAU,EACV,YAAY,EACZ,UAAU,EACV,gBAAgB,EAChB,aAAa,EACb,gBAAgB,GACjB,MAAM,kBAAkB,CAAC;AA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,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC"}
|
package/llms.txt
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @stapel/search-react 0.
|
|
1
|
+
# @stapel/search-react 0.33.1
|
|
2
2
|
|
|
3
3
|
Headless React flow pair for stapel-search (contract >=0.16 <0.17) — business + state, zero visual opinion.
|
|
4
4
|
Built on @stapel/core: typed client + StapelApiError envelope, auth token refresh,
|
|
@@ -85,14 +85,14 @@ const { tracked } = useTracked();
|
|
|
85
85
|
- search.language-select → <LanguageSelect> [offered|from-a-link] demo/LanguageSelect.demo.tsx
|
|
86
86
|
- search.location-summary → <LocationSummaryLine> [everywhere|placed|narrowed|long-place|wide] demo/LocationSummaryLine.demo.tsx
|
|
87
87
|
- search.other-categories-line → <OtherCategoriesLine> [line|narrow|empty] demo/OtherCategoriesLine.demo.tsx
|
|
88
|
-
- search.page → <SearchPage> [desktop|phone|catalogue-leaf|unreadable-link] demo/SearchPage.demo.tsx
|
|
88
|
+
- search.page → <SearchPage> [desktop|phone|catalogue-leaf|under-a-header|unreadable-link] demo/SearchPage.demo.tsx
|
|
89
89
|
- search.page-size-select → <PageSizeSelect> [ladder|off-ladder] demo/PageSizeSelect.demo.tsx
|
|
90
90
|
- search.partition-chips → <PartitionChips> [parent|child] demo/PartitionChips.demo.tsx
|
|
91
91
|
- search.popular-values → <PopularValues> [desktop|responsive|narrow-column] demo/PopularValues.demo.tsx
|
|
92
92
|
- search.range-filter-row → <RangeFilterRow> [untouched|applied] demo/RangeFilterRow.demo.tsx
|
|
93
93
|
- search.ranking-pane → <RankingDisclosurePane> [desktop|phone] demo/RankingDisclosurePane.demo.tsx
|
|
94
94
|
- search.result-card → <SearchResultCard> [gallery|promoted|unresolved|plain] demo/SearchResultCard.demo.tsx
|
|
95
|
-
- search.results-pane → <SearchResultsPane> [desktop|phone|empty] demo/SearchResultsPane.demo.tsx
|
|
95
|
+
- search.results-pane → <SearchResultsPane> [desktop|phone|sticky-toolbar|empty] demo/SearchResultsPane.demo.tsx
|
|
96
96
|
- search.sort-select → <SortSelect> [no-centre|with-centre] demo/SortSelect.demo.tsx
|
|
97
97
|
- search.url-issue-notice → <UrlIssueNotice> [two-issues|one-issue] demo/UrlIssueNotice.demo.tsx
|
|
98
98
|
Each source file is the canonical usage snippet (open the default variant).
|
package/manifest.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$generated": "by scripts/gen-manifest.mjs — do not edit; drift-gated (pnpm gen:manifest:check)",
|
|
3
3
|
"package": "@stapel/search-react",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.33.1",
|
|
5
5
|
"backend": {
|
|
6
6
|
"module": "stapel-search",
|
|
7
7
|
"contract": ">=0.16 <0.17"
|
|
@@ -581,6 +581,7 @@
|
|
|
581
581
|
"desktop",
|
|
582
582
|
"phone",
|
|
583
583
|
"catalogue-leaf",
|
|
584
|
+
"under-a-header",
|
|
584
585
|
"unreadable-link"
|
|
585
586
|
],
|
|
586
587
|
"source": "demo/SearchPage.demo.tsx"
|
|
@@ -693,6 +694,7 @@
|
|
|
693
694
|
"variants": [
|
|
694
695
|
"desktop",
|
|
695
696
|
"phone",
|
|
697
|
+
"sticky-toolbar",
|
|
696
698
|
"empty"
|
|
697
699
|
],
|
|
698
700
|
"source": "demo/SearchResultsPane.demo.tsx"
|
package/nav-manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stapel/search-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.33.1",
|
|
4
4
|
"description": "Headless React pair for stapel-search: a typed query client, TanStack Query hooks, and a URL-first state codec that makes a search shareable by construction (filters, ranges, geo, sort and the keyset cursor all live in the query string). Drill-down facets rendered with their remaining counts and with the server's own honesty flags — approximate, skipped, degraded — never swallowed; keyset pagination with the window refusal named; DSA Art. 26 `promoted` marking carried into every card slot and the P2B Art. 5 ranking disclosure exposed as data. Zero visual opinion in the main entry; an opt-in /default subpath ships the antd skin, and /router binds the codec to react-router's useSearchParams.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -57,9 +57,9 @@
|
|
|
57
57
|
"limit": "14.5 KB"
|
|
58
58
|
},
|
|
59
59
|
{
|
|
60
|
-
"name": "default — the antd skin (query box + a typeahead that offers CATEGORY destinations with their live counts, filters incl. ranges/geo/category slots + the phone chip row with its leading category chip and the location summary row + the rail's evidence-ranked disclosure groups, panel search and sticky count/clear footer, results incl. the view switch, the card photo GALLERY as a SkinCarousel strip, the empty state's derived exits, ranking, the dictionary control for a vocabulary facet, the popular-values block, the partition row in both its chip and segmented variants, the select-style dictionary FIELD the desktop rail opens, the from/to pickers a bounded integer axis draws and the rail's own scrollbar sheet) must stay out of the main bundle. Raised 24.5 → 25.5 KB for those four controls, then 25.5 → 26.25 KB for the chip row's APPLIED mode — one chip per applied value and per numeric bound, each removing that one constraint beside a rail that is already on screen (a storefront was carrying its own copy of it), then 26.25 → 27 KB for the \"search in other categories\" LINE — which is a net deletion on the page that mounts it, replacing a full-width block of one row per section that arrived after the results and pushed them, then 27 → 27.75 KB for the two frames the page now tells apart: the dictionary FIELD reaching `<SearchPage>` at all (per-layout default, field in the rail and inline in the sheet) and the footer bar being static in a column and sticky in a sheet, where it used to be pinned over the last two groups everywhere, then 27.75 → 28.5 KB for `categoryHref` on the other-categories line — a real `<a href>` per row with a modifier-click left to the browser, instead of a `<button>` with no address a person could open in a new tab, then 28.5 → 29.25 KB for the phone's dictionary SHEET — a trigger row over the shared `SkinPickerSheet` with a recommended band, an alphabetical rest paged fifty at a time and a draft committed in one write, which is the control the composer's vocabulary picker already was while the buyer got a wall of checkboxes, then 29.25 → 30.5 KB for the panel that draws all of it: groups and ranges as one ordered sequence with one «Apply» for the panel rather than one per row, the empty-group heading rule, `categoryFilter={false}` and the `resultsLead` slot for a page reached by walking the catalogue, `PopularValues columns=\\\"responsive\\\"` on a container query, `SortSelect` annotating a blocked option at every width, a loading arm that covers the whole pane (0.34 CLS on a live host), and the chip row reserving its own box (a further 0.045). Measured with dependencies held constant, this package's src at the commit before that work and then at it: 29.05 -> 30.16 KB — 1.11 KB, and every part of it is a shift or a mislabelled control a host was living with, then 30.5 -> 31 KB for `<SearchResultsPane columns>` and its pass-through on `<SearchPage resultsColumns>`: a fixed track count or a per-breakpoint map, emitted as a hoisted container-query sheet (the results block is the window minus a 280px rail, so a media query would answer about a width the cards never have). Measured with dependencies held constant, this package's src before and after: 30.40 -> 30.65 KB — 250 B, and what it replaces is a host's `!important` rule against a grid declaration it could not read back, then 31 -> 31.25 KB for the segmented partition being antd's `Segmented` rather than a row of buttons wearing a border: the walker read `data-variant=\"segmented\"` with `role=\"radiogroup\"` and found `.ant-segmented` zero times and `input[type=radio]` zero times (D304), so the cells are the design system's now — real radios under one name, the browser's own arrow keys and Tab stop. Measured with dependencies held constant, this package's src before and after: 30.95 -> 31.05 KB — 100 B, against ~30 lines of hand-rolled joined-row geometry deleted",
|
|
60
|
+
"name": "default — the antd skin (query box + a typeahead that offers CATEGORY destinations with their live counts, filters incl. ranges/geo/category slots + the phone chip row with its leading category chip and the location summary row + the rail's evidence-ranked disclosure groups, panel search and sticky count/clear footer, results incl. the view switch, the card photo GALLERY as a SkinCarousel strip, the empty state's derived exits, ranking, the dictionary control for a vocabulary facet, the popular-values block, the partition row in both its chip and segmented variants, the select-style dictionary FIELD the desktop rail opens, the from/to pickers a bounded integer axis draws and the rail's own scrollbar sheet) must stay out of the main bundle. Raised 24.5 → 25.5 KB for those four controls, then 25.5 → 26.25 KB for the chip row's APPLIED mode — one chip per applied value and per numeric bound, each removing that one constraint beside a rail that is already on screen (a storefront was carrying its own copy of it), then 26.25 → 27 KB for the \"search in other categories\" LINE — which is a net deletion on the page that mounts it, replacing a full-width block of one row per section that arrived after the results and pushed them, then 27 → 27.75 KB for the two frames the page now tells apart: the dictionary FIELD reaching `<SearchPage>` at all (per-layout default, field in the rail and inline in the sheet) and the footer bar being static in a column and sticky in a sheet, where it used to be pinned over the last two groups everywhere, then 27.75 → 28.5 KB for `categoryHref` on the other-categories line — a real `<a href>` per row with a modifier-click left to the browser, instead of a `<button>` with no address a person could open in a new tab, then 28.5 → 29.25 KB for the phone's dictionary SHEET — a trigger row over the shared `SkinPickerSheet` with a recommended band, an alphabetical rest paged fifty at a time and a draft committed in one write, which is the control the composer's vocabulary picker already was while the buyer got a wall of checkboxes, then 29.25 → 30.5 KB for the panel that draws all of it: groups and ranges as one ordered sequence with one «Apply» for the panel rather than one per row, the empty-group heading rule, `categoryFilter={false}` and the `resultsLead` slot for a page reached by walking the catalogue, `PopularValues columns=\\\"responsive\\\"` on a container query, `SortSelect` annotating a blocked option at every width, a loading arm that covers the whole pane (0.34 CLS on a live host), and the chip row reserving its own box (a further 0.045). Measured with dependencies held constant, this package's src at the commit before that work and then at it: 29.05 -> 30.16 KB — 1.11 KB, and every part of it is a shift or a mislabelled control a host was living with, then 30.5 -> 31 KB for `<SearchResultsPane columns>` and its pass-through on `<SearchPage resultsColumns>`: a fixed track count or a per-breakpoint map, emitted as a hoisted container-query sheet (the results block is the window minus a 280px rail, so a media query would answer about a width the cards never have). Measured with dependencies held constant, this package's src before and after: 30.40 -> 30.65 KB — 250 B, and what it replaces is a host's `!important` rule against a grid declaration it could not read back, then 31 -> 31.25 KB for the segmented partition being antd's `Segmented` rather than a row of buttons wearing a border: the walker read `data-variant=\"segmented\"` with `role=\"radiogroup\"` and found `.ant-segmented` zero times and `input[type=radio]` zero times (D304), so the cells are the design system's now — real radios under one name, the browser's own arrow keys and Tab stop. Measured with dependencies held constant, this package's src before and after: 30.95 -> 31.05 KB — 100 B, against ~30 lines of hand-rolled joined-row geometry deleted, then 31.25 -> 31.5 KB for the two PINNING seams: `<SearchPage railTop>` (the rail's sticky offset and its height cap moved together, so a rail under a 64px header still ends at the foot of the window) and `<SearchResultsPane stickyToolbar>` with the toolbar's own element in both header shapes. Measured with dependencies held constant, this package's src before and after: 31.05 -> 31.2 KB — 150 B, and what it replaces in one deployment is an `!important` over the pair's own inline geometry, a `:has()`, a `display: contents` and this pair's rail breakpoint restated in the host's media query",
|
|
61
61
|
"path": "dist/default/index.js",
|
|
62
|
-
"limit": "31.
|
|
62
|
+
"limit": "31.5 KB"
|
|
63
63
|
},
|
|
64
64
|
{
|
|
65
65
|
"name": "router — the react-router binding is opt-in; the main entry must never pull a router",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
* they were, plus `data-checked`, so a probe that reads a snapshot still has
|
|
49
49
|
* the chosen cell without asking the accessibility tree.
|
|
50
50
|
*/
|
|
51
|
-
import { useRef } from "react";
|
|
51
|
+
import { useEffect, useRef } from "react";
|
|
52
52
|
import type {
|
|
53
53
|
CSSProperties,
|
|
54
54
|
KeyboardEvent as ReactKeyboardEvent,
|
|
@@ -111,6 +111,47 @@ const ROW: CSSProperties = {
|
|
|
111
111
|
gap: spacing[2],
|
|
112
112
|
};
|
|
113
113
|
|
|
114
|
+
/** The keys that move the choice, in both variants. */
|
|
115
|
+
const ARROW_KEYS = new Set(["ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown"]);
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* D454 — WHEN AN ARROW KEY LAST MOVED A PARTITION, AS A TIMESTAMP.
|
|
119
|
+
*
|
|
120
|
+
* Module-scoped, and that is the load-bearing part rather than an oversight.
|
|
121
|
+
*
|
|
122
|
+
* Measured on the stand: the first `ArrowRight` moved "all" -> "new" AND
|
|
123
|
+
* navigated to `/c/novye` — which is what the control is FOR, the choice is a
|
|
124
|
+
* `category` in the URL — and after that navigation `document.activeElement`
|
|
125
|
+
* was `BODY`, so every further arrow press did nothing. The row is not the
|
|
126
|
+
* same row afterwards: the storefront resolves the new category's children,
|
|
127
|
+
* the rail unmounts while that is in flight and mounts again with fresh
|
|
128
|
+
* `items`, and antd's `Segmented` takes a new `useId()` name and renders new
|
|
129
|
+
* `input`s. A ref, a piece of state, a `useEffect` cleanup — everything that
|
|
130
|
+
* lives INSIDE the component instance dies with it, so the one fact that has
|
|
131
|
+
* to cross the remount cannot be kept there.
|
|
132
|
+
*
|
|
133
|
+
* The window is short and the flag is spent on use ({@link takeArrowMove}), so
|
|
134
|
+
* this can restore focus exactly once per keypress and never steals it from a
|
|
135
|
+
* page nobody was driving from the keyboard.
|
|
136
|
+
*/
|
|
137
|
+
let lastArrowMove = 0;
|
|
138
|
+
|
|
139
|
+
/** How long after an arrow press the row will still take its focus back. Long
|
|
140
|
+
* enough for a navigation and a refetch, short enough that a page left alone
|
|
141
|
+
* and returned to later is never grabbed. */
|
|
142
|
+
const FOCUS_RESTORE_WINDOW_MS = 2000;
|
|
143
|
+
|
|
144
|
+
function noteArrowMove(key: string): void {
|
|
145
|
+
if (ARROW_KEYS.has(key)) lastArrowMove = Date.now();
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/** True once, for the row that acts on it. */
|
|
149
|
+
function takeArrowMove(): boolean {
|
|
150
|
+
const fresh = lastArrowMove !== 0 && Date.now() - lastArrowMove < FOCUS_RESTORE_WINDOW_MS;
|
|
151
|
+
if (fresh) lastArrowMove = 0;
|
|
152
|
+
return fresh;
|
|
153
|
+
}
|
|
154
|
+
|
|
114
155
|
/** The row's cells, as `[value, label]` — the parent first, then the
|
|
115
156
|
* children in catalogue order. */
|
|
116
157
|
function cells(
|
|
@@ -154,6 +195,7 @@ export function PartitionChips(props: PartitionChipsProps): ReactElement {
|
|
|
154
195
|
const next = (index + step + options.length) % options.length;
|
|
155
196
|
const cell = options[next];
|
|
156
197
|
if (cell === undefined) return;
|
|
198
|
+
noteArrowMove(event.key);
|
|
157
199
|
props.onChange(cell[0]);
|
|
158
200
|
const buttons = row.current?.querySelectorAll<HTMLElement>('[role="radio"]');
|
|
159
201
|
buttons?.[next]?.focus();
|
|
@@ -165,6 +207,40 @@ export function PartitionChips(props: PartitionChipsProps): ReactElement {
|
|
|
165
207
|
const active = options.findIndex(([value]) => value === props.value);
|
|
166
208
|
const stop = active >= 0 ? active : 0;
|
|
167
209
|
|
|
210
|
+
/**
|
|
211
|
+
* D454 — after an arrow press, the CHOSEN cell holds the focus.
|
|
212
|
+
*
|
|
213
|
+
* Two different things are repaired by one effect, and the second is the one
|
|
214
|
+
* the stand measured:
|
|
215
|
+
*
|
|
216
|
+
* - within one mount, `Segmented`'s own handler moves the VALUE and leaves
|
|
217
|
+
* the focus on the cell it started from, so the focused radio and the
|
|
218
|
+
* checked radio disagree — and the control paints its focus ring on the
|
|
219
|
+
* checked one, which is not where the keyboard is;
|
|
220
|
+
* - across a REMOUNT — the choice is a `category`, so choosing navigates,
|
|
221
|
+
* and the rail comes back as new elements — the focus is on `<body>` and
|
|
222
|
+
* the row is unreachable by every further arrow press without a Tab.
|
|
223
|
+
*
|
|
224
|
+
* Keyed on `props.value` and on mount, gated by {@link takeArrowMove}, so a
|
|
225
|
+
* page loaded, clicked, or scrolled is never grabbed: only the row whose
|
|
226
|
+
* arrow key started this takes the focus, and it takes it once.
|
|
227
|
+
*/
|
|
228
|
+
useEffect(() => {
|
|
229
|
+
const root = row.current;
|
|
230
|
+
if (root === null) return;
|
|
231
|
+
if (!takeArrowMove()) return;
|
|
232
|
+
const focused = document.activeElement;
|
|
233
|
+
// Somewhere else on purpose — a dialog, a field the person tabbed into
|
|
234
|
+
// while the answer was in flight — is not ours to overrule. `<body>` is
|
|
235
|
+
// what a remount leaves behind, and inside the row is the intra-mount case
|
|
236
|
+
// where focus and selection have to be brought back together.
|
|
237
|
+
if (focused !== null && focused !== document.body && !root.contains(focused)) return;
|
|
238
|
+
const cells_ = root.querySelectorAll<HTMLElement>(
|
|
239
|
+
'input[type="radio"], [role="radio"]'
|
|
240
|
+
);
|
|
241
|
+
cells_[stop]?.focus();
|
|
242
|
+
}, [props.value, stop]);
|
|
243
|
+
|
|
168
244
|
const name = props.label ?? t(SEARCH_I18N_KEYS.partitionLabel);
|
|
169
245
|
|
|
170
246
|
if (props.variant === "segmented") {
|
|
@@ -178,10 +254,19 @@ export function PartitionChips(props: PartitionChipsProps): ReactElement {
|
|
|
178
254
|
<Segmented
|
|
179
255
|
block
|
|
180
256
|
size="small"
|
|
257
|
+
ref={row}
|
|
181
258
|
role="radiogroup"
|
|
182
259
|
aria-label={name}
|
|
183
260
|
data-variant="segmented"
|
|
184
261
|
data-testid="partition-chips"
|
|
262
|
+
/* The keypress is noted where it HAPPENS, before antd's own handler
|
|
263
|
+
turns it into a value change and the host turns that into a
|
|
264
|
+
navigation. Capture, because the cell's `input` is where the event
|
|
265
|
+
lands and the row is only its ancestor — and note only, so the
|
|
266
|
+
control's own arrow handling is untouched. */
|
|
267
|
+
onKeyDownCapture={(event) => {
|
|
268
|
+
noteArrowMove(event.key);
|
|
269
|
+
}}
|
|
185
270
|
value={props.value ?? ALL}
|
|
186
271
|
options={options.map(([value, label]) => ({
|
|
187
272
|
value: value ?? ALL,
|