@lystech/sections 0.4.6 → 0.5.1

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/editeur.js CHANGED
@@ -1,46 +1,47 @@
1
- import { jsx as e, jsxs as f, Fragment as re } from "react/jsx-runtime";
2
- import { createRoot as ae } from "react-dom/client";
3
- import { useState as M, useRef as X, useEffect as G, useCallback as W, useMemo as te } from "react";
4
- function fe({
5
- jeton: n,
1
+ import { jsx as e, jsxs as m, Fragment as ae } from "react/jsx-runtime";
2
+ import { createRoot as se } from "react-dom/client";
3
+ import { C as ge, s as ie } from "./morceaux/constantes-BPZxUYge.js";
4
+ import { useState as P, useRef as Y, useEffect as W, useCallback as X, useMemo as ne } from "react";
5
+ function xe({
6
+ jeton: o,
6
7
  site: t,
7
- apiBaseUrl: s,
8
+ apiBaseUrl: a,
8
9
  surJetonRefuse: r
9
10
  }) {
10
- const a = {
11
+ const d = {
11
12
  "Content-Type": "application/json",
12
- Authorization: "Bearer " + n
13
+ Authorization: "Bearer " + o
13
14
  };
14
- function d(o, i) {
15
- if (i && (o.status === 401 || o.status === 403) && r(), !o.ok) throw new Error(String(o.status));
15
+ function s(n, u) {
16
+ if (u && (n.status === 401 || n.status === 403) && r(), !n.ok) throw new Error(String(n.status));
16
17
  }
17
- async function l(o, i = !0) {
18
- const h = await fetch(s + o, {
19
- headers: i ? a : void 0
18
+ async function l(n, u = !0) {
19
+ const x = await fetch(a + n, {
20
+ headers: u ? d : void 0
20
21
  });
21
- return d(h, i), await h.json();
22
+ return s(x, u), await x.json();
22
23
  }
23
- async function b(o, i, h) {
24
- const v = await fetch(s + o, {
25
- method: i,
26
- headers: a,
27
- body: h === void 0 ? void 0 : JSON.stringify(h)
24
+ async function g(n, u, x) {
25
+ const v = await fetch(a + n, {
26
+ method: u,
27
+ headers: d,
28
+ body: x === void 0 ? void 0 : JSON.stringify(x)
28
29
  });
29
- return d(v, !0), await v.json();
30
+ return s(v, !0), await v.json();
30
31
  }
31
32
  return {
32
33
  /** Les blocs que le site a déclaré savoir afficher. Route publique. */
33
34
  schemas: () => l("/site-sections/public/" + encodeURIComponent(t) + "/schemas", !1),
34
35
  /** Ce qui existe sur une page, brouillons compris. */
35
- pourPage: (o) => l("/site-sections?page=" + encodeURIComponent(o)),
36
- creer: (o, i, h) => b("/site-sections", "POST", { page: o, blockType: i, draft: h }),
37
- enregistrerBrouillon: (o, i) => b("/site-sections/" + o + "/draft", "PUT", { draft: i }),
38
- publier: (o) => b("/site-sections/" + o + "/publish", "POST"),
36
+ pourPage: (n) => l("/site-sections?page=" + encodeURIComponent(n)),
37
+ creer: (n, u, x) => g("/site-sections", "POST", { page: n, blockType: u, draft: x }),
38
+ enregistrerBrouillon: (n, u) => g("/site-sections/" + n + "/draft", "PUT", { draft: u }),
39
+ publier: (n) => g("/site-sections/" + n + "/publish", "POST"),
39
40
  /** Ramène le brouillon à ce qui est en ligne. */
40
- annuler: (o) => b("/site-sections/" + o + "/revert", "POST")
41
+ annuler: (n) => g("/site-sections/" + n + "/revert", "POST")
41
42
  };
42
43
  }
43
- const be = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAYAAABV7bNHAAAW+UlEQVR42u17aZBc13Xed859r7tnATAASYALqBQlxZZBmaTNRREtagw5VEWyxZJcNVOKHNslRaJlu0I5UbSXaziRUq54VWJbjlwpxrQtx5ph2TJN2YQpGRizxEUiBYjCwg0kABLrEBxgML29d+/58uPe190ARRAbE9vCLXTNYKan+/b3vvOd75xzH3B+nV/n1/l1fp1f59fJFikA5J/i1v/fb3piwuHQOgE2AatXE7OzBoDfz/yRd//sL1/wsY99bJmTl7kiU1OK8fEMU1P6/cOgqSnF9LS9duo33jg/vzDnDh/tqmEevtxDw87c2fYRxy2XdLnjwbvvOMbBPY2PO8xtCoD8f2dW9iq+tgKwVq4/2H3d5atcIciOFZeggauMhsIMzbKLF5R7x2750LczH+5bXSu/tuMrf7LD5uY8IDEc160jpqftHxd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bLw+EOzs+0BgVNMbJd/nreRk1LdsiCoqgsFSXXxwPDLh+r4eAb847td/NVjE2dcf24z4OgnJhzGp7KB++cF3+dLzoNwfp1f59f5dX6dX6/m+r8Cl0QchG1LcQAAAABJRU5ErkJggg==", ve = {
44
45
  apiKey: "AIzaSyCpAeHlt1wZvM5KtYg7X7MDVnWVJT86gvc",
45
46
  authDomain: "lystech.firebaseapp.com",
46
47
  projectId: "lystech",
@@ -48,21 +49,21 @@ const be = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAYAAABV7bNHAA
48
49
  messagingSenderId: "237347321732",
49
50
  appId: "1:237347321732:web:7f9586d48e488d73ddcfd1"
50
51
  };
51
- function he() {
52
- return /* @__PURE__ */ f("span", { className: "marque", children: [
53
- /* @__PURE__ */ e("img", { src: be, alt: "", width: 22, height: 22 }),
52
+ function Ae() {
53
+ return /* @__PURE__ */ m("span", { className: "marque", children: [
54
+ /* @__PURE__ */ e("img", { src: he, alt: "", width: 22, height: 22 }),
54
55
  /* @__PURE__ */ e("span", { className: "marque__mot", children: "Lystech" })
55
56
  ] });
56
57
  }
57
- function xe() {
58
- return /* @__PURE__ */ f("svg", { viewBox: "0 0 18 18", "aria-hidden": "true", focusable: "false", className: "logo", children: [
58
+ function ye() {
59
+ return /* @__PURE__ */ m("svg", { viewBox: "0 0 18 18", "aria-hidden": "true", focusable: "false", className: "logo", children: [
59
60
  /* @__PURE__ */ e("path", { fill: "#4285F4", d: "M17.64 9.2c0-.64-.06-1.25-.16-1.84H9v3.48h4.84a4.14 4.14 0 0 1-1.8 2.72v2.26h2.91c1.7-1.57 2.69-3.88 2.69-6.62z" }),
60
61
  /* @__PURE__ */ e("path", { fill: "#34A853", d: "M9 18c2.43 0 4.47-.8 5.96-2.18l-2.91-2.26c-.81.54-1.84.86-3.05.86-2.34 0-4.33-1.58-5.04-3.71H.96v2.33A9 9 0 0 0 9 18z" }),
61
62
  /* @__PURE__ */ e("path", { fill: "#FBBC05", d: "M3.96 10.71a5.41 5.41 0 0 1 0-3.42V4.96H.96a9 9 0 0 0 0 8.08l3-2.33z" }),
62
63
  /* @__PURE__ */ e("path", { fill: "#EA4335", d: "M9 3.58c1.32 0 2.5.45 3.44 1.35l2.58-2.59C13.46.89 11.43 0 9 0A9 9 0 0 0 .96 4.96l3 2.33C4.67 5.16 6.66 3.58 9 3.58z" })
63
64
  ] });
64
65
  }
65
- function ve() {
66
+ function ke() {
66
67
  return /* @__PURE__ */ e("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", focusable: "false", className: "logo", children: /* @__PURE__ */ e(
67
68
  "path",
68
69
  {
@@ -71,14 +72,14 @@ function ve() {
71
72
  }
72
73
  ) });
73
74
  }
74
- function ye({
75
- site: n,
75
+ function Ce({
76
+ site: o,
76
77
  apiBaseUrl: t,
77
- methodes: s = ["google", "facebook"],
78
+ methodes: a = ["google", "facebook"],
78
79
  surJeton: r,
79
- surFermer: a
80
+ surFermer: d
80
81
  }) {
81
- const [d, l] = M({ nom: "repos" }), b = (v) => {
82
+ const [s, l] = P({ nom: "repos" }), g = (v) => {
82
83
  switch (v) {
83
84
  case "auth/popup-blocked":
84
85
  return "Votre navigateur a bloqué la fenêtre de connexion. Autorisez les fenêtres pour ce site, puis réessayez.";
@@ -94,25 +95,25 @@ function ye({
94
95
  default:
95
96
  return "La connexion a échoué. Réessayez dans un instant.";
96
97
  }
97
- }, o = async (v, S = !1) => {
98
- const P = await fetch(t + "/site-sections/edit-login/third-party", {
98
+ }, n = async (v, A = !1) => {
99
+ const T = await fetch(t + "/site-sections/edit-login/third-party", {
99
100
  method: "POST",
100
101
  headers: { "Content-Type": "application/json" },
101
102
  body: JSON.stringify({
102
- site: n,
103
+ site: o,
103
104
  token: v,
104
105
  tokenType: "firebase",
105
- demanderAcces: S
106
+ demanderAcces: A
106
107
  })
107
108
  });
108
- if (P.status === 429) {
109
+ if (T.status === 429) {
109
110
  l({
110
111
  nom: "erreur",
111
112
  texte: "Trop de tentatives. Réessayez dans quelques minutes."
112
113
  });
113
114
  return;
114
115
  }
115
- const y = await P.json().catch(() => null);
116
+ const y = await T.json().catch(() => null);
116
117
  if (y?.ok && y?.token) {
117
118
  r(y.token);
118
119
  return;
@@ -145,85 +146,85 @@ function ye({
145
146
  texte: "La connexion a échoué. Réessayez dans un instant."
146
147
  });
147
148
  }
148
- }, i = async (v) => {
149
+ }, u = async (v) => {
149
150
  l({ nom: "envoi", quoi: v });
150
151
  try {
151
- const [{ initializeApp: S, getApps: P }, y] = await Promise.all([
152
+ const [{ initializeApp: A, getApps: T }, y] = await Promise.all([
152
153
  import("./morceaux/index.esm-B4AB50RA.js"),
153
154
  import("./morceaux/index.esm-B4hL1FOE.js")
154
- ]), q = P().find((O) => O.name === "lystech-edition") ?? S(ge, "lystech-edition"), U = v === "google" ? new y.GoogleAuthProvider() : new y.FacebookAuthProvider(), E = await (await y.signInWithPopup(y.getAuth(q), U)).user.getIdToken();
155
- await o(E);
156
- } catch (S) {
157
- l({ nom: "erreur", texte: b(String(S?.code ?? "")) });
155
+ ]), j = T().find((S) => S.name === "lystech-edition") ?? A(ve, "lystech-edition"), U = v === "google" ? new y.GoogleAuthProvider() : new y.FacebookAuthProvider(), O = await (await y.signInWithPopup(y.getAuth(j), U)).user.getIdToken();
156
+ await n(O);
157
+ } catch (A) {
158
+ l({ nom: "erreur", texte: g(String(A?.code ?? "")) });
158
159
  }
159
- }, h = d.nom === "envoi";
160
- return /* @__PURE__ */ e("div", { className: "voile", role: "dialog", "aria-modal": "true", "aria-label": "Modifier ce site", children: /* @__PURE__ */ f("div", { className: "fenetre", children: [
160
+ }, x = s.nom === "envoi";
161
+ return /* @__PURE__ */ e("div", { className: "voile", role: "dialog", "aria-modal": "true", "aria-label": "Modifier ce site", children: /* @__PURE__ */ m("div", { className: "fenetre", children: [
161
162
  /* @__PURE__ */ e(
162
163
  "button",
163
164
  {
164
165
  type: "button",
165
166
  className: "fenetre__fermer",
166
- onClick: a,
167
+ onClick: d,
167
168
  "aria-label": "Fermer",
168
169
  children: "✕"
169
170
  }
170
171
  ),
171
- /* @__PURE__ */ f("div", { className: "fenetre__tete", children: [
172
- /* @__PURE__ */ e(he, {}),
172
+ /* @__PURE__ */ m("div", { className: "fenetre__tete", children: [
173
+ /* @__PURE__ */ e(Ae, {}),
173
174
  /* @__PURE__ */ e("h2", { className: "fenetre__titre", children: "Modifier ce site" }),
174
175
  /* @__PURE__ */ e("p", { className: "fenetre__sous", children: "Vous vous connectez à Lystech. Cet accès ne sert qu'à modifier le contenu de ce site." })
175
176
  ] }),
176
- /* @__PURE__ */ f("div", { className: "fenetre__corps", children: [
177
- d.nom === "erreur" && /* @__PURE__ */ e("p", { className: "message message--erreur", children: d.texte }),
178
- d.nom === "aucun-compte" && /* @__PURE__ */ e("p", { className: "message message--info", children: "Aucun compte Lystech ne correspond à cette adresse. Adressez-vous à la personne responsable du site." }),
179
- d.nom === "sans-acces" && /* @__PURE__ */ e("p", { className: "message message--info", children: "Vous êtes bien reconnu, mais vous n'avez pas encore le droit de modifier ce site. Vous pouvez le demander : la personne responsable recevra un courriel." }),
180
- d.nom === "demande-envoyee" && /* @__PURE__ */ e("p", { className: "message message--ok", children: "Demande envoyée. La personne responsable du site vous répondra." }),
181
- d.nom === "sans-acces" ? /* @__PURE__ */ e(
177
+ /* @__PURE__ */ m("div", { className: "fenetre__corps", children: [
178
+ s.nom === "erreur" && /* @__PURE__ */ e("p", { className: "message message--erreur", children: s.texte }),
179
+ s.nom === "aucun-compte" && /* @__PURE__ */ e("p", { className: "message message--info", children: "Aucun compte Lystech ne correspond à cette adresse. Adressez-vous à la personne responsable du site." }),
180
+ s.nom === "sans-acces" && /* @__PURE__ */ e("p", { className: "message message--info", children: "Vous êtes bien reconnu, mais vous n'avez pas encore le droit de modifier ce site. Vous pouvez le demander : la personne responsable recevra un courriel." }),
181
+ s.nom === "demande-envoyee" && /* @__PURE__ */ e("p", { className: "message message--ok", children: "Demande envoyée. La personne responsable du site vous répondra." }),
182
+ s.nom === "sans-acces" ? /* @__PURE__ */ e(
182
183
  "button",
183
184
  {
184
185
  type: "button",
185
186
  className: "bouton bouton--principal bouton--large",
186
187
  onClick: () => {
187
- o(d.jeton, !0);
188
+ n(s.jeton, !0);
188
189
  },
189
190
  children: "Demander l'accès"
190
191
  }
191
- ) : d.nom === "demande-envoyee" || d.nom === "aucun-compte" ? /* @__PURE__ */ e(
192
+ ) : s.nom === "demande-envoyee" || s.nom === "aucun-compte" ? /* @__PURE__ */ e(
192
193
  "button",
193
194
  {
194
195
  type: "button",
195
196
  className: "bouton bouton--large",
196
- onClick: a,
197
+ onClick: d,
197
198
  children: "Fermer"
198
199
  }
199
- ) : /* @__PURE__ */ f("div", { className: "fournisseurs", children: [
200
- s.includes("google") && /* @__PURE__ */ f(
200
+ ) : /* @__PURE__ */ m("div", { className: "fournisseurs", children: [
201
+ a.includes("google") && /* @__PURE__ */ m(
201
202
  "button",
202
203
  {
203
204
  type: "button",
204
205
  className: "fournisseur fournisseur--google",
205
- disabled: h,
206
+ disabled: x,
206
207
  onClick: () => {
207
- i("google");
208
+ u("google");
208
209
  },
209
210
  children: [
210
- /* @__PURE__ */ e(xe, {}),
211
- /* @__PURE__ */ e("span", { children: d.nom === "envoi" && d.quoi === "google" ? "Connexion…" : "Continuer avec Google" })
211
+ /* @__PURE__ */ e(ye, {}),
212
+ /* @__PURE__ */ e("span", { children: s.nom === "envoi" && s.quoi === "google" ? "Connexion…" : "Continuer avec Google" })
212
213
  ]
213
214
  }
214
215
  ),
215
- s.includes("facebook") && /* @__PURE__ */ f(
216
+ a.includes("facebook") && /* @__PURE__ */ m(
216
217
  "button",
217
218
  {
218
219
  type: "button",
219
220
  className: "fournisseur fournisseur--facebook",
220
- disabled: h,
221
+ disabled: x,
221
222
  onClick: () => {
222
- i("facebook");
223
+ u("facebook");
223
224
  },
224
225
  children: [
225
- /* @__PURE__ */ e(ve, {}),
226
- /* @__PURE__ */ e("span", { children: d.nom === "envoi" && d.quoi === "facebook" ? "Connexion…" : "Continuer avec Facebook" })
226
+ /* @__PURE__ */ e(ke, {}),
227
+ /* @__PURE__ */ e("span", { children: s.nom === "envoi" && s.quoi === "facebook" ? "Connexion…" : "Continuer avec Facebook" })
227
228
  ]
228
229
  }
229
230
  )
@@ -231,12 +232,12 @@ function ye({
231
232
  ] })
232
233
  ] }) });
233
234
  }
234
- function Ae(n, t) {
235
- const s = n && typeof n == "object" && !Array.isArray(n) ? Object.keys(n).filter((a) => /^[a-z]{2}(-[A-Za-z]{2})?$/.test(a)) : [], r = t.slice(0, 2);
236
- return Array.from(/* @__PURE__ */ new Set([r, ...s]));
235
+ function Ne(o, t) {
236
+ const a = o && typeof o == "object" && !Array.isArray(o) ? Object.keys(o).filter((d) => /^[a-z]{2}(-[A-Za-z]{2})?$/.test(d)) : [], r = t.slice(0, 2);
237
+ return Array.from(/* @__PURE__ */ new Set([r, ...a]));
237
238
  }
238
- function ke(n) {
239
- switch (n.type) {
239
+ function we(o) {
240
+ switch (o.type) {
240
241
  case "number":
241
242
  return 0;
242
243
  case "boolean":
@@ -247,14 +248,14 @@ function ke(n) {
247
248
  return "";
248
249
  }
249
250
  }
250
- function ne({ champ: n, valeur: t, changer: s }) {
251
- switch (n.type) {
251
+ function oe({ champ: o, valeur: t, changer: a }) {
252
+ switch (o.type) {
252
253
  case "richText":
253
254
  return /* @__PURE__ */ e(
254
255
  "textarea",
255
256
  {
256
257
  value: String(t ?? ""),
257
- onChange: (r) => s(r.target.value)
258
+ onChange: (r) => a(r.target.value)
258
259
  }
259
260
  );
260
261
  case "number":
@@ -263,17 +264,17 @@ function ne({ champ: n, valeur: t, changer: s }) {
263
264
  {
264
265
  type: "number",
265
266
  value: t === "" || t == null ? "" : String(t),
266
- onChange: (r) => s(r.target.value === "" ? "" : Number(r.target.value))
267
+ onChange: (r) => a(r.target.value === "" ? "" : Number(r.target.value))
267
268
  }
268
269
  );
269
270
  case "boolean":
270
- return /* @__PURE__ */ f("label", { className: "bascule", children: [
271
+ return /* @__PURE__ */ m("label", { className: "bascule", children: [
271
272
  /* @__PURE__ */ e(
272
273
  "input",
273
274
  {
274
275
  type: "checkbox",
275
276
  checked: t === !0,
276
- onChange: (r) => s(r.target.checked)
277
+ onChange: (r) => a(r.target.checked)
277
278
  }
278
279
  ),
279
280
  /* @__PURE__ */ e("span", { children: t === !0 ? "Oui" : "Non" })
@@ -284,18 +285,18 @@ function ne({ champ: n, valeur: t, changer: s }) {
284
285
  {
285
286
  type: "date",
286
287
  value: String(t ?? "").slice(0, 10),
287
- onChange: (r) => s(r.target.value)
288
+ onChange: (r) => a(r.target.value)
288
289
  }
289
290
  );
290
291
  case "choice":
291
- return /* @__PURE__ */ f(
292
+ return /* @__PURE__ */ m(
292
293
  "select",
293
294
  {
294
295
  value: String(t ?? ""),
295
- onChange: (r) => s(r.target.value),
296
+ onChange: (r) => a(r.target.value),
296
297
  children: [
297
298
  /* @__PURE__ */ e("option", { value: "", children: "—" }),
298
- (n.options ?? []).map((r) => /* @__PURE__ */ e("option", { value: r, children: r }, r))
299
+ (o.options ?? []).map((r) => /* @__PURE__ */ e("option", { value: r, children: r }, r))
299
300
  ]
300
301
  }
301
302
  );
@@ -305,18 +306,18 @@ function ne({ champ: n, valeur: t, changer: s }) {
305
306
  {
306
307
  type: "url",
307
308
  value: String(t ?? ""),
308
- onChange: (r) => s(r.target.value),
309
+ onChange: (r) => a(r.target.value),
309
310
  placeholder: "https://"
310
311
  }
311
312
  );
312
313
  case "image":
313
- return /* @__PURE__ */ f(re, { children: [
314
+ return /* @__PURE__ */ m(ae, { children: [
314
315
  /* @__PURE__ */ e(
315
316
  "input",
316
317
  {
317
318
  type: "url",
318
319
  value: String(t ?? ""),
319
- onChange: (r) => s(r.target.value),
320
+ onChange: (r) => a(r.target.value),
320
321
  placeholder: "https://…"
321
322
  }
322
323
  ),
@@ -328,34 +329,34 @@ function ne({ champ: n, valeur: t, changer: s }) {
328
329
  {
329
330
  type: "text",
330
331
  value: String(t ?? ""),
331
- onChange: (r) => s(r.target.value)
332
+ onChange: (r) => a(r.target.value)
332
333
  }
333
334
  );
334
335
  }
335
336
  }
336
- function se({ champ: n, valeur: t, changer: s, langue: r }) {
337
- if (n.type === "list") {
338
- const a = Array.isArray(t) ? t : [], d = n.of ?? [], l = (b, o, i) => {
339
- const h = a.map((v, S) => S === b ? { ...v, [o]: i } : v);
340
- s(h);
337
+ function ce({ champ: o, valeur: t, changer: a, langue: r }) {
338
+ if (o.type === "list") {
339
+ const d = Array.isArray(t) ? t : [], s = o.of ?? [], l = (g, n, u) => {
340
+ const x = d.map((v, A) => A === g ? { ...v, [n]: u } : v);
341
+ a(x);
341
342
  };
342
- return /* @__PURE__ */ f("div", { className: "champ", children: [
343
- /* @__PURE__ */ e("span", { className: "champ__etiquette", children: n.label }),
344
- n.help && /* @__PURE__ */ e("p", { className: "champ__aide", children: n.help }),
345
- a.map((b, o) => /* @__PURE__ */ f("div", { className: "liste__item", children: [
346
- /* @__PURE__ */ f("div", { className: "liste__tete", children: [
347
- /* @__PURE__ */ e("span", { className: "liste__rang", children: o + 1 }),
348
- /* @__PURE__ */ f("span", { style: { display: "flex", gap: 4 }, children: [
343
+ return /* @__PURE__ */ m("div", { className: "champ", children: [
344
+ /* @__PURE__ */ e("span", { className: "champ__etiquette", children: o.label }),
345
+ o.help && /* @__PURE__ */ e("p", { className: "champ__aide", children: o.help }),
346
+ d.map((g, n) => /* @__PURE__ */ m("div", { className: "liste__item", children: [
347
+ /* @__PURE__ */ m("div", { className: "liste__tete", children: [
348
+ /* @__PURE__ */ e("span", { className: "liste__rang", children: n + 1 }),
349
+ /* @__PURE__ */ m("span", { style: { display: "flex", gap: 4 }, children: [
349
350
  /* @__PURE__ */ e(
350
351
  "button",
351
352
  {
352
353
  type: "button",
353
354
  className: "bouton bouton--icone bouton--discret",
354
355
  title: "Monter",
355
- disabled: o === 0,
356
+ disabled: n === 0,
356
357
  onClick: () => {
357
- const i = [...a];
358
- [i[o - 1], i[o]] = [i[o], i[o - 1]], s(i);
358
+ const u = [...d];
359
+ [u[n - 1], u[n]] = [u[n], u[n - 1]], a(u);
359
360
  },
360
361
  children: "↑"
361
362
  }
@@ -366,10 +367,10 @@ function se({ champ: n, valeur: t, changer: s, langue: r }) {
366
367
  type: "button",
367
368
  className: "bouton bouton--icone bouton--discret",
368
369
  title: "Descendre",
369
- disabled: o === a.length - 1,
370
+ disabled: n === d.length - 1,
370
371
  onClick: () => {
371
- const i = [...a];
372
- [i[o], i[o + 1]] = [i[o + 1], i[o]], s(i);
372
+ const u = [...d];
373
+ [u[n], u[n + 1]] = [u[n + 1], u[n]], a(u);
373
374
  },
374
375
  children: "↓"
375
376
  }
@@ -380,207 +381,218 @@ function se({ champ: n, valeur: t, changer: s, langue: r }) {
380
381
  type: "button",
381
382
  className: "bouton bouton--icone bouton--discret",
382
383
  title: "Retirer",
383
- onClick: () => s(a.filter((i, h) => h !== o)),
384
+ onClick: () => a(d.filter((u, x) => x !== n)),
384
385
  children: "✕"
385
386
  }
386
387
  )
387
388
  ] })
388
389
  ] }),
389
- d.map((i) => /* @__PURE__ */ e(
390
- se,
390
+ s.map((u) => /* @__PURE__ */ e(
391
+ ce,
391
392
  {
392
- champ: i,
393
+ champ: u,
393
394
  langue: r,
394
- valeur: b?.[i.key],
395
- changer: (h) => l(o, i.key, h)
395
+ valeur: g?.[u.key],
396
+ changer: (x) => l(n, u.key, x)
396
397
  },
397
- i.key
398
+ u.key
398
399
  ))
399
- ] }, o)),
400
+ ] }, n)),
400
401
  /* @__PURE__ */ e(
401
402
  "button",
402
403
  {
403
404
  type: "button",
404
405
  className: "bouton",
405
- onClick: () => s([
406
- ...a,
407
- Object.fromEntries(d.map((b) => [b.key, ke(b)]))
406
+ onClick: () => a([
407
+ ...d,
408
+ Object.fromEntries(s.map((g) => [g.key, we(g)]))
408
409
  ]),
409
410
  children: "+ Ajouter"
410
411
  }
411
412
  )
412
413
  ] });
413
414
  }
414
- if (n.localized) {
415
- const a = Ae(t, r), d = t && typeof t == "object" && !Array.isArray(t) ? t : {};
416
- return /* @__PURE__ */ f("div", { className: "champ", children: [
417
- /* @__PURE__ */ e("span", { className: "champ__etiquette", children: n.label }),
418
- n.help && /* @__PURE__ */ e("p", { className: "champ__aide", children: n.help }),
419
- a.map((l) => /* @__PURE__ */ f("div", { style: { marginBottom: 8 }, children: [
415
+ if (o.localized) {
416
+ const d = Ne(t, r), s = t && typeof t == "object" && !Array.isArray(t) ? t : {};
417
+ return /* @__PURE__ */ m("div", { className: "champ", children: [
418
+ /* @__PURE__ */ e("span", { className: "champ__etiquette", children: o.label }),
419
+ o.help && /* @__PURE__ */ e("p", { className: "champ__aide", children: o.help }),
420
+ d.map((l) => /* @__PURE__ */ m("div", { style: { marginBottom: 8 }, children: [
420
421
  /* @__PURE__ */ e("span", { className: "champ__langue", children: l }),
421
422
  /* @__PURE__ */ e(
422
- ne,
423
+ oe,
423
424
  {
424
- champ: n,
425
- valeur: d[l],
426
- changer: (b) => s({ ...d, [l]: b })
425
+ champ: o,
426
+ valeur: s[l],
427
+ changer: (g) => a({ ...s, [l]: g })
427
428
  }
428
429
  )
429
430
  ] }, l))
430
431
  ] });
431
432
  }
432
- return /* @__PURE__ */ f("div", { className: "champ", children: [
433
- /* @__PURE__ */ e("label", { className: "champ__etiquette", children: n.label }),
434
- /* @__PURE__ */ e(ne, { champ: n, valeur: t, changer: s }),
435
- n.help && /* @__PURE__ */ e("p", { className: "champ__aide", children: n.help })
433
+ return /* @__PURE__ */ m("div", { className: "champ", children: [
434
+ /* @__PURE__ */ e("label", { className: "champ__etiquette", children: o.label }),
435
+ /* @__PURE__ */ e(oe, { champ: o, valeur: t, changer: a }),
436
+ o.help && /* @__PURE__ */ e("p", { className: "champ__aide", children: o.help })
436
437
  ] });
437
438
  }
438
- const we = ["lystech-editeur-hote", "lystech-connexion-hote"];
439
- function Ce(n) {
440
- const t = /* @__PURE__ */ new Map();
441
- for (const [s, r] of Object.entries(n))
442
- for (const [a, d] of Object.entries(r)) {
443
- const l = String(d ?? "").trim();
444
- if (l.length < 2 || l.includes("{{")) continue;
445
- const b = t.get(l);
446
- b ? b.push({ ns: s, chemin: a }) : t.set(l, [{ ns: s, chemin: a }]);
439
+ const Ee = ["lystech-editeur-hote", "lystech-connexion-hote"];
440
+ function Se(o, t) {
441
+ const a = /* @__PURE__ */ new Map();
442
+ for (const [r, d] of Object.entries(o))
443
+ for (const [s, l] of Object.entries(d)) {
444
+ const g = String(l ?? "").trim();
445
+ if (g.length < 2 || g.includes("{{") || !t(r, s)) continue;
446
+ const n = a.get(g);
447
+ n ? n.push({ ns: r, chemin: s }) : a.set(g, [{ ns: r, chemin: s }]);
447
448
  }
448
- return t;
449
+ return a;
449
450
  }
450
- function Ne(n) {
451
- const t = /* @__PURE__ */ new Map(), s = document.body.querySelectorAll("*");
452
- for (const r of s) {
453
- if (we.some((l) => r.id === l || r.closest("#" + l)) || r.children.length > 0) continue;
454
- const a = (r.textContent ?? "").trim();
455
- if (a.length < 2) continue;
456
- const d = n.get(a);
457
- d && t.set(r, { valeur: a, candidats: d });
451
+ function De(o) {
452
+ const t = /* @__PURE__ */ new Map(), a = document.body.querySelectorAll("*");
453
+ for (const r of a) {
454
+ if (Ee.some((l) => r.id === l || r.closest("#" + l)) || r.closest("." + ge) || r.children.length > 0) continue;
455
+ const d = (r.textContent ?? "").trim();
456
+ if (d.length < 2) continue;
457
+ const s = o.get(d);
458
+ s && t.set(r, { valeur: d, candidats: s });
458
459
  }
459
460
  return t;
460
461
  }
461
- function Ee({
462
- source: n,
462
+ function ze({
463
+ source: o,
463
464
  actif: t,
464
- surModification: s
465
+ modifiable: a,
466
+ surModification: r
465
467
  }) {
466
- const r = X(/* @__PURE__ */ new Map()), a = X(null), [d, l] = M(null), b = X(n);
467
- b.current = n;
468
- const o = X(s);
469
- return o.current = s, G(() => {
468
+ const d = Y(/* @__PURE__ */ new Map()), s = Y(null), [l, g] = P(null), n = Y(o);
469
+ n.current = o;
470
+ const u = Y(r);
471
+ u.current = r;
472
+ const x = Y(a);
473
+ x.current = a;
474
+ const v = Y(null);
475
+ return W(() => {
470
476
  if (!t) return;
471
- const i = b.current.langueCourante(), h = Ce(b.current.dictionnaire(i)), v = () => {
472
- r.current = Ne(h);
477
+ const A = () => {
478
+ const p = n.current, i = Se(
479
+ p.dictionnaire(p.langueCourante()),
480
+ x.current
481
+ );
482
+ d.current = De(i);
473
483
  };
474
- v();
475
- let S;
476
- const P = new MutationObserver(() => {
477
- a.current || (clearTimeout(S), S = setTimeout(v, 250));
484
+ v.current = A, A();
485
+ let T;
486
+ const y = new MutationObserver(() => {
487
+ s.current || (clearTimeout(T), T = setTimeout(A, 250));
478
488
  });
479
- P.observe(document.body, { childList: !0, subtree: !0 });
480
- const y = "outline:2px dashed rgba(59,165,141,.85);outline-offset:3px;border-radius:3px;cursor:text;", q = (p) => {
481
- const c = p.target;
482
- !(c instanceof HTMLElement) || a.current || r.current.has(c) && (c.dataset.lysStyleAvant || (c.dataset.lysStyleAvant = c.getAttribute("style") ?? ""), c.setAttribute(
489
+ y.observe(document.body, { childList: !0, subtree: !0 });
490
+ const j = "outline:2px dashed rgba(59,165,141,.85);outline-offset:3px;border-radius:3px;cursor:text;", U = (p) => {
491
+ const i = p.target;
492
+ !(i instanceof HTMLElement) || s.current || d.current.has(i) && (i.dataset.lysStyleAvant || (i.dataset.lysStyleAvant = i.getAttribute("style") ?? ""), i.setAttribute(
483
493
  "style",
484
- (c.dataset.lysStyleAvant ?? "") + y
494
+ (i.dataset.lysStyleAvant ?? "") + j
485
495
  ));
486
- }, U = (p) => {
487
- const c = p.target;
488
- if (!(c instanceof HTMLElement) || a.current?.el === c || c.dataset.lysStyleAvant === void 0) return;
489
- const x = c.dataset.lysStyleAvant;
490
- delete c.dataset.lysStyleAvant, x ? c.setAttribute("style", x) : c.removeAttribute("style");
491
- }, I = (p, c) => {
492
- const x = p.getAttribute("style") ?? "";
493
- a.current = {
496
+ }, I = (p) => {
497
+ const i = p.target;
498
+ if (!(i instanceof HTMLElement) || s.current?.el === i || i.dataset.lysStyleAvant === void 0) return;
499
+ const h = i.dataset.lysStyleAvant;
500
+ delete i.dataset.lysStyleAvant, h ? i.setAttribute("style", h) : i.removeAttribute("style");
501
+ }, O = (p, i) => {
502
+ const h = p.getAttribute("style") ?? "";
503
+ s.current = {
494
504
  el: p,
495
505
  avant: (p.textContent ?? "").trim(),
496
- ns: c.ns,
497
- chemin: c.chemin,
498
- styleAvant: p.dataset.lysStyleAvant ?? x
506
+ ns: i.ns,
507
+ chemin: i.chemin,
508
+ styleAvant: p.dataset.lysStyleAvant ?? h
499
509
  }, p.setAttribute("contenteditable", "plaintext-only"), p.setAttribute(
500
510
  "style",
501
511
  (p.dataset.lysStyleAvant ?? "") + "outline:2px solid #3ba58d;outline-offset:3px;border-radius:3px;"
502
512
  ), p.focus();
503
- const _ = window.getSelection(), Q = document.createRange();
504
- Q.selectNodeContents(p), _?.removeAllRanges(), _?.addRange(Q);
505
- }, E = async (p) => {
506
- const c = a.current;
507
- if (!c) return;
508
- a.current = null;
509
- const x = (c.el.textContent ?? "").trim();
510
- c.el.removeAttribute("contenteditable");
511
- const _ = c.el.dataset.lysStyleAvant;
512
- if (delete c.el.dataset.lysStyleAvant, _ ? c.el.setAttribute("style", _) : c.el.removeAttribute("style"), p || x === c.avant) {
513
- p && (c.el.textContent = c.avant);
513
+ const B = window.getSelection(), Q = document.createRange();
514
+ Q.selectNodeContents(p), B?.removeAllRanges(), B?.addRange(Q);
515
+ }, S = async (p) => {
516
+ const i = s.current;
517
+ if (!i) return;
518
+ s.current = null;
519
+ const h = (i.el.textContent ?? "").trim();
520
+ i.el.removeAttribute("contenteditable");
521
+ const B = i.el.dataset.lysStyleAvant;
522
+ if (delete i.el.dataset.lysStyleAvant, B ? i.el.setAttribute("style", B) : i.el.removeAttribute("style"), p || h === i.avant) {
523
+ p && (i.el.textContent = i.avant);
514
524
  return;
515
525
  }
516
- const Q = b.current.langueCourante();
517
- b.current.poser(Q, c.ns, c.chemin, x), await o.current(c.ns, c.chemin, Q, x);
518
- }, O = (p) => {
519
- const c = p.target;
520
- if (!(c instanceof HTMLElement)) return;
521
- if (a.current) {
522
- if (a.current.el === c) return;
523
- E(!1);
526
+ const Q = n.current.langueCourante();
527
+ n.current.poser(Q, i.ns, i.chemin, h), await u.current(i.ns, i.chemin, Q, h);
528
+ }, D = (p) => {
529
+ const i = p.target;
530
+ if (!(i instanceof HTMLElement)) return;
531
+ if (s.current) {
532
+ if (s.current.el === i) return;
533
+ S(!1);
524
534
  }
525
- const x = r.current.get(c);
526
- if (x) {
527
- if (p.preventDefault(), p.stopPropagation(), x.candidats.length === 1) {
528
- I(c, x.candidats[0]);
535
+ const h = d.current.get(i);
536
+ if (h) {
537
+ if (p.preventDefault(), p.stopPropagation(), h.candidats.length === 1) {
538
+ O(i, h.candidats[0]);
529
539
  return;
530
540
  }
531
- l({
532
- el: c,
533
- candidats: x.candidats,
541
+ g({
542
+ el: i,
543
+ candidats: h.candidats,
534
544
  x: p.clientX,
535
545
  y: p.clientY
536
546
  });
537
547
  }
538
- }, z = (p) => {
539
- a.current && (p.key === "Escape" ? (p.preventDefault(), E(!0)) : p.key === "Enter" && !p.shiftKey && (p.preventDefault(), E(!1)));
540
- }, L = () => {
541
- a.current && E(!1);
548
+ }, M = (p) => {
549
+ s.current && (p.key === "Escape" ? (p.preventDefault(), S(!0)) : p.key === "Enter" && !p.shiftKey && (p.preventDefault(), S(!1)));
550
+ }, _ = () => {
551
+ s.current && S(!1);
542
552
  };
543
- document.addEventListener("mouseover", q, !0), document.addEventListener("mouseout", U, !0), document.addEventListener("click", O, !0);
544
- const V = (p) => {
545
- if (!a.current) return;
546
- const c = p.inputType;
547
- (c === "insertParagraph" || c === "insertLineBreak") && (p.preventDefault(), E(!1));
553
+ document.addEventListener("mouseover", U, !0), document.addEventListener("mouseout", I, !0), document.addEventListener("click", D, !0);
554
+ const G = (p) => {
555
+ if (!s.current) return;
556
+ const i = p.inputType;
557
+ (i === "insertParagraph" || i === "insertLineBreak") && (p.preventDefault(), S(!1));
548
558
  };
549
- return document.addEventListener("beforeinput", V, !0), document.addEventListener("keydown", z, !0), document.addEventListener("focusout", L, !0), window.__lysChoisir = (p, c) => {
550
- l(null), I(c, p);
559
+ return document.addEventListener("beforeinput", G, !0), document.addEventListener("keydown", M, !0), document.addEventListener("focusout", _, !0), window.__lysChoisir = (p, i) => {
560
+ g(null), O(i, p);
551
561
  }, () => {
552
- clearTimeout(S), P.disconnect(), document.removeEventListener("mouseover", q, !0), document.removeEventListener("mouseout", U, !0), document.removeEventListener("click", O, !0), document.removeEventListener("beforeinput", V, !0), document.removeEventListener("keydown", z, !0), document.removeEventListener("focusout", L, !0), a.current && E(!0), delete window.__lysChoisir;
562
+ v.current = null, clearTimeout(T), y.disconnect(), document.removeEventListener("mouseover", U, !0), document.removeEventListener("mouseout", I, !0), document.removeEventListener("click", D, !0), document.removeEventListener("beforeinput", G, !0), document.removeEventListener("keydown", M, !0), document.removeEventListener("focusout", _, !0), s.current && S(!0), delete window.__lysChoisir;
553
563
  };
554
- }, [t]), d ? /* @__PURE__ */ f(
564
+ }, [t]), W(() => {
565
+ s.current || v.current?.();
566
+ }, [a]), l ? /* @__PURE__ */ m(
555
567
  "div",
556
568
  {
557
569
  className: "choix",
558
570
  style: {
559
- top: Math.min(d.y + 10, window.innerHeight - 200),
560
- left: Math.min(d.x, window.innerWidth - 280)
571
+ top: Math.min(l.y + 10, window.innerHeight - 200),
572
+ left: Math.min(l.x, window.innerWidth - 280)
561
573
  },
562
574
  children: [
563
575
  /* @__PURE__ */ e("p", { className: "choix__titre", children: "Ce texte apparaît à plusieurs endroits." }),
564
576
  /* @__PURE__ */ e("p", { className: "choix__aide", children: "Lequel corrigez-vous ?" }),
565
- d.candidats.map((i) => /* @__PURE__ */ f(
577
+ l.candidats.map((A) => /* @__PURE__ */ m(
566
578
  "button",
567
579
  {
568
580
  type: "button",
569
581
  className: "choix__option",
570
- onClick: () => window.__lysChoisir?.(i, d.el),
582
+ onClick: () => window.__lysChoisir?.(A, l.el),
571
583
  children: [
572
- /* @__PURE__ */ e("span", { className: "choix__chemin", children: i.chemin }),
573
- /* @__PURE__ */ e("span", { className: "choix__ns", children: i.ns })
584
+ /* @__PURE__ */ e("span", { className: "choix__chemin", children: A.chemin }),
585
+ /* @__PURE__ */ e("span", { className: "choix__ns", children: A.ns })
574
586
  ]
575
587
  },
576
- i.ns + ":" + i.chemin
588
+ A.ns + ":" + A.chemin
577
589
  )),
578
590
  /* @__PURE__ */ e(
579
591
  "button",
580
592
  {
581
593
  type: "button",
582
594
  className: "bouton bouton--discret",
583
- onClick: () => l(null),
595
+ onClick: () => g(null),
584
596
  children: "Annuler"
585
597
  }
586
598
  )
@@ -588,221 +600,220 @@ function Ee({
588
600
  }
589
601
  ) : null;
590
602
  }
591
- const Z = /^i18n:([^:]+):(.*)$/, $ = "commun", ee = "lystech-edit-mode";
592
- function oe(n, t) {
593
- return JSON.stringify(n ?? {}) === JSON.stringify(t ?? {});
603
+ const Z = /^i18n:([^:]+):(.*)$/, ee = "commun", te = "lystech-edit-mode";
604
+ function re(o, t) {
605
+ return JSON.stringify(o ?? {}) === JSON.stringify(t ?? {});
594
606
  }
595
- function Se({ api: n, pont: t }) {
596
- const [s, r] = M([]), [a, d] = M([]), [l, b] = M(t.page), [o, i] = M(null), [h, v] = M({}), [S, P] = M(!1), [y, q] = M(() => {
607
+ function Te({ api: o, pont: t }) {
608
+ const [a, r] = P([]), [d, s] = P([]), [l, g] = P(t.page), [n, u] = P(null), [x, v] = P({}), [A, T] = P(!1), [y, j] = P(() => {
597
609
  try {
598
- return window.localStorage.getItem(ee) === "circuler" ? "circuler" : "modifier";
610
+ return window.localStorage.getItem(te) === "circuler" ? "circuler" : "modifier";
599
611
  } catch {
600
612
  return "modifier";
601
613
  }
602
- }), U = () => q((u) => {
603
- const m = u === "modifier" ? "circuler" : "modifier";
614
+ }), U = () => j((c) => {
615
+ const f = c === "modifier" ? "circuler" : "modifier";
604
616
  try {
605
- window.localStorage.setItem(ee, m);
617
+ window.localStorage.setItem(te, f);
606
618
  } catch {
607
619
  }
608
- return m;
609
- }), [I, E] = M(!1), [O, z] = M(
620
+ return f;
621
+ }), [I, O] = P(!1), [S, D] = P(
610
622
  null
611
623
  );
612
- G(() => (t.surChangementDePage = (u) => {
613
- b(u), i(null), P(!1);
624
+ W(() => (t.surChangementDePage = (c) => {
625
+ g(c), u(null), T(!1);
614
626
  }, () => {
615
627
  t.surChangementDePage = void 0;
616
628
  }), [t]);
617
- const L = W(async () => {
629
+ const M = X(async () => {
618
630
  try {
619
- const [u, m] = await Promise.all([
620
- n.pourPage(l),
621
- l === $ ? Promise.resolve([]) : n.pourPage($)
622
- ]), g = [...u, ...m];
623
- return d(g), g;
631
+ const [c, f] = await Promise.all([
632
+ o.pourPage(l),
633
+ l === ee ? Promise.resolve([]) : o.pourPage(ee)
634
+ ]), b = [...c, ...f];
635
+ return s(b), b;
624
636
  } catch {
625
- return z({
637
+ return D({
626
638
  ton: "erreur",
627
639
  texte: "Impossible de lire le contenu du site."
628
640
  }), [];
629
641
  }
630
- }, [n, l]);
631
- G(() => {
632
- n.schemas().then(r).catch(() => r([]));
633
- }, [n]), G(() => {
634
- L();
635
- }, [L]);
636
- const V = W(
637
- (u, m) => {
638
- let g = null, A = -1;
639
- for (const k of s) {
640
- const w = Z.exec(k.blockType);
641
- if (!w || w[1] !== u) continue;
642
- const C = w[2];
643
- (C === "" || m === C || m.startsWith(C + ".")) && C.length > A && (g = k, A = C.length);
642
+ }, [o, l]);
643
+ W(() => {
644
+ o.schemas().then(r).catch(() => r([]));
645
+ }, [o]), W(() => {
646
+ M();
647
+ }, [M]);
648
+ const _ = X(
649
+ (c, f) => {
650
+ let b = null, k = -1;
651
+ for (const C of a) {
652
+ const N = Z.exec(C.blockType);
653
+ if (!N || N[1] !== c) continue;
654
+ const w = N[2];
655
+ (w === "" || f === w || f.startsWith(w + ".")) && w.length > k && (b = C, k = w.length);
644
656
  }
645
- if (!g) return null;
646
- const N = Z.exec(g.blockType)?.[2] ?? "", T = N ? m.slice(N.length + 1) : m;
647
- return { bloc: g, champ: T };
657
+ if (!b) return null;
658
+ const E = Z.exec(b.blockType)?.[2] ?? "", L = E ? f.slice(E.length + 1) : f;
659
+ return { bloc: b, champ: L };
648
660
  },
649
- [s]
650
- ), p = W(
651
- (u) => s.find((m) => m.blockType === u),
652
- [s]
653
- ), c = te(
654
- () => s.filter((u) => {
655
- const m = u.pages ?? [];
656
- return m.includes(l) || m.includes($);
657
- }),
658
- [s, l]
659
- ), x = te(
660
- () => a.filter((u) => u.draft && !oe(u.draft, u.data)),
661
661
  [a]
662
- ), _ = W(
663
- async (u, m, g, A) => {
664
- const N = V(u, m);
665
- if (!N) {
666
- z({
662
+ ), G = X(
663
+ (c, f) => _(c, f) !== null,
664
+ [_]
665
+ ), p = X(
666
+ (c) => a.find((f) => f.blockType === c),
667
+ [a]
668
+ ), i = ne(
669
+ () => a.filter((c) => {
670
+ const f = c.pages ?? [];
671
+ return f.includes(l) || f.includes(ee);
672
+ }),
673
+ [a, l]
674
+ ), h = ne(
675
+ () => d.filter((c) => c.draft && !re(c.draft, c.data)),
676
+ [d]
677
+ ), B = X(
678
+ async (c, f, b, k) => {
679
+ const E = _(c, f);
680
+ if (!E) {
681
+ D({
667
682
  ton: "erreur",
668
- texte: `Ce texte (${u}:${m}) n'appartient à aucun bloc déclaré.`
683
+ texte: `Ce texte (${c}:${f}) n'appartient à aucun bloc déclaré.`
669
684
  });
670
685
  return;
671
686
  }
672
- const T = a.find((D) => D.blockType === N.bloc.blockType), k = T?.draft ?? T?.data ?? {}, w = k[N.champ], C = N.bloc.fields.find((D) => D.key === N.champ), B = (
687
+ const L = d.find((z) => z.blockType === E.bloc.blockType), C = L?.draft ?? L?.data ?? {}, N = C[E.champ], w = E.bloc.fields.find((z) => z.key === E.champ), q = (
673
688
  /* `!declare.localized` et non `=== false` : un champ non traduit
674
689
  OMET la cle plutot que de la mettre a faux. Tester l'egalite
675
690
  stricte ne se declenchait donc jamais. */
676
- C && !C.localized ? A : w && typeof w == "object" && !Array.isArray(w) ? { ...w, [g]: A } : { [g]: A }
677
- ), j = { ...k, [N.champ]: B };
691
+ w && !w.localized ? k : N && typeof N == "object" && !Array.isArray(N) ? { ...N, [b]: k } : { [b]: k }
692
+ ), H = { ...C, [E.champ]: q };
678
693
  try {
679
- if (T?.UID)
680
- await n.enregistrerBrouillon(T.UID, j);
694
+ if (L?.UID)
695
+ await o.enregistrerBrouillon(L.UID, H);
681
696
  else {
682
- const D = N.bloc.pages?.[0] ?? l;
683
- await n.creer(D, N.bloc.blockType, j);
697
+ const z = E.bloc.pages?.[0] ?? l;
698
+ await o.creer(z, E.bloc.blockType, H);
684
699
  }
685
- await L(), z(null);
700
+ await M(), D(null);
686
701
  } catch {
687
- z({
702
+ D({
688
703
  ton: "erreur",
689
704
  texte: "Enregistrement impossible. Votre texte est toujours à l'écran."
690
705
  });
691
706
  }
692
707
  },
693
- [n, V, l, L, a]
708
+ [o, _, l, M, d]
694
709
  ), Q = async () => {
695
- if (!x.length) return;
696
- E(!0), z(null);
697
- const u = x.length;
710
+ if (!h.length) return;
711
+ O(!0), D(null);
712
+ const c = h.length;
698
713
  try {
699
- for (const m of x) await n.publier(m.UID);
700
- await L();
701
- for (const m of x) t.poserApercu(m.blockType, null);
702
- t.recharger(), z({
714
+ for (const f of h) await o.publier(f.UID);
715
+ await M();
716
+ for (const f of h) t.poserApercu(f.blockType, null);
717
+ t.recharger(), D({
703
718
  ton: "ok",
704
- texte: u === 1 ? "Publié. Vos visiteurs le voient maintenant." : `${u} modifications publiées.`
719
+ texte: c === 1 ? "Publié. Vos visiteurs le voient maintenant." : `${c} modifications publiées.`
705
720
  });
706
721
  } catch {
707
- z({
722
+ D({
708
723
  ton: "erreur",
709
724
  texte: "La publication a échoué. Rien n'a été mis en ligne."
710
725
  });
711
726
  } finally {
712
- E(!1);
727
+ O(!1);
713
728
  }
714
- }, le = async () => {
715
- E(!0);
729
+ }, de = async () => {
730
+ O(!0);
716
731
  try {
717
- const u = x.map((g) => g.blockType);
718
- for (const g of x) await n.annuler(g.UID);
719
- const m = await L();
720
- for (const g of u) t.poserApercu(g, null);
732
+ const c = h.map((b) => b.blockType);
733
+ for (const b of h) await o.annuler(b.UID);
734
+ const f = await M();
735
+ for (const b of c) t.poserApercu(b, null);
721
736
  if (t.sourceTexte) {
722
- const { appliquerAuxTextes: g } = await import("./morceaux/sourceTexte-BMPMpNg9.js");
723
- g(
724
- m.map((A) => ({ blockType: A.blockType, data: A.data })),
737
+ const { appliquerAuxTextes: b } = await import("./morceaux/sourceTexte-BMPMpNg9.js");
738
+ b(
739
+ f.map((k) => ({ blockType: k.blockType, data: k.data })),
725
740
  t.sourceTexte
726
741
  );
727
742
  }
728
- z({
743
+ D({
729
744
  ton: "info",
730
745
  texte: "Modifications abandonnées. On est revenu à ce qui est en ligne."
731
746
  });
732
747
  } finally {
733
- E(!1);
748
+ O(!1);
734
749
  }
735
- }, ue = (u) => {
736
- const m = a.find((k) => k.blockType === u), g = m?.draft ?? m?.data ?? {}, A = p(u), N = Z.exec(u), T = {};
737
- if (!N) {
738
- const k = t.replis?.[u];
739
- k && typeof k == "object" && !Array.isArray(k) && Object.assign(T, k);
750
+ }, pe = (c) => {
751
+ const f = d.find((C) => C.blockType === c), b = f?.draft ?? f?.data ?? {}, k = p(c), E = Z.exec(c), L = {};
752
+ if (!E) {
753
+ const C = t.replis?.[c];
754
+ C && typeof C == "object" && !Array.isArray(C) && Object.assign(L, C);
740
755
  }
741
- if (N && A && t.sourceTexte) {
742
- const k = N[1], w = N[2], C = t.sourceTexte.langues(), B = {};
743
- for (const D of C)
744
- B[D] = t.sourceTexte.dictionnaire(D)[k] ?? {};
745
- const j = t.sourceTexte.langueCourante();
746
- for (const D of A.fields) {
747
- const J = w ? w + "." + D.key : D.key;
748
- if (!D.localized) {
749
- const Y = B[j]?.[J] ?? C.map((R) => B[R]?.[J]).find((R) => typeof R == "string");
750
- typeof Y == "string" && (T[D.key] = Y);
756
+ if (E && k && t.sourceTexte) {
757
+ const C = E[1], N = E[2], w = t.sourceTexte.langues(), q = {};
758
+ for (const z of w)
759
+ q[z] = t.sourceTexte.dictionnaire(z)[C] ?? {};
760
+ const H = t.sourceTexte.langueCourante();
761
+ for (const z of k.fields) {
762
+ const K = N ? N + "." + z.key : z.key;
763
+ if (!z.localized) {
764
+ const V = q[H]?.[K] ?? w.map((F) => q[F]?.[K]).find((F) => typeof F == "string");
765
+ typeof V == "string" && (L[z.key] = V);
751
766
  continue;
752
767
  }
753
- const K = {};
754
- for (const Y of C) {
755
- const R = B[Y]?.[J];
756
- typeof R == "string" && (K[Y] = R);
768
+ const $ = {};
769
+ for (const V of w) {
770
+ const F = q[V]?.[K];
771
+ typeof F == "string" && ($[V] = F);
757
772
  }
758
- Object.keys(K).length && (T[D.key] = K);
773
+ Object.keys($).length && (L[z.key] = $);
759
774
  }
760
775
  }
761
- for (const [k, w] of Object.entries(g)) {
762
- const C = T[k], B = w && typeof w == "object" && !Array.isArray(w) && C && typeof C == "object" && !Array.isArray(C);
763
- T[k] = B ? { ...C, ...w } : w;
776
+ for (const [C, N] of Object.entries(b)) {
777
+ const w = L[C], q = N && typeof N == "object" && !Array.isArray(N) && w && typeof w == "object" && !Array.isArray(w);
778
+ L[C] = q ? { ...w, ...N } : N;
764
779
  }
765
- v(T), i(u), P(!1), z(null);
766
- }, de = (u, m) => v((g) => ({ ...g, [u]: m })), pe = async () => {
767
- if (o) {
768
- E(!0);
780
+ v(L), u(c), T(!1), D(null);
781
+ }, fe = (c, f) => v((b) => ({ ...b, [c]: f })), me = async () => {
782
+ if (n) {
783
+ O(!0);
769
784
  try {
770
- const u = a.find((g) => g.blockType === o);
771
- if (u?.UID) await n.enregistrerBrouillon(u.UID, h);
785
+ const c = d.find((b) => b.blockType === n);
786
+ if (c?.UID) await o.enregistrerBrouillon(c.UID, x);
772
787
  else {
773
- const g = p(o)?.pages?.[0] ?? l;
774
- await n.creer(g, o, h);
788
+ const b = p(n)?.pages?.[0] ?? l;
789
+ await o.creer(b, n, x);
775
790
  }
776
- const m = await L();
791
+ const f = await M();
777
792
  if (t.sourceTexte) {
778
- const { appliquerAuxTextes: g } = await import("./morceaux/sourceTexte-BMPMpNg9.js");
779
- g(
780
- m.map((A) => ({ blockType: A.blockType, data: A.draft ?? A.data })),
793
+ const { appliquerAuxTextes: b } = await import("./morceaux/sourceTexte-BMPMpNg9.js");
794
+ b(
795
+ f.map((k) => ({ blockType: k.blockType, data: k.draft ?? k.data })),
781
796
  t.sourceTexte
782
797
  );
783
798
  }
784
- Z.test(o) || t.poserApercu(o, h), z({
799
+ Z.test(n) || t.poserApercu(n, x), D({
785
800
  ton: "ok",
786
801
  texte: "Enregistré. Rien n'a encore changé pour vos visiteurs."
787
802
  });
788
803
  } catch {
789
- z({ ton: "erreur", texte: "L'enregistrement a échoué." });
804
+ D({ ton: "erreur", texte: "L'enregistrement a échoué." });
790
805
  } finally {
791
- E(!1);
806
+ O(!1);
792
807
  }
793
808
  }
794
- }, me = () => {
809
+ }, be = () => {
795
810
  try {
796
- window.localStorage.setItem("lystech-edit-sortie", "1"), window.localStorage.removeItem("lystech-edit"), window.localStorage.removeItem(ee);
811
+ window.localStorage.removeItem(te);
797
812
  } catch {
798
813
  }
799
- try {
800
- window.sessionStorage.removeItem("lystech-edit");
801
- } catch {
802
- }
803
- window.location.reload();
804
- }, F = o ? p(o) : void 0, H = !o && !S;
805
- return /* @__PURE__ */ f("div", { className: "calque", children: [
814
+ ie();
815
+ }, R = n ? p(n) : void 0, J = !n && !A;
816
+ return /* @__PURE__ */ m("div", { className: "calque", children: [
806
817
  /* @__PURE__ */ e(
807
818
  "div",
808
819
  {
@@ -811,14 +822,15 @@ function Se({ api: n, pont: t }) {
811
822
  }
812
823
  ),
813
824
  t.sourceTexte && /* @__PURE__ */ e(
814
- Ee,
825
+ ze,
815
826
  {
816
827
  source: t.sourceTexte,
817
- actif: H && !I && y === "modifier",
818
- surModification: _
828
+ actif: J && !I && y === "modifier",
829
+ modifiable: G,
830
+ surModification: B
819
831
  }
820
832
  ),
821
- H && /* @__PURE__ */ f("div", { className: "barre", children: [
833
+ J && /* @__PURE__ */ m("div", { className: "barre", children: [
822
834
  /* @__PURE__ */ e("span", { className: "barre__point" }),
823
835
  /* @__PURE__ */ e("span", { className: "barre__texte", children: y === "modifier" ? "Cliquez un texte pour le corriger" : "Navigation libre — les clics ouvrent les liens" }),
824
836
  /* @__PURE__ */ e(
@@ -831,8 +843,8 @@ function Se({ api: n, pont: t }) {
831
843
  children: y === "modifier" ? "Circuler" : "Modifier"
832
844
  }
833
845
  ),
834
- x.length > 0 ? /* @__PURE__ */ f(re, { children: [
835
- /* @__PURE__ */ e("span", { className: "barre__compte", children: x.length === 1 ? "1 modification non publiée" : `${x.length} modifications non publiées` }),
846
+ h.length > 0 ? /* @__PURE__ */ m(ae, { children: [
847
+ /* @__PURE__ */ e("span", { className: "barre__compte", children: h.length === 1 ? "1 modification non publiée" : `${h.length} modifications non publiées` }),
836
848
  /* @__PURE__ */ e(
837
849
  "button",
838
850
  {
@@ -848,7 +860,7 @@ function Se({ api: n, pont: t }) {
848
860
  {
849
861
  type: "button",
850
862
  className: "bouton bouton--discret",
851
- onClick: le,
863
+ onClick: de,
852
864
  disabled: I,
853
865
  children: "Abandonner"
854
866
  }
@@ -859,7 +871,7 @@ function Se({ api: n, pont: t }) {
859
871
  {
860
872
  type: "button",
861
873
  className: "bouton bouton--icone bouton--discret",
862
- onClick: () => P(!0),
874
+ onClick: () => T(!0),
863
875
  title: "Tous les contenus",
864
876
  "aria-label": "Tous les contenus",
865
877
  children: "⋮"
@@ -870,17 +882,17 @@ function Se({ api: n, pont: t }) {
870
882
  {
871
883
  type: "button",
872
884
  className: "bouton bouton--icone bouton--sortie",
873
- onClick: me,
885
+ onClick: be,
874
886
  title: "Quitter le mode édition",
875
887
  "aria-label": "Quitter le mode édition",
876
888
  children: "✕"
877
889
  }
878
890
  )
879
891
  ] }),
880
- O && H && /* @__PURE__ */ e("div", { className: "flottant", children: /* @__PURE__ */ e("p", { className: "message message--" + O.ton, children: O.texte }) }),
881
- S && /* @__PURE__ */ f("div", { className: "panneau", role: "dialog", "aria-label": "Tous les contenus", children: [
882
- /* @__PURE__ */ f("div", { className: "panneau__tete", children: [
883
- /* @__PURE__ */ f("div", { style: { flex: 1 }, children: [
892
+ S && J && /* @__PURE__ */ e("div", { className: "flottant", children: /* @__PURE__ */ e("p", { className: "message message--" + S.ton, children: S.texte }) }),
893
+ A && /* @__PURE__ */ m("div", { className: "panneau", role: "dialog", "aria-label": "Tous les contenus", children: [
894
+ /* @__PURE__ */ m("div", { className: "panneau__tete", children: [
895
+ /* @__PURE__ */ m("div", { style: { flex: 1 }, children: [
884
896
  /* @__PURE__ */ e("h2", { className: "panneau__titre", children: "Tous les contenus" }),
885
897
  /* @__PURE__ */ e("p", { className: "panneau__sous", children: "Y compris ce qui ne s'affiche pas dans la page : titre de l'onglet, description dans les moteurs de recherche, textes contenant une valeur calculée." })
886
898
  ] }),
@@ -889,75 +901,75 @@ function Se({ api: n, pont: t }) {
889
901
  {
890
902
  type: "button",
891
903
  className: "bouton bouton--icone bouton--discret",
892
- onClick: () => P(!1),
904
+ onClick: () => T(!1),
893
905
  "aria-label": "Fermer",
894
906
  children: "✕"
895
907
  }
896
908
  )
897
909
  ] }),
898
- /* @__PURE__ */ f("div", { className: "panneau__corps", children: [
899
- c.length === 0 && /* @__PURE__ */ e("p", { className: "message message--info", children: "Aucun contenu déclaré pour cette page." }),
900
- c.map((u) => {
901
- const m = a.find((A) => A.blockType === u.blockType), g = m?.draft && !oe(m.draft, m.data);
902
- return /* @__PURE__ */ f(
910
+ /* @__PURE__ */ m("div", { className: "panneau__corps", children: [
911
+ i.length === 0 && /* @__PURE__ */ e("p", { className: "message message--info", children: "Aucun contenu déclaré pour cette page." }),
912
+ i.map((c) => {
913
+ const f = d.find((k) => k.blockType === c.blockType), b = f?.draft && !re(f.draft, f.data);
914
+ return /* @__PURE__ */ m(
903
915
  "button",
904
916
  {
905
917
  type: "button",
906
918
  className: "rangee",
907
- onClick: () => ue(u.blockType),
919
+ onClick: () => pe(c.blockType),
908
920
  children: [
909
- /* @__PURE__ */ e("span", { className: "rangee__nom", children: u.label }),
910
- /* @__PURE__ */ e("span", { className: "rangee__info", children: g ? "non publié" : `${u.fields.length} textes` })
921
+ /* @__PURE__ */ e("span", { className: "rangee__nom", children: c.label }),
922
+ /* @__PURE__ */ e("span", { className: "rangee__info", children: b ? "non publié" : `${c.fields.length} textes` })
911
923
  ]
912
924
  },
913
- u.blockType
925
+ c.blockType
914
926
  );
915
927
  })
916
928
  ] })
917
929
  ] }),
918
- o && F && /* @__PURE__ */ f(
930
+ n && R && /* @__PURE__ */ m(
919
931
  "div",
920
932
  {
921
933
  className: "panneau",
922
934
  role: "dialog",
923
- "aria-label": "Modifier " + F.label,
935
+ "aria-label": "Modifier " + R.label,
924
936
  children: [
925
- /* @__PURE__ */ f("div", { className: "panneau__tete", children: [
926
- /* @__PURE__ */ f("div", { style: { flex: 1 }, children: [
927
- /* @__PURE__ */ e("h2", { className: "panneau__titre", children: F.label }),
928
- F.description && /* @__PURE__ */ e("p", { className: "panneau__sous", children: F.description })
937
+ /* @__PURE__ */ m("div", { className: "panneau__tete", children: [
938
+ /* @__PURE__ */ m("div", { style: { flex: 1 }, children: [
939
+ /* @__PURE__ */ e("h2", { className: "panneau__titre", children: R.label }),
940
+ R.description && /* @__PURE__ */ e("p", { className: "panneau__sous", children: R.description })
929
941
  ] }),
930
942
  /* @__PURE__ */ e(
931
943
  "button",
932
944
  {
933
945
  type: "button",
934
946
  className: "bouton bouton--icone bouton--discret",
935
- onClick: () => i(null),
947
+ onClick: () => u(null),
936
948
  "aria-label": "Fermer",
937
949
  children: "✕"
938
950
  }
939
951
  )
940
952
  ] }),
941
- /* @__PURE__ */ f("div", { className: "panneau__corps", children: [
942
- O && /* @__PURE__ */ e("p", { className: "message message--" + O.ton, children: O.texte }),
943
- F.fields.map((u) => /* @__PURE__ */ e(
944
- se,
953
+ /* @__PURE__ */ m("div", { className: "panneau__corps", children: [
954
+ S && /* @__PURE__ */ e("p", { className: "message message--" + S.ton, children: S.texte }),
955
+ R.fields.map((c) => /* @__PURE__ */ e(
956
+ ce,
945
957
  {
946
- champ: u,
958
+ champ: c,
947
959
  langue: t.langue,
948
- valeur: h[u.key],
949
- changer: (m) => de(u.key, m)
960
+ valeur: x[c.key],
961
+ changer: (f) => fe(c.key, f)
950
962
  },
951
- u.key
963
+ c.key
952
964
  ))
953
965
  ] }),
954
- /* @__PURE__ */ f("div", { className: "panneau__pied", children: [
966
+ /* @__PURE__ */ m("div", { className: "panneau__pied", children: [
955
967
  /* @__PURE__ */ e(
956
968
  "button",
957
969
  {
958
970
  type: "button",
959
971
  className: "bouton bouton--discret",
960
- onClick: () => i(null),
972
+ onClick: () => u(null),
961
973
  disabled: I,
962
974
  children: "Fermer"
963
975
  }
@@ -968,7 +980,7 @@ function Se({ api: n, pont: t }) {
968
980
  {
969
981
  type: "button",
970
982
  className: "bouton bouton--principal",
971
- onClick: pe,
983
+ onClick: me,
972
984
  disabled: I,
973
985
  children: "Enregistrer"
974
986
  }
@@ -979,7 +991,7 @@ function Se({ api: n, pont: t }) {
979
991
  )
980
992
  ] });
981
993
  }
982
- const ze = `
994
+ const Le = `
983
995
  :host {
984
996
  all: initial;
985
997
  --fond: #16181d;
@@ -1101,69 +1113,98 @@ const ze = `
1101
1113
 
1102
1114
  /* --------------------------------------------------- CONNEXION ---------- */
1103
1115
 
1104
- /* Le voile PREND les clics, lui : une boite de dialogue qui demande un mot de
1105
- passe ne doit pas laisser cliquer la page derriere elle. C'est l'exception
1106
- a la regle du calque, et elle est volontaire. */
1116
+ /* LA CONNEXION EST CLAIRE, AUX COULEURS DE LYSTECH. L'éditeur reste un outil
1117
+ sombre qui s'efface derrière le travail ; la connexion, elle, est l'instant
1118
+ où quelqu'un décide de faire confiance. Il doit y reconnaître Lystech — la
1119
+ fleur, son pétrole et son turquoise, sur du blanc — et non une boîte noire
1120
+ posée sur son site.
1121
+
1122
+ Le thème se redéfinit ICI, sur le voile : les boutons, messages et champs
1123
+ partagés avec l'éditeur suivent ces variables sans une règle de plus, et
1124
+ l'éditeur garde les siennes. Clair quel que soit le thème du système :
1125
+ c'est un choix de marque. */
1107
1126
  .voile {
1127
+ --fond: #ffffff;
1128
+ --fond-clair: #f4f7f8;
1129
+ --bord: #dfe6e9;
1130
+ --texte: #0b1f26;
1131
+ --texte-doux: #52666f;
1132
+ --petrole: #084050;
1133
+ --petrole-survol: #0b5468;
1134
+ --turquoise: #10b8b0;
1135
+ --focus: #0c8f89;
1136
+
1108
1137
  position: fixed;
1109
1138
  inset: 0;
1110
1139
  display: flex;
1111
1140
  align-items: center;
1112
1141
  justify-content: center;
1113
1142
  padding: 16px;
1114
- background: rgba(8, 10, 14, 0.62);
1115
- backdrop-filter: blur(2px);
1143
+ /* Le voile PREND les clics, lui : une boîte de dialogue qui demande une
1144
+ identité ne doit pas laisser cliquer la page derrière elle. C'est
1145
+ l'exception à la règle du calque, et elle est volontaire. Teinté pétrole
1146
+ plutôt que noir : on assombrit le site sans l'éteindre. */
1147
+ background: rgba(8, 44, 56, 0.34);
1148
+ backdrop-filter: blur(4px) saturate(115%);
1149
+ color: var(--texte);
1116
1150
  }
1117
1151
 
1118
1152
  .fenetre {
1119
1153
  position: relative;
1120
- width: min(408px, 100%);
1154
+ width: min(400px, 100%);
1121
1155
  max-height: 92vh;
1122
1156
  overflow-y: auto;
1123
- padding: 30px 28px 20px;
1124
- border: 1px solid var(--bord);
1125
- border-radius: 18px;
1126
- /* Une lueur d'accent dans le coin superieur : de la presence, sans le
1127
- degrade violet-bleu qu'on voit sur une page d'accueil sur deux. */
1157
+ padding: 34px 30px 26px;
1158
+ border: 1px solid rgba(8, 64, 80, 0.10);
1159
+ border-radius: 20px;
1160
+ /* La lueur turquoise de la fleur, à peine, en haut de la carte. */
1128
1161
  background:
1129
- radial-gradient(120% 90% at 50% -20%, rgba(59, 165, 141, 0.16), transparent 62%),
1162
+ radial-gradient(90% 60% at 50% -12%, rgba(16, 184, 176, 0.13), transparent 70%),
1130
1163
  var(--fond);
1131
- box-shadow: 0 28px 70px rgba(0, 0, 0, 0.55);
1164
+ box-shadow:
1165
+ 0 1px 2px rgba(8, 64, 80, 0.06),
1166
+ 0 28px 64px -18px rgba(8, 44, 56, 0.45);
1132
1167
  text-align: center;
1133
1168
  }
1134
1169
 
1135
1170
  .fenetre__fermer {
1136
- position: absolute; top: 12px; right: 12px;
1137
- width: 30px; height: 30px;
1171
+ position: absolute; top: 14px; right: 14px;
1172
+ width: 32px; height: 32px;
1138
1173
  display: inline-flex; align-items: center; justify-content: center;
1139
- border: 0; border-radius: 8px;
1174
+ border: 0; border-radius: 9px;
1140
1175
  background: transparent; color: var(--texte-doux);
1141
1176
  font: inherit; font-size: 14px; cursor: pointer;
1142
1177
  }
1143
1178
  .fenetre__fermer:hover { background: var(--fond-clair); color: var(--texte); }
1179
+ .fenetre__fermer:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
1144
1180
 
1145
1181
  /* ------------------------------------------------------------ MARQUE ---- */
1146
1182
 
1147
1183
  .marque {
1148
- display: inline-flex; align-items: center; gap: 8px;
1184
+ display: inline-flex; flex-direction: column; align-items: center; gap: 8px;
1149
1185
  margin-bottom: 18px;
1150
1186
  }
1151
- .marque img { width: 22px; height: 22px; display: block; }
1187
+ .marque img {
1188
+ width: 44px; height: 44px; display: block;
1189
+ filter: drop-shadow(0 6px 14px rgba(16, 184, 176, 0.28));
1190
+ }
1152
1191
  .marque__mot {
1153
- font-size: 12px; font-weight: 600;
1154
- letter-spacing: 0.18em; text-transform: uppercase;
1155
- color: #6fd3bd;
1192
+ font-size: 11.5px; font-weight: 700;
1193
+ letter-spacing: 0.24em; text-transform: uppercase;
1194
+ color: var(--petrole);
1156
1195
  }
1157
1196
 
1158
1197
  .fenetre__titre {
1159
- margin: 0 0 6px;
1160
- font-size: 20px; font-weight: 640; letter-spacing: -0.01em;
1198
+ margin: 0 0 8px;
1199
+ font-size: 21px; font-weight: 700; letter-spacing: -0.015em;
1161
1200
  color: var(--texte);
1201
+ text-wrap: balance;
1162
1202
  }
1163
1203
  .fenetre__sous {
1164
- margin: 0 auto 22px;
1165
- max-width: 30ch;
1166
- font-size: 13px; line-height: 1.5; color: var(--texte-doux);
1204
+ margin: 0 auto 24px;
1205
+ max-width: 36ch;
1206
+ font-size: 13.5px; line-height: 1.55; color: var(--texte-doux);
1207
+ text-wrap: balance;
1167
1208
  }
1168
1209
  .fenetre__corps { text-align: left; }
1169
1210
 
@@ -1173,27 +1214,46 @@ const ze = `
1173
1214
 
1174
1215
  .fournisseur {
1175
1216
  display: flex; align-items: center; justify-content: center; gap: 10px;
1176
- width: 100%; padding: 12px 16px;
1177
- border: 1px solid transparent; border-radius: 10px;
1217
+ width: 100%; min-height: 46px; padding: 12px 16px;
1218
+ border: 1px solid transparent; border-radius: 12px;
1178
1219
  font: inherit; font-size: 14px; font-weight: 600;
1179
1220
  cursor: pointer;
1180
- transition: transform 90ms ease, filter 90ms ease;
1221
+ transition: transform 90ms ease, background-color 120ms ease, box-shadow 120ms ease;
1181
1222
  }
1182
- .fournisseur:hover { filter: brightness(1.06); }
1183
1223
  .fournisseur:active { transform: translateY(1px); }
1184
- .fournisseur:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
1185
- .fournisseur[disabled] { opacity: 0.55; cursor: default; transform: none; filter: none; }
1224
+ .fournisseur:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
1225
+ .fournisseur[disabled] { opacity: 0.55; cursor: default; transform: none; }
1186
1226
  .fournisseur .logo { width: 18px; height: 18px; flex: none; display: block; }
1187
1227
 
1188
1228
  /* LES COULEURS DE CHAQUE MARQUE, telles qu'elles les publient. Un bouton
1189
1229
  Google repeint aux couleurs du site devient moins reconnaissable — et un
1190
- bouton de connexion qu'on ne reconnait pas est un bouton sur lequel on
1191
- hesite a cliquer. */
1192
- .fournisseur--google { background: #fff; color: #1f1f1f; border-color: #dadce0; }
1230
+ bouton de connexion qu'on ne reconnaît pas est un bouton sur lequel on
1231
+ hésite à cliquer. */
1232
+ .fournisseur--google {
1233
+ background: #fff; color: #1f1f1f; border-color: #dadce0;
1234
+ box-shadow: 0 1px 2px rgba(8, 64, 80, 0.06);
1235
+ }
1236
+ .fournisseur--google:hover:not([disabled]) { background: #f6f9fa; border-color: #c9d3d8; }
1193
1237
  .fournisseur--facebook { background: #1877f2; color: #fff; }
1238
+ .fournisseur--facebook:hover:not([disabled]) { background: #166fe5; }
1194
1239
 
1195
1240
  .bouton--large { width: 100%; padding: 12px 16px; font-size: 14px; }
1196
1241
 
1242
+ /* Les boutons et messages PARTAGÉS avec l'éditeur, en version claire. */
1243
+ .voile .bouton {
1244
+ min-height: 44px; border-radius: 12px;
1245
+ background: #fff; color: var(--texte); border-color: #cfd9dd;
1246
+ }
1247
+ .voile .bouton:hover { background: var(--fond-clair); }
1248
+ .voile .bouton:focus-visible { outline-color: var(--focus); }
1249
+ .voile .bouton--principal { background: var(--petrole); border-color: var(--petrole); color: #fff; }
1250
+ .voile .bouton--principal:hover { background: var(--petrole-survol); }
1251
+
1252
+ .voile .message { font-size: 13px; line-height: 1.5; border-radius: 10px; }
1253
+ .voile .message--erreur { background: #fdf0ee; border-color: #f4c7bf; color: #a3321f; }
1254
+ .voile .message--ok { background: #e8f7f5; border-color: #a9e2dc; color: #0a5c57; }
1255
+ .voile .message--info { background: var(--fond-clair); border-color: var(--bord); color: #3a5159; }
1256
+
1197
1257
  @media (prefers-reduced-motion: reduce) {
1198
1258
  .fournisseur { transition: none; }
1199
1259
  }
@@ -1281,7 +1341,7 @@ input:focus, select:focus, textarea:focus {
1281
1341
  @media (prefers-reduced-motion: reduce) {
1282
1342
  * { transition: none !important; animation: none !important; }
1283
1343
  }
1284
- `, De = `
1344
+ `, Oe = `
1285
1345
  /* --------------------------------------------------------- CHOIX -------- */
1286
1346
 
1287
1347
  /* Quand un meme texte vient de plusieurs cles, on demande laquelle plutot que
@@ -1331,7 +1391,7 @@ input:focus, select:focus, textarea:focus {
1331
1391
  max-width: min(460px, calc(100vw - 24px));
1332
1392
  }
1333
1393
  .flottant .message { margin: 0; box-shadow: 0 8px 26px rgba(0,0,0,.4); }
1334
- `, Te = `
1394
+ `, Pe = `
1335
1395
  /* ON NE DOIT JAMAIS SE DEMANDER SI ON EST EN MODE EDITION. Une barre en bas
1336
1396
  se confond avec un bandeau de temoins ; un lisere qui borde tout l'ecran,
1337
1397
  present sur chaque page, ne se confond avec rien. Il ne prend aucun clic. */
@@ -1359,77 +1419,72 @@ input:focus, select:focus, textarea:focus {
1359
1419
  discrete le reste du temps — c'est le geste qu'on fait une fois. */
1360
1420
  .bouton--sortie { color: var(--texte-doux); background: transparent; border-color: transparent; }
1361
1421
  .bouton--sortie:hover { background: rgba(217, 119, 106, 0.16); color: var(--danger); }
1362
- `, Pe = "lystech-editeur-hote", Oe = "lystech-connexion-hote";
1363
- function ie(n) {
1364
- document.getElementById(n)?.remove();
1422
+ `, Me = "lystech-editeur-hote", Ie = "lystech-connexion-hote";
1423
+ function le(o) {
1424
+ document.getElementById(o)?.remove();
1365
1425
  const t = document.createElement("div");
1366
- t.id = n, document.body.appendChild(t);
1367
- const s = t.attachShadow({ mode: "open" }), r = document.createElement("style");
1368
- r.textContent = ze + De + Te, s.appendChild(r);
1369
- const a = document.createElement("div");
1370
- return s.appendChild(a), { hote: t, point: a };
1426
+ t.id = o, t.style.position = "relative", t.style.zIndex = "2147483000", document.body.appendChild(t);
1427
+ const a = t.attachShadow({ mode: "open" }), r = document.createElement("style");
1428
+ r.textContent = Le + Oe + Pe, a.appendChild(r);
1429
+ const d = document.createElement("div");
1430
+ return a.appendChild(d), { hote: t, point: d };
1371
1431
  }
1372
- function ce(n, t) {
1373
- let s = n;
1432
+ function ue(o, t) {
1433
+ let a = o;
1374
1434
  return () => {
1375
- const r = s;
1376
- s = null, setTimeout(() => {
1435
+ const r = a;
1436
+ a = null, setTimeout(() => {
1377
1437
  r?.unmount(), t.remove();
1378
1438
  }, 0);
1379
1439
  };
1380
1440
  }
1381
- function Be({
1382
- site: n,
1441
+ function Ue({
1442
+ site: o,
1383
1443
  apiBaseUrl: t,
1384
- methodes: s,
1444
+ methodes: a,
1385
1445
  surJeton: r
1386
1446
  }) {
1387
- const { hote: a, point: d } = ie(Oe), l = ae(d), b = () => o();
1447
+ const { hote: d, point: s } = le(Ie), l = se(s), g = () => n();
1388
1448
  l.render(
1389
1449
  /* @__PURE__ */ e(
1390
- ye,
1450
+ Ce,
1391
1451
  {
1392
- site: n,
1452
+ site: o,
1393
1453
  apiBaseUrl: t,
1394
- ...s ? { methodes: s } : {},
1395
- surJeton: (i) => {
1396
- o(), r(i);
1454
+ ...a ? { methodes: a } : {},
1455
+ surJeton: (u) => {
1456
+ n(), r(u);
1397
1457
  },
1398
- surFermer: b
1458
+ surFermer: g
1399
1459
  }
1400
1460
  )
1401
1461
  );
1402
- const o = ce(l, a);
1403
- return o;
1462
+ const n = ue(l, d);
1463
+ return n;
1404
1464
  }
1405
- function _e({
1406
- jeton: n,
1465
+ function Re({
1466
+ jeton: o,
1407
1467
  site: t,
1408
- apiBaseUrl: s,
1468
+ apiBaseUrl: a,
1409
1469
  pont: r
1410
1470
  }) {
1411
- const { hote: a, point: d } = ie(Pe), l = ae(d), b = () => {
1412
- try {
1413
- window.localStorage.setItem("lystech-edit-sortie", "1"), window.localStorage.removeItem("lystech-edit");
1414
- } catch {
1415
- }
1416
- try {
1417
- window.sessionStorage.removeItem("lystech-edit");
1418
- } catch {
1419
- }
1420
- window.location.reload();
1421
- };
1471
+ const { hote: d, point: s } = le(Me), l = se(s);
1422
1472
  return l.render(
1423
1473
  /* @__PURE__ */ e(
1424
- Se,
1474
+ Te,
1425
1475
  {
1426
- api: fe({ jeton: n, site: t, apiBaseUrl: s, surJetonRefuse: b }),
1476
+ api: xe({
1477
+ jeton: o,
1478
+ site: t,
1479
+ apiBaseUrl: a,
1480
+ surJetonRefuse: ie
1481
+ }),
1427
1482
  pont: r
1428
1483
  }
1429
1484
  )
1430
- ), ce(l, a);
1485
+ ), ue(l, d);
1431
1486
  }
1432
1487
  export {
1433
- Be as monterConnexion,
1434
- _e as monterEditeur
1488
+ Ue as monterConnexion,
1489
+ Re as monterEditeur
1435
1490
  };