@suiteop/storefront 0.1.0 → 0.2.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.
- package/CHANGELOG.md +38 -2
- package/README.md +74 -0
- package/dist/astro-content-model.cjs +17 -0
- package/dist/astro-content-model.d.cts +4 -0
- package/dist/astro-content-model.d.ts +4 -0
- package/dist/astro-content-model.js +10 -0
- package/dist/astro.cjs +3 -1
- package/dist/astro.d.cts +38 -17
- package/dist/astro.d.ts +38 -17
- package/dist/astro.js +2 -2
- package/dist/{availability-CYvqeJ6X.d.cts → availability-CnzmxuV3.d.cts} +2 -2
- package/dist/{availability-CYvqeJ6X.d.ts → availability-CnzmxuV3.d.ts} +2 -2
- package/dist/checkout.cjs +3 -3
- package/dist/checkout.js +2 -2
- package/dist/chunk-2U6L33AT.cjs +19 -0
- package/dist/chunk-4GZBXKBU.cjs +18 -0
- package/dist/chunk-GJSCEBSU.js +5 -0
- package/dist/chunk-HLGSWF4I.js +9 -0
- package/dist/{chunk-ZYDFRRFU.js → chunk-HMLBMNGA.js} +1 -1
- package/dist/chunk-KKJCPKPY.js +8 -0
- package/dist/chunk-PYVUDQSQ.js +3 -0
- package/dist/chunk-USOISC2R.cjs +17 -0
- package/dist/{chunk-TBADVD2J.cjs → chunk-VV2UNVQ2.cjs} +2 -2
- package/dist/chunk-ZHFZ6II2.cjs +16 -0
- package/dist/chunk-ZI2PG7LS.js +6 -0
- package/dist/chunk-ZLAOY6IF.cjs +9 -0
- package/dist/{errors-DPtiZNoK.d.ts → client-DER7y1WE.d.cts} +111 -151
- package/dist/{errors-B3sinzJq.d.cts → client-goQnVoLP.d.ts} +111 -151
- package/dist/components.cjs +1 -1
- package/dist/components.d.cts +1 -1
- package/dist/components.d.ts +1 -1
- package/dist/components.js +1 -1
- package/dist/config.cjs +6 -2
- package/dist/config.d.cts +33 -1
- package/dist/config.d.ts +33 -1
- package/dist/config.js +3 -2
- package/dist/content.cjs +37 -0
- package/dist/content.d.cts +254 -0
- package/dist/content.d.ts +254 -0
- package/dist/content.js +4 -0
- package/dist/errors-B2eCo5Cz.d.cts +151 -0
- package/dist/errors-D-dULpp1.d.ts +151 -0
- package/dist/index.cjs +21 -20
- package/dist/index.d.cts +11 -3
- package/dist/index.d.ts +11 -3
- package/dist/index.js +4 -3
- package/dist/react.cjs +6 -5
- package/dist/react.d.cts +3 -2
- package/dist/react.d.ts +3 -2
- package/dist/react.js +5 -4
- package/package.json +22 -6
- package/dist/chunk-AI6STRZP.cjs +0 -18
- package/dist/chunk-AIQUVZEI.cjs +0 -8
- package/dist/chunk-MJA3R7NP.js +0 -8
- package/dist/chunk-NNZZWGM2.js +0 -6
- package/dist/chunk-SK5TD73J.js +0 -3
- package/dist/chunk-T2GQ3DOZ.cjs +0 -17
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { B as BookingResult, v as StorefrontQuote } from './client-DER7y1WE.cjs';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
declare const storefrontClientEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
5
|
+
name: z.ZodLiteral<"page_view">;
|
|
6
|
+
eventId: z.ZodUUID;
|
|
7
|
+
ts: z.ZodNumber;
|
|
8
|
+
path: z.ZodString;
|
|
9
|
+
referrerHost: z.ZodNullable<z.ZodString>;
|
|
10
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
11
|
+
name: z.ZodLiteral<"view_search_results">;
|
|
12
|
+
checkIn: z.ZodOptional<z.ZodISODate>;
|
|
13
|
+
checkOut: z.ZodOptional<z.ZodISODate>;
|
|
14
|
+
guests: z.ZodOptional<z.ZodNumber>;
|
|
15
|
+
locationId: z.ZodOptional<z.ZodUUID>;
|
|
16
|
+
eventId: z.ZodUUID;
|
|
17
|
+
ts: z.ZodNumber;
|
|
18
|
+
path: z.ZodString;
|
|
19
|
+
referrerHost: z.ZodNullable<z.ZodString>;
|
|
20
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
21
|
+
name: z.ZodLiteral<"view_item_list">;
|
|
22
|
+
listName: z.ZodString;
|
|
23
|
+
itemCount: z.ZodNumber;
|
|
24
|
+
eventId: z.ZodUUID;
|
|
25
|
+
ts: z.ZodNumber;
|
|
26
|
+
path: z.ZodString;
|
|
27
|
+
referrerHost: z.ZodNullable<z.ZodString>;
|
|
28
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
29
|
+
name: z.ZodLiteral<"view_item">;
|
|
30
|
+
listingId: z.ZodUUID;
|
|
31
|
+
eventId: z.ZodUUID;
|
|
32
|
+
ts: z.ZodNumber;
|
|
33
|
+
path: z.ZodString;
|
|
34
|
+
referrerHost: z.ZodNullable<z.ZodString>;
|
|
35
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
36
|
+
name: z.ZodLiteral<"view_quote">;
|
|
37
|
+
listingId: z.ZodUUID;
|
|
38
|
+
valueMinor: z.ZodNumber;
|
|
39
|
+
currency: z.ZodString;
|
|
40
|
+
nights: z.ZodNumber;
|
|
41
|
+
eventId: z.ZodUUID;
|
|
42
|
+
ts: z.ZodNumber;
|
|
43
|
+
path: z.ZodString;
|
|
44
|
+
referrerHost: z.ZodNullable<z.ZodString>;
|
|
45
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
46
|
+
name: z.ZodLiteral<"begin_checkout">;
|
|
47
|
+
checkoutSessionId: z.ZodUUID;
|
|
48
|
+
eventId: z.ZodUUID;
|
|
49
|
+
ts: z.ZodNumber;
|
|
50
|
+
path: z.ZodString;
|
|
51
|
+
referrerHost: z.ZodNullable<z.ZodString>;
|
|
52
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
53
|
+
name: z.ZodLiteral<"add_payment_info">;
|
|
54
|
+
checkoutSessionId: z.ZodUUID;
|
|
55
|
+
eventId: z.ZodUUID;
|
|
56
|
+
ts: z.ZodNumber;
|
|
57
|
+
path: z.ZodString;
|
|
58
|
+
referrerHost: z.ZodNullable<z.ZodString>;
|
|
59
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
60
|
+
name: z.ZodLiteral<"generate_lead">;
|
|
61
|
+
formId: z.ZodOptional<z.ZodString>;
|
|
62
|
+
eventId: z.ZodUUID;
|
|
63
|
+
ts: z.ZodNumber;
|
|
64
|
+
path: z.ZodString;
|
|
65
|
+
referrerHost: z.ZodNullable<z.ZodString>;
|
|
66
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
67
|
+
name: z.ZodLiteral<"sign_up">;
|
|
68
|
+
method: z.ZodLiteral<"newsletter">;
|
|
69
|
+
eventId: z.ZodUUID;
|
|
70
|
+
ts: z.ZodNumber;
|
|
71
|
+
path: z.ZodString;
|
|
72
|
+
referrerHost: z.ZodNullable<z.ZodString>;
|
|
73
|
+
}, z.core.$strip>], "name">;
|
|
74
|
+
type StorefrontClientEvent = z.infer<typeof storefrontClientEventSchema>;
|
|
75
|
+
|
|
76
|
+
type DistributiveOmit<T, K extends PropertyKey> = T extends unknown ? Omit<T, K> : never;
|
|
77
|
+
type TrackEvent = DistributiveOmit<StorefrontClientEvent, 'eventId' | 'ts' | 'path' | 'referrerHost'>;
|
|
78
|
+
type AnalyticsReporter = (err: unknown) => void;
|
|
79
|
+
interface AnalyticsOptions {
|
|
80
|
+
publishableKey: string;
|
|
81
|
+
report?: AnalyticsReporter;
|
|
82
|
+
}
|
|
83
|
+
interface StorefrontAnalytics {
|
|
84
|
+
track(event: TrackEvent): void;
|
|
85
|
+
pageView(): void;
|
|
86
|
+
flush(opts?: {
|
|
87
|
+
beacon?: boolean;
|
|
88
|
+
}): void;
|
|
89
|
+
dispose(): void;
|
|
90
|
+
}
|
|
91
|
+
declare function trackPurchasePixel(booking: Pick<BookingResult, 'bookingRequestId'> & {
|
|
92
|
+
totalMinor?: number | null;
|
|
93
|
+
currency?: string | null;
|
|
94
|
+
}): void;
|
|
95
|
+
declare function createAnalytics(opts: AnalyticsOptions): StorefrontAnalytics;
|
|
96
|
+
declare function analyticsFor(publishableKey: string): StorefrontAnalytics;
|
|
97
|
+
|
|
98
|
+
declare const STOREFRONT_ERROR_CODES: readonly ["wrong_region", "origin_not_allowed", "origin_required", "site_archived", "not_bookable", "quote_invalid", "quote_expired", "price_changed", "currency_unsupported", "payment_declined", "session_expired", "rate_limited", "contact_not_configured", "payment_account_unavailable", "idempotency_key_required", "idempotency_key_reused", "payment_mode_unsupported", "payment_not_authorized", "payment_method_required", "site_not_published", "preview_read_only", "bookings_closed", "extras_invalid", "UNAUTHORIZED", "VALIDATION_ERROR", "NOT_FOUND", "site_not_found", "upstream_timeout", "timeout", "network", "invalid_response", "internal_error", "checkout_unavailable"];
|
|
99
|
+
type StorefrontErrorCode = (typeof STOREFRONT_ERROR_CODES)[number];
|
|
100
|
+
type StorefrontRegion = 'us' | 'eu' | 'apac';
|
|
101
|
+
interface StorefrontErrorInit {
|
|
102
|
+
status: number;
|
|
103
|
+
code: string;
|
|
104
|
+
message: string;
|
|
105
|
+
type?: string;
|
|
106
|
+
requestId?: string | null;
|
|
107
|
+
details?: Record<string, unknown>;
|
|
108
|
+
cause?: unknown;
|
|
109
|
+
}
|
|
110
|
+
declare class StorefrontError extends Error {
|
|
111
|
+
name: string;
|
|
112
|
+
readonly status: number;
|
|
113
|
+
readonly type: string;
|
|
114
|
+
readonly code: StorefrontErrorCode | (string & {});
|
|
115
|
+
readonly requestId: string | null;
|
|
116
|
+
readonly details: Record<string, unknown>;
|
|
117
|
+
constructor(init: StorefrontErrorInit);
|
|
118
|
+
}
|
|
119
|
+
declare class PriceChangedError extends StorefrontError {
|
|
120
|
+
name: string;
|
|
121
|
+
readonly quote: StorefrontQuote | null;
|
|
122
|
+
readonly requiresNewSession: boolean;
|
|
123
|
+
constructor(init: StorefrontErrorInit);
|
|
124
|
+
}
|
|
125
|
+
declare class WrongRegionError extends StorefrontError {
|
|
126
|
+
name: string;
|
|
127
|
+
readonly region: StorefrontRegion | null;
|
|
128
|
+
readonly baseUrl: string | null;
|
|
129
|
+
constructor(init: StorefrontErrorInit);
|
|
130
|
+
}
|
|
131
|
+
declare class RateLimitedError extends StorefrontError {
|
|
132
|
+
name: string;
|
|
133
|
+
readonly retryAfterSec: number | null;
|
|
134
|
+
readonly scope: 'key' | 'ip' | 'pms' | null;
|
|
135
|
+
constructor(init: StorefrontErrorInit & {
|
|
136
|
+
retryAfterSec: number | null;
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
declare class StorefrontTimeoutError extends StorefrontError {
|
|
140
|
+
name: string;
|
|
141
|
+
constructor(timeoutMs: number, requestId?: string | null);
|
|
142
|
+
}
|
|
143
|
+
declare class StorefrontNetworkError extends StorefrontError {
|
|
144
|
+
name: string;
|
|
145
|
+
constructor(cause: unknown);
|
|
146
|
+
}
|
|
147
|
+
declare class StorefrontConfigError extends Error {
|
|
148
|
+
name: string;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export { type AnalyticsOptions as A, PriceChangedError as P, RateLimitedError as R, type StorefrontRegion as S, type TrackEvent as T, WrongRegionError as W, type AnalyticsReporter as a, STOREFRONT_ERROR_CODES as b, type StorefrontAnalytics as c, StorefrontConfigError as d, StorefrontError as e, type StorefrontErrorCode as f, type StorefrontErrorInit as g, StorefrontNetworkError as h, StorefrontTimeoutError as i, analyticsFor as j, createAnalytics as k, trackPurchasePixel as t };
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { B as BookingResult, v as StorefrontQuote } from './client-goQnVoLP.js';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
declare const storefrontClientEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
5
|
+
name: z.ZodLiteral<"page_view">;
|
|
6
|
+
eventId: z.ZodUUID;
|
|
7
|
+
ts: z.ZodNumber;
|
|
8
|
+
path: z.ZodString;
|
|
9
|
+
referrerHost: z.ZodNullable<z.ZodString>;
|
|
10
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
11
|
+
name: z.ZodLiteral<"view_search_results">;
|
|
12
|
+
checkIn: z.ZodOptional<z.ZodISODate>;
|
|
13
|
+
checkOut: z.ZodOptional<z.ZodISODate>;
|
|
14
|
+
guests: z.ZodOptional<z.ZodNumber>;
|
|
15
|
+
locationId: z.ZodOptional<z.ZodUUID>;
|
|
16
|
+
eventId: z.ZodUUID;
|
|
17
|
+
ts: z.ZodNumber;
|
|
18
|
+
path: z.ZodString;
|
|
19
|
+
referrerHost: z.ZodNullable<z.ZodString>;
|
|
20
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
21
|
+
name: z.ZodLiteral<"view_item_list">;
|
|
22
|
+
listName: z.ZodString;
|
|
23
|
+
itemCount: z.ZodNumber;
|
|
24
|
+
eventId: z.ZodUUID;
|
|
25
|
+
ts: z.ZodNumber;
|
|
26
|
+
path: z.ZodString;
|
|
27
|
+
referrerHost: z.ZodNullable<z.ZodString>;
|
|
28
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
29
|
+
name: z.ZodLiteral<"view_item">;
|
|
30
|
+
listingId: z.ZodUUID;
|
|
31
|
+
eventId: z.ZodUUID;
|
|
32
|
+
ts: z.ZodNumber;
|
|
33
|
+
path: z.ZodString;
|
|
34
|
+
referrerHost: z.ZodNullable<z.ZodString>;
|
|
35
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
36
|
+
name: z.ZodLiteral<"view_quote">;
|
|
37
|
+
listingId: z.ZodUUID;
|
|
38
|
+
valueMinor: z.ZodNumber;
|
|
39
|
+
currency: z.ZodString;
|
|
40
|
+
nights: z.ZodNumber;
|
|
41
|
+
eventId: z.ZodUUID;
|
|
42
|
+
ts: z.ZodNumber;
|
|
43
|
+
path: z.ZodString;
|
|
44
|
+
referrerHost: z.ZodNullable<z.ZodString>;
|
|
45
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
46
|
+
name: z.ZodLiteral<"begin_checkout">;
|
|
47
|
+
checkoutSessionId: z.ZodUUID;
|
|
48
|
+
eventId: z.ZodUUID;
|
|
49
|
+
ts: z.ZodNumber;
|
|
50
|
+
path: z.ZodString;
|
|
51
|
+
referrerHost: z.ZodNullable<z.ZodString>;
|
|
52
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
53
|
+
name: z.ZodLiteral<"add_payment_info">;
|
|
54
|
+
checkoutSessionId: z.ZodUUID;
|
|
55
|
+
eventId: z.ZodUUID;
|
|
56
|
+
ts: z.ZodNumber;
|
|
57
|
+
path: z.ZodString;
|
|
58
|
+
referrerHost: z.ZodNullable<z.ZodString>;
|
|
59
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
60
|
+
name: z.ZodLiteral<"generate_lead">;
|
|
61
|
+
formId: z.ZodOptional<z.ZodString>;
|
|
62
|
+
eventId: z.ZodUUID;
|
|
63
|
+
ts: z.ZodNumber;
|
|
64
|
+
path: z.ZodString;
|
|
65
|
+
referrerHost: z.ZodNullable<z.ZodString>;
|
|
66
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
67
|
+
name: z.ZodLiteral<"sign_up">;
|
|
68
|
+
method: z.ZodLiteral<"newsletter">;
|
|
69
|
+
eventId: z.ZodUUID;
|
|
70
|
+
ts: z.ZodNumber;
|
|
71
|
+
path: z.ZodString;
|
|
72
|
+
referrerHost: z.ZodNullable<z.ZodString>;
|
|
73
|
+
}, z.core.$strip>], "name">;
|
|
74
|
+
type StorefrontClientEvent = z.infer<typeof storefrontClientEventSchema>;
|
|
75
|
+
|
|
76
|
+
type DistributiveOmit<T, K extends PropertyKey> = T extends unknown ? Omit<T, K> : never;
|
|
77
|
+
type TrackEvent = DistributiveOmit<StorefrontClientEvent, 'eventId' | 'ts' | 'path' | 'referrerHost'>;
|
|
78
|
+
type AnalyticsReporter = (err: unknown) => void;
|
|
79
|
+
interface AnalyticsOptions {
|
|
80
|
+
publishableKey: string;
|
|
81
|
+
report?: AnalyticsReporter;
|
|
82
|
+
}
|
|
83
|
+
interface StorefrontAnalytics {
|
|
84
|
+
track(event: TrackEvent): void;
|
|
85
|
+
pageView(): void;
|
|
86
|
+
flush(opts?: {
|
|
87
|
+
beacon?: boolean;
|
|
88
|
+
}): void;
|
|
89
|
+
dispose(): void;
|
|
90
|
+
}
|
|
91
|
+
declare function trackPurchasePixel(booking: Pick<BookingResult, 'bookingRequestId'> & {
|
|
92
|
+
totalMinor?: number | null;
|
|
93
|
+
currency?: string | null;
|
|
94
|
+
}): void;
|
|
95
|
+
declare function createAnalytics(opts: AnalyticsOptions): StorefrontAnalytics;
|
|
96
|
+
declare function analyticsFor(publishableKey: string): StorefrontAnalytics;
|
|
97
|
+
|
|
98
|
+
declare const STOREFRONT_ERROR_CODES: readonly ["wrong_region", "origin_not_allowed", "origin_required", "site_archived", "not_bookable", "quote_invalid", "quote_expired", "price_changed", "currency_unsupported", "payment_declined", "session_expired", "rate_limited", "contact_not_configured", "payment_account_unavailable", "idempotency_key_required", "idempotency_key_reused", "payment_mode_unsupported", "payment_not_authorized", "payment_method_required", "site_not_published", "preview_read_only", "bookings_closed", "extras_invalid", "UNAUTHORIZED", "VALIDATION_ERROR", "NOT_FOUND", "site_not_found", "upstream_timeout", "timeout", "network", "invalid_response", "internal_error", "checkout_unavailable"];
|
|
99
|
+
type StorefrontErrorCode = (typeof STOREFRONT_ERROR_CODES)[number];
|
|
100
|
+
type StorefrontRegion = 'us' | 'eu' | 'apac';
|
|
101
|
+
interface StorefrontErrorInit {
|
|
102
|
+
status: number;
|
|
103
|
+
code: string;
|
|
104
|
+
message: string;
|
|
105
|
+
type?: string;
|
|
106
|
+
requestId?: string | null;
|
|
107
|
+
details?: Record<string, unknown>;
|
|
108
|
+
cause?: unknown;
|
|
109
|
+
}
|
|
110
|
+
declare class StorefrontError extends Error {
|
|
111
|
+
name: string;
|
|
112
|
+
readonly status: number;
|
|
113
|
+
readonly type: string;
|
|
114
|
+
readonly code: StorefrontErrorCode | (string & {});
|
|
115
|
+
readonly requestId: string | null;
|
|
116
|
+
readonly details: Record<string, unknown>;
|
|
117
|
+
constructor(init: StorefrontErrorInit);
|
|
118
|
+
}
|
|
119
|
+
declare class PriceChangedError extends StorefrontError {
|
|
120
|
+
name: string;
|
|
121
|
+
readonly quote: StorefrontQuote | null;
|
|
122
|
+
readonly requiresNewSession: boolean;
|
|
123
|
+
constructor(init: StorefrontErrorInit);
|
|
124
|
+
}
|
|
125
|
+
declare class WrongRegionError extends StorefrontError {
|
|
126
|
+
name: string;
|
|
127
|
+
readonly region: StorefrontRegion | null;
|
|
128
|
+
readonly baseUrl: string | null;
|
|
129
|
+
constructor(init: StorefrontErrorInit);
|
|
130
|
+
}
|
|
131
|
+
declare class RateLimitedError extends StorefrontError {
|
|
132
|
+
name: string;
|
|
133
|
+
readonly retryAfterSec: number | null;
|
|
134
|
+
readonly scope: 'key' | 'ip' | 'pms' | null;
|
|
135
|
+
constructor(init: StorefrontErrorInit & {
|
|
136
|
+
retryAfterSec: number | null;
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
declare class StorefrontTimeoutError extends StorefrontError {
|
|
140
|
+
name: string;
|
|
141
|
+
constructor(timeoutMs: number, requestId?: string | null);
|
|
142
|
+
}
|
|
143
|
+
declare class StorefrontNetworkError extends StorefrontError {
|
|
144
|
+
name: string;
|
|
145
|
+
constructor(cause: unknown);
|
|
146
|
+
}
|
|
147
|
+
declare class StorefrontConfigError extends Error {
|
|
148
|
+
name: string;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export { type AnalyticsOptions as A, PriceChangedError as P, RateLimitedError as R, type StorefrontRegion as S, type TrackEvent as T, WrongRegionError as W, type AnalyticsReporter as a, STOREFRONT_ERROR_CODES as b, type StorefrontAnalytics as c, StorefrontConfigError as d, StorefrontError as e, type StorefrontErrorCode as f, type StorefrontErrorInit as g, StorefrontNetworkError as h, StorefrontTimeoutError as i, analyticsFor as j, createAnalytics as k, trackPurchasePixel as t };
|
package/dist/index.cjs
CHANGED
|
@@ -1,77 +1,78 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
|
|
3
|
+
var chunk2U6L33AT_cjs = require('./chunk-2U6L33AT.cjs');
|
|
4
|
+
require('./chunk-ZLAOY6IF.cjs');
|
|
5
|
+
require('./chunk-4GZBXKBU.cjs');
|
|
6
|
+
var chunkUSOISC2R_cjs = require('./chunk-USOISC2R.cjs');
|
|
5
7
|
require('./chunk-LVFRVNT3.cjs');
|
|
6
|
-
require('./chunk-AIQUVZEI.cjs');
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
Object.defineProperty(exports, "SDK_VERSION", {
|
|
11
12
|
enumerable: true,
|
|
12
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunk2U6L33AT_cjs.SDK_VERSION; }
|
|
13
14
|
});
|
|
14
15
|
Object.defineProperty(exports, "STOREFRONT_API_PATH", {
|
|
15
16
|
enumerable: true,
|
|
16
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunk2U6L33AT_cjs.STOREFRONT_API_PATH; }
|
|
17
18
|
});
|
|
18
19
|
Object.defineProperty(exports, "STOREFRONT_API_VERSION", {
|
|
19
20
|
enumerable: true,
|
|
20
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunk2U6L33AT_cjs.STOREFRONT_API_VERSION; }
|
|
21
22
|
});
|
|
22
23
|
Object.defineProperty(exports, "analyticsFor", {
|
|
23
24
|
enumerable: true,
|
|
24
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunk2U6L33AT_cjs.analyticsFor; }
|
|
25
26
|
});
|
|
26
27
|
Object.defineProperty(exports, "createAnalytics", {
|
|
27
28
|
enumerable: true,
|
|
28
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunk2U6L33AT_cjs.createAnalytics; }
|
|
29
30
|
});
|
|
30
31
|
Object.defineProperty(exports, "createStorefrontClient", {
|
|
31
32
|
enumerable: true,
|
|
32
|
-
get: function () { return
|
|
33
|
+
get: function () { return chunk2U6L33AT_cjs.createStorefrontClient; }
|
|
33
34
|
});
|
|
34
35
|
Object.defineProperty(exports, "getAttribution", {
|
|
35
36
|
enumerable: true,
|
|
36
|
-
get: function () { return
|
|
37
|
+
get: function () { return chunk2U6L33AT_cjs.getAttribution; }
|
|
37
38
|
});
|
|
38
39
|
Object.defineProperty(exports, "parsePublishableKey", {
|
|
39
40
|
enumerable: true,
|
|
40
|
-
get: function () { return
|
|
41
|
+
get: function () { return chunk2U6L33AT_cjs.parsePublishableKey; }
|
|
41
42
|
});
|
|
42
43
|
Object.defineProperty(exports, "trackPurchasePixel", {
|
|
43
44
|
enumerable: true,
|
|
44
|
-
get: function () { return
|
|
45
|
+
get: function () { return chunk2U6L33AT_cjs.trackPurchasePixel; }
|
|
45
46
|
});
|
|
46
47
|
Object.defineProperty(exports, "PriceChangedError", {
|
|
47
48
|
enumerable: true,
|
|
48
|
-
get: function () { return
|
|
49
|
+
get: function () { return chunkUSOISC2R_cjs.PriceChangedError; }
|
|
49
50
|
});
|
|
50
51
|
Object.defineProperty(exports, "RateLimitedError", {
|
|
51
52
|
enumerable: true,
|
|
52
|
-
get: function () { return
|
|
53
|
+
get: function () { return chunkUSOISC2R_cjs.RateLimitedError; }
|
|
53
54
|
});
|
|
54
55
|
Object.defineProperty(exports, "STOREFRONT_ERROR_CODES", {
|
|
55
56
|
enumerable: true,
|
|
56
|
-
get: function () { return
|
|
57
|
+
get: function () { return chunkUSOISC2R_cjs.STOREFRONT_ERROR_CODES; }
|
|
57
58
|
});
|
|
58
59
|
Object.defineProperty(exports, "StorefrontConfigError", {
|
|
59
60
|
enumerable: true,
|
|
60
|
-
get: function () { return
|
|
61
|
+
get: function () { return chunkUSOISC2R_cjs.StorefrontConfigError; }
|
|
61
62
|
});
|
|
62
63
|
Object.defineProperty(exports, "StorefrontError", {
|
|
63
64
|
enumerable: true,
|
|
64
|
-
get: function () { return
|
|
65
|
+
get: function () { return chunkUSOISC2R_cjs.StorefrontError; }
|
|
65
66
|
});
|
|
66
67
|
Object.defineProperty(exports, "StorefrontNetworkError", {
|
|
67
68
|
enumerable: true,
|
|
68
|
-
get: function () { return
|
|
69
|
+
get: function () { return chunkUSOISC2R_cjs.StorefrontNetworkError; }
|
|
69
70
|
});
|
|
70
71
|
Object.defineProperty(exports, "StorefrontTimeoutError", {
|
|
71
72
|
enumerable: true,
|
|
72
|
-
get: function () { return
|
|
73
|
+
get: function () { return chunkUSOISC2R_cjs.StorefrontTimeoutError; }
|
|
73
74
|
});
|
|
74
75
|
Object.defineProperty(exports, "WrongRegionError", {
|
|
75
76
|
enumerable: true,
|
|
76
|
-
get: function () { return
|
|
77
|
+
get: function () { return chunkUSOISC2R_cjs.WrongRegionError; }
|
|
77
78
|
});
|
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { S as StorefrontRegion } from './errors-
|
|
2
|
-
export { A as AnalyticsOptions, a as AnalyticsReporter,
|
|
1
|
+
import { S as StorefrontRegion } from './errors-B2eCo5Cz.cjs';
|
|
2
|
+
export { A as AnalyticsOptions, a as AnalyticsReporter, P as PriceChangedError, R as RateLimitedError, b as STOREFRONT_ERROR_CODES, c as StorefrontAnalytics, d as StorefrontConfigError, e as StorefrontError, f as StorefrontErrorCode, g as StorefrontErrorInit, h as StorefrontNetworkError, i as StorefrontTimeoutError, T as TrackEvent, W as WrongRegionError, j as analyticsFor, k as createAnalytics, t as trackPurchasePixel } from './errors-B2eCo5Cz.cjs';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
-
export {
|
|
4
|
+
export { B as BookingResult, C as CheckoutMountDescriptor, a as CheckoutSession, b as ConfirmCheckoutSessionInput, c as ConfirmCheckoutSessionRequest, d as ContentListQuery, e as CreateCheckoutSessionInput, f as CreateCheckoutSessionOptions, g as CreatedCheckoutSession, P as Page, R as RequestOptions, S as STOREFRONT_API_PATH, h as StorefrontBooking, i as StorefrontBuilding, j as StorefrontClient, k as StorefrontClientOptions, l as StorefrontContactInput, m as StorefrontContentItem, n as StorefrontContentModel, o as StorefrontContentRef, p as StorefrontGuestInput, q as StorefrontImage, r as StorefrontListing, s as StorefrontListingSummary, t as StorefrontListingsQuery, u as StorefrontLocation, v as StorefrontQuote, w as StorefrontQuoteInput, x as StorefrontRatePlanQuote, y as StorefrontReview, z as StorefrontReviewsQuery, A as StorefrontSite, D as createStorefrontClient } from './client-DER7y1WE.cjs';
|
|
5
|
+
export { S as StorefrontAvailability, a as StorefrontCalendar, b as StorefrontCalendarDay, c as StorefrontCalendarQuery, d as StorefrontStay, e as StorefrontUnavailableReason } from './availability-CnzmxuV3.cjs';
|
|
5
6
|
|
|
6
7
|
declare const attributionTouchSchema: z.ZodObject<{
|
|
7
8
|
ts: z.ZodISODateTime;
|
|
@@ -91,6 +92,13 @@ declare const storefrontAttributionInputSchema: z.ZodObject<{
|
|
|
91
92
|
}>;
|
|
92
93
|
decidedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
93
94
|
}, z.core.$strip>;
|
|
95
|
+
experiment: z.ZodOptional<z.ZodObject<{
|
|
96
|
+
id: z.ZodUUID;
|
|
97
|
+
variant: z.ZodEnum<{
|
|
98
|
+
a: "a";
|
|
99
|
+
b: "b";
|
|
100
|
+
}>;
|
|
101
|
+
}, z.core.$strip>>;
|
|
94
102
|
}, z.core.$strip>;
|
|
95
103
|
type StorefrontAttributionInput = z.infer<typeof storefrontAttributionInputSchema>;
|
|
96
104
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { S as StorefrontRegion } from './errors-
|
|
2
|
-
export { A as AnalyticsOptions, a as AnalyticsReporter,
|
|
1
|
+
import { S as StorefrontRegion } from './errors-D-dULpp1.js';
|
|
2
|
+
export { A as AnalyticsOptions, a as AnalyticsReporter, P as PriceChangedError, R as RateLimitedError, b as STOREFRONT_ERROR_CODES, c as StorefrontAnalytics, d as StorefrontConfigError, e as StorefrontError, f as StorefrontErrorCode, g as StorefrontErrorInit, h as StorefrontNetworkError, i as StorefrontTimeoutError, T as TrackEvent, W as WrongRegionError, j as analyticsFor, k as createAnalytics, t as trackPurchasePixel } from './errors-D-dULpp1.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
-
export {
|
|
4
|
+
export { B as BookingResult, C as CheckoutMountDescriptor, a as CheckoutSession, b as ConfirmCheckoutSessionInput, c as ConfirmCheckoutSessionRequest, d as ContentListQuery, e as CreateCheckoutSessionInput, f as CreateCheckoutSessionOptions, g as CreatedCheckoutSession, P as Page, R as RequestOptions, S as STOREFRONT_API_PATH, h as StorefrontBooking, i as StorefrontBuilding, j as StorefrontClient, k as StorefrontClientOptions, l as StorefrontContactInput, m as StorefrontContentItem, n as StorefrontContentModel, o as StorefrontContentRef, p as StorefrontGuestInput, q as StorefrontImage, r as StorefrontListing, s as StorefrontListingSummary, t as StorefrontListingsQuery, u as StorefrontLocation, v as StorefrontQuote, w as StorefrontQuoteInput, x as StorefrontRatePlanQuote, y as StorefrontReview, z as StorefrontReviewsQuery, A as StorefrontSite, D as createStorefrontClient } from './client-goQnVoLP.js';
|
|
5
|
+
export { S as StorefrontAvailability, a as StorefrontCalendar, b as StorefrontCalendarDay, c as StorefrontCalendarQuery, d as StorefrontStay, e as StorefrontUnavailableReason } from './availability-CnzmxuV3.js';
|
|
5
6
|
|
|
6
7
|
declare const attributionTouchSchema: z.ZodObject<{
|
|
7
8
|
ts: z.ZodISODateTime;
|
|
@@ -91,6 +92,13 @@ declare const storefrontAttributionInputSchema: z.ZodObject<{
|
|
|
91
92
|
}>;
|
|
92
93
|
decidedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
93
94
|
}, z.core.$strip>;
|
|
95
|
+
experiment: z.ZodOptional<z.ZodObject<{
|
|
96
|
+
id: z.ZodUUID;
|
|
97
|
+
variant: z.ZodEnum<{
|
|
98
|
+
a: "a";
|
|
99
|
+
b: "b";
|
|
100
|
+
}>;
|
|
101
|
+
}, z.core.$strip>>;
|
|
94
102
|
}, z.core.$strip>;
|
|
95
103
|
type StorefrontAttributionInput = z.infer<typeof storefrontAttributionInputSchema>;
|
|
96
104
|
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export { SDK_VERSION, STOREFRONT_API_PATH, STOREFRONT_API_VERSION, analyticsFor, createAnalytics, createStorefrontClient, getAttribution, parsePublishableKey, trackPurchasePixel } from './chunk-
|
|
2
|
-
|
|
1
|
+
export { SDK_VERSION, STOREFRONT_API_PATH, STOREFRONT_API_VERSION, analyticsFor, createAnalytics, createStorefrontClient, getAttribution, parsePublishableKey, trackPurchasePixel } from './chunk-HLGSWF4I.js';
|
|
2
|
+
import './chunk-PYVUDQSQ.js';
|
|
3
|
+
import './chunk-GJSCEBSU.js';
|
|
4
|
+
export { PriceChangedError, RateLimitedError, STOREFRONT_ERROR_CODES, StorefrontConfigError, StorefrontError, StorefrontNetworkError, StorefrontTimeoutError, WrongRegionError } from './chunk-ZI2PG7LS.js';
|
|
3
5
|
import './chunk-6NFURJXI.js';
|
|
4
|
-
import './chunk-SK5TD73J.js';
|
package/dist/react.cjs
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
|
|
3
|
+
var chunk2U6L33AT_cjs = require('./chunk-2U6L33AT.cjs');
|
|
4
|
+
var chunkVV2UNVQ2_cjs = require('./chunk-VV2UNVQ2.cjs');
|
|
5
|
+
require('./chunk-ZLAOY6IF.cjs');
|
|
6
|
+
require('./chunk-4GZBXKBU.cjs');
|
|
7
|
+
var chunkUSOISC2R_cjs = require('./chunk-USOISC2R.cjs');
|
|
6
8
|
require('./chunk-LVFRVNT3.cjs');
|
|
7
|
-
require('./chunk-AIQUVZEI.cjs');
|
|
8
9
|
var react = require('react');
|
|
9
10
|
var jsxRuntime = require('react/jsx-runtime');
|
|
10
11
|
|
|
11
|
-
var SuiteOpContext=react.createContext(null);var ASTRO_PAGE_LOAD="astro:page-load";function SuiteOpProvider({client,children}){const value=react.useMemo(()=>({client,requests:new Map,analytics:
|
|
12
|
+
var SuiteOpContext=react.createContext(null);var ASTRO_PAGE_LOAD="astro:page-load";function SuiteOpProvider({client,children}){const value=react.useMemo(()=>({client,requests:new Map,analytics:chunk2U6L33AT_cjs.analyticsFor(client.publishableKey)}),[client]);const{analytics}=value;react.useEffect(()=>{const onPageLoad=()=>analytics.pageView();onPageLoad();document.addEventListener(ASTRO_PAGE_LOAD,onPageLoad);return ()=>document.removeEventListener(ASTRO_PAGE_LOAD,onPageLoad)},[analytics]);return jsxRuntime.jsx(SuiteOpContext.Provider,{value,children})}function useTrack(){const{analytics}=useSuiteOpContext("useTrack");return analytics.track}function useSuiteOpContext(hookName){const value=react.useContext(SuiteOpContext);if(!value)throw new chunkUSOISC2R_cjs.StorefrontConfigError(`${hookName} must be used inside <SuiteOpProvider>`);return value}function useStorefrontClient(){return useSuiteOpContext("useStorefrontClient").client}var SHARED_TTL_MS=3e4;function toStorefrontError(err){if(err instanceof chunkUSOISC2R_cjs.StorefrontError)return err;return new chunkUSOISC2R_cjs.StorefrontError({status:0,code:"internal_error",message:err instanceof Error?err.message:"Unexpected error",cause:err})}function acquire(requests,key,run){const now=Date.now();for(const[k,entry2]of requests){if(entry2.refs===0&&entry2.settledAt!==null&&now-entry2.settledAt>=SHARED_TTL_MS){requests.delete(k);}}const cached=requests.get(key);if(cached&&(cached.settledAt===null||now-cached.settledAt<SHARED_TTL_MS)){cached.refs+=1;return cached}const controller=new AbortController;const entry={promise:Promise.resolve(),controller,refs:1,settledAt:null};entry.promise=run({signal:controller.signal}).then(data=>{entry.settledAt=Date.now();return data},err=>{if(requests.get(key)===entry)requests.delete(key);throw err});requests.set(key,entry);return entry}function release(requests,key,entry){entry.refs-=1;queueMicrotask(()=>{if(entry.refs>0||entry.settledAt!==null)return;entry.controller.abort();if(requests.get(key)===entry)requests.delete(key);});}function useSharedRead(hookName,key,run){const{requests}=useSuiteOpContext(hookName);const[current,setCurrent]=react.useState(null);const runRef=react.useRef(run);runRef.current=run;react.useEffect(()=>{if(key===null)return;let active=true;const entry=acquire(requests,key,opts=>runRef.current(opts));entry.promise.then(data=>{if(active)setCurrent({key,state:{status:"success",data}});},err=>{if(active&&!entry.controller.signal.aborted){setCurrent({key,state:{status:"error",error:toStorefrontError(err)}});}});return ()=>{active=false;release(requests,key,entry);}},[requests,key]);if(key===null)return {status:"idle"};return current?.key===key?current.state:{status:"loading"}}function useListing(id){const{client}=useSuiteOpContext("useListing");return useSharedRead("useListing",id===null?null:`listing:${id}`,opts=>client.listings.get(id,opts))}function useAvailability(listingId,stay){const{client}=useSuiteOpContext("useAvailability");const key=listingId===null||stay===null?null:`availability:${JSON.stringify([listingId,stay.checkIn,stay.checkOut,stay.guests])}`;return useSharedRead("useAvailability",key,opts=>client.availability.get(listingId,stay,opts))}function useMutationState(){const[state,setState]=react.useState({status:"idle"});const seq=react.useRef(0);const track=react.useCallback(async(work,onError)=>{const mine=++seq.current;setState({status:"loading"});try{const data=await work();if(mine===seq.current)setState({status:"success",data});return data}catch(err){if(mine===seq.current){onError?.(err);setState({status:"error",error:toStorefrontError(err)});}throw err}},[]);return {state,track}}function useQuote(){const{client}=useSuiteOpContext("useQuote");const{state,track}=useMutationState();const quote=react.useCallback(input=>track(()=>client.quotes.create(input)),[client,track]);return {quote,state}}function useCheckoutSession(){const{client}=useSuiteOpContext("useCheckoutSession");const{state,track}=useMutationState();const[priceChanged,setPriceChanged]=react.useState(null);const create=react.useCallback((input,opts)=>{setPriceChanged(null);return track(()=>client.checkoutSessions.create(input,opts),err=>{if(err instanceof chunkUSOISC2R_cjs.PriceChangedError)setPriceChanged(err.quote);})},[client,track]);return {create,session:state,priceChanged}}var EVENTS={"suiteop-checkout:ready":h=>h.onReady?.(),"suiteop-checkout:confirmed":(h,detail)=>h.onComplete(detail),"suiteop-checkout:pending":(h,detail)=>h.onPending?.(detail),"suiteop-checkout:error":(h,detail)=>{const error=detail;if(error.code==="price_changed"&&h.onPriceChanged)h.onPriceChanged();else h.onError?.(error);}};function SuiteOpCheckout(props){const client=useStorefrontClient();const ref=react.useRef(null);const handlers=react.useRef(props);handlers.current=props;react.useEffect(()=>{let active=true;chunkVV2UNVQ2_cjs.loadCheckout({origin:props.checkoutOrigin}).catch(err=>{if(!active)return;const code=err instanceof chunkUSOISC2R_cjs.StorefrontError?err.code:"checkout_unavailable";handlers.current.onError?.({code,requiresNewSession:false});});return ()=>{active=false;}},[props.checkoutOrigin]);react.useEffect(()=>{const element=ref.current;if(!element)return;const listeners=Object.entries(EVENTS).map(([type,handle])=>{const listener=event=>handle(handlers.current,event.detail);element.addEventListener(type,listener);return [type,listener]});return ()=>{for(const[type,listener]of listeners)element.removeEventListener(type,listener);}},[]);const apiBase=client.baseUrl.endsWith(chunk2U6L33AT_cjs.STOREFRONT_API_PATH)?client.baseUrl.slice(0,-chunk2U6L33AT_cjs.STOREFRONT_API_PATH.length):client.baseUrl;return react.createElement("suiteop-checkout",{ref,class:props.className,"session-id":props.checkoutSessionId,"quote-ref":props.quoteRef,"idempotency-key":props.idempotencyKey,"api-base":apiBase,"publishable-key":client.publishableKey,locale:props.locale})}
|
|
12
13
|
|
|
13
14
|
exports.SuiteOpCheckout = SuiteOpCheckout;
|
|
14
15
|
exports.SuiteOpProvider = SuiteOpProvider;
|
package/dist/react.d.cts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { d as StorefrontStay, S as StorefrontAvailability } from './availability-
|
|
2
|
-
import {
|
|
1
|
+
import { d as StorefrontStay, S as StorefrontAvailability } from './availability-CnzmxuV3.cjs';
|
|
2
|
+
import { e as CreateCheckoutSessionInput, f as CreateCheckoutSessionOptions, g as CreatedCheckoutSession, v as StorefrontQuote, r as StorefrontListing, w as StorefrontQuoteInput, j as StorefrontClient, B as BookingResult } from './client-DER7y1WE.cjs';
|
|
3
|
+
import { e as StorefrontError, T as TrackEvent } from './errors-B2eCo5Cz.cjs';
|
|
3
4
|
import * as react from 'react';
|
|
4
5
|
import { ReactNode, JSX } from 'react';
|
|
5
6
|
import 'zod';
|
package/dist/react.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { d as StorefrontStay, S as StorefrontAvailability } from './availability-
|
|
2
|
-
import {
|
|
1
|
+
import { d as StorefrontStay, S as StorefrontAvailability } from './availability-CnzmxuV3.js';
|
|
2
|
+
import { e as CreateCheckoutSessionInput, f as CreateCheckoutSessionOptions, g as CreatedCheckoutSession, v as StorefrontQuote, r as StorefrontListing, w as StorefrontQuoteInput, j as StorefrontClient, B as BookingResult } from './client-goQnVoLP.js';
|
|
3
|
+
import { e as StorefrontError, T as TrackEvent } from './errors-D-dULpp1.js';
|
|
3
4
|
import * as react from 'react';
|
|
4
5
|
import { ReactNode, JSX } from 'react';
|
|
5
6
|
import 'zod';
|
package/dist/react.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { analyticsFor, STOREFRONT_API_PATH } from './chunk-
|
|
2
|
-
import { loadCheckout } from './chunk-
|
|
3
|
-
import
|
|
1
|
+
import { analyticsFor, STOREFRONT_API_PATH } from './chunk-HLGSWF4I.js';
|
|
2
|
+
import { loadCheckout } from './chunk-HMLBMNGA.js';
|
|
3
|
+
import './chunk-PYVUDQSQ.js';
|
|
4
|
+
import './chunk-GJSCEBSU.js';
|
|
5
|
+
import { StorefrontConfigError, PriceChangedError, StorefrontError } from './chunk-ZI2PG7LS.js';
|
|
4
6
|
import './chunk-6NFURJXI.js';
|
|
5
|
-
import './chunk-SK5TD73J.js';
|
|
6
7
|
import { createContext, useMemo, useEffect, useContext, useCallback, useState, useRef, createElement } from 'react';
|
|
7
8
|
import { jsx } from 'react/jsx-runtime';
|
|
8
9
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@suiteop/storefront",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Typed client, React hooks and headless components for the SuiteOp Storefront API.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://developer.suiteop.com",
|
|
@@ -73,6 +73,26 @@
|
|
|
73
73
|
"default": "./dist/astro.cjs"
|
|
74
74
|
}
|
|
75
75
|
},
|
|
76
|
+
"./astro/content-model": {
|
|
77
|
+
"import": {
|
|
78
|
+
"types": "./dist/astro-content-model.d.ts",
|
|
79
|
+
"default": "./dist/astro-content-model.js"
|
|
80
|
+
},
|
|
81
|
+
"require": {
|
|
82
|
+
"types": "./dist/astro-content-model.d.cts",
|
|
83
|
+
"default": "./dist/astro-content-model.cjs"
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"./content": {
|
|
87
|
+
"import": {
|
|
88
|
+
"types": "./dist/content.d.ts",
|
|
89
|
+
"default": "./dist/content.js"
|
|
90
|
+
},
|
|
91
|
+
"require": {
|
|
92
|
+
"types": "./dist/content.d.cts",
|
|
93
|
+
"default": "./dist/content.cjs"
|
|
94
|
+
}
|
|
95
|
+
},
|
|
76
96
|
"./package.json": "./package.json"
|
|
77
97
|
},
|
|
78
98
|
"files": [
|
|
@@ -83,12 +103,8 @@
|
|
|
83
103
|
"publishConfig": {
|
|
84
104
|
"access": "public"
|
|
85
105
|
},
|
|
86
|
-
"scripts": {
|
|
87
|
-
"prepack": "node scripts/pack-manifest.mjs strip",
|
|
88
|
-
"postpack": "node scripts/pack-manifest.mjs restore"
|
|
89
|
-
},
|
|
90
106
|
"dependencies": {
|
|
91
|
-
"zod": "^4.
|
|
107
|
+
"zod": "^4.6.5"
|
|
92
108
|
},
|
|
93
109
|
"peerDependencies": {
|
|
94
110
|
"react": ">=18 <20"
|