@agence-zef/astro 0.1.0 → 0.3.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/README.md +1 -1
- package/components/AccountForm.astro +253 -0
- package/components/AddToCart.astro +107 -0
- package/components/Cart.astro +141 -0
- package/components/Checkout.astro +307 -0
- package/components/ReservedNotice.astro +33 -0
- package/components/Subscriptions.astro +91 -0
- package/components/VideoPlayer.astro +71 -0
- package/components/routes/account.ts +23 -0
- package/components/routes/reserved.astro +54 -0
- package/components/routes/shop.ts +21 -0
- package/components/virtual.d.ts +4 -0
- package/dist/accounts.d.ts +65 -0
- package/dist/accounts.js +301 -0
- package/dist/helpers.d.ts +9 -1
- package/dist/helpers.js +28 -3
- package/dist/index.d.ts +22 -0
- package/dist/index.js +48 -1
- package/dist/middleware.d.ts +7 -0
- package/dist/middleware.js +20 -0
- package/dist/shop.d.ts +62 -0
- package/dist/shop.js +384 -0
- package/package.json +26 -4
package/dist/shop.js
ADDED
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
import { safePath, visitorOf } from "./accounts.js";
|
|
2
|
+
import { getClient } from "./helpers.js";
|
|
3
|
+
/*
|
|
4
|
+
* Boutique côté site (§ 7 M, lot 14e2) : panier, ajout au panier, paiement. Compte obligatoire :
|
|
5
|
+
* tout passe par la session du compte connecté. Les formulaires (`<AddToCart>`, `<Cart>`,
|
|
6
|
+
* `<Checkout>`) s'envoient sans JavaScript à `/__zef/shop/<action>` ; seul le paiement Stripe
|
|
7
|
+
* (Payment Element) demande JavaScript. Montants en centimes TTC, recalculés par le CMS.
|
|
8
|
+
*/
|
|
9
|
+
export const SHOP_ACTIONS = [
|
|
10
|
+
"add",
|
|
11
|
+
"update",
|
|
12
|
+
"remove",
|
|
13
|
+
"promo",
|
|
14
|
+
"giftcard",
|
|
15
|
+
"buy-gift-card",
|
|
16
|
+
"remove-gift-card",
|
|
17
|
+
"play",
|
|
18
|
+
"address",
|
|
19
|
+
"checkout",
|
|
20
|
+
"simulate",
|
|
21
|
+
"cancel-subscription",
|
|
22
|
+
"subscription-card",
|
|
23
|
+
];
|
|
24
|
+
export const isShopAction = (v) => SHOP_ACTIONS.includes(v);
|
|
25
|
+
/** Cookie d'une heure qui porte le paiement en cours (secret du Payment Element) jusqu'à sa page. */
|
|
26
|
+
export const PAYMENT_COOKIE = "zef_payment";
|
|
27
|
+
/** Cookie (7 jours) du code promo saisi dans le panier (lot 14e4a). */
|
|
28
|
+
export const PROMO_COOKIE = "zef_promo";
|
|
29
|
+
/** Code promo gardé pour le panier et le paiement. */
|
|
30
|
+
export function promoCode(ctx) {
|
|
31
|
+
return ctx.cookies.get(PROMO_COOKIE)?.value || null;
|
|
32
|
+
}
|
|
33
|
+
/** Cookie (7 jours) de la carte cadeau saisie dans le panier (lot 14e4b1). */
|
|
34
|
+
export const GIFT_CARD_COOKIE = "zef_gift_card";
|
|
35
|
+
export function giftCardCode(ctx) {
|
|
36
|
+
return ctx.cookies.get(GIFT_CARD_COOKIE)?.value || null;
|
|
37
|
+
}
|
|
38
|
+
/** Cookie d'une heure qui porte l'adresse saisie jusqu'à l'étape Livraison (lot 14e3b). */
|
|
39
|
+
export const ADDRESS_COOKIE = "zef_checkout_address";
|
|
40
|
+
/** Messages affichés après une erreur (`?zef_shop_error=<code>`). */
|
|
41
|
+
export const SHOP_ERRORS = {
|
|
42
|
+
invalid: "Vérifiez les champs du formulaire.",
|
|
43
|
+
unavailable: "Ce produit n'est plus disponible.",
|
|
44
|
+
out_of_stock: "Il n'y en a plus assez en stock.",
|
|
45
|
+
empty_cart: "Votre panier est vide.",
|
|
46
|
+
email_unverified: "Confirmez votre adresse email avant de commander.",
|
|
47
|
+
terms: "La boutique ne peut pas encore vendre.",
|
|
48
|
+
payment_unavailable: "Le paiement n'est pas disponible pour le moment.",
|
|
49
|
+
shipping_unavailable: "La livraison n'est pas disponible pour le moment.",
|
|
50
|
+
shipping: "Choisissez un mode de livraison (et un point relais s'il en demande un).",
|
|
51
|
+
promo_invalid: "Le code promo ne s'applique plus : retirez-le ou modifiez le panier.",
|
|
52
|
+
gift_card_invalid: "La carte cadeau ne peut plus servir : retirez-la du panier.",
|
|
53
|
+
address: "Saisissez d'abord votre adresse de livraison.",
|
|
54
|
+
unauthenticated: "Connectez-vous pour commander.",
|
|
55
|
+
no_portal: "Le changement de carte n'est pas disponible pour le moment.",
|
|
56
|
+
unknown: "Une erreur est survenue. Réessayez dans un instant.",
|
|
57
|
+
};
|
|
58
|
+
/** « 36 € », « 4,50 € ». */
|
|
59
|
+
export function formatPrice(cents) {
|
|
60
|
+
if (cents === null || cents === undefined)
|
|
61
|
+
return "";
|
|
62
|
+
return new Intl.NumberFormat("fr-FR", {
|
|
63
|
+
style: "currency",
|
|
64
|
+
currency: "EUR",
|
|
65
|
+
minimumFractionDigits: cents % 100 === 0 ? 0 : 2,
|
|
66
|
+
}).format(cents / 100);
|
|
67
|
+
}
|
|
68
|
+
/** Panier du compte connecté, ou `null` sans session. */
|
|
69
|
+
export async function getCart(ctx, locale) {
|
|
70
|
+
const visitor = visitorOf(ctx);
|
|
71
|
+
if (!visitor.session)
|
|
72
|
+
return null;
|
|
73
|
+
try {
|
|
74
|
+
return await getClient().shop.cart(visitor, locale, {
|
|
75
|
+
promoCode: promoCode(ctx),
|
|
76
|
+
giftCard: giftCardCode(ctx),
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
catch {
|
|
80
|
+
return null;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
/** Commande du compte connecté (page de confirmation), ou `null`. */
|
|
84
|
+
export async function getOrder(ctx, id) {
|
|
85
|
+
const visitor = visitorOf(ctx);
|
|
86
|
+
if (!visitor.session || !id)
|
|
87
|
+
return null;
|
|
88
|
+
try {
|
|
89
|
+
return await getClient().shop.order(id, visitor);
|
|
90
|
+
}
|
|
91
|
+
catch {
|
|
92
|
+
return null;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
export async function getOrders(ctx) {
|
|
96
|
+
const visitor = visitorOf(ctx);
|
|
97
|
+
if (!visitor.session)
|
|
98
|
+
return [];
|
|
99
|
+
return getClient()
|
|
100
|
+
.shop.orders(visitor)
|
|
101
|
+
.catch(() => []);
|
|
102
|
+
}
|
|
103
|
+
/** Adresse saisie à la première étape du paiement. */
|
|
104
|
+
export function checkoutAddress(ctx) {
|
|
105
|
+
const raw = ctx.cookies.get(ADDRESS_COOKIE)?.value;
|
|
106
|
+
if (!raw)
|
|
107
|
+
return null;
|
|
108
|
+
try {
|
|
109
|
+
return JSON.parse(raw);
|
|
110
|
+
}
|
|
111
|
+
catch {
|
|
112
|
+
return null;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
/** Modes de livraison proposés pour le panier du compte, selon le pays de l'adresse. */
|
|
116
|
+
export async function getShippingOptions(ctx, country = "FR") {
|
|
117
|
+
const visitor = visitorOf(ctx);
|
|
118
|
+
if (!visitor.session)
|
|
119
|
+
return [];
|
|
120
|
+
return getClient()
|
|
121
|
+
.shop.shippingOptions(visitor, country, promoCode(ctx))
|
|
122
|
+
.catch(() => []);
|
|
123
|
+
}
|
|
124
|
+
/** Points relais proches d'un code postal, pour un mode à point relais. */
|
|
125
|
+
export async function getServicePoints(ctx, input) {
|
|
126
|
+
const visitor = visitorOf(ctx);
|
|
127
|
+
if (!visitor.session)
|
|
128
|
+
return [];
|
|
129
|
+
return getClient()
|
|
130
|
+
.shop.servicePoints(input, visitor)
|
|
131
|
+
.catch(() => []);
|
|
132
|
+
}
|
|
133
|
+
/** Accès du compte connecté aux vidéos (vide sans session). */
|
|
134
|
+
export async function getAccess(ctx) {
|
|
135
|
+
const visitor = visitorOf(ctx);
|
|
136
|
+
if (!visitor.session)
|
|
137
|
+
return [];
|
|
138
|
+
return getClient()
|
|
139
|
+
.shop.access(visitor)
|
|
140
|
+
.catch(() => []);
|
|
141
|
+
}
|
|
142
|
+
/** Abonnements du compte connecté (vide sans session), lot 14e6b. */
|
|
143
|
+
export async function getSubscriptions(ctx) {
|
|
144
|
+
const visitor = visitorOf(ctx);
|
|
145
|
+
if (!visitor.session)
|
|
146
|
+
return [];
|
|
147
|
+
return getClient()
|
|
148
|
+
.shop.subscriptions(visitor)
|
|
149
|
+
.catch(() => []);
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Liens de lecture d'une vidéo dont l'accès est en cours (une location pas encore commencée
|
|
153
|
+
* n'est démarrée que par le bouton de `<VideoPlayer>`), ou `null`.
|
|
154
|
+
*/
|
|
155
|
+
export async function getPlayback(ctx, videoId) {
|
|
156
|
+
const visitor = visitorOf(ctx);
|
|
157
|
+
if (!visitor.session)
|
|
158
|
+
return null;
|
|
159
|
+
const access = await getAccess(ctx);
|
|
160
|
+
if (!access.some((a) => a.videoId === videoId && a.state === "active"))
|
|
161
|
+
return null;
|
|
162
|
+
return getClient()
|
|
163
|
+
.shop.play(videoId, visitor)
|
|
164
|
+
.catch(() => null);
|
|
165
|
+
}
|
|
166
|
+
/** Paiement en cours posé par `checkout` (page de paiement). */
|
|
167
|
+
export function pendingPayment(ctx) {
|
|
168
|
+
const raw = ctx.cookies.get(PAYMENT_COOKIE)?.value;
|
|
169
|
+
if (!raw)
|
|
170
|
+
return null;
|
|
171
|
+
try {
|
|
172
|
+
return JSON.parse(raw);
|
|
173
|
+
}
|
|
174
|
+
catch {
|
|
175
|
+
return null;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
const text = (form, name) => {
|
|
179
|
+
const value = form.get(name);
|
|
180
|
+
return typeof value === "string" ? value.trim() : "";
|
|
181
|
+
};
|
|
182
|
+
function codeOf(error) {
|
|
183
|
+
if (error && typeof error === "object" && "code" in error)
|
|
184
|
+
return String(error.code);
|
|
185
|
+
console.error("[@agence-zef/astro] boutique :", error);
|
|
186
|
+
return "unknown";
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Traite un formulaire de la boutique et renvoie l'adresse où rediriger : la page du formulaire
|
|
190
|
+
* (`?zef_shop_ok=` ou `?zef_shop_error=`), la page de paiement, ou la confirmation.
|
|
191
|
+
*/
|
|
192
|
+
export async function handleShopForm(ctx, action, form, paths) {
|
|
193
|
+
const referer = ctx.request.headers.get("referer");
|
|
194
|
+
const page = safePath(form.get("zef_page"), referer ? new URL(referer).pathname : paths.cart);
|
|
195
|
+
const back = (key, value) => {
|
|
196
|
+
const url = new URL(page, ctx.url.origin);
|
|
197
|
+
url.searchParams.set(key, value);
|
|
198
|
+
return `${url.pathname}${url.search}`;
|
|
199
|
+
};
|
|
200
|
+
const visitor = visitorOf(ctx);
|
|
201
|
+
if (!visitor.session) {
|
|
202
|
+
const to = new URL(paths.signIn, ctx.url.origin);
|
|
203
|
+
to.searchParams.set("redirect", page);
|
|
204
|
+
return `${to.pathname}${to.search}`;
|
|
205
|
+
}
|
|
206
|
+
const shop = getClient().shop;
|
|
207
|
+
const locale = text(form, "zef_locale") || undefined;
|
|
208
|
+
const quantity = Math.max(0, Number.parseInt(text(form, "quantity") || "1", 10) || 0);
|
|
209
|
+
try {
|
|
210
|
+
switch (action) {
|
|
211
|
+
case "add": {
|
|
212
|
+
// La fiche produit est souvent statique : le résultat s'affiche sur le panier.
|
|
213
|
+
const to = new URL(paths.cart, ctx.url.origin);
|
|
214
|
+
try {
|
|
215
|
+
await shop.addToCart(text(form, "variantId"), Math.max(1, quantity), visitor, locale);
|
|
216
|
+
to.searchParams.set("zef_shop_ok", "add");
|
|
217
|
+
}
|
|
218
|
+
catch (error) {
|
|
219
|
+
to.searchParams.set("zef_shop_error", codeOf(error));
|
|
220
|
+
}
|
|
221
|
+
return `${to.pathname}${to.search}`;
|
|
222
|
+
}
|
|
223
|
+
case "update":
|
|
224
|
+
await shop.setCartLine(text(form, "variantId"), quantity, visitor, locale);
|
|
225
|
+
return back("zef_shop_ok", "update");
|
|
226
|
+
case "remove":
|
|
227
|
+
await shop.setCartLine(text(form, "variantId"), 0, visitor, locale);
|
|
228
|
+
return back("zef_shop_ok", "remove");
|
|
229
|
+
case "promo": {
|
|
230
|
+
// Code saisi (ou retiré) : gardé dans un cookie, vérifié à chaque affichage du panier.
|
|
231
|
+
const code = text(form, "code").toUpperCase();
|
|
232
|
+
if (form.get("remove") || !code)
|
|
233
|
+
ctx.cookies.delete(PROMO_COOKIE, { path: "/" });
|
|
234
|
+
else
|
|
235
|
+
ctx.cookies.set(PROMO_COOKIE, code, {
|
|
236
|
+
path: "/",
|
|
237
|
+
httpOnly: true,
|
|
238
|
+
sameSite: "lax",
|
|
239
|
+
secure: ctx.url.protocol === "https:",
|
|
240
|
+
maxAge: 7 * 86400,
|
|
241
|
+
});
|
|
242
|
+
return back("zef_shop_ok", "promo");
|
|
243
|
+
}
|
|
244
|
+
case "giftcard": {
|
|
245
|
+
// Carte cadeau saisie (ou retirée) : son solde est déduit au paiement.
|
|
246
|
+
const code = text(form, "code").toUpperCase();
|
|
247
|
+
if (form.get("remove") || !code)
|
|
248
|
+
ctx.cookies.delete(GIFT_CARD_COOKIE, { path: "/" });
|
|
249
|
+
else
|
|
250
|
+
ctx.cookies.set(GIFT_CARD_COOKIE, code, {
|
|
251
|
+
path: "/",
|
|
252
|
+
httpOnly: true,
|
|
253
|
+
sameSite: "lax",
|
|
254
|
+
secure: ctx.url.protocol === "https:",
|
|
255
|
+
maxAge: 7 * 86400,
|
|
256
|
+
});
|
|
257
|
+
return back("zef_shop_ok", "giftcard");
|
|
258
|
+
}
|
|
259
|
+
case "buy-gift-card": {
|
|
260
|
+
// Carte cadeau achetée : montant proposé (`amount`) ou libre (`customAmount`, en euros).
|
|
261
|
+
const to = new URL(paths.cart, ctx.url.origin);
|
|
262
|
+
const custom = text(form, "customAmount").replace(",", ".");
|
|
263
|
+
const amount = custom ? Math.round(Number(custom) * 100) : Number(text(form, "amount"));
|
|
264
|
+
try {
|
|
265
|
+
await shop.addGiftCard({
|
|
266
|
+
productId: text(form, "productId"),
|
|
267
|
+
amountCents: Number.isFinite(amount) ? amount : 0,
|
|
268
|
+
recipientName: text(form, "recipientName"),
|
|
269
|
+
recipientEmail: text(form, "recipientEmail"),
|
|
270
|
+
message: text(form, "message"),
|
|
271
|
+
sendOn: text(form, "sendOn") || null,
|
|
272
|
+
}, visitor, locale);
|
|
273
|
+
to.searchParams.set("zef_shop_ok", "add");
|
|
274
|
+
}
|
|
275
|
+
catch (error) {
|
|
276
|
+
to.searchParams.set("zef_shop_error", codeOf(error));
|
|
277
|
+
}
|
|
278
|
+
return `${to.pathname}${to.search}`;
|
|
279
|
+
}
|
|
280
|
+
case "play":
|
|
281
|
+
// « Commencer la location » : le premier visionnage démarre le droit.
|
|
282
|
+
await shop.play(text(form, "videoId"), visitor);
|
|
283
|
+
return back("zef_shop_ok", "play");
|
|
284
|
+
case "remove-gift-card":
|
|
285
|
+
await shop.removeGiftCard(text(form, "lineId"), visitor, locale);
|
|
286
|
+
return back("zef_shop_ok", "remove");
|
|
287
|
+
case "address": {
|
|
288
|
+
// Étape 1 : l'adresse est gardée jusqu'au choix de la livraison.
|
|
289
|
+
const address = {
|
|
290
|
+
name: text(form, "name"),
|
|
291
|
+
line1: text(form, "line1"),
|
|
292
|
+
line2: text(form, "line2") || null,
|
|
293
|
+
postalCode: text(form, "postalCode"),
|
|
294
|
+
city: text(form, "city"),
|
|
295
|
+
country: text(form, "country") || "FR",
|
|
296
|
+
phone: text(form, "phone") || null,
|
|
297
|
+
};
|
|
298
|
+
if (!address.name || !address.line1 || !address.postalCode || !address.city) {
|
|
299
|
+
return back("zef_shop_error", "invalid");
|
|
300
|
+
}
|
|
301
|
+
ctx.cookies.set(ADDRESS_COOKIE, JSON.stringify(address), {
|
|
302
|
+
path: "/",
|
|
303
|
+
httpOnly: true,
|
|
304
|
+
sameSite: "lax",
|
|
305
|
+
secure: ctx.url.protocol === "https:",
|
|
306
|
+
maxAge: 3600,
|
|
307
|
+
});
|
|
308
|
+
const to = new URL(page, ctx.url.origin);
|
|
309
|
+
to.search = "";
|
|
310
|
+
to.searchParams.set("etape", "livraison");
|
|
311
|
+
return `${to.pathname}${to.search}`;
|
|
312
|
+
}
|
|
313
|
+
case "checkout": {
|
|
314
|
+
// Panier de cartes cadeaux seulement : ni adresse ni livraison.
|
|
315
|
+
const giftsOnly = form.get("giftsOnly") === "1";
|
|
316
|
+
const address = giftsOnly ? null : checkoutAddress(ctx);
|
|
317
|
+
if (!address && !giftsOnly) {
|
|
318
|
+
const to = new URL(page, ctx.url.origin);
|
|
319
|
+
to.search = "";
|
|
320
|
+
to.searchParams.set("zef_shop_error", "address");
|
|
321
|
+
return `${to.pathname}${to.search}`;
|
|
322
|
+
}
|
|
323
|
+
const option = text(form, "shippingOption");
|
|
324
|
+
if (!option && !giftsOnly)
|
|
325
|
+
return back("zef_shop_error", "shipping");
|
|
326
|
+
const point = Number.parseInt(text(form, `servicePoint_${option}`), 10);
|
|
327
|
+
const started = await shop.checkout({
|
|
328
|
+
shippingAddress: address,
|
|
329
|
+
shipping: giftsOnly
|
|
330
|
+
? null
|
|
331
|
+
: { option, servicePoint: Number.isFinite(point) ? point : null },
|
|
332
|
+
promoCode: promoCode(ctx),
|
|
333
|
+
giftCardCode: giftCardCode(ctx),
|
|
334
|
+
acceptTerms: form.get("acceptTerms") === "on" ? true : false,
|
|
335
|
+
}, visitor, locale);
|
|
336
|
+
ctx.cookies.delete(ADDRESS_COOKIE, { path: "/" });
|
|
337
|
+
ctx.cookies.delete(PROMO_COOKIE, { path: "/" });
|
|
338
|
+
ctx.cookies.delete(GIFT_CARD_COOKIE, { path: "/" });
|
|
339
|
+
if (started.payment.paid) {
|
|
340
|
+
// Tout est réglé par la carte cadeau : directement à la confirmation.
|
|
341
|
+
const done = new URL(paths.confirmation, ctx.url.origin);
|
|
342
|
+
done.searchParams.set("commande", started.order.id);
|
|
343
|
+
return `${done.pathname}${done.search}`;
|
|
344
|
+
}
|
|
345
|
+
const payment = {
|
|
346
|
+
...started.payment,
|
|
347
|
+
orderId: started.order.id,
|
|
348
|
+
number: started.order.number,
|
|
349
|
+
total: started.order.due,
|
|
350
|
+
};
|
|
351
|
+
ctx.cookies.set(PAYMENT_COOKIE, JSON.stringify(payment), {
|
|
352
|
+
path: "/",
|
|
353
|
+
httpOnly: true,
|
|
354
|
+
sameSite: "lax",
|
|
355
|
+
secure: ctx.url.protocol === "https:",
|
|
356
|
+
maxAge: 3600,
|
|
357
|
+
});
|
|
358
|
+
const to = new URL(paths.checkout, ctx.url.origin);
|
|
359
|
+
to.searchParams.set("etape", "paiement");
|
|
360
|
+
return `${to.pathname}${to.search}`;
|
|
361
|
+
}
|
|
362
|
+
case "cancel-subscription":
|
|
363
|
+
// Résiliation par l'abonné : à la fin de la période payée, accès gardés jusque-là.
|
|
364
|
+
await shop.cancelSubscription(text(form, "subscriptionId"), visitor);
|
|
365
|
+
return back("zef_shop_ok", "cancel-subscription");
|
|
366
|
+
case "subscription-card": {
|
|
367
|
+
// « Changer de carte » : portail Stripe, qui ramène sur la page de l'abonné.
|
|
368
|
+
const { url } = await shop.paymentMethod(text(form, "subscriptionId"), new URL(page, ctx.url.origin).toString(), visitor);
|
|
369
|
+
return url ?? back("zef_shop_error", "no_portal");
|
|
370
|
+
}
|
|
371
|
+
case "simulate": {
|
|
372
|
+
const orderId = text(form, "orderId");
|
|
373
|
+
await shop.simulatePayment(orderId, visitor);
|
|
374
|
+
ctx.cookies.delete(PAYMENT_COOKIE, { path: "/" });
|
|
375
|
+
const to = new URL(paths.confirmation, ctx.url.origin);
|
|
376
|
+
to.searchParams.set("commande", orderId);
|
|
377
|
+
return `${to.pathname}${to.search}`;
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
catch (error) {
|
|
382
|
+
return back("zef_shop_error", codeOf(error));
|
|
383
|
+
}
|
|
384
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agence-zef/astro",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Intégration Astro du CMS ZEF : routes, rendu des sections, aperçu, composants réutilisables sans style.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
},
|
|
12
12
|
"./ZefSections.astro": "./components/ZefSections.astro",
|
|
13
13
|
"./routes/page.astro": "./components/routes/page.astro",
|
|
14
|
+
"./routes/reserved.astro": "./components/routes/reserved.astro",
|
|
14
15
|
"./routes/robots.ts": "./components/routes/robots.ts",
|
|
15
16
|
"./Button.astro": "./components/Button.astro",
|
|
16
17
|
"./Image.astro": "./components/Image.astro",
|
|
@@ -25,7 +26,28 @@
|
|
|
25
26
|
"./routes/preview-thumbnail.astro": "./components/routes/preview-thumbnail.astro",
|
|
26
27
|
"./Form.astro": "./components/Form.astro",
|
|
27
28
|
"./Popups.astro": "./components/Popups.astro",
|
|
28
|
-
"./CookieBanner.astro": "./components/CookieBanner.astro"
|
|
29
|
+
"./CookieBanner.astro": "./components/CookieBanner.astro",
|
|
30
|
+
"./accounts": {
|
|
31
|
+
"types": "./dist/accounts.d.ts",
|
|
32
|
+
"import": "./dist/accounts.js"
|
|
33
|
+
},
|
|
34
|
+
"./middleware": {
|
|
35
|
+
"types": "./dist/middleware.d.ts",
|
|
36
|
+
"import": "./dist/middleware.js"
|
|
37
|
+
},
|
|
38
|
+
"./AccountForm.astro": "./components/AccountForm.astro",
|
|
39
|
+
"./routes/account.ts": "./components/routes/account.ts",
|
|
40
|
+
"./shop": {
|
|
41
|
+
"types": "./dist/shop.d.ts",
|
|
42
|
+
"import": "./dist/shop.js"
|
|
43
|
+
},
|
|
44
|
+
"./AddToCart.astro": "./components/AddToCart.astro",
|
|
45
|
+
"./Cart.astro": "./components/Cart.astro",
|
|
46
|
+
"./Checkout.astro": "./components/Checkout.astro",
|
|
47
|
+
"./VideoPlayer.astro": "./components/VideoPlayer.astro",
|
|
48
|
+
"./Subscriptions.astro": "./components/Subscriptions.astro",
|
|
49
|
+
"./ReservedNotice.astro": "./components/ReservedNotice.astro",
|
|
50
|
+
"./routes/shop.ts": "./components/routes/shop.ts"
|
|
29
51
|
},
|
|
30
52
|
"files": [
|
|
31
53
|
"dist",
|
|
@@ -42,8 +64,8 @@
|
|
|
42
64
|
"@types/node": "^24.0.0"
|
|
43
65
|
},
|
|
44
66
|
"dependencies": {
|
|
45
|
-
"@agence-zef/schema": "0.
|
|
46
|
-
"@agence-zef/sdk": "0.
|
|
67
|
+
"@agence-zef/schema": "0.3.0",
|
|
68
|
+
"@agence-zef/sdk": "0.3.0"
|
|
47
69
|
},
|
|
48
70
|
"homepage": "https://agence-zef.fr",
|
|
49
71
|
"scripts": {
|