@1024pix/epreuves-components 0.9.3 → 0.9.4
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.
- package/dist/{ImageQuiz.ce-BCKCN6z2.js → ImageQuiz.ce-CyuIHq11.js} +9 -9
- package/dist/LLMMessage.ce-CrEM5b3d.js +3158 -0
- package/dist/{NavigationButton.ce-CG654eMo.js → NavigationButton.ce-qPk4D7sx.js} +2 -2
- package/dist/{_plugin-vue_export-helper-IFwZcQZF.js → _plugin-vue_export-helper-CGraGJnO.js} +707 -702
- package/dist/components/image-quiz.ce.js.js +2 -2
- package/dist/components/image-quizzes.ce.js.js +2 -2
- package/dist/components/llm-compare-messages.ce.js.js +24 -27
- package/dist/components/llm-messages.ce.js.js +10 -10
- package/dist/components/llm-prompt-select.ce.js.js +1 -1
- package/dist/components/message-conversation.ce.js.js +72 -55
- package/dist/components/pix-carousel.ce.js.js +6 -6
- package/dist/components/pix-cursor.ce.js.js +71 -66
- package/package.json +1 -1
- package/dist/LLMMessage.ce-Bwysr0wG.js +0 -3120
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as e } from "../_plugin-vue_export-helper-
|
|
2
|
-
import { I as m } from "../ImageQuiz.ce-
|
|
1
|
+
import { d as e } from "../_plugin-vue_export-helper-CGraGJnO.js";
|
|
2
|
+
import { I as m } from "../ImageQuiz.ce-CyuIHq11.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-
|
|
2
|
-
import { I as A } from "../ImageQuiz.ce-
|
|
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";
|
|
3
3
|
const h = /* @__PURE__ */ l({
|
|
4
4
|
__name: "ImageQuizzes.ce",
|
|
5
5
|
props: {
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import { a as d, c as
|
|
2
|
-
import { p as
|
|
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";
|
|
3
3
|
const g = {
|
|
4
4
|
class: "header",
|
|
5
5
|
"aria-hidden": "true"
|
|
6
|
-
}, h = { class: "sr-only" },
|
|
7
|
-
"aria-hidden": "true",
|
|
8
|
-
class: "conversation2"
|
|
9
|
-
}, x = /* @__PURE__ */ d({
|
|
6
|
+
}, h = { class: "sr-only" }, y = { class: "llm-compare-messages" }, v = { "aria-hidden": "true" }, _ = /* @__PURE__ */ d({
|
|
10
7
|
__name: "LLMCompareMessages.ce",
|
|
11
8
|
props: {
|
|
12
9
|
conversation1: { type: Object },
|
|
@@ -14,41 +11,41 @@ const g = {
|
|
|
14
11
|
userName: { type: String },
|
|
15
12
|
messages: { type: Array }
|
|
16
13
|
},
|
|
17
|
-
setup(
|
|
18
|
-
return
|
|
14
|
+
setup(x) {
|
|
15
|
+
return f(), (e, L) => (n(), o(l, null, [
|
|
19
16
|
s("div", g, [
|
|
20
17
|
s("p", null, t(e.conversation1.title), 1),
|
|
21
18
|
s("p", null, t(e.conversation2.title), 1)
|
|
22
19
|
]),
|
|
23
20
|
s("p", h, " Comparaison entre la conversation " + t(e.conversation1.title) + " et la conversation " + t(e.conversation2.title), 1),
|
|
24
|
-
s("div",
|
|
25
|
-
(n(!0),
|
|
26
|
-
key:
|
|
21
|
+
s("div", y, [
|
|
22
|
+
(n(!0), o(l, null, p(e.messages, (a, m) => (n(), o("div", {
|
|
23
|
+
key: m,
|
|
27
24
|
class: "llm-compare-messages__row"
|
|
28
25
|
}, [
|
|
29
|
-
Array.isArray(
|
|
30
|
-
s("div",
|
|
31
|
-
r
|
|
32
|
-
message:
|
|
26
|
+
Array.isArray(a) ? (n(), o(l, { key: 0 }, [
|
|
27
|
+
s("div", null, [
|
|
28
|
+
i(r, {
|
|
29
|
+
message: a[0],
|
|
33
30
|
name: e.conversation1.llmName
|
|
34
31
|
}, null, 8, ["message", "name"])
|
|
35
32
|
]),
|
|
36
|
-
s("div",
|
|
37
|
-
r
|
|
38
|
-
message:
|
|
33
|
+
s("div", null, [
|
|
34
|
+
i(r, {
|
|
35
|
+
message: a[1],
|
|
39
36
|
name: e.conversation2.llmName
|
|
40
37
|
}, null, 8, ["message", "name"])
|
|
41
38
|
])
|
|
42
|
-
], 64)) : (n(),
|
|
43
|
-
s("div",
|
|
44
|
-
r
|
|
45
|
-
message:
|
|
39
|
+
], 64)) : (n(), o(l, { key: 1 }, [
|
|
40
|
+
s("div", null, [
|
|
41
|
+
i(r, {
|
|
42
|
+
message: a,
|
|
46
43
|
name: e.userName
|
|
47
44
|
}, null, 8, ["message", "name"])
|
|
48
45
|
]),
|
|
49
|
-
s("div",
|
|
50
|
-
r
|
|
51
|
-
message:
|
|
46
|
+
s("div", v, [
|
|
47
|
+
i(r, {
|
|
48
|
+
message: a,
|
|
52
49
|
name: e.userName
|
|
53
50
|
}, null, 8, ["message", "name"])
|
|
54
51
|
])
|
|
@@ -57,5 +54,5 @@ const g = {
|
|
|
57
54
|
])
|
|
58
55
|
], 64));
|
|
59
56
|
}
|
|
60
|
-
}),
|
|
61
|
-
window.customElements.define("llm-compare-messages",
|
|
57
|
+
}), w = '*{box-sizing:border-box}:host{display:flex;flex-direction:column}.llm-compare-messages{display:flex;flex-direction:column;padding:24px 0;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)}.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}', b = /* @__PURE__ */ c(_, [["styles", [w]]]);
|
|
58
|
+
window.customElements.define("llm-compare-messages", u(b));
|
|
@@ -1,9 +1,9 @@
|
|
|
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-
|
|
2
|
-
import { p as _, L as
|
|
3
|
-
const
|
|
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";
|
|
3
|
+
const b = {
|
|
4
4
|
class: "llm-messages",
|
|
5
5
|
"aria-live": "polite"
|
|
6
|
-
},
|
|
6
|
+
}, v = /* @__PURE__ */ m({
|
|
7
7
|
__name: "LLMMessages.ce",
|
|
8
8
|
props: {
|
|
9
9
|
messages: { type: Array }
|
|
@@ -12,17 +12,17 @@ const y = {
|
|
|
12
12
|
const a = t;
|
|
13
13
|
_();
|
|
14
14
|
const s = i();
|
|
15
|
-
function
|
|
15
|
+
function r() {
|
|
16
16
|
s.scrollTop = s.scrollHeight;
|
|
17
17
|
}
|
|
18
18
|
return p(async () => {
|
|
19
|
-
a.messages,
|
|
20
|
-
}), (
|
|
21
|
-
(e(!0), o(d, null, u(
|
|
19
|
+
a.messages, r();
|
|
20
|
+
}), (l, w) => (e(), o("div", b, [
|
|
21
|
+
(e(!0), o(d, null, u(l.messages, (n, c) => (e(), g(x, {
|
|
22
22
|
key: c,
|
|
23
23
|
message: n
|
|
24
24
|
}, null, 8, ["message"]))), 128))
|
|
25
25
|
]));
|
|
26
26
|
}
|
|
27
|
-
}),
|
|
28
|
-
window.customElements.define("llm-messages", h(
|
|
27
|
+
}), y = "*{box-sizing:border-box}: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:29px;padding:24px}", L = /* @__PURE__ */ f(v, [["styles", [y]]]);
|
|
28
|
+
window.customElements.define("llm-messages", h(L));
|
|
@@ -1,4 +1,4 @@
|
|
|
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-
|
|
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";
|
|
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",
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
const
|
|
3
|
-
function
|
|
4
|
-
return
|
|
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" };
|
|
3
|
+
function I(t, l) {
|
|
4
|
+
return s(), o("div", F);
|
|
5
5
|
}
|
|
6
|
-
const
|
|
6
|
+
const L = /* @__PURE__ */ b(z, [["render", I], ["styles", [V]]]), j = ["part"], q = {
|
|
7
7
|
key: 1,
|
|
8
8
|
class: "message__loader message__content",
|
|
9
9
|
"aria-hidden": "true"
|
|
10
|
-
},
|
|
10
|
+
}, O = ["part"], P = { key: 0 }, R = /* @__PURE__ */ M({
|
|
11
11
|
__name: "Message.ce",
|
|
12
12
|
props: {
|
|
13
13
|
displaySender: { type: Boolean, default: !0 },
|
|
@@ -16,80 +16,97 @@ const F = /* @__PURE__ */ f(B, [["render", E], ["styles", [C]]]), z = ["part"],
|
|
|
16
16
|
animationDuration: { type: Number },
|
|
17
17
|
loadingDuration: { type: Number }
|
|
18
18
|
},
|
|
19
|
-
setup(
|
|
20
|
-
const
|
|
19
|
+
setup(t, { expose: l }) {
|
|
20
|
+
const n = v("hidden"), m = v([]), g = N(() => t.message.content.split(`
|
|
21
21
|
`));
|
|
22
|
-
function
|
|
23
|
-
return new Promise((
|
|
22
|
+
function c(e) {
|
|
23
|
+
return new Promise((i) => {
|
|
24
|
+
const r = setTimeout(i, e);
|
|
25
|
+
m.value.push(r);
|
|
26
|
+
});
|
|
24
27
|
}
|
|
25
|
-
|
|
26
|
-
await
|
|
27
|
-
}
|
|
28
|
-
|
|
28
|
+
async function u() {
|
|
29
|
+
await c(t.startAnimation), n.value = "loading", await c(t.loadingDuration), n.value = "visible", await c(t.animationDuration);
|
|
30
|
+
}
|
|
31
|
+
A(u);
|
|
32
|
+
async function a() {
|
|
33
|
+
n.value = "hidden", m.value.forEach(clearTimeout), await u();
|
|
34
|
+
}
|
|
35
|
+
return l({
|
|
36
|
+
reset: a
|
|
37
|
+
}), (e, i) => (s(), o("div", {
|
|
38
|
+
class: w(["message", [
|
|
29
39
|
`message--${e.message.direction}`,
|
|
30
|
-
{ "hidden-state":
|
|
40
|
+
{ "hidden-state": n.value === "hidden" }
|
|
31
41
|
]])
|
|
32
42
|
}, [
|
|
33
|
-
e.displaySender ? (
|
|
43
|
+
e.displaySender ? (s(), o("p", {
|
|
34
44
|
key: 0,
|
|
35
45
|
class: "message__sender",
|
|
36
46
|
part: `sender ${e.message.direction}`
|
|
37
47
|
}, [
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
], 8,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
])) :
|
|
44
|
-
|
|
45
|
-
class:
|
|
48
|
+
i[0] || (i[0] = y("span", { class: "sr-only" }, "Message de ", -1)),
|
|
49
|
+
k(h(e.message.userName), 1)
|
|
50
|
+
], 8, j)) : f("", !0),
|
|
51
|
+
n.value === "loading" ? (s(), o("div", q, [
|
|
52
|
+
C(L)
|
|
53
|
+
])) : f("", !0),
|
|
54
|
+
y("p", {
|
|
55
|
+
class: w(["message__content", { "hidden-state": n.value !== "visible" }]),
|
|
46
56
|
part: `message ${e.message.direction}`
|
|
47
57
|
}, [
|
|
48
|
-
(
|
|
49
|
-
|
|
50
|
-
|
|
58
|
+
(s(!0), o(x, null, D(g.value, (r, d) => (s(), o(x, { key: d }, [
|
|
59
|
+
d > 0 ? (s(), o("br", P)) : f("", !0),
|
|
60
|
+
k(" " + h(r), 1)
|
|
51
61
|
], 64))), 128))
|
|
52
|
-
], 10,
|
|
62
|
+
], 10, O)
|
|
53
63
|
], 2));
|
|
54
64
|
}
|
|
55
|
-
}),
|
|
65
|
+
}), G = ".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}}", H = /* @__PURE__ */ b(R, [["styles", [G]]]), J = { part: "conversation" }, K = { class: "sr-only" }, Q = /* @__PURE__ */ M({
|
|
56
66
|
__name: "MessageConversation.ce",
|
|
57
67
|
props: {
|
|
58
68
|
title: { default: "Conversation par messages", type: String },
|
|
59
69
|
messages: { type: Array },
|
|
60
70
|
animationSpeed: { default: 20, type: Number }
|
|
61
71
|
},
|
|
62
|
-
setup(
|
|
63
|
-
const
|
|
64
|
-
() =>
|
|
65
|
-
(
|
|
66
|
-
const
|
|
67
|
-
if (
|
|
68
|
-
return [{ message:
|
|
72
|
+
setup(t, { expose: l }) {
|
|
73
|
+
const n = 50 * t.animationSpeed, m = N(
|
|
74
|
+
() => t.messages.reduce(
|
|
75
|
+
(a, e, i) => {
|
|
76
|
+
const r = c(e);
|
|
77
|
+
if (i === 0)
|
|
78
|
+
return [{ message: e, displaySender: !0, startAnimation: 0, animationDuration: r }];
|
|
69
79
|
const {
|
|
70
|
-
message:
|
|
71
|
-
startAnimation:
|
|
72
|
-
animationDuration:
|
|
73
|
-
} =
|
|
74
|
-
return [...
|
|
80
|
+
message: d,
|
|
81
|
+
startAnimation: p,
|
|
82
|
+
animationDuration: _
|
|
83
|
+
} = a.at(-1), S = e.direction !== d.direction || e.userName !== d.userName, $ = p + _ + n;
|
|
84
|
+
return [...a, { message: e, displaySender: S, startAnimation: $, animationDuration: r }];
|
|
75
85
|
},
|
|
76
86
|
[]
|
|
77
87
|
)
|
|
78
|
-
);
|
|
79
|
-
function
|
|
80
|
-
return
|
|
88
|
+
), g = B("messages");
|
|
89
|
+
function c(a) {
|
|
90
|
+
return a.content.length * t.animationSpeed;
|
|
91
|
+
}
|
|
92
|
+
function u() {
|
|
93
|
+
g.value.forEach((a) => a.reset());
|
|
81
94
|
}
|
|
82
|
-
return (
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
"
|
|
89
|
-
|
|
90
|
-
|
|
95
|
+
return l({
|
|
96
|
+
reset: u
|
|
97
|
+
}), (a, e) => (s(), o("figure", J, [
|
|
98
|
+
y("figcaption", K, h(a.title), 1),
|
|
99
|
+
(s(!0), o(x, null, D(m.value, ({ message: i, displaySender: r, startAnimation: d, animationDuration: p }, _) => (s(), E(H, {
|
|
100
|
+
ref_for: !0,
|
|
101
|
+
ref: "messages",
|
|
102
|
+
message: i,
|
|
103
|
+
"start-animation": d,
|
|
104
|
+
"animation-duration": p,
|
|
105
|
+
"loading-duration": n,
|
|
106
|
+
"display-sender": r,
|
|
107
|
+
key: _
|
|
91
108
|
}, null, 8, ["message", "start-animation", "animation-duration", "display-sender"]))), 128))
|
|
92
109
|
]));
|
|
93
110
|
}
|
|
94
|
-
}),
|
|
95
|
-
window.customElements.define("message-conversation",
|
|
111
|
+
}), U = "figure{background-color:#fff;border-radius:16px;display:flex;flex-direction:column;gap:8px;margin:0;padding:16px}.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}", W = /* @__PURE__ */ b(Q, [["styles", [U]]]);
|
|
112
|
+
window.customElements.define("message-conversation", T(W));
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { a as j,
|
|
2
|
-
import { B as T, N as W, a as n, i as o, b as l } from "../NavigationButton.ce-
|
|
1
|
+
import { a as j, s as H, c as I, o as E, q as y, f as Y, z as m, K as S, i as x, t as R, _ as c, r as G, v as L, g as U, L as V, k as d, C as J, p as C, F as z, b as P, e as s, d as a } from "../_plugin-vue_export-helper-CGraGJnO.js";
|
|
2
|
+
import { B as T, N as W, a as n, i as o, b as l } from "../NavigationButton.ce-qPk4D7sx.js";
|
|
3
3
|
const t = {
|
|
4
|
-
"pix-carousel": { license: "Image license", of: "{{ currentSlide }} of {{ slideLength }}",
|
|
4
|
+
"pix-carousel": { license: "Image license", next: "Next", of: "{{ currentSlide }} of {{ slideLength }}", previous: "Previous", slide: "Slide", title: "Carousel" }
|
|
5
5
|
}, K = {
|
|
6
|
-
"pix-carousel": { license: "Licencia de imagen", of: "{{ currentSlide }} de {{ slideLength }}",
|
|
6
|
+
"pix-carousel": { license: "Licencia de imagen", next: "Siguiente", of: "{{ currentSlide }} de {{ slideLength }}", previous: "Anterior", slide: "Diapositiva", title: "Carrusel" }
|
|
7
7
|
}, X = {
|
|
8
8
|
"pix-carousel": { license: "Licence de l’image", of: "{{ currentSlide }} sur {{ slideLength }}", next: "Suivant", previous: "Précédent", slide: "Diapositive", title: "Carrousel" }
|
|
9
9
|
}, O = {
|
|
10
|
-
"pix-carousel": { license: "Licenza d'immagine", of: "{{ currentSlide }} di {{ slideLength }}",
|
|
10
|
+
"pix-carousel": { license: "Licenza d'immagine", next: "Avanti", of: "{{ currentSlide }} di {{ slideLength }}", previous: "Precedente", slide: "Diapositiva", title: "Galleria" }
|
|
11
11
|
}, b = {
|
|
12
|
-
"pix-carousel": { license: "Afbeeldingslicentie", of: "{{ currentSlide }} van {{ slideLength }}",
|
|
12
|
+
"pix-carousel": { license: "Afbeeldingslicentie", next: "Volgende", of: "{{ currentSlide }} van {{ slideLength }}", previous: "Vorige", slide: "Dia", title: "Carrousel" }
|
|
13
13
|
}, p = ["aria-level"], u = ["innerHTML"], r = {
|
|
14
14
|
key: 1,
|
|
15
15
|
class: "description"
|