@1024pix/epreuves-components 2.1.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/dist/{LLMMessage.ce-CcaSmq0J.js → LLMMessage.ce-D_SYQOna.js} +22 -22
  2. package/dist/{Loading.ce-kO02LfAR.js → Loading.ce-CjAv1WaY.js} +1 -1
  3. package/dist/{NavigationButton.ce-BUeEdL4x.js → NavigationButton.ce-DlErTyfv.js} +5 -5
  4. package/dist/Retry--whpA3a8.js +18 -0
  5. package/dist/{_plugin-vue_export-helper-BGEtPlxS.js → _plugin-vue_export-helper-CP5OpzZH.js} +976 -966
  6. package/dist/components/calcul-impact.ce.js.js +2 -2
  7. package/dist/components/capacity-calculation.ce.js.js +116 -129
  8. package/dist/components/clickable-image.ce.js.js +86 -69
  9. package/dist/components/complete-phrase.ce.js.js +129 -66
  10. package/dist/components/flip-cards.ce.js.js +4 -4
  11. package/dist/components/image-quiz.ce.js.js +2 -2
  12. package/dist/components/image-quizzes.ce.js.js +2 -2
  13. package/dist/components/llm-compare-messages.ce.js.js +3 -3
  14. package/dist/components/llm-messages.ce.js.js +6 -6
  15. package/dist/components/llm-prompt-select.ce.js.js +10 -10
  16. package/dist/components/message-conversation.ce.js.js +14 -14
  17. package/dist/components/pix-article.ce.js.js +2 -2
  18. package/dist/components/pix-carousel.ce.js.js +11 -12
  19. package/dist/components/pix-cursor.ce.js.js +10 -10
  20. package/dist/components/qcm-deepfake.ce.js.js +107 -100
  21. package/dist/{i18n-D3E2CT0o.js → i18n-BB4WILwM.js} +12 -12
  22. package/dist/{image-quiz.ce-Qe3SbGDF.js → image-quiz.ce-UlVFo5Sr.js} +11 -11
  23. package/dist/index.js +1 -1
  24. package/dist/metadata.js +1 -1
  25. package/dist/schema.js +7 -4
  26. package/dist/{shadow-dom-Bqt3ZRMI.js → shadow-dom-D3DtD_VO.js} +1 -1
  27. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { s as Le, n as we, d as ve, i as Re } from "./_plugin-vue_export-helper-BGEtPlxS.js";
1
+ import { s as Le, n as we, d as ve, i as Re } from "./_plugin-vue_export-helper-CP5OpzZH.js";
2
2
  const d = (o) => typeof o == "string", V = () => {
3
3
  let o, e;
4
4
  const t = new Promise((i, s) => {
@@ -107,7 +107,7 @@ const je = [" ", ",", "?", "!", ";"], Ie = new Fe(20), Te = (o, e, t) => {
107
107
  s = r;
108
108
  }
109
109
  return s;
110
- }, U = (o) => o?.replace("_", "-"), De = {
110
+ }, M = (o) => o?.replace("_", "-"), De = {
111
111
  type: "logger",
112
112
  log(o) {
113
113
  this.output("log", o);
@@ -535,12 +535,12 @@ class le {
535
535
  this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = P.create("languageUtils");
536
536
  }
537
537
  getScriptPartFromCode(e) {
538
- if (e = U(e), !e || e.indexOf("-") < 0) return null;
538
+ if (e = M(e), !e || e.indexOf("-") < 0) return null;
539
539
  const t = e.split("-");
540
540
  return t.length === 2 || (t.pop(), t[t.length - 1].toLowerCase() === "x") ? null : this.formatLanguageCode(t.join("-"));
541
541
  }
542
542
  getLanguagePartFromCode(e) {
543
- if (e = U(e), !e || e.indexOf("-") < 0) return e;
543
+ if (e = M(e), !e || e.indexOf("-") < 0) return e;
544
544
  const t = e.split("-");
545
545
  return this.formatLanguageCode(t[0]);
546
546
  }
@@ -618,7 +618,7 @@ class Ve {
618
618
  this.pluralRulesCache = {};
619
619
  }
620
620
  getRule(e, t = {}) {
621
- const i = U(e === "dev" ? "en" : e), s = t.ordinal ? "ordinal" : "cardinal", n = JSON.stringify({
621
+ const i = M(e === "dev" ? "en" : e), s = t.ordinal ? "ordinal" : "cardinal", n = JSON.stringify({
622
622
  cleanedCode: i,
623
623
  type: s
624
624
  });
@@ -804,9 +804,9 @@ const Ue = (o) => {
804
804
  });
805
805
  const r = i + JSON.stringify(n);
806
806
  let a = e[r];
807
- return a || (a = o(U(i), s), e[r] = a), a(t);
807
+ return a || (a = o(M(i), s), e[r] = a), a(t);
808
808
  };
809
- }, Me = (o) => (e, t, i) => o(U(t), i)(e);
809
+ }, Me = (o) => (e, t, i) => o(M(t), i)(e);
810
810
  class He {
811
811
  constructor(e = {}) {
812
812
  this.logger = P.create("formatter"), this.options = e, this.init(e);
@@ -1082,7 +1082,7 @@ const de = () => ({
1082
1082
  typeof o[t] == "function" && (o[t] = o[t].bind(o));
1083
1083
  });
1084
1084
  };
1085
- class M extends W {
1085
+ class U extends W {
1086
1086
  constructor(e = {}, t) {
1087
1087
  if (super(), this.options = ge(e), this.services = {}, this.logger = P, this.modules = {
1088
1088
  external: []
@@ -1275,7 +1275,8 @@ class M extends W {
1275
1275
  return e.toLowerCase().indexOf("-latn") > 1 ? "ltr" : t.indexOf(i.getLanguagePartFromCode(e)) > -1 || e.toLowerCase().indexOf("-arab") > 1 ? "rtl" : "ltr";
1276
1276
  }
1277
1277
  static createInstance(e = {}, t) {
1278
- return new M(e, t);
1278
+ const i = new U(e, t);
1279
+ return i.createInstance = U.createInstance, i;
1279
1280
  }
1280
1281
  cloneInstance(e = {}, t = z) {
1281
1282
  const i = e.forkResourceStore;
@@ -1284,7 +1285,7 @@ class M extends W {
1284
1285
  ...this.options,
1285
1286
  ...e,
1286
1287
  isClone: !0
1287
- }, n = new M(s);
1288
+ }, n = new U(s);
1288
1289
  if ((e.debug !== void 0 || e.prefix !== void 0) && (n.logger = n.logger.clone(e)), ["store", "services", "language"].forEach((a) => {
1289
1290
  n[a] = this[a];
1290
1291
  }), n.services = {
@@ -1315,8 +1316,7 @@ class M extends W {
1315
1316
  };
1316
1317
  }
1317
1318
  }
1318
- const m = M.createInstance();
1319
- m.createInstance = M.createInstance;
1319
+ const m = U.createInstance();
1320
1320
  m.createInstance;
1321
1321
  m.dir;
1322
1322
  m.init;
@@ -1,6 +1,6 @@
1
- import { d as B, r as I, J as N, c as g, o as u, H as x, q as p, G as f, D as b, f as h, m as T, t as $, _ as P, k as d, K as E, g as F, F as k, a as H, b as K, e as L } from "./_plugin-vue_export-helper-BGEtPlxS.js";
2
- import { u as A, a as D } from "./normalize-props-AlmAfi_u.js";
3
- function R(e, s = G) {
1
+ import { d as B, r as I, J as N, c as g, o as u, H as x, q as p, G as f, v as b, a as h, m as T, y as $, _ as P, k as d, K as E, g as F, F as k, b as H, e as K, f as L } from "./_plugin-vue_export-helper-CP5OpzZH.js";
2
+ import { u as A, a as R } from "./normalize-props-AlmAfi_u.js";
3
+ function D(e, s = G) {
4
4
  const a = [...e];
5
5
  for (let o = a.length - 1; o > 0; o--) {
6
6
  const l = s() % (o + 1);
@@ -73,7 +73,7 @@ const J = ["aria-labelledby", "aria-selected", "tabindex"], V = { key: 0 }, U =
73
73
  },
74
74
  emits: ["answer"],
75
75
  setup(e, { emit: s }) {
76
- const a = s, o = d(() => e.hideChoicesName ? "sr-only" : ""), l = d(() => e.orderChoices ? e.choices : R(e.choices)), n = I(new Array(e.choices.length).fill(!1)), c = d(() => l.value.filter((i, C) => n.value[C])), t = d(() => c.value.map((i) => i.response ?? i.name).sort().join(",")), r = N();
76
+ const a = s, o = d(() => e.hideChoicesName ? "sr-only" : ""), l = d(() => e.orderChoices ? e.choices : D(e.choices)), n = I(new Array(e.choices.length).fill(!1)), c = d(() => l.value.filter((i, C) => n.value[C])), t = d(() => c.value.map((i) => i.response ?? i.name).sort().join(",")), r = N();
77
77
  E(t, () => {
78
78
  a("answer", t.value);
79
79
  }, { immediate: !1 });
@@ -81,11 +81,11 @@ const J = ["aria-labelledby", "aria-selected", "tabindex"], V = { key: 0 }, U =
81
81
  const i = n.value.indexOf(!0);
82
82
  return i === -1 ? 0 : i;
83
83
  }), y = F("options");
84
- function w(i) {
84
+ function v(i) {
85
85
  e.multiple || n.value.fill(!1), n.value[i] = !n.value[i];
86
86
  }
87
- function v(i) {
88
- i = (i + e.choices.length) % e.choices.length, e.multiple || w(i), y.value[i].focus();
87
+ function w(i) {
88
+ i = (i + e.choices.length) % e.choices.length, e.multiple || v(i), y.value[i].focus();
89
89
  }
90
90
  return (i, C) => (u(), g(k, null, [
91
91
  h("label", {
@@ -111,9 +111,9 @@ const J = ["aria-labelledby", "aria-selected", "tabindex"], V = { key: 0 }, U =
111
111
  "image-class": e.imageChoicesSize,
112
112
  selected: n.value[m],
113
113
  "tab-focusable": m === O.value,
114
- onToggle: (z) => w(m),
115
- onNext: (z) => v(m + 1),
116
- onPrevious: (z) => v(m - 1)
114
+ onToggle: (z) => v(m),
115
+ onNext: (z) => w(m + 1),
116
+ onPrevious: (z) => w(m - 1)
117
117
  }, null, 8, ["choice", "max-choices-per-line", "name-class", "image-class", "selected", "tab-focusable", "onToggle", "onNext", "onPrevious"]))), 128))
118
118
  ], 8, ee)
119
119
  ], 64));
@@ -125,7 +125,7 @@ function S(e) {
125
125
  maxChoicesPerLine: A(e.maxChoicesPerLine),
126
126
  choices: e.choices.map((s) => ({
127
127
  ...s,
128
- image: D(s.image)
128
+ image: R(s.image)
129
129
  }))
130
130
  };
131
131
  }
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ import "./components/capacity-calculation.ce.js.js";
3
3
  import "./components/clickable-image.ce.js.js";
4
4
  import "./components/complete-phrase.ce.js.js";
5
5
  import "./components/flip-cards.ce.js.js";
6
- import "./image-quiz.ce-Qe3SbGDF.js";
6
+ import "./image-quiz.ce-UlVFo5Sr.js";
7
7
  import "./components/image-quizzes.ce.js.js";
8
8
  import "./components/message-conversation.ce.js.js";
9
9
  import "./components/pix-article.ce.js.js";
package/dist/metadata.js CHANGED
@@ -7,7 +7,7 @@ const s = "usable", c = {
7
7
  accessibility: a,
8
8
  isInteractive: l,
9
9
  mobileUsability: o
10
- }, n = "not-accessible", m = !0, _ = "unusable", r = {
10
+ }, n = "accessible", m = !0, _ = "unusable", r = {
11
11
  accessibility: n,
12
12
  isInteractive: m,
13
13
  mobileUsability: _
package/dist/schema.js CHANGED
@@ -12,17 +12,20 @@ const n = e.object({
12
12
  height: e.number().optional()
13
13
  }).required().unknown(!0),
14
14
  areas: e.array().items(e.object({
15
- shape: e.string().valid("rect").required(),
16
15
  coords: e.object({
17
16
  x1: e.number().required(),
18
17
  y1: e.number().required(),
19
18
  x2: e.number().required(),
20
19
  y2: e.number().required()
21
20
  }).required(),
21
+ spot: e.object({
22
+ x: e.number().required(),
23
+ y: e.number().required()
24
+ }).required(),
22
25
  info: e.string().required(),
23
26
  tooltipPosition: e.string().valid("bottom").optional()
24
27
  }).required()).required().min(1)
25
- }), l = e.object({
28
+ }), u = e.object({
26
29
  titleLevel: e.number().optional(),
27
30
  listOfProbabilityBarsLists: e.array().items(
28
31
  e.array().items(
@@ -35,7 +38,7 @@ const n = e.object({
35
38
  userMessage: e.string().required(),
36
39
  llmMessage: e.string().required(),
37
40
  wordsToAdd: e.array().items(e.string()).required()
38
- }), u = e.object({
41
+ }), l = e.object({
39
42
  titleLevel: e.number().optional(),
40
43
  name: e.string().required(),
41
44
  cardList: e.array().items(
@@ -168,7 +171,7 @@ const n = e.object({
168
171
  failImage: e.string().required(),
169
172
  infoImage: e.string().required(),
170
173
  searchImage: e.string().required()
171
- }), S = /* @__PURE__ */ Object.assign({ "./calcul-impact/calcul-impact.schema.js": n, "./capacity-calculation/capacity-calculation.schema.js": a, "./clickable-image/clickable-image.schema.js": c, "./complete-phrase/complete-phrase.schema.js": l, "./flip-cards/flip-cards.schema.js": u, "./image-quiz/image-quiz.schema.js": i, "./image-quiz/image-quizzes.schema.js": d, "./message-conversation/message-conversation.schema.js": m, "./pix-article/pix-article.schema.js": g, "./pix-carousel/pix-carousel.schema.js": j, "./pix-cursor/pix-cursor.schema.js": h, "./pix-llm/llm-compare-messages.schema.js": x, "./pix-llm/llm-messages.schema.js": f, "./pix-llm/llm-prompt-select.schema.js": w, "./qcm-deepfake/qcm-deepfake.schema.js": L }), z = Object.fromEntries(Object.entries(S).map(([s, o]) => [
174
+ }), S = /* @__PURE__ */ Object.assign({ "./calcul-impact/calcul-impact.schema.js": n, "./capacity-calculation/capacity-calculation.schema.js": a, "./clickable-image/clickable-image.schema.js": c, "./complete-phrase/complete-phrase.schema.js": u, "./flip-cards/flip-cards.schema.js": l, "./image-quiz/image-quiz.schema.js": i, "./image-quiz/image-quizzes.schema.js": d, "./message-conversation/message-conversation.schema.js": m, "./pix-article/pix-article.schema.js": g, "./pix-carousel/pix-carousel.schema.js": j, "./pix-cursor/pix-cursor.schema.js": h, "./pix-llm/llm-compare-messages.schema.js": x, "./pix-llm/llm-messages.schema.js": f, "./pix-llm/llm-prompt-select.schema.js": w, "./qcm-deepfake/qcm-deepfake.schema.js": L }), z = Object.fromEntries(Object.entries(S).map(([s, o]) => [
172
175
  s.replace(/^.*\/([^/]+)\.schema\.js$/, "$1"),
173
176
  o
174
177
  ]));
@@ -1,4 +1,4 @@
1
- import { u as t, p as s } from "./_plugin-vue_export-helper-BGEtPlxS.js";
1
+ import { u as t, p as s } from "./_plugin-vue_export-helper-CP5OpzZH.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": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "description": "A collection of interactive components to be used in Pix challenges or modules",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",