@juo/blocks 2.0.0-alpha.1 → 2.0.0-alpha.10
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/{ExtensionRoot-DRpD5EcC.js → ExtensionRoot-CG9dH98z.js} +1 -1
- package/dist/{bridge-Mz0CqG6E.js → bridge-Bss7Xq3D.js} +7 -0
- package/dist/core.js +1289 -54
- package/dist/{css-runtime-B7tZrBIp.js → css-runtime-CjZl0K48.js} +23 -17
- package/dist/editor/bridge.d.ts.map +1 -1
- package/dist/editor/components.d.ts +11 -0
- package/dist/editor/components.d.ts.map +1 -1
- package/dist/editor/handler.d.ts.map +1 -1
- package/dist/editor.js +37 -10
- package/dist/{gridstack-adapter-BGKGC-eO.js → gridstack-adapter-C1Q8gbsH.js} +2 -2
- package/dist/languages.d.ts +51 -0
- package/dist/languages.d.ts.map +1 -0
- package/dist/main.d.ts +1 -0
- package/dist/main.d.ts.map +1 -1
- package/dist/{morph-CT5hc5Qp.js → morph-LwttdRML.js} +1 -1
- package/dist/preact.js +1 -1
- package/dist/{project-gridstack-PxN_DIfP.js → project-gridstack-CRZ_7HoT.js} +1 -1
- package/dist/react.js +1 -1
- package/dist/services/customer/adapter.d.ts +14 -1
- package/dist/services/customer/adapter.d.ts.map +1 -1
- package/dist/services/customer/adapter.test.d.ts +2 -0
- package/dist/services/customer/adapter.test.d.ts.map +1 -0
- package/dist/services/customer/customerService.d.ts.map +1 -1
- package/dist/services/customer/customerService.test.d.ts +2 -0
- package/dist/services/customer/customerService.test.d.ts.map +1 -0
- package/dist/services/customer/index.d.ts +2 -2
- package/dist/services/customer/index.d.ts.map +1 -1
- package/dist/services/customer/types.d.ts +29 -0
- package/dist/services/customer/types.d.ts.map +1 -1
- package/dist/services/login/adapter.d.ts.map +1 -1
- package/dist/services/login/index.d.ts +1 -0
- package/dist/services/login/index.d.ts.map +1 -1
- package/dist/services/login/loginService.d.ts +1 -0
- package/dist/services/login/loginService.d.ts.map +1 -1
- package/dist/services/login/loginService.test.d.ts +2 -0
- package/dist/services/login/loginService.test.d.ts.map +1 -0
- package/dist/services/login/refreshLock.d.ts +28 -0
- package/dist/services/login/refreshLock.d.ts.map +1 -0
- package/dist/services/login/refreshLock.test.d.ts +2 -0
- package/dist/services/login/refreshLock.test.d.ts.map +1 -0
- package/dist/services/order/adapter.d.ts +11 -1
- package/dist/services/order/adapter.d.ts.map +1 -1
- package/dist/services/order/adapter.test.d.ts +2 -0
- package/dist/services/order/adapter.test.d.ts.map +1 -0
- package/dist/services/order/index.d.ts +2 -2
- package/dist/services/order/index.d.ts.map +1 -1
- package/dist/services/order/types.d.ts +56 -6
- package/dist/services/order/types.d.ts.map +1 -1
- package/dist/services/product/adapter.d.ts +42 -0
- package/dist/services/product/adapter.d.ts.map +1 -1
- package/dist/services/product/index.d.ts +1 -1
- package/dist/services/product/index.d.ts.map +1 -1
- package/dist/services/settings/types.d.ts +15 -0
- package/dist/services/settings/types.d.ts.map +1 -1
- package/dist/services/subscription/adapter.d.ts +56 -1
- package/dist/services/subscription/adapter.d.ts.map +1 -1
- package/dist/services/subscription/index.d.ts +4 -1
- package/dist/services/subscription/index.d.ts.map +1 -1
- package/dist/services/subscription/instantOrderErrors.d.ts +91 -0
- package/dist/services/subscription/instantOrderErrors.d.ts.map +1 -0
- package/dist/services/subscription/lineRemoval.d.ts +56 -0
- package/dist/services/subscription/lineRemoval.d.ts.map +1 -0
- package/dist/services/subscription/lineRemoval.test.d.ts +2 -0
- package/dist/services/subscription/lineRemoval.test.d.ts.map +1 -0
- package/dist/services/subscription/paymentInstrument.d.ts +119 -0
- package/dist/services/subscription/paymentInstrument.d.ts.map +1 -0
- package/dist/services/subscription/paymentInstrument.test.d.ts +2 -0
- package/dist/services/subscription/paymentInstrument.test.d.ts.map +1 -0
- package/dist/services/subscription/store.d.ts.map +1 -1
- package/dist/services/subscription/subscriptionService.d.ts.map +1 -1
- package/dist/services/subscription/types.d.ts +351 -11
- package/dist/services/subscription/types.d.ts.map +1 -1
- package/dist/theme-state.d.ts +10 -1
- package/dist/theme-state.d.ts.map +1 -1
- package/dist/utils/index.d.ts +7 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/vue/context.d.ts +25 -1
- package/dist/vue/context.d.ts.map +1 -1
- package/dist/vue/useTranslatedProp.test.d.ts +2 -0
- package/dist/vue/useTranslatedProp.test.d.ts.map +1 -0
- package/dist/vue.js +37 -3
- package/dist/web-components/editor/InlineText.d.ts +1 -0
- package/dist/web-components/editor/InlineText.d.ts.map +1 -1
- package/dist/web-components-editor.js +15 -7
- package/dist/web-components-runtime.js +2 -2
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../src/services/subscription/store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EACV,YAAY,EACZ,gBAAgB,EAChB,aAAa,EACd,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,MAAM,WAAW,uBAAuB;IACtC,YAAY,EAAE,MAAM,CAAC,YAAY,GAAG,IAAI,CAAC,CAAC;IAC1C,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;CAC9B;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,CAAC,OAAO,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAC3D,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,uBAAuB,CAAC;IACrD,OAAO,CACL,cAAc,EAAE,MAAM,EACtB,IAAI,EAAE,IAAI,CAA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WAAW,iBAAiB;IAChC,MAAM,CAAC,OAAO,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAC3D,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,uBAAuB,CAAC;IACrD,OAAO,CACL,cAAc,EAAE,MAAM,EACtB,IAAI,EAAE,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,GACjC,OAAO,CAAC,MAAM,CAAC,CAAC;IACnB,UAAU,CAAC,cAAc,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACpE,WAAW,CAAC,cAAc,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACnE,cAAc,CAAC,cAAc,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC5E,MAAM,CAAC,cAAc,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACjE,UAAU,CAAC,cAAc,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CACtE;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,mBAAmB,GAC3B,iBAAiB,CA0GnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscriptionService.d.ts","sourceRoot":"","sources":["../../../src/services/subscription/subscriptionService.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,KAAK,EAMV,mBAAmB,
|
|
1
|
+
{"version":3,"file":"subscriptionService.d.ts","sourceRoot":"","sources":["../../../src/services/subscription/subscriptionService.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,KAAK,EAMV,mBAAmB,EAIpB,MAAM,SAAS,CAAC;AAEjB,eAAO,MAAM,0BAA0B;;CACsB,CAAC;AAiE9D,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,mBAAmB,GAC3B,mBAAmB,CAoRrB"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { ReadonlySignal, Signal } from '@preact/signals-core';
|
|
2
|
-
import { PaginatedList, PriceWithCurrency, Result } from '../../utils';
|
|
2
|
+
import { Image, PaginatedList, PriceWithCurrency, Result } from '../../utils';
|
|
3
3
|
import { ApplyDiscountError, RemoveDiscountError } from './discountErrors';
|
|
4
|
+
import { SubscriptionPaymentInstrument } from './paymentInstrument';
|
|
5
|
+
import { InstantOrderProductsError, PlaceInstantOrderError } from './instantOrderErrors';
|
|
6
|
+
export type { SubscriptionPaymentInstrument };
|
|
4
7
|
export interface SubscriptionItem {
|
|
5
8
|
id: string;
|
|
6
9
|
productId: string;
|
|
@@ -37,12 +40,51 @@ export interface SubscriptionItem {
|
|
|
37
40
|
export interface PostableSubscriptionItem {
|
|
38
41
|
variantId: string;
|
|
39
42
|
quantity: number;
|
|
43
|
+
/**
|
|
44
|
+
* Per-line billing frequency for the added line. Omit (or pass null) to
|
|
45
|
+
* inherit the plan's frequency. Note there is no `deliveryPolicy`
|
|
46
|
+
* counterpart — no add-line endpoint accepts one; delivery follows billing.
|
|
47
|
+
*
|
|
48
|
+
* Nullable so a `SubscriptionItem` read off an existing subscription can be
|
|
49
|
+
* passed straight back in (see `SubscriptionStore.addItem`).
|
|
50
|
+
*/
|
|
51
|
+
billingPolicy?: SellingPlanInterval | null;
|
|
52
|
+
/**
|
|
53
|
+
* Removes the line after this many billing cycles. Maps to `renewalLimit` on
|
|
54
|
+
* the wire. Null/omitted means no limit.
|
|
55
|
+
*/
|
|
56
|
+
recurringCycleLimit?: number | null;
|
|
57
|
+
/**
|
|
58
|
+
* Shipping method to reconcile onto the subscription after the line is added.
|
|
59
|
+
* The add-line endpoint validates shipping and answers 409 when the current
|
|
60
|
+
* delivery method stops being available for the new line set.
|
|
61
|
+
*/
|
|
62
|
+
shippingMethodHandle?: string;
|
|
63
|
+
/**
|
|
64
|
+
* Customer-editable custom attributes for the new line. Sent to the add-line
|
|
65
|
+
* endpoint as a `{key, value}` array. Entries with an empty key or an empty
|
|
66
|
+
* value are dropped — the endpoint declares both with minLength 1 and would
|
|
67
|
+
* reject the whole add with a 400.
|
|
68
|
+
* Internal (`_`-prefixed) / reserved keys must not be included: the add-line
|
|
69
|
+
* endpoint does not validate them, so they would land as real attributes.
|
|
70
|
+
* Max 50 keys.
|
|
71
|
+
*/
|
|
72
|
+
customAttributes?: Record<string, string>;
|
|
40
73
|
}
|
|
41
74
|
export interface UpdateSubscriptionItem {
|
|
42
75
|
variantId?: string;
|
|
43
76
|
quantity?: number;
|
|
44
77
|
billingPolicy?: SellingPlanInterval;
|
|
45
78
|
shippingMethodHandle?: string;
|
|
79
|
+
/**
|
|
80
|
+
* The complete desired set of customer-visible custom attributes for the line.
|
|
81
|
+
* REPLACES the current set: keys present are set, customer-visible keys omitted
|
|
82
|
+
* are removed. Internal (`_`-prefixed) / reserved keys are preserved
|
|
83
|
+
* server-side and must not be sent (the endpoint answers 400). Send `{}` to
|
|
84
|
+
* clear. Same semantics as `updateItemAttributes`, which stays available for
|
|
85
|
+
* attribute-only edits.
|
|
86
|
+
*/
|
|
87
|
+
customAttributes?: Record<string, string>;
|
|
46
88
|
}
|
|
47
89
|
export interface UpdateBoxItem {
|
|
48
90
|
variantId: string;
|
|
@@ -59,6 +101,13 @@ export interface ShippingMethodOption {
|
|
|
59
101
|
handle: string;
|
|
60
102
|
title: string;
|
|
61
103
|
price?: PriceWithCurrency;
|
|
104
|
+
/**
|
|
105
|
+
* True for the method the subscription is CURRENTLY on — not "selectable".
|
|
106
|
+
* Every option returned is available; this one marks the current selection,
|
|
107
|
+
* so do not filter on it. Absent when the source cannot say (the
|
|
108
|
+
* `DeliveryMethodConflict` payload does not carry it).
|
|
109
|
+
*/
|
|
110
|
+
isActive?: boolean;
|
|
62
111
|
}
|
|
63
112
|
export interface DeliveryMethodConflict {
|
|
64
113
|
code: "DELIVERY_METHOD_CONFLICT";
|
|
@@ -94,17 +143,60 @@ export interface SubscriptionDeliveryAnchor {
|
|
|
94
143
|
export interface SubscriptionDeliveryPolicy extends SellingPlanInterval {
|
|
95
144
|
anchors?: SubscriptionDeliveryAnchor[];
|
|
96
145
|
}
|
|
97
|
-
export interface SubscriptionPaymentInstrument {
|
|
98
|
-
type: string;
|
|
99
|
-
brand?: string;
|
|
100
|
-
maskedNumber?: string;
|
|
101
|
-
}
|
|
102
146
|
export interface SubscriptionPaymentMethod {
|
|
103
147
|
id: string;
|
|
104
148
|
instrument?: SubscriptionPaymentInstrument | null;
|
|
149
|
+
/**
|
|
150
|
+
* False once the payment method has been revoked. Legacy-sourced only — the
|
|
151
|
+
* v1 `expand=paymentMethod` shape cannot express it, so `undefined` means
|
|
152
|
+
* "unknown", NOT "inactive". Treat undefined as active.
|
|
153
|
+
*/
|
|
105
154
|
active?: boolean;
|
|
155
|
+
/**
|
|
156
|
+
* False for a BLIK alias that is not authorized for recurring charges, which
|
|
157
|
+
* gates the re-authorization prompt (see RenewalSummary). Legacy-sourced only
|
|
158
|
+
* — `undefined` means "unknown", so do not treat it as "not recurring".
|
|
159
|
+
*/
|
|
106
160
|
isRecurring?: boolean;
|
|
161
|
+
/**
|
|
162
|
+
* Billing address for the payment method.
|
|
163
|
+
*
|
|
164
|
+
* v1-ONLY: `expand=paymentMethod` is the single customer-facing source. The
|
|
165
|
+
* legacy subscription and payment-method routes compute it server-side but
|
|
166
|
+
* their response schemas do not declare it, so Fastify strips it before it
|
|
167
|
+
* reaches the client. Consequently a host that overrides the whole payment
|
|
168
|
+
* method with legacy data (as the customer portal's enrichment adapter does)
|
|
169
|
+
* will not see it — see the note on that adapter.
|
|
170
|
+
*/
|
|
171
|
+
billingAddress?: SubscriptionBillingAddress | null;
|
|
107
172
|
}
|
|
173
|
+
/**
|
|
174
|
+
* A payment method's billing address. Separate from `SubscriptionDeliveryAddress`
|
|
175
|
+
* because the v1 address resource carries more fields (company, phone, and both
|
|
176
|
+
* resolved display names and codes for country/province) and sends `null` rather
|
|
177
|
+
* than omitting empty values.
|
|
178
|
+
*/
|
|
179
|
+
export interface SubscriptionBillingAddress {
|
|
180
|
+
firstName?: string | null;
|
|
181
|
+
lastName?: string | null;
|
|
182
|
+
address1?: string | null;
|
|
183
|
+
address2?: string | null;
|
|
184
|
+
zip?: string | null;
|
|
185
|
+
city?: string | null;
|
|
186
|
+
/** Resolved display name, e.g. "Germany" — v1 resolves this server-side. */
|
|
187
|
+
country?: string | null;
|
|
188
|
+
countryCode?: string | null;
|
|
189
|
+
/** Resolved display name, e.g. "Bavaria". */
|
|
190
|
+
province?: string | null;
|
|
191
|
+
provinceCode?: string | null;
|
|
192
|
+
phone?: string | null;
|
|
193
|
+
company?: string | null;
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* A subscription's delivery address. Fields are optional and never null: both
|
|
197
|
+
* sources may omit any of them, and the adapters normalise a null to absent so
|
|
198
|
+
* consumers can test one field rather than each key.
|
|
199
|
+
*/
|
|
108
200
|
export interface SubscriptionDeliveryAddress {
|
|
109
201
|
firstName?: string;
|
|
110
202
|
lastName?: string;
|
|
@@ -112,18 +204,123 @@ export interface SubscriptionDeliveryAddress {
|
|
|
112
204
|
address2?: string;
|
|
113
205
|
zip?: string;
|
|
114
206
|
city?: string;
|
|
207
|
+
/** Resolved display name, e.g. "Germany". v1-sourced only. */
|
|
208
|
+
country?: string;
|
|
115
209
|
countryCode?: string;
|
|
210
|
+
/** Resolved display name, e.g. "Bavaria". */
|
|
211
|
+
province?: string;
|
|
212
|
+
/** v1-sourced only — the legacy address has no province code. */
|
|
213
|
+
provinceCode?: string;
|
|
214
|
+
phone?: string;
|
|
215
|
+
company?: string;
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* The write shape for a subscription's delivery address.
|
|
219
|
+
*
|
|
220
|
+
* Deliberately NOT `SubscriptionDeliveryAddress` — reads and writes are not
|
|
221
|
+
* symmetric here:
|
|
222
|
+
* - The write is a full replacement, so `firstName`, `lastName`, `address1`,
|
|
223
|
+
* `zip` and `city` are required; an omitted optional field is CLEARED, not
|
|
224
|
+
* left alone.
|
|
225
|
+
* - There is no `countryCode`: the endpoint rejects it and derives the country
|
|
226
|
+
* from the contract, so the country cannot be changed on this path.
|
|
227
|
+
* - `province` is the display NAME (e.g. "Bavaria"); the server resolves it to
|
|
228
|
+
* a code. There is no `provinceCode`, and no `country`.
|
|
229
|
+
*
|
|
230
|
+
* Callers must BUILD this object field by field. Handing over a
|
|
231
|
+
* `SubscriptionDeliveryAddress` with `countryCode` stripped would carry
|
|
232
|
+
* `country` / `provinceCode` along, and the endpoint forwards unknown keys
|
|
233
|
+
* verbatim into Shopify's address input, which declares neither.
|
|
234
|
+
*/
|
|
235
|
+
export interface UpdateDeliveryAddress {
|
|
236
|
+
firstName: string;
|
|
237
|
+
lastName: string;
|
|
238
|
+
address1: string;
|
|
239
|
+
zip: string;
|
|
240
|
+
city: string;
|
|
241
|
+
address2?: string;
|
|
242
|
+
/** Province/state display name, e.g. "Bavaria" — the server resolves the code. */
|
|
116
243
|
province?: string;
|
|
244
|
+
phone?: string;
|
|
245
|
+
company?: string;
|
|
117
246
|
}
|
|
247
|
+
/** Failure modes of `updateDeliveryAddress`. */
|
|
248
|
+
export type UpdateDeliveryAddressError =
|
|
249
|
+
/**
|
|
250
|
+
* The merchant has customer address editing switched off. A block should
|
|
251
|
+
* hide or disable its control rather than surface this as an error.
|
|
252
|
+
*/
|
|
253
|
+
{
|
|
254
|
+
kind: "NOT_ALLOWED";
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* Rejected either by the subscription's state (no delivery method at all, or
|
|
258
|
+
* a pickup method that cannot carry an address) or by Shopify's address
|
|
259
|
+
* validation. `message` is the endpoint's human-readable text, safe to show.
|
|
260
|
+
*/
|
|
261
|
+
| {
|
|
262
|
+
kind: "INVALID_ADDRESS";
|
|
263
|
+
message?: string;
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* The subscription changed since it was read, so the write was refused
|
|
267
|
+
* (optimistic concurrency). Only possible when the host's fetcher sends an
|
|
268
|
+
* `X-Last-Updated-At` header, as the customer portal's does. Reload and let
|
|
269
|
+
* the customer retry rather than showing this as an address problem.
|
|
270
|
+
*/
|
|
271
|
+
| {
|
|
272
|
+
kind: "STALE";
|
|
273
|
+
} | {
|
|
274
|
+
kind: "SUBSCRIPTION_NOT_FOUND";
|
|
275
|
+
} | {
|
|
276
|
+
kind: "NETWORK";
|
|
277
|
+
message?: string;
|
|
278
|
+
} | {
|
|
279
|
+
kind: "UNKNOWN";
|
|
280
|
+
message?: string;
|
|
281
|
+
};
|
|
282
|
+
/** Failure modes of `updateDeliveryMethod`. */
|
|
283
|
+
export type UpdateDeliveryMethodError =
|
|
284
|
+
/**
|
|
285
|
+
* Refused: either the merchant has customer delivery-method editing switched
|
|
286
|
+
* off, or the subscription contains a membership product. The endpoint
|
|
287
|
+
* answers both the same way, so they cannot be told apart here.
|
|
288
|
+
*/
|
|
289
|
+
{
|
|
290
|
+
kind: "NOT_ALLOWED";
|
|
291
|
+
}
|
|
292
|
+
/** See the note on `UpdateDeliveryAddressError`'s `STALE`. */
|
|
293
|
+
| {
|
|
294
|
+
kind: "STALE";
|
|
295
|
+
} | {
|
|
296
|
+
kind: "SUBSCRIPTION_NOT_FOUND";
|
|
297
|
+
} | {
|
|
298
|
+
kind: "NETWORK";
|
|
299
|
+
message?: string;
|
|
300
|
+
} | {
|
|
301
|
+
kind: "UNKNOWN";
|
|
302
|
+
message?: string;
|
|
303
|
+
};
|
|
118
304
|
export interface SubscriptionDeliveryOption {
|
|
119
305
|
title?: string;
|
|
306
|
+
/**
|
|
307
|
+
* Customer-facing title where it differs from the internal one. Legacy-sourced
|
|
308
|
+
* only — v1 carries a single `title`, so consumers must read
|
|
309
|
+
* `presentmentTitle ?? title`.
|
|
310
|
+
*/
|
|
120
311
|
presentmentTitle?: string;
|
|
121
312
|
description?: string;
|
|
122
313
|
}
|
|
123
314
|
/**
|
|
124
|
-
* Delivery method for a subscription
|
|
125
|
-
*
|
|
126
|
-
*
|
|
315
|
+
* Delivery method for a subscription: the address plus whichever of the three
|
|
316
|
+
* option slots applies (exactly one — shipping, pickup, or local delivery).
|
|
317
|
+
*
|
|
318
|
+
* The real adapter maps this from the v1 subscription resource's `deliveryAddress`
|
|
319
|
+
* and `deliveryMethod`, both returned by default (no `expand` needed), so it is
|
|
320
|
+
* populated by every read — `search` and `getById` alike. `null` means the
|
|
321
|
+
* subscription genuinely has no delivery method; `undefined` means the host's
|
|
322
|
+
* adapter does not supply one. Used by ContractSelect to show the delivery
|
|
323
|
+
* address and method.
|
|
127
324
|
*/
|
|
128
325
|
export interface SubscriptionDeliveryMethod {
|
|
129
326
|
address?: SubscriptionDeliveryAddress | null;
|
|
@@ -177,8 +374,9 @@ export interface Subscription {
|
|
|
177
374
|
*/
|
|
178
375
|
serial?: string;
|
|
179
376
|
/**
|
|
180
|
-
* Delivery address + shipping/pickup option. Populated by the
|
|
181
|
-
*
|
|
377
|
+
* Delivery address + shipping/pickup/local-delivery option. Populated by the
|
|
378
|
+
* real adapter from the v1 subscription resource (`deliveryAddress` +
|
|
379
|
+
* `deliveryMethod`). Used by ContractSelect.
|
|
182
380
|
*/
|
|
183
381
|
deliveryMethod?: SubscriptionDeliveryMethod | null;
|
|
184
382
|
}
|
|
@@ -229,6 +427,111 @@ export interface UpsellProduct {
|
|
|
229
427
|
*/
|
|
230
428
|
recurring?: boolean;
|
|
231
429
|
}
|
|
430
|
+
/**
|
|
431
|
+
* A product a subscriber may buy as an instant order.
|
|
432
|
+
*
|
|
433
|
+
* Deliberately the shape product pickers already consume — `id` / `title` /
|
|
434
|
+
* `hasOnlyDefaultVariant` / `featuredImage`, with variants under `variants.items`
|
|
435
|
+
* carrying a `PriceWithCurrency` — so hosts pass it straight to the picker with no
|
|
436
|
+
* per-consumer mapping. The adapter does that translation once, at the SDK
|
|
437
|
+
* boundary, pairing each bare price with the contract currency the endpoint
|
|
438
|
+
* reports.
|
|
439
|
+
*
|
|
440
|
+
* It is not `WithVariants<Product>`: that requires `collections` and a paginated
|
|
441
|
+
* `variants.pageInfo`, neither of which the instant-order endpoint returns, and
|
|
442
|
+
* its `ProductVariant` has no `availableForSale`. Rather than fabricate cursors
|
|
443
|
+
* and collections to satisfy the wider type, this states only what the endpoint
|
|
444
|
+
* actually provides while staying structurally assignable to the picker's props.
|
|
445
|
+
*/
|
|
446
|
+
export interface InstantOrderProduct {
|
|
447
|
+
id: string;
|
|
448
|
+
title: string;
|
|
449
|
+
hasOnlyDefaultVariant: boolean;
|
|
450
|
+
featuredImage: Image | null;
|
|
451
|
+
variants: {
|
|
452
|
+
items: Array<{
|
|
453
|
+
id: string;
|
|
454
|
+
title: string;
|
|
455
|
+
image: Image | null;
|
|
456
|
+
price: PriceWithCurrency;
|
|
457
|
+
/**
|
|
458
|
+
* Retained from the endpoint — the wider `ProductVariant` has no
|
|
459
|
+
* equivalent, and the write side refuses an unavailable variant.
|
|
460
|
+
*/
|
|
461
|
+
availableForSale: boolean;
|
|
462
|
+
}>;
|
|
463
|
+
};
|
|
464
|
+
}
|
|
465
|
+
/**
|
|
466
|
+
* What this subscriber may buy as an instant order right now. `available` folds
|
|
467
|
+
* in the shop setting, the merchant's product allowlist and the subscription's
|
|
468
|
+
* own eligibility — consumers hide the entry point rather than re-deriving those
|
|
469
|
+
* rules. `requiresCheckout` is `true` when confirming sends the customer to
|
|
470
|
+
* Shopify Checkout instead of charging the saved method silently (e.g. a
|
|
471
|
+
* Shopify-vaulted card, whose provider the client is not told).
|
|
472
|
+
*/
|
|
473
|
+
export interface InstantOrderProducts {
|
|
474
|
+
/**
|
|
475
|
+
* Whether the subscriber has anything to buy at all. Independent of any search
|
|
476
|
+
* term, so filtering to zero results never reads as "feature unavailable".
|
|
477
|
+
*/
|
|
478
|
+
available: boolean;
|
|
479
|
+
requiresCheckout: boolean;
|
|
480
|
+
products: InstantOrderProduct[];
|
|
481
|
+
hasNextPage: boolean;
|
|
482
|
+
endCursor: string | null;
|
|
483
|
+
}
|
|
484
|
+
/** Page/search parameters for {@link SubscriptionService.getInstantOrderProducts}. */
|
|
485
|
+
export interface InstantOrderProductsQuery {
|
|
486
|
+
/** Free-text product-title search, applied server-side. */
|
|
487
|
+
query?: string;
|
|
488
|
+
/** Cursor from a previous page's `endCursor`. */
|
|
489
|
+
after?: string;
|
|
490
|
+
limit?: number;
|
|
491
|
+
}
|
|
492
|
+
/** Options for {@link SubscriptionService.placeInstantOrder}. */
|
|
493
|
+
export interface PlaceInstantOrderOptions {
|
|
494
|
+
/**
|
|
495
|
+
* Shipping rate the customer picked for this purchase, by the `title` of an
|
|
496
|
+
* option from {@link SubscriptionService.getAvailableShippingMethods}. The
|
|
497
|
+
* rate is re-quoted against the instant basket and its price replaces the
|
|
498
|
+
* subscription's delivery price for this order only. Omit to ship on the
|
|
499
|
+
* subscription's own delivery method.
|
|
500
|
+
*
|
|
501
|
+
* A title, because that is what the endpoint's body takes — and titles are
|
|
502
|
+
* not unique. Two available rates can share one, and the endpoint would apply
|
|
503
|
+
* whichever its own quote returned first, at that rate's price. So
|
|
504
|
+
* `placeInstantOrder` refuses a title it finds on more than one available
|
|
505
|
+
* option, with `AMBIGUOUS_SHIPPING_METHOD`, rather than sending something
|
|
506
|
+
* that cannot identify a rate. Pick from `getAvailableShippingMethods` and
|
|
507
|
+
* surface `handle` in your own UI to tell same-titled rates apart.
|
|
508
|
+
*
|
|
509
|
+
* That check is best-effort by construction and does not close the gap:
|
|
510
|
+
* it reads the rates quoted for the subscription's next delivery, while the
|
|
511
|
+
* endpoint re-quotes for the instant basket, so a duplicate title can exist
|
|
512
|
+
* there and not here. It also passes when the list cannot be read at all.
|
|
513
|
+
* Only the endpoint taking a `handle` would remove the ambiguity.
|
|
514
|
+
*
|
|
515
|
+
* A title the shop does not offer for this basket is refused server-side as
|
|
516
|
+
* `INVALID_REQUEST` — indistinguishable from a bad item list, since both
|
|
517
|
+
* arrive as 400 (see instantOrderErrors.ts), so copy for `INVALID_REQUEST`
|
|
518
|
+
* has to fit either cause. The order is never placed on a fallback rate.
|
|
519
|
+
*
|
|
520
|
+
* No stock block sets this — the instant-order overlay ships on the
|
|
521
|
+
* subscription's own method. It exists for hosts and custom blocks.
|
|
522
|
+
*/
|
|
523
|
+
shippingMethodTitle?: string;
|
|
524
|
+
}
|
|
525
|
+
/** Outcome of placing an instant order — `status` is what the caller acts on. */
|
|
526
|
+
export interface InstantOrderPlacement {
|
|
527
|
+
orderId: string;
|
|
528
|
+
totalPrice: string | null;
|
|
529
|
+
currencyCode: string;
|
|
530
|
+
status: "paid" | "awaiting_payment" | "processing" | "failed";
|
|
531
|
+
/** Present for `awaiting_payment` — Checkout / BLIK / MBWay / 3DS pay link. */
|
|
532
|
+
paymentUrl?: string;
|
|
533
|
+
reason?: string;
|
|
534
|
+
}
|
|
232
535
|
export type SubscriptionService = {
|
|
233
536
|
current: Signal<Subscription | null>;
|
|
234
537
|
hasPendingBilling: ReadonlySignal<boolean>;
|
|
@@ -292,6 +595,30 @@ export type SubscriptionService = {
|
|
|
292
595
|
* reserved keys are preserved server-side and must not be included.
|
|
293
596
|
*/
|
|
294
597
|
updateCustomAttributes(subscriptionId: string, customAttributes: Record<string, string>): Promise<Result<Subscription>>;
|
|
598
|
+
/**
|
|
599
|
+
* Replace the subscription's delivery address. A full replacement — see
|
|
600
|
+
* `UpdateDeliveryAddress` for why the write shape is not the read shape and
|
|
601
|
+
* why the country cannot be changed here. Refreshes `current` on success.
|
|
602
|
+
*/
|
|
603
|
+
updateDeliveryAddress(subscriptionId: string, address: UpdateDeliveryAddress): Promise<Result<void, UpdateDeliveryAddressError>>;
|
|
604
|
+
/**
|
|
605
|
+
* Shipping methods the subscription can move to, including the one it is
|
|
606
|
+
* already on (flagged `isActive`). Also the way to recover from a
|
|
607
|
+
* `DeliveryMethodConflict` when its payload is not enough.
|
|
608
|
+
*/
|
|
609
|
+
getAvailableShippingMethods(subscriptionId: string): Promise<Result<ShippingMethodOption[]>>;
|
|
610
|
+
/**
|
|
611
|
+
* Switch the subscription to `shippingMethodHandle`, one of the handles from
|
|
612
|
+
* `getAvailableShippingMethods`. Refreshes `current` on success.
|
|
613
|
+
*
|
|
614
|
+
* PICKUP POINTS ARE OUT OF SCOPE: no parcel-locker selection is sent, which
|
|
615
|
+
* the endpoint reads as "leave the existing pickup-point attributes alone".
|
|
616
|
+
* Switching a subscription off a parcel-locker method therefore leaves its
|
|
617
|
+
* locker attributes in place — deliberately, since clearing data this service
|
|
618
|
+
* cannot set back would be worse. Hosts that manage pickup points (the
|
|
619
|
+
* customer portal, via its own widgets) must keep doing so themselves.
|
|
620
|
+
*/
|
|
621
|
+
updateDeliveryMethod(subscriptionId: string, shippingMethodHandle: string): Promise<Result<void, UpdateDeliveryMethodError>>;
|
|
295
622
|
resume(subscriptionId: string): Promise<Result<Subscription>>;
|
|
296
623
|
pause(subscriptionId: string): Promise<Result<Subscription>>;
|
|
297
624
|
reactivate(subscriptionId: string): Promise<Result<Subscription>>;
|
|
@@ -310,6 +637,19 @@ export type SubscriptionService = {
|
|
|
310
637
|
}): Promise<Result<RenewNowResult>>;
|
|
311
638
|
/** Change subscription frequency: a selling plan id, or a custom delivery interval. */
|
|
312
639
|
changeFrequency(subscriptionId: string, plan: string | SellingPlanInterval): Promise<Result<Subscription>>;
|
|
640
|
+
/**
|
|
641
|
+
* Products this subscriber may buy as an instant order (a one-off purchase on
|
|
642
|
+
* top of the subscription, charged to its saved payment method, that never
|
|
643
|
+
* moves the billing date or changes the subscription's contents). Returns an
|
|
644
|
+
* empty, unavailable list when the host adapter doesn't support instant orders.
|
|
645
|
+
*/
|
|
646
|
+
getInstantOrderProducts(subscriptionId: string, params?: InstantOrderProductsQuery): Promise<Result<InstantOrderProducts, InstantOrderProductsError>>;
|
|
647
|
+
/**
|
|
648
|
+
* Place an instant order. `requestKey` is a client-minted idempotency key kept
|
|
649
|
+
* across retries of one attempt, so a double-submit resolves to the order the
|
|
650
|
+
* first request created instead of charging twice.
|
|
651
|
+
*/
|
|
652
|
+
placeInstantOrder(subscriptionId: string, requestKey: string, items: PostableSubscriptionItem[], options?: PlaceInstantOrderOptions): Promise<Result<InstantOrderPlacement, PlaceInstantOrderError>>;
|
|
313
653
|
/** Re-fetch `current` and `lastOrder` from the most recent in-focus subscription. */
|
|
314
654
|
reload(): Promise<void>;
|
|
315
655
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/services/subscription/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC5E,OAAO,KAAK,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEhF,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,iBAAiB,CAAC;IACzB,gBAAgB,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAC/B,8FAA8F;IAC9F,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,mBAAmB,CAAC,EAAE,iBAAiB,CAAC;IACxC,YAAY,CAAC,EAAE,iBAAiB,CAAC;IACjC,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,aAAa,CAAC,EAAE,mBAAmB,GAAG,IAAI,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
|
|
|
86
86
|
export declare const ThemeStateContext: {
|
|
87
87
|
__context__: ThemeState;
|
|
88
88
|
};
|
|
89
|
-
|
|
89
|
+
/**
|
|
90
|
+
* Flatten overrides into the `(scope, key) -> value` shape the catalogs hold.
|
|
91
|
+
*
|
|
92
|
+
* Indexing is last-write-wins per `(scope, key)`, so a list spanning several
|
|
93
|
+
* locales resolves to whichever locale happens to come last — a silent
|
|
94
|
+
* cross-locale leak. `locale` is therefore **required for any multi-locale
|
|
95
|
+
* input**: pass it and entries for other locales are dropped. Only omit it
|
|
96
|
+
* when the caller has already narrowed the list to a single locale.
|
|
97
|
+
*/
|
|
98
|
+
export declare function indexOverrides(overrides: TranslationOverride[], locale?: string): {
|
|
90
99
|
theme: Record<string, string>;
|
|
91
100
|
blocks: Record<string, Record<string, string>>;
|
|
92
101
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme-state.d.ts","sourceRoot":"","sources":["../src/theme-state.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,cAAc,EACnB,KAAK,MAAM,EACZ,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAIL,KAAK,KAAK,EAEV,KAAK,aAAa,EAGnB,MAAM,SAAS,CAAC;AAEjB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/D,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,SAAS,CAAC;AAE9C,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,E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C,CAAC;CAChD,CAyBA;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE;IACrC,OAAO,EAAE,CACP,OAAO,EAAE,YAAY,EACrB,IAAI,EAAE,MAAM,KACT,OAAO,CAAC;QAAE,MAAM,EAAE,KAAK,EAAE,CAAC;QAAC,MAAM,CAAC,EAAE,cAAc,GAAG,IAAI,CAAA;KAAE,GAAG,IAAI,CAAC,CAAC;IACzE,YAAY,CAAC,EAAE;QACb,mBAAmB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAAC;KACzE,CAAC;IACF,mBAAmB,CAAC,EAAE,YAAY,CAAC;IACnC,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,IAAI,CAAC;CAC9E,GAAG,UAAU,CAsRb"}
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -20,6 +20,13 @@ export interface PaginatedList<T> {
|
|
|
20
20
|
export type ErrorDetails = {
|
|
21
21
|
title: string;
|
|
22
22
|
message: string;
|
|
23
|
+
/**
|
|
24
|
+
* Machine-readable cause, when the error originated from an
|
|
25
|
+
* `AuthenticationError`. Consumers should key on this instead of matching the
|
|
26
|
+
* human-facing `message`, which is locale-dependent and may be re-worded.
|
|
27
|
+
* Values are `AuthenticationErrorReason` members.
|
|
28
|
+
*/
|
|
29
|
+
reason?: string;
|
|
23
30
|
};
|
|
24
31
|
export type Image = {
|
|
25
32
|
url: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,OAAO,CAAC,CAAC,GAAG,OAAO,IAAI;IACjC,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,EAAE,CAAC,CAAC;CACV,CAAC;AAEF,MAAM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AW,aAAa,CAAC,CAAC;IAC9B,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,KAAK,GAAG;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;AACjF,cAAc,UAAU,CAAC"}
|
package/dist/vue/context.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ref } from 'vue';
|
|
1
|
+
import { MaybeRefOrGetter, Ref } from 'vue';
|
|
2
2
|
import { ContextType, UnknownContext } from '../main.ts';
|
|
3
3
|
import { Signal } from '@preact/signals-core';
|
|
4
4
|
export declare const ContextProvider: import('vue').DefineSetupFnComponent<Record<string, any>, {}, {}, Record<string, any> & {}, import('vue').PublicProps>;
|
|
@@ -13,6 +13,30 @@ export declare function useBlockType(): Ref<string | null>;
|
|
|
13
13
|
* This is a no-op when not running inside an editor iframe.
|
|
14
14
|
*/
|
|
15
15
|
export declare function useRegisterTranslationKeys(): (keys: Record<string, string>) => void;
|
|
16
|
+
/**
|
|
17
|
+
* Resolve a single translation key into a reactive string.
|
|
18
|
+
*
|
|
19
|
+
* Use this for translatable text that lands in an **HTML attribute**
|
|
20
|
+
* (`placeholder`, `aria-label`, `alt`, `title`) and therefore cannot go through
|
|
21
|
+
* `<juo-text prop="...">`. Binding the raw Vue prop instead renders the block's
|
|
22
|
+
* untranslated schema default and silently ignores every merchant translation.
|
|
23
|
+
*
|
|
24
|
+
* Reactivity has to be established with a Preact `effect` rather than a Vue
|
|
25
|
+
* `computed`, because `TranslationService.resolve` reads `catalogs` and the
|
|
26
|
+
* async-loaded theme defaults from a closure over Preact signals that Vue
|
|
27
|
+
* cannot see. A `computed` that merely touches `locale.value` misses:
|
|
28
|
+
*
|
|
29
|
+
* - `catalogs`-only updates (a block's locale file is loaded lazily on
|
|
30
|
+
* registration — see `onRegisterBlock` in `theme-state.ts`), and
|
|
31
|
+
* - theme defaults that resolve *after* a locale switch, which leaves the old
|
|
32
|
+
* language on screen until something unrelated forces a re-render.
|
|
33
|
+
*
|
|
34
|
+
* The `watch` re-arms the effect once `blockId`/`blockType` become available,
|
|
35
|
+
* which for `.ce.vue` blocks only happens after the shadow host connects.
|
|
36
|
+
*
|
|
37
|
+
* Returns `fallback` (default `""`) while the key is unresolved or missing.
|
|
38
|
+
*/
|
|
39
|
+
export declare function useTranslatedProp(key: MaybeRefOrGetter<string>, fallback?: MaybeRefOrGetter<string | undefined>): Ref<string>;
|
|
16
40
|
export declare function useContext<C extends UnknownContext>(context: C): Wrap<ContextType<C>>;
|
|
17
41
|
export declare function useProvideContext<C extends UnknownContext>(context: C, init: ContextType<C>): void;
|
|
18
42
|
type Wrap<T> = T extends Signal<infer V> ? Ref<V> : T extends Function ? T : T extends Record<any, any> ? {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/vue/context.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/vue/context.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAgB,gBAAgB,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC/D,OAAO,EACL,WAAW,EAKX,cAAc,EACf,MAAM,aAAa,CAAC;AAGrB,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