@egen-civitas/esm-styleguide 2.3.0 → 3.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.
Files changed (204) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/dist/_all.scss +0 -1
  3. package/dist/_vars.scss +4 -4
  4. package/dist/assistant/index.d.ts +7 -0
  5. package/dist/assistant/index.d.ts.map +1 -1
  6. package/dist/assistant/index.js +5 -0
  7. package/dist/assistant/live-orb.component.d.ts +6 -0
  8. package/dist/assistant/live-orb.component.d.ts.map +1 -1
  9. package/dist/assistant/live-orb.component.js +15 -3
  10. package/dist/assistant/robot/README.md +47 -0
  11. package/dist/assistant/robot/Robot.d.ts +16 -0
  12. package/dist/assistant/robot/Robot.d.ts.map +1 -0
  13. package/dist/assistant/robot/Robot.js +159 -0
  14. package/dist/assistant/robot/RobotStage.d.ts +31 -0
  15. package/dist/assistant/robot/RobotStage.d.ts.map +1 -0
  16. package/dist/assistant/robot/RobotStage.js +250 -0
  17. package/dist/assistant/robot/clips.d.ts +62 -0
  18. package/dist/assistant/robot/clips.d.ts.map +1 -0
  19. package/dist/assistant/robot/clips.js +179 -0
  20. package/dist/assistant/robot/controller.d.ts +133 -0
  21. package/dist/assistant/robot/controller.d.ts.map +1 -0
  22. package/dist/assistant/robot/controller.js +522 -0
  23. package/dist/assistant/robot/gestures.d.ts +23 -0
  24. package/dist/assistant/robot/gestures.d.ts.map +1 -0
  25. package/dist/assistant/robot/gestures.js +1301 -0
  26. package/dist/assistant/robot/hands.d.ts +55 -0
  27. package/dist/assistant/robot/hands.d.ts.map +1 -0
  28. package/dist/assistant/robot/hands.js +121 -0
  29. package/dist/assistant/robot/ik.d.ts +34 -0
  30. package/dist/assistant/robot/ik.d.ts.map +1 -0
  31. package/dist/assistant/robot/ik.js +57 -0
  32. package/dist/assistant/robot/index.d.ts +18 -0
  33. package/dist/assistant/robot/index.d.ts.map +1 -0
  34. package/dist/assistant/robot/index.js +9 -0
  35. package/dist/assistant/robot/lazy.d.ts +8 -0
  36. package/dist/assistant/robot/lazy.d.ts.map +1 -0
  37. package/dist/assistant/robot/lazy.js +33 -0
  38. package/dist/assistant/robot/materials.d.ts +46 -0
  39. package/dist/assistant/robot/materials.d.ts.map +1 -0
  40. package/dist/assistant/robot/materials.js +101 -0
  41. package/dist/assistant/robot/parts/Body.d.ts +28 -0
  42. package/dist/assistant/robot/parts/Body.d.ts.map +1 -0
  43. package/dist/assistant/robot/parts/Body.js +368 -0
  44. package/dist/assistant/robot/parts/Head.d.ts +11 -0
  45. package/dist/assistant/robot/parts/Head.d.ts.map +1 -0
  46. package/dist/assistant/robot/parts/Head.js +210 -0
  47. package/dist/assistant/robot/parts/primitives.d.ts +36 -0
  48. package/dist/assistant/robot/parts/primitives.d.ts.map +1 -0
  49. package/dist/assistant/robot/parts/primitives.js +127 -0
  50. package/dist/assistant/robot/skeleton.d.ts +66 -0
  51. package/dist/assistant/robot/skeleton.d.ts.map +1 -0
  52. package/dist/assistant/robot/skeleton.js +266 -0
  53. package/dist/cards/card-header.component.d.ts +1 -1
  54. package/dist/cards/card-header.component.js +1 -1
  55. package/dist/cards/card-header.stories.js +1 -1
  56. package/dist/components/_general.scss +3 -3
  57. package/dist/config-schema.d.ts +0 -17
  58. package/dist/config-schema.d.ts.map +1 -1
  59. package/dist/config-schema.js +0 -25
  60. package/dist/datepicker/datepicker.stories.js +1 -1
  61. package/dist/empty-card/empty-card.stories.js +2 -2
  62. package/dist/error-state/error-state.stories.js +2 -2
  63. package/dist/icons/icon-registration.d.ts.map +1 -1
  64. package/dist/icons/icon-registration.js +0 -30
  65. package/dist/icons/icons.d.ts +4 -32
  66. package/dist/icons/icons.d.ts.map +1 -1
  67. package/dist/icons/icons.js +18 -148
  68. package/dist/index.js +0 -2
  69. package/dist/internal.d.ts +0 -3
  70. package/dist/internal.d.ts.map +1 -1
  71. package/dist/internal.js +0 -3
  72. package/dist/notifications/actionable-notification.stories.js +5 -5
  73. package/dist/notifications/notification.stories.js +5 -5
  74. package/dist/page-header/page-header.component.d.ts +1 -1
  75. package/dist/page-header/page-header.component.js +1 -1
  76. package/dist/pagination/pagination.stories.js +2 -2
  77. package/dist/pictograms/pictogram-registration.d.ts.map +1 -1
  78. package/dist/pictograms/pictogram-registration.js +2 -36
  79. package/dist/pictograms/pictograms.d.ts +2 -20
  80. package/dist/pictograms/pictograms.d.ts.map +1 -1
  81. package/dist/pictograms/pictograms.js +2 -139
  82. package/dist/public.d.ts +0 -3
  83. package/dist/public.d.ts.map +1 -1
  84. package/dist/public.js +0 -3
  85. package/dist/responsive-wrapper/responsive-wrapper.stories.js +1 -1
  86. package/dist/snackbars/snackbar.stories.js +1 -1
  87. package/dist/toasts/toast.stories.js +1 -1
  88. package/dist/workbench/splitter.component.d.ts +14 -0
  89. package/dist/workbench/splitter.component.d.ts.map +1 -1
  90. package/dist/workbench/splitter.component.js +52 -0
  91. package/dist/workbench/tool-window-rail.component.d.ts.map +1 -1
  92. package/dist/workbench/tool-window-rail.component.js +9 -1
  93. package/dist/workbench/tool-window-zone.component.d.ts.map +1 -1
  94. package/dist/workbench/tool-window-zone.component.js +9 -1
  95. package/dist/workbench/workbench.module.scss +64 -1
  96. package/dist/workbench/workbench.store.d.ts +2 -0
  97. package/dist/workbench/workbench.store.d.ts.map +1 -1
  98. package/dist/workbench/workbench.store.js +9 -0
  99. package/dist/workspaces/container/workspace-container.component.d.ts +8 -8
  100. package/dist/workspaces/container/workspace-container.component.js +9 -9
  101. package/dist/workspaces2/workspace2.d.ts +3 -3
  102. package/dist/workspaces2/workspace2.js +3 -3
  103. package/mock-jest.tsx +0 -41
  104. package/mock.tsx +0 -41
  105. package/package.json +26 -23
  106. package/src/_vars.scss +4 -4
  107. package/dist/entity-banner/actions-menu/entity-banner-actions-menu.component.d.ts +0 -19
  108. package/dist/entity-banner/actions-menu/entity-banner-actions-menu.component.d.ts.map +0 -1
  109. package/dist/entity-banner/actions-menu/entity-banner-actions-menu.component.js +0 -137
  110. package/dist/entity-banner/actions-menu/entity-banner-actions-menu.module.scss +0 -23
  111. package/dist/entity-banner/contact-details/entity-banner-contact-details.component.d.ts +0 -9
  112. package/dist/entity-banner/contact-details/entity-banner-contact-details.component.d.ts.map +0 -1
  113. package/dist/entity-banner/contact-details/entity-banner-contact-details.component.js +0 -207
  114. package/dist/entity-banner/contact-details/entity-banner-contact-details.module.scss +0 -47
  115. package/dist/entity-banner/contact-details/entity-banner-toggle-contact-details-button.component.d.ts +0 -12
  116. package/dist/entity-banner/contact-details/entity-banner-toggle-contact-details-button.component.d.ts.map +0 -1
  117. package/dist/entity-banner/contact-details/entity-banner-toggle-contact-details-button.component.js +0 -15
  118. package/dist/entity-banner/contact-details/types.d.ts +0 -48
  119. package/dist/entity-banner/contact-details/types.d.ts.map +0 -1
  120. package/dist/entity-banner/contact-details/types.js +0 -1
  121. package/dist/entity-banner/contact-details/useEntityAttributes.d.ts +0 -14
  122. package/dist/entity-banner/contact-details/useEntityAttributes.d.ts.map +0 -1
  123. package/dist/entity-banner/contact-details/useEntityAttributes.js +0 -12
  124. package/dist/entity-banner/contact-details/useEntityGroupsForEntity.d.ts +0 -11
  125. package/dist/entity-banner/contact-details/useEntityGroupsForEntity.d.ts.map +0 -1
  126. package/dist/entity-banner/contact-details/useEntityGroupsForEntity.js +0 -9
  127. package/dist/entity-banner/contact-details/useRelationships.d.ts +0 -35
  128. package/dist/entity-banner/contact-details/useRelationships.d.ts.map +0 -1
  129. package/dist/entity-banner/contact-details/useRelationships.js +0 -37
  130. package/dist/entity-banner/entity-info/entity-banner-entity-identifiers.component.d.ts +0 -9
  131. package/dist/entity-banner/entity-info/entity-banner-entity-identifiers.component.d.ts.map +0 -1
  132. package/dist/entity-banner/entity-info/entity-banner-entity-identifiers.component.js +0 -77
  133. package/dist/entity-banner/entity-info/entity-banner-entity-info.component.d.ts +0 -9
  134. package/dist/entity-banner/entity-info/entity-banner-entity-info.component.d.ts.map +0 -1
  135. package/dist/entity-banner/entity-info/entity-banner-entity-info.component.js +0 -72
  136. package/dist/entity-banner/entity-info/entity-banner-entity-info.module.scss +0 -165
  137. package/dist/entity-banner/index.d.ts +0 -5
  138. package/dist/entity-banner/index.d.ts.map +0 -1
  139. package/dist/entity-banner/index.js +0 -4
  140. package/dist/entity-photo/entity-photo.component.d.ts +0 -21
  141. package/dist/entity-photo/entity-photo.component.d.ts.map +0 -1
  142. package/dist/entity-photo/entity-photo.component.js +0 -111
  143. package/dist/entity-photo/entity-photo.module.scss +0 -21
  144. package/dist/entity-photo/index.d.ts +0 -3
  145. package/dist/entity-photo/index.d.ts.map +0 -1
  146. package/dist/entity-photo/index.js +0 -2
  147. package/dist/entity-photo/placeholder-icon.component.d.ts +0 -9
  148. package/dist/entity-photo/placeholder-icon.component.d.ts.map +0 -1
  149. package/dist/entity-photo/placeholder-icon.component.js +0 -26
  150. package/dist/entity-photo/useEntityPhoto.d.ts +0 -29
  151. package/dist/entity-photo/useEntityPhoto.d.ts.map +0 -1
  152. package/dist/entity-photo/useEntityPhoto.js +0 -37
  153. package/dist/icons/svgs/baby.svg +0 -1
  154. package/dist/icons/svgs/chemistry.svg +0 -1
  155. package/dist/icons/svgs/drug-order.svg +0 -1
  156. package/dist/icons/svgs/generic-order-type.svg +0 -1
  157. package/dist/icons/svgs/hospital-bed.svg +0 -1
  158. package/dist/icons/svgs/image-medical.svg +0 -1
  159. package/dist/icons/svgs/lab-order.svg +0 -1
  160. package/dist/icons/svgs/material-order.svg +0 -1
  161. package/dist/icons/svgs/medication.svg +0 -1
  162. package/dist/icons/svgs/microscope.svg +0 -1
  163. package/dist/icons/svgs/mother.svg +0 -1
  164. package/dist/icons/svgs/procedure-order.svg +0 -1
  165. package/dist/icons/svgs/referral-order.svg +0 -1
  166. package/dist/icons/svgs/syringe.svg +0 -1
  167. package/dist/logo/_logo.scss +0 -34
  168. package/dist/logo/egen-logo-full.svg +0 -1
  169. package/dist/logo/egen-logo-icon.svg +0 -1
  170. package/dist/logo/egen-logo-partial.svg +0 -1
  171. package/dist/logo/egen-logo-white.svg +0 -1
  172. package/dist/logo/index.d.ts +0 -8
  173. package/dist/logo/index.d.ts.map +0 -1
  174. package/dist/logo/index.js +0 -22
  175. package/dist/numeric-datapoint/index.d.ts +0 -4
  176. package/dist/numeric-datapoint/index.d.ts.map +0 -1
  177. package/dist/numeric-datapoint/index.js +0 -3
  178. package/dist/numeric-datapoint/interpretation-utils.d.ts +0 -27
  179. package/dist/numeric-datapoint/interpretation-utils.d.ts.map +0 -1
  180. package/dist/numeric-datapoint/interpretation-utils.js +0 -66
  181. package/dist/numeric-datapoint/numeric-datapoint.component.d.ts +0 -44
  182. package/dist/numeric-datapoint/numeric-datapoint.component.d.ts.map +0 -1
  183. package/dist/numeric-datapoint/numeric-datapoint.component.js +0 -110
  184. package/dist/numeric-datapoint/numeric-datapoint.module.scss +0 -141
  185. package/dist/numeric-datapoint/use-concept-reference-range.d.ts +0 -13
  186. package/dist/numeric-datapoint/use-concept-reference-range.d.ts.map +0 -1
  187. package/dist/numeric-datapoint/use-concept-reference-range.js +0 -31
  188. package/dist/pictograms/svgs/blood-bank.svg +0 -1
  189. package/dist/pictograms/svgs/cardiology.svg +0 -1
  190. package/dist/pictograms/svgs/ct-scan.svg +0 -1
  191. package/dist/pictograms/svgs/dentistry.svg +0 -1
  192. package/dist/pictograms/svgs/emergency-department.svg +0 -1
  193. package/dist/pictograms/svgs/geriatrics.svg +0 -1
  194. package/dist/pictograms/svgs/gynaecology.svg +0 -1
  195. package/dist/pictograms/svgs/in-patient.svg +0 -1
  196. package/dist/pictograms/svgs/labs-2.svg +0 -1
  197. package/dist/pictograms/svgs/labs.svg +0 -1
  198. package/dist/pictograms/svgs/obstetrics.svg +0 -1
  199. package/dist/pictograms/svgs/patient-search.svg +0 -1
  200. package/dist/pictograms/svgs/patients.svg +0 -1
  201. package/dist/pictograms/svgs/pharmacy-1.svg +0 -1
  202. package/dist/pictograms/svgs/pharmacy-2.svg +0 -1
  203. package/dist/pictograms/svgs/triage.svg +0 -1
  204. package/dist/pictograms/svgs/x-ray.svg +0 -1
@@ -0,0 +1,368 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import React from "react";
3
+ import { Ellipsoid, Limb, Seam, useGradientTorus } from "./primitives.js";
4
+ import { FINGER_LENGTH } from "../skeleton.js";
5
+ /** Bassin : base du corps, centrée sur l'articulation des hanches. */ export function Pelvis({ m }) {
6
+ return /*#__PURE__*/ _jsxs("group", {
7
+ children: [
8
+ /*#__PURE__*/ _jsx(Ellipsoid, {
9
+ radii: [
10
+ 0.185,
11
+ 0.13,
12
+ 0.155
13
+ ],
14
+ position: [
15
+ 0,
16
+ -0.005,
17
+ 0
18
+ ],
19
+ material: m.body
20
+ }),
21
+ /*#__PURE__*/ _jsx("mesh", {
22
+ position: [
23
+ 0,
24
+ 0.095,
25
+ 0
26
+ ],
27
+ rotation: [
28
+ Math.PI / 2,
29
+ 0,
30
+ 0
31
+ ],
32
+ scale: [
33
+ 1,
34
+ 0.84,
35
+ 1
36
+ ],
37
+ material: m.seam,
38
+ children: /*#__PURE__*/ _jsx("torusGeometry", {
39
+ args: [
40
+ 0.172,
41
+ 0.011,
42
+ 10,
43
+ 56
44
+ ]
45
+ })
46
+ })
47
+ ]
48
+ });
49
+ }
50
+ /** Taille : le torse se resserre ici, ce qui donne une silhouette en V. */ export function Belly({ m }) {
51
+ return /*#__PURE__*/ _jsx(Ellipsoid, {
52
+ radii: [
53
+ 0.185,
54
+ 0.15,
55
+ 0.15
56
+ ],
57
+ position: [
58
+ 0,
59
+ 0.09,
60
+ 0.004
61
+ ],
62
+ material: m.body,
63
+ segments: 48
64
+ });
65
+ }
66
+ /** Poitrine large, avec le « cœur » lumineux aux couleurs des casques. */ export function Chest({ m }) {
67
+ const ring = useGradientTorus(0.04, 0.008, m.ear1, m.ear2, 1);
68
+ const halo = useGradientTorus(0.04, 0.02, m.ear1, m.ear2, 1);
69
+ return /*#__PURE__*/ _jsxs("group", {
70
+ children: [
71
+ /*#__PURE__*/ _jsx(Ellipsoid, {
72
+ radii: [
73
+ 0.285,
74
+ 0.225,
75
+ 0.205
76
+ ],
77
+ position: [
78
+ 0,
79
+ 0.095,
80
+ 0
81
+ ],
82
+ material: m.body,
83
+ segments: 56
84
+ }),
85
+ /*#__PURE__*/ _jsxs("group", {
86
+ position: [
87
+ 0,
88
+ 0.08,
89
+ 0.2
90
+ ],
91
+ rotation: [
92
+ -0.08,
93
+ 0,
94
+ 0
95
+ ],
96
+ children: [
97
+ /*#__PURE__*/ _jsx("mesh", {
98
+ material: m.plate,
99
+ children: /*#__PURE__*/ _jsx("circleGeometry", {
100
+ args: [
101
+ 0.056,
102
+ 36
103
+ ]
104
+ })
105
+ }),
106
+ /*#__PURE__*/ _jsx("mesh", {
107
+ geometry: ring,
108
+ material: m.neon,
109
+ position: [
110
+ 0,
111
+ 0,
112
+ 0.003
113
+ ]
114
+ }),
115
+ /*#__PURE__*/ _jsx("mesh", {
116
+ geometry: halo,
117
+ material: m.halo,
118
+ position: [
119
+ 0,
120
+ 0,
121
+ 0.003
122
+ ]
123
+ })
124
+ ]
125
+ })
126
+ ]
127
+ });
128
+ }
129
+ export function Neck({ m }) {
130
+ return /*#__PURE__*/ _jsxs("group", {
131
+ children: [
132
+ /*#__PURE__*/ _jsx("mesh", {
133
+ position: [
134
+ 0,
135
+ 0.015,
136
+ 0
137
+ ],
138
+ material: m.body,
139
+ castShadow: true,
140
+ children: /*#__PURE__*/ _jsx("cylinderGeometry", {
141
+ args: [
142
+ 0.052,
143
+ 0.066,
144
+ 0.1,
145
+ 28
146
+ ]
147
+ })
148
+ }),
149
+ /*#__PURE__*/ _jsx(Seam, {
150
+ radius: 0.062,
151
+ position: [
152
+ 0,
153
+ -0.02,
154
+ 0
155
+ ],
156
+ material: m.seam
157
+ })
158
+ ]
159
+ });
160
+ }
161
+ /** Bras : épaulière ronde cerclée, segment effilé, puis articulation de coude apparente. */ export function UpperArm({ m }) {
162
+ return /*#__PURE__*/ _jsxs("group", {
163
+ children: [
164
+ /*#__PURE__*/ _jsx(Ellipsoid, {
165
+ radii: [
166
+ 0.092,
167
+ 0.088,
168
+ 0.088
169
+ ],
170
+ material: m.body
171
+ }),
172
+ /*#__PURE__*/ _jsx(Seam, {
173
+ radius: 0.09,
174
+ position: [
175
+ 0,
176
+ -0.055,
177
+ 0
178
+ ],
179
+ material: m.seam,
180
+ thickness: 0.005
181
+ }),
182
+ /*#__PURE__*/ _jsx(Limb, {
183
+ length: 0.25,
184
+ rTop: 0.066,
185
+ rBottom: 0.057,
186
+ material: m.body
187
+ })
188
+ ]
189
+ });
190
+ }
191
+ export function ForeArm({ m }) {
192
+ return /*#__PURE__*/ _jsxs("group", {
193
+ children: [
194
+ /*#__PURE__*/ _jsx(Seam, {
195
+ radius: 0.062,
196
+ position: [
197
+ 0,
198
+ -0.002,
199
+ 0
200
+ ],
201
+ material: m.seam,
202
+ thickness: 0.005
203
+ }),
204
+ /*#__PURE__*/ _jsx(Limb, {
205
+ length: 0.23,
206
+ rTop: 0.057,
207
+ rBottom: 0.046,
208
+ material: m.body
209
+ }),
210
+ /*#__PURE__*/ _jsx(Seam, {
211
+ radius: 0.05,
212
+ position: [
213
+ 0,
214
+ -0.205,
215
+ 0
216
+ ],
217
+ material: m.seam
218
+ })
219
+ ]
220
+ });
221
+ }
222
+ /** Paume : forme arrondie (la main entière est paume + 5 doigts à deux phalanges). */ export function Palm({ m }) {
223
+ return /*#__PURE__*/ _jsxs("group", {
224
+ children: [
225
+ /*#__PURE__*/ _jsx(Seam, {
226
+ radius: 0.047,
227
+ position: [
228
+ 0,
229
+ -0.004,
230
+ 0
231
+ ],
232
+ material: m.seam
233
+ }),
234
+ /*#__PURE__*/ _jsx(Ellipsoid, {
235
+ radii: [
236
+ 0.044,
237
+ 0.054,
238
+ 0.031
239
+ ],
240
+ position: [
241
+ 0,
242
+ -0.05,
243
+ 0.002
244
+ ],
245
+ material: m.body,
246
+ segments: 28
247
+ })
248
+ ]
249
+ });
250
+ }
251
+ const FINGER_R = {
252
+ thumb: [
253
+ 0.0165,
254
+ 0.0145
255
+ ],
256
+ index: [
257
+ 0.0135,
258
+ 0.0118
259
+ ],
260
+ middle: [
261
+ 0.0142,
262
+ 0.0122
263
+ ],
264
+ ring: [
265
+ 0.0133,
266
+ 0.0115
267
+ ],
268
+ pinky: [
269
+ 0.0118,
270
+ 0.0104
271
+ ]
272
+ };
273
+ /** Une phalange (1 = proximale, 2 = distale). */ export function Phalanx({ m, finger, segment }) {
274
+ const len = FINGER_LENGTH[finger][segment - 1];
275
+ const [r1, r2] = FINGER_R[finger];
276
+ const top = segment === 1 ? r1 : r2;
277
+ const bottom = segment === 1 ? r2 : r2 * 0.85;
278
+ return /*#__PURE__*/ _jsx(Limb, {
279
+ length: len,
280
+ rTop: top,
281
+ rBottom: bottom,
282
+ material: m.body,
283
+ radial: 12
284
+ });
285
+ }
286
+ export function Thigh({ m }) {
287
+ return /*#__PURE__*/ _jsxs("group", {
288
+ children: [
289
+ /*#__PURE__*/ _jsx(Seam, {
290
+ radius: 0.09,
291
+ position: [
292
+ 0,
293
+ -0.03,
294
+ 0
295
+ ],
296
+ material: m.seam
297
+ }),
298
+ /*#__PURE__*/ _jsx(Limb, {
299
+ length: 0.27,
300
+ rTop: 0.092,
301
+ rBottom: 0.074,
302
+ material: m.body,
303
+ radial: 32
304
+ })
305
+ ]
306
+ });
307
+ }
308
+ export function Shin({ m }) {
309
+ return /*#__PURE__*/ _jsxs("group", {
310
+ children: [
311
+ /*#__PURE__*/ _jsx(Seam, {
312
+ radius: 0.076,
313
+ position: [
314
+ 0,
315
+ -0.002,
316
+ 0
317
+ ],
318
+ material: m.seam,
319
+ thickness: 0.005
320
+ }),
321
+ /*#__PURE__*/ _jsx(Limb, {
322
+ length: 0.26,
323
+ rTop: 0.074,
324
+ rBottom: 0.054,
325
+ material: m.body,
326
+ radial: 32
327
+ }),
328
+ /*#__PURE__*/ _jsx(Seam, {
329
+ radius: 0.058,
330
+ position: [
331
+ 0,
332
+ -0.225,
333
+ 0
334
+ ],
335
+ material: m.seam
336
+ })
337
+ ]
338
+ });
339
+ }
340
+ export function Foot({ m }) {
341
+ return /*#__PURE__*/ _jsxs("group", {
342
+ children: [
343
+ /*#__PURE__*/ _jsx(Seam, {
344
+ radius: 0.054,
345
+ position: [
346
+ 0,
347
+ -0.004,
348
+ 0
349
+ ],
350
+ material: m.seam
351
+ }),
352
+ /*#__PURE__*/ _jsx(Ellipsoid, {
353
+ radii: [
354
+ 0.062,
355
+ 0.04,
356
+ 0.115
357
+ ],
358
+ position: [
359
+ 0,
360
+ -0.03,
361
+ 0.04
362
+ ],
363
+ material: m.body,
364
+ segments: 36
365
+ })
366
+ ]
367
+ });
368
+ }
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import type { RobotController } from '../controller.js';
3
+ import type { RobotMaterials } from '../materials.js';
4
+ export declare const HEAD_SCALE = 0.24;
5
+ /** Hauteur du centre du crâne au-dessus de l'articulation de la tête (m). */
6
+ export declare const HEAD_CENTER_Y = 0.13;
7
+ export declare function Head({ controller, m }: {
8
+ controller: RobotController;
9
+ m: RobotMaterials;
10
+ }): React.JSX.Element;
11
+ //# sourceMappingURL=Head.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Head.d.ts","sourceRoot":"","sources":["../../../../src/assistant/robot/parts/Head.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0B,MAAM,OAAO,CAAC;AAG/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAQtD,eAAO,MAAM,UAAU,OAAO,CAAC;AAC/B,6EAA6E;AAC7E,eAAO,MAAM,aAAa,OAAO,CAAC;AAkElC,wBAAgB,IAAI,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,EAAE;IAAE,UAAU,EAAE,eAAe,CAAC;IAAC,CAAC,EAAE,cAAc,CAAA;CAAE,qBA+CzF"}
@@ -0,0 +1,210 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import React, { useMemo, useRef } from "react";
3
+ import { useFrame } from "@react-three/fiber";
4
+ import { CatmullRomCurve3, LatheGeometry, Quaternion, Vector2, Vector3 } from "three";
5
+ import { Ellipsoid, useGradientTorus } from "./primitives.js";
6
+ /*
7
+ * Tête : mêmes proportions et mêmes constantes que le shader de `LiveOrb`
8
+ * (crâne large, deux yeux ovales reliés par un trait fin, casques à anneau néon).
9
+ * Toutes les cotes ci-dessous sont en « unités de tête » ; le groupe est ensuite mis à l'échelle.
10
+ */ export const HEAD_SCALE = 0.24;
11
+ /** Hauteur du centre du crâne au-dessus de l'articulation de la tête (m). */ export const HEAD_CENTER_Y = 0.13;
12
+ const HEAD_R = [
13
+ 1.0,
14
+ 0.74,
15
+ 0.86
16
+ ];
17
+ const EYE_X = 0.455;
18
+ const EYE_Y = 0.075;
19
+ const EYE_RX = 0.118;
20
+ const EYE_RY = 0.128;
21
+ const LINE_HALF = 0.021;
22
+ const EAR_C = new Vector3(1.02, -0.1, 0.02);
23
+ const EAR_R = 0.385;
24
+ const EAR_HT = 0.072;
25
+ const EAR_ROUND = 0.045;
26
+ const RECESS_R = 0.335;
27
+ const RECESS_D = 0.02;
28
+ const RING_R = 0.272;
29
+ const RING_T = 0.034;
30
+ const RING_X = 0.062;
31
+ // Cos / sin du « toe-in » : le casque regarde un peu vers l'avant.
32
+ const EC = 0.9287;
33
+ const ES = 0.3709;
34
+ /** Point de la surface du crâne en (x, y), et sa normale. */ function surface(x, y) {
35
+ const z = HEAD_R[2] * Math.sqrt(Math.max(0, 1 - (x / HEAD_R[0]) ** 2 - (y / HEAD_R[1]) ** 2));
36
+ const p = new Vector3(x, y, z);
37
+ const n = new Vector3(x / HEAD_R[0] ** 2, y / HEAD_R[1] ** 2, z / HEAD_R[2] ** 2).normalize();
38
+ return {
39
+ p,
40
+ n
41
+ };
42
+ }
43
+ function earCupGeometry() {
44
+ const pts = [
45
+ new Vector2(0, -EAR_HT),
46
+ new Vector2(EAR_R - EAR_ROUND, -EAR_HT)
47
+ ];
48
+ const arc = (cx, cy, a0, a1)=>{
49
+ for(let i = 1; i <= 8; i++){
50
+ const a = a0 + (a1 - a0) * i / 8;
51
+ pts.push(new Vector2(cx + EAR_ROUND * Math.cos(a), cy + EAR_ROUND * Math.sin(a)));
52
+ }
53
+ };
54
+ arc(EAR_R - EAR_ROUND, -EAR_HT + EAR_ROUND, -Math.PI / 2, 0);
55
+ arc(EAR_R - EAR_ROUND, EAR_HT - EAR_ROUND, 0, Math.PI / 2);
56
+ pts.push(new Vector2(RECESS_R, EAR_HT), new Vector2(RECESS_R, EAR_HT - RECESS_D), new Vector2(0, EAR_HT - RECESS_D));
57
+ return new LatheGeometry(pts, 56);
58
+ }
59
+ function EarCup({ side, m }) {
60
+ const geo = useMemo(earCupGeometry, []);
61
+ const ring = useGradientTorus(RING_R, RING_T, m.ear1, m.ear2, side === 1 ? 0.6 : 2.5);
62
+ const halo = useGradientTorus(RING_R, RING_T * 2.6, m.ear1, m.ear2, side === 1 ? 0.6 : 2.5);
63
+ const quat = useMemo(()=>{
64
+ const axis = new Vector3(side * EC, 0, ES).normalize();
65
+ return new Quaternion().setFromUnitVectors(new Vector3(0, 1, 0), axis);
66
+ }, [
67
+ side
68
+ ]);
69
+ return /*#__PURE__*/ _jsxs("group", {
70
+ position: [
71
+ side * EAR_C.x,
72
+ EAR_C.y,
73
+ EAR_C.z
74
+ ],
75
+ quaternion: quat,
76
+ children: [
77
+ /*#__PURE__*/ _jsx("mesh", {
78
+ geometry: geo,
79
+ material: m.body,
80
+ castShadow: true,
81
+ receiveShadow: true
82
+ }),
83
+ /*#__PURE__*/ _jsxs("group", {
84
+ position: [
85
+ 0,
86
+ RING_X,
87
+ 0
88
+ ],
89
+ rotation: [
90
+ Math.PI / 2,
91
+ 0,
92
+ 0
93
+ ],
94
+ children: [
95
+ /*#__PURE__*/ _jsx("mesh", {
96
+ geometry: ring,
97
+ material: m.neon
98
+ }),
99
+ /*#__PURE__*/ _jsx("mesh", {
100
+ geometry: halo,
101
+ material: m.halo
102
+ })
103
+ ]
104
+ }),
105
+ /*#__PURE__*/ _jsx("mesh", {
106
+ position: [
107
+ 0,
108
+ EAR_HT - RECESS_D + 0.002,
109
+ 0
110
+ ],
111
+ rotation: [
112
+ -Math.PI / 2,
113
+ 0,
114
+ 0
115
+ ],
116
+ material: m.plate,
117
+ children: /*#__PURE__*/ _jsx("circleGeometry", {
118
+ args: [
119
+ RECESS_R - 0.012,
120
+ 40
121
+ ]
122
+ })
123
+ })
124
+ ]
125
+ });
126
+ }
127
+ export function Head({ controller, m }) {
128
+ const eyeL = useRef(null);
129
+ const eyeR = useRef(null);
130
+ const eyes = useMemo(()=>[
131
+ -1,
132
+ 1
133
+ ].map((sx)=>{
134
+ const { p, n } = surface(sx * EYE_X, EYE_Y);
135
+ const q = new Quaternion().setFromUnitVectors(new Vector3(0, 0, 1), n);
136
+ return {
137
+ p: p.clone().addScaledVector(n, -0.004),
138
+ q
139
+ };
140
+ }), []);
141
+ const lineGeo = useMemo(()=>{
142
+ const pts = [];
143
+ for(let i = 0; i <= 24; i++){
144
+ const x = -EYE_X + 2 * EYE_X * i / 24;
145
+ const s = surface(x, EYE_Y);
146
+ pts.push(s.p.addScaledVector(s.n, 0.004));
147
+ }
148
+ return new CatmullRomCurve3(pts);
149
+ }, []);
150
+ useFrame(()=>{
151
+ const lid = 1 - 0.9 * controller.blink;
152
+ if (eyeL.current) eyeL.current.scale.y = EYE_RY * lid;
153
+ if (eyeR.current) eyeR.current.scale.y = EYE_RY * lid;
154
+ });
155
+ return /*#__PURE__*/ _jsxs("group", {
156
+ position: [
157
+ 0,
158
+ HEAD_CENTER_Y,
159
+ 0
160
+ ],
161
+ scale: HEAD_SCALE,
162
+ children: [
163
+ /*#__PURE__*/ _jsx(Ellipsoid, {
164
+ radii: HEAD_R,
165
+ material: m.body,
166
+ segments: 64
167
+ }),
168
+ eyes.map((e, i)=>/*#__PURE__*/ _jsx("group", {
169
+ position: e.p,
170
+ quaternion: e.q,
171
+ children: /*#__PURE__*/ _jsx("mesh", {
172
+ ref: i === 0 ? eyeL : eyeR,
173
+ scale: [
174
+ EYE_RX,
175
+ EYE_RY,
176
+ 0.03
177
+ ],
178
+ material: m.eye,
179
+ children: /*#__PURE__*/ _jsx("sphereGeometry", {
180
+ args: [
181
+ 1,
182
+ 32,
183
+ 24
184
+ ]
185
+ })
186
+ })
187
+ }, i)),
188
+ /*#__PURE__*/ _jsx("mesh", {
189
+ material: m.eye,
190
+ children: /*#__PURE__*/ _jsx("tubeGeometry", {
191
+ args: [
192
+ lineGeo,
193
+ 40,
194
+ LINE_HALF,
195
+ 8,
196
+ false
197
+ ]
198
+ })
199
+ }),
200
+ /*#__PURE__*/ _jsx(EarCup, {
201
+ side: 1,
202
+ m: m
203
+ }),
204
+ /*#__PURE__*/ _jsx(EarCup, {
205
+ side: -1,
206
+ m: m
207
+ })
208
+ ]
209
+ });
210
+ }
@@ -0,0 +1,36 @@
1
+ import React from 'react';
2
+ import { type BufferGeometry, type Material } from 'three';
3
+ type V3 = [number, number, number];
4
+ /** Sphère étirée en ellipsoïde — brique de base des formes rondes du corps. */
5
+ export declare function Ellipsoid({ radii, position, rotation, material, segments, }: {
6
+ radii: V3;
7
+ position?: V3;
8
+ rotation?: V3;
9
+ material: Material;
10
+ segments?: number;
11
+ }): React.JSX.Element;
12
+ /**
13
+ * Segment de membre effilé : du haut de l'articulation (y = 0) jusqu'à y = -length,
14
+ * avec une rondeur à chaque bout (le rayon haut et bas peuvent différer).
15
+ * Les rondeurs sont centrées sur les articulations, ce qui garde les coudes et les
16
+ * genoux lisses quand le membre se plie.
17
+ */
18
+ export declare function Limb({ length, rTop, rBottom, material, radial, }: {
19
+ length: number;
20
+ rTop: number;
21
+ rBottom: number;
22
+ material: Material;
23
+ radial?: number;
24
+ }): React.JSX.Element;
25
+ /** Fine rainure circulaire autour d'un membre (joint de vinyle). */
26
+ export declare function Seam({ radius, position, material, thickness, rotation, }: {
27
+ radius: number;
28
+ position: V3;
29
+ material: Material;
30
+ thickness?: number;
31
+ rotation?: V3;
32
+ }): React.JSX.Element;
33
+ /** Tore dont les sommets portent un dégradé entre deux couleurs (néon des casques et du cœur). */
34
+ export declare function useGradientTorus(radius: number, tube: number, c1: string, c2: string, phase?: number): BufferGeometry;
35
+ export {};
36
+ //# sourceMappingURL=primitives.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"primitives.d.ts","sourceRoot":"","sources":["../../../../src/assistant/robot/parts/primitives.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AACvC,OAAO,EAAyC,KAAK,cAAc,EAAE,KAAK,QAAQ,EAAE,MAAM,OAAO,CAAC;AAElG,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAEnC,+EAA+E;AAC/E,wBAAgB,SAAS,CAAC,EACxB,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,QAAa,GACd,EAAE;IACD,KAAK,EAAE,EAAE,CAAC;IACV,QAAQ,CAAC,EAAE,EAAE,CAAC;IACd,QAAQ,CAAC,EAAE,EAAE,CAAC;IACd,QAAQ,EAAE,QAAQ,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,qBAMA;AAED;;;;;GAKG;AACH,wBAAgB,IAAI,CAAC,EACnB,MAAM,EACN,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,MAAW,GACZ,EAAE;IACD,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,QAAQ,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,qBAcA;AAED,oEAAoE;AACpE,wBAAgB,IAAI,CAAC,EACnB,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,SAAkB,EAClB,QAA8B,GAC/B,EAAE;IACD,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,EAAE,CAAC;IACb,QAAQ,EAAE,QAAQ,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,EAAE,CAAC;CACf,qBAMA;AAED,kGAAkG;AAClG,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,SAAI,GAAG,cAAc,CAmBhH"}