arky-sdk 0.7.91 → 0.7.92

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/index.d.cts CHANGED
@@ -138,7 +138,6 @@ interface StorefrontStores {
138
138
  currency: ReturnType<typeof computed>;
139
139
  currencySymbol: ReturnType<typeof computed>;
140
140
  paymentMethods: ReturnType<typeof computed>;
141
- paymentMethodObjects: ReturnType<typeof computed>;
142
141
  paymentConfig: ReturnType<typeof computed>;
143
142
  zones: ReturnType<typeof computed>;
144
143
  }
@@ -173,7 +172,7 @@ declare function fetchSvgContent(mediaObject: any): Promise<string | null>;
173
172
  declare function getSvgContentForAstro(mediaObject: any): Promise<string>;
174
173
  declare function injectSvgIntoElement(mediaObject: any, targetElement: HTMLElement, className?: string): Promise<void>;
175
174
 
176
- declare const SDK_VERSION = "0.7.91";
175
+ declare const SDK_VERSION = "0.7.92";
177
176
  declare const SUPPORTED_FRAMEWORKS: readonly ["astro", "react", "vue", "svelte", "vanilla"];
178
177
  interface ApiConfig {
179
178
  httpClient: any;
@@ -517,7 +516,6 @@ declare function createStorefront(config: HttpClientConfig & {
517
516
  currency: nanostores.ReadableAtom<any>;
518
517
  currencySymbol: nanostores.ReadableAtom<any>;
519
518
  paymentMethods: nanostores.ReadableAtom<any>;
520
- paymentMethodObjects: nanostores.ReadableAtom<any>;
521
519
  paymentConfig: nanostores.ReadableAtom<{
522
520
  provider: any;
523
521
  enabled: boolean;
package/dist/index.d.ts CHANGED
@@ -138,7 +138,6 @@ interface StorefrontStores {
138
138
  currency: ReturnType<typeof computed>;
139
139
  currencySymbol: ReturnType<typeof computed>;
140
140
  paymentMethods: ReturnType<typeof computed>;
141
- paymentMethodObjects: ReturnType<typeof computed>;
142
141
  paymentConfig: ReturnType<typeof computed>;
143
142
  zones: ReturnType<typeof computed>;
144
143
  }
@@ -173,7 +172,7 @@ declare function fetchSvgContent(mediaObject: any): Promise<string | null>;
173
172
  declare function getSvgContentForAstro(mediaObject: any): Promise<string>;
174
173
  declare function injectSvgIntoElement(mediaObject: any, targetElement: HTMLElement, className?: string): Promise<void>;
175
174
 
176
- declare const SDK_VERSION = "0.7.91";
175
+ declare const SDK_VERSION = "0.7.92";
177
176
  declare const SUPPORTED_FRAMEWORKS: readonly ["astro", "react", "vue", "svelte", "vanilla"];
178
177
  interface ApiConfig {
179
178
  httpClient: any;
@@ -517,7 +516,6 @@ declare function createStorefront(config: HttpClientConfig & {
517
516
  currency: nanostores.ReadableAtom<any>;
518
517
  currencySymbol: nanostores.ReadableAtom<any>;
519
518
  paymentMethods: nanostores.ReadableAtom<any>;
520
- paymentMethodObjects: nanostores.ReadableAtom<any>;
521
519
  paymentConfig: nanostores.ReadableAtom<{
522
520
  provider: any;
523
521
  enabled: boolean;
package/dist/index.js CHANGED
@@ -2475,17 +2475,10 @@ function createStores() {
2475
2475
  currencyDisplay: "narrowSymbol"
2476
2476
  }).formatToParts(0).find((p) => p.type === "currency")?.value || m.currency.toUpperCase();
2477
2477
  });
2478
- const $paymentMethods = computed(
2479
- $market,
2480
- (m) => (m?.payment_methods || []).map((pm) => pm.id)
2481
- );
2482
- const $paymentMethodObjects = computed(
2483
- $market,
2484
- (m) => m?.payment_methods || []
2485
- );
2478
+ const $paymentMethods = computed($market, (m) => m?.payment_methods || []);
2486
2479
  const $paymentConfig = computed([$business, $paymentMethods], (biz, methods) => {
2487
2480
  const payment = biz?.payment || null;
2488
- const hasCreditCard = methods.includes("credit_card");
2481
+ const hasCreditCard = methods.some((m) => m.id === "credit_card");
2489
2482
  return {
2490
2483
  provider: payment,
2491
2484
  enabled: hasCreditCard && !!payment
@@ -2502,7 +2495,6 @@ function createStores() {
2502
2495
  currency: $currency,
2503
2496
  currencySymbol: $currencySymbol,
2504
2497
  paymentMethods: $paymentMethods,
2505
- paymentMethodObjects: $paymentMethodObjects,
2506
2498
  paymentConfig: $paymentConfig,
2507
2499
  zones: $zones
2508
2500
  };
@@ -2686,7 +2678,7 @@ function getFirstAvailableFCId(variant, quantity = 1) {
2686
2678
  }
2687
2679
 
2688
2680
  // src/index.ts
2689
- var SDK_VERSION = "0.7.91";
2681
+ var SDK_VERSION = "0.7.92";
2690
2682
  var SUPPORTED_FRAMEWORKS = [
2691
2683
  "astro",
2692
2684
  "react",