@1024pix/epreuves-components 1.3.0 → 1.4.1

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 +59 -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,17 @@ 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.object({
63
+ name: e.string().required(),
64
+ description: e.string().required(),
65
+ icon: e.string().required(),
66
+ image: e.string().required(),
67
+ titleLevel: e.string()
68
+ })
69
+ ).required()
35
70
  }), i = e.object({
36
71
  name: e.string().required(),
37
72
  multiple: e.boolean().optional(),
@@ -48,9 +83,9 @@ const n = e.object({
48
83
  response: e.string().optional()
49
84
  }).required()
50
85
  ).required()
51
- }).required(), d = e.object({
86
+ }).required(), m = e.object({
52
87
  quizzes: e.array().items(i).required()
53
- }).required(), c = e.object({
88
+ }).required(), l = e.object({
54
89
  title: e.string().required(),
55
90
  messages: e.array().items(
56
91
  e.object({
@@ -63,7 +98,7 @@ const n = e.object({
63
98
  }).unknown(!0).optional()
64
99
  })
65
100
  ).required()
66
- }).required(), l = e.object({
101
+ }).required(), g = e.object({
67
102
  titleLevel: e.number().required(),
68
103
  title: e.string().required(),
69
104
  author: e.string().required(),
@@ -71,11 +106,11 @@ const n = e.object({
71
106
  paragraphs: e.array().items(e.string().required()),
72
107
  highlightedSentence: e.string().required(),
73
108
  colorOfHighlightSentence: e.string().required()
74
- }), m = e.object({
109
+ }), q = e.object({
75
110
  name: e.string().allow("").required(),
76
111
  attribution: e.string().allow("").required(),
77
112
  url: e.string().allow("").required()
78
- }), g = e.object({
113
+ }), b = e.object({
79
114
  title: e.string().required(),
80
115
  description: e.string().allow("").required(),
81
116
  displayWidth: e.number().min(0).optional(),
@@ -83,12 +118,12 @@ const n = e.object({
83
118
  src: e.string().required(),
84
119
  alt: e.string().required()
85
120
  }).required(),
86
- license: m.optional()
87
- }), q = e.object({
121
+ license: q.optional()
122
+ }), p = e.object({
88
123
  title: e.string().required(),
89
124
  description: e.string().allow("").required(),
90
125
  text: e.string().required()
91
- }), b = e.object({
126
+ }), _ = e.object({
92
127
  title: e.string().required(),
93
128
  description: e.string().allow("").required(),
94
129
  displayHeight: e.number().min(0).optional(),
@@ -97,13 +132,13 @@ const n = e.object({
97
132
  src: e.string().required(),
98
133
  alt: e.string().required()
99
134
  }).required()
100
- }), p = e.object({
135
+ }), j = e.object({
101
136
  type: e.string().valid("image", "image-text", "text").required(),
102
137
  slides: e.alternatives().conditional("type", {
103
138
  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) }
139
+ { is: "image", then: e.array().items(b) },
140
+ { is: "image-text", then: e.array().items(_) },
141
+ { is: "text", then: e.array().items(p) }
107
142
  ]
108
143
  }).required(),
109
144
  aspectRatio: e.number().min(0).required(),
@@ -111,7 +146,7 @@ const n = e.object({
111
146
  titleLevel: e.number().integer().min(0).max(6).optional(),
112
147
  disableAnimation: e.boolean().required(),
113
148
  disableLoop: e.boolean().optional()
114
- }).meta({ title: "pix-carousel" }).required(), _ = e.object({
149
+ }).meta({ title: "pix-carousel" }).required(), h = e.object({
115
150
  options: e.array().items(e.object({
116
151
  label: e.string().required(),
117
152
  feedback: e.object({
@@ -122,25 +157,25 @@ const n = e.object({
122
157
  }), r = e.object({
123
158
  title: e.string().required(),
124
159
  llmName: e.string().required()
125
- }).required(), j = e.object({
160
+ }).required(), v = e.object({
126
161
  direction: e.string().valid("inbound").required(),
127
162
  content: e.string().required()
128
- }).required(), h = e.object({
163
+ }).required(), y = e.object({
129
164
  direction: e.string().valid("outbound").required(),
130
165
  content: e.string().required()
131
- }).required(), v = e.object({
166
+ }).required(), x = e.object({
132
167
  conversation1: r,
133
168
  conversation2: r,
134
169
  userName: e.string().required(),
135
170
  messages: e.array().items(
136
- e.alternatives(h, e.array().items(j).min(2).max(2).required())
171
+ e.alternatives(y, e.array().items(v).min(2).max(2).required())
137
172
  ).required()
138
173
  }).required(), t = e.object({
139
174
  direction: e.string().valid("inbound", "outbound").required(),
140
175
  content: e.string().required()
141
- }), x = e.object({
176
+ }), I = e.object({
142
177
  messages: e.array().items(t.required()).required()
143
- }).required(), y = e.object({
178
+ }).required(), w = e.object({
144
179
  speed: e.number().default(20).min(0).optional(),
145
180
  messages: e.array().items(t).required(),
146
181
  prompts: e.array().items(
@@ -149,16 +184,16 @@ const n = e.object({
149
184
  response: e.string().required()
150
185
  }).required()
151
186
  ).required()
152
- }).required(), w = e.object({
187
+ }).required(), f = e.object({
153
188
  titleLevel: e.number().optional(),
154
189
  successImage: e.string().required(),
155
190
  failImage: e.string().required(),
156
191
  infoImage: e.string().required(),
157
192
  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]) => [
193
+ }), 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
194
  s.replace(/^.*\/([^/]+)\.schema\.js$/, "$1"),
160
- o
195
+ n
161
196
  ]));
162
197
  export {
163
- k as schema
198
+ S as schema
164
199
  };
@@ -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.1",
4
4
  "description": "A collection of interactive components to be used in Pix challenges or modules",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",