@stapel/listings-react 0.29.1 → 0.30.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 (64) hide show
  1. package/CHANGELOG.md +119 -0
  2. package/dist/default/CardBadges.d.ts +32 -0
  3. package/dist/default/CardBadges.d.ts.map +1 -1
  4. package/dist/default/CardBadges.js +41 -3
  5. package/dist/default/CardBadges.js.map +1 -1
  6. package/dist/default/ListingDetailPane.d.ts +115 -8
  7. package/dist/default/ListingDetailPane.d.ts.map +1 -1
  8. package/dist/default/ListingDetailPane.js +358 -177
  9. package/dist/default/ListingDetailPane.js.map +1 -1
  10. package/dist/default/ListingRelated.d.ts +88 -0
  11. package/dist/default/ListingRelated.d.ts.map +1 -0
  12. package/dist/default/ListingRelated.js +41 -0
  13. package/dist/default/ListingRelated.js.map +1 -0
  14. package/dist/default/ListingSpecList.d.ts +29 -34
  15. package/dist/default/ListingSpecList.d.ts.map +1 -1
  16. package/dist/default/ListingSpecList.js +67 -12
  17. package/dist/default/ListingSpecList.js.map +1 -1
  18. package/dist/default/condensedBar.d.ts +17 -0
  19. package/dist/default/condensedBar.d.ts.map +1 -0
  20. package/dist/default/condensedBar.js +73 -0
  21. package/dist/default/condensedBar.js.map +1 -0
  22. package/dist/default/detailGallery.d.ts +40 -40
  23. package/dist/default/detailGallery.d.ts.map +1 -1
  24. package/dist/default/detailGallery.js +129 -0
  25. package/dist/default/detailGallery.js.map +1 -1
  26. package/dist/default/detailRhythm.d.ts +15 -0
  27. package/dist/default/detailRhythm.d.ts.map +1 -0
  28. package/dist/default/detailRhythm.js +74 -0
  29. package/dist/default/detailRhythm.js.map +1 -0
  30. package/dist/default/icons.d.ts +13 -0
  31. package/dist/default/icons.d.ts.map +1 -1
  32. package/dist/default/icons.js +15 -0
  33. package/dist/default/icons.js.map +1 -1
  34. package/dist/default/index.d.ts +9 -5
  35. package/dist/default/index.d.ts.map +1 -1
  36. package/dist/default/index.js +13 -4
  37. package/dist/default/index.js.map +1 -1
  38. package/dist/i18n/es.d.ts.map +1 -1
  39. package/dist/i18n/es.js +9 -0
  40. package/dist/i18n/es.js.map +1 -1
  41. package/dist/i18n/keys.d.ts +23 -0
  42. package/dist/i18n/keys.d.ts.map +1 -1
  43. package/dist/i18n/keys.js +32 -0
  44. package/dist/i18n/keys.js.map +1 -1
  45. package/dist/i18n/ru.d.ts.map +1 -1
  46. package/dist/i18n/ru.js +9 -0
  47. package/dist/i18n/ru.js.map +1 -1
  48. package/llms.txt +3 -2
  49. package/manifest.json +28 -1
  50. package/nav-manifest.json +1 -1
  51. package/package.json +4 -4
  52. package/src/analytics/generated/events.json +1 -1
  53. package/src/default/CardBadges.tsx +65 -4
  54. package/src/default/ListingDetailPane.tsx +490 -52
  55. package/src/default/ListingRelated.tsx +154 -0
  56. package/src/default/ListingSpecList.tsx +64 -1
  57. package/src/default/condensedBar.ts +74 -0
  58. package/src/default/detailGallery.ts +141 -0
  59. package/src/default/detailRhythm.ts +78 -0
  60. package/src/default/icons.tsx +32 -0
  61. package/src/default/index.ts +45 -2
  62. package/src/i18n/es.ts +9 -0
  63. package/src/i18n/keys.ts +32 -0
  64. package/src/i18n/ru.ts +9 -0
@@ -66,6 +66,7 @@ export type { FeedGridProps } from "./FeedGrid.js";
66
66
  export {
67
67
  ListingDetailPane,
68
68
  DETAIL_MEASURE,
69
+ QUICK_QUESTIONS_MAX,
69
70
  // The split layout's two geometry constants, for a container laying out
70
71
  // against the same tracks (and for a test that measures them).
71
72
  DETAIL_SPLIT_MEASURE,
@@ -82,11 +83,45 @@ export type {
82
83
  // inline `display`.
83
84
  export {
84
85
  LISTINGS_GALLERY_CLASS,
86
+ LISTINGS_GALLERY_COUNTER_CLASS,
87
+ LISTINGS_GALLERY_FRAME_CLASS,
85
88
  LISTINGS_GALLERY_STYLE_HREF,
86
89
  LISTINGS_GALLERY_STRIP_BASIS,
87
90
  detailGalleryCss,
91
+ nearestPhotoIndex,
92
+ useGalleryPosition,
88
93
  } from "./detailGallery.js";
89
- export type { ListingGalleryLayout } from "./detailGallery.js";
94
+ export type { GalleryPosition, ListingGalleryLayout } from "./detailGallery.js";
95
+ // The listing page's block rhythm: the reset that keeps a child's own margin
96
+ // out of the column's gap, and the section rule's own token spacing.
97
+ export {
98
+ DETAIL_RHYTHM_CLASS,
99
+ DETAIL_RHYTHM_STYLE_HREF,
100
+ DETAIL_RULE_CLASS,
101
+ DETAIL_RULE_SPACE,
102
+ detailRhythmCss,
103
+ } from "./detailRhythm.js";
104
+ // The condensed top bar the pane draws for `actionsPlacement="condensed-top"`
105
+ // — its classes and sheet, so a container retunes the geometry with a selector
106
+ // rather than `!important` over a pair's own.
107
+ export {
108
+ CONDENSED_BAR_CLASS,
109
+ CONDENSED_BAR_STYLE_HREF,
110
+ CONDENSED_TITLE_CLASS,
111
+ condensedBarCss,
112
+ } from "./condensedBar.js";
113
+ // The two "find more" strips, for a host composing them itself.
114
+ export {
115
+ ListingRelatedStrip,
116
+ RELATED_CARD_BASIS,
117
+ RELATED_STRIP_CLASS,
118
+ RELATED_STYLE_HREF,
119
+ relatedStripCss,
120
+ } from "./ListingRelated.js";
121
+ export type {
122
+ ListingRelatedContext,
123
+ ListingRelatedStripProps,
124
+ } from "./ListingRelated.js";
90
125
  export {
91
126
  ListingComposerPage,
92
127
  COMPOSER_DETAILS_PLACEMENT,
@@ -123,10 +158,18 @@ export type { ListingPhotoProps } from "./ListingPhoto.js";
123
158
  export {
124
159
  ListingSpecColumns,
125
160
  ListingSpecList,
161
+ SPEC_FOLD_MIN_HIDDEN,
126
162
  specListCss,
127
163
  } from "./ListingSpecList.js";
128
164
  export type { ListingSpecListProps } from "./ListingSpecList.js";
129
- export { CardBadges, CardSpecLine } from "./CardBadges.js";
165
+ export {
166
+ CardBadges,
167
+ CardSpecLine,
168
+ CARD_SPEC_LINE_CLASS,
169
+ CARD_SPEC_STYLE_HREF,
170
+ CARD_SPEC_TEXT_CLASS,
171
+ cardSpecLineCss,
172
+ } from "./CardBadges.js";
130
173
  export type { CardBadgesProps } from "./CardBadges.js";
131
174
 
132
175
  // ── the card gallery's two gestures ─────────────────────────────────────────
package/src/i18n/es.ts CHANGED
@@ -112,6 +112,15 @@ export const listingsI18nBundleEs: I18nDictionary = {
112
112
  "listings.detail.views": "Visitas",
113
113
  "listings.detail.edit": "Editar el anuncio",
114
114
  "listings.detail.take_down": "Retirarlo",
115
+ "listings.detail.back": "Atrás",
116
+ "listings.detail.ask_seller": "Pregunta al vendedor",
117
+ "listings.detail.question_available": "¿Sigue disponible?",
118
+ "listings.detail.question_price": "¿El precio es negociable?",
119
+ "listings.detail.question_viewing": "¿Puedo verlo en persona?",
120
+ "listings.detail.question_delivery": "¿Hacen envíos?",
121
+ "listings.detail.similar": "Anuncios similares",
122
+ "listings.detail.from_seller": "Más de este vendedor",
123
+ "listings.detail.show_all": "Ver todo",
115
124
 
116
125
  "listings.compose.new_title": "Anuncio nuevo",
117
126
  "listings.compose.edit_title": "Editar el anuncio",
package/src/i18n/keys.ts CHANGED
@@ -157,6 +157,29 @@ export const LISTINGS_I18N_KEYS = {
157
157
  /** The owner's two primaries on their own listing page. */
158
158
  detailEdit: "listings.detail.edit",
159
159
  detailTakeDown: "listings.detail.take_down",
160
+ /** The condensed bar's back control. Icon-only, so this string IS the whole
161
+ * announcement — the bar has a glyph, the title and the two verbs, and a
162
+ * nameless arrow is the one of the four nothing can read. */
163
+ detailBack: "listings.detail.back",
164
+ /**
165
+ * "Ask the seller" — the caption over the canned questions.
166
+ *
167
+ * The chips underneath are DEFAULTS, not content: four questions every
168
+ * classified's buyers ask, in the pair's own three locales, which a host
169
+ * replaces wholesale through `quickQuestions`. A pair that shipped none
170
+ * would leave every deployment writing the same four sentences.
171
+ */
172
+ detailAskSeller: "listings.detail.ask_seller",
173
+ detailQuestionAvailable: "listings.detail.question_available",
174
+ detailQuestionPrice: "listings.detail.question_price",
175
+ detailQuestionViewing: "listings.detail.question_viewing",
176
+ detailQuestionDelivery: "listings.detail.question_delivery",
177
+ /** The two "find more" strips' captions — see `<ListingRelatedStrip>`. */
178
+ detailSimilar: "listings.detail.similar",
179
+ detailFromSeller: "listings.detail.from_seller",
180
+ /** One verb for three folds: the spec table past its limit, and either
181
+ * strip's link into the search that holds the rest of it. */
182
+ detailShowAll: "listings.detail.show_all",
160
183
 
161
184
  // ── composer ─────────────────────────────────────────────────────────────
162
185
  composeNewTitle: "listings.compose.new_title",
@@ -407,6 +430,15 @@ export const listingsI18nBundleEn: Record<string, string> = {
407
430
  "listings.detail.views": "Views",
408
431
  "listings.detail.edit": "Edit listing",
409
432
  "listings.detail.take_down": "Take it down",
433
+ "listings.detail.back": "Back",
434
+ "listings.detail.ask_seller": "Ask the seller",
435
+ "listings.detail.question_available": "Is it still available?",
436
+ "listings.detail.question_price": "Is the price negotiable?",
437
+ "listings.detail.question_viewing": "Can I come and see it?",
438
+ "listings.detail.question_delivery": "Do you deliver?",
439
+ "listings.detail.similar": "Similar listings",
440
+ "listings.detail.from_seller": "More from this seller",
441
+ "listings.detail.show_all": "Show all",
410
442
 
411
443
  "listings.compose.new_title": "New listing",
412
444
  "listings.compose.edit_title": "Edit listing",
package/src/i18n/ru.ts CHANGED
@@ -136,6 +136,15 @@ export const listingsI18nBundleRu: I18nDictionary = {
136
136
  "listings.detail.views": "Просмотры",
137
137
  "listings.detail.edit": "Редактировать объявление",
138
138
  "listings.detail.take_down": "Снять с публикации",
139
+ "listings.detail.back": "Назад",
140
+ "listings.detail.ask_seller": "Спросите у продавца",
141
+ "listings.detail.question_available": "Ещё продаётся?",
142
+ "listings.detail.question_price": "Торг уместен?",
143
+ "listings.detail.question_viewing": "Можно посмотреть?",
144
+ "listings.detail.question_delivery": "Доставка есть?",
145
+ "listings.detail.similar": "Похожие объявления",
146
+ "listings.detail.from_seller": "Другие объявления продавца",
147
+ "listings.detail.show_all": "Показать все",
139
148
 
140
149
  "listings.compose.new_title": "Новое объявление",
141
150
  "listings.compose.edit_title": "Редактирование объявления",