@cimplify/sdk 0.38.1 → 0.38.2

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/dist/mock/msw.mjs CHANGED
@@ -3323,6 +3323,15 @@ function percent(a, pct) {
3323
3323
  function createCatalogueService(opts) {
3324
3324
  const { registry, clock, ids } = opts;
3325
3325
  const productsForBusiness = (businessId) => registry.products.list((p) => p.business_id === businessId);
3326
+ const defaultPriceInfo = (price, currency) => ({
3327
+ base_price: price,
3328
+ final_price: price,
3329
+ markup_percentage: "0.00",
3330
+ markup_amount: "0.00",
3331
+ markup_discount_percentage: "0.00",
3332
+ markup_discount_amount: "0.00",
3333
+ currency
3334
+ });
3326
3335
  const toApiProduct = (p) => ({
3327
3336
  id: p.id,
3328
3337
  business_id: p.business_id,
@@ -3331,10 +3340,15 @@ function createCatalogueService(opts) {
3331
3340
  description: p.description ?? "",
3332
3341
  product_type: p.product_type,
3333
3342
  base_price: p.base_price,
3343
+ default_price: p.base_price,
3344
+ default_price_info: defaultPriceInfo(p.base_price, p.currency),
3345
+ price_info: defaultPriceInfo(p.base_price, p.currency),
3334
3346
  currency: p.currency,
3335
3347
  image: p.image,
3348
+ image_url: p.image,
3336
3349
  images: p.images,
3337
3350
  is_available: p.is_available,
3351
+ category_id: p.category_ids[0],
3338
3352
  category_ids: p.category_ids,
3339
3353
  collection_ids: p.collection_ids,
3340
3354
  add_on_ids: p.add_on_ids,
@@ -3344,6 +3358,7 @@ function createCatalogueService(opts) {
3344
3358
  custom_attributes: [],
3345
3359
  properties: [],
3346
3360
  has_variants: p.variant_ids.length > 0,
3361
+ type: p.product_type,
3347
3362
  render_hint: "general"
3348
3363
  });
3349
3364
  const variantsForProduct = (productId) => registry.variants.list((v) => v.product_id === productId);
@@ -4610,26 +4625,26 @@ function createLiteService(opts) {
4610
4625
  // src/mock/seeds/default.ts
4611
4626
  var ISO = "2026-01-01T00:00:00.000Z";
4612
4627
  var PRODUCTS = [
4613
- { name: "Sourdough Loaf", slug: "sourdough-loaf", price: "25.00", category: "breads", description: "Artisanal 24-hour fermented sourdough.", image: "https://mock.cimplify.io/img/sourdough.jpg" },
4614
- { name: "Whole Wheat Bread", slug: "whole-wheat", price: "20.00", category: "breads", description: "Hearty whole wheat with seeds.", image: "https://mock.cimplify.io/img/wheat.jpg" },
4615
- { name: "Baguette", slug: "baguette", price: "15.00", category: "breads", description: "Crispy crust, soft inside.", image: "https://mock.cimplify.io/img/baguette.jpg" },
4616
- { name: "Focaccia", slug: "focaccia", price: "30.00", category: "breads", description: "Olive oil and rosemary focaccia.", image: "https://mock.cimplify.io/img/focaccia.jpg" },
4617
- { name: "Croissant", slug: "croissant", price: "12.00", category: "pastries", description: "Buttery French croissant.", image: "https://mock.cimplify.io/img/croissant.jpg" },
4618
- { name: "Pain au Chocolat", slug: "pain-au-chocolat", price: "14.00", category: "pastries", description: "Croissant with dark chocolate.", image: "https://mock.cimplify.io/img/pac.jpg" },
4619
- { name: "Almond Danish", slug: "almond-danish", price: "16.00", category: "pastries", description: "Flaky pastry with almond cream.", image: "https://mock.cimplify.io/img/danish.jpg" },
4620
- { name: "Cinnamon Roll", slug: "cinnamon-roll", price: "13.00", category: "pastries", description: "Soft roll with cinnamon glaze.", image: "https://mock.cimplify.io/img/cinnamon.jpg" },
4621
- { name: "Chocolate Cake (Slice)", slug: "chocolate-cake", price: "22.00", category: "cakes", description: "Rich dark chocolate cake.", image: "https://mock.cimplify.io/img/choc-cake.jpg" },
4622
- { name: "Red Velvet (Slice)", slug: "red-velvet", price: "22.00", category: "cakes", description: "Classic red velvet with cream cheese.", image: "https://mock.cimplify.io/img/red-velvet.jpg" },
4623
- { name: "Carrot Cake (Slice)", slug: "carrot-cake", price: "20.00", category: "cakes", description: "Spiced carrot cake with walnut.", image: "https://mock.cimplify.io/img/carrot.jpg" },
4624
- { name: "Cheesecake (Slice)", slug: "cheesecake", price: "24.00", category: "cakes", description: "New York style cheesecake.", image: "https://mock.cimplify.io/img/cheesecake.jpg" },
4625
- { name: "Coffee", slug: "coffee", price: "10.00", category: "drinks", description: "Locally roasted Arabica.", image: "https://mock.cimplify.io/img/coffee.jpg" },
4626
- { name: "Tea", slug: "tea", price: "8.00", category: "drinks", description: "Black, green, or herbal.", image: "https://mock.cimplify.io/img/tea.jpg" },
4627
- { name: "Hibiscus Tea (Sobolo)", slug: "sobolo", price: "12.00", category: "drinks", description: "Iced hibiscus drink.", image: "https://mock.cimplify.io/img/sobolo.jpg" },
4628
- { name: "Fresh Orange Juice", slug: "orange-juice", price: "15.00", category: "drinks", description: "Cold-pressed orange juice.", image: "https://mock.cimplify.io/img/oj.jpg" },
4629
- { name: "Banana Bread", slug: "banana-bread", price: "18.00", category: "breads", description: "Moist banana loaf.", image: "https://mock.cimplify.io/img/banana.jpg" },
4630
- { name: "Brownie", slug: "brownie", price: "12.00", category: "pastries", description: "Fudgy chocolate brownie.", image: "https://mock.cimplify.io/img/brownie.jpg" },
4631
- { name: "Macaron Box (6)", slug: "macaron-box", price: "60.00", category: "pastries", description: "Six assorted macarons.", image: "https://mock.cimplify.io/img/macaron.jpg" },
4632
- { name: "Custom Birthday Cake", slug: "birthday-cake", price: "250.00", category: "cakes", description: "Made-to-order. Min 48h notice.", image: "https://mock.cimplify.io/img/birthday.jpg" }
4628
+ { name: "Sourdough Loaf", slug: "sourdough-loaf", price: "25.00", category: "breads", description: "Artisanal 24-hour fermented sourdough.", image: "/img/sourdough.jpg" },
4629
+ { name: "Whole Wheat Bread", slug: "whole-wheat", price: "20.00", category: "breads", description: "Hearty whole wheat with seeds.", image: "/img/wheat.jpg" },
4630
+ { name: "Baguette", slug: "baguette", price: "15.00", category: "breads", description: "Crispy crust, soft inside.", image: "/img/baguette.jpg" },
4631
+ { name: "Focaccia", slug: "focaccia", price: "30.00", category: "breads", description: "Olive oil and rosemary focaccia.", image: "/img/focaccia.jpg" },
4632
+ { name: "Croissant", slug: "croissant", price: "12.00", category: "pastries", description: "Buttery French croissant.", image: "/img/croissant.jpg" },
4633
+ { name: "Pain au Chocolat", slug: "pain-au-chocolat", price: "14.00", category: "pastries", description: "Croissant with dark chocolate.", image: "/img/pac.jpg" },
4634
+ { name: "Almond Danish", slug: "almond-danish", price: "16.00", category: "pastries", description: "Flaky pastry with almond cream.", image: "/img/danish.jpg" },
4635
+ { name: "Cinnamon Roll", slug: "cinnamon-roll", price: "13.00", category: "pastries", description: "Soft roll with cinnamon glaze.", image: "/img/cinnamon.jpg" },
4636
+ { name: "Chocolate Cake (Slice)", slug: "chocolate-cake", price: "22.00", category: "cakes", description: "Rich dark chocolate cake.", image: "/img/choc-cake.jpg" },
4637
+ { name: "Red Velvet (Slice)", slug: "red-velvet", price: "22.00", category: "cakes", description: "Classic red velvet with cream cheese.", image: "/img/red-velvet.jpg" },
4638
+ { name: "Carrot Cake (Slice)", slug: "carrot-cake", price: "20.00", category: "cakes", description: "Spiced carrot cake with walnut.", image: "/img/carrot.jpg" },
4639
+ { name: "Cheesecake (Slice)", slug: "cheesecake", price: "24.00", category: "cakes", description: "New York style cheesecake.", image: "/img/cheesecake.jpg" },
4640
+ { name: "Coffee", slug: "coffee", price: "10.00", category: "drinks", description: "Locally roasted Arabica.", image: "/img/coffee.jpg" },
4641
+ { name: "Tea", slug: "tea", price: "8.00", category: "drinks", description: "Black, green, or herbal.", image: "/img/tea.jpg" },
4642
+ { name: "Hibiscus Tea (Sobolo)", slug: "sobolo", price: "12.00", category: "drinks", description: "Iced hibiscus drink.", image: "/img/sobolo.jpg" },
4643
+ { name: "Fresh Orange Juice", slug: "orange-juice", price: "15.00", category: "drinks", description: "Cold-pressed orange juice.", image: "/img/oj.jpg" },
4644
+ { name: "Banana Bread", slug: "banana-bread", price: "18.00", category: "breads", description: "Moist banana loaf.", image: "/img/banana.jpg" },
4645
+ { name: "Brownie", slug: "brownie", price: "12.00", category: "pastries", description: "Fudgy chocolate brownie.", image: "/img/brownie.jpg" },
4646
+ { name: "Macaron Box (6)", slug: "macaron-box", price: "60.00", category: "pastries", description: "Six assorted macarons.", image: "/img/macaron.jpg" },
4647
+ { name: "Custom Birthday Cake", slug: "birthday-cake", price: "250.00", category: "cakes", description: "Made-to-order. Min 48h notice.", image: "/img/birthday.jpg" }
4633
4648
  ];
4634
4649
  var CATEGORIES = [
4635
4650
  { slug: "breads", name: "Breads", description: "Sourdough, baguettes, focaccia." },
@@ -4650,7 +4665,7 @@ function seedDefault(registry) {
4650
4665
  default_address: "12 Independence Ave, Accra",
4651
4666
  default_offers_table_service: true,
4652
4667
  default_accepts_online_orders: true,
4653
- image: "https://mock.cimplify.io/img/akua-logo.png",
4668
+ image: "/img/akua-logo.png",
4654
4669
  status: "active",
4655
4670
  created_at: ISO,
4656
4671
  updated_at: ISO,
@@ -4910,8 +4925,8 @@ function seedDefault(registry) {
4910
4925
  product_type: "bundle",
4911
4926
  base_price: "30.00",
4912
4927
  currency: "GHS",
4913
- image: "https://mock.cimplify.io/img/breakfast-box.jpg",
4914
- images: ["https://mock.cimplify.io/img/breakfast-box.jpg"],
4928
+ image: "/img/breakfast-box.jpg",
4929
+ images: ["/img/breakfast-box.jpg"],
4915
4930
  is_available: true,
4916
4931
  category_ids: [categoryIdsBySlug.get("pastries")],
4917
4932
  collection_ids: [],
@@ -4951,8 +4966,8 @@ function seedDefault(registry) {
4951
4966
  product_type: "composite",
4952
4967
  base_price: "60.00",
4953
4968
  currency: "GHS",
4954
- image: "https://mock.cimplify.io/img/pastry-box.jpg",
4955
- images: ["https://mock.cimplify.io/img/pastry-box.jpg"],
4969
+ image: "/img/pastry-box.jpg",
4970
+ images: ["/img/pastry-box.jpg"],
4956
4971
  is_available: true,
4957
4972
  category_ids: [categoryIdsBySlug.get("pastries")],
4958
4973
  collection_ids: [],
@@ -5138,7 +5153,7 @@ function seedReesa(registry) {
5138
5153
  default_address: "5 Allen Avenue, Ikeja, Lagos",
5139
5154
  default_offers_table_service: false,
5140
5155
  default_accepts_online_orders: true,
5141
- image: "https://mock.cimplify.io/img/reesa-logo.png",
5156
+ image: "/img/reesa-logo.png",
5142
5157
  status: "active",
5143
5158
  created_at: ISO3,
5144
5159
  updated_at: ISO3,
@@ -5194,8 +5209,8 @@ function seedReesa(registry) {
5194
5209
  product_type: "product",
5195
5210
  base_price: p.price,
5196
5211
  currency: "NGN",
5197
- image: `https://mock.cimplify.io/img/reesa/${p.slug}.jpg`,
5198
- images: [`https://mock.cimplify.io/img/reesa/${p.slug}.jpg`],
5212
+ image: `/img/reesa/${p.slug}.jpg`,
5213
+ images: [`/img/reesa/${p.slug}.jpg`],
5199
5214
  is_available: true,
5200
5215
  category_ids: [catId],
5201
5216
  collection_ids: [],
@@ -5418,8 +5433,8 @@ function seedReesa(registry) {
5418
5433
  product_type: "bundle",
5419
5434
  base_price: "55000.00",
5420
5435
  currency: "NGN",
5421
- image: "https://mock.cimplify.io/img/reesa/owambe.jpg",
5422
- images: ["https://mock.cimplify.io/img/reesa/owambe.jpg"],
5436
+ image: "/img/reesa/owambe.jpg",
5437
+ images: ["/img/reesa/owambe.jpg"],
5423
5438
  is_available: true,
5424
5439
  category_ids: [catIdsBySlug.get("apparel")],
5425
5440
  collection_ids: [],
@@ -5550,7 +5565,7 @@ function seedRestaurant(registry) {
5550
5565
  default_address: "8 Ring Road, East Legon, Accra",
5551
5566
  default_offers_table_service: true,
5552
5567
  default_accepts_online_orders: true,
5553
- image: "https://mock.cimplify.io/img/mamas-logo.png",
5568
+ image: "/img/mamas-logo.png",
5554
5569
  status: "active",
5555
5570
  created_at: ISO4,
5556
5571
  updated_at: ISO4,
@@ -5621,8 +5636,8 @@ function seedRestaurant(registry) {
5621
5636
  product_type: "product",
5622
5637
  base_price: p.price,
5623
5638
  currency: "GHS",
5624
- image: `https://mock.cimplify.io/img/mamas/${p.slug}.jpg`,
5625
- images: [`https://mock.cimplify.io/img/mamas/${p.slug}.jpg`],
5639
+ image: `/img/mamas/${p.slug}.jpg`,
5640
+ images: [`/img/mamas/${p.slug}.jpg`],
5626
5641
  is_available: true,
5627
5642
  category_ids: [catId],
5628
5643
  collection_ids: [],
@@ -5860,8 +5875,8 @@ function seedRestaurant(registry) {
5860
5875
  product_type: "bundle",
5861
5876
  base_price: "180.00",
5862
5877
  currency: "GHS",
5863
- image: "https://mock.cimplify.io/img/mamas/feast.jpg",
5864
- images: ["https://mock.cimplify.io/img/mamas/feast.jpg"],
5878
+ image: "/img/mamas/feast.jpg",
5879
+ images: ["/img/mamas/feast.jpg"],
5865
5880
  is_available: true,
5866
5881
  category_ids: [catIds.get("mains")],
5867
5882
  collection_ids: [],
@@ -5896,8 +5911,8 @@ function seedRestaurant(registry) {
5896
5911
  product_type: "composite",
5897
5912
  base_price: "0.00",
5898
5913
  currency: "GHS",
5899
- image: "https://mock.cimplify.io/img/mamas/byo.jpg",
5900
- images: ["https://mock.cimplify.io/img/mamas/byo.jpg"],
5914
+ image: "/img/mamas/byo.jpg",
5915
+ images: ["/img/mamas/byo.jpg"],
5901
5916
  is_available: true,
5902
5917
  category_ids: [catIds.get("mains")],
5903
5918
  collection_ids: [],
@@ -6009,7 +6024,7 @@ function seedRetail(registry) {
6009
6024
  default_address: "Atomic Junction, Accra",
6010
6025
  default_offers_table_service: false,
6011
6026
  default_accepts_online_orders: true,
6012
- image: "https://mock.cimplify.io/img/currents-logo.png",
6027
+ image: "/img/currents-logo.png",
6013
6028
  status: "active",
6014
6029
  created_at: ISO5,
6015
6030
  updated_at: ISO5,
@@ -6079,8 +6094,8 @@ function seedRetail(registry) {
6079
6094
  product_type: "product",
6080
6095
  base_price: p.price,
6081
6096
  currency: "GHS",
6082
- image: `https://mock.cimplify.io/img/currents/${p.slug}.jpg`,
6083
- images: [`https://mock.cimplify.io/img/currents/${p.slug}.jpg`],
6097
+ image: `/img/currents/${p.slug}.jpg`,
6098
+ images: [`/img/currents/${p.slug}.jpg`],
6084
6099
  is_available: true,
6085
6100
  category_ids: [catId],
6086
6101
  collection_ids: [],
@@ -6343,8 +6358,8 @@ function seedRetail(registry) {
6343
6358
  product_type: "bundle",
6344
6359
  base_price: "11910.00",
6345
6360
  currency: "GHS",
6346
- image: "https://mock.cimplify.io/img/currents/wfh.jpg",
6347
- images: ["https://mock.cimplify.io/img/currents/wfh.jpg"],
6361
+ image: "/img/currents/wfh.jpg",
6362
+ images: ["/img/currents/wfh.jpg"],
6348
6363
  is_available: true,
6349
6364
  category_ids: [catIds.get("laptops")],
6350
6365
  collection_ids: [],
@@ -6377,8 +6392,8 @@ function seedRetail(registry) {
6377
6392
  product_type: "bundle",
6378
6393
  base_price: "4200.00",
6379
6394
  currency: "GHS",
6380
- image: "https://mock.cimplify.io/img/currents/game-pack.jpg",
6381
- images: ["https://mock.cimplify.io/img/currents/game-pack.jpg"],
6395
+ image: "/img/currents/game-pack.jpg",
6396
+ images: ["/img/currents/game-pack.jpg"],
6382
6397
  is_available: true,
6383
6398
  category_ids: [catIds.get("gaming")],
6384
6399
  collection_ids: [],
@@ -6481,7 +6496,7 @@ function seedServices(registry) {
6481
6496
  default_address: "12 Cantonments Road, Accra",
6482
6497
  default_offers_table_service: false,
6483
6498
  default_accepts_online_orders: true,
6484
- image: "https://mock.cimplify.io/img/serene-logo.png",
6499
+ image: "/img/serene-logo.png",
6485
6500
  status: "active",
6486
6501
  created_at: ISO6,
6487
6502
  updated_at: ISO6,
@@ -6549,8 +6564,8 @@ function seedServices(registry) {
6549
6564
  product_type: "service",
6550
6565
  base_price: s.price,
6551
6566
  currency: "GHS",
6552
- image: `https://mock.cimplify.io/img/serene/${s.slug}.jpg`,
6553
- images: [`https://mock.cimplify.io/img/serene/${s.slug}.jpg`],
6567
+ image: `/img/serene/${s.slug}.jpg`,
6568
+ images: [`/img/serene/${s.slug}.jpg`],
6554
6569
  is_available: true,
6555
6570
  category_ids: [catId],
6556
6571
  collection_ids: [],
@@ -6686,8 +6701,8 @@ function seedServices(registry) {
6686
6701
  product_type: "bundle",
6687
6702
  base_price: "480.00",
6688
6703
  currency: "GHS",
6689
- image: "https://mock.cimplify.io/img/serene/spa-day.jpg",
6690
- images: ["https://mock.cimplify.io/img/serene/spa-day.jpg"],
6704
+ image: "/img/serene/spa-day.jpg",
6705
+ images: ["/img/serene/spa-day.jpg"],
6691
6706
  is_available: true,
6692
6707
  category_ids: [catIds.get("wellness")],
6693
6708
  collection_ids: [],
@@ -6720,8 +6735,8 @@ function seedServices(registry) {
6720
6735
  product_type: "bundle",
6721
6736
  base_price: "850.50",
6722
6737
  currency: "GHS",
6723
- image: "https://mock.cimplify.io/img/serene/couples.jpg",
6724
- images: ["https://mock.cimplify.io/img/serene/couples.jpg"],
6738
+ image: "/img/serene/couples.jpg",
6739
+ images: ["/img/serene/couples.jpg"],
6725
6740
  is_available: true,
6726
6741
  category_ids: [catIds.get("wellness")],
6727
6742
  collection_ids: [],
@@ -6756,8 +6771,8 @@ function seedServices(registry) {
6756
6771
  product_type: "composite",
6757
6772
  base_price: "0.00",
6758
6773
  currency: "GHS",
6759
- image: "https://mock.cimplify.io/img/serene/custom.jpg",
6760
- images: ["https://mock.cimplify.io/img/serene/custom.jpg"],
6774
+ image: "/img/serene/custom.jpg",
6775
+ images: ["/img/serene/custom.jpg"],
6761
6776
  is_available: true,
6762
6777
  category_ids: [catIds.get("wellness")],
6763
6778
  collection_ids: [],
@@ -6860,7 +6875,7 @@ function seedGrocery(registry) {
6860
6875
  default_address: "Spintex Road, Accra",
6861
6876
  default_offers_table_service: false,
6862
6877
  default_accepts_online_orders: true,
6863
- image: "https://mock.cimplify.io/img/freshmart-logo.png",
6878
+ image: "/img/freshmart-logo.png",
6864
6879
  status: "active",
6865
6880
  created_at: ISO7,
6866
6881
  updated_at: ISO7,
@@ -6935,8 +6950,8 @@ function seedGrocery(registry) {
6935
6950
  product_type: "product",
6936
6951
  base_price: p.price,
6937
6952
  currency: "GHS",
6938
- image: `https://mock.cimplify.io/img/freshmart/${p.slug}.jpg`,
6939
- images: [`https://mock.cimplify.io/img/freshmart/${p.slug}.jpg`],
6953
+ image: `/img/freshmart/${p.slug}.jpg`,
6954
+ images: [`/img/freshmart/${p.slug}.jpg`],
6940
6955
  is_available: true,
6941
6956
  category_ids: [catId],
6942
6957
  collection_ids: [],
@@ -7019,8 +7034,8 @@ function seedGrocery(registry) {
7019
7034
  product_type: "bundle",
7020
7035
  base_price: "199.50",
7021
7036
  currency: "GHS",
7022
- image: "https://mock.cimplify.io/img/freshmart/essentials.jpg",
7023
- images: ["https://mock.cimplify.io/img/freshmart/essentials.jpg"],
7037
+ image: "/img/freshmart/essentials.jpg",
7038
+ images: ["/img/freshmart/essentials.jpg"],
7024
7039
  is_available: true,
7025
7040
  category_ids: [catIds.get("pantry")],
7026
7041
  collection_ids: [],
@@ -7232,6 +7247,158 @@ function createMockApp(options = {}) {
7232
7247
  })
7233
7248
  );
7234
7249
  app.get("/healthz", (c) => c.json({ ok: true, time: deps.clock.iso() }));
7250
+ const UNSPLASH_PHOTOS = {
7251
+ // Akua's Bakery (default seed)
7252
+ sourdough: "1509440159596-0249088772ff",
7253
+ wheat: "1486887396153-fa416526c108",
7254
+ baguette: "1568471173242-461f0a730452",
7255
+ focaccia: "1573472635068-fd9b1abdd8e5",
7256
+ croissant: "1555507036-ab1f4038808a",
7257
+ pac: "1530610476181-d83430b64dcd",
7258
+ danish: "1517433367423-c7e5b0f35086",
7259
+ cinnamon: "1583527976767-50068e72b7a3",
7260
+ "choc-cake": "1565958011703-44f9829ba187",
7261
+ "red-velvet": "1586788680434-30d324b2d46f",
7262
+ carrot: "1568827999250-3f6afff96e66",
7263
+ cheesecake: "1567306226416-28f0efdc88ce",
7264
+ coffee: "1495474472287-4d71bcdd2085",
7265
+ tea: "1576092768241-dec231879fc3",
7266
+ sobolo: "1556679343-c7306c1976bc",
7267
+ oj: "1600271886742-f049b969dc7a",
7268
+ banana: "1632931057819-4eefffa8e007",
7269
+ brownie: "1551024506-0bccd828d307",
7270
+ macaron: "1558326567-98ae2405596b",
7271
+ birthday: "1535254973040-607b474cb50d",
7272
+ "breakfast-box": "1533089860892-a7c6f0a88666",
7273
+ "pastry-box": "1486427944299-d1955d23e34d",
7274
+ // Mama's Kitchen (restaurant seed)
7275
+ kelewele: "1585536830049-aedf5c1b98a4",
7276
+ "spring-rolls": "1606755962773-d324e0a13086",
7277
+ "soup-of-the-day": "1547592180-85f173990554",
7278
+ "jollof-rice": "1604329760661-e71dc83f8f26",
7279
+ "banku-tilapia": "1559847844-5315695dadae",
7280
+ "fufu-light-soup": "1547928576-b822bcced36e",
7281
+ waakye: "1604329760661-e71dc83f8f26",
7282
+ "grilled-chicken": "1532550907401-a500c9a57435",
7283
+ burger: "1568901346375-23c9450c58cd",
7284
+ "yam-fries": "1573080496219-bb080dd4f877",
7285
+ "fried-plantain": "1604329760661-e71dc83f8f26",
7286
+ salad: "1512621776951-a57141f2eefd",
7287
+ "ice-cream": "1497034825429-c343d7c6a68f",
7288
+ "cake-slice": "1565958011703-44f9829ba187",
7289
+ "fruit-bowl": "1490474418585-ba9bad8fd0ea",
7290
+ "soft-drink": "1497534446932-c925b458314e",
7291
+ "fresh-juice": "1622597467836-f3285f2131b8",
7292
+ water: "1548839140-29a749e1cf4d",
7293
+ feast: "1546069901-ba9599a7e63c",
7294
+ byo: "1546069901-ba9599a7e63c",
7295
+ // Currents Electronics
7296
+ "android-flagship": "1511707171634-5f897ff02aa9",
7297
+ "android-mid": "1592899677977-9c10ca588bbd",
7298
+ "phone-budget": "1574944985070-8f3ebc6b79d2",
7299
+ "laptop-pro": "1496181133206-80ce9b88a853",
7300
+ "laptop-air": "1517336714731-489689fd1ca8",
7301
+ "laptop-budget": "1541807084-5c52b6b3adef",
7302
+ "headphones-anc": "1583394838336-acd977736f90",
7303
+ "earbuds-pro": "1606220945770-b5b6c2c55bf1",
7304
+ "speaker-bt": "1608043152269-423dbba4e7e1",
7305
+ "phone-case": "1601593346740-925612772716",
7306
+ "screen-protector": "1592890288564-76628a30a657",
7307
+ "fast-charger": "1583394838336-acd977736f90",
7308
+ "laptop-sleeve": "1525547719571-a2d4ac8945e2",
7309
+ "wireless-mouse": "1527864550417-7fd91fc51a46",
7310
+ "mech-keyboard": "1587829741301-dc798b83add3",
7311
+ "gaming-controller": "1592840496694-26d035b52b48",
7312
+ "gaming-headset": "1591105327764-407a4a06e768",
7313
+ "console-handheld": "1606144042614-b2417e99c4e3",
7314
+ wfh: "1593642632559-0c6d3fc62b89",
7315
+ "game-pack": "1606144042614-b2417e99c4e3",
7316
+ // Reesa apparel
7317
+ "ankara-shirt": "1591047139829-d91aecb6caea",
7318
+ "agbada-set": "1605497788044-5a32c7078486",
7319
+ kaftan: "1554412933-514a83d2f3c8",
7320
+ "leather-tote": "1584917865442-de89df76afd3",
7321
+ sandals: "1543163521-1bf539c55dd2",
7322
+ "beaded-bracelet": "1611591437281-460bfbe1220a",
7323
+ owambe: "1605497788044-5a32c7078486",
7324
+ // FreshMart
7325
+ "tomatoes-1kg": "1546470427-227f1c75a9ef",
7326
+ "onions-1kg": "1620574387735-3624d75b2dbc",
7327
+ "ginger-200g": "1606937330526-f5e6a2a83555",
7328
+ "bananas-bunch": "1571771894821-ce9b6c11b08e",
7329
+ pineapple: "1550258987-190a2d41a8ba",
7330
+ "spinach-bunch": "1576045057995-568f588f82fb",
7331
+ "milk-1l": "1550583724-b2692b85b150",
7332
+ "yogurt-500g": "1571212515416-fef01fc43637",
7333
+ "eggs-12": "1582722872445-44dc5f7e3c8f",
7334
+ "cheese-200g": "1486297678162-eb2a19b0a32d",
7335
+ "chicken-1kg": "1604503468506-a8da13d82791",
7336
+ "beef-mince-500g": "1607623814075-e51df1bdc82f",
7337
+ "tilapia-each": "1546069901-ba9599a7e63c",
7338
+ "rice-5kg": "1586201375761-83865001e31c",
7339
+ "garri-2kg": "1604329760661-e71dc83f8f26",
7340
+ "palm-oil-1l": "1474979266404-7eaacbcd87c5",
7341
+ "vegetable-oil-1l": "1474979266404-7eaacbcd87c5",
7342
+ "salt-1kg": "1612531386530-97286d97c2d2",
7343
+ "sugar-1kg": "1581281697996-3aef0c3b9b12",
7344
+ "tomato-paste": "1546470427-227f1c75a9ef",
7345
+ "soap-bar": "1583912267550-d6c2ac3196c0",
7346
+ "detergent-1kg": "1583912267550-d6c2ac3196c0",
7347
+ "tissue-pack": "1610557892470-55d9e80c0bce",
7348
+ "trash-bags": "1583912267550-d6c2ac3196c0",
7349
+ essentials: "1542838132-92c53300491e",
7350
+ // Serene Spa services
7351
+ "swedish-massage-60": "1544161515-4ab6ce6db874",
7352
+ "swedish-massage-90": "1544161515-4ab6ce6db874",
7353
+ "deep-tissue-60": "1600334129128-685c5582fd35",
7354
+ "couples-massage": "1540555700478-4be289fbecef",
7355
+ "hot-stone-90": "1600334129128-685c5582fd35",
7356
+ "facial-classic": "1570172619644-dfd03ed5d881",
7357
+ "facial-anti-aging": "1571019613454-1cb2f99b2d8b",
7358
+ "facial-acne": "1571019613454-1cb2f99b2d8b",
7359
+ manicure: "1604654894610-df63bc536371",
7360
+ pedicure: "1610701596007-11502861dcfa",
7361
+ "gel-manicure": "1604654894610-df63bc536371",
7362
+ haircut: "1562322140-8baeececf3df",
7363
+ "hair-treatment": "1522337360788-8b13dee7a37e",
7364
+ color: "1562322140-8baeececf3df",
7365
+ "yoga-session": "1545205597-3d9d02c29597",
7366
+ meditation: "1545389336-cf090694435e",
7367
+ "spa-day": "1540555700478-4be289fbecef",
7368
+ "couples-retreat": "1540555700478-4be289fbecef",
7369
+ "custom-experience": "1545389336-cf090694435e"
7370
+ };
7371
+ app.get("/img/*", (c) => {
7372
+ const path = c.req.path.replace(/^\/img\//, "").replace(/\.[a-z0-9]+$/i, "");
7373
+ const slug = path.split("/").pop() ?? "";
7374
+ const photoId = UNSPLASH_PHOTOS[slug];
7375
+ if (photoId) {
7376
+ return c.redirect(`https://images.unsplash.com/photo-${photoId}?w=600&h=600&fit=crop&auto=format&q=80`, 302);
7377
+ }
7378
+ const label = slug.replace(/[-_]+/g, " ").trim() || "product";
7379
+ let hash = 0;
7380
+ for (let i = 0; i < slug.length; i++) hash = hash * 31 + slug.charCodeAt(i) >>> 0;
7381
+ const hue = hash % 360;
7382
+ const display = label.length > 20 ? label.slice(0, 20) + "\u2026" : label;
7383
+ const svg = `<?xml version="1.0" encoding="UTF-8"?>
7384
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 400" width="400" height="400">
7385
+ <defs>
7386
+ <linearGradient id="g" x1="0" y1="0" x2="1" y2="1">
7387
+ <stop offset="0%" stop-color="hsl(${hue}, 65%, 65%)"/>
7388
+ <stop offset="100%" stop-color="hsl(${(hue + 40) % 360}, 70%, 45%)"/>
7389
+ </linearGradient>
7390
+ </defs>
7391
+ <rect width="400" height="400" fill="url(#g)"/>
7392
+ <text x="200" y="210" font-family="-apple-system, BlinkMacSystemFont, Inter, sans-serif" font-size="22" font-weight="600" fill="white" text-anchor="middle" dominant-baseline="middle" style="text-transform: capitalize">${display.replace(/[<>&]/g, "")}</text>
7393
+ </svg>`;
7394
+ return new Response(svg, {
7395
+ headers: {
7396
+ "Content-Type": "image/svg+xml; charset=utf-8",
7397
+ "Cache-Control": "public, max-age=3600",
7398
+ "Access-Control-Allow-Origin": "*"
7399
+ }
7400
+ });
7401
+ });
7235
7402
  app.route("/api/v1", buildV1(deps));
7236
7403
  app.route("/_mock", buildAdmin(deps));
7237
7404
  app.route("/elements", buildElements(deps));
package/dist/react.js CHANGED
@@ -6938,16 +6938,26 @@ function WishlistButton({
6938
6938
  className
6939
6939
  }) {
6940
6940
  return /* @__PURE__ */ jsxRuntime.jsx(
6941
- "button",
6941
+ "span",
6942
6942
  {
6943
+ role: "button",
6944
+ tabIndex: 0,
6943
6945
  "data-cimplify-card-wishlist": true,
6946
+ "aria-pressed": filled,
6944
6947
  onClick: (e) => {
6945
6948
  e.stopPropagation();
6946
6949
  onClick?.();
6947
6950
  },
6951
+ onKeyDown: (e) => {
6952
+ if (e.key === "Enter" || e.key === " ") {
6953
+ e.preventDefault();
6954
+ e.stopPropagation();
6955
+ onClick?.();
6956
+ }
6957
+ },
6948
6958
  className: cn(
6949
6959
  "w-8 h-8 rounded-full bg-background/90 backdrop-blur flex items-center justify-center",
6950
- "transition-all duration-200 ease-out hover:scale-110 hover:bg-background",
6960
+ "transition-all duration-200 ease-out hover:scale-110 hover:bg-background cursor-pointer",
6951
6961
  filled ? "text-destructive" : "text-muted-foreground hover:text-destructive",
6952
6962
  className
6953
6963
  ),
package/dist/react.mjs CHANGED
@@ -6933,16 +6933,26 @@ function WishlistButton({
6933
6933
  className
6934
6934
  }) {
6935
6935
  return /* @__PURE__ */ jsx(
6936
- "button",
6936
+ "span",
6937
6937
  {
6938
+ role: "button",
6939
+ tabIndex: 0,
6938
6940
  "data-cimplify-card-wishlist": true,
6941
+ "aria-pressed": filled,
6939
6942
  onClick: (e) => {
6940
6943
  e.stopPropagation();
6941
6944
  onClick?.();
6942
6945
  },
6946
+ onKeyDown: (e) => {
6947
+ if (e.key === "Enter" || e.key === " ") {
6948
+ e.preventDefault();
6949
+ e.stopPropagation();
6950
+ onClick?.();
6951
+ }
6952
+ },
6943
6953
  className: cn(
6944
6954
  "w-8 h-8 rounded-full bg-background/90 backdrop-blur flex items-center justify-center",
6945
- "transition-all duration-200 ease-out hover:scale-110 hover:bg-background",
6955
+ "transition-all duration-200 ease-out hover:scale-110 hover:bg-background cursor-pointer",
6946
6956
  filled ? "text-destructive" : "text-muted-foreground hover:text-destructive",
6947
6957
  className
6948
6958
  ),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cimplify/sdk",
3
- "version": "0.38.1",
3
+ "version": "0.38.2",
4
4
  "description": "Cimplify Commerce SDK for storefronts",
5
5
  "keywords": [
6
6
  "cimplify",