@mohasinac/appkit 4.55.0 β†’ 4.57.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 (86) hide show
  1. package/dist/.build-stamp.json +4 -4
  2. package/dist/_internal/server/features/checkout/actions.d.ts +53 -0
  3. package/dist/_internal/server/features/checkout/actions.js +156 -8
  4. package/dist/_internal/server/features/orders/actions.d.ts +30 -0
  5. package/dist/_internal/server/features/orders/actions.js +103 -0
  6. package/dist/_internal/server/features/orders/adapters.js +7 -0
  7. package/dist/_internal/server/features/shipping/reconcile.d.ts +28 -0
  8. package/dist/_internal/server/features/shipping/reconcile.js +93 -0
  9. package/dist/_internal/shared/actions/action-registry.js +53 -0
  10. package/dist/_internal/shared/config/schema.d.ts +6 -0
  11. package/dist/_internal/shared/listing-types/route-gating.d.ts +56 -0
  12. package/dist/_internal/shared/listing-types/route-gating.js +114 -0
  13. package/dist/_internal/shared/shipping/quote.d.ts +153 -0
  14. package/dist/_internal/shared/shipping/quote.js +123 -0
  15. package/dist/client.d.ts +22 -0
  16. package/dist/client.js +10 -0
  17. package/dist/features/about/components/PublicProfileView.js +2 -1
  18. package/dist/features/account/components/UserOrdersView.js +25 -3
  19. package/dist/features/admin/components/OwnerQuickActions.d.ts +1 -1
  20. package/dist/features/admin/components/OwnerQuickActions.js +53 -6
  21. package/dist/features/auctions/components/AuctionDetailPageView.js +2 -1
  22. package/dist/features/auth/schemas/firestore.d.ts +15 -0
  23. package/dist/features/blog/components/BlogPostView.js +2 -1
  24. package/dist/features/cart/components/CartPriceBreakdown.d.ts +2 -0
  25. package/dist/features/cart/components/CartPriceBreakdown.js +1 -1
  26. package/dist/features/categories/components/FranchiseDetailPageView.js +3 -1
  27. package/dist/features/digital-codes/components/DigitalCodeDetailPageView.js +2 -1
  28. package/dist/features/faq/components/FAQPageContent.js +17 -4
  29. package/dist/features/faq/constants/help-guides.d.ts +36 -0
  30. package/dist/features/faq/constants/help-guides.js +64 -0
  31. package/dist/features/homepage/components/HeroCarousel.js +7 -3
  32. package/dist/features/homepage/components/MarketplaceHomepageView.js +16 -1
  33. package/dist/features/homepage/components/WelcomeSection.d.ts +16 -3
  34. package/dist/features/homepage/components/WelcomeSection.js +3 -3
  35. package/dist/features/homepage/lib/section-renderer.d.ts +9 -0
  36. package/dist/features/homepage/lib/section-renderer.js +24 -6
  37. package/dist/features/homepage/lib/slide-gating.d.ts +52 -0
  38. package/dist/features/homepage/lib/slide-gating.js +98 -0
  39. package/dist/features/live/components/LiveItemDetailPageView.js +2 -1
  40. package/dist/features/media/MediaAvatar.js +1 -1
  41. package/dist/features/media/MediaImage.d.ts +18 -1
  42. package/dist/features/media/MediaImage.js +1 -1
  43. package/dist/features/orders/components/EmiInstallmentsPanel.d.ts +19 -0
  44. package/dist/features/orders/components/EmiInstallmentsPanel.js +57 -0
  45. package/dist/features/orders/components/index.d.ts +1 -0
  46. package/dist/features/orders/components/index.js +1 -0
  47. package/dist/features/orders/schemas/firestore.d.ts +38 -0
  48. package/dist/features/orders/schemas/index.d.ts +2 -2
  49. package/dist/features/orders/types/index.d.ts +15 -0
  50. package/dist/features/points/repository/points.repository.d.ts +81 -0
  51. package/dist/features/points/repository/points.repository.js +155 -0
  52. package/dist/features/points/schemas/firestore.d.ts +118 -0
  53. package/dist/features/points/schemas/firestore.js +116 -0
  54. package/dist/features/pre-orders/components/PreOrderDetailPageView.js +2 -1
  55. package/dist/features/products/components/PrizeDrawDetailPageView.js +2 -1
  56. package/dist/features/products/components/ProductDetailPageView.js +3 -1
  57. package/dist/features/reviews/components/ReviewDetailPageView.js +3 -2
  58. package/dist/features/seller/actions/seller-actions.d.ts +17 -0
  59. package/dist/features/seller/actions/seller-actions.js +33 -0
  60. package/dist/features/stores/components/StoreHeader.js +3 -1
  61. package/dist/index.d.ts +1 -0
  62. package/dist/index.js +8 -0
  63. package/dist/next/routing/route-map.d.ts +4 -0
  64. package/dist/next/routing/route-map.js +2 -0
  65. package/dist/schemas/registry.d.ts +2 -2
  66. package/dist/seed/_helpers/category-models/chunk0.d.ts +2 -0
  67. package/dist/seed/_helpers/category-models/chunk0.js +2648 -0
  68. package/dist/seed/_helpers/category-models/chunk1.d.ts +2 -0
  69. package/dist/seed/_helpers/category-models/chunk1.js +2318 -0
  70. package/dist/seed/_helpers/category-models/chunk2.d.ts +2 -0
  71. package/dist/seed/_helpers/category-models/chunk2.js +2560 -0
  72. package/dist/seed/_helpers/category-models/chunk3.d.ts +2 -0
  73. package/dist/seed/_helpers/category-models/chunk3.js +2196 -0
  74. package/dist/seed/_helpers/category-models/chunk4.d.ts +2 -0
  75. package/dist/seed/_helpers/category-models/chunk4.js +1732 -0
  76. package/dist/seed/_helpers/category-models.d.ts +9 -2
  77. package/dist/seed/_helpers/category-models.js +19 -1368
  78. package/dist/seed/carousel-slides-seed-data.js +48 -7
  79. package/dist/server.d.ts +3 -1
  80. package/dist/server.js +11 -0
  81. package/dist/styles.css +38 -6
  82. package/dist/tailwind-utilities.css +1 -1
  83. package/dist/ui/components/ImageMosaic.d.ts +17 -1
  84. package/dist/ui/components/ImageMosaic.js +28 -5
  85. package/dist/ui/components/ImageMosaic.style.css +37 -5
  86. package/package.json +1 -1
@@ -13,6 +13,22 @@ export interface ImageMosaicProps {
13
13
  alt: string;
14
14
  /** Height preset. Defaults to `"band"`, the original behaviour. */
15
15
  size?: ImageMosaicSize;
16
+ /**
17
+ * Replaces the large cell's image with arbitrary content β€” the homepage
18
+ * hero's brand panel is the only caller.
19
+ *
20
+ * πŸ›‘ It changes what `images` MEANS, which is the whole reason it is a
21
+ * separate prop rather than a `images[0]`-shaped special case: without a
22
+ * slot the first image takes the large cell, with one EVERY image goes to
23
+ * the small column. A caller that passes both a slot and three images gets
24
+ * three small tiles, not two.
25
+ *
26
+ * `MOSAIC_MIN` is also not applied in this mode. The minimum exists because
27
+ * fewer than three images is not an arrangement β€” but a slot is content in
28
+ * its own right, so one image beside it is still a composition, and zero
29
+ * images collapses to the slot alone at full width.
30
+ */
31
+ leadSlot?: React.ReactNode;
16
32
  className?: string;
17
33
  }
18
34
  /**
@@ -47,4 +63,4 @@ export interface ImageMosaicProps {
47
63
  * breaks SSR/hydration agreement and makes the page feel unstable β€” and it is
48
64
  * the shape Root Cause #25 is about on the seed side.
49
65
  */
50
- export declare function ImageMosaic({ images, alt, size, className }: ImageMosaicProps): React.JSX.Element | null;
66
+ export declare function ImageMosaic({ images, alt, size, leadSlot, className }: ImageMosaicProps): React.JSX.Element | null;
@@ -37,11 +37,34 @@ export const MOSAIC_MIN = 3;
37
37
  * breaks SSR/hydration agreement and makes the page feel unstable β€” and it is
38
38
  * the shape Root Cause #25 is about on the seed side.
39
39
  */
40
- export function ImageMosaic({ images, alt, size = "band", className }) {
41
- const tiles = images.filter(Boolean).slice(0, MOSAIC_MAX);
42
- if (tiles.length < MOSAIC_MIN)
40
+ export function ImageMosaic({ images, alt, size = "band", leadSlot, className }) {
41
+ // With a slot the large cell is already spoken for, so the whole budget
42
+ // belongs to the small column β€” one fewer tile than the image-led shape.
43
+ const tiles = images.filter(Boolean).slice(0, leadSlot ? MOSAIC_MAX - 1 : MOSAIC_MAX);
44
+ if (!leadSlot && tiles.length < MOSAIC_MIN)
43
45
  return null;
44
- const [lead, ...rest] = tiles;
46
+ const [lead, ...rest] = leadSlot ? [undefined, ...tiles] : tiles;
45
47
  const sizeClass = size === "hero" ? "appkit-image-mosaic--hero" : "";
46
- return (_jsxs(Div, { className: `appkit-image-mosaic ${sizeClass} ${className ?? ""}`, role: "img", "aria-label": alt, children: [_jsx(Div, { className: "appkit-image-mosaic__lead", children: _jsx(MediaImage, { src: lead, alt: "", size: "card" }) }), _jsx(Div, { className: "appkit-image-mosaic__rest", children: rest.map((src, i) => (_jsx(Div, { className: "appkit-image-mosaic__tile", children: _jsx(MediaImage, { src: src, alt: "", size: "thumbnail" }) }, `${src}-${i}`))) })] }));
48
+ // Nothing to put in the small column β€” the 1fr track would otherwise render
49
+ // as an empty gutter beside the slot, which reads as a failed image load
50
+ // rather than as a deliberate panel.
51
+ const soloClass = leadSlot && rest.length === 0 ? "appkit-image-mosaic--solo" : "";
52
+ /*
53
+ * πŸ›‘ WHERE `role="img"` GOES DEPENDS ON THE SLOT, and getting this wrong is
54
+ * silent.
55
+ *
56
+ * `role="img"` collapses its entire subtree into ONE node named by
57
+ * `aria-label` β€” that is exactly right for a group of decorative thumbnails
58
+ * (point 1 in the header: one alt describing the subject, not five
59
+ * filenames). Leave it on the grid in `leadSlot` mode and it also swallows
60
+ * the slot, so the hero's logo and its "Let It Rip India" caption would
61
+ * reach a screen reader as "…collection highlights" and nothing else β€” real
62
+ * content erased by a label meant for the pictures beside it.
63
+ *
64
+ * So in slot mode the role moves down to the image group, where it belongs,
65
+ * and the slot stays ordinary DOM. The no-slot path is byte-identical to
66
+ * what it always was.
67
+ */
68
+ const imageGroupA11y = { role: "img", "aria-label": alt };
69
+ return (_jsxs(Div, { className: `appkit-image-mosaic ${sizeClass} ${soloClass} ${className ?? ""}`, ...(leadSlot ? {} : imageGroupA11y), children: [_jsx(Div, { className: "appkit-image-mosaic__lead", children: leadSlot ?? _jsx(MediaImage, { src: lead, alt: "", size: "card" }) }), rest.length > 0 && (_jsx(Div, { className: "appkit-image-mosaic__rest", ...(leadSlot ? imageGroupA11y : {}), children: rest.map((src, i) => (_jsx(Div, { className: "appkit-image-mosaic__tile", children: _jsx(MediaImage, { src: src, alt: "", size: "thumbnail" }) }, `${src}-${i}`))) }))] }));
47
70
  }
@@ -7,10 +7,19 @@
7
7
  * around as a visitor moves through the tree. A fixed height per breakpoint is
8
8
  * the one shape that keeps the hero stable.
9
9
  *
10
- * πŸ›‘ `overflow: hidden` on the grid and `object-fit: cover` on the images, so a
11
- * portrait product photo cannot stretch the band. Every image here is a
12
- * thumbnail of unknown aspect ratio; cropping is the only option that does not
13
- * distort the subject.
10
+ * πŸ›‘ `overflow: hidden` on the grid, and the images are CONTAINED rather than
11
+ * cropped. This block used to say the opposite β€” "cropping is the only option
12
+ * that does not distort the subject" β€” and `object-fit: cover` was declared
13
+ * here. Both are gone: `MediaImage` now defaults to `contain` app-wide, which
14
+ * it applies as a Tailwind utility, and both Tailwind configs set
15
+ * `important: true` β€” so a plain `object-fit: cover` declaration here could
16
+ * never have won anyway. It would have been a rule that reads as the
17
+ * governing decision while changing nothing (Root Cause #106).
18
+ *
19
+ * The trade is real and is the one that was asked for: a 4:3 publisher shot in
20
+ * a square tile now letterboxes against `--appkit-color-surface` instead of
21
+ * having its edges cut off. Most of this catalogue's imagery is product-on-
22
+ * white, where a crop removes the product and `contain` does not.
14
23
  */
15
24
  .appkit-image-mosaic {
16
25
  display: grid;
@@ -49,6 +58,16 @@
49
58
  }
50
59
  }
51
60
 
61
+ /*
62
+ * `--solo` β€” a `leadSlot` with no images beside it.
63
+ *
64
+ * One column, not `2fr 1fr`. The small track has nothing to hold, and an empty
65
+ * 1fr gutter beside a brand panel reads as four images that failed to load.
66
+ */
67
+ .appkit-image-mosaic--solo {
68
+ grid-template-columns: 1fr;
69
+ }
70
+
52
71
  .appkit-image-mosaic__lead,
53
72
  .appkit-image-mosaic__tile {
54
73
  position: relative;
@@ -61,7 +80,20 @@
61
80
  .appkit-image-mosaic__tile img {
62
81
  width: 100%;
63
82
  height: 100%;
64
- object-fit: cover;
83
+ }
84
+
85
+ /*
86
+ * Breathing room INSIDE the tile, so a contained image stops short of the
87
+ * rounded corners instead of touching them. On `cover` this was unnecessary β€”
88
+ * the crop ran to the edge by definition β€” which is why it arrives with the
89
+ * fit change rather than before it.
90
+ */
91
+ .appkit-image-mosaic__lead img {
92
+ padding: var(--appkit-space-3);
93
+ }
94
+
95
+ .appkit-image-mosaic__tile img {
96
+ padding: var(--appkit-space-2);
65
97
  }
66
98
 
67
99
  .appkit-image-mosaic__rest {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mohasinac/appkit",
3
- "version": "4.55.0",
3
+ "version": "4.57.0",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "access": "public"