@1024pix/epreuves-components 0.10.1 → 1.0.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.
- package/dist/{ImageQuiz.ce-BbfMcldf.js → ImageQuiz.ce-B7shuhfQ.js} +28 -27
- package/dist/{LLMMessage.ce-DUUayymi.js → LLMMessage.ce--tBITfVq.js} +11 -11
- package/dist/Loading.ce-DFM6f_1v.js +14 -0
- package/dist/{NavigationButton.ce-RaQYJjPs.js → NavigationButton.ce-CF4O2FoQ.js} +10 -10
- package/dist/{_plugin-vue_export-helper-CGpZIhKK.js → _plugin-vue_export-helper-DGDsC3jx.js} +796 -788
- package/dist/components/complete-phrase.ce.js.js +41 -41
- 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 +3 -3
- package/dist/components/llm-messages.ce.js.js +3 -3
- package/dist/components/llm-prompt-select.ce.js.js +1 -1
- package/dist/components/message-conversation.ce.js.js +6 -6
- package/dist/components/pix-article.ce.js.js +42 -0
- package/dist/components/pix-carousel.ce.js.js +19 -19
- package/dist/components/pix-cursor.ce.js.js +14 -14
- package/dist/{i18n-DZYcdfDF.js → i18n-b8OapH7K.js} +141 -120
- package/dist/index.js +1 -0
- package/dist/metadata.js +23 -28
- package/dist/schema.js +134 -0
- package/dist/{shadow-dom-BdDj1I6f.js → shadow-dom-CTg-8Iam.js} +1 -1
- package/package.json +6 -2
- package/dist/Loading.ce-BsBClsn3.js +0 -14
package/dist/index.js
CHANGED
package/dist/metadata.js
CHANGED
|
@@ -1,32 +1,27 @@
|
|
|
1
|
-
const
|
|
1
|
+
const s = {
|
|
2
2
|
isInteractive: !0
|
|
3
|
-
},
|
|
4
|
-
isInteractive:
|
|
5
|
-
},
|
|
6
|
-
isInteractive:
|
|
7
|
-
},
|
|
8
|
-
isInteractive:
|
|
9
|
-
}, r = !1,
|
|
3
|
+
}, a = !0, i = {
|
|
4
|
+
isInteractive: a
|
|
5
|
+
}, n = !0, c = {
|
|
6
|
+
isInteractive: n
|
|
7
|
+
}, o = !1, _ = {
|
|
8
|
+
isInteractive: o
|
|
9
|
+
}, r = !1, l = {
|
|
10
10
|
isInteractive: r
|
|
11
|
-
},
|
|
12
|
-
isInteractive:
|
|
13
|
-
},
|
|
14
|
-
isInteractive:
|
|
15
|
-
},
|
|
16
|
-
isInteractive:
|
|
17
|
-
},
|
|
18
|
-
isInteractive:
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"llm-prompt-select": m,
|
|
26
|
-
"pix-carousel": I,
|
|
27
|
-
"pix-cursor": p,
|
|
28
|
-
"complete-phrase": d
|
|
29
|
-
};
|
|
11
|
+
}, m = !0, v = {
|
|
12
|
+
isInteractive: m
|
|
13
|
+
}, I = !0, g = {
|
|
14
|
+
isInteractive: I
|
|
15
|
+
}, p = !1, u = {
|
|
16
|
+
isInteractive: p
|
|
17
|
+
}, j = !1, b = {
|
|
18
|
+
isInteractive: j
|
|
19
|
+
}, d = !0, $ = {
|
|
20
|
+
isInteractive: d
|
|
21
|
+
}, x = /* @__PURE__ */ Object.assign({ "./complete-phrase/complete-phrase.metadata.json": s, "./image-quiz/image-quiz.metadata.json": i, "./image-quiz/image-quizzes.metadata.json": c, "./message-conversation/message-conversation.metadata.json": _, "./pix-article/pix-article.metadata.json": l, "./pix-carousel/pix-carousel.metadata.json": v, "./pix-cursor/pix-cursor.metadata.json": g, "./pix-llm/llm-compare-messages.metadata.json": u, "./pix-llm/llm-messages.metadata.json": b, "./pix-llm/llm-prompt-select.metadata.json": $ }), f = Object.fromEntries(Object.entries(x).map(([t, e]) => [
|
|
22
|
+
t.replace(/^.*\/([^/]+)\.metadata\.json$/, "$1"),
|
|
23
|
+
e
|
|
24
|
+
]));
|
|
30
25
|
export {
|
|
31
|
-
|
|
26
|
+
f as metadata
|
|
32
27
|
};
|
package/dist/schema.js
ADDED
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import e from "joi";
|
|
2
|
+
const n = e.object({
|
|
3
|
+
titleLevel: e.number().required(),
|
|
4
|
+
listOfProbabilityBarsLists: e.array().items(
|
|
5
|
+
e.array().items(
|
|
6
|
+
e.object({
|
|
7
|
+
name: e.string().required(),
|
|
8
|
+
percent: e.number().integer().required()
|
|
9
|
+
})
|
|
10
|
+
)
|
|
11
|
+
).required(),
|
|
12
|
+
userMessage: e.string().required(),
|
|
13
|
+
llmMessage: e.string().required(),
|
|
14
|
+
wordsToAdd: e.array().items(e.string()).required()
|
|
15
|
+
}), i = e.object({
|
|
16
|
+
name: e.string().required(),
|
|
17
|
+
multiple: e.boolean().optional(),
|
|
18
|
+
maxChoicesPerLine: e.number().optional(),
|
|
19
|
+
hideChoicesName: e.boolean().optional(),
|
|
20
|
+
orderChoices: e.boolean().optional(),
|
|
21
|
+
imageChoicesSize: e.string().valid("icon", "medium", "large").optional(),
|
|
22
|
+
choices: e.array().items(
|
|
23
|
+
e.object({
|
|
24
|
+
name: e.string().required(),
|
|
25
|
+
image: e.object({
|
|
26
|
+
src: e.string().required()
|
|
27
|
+
}).optional().unknown(!0),
|
|
28
|
+
response: e.string().optional()
|
|
29
|
+
}).required()
|
|
30
|
+
).required()
|
|
31
|
+
}).required(), a = e.object({
|
|
32
|
+
quizzes: e.array().items(i).required()
|
|
33
|
+
}).required(), d = e.object({
|
|
34
|
+
title: e.string().required(),
|
|
35
|
+
messages: e.array().items(
|
|
36
|
+
e.object({
|
|
37
|
+
userName: e.string().required(),
|
|
38
|
+
direction: e.string().valid("incoming", "outgoing").required(),
|
|
39
|
+
content: e.string().required()
|
|
40
|
+
})
|
|
41
|
+
).required()
|
|
42
|
+
}).required(), u = e.object({
|
|
43
|
+
titleLevel: e.number().required(),
|
|
44
|
+
title: e.string().required(),
|
|
45
|
+
author: e.string().required(),
|
|
46
|
+
date: e.string().required(),
|
|
47
|
+
paragraphs: e.array().items(e.string().required()),
|
|
48
|
+
highlightedSentence: e.string().required(),
|
|
49
|
+
colorOfHighlightSentence: e.string().required()
|
|
50
|
+
}), l = e.object({
|
|
51
|
+
name: e.string().allow("").required(),
|
|
52
|
+
attribution: e.string().allow("").required(),
|
|
53
|
+
url: e.string().allow("").required()
|
|
54
|
+
}), c = e.object({
|
|
55
|
+
title: e.string().required(),
|
|
56
|
+
description: e.string().allow("").required(),
|
|
57
|
+
displayWidth: e.number().min(0).optional(),
|
|
58
|
+
image: e.object({
|
|
59
|
+
src: e.string().required(),
|
|
60
|
+
alt: e.string().required()
|
|
61
|
+
}).required(),
|
|
62
|
+
license: l.optional()
|
|
63
|
+
}), m = e.object({
|
|
64
|
+
title: e.string().required(),
|
|
65
|
+
description: e.string().allow("").required(),
|
|
66
|
+
text: e.string().required()
|
|
67
|
+
}), g = e.object({
|
|
68
|
+
title: e.string().required(),
|
|
69
|
+
description: e.string().allow("").required(),
|
|
70
|
+
displayHeight: e.number().min(0).optional(),
|
|
71
|
+
text: e.string().required(),
|
|
72
|
+
image: e.object({
|
|
73
|
+
src: e.string().required(),
|
|
74
|
+
alt: e.string().required()
|
|
75
|
+
}).required()
|
|
76
|
+
}), q = e.object({
|
|
77
|
+
type: e.string().valid("image", "image-text", "text").required(),
|
|
78
|
+
slides: e.alternatives().conditional("type", {
|
|
79
|
+
switch: [
|
|
80
|
+
{ is: "image", then: e.array().items(c) },
|
|
81
|
+
{ is: "image-text", then: e.array().items(g) },
|
|
82
|
+
{ is: "text", then: e.array().items(m) }
|
|
83
|
+
]
|
|
84
|
+
}).required(),
|
|
85
|
+
aspectRatio: e.number().min(0).required(),
|
|
86
|
+
randomSlides: e.boolean().required(),
|
|
87
|
+
titleLevel: e.number().integer().min(0).max(6).optional(),
|
|
88
|
+
disableAnimation: e.boolean().required(),
|
|
89
|
+
disableLoop: e.boolean().optional()
|
|
90
|
+
}).meta({ title: "pix-carousel" }).required(), b = e.object({
|
|
91
|
+
options: e.array().items(e.object({
|
|
92
|
+
label: e.string().required(),
|
|
93
|
+
feedback: e.object({
|
|
94
|
+
type: e.string().valid("bad", "neutral", "close", "good").required(),
|
|
95
|
+
text: e.string().required()
|
|
96
|
+
}).required()
|
|
97
|
+
}).required()).required()
|
|
98
|
+
}), r = e.object({
|
|
99
|
+
title: e.string().required(),
|
|
100
|
+
llmName: e.string().required()
|
|
101
|
+
}).required(), p = e.object({
|
|
102
|
+
direction: e.string().valid("inbound").required(),
|
|
103
|
+
content: e.string().required()
|
|
104
|
+
}).required(), _ = e.object({
|
|
105
|
+
direction: e.string().valid("outbound").required(),
|
|
106
|
+
content: e.string().required()
|
|
107
|
+
}).required(), j = e.object({
|
|
108
|
+
conversation1: r,
|
|
109
|
+
conversation2: r,
|
|
110
|
+
userName: e.string().required(),
|
|
111
|
+
messages: e.array().items(
|
|
112
|
+
e.alternatives(_, e.array().items(p).min(2).max(2).required())
|
|
113
|
+
).required()
|
|
114
|
+
}).required(), t = e.object({
|
|
115
|
+
direction: e.string().valid("inbound", "outbound").required(),
|
|
116
|
+
content: e.string().required()
|
|
117
|
+
}), h = e.object({
|
|
118
|
+
messages: e.array().items(t.required()).required()
|
|
119
|
+
}).required(), v = e.object({
|
|
120
|
+
speed: e.number().default(20).min(0).optional(),
|
|
121
|
+
messages: e.array().items(t).required(),
|
|
122
|
+
prompts: e.array().items(
|
|
123
|
+
e.object({
|
|
124
|
+
prompt: e.string().required(),
|
|
125
|
+
response: e.string().required()
|
|
126
|
+
}).required()
|
|
127
|
+
).required()
|
|
128
|
+
}).required(), x = /* @__PURE__ */ Object.assign({ "./complete-phrase/complete-phrase.schema.js": n, "./image-quiz/image-quiz.schema.js": i, "./image-quiz/image-quizzes.schema.js": a, "./message-conversation/message-conversation.schema.js": d, "./pix-article/pix-article.schema.js": u, "./pix-carousel/pix-carousel.schema.js": q, "./pix-cursor/pix-cursor.schema.js": b, "./pix-llm/llm-compare-messages.schema.js": j, "./pix-llm/llm-messages.schema.js": h, "./pix-llm/llm-prompt-select.schema.js": v }), w = Object.fromEntries(Object.entries(x).map(([s, o]) => [
|
|
129
|
+
s.replace(/^.*\/([^/]+)\.schema\.js$/, "$1"),
|
|
130
|
+
o
|
|
131
|
+
]));
|
|
132
|
+
export {
|
|
133
|
+
w as metadata
|
|
134
|
+
};
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1024pix/epreuves-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.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",
|
|
7
7
|
"./components/*": "./dist/components/*.js",
|
|
8
|
-
"./metadata": "./dist/metadata.js"
|
|
8
|
+
"./metadata": "./dist/metadata.js",
|
|
9
|
+
"./schema": "./dist/schema.js"
|
|
9
10
|
},
|
|
10
11
|
"files": [
|
|
11
12
|
"dist/"
|
|
@@ -17,5 +18,8 @@
|
|
|
17
18
|
"license": "MIT",
|
|
18
19
|
"publishConfig": {
|
|
19
20
|
"access": "public"
|
|
21
|
+
},
|
|
22
|
+
"peerDependencies": {
|
|
23
|
+
"joi": "^17.0.0 || ^18.0.0"
|
|
20
24
|
}
|
|
21
25
|
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { _ as o, c as a, o as r, f as s } from "./_plugin-vue_export-helper-CGpZIhKK.js";
|
|
2
|
-
const n = ".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}}", t = {}, d = {
|
|
3
|
-
class: "loader",
|
|
4
|
-
role: "alert"
|
|
5
|
-
};
|
|
6
|
-
function c(l, e) {
|
|
7
|
-
return r(), a("div", d, e[0] || (e[0] = [
|
|
8
|
-
s("p", { class: "sr-only" }, " Chargement... ", -1)
|
|
9
|
-
]));
|
|
10
|
-
}
|
|
11
|
-
const p = /* @__PURE__ */ o(t, [["render", c], ["styles", [n]]]);
|
|
12
|
-
export {
|
|
13
|
-
p as L
|
|
14
|
-
};
|