@instockng/storefront-ui 1.0.86 → 1.0.87
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/components/CartUpsellScreen.d.ts +12 -0
- package/dist/components/CartUpsellScreen.d.ts.map +1 -0
- package/dist/components/QuantitySelector.d.ts +10 -0
- package/dist/components/QuantitySelector.d.ts.map +1 -0
- package/dist/components/ShoppingCart.d.ts.map +1 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +115 -109
- package/dist/index10.mjs +5 -5
- package/dist/index100.mjs +53 -4
- package/dist/index101.mjs +5 -178
- package/dist/index102.mjs +5 -53
- package/dist/index103.mjs +178 -68
- package/dist/index104.mjs +53 -2
- package/dist/index105.mjs +69 -2
- package/dist/index106.mjs +2 -28
- package/dist/index107.mjs +2 -18
- package/dist/index108.mjs +26 -213
- package/dist/index109.mjs +13 -175
- package/dist/index11.mjs +4 -4
- package/dist/index110.mjs +210 -17
- package/dist/index111.mjs +174 -17
- package/dist/index112.mjs +14 -25
- package/dist/index113.mjs +17 -150
- package/dist/index114.mjs +26 -13
- package/dist/index115.mjs +149 -24
- package/dist/index116.mjs +13 -77
- package/dist/index117.mjs +20 -27
- package/dist/index118.mjs +76 -137
- package/dist/index119.mjs +33 -50
- package/dist/index12.mjs +3 -3
- package/dist/index120.mjs +141 -19
- package/dist/index121.mjs +50 -22
- package/dist/index122.mjs +14 -14
- package/dist/index123.mjs +20 -18
- package/dist/index124.mjs +16 -14
- package/dist/index125.mjs +17 -14
- package/dist/index126.mjs +12 -12
- package/dist/index127.mjs +15 -58
- package/dist/index128.mjs +14 -11
- package/dist/index129.mjs +56 -30
- package/dist/index13.mjs +1 -1
- package/dist/index130.mjs +9 -15
- package/dist/index131.mjs +31 -26
- package/dist/index132.mjs +13 -16
- package/dist/index133.mjs +26 -11
- package/dist/index134.mjs +17 -11
- package/dist/index135.mjs +12 -40
- package/dist/index136.mjs +14 -16
- package/dist/index137.mjs +42 -263
- package/dist/index138.mjs +15 -62
- package/dist/index139.mjs +267 -7
- package/dist/index14.mjs +157 -194
- package/dist/index140.mjs +70 -2
- package/dist/index141.mjs +8 -2
- package/dist/index142.mjs +2 -33
- package/dist/index143.mjs +2 -2
- package/dist/index144.mjs +32 -20
- package/dist/index145.mjs +2 -56
- package/dist/index146.mjs +18 -26
- package/dist/index147.mjs +55 -6
- package/dist/index148.mjs +28 -51
- package/dist/index149.mjs +7 -6
- package/dist/index15.mjs +218 -94
- package/dist/index150.mjs +51 -11
- package/dist/index151.mjs +5 -6
- package/dist/index152.mjs +12 -28
- package/dist/index153.mjs +7 -2
- package/dist/index154.mjs +27 -69
- package/dist/index155.mjs +2 -167
- package/dist/index156.mjs +70 -2
- package/dist/index157.mjs +167 -2
- package/dist/index158.mjs +2 -2
- package/dist/index159.mjs +2 -2
- package/dist/index16.mjs +100 -733
- package/dist/index160.mjs +2 -18
- package/dist/index161.mjs +2 -32
- package/dist/index162.mjs +14 -34
- package/dist/index163.mjs +25 -11
- package/dist/index164.mjs +34 -14
- package/dist/index165.mjs +18 -2
- package/dist/index166.mjs +11 -13
- package/dist/index167.mjs +2 -46
- package/dist/index168.mjs +20 -2
- package/dist/index169.mjs +41 -25
- package/dist/index17.mjs +94 -56
- package/dist/index170.mjs +2 -18
- package/dist/index171.mjs +30 -2
- package/dist/index172.mjs +18 -2
- package/dist/index173.mjs +2 -2
- package/dist/index174.mjs +2 -2
- package/dist/index175.mjs +2 -72
- package/dist/index176.mjs +2 -2
- package/dist/index177.mjs +59 -40
- package/dist/index179.mjs +48 -31
- package/dist/index18.mjs +749 -62
- package/dist/index180.mjs +2 -152
- package/dist/index181.mjs +36 -2
- package/dist/index182.mjs +152 -2
- package/dist/index183.mjs +2 -19
- package/dist/index184.mjs +2 -2
- package/dist/index185.mjs +19 -2
- package/dist/index186.mjs +2 -26
- package/dist/index187.mjs +2 -2
- package/dist/index188.mjs +26 -2
- package/dist/index189.mjs +2 -24
- package/dist/index19.mjs +50 -14
- package/dist/index190.mjs +2 -23
- package/dist/index191.mjs +24 -2
- package/dist/index192.mjs +23 -2
- package/dist/index193.mjs +2 -2
- package/dist/index194.mjs +2 -23
- package/dist/index196.mjs +16 -16
- package/dist/index197.mjs +2 -2
- package/dist/index198.mjs +23 -2
- package/dist/index199.mjs +2 -2
- package/dist/index2.mjs +2 -2
- package/dist/index20.mjs +62 -109
- package/dist/index200.mjs +2 -23
- package/dist/index201.mjs +2 -2
- package/dist/index202.mjs +15 -15
- package/dist/index204.mjs +23 -2
- package/dist/index205.mjs +2 -2
- package/dist/index206.mjs +2 -2
- package/dist/index207.mjs +2 -2
- package/dist/index209.mjs +2 -2
- package/dist/index21.mjs +23 -41
- package/dist/index211.mjs +2 -127
- package/dist/index212.mjs +2 -2
- package/dist/index213.mjs +123 -70
- package/dist/index214.mjs +2 -74
- package/dist/index215.mjs +73 -30
- package/dist/index216.mjs +73 -10
- package/dist/index217.mjs +13 -4
- package/dist/index218.mjs +7 -4
- package/dist/index219.mjs +30 -12
- package/dist/index22.mjs +109 -42
- package/dist/index220.mjs +11 -7
- package/dist/index221.mjs +3 -11
- package/dist/index222.mjs +3 -4
- package/dist/index223.mjs +12 -33
- package/dist/index224.mjs +5 -31
- package/dist/index225.mjs +32 -27
- package/dist/index226.mjs +28 -58
- package/dist/index227.mjs +28 -2
- package/dist/index228.mjs +61 -2
- package/dist/index229.mjs +2 -2
- package/dist/index23.mjs +42 -71
- package/dist/index230.mjs +2 -2
- package/dist/index231.mjs +2 -2
- package/dist/index232.mjs +2 -2
- package/dist/index233.mjs +25 -96
- package/dist/index234.mjs +2 -2
- package/dist/index235.mjs +2 -2
- package/dist/index236.mjs +244 -2
- package/dist/index237.mjs +2 -2
- package/dist/index238.mjs +32 -243
- package/dist/index239.mjs +65 -2
- package/dist/index24.mjs +41 -31
- package/dist/index240.mjs +16 -24
- package/dist/index241.mjs +2 -65
- package/dist/index242.mjs +2 -25
- package/dist/index244.mjs +2 -37
- package/dist/index245.mjs +2 -2
- package/dist/index247.mjs +2 -2
- package/dist/index25.mjs +86 -6
- package/dist/index250.mjs +2 -2
- package/dist/index251.mjs +108 -2
- package/dist/index254.mjs +2 -2
- package/dist/index255.mjs +2 -4
- package/dist/index256.mjs +4 -2
- package/dist/index257.mjs +2 -2
- package/dist/index259.mjs +2 -2
- package/dist/index26.mjs +27 -17
- package/dist/index261.mjs +1 -1
- package/dist/index262.mjs +1 -1
- package/dist/index263.mjs +2 -2
- package/dist/index264.mjs +2 -2
- package/dist/index265.mjs +2 -2
- package/dist/index266.mjs +2 -91
- package/dist/index267.mjs +91 -3
- package/dist/index268.mjs +2 -2
- package/dist/index269.mjs +2 -2
- package/dist/index27.mjs +6 -34
- package/dist/index270.mjs +3 -17
- package/dist/index271.mjs +2 -13
- package/dist/index272.mjs +2 -6
- package/dist/index273.mjs +17 -30
- package/dist/index274.mjs +13 -2
- package/dist/index275.mjs +6 -2
- package/dist/index276.mjs +30 -2
- package/dist/index277.mjs +2 -2
- package/dist/index278.mjs +5 -0
- package/dist/index279.mjs +5 -0
- package/dist/index28.mjs +19 -37
- package/dist/index29.mjs +36 -114
- package/dist/index3.mjs +5 -5
- package/dist/index30.mjs +30 -21
- package/dist/index31.mjs +113 -9
- package/dist/index32.mjs +27 -7
- package/dist/index33.mjs +11 -116
- package/dist/index34.mjs +11 -25
- package/dist/index35.mjs +116 -81
- package/dist/index36.mjs +24 -111
- package/dist/index37.mjs +81 -11
- package/dist/index38.mjs +104 -27
- package/dist/index39.mjs +8 -25
- package/dist/index4.mjs +1 -1
- package/dist/index40.mjs +32 -8
- package/dist/index41.mjs +26 -121
- package/dist/index42.mjs +9 -387
- package/dist/index43.mjs +116 -18
- package/dist/index44.mjs +387 -30
- package/dist/index45.mjs +24 -6
- package/dist/index46.mjs +30 -1431
- package/dist/index47.mjs +6 -69
- package/dist/index48.mjs +1433 -2
- package/dist/index49.mjs +68 -58
- package/dist/index5.mjs +1 -1
- package/dist/index50.mjs +2 -51
- package/dist/index51.mjs +60 -33
- package/dist/index52.mjs +49 -13
- package/dist/index53.mjs +32 -2262
- package/dist/index54.mjs +15 -36
- package/dist/index55.mjs +2261 -42
- package/dist/index56.mjs +36 -99
- package/dist/index57.mjs +43 -80
- package/dist/index58.mjs +99 -19
- package/dist/index59.mjs +52 -100
- package/dist/index6.mjs +1 -1
- package/dist/index60.mjs +13 -119
- package/dist/index61.mjs +102 -52
- package/dist/index62.mjs +86 -74
- package/dist/index63.mjs +52 -80
- package/dist/index64.mjs +110 -17
- package/dist/index65.mjs +79 -67
- package/dist/index66.mjs +17 -78
- package/dist/index67.mjs +71 -39
- package/dist/index68.mjs +65 -46
- package/dist/index69.mjs +45 -117
- package/dist/index7.mjs +6 -6
- package/dist/index70.mjs +60 -22
- package/dist/index71.mjs +131 -149
- package/dist/index72.mjs +24 -2
- package/dist/index73.mjs +2 -23
- package/dist/index74.mjs +152 -4
- package/dist/index75.mjs +21 -73
- package/dist/index76.mjs +5 -15
- package/dist/index77.mjs +68 -56
- package/dist/index78.mjs +15 -34
- package/dist/index79.mjs +58 -38
- package/dist/index8.mjs +4 -4
- package/dist/index82.mjs +35 -35
- package/dist/index83.mjs +1 -1
- package/dist/index84.mjs +2 -2
- package/dist/index85.mjs +2 -2
- package/dist/index87.mjs +30 -231
- package/dist/index88.mjs +42 -5
- package/dist/index89.mjs +228 -127
- package/dist/index9.mjs +3 -3
- package/dist/index90.mjs +4 -66
- package/dist/index91.mjs +124 -77
- package/dist/index92.mjs +65 -26
- package/dist/index93.mjs +84 -6
- package/dist/index94.mjs +26 -72
- package/dist/index95.mjs +8 -3
- package/dist/index96.mjs +75 -2
- package/dist/index97.mjs +3 -82
- package/dist/index98.mjs +2 -54
- package/dist/index99.mjs +82 -5
- package/dist/lib/utils.d.ts +3 -0
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/src/components/CartUpsellScreen.stories.tsx +166 -0
- package/src/components/CartUpsellScreen.tsx +197 -0
- package/src/components/QuantitySelector.tsx +245 -0
- package/src/components/ShoppingCart.tsx +57 -11
- package/src/index.ts +8 -1
- package/src/lib/utils.ts +24 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface CartUpsellScreenProps {
|
|
2
|
+
/** Callback when user skips upsell to continue to checkout */
|
|
3
|
+
onSkip: () => void;
|
|
4
|
+
/** Number of recommendations to fetch */
|
|
5
|
+
limit?: number;
|
|
6
|
+
/** Custom class name */
|
|
7
|
+
className?: string;
|
|
8
|
+
/** Custom class for the checkout button */
|
|
9
|
+
checkoutButtonClassName?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function CartUpsellScreen({ onSkip, limit, className, checkoutButtonClassName, }: CartUpsellScreenProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
//# sourceMappingURL=CartUpsellScreen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CartUpsellScreen.d.ts","sourceRoot":"","sources":["../../src/components/CartUpsellScreen.tsx"],"names":[],"mappings":"AAkBA,MAAM,WAAW,qBAAqB;IACpC,8DAA8D;IAC9D,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,yCAAyC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wBAAwB;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2CAA2C;IAC3C,uBAAuB,CAAC,EAAE,MAAM,CAAC;CAClC;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,MAAM,EACN,KAAW,EACX,SAAS,EACT,uBAAuB,GACxB,EAAE,qBAAqB,2CAkKvB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { QuantityDiscountMap } from '../lib/utils';
|
|
2
|
+
export interface QuantitySelectorProps {
|
|
3
|
+
selectedVariant: any;
|
|
4
|
+
quantity: number;
|
|
5
|
+
onQuantityChange: (quantity: number) => void;
|
|
6
|
+
effectivePrice: number;
|
|
7
|
+
quantityDiscounts: QuantityDiscountMap;
|
|
8
|
+
}
|
|
9
|
+
export declare function QuantitySelector({ selectedVariant, quantity, onQuantityChange, effectivePrice, quantityDiscounts, }: QuantitySelectorProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
//# sourceMappingURL=QuantitySelector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QuantitySelector.d.ts","sourceRoot":"","sources":["../../src/components/QuantitySelector.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAExD,MAAM,WAAW,qBAAqB;IACpC,eAAe,EAAE,GAAG,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,cAAc,EAAE,MAAM,CAAC;IACvB,iBAAiB,EAAE,mBAAmB,CAAC;CACxC;AA4LD,wBAAgB,gBAAgB,CAAC,EAC/B,eAAe,EACf,QAAQ,EACR,gBAAgB,EAChB,cAAc,EACd,iBAAiB,GAClB,EAAE,qBAAqB,2CAqCvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShoppingCart.d.ts","sourceRoot":"","sources":["../../src/components/ShoppingCart.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"ShoppingCart.d.ts","sourceRoot":"","sources":["../../src/components/ShoppingCart.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAanD,MAAM,WAAW,iBAAiB;IAChC,+BAA+B;IAC/B,MAAM,EAAE,OAAO,CAAC;IAChB,sCAAsC;IACtC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,wCAAwC;IACxC,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,iDAAiD;IACjD,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC,uDAAuD;IACvD,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAC3C,wBAAwB;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+BAA+B;IAC/B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,oCAAoC;IACpC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,2BAA2B;IAC3B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,oCAAoC;IACpC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,uCAAuC;IACvC,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,gDAAgD;IAChD,+BAA+B,CAAC,EAAE,MAAM,CAAC;IACzC,uBAAuB;IACvB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,yBAAyB;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,YAAY,CAAC,EAC3B,MAAM,EACN,OAAO,EACP,UAAU,EACV,kBAAkB,EAClB,iBAAiB,EACjB,SAAS,EACT,gBAAuB,EACvB,oBAA2B,EAC3B,kBAAwC,EACxC,oBAA0C,EAC1C,uBAAuB,EACvB,+BAA+B,EAC/B,eAAuB,EACvB,YAAmC,GACpC,EAAE,iBAAiB,2CA0SnB"}
|
package/dist/index.d.ts
CHANGED
|
@@ -24,8 +24,12 @@ export { VariantPickerModal } from './components/VariantPickerModal';
|
|
|
24
24
|
export type { VariantPickerModalProps, VariantPickerProduct, Variant } from './components/VariantPickerModal';
|
|
25
25
|
export { CartItem } from './components/CartItem';
|
|
26
26
|
export type { CartItemProps } from './components/CartItem';
|
|
27
|
+
export { QuantitySelector } from './components/QuantitySelector';
|
|
28
|
+
export type { QuantitySelectorProps } from './components/QuantitySelector';
|
|
27
29
|
export { ShoppingCart } from './components/ShoppingCart';
|
|
28
30
|
export type { ShoppingCartProps } from './components/ShoppingCart';
|
|
31
|
+
export { CartUpsellScreen } from './components/CartUpsellScreen';
|
|
32
|
+
export type { CartUpsellScreenProps } from './components/CartUpsellScreen';
|
|
29
33
|
export { DiscountCodeInput } from './components/DiscountCodeInput';
|
|
30
34
|
export type { DiscountCodeInputProps } from './components/DiscountCodeInput';
|
|
31
35
|
export { Checkout } from './components/Checkout';
|
|
@@ -39,6 +43,7 @@ export { FormInput } from './components/ui/form-input';
|
|
|
39
43
|
export type { FormInputProps } from './components/ui/form-input';
|
|
40
44
|
export { FormSelect } from './components/ui/form-select';
|
|
41
45
|
export type { FormSelectProps } from './components/ui/form-select';
|
|
42
|
-
export { cn, formatCurrency, formatDate, formatDateTime, getStatusColor } from './lib/utils';
|
|
46
|
+
export { cn, formatCurrency, formatDate, formatDateTime, getStatusColor, getDiscountPercent, calculateDiscountedPrice } from './lib/utils';
|
|
47
|
+
export type { QuantityDiscountMap } from './lib/utils';
|
|
43
48
|
export * from '@instockng/api-client';
|
|
44
49
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,YAAY,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAG9E,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAG/D,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAChF,YAAY,EAAE,sBAAsB,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAG1F,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAGtF,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAG1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC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G,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,YAAY,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,YAAY,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,YAAY,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAGnE,OAAO,EAAE,EAAE,EAAE,cAAc,EAAE,UAAU,EAAE,cAAc,EAAE,cAAc,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAC3I,YAAY,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAIvD,cAAc,uBAAuB,CAAC"}
|
package/dist/index.mjs
CHANGED
|
@@ -2,127 +2,133 @@
|
|
|
2
2
|
import { StorefrontProvider as m } from "./index2.mjs";
|
|
3
3
|
import { CartProvider as i, useCart as d } from "./index3.mjs";
|
|
4
4
|
import { MetaPixelProvider as u, useMetaPixel as n } from "./index4.mjs";
|
|
5
|
-
import { TikTokPixelProvider as
|
|
6
|
-
import { usePageTracking as
|
|
5
|
+
import { TikTokPixelProvider as f, useTikTokPixel as s } from "./index5.mjs";
|
|
6
|
+
import { usePageTracking as C } from "./index6.mjs";
|
|
7
7
|
import { OrderConfirmation as P } from "./index7.mjs";
|
|
8
8
|
import { ProductCard as A } from "./index8.mjs";
|
|
9
|
-
import { ProductGrid as
|
|
10
|
-
import { ProductAddOns as
|
|
11
|
-
import { RecommendedProducts as
|
|
12
|
-
import { VariantPickerModal as
|
|
9
|
+
import { ProductGrid as k } from "./index9.mjs";
|
|
10
|
+
import { ProductAddOns as y } from "./index10.mjs";
|
|
11
|
+
import { RecommendedProducts as R } from "./index11.mjs";
|
|
12
|
+
import { VariantPickerModal as I } from "./index12.mjs";
|
|
13
13
|
import { CartItem as B } from "./index13.mjs";
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
14
|
+
import { QuantitySelector as T } from "./index14.mjs";
|
|
15
|
+
import { ShoppingCart as F } from "./index15.mjs";
|
|
16
|
+
import { CartUpsellScreen as H } from "./index16.mjs";
|
|
17
|
+
import { DiscountCodeInput as b } from "./index17.mjs";
|
|
18
|
+
import { Checkout as z } from "./index18.mjs";
|
|
19
|
+
import { Button as Q } from "./index19.mjs";
|
|
20
|
+
import { Card as $, CardContent as j, CardDescription as w, CardFooter as E, CardHeader as J, CardTitle as L } from "./index20.mjs";
|
|
21
|
+
import { Badge as W } from "./index21.mjs";
|
|
22
|
+
import { Modal as Y } from "./index22.mjs";
|
|
23
|
+
import { FormInput as ee } from "./index23.mjs";
|
|
24
|
+
import { FormSelect as te } from "./index24.mjs";
|
|
25
|
+
import { calculateDiscountedPrice as me, cn as ae, formatCurrency as ie, formatDate as de, formatDateTime as pe, getDiscountPercent as ue, getStatusColor as ne } from "./index25.mjs";
|
|
26
|
+
import { ApiClientProvider as fe, useApiClientContext as se } from "./index26.mjs";
|
|
27
|
+
import { useApiConfig as Ce } from "./index27.mjs";
|
|
28
|
+
import { getApiClient as Pe, initializeApiClient as he, resetApiClient as Ae } from "./index28.mjs";
|
|
29
|
+
import { authHeaders as ke, createAdminRpcClients as ve, createRpcClients as ye } from "./index29.mjs";
|
|
30
|
+
import { fetchProductAddons as Re, fetchProductBySlug as ge, fetchProductRecommendations as Ie, fetchProductsByBrand as Oe } from "./index30.mjs";
|
|
31
|
+
import { addCartItem as Se, applyDiscount as Te, checkoutCart as Me, createCart as Fe, fetchCart as Ue, fetchCartRecommendations as He, initiateCheckout as Ze, removeCartItem as be, removeDiscount as qe, updateCart as ze, updateCartItem as Ke } from "./index31.mjs";
|
|
32
|
+
import { confirmOrder as Ve, fetchOrder as $e, fetchOrderRecommendations as je } from "./index32.mjs";
|
|
33
|
+
import { fetchDeliveryZones as Ee } from "./index33.mjs";
|
|
34
|
+
import { fetchBrandBySlug as Le } from "./index34.mjs";
|
|
35
|
+
import { queryKeys as We } from "./index35.mjs";
|
|
36
|
+
import * as e from "./index36.mjs";
|
|
37
|
+
import * as r from "./index37.mjs";
|
|
38
|
+
import { useAddCartItem as Ye, useApplyDiscount as _e, useCheckoutCart as er, useCreateCart as rr, useGetCart as tr, useGetCartRecommendations as or, useInitiateCheckout as mr, useRemoveCartItem as ar, useRemoveDiscount as ir, useUpdateCart as dr, useUpdateCartItem as pr } from "./index38.mjs";
|
|
39
|
+
import { useGetBrand as nr } from "./index39.mjs";
|
|
40
|
+
import { useGetProduct as fr, useGetProductAddOns as sr, useGetProductRecommendations as xr, useGetProducts as Cr } from "./index40.mjs";
|
|
41
|
+
import { useConfirmOrder as Pr, useGetOrder as hr, useGetOrderRecommendations as Ar } from "./index41.mjs";
|
|
42
|
+
import { useGetDeliveryZones as kr } from "./index42.mjs";
|
|
41
43
|
export {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
44
|
+
fe as ApiClientProvider,
|
|
45
|
+
W as Badge,
|
|
46
|
+
Q as Button,
|
|
47
|
+
$ as Card,
|
|
48
|
+
j as CardContent,
|
|
49
|
+
w as CardDescription,
|
|
50
|
+
E as CardFooter,
|
|
51
|
+
J as CardHeader,
|
|
52
|
+
L as CardTitle,
|
|
51
53
|
B as CartItem,
|
|
52
54
|
i as CartProvider,
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
H as CartUpsellScreen,
|
|
56
|
+
z as Checkout,
|
|
57
|
+
b as DiscountCodeInput,
|
|
58
|
+
ee as FormInput,
|
|
59
|
+
te as FormSelect,
|
|
57
60
|
u as MetaPixelProvider,
|
|
58
|
-
|
|
61
|
+
Y as Modal,
|
|
59
62
|
P as OrderConfirmation,
|
|
60
|
-
|
|
63
|
+
y as ProductAddOns,
|
|
61
64
|
A as ProductCard,
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
+
k as ProductGrid,
|
|
66
|
+
T as QuantitySelector,
|
|
67
|
+
R as RecommendedProducts,
|
|
68
|
+
F as ShoppingCart,
|
|
65
69
|
m as StorefrontProvider,
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
70
|
+
f as TikTokPixelProvider,
|
|
71
|
+
I as VariantPickerModal,
|
|
72
|
+
Se as addCartItem,
|
|
69
73
|
r as adminApi,
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
74
|
+
Te as applyDiscount,
|
|
75
|
+
ke as authHeaders,
|
|
76
|
+
me as calculateDiscountedPrice,
|
|
77
|
+
Me as checkoutCart,
|
|
78
|
+
ae as cn,
|
|
79
|
+
Ve as confirmOrder,
|
|
80
|
+
ve as createAdminRpcClients,
|
|
81
|
+
Fe as createCart,
|
|
82
|
+
ye as createRpcClients,
|
|
83
|
+
Le as fetchBrandBySlug,
|
|
84
|
+
Ue as fetchCart,
|
|
85
|
+
He as fetchCartRecommendations,
|
|
86
|
+
Ee as fetchDeliveryZones,
|
|
87
|
+
$e as fetchOrder,
|
|
88
|
+
je as fetchOrderRecommendations,
|
|
89
|
+
Re as fetchProductAddons,
|
|
90
|
+
ge as fetchProductBySlug,
|
|
91
|
+
Ie as fetchProductRecommendations,
|
|
92
|
+
Oe as fetchProductsByBrand,
|
|
93
|
+
ie as formatCurrency,
|
|
94
|
+
de as formatDate,
|
|
95
|
+
pe as formatDateTime,
|
|
96
|
+
Pe as getApiClient,
|
|
97
|
+
ue as getDiscountPercent,
|
|
98
|
+
ne as getStatusColor,
|
|
99
|
+
he as initializeApiClient,
|
|
100
|
+
Ze as initiateCheckout,
|
|
95
101
|
e as publicApi,
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
102
|
+
We as queryKeys,
|
|
103
|
+
be as removeCartItem,
|
|
104
|
+
qe as removeDiscount,
|
|
105
|
+
Ae as resetApiClient,
|
|
106
|
+
ze as updateCart,
|
|
107
|
+
Ke as updateCartItem,
|
|
108
|
+
Ye as useAddCartItem,
|
|
109
|
+
se as useApiClientContext,
|
|
110
|
+
Ce as useApiConfig,
|
|
111
|
+
_e as useApplyDiscount,
|
|
106
112
|
d as useCart,
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
113
|
+
er as useCheckoutCart,
|
|
114
|
+
Pr as useConfirmOrder,
|
|
115
|
+
rr as useCreateCart,
|
|
116
|
+
nr as useGetBrand,
|
|
117
|
+
tr as useGetCart,
|
|
118
|
+
or as useGetCartRecommendations,
|
|
119
|
+
kr as useGetDeliveryZones,
|
|
120
|
+
hr as useGetOrder,
|
|
121
|
+
Ar as useGetOrderRecommendations,
|
|
122
|
+
fr as useGetProduct,
|
|
123
|
+
sr as useGetProductAddOns,
|
|
124
|
+
xr as useGetProductRecommendations,
|
|
125
|
+
Cr as useGetProducts,
|
|
126
|
+
mr as useInitiateCheckout,
|
|
121
127
|
n as useMetaPixel,
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
+
C as usePageTracking,
|
|
129
|
+
ar as useRemoveCartItem,
|
|
130
|
+
ir as useRemoveDiscount,
|
|
131
|
+
s as useTikTokPixel,
|
|
132
|
+
dr as useUpdateCart,
|
|
133
|
+
pr as useUpdateCartItem
|
|
128
134
|
};
|
package/dist/index10.mjs
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import { jsxs as a, jsx as t, Fragment as C } from "react/jsx-runtime";
|
|
3
3
|
import { useState as f, useRef as V } from "react";
|
|
4
4
|
import { ChevronLeft as U, ChevronRight as z } from "lucide-react";
|
|
5
|
-
import { Switch as G } from "./
|
|
6
|
-
import { Badge as T } from "./
|
|
7
|
-
import { cn as P, formatCurrency as k } from "./
|
|
5
|
+
import { Switch as G } from "./index46.mjs";
|
|
6
|
+
import { Badge as T } from "./index21.mjs";
|
|
7
|
+
import { cn as P, formatCurrency as k } from "./index25.mjs";
|
|
8
8
|
import { VariantPickerModal as _ } from "./index12.mjs";
|
|
9
|
-
import "./
|
|
9
|
+
import "./index26.mjs";
|
|
10
10
|
import "@tanstack/react-query";
|
|
11
|
-
import { useGetProductAddOns as $ } from "./
|
|
11
|
+
import { useGetProductAddOns as $ } from "./index40.mjs";
|
|
12
12
|
import { useCart as q } from "./index3.mjs";
|
|
13
13
|
function le({
|
|
14
14
|
slug: g,
|
package/dist/index100.mjs
CHANGED
|
@@ -1,8 +1,57 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import
|
|
3
|
-
function o
|
|
4
|
-
|
|
2
|
+
import c from "./index89.mjs";
|
|
3
|
+
function r(t, i, o, a, e) {
|
|
4
|
+
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = t, this.name = "AxiosError", i && (this.code = i), o && (this.config = o), a && (this.request = a), e && (this.response = e, this.status = e.status ? e.status : null);
|
|
5
5
|
}
|
|
6
|
+
c.inherits(r, Error, {
|
|
7
|
+
toJSON: function() {
|
|
8
|
+
return {
|
|
9
|
+
// Standard
|
|
10
|
+
message: this.message,
|
|
11
|
+
name: this.name,
|
|
12
|
+
// Microsoft
|
|
13
|
+
description: this.description,
|
|
14
|
+
number: this.number,
|
|
15
|
+
// Mozilla
|
|
16
|
+
fileName: this.fileName,
|
|
17
|
+
lineNumber: this.lineNumber,
|
|
18
|
+
columnNumber: this.columnNumber,
|
|
19
|
+
stack: this.stack,
|
|
20
|
+
// Axios
|
|
21
|
+
config: c.toJSONObject(this.config),
|
|
22
|
+
code: this.code,
|
|
23
|
+
status: this.status
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
const u = r.prototype, R = {};
|
|
28
|
+
[
|
|
29
|
+
"ERR_BAD_OPTION_VALUE",
|
|
30
|
+
"ERR_BAD_OPTION",
|
|
31
|
+
"ECONNABORTED",
|
|
32
|
+
"ETIMEDOUT",
|
|
33
|
+
"ERR_NETWORK",
|
|
34
|
+
"ERR_FR_TOO_MANY_REDIRECTS",
|
|
35
|
+
"ERR_DEPRECATED",
|
|
36
|
+
"ERR_BAD_RESPONSE",
|
|
37
|
+
"ERR_BAD_REQUEST",
|
|
38
|
+
"ERR_CANCELED",
|
|
39
|
+
"ERR_NOT_SUPPORT",
|
|
40
|
+
"ERR_INVALID_URL"
|
|
41
|
+
// eslint-disable-next-line func-names
|
|
42
|
+
].forEach((t) => {
|
|
43
|
+
R[t] = { value: t };
|
|
44
|
+
});
|
|
45
|
+
Object.defineProperties(r, R);
|
|
46
|
+
Object.defineProperty(u, "isAxiosError", { value: !0 });
|
|
47
|
+
r.from = (t, i, o, a, e, E) => {
|
|
48
|
+
const s = Object.create(u);
|
|
49
|
+
c.toFlatObject(t, s, function(m) {
|
|
50
|
+
return m !== Error.prototype;
|
|
51
|
+
}, (n) => n !== "isAxiosError");
|
|
52
|
+
const l = t && t.message ? t.message : "Error", h = i == null && t ? t.code : i;
|
|
53
|
+
return r.call(s, l, h, o, a, e), t && s.cause == null && Object.defineProperty(s, "cause", { value: t, configurable: !0 }), s.name = t && t.name || "Error", E && Object.assign(s, E), s;
|
|
54
|
+
};
|
|
6
55
|
export {
|
|
7
|
-
|
|
56
|
+
r as default
|
|
8
57
|
};
|
package/dist/index101.mjs
CHANGED
|
@@ -1,182 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
function y(r) {
|
|
6
|
-
return r && String(r).trim().toLowerCase();
|
|
7
|
-
}
|
|
8
|
-
function m(r) {
|
|
9
|
-
return r === !1 || r == null ? r : i.isArray(r) ? r.map(m) : String(r);
|
|
10
|
-
}
|
|
11
|
-
function A(r) {
|
|
12
|
-
const t = /* @__PURE__ */ Object.create(null), e = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
13
|
-
let s;
|
|
14
|
-
for (; s = e.exec(r); )
|
|
15
|
-
t[s[1]] = s[2];
|
|
16
|
-
return t;
|
|
17
|
-
}
|
|
18
|
-
const k = (r) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim());
|
|
19
|
-
function g(r, t, e, s, n) {
|
|
20
|
-
if (i.isFunction(s))
|
|
21
|
-
return s.call(this, t, e);
|
|
22
|
-
if (n && (t = e), !!i.isString(t)) {
|
|
23
|
-
if (i.isString(s))
|
|
24
|
-
return t.indexOf(s) !== -1;
|
|
25
|
-
if (i.isRegExp(s))
|
|
26
|
-
return s.test(t);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
function E(r) {
|
|
30
|
-
return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, e, s) => e.toUpperCase() + s);
|
|
31
|
-
}
|
|
32
|
-
function j(r, t) {
|
|
33
|
-
const e = i.toCamelCase(" " + t);
|
|
34
|
-
["get", "set", "has"].forEach((s) => {
|
|
35
|
-
Object.defineProperty(r, s + e, {
|
|
36
|
-
value: function(n, o, f) {
|
|
37
|
-
return this[s].call(this, t, n, o, f);
|
|
38
|
-
},
|
|
39
|
-
configurable: !0
|
|
40
|
-
});
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
class b {
|
|
44
|
-
constructor(t) {
|
|
45
|
-
t && this.set(t);
|
|
46
|
-
}
|
|
47
|
-
set(t, e, s) {
|
|
48
|
-
const n = this;
|
|
49
|
-
function o(c, l, a) {
|
|
50
|
-
const u = y(l);
|
|
51
|
-
if (!u)
|
|
52
|
-
throw new Error("header name must be a non-empty string");
|
|
53
|
-
const p = i.findKey(n, u);
|
|
54
|
-
(!p || n[p] === void 0 || a === !0 || a === void 0 && n[p] !== !1) && (n[p || l] = m(c));
|
|
55
|
-
}
|
|
56
|
-
const f = (c, l) => i.forEach(c, (a, u) => o(a, u, l));
|
|
57
|
-
if (i.isPlainObject(t) || t instanceof this.constructor)
|
|
58
|
-
f(t, e);
|
|
59
|
-
else if (i.isString(t) && (t = t.trim()) && !k(t))
|
|
60
|
-
f(S(t), e);
|
|
61
|
-
else if (i.isObject(t) && i.isIterable(t)) {
|
|
62
|
-
let c = {}, l, a;
|
|
63
|
-
for (const u of t) {
|
|
64
|
-
if (!i.isArray(u))
|
|
65
|
-
throw TypeError("Object iterator must return a key-value pair");
|
|
66
|
-
c[a = u[0]] = (l = c[a]) ? i.isArray(l) ? [...l, u[1]] : [l, u[1]] : u[1];
|
|
67
|
-
}
|
|
68
|
-
f(c, e);
|
|
69
|
-
} else
|
|
70
|
-
t != null && o(e, t, s);
|
|
71
|
-
return this;
|
|
72
|
-
}
|
|
73
|
-
get(t, e) {
|
|
74
|
-
if (t = y(t), t) {
|
|
75
|
-
const s = i.findKey(this, t);
|
|
76
|
-
if (s) {
|
|
77
|
-
const n = this[s];
|
|
78
|
-
if (!e)
|
|
79
|
-
return n;
|
|
80
|
-
if (e === !0)
|
|
81
|
-
return A(n);
|
|
82
|
-
if (i.isFunction(e))
|
|
83
|
-
return e.call(this, n, s);
|
|
84
|
-
if (i.isRegExp(e))
|
|
85
|
-
return e.exec(n);
|
|
86
|
-
throw new TypeError("parser must be boolean|regexp|function");
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
has(t, e) {
|
|
91
|
-
if (t = y(t), t) {
|
|
92
|
-
const s = i.findKey(this, t);
|
|
93
|
-
return !!(s && this[s] !== void 0 && (!e || g(this, this[s], s, e)));
|
|
94
|
-
}
|
|
95
|
-
return !1;
|
|
96
|
-
}
|
|
97
|
-
delete(t, e) {
|
|
98
|
-
const s = this;
|
|
99
|
-
let n = !1;
|
|
100
|
-
function o(f) {
|
|
101
|
-
if (f = y(f), f) {
|
|
102
|
-
const c = i.findKey(s, f);
|
|
103
|
-
c && (!e || g(s, s[c], c, e)) && (delete s[c], n = !0);
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
return i.isArray(t) ? t.forEach(o) : o(t), n;
|
|
107
|
-
}
|
|
108
|
-
clear(t) {
|
|
109
|
-
const e = Object.keys(this);
|
|
110
|
-
let s = e.length, n = !1;
|
|
111
|
-
for (; s--; ) {
|
|
112
|
-
const o = e[s];
|
|
113
|
-
(!t || g(this, this[o], o, t, !0)) && (delete this[o], n = !0);
|
|
114
|
-
}
|
|
115
|
-
return n;
|
|
116
|
-
}
|
|
117
|
-
normalize(t) {
|
|
118
|
-
const e = this, s = {};
|
|
119
|
-
return i.forEach(this, (n, o) => {
|
|
120
|
-
const f = i.findKey(s, o);
|
|
121
|
-
if (f) {
|
|
122
|
-
e[f] = m(n), delete e[o];
|
|
123
|
-
return;
|
|
124
|
-
}
|
|
125
|
-
const c = t ? E(o) : String(o).trim();
|
|
126
|
-
c !== o && delete e[o], e[c] = m(n), s[c] = !0;
|
|
127
|
-
}), this;
|
|
128
|
-
}
|
|
129
|
-
concat(...t) {
|
|
130
|
-
return this.constructor.concat(this, ...t);
|
|
131
|
-
}
|
|
132
|
-
toJSON(t) {
|
|
133
|
-
const e = /* @__PURE__ */ Object.create(null);
|
|
134
|
-
return i.forEach(this, (s, n) => {
|
|
135
|
-
s != null && s !== !1 && (e[n] = t && i.isArray(s) ? s.join(", ") : s);
|
|
136
|
-
}), e;
|
|
137
|
-
}
|
|
138
|
-
[Symbol.iterator]() {
|
|
139
|
-
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
140
|
-
}
|
|
141
|
-
toString() {
|
|
142
|
-
return Object.entries(this.toJSON()).map(([t, e]) => t + ": " + e).join(`
|
|
143
|
-
`);
|
|
144
|
-
}
|
|
145
|
-
getSetCookie() {
|
|
146
|
-
return this.get("set-cookie") || [];
|
|
147
|
-
}
|
|
148
|
-
get [Symbol.toStringTag]() {
|
|
149
|
-
return "AxiosHeaders";
|
|
150
|
-
}
|
|
151
|
-
static from(t) {
|
|
152
|
-
return t instanceof this ? t : new this(t);
|
|
153
|
-
}
|
|
154
|
-
static concat(t, ...e) {
|
|
155
|
-
const s = new this(t);
|
|
156
|
-
return e.forEach((n) => s.set(n)), s;
|
|
157
|
-
}
|
|
158
|
-
static accessor(t) {
|
|
159
|
-
const s = (this[h] = this[h] = {
|
|
160
|
-
accessors: {}
|
|
161
|
-
}).accessors, n = this.prototype;
|
|
162
|
-
function o(f) {
|
|
163
|
-
const c = y(f);
|
|
164
|
-
s[c] || (j(n, f), s[c] = !0);
|
|
165
|
-
}
|
|
166
|
-
return i.isArray(t) ? t.forEach(o) : o(t), this;
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
b.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
170
|
-
i.reduceDescriptors(b.prototype, ({ value: r }, t) => {
|
|
171
|
-
let e = t[0].toUpperCase() + t.slice(1);
|
|
172
|
-
return {
|
|
173
|
-
get: () => r,
|
|
174
|
-
set(s) {
|
|
175
|
-
this[e] = s;
|
|
176
|
-
}
|
|
2
|
+
function u(n) {
|
|
3
|
+
return function(r) {
|
|
4
|
+
return n.apply(null, r);
|
|
177
5
|
};
|
|
178
|
-
}
|
|
179
|
-
i.freezeMethods(b);
|
|
6
|
+
}
|
|
180
7
|
export {
|
|
181
|
-
|
|
8
|
+
u as default
|
|
182
9
|
};
|
package/dist/index102.mjs
CHANGED
|
@@ -1,56 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import d from "./index98.mjs";
|
|
7
|
-
const p = {
|
|
8
|
-
http: m,
|
|
9
|
-
xhr: u,
|
|
10
|
-
fetch: {
|
|
11
|
-
get: b
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
s.forEach(p, (e, o) => {
|
|
15
|
-
if (e) {
|
|
16
|
-
try {
|
|
17
|
-
Object.defineProperty(e, "name", { value: o });
|
|
18
|
-
} catch {
|
|
19
|
-
}
|
|
20
|
-
Object.defineProperty(e, "adapterName", { value: o });
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
const f = (e) => `- ${e}`, g = (e) => s.isFunction(e) || e === null || e === !1, y = {
|
|
24
|
-
getAdapter: (e, o) => {
|
|
25
|
-
e = s.isArray(e) ? e : [e];
|
|
26
|
-
const { length: a } = e;
|
|
27
|
-
let i, t;
|
|
28
|
-
const c = {};
|
|
29
|
-
for (let r = 0; r < a; r++) {
|
|
30
|
-
i = e[r];
|
|
31
|
-
let n;
|
|
32
|
-
if (t = i, !g(i) && (t = p[(n = String(i)).toLowerCase()], t === void 0))
|
|
33
|
-
throw new d(`Unknown adapter '${n}'`);
|
|
34
|
-
if (t && (s.isFunction(t) || (t = t.get(o))))
|
|
35
|
-
break;
|
|
36
|
-
c[n || "#" + r] = t;
|
|
37
|
-
}
|
|
38
|
-
if (!t) {
|
|
39
|
-
const r = Object.entries(c).map(
|
|
40
|
-
([l, h]) => `adapter ${l} ` + (h === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
41
|
-
);
|
|
42
|
-
let n = a ? r.length > 1 ? `since :
|
|
43
|
-
` + r.map(f).join(`
|
|
44
|
-
`) : " " + f(r[0]) : "as no adapter specified";
|
|
45
|
-
throw new d(
|
|
46
|
-
"There is no suitable adapter to dispatch the request " + n,
|
|
47
|
-
"ERR_NOT_SUPPORT"
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
return t;
|
|
51
|
-
},
|
|
52
|
-
adapters: p
|
|
53
|
-
};
|
|
2
|
+
import i from "./index89.mjs";
|
|
3
|
+
function o(r) {
|
|
4
|
+
return i.isObject(r) && r.isAxiosError === !0;
|
|
5
|
+
}
|
|
54
6
|
export {
|
|
55
|
-
|
|
7
|
+
o as default
|
|
56
8
|
};
|