@broberg/bodymap 0.12.0 → 0.13.2
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/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +35 -59
- package/dist/index.d.ts +35 -59
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/react.cjs +2 -2
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +8 -13
- package/dist/react.d.ts +8 -13
- package/dist/react.js +2 -2
- package/dist/react.js.map +1 -1
- package/dist/three.cjs +2 -2
- package/dist/three.cjs.map +1 -1
- package/dist/three.d.cts +8 -13
- package/dist/three.d.ts +8 -13
- package/dist/three.js +2 -2
- package/dist/three.js.map +1 -1
- package/package.json +5 -4
package/dist/three.d.cts
CHANGED
|
@@ -6,21 +6,16 @@ type PainType = (typeof PAIN_TYPES)[number];
|
|
|
6
6
|
/** One marked pain point. `region` MUST be a known region key; `intensity` is a
|
|
7
7
|
* 0-10 integer; `type` is optional but constrained; `timestamp` is an ISO string. */
|
|
8
8
|
declare const painPointSchema: z.ZodObject<{
|
|
9
|
-
region: z.
|
|
9
|
+
region: z.ZodString;
|
|
10
10
|
intensity: z.ZodNumber;
|
|
11
|
-
type: z.ZodOptional<z.ZodEnum<
|
|
11
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
12
|
+
stikkende: "stikkende";
|
|
13
|
+
dump: "dump";
|
|
14
|
+
konstant: "konstant";
|
|
15
|
+
jagende: "jagende";
|
|
16
|
+
}>>;
|
|
12
17
|
timestamp: z.ZodString;
|
|
13
|
-
},
|
|
14
|
-
intensity: number;
|
|
15
|
-
region: string;
|
|
16
|
-
timestamp: string;
|
|
17
|
-
type?: "stikkende" | "dump" | "konstant" | "jagende" | undefined;
|
|
18
|
-
}, {
|
|
19
|
-
intensity: number;
|
|
20
|
-
region: string;
|
|
21
|
-
timestamp: string;
|
|
22
|
-
type?: "stikkende" | "dump" | "konstant" | "jagende" | undefined;
|
|
23
|
-
}>;
|
|
18
|
+
}, z.core.$strip>;
|
|
24
19
|
type PainPoint = z.infer<typeof painPointSchema>;
|
|
25
20
|
type PainReport = PainPoint[];
|
|
26
21
|
interface RegionSetting {
|
package/dist/three.d.ts
CHANGED
|
@@ -6,21 +6,16 @@ type PainType = (typeof PAIN_TYPES)[number];
|
|
|
6
6
|
/** One marked pain point. `region` MUST be a known region key; `intensity` is a
|
|
7
7
|
* 0-10 integer; `type` is optional but constrained; `timestamp` is an ISO string. */
|
|
8
8
|
declare const painPointSchema: z.ZodObject<{
|
|
9
|
-
region: z.
|
|
9
|
+
region: z.ZodString;
|
|
10
10
|
intensity: z.ZodNumber;
|
|
11
|
-
type: z.ZodOptional<z.ZodEnum<
|
|
11
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
12
|
+
stikkende: "stikkende";
|
|
13
|
+
dump: "dump";
|
|
14
|
+
konstant: "konstant";
|
|
15
|
+
jagende: "jagende";
|
|
16
|
+
}>>;
|
|
12
17
|
timestamp: z.ZodString;
|
|
13
|
-
},
|
|
14
|
-
intensity: number;
|
|
15
|
-
region: string;
|
|
16
|
-
timestamp: string;
|
|
17
|
-
type?: "stikkende" | "dump" | "konstant" | "jagende" | undefined;
|
|
18
|
-
}, {
|
|
19
|
-
intensity: number;
|
|
20
|
-
region: string;
|
|
21
|
-
timestamp: string;
|
|
22
|
-
type?: "stikkende" | "dump" | "konstant" | "jagende" | undefined;
|
|
23
|
-
}>;
|
|
18
|
+
}, z.core.$strip>;
|
|
24
19
|
type PainPoint = z.infer<typeof painPointSchema>;
|
|
25
20
|
type PainReport = PainPoint[];
|
|
26
21
|
interface RegionSetting {
|
package/dist/three.js
CHANGED
|
@@ -52,7 +52,7 @@ var painPointSchema = z.object({
|
|
|
52
52
|
type: z.enum(PAIN_TYPES).optional(),
|
|
53
53
|
timestamp: z.string()
|
|
54
54
|
});
|
|
55
|
-
z.array(painPointSchema);
|
|
55
|
+
z.array(painPointSchema).max(REGIONS.length);
|
|
56
56
|
function decidePick(region, report, config = {}) {
|
|
57
57
|
if (!isSelectable(region, config)) return "ignore";
|
|
58
58
|
return report.some((p) => p.region === region) ? "clear" : "select";
|
|
@@ -125,7 +125,7 @@ z.object({
|
|
|
125
125
|
intensity: z.number().int().min(0).max(10),
|
|
126
126
|
quality: z.enum(PAIN_TYPES).optional()
|
|
127
127
|
})
|
|
128
|
-
)
|
|
128
|
+
).max(REGIONS.length)
|
|
129
129
|
});
|
|
130
130
|
function serializeReport(report, opts = {}) {
|
|
131
131
|
return {
|