@1024pix/epreuves-components 0.10.1 → 0.10.2

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,6 +1,6 @@
1
- import { a as w, c as i, o as a, f as e, t as s, G as C, _ as x, r as p, g, F as f, b as v, v as P, e as B, d as A } from "../_plugin-vue_export-helper-CGpZIhKK.js";
2
- import { a as M, i as h, b as z } from "../i18n-DZYcdfDF.js";
3
- import { L as y } from "../LLMMessage.ce-DUUayymi.js";
1
+ import { a as w, c as i, o as a, f as e, t as s, G as C, _ as x, r as p, g, F as f, b as v, x as P, e as B, d as A } from "../_plugin-vue_export-helper-BsbHZhhs.js";
2
+ import { a as M, i as h, b as z } from "../i18n-DFZmIYUK.js";
3
+ import { L as y } from "../LLMMessage.ce-BFW5_GlC.js";
4
4
  const N = {
5
5
  "complete-phrase": { iaSuggestions: "🧠 Suggestions de l'IA", explanation: "La barre indique la probabilité de chaque mot. Plus elle est longue, plus le mot est probable dans ce contexte.", ariaLabelDescription: "Le mot {{name}} a une probabilité de {{percent}}%", clickHereButton: "Cliquez ici pour voir ce que l'IA va compléter", successfullyCompletedSentence: "🎉 Phrase complétée avec succès !" }
6
6
  }, I = { class: "probability-bar" }, T = { "aria-hidden": "true" }, q = { class: "sr-only" }, E = /* @__PURE__ */ w({
@@ -1,4 +1,4 @@
1
- import { d as e } from "../_plugin-vue_export-helper-CGpZIhKK.js";
2
- import { I as m } from "../ImageQuiz.ce-BbfMcldf.js";
1
+ import { d as e } from "../_plugin-vue_export-helper-BsbHZhhs.js";
2
+ import { I as m } from "../ImageQuiz.ce-BM9vWQ_H.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-CGpZIhKK.js";
2
- import { I as A } from "../ImageQuiz.ce-BbfMcldf.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-BsbHZhhs.js";
2
+ import { I as A } from "../ImageQuiz.ce-BM9vWQ_H.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, g as i, _ as c, d as g } from "../_plugin-vue_export-helper-CGpZIhKK.js";
2
- import { L as l } from "../LLMMessage.ce-DUUayymi.js";
3
- import { p as u } from "../shadow-dom-BdDj1I6f.js";
1
+ import { a as m, c as r, o as a, f as e, t as n, F as t, b as p, g as i, _ as c, d as g } from "../_plugin-vue_export-helper-BsbHZhhs.js";
2
+ import { L as l } from "../LLMMessage.ce-BFW5_GlC.js";
3
+ import { p as u } from "../shadow-dom-Bt1Mf11i.js";
4
4
  const f = {
5
5
  class: "header",
6
6
  "aria-hidden": "true"
@@ -1,6 +1,6 @@
1
- import { a as m, k as i, l 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-CGpZIhKK.js";
2
- import { L as _ } from "../LLMMessage.ce-DUUayymi.js";
3
- import { p as x } from "../shadow-dom-BdDj1I6f.js";
1
+ import { a as m, k as i, l 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-BsbHZhhs.js";
2
+ import { L as _ } from "../LLMMessage.ce-BFW5_GlC.js";
3
+ import { p as x } from "../shadow-dom-Bt1Mf11i.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, h, c as i, o as d, g as y, f as l, j as w, F as f, b as k, t as S, _ as C, d as L } from "../_plugin-vue_export-helper-CGpZIhKK.js";
1
+ import { a as v, r as c, h, c as i, o as d, g as y, f as l, j as w, F as f, b as k, t as S, _ as C, d as L } from "../_plugin-vue_export-helper-BsbHZhhs.js";
2
2
  import "./llm-messages.ce.js.js";
3
3
  const N = { class: "prompt-select" }, P = { class: "prompt-select__options" }, B = ["disabled", "onClick"], E = /* @__PURE__ */ v({
4
4
  __name: "LLMPromptSelect.ce",
@@ -1,5 +1,5 @@
1
- import { a as k, r as b, q as D, E as C, c as r, o as t, v as x, x as _, f as y, j as w, t as h, g as $, F as v, b as M, _ as N, D as E, e as B, d as T } from "../_plugin-vue_export-helper-CGpZIhKK.js";
2
- import { L as V } from "../Loading.ce-BsBClsn3.js";
1
+ import { a as k, r as b, v as D, E as C, c as r, o as t, x, y as _, f as y, j as w, t as h, g as $, F as v, b as M, _ as N, D as E, e as B, d as T } from "../_plugin-vue_export-helper-BsbHZhhs.js";
2
+ import { L as V } from "../Loading.ce-Dd1vKOPv.js";
3
3
  const F = ["part"], L = {
4
4
  key: 1,
5
5
  class: "message__loader message__content",
@@ -59,7 +59,7 @@ const F = ["part"], L = {
59
59
  ], 10, j)
60
60
  ], 2));
61
61
  }
62
- }), 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}.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}}", O = /* @__PURE__ */ N(I, [["styles", [q]]]), P = { part: "conversation" }, R = { class: "sr-only" }, G = /* @__PURE__ */ k({
62
+ }), 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}.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}}", P = /* @__PURE__ */ N(I, [["styles", [O]]]), R = { part: "conversation" }, q = { class: "sr-only" }, G = /* @__PURE__ */ k({
63
63
  __name: "MessageConversation.ce",
64
64
  props: {
65
65
  title: { default: "Conversation par messages", type: String },
@@ -91,9 +91,9 @@ const F = ["part"], L = {
91
91
  }
92
92
  return c({
93
93
  reset: g
94
- }), (a, e) => (t(), r("figure", P, [
95
- y("figcaption", R, h(a.title), 1),
96
- (t(!0), r(v, null, M(l.value, ({ message: i, displaySender: o, startAnimation: d, animationDuration: p }, f) => (t(), B(O, {
94
+ }), (a, e) => (t(), r("figure", R, [
95
+ y("figcaption", q, h(a.title), 1),
96
+ (t(!0), r(v, null, M(l.value, ({ message: i, displaySender: o, startAnimation: d, animationDuration: p }, f) => (t(), B(P, {
97
97
  ref_for: !0,
98
98
  ref: "messages",
99
99
  message: i,
@@ -0,0 +1,42 @@
1
+ import { a as d, c as n, o as r, f as a, t as i, F as l, b as h, q as u, _ as p, d as _ } from "../_plugin-vue_export-helper-BsbHZhhs.js";
2
+ import { a as m, i as o, b as f } from "../i18n-DFZmIYUK.js";
3
+ const y = {
4
+ "pix-article": { byAuthor: "Par {{author}}" }
5
+ }, v = ["titleLevel"], S = { class: "article__metadata" }, b = { class: "article__author" }, L = ["innerHTML"], x = /* @__PURE__ */ d({
6
+ __name: "PixArticle.ce",
7
+ props: {
8
+ titleLevel: { default: 2, type: Number },
9
+ title: { type: String },
10
+ author: { type: String },
11
+ date: { type: String },
12
+ paragraphs: { type: Array },
13
+ highlightedSentence: { type: String },
14
+ colorOfHighlightSentence: { type: String }
15
+ },
16
+ setup(e) {
17
+ const s = e.paragraphs.join(`
18
+ `).replace("{{highlightedSentence}}", `<strong style="color: ${e.colorOfHighlightSentence};">${e.highlightedSentence}</strong>`).split(`
19
+ `);
20
+ return (t, H) => (r(), n(l, null, [
21
+ a("div", {
22
+ class: "article__title",
23
+ role: "header",
24
+ titleLevel: t.titleLevel
25
+ }, i(t.title), 9, v),
26
+ a("p", S, [
27
+ a("span", b, i(t.$t("pix-article.byAuthor", { author: t.author })), 1),
28
+ a("time", null, i(t.date), 1)
29
+ ]),
30
+ (r(!0), n(l, null, h(u(s), (c, g) => (r(), n("p", {
31
+ innerHTML: c,
32
+ key: g
33
+ }, null, 8, L))), 128))
34
+ ], 64));
35
+ }
36
+ }), A = "[data-v-38484447]{--pix-neutral-800: #253858;font-family:Nunito,Roboto,sans-serif;color:var(--pix-neutral-800)}.article__title[data-v-38484447]{font-size:1.3rem;font-weight:700}.article__metadata[data-v-38484447]{font-style:italic}.article__author[data-v-38484447]{border-right:solid 1px var(--pix-neutral-800);padding-right:.7rem;margin-right:.5rem}", E = /* @__PURE__ */ p(x, [["styles", [A]], ["__scopeId", "data-v-38484447"]]);
37
+ m(/* @__PURE__ */ Object.assign({ "./locales/fr.json": y })).catch((e) => console.error(e));
38
+ window.customElements.define("pix-article", _(E, {
39
+ configureApp(e) {
40
+ o.changeLanguage(document?.documentElement?.lang ?? navigator.language), e.use(f, { i18next: o });
41
+ }
42
+ }));
@@ -1,6 +1,6 @@
1
- import { a as _, q as v, c as a, o as n, v as j, f as l, x as E, H, j as M, t as m, _ as h, r as y, C as R, g as f, G as $, y as I, I as x, B as u, F as S, b as k, e as A, d as V } from "../_plugin-vue_export-helper-CGpZIhKK.js";
2
- import { a as D, i as N, b as P } from "../i18n-DZYcdfDF.js";
3
- import { B, N as T } from "../NavigationButton.ce-RaQYJjPs.js";
1
+ import { a as _, v, c as a, o as n, x as j, f as l, y as z, H, j as E, t as m, _ as h, r as y, C as R, g as f, G as $, z as I, I as x, q as u, F as S, b as k, e as A, d as V } from "../_plugin-vue_export-helper-BsbHZhhs.js";
2
+ import { a as D, i as N, b as P } from "../i18n-DFZmIYUK.js";
3
+ import { B, N as T } from "../NavigationButton.ce-CXaE9Mh7.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,16 +39,16 @@ const F = {
39
39
  class: "title"
40
40
  }, [
41
41
  H(s.$slots, "pagination"),
42
- M(" " + m(s.title), 1)
42
+ E(" " + m(s.title), 1)
43
43
  ], 8, W),
44
44
  i.value ? (n(), a("div", {
45
45
  key: 0,
46
46
  class: "description",
47
47
  innerHTML: s.description
48
- }, null, 8, J)) : s.description ? (n(), a("p", K, m(s.description), 1)) : E("", !0)
48
+ }, null, 8, J)) : s.description ? (n(), a("p", K, m(s.description), 1)) : z("", !0)
49
49
  ], 2));
50
50
  }
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}}", z = /* @__PURE__ */ h(Q, [["styles", [U]]]), X = ["aria-hidden", "aria-roledescription", "aria-label"], Y = ["alt", "src"], ee = {
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}}", M = /* @__PURE__ */ h(Q, [["styles", [U]]]), X = ["aria-hidden", "aria-roledescription", "aria-label"], Y = ["alt", "src"], ee = {
52
52
  key: 0,
53
53
  class: "license"
54
54
  }, ie = ["href"], te = {
@@ -94,12 +94,12 @@ const F = {
94
94
  src: e.slide.image.src
95
95
  }, null, 12, Y),
96
96
  e.slide.license ? (n(), a("p", ee, [
97
- M(m(e.slide.license.attribution) + " / ", 1),
97
+ E(m(e.slide.license.attribution) + " / ", 1),
98
98
  l("a", {
99
99
  href: e.slide.license.url,
100
100
  target: "_blank"
101
101
  }, m(e.slide.license.name), 9, ie)
102
- ])) : E("", !0)
102
+ ])) : z("", !0)
103
103
  ], 4)) : e.type === "image-text" ? (n(), a("div", te, [
104
104
  l("img", {
105
105
  alt: e.slide.image.alt,
@@ -115,7 +115,7 @@ const F = {
115
115
  innerHTML: e.slide.text,
116
116
  class: "text-container"
117
117
  }, null, 8, oe)),
118
- f(z, {
118
+ f(M, {
119
119
  description: e.slide.description,
120
120
  title: e.slide.title,
121
121
  "is-active": e.isActive,
@@ -132,12 +132,12 @@ const F = {
132
132
  xmlns: "http://www.w3.org/2000/svg"
133
133
  };
134
134
  function pe(t, i) {
135
- return n(), a("svg", ce, i[0] || (i[0] = [
135
+ return n(), a("svg", ce, [...i[0] || (i[0] = [
136
136
  l("path", {
137
137
  d: "M11.6579 11.9996L15.4624 15.8039C15.6735 16.0152 15.7791 16.2804 15.7791 16.5996C15.7791 16.9188 15.6735 17.184 15.4624 17.3954C15.251 17.6065 14.9858 17.7121 14.6666 17.7121C14.3474 17.7121 14.0822 17.6065 13.8709 17.3954L9.27685 12.8014C9.16502 12.6894 9.08327 12.565 9.0316 12.4284C8.97994 12.2919 8.9541 12.1489 8.9541 11.9996C8.9541 11.8503 8.97994 11.7074 9.0316 11.5709C9.08327 11.4342 9.16502 11.3099 9.27685 11.1979L13.8709 6.60386C14.0822 6.39269 14.3474 6.28711 14.6666 6.28711C14.9858 6.28711 15.251 6.39269 15.4624 6.60386C15.6735 6.81519 15.7791 7.08044 15.7791 7.39961C15.7791 7.71878 15.6735 7.98403 15.4624 8.19536L11.6579 11.9996Z",
138
138
  fill: "inherit"
139
139
  }, null, -1)
140
- ]));
140
+ ])]);
141
141
  }
142
142
  const ue = /* @__PURE__ */ h(de, [["render", pe]]), fe = {}, me = {
143
143
  width: "25",
@@ -147,12 +147,12 @@ const ue = /* @__PURE__ */ h(de, [["render", pe]]), fe = {}, me = {
147
147
  xmlns: "http://www.w3.org/2000/svg"
148
148
  };
149
149
  function ge(t, i) {
150
- return n(), a("svg", me, i[0] || (i[0] = [
150
+ return n(), a("svg", me, [...i[0] || (i[0] = [
151
151
  l("path", {
152
152
  d: "M13.0754 11.9996L9.27085 8.19536C9.05969 7.98403 8.9541 7.71878 8.9541 7.39961C8.9541 7.08044 9.05969 6.81519 9.27085 6.60386C9.48219 6.39269 9.74743 6.28711 10.0666 6.28711C10.3858 6.28711 10.651 6.39269 10.8624 6.60386L15.4564 11.1979C15.5682 11.3099 15.6499 11.4342 15.7016 11.5709C15.7533 11.7074 15.7791 11.8503 15.7791 11.9996C15.7791 12.1489 15.7533 12.2919 15.7016 12.4284C15.6499 12.565 15.5682 12.6894 15.4564 12.8014L10.8624 17.3954C10.651 17.6065 10.3858 17.7121 10.0666 17.7121C9.74743 17.7121 9.48219 17.6065 9.27085 17.3954C9.05969 17.184 8.9541 16.9188 8.9541 16.5996C8.9541 16.2804 9.05969 16.0152 9.27085 15.8039L13.0754 11.9996Z",
153
153
  fill: "inherit"
154
154
  }, null, -1)
155
- ]));
155
+ ])]);
156
156
  }
157
157
  const ve = /* @__PURE__ */ h(fe, [["render", ge]]), he = ["aria-roledescription"], be = ["id"], xe = { class: "footer" }, ye = { class: "control" }, _e = { class: "slide-info-container" }, we = { class: "pagination" }, Ce = /* @__PURE__ */ _({
158
158
  __name: "Carousel.ce",
@@ -235,7 +235,7 @@ const ve = /* @__PURE__ */ h(fe, [["render", ge]]), he = ["aria-roledescription"
235
235
  }, null, 8, ["label", "aria-controls", "disabled"])
236
236
  ]),
237
237
  l("div", _e, [
238
- (n(!0), a(S, null, k(e.value, (d, p) => (n(), A(z, {
238
+ (n(!0), a(S, null, k(e.value, (d, p) => (n(), A(M, {
239
239
  key: p,
240
240
  description: d.description,
241
241
  title: d.title,
@@ -1,6 +1,6 @@
1
- import { a as B, r as y, y as k, q as m, h as S, c as a, o as i, f as s, J as E, B as c, t as u, F as f, b, K as H, g, v as C, I as L, x as F, A as P, _ as D, d as q } from "../_plugin-vue_export-helper-CGpZIhKK.js";
2
- import { a as G, i as w, b as J } from "../i18n-DZYcdfDF.js";
3
- import { N as j } from "../NavigationButton.ce-RaQYJjPs.js";
1
+ import { a as S, r as y, z as k, v as m, h as A, c as a, o as i, f as s, J as E, q as c, t as u, F as f, b, K as H, g, x as C, I as L, y as F, B as P, _ as D, d as q } from "../_plugin-vue_export-helper-BsbHZhhs.js";
2
+ import { a as G, i as w, b as J } from "../i18n-DFZmIYUK.js";
3
+ import { N as j } from "../NavigationButton.ce-CXaE9Mh7.js";
4
4
  const K = {}, R = {}, U = {
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 = {
@@ -12,17 +12,17 @@ const K = {}, R = {}, U = {
12
12
  }, le = {
13
13
  key: 0,
14
14
  class: "confirm"
15
- }, ce = ["innerHTML", "aria-hidden"], de = /* @__PURE__ */ B({
15
+ }, ce = ["innerHTML", "aria-hidden"], de = /* @__PURE__ */ S({
16
16
  __name: "PixCursor.ce",
17
17
  props: {
18
18
  options: { type: Array }
19
19
  },
20
20
  setup(d, { expose: M }) {
21
21
  const p = d, r = y(Math.floor(p.options.length / 2)), o = y(!1), v = k(), h = k(), I = m(() => r.value === p.options.length - 1), N = m(() => r.value === 0), l = m(() => Number(r.value));
22
- function $() {
22
+ function z() {
23
23
  o.value = !0;
24
24
  }
25
- function z() {
25
+ function $() {
26
26
  o.value || (r.value = Math.max(0, l.value - 1));
27
27
  }
28
28
  function O() {
@@ -37,10 +37,10 @@ const K = {}, R = {}, U = {
37
37
  return M({
38
38
  reset: T
39
39
  }), (t, x) => {
40
- const V = S("i18next");
40
+ const V = A("i18next");
41
41
  return i(), a("form", {
42
42
  class: "pix-cursor",
43
- onSubmit: P($, ["prevent"])
43
+ onSubmit: P(z, ["prevent"])
44
44
  }, [
45
45
  s("div", null, [
46
46
  s("label", {
@@ -49,13 +49,13 @@ const K = {}, R = {}, U = {
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: (A) => _(e),
52
+ onClick: (B) => _(e),
53
53
  key: e
54
54
  }, u(n.label), 9, Z))), 128))
55
55
  ]),
56
56
  s("datalist", { id: c(h) }, [
57
57
  (i(!0), a(f, null, b(t.options, (n, e) => (i(), a("option", {
58
- onClick: (A) => _(e),
58
+ onClick: (B) => _(e),
59
59
  key: e,
60
60
  value: e,
61
61
  label: n.label
@@ -74,7 +74,7 @@ const K = {}, R = {}, U = {
74
74
  ]),
75
75
  s("div", ne, [
76
76
  g(j, {
77
- onClick: z,
77
+ onClick: $,
78
78
  disabled: o.value || N.value,
79
79
  label: t.$t("pix-cursor.previous"),
80
80
  "aria-controls": c(v),