@1024pix/epreuves-components 1.3.0 → 1.4.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/{ImageQuiz.ce-DtarwFF1.js → ImageQuiz.ce-BU1wvQqO.js} +56 -66
  2. package/dist/{LLMMessage.ce-CnMf3mGa.js → LLMMessage.ce-55YTC7a9.js} +7 -7
  3. package/dist/{Loading.ce-BLJllV22.js → Loading.ce-BQOiwGj0.js} +1 -1
  4. package/dist/{NavigationButton.ce-Cz9511sV.js → NavigationButton.ce-CgyZHLpi.js} +8 -8
  5. package/dist/{_plugin-vue_export-helper-DK91u00G.js → _plugin-vue_export-helper-BaT1QC5Q.js} +150 -136
  6. package/dist/components/calcul-impact.ce.js.js +49 -49
  7. package/dist/components/capacity-calculation.ce.js.js +279 -0
  8. package/dist/components/clickable-image.ce.js.js +1 -1
  9. package/dist/components/complete-phrase.ce.js.js +8 -8
  10. package/dist/components/flip-cards.ce.js.js +108 -0
  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 +3 -3
  15. package/dist/components/llm-prompt-select.ce.js.js +1 -1
  16. package/dist/components/message-conversation.ce.js.js +11 -11
  17. package/dist/components/pix-article.ce.js.js +2 -2
  18. package/dist/components/pix-carousel.ce.js.js +7 -7
  19. package/dist/components/pix-cursor.ce.js.js +12 -12
  20. package/dist/components/qcm-deepfake.ce.js.js +10 -10
  21. package/dist/{i18n-Gv3Ze5vF.js → i18n-BOk_ejZ-.js} +1 -1
  22. package/dist/index.js +2 -0
  23. package/dist/metadata.js +46 -38
  24. package/dist/schema.js +61 -24
  25. package/dist/{shadow-dom-DTRtrvgC.js → shadow-dom-CLVtaG5r.js} +1 -1
  26. package/dist/shuffled-CzcgAL34.js +14 -0
  27. package/package.json +1 -1
package/dist/schema.js CHANGED
@@ -1,7 +1,31 @@
1
1
  import e from "joi";
2
- const n = e.object({
2
+ const o = e.object({
3
3
  titleLevel: e.number().required()
4
4
  }), a = e.object({
5
+ titleLevel: e.number().required(),
6
+ images: e.object({
7
+ initial: e.object({
8
+ capacityImg: e.string().required(),
9
+ consumptionImg: e.string().required()
10
+ }).required(),
11
+ normal_weak: e.object({
12
+ capacityImg: e.string().required(),
13
+ consumptionImg: e.string().required()
14
+ }).required(),
15
+ normal_medium: e.object({
16
+ capacityImg: e.string().required(),
17
+ consumptionImg: e.string().required()
18
+ }).required(),
19
+ warning: e.object({
20
+ capacityImg: e.string().required(),
21
+ consumptionImg: e.string().required()
22
+ }).required(),
23
+ error: e.object({
24
+ capacityImg: e.string().required(),
25
+ consumptionImg: e.string().required()
26
+ }).required()
27
+ }).required()
28
+ }), c = e.object({
5
29
  image: e.object({
6
30
  src: e.string().required(),
7
31
  alt: e.string().required(),
@@ -32,6 +56,19 @@ const n = e.object({
32
56
  userMessage: e.string().required(),
33
57
  llmMessage: e.string().required(),
34
58
  wordsToAdd: e.array().items(e.string()).required()
59
+ }), d = e.object({
60
+ name: e.string().required(),
61
+ cardList: e.array().items(
62
+ e.array().items(
63
+ e.object({
64
+ name: e.string().required(),
65
+ description: e.string().required(),
66
+ icon: e.string().required(),
67
+ image: e.string().required(),
68
+ titleLevel: e.string()
69
+ })
70
+ )
71
+ ).required()
35
72
  }), i = e.object({
36
73
  name: e.string().required(),
37
74
  multiple: e.boolean().optional(),
@@ -48,9 +85,9 @@ const n = e.object({
48
85
  response: e.string().optional()
49
86
  }).required()
50
87
  ).required()
51
- }).required(), d = e.object({
88
+ }).required(), m = e.object({
52
89
  quizzes: e.array().items(i).required()
53
- }).required(), c = e.object({
90
+ }).required(), l = e.object({
54
91
  title: e.string().required(),
55
92
  messages: e.array().items(
56
93
  e.object({
@@ -63,7 +100,7 @@ const n = e.object({
63
100
  }).unknown(!0).optional()
64
101
  })
65
102
  ).required()
66
- }).required(), l = e.object({
103
+ }).required(), g = e.object({
67
104
  titleLevel: e.number().required(),
68
105
  title: e.string().required(),
69
106
  author: e.string().required(),
@@ -71,11 +108,11 @@ const n = e.object({
71
108
  paragraphs: e.array().items(e.string().required()),
72
109
  highlightedSentence: e.string().required(),
73
110
  colorOfHighlightSentence: e.string().required()
74
- }), m = e.object({
111
+ }), q = e.object({
75
112
  name: e.string().allow("").required(),
76
113
  attribution: e.string().allow("").required(),
77
114
  url: e.string().allow("").required()
78
- }), g = e.object({
115
+ }), b = e.object({
79
116
  title: e.string().required(),
80
117
  description: e.string().allow("").required(),
81
118
  displayWidth: e.number().min(0).optional(),
@@ -83,12 +120,12 @@ const n = e.object({
83
120
  src: e.string().required(),
84
121
  alt: e.string().required()
85
122
  }).required(),
86
- license: m.optional()
87
- }), q = e.object({
123
+ license: q.optional()
124
+ }), p = e.object({
88
125
  title: e.string().required(),
89
126
  description: e.string().allow("").required(),
90
127
  text: e.string().required()
91
- }), b = e.object({
128
+ }), _ = e.object({
92
129
  title: e.string().required(),
93
130
  description: e.string().allow("").required(),
94
131
  displayHeight: e.number().min(0).optional(),
@@ -97,13 +134,13 @@ const n = e.object({
97
134
  src: e.string().required(),
98
135
  alt: e.string().required()
99
136
  }).required()
100
- }), p = e.object({
137
+ }), j = e.object({
101
138
  type: e.string().valid("image", "image-text", "text").required(),
102
139
  slides: e.alternatives().conditional("type", {
103
140
  switch: [
104
- { is: "image", then: e.array().items(g) },
105
- { is: "image-text", then: e.array().items(b) },
106
- { is: "text", then: e.array().items(q) }
141
+ { is: "image", then: e.array().items(b) },
142
+ { is: "image-text", then: e.array().items(_) },
143
+ { is: "text", then: e.array().items(p) }
107
144
  ]
108
145
  }).required(),
109
146
  aspectRatio: e.number().min(0).required(),
@@ -111,7 +148,7 @@ const n = e.object({
111
148
  titleLevel: e.number().integer().min(0).max(6).optional(),
112
149
  disableAnimation: e.boolean().required(),
113
150
  disableLoop: e.boolean().optional()
114
- }).meta({ title: "pix-carousel" }).required(), _ = e.object({
151
+ }).meta({ title: "pix-carousel" }).required(), h = e.object({
115
152
  options: e.array().items(e.object({
116
153
  label: e.string().required(),
117
154
  feedback: e.object({
@@ -122,25 +159,25 @@ const n = e.object({
122
159
  }), r = e.object({
123
160
  title: e.string().required(),
124
161
  llmName: e.string().required()
125
- }).required(), j = e.object({
162
+ }).required(), v = e.object({
126
163
  direction: e.string().valid("inbound").required(),
127
164
  content: e.string().required()
128
- }).required(), h = e.object({
165
+ }).required(), y = e.object({
129
166
  direction: e.string().valid("outbound").required(),
130
167
  content: e.string().required()
131
- }).required(), v = e.object({
168
+ }).required(), x = e.object({
132
169
  conversation1: r,
133
170
  conversation2: r,
134
171
  userName: e.string().required(),
135
172
  messages: e.array().items(
136
- e.alternatives(h, e.array().items(j).min(2).max(2).required())
173
+ e.alternatives(y, e.array().items(v).min(2).max(2).required())
137
174
  ).required()
138
175
  }).required(), t = e.object({
139
176
  direction: e.string().valid("inbound", "outbound").required(),
140
177
  content: e.string().required()
141
- }), x = e.object({
178
+ }), I = e.object({
142
179
  messages: e.array().items(t.required()).required()
143
- }).required(), y = e.object({
180
+ }).required(), w = e.object({
144
181
  speed: e.number().default(20).min(0).optional(),
145
182
  messages: e.array().items(t).required(),
146
183
  prompts: e.array().items(
@@ -149,16 +186,16 @@ const n = e.object({
149
186
  response: e.string().required()
150
187
  }).required()
151
188
  ).required()
152
- }).required(), w = e.object({
189
+ }).required(), f = e.object({
153
190
  titleLevel: e.number().optional(),
154
191
  successImage: e.string().required(),
155
192
  failImage: e.string().required(),
156
193
  infoImage: e.string().required(),
157
194
  searchImage: e.string().required()
158
- }), f = /* @__PURE__ */ Object.assign({ "./calcul-impact/calcul-impact.schema.js": n, "./clickable-image/clickable-image.schema.js": a, "./complete-phrase/complete-phrase.schema.js": u, "./image-quiz/image-quiz.schema.js": i, "./image-quiz/image-quizzes.schema.js": d, "./message-conversation/message-conversation.schema.js": c, "./pix-article/pix-article.schema.js": l, "./pix-carousel/pix-carousel.schema.js": p, "./pix-cursor/pix-cursor.schema.js": _, "./pix-llm/llm-compare-messages.schema.js": v, "./pix-llm/llm-messages.schema.js": x, "./pix-llm/llm-prompt-select.schema.js": y, "./qcm-deepfake/qcm-deepfake.schema.js": w }), k = Object.fromEntries(Object.entries(f).map(([s, o]) => [
195
+ }), L = /* @__PURE__ */ Object.assign({ "./calcul-impact/calcul-impact.schema.js": o, "./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": d, "./image-quiz/image-quiz.schema.js": i, "./image-quiz/image-quizzes.schema.js": m, "./message-conversation/message-conversation.schema.js": l, "./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": I, "./pix-llm/llm-prompt-select.schema.js": w, "./qcm-deepfake/qcm-deepfake.schema.js": f }), S = Object.fromEntries(Object.entries(L).map(([s, n]) => [
159
196
  s.replace(/^.*\/([^/]+)\.schema\.js$/, "$1"),
160
- o
197
+ n
161
198
  ]));
162
199
  export {
163
- k as schema
200
+ S as schema
164
201
  };
@@ -1,4 +1,4 @@
1
- import { u as t, p as s } from "./_plugin-vue_export-helper-DK91u00G.js";
1
+ import { u as t, p as s } from "./_plugin-vue_export-helper-BaT1QC5Q.js";
2
2
  const a = Symbol("shadowRoot");
3
3
  function r() {
4
4
  const o = t();
@@ -0,0 +1,14 @@
1
+ function a(r, e = f) {
2
+ const t = [...r];
3
+ for (let n = t.length - 1; n > 0; n--) {
4
+ const o = e() % (n + 1);
5
+ [t[n], t[o]] = [t[o], t[n]];
6
+ }
7
+ return t;
8
+ }
9
+ function f() {
10
+ return Math.floor(Math.random() * 2 ** 32);
11
+ }
12
+ export {
13
+ a as s
14
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1024pix/epreuves-components",
3
- "version": "1.3.0",
3
+ "version": "1.4.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",