@stapel/listings-react 0.23.0 → 0.24.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.
- package/CHANGELOG.md +85 -0
- package/README.md +56 -0
- package/dist/api/generated/schema.d.ts +119 -6
- package/dist/api/generated/schema.d.ts.map +1 -1
- package/dist/api/types.d.ts +46 -3
- package/dist/api/types.d.ts.map +1 -1
- package/dist/api/types.js.map +1 -1
- package/dist/default/CardBadges.d.ts +47 -0
- package/dist/default/CardBadges.d.ts.map +1 -0
- package/dist/default/CardBadges.js +38 -0
- package/dist/default/CardBadges.js.map +1 -0
- package/dist/default/ListingCard.d.ts.map +1 -1
- package/dist/default/ListingCard.js +6 -6
- package/dist/default/ListingCard.js.map +1 -1
- package/dist/default/ListingDetailPane.d.ts.map +1 -1
- package/dist/default/ListingDetailPane.js +12 -19
- package/dist/default/ListingDetailPane.js.map +1 -1
- package/dist/default/ListingPhoto.d.ts.map +1 -1
- package/dist/default/ListingPhoto.js +12 -8
- package/dist/default/ListingPhoto.js.map +1 -1
- package/dist/default/ListingSerpCard.d.ts.map +1 -1
- package/dist/default/ListingSerpCard.js +3 -5
- package/dist/default/ListingSerpCard.js.map +1 -1
- package/dist/default/ListingSpecList.d.ts +74 -0
- package/dist/default/ListingSpecList.d.ts.map +1 -0
- package/dist/default/ListingSpecList.js +90 -0
- package/dist/default/ListingSpecList.js.map +1 -0
- package/dist/default/cardGallery.d.ts +81 -0
- package/dist/default/cardGallery.d.ts.map +1 -0
- package/dist/default/cardGallery.js +266 -0
- package/dist/default/cardGallery.js.map +1 -0
- package/dist/default/index.d.ts +6 -0
- package/dist/default/index.d.ts.map +1 -1
- package/dist/default/index.js +5 -0
- package/dist/default/index.js.map +1 -1
- package/dist/i18n/es.d.ts.map +1 -1
- package/dist/i18n/es.js +1 -0
- package/dist/i18n/es.js.map +1 -1
- package/dist/i18n/generated/errors.es.gen.d.ts +1 -1
- package/dist/i18n/generated/errors.es.gen.js +1 -1
- package/dist/i18n/generated/errors.gen.d.ts +6 -0
- package/dist/i18n/generated/errors.gen.d.ts.map +1 -1
- package/dist/i18n/generated/errors.gen.js +3 -0
- package/dist/i18n/generated/errors.gen.js.map +1 -1
- package/dist/i18n/generated/errors.ru.gen.d.ts +1 -1
- package/dist/i18n/generated/errors.ru.gen.js +1 -1
- package/dist/i18n/ru.d.ts.map +1 -1
- package/dist/i18n/ru.js +3 -0
- package/dist/i18n/ru.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/model/cardBadges.d.ts +134 -0
- package/dist/model/cardBadges.d.ts.map +1 -0
- package/dist/model/cardBadges.js +131 -0
- package/dist/model/cardBadges.js.map +1 -0
- package/dist/model/featureText.d.ts +63 -0
- package/dist/model/featureText.d.ts.map +1 -0
- package/dist/model/featureText.js +133 -0
- package/dist/model/featureText.js.map +1 -0
- package/dist/model/features.d.ts.map +1 -1
- package/dist/model/features.js +59 -0
- package/dist/model/features.js.map +1 -1
- package/llms.txt +5 -2
- package/manifest.json +47 -1
- package/nav-manifest.json +1 -1
- package/package.json +5 -5
- package/src/analytics/generated/events.json +1 -1
- package/src/api/generated/schema.ts +119 -6
- package/src/api/types.ts +55 -5
- package/src/default/CardBadges.tsx +105 -0
- package/src/default/ListingCard.tsx +7 -21
- package/src/default/ListingDetailPane.tsx +13 -37
- package/src/default/ListingPhoto.tsx +54 -26
- package/src/default/ListingSerpCard.tsx +10 -28
- package/src/default/ListingSpecList.tsx +195 -0
- package/src/default/cardGallery.ts +287 -0
- package/src/default/index.ts +22 -0
- package/src/i18n/es.ts +3 -0
- package/src/i18n/generated/errors.es.gen.ts +1 -1
- package/src/i18n/generated/errors.gen.ts +3 -0
- package/src/i18n/generated/errors.json +9 -0
- package/src/i18n/generated/errors.ru.gen.ts +1 -1
- package/src/i18n/ru.ts +5 -0
- package/src/index.ts +15 -0
- package/src/model/cardBadges.ts +237 -0
- package/src/model/featureText.ts +199 -0
- package/src/model/features.ts +60 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Typography, theme as antdTheme } from "antd";
|
|
3
|
+
import { SkinTheme } from "@stapel/tokens-antd/skin";
|
|
4
|
+
import { useI18n, useT } from "@stapel/core";
|
|
5
|
+
import { spacing } from "@stapel/tokens";
|
|
6
|
+
import { ATTRIBUTES_I18N_KEYS, featureName, featureType, isRedactedValue, isValuePresent, isValueVerified, } from "@stapel/attributes-react";
|
|
7
|
+
import { formatSpecValue } from "../model/featureText.js";
|
|
8
|
+
/** The class one spec row carries. */
|
|
9
|
+
export const SPEC_ROW_CLASS = "stapel-listing-spec-row";
|
|
10
|
+
/** The class the row's inline label carries. */
|
|
11
|
+
export const SPEC_LABEL_CLASS = "stapel-listing-spec-label";
|
|
12
|
+
/** The `href` the hoisted spec stylesheet is deduplicated by. */
|
|
13
|
+
export const SPEC_STYLE_HREF = "stapel-listings-spec";
|
|
14
|
+
/**
|
|
15
|
+
* The rules an inline style cannot express — the label's own colour is set
|
|
16
|
+
* per-instance as a custom property so ONE hoisted copy serves either theme.
|
|
17
|
+
*
|
|
18
|
+
* `display: inline` on the label is the whole fix and is stated rather than
|
|
19
|
+
* inherited: antd's `<Text>` renders a `<span>`, but a skin that retunes it
|
|
20
|
+
* to a block would silently put the table back.
|
|
21
|
+
*/
|
|
22
|
+
export function specListCss() {
|
|
23
|
+
return [
|
|
24
|
+
// A paragraph, not a table row. `margin: 0` because the gap between rows
|
|
25
|
+
// is the list's, so a row can be lifted into a grid cell unchanged.
|
|
26
|
+
`.${SPEC_ROW_CLASS}{margin:0;min-inline-size:0;overflow-wrap:anywhere}`,
|
|
27
|
+
`.${SPEC_LABEL_CLASS}{display:inline;color:var(--listing-spec-label)}`,
|
|
28
|
+
// The one space between the question and the answer, owned by the label
|
|
29
|
+
// rather than written as a text node — a `{" "}` between two JSX elements
|
|
30
|
+
// is the kind of whitespace a formatter deletes.
|
|
31
|
+
`.${SPEC_LABEL_CLASS}::after{content:"\\00a0"}`,
|
|
32
|
+
].join("");
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* A withheld value's row: what the system OBSERVED, and nothing more — the
|
|
36
|
+
* same three states `@stapel/attributes-react` prints, said with its own
|
|
37
|
+
* copy keys so the two lists cannot drift into two different sentences.
|
|
38
|
+
*/
|
|
39
|
+
function redactedText(dto, t) {
|
|
40
|
+
if (!isValuePresent(dto))
|
|
41
|
+
return t(ATTRIBUTES_I18N_KEYS.valueNotSet);
|
|
42
|
+
if (isValueVerified(dto))
|
|
43
|
+
return t(ATTRIBUTES_I18N_KEYS.valueVerified);
|
|
44
|
+
return t(ATTRIBUTES_I18N_KEYS.valueProvided);
|
|
45
|
+
}
|
|
46
|
+
export function ListingSpecList(props) {
|
|
47
|
+
const t = useT();
|
|
48
|
+
const { locale } = useI18n();
|
|
49
|
+
const { token } = antdTheme.useToken();
|
|
50
|
+
// A `header` is a section caption in a FORM, not a value: it has none, and
|
|
51
|
+
// a spec table that printed one would print "not specified" under it.
|
|
52
|
+
const rows = props.features.filter((feature) => featureType(feature) !== "header");
|
|
53
|
+
return (_jsxs(SkinTheme, { surface: "bare", children: [_jsx("style", { href: SPEC_STYLE_HREF, precedence: "default", children: specListCss() }), _jsx("div", { "data-testid": props.testId ?? "listings-spec-list", style: {
|
|
54
|
+
display: "flex",
|
|
55
|
+
flexDirection: "column",
|
|
56
|
+
gap: spacing[1],
|
|
57
|
+
minWidth: 0,
|
|
58
|
+
["--listing-spec-label"]: token.colorTextSecondary,
|
|
59
|
+
...props.style,
|
|
60
|
+
}, children: rows.map((feature) => {
|
|
61
|
+
const dto = props.values[feature.slug];
|
|
62
|
+
const redacted = isRedactedValue(dto);
|
|
63
|
+
const text = redacted
|
|
64
|
+
? redactedText(dto, t)
|
|
65
|
+
: (formatSpecValue(feature, dto, { t, locale }) ??
|
|
66
|
+
t(dto === undefined || featureType(feature) === undefined
|
|
67
|
+
? ATTRIBUTES_I18N_KEYS.valueNotSet
|
|
68
|
+
: ATTRIBUTES_I18N_KEYS.valueUnreadable));
|
|
69
|
+
return (_jsxs("p", { className: SPEC_ROW_CLASS, "data-testid": `listings-spec-row-${feature.slug}`, children: [_jsx(Typography.Text, { type: "secondary", className: SPEC_LABEL_CLASS, "data-testid": `listings-spec-label-${feature.slug}`, children: featureName(feature) }), _jsx("span", { "data-testid": `listings-spec-value-${feature.slug}`, children: text })] }, feature.slug));
|
|
70
|
+
}) })] }));
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* The same rows in TWO columns on a wide screen — a grid of whole rows, cut
|
|
74
|
+
* by row count so the category's declaration order still reads top-to-bottom,
|
|
75
|
+
* left column first.
|
|
76
|
+
*
|
|
77
|
+
* The cut is here rather than inside the list because a CSS `columns` rule
|
|
78
|
+
* would break a wrapped paragraph across the column boundary, which is
|
|
79
|
+
* exactly the defect the paragraph shape was adopted to avoid.
|
|
80
|
+
*/
|
|
81
|
+
export function ListingSpecColumns(props) {
|
|
82
|
+
const half = Math.ceil(props.features.length / 2);
|
|
83
|
+
return (_jsxs("div", { "data-testid": props.testId ?? "listings-detail-specs-split", style: {
|
|
84
|
+
display: "grid",
|
|
85
|
+
gridTemplateColumns: "repeat(2, minmax(0, 1fr))",
|
|
86
|
+
gap: spacing[4],
|
|
87
|
+
alignItems: "start",
|
|
88
|
+
}, children: [_jsx(ListingSpecList, { features: props.features.slice(0, half), values: props.values, testId: "listings-spec-list" }), props.features.length > half ? (_jsx(ListingSpecList, { features: props.features.slice(half), values: props.values, testId: "listings-spec-list-second" })) : null] }));
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=ListingSpecList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ListingSpecList.js","sourceRoot":"","sources":["../../src/default/ListingSpecList.tsx"],"names":[],"mappings":";AAmCA,OAAO,EAAE,UA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-0,0 +1,81 @@
|
|
|
1
|
+
import type { PointerEvent as ReactPointerEvent, RefObject } from "react";
|
|
2
|
+
/** The class the gallery's own box carries — see {@link cardGalleryCss}. */
|
|
3
|
+
export declare const CARD_GALLERY_CLASS = "stapel-listing-gallery";
|
|
4
|
+
/** The `href` the hoisted gallery stylesheet is deduplicated by. */
|
|
5
|
+
export declare const CARD_GALLERY_STYLE_HREF = "stapel-listings-card-gallery";
|
|
6
|
+
/** The environment a hover scrub is allowed in, and the only one. */
|
|
7
|
+
export declare const SCRUB_MEDIA = "(hover: hover) and (pointer: fine)";
|
|
8
|
+
/**
|
|
9
|
+
* How far a finger travels before it has said "photo", in CSS pixels.
|
|
10
|
+
*
|
|
11
|
+
* Under this, a drag is a tap that wobbled — and a tap on a card is a
|
|
12
|
+
* navigation, so a low threshold does not change a photograph, it changes one
|
|
13
|
+
* and then leaves the listing.
|
|
14
|
+
*/
|
|
15
|
+
export declare const SWIPE_MIN_PX = 32;
|
|
16
|
+
/**
|
|
17
|
+
* How much more horizontal than vertical a drag must be to count.
|
|
18
|
+
*
|
|
19
|
+
* 1.2 rather than 1: a thumb scrolling a feed travels a few degrees off
|
|
20
|
+
* vertical, and a bare `|dx| > |dy|` comparison hands the gesture to the
|
|
21
|
+
* gallery on the first pixel where the wobble wins.
|
|
22
|
+
*/
|
|
23
|
+
export declare const SWIPE_AXIS_RATIO = 1.2;
|
|
24
|
+
/**
|
|
25
|
+
* Which of `count` equal segments the pointer is over.
|
|
26
|
+
*
|
|
27
|
+
* Clamped at both ends: `offsetX` can be reported one pixel past the box's
|
|
28
|
+
* own width, and an index of `count` is a photograph that does not exist.
|
|
29
|
+
*/
|
|
30
|
+
export declare function segmentIndex(offsetX: number, width: number, count: number): number;
|
|
31
|
+
/**
|
|
32
|
+
* A drag → the number of photographs it asks for: `1` forward, `-1` back, `0`
|
|
33
|
+
* for a drag that has not declared horizontal intent.
|
|
34
|
+
*
|
|
35
|
+
* Dragging LEFT advances, the direction the content moves under the finger —
|
|
36
|
+
* the same mapping the native scroller has.
|
|
37
|
+
*/
|
|
38
|
+
export declare function swipeStep(dx: number, dy: number): -1 | 0 | 1;
|
|
39
|
+
/** Does this environment have a real pointer? `false` where there is no
|
|
40
|
+
* `matchMedia` to ask (a server render, an old jsdom), which is the safe
|
|
41
|
+
* side: a scrub that does not happen costs a hover, a scrub on a phone is a
|
|
42
|
+
* photograph that changes when nobody touched it. */
|
|
43
|
+
export declare function hasFinePointer(): boolean;
|
|
44
|
+
/**
|
|
45
|
+
* {@link hasFinePointer}, as state.
|
|
46
|
+
*
|
|
47
|
+
* It opens `false` and settles in an effect rather than reading the media
|
|
48
|
+
* query during render: a server render has no `matchMedia`, and a first
|
|
49
|
+
* client render that disagreed with it is a hydration mismatch on every card
|
|
50
|
+
* on the page. Nothing is drawn differently either way — the flag only gates
|
|
51
|
+
* a gesture — so the one frame it costs is invisible.
|
|
52
|
+
*/
|
|
53
|
+
export declare function useFinePointer(): boolean;
|
|
54
|
+
/** The handlers and the box reference a gallery hands its media well. */
|
|
55
|
+
export interface CardGallery {
|
|
56
|
+
readonly ref: RefObject<HTMLDivElement | null>;
|
|
57
|
+
/** The photograph currently on screen. */
|
|
58
|
+
readonly active: number;
|
|
59
|
+
/** True while a pointer is scrubbing — the box publishes it so the strip's
|
|
60
|
+
* smooth-scroll can be switched off for the duration. */
|
|
61
|
+
readonly scrubbing: boolean;
|
|
62
|
+
readonly onPointerMove: (event: ReactPointerEvent<HTMLDivElement>) => void;
|
|
63
|
+
readonly onPointerDown: (event: ReactPointerEvent<HTMLDivElement>) => void;
|
|
64
|
+
readonly onPointerUp: (event: ReactPointerEvent<HTMLDivElement>) => void;
|
|
65
|
+
readonly onPointerCancel: (event: ReactPointerEvent<HTMLDivElement>) => void;
|
|
66
|
+
readonly onPointerLeave: (event: ReactPointerEvent<HTMLDivElement>) => void;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* The gallery gestures for a media well holding `count` photographs.
|
|
70
|
+
*
|
|
71
|
+
* A well with one photograph gets an inert bag: every handler returns
|
|
72
|
+
* immediately, so a grid of forty single-photo tiles pays for nothing.
|
|
73
|
+
*/
|
|
74
|
+
export declare function useCardGallery(count: number): CardGallery;
|
|
75
|
+
/**
|
|
76
|
+
* The rules an inline style cannot reach: they apply to the STRIP inside the
|
|
77
|
+
* carousel, which this package renders through a component and does not hold
|
|
78
|
+
* a handle on.
|
|
79
|
+
*/
|
|
80
|
+
export declare function cardGalleryCss(): string;
|
|
81
|
+
//# sourceMappingURL=cardGallery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cardGallery.d.ts","sourceRoot":"","sources":["../../src/default/cardGallery.ts"],"names":[],"mappings":"AA+CA,OAAO,KAAK,EAAE,YAAY,IAAI,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE1E,4EAA4E;AAC5E,eAAO,MAAM,kBAAkB,2BAA2B,CAAC;AAC3D,oEAAoE;AACpE,eAAO,MAAM,uBAAuB,iCAAiC,CAAC;AAEtE,qEAAqE;AACrE,eAAO,MAAM,WAAW,uCAAuC,CAAC;AAEhE;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,KAAK,CAAC;AAE/B;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,MAAM,CAAC;AAEpC;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAIlF;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAK5D;AAED;;;qDAGqD;AACrD,wBAAgB,cAAc,IAAI,OAAO,CAOxC;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,IAAI,OAAO,CA0BxC;AAED,yEAAyE;AACzE,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,GAAG,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAC/C,0CAA0C;IAC1C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB;6DACyD;IACzD,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,aAAa,EAAE,CAAC,KAAK,EAAE,iBAAiB,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;IAC3E,QAAQ,CAAC,aAAa,EAAE,CAAC,KAAK,EAAE,iBAAiB,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;IAC3E,QAAQ,CAAC,WAAW,EAAE,CAAC,KAAK,EAAE,iBAAiB,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;IACzE,QAAQ,CAAC,eAAe,EAAE,CAAC,KAAK,EAAE,iBAAiB,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;IAC7E,QAAQ,CAAC,cAAc,EAAE,CAAC,KAAK,EAAE,iBAAiB,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;CAC7E;AAoBD;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,WAAW,CA0EzD;AAED;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAevC"}
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The card gallery's two gestures — the ones a classified is expected to have
|
|
3
|
+
* and this pair did not.
|
|
4
|
+
*
|
|
5
|
+
* ── Hover scrub, on a device that has a pointer ──────────────────────────
|
|
6
|
+
*
|
|
7
|
+
* A card with six photographs showed one, and the only way to the other five
|
|
8
|
+
* was to open the listing. Every mature classified answers this the same way:
|
|
9
|
+
* the media box is divided into N equal segments, and the segment the cursor
|
|
10
|
+
* is over IS the photograph on screen. Six photos become six glances and no
|
|
11
|
+
* clicks, and the pointer leaving puts the first photo back — the card must
|
|
12
|
+
* be in the same state after a hover as before one, or a grid of forty tiles
|
|
13
|
+
* becomes forty different tiles depending on where a cursor happened to pass.
|
|
14
|
+
*
|
|
15
|
+
* It is gated on `(hover: hover) and (pointer: fine)` and on a `mouse`
|
|
16
|
+
* pointer type, both, and the two gates are not redundant: the media query
|
|
17
|
+
* says the DEVICE has a real pointer, the pointer type says THIS gesture came
|
|
18
|
+
* from it. A touch laptop answers `hover: hover` and still delivers finger
|
|
19
|
+
* events, and a scrub driven by a finger dragging across the box is the
|
|
20
|
+
* gesture below wearing the wrong costume.
|
|
21
|
+
*
|
|
22
|
+
* ── Swipe, on a device that does not ─────────────────────────────────────
|
|
23
|
+
*
|
|
24
|
+
* A finger gets the same six photographs by swiping horizontally, one photo
|
|
25
|
+
* per swipe, in either direction.
|
|
26
|
+
*
|
|
27
|
+
* The rule that matters is the one about the OTHER axis: a card is a small
|
|
28
|
+
* box inside a long scrolling feed, and a gesture layer that treats every
|
|
29
|
+
* touch as its own turns the page into something that will not scroll. So
|
|
30
|
+
* the strip declares `touch-action: pan-y` — the browser keeps the vertical
|
|
31
|
+
* axis, unconditionally, and can never be argued out of it — and this hook
|
|
32
|
+
* only acts on a drag that has declared horizontal INTENT: past
|
|
33
|
+
* {@link SWIPE_MIN_PX}, and further across than down by
|
|
34
|
+
* {@link SWIPE_AXIS_RATIO}. A diagonal thumb scrolling the feed changes no
|
|
35
|
+
* photograph.
|
|
36
|
+
*
|
|
37
|
+
* ── What neither gesture touches ─────────────────────────────────────────
|
|
38
|
+
*
|
|
39
|
+
* The keyboard, and the card's single link target. The strip underneath is
|
|
40
|
+
* still `<SkinCarousel>`: a real scroll container, a tab stop, arrow-key
|
|
41
|
+
* scrollable, with the slides in the document and its own dots reporting the
|
|
42
|
+
* position. Both gestures below work by SCROLLING it — they set no state the
|
|
43
|
+
* strip does not already publish — so what a keyboard reaches, what a screen
|
|
44
|
+
* reader reads and what the dots say are unchanged, and the card stays one
|
|
45
|
+
* anchor with one accessible name.
|
|
46
|
+
*/
|
|
47
|
+
import { useCallback, useEffect, useRef, useState } from "react";
|
|
48
|
+
/** The class the gallery's own box carries — see {@link cardGalleryCss}. */
|
|
49
|
+
export const CARD_GALLERY_CLASS = "stapel-listing-gallery";
|
|
50
|
+
/** The `href` the hoisted gallery stylesheet is deduplicated by. */
|
|
51
|
+
export const CARD_GALLERY_STYLE_HREF = "stapel-listings-card-gallery";
|
|
52
|
+
/** The environment a hover scrub is allowed in, and the only one. */
|
|
53
|
+
export const SCRUB_MEDIA = "(hover: hover) and (pointer: fine)";
|
|
54
|
+
/**
|
|
55
|
+
* How far a finger travels before it has said "photo", in CSS pixels.
|
|
56
|
+
*
|
|
57
|
+
* Under this, a drag is a tap that wobbled — and a tap on a card is a
|
|
58
|
+
* navigation, so a low threshold does not change a photograph, it changes one
|
|
59
|
+
* and then leaves the listing.
|
|
60
|
+
*/
|
|
61
|
+
export const SWIPE_MIN_PX = 32;
|
|
62
|
+
/**
|
|
63
|
+
* How much more horizontal than vertical a drag must be to count.
|
|
64
|
+
*
|
|
65
|
+
* 1.2 rather than 1: a thumb scrolling a feed travels a few degrees off
|
|
66
|
+
* vertical, and a bare `|dx| > |dy|` comparison hands the gesture to the
|
|
67
|
+
* gallery on the first pixel where the wobble wins.
|
|
68
|
+
*/
|
|
69
|
+
export const SWIPE_AXIS_RATIO = 1.2;
|
|
70
|
+
/**
|
|
71
|
+
* Which of `count` equal segments the pointer is over.
|
|
72
|
+
*
|
|
73
|
+
* Clamped at both ends: `offsetX` can be reported one pixel past the box's
|
|
74
|
+
* own width, and an index of `count` is a photograph that does not exist.
|
|
75
|
+
*/
|
|
76
|
+
export function segmentIndex(offsetX, width, count) {
|
|
77
|
+
if (count <= 1 || width <= 0)
|
|
78
|
+
return 0;
|
|
79
|
+
const raw = Math.floor((offsetX / width) * count);
|
|
80
|
+
return Math.min(count - 1, Math.max(0, raw));
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* A drag → the number of photographs it asks for: `1` forward, `-1` back, `0`
|
|
84
|
+
* for a drag that has not declared horizontal intent.
|
|
85
|
+
*
|
|
86
|
+
* Dragging LEFT advances, the direction the content moves under the finger —
|
|
87
|
+
* the same mapping the native scroller has.
|
|
88
|
+
*/
|
|
89
|
+
export function swipeStep(dx, dy) {
|
|
90
|
+
const across = Math.abs(dx);
|
|
91
|
+
if (across < SWIPE_MIN_PX)
|
|
92
|
+
return 0;
|
|
93
|
+
if (across <= Math.abs(dy) * SWIPE_AXIS_RATIO)
|
|
94
|
+
return 0;
|
|
95
|
+
return dx < 0 ? 1 : -1;
|
|
96
|
+
}
|
|
97
|
+
/** Does this environment have a real pointer? `false` where there is no
|
|
98
|
+
* `matchMedia` to ask (a server render, an old jsdom), which is the safe
|
|
99
|
+
* side: a scrub that does not happen costs a hover, a scrub on a phone is a
|
|
100
|
+
* photograph that changes when nobody touched it. */
|
|
101
|
+
export function hasFinePointer() {
|
|
102
|
+
if (typeof window === "undefined" || typeof window.matchMedia !== "function")
|
|
103
|
+
return false;
|
|
104
|
+
try {
|
|
105
|
+
return window.matchMedia(SCRUB_MEDIA).matches;
|
|
106
|
+
}
|
|
107
|
+
catch {
|
|
108
|
+
return false;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* {@link hasFinePointer}, as state.
|
|
113
|
+
*
|
|
114
|
+
* It opens `false` and settles in an effect rather than reading the media
|
|
115
|
+
* query during render: a server render has no `matchMedia`, and a first
|
|
116
|
+
* client render that disagreed with it is a hydration mismatch on every card
|
|
117
|
+
* on the page. Nothing is drawn differently either way — the flag only gates
|
|
118
|
+
* a gesture — so the one frame it costs is invisible.
|
|
119
|
+
*/
|
|
120
|
+
export function useFinePointer() {
|
|
121
|
+
const [fine, setFine] = useState(false);
|
|
122
|
+
useEffect(() => {
|
|
123
|
+
if (typeof window === "undefined" || typeof window.matchMedia !== "function")
|
|
124
|
+
return;
|
|
125
|
+
let query;
|
|
126
|
+
try {
|
|
127
|
+
query = window.matchMedia(SCRUB_MEDIA);
|
|
128
|
+
}
|
|
129
|
+
catch {
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
setFine(query.matches);
|
|
133
|
+
const onChange = (event) => {
|
|
134
|
+
setFine(event.matches);
|
|
135
|
+
};
|
|
136
|
+
// `addEventListener` is the modern spelling; Safari < 14 has only
|
|
137
|
+
// `addListener`, and a card grid that throws on mount there is worse than
|
|
138
|
+
// one that never notices a device changing its pointer.
|
|
139
|
+
if (typeof query.addEventListener === "function") {
|
|
140
|
+
query.addEventListener("change", onChange);
|
|
141
|
+
return () => {
|
|
142
|
+
query.removeEventListener("change", onChange);
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
return;
|
|
146
|
+
}, []);
|
|
147
|
+
return fine;
|
|
148
|
+
}
|
|
149
|
+
/** Scroll the strip inside `box` so that slide `index` is at its leading
|
|
150
|
+
* edge. Rectangles rather than `scrollLeft / slideWidth`, for the reason
|
|
151
|
+
* `SkinCarousel`'s own `nearestSlideIndex` gives: the arithmetic version has
|
|
152
|
+
* to know the gap, the peek and the writing direction. */
|
|
153
|
+
function showSlide(box, index, instant) {
|
|
154
|
+
const strip = box.querySelector("[data-stapel-carousel-strip]");
|
|
155
|
+
if (strip === null)
|
|
156
|
+
return;
|
|
157
|
+
const slide = strip.children.item(index);
|
|
158
|
+
if (slide === null)
|
|
159
|
+
return;
|
|
160
|
+
const left = slide.getBoundingClientRect().left - strip.getBoundingClientRect().left + strip.scrollLeft;
|
|
161
|
+
if (typeof strip.scrollTo === "function") {
|
|
162
|
+
strip.scrollTo({ left, behavior: instant ? "auto" : "smooth" });
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
strip.scrollLeft = left;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* The gallery gestures for a media well holding `count` photographs.
|
|
170
|
+
*
|
|
171
|
+
* A well with one photograph gets an inert bag: every handler returns
|
|
172
|
+
* immediately, so a grid of forty single-photo tiles pays for nothing.
|
|
173
|
+
*/
|
|
174
|
+
export function useCardGallery(count) {
|
|
175
|
+
const ref = useRef(null);
|
|
176
|
+
const [active, setActive] = useState(0);
|
|
177
|
+
const [scrubbing, setScrubbing] = useState(false);
|
|
178
|
+
// The origin of the drag in progress, or `null`. A ref rather than state:
|
|
179
|
+
// it changes on every move and no render depends on it.
|
|
180
|
+
const origin = useRef(null);
|
|
181
|
+
const fine = useFinePointer();
|
|
182
|
+
const many = count > 1;
|
|
183
|
+
// The one place the strip is driven. `active` is the whole state of both
|
|
184
|
+
// gestures, so neither handler talks to the DOM.
|
|
185
|
+
useEffect(() => {
|
|
186
|
+
const box = ref.current;
|
|
187
|
+
if (box === null || !many)
|
|
188
|
+
return;
|
|
189
|
+
showSlide(box, active, scrubbing);
|
|
190
|
+
}, [active, scrubbing, many]);
|
|
191
|
+
const onPointerMove = useCallback((event) => {
|
|
192
|
+
if (!many)
|
|
193
|
+
return;
|
|
194
|
+
if (event.pointerType === "mouse") {
|
|
195
|
+
if (!fine)
|
|
196
|
+
return;
|
|
197
|
+
const box = ref.current;
|
|
198
|
+
if (box === null)
|
|
199
|
+
return;
|
|
200
|
+
const rect = box.getBoundingClientRect();
|
|
201
|
+
setScrubbing(true);
|
|
202
|
+
setActive(segmentIndex(event.clientX - rect.left, rect.width, count));
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
205
|
+
const from = origin.current;
|
|
206
|
+
if (from === null)
|
|
207
|
+
return;
|
|
208
|
+
const step = swipeStep(event.clientX - from.x, event.clientY - from.y);
|
|
209
|
+
if (step === 0)
|
|
210
|
+
return;
|
|
211
|
+
// The origin moves with the commit, so a long drag walks the strip one
|
|
212
|
+
// photograph per threshold rather than one per gesture.
|
|
213
|
+
origin.current = { x: event.clientX, y: event.clientY };
|
|
214
|
+
setScrubbing(false);
|
|
215
|
+
setActive((current) => Math.min(count - 1, Math.max(0, current + step)));
|
|
216
|
+
}, [count, fine, many]);
|
|
217
|
+
const onPointerDown = useCallback((event) => {
|
|
218
|
+
if (!many || event.pointerType === "mouse")
|
|
219
|
+
return;
|
|
220
|
+
origin.current = { x: event.clientX, y: event.clientY };
|
|
221
|
+
}, [many]);
|
|
222
|
+
const endDrag = useCallback(() => {
|
|
223
|
+
origin.current = null;
|
|
224
|
+
}, []);
|
|
225
|
+
const onPointerLeave = useCallback(() => {
|
|
226
|
+
origin.current = null;
|
|
227
|
+
if (!many)
|
|
228
|
+
return;
|
|
229
|
+
// The card goes back to the photograph it was drawn with. A hover is a
|
|
230
|
+
// look, not an edit.
|
|
231
|
+
setScrubbing(false);
|
|
232
|
+
setActive(0);
|
|
233
|
+
}, [many]);
|
|
234
|
+
return {
|
|
235
|
+
ref,
|
|
236
|
+
active,
|
|
237
|
+
scrubbing,
|
|
238
|
+
onPointerMove,
|
|
239
|
+
onPointerDown,
|
|
240
|
+
onPointerUp: endDrag,
|
|
241
|
+
onPointerCancel: endDrag,
|
|
242
|
+
onPointerLeave,
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* The rules an inline style cannot reach: they apply to the STRIP inside the
|
|
247
|
+
* carousel, which this package renders through a component and does not hold
|
|
248
|
+
* a handle on.
|
|
249
|
+
*/
|
|
250
|
+
export function cardGalleryCss() {
|
|
251
|
+
const box = `.${CARD_GALLERY_CLASS}`;
|
|
252
|
+
return [
|
|
253
|
+
// THE VERTICAL AXIS IS THE BROWSER'S, and is not negotiable: a card is a
|
|
254
|
+
// small box in a long feed, and the one unacceptable outcome of a gallery
|
|
255
|
+
// gesture is a page that will not scroll. `pan-y` says so at the platform
|
|
256
|
+
// level, where no handler can argue with it, and takes the horizontal
|
|
257
|
+
// axis for the swipe above.
|
|
258
|
+
`${box} [data-stapel-carousel-strip]{touch-action:pan-y}`,
|
|
259
|
+
// A per-pixel scrub must not animate: the strip's own `scroll-behavior:
|
|
260
|
+
// smooth` is right for a swipe committing one photograph and turns a
|
|
261
|
+
// cursor sweep into a queue of easing curves finishing after the pointer
|
|
262
|
+
// has left.
|
|
263
|
+
`${box}[data-scrubbing="true"] [data-stapel-carousel-strip]{scroll-behavior:auto}`,
|
|
264
|
+
].join("");
|
|
265
|
+
}
|
|
266
|
+
//# sourceMappingURL=cardGallery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cardGallery.js","sourceRoot":"","sources":["../../src/default/cardGallery.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGjE,4EAA4E;AAC5E,MAAM,CAAC,MAAM,kBAAkB,GAAG,wBAAwB,CAAC;AAC3D,oEAAoE;AACpE,MAAM,CAAC,MAAM,uBAAuB,GAAG,8BAA8B,CAAC;AAEtE,qEAAqE;AACrE,MAAM,CAAC,MAAM,WAAW,GAAG,oCAAoC,CAAC;AAEhE;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,EAAE,CAAC;AAE/B;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAEpC;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAAC,OAAe,EAAE,KAAa,EAAE,KAAa;IACxE,IAAI,KAAK,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC;QAAE,OAAO,CAAC,CAAC;IACvC,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,GAAG,KAAK,CAAC,GAAG,KAAK,CAAC,CAAC;IAClD,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;AAC/C,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,SAAS,CAAC,EAAU,EAAE,EAAU;IAC9C,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAC5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AS;QACT,aAAa;QACb,aAAa;QACb,WAAW,EAAE,OAAO;QACpB,eAAe,EAAE,OAAO;QACxB,cAAc;KACf,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,cAAc;IAC5B,MAAM,GAAG,GAAG,IAAI,kBAAkB,EAAE,CAAC;IACrC,OAAO;QACL,yEAAyE;QACzE,0EAA0E;QAC1E,0EAA0E;QAC1E,sEAAsE;QACtE,4BAA4B;QAC5B,GAAG,GAAG,mDAAmD;QACzD,wEAAwE;QACxE,qEAAqE;QACrE,yEAAyE;QACzE,YAAY;QACZ,GAAG,GAAG,4EAA4E;KACnF,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACb,CAAC"}
|
package/dist/default/index.d.ts
CHANGED
|
@@ -53,6 +53,12 @@ export { LifecycleTag, ListingStatusBlock, ModerationNote } from "./StatusTags.j
|
|
|
53
53
|
export type { ListingStatusProps } from "./StatusTags.js";
|
|
54
54
|
export { ListingPhoto, ListingPhotoStrip, LISTING_PHOTO_ASPECT, } from "./ListingPhoto.js";
|
|
55
55
|
export type { ListingPhotoProps } from "./ListingPhoto.js";
|
|
56
|
+
export { ListingSpecColumns, ListingSpecList, specListCss, } from "./ListingSpecList.js";
|
|
57
|
+
export type { ListingSpecListProps } from "./ListingSpecList.js";
|
|
58
|
+
export { CardBadges, CardSpecLine } from "./CardBadges.js";
|
|
59
|
+
export type { CardBadgesProps } from "./CardBadges.js";
|
|
60
|
+
export { SWIPE_AXIS_RATIO, SWIPE_MIN_PX, cardGalleryCss, hasFinePointer, segmentIndex, swipeStep, useCardGallery, } from "./cardGallery.js";
|
|
61
|
+
export type { CardGallery } from "./cardGallery.js";
|
|
56
62
|
export { SignInLink } from "./SignInLink.js";
|
|
57
63
|
export type { SignInLinkProps } from "./SignInLink.js";
|
|
58
64
|
export type { CategoryFeaturesProp, ThemeModeProp } from "./types.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":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AC;AAC1B,YAAY,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,YAAY,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,YAAY,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC"}
|
package/dist/default/index.js
CHANGED
|
@@ -52,5 +52,10 @@ export { MyListingsPane } from "./MyListingsPane.js";
|
|
|
52
52
|
export { FavoritesPane, FAVORITES_CARD_MIN } from "./FavoritesPane.js";
|
|
53
53
|
export { LifecycleTag, ListingStatusBlock, ModerationNote } from "./StatusTags.js";
|
|
54
54
|
export { ListingPhoto, ListingPhotoStrip, LISTING_PHOTO_ASPECT, } from "./ListingPhoto.js";
|
|
55
|
+
// ── the listing page's characteristics, and a card's badge line ──────────────
|
|
56
|
+
export { ListingSpecColumns, ListingSpecList, specListCss, } from "./ListingSpecList.js";
|
|
57
|
+
export { CardBadges, CardSpecLine } from "./CardBadges.js";
|
|
58
|
+
// ── the card gallery's two gestures ─────────────────────────────────────────
|
|
59
|
+
export { SWIPE_AXIS_RATIO, SWIPE_MIN_PX, cardGalleryCss, hasFinePointer, segmentIndex, swipeStep, useCardGallery, } from "./cardGallery.js";
|
|
55
60
|
export { SignInLink } from "./SignInLink.js";
|
|
56
61
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/default/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,OAAO,EACL,WAAW;AACX,6EAA6E;AAC7E,6EAA6E;AAC7E,oBAAoB,EACpB,sBAAsB;AACtB,0EAA0E;AAC1E,4EAA4E;AAC5E,iBAAiB,EACjB,sBAAsB,GACvB,MAAM,kBAAkB,CAAC;AAO1B,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAM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ACL,mBAAmB,EACnB,0BAA0B,EAC1B,gBAAgB,EAChB,eAAe,GAChB,MAAM,0BAA0B,CAAC;AASlC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAOvE,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEnF,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,mBAAmB,CAAC;AAG3B,gFAAgF;AAChF,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,WAAW,GACZ,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAG3D,+EAA+E;AAC/E,OAAO,EACL,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,cAAc,EACd,YAAY,EACZ,SAAS,EACT,cAAc,GACf,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC"}
|
package/dist/i18n/es.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"es.d.ts","sourceRoot":"","sources":["../../src/i18n/es.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAI/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAErE;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,oBAAoB,EAAE,
|
|
1
|
+
{"version":3,"file":"es.d.ts","sourceRoot":"","sources":["../../src/i18n/es.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAI/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAErE;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,oBAAoB,EAAE,cAkOlC,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,CAG7D"}
|
package/dist/i18n/es.js
CHANGED
|
@@ -161,6 +161,7 @@ export const listingsI18nBundleEs = {
|
|
|
161
161
|
// Las dos comprobaciones de publicación que llegaron con el contrato 0.17.
|
|
162
162
|
"error.400.listing_location_required": "Indica dónde está el artículo antes de publicarlo",
|
|
163
163
|
"error.400.listing_zero_price_not_allowed": "En esta categoría no se permite un precio de 0. Deja el precio vacío para «precio no indicado».",
|
|
164
|
+
"error.400.listing_draft_meta_too_large": "El borrador es demasiado grande (máximo {max_bytes} bytes). Quita parte de los datos y guarda de nuevo.",
|
|
164
165
|
"listings.blocked.sign_in": "Inicia sesión para hacer esto",
|
|
165
166
|
"listings.blocked.guest": "Esta cuenta todavía no puede hacerlo — termina de configurarla primero",
|
|
166
167
|
"listings.blocked.mandate_unknown": "No pudimos comprobar tu cuenta, así que no adivinamos si puedes hacerlo",
|
package/dist/i18n/es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"es.js","sourceRoot":"","sources":["../../src/i18n/es.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAErE,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAErE;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAmB;IAClD,GAAG,qBAAqB;IAExB,4EAA4E;IAC5E,6BAA6B,EAAE,8BAA8B;IAC7D,0BAA0B,EACxB,uDAAuD;IACzD,uCAAuC,EACrC,sDAAsD;IACxD,yCAAyC,EACvC,2CAA2C;IAC7C,qCAAqC,EACnC,gDAAgD;IAClD,yCAAyC,EACvC,2DAA2D;IAC7D,6BAA6B,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AoC,EAAE,uBAAuB;IAC7D,mCAAmC,EACjC,yEAAyE;IAE3E,0BAA0B,EAAE,WAAW;IACvC,4BAA4B,EAAE,yBAAyB;IACvD,gCAAgC,EAAE,iCAAiC;IACnE,0BAA0B,EAAE,8BAA8B;IAC1D,+BAA+B,EAC7B,kEAAkE;IACpE,iCAAiC,EAC/B,8EAA8E;IAEhF,2EAA2E;IAC3E,qCAAqC,EACnC,mDAAmD;IACrD,0CAA0C,EACxC,iGAAiG;IAEnG,wCAAwC,EACtC,yGAAyG;IAE3G,0BAA0B,EAAE,+BAA+B;IAC3D,wBAAwB,EACtB,wEAAwE;IAC1E,kCAAkC,EAChC,yEAAyE;IAC3E,6BAA6B,EAC3B,0DAA0D;IAC5D,gCAAgC,EAC9B,8DAA8D;IAChE,4BAA4B,EAAE,oCAAoC;IAClE,4BAA4B,EAC1B,sEAAsE;IAExE,oBAAoB,EAAE,UAAU;IAChC,oBAAoB,EAAE,WAAW;IACjC,yBAAyB,EAAE,eAAe;IAE1C,qBAAqB,EAAE,SAAS;IAChC,sBAAsB,EAAE,kBAAkB;IAC1C,4BAA4B,EAAE,OAAO;IACrC,mBAAmB,EAAE,cAAc;IACnC,yBAAyB,EAAE,MAAM;IACjC,wBAAwB,EAAE,WAAW;CACtC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,UAAU,sBAAsB,CAAC,IAAgB;IACrD,wBAAwB,CAAC,IAAI,CAAC,CAAC;IAC/B,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,oBAAoB,CAAC,CAAC;AAClD,CAAC"}
|
|
@@ -2,7 +2,7 @@ import type { ListingsErrorCode } from "./errors.gen.js";
|
|
|
2
2
|
/**
|
|
3
3
|
* `es` texts for the backend error codes this catalog carries.
|
|
4
4
|
*
|
|
5
|
-
* PARTIAL, and deliberately typed to say so:
|
|
5
|
+
* PARTIAL, and deliberately typed to say so: 27 key(s) owned by
|
|
6
6
|
* stapel_attributes, stapel_listings are absent, because that owner ships no locale catalog
|
|
7
7
|
* (ERRORS_LOCALE_EXEMPT_OWNERS). English for them still comes from the registry
|
|
8
8
|
* artifact via the en bundle; the pair layers its own authored `es`
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `es` texts for the backend error codes this catalog carries.
|
|
3
3
|
*
|
|
4
|
-
* PARTIAL, and deliberately typed to say so:
|
|
4
|
+
* PARTIAL, and deliberately typed to say so: 27 key(s) owned by
|
|
5
5
|
* stapel_attributes, stapel_listings are absent, because that owner ships no locale catalog
|
|
6
6
|
* (ERRORS_LOCALE_EXEMPT_OWNERS). English for them still comes from the registry
|
|
7
7
|
* artifact via the en bundle; the pair layers its own authored `es`
|
|
@@ -208,6 +208,12 @@ export declare const LISTINGS_ERRORS: {
|
|
|
208
208
|
readonly remediation: "fix_input";
|
|
209
209
|
readonly en: "Invalid advertisement ID";
|
|
210
210
|
};
|
|
211
|
+
readonly "error.400.listing_draft_meta_too_large": {
|
|
212
|
+
readonly status: 400;
|
|
213
|
+
readonly params: readonly ["max_bytes"];
|
|
214
|
+
readonly remediation: "fix_input";
|
|
215
|
+
readonly en: "draft_meta is too large ({max_bytes} bytes max)";
|
|
216
|
+
};
|
|
211
217
|
readonly "error.400.listing_feature_not_allowed": {
|
|
212
218
|
readonly status: 400;
|
|
213
219
|
readonly params: readonly ["feature"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.gen.d.ts","sourceRoot":"","sources":["../../../src/i18n/generated/errors.gen.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GACnB,OAAO,GACP,gBAAgB,GAChB,gBAAgB,GAChB,QAAQ,GACR,WAAW,GACX,iBAAiB,GACjB,KAAK,CAAC;AAEV,MAAM,WAAW,iBAAiB;IAChC,oDAAoD;IACpD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,4DAA4D;IAC5D,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;I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M,iBAAiB,GAAG,MAAM,OAAO,eAAe,CAAC;AAE7D,gEAAgE;AAChE,eAAO,MAAM,oBAAoB,EAAE,SAAS,iBAAiB,EAsE5D,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAsEnE,CAAC"}
|
|
@@ -38,6 +38,7 @@ export const LISTINGS_ERRORS = {
|
|
|
38
38
|
"error.400.field.unique": { status: 400, params: ["field"], remediation: "fix_input", en: "{field} must be unique" },
|
|
39
39
|
"error.400.image_required": { status: 400, params: [], remediation: "fix_input", en: "At least one image is required to publish" },
|
|
40
40
|
"error.400.invalid_ad_id": { status: 400, params: [], remediation: "fix_input", en: "Invalid advertisement ID" },
|
|
41
|
+
"error.400.listing_draft_meta_too_large": { status: 400, params: ["max_bytes"], remediation: "fix_input", en: "draft_meta is too large ({max_bytes} bytes max)" },
|
|
41
42
|
"error.400.listing_feature_not_allowed": { status: 400, params: ["feature"], remediation: "fix_input", en: "Feature '{feature}' is not allowed for this category" },
|
|
42
43
|
"error.400.listing_invalid_status_filter": { status: 400, params: ["status"], remediation: "fix_input", en: "Unknown listing status '{status}'" },
|
|
43
44
|
"error.400.listing_location_required": { status: 400, params: [], remediation: "fix_input", en: "Choose where the item is before publishing" },
|
|
@@ -109,6 +110,7 @@ export const LISTINGS_ERROR_CODES = [
|
|
|
109
110
|
"error.400.field.unique",
|
|
110
111
|
"error.400.image_required",
|
|
111
112
|
"error.400.invalid_ad_id",
|
|
113
|
+
"error.400.listing_draft_meta_too_large",
|
|
112
114
|
"error.400.listing_feature_not_allowed",
|
|
113
115
|
"error.400.listing_invalid_status_filter",
|
|
114
116
|
"error.400.listing_location_required",
|
|
@@ -184,6 +186,7 @@ export const listingsErrorBundleEn = {
|
|
|
184
186
|
"error.400.field.unique": "{field} must be unique",
|
|
185
187
|
"error.400.image_required": "At least one image is required to publish",
|
|
186
188
|
"error.400.invalid_ad_id": "Invalid advertisement ID",
|
|
189
|
+
"error.400.listing_draft_meta_too_large": "draft_meta is too large ({max_bytes} bytes max)",
|
|
187
190
|
"error.400.listing_feature_not_allowed": "Feature '{feature}' is not allowed for this category",
|
|
188
191
|
"error.400.listing_invalid_status_filter": "Unknown listing status '{status}'",
|
|
189
192
|
"error.400.listing_location_required": "Choose where the item is before publishing",
|