@stapel/search-react 0.21.0 → 0.22.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 (62) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/README.md +65 -2
  3. package/dist/api/types.d.ts +24 -3
  4. package/dist/api/types.d.ts.map +1 -1
  5. package/dist/api/types.js.map +1 -1
  6. package/dist/default/FacetGroupControl.d.ts +34 -4
  7. package/dist/default/FacetGroupControl.d.ts.map +1 -1
  8. package/dist/default/FacetGroupControl.js +112 -7
  9. package/dist/default/FacetGroupControl.js.map +1 -1
  10. package/dist/default/PartitionChips.d.ts +23 -0
  11. package/dist/default/PartitionChips.d.ts.map +1 -0
  12. package/dist/default/PartitionChips.js +94 -0
  13. package/dist/default/PartitionChips.js.map +1 -0
  14. package/dist/default/PopularValues.d.ts +58 -0
  15. package/dist/default/PopularValues.d.ts.map +1 -0
  16. package/dist/default/PopularValues.js +46 -0
  17. package/dist/default/PopularValues.js.map +1 -0
  18. package/dist/default/index.d.ts +5 -1
  19. package/dist/default/index.d.ts.map +1 -1
  20. package/dist/default/index.js +6 -1
  21. package/dist/default/index.js.map +1 -1
  22. package/dist/headless/useFacetLabels.js +7 -7
  23. package/dist/headless/useFacetLabels.js.map +1 -1
  24. package/dist/i18n/es.d.ts.map +1 -1
  25. package/dist/i18n/es.js +6 -0
  26. package/dist/i18n/es.js.map +1 -1
  27. package/dist/i18n/keys.d.ts +30 -0
  28. package/dist/i18n/keys.d.ts.map +1 -1
  29. package/dist/i18n/keys.js +37 -0
  30. package/dist/i18n/keys.js.map +1 -1
  31. package/dist/i18n/ru.d.ts.map +1 -1
  32. package/dist/i18n/ru.js +6 -0
  33. package/dist/i18n/ru.js.map +1 -1
  34. package/dist/index.d.ts +3 -2
  35. package/dist/index.d.ts.map +1 -1
  36. package/dist/index.js +1 -0
  37. package/dist/index.js.map +1 -1
  38. package/dist/state/facets.d.ts +26 -6
  39. package/dist/state/facets.d.ts.map +1 -1
  40. package/dist/state/facets.js +72 -15
  41. package/dist/state/facets.js.map +1 -1
  42. package/dist/state/translit.d.ts +58 -0
  43. package/dist/state/translit.d.ts.map +1 -0
  44. package/dist/state/translit.js +115 -0
  45. package/dist/state/translit.js.map +1 -0
  46. package/llms.txt +3 -1
  47. package/manifest.json +38 -1
  48. package/nav-manifest.json +1 -1
  49. package/package.json +7 -7
  50. package/src/analytics/generated/events.json +1 -1
  51. package/src/api/types.ts +29 -3
  52. package/src/default/FacetGroupControl.tsx +213 -8
  53. package/src/default/PartitionChips.tsx +161 -0
  54. package/src/default/PopularValues.tsx +151 -0
  55. package/src/default/index.ts +15 -0
  56. package/src/headless/useFacetLabels.ts +7 -7
  57. package/src/i18n/es.ts +6 -0
  58. package/src/i18n/keys.ts +38 -0
  59. package/src/i18n/ru.ts +6 -0
  60. package/src/index.ts +9 -0
  61. package/src/state/facets.ts +107 -27
  62. package/src/state/translit.ts +113 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,55 @@
1
1
  # @stapel/search-react
2
2
 
3
+ ## 0.22.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 65e0c9f: search: headings come from the server, a vocabulary becomes a dictionary, and two browse surfaces for a category page
8
+
9
+ **A heading is named, or it is marked.** Group headings and option captions now
10
+ resolve in one stated order — `facet_labels` from the answer, then the category
11
+ feature definition, then the raw slug. The slug arm is not a fallback anyone may
12
+ ship: it renders, because a heading a person cannot read still beats options
13
+ with no heading at all, and it renders MARKED — `labelSource: "none"` on the
14
+ group and the option, `data-label-source` on the drawn control, and one
15
+ `console.warn` per slug outside production, so a storefront's own test fails on
16
+ it. Measured on a live classified's cars branch the page passed an empty feature
17
+ list and the whole rail was raw index slugs: the make group was on screen,
18
+ unlabelled, and the complaint that came back was "I cannot pick a make".
19
+ `FacetGroup` and `FacetOption` both carry `labelSource`
20
+ (`"server" | "schema" | "host" | "none"`) — "did anybody actually name this?" is
21
+ a question two surfaces have to answer and neither can answer by reading the
22
+ string.
23
+
24
+ **A vocabulary level is a DICTIONARY.** Past eight counted buckets a
25
+ `ref_select` group — or an untyped group that long, which is the live case where
26
+ no schema was threaded through — stops being eight checkboxes plus a
27
+ `Show all (418)` and becomes the busiest values, a search box over the rest, and
28
+ the chosen values pinned above it where a filter cannot go invisible. The box
29
+ matches ACROSS ALPHABETS: `тойота` finds `Toyota`, `тимберленд` finds
30
+ `Timberland`, `ровер` finds `Land Rover`. That is a prefix rule over two keys
31
+ per word — a transliteration, and its consonant skeleton, because the two
32
+ scripts disagree exactly on the vowels of a borrowed name (`timberlend` vs
33
+ `timberland`, both `tmbrlnd`). Table-driven and dependency-free, and local: the
34
+ buckets are already in the answer, so nothing is requested per keystroke.
35
+ `facetGroupShape` gains a `"dictionary"` arm beside `segmented`/`nested`/
36
+ `checkbox`, and the threshold counts EVIDENCE buckets — a zero-filled option
37
+ table or a schema-only tail is still a list a person can read.
38
+
39
+ **`<PopularValues>`** prints the busiest values of one group as a multi-column
40
+ `Toyota 802` block that applies the filter on click — a table of contents for a
41
+ category, drawn from the same drill-down counts the panel shows, so a value
42
+ cannot read `802` in one place and `93` in the other. `hidden` is a PROP rather
43
+ than a media query inside: whether a 390px screen has room for forty links is a
44
+ fact about the page, and the page is the storefront's.
45
+
46
+ **`<PartitionChips>`** is the single-select row a `chips` category draws instead
47
+ of a tile grid: `Все | child…` from `{id, path, name}`, controlled — the choice
48
+ is a `category` in the URL, not state in a chip row. It is a real `radiogroup`
49
+ with roving tabindex and arrow keys, because exactly one of them is true at a
50
+ time and a row of `aria-pressed` toggles announces the opposite: independent
51
+ switches, with no reason why pressing one released another.
52
+
3
53
  ## 0.21.0
4
54
 
5
55
  ### Minor Changes
package/README.md CHANGED
@@ -141,6 +141,69 @@ the raw value; a value nobody names keeps printing itself. `renderCategoryFilter
141
141
  also becomes the leading chip of the phone filter row, which is where the
142
142
  catalogue's deeper levels are chosen on a result list.
143
143
 
144
+ ## A heading is named by the server, or it is marked
145
+
146
+ Group headings and option captions resolve in one order and one only:
147
+ `facet_labels` from the answer → the category feature definition → the raw
148
+ slug. The last arm is not a fallback anyone ships: it renders (a heading a
149
+ person cannot read still beats options with no heading), and it renders
150
+ **marked** — `labelSource: "none"` on the group, `data-label-source="none"` on
151
+ the drawn control, and one `console.warn` per slug outside production. A
152
+ storefront's own test asserts on that attribute; measured on a live cars branch
153
+ the whole rail was raw slugs and the complaint that came back was "I cannot
154
+ pick a make".
155
+
156
+ Every `FacetGroup` and every `FacetOption` carries `labelSource:
157
+ "server" | "schema" | "host" | "none"`, so "did anybody actually name this?" is
158
+ answerable without looking at the string.
159
+
160
+ ## A vocabulary is a dictionary, not a checkbox list
161
+
162
+ Past eight **evidence buckets** a `ref_select` group (or an untyped group that
163
+ long — the live case, where no schema was threaded through) stops being a list
164
+ and becomes a dictionary: the busiest values, a search box that filters them
165
+ locally, and the chosen values pinned above the box so a filter is never
166
+ invisible. The box matches **across alphabets** — `тойота` finds `Toyota`,
167
+ `тимберленд` finds `Timberland`, `ровер` finds `Land Rover` — by a prefix rule
168
+ over two keys per word, a transliteration and its consonant skeleton
169
+ (`translitPrefixMatch`, `translitKey`, `consonantKey`; table-driven, no
170
+ dependency). No request per keystroke: the whole bucket list is already in the
171
+ answer — stapel-search caps a vocabulary-backed group at
172
+ `MAX_FACET_VALUES_VOCABULARY` (1000, raised from the shared 200 for exactly
173
+ this), so a 418-term make dictionary arrives whole and the box has everything
174
+ it filters.
175
+
176
+ ```tsx
177
+ facetGroupShape(group) // "segmented" | "nested" | "checkbox" | "dictionary"
178
+ isDictionaryFacet(group) // > FACET_DICTIONARY_THRESHOLD counted buckets
179
+ ```
180
+
181
+ ## Two browse surfaces the page places
182
+
183
+ Both are exported from `./default` and neither lays itself out — where they
184
+ belong on a category page is the storefront's decision.
185
+
186
+ `<PopularValues>` prints the busiest values of one group as a multi-column
187
+ `Toyota 802` list that applies the filter on click — a table of contents for a
188
+ category, from the same drill-down counts the panel shows. `hidden` is a prop,
189
+ not a media query: whether a 390px screen has room is a fact about the page.
190
+
191
+ ```tsx
192
+ <PopularValues group={firstRefSelect} onApply={toggle} hidden={isPhone}
193
+ onShowAll={openPanel} />
194
+ ```
195
+
196
+ `<PartitionChips>` is the single-select row a `chips` category draws instead of
197
+ a tile grid: `Все | child…` from `{id, path, name}`, controlled (the choice is
198
+ a `category` in the URL), a real `radiogroup` with roving tabindex and arrow
199
+ keys — because exactly one of them is true at a time, and `aria-pressed`
200
+ toggles say the opposite.
201
+
202
+ ```tsx
203
+ <PartitionChips items={children} value={state.category ?? null}
204
+ onChange={(path) => patch({ category: path })} />
205
+ ```
206
+
144
207
  ## What the server admits, the screen repeats
145
208
 
146
209
  | The envelope says | The page says |
@@ -191,10 +254,10 @@ the configured engine cannot evaluate.
191
254
  | Layer | Exports |
192
255
  |---|---|
193
256
  | api | `createSearchApi`, `searchQueryParams`, `SEARCH_SORTS`, wire types |
194
- | state (pure) | `parseSearchState`, `writeSearchState`, `patchSearchState`, `toggleFilterValue`, `setFilterValues`, `setRangeValue`, `clearFilters`, `activeFilterCount`, `parseDegradations`, `countIsEstimate`, `buildFacetGroups`, `facetOptionLabel` |
257
+ | state (pure) | `parseSearchState`, `writeSearchState`, `patchSearchState`, `toggleFilterValue`, `setFilterValues`, `setRangeValue`, `clearFilters`, `activeFilterCount`, `parseDegradations`, `countIsEstimate`, `buildFacetGroups`, `facetOptionLabel`, `translitPrefixMatch`, `translitKey`, `consonantKey` |
195
258
  | model | `createSearchRuntime`, `searchQueryKeys`, `useSearchQuery`, `useRankingDisclosure` |
196
259
  | headless | `SearchProvider`, `SearchStateProvider`/`useSearchState`, `SearchResults`, `FacetPanel`, `RankingDisclosure` |
197
- | `./default` | `SearchPage`, `SearchResultsPane`, `FacetPanelPane`, `RankingDisclosurePane`, `SearchBox`, `SortSelect`, `PageSizeSelect`, `LanguageSelect`, `SearchResultCard`, `RangeFilterRow`, `DegradationNotice`, `UrlIssueNotice` (the skin themes itself through `SkinTheme` from `@stapel/tokens-antd/skin`; the pair's own `SearchSkinTheme` is gone as of 0.6.0) |
260
+ | `./default` | `SearchPage`, `SearchResultsPane`, `FacetPanelPane`, `RankingDisclosurePane`, `SearchBox`, `SortSelect`, `PageSizeSelect`, `LanguageSelect`, `SearchResultCard`, `RangeFilterRow`, `DegradationNotice`, `UrlIssueNotice`, `PopularValues`, `PartitionChips`, `facetGroupShape`, `isDictionaryFacet` (the skin themes itself through `SkinTheme` from `@stapel/tokens-antd/skin`; the pair's own `SearchSkinTheme` is gone as of 0.6.0) |
198
261
  | `./router` | `useRouterSearchParams` |
199
262
  | i18n | `registerSearchI18n` (+ `./i18n/ru`, `./i18n/es`) |
200
263
  | errors | `SEARCH_ERRORS`, `explainSearchError`, `SEARCH_WINDOW_EXCEEDED`, `SEARCH_BACKEND_UNAVAILABLE` |
@@ -11,10 +11,31 @@
11
11
  import type { components } from "./generated/schema.js";
12
12
  /** The generated schema table — the one source of truth for wire shapes. */
13
13
  export type Schemas = components["schemas"];
14
- /** `GET /query` 200 — the whole envelope. Corrected in one place: see
15
- * {@link FacetMeta}. */
16
- export type SearchResponse = Omit<Schemas["SearchResponse"], "facet_meta"> & {
14
+ /**
15
+ * One slug's captions: the GROUP's own name, and the words for its values.
16
+ *
17
+ * `label` is the group heading the server resolved from the category's
18
+ * feature definition, in the request's own language. It is the only source
19
+ * that always exists — `categoryFeatures` is an optional slot a live
20
+ * classified board never filled, and without it every heading in the panel
21
+ * was the raw index slug. `null` is the server saying it has no name for the
22
+ * slug either; ABSENT is a server too old to send one, and both read the same
23
+ * way here (fall through to the schema).
24
+ *
25
+ * WHAT THE GENERATOR LOST: the field is newer than this pair's pinned
26
+ * `schema.json`, so it is declared here as optional-and-nullable rather than
27
+ * regenerated into a shape a deployed older server does not send.
28
+ */
29
+ export type FacetLabels = Schemas["FacetLabels"] & {
30
+ readonly label?: string | null;
31
+ };
32
+ /** `facet_labels` as a whole: `{slug: {label, translatable, values}}`. */
33
+ export type FacetLabelsMap = Readonly<Record<string, FacetLabels>>;
34
+ /** `GET /query` 200 — the whole envelope. Corrected in two places: see
35
+ * {@link FacetMeta} and {@link FacetLabels}. */
36
+ export type SearchResponse = Omit<Schemas["SearchResponse"], "facet_meta" | "facet_labels"> & {
17
37
  readonly facet_meta: FacetMeta;
38
+ readonly facet_labels: FacetLabelsMap;
18
39
  };
19
40
  /** One result row. `promoted` is present on EVERY item under EVERY sort — a
20
41
  * mandatory marking (DSA Art. 26), not an optional field, which is why the
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/api/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAExD,4EAA4E;AAC5E,MAAM,MAAM,OAAO,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC;AAE5C;wBACwB;AACxB,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,EAAE,YAAY,CAAC,GAAG;IAC3E,QAAQ,CAAC,UAAU,EAAE,SAAS,CAAC;CAChC,CAAC;AAEF;;0EAE0E;AAC1E,MAAM,MAAM,UAAU,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;AAE/C;;;;;;GAMG;AACH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,4EAA4E;IAC5E,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,6DAA6D;IAC7D,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED,iDAAiD;AACjD,MAAM,WAAW,kBAAkB;IACjC;;sEAEkE;IAClE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;;GAUG;AACH,MAAM,MAAM,SAAS,GAAG,IAAI,CAC1B,OAAO,CAAC,WAAW,CAAC,EACpB,UAAU,GAAG,YAAY,CAC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X,YAAY;IACZ,UAAU;CACX,CAAC"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/api/types.ts"],"names":[],"mappings":"AAoLA;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,sBAAsB,CAAC;AAElE;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,iBAAiB,CAAC;AAEzD;;;;;;GAMG;AACH,MAAM,UAAU,YAAY,CAAC,MAAiC;IAC5D,OAAO,MAAM,EAAE,KAAK,IAAI,MAAM,EAAE,KAAK,IAAI,EAAE,CAAC;AAC9C,CAAC;AAQD;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,YAAY,GAAsB;IAC7C,WAAW;IACX,QAAQ;IACR,WAAW;IACX,YAAY;IACZ,UAAU;CACX,CAAC"}
@@ -9,8 +9,14 @@ import type { FacetGroup, FacetOption } from "../state/facets.js";
9
9
  * leaves a group of seven whole rather than truncated by one row.
10
10
  */
11
11
  export declare const FACET_VISIBLE_OPTIONS = 8;
12
- /** The three shapes a facet group takes. */
13
- export type FacetGroupShape = "segmented" | "nested" | "checkbox";
12
+ /**
13
+ * From how many values a group stops being a list and becomes a DICTIONARY —
14
+ * the same eight, because it is the same fold: past it the group is drawn as
15
+ * its busiest values plus a box that searches the rest.
16
+ */
17
+ export declare const FACET_DICTIONARY_THRESHOLD: number;
18
+ /** The four shapes a facet group takes. */
19
+ export type FacetGroupShape = "segmented" | "nested" | "checkbox" | "dictionary";
14
20
  /** The option rows of a group, already nested where the schema nests them. */
15
21
  export interface FacetOptionNode {
16
22
  readonly option: FacetOption;
@@ -18,10 +24,34 @@ export interface FacetOptionNode {
18
24
  readonly depth: number;
19
25
  }
20
26
  /**
21
- * Which of the three shapes a group takes.
27
+ * Is this group a DICTIONARY a vocabulary's level, too long to scroll?
28
+ *
29
+ * Two ways to be one, because the schema is an optional slot and the live
30
+ * case is the one where it is empty:
31
+ *
32
+ * - the def types the slug `ref_select`/`ref_hierarchical_select`, i.e. its
33
+ * config is a POINTER into a vocabulary and there was never an option
34
+ * table to draw;
35
+ * - there is NO def at all and the answer came back with more values than a
36
+ * fold. At a live classified's cars branch the storefront passed an empty
37
+ * feature list, so the 418 makes arrived as an unnamed, untyped group of
38
+ * 418 checkboxes behind "Show all (418)". A box is the only control that
39
+ * answers that, and refusing to draw one because the schema is missing
40
+ * punishes the buyer for the wiring.
41
+ *
42
+ * Either way it takes more than {@link FACET_DICTIONARY_THRESHOLD} EVIDENCE
43
+ * buckets — values the answer actually counted. A zero-filled option table or
44
+ * a schema-only tail is a list a person can already read, and a box over it
45
+ * would search for values no document carries.
46
+ */
47
+ export declare function isDictionaryFacet(group: FacetGroup): boolean;
48
+ /**
49
+ * Which of the four shapes a group takes.
22
50
  *
23
51
  * Order matters: a hierarchical facet is nested even when it is single-choice,
24
- * because losing the tree costs more than losing the pills.
52
+ * because losing the tree costs more than losing the pills; and a dictionary
53
+ * is a dictionary before it is a checkbox list, because the checkbox list is
54
+ * the shape it was drawn as when nobody could pick a make.
25
55
  */
26
56
  export declare function facetGroupShape(group: FacetGroup): FacetGroupShape;
27
57
  /** The group's options in render order, carrying the depth the schema gives. */
@@ -1 +1 @@
1
- {"version":3,"file":"FacetGroupControl.d.ts","sourceRoot":"","sources":["../../src/default/FacetGroupControl.tsx"],"names":[],"mappings":"AA4DA,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,OAAO,CAAC;AAMzD,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGlE;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,IAAI,CAAC;AAEvC,4CAA4C;AAC5C,MAAM,MAAM,eAAe,GAAG,WAAW,GAAG,QAAQ,GAAG,UAAU,CAAC;AAElE,8EAA8E;AAC9E,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAC7B,2EAA2E;IAC3E,QAAQ,CAAC,KAAK,EA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AA2E;IAC3E,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAwCD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAS5D;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,UAAU,GAAG,eAAe,CAOlE;AAWD,gFAAgF;AAChF,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,UAAU,GAAG,SAAS,eAAe,EAAE,CAkC9E;AAwRD,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACzD;2EACuE;IACvE,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAC3B;gFAC4E;IAC5E,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxC;;;;;OAKG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;IAC/B;uEACmE;IACnE,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,GAAG,YAAY,CAmI7E"}
@@ -20,6 +20,11 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
20
20
  * 3. **A 60-option facet is not a list, it is a wall.** Every catalogue has
21
21
  * one — brand, model, city — and printing all of it pushes every group
22
22
  * under it off the screen.
23
+ * 4. **A vocabulary is not a long list, it is a DICTIONARY.** 418 car makes
24
+ * behind "Show all (418)" is a control whose only mode is "read all of
25
+ * it": the busiest values, a box, and the rest reachable by typing is the
26
+ * only shape that answers "I want a Toyota" in one gesture. See
27
+ * {@link isDictionaryFacet}.
23
28
  *
24
29
  * ── The presentation is DERIVED, never configured here ────────────────────
25
30
  *
@@ -59,10 +64,11 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
59
64
  * nothing. Chosen options are always visible, wherever their count went.
60
65
  */
61
66
  import { useState } from "react";
62
- import { Button, Checkbox, Flex, Typography } from "antd";
67
+ import { Button, Checkbox, Flex, Input, Typography } from "antd";
63
68
  import { useT } from "@stapel/core";
64
69
  import { radii, spacing } from "@stapel/tokens";
65
- import { featureConfig, featureType } from "@stapel/attributes-react";
70
+ import { VOCABULARY_BACKED_TYPES, featureConfig, featureType, } from "@stapel/attributes-react";
71
+ import { translitPrefixMatch } from "../state/translit.js";
66
72
  import { SEARCH_I18N_KEYS } from "../i18n/keys.js";
67
73
  /**
68
74
  * How many options a group shows before the rest go behind "Show all".
@@ -73,6 +79,12 @@ import { SEARCH_I18N_KEYS } from "../i18n/keys.js";
73
79
  * leaves a group of seven whole rather than truncated by one row.
74
80
  */
75
81
  export const FACET_VISIBLE_OPTIONS = 8;
82
+ /**
83
+ * From how many values a group stops being a list and becomes a DICTIONARY —
84
+ * the same eight, because it is the same fold: past it the group is drawn as
85
+ * its busiest values plus a box that searches the rest.
86
+ */
87
+ export const FACET_DICTIONARY_THRESHOLD = FACET_VISIBLE_OPTIONS;
76
88
  function numberish(value) {
77
89
  return typeof value === "number" && Number.isFinite(value) ? value : undefined;
78
90
  }
@@ -108,17 +120,52 @@ function singleChoice(feature) {
108
120
  return numberish(featureConfig(feature)["maxSelected"]) === 1;
109
121
  }
110
122
  /**
111
- * Which of the three shapes a group takes.
123
+ * Is this group a DICTIONARY a vocabulary's level, too long to scroll?
124
+ *
125
+ * Two ways to be one, because the schema is an optional slot and the live
126
+ * case is the one where it is empty:
127
+ *
128
+ * - the def types the slug `ref_select`/`ref_hierarchical_select`, i.e. its
129
+ * config is a POINTER into a vocabulary and there was never an option
130
+ * table to draw;
131
+ * - there is NO def at all and the answer came back with more values than a
132
+ * fold. At a live classified's cars branch the storefront passed an empty
133
+ * feature list, so the 418 makes arrived as an unnamed, untyped group of
134
+ * 418 checkboxes behind "Show all (418)". A box is the only control that
135
+ * answers that, and refusing to draw one because the schema is missing
136
+ * punishes the buyer for the wiring.
137
+ *
138
+ * Either way it takes more than {@link FACET_DICTIONARY_THRESHOLD} EVIDENCE
139
+ * buckets — values the answer actually counted. A zero-filled option table or
140
+ * a schema-only tail is a list a person can already read, and a box over it
141
+ * would search for values no document carries.
142
+ */
143
+ export function isDictionaryFacet(group) {
144
+ const buckets = group.options.filter((option) => option.count !== null && option.count > 0).length;
145
+ if (buckets <= FACET_DICTIONARY_THRESHOLD)
146
+ return false;
147
+ const feature = group.feature;
148
+ if (feature === undefined)
149
+ return true;
150
+ const type = featureType(feature);
151
+ return type !== undefined && VOCABULARY_BACKED_TYPES.includes(type);
152
+ }
153
+ /**
154
+ * Which of the four shapes a group takes.
112
155
  *
113
156
  * Order matters: a hierarchical facet is nested even when it is single-choice,
114
- * because losing the tree costs more than losing the pills.
157
+ * because losing the tree costs more than losing the pills; and a dictionary
158
+ * is a dictionary before it is a checkbox list, because the checkbox list is
159
+ * the shape it was drawn as when nobody could pick a make.
115
160
  */
116
161
  export function facetGroupShape(group) {
117
162
  const feature = group.feature;
118
163
  if (feature !== undefined && featureType(feature) === "hierarchical_select") {
119
164
  return "nested";
120
165
  }
121
- return singleChoice(feature) ? "segmented" : "checkbox";
166
+ if (singleChoice(feature))
167
+ return "segmented";
168
+ return isDictionaryFacet(group) ? "dictionary" : "checkbox";
122
169
  }
123
170
  /**
124
171
  * Is this node in the group's uncounted tail — an option with no evidence
@@ -234,6 +281,64 @@ function ChevronGlyph(props) {
234
281
  ...(props.open ? { transform: "rotate(180deg)" } : {}),
235
282
  }, children: _jsx("path", { d: "m6 9 6 6 6-6" }) }));
236
283
  }
284
+ /**
285
+ * The list a dictionary scrolls in. A vocabulary level is 418 makes: without
286
+ * a ceiling the group alone is longer than the rail, and the box that filters
287
+ * it scrolls off the top of the panel while you type into it.
288
+ */
289
+ const DICTIONARY_LIST = {
290
+ maxBlockSize: 320,
291
+ overflowY: "auto",
292
+ // The scroll must not clip a focus ring against the panel's edge.
293
+ paddingInlineEnd: spacing[1],
294
+ };
295
+ /**
296
+ * A dictionary group: what is CHOSEN, a box, and the busiest values.
297
+ *
298
+ * ── Why the chosen values are their own block ─────────────────────────────
299
+ *
300
+ * They are the only rows that are not free to leave. A person who filtered by
301
+ * `Toyota` and then typed `bmw` must still be able to see — and undo — the
302
+ * filter that is narrowing what they are reading; a checkbox that scrolls out
303
+ * of the fold takes its own off-switch with it. So the chosen rows sit above
304
+ * the box, out of the filtered list entirely, and the list below never
305
+ * repeats them.
306
+ *
307
+ * ── The box filters LOCALLY, and matches across alphabets ─────────────────
308
+ *
309
+ * The buckets are already on the client — they arrived with the answer — so
310
+ * the box is a filter over an array and not a request per keystroke.
311
+ * `translitPrefixMatch` is what makes it usable in a catalogue whose values
312
+ * are Latin and whose buyers type Cyrillic: a Cyrillic "timberlend" finds
313
+ * `Timberland`.
314
+ * It is presentation, exactly like the panel's own search: nothing here
315
+ * touches the URL, because what a person typed to FIND a filter is not part
316
+ * of the search they would share.
317
+ */
318
+ function DictionaryBody(props) {
319
+ const t = useT();
320
+ const { group } = props;
321
+ const [needle, setNeedle] = useState("");
322
+ const [expanded, setExpanded] = useState(false);
323
+ const chosen = group.options.filter((option) => option.selected);
324
+ const rest = [...group.options.filter((option) => !option.selected)].sort((a, b) => (b.count ?? 0) - (a.count ?? 0));
325
+ const query = needle.trim();
326
+ const matched = query === ""
327
+ ? rest
328
+ : rest.filter((option) => translitPrefixMatch(query, option.label) ||
329
+ translitPrefixMatch(query, option.value));
330
+ // The fold only exists while nothing is typed: a query has already narrowed
331
+ // the list, and hiding its tail behind "Show all" would hide the answer.
332
+ const folded = query === "" && !expanded && matched.length > props.visible;
333
+ const shown = folded ? matched.slice(0, props.visible) : matched;
334
+ return (_jsxs(Flex, { vertical: true, gap: spacing[1], "data-testid": `facet-dictionary-${group.slug}`, children: [chosen.length > 0 && (_jsxs(Flex, { vertical: true, gap: spacing[1], "data-testid": `facet-dictionary-chosen-${group.slug}`, children: [_jsx(Typography.Text, { type: "secondary", children: t(SEARCH_I18N_KEYS.facetsDictionaryChosen) }), chosen.map((option) => (_jsx(CheckboxRow, { group: group, node: { option, depth: 0 }, onToggle: props.onToggle }, option.value)))] })), _jsx(Input, { allowClear: true, size: "small", value: needle, placeholder: t(SEARCH_I18N_KEYS.facetsDictionarySearch), "aria-label": t(SEARCH_I18N_KEYS.facetsDictionarySearch), "data-testid": `facet-dictionary-search-${group.slug}`, onChange: (event) => {
335
+ setNeedle(event.target.value);
336
+ } }), shown.length === 0 ? (_jsx(Typography.Text, { type: "secondary", "data-testid": `facet-dictionary-empty-${group.slug}`, children: t(SEARCH_I18N_KEYS.facetsDictionaryEmpty) })) : (_jsx(Flex, { vertical: true, gap: spacing[1], style: DICTIONARY_LIST, children: shown.map((option) => (_jsx(CheckboxRow, { group: group, node: { option, depth: 0 }, onToggle: props.onToggle }, option.value))) })), query === "" && matched.length > props.visible && (_jsx(Button, { type: "link", size: "small", style: { alignSelf: "flex-start", paddingInline: 0 }, "data-testid": `facet-more-${group.slug}`, "data-analytics": "none", "data-analytics-reason": "expanding a filter group is a read, not a flow step", onClick: () => {
337
+ setExpanded((was) => !was);
338
+ }, children: expanded
339
+ ? t(SEARCH_I18N_KEYS.facetsShowLess)
340
+ : t(SEARCH_I18N_KEYS.facetsShowAll, { count: matched.length }) }))] }));
341
+ }
237
342
  export function FacetGroupControl(props) {
238
343
  const t = useT();
239
344
  const { group } = props;
@@ -259,10 +364,10 @@ export function FacetGroupControl(props) {
259
364
  const shown = folded && !expanded
260
365
  ? nodes.slice(0, Math.min(limit ?? nodes.length, nodes.length - demoted))
261
366
  : nodes;
262
- return (_jsxs(Flex, { vertical: true, gap: shape === "segmented" ? spacing[2] : spacing[1], "data-testid": `facet-group-${group.slug}`, "data-counted": group.counted ? "true" : "false", "data-shape": shape, children: [props.heading !== false &&
367
+ return (_jsxs(Flex, { vertical: true, gap: shape === "segmented" ? spacing[2] : spacing[1], "data-testid": `facet-group-${group.slug}`, "data-counted": group.counted ? "true" : "false", "data-shape": shape, "data-label-source": group.labelSource, children: [props.heading !== false &&
263
368
  (disclosure ? (_jsxs("button", { type: "button", style: DISCLOSURE_HEADER, "aria-expanded": open, "data-testid": `facet-toggle-${group.slug}`, "data-analytics": "none", "data-analytics-reason": "opening a filter group is a read, not a flow step", onClick: () => {
264
369
  setOpenState((was) => !was);
265
- }, children: [_jsx(Typography.Text, { strong: true, children: group.label }), group.selected.length > 0 && (_jsx(Typography.Text, { type: "secondary", "data-testid": `facet-toggle-count-${group.slug}`, children: group.selected.length })), _jsx(ChevronGlyph, { open: open })] })) : (_jsx(Typography.Text, { strong: true, children: group.label }))), open && (_jsxs(_Fragment, { children: [shape === "segmented" ? (_jsx(Flex, { wrap: true, gap: spacing[2], children: shown.map((node) => (_jsx(OptionPill, { group: group, option: node.option, onToggle: props.onToggle }, node.option.value))) })) : (shown.map((node) => (_jsx(CheckboxRow, { group: group, node: node, onToggle: props.onToggle }, node.option.value)))), folded && (_jsx(Button, { type: "link", size: "small", style: { alignSelf: "flex-start", paddingInline: 0 }, "data-testid": `facet-more-${group.slug}`, "data-analytics": "none", "data-analytics-reason": "expanding a filter group is a read, not a flow step", onClick: () => {
370
+ }, children: [_jsx(Typography.Text, { strong: true, children: group.label }), group.selected.length > 0 && (_jsx(Typography.Text, { type: "secondary", "data-testid": `facet-toggle-count-${group.slug}`, children: group.selected.length })), _jsx(ChevronGlyph, { open: open })] })) : (_jsx(Typography.Text, { strong: true, children: group.label }))), open && shape === "dictionary" && (_jsx(DictionaryBody, { group: group, onToggle: props.onToggle, visible: limit ?? FACET_VISIBLE_OPTIONS })), open && shape !== "dictionary" && (_jsxs(_Fragment, { children: [shape === "segmented" ? (_jsx(Flex, { wrap: true, gap: spacing[2], children: shown.map((node) => (_jsx(OptionPill, { group: group, option: node.option, onToggle: props.onToggle }, node.option.value))) })) : (shown.map((node) => (_jsx(CheckboxRow, { group: group, node: node, onToggle: props.onToggle }, node.option.value)))), folded && (_jsx(Button, { type: "link", size: "small", style: { alignSelf: "flex-start", paddingInline: 0 }, "data-testid": `facet-more-${group.slug}`, "data-analytics": "none", "data-analytics-reason": "expanding a filter group is a read, not a flow step", onClick: () => {
266
371
  setExpanded((was) => !was);
267
372
  }, children: expanded
268
373
  ? t(SEARCH_I18N_KEYS.facetsShowLess)
@@ -1 +1 @@
1
- {"version":3,"file":"FacetGroupControl.js","sourceRoot":"","sources":["../../src/default/FacetGroupControl.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAGtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC;AAYvC,SAAS,SAAS,CAAC,KAAc;IAC/B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AACjF,CAAC;AAED;;;;;;;;GAQG;AACH,SAAS,YAAY,CACnB,GAAY,EACZ,KAAK,GAAG,CAAC,EACT,OAA4B,IAAI,GAAG,EAAE;IAErC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC;QAAE,OAA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AAE,YAAY,EAAE,aAAa,EAAE,CAAC,EAAE,iBACvC,cAAc,KAAK,CAAC,IAAI,EAAE,oBACxB,MAAM,2BACC,qDAAqD,EAC3E,OAAO,EAAE,GAAG,EAAE;4BACZ,WAAW,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC;wBAC7B,CAAC,YAEA,QAAQ;4BACP,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,cAAc,CAAC;4BACpC,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,aAAa,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC,GACvD,CACV,IACA,CACJ,IACI,CACR,CAAC;AACJ,CAAC"}
@@ -0,0 +1,23 @@
1
+ import type { ReactElement, ReactNode } from "react";
2
+ /** One child of a partitioned category. `path` is the slash-joined id path
3
+ * the `category` parameter takes — the same string `SearchQueryState.category`
4
+ * carries, so a host never rebuilds it from ids. */
5
+ export interface PartitionChild {
6
+ readonly id: number | string;
7
+ readonly path: string;
8
+ readonly name: string;
9
+ }
10
+ export interface PartitionChipsProps {
11
+ /** The children, in the order the catalogue declares them. */
12
+ readonly items: readonly PartitionChild[];
13
+ /** The chosen child's `path`, or `null` for the parent itself. CONTROLLED:
14
+ * this row keeps no state, because the choice is a `category` in the URL. */
15
+ readonly value: string | null;
16
+ readonly onChange: (path: string | null) => void;
17
+ /** The first chip's label. Defaults to `search.partition.all`. */
18
+ readonly allLabel?: ReactNode;
19
+ /** The row's accessible name. Defaults to `search.partition.label`. */
20
+ readonly label?: string;
21
+ }
22
+ export declare function PartitionChips(props: PartitionChipsProps): ReactElement;
23
+ //# sourceMappingURL=PartitionChips.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PartitionChips.d.ts","sourceRoot":"","sources":["../../src/default/PartitionChips.tsx"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EAGV,YAAY,EACZ,SAAS,EACV,MAAM,OAAO,CAAC;AAMf;;oDAEoD;AACpD,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,mBAAmB;IAClC,8DAA8D;IAC9D,QAAQ,CAAC,KAAK,EAAE,SAAS,cAAc,EAAE,CAAC;IAC1C;iFAC6E;IAC7E,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,QAAQ,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACjD,kEAAkE;IAClE,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAC;IAC9B,uEAAuE;IACvE,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB;AAsBD,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,GAAG,YAAY,CA8EvE"}
@@ -0,0 +1,94 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /**
3
+ * `<PartitionChips>` — the children of a `chips` category, as one row of
4
+ * single-select chips.
5
+ *
6
+ * A partition is a category whose children are not subcategories but one
7
+ * template split by a value their names express: buy / sell / let / rent,
8
+ * new / used, for boys / for girls. They keep their
9
+ * ids, their paths and their URLs — a listing still lands on a child — and
10
+ * only the PRESENTATION changes: the parent draws a feed, and the children
11
+ * are a choice above it rather than a grid of tiles the visitor has to pass
12
+ * through.
13
+ *
14
+ * Which categories are a partition is not decided here and not decided by
15
+ * this pair: `children_as` is a stored, derivable field on the category, and
16
+ * the storefront hands this component the children it resolved. What this
17
+ * component owns is that the choice is SINGLE-select and that "all" — the
18
+ * parent, unnarrowed — is one of the options rather than a way of clearing
19
+ * the others.
20
+ *
21
+ * ── Why a radiogroup and not a row of toggles ─────────────────────────────
22
+ *
23
+ * Because exactly one of them is true at a time, and `aria-pressed` buttons
24
+ * say the opposite: they announce a set of independent switches, so a screen
25
+ * reader user hears no reason why pressing one released another. A radiogroup
26
+ * with roving tabindex is the pattern for "one of these": Tab reaches the row
27
+ * once and lands on the chosen chip, the arrow keys move along it, and the
28
+ * group's own name says what is being chosen.
29
+ */
30
+ import { useRef } from "react";
31
+ import { Button } from "antd";
32
+ import { useT } from "@stapel/core";
33
+ import { radii, spacing } from "@stapel/tokens";
34
+ import { SEARCH_I18N_KEYS } from "../i18n/keys.js";
35
+ const CHIP = { borderRadius: radii.full };
36
+ const ROW = {
37
+ display: "flex",
38
+ flexWrap: "wrap",
39
+ gap: spacing[2],
40
+ };
41
+ /** The row's cells, as `[value, label]` — the parent first, then the
42
+ * children in catalogue order. */
43
+ function cells(items, allLabel) {
44
+ return [
45
+ [null, allLabel],
46
+ ...items.map((item) => [item.path, item.name]),
47
+ ];
48
+ }
49
+ export function PartitionChips(props) {
50
+ const t = useT();
51
+ const row = useRef(null);
52
+ const options = cells(props.items, props.allLabel ?? t(SEARCH_I18N_KEYS.partitionAll));
53
+ /**
54
+ * Arrow keys move the choice AND the focus, which is what a radiogroup
55
+ * does: in a single-select row the focused option is the selected one, so
56
+ * moving focus without choosing would leave the two disagreeing.
57
+ */
58
+ const onKeyDown = (index) => (event) => {
59
+ const step = event.key === "ArrowRight" || event.key === "ArrowDown"
60
+ ? 1
61
+ : event.key === "ArrowLeft" || event.key === "ArrowUp"
62
+ ? -1
63
+ : event.key === "Home"
64
+ ? -index
65
+ : event.key === "End"
66
+ ? options.length - 1 - index
67
+ : 0;
68
+ if (step === 0)
69
+ return;
70
+ event.preventDefault();
71
+ const next = (index + step + options.length) % options.length;
72
+ const cell = options[next];
73
+ if (cell === undefined)
74
+ return;
75
+ props.onChange(cell[0]);
76
+ const buttons = row.current?.querySelectorAll('[role="radio"]');
77
+ buttons?.[next]?.focus();
78
+ };
79
+ // A `value` naming no cell (a link into a child that has since moved) must
80
+ // still leave the row reachable by Tab, so the roving stop falls back to the
81
+ // parent chip rather than vanishing.
82
+ const active = options.findIndex(([value]) => value === props.value);
83
+ const stop = active >= 0 ? active : 0;
84
+ return (_jsx("div", { style: ROW, ref: row, role: "radiogroup", "aria-label": props.label ?? t(SEARCH_I18N_KEYS.partitionLabel), "data-testid": "partition-chips", children: options.map(([value, label], index) => {
85
+ const selected = value === props.value;
86
+ return (_jsx(Button, { size: "small", shape: "round", type: selected ? "primary" : "default", role: "radio", "aria-checked": selected,
87
+ // Roving tabindex: the row is ONE Tab stop and it lands on the
88
+ // chosen chip, not on the first of eight.
89
+ tabIndex: index === stop ? 0 : -1, style: CHIP, "data-testid": `partition-chip-${value ?? "all"}`, "data-analytics": "none", "data-analytics-reason": "choosing a section is a read, not a flow step", onKeyDown: onKeyDown(index), onClick: () => {
90
+ props.onChange(value);
91
+ }, children: label }, value ?? "__all__"));
92
+ }) }));
93
+ }
94
+ //# sourceMappingURL=PartitionChips.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PartitionChips.js","sourceRoot":"","sources":["../../src/default/PartitionChips.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAO/B,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAwBnD,MAAM,IAAI,GAAkB,EAAE,YAAY,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC;AAEzD,MAAM,GAAG,GAAkB;IACzB,OAAO,EAAE,MAAM;IACf,QAAQ,EAAE,MAAM;IAChB,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;CAChB,CAAC;AAEF;kCACkC;AAClC,SAAS,KAAK,CACZ,KAAgC,EAChC,Q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