@1024pix/epreuves-components 0.9.4 → 0.9.6

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,4 +1,4 @@
1
- import { d as e } from "../_plugin-vue_export-helper-CGraGJnO.js";
2
- import { I as m } from "../ImageQuiz.ce-CyuIHq11.js";
1
+ import { d as e } from "../_plugin-vue_export-helper-DLH45Sxm.js";
2
+ import { I as m } from "../ImageQuiz.ce-CAWRCnWK.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-CGraGJnO.js";
2
- import { I as A } from "../ImageQuiz.ce-CyuIHq11.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-DLH45Sxm.js";
2
+ import { I as A } from "../ImageQuiz.ce-CAWRCnWK.js";
3
3
  const h = /* @__PURE__ */ l({
4
4
  __name: "ImageQuizzes.ce",
5
5
  props: {
@@ -1,5 +1,5 @@
1
- import { a as d, c as o, o as n, f as s, t, F as l, b as p, g as i, _ as c, d as u } from "../_plugin-vue_export-helper-CGraGJnO.js";
2
- import { p as f, L as r } from "../LLMMessage.ce-CrEM5b3d.js";
1
+ import { a as d, c as o, o as n, f as s, t, F as l, b as p, g as i, _ as c, d as u } from "../_plugin-vue_export-helper-DLH45Sxm.js";
2
+ import { p as f, L as r } from "../shadow-dom-BtcBGuOh.js";
3
3
  const g = {
4
4
  class: "header",
5
5
  "aria-hidden": "true"
@@ -1,5 +1,5 @@
1
- import { a as m, u as i, j as p, c as o, o as e, F as d, b as u, e as g, _ as f, d as h } from "../_plugin-vue_export-helper-CGraGJnO.js";
2
- import { p as _, L as x } from "../LLMMessage.ce-CrEM5b3d.js";
1
+ import { a as m, u as i, j as p, c as o, o as e, F as d, b as u, e as g, _ as f, d as h } from "../_plugin-vue_export-helper-DLH45Sxm.js";
2
+ import { p as _, L as x } from "../shadow-dom-BtcBGuOh.js";
3
3
  const b = {
4
4
  class: "llm-messages",
5
5
  "aria-live": "polite"
@@ -1,19 +1,19 @@
1
- import { a as h, r as i, h as y, c, o as d, g as x, f as l, i as w, F as _, b as k, t as S, _ as C, d as L } from "../_plugin-vue_export-helper-CGraGJnO.js";
1
+ import { a as v, r as i, h, c, o as d, g as y, f as l, i as w, F as f, b as k, t as S, _ as C, d as L } from "../_plugin-vue_export-helper-DLH45Sxm.js";
2
2
  import "./llm-messages.ce.js.js";
3
- const N = { class: "prompt-select" }, P = { class: "prompt-select__options" }, B = ["disabled", "onClick"], E = /* @__PURE__ */ h({
3
+ const N = { class: "prompt-select" }, P = { class: "prompt-select__options" }, B = ["disabled", "onClick"], E = /* @__PURE__ */ v({
4
4
  __name: "LLMPromptSelect.ce",
5
5
  props: {
6
6
  messages: { type: Array },
7
7
  prompts: { type: Array },
8
8
  speed: { type: Number }
9
9
  },
10
- setup(f, { expose: b }) {
11
- const t = f, s = i(t.messages), m = i(t.prompts.map((e) => ({
10
+ setup(_, { expose: b }) {
11
+ const o = _, s = i(o.messages), m = i(o.prompts.map((e) => ({
12
12
  ...e,
13
13
  disabled: !1
14
14
  }))), r = i(!1);
15
15
  function g() {
16
- s.value = t.messages, m.value = t.prompts.map((e) => ({
16
+ s.value = o.messages, m.value = o.prompts.map((e) => ({
17
17
  ...e,
18
18
  disabled: !1
19
19
  })), r.value = !1;
@@ -21,8 +21,8 @@ const N = { class: "prompt-select" }, P = { class: "prompt-select__options" }, B
21
21
  b({
22
22
  reset: g
23
23
  });
24
- async function v(e) {
25
- const o = t.speed === 0 || window.matchMedia("(prefers-reduced-motion: reduce)").matches;
24
+ async function x(e) {
25
+ const t = o.speed === 0 || window.matchMedia("(prefers-reduced-motion: reduce)").matches;
26
26
  if (s.value = [
27
27
  ...s.value,
28
28
  {
@@ -31,37 +31,37 @@ const N = { class: "prompt-select" }, P = { class: "prompt-select__options" }, B
31
31
  },
32
32
  {
33
33
  direction: "inbound",
34
- content: o ? e.response : ""
34
+ content: t ? e.response : ""
35
35
  }
36
- ], e.disabled = !0, o) return;
36
+ ], e.disabled = !0, t) return;
37
37
  const a = s.value.length - 1;
38
38
  r.value = !0;
39
39
  const n = e.response.split(/(\s+|<[^>]+>)/);
40
40
  for (const p of n)
41
41
  await new Promise((u) => {
42
- setTimeout(u, t.speed ?? 20);
42
+ setTimeout(u, o.speed ?? 20);
43
43
  }), s.value = [...s.value], s.value[a].content += p;
44
44
  r.value = !1;
45
45
  }
46
- return (e, o) => {
47
- const a = y("llm-messages");
48
- return d(), c(_, null, [
49
- x(a, { messages: s.value }, null, 8, ["messages"]),
46
+ return (e, t) => {
47
+ const a = h("llm-messages");
48
+ return d(), c(f, null, [
49
+ y(a, { messages: s.value }, null, 8, ["messages"]),
50
50
  l("div", N, [
51
- o[0] || (o[0] = l("p", { class: "prompt-select__label" }, [
51
+ t[0] || (t[0] = l("p", { class: "prompt-select__label" }, [
52
52
  w(" Sélectionner un des prompts "),
53
53
  l("span", { class: "sr-only" }, "  une fois sélectionnés, les prompts ne sont plus disponibles. ")
54
54
  ], -1)),
55
55
  l("div", P, [
56
- (d(!0), c(_, null, k(m.value, (n, p) => (d(), c("button", {
56
+ (d(!0), c(f, null, k(m.value, (n, p) => (d(), c("button", {
57
57
  key: p,
58
58
  disabled: n.disabled || r.value,
59
- onClick: (u) => v(n)
59
+ onClick: (u) => x(n)
60
60
  }, S(n.prompt), 9, B))), 128))
61
61
  ])
62
62
  ])
63
63
  ], 64);
64
64
  };
65
65
  }
66
- }), M = ".sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}llm-messages{display:block;height:400px}.prompt-select{border-top:solid 1px grey;padding:24px}.prompt-select__label{margin-top:0;font-weight:700}.prompt-select__options{display:flex;gap:1rem;justify-content:left;padding-bottom:1rem;flex-wrap:wrap}.prompt-select__options>button{padding:.5rem 1.5rem;border:none;background:#cec3f4;border-radius:5px;font-size:1rem}.prompt-select__options>button:hover:not(:disabled){background:#9a8dc7;color:#fff;cursor:pointer}.prompt-select__options>button:disabled{cursor:not-allowed}", V = /* @__PURE__ */ C(E, [["styles", [M]]]);
66
+ }), M = ".sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}llm-messages{display:block;height:400px}.prompt-select{font-family:Roboto,sans-serif;border-top:solid 1px #253858;padding:16px 24px 24px}.prompt-select__label{margin-top:0;font-weight:700;color:#253858}.prompt-select__options{display:flex;gap:1rem;justify-content:left;flex-wrap:wrap}.prompt-select__options>button{padding:1rem 1.5rem;border:none;background:#cec3f4;border-radius:16px;border:1px solid #ffffff;color:#130261;font-size:.875rem;box-shadow:0 4px 12px -4px #957ee833}.prompt-select__options>button:hover:not(:disabled){background:#9a8dc7;color:#fff;cursor:pointer}.prompt-select__options>button:disabled{cursor:not-allowed;color:#1010104d}", V = /* @__PURE__ */ C(E, [["styles", [M]]]);
67
67
  window.customElements.define("llm-prompt-select", L(V));
@@ -1,9 +1,9 @@
1
- import { _ as b, c as o, o as s, a as M, r as v, s as N, y as A, q as w, z as f, f as y, i as k, t as h, g as C, F as x, b as D, x as B, e as E, d as T } from "../_plugin-vue_export-helper-CGraGJnO.js";
2
- const V = ".loader{width:8px;aspect-ratio:1;border-radius:50%;animation:l5 1s infinite linear alternate;transform:translate(100%)}@keyframes l5{0%{box-shadow:13px 0 #000,-13px 0 #0002;background:#000}33%{box-shadow:13px 0 #000,-13px 0 #0002;background:#0002}66%{box-shadow:13px 0 #0002,-13px 0 #000;background:#0002}to{box-shadow:13px 0 #0002,-13px 0 #000;background:#000}}@media (prefers-reduced-motion: reduce){.loader{display:none}}", z = {}, F = { class: "loader" };
1
+ import { _ as b, c as o, o as s, a as M, r as v, s as N, B as A, q as w, y as f, f as y, i as k, t as h, g as C, F as x, b as D, x as B, e as E, d as T } from "../_plugin-vue_export-helper-DLH45Sxm.js";
2
+ const V = ".loader{width:8px;aspect-ratio:1;border-radius:50%;animation:l5 1s infinite linear alternate;transform:translate(100%)}@keyframes l5{0%{box-shadow:13px 0 #000,-13px 0 #0002;background:#000}33%{box-shadow:13px 0 #000,-13px 0 #0002;background:#0002}66%{box-shadow:13px 0 #0002,-13px 0 #000;background:#0002}to{box-shadow:13px 0 #0002,-13px 0 #000;background:#000}}@media (prefers-reduced-motion: reduce){.loader{display:none}}", F = {}, z = { class: "loader" };
3
3
  function I(t, l) {
4
- return s(), o("div", F);
4
+ return s(), o("div", z);
5
5
  }
6
- const L = /* @__PURE__ */ b(z, [["render", I], ["styles", [V]]]), j = ["part"], q = {
6
+ const L = /* @__PURE__ */ b(F, [["render", I], ["styles", [V]]]), j = ["part"], q = {
7
7
  key: 1,
8
8
  class: "message__loader message__content",
9
9
  "aria-hidden": "true"