@1024pix/epreuves-components 1.4.3 → 1.4.5

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.
@@ -1,108 +1,109 @@
1
- import { a as h, c as o, o as s, F as b, f as t, H as m, G as f, t as g, J as x, _, r as k, b as w, E as v, y as F, d as L } from "../_plugin-vue_export-helper-BaT1QC5Q.js";
2
- import { a as C, i as u, b as S } from "../i18n-BOk_ejZ-.js";
3
- import { s as z } from "../shuffled-CzcgAL34.js";
4
- const $ = {
1
+ import { a as b, c as o, o as s, F as u, f as t, D as g, I as f, t as p, E as _, _ as h, r as x, b as w, H as v, y as k, d as F } from "../_plugin-vue_export-helper-CwwQJ1m6.js";
2
+ import { a as L, i as m, b as C } from "../i18n-gncqQJ0G.js";
3
+ const S = {
5
4
  "flip-cards": {}
6
- }, j = ["aria-hidden"], E = ["src"], N = ["title-level"], B = ["aria-hidden"], U = ["aria-level"], K = { class: "description" }, R = { class: "image-container" }, V = ["src"], A = /* @__PURE__ */ h({
5
+ }, $ = ["aria-hidden"], z = ["src"], N = ["title-level"], j = ["aria-hidden"], E = ["aria-level"], B = { class: "description" }, U = { class: "image-container" }, D = ["src"], I = /* @__PURE__ */ b({
7
6
  __name: "FlipCard.ce",
8
7
  props: {
8
+ titleLevel: { type: Number },
9
9
  color: { type: String },
10
10
  description: { type: String },
11
11
  icon: { type: String },
12
12
  image: { type: String },
13
13
  isFlipped: { type: Boolean },
14
- name: { type: String },
15
- titleLevel: { type: Number }
14
+ name: { type: String }
16
15
  },
17
- setup(i) {
18
- const l = new URL(i.icon, import.meta.url).href, d = new URL(i.image, import.meta.url).href;
19
- return (a, c) => (s(), o(b, null, [
16
+ setup(r) {
17
+ const d = new URL(r.icon, import.meta.url).href, l = new URL(r.image, import.meta.url).href;
18
+ return (e, i) => (s(), o(u, null, [
20
19
  t("div", {
21
- class: m(["card recto", `${a.color}`]),
22
- "aria-hidden": a.isFlipped ? "true" : "false"
20
+ class: g(["card recto", `${e.color}`]),
21
+ "aria-hidden": e.isFlipped ? "true" : "false"
23
22
  }, [
24
23
  t("img", {
25
24
  class: "icon",
26
- src: f(l),
25
+ src: f(d),
27
26
  alt: ""
28
- }, null, 8, E),
27
+ }, null, 8, z),
29
28
  t("div", {
30
29
  role: "heading",
31
- "title-level": a.titleLevel,
30
+ "title-level": e.titleLevel,
32
31
  class: "title"
33
- }, g(a.name), 9, N)
34
- ], 10, j),
32
+ }, p(e.name), 9, N)
33
+ ], 10, $),
35
34
  t("div", {
36
- class: m(["card verso", { flipped: a.isFlipped, [a.color]: a.color }]),
37
- "aria-hidden": a.isFlipped ? "false" : "true"
35
+ class: g(["card verso", { flipped: e.isFlipped, [e.color]: e.color }]),
36
+ "aria-hidden": e.isFlipped ? "false" : "true"
38
37
  }, [
39
38
  t("div", {
40
39
  role: "heading",
41
- "aria-level": a.titleLevel,
40
+ "aria-level": e.titleLevel,
42
41
  class: "title"
43
- }, g(a.name), 9, U),
44
- t("p", K, g(a.description), 1),
45
- t("div", R, [
46
- f(d) ? (s(), o("img", {
42
+ }, p(e.name), 9, E),
43
+ t("p", B, p(e.description), 1),
44
+ t("div", U, [
45
+ f(l) ? (s(), o("img", {
47
46
  key: 0,
48
- src: f(d),
47
+ src: f(l),
49
48
  alt: ""
50
- }, null, 8, V)) : x("", !0)
49
+ }, null, 8, D)) : _("", !0)
51
50
  ])
52
- ], 10, B)
51
+ ], 10, j)
53
52
  ], 64));
54
53
  }
55
- }), D = "[data-v-1d94fd65]{box-sizing:border-box}.card[data-v-1d94fd65]{align-items:center;backface-visibility:hidden;-webkit-backface-visibility:hidden;background:#fff;border-radius:12px;color:#253858;display:flex;flex-direction:column;gap:1.2rem;inset:0;justify-content:center;padding:18px;position:absolute;transform:translateZ(0);transition:transform ease .5s}.card .title[data-v-1d94fd65]{font-family:Nunito,sans-serif;font-size:1rem;font-weight:700;line-height:29px}.card.recto.red[data-v-1d94fd65]{background:linear-gradient(150deg,#fff,#ff7373)}.card.recto.yellow[data-v-1d94fd65]{background:linear-gradient(150deg,#fff,#ffec73)}.card.recto.blue[data-v-1d94fd65]{background:linear-gradient(150deg,#fff,#2491ff)}.card.recto.purple[data-v-1d94fd65]{background:linear-gradient(150deg,#fff,#9177f2)}.card.recto.green[data-v-1d94fd65]{background:linear-gradient(150deg,#fff,#52d987)}.card.recto.pink[data-v-1d94fd65]{background:linear-gradient(150deg,#fff,#f041bf)}.card.recto .icon[data-v-1d94fd65]{display:block;height:auto;width:40px}.card.verso[data-v-1d94fd65]{line-height:1.2rem;padding:8px;text-align:center;transform:rotateY(180deg) translateZ(0)}.card.verso.flipped.red[data-v-1d94fd65]{border:2px solid #ff7373}.card.verso.flipped.yellow[data-v-1d94fd65]{border:2px solid #ffec73}.card.verso.flipped.blue[data-v-1d94fd65]{border:2px solid #2491ff}.card.verso.flipped.purple[data-v-1d94fd65]{border:2px solid #9177f2}.card.verso.flipped.green[data-v-1d94fd65]{border:2px solid #52d987}.card.verso.flipped.pink[data-v-1d94fd65]{border:2px solid #f041bf}.card.verso .description[data-v-1d94fd65]{font-size:.9rem;margin:0 0 8px}.card.verso .image-container[data-v-1d94fd65]{margin:8px 8px 16px;overflow:hidden;width:160px}.card.verso img[data-v-1d94fd65]{display:block;height:100%;object-fit:contain;width:100%}", G = /* @__PURE__ */ _(A, [["styles", [D]], ["__scopeId", "data-v-1d94fd65"]]), I = ["aria-label"], Y = ["aria-expanded", "onClick", "onKeydown"], Z = { class: "flip-container" }, H = /* @__PURE__ */ h({
54
+ }), K = "[data-v-897a493f]{box-sizing:border-box}.card[data-v-897a493f]{align-items:center;backface-visibility:hidden;-webkit-backface-visibility:hidden;background:#fff;border-radius:12px;color:#253858;display:flex;flex-direction:column;gap:1.2rem;inset:0;justify-content:center;padding:18px;position:absolute;transform:translateZ(0);transition:transform ease .5s}.card .title[data-v-897a493f]{font-family:Nunito,sans-serif;font-size:1rem;font-weight:700;line-height:29px}.card.recto.red[data-v-897a493f]{background:linear-gradient(150deg,#fff,#ff7373)}.card.recto.yellow[data-v-897a493f]{background:linear-gradient(150deg,#fff,#ffec73)}.card.recto.blue[data-v-897a493f]{background:linear-gradient(150deg,#fff,#2491ff)}.card.recto.purple[data-v-897a493f]{background:linear-gradient(150deg,#fff,#9177f2)}.card.recto.green[data-v-897a493f]{background:linear-gradient(150deg,#fff,#52d987)}.card.recto.pink[data-v-897a493f]{background:linear-gradient(150deg,#fff,#f041bf)}.card.recto .icon[data-v-897a493f]{display:block;height:auto;width:40px}.card.verso[data-v-897a493f]{line-height:1.2rem;padding:8px;text-align:center;transform:rotateY(180deg) translateZ(0)}.card.verso.flipped.red[data-v-897a493f]{border:2px solid #ff7373}.card.verso.flipped.yellow[data-v-897a493f]{border:2px solid #ffec73}.card.verso.flipped.blue[data-v-897a493f]{border:2px solid #2491ff}.card.verso.flipped.purple[data-v-897a493f]{border:2px solid #9177f2}.card.verso.flipped.green[data-v-897a493f]{border:2px solid #52d987}.card.verso.flipped.pink[data-v-897a493f]{border:2px solid #f041bf}.card.verso .description[data-v-897a493f]{font-size:.9rem;margin:0 0 8px}.card.verso .image-container[data-v-897a493f]{margin:8px 8px 16px;overflow:hidden;width:160px}.card.verso img[data-v-897a493f]{display:block;height:100%;object-fit:contain;width:100%}", R = /* @__PURE__ */ h(I, [["styles", [K]], ["__scopeId", "data-v-897a493f"]]), V = { class: "flip-cards" }, A = ["title-level"], Y = ["aria-expanded", "onClick", "onKeydown"], Z = { class: "flip-container" }, G = /* @__PURE__ */ b({
56
55
  __name: "FlipCards.ce",
57
56
  props: {
57
+ titleLevel: { default: 2, type: Number },
58
58
  name: { type: String },
59
59
  cardList: { type: Array }
60
60
  },
61
- setup(i) {
62
- const l = i, d = z(["red", "yellow", "blue", "purple", "green", "pink"]), a = k(
63
- l.cardList.map((r, p) => ({
64
- ...r,
65
- color: d[p % d.length],
66
- isFlipped: !1,
67
- titleLevel: r.titleLevel ?? 2
61
+ setup(r) {
62
+ const d = ["red", "yellow", "blue", "purple", "green", "pink"], l = x(
63
+ r.cardList.map((i, c) => ({
64
+ ...i,
65
+ color: d[c % d.length],
66
+ isFlipped: !1
68
67
  }))
69
- ), c = (r, p) => {
70
- p.preventDefault(), r.isFlipped = !r.isFlipped;
68
+ ), e = (i, c) => {
69
+ c.preventDefault(), i.isFlipped = !i.isFlipped;
71
70
  };
72
- return (r, p) => (s(), o("div", {
73
- class: "flip-cards",
74
- "aria-label": l.name
75
- }, [
76
- (s(!0), o(b, null, w(a.value, (e, y) => (s(), o("div", {
71
+ return (i, c) => (s(), o("div", V, [
72
+ t("div", {
73
+ role: "heading",
74
+ "title-level": i.titleLevel,
75
+ class: "sr-only"
76
+ }, p(i.name), 9, A),
77
+ (s(!0), o(u, null, w(l.value, (a, y) => (s(), o("div", {
77
78
  key: y,
78
- class: m(["card-container", { flipped: e.isFlipped, [e.color]: e.color }]),
79
+ class: g(["card-container", { flipped: a.isFlipped, [a.color]: a.color }]),
79
80
  role: "button",
80
81
  tabindex: "0",
81
- "aria-expanded": e.isFlipped,
82
- onClick: (n) => c(e, n),
82
+ "aria-expanded": a.isFlipped,
83
+ onClick: (n) => e(a, n),
83
84
  onKeydown: [
84
- v((n) => c(e, n), ["enter"]),
85
- v((n) => c(e, n), ["space"])
85
+ v((n) => e(a, n), ["enter"]),
86
+ v((n) => e(a, n), ["space"])
86
87
  ]
87
88
  }, [
88
89
  t("div", Z, [
89
- F(G, {
90
- color: e.color,
91
- description: e.description,
92
- icon: e.icon,
93
- image: e.image,
94
- "is-flipped": e.isFlipped,
95
- name: e.name,
96
- "title-level": e.titleLevel
90
+ k(R, {
91
+ color: a.color,
92
+ description: a.description,
93
+ icon: a.icon,
94
+ image: a.image,
95
+ "is-flipped": a.isFlipped,
96
+ name: a.name,
97
+ "title-level": i.titleLevel + 1
97
98
  }, null, 8, ["color", "description", "icon", "image", "is-flipped", "name", "title-level"])
98
99
  ])
99
100
  ], 42, Y))), 128))
100
- ], 8, I));
101
+ ]));
101
102
  }
102
- }), J = "[data-v-85c872ca]{box-sizing:border-box}.flip-cards[data-v-85c872ca]{display:flex;flex-wrap:wrap;gap:1.5rem;justify-content:center;max-width:100%;padding:0}.flip-cards .card-container[data-v-85c872ca]{cursor:pointer;flex:0 0 180px;height:250px;margin:0;perspective:1200px;outline:none;transform:scale(1);transition:transform ease .5s}.flip-cards .card-container[data-v-85c872ca]:hover,.flip-cards .card-container[data-v-85c872ca]:focus{transform:scale(1.05);transition:transform ease .5s;outline:none}.flip-cards .card-container .flip-container[data-v-85c872ca]{display:block;position:relative;width:100%;height:100%;padding:18px;transform-style:preserve-3d;transition:transform .6s cubic-bezier(.2,.8,.2,1);will-change:transform}.flip-cards .card-container.flipped .flip-container[data-v-85c872ca]{transform:rotateY(180deg)}", O = /* @__PURE__ */ _(H, [["styles", [J]], ["__scopeId", "data-v-85c872ca"]]);
103
- C(/* @__PURE__ */ Object.assign({ "./locales/fr.json": $ })).catch((i) => console.error(i));
104
- window.customElements.define("flip-cards", L(O, {
105
- configureApp(i) {
106
- u.changeLanguage(document?.documentElement?.lang || navigator.language), i.use(S, { i18next: u });
103
+ }), H = "[data-v-b2effb01]{box-sizing:border-box}.sr-only[data-v-b2effb01]{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.flip-cards[data-v-b2effb01]{display:flex;flex-wrap:wrap;gap:1.5rem;justify-content:center;max-width:100%;padding:0}.flip-cards .card-container[data-v-b2effb01]{cursor:pointer;flex:0 0 180px;height:250px;margin:0;perspective:1200px;outline:none;transform:scale(1);transition:transform ease .5s}.flip-cards .card-container[data-v-b2effb01]:hover,.flip-cards .card-container[data-v-b2effb01]:focus{transform:scale(1.05);transition:transform ease .5s;outline:none}.flip-cards .card-container .flip-container[data-v-b2effb01]{display:block;position:relative;width:100%;height:100%;padding:18px;transform-style:preserve-3d;transition:transform .6s cubic-bezier(.2,.8,.2,1);will-change:transform}.flip-cards .card-container.flipped .flip-container[data-v-b2effb01]{transform:rotateY(180deg)}", O = /* @__PURE__ */ h(G, [["styles", [H]], ["__scopeId", "data-v-b2effb01"]]);
104
+ L(/* @__PURE__ */ Object.assign({ "./locales/fr.json": S })).catch((r) => console.error(r));
105
+ window.customElements.define("flip-cards", F(O, {
106
+ configureApp(r) {
107
+ m.changeLanguage(document?.documentElement?.lang || navigator.language), r.use(C, { i18next: m });
107
108
  }
108
109
  }));
@@ -1,4 +1,4 @@
1
- import { d as e } from "../_plugin-vue_export-helper-BaT1QC5Q.js";
2
- import { I as m } from "../ImageQuiz.ce-BU1wvQqO.js";
1
+ import { d as e } from "../_plugin-vue_export-helper-CwwQJ1m6.js";
2
+ import { I as m } from "../ImageQuiz.ce-BLOWdEiw.js";
3
3
  window.customElements.define("image-quiz", e(m));
4
4
  window.customElements.define("qcu-image", e(m));
@@ -1,5 +1,5 @@
1
- import { a as l, r as f, w, c as z, o as t, b as p, e as d, m as g, F as v, d as _ } from "../_plugin-vue_export-helper-BaT1QC5Q.js";
2
- import { I as A } from "../ImageQuiz.ce-BU1wvQqO.js";
1
+ import { a as l, r as f, w, c as z, o as t, b as p, e as d, m as g, F as v, d as _ } from "../_plugin-vue_export-helper-CwwQJ1m6.js";
2
+ import { I as A } from "../ImageQuiz.ce-BLOWdEiw.js";
3
3
  const h = /* @__PURE__ */ l({
4
4
  __name: "ImageQuizzes.ce",
5
5
  props: {
@@ -1,6 +1,6 @@
1
- import { a as m, c as r, o as a, f as e, t as n, F as t, b as p, y as i, _ as c, d as g } from "../_plugin-vue_export-helper-BaT1QC5Q.js";
2
- import { L as l } from "../LLMMessage.ce-55YTC7a9.js";
3
- import { p as u } from "../shadow-dom-CLVtaG5r.js";
1
+ import { a as m, c as r, o as a, f as e, t as n, F as t, b as p, y as i, _ as c, d as g } from "../_plugin-vue_export-helper-CwwQJ1m6.js";
2
+ import { L as l } from "../LLMMessage.ce-DnZ8kE2i.js";
3
+ import { p as u } from "../shadow-dom-MxYtPVXS.js";
4
4
  const f = {
5
5
  class: "header",
6
6
  "aria-hidden": "true"
@@ -1,6 +1,6 @@
1
- import { a as m, B as i, C as p, c as o, o as e, F as d, b as g, e as u, _ as f, d as h } from "../_plugin-vue_export-helper-BaT1QC5Q.js";
2
- import { L as _ } from "../LLMMessage.ce-55YTC7a9.js";
3
- import { p as x } from "../shadow-dom-CLVtaG5r.js";
1
+ import { a as m, B as i, C as p, c as o, o as e, F as d, b as g, e as u, _ as f, d as h } from "../_plugin-vue_export-helper-CwwQJ1m6.js";
2
+ import { L as _ } from "../LLMMessage.ce-DnZ8kE2i.js";
3
+ import { p as x } from "../shadow-dom-MxYtPVXS.js";
4
4
  const b = {
5
5
  class: "llm-messages",
6
6
  "aria-live": "polite"
@@ -1,4 +1,4 @@
1
- import { a as v, r as c, z as y, c as i, o as d, y as h, f as l, A as w, F as f, b as k, t as S, _ as C, d as L } from "../_plugin-vue_export-helper-BaT1QC5Q.js";
1
+ import { a as v, r as c, z as y, c as i, o as d, y as h, f as l, A as w, F as f, b as k, t as S, _ as C, d as L } from "../_plugin-vue_export-helper-CwwQJ1m6.js";
2
2
  import "./llm-messages.ce.js.js";
3
3
  const N = { class: "prompt-select" }, P = { class: "prompt-select__options" }, A = ["disabled", "onClick"], B = /* @__PURE__ */ v({
4
4
  __name: "LLMPromptSelect.ce",
@@ -1,10 +1,10 @@
1
- import { a as D, r as k, k as M, h as $, c as t, o as s, H as w, J as m, f as h, A as x, t as v, y as B, K as E, m as T, F as b, b as N, _ as S, g as V, e as z, d as F } from "../_plugin-vue_export-helper-BaT1QC5Q.js";
2
- import { L } from "../Loading.ce-BQOiwGj0.js";
1
+ import { a as D, r as k, k as M, h as $, c as t, o as s, D as w, E as m, f as h, A as x, t as v, y as E, K as B, m as T, F as b, b as N, _ as S, g as V, e as z, d as F } from "../_plugin-vue_export-helper-CwwQJ1m6.js";
2
+ import { L } from "../Loading.ce-FI776zdC.js";
3
3
  const P = ["part"], I = {
4
4
  key: 1,
5
5
  class: "message__loader message__content",
6
6
  "aria-hidden": "true"
7
- }, j = ["part"], H = { key: 1 }, J = { key: 0 }, K = /* @__PURE__ */ D({
7
+ }, j = ["part"], K = { key: 1 }, O = { key: 0 }, R = /* @__PURE__ */ D({
8
8
  __name: "Message.ce",
9
9
  props: {
10
10
  displaySender: { type: Boolean, default: !0 },
@@ -46,22 +46,22 @@ const P = ["part"], I = {
46
46
  x(v(e.message.userName), 1)
47
47
  ], 8, P)) : m("", !0),
48
48
  i.value === "loading" ? (s(), t("div", I, [
49
- B(L)
49
+ E(L)
50
50
  ])) : m("", !0),
51
51
  h("p", {
52
52
  class: w(["message__content", { "hidden-state": i.value !== "visible" }]),
53
53
  part: `message ${e.message.direction}`
54
54
  }, [
55
- e.message.image ? (s(), t("img", E(T({ key: 0 }, e.message.image)), null, 16)) : m("", !0),
56
- e.message.image ? (s(), t("br", H)) : m("", !0),
55
+ e.message.image ? (s(), t("img", B(T({ key: 0 }, e.message.image)), null, 16)) : m("", !0),
56
+ e.message.image ? (s(), t("br", K)) : m("", !0),
57
57
  (s(!0), t(b, null, N(p.value, (o, r) => (s(), t(b, { key: r }, [
58
- r > 0 ? (s(), t("br", J)) : m("", !0),
58
+ r > 0 ? (s(), t("br", O)) : m("", !0),
59
59
  x(" " + v(o), 1)
60
60
  ], 64))), 128))
61
61
  ], 10, j)
62
62
  ], 2));
63
63
  }
64
- }), O = ".message{max-width:80%;position:relative}.message--incoming{align-self:start}.message--incoming .message__sender{padding-left:10px}.message--incoming .message__loader{left:10px}.message--incoming .message__content{background-color:#e8e8e8}.message--outgoing{align-self:end}.message--outgoing .message__sender{padding-right:10px;text-align:right}.message--outgoing .message__loader{right:10px}.message--outgoing .message__content{background-color:#d1eaff}.message__sender{color:#444;font-size:.8rem;font-weight:700;margin:0}.message__loader{position:absolute;width:24px}.message__content{border-radius:16px;margin:0;padding:10px 14px}.message__content:not(.hidden-state){animation:fade .3s ease-in-out both}.message__content>img{max-width:100%}.hidden-state{visibility:hidden}@keyframes fade{0%{opacity:0}to{opacity:1}}@media (prefers-reduced-motion: reduce){.message__content:not(.hidden-state){animation:none}.message__loader{display:none}.hidden-state{visibility:visible}}", R = /* @__PURE__ */ S(K, [["styles", [O]]]), q = { part: "conversation" }, G = { class: "sr-only" }, Q = /* @__PURE__ */ D({
64
+ }), q = ".message{max-width:80%;position:relative}.message--incoming{align-self:start}.message--incoming .message__sender{padding-left:10px}.message--incoming .message__loader{left:10px}.message--incoming .message__content{background-color:#e8e8e8}.message--outgoing{align-self:end}.message--outgoing .message__sender{padding-right:10px;text-align:right}.message--outgoing .message__loader{right:10px}.message--outgoing .message__content{background-color:#d1eaff}.message__sender{color:#444;font-size:.8rem;font-weight:700;margin:0}.message__loader{position:absolute;width:24px}.message__content{border-radius:16px;margin:0;padding:10px 14px}.message__content:not(.hidden-state){animation:fade .3s ease-in-out both}.message__content>img{max-width:100%}.hidden-state{visibility:hidden}@keyframes fade{0%{opacity:0}to{opacity:1}}@media (prefers-reduced-motion: reduce){.message__content:not(.hidden-state){animation:none}.message__loader{display:none}.hidden-state{visibility:visible}}", G = /* @__PURE__ */ S(R, [["styles", [q]]]), H = { part: "conversation" }, J = { class: "sr-only" }, Q = /* @__PURE__ */ D({
65
65
  __name: "MessageConversation.ce",
66
66
  props: {
67
67
  title: { default: "Conversation par messages", type: String },
@@ -94,9 +94,9 @@ const P = ["part"], I = {
94
94
  }
95
95
  return c({
96
96
  reset: f
97
- }), (e, a) => (s(), t("figure", q, [
98
- h("figcaption", G, v(e.title), 1),
99
- (s(!0), t(b, null, N(p.value, ({ message: o, displaySender: r, startAnimation: u, animationDuration: y }, _) => (s(), z(R, {
97
+ }), (e, a) => (s(), t("figure", H, [
98
+ h("figcaption", J, v(e.title), 1),
99
+ (s(!0), t(b, null, N(p.value, ({ message: o, displaySender: r, startAnimation: u, animationDuration: y }, _) => (s(), z(G, {
100
100
  ref_for: !0,
101
101
  ref: "messages",
102
102
  message: o,
@@ -1,5 +1,5 @@
1
- import { a as g, c as n, o as i, f as a, t as l, F as o, b as d, G as h, _ as u, d as p } from "../_plugin-vue_export-helper-BaT1QC5Q.js";
2
- import { a as m, i as r, b as f } from "../i18n-BOk_ejZ-.js";
1
+ import { a as g, c as n, o as i, f as a, t as l, F as o, b as d, I as h, _ as u, d as p } from "../_plugin-vue_export-helper-CwwQJ1m6.js";
2
+ import { a as m, i as r, b as f } from "../i18n-gncqQJ0G.js";
3
3
  const v = {}, y = {}, b = {
4
4
  "pix-article": { byAuthor: "Par {{author}}" }
5
5
  }, S = {}, L = {}, j = ["titleLevel"], x = { class: "article__metadata" }, A = { class: "article__author" }, E = ["innerHTML"], H = /* @__PURE__ */ g({
@@ -1,6 +1,6 @@
1
- import { a as C, k as h, c as l, o, H as T, f as r, J as j, L as z, A as E, t as g, _ as b, r as w, I as H, G as u, y as m, x as $, D, M as _, F as S, b as k, e as A, d as I } from "../_plugin-vue_export-helper-BaT1QC5Q.js";
2
- import { a as V, i as N, b as P } from "../i18n-BOk_ejZ-.js";
3
- import { B, N as M } from "../NavigationButton.ce-CgyZHLpi.js";
1
+ import { a as C, k as h, c as l, o, D as T, f as r, E, L as z, A as j, t as g, _ as b, r as w, J as H, I as u, y as m, x as $, G as D, M as _, F as S, b as k, e as A, d as I } from "../_plugin-vue_export-helper-CwwQJ1m6.js";
2
+ import { a as V, i as N, b as P } from "../i18n-gncqQJ0G.js";
3
+ import { B, N as M } from "../NavigationButton.ce-gp04deGY.js";
4
4
  const F = {
5
5
  "pix-carousel": { license: "Image license", next: "Next", of: "{{ currentSlide }} of {{ slideLength }}", previous: "Previous", slide: "Slide", title: "Carousel" }
6
6
  }, G = {
@@ -39,13 +39,13 @@ const F = {
39
39
  class: "title"
40
40
  }, [
41
41
  z(t.$slots, "pagination"),
42
- E(" " + g(t.title), 1)
42
+ j(" " + g(t.title), 1)
43
43
  ], 8, W),
44
44
  i.value ? (o(), l("div", {
45
45
  key: 0,
46
46
  class: "description",
47
47
  innerHTML: t.description
48
- }, null, 8, q)) : t.description ? (o(), l("p", K, g(t.description), 1)) : j("", !0)
48
+ }, null, 8, q)) : t.description ? (o(), l("p", K, g(t.description), 1)) : E("", !0)
49
49
  ], 2));
50
50
  }
51
51
  }), U = ".slide-info{transform:translate(100vw);grid-column:1;grid-row:1;height:fit-content;border-left:1px solid transparent;padding-left:16px;padding-top:4px}.slide-info p{margin-top:8px;margin-bottom:0}.slide-info.active{border-left-color:gray;transform:translate(0)}.slide-info .title{display:flex;align-items:center;font-size:1.25rem;font-family:Nunito,sans-serif;font-style:normal;font-weight:700;line-height:1.75rem;gap:8px;min-height:24px}.slide-info .description{font-size:.875rem}.slide-info .description ul li,.slide-info .description ol li{margin-left:1rem}@media only screen and (max-width: 576px){.slide-info.active{border:none;padding-left:0}}", R = /* @__PURE__ */ b(Q, [["styles", [U]]]), X = ["aria-hidden", "aria-roledescription", "aria-label"], Y = ["alt", "src"], ee = {
@@ -94,12 +94,12 @@ const F = {
94
94
  src: e.slide.image.src
95
95
  }, null, 12, Y),
96
96
  e.slide.license ? (o(), l("p", ee, [
97
- E(g(e.slide.license.attribution) + " / ", 1),
97
+ j(g(e.slide.license.attribution) + " / ", 1),
98
98
  r("a", {
99
99
  href: e.slide.license.url,
100
100
  target: "_blank"
101
101
  }, g(e.slide.license.name), 9, ie)
102
- ])) : j("", !0)
102
+ ])) : E("", !0)
103
103
  ], 4)) : e.type === "image-text" ? (o(), l("div", te, [
104
104
  r("img", {
105
105
  alt: e.slide.image.alt,
@@ -1,7 +1,7 @@
1
- import { a as S, r as k, D as y, k as m, z as A, c as a, o as i, f as s, l as B, G as c, t as u, F as f, b, N as E, y as g, H as C, M as L, J as D, q as F, _ as P, d as G } from "../_plugin-vue_export-helper-BaT1QC5Q.js";
2
- import { a as q, i as w, b as J } from "../i18n-BOk_ejZ-.js";
3
- import { N as M } from "../NavigationButton.ce-CgyZHLpi.js";
4
- const R = {}, U = {}, K = {
1
+ import { a as S, r as k, G as y, k as m, z as A, c as a, o as i, f as s, l as B, I as c, t as u, F as f, b, N as H, y as g, D as C, M as L, E as D, q as F, _ as P, d as G } from "../_plugin-vue_export-helper-CwwQJ1m6.js";
2
+ import { a as q, i as w, b as R } from "../i18n-gncqQJ0G.js";
3
+ import { N as M } from "../NavigationButton.ce-gp04deGY.js";
4
+ const U = {}, J = {}, K = {
5
5
  "pix-cursor": { confirm: "Valider", next: "Suivant", previous: "Précédent", selectAnOption: "Sélectionnez une option", youHaveChosen: "Vous avez choisi : { choice }" }
6
6
  }, Q = {}, W = {}, X = ["for"], Y = {
7
7
  class: "visible-options",
@@ -18,7 +18,7 @@ const R = {}, U = {}, K = {
18
18
  options: { type: Array }
19
19
  },
20
20
  setup(d, { expose: j }) {
21
- const p = d, r = k(Math.floor(p.options.length / 2)), o = k(!1), v = y(), _ = y(), N = m(() => r.value === p.options.length - 1), I = m(() => r.value === 0), l = m(() => Number(r.value));
21
+ const p = d, r = k(Math.floor(p.options.length / 2)), o = k(!1), v = y(), _ = y(), I = m(() => r.value === p.options.length - 1), N = m(() => r.value === 0), l = m(() => Number(r.value));
22
22
  function z() {
23
23
  o.value = !0;
24
24
  }
@@ -49,13 +49,13 @@ const R = {}, U = {}, K = {
49
49
  }, u(t.$t("pix-cursor.selectAnOption")), 9, X),
50
50
  s("ul", Y, [
51
51
  (i(!0), a(f, null, b(t.options, (n, e) => (i(), a("li", {
52
- onClick: (H) => h(e),
52
+ onClick: (E) => h(e),
53
53
  key: e
54
54
  }, u(n.label), 9, Z))), 128))
55
55
  ]),
56
56
  s("datalist", { id: c(_) }, [
57
57
  (i(!0), a(f, null, b(t.options, (n, e) => (i(), a("option", {
58
- onClick: (H) => h(e),
58
+ onClick: (E) => h(e),
59
59
  key: e,
60
60
  value: e,
61
61
  label: n.label
@@ -70,12 +70,12 @@ const R = {}, U = {}, K = {
70
70
  max: t.options.length - 1,
71
71
  disabled: o.value
72
72
  }, null, 8, te), [
73
- [E, r.value]
73
+ [H, r.value]
74
74
  ]),
75
75
  s("div", ne, [
76
76
  g(M, {
77
77
  onClick: $,
78
- disabled: o.value || I.value,
78
+ disabled: o.value || N.value,
79
79
  label: t.$t("pix-cursor.previous"),
80
80
  "aria-controls": c(v),
81
81
  "aria-disabled": o.value,
@@ -103,7 +103,7 @@ const R = {}, U = {}, K = {
103
103
  ]),
104
104
  g(M, {
105
105
  onClick: O,
106
- disabled: o.value || N.value,
106
+ disabled: o.value || I.value,
107
107
  label: t.$t("pix-cursor.next"),
108
108
  "aria-controls": c(v),
109
109
  "aria-disabled": o.value,
@@ -129,9 +129,9 @@ const R = {}, U = {}, K = {
129
129
  };
130
130
  }
131
131
  }), ue = "[data-v-58e704c5]{--pix-neutral-800: #253858;font-family:Nunito,sans-serif;color:var(--pix-neutral-800)}.pix-cursor[data-v-58e704c5]{display:flex;flex-direction:column;justify-content:center;margin:auto;padding:2rem;gap:1rem;overflow:hidden}.pix-cursor p[data-v-58e704c5]{text-align:center;font-size:1.1rem}.pix-cursor .chosen-option[data-v-58e704c5]{font-weight:700}.pix-cursor .visible-options[data-v-58e704c5]{display:flex;justify-content:space-between;margin:0;padding:0}.pix-cursor .visible-options li[data-v-58e704c5]{cursor:pointer;list-style:none}.pix-cursor input[data-v-58e704c5]{width:100%}.pix-cursor .confirm[data-v-58e704c5]{padding:.75rem 1.5rem;border-radius:8px;cursor:pointer;font-weight:600;font-size:1.25rem;letter-spacing:1.1;width:fit-content;margin:auto;border:none;color:#fff;background:#4075ff;grid-row:1;grid-column:1}.pix-cursor .confirm[data-v-58e704c5]:hover{background:#355ac4;transition:background ease .1s}.pix-cursor .navigation-container[data-v-58e704c5]{display:flex;justify-content:center;align-items:center;gap:1rem}.pix-cursor .navigation-container .chosen-text-container[data-v-58e704c5]{display:grid}.pix-cursor .navigation-container .chosen-text-container p[data-v-58e704c5]{grid-row:1;grid-column:1}.pix-cursor .navigation-container .chosen-text-container p.hidden[data-v-58e704c5]{transform:translate(100vw)}.pix-cursor .footer[data-v-58e704c5]{display:grid;grid-template-columns:auto;align-items:center;justify-content:center}.pix-cursor .feedback[data-v-58e704c5]{padding:1rem 1.2rem;border-left:solid 4px;border-radius:8px;grid-column:1;grid-row:1;text-align:start;margin:0}.pix-cursor .feedback.hidden[data-v-58e704c5]{visibility:hidden;transform:translate(100vw)}.pix-cursor .feedback.good[data-v-58e704c5]{background:#e8f5e9;border-left-color:#4caf51}.pix-cursor .feedback.bad[data-v-58e704c5]{background:#ffebee;border-left-color:#f44337}.pix-cursor .feedback.neutral[data-v-58e704c5]{background:#e8f6ff;border-left-color:#464ee0}.pix-cursor .feedback.close[data-v-58e704c5]{background:#fff8e1;border-left-color:#ffc108}", pe = /* @__PURE__ */ P(de, [["styles", [ue]], ["__scopeId", "data-v-58e704c5"]]);
132
- q(/* @__PURE__ */ Object.assign({ "./locales/en.json": R, "./locales/es.json": U, "./locales/fr.json": K, "./locales/it.json": Q, "./locales/nl.json": W })).catch((d) => console.error(d));
132
+ q(/* @__PURE__ */ Object.assign({ "./locales/en.json": U, "./locales/es.json": J, "./locales/fr.json": K, "./locales/it.json": Q, "./locales/nl.json": W })).catch((d) => console.error(d));
133
133
  window.customElements.define("pix-cursor", G(pe, {
134
134
  configureApp(d) {
135
- w.changeLanguage(document?.documentElement?.lang || navigator.language), d.use(J, { i18next: w });
135
+ w.changeLanguage(document?.documentElement?.lang || navigator.language), d.use(R, { i18next: w });
136
136
  }
137
137
  }));
@@ -1,6 +1,6 @@
1
- import { a as y, k as h, c as d, o, f as l, J as p, t as c, H as k, _ as C, O as L, P as E, r as b, l as R, A as V, R as j, g as O, F as x, b as S, e as G, G as M, q as P, y as F, d as H } from "../_plugin-vue_export-helper-BaT1QC5Q.js";
2
- import { i as s, a as Q, b as U } from "../i18n-BOk_ejZ-.js";
3
- const J = {}, W = {}, Z = {
1
+ import { a as y, k as h, c as d, o, f as l, E as p, t as c, D as k, _ as C, O as E, P as L, r as b, l as R, A as V, R as j, g as O, F as x, b as S, e as M, I as G, q as P, y as F, d as H } from "../_plugin-vue_export-helper-CwwQJ1m6.js";
2
+ import { i as s, a as Q, b as U } from "../i18n-gncqQJ0G.js";
3
+ const W = {}, Z = {}, J = {
4
4
  "qcm-deepfake": { options: ["une photo de sa chanteuse préférée", "une chanson de sa chanteuse préférée", "un enregistrement de Caroline qui chante", "une photo de Caroline", "un enregistrement de Caroline qui dit quelques phrases"], iaResultInfo: "Retrouvez ici les résultats du logiciel d'IA générative :", iaResultGenerated: "Résultat généré par le logiciel d'IA générative", in: "Entrée", out: "Sortie", waiting: "Logiciel d'IA générative", selectThreeElements: "Sélectionnez 3 éléments pour générer la vidéo de Caroline :", generateVideo: "Générer la vidéo !", loading: "Chargement…", restart: "Recommencer", element_one: "élément", element_other: "éléments", generateVideoInfo_one: "Plus que {{count}} élément", generateVideoInfo_other: "Plus que {{count}} éléments", restartInfo: "Essayez avec de nouveaux éléments", success: { title: "Bien joué !", description: "C'est bien la vidéo de Caroline. Vous avez utilisé les bons éléments." }, fail: { title: "Pas exactement…", description: "Le résultat ne convient pas. Recommencez en changeant les éléments en entrée." } }
5
5
  }, K = {}, X = {}, Y = ["aria-hidden"], ee = ["aria-level"], te = ["src"], ae = {
6
6
  key: 1,
@@ -53,7 +53,7 @@ const J = {}, W = {}, Z = {
53
53
  }
54
54
  }), le = ".right-container[data-v-2a82aa38]{grid-row:1/1;grid-column:1/1}.right-container[aria-hidden=true][data-v-2a82aa38]{visibility:hidden}img[data-v-2a82aa38]{margin-block:.5rem}.subtitle[data-v-2a82aa38]{font-size:1.25rem;font-weight:700;text-align:center}.description[data-v-2a82aa38]{font-weight:700;margin-top:0;margin-bottom:0}img[data-v-2a82aa38]{width:200px;height:auto}.answer-block[data-v-2a82aa38]{background:#e8e8e8;margin-inline:1rem;padding:.5rem;border-radius:10px}.answer-block p[data-v-2a82aa38]{margin-bottom:0}.answer-block.success[data-v-2a82aa38]{background:#e8f3ef}.answer-block.fail[data-v-2a82aa38]{border-radius:16px;background:#fbecec}", oe = /* @__PURE__ */ C(ne, [["styles", [le]], ["__scopeId", "data-v-2a82aa38"]]), re = ["aria-disabled"], de = /* @__PURE__ */ y({
55
55
  __name: "Option.ce",
56
- props: /* @__PURE__ */ L({
56
+ props: /* @__PURE__ */ E({
57
57
  option: { type: String },
58
58
  value: { type: Number },
59
59
  readonly: { type: Boolean }
@@ -63,7 +63,7 @@ const J = {}, W = {}, Z = {
63
63
  }),
64
64
  emits: ["update:modelValue"],
65
65
  setup(a, { expose: f }) {
66
- const i = E(a, "modelValue"), e = b(!1), t = h(() => i.value.length === 3 && !e.value || a.readonly);
66
+ const i = L(a, "modelValue"), e = b(!1), t = h(() => i.value.length === 3 && !e.value || a.readonly);
67
67
  function _(m) {
68
68
  if (t.value) {
69
69
  m.preventDefault();
@@ -138,7 +138,7 @@ const J = {}, W = {}, Z = {
138
138
  type: "search",
139
139
  image: a.searchImage
140
140
  }
141
- ], w = h(() => i.value.length !== 3 || t.value === "search"), T = h(() => t.value === "search" ? s.t("qcm-deepfake.loading") : t.value === "info" ? s.t("qcm-deepfake.generateVideo") : s.t("qcm-deepfake.restart")), D = h(() => t.value === "info" ? s.t("qcm-deepfake.generateVideoInfo", { count: e.length - i.value.length }) : t.value === "fail" ? s.t("qcm-deepfake.restartInfo") : "");
141
+ ], w = h(() => i.value.length !== 3 || t.value === "search"), D = h(() => t.value === "search" ? s.t("qcm-deepfake.loading") : t.value === "info" ? s.t("qcm-deepfake.generateVideo") : s.t("qcm-deepfake.restart")), T = h(() => t.value === "info" ? s.t("qcm-deepfake.generateVideoInfo", { count: e.length - i.value.length }) : t.value === "fail" ? s.t("qcm-deepfake.restartInfo") : "");
142
142
  function B() {
143
143
  if (!w.value)
144
144
  return t.value === "info" ? z() : q();
@@ -163,7 +163,7 @@ const J = {}, W = {}, Z = {
163
163
  }, c(r.$t("qcm-deepfake.in")), 9, ge),
164
164
  l("fieldset", null, [
165
165
  l("legend", pe, c(r.$t("qcm-deepfake.selectThreeElements")), 1),
166
- (o(!0), d(x, null, S(M(g), (u, I) => (o(), G(ue, {
166
+ (o(!0), d(x, null, S(G(g), (u, I) => (o(), M(ue, {
167
167
  ref_for: !0,
168
168
  ref_key: "optionsNode",
169
169
  ref: _,
@@ -189,9 +189,9 @@ const J = {}, W = {}, Z = {
189
189
  fill: "#122647"
190
190
  }, null, -1)
191
191
  ])])) : p("", !0),
192
- V(" " + c(T.value), 1)
192
+ V(" " + c(D.value), 1)
193
193
  ], 10, he),
194
- ["success", "search"].includes(t.value) ? p("", !0) : (o(), d("p", be, c(D.value), 1))
194
+ ["success", "search"].includes(t.value) ? p("", !0) : (o(), d("p", be, c(T.value), 1))
195
195
  ])
196
196
  ]),
197
197
  l("div", ye, [
@@ -209,7 +209,7 @@ const J = {}, W = {}, Z = {
209
209
  ]));
210
210
  }
211
211
  }), Ce = "legend,label,p,div[role=heading]{font-family:Nunito,Roboto,sans-serif;color:#253858}", we = ".container[data-v-02f097d7]{display:flex;gap:.8rem}.title[data-v-02f097d7]{font-size:1.75rem;font-weight:700;text-align:center;margin-bottom:16px}.left-side[data-v-02f097d7]{min-width:60%;border:solid 1px #b0d3f4;background:#fff;padding:.8rem;border-radius:10px}.left-side__lower-legend[data-v-02f097d7]{font-size:.875rem;color:#5e6c84}.left-side__subtitle[data-v-02f097d7]{font-size:1.25rem;font-weight:700;text-align:center}.left-side__options[data-v-02f097d7]{display:flex;border:solid 1px #5e6c84;padding:.6rem;border-radius:5px;gap:.5rem}.left-side__description[data-v-02f097d7]{font-weight:700}.left-side__button[data-v-02f097d7]{display:flex;gap:.5rem;align-items:center;border:none;padding:.6rem 1.5rem;background:#ffcb33;color:#000;border-radius:25px;font-weight:700;cursor:pointer}.left-side__button.generate[data-v-02f097d7]{background:#613fdd;color:#fff}.left-side__button[aria-disabled=true][data-v-02f097d7]{cursor:not-allowed;background:#d3d3d3}.left-side__action[data-v-02f097d7]{display:flex;flex-direction:column;align-items:center;text-align:center}.right-side[data-v-02f097d7]{display:grid;border:solid 1px #b0d3f4;background:#fff;padding:.8rem;text-align:center;border-radius:10px}fieldset[data-v-02f097d7]{border:none;display:flex;flex-direction:column;gap:.8rem}@media (max-width: 770px){.container[data-v-02f097d7]{flex-wrap:wrap}.left-side[data-v-02f097d7],.right-side[data-v-02f097d7]{width:100%}}", qe = /* @__PURE__ */ C(ke, [["styles", [Ce, we]], ["__scopeId", "data-v-02f097d7"]]);
212
- Q(/* @__PURE__ */ Object.assign({ "./locales/en.json": J, "./locales/es.json": W, "./locales/fr.json": Z, "./locales/it.json": K, "./locales/nl.json": X })).catch((a) => console.error(a));
212
+ Q(/* @__PURE__ */ Object.assign({ "./locales/en.json": W, "./locales/es.json": Z, "./locales/fr.json": J, "./locales/it.json": K, "./locales/nl.json": X })).catch((a) => console.error(a));
213
213
  window.customElements.define("qcm-deepfake", H(qe, {
214
214
  configureApp(a) {
215
215
  s.changeLanguage(document?.documentElement?.lang || navigator.language), a.use(U, { i18next: s });
@@ -1,4 +1,4 @@
1
- import { s as Le, n as we, a as ve, i as Re } from "./_plugin-vue_export-helper-BaT1QC5Q.js";
1
+ import { s as Le, n as we, a as ve, i as Re } from "./_plugin-vue_export-helper-CwwQJ1m6.js";
2
2
  const d = (o) => typeof o == "string", V = () => {
3
3
  let o, e;
4
4
  const t = new Promise((i, s) => {
package/dist/schema.js CHANGED
@@ -57,14 +57,14 @@ const o = e.object({
57
57
  llmMessage: e.string().required(),
58
58
  wordsToAdd: e.array().items(e.string()).required()
59
59
  }), d = e.object({
60
+ titleLevel: e.number().optional(),
60
61
  name: e.string().required(),
61
62
  cardList: e.array().items(
62
63
  e.object({
63
64
  name: e.string().required(),
64
65
  description: e.string().required(),
65
66
  icon: e.string().required(),
66
- image: e.string().required(),
67
- titleLevel: e.string()
67
+ image: e.string().required()
68
68
  })
69
69
  ).required()
70
70
  }), i = e.object({
@@ -1,4 +1,4 @@
1
- import { u as t, p as s } from "./_plugin-vue_export-helper-BaT1QC5Q.js";
1
+ import { u as t, p as s } from "./_plugin-vue_export-helper-CwwQJ1m6.js";
2
2
  const a = Symbol("shadowRoot");
3
3
  function r() {
4
4
  const o = t();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1024pix/epreuves-components",
3
- "version": "1.4.3",
3
+ "version": "1.4.5",
4
4
  "description": "A collection of interactive components to be used in Pix challenges or modules",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",
@@ -1,14 +0,0 @@
1
- function a(r, e = f) {
2
- const t = [...r];
3
- for (let n = t.length - 1; n > 0; n--) {
4
- const o = e() % (n + 1);
5
- [t[n], t[o]] = [t[o], t[n]];
6
- }
7
- return t;
8
- }
9
- function f() {
10
- return Math.floor(Math.random() * 2 ** 32);
11
- }
12
- export {
13
- a as s
14
- };