@1024pix/epreuves-components 0.6.0 → 0.8.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.
@@ -0,0 +1,4 @@
1
+ import { d as e } from "../_plugin-vue_export-helper-FiywpteF.js";
2
+ import { I as m } from "../ImageQuiz.ce-gJc1nZ2d.js";
3
+ window.customElements.define("image-quiz", e(m));
4
+ window.customElements.define("qcu-image", e(m));
@@ -0,0 +1,29 @@
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-FiywpteF.js";
2
+ import { I as A } from "../ImageQuiz.ce-gJc1nZ2d.js";
3
+ const h = /* @__PURE__ */ l({
4
+ __name: "ImageQuizzes.ce",
5
+ props: {
6
+ quizzes: { type: Array }
7
+ },
8
+ emits: ["answer"],
9
+ setup(o, { emit: i }) {
10
+ const n = i, r = f(new Array(o.quizzes.length).fill(void 0));
11
+ w(() => {
12
+ if (!r.value.some((e) => e == null)) {
13
+ if (r.value.some((e) => e === "")) {
14
+ n("answer", "");
15
+ return;
16
+ }
17
+ n("answer", r.value.join(","));
18
+ }
19
+ });
20
+ function m(e, s) {
21
+ r.value[s] = e;
22
+ }
23
+ return (e, s) => (t(!0), z(v, null, p(e.quizzes, (u, a) => (t(), d(A, g({ key: a }, { ref_for: !0 }, u, {
24
+ "show-name": !0,
25
+ onAnswer: (c) => m(c, a)
26
+ }), null, 16, ["onAnswer"]))), 128));
27
+ }
28
+ });
29
+ window.customElements.define("image-quizzes", _(h));
@@ -1,12 +1,12 @@
1
- import { d as m, c as a, o as n, a as s, t, F as i, r as d, b as r, _ as p, e as u } from "../_plugin-vue_export-helper-BDNE3C4u.js";
2
- import { p as f, L as l } from "../LLMMessage.ce-CHtRURwX.js";
1
+ import { a as d, c as a, o as n, f as s, t, F as i, b as m, g as r, _ as p, d as f } from "../_plugin-vue_export-helper-FiywpteF.js";
2
+ import { p as u, L as l } from "../LLMMessage.ce-BN3kkTnG.js";
3
3
  const g = {
4
4
  class: "header",
5
5
  "aria-hidden": "true"
6
6
  }, h = { class: "sr-only" }, v = { class: "llm-compare-messages" }, _ = { class: "conversation1" }, y = { class: "conversation2" }, b = { class: "conversation1" }, w = {
7
7
  "aria-hidden": "true",
8
8
  class: "conversation2"
9
- }, x = /* @__PURE__ */ m({
9
+ }, x = /* @__PURE__ */ d({
10
10
  __name: "LLMCompareMessages.ce",
11
11
  props: {
12
12
  conversation1: { type: Object },
@@ -15,14 +15,14 @@ const g = {
15
15
  messages: { type: Array }
16
16
  },
17
17
  setup(N) {
18
- return f(), (e, C) => (n(), a(i, null, [
18
+ return u(), (e, C) => (n(), a(i, null, [
19
19
  s("div", g, [
20
20
  s("p", null, t(e.conversation1.title), 1),
21
21
  s("p", null, t(e.conversation2.title), 1)
22
22
  ]),
23
23
  s("p", h, " Comparaison entre la conversation " + t(e.conversation1.title) + " et la conversation " + t(e.conversation2.title), 1),
24
24
  s("div", v, [
25
- (n(!0), a(i, null, d(e.messages, (o, c) => (n(), a("div", {
25
+ (n(!0), a(i, null, m(e.messages, (o, c) => (n(), a("div", {
26
26
  key: c,
27
27
  class: "llm-compare-messages__row"
28
28
  }, [
@@ -57,5 +57,5 @@ const g = {
57
57
  ])
58
58
  ], 64));
59
59
  }
60
- }), L = '*{box-sizing:border-box}:host{display:flex;flex-direction:column}.llm-compare-messages{display:flex;flex-direction:column;padding:24px;gap:24px;position:relative;height:100%;overflow:auto}.llm-compare-messages:after{content:"";position:absolute;height:100%;top:0;left:50%;border-left:dashed 1px grey}.llm-compare-messages__row{display:flex;flex-direction:row;justify-content:space-between}.llm-compare-messages__row>div{display:flex;flex-direction:column;width:calc(50% - 12px)}.conversation1 .inbound .bubble{background:#e9f4c3}.header{display:flex}.header p{background:#e6eaf2;display:flex;width:50%;justify-content:center;align-items:center;padding:1rem;margin:0;font-size:1.2rem;font-weight:700}.header p:first-child{background:#e9f4c3}.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}', k = /* @__PURE__ */ p(x, [["styles", [L]]]);
61
- window.customElements.define("llm-compare-messages", u(k));
60
+ }), L = '*{box-sizing:border-box}:host{display:flex;flex-direction:column}.llm-compare-messages{display:flex;flex-direction:column;padding:24px;gap:24px;position:relative;height:100%;overflow:auto}.llm-compare-messages:after{content:"";position:absolute;height:100%;top:0;left:50%;border-left:dashed 1px grey}.llm-compare-messages__row{display:flex;flex-direction:row;justify-content:space-between}.llm-compare-messages__row>div{display:flex;flex-direction:column;width:calc(50% - 12px)}.conversation1 .inbound .bubble{background:#fff7da}.header{display:flex}.header p{background:#e6eaf2;display:flex;width:50%;justify-content:center;align-items:center;padding:1rem;margin:0;font-size:1.2rem;font-weight:700}.header p:first-child{background:#fff7da}.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}', k = /* @__PURE__ */ p(x, [["styles", [L]]]);
61
+ window.customElements.define("llm-compare-messages", f(k));
@@ -1,9 +1,9 @@
1
- import { d as m, u as i, w as p, c as o, o as e, F as d, r as u, i as g, _ as f, e as h } from "../_plugin-vue_export-helper-BDNE3C4u.js";
2
- import { p as _, L as v } from "../LLMMessage.ce-CHtRURwX.js";
3
- const w = {
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-FiywpteF.js";
2
+ import { p as _, L as v } from "../LLMMessage.ce-BN3kkTnG.js";
3
+ const y = {
4
4
  class: "llm-messages",
5
5
  "aria-live": "polite"
6
- }, y = /* @__PURE__ */ m({
6
+ }, L = /* @__PURE__ */ m({
7
7
  __name: "LLMMessages.ce",
8
8
  props: {
9
9
  messages: { type: Array }
@@ -12,17 +12,17 @@ const w = {
12
12
  const a = t;
13
13
  _();
14
14
  const s = i();
15
- function r() {
15
+ function l() {
16
16
  s.scrollTop = s.scrollHeight;
17
17
  }
18
18
  return p(async () => {
19
- a.messages, r();
20
- }), (l, B) => (e(), o("div", w, [
21
- (e(!0), o(d, null, u(l.messages, (n, c) => (e(), g(v, {
19
+ a.messages, l();
20
+ }), (r, B) => (e(), o("div", y, [
21
+ (e(!0), o(d, null, u(r.messages, (n, c) => (e(), g(v, {
22
22
  key: c,
23
23
  message: n
24
24
  }, null, 8, ["message"]))), 128))
25
25
  ]));
26
26
  }
27
- }), L = ":host{height:100%;overflow:auto;scroll-behavior:smooth}@media (prefers-reduced-motion: reduce){:host{scroll-behavior:auto}}.llm-messages{display:flex;flex-direction:column;gap:24px;padding:24px}", x = /* @__PURE__ */ f(y, [["styles", [L]]]);
27
+ }), w = ":host{height:100%;overflow:auto;scroll-behavior:smooth}@media (prefers-reduced-motion: reduce){:host{scroll-behavior:auto}}.llm-messages{display:flex;flex-direction:column;gap:24px;padding:24px}", x = /* @__PURE__ */ f(L, [["styles", [w]]]);
28
28
  window.customElements.define("llm-messages", h(x));
@@ -1,4 +1,4 @@
1
- import { d as h, f as c, g as y, c as i, o as d, b as x, a as l, h as w, F as _, r as k, t as S, _ as C, e as L } from "../_plugin-vue_export-helper-BDNE3C4u.js";
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-FiywpteF.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__ */ h({
4
4
  __name: "LLMPromptSelect.ce",
@@ -8,10 +8,10 @@ const N = { class: "prompt-select" }, P = { class: "prompt-select__options" }, B
8
8
  speed: { type: Number }
9
9
  },
10
10
  setup(f, { expose: b }) {
11
- const t = f, s = c(t.messages), m = c(t.prompts.map((e) => ({
11
+ const t = f, s = i(t.messages), m = i(t.prompts.map((e) => ({
12
12
  ...e,
13
13
  disabled: !1
14
- }))), r = c(!1);
14
+ }))), r = i(!1);
15
15
  function g() {
16
16
  s.value = t.messages, m.value = t.prompts.map((e) => ({
17
17
  ...e,
@@ -45,7 +45,7 @@ const N = { class: "prompt-select" }, P = { class: "prompt-select__options" }, B
45
45
  }
46
46
  return (e, o) => {
47
47
  const a = y("llm-messages");
48
- return d(), i(_, null, [
48
+ return d(), c(_, null, [
49
49
  x(a, { messages: s.value }, null, 8, ["messages"]),
50
50
  l("div", N, [
51
51
  o[0] || (o[0] = l("p", { class: "prompt-select__label" }, [
@@ -53,7 +53,7 @@ const N = { class: "prompt-select" }, P = { class: "prompt-select__options" }, B
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), i(_, null, k(m.value, (n, p) => (d(), i("button", {
56
+ (d(!0), c(_, null, k(m.value, (n, p) => (d(), c("button", {
57
57
  key: p,
58
58
  disabled: n.disabled || r.value,
59
59
  onClick: (u) => v(n)
@@ -63,5 +63,5 @@ const N = { class: "prompt-select" }, P = { class: "prompt-select__options" }, B
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}.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{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]]]);
67
67
  window.customElements.define("llm-prompt-select", L(V));
@@ -1,9 +1,9 @@
1
- import { _ as f, c as i, o as t, d as x, f as D, p as v, q as S, n as h, v as u, a as p, h as b, t as _, b as $, F as y, r as w, i as M, e as A } from "../_plugin-vue_export-helper-BDNE3C4u.js";
1
+ import { _ as f, c as i, o as t, a as x, r as D, s as v, y as S, q as h, z as u, f as p, i as b, t as _, g as $, F as y, b as w, e as M, d as A } from "../_plugin-vue_export-helper-FiywpteF.js";
2
2
  const C = ".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}}", B = {}, V = { class: "loader" };
3
- function E(n, s) {
3
+ function z(n, s) {
4
4
  return t(), i("div", V);
5
5
  }
6
- const F = /* @__PURE__ */ f(B, [["render", E], ["styles", [C]]]), z = ["part"], L = {
6
+ const E = /* @__PURE__ */ f(B, [["render", z], ["styles", [C]]]), F = ["part"], L = {
7
7
  key: 1,
8
8
  class: "message__loader message__content",
9
9
  "aria-hidden": "true"
@@ -37,9 +37,9 @@ const F = /* @__PURE__ */ f(B, [["render", E], ["styles", [C]]]), z = ["part"],
37
37
  }, [
38
38
  a[0] || (a[0] = p("span", { class: "sr-only" }, "Message de ", -1)),
39
39
  b(_(e.message.userName), 1)
40
- ], 8, z)) : u("", !0),
40
+ ], 8, F)) : u("", !0),
41
41
  s.value === "loading" ? (t(), i("div", L, [
42
- $(F)
42
+ $(E)
43
43
  ])) : u("", !0),
44
44
  p("p", {
45
45
  class: h(["message__content", { "hidden-state": s.value !== "visible" }]),