@kmanueldc/vue-odontogram 0.1.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 (46) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +720 -0
  3. package/THIRD_PARTY_NOTICES.md +37 -0
  4. package/dist/catalogs/nts-peru.d.ts +277 -0
  5. package/dist/components/ConditionLabels.vue.d.ts +40 -0
  6. package/dist/components/FindingPrimitives.vue.d.ts +6 -0
  7. package/dist/components/Odontogram.vue.d.ts +131 -0
  8. package/dist/components/OdontogramTooltip.vue.d.ts +82 -0
  9. package/dist/components/SurfaceDiagrams.vue.d.ts +33 -0
  10. package/dist/components/SurfaceGuide.vue.d.ts +47 -0
  11. package/dist/components/Tooth.vue.d.ts +56 -0
  12. package/dist/components/ToothInspector.vue.d.ts +57 -0
  13. package/dist/composables/useOdontogram.d.ts +43 -0
  14. package/dist/composables/useToothSelection.d.ts +11 -0
  15. package/dist/data/index.d.ts +1 -0
  16. package/dist/data/permanent-horizontal.d.ts +8 -0
  17. package/dist/data/permanent.d.ts +8 -0
  18. package/dist/data/primary-horizontal.d.ts +19 -0
  19. package/dist/data/primary.d.ts +14 -0
  20. package/dist/index.d.ts +26 -0
  21. package/dist/types/findings.d.ts +154 -0
  22. package/dist/types/geometry.d.ts +18 -0
  23. package/dist/types/odontogram.d.ts +119 -0
  24. package/dist/types/surfaces.d.ts +21 -0
  25. package/dist/utils/anchors.d.ts +37 -0
  26. package/dist/utils/compositions.d.ts +41 -0
  27. package/dist/utils/dentition-layout.d.ts +27 -0
  28. package/dist/utils/finding-records.d.ts +82 -0
  29. package/dist/utils/findings.d.ts +74 -0
  30. package/dist/utils/labels.d.ts +4 -0
  31. package/dist/utils/layout.d.ts +19 -0
  32. package/dist/utils/mixed-layout.d.ts +20 -0
  33. package/dist/utils/navigation.d.ts +11 -0
  34. package/dist/utils/notation.d.ts +26 -0
  35. package/dist/utils/numbers.d.ts +28 -0
  36. package/dist/utils/primary-horizontal-layout.d.ts +13 -0
  37. package/dist/utils/primary-layout.d.ts +34 -0
  38. package/dist/utils/quadrants.d.ts +6 -0
  39. package/dist/utils/state-marks.d.ts +35 -0
  40. package/dist/utils/surfaces.d.ts +118 -0
  41. package/dist/utils/svg-geometry.d.ts +36 -0
  42. package/dist/utils/tooth-frames.d.ts +51 -0
  43. package/dist/vue-odontogram.css +1 -0
  44. package/dist/vue-odontogram.js +3202 -0
  45. package/dist/vue-odontogram.umd.cjs +1 -0
  46. package/package.json +52 -0
@@ -0,0 +1,37 @@
1
+ # Third-party notices
2
+
3
+ ## react-odontogram permanent SVG data
4
+
5
+ The permanent SVG tooth datasets in `src/data/permanent.ts` and
6
+ `src/data/permanent-horizontal.ts` are ported from
7
+ [biomathcode/react-odontogram](https://github.com/biomathcode/react-odontogram).
8
+ They are used under the MIT License, attributed by the upstream project to
9
+ biomathcode.
10
+
11
+ MIT License
12
+
13
+ Copyright (c) biomathcode
14
+
15
+ Permission is hereby granted, free of charge, to any person obtaining a copy
16
+ of this software and associated documentation files (the "Software"), to deal
17
+ in the Software without restriction, including without limitation the rights
18
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
19
+ copies of the Software, and to permit persons to whom the Software is
20
+ furnished to do so, subject to the following conditions:
21
+
22
+ The above copyright notice and this permission notice shall be included in all
23
+ copies or substantial portions of the Software.
24
+
25
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
26
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
28
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
30
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
31
+ SOFTWARE.
32
+
33
+ ## Primary SVG data
34
+
35
+ The datasets in `src/data/primary.ts` and `src/data/primary-horizontal.ts` are
36
+ simplified provisional paths created for this project. They are not clinically
37
+ validated and must not be presented as diagnostic or treatment geometry.
@@ -0,0 +1,277 @@
1
+ /**
2
+ * Findings based on Peru's technical health standard for the odontogram
3
+ * (NTS N.° 150-MINSA/2019/DGIESP): blue (`good`) for good state or completed
4
+ * treatment, red (`bad`) for bad state or pending treatment.
5
+ *
6
+ * Surface findings are drawn on the surface diagram, so they need
7
+ * `showSurfaces`. Sealants and restoration materials, which the standard
8
+ * writes as abbreviations inside the surface, are not included. Symbols are adapted to
9
+ * the occlusal view of this chart, which has no roots: root findings use
10
+ * their abbreviation. Review codes, colors and abbreviations against the
11
+ * official standard before clinical use, and extend or override entries as
12
+ * needed: `{ ...ntsPeruFindingCatalog, fracture: { ... } }`.
13
+ */
14
+ export declare const ntsPeruFindingCatalog: {
15
+ readonly caries: {
16
+ readonly name: "Lesión de caries dental";
17
+ readonly symbol: {
18
+ readonly kind: "fill";
19
+ };
20
+ readonly tone: "bad";
21
+ };
22
+ readonly restoration: {
23
+ readonly name: "Restauración definitiva";
24
+ readonly symbol: {
25
+ readonly kind: "fill";
26
+ };
27
+ readonly tone: "good";
28
+ };
29
+ readonly 'temporary-restoration': {
30
+ readonly name: "Restauración temporal";
31
+ readonly symbol: {
32
+ readonly kind: "outline";
33
+ };
34
+ readonly tone: "bad";
35
+ };
36
+ readonly extraction: {
37
+ readonly name: "Extracción";
38
+ readonly symbol: {
39
+ readonly kind: "cross";
40
+ };
41
+ readonly tone: "bad";
42
+ };
43
+ readonly fracture: {
44
+ readonly name: "Fractura";
45
+ readonly symbol: {
46
+ readonly kind: "line";
47
+ };
48
+ readonly tone: "bad";
49
+ };
50
+ readonly crown: {
51
+ readonly name: "Corona definitiva";
52
+ readonly symbol: {
53
+ readonly kind: "circle";
54
+ };
55
+ readonly tone: "good";
56
+ };
57
+ readonly 'temporary-crown': {
58
+ readonly name: "Corona temporal";
59
+ readonly symbol: {
60
+ readonly kind: "circle";
61
+ };
62
+ readonly tone: "bad";
63
+ };
64
+ readonly extruded: {
65
+ readonly name: "Diente extruido";
66
+ readonly symbol: {
67
+ readonly kind: "arrow";
68
+ readonly direction: "occlusal";
69
+ };
70
+ readonly tone: "good";
71
+ };
72
+ readonly intruded: {
73
+ readonly name: "Diente intruido";
74
+ readonly symbol: {
75
+ readonly kind: "arrow";
76
+ readonly direction: "apical";
77
+ };
78
+ readonly tone: "good";
79
+ };
80
+ readonly rotated: {
81
+ readonly name: "Giroversión";
82
+ readonly symbol: {
83
+ readonly kind: "curved-arrow";
84
+ };
85
+ readonly tone: "good";
86
+ };
87
+ readonly migrated: {
88
+ readonly name: "Migración";
89
+ readonly symbol: {
90
+ readonly kind: "arrow";
91
+ readonly direction: "auto";
92
+ };
93
+ readonly tone: "good";
94
+ };
95
+ readonly erupting: {
96
+ readonly name: "Pieza dentaria en erupción";
97
+ readonly symbol: {
98
+ readonly kind: "zigzag";
99
+ };
100
+ readonly tone: "good";
101
+ };
102
+ readonly supernumerary: {
103
+ readonly name: "Supernumerario";
104
+ readonly symbol: {
105
+ readonly kind: "encircled-text";
106
+ readonly text: "S";
107
+ };
108
+ readonly tone: "good";
109
+ };
110
+ readonly fusion: {
111
+ readonly name: "Fusión";
112
+ readonly symbol: {
113
+ readonly kind: "double-circle";
114
+ };
115
+ readonly tone: "good";
116
+ };
117
+ readonly peg: {
118
+ readonly name: "Diente en clavija";
119
+ readonly symbol: {
120
+ readonly kind: "triangle";
121
+ };
122
+ readonly tone: "good";
123
+ };
124
+ readonly implant: {
125
+ readonly name: "Implante dental";
126
+ readonly symbol: {
127
+ readonly kind: "text";
128
+ readonly text: "IMP";
129
+ };
130
+ readonly tone: "good";
131
+ };
132
+ readonly 'root-remnant': {
133
+ readonly name: "Remanente radicular";
134
+ readonly symbol: {
135
+ readonly kind: "text";
136
+ readonly text: "RR";
137
+ };
138
+ readonly tone: "bad";
139
+ };
140
+ readonly mobility: {
141
+ readonly name: "Movilidad";
142
+ readonly symbol: {
143
+ readonly kind: "text";
144
+ readonly text: "M1";
145
+ };
146
+ readonly tone: "bad";
147
+ };
148
+ readonly discolored: {
149
+ readonly name: "Diente discrómico";
150
+ readonly symbol: {
151
+ readonly kind: "text";
152
+ readonly text: "DIS";
153
+ };
154
+ readonly tone: "bad";
155
+ };
156
+ readonly ectopic: {
157
+ readonly name: "Diente ectópico";
158
+ readonly symbol: {
159
+ readonly kind: "text";
160
+ readonly text: "E";
161
+ };
162
+ readonly tone: "bad";
163
+ };
164
+ readonly impacted: {
165
+ readonly name: "Impactación";
166
+ readonly symbol: {
167
+ readonly kind: "text";
168
+ readonly text: "I";
169
+ };
170
+ readonly tone: "bad";
171
+ };
172
+ readonly 'semi-impacted': {
173
+ readonly name: "Semi-impactación";
174
+ readonly symbol: {
175
+ readonly kind: "text";
176
+ readonly text: "SI";
177
+ };
178
+ readonly tone: "bad";
179
+ };
180
+ readonly macrodontia: {
181
+ readonly name: "Macrodoncia";
182
+ readonly symbol: {
183
+ readonly kind: "text";
184
+ readonly text: "MAC";
185
+ };
186
+ readonly tone: "good";
187
+ };
188
+ readonly microdontia: {
189
+ readonly name: "Microdoncia";
190
+ readonly symbol: {
191
+ readonly kind: "text";
192
+ readonly text: "MIC";
193
+ };
194
+ readonly tone: "good";
195
+ };
196
+ readonly worn: {
197
+ readonly name: "Superficie desgastada";
198
+ readonly symbol: {
199
+ readonly kind: "text";
200
+ readonly text: "DES";
201
+ };
202
+ readonly tone: "bad";
203
+ };
204
+ readonly 'pulp-treatment': {
205
+ readonly name: "Tratamiento pulpar";
206
+ readonly symbol: {
207
+ readonly kind: "text";
208
+ readonly text: "TC";
209
+ };
210
+ readonly tone: "good";
211
+ };
212
+ readonly 'enamel-defect': {
213
+ readonly name: "Defecto de desarrollo del esmalte";
214
+ readonly symbol: {
215
+ readonly kind: "text";
216
+ readonly text: "HP";
217
+ };
218
+ readonly tone: "bad";
219
+ };
220
+ readonly diastema: {
221
+ readonly name: "Diastema";
222
+ readonly symbol: {
223
+ readonly kind: "diastema";
224
+ };
225
+ readonly tone: "good";
226
+ };
227
+ readonly transposition: {
228
+ readonly name: "Transposición";
229
+ readonly symbol: {
230
+ readonly kind: "transposition";
231
+ };
232
+ readonly tone: "good";
233
+ };
234
+ readonly 'fixed-prosthesis': {
235
+ readonly name: "Prótesis fija";
236
+ readonly symbol: {
237
+ readonly kind: "bridge";
238
+ };
239
+ readonly tone: "good";
240
+ };
241
+ readonly 'removable-prosthesis': {
242
+ readonly name: "Prótesis removible";
243
+ readonly symbol: {
244
+ readonly kind: "double-line";
245
+ };
246
+ readonly tone: "good";
247
+ };
248
+ readonly 'complete-prosthesis': {
249
+ readonly name: "Prótesis total";
250
+ readonly symbol: {
251
+ readonly kind: "double-line";
252
+ };
253
+ readonly tone: "good";
254
+ };
255
+ readonly 'fixed-orthodontic-appliance': {
256
+ readonly name: "Aparato ortodóntico fijo";
257
+ readonly symbol: {
258
+ readonly kind: "brackets";
259
+ };
260
+ readonly tone: "good";
261
+ };
262
+ readonly 'removable-orthodontic-appliance': {
263
+ readonly name: "Aparato ortodóntico removible";
264
+ readonly symbol: {
265
+ readonly kind: "zigzag-line";
266
+ };
267
+ readonly tone: "good";
268
+ };
269
+ readonly edentulous: {
270
+ readonly name: "Edéntulo total";
271
+ readonly symbol: {
272
+ readonly kind: "center-line";
273
+ };
274
+ readonly tone: "good";
275
+ };
276
+ };
277
+ export type NtsPeruFindingCode = keyof typeof ntsPeruFindingCatalog;
@@ -0,0 +1,40 @@
1
+ import type { FindingStatus, FindingTone } from '../types/findings';
2
+ import type { ToothState, ToothVisualCondition } from '../types/odontogram';
3
+ import type { FindingPrimitive } from '../utils/findings';
4
+ type __VLS_Props = {
5
+ conditions?: ToothVisualCondition[];
6
+ /** Non-present tooth states to explain, each with its display name. */
7
+ states?: {
8
+ state: Exclude<ToothState, 'present'>;
9
+ label: string;
10
+ }[];
11
+ /** Findings to explain, each with its icon. */
12
+ findings?: {
13
+ key: string;
14
+ code: string;
15
+ name: string;
16
+ status: FindingStatus;
17
+ tone: FindingTone;
18
+ color?: string;
19
+ icon: FindingPrimitive[];
20
+ }[];
21
+ ariaLabel?: string;
22
+ };
23
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
24
+ states: {
25
+ state: Exclude<ToothState, "present">;
26
+ label: string;
27
+ }[];
28
+ findings: {
29
+ key: string;
30
+ code: string;
31
+ name: string;
32
+ status: FindingStatus;
33
+ tone: FindingTone;
34
+ color?: string;
35
+ icon: FindingPrimitive[];
36
+ }[];
37
+ conditions: ToothVisualCondition[];
38
+ ariaLabel: string;
39
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
40
+ export default _default;
@@ -0,0 +1,6 @@
1
+ import type { FindingPrimitive } from '../utils/findings';
2
+ type __VLS_Props = {
3
+ primitives: readonly FindingPrimitive[];
4
+ };
5
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ export default _default;
@@ -0,0 +1,131 @@
1
+ import type { OdontogramCondition, OdontogramHalf, OdontogramLabelsInput, OdontogramToothStates, ToothDefinition, ToothNotation, ToothState, ToothVisualCondition } from '../types/odontogram';
2
+ import type { Box, ToothAnchor } from '../utils/anchors';
3
+ import type { RenderableDentition } from '../utils/dentition-layout';
4
+ import type { OdontogramLayout } from '../utils/layout';
5
+ import type { FindingCatalog, OdontogramFinding } from '../types/findings';
6
+ import { type ToothRecord } from '../utils/finding-records';
7
+ import { type OdontogramSurfaces, type SurfaceShapeKind, type ToothSurface } from '../types/surfaces';
8
+ import { type SurfaceDiagram } from '../utils/surfaces';
9
+ import { type TooltipSurfaceSummary } from './OdontogramTooltip.vue';
10
+ type __VLS_Props = {
11
+ modelValue?: string[];
12
+ dentition?: RenderableDentition;
13
+ notation?: ToothNotation;
14
+ singleSelect?: boolean;
15
+ disabled?: boolean;
16
+ showLabels?: boolean;
17
+ showTooltip?: boolean;
18
+ conditions?: OdontogramCondition[];
19
+ layout?: OdontogramLayout;
20
+ labels?: OdontogramLabelsInput;
21
+ showNumbers?: boolean;
22
+ showHalf?: OdontogramHalf;
23
+ toothStates?: OdontogramToothStates;
24
+ findings?: OdontogramFinding[];
25
+ findingCatalog?: FindingCatalog;
26
+ showSurfaces?: boolean;
27
+ /** Draws each surface's letter (V, M, O/I, D, L/P) on the chart diagrams. */
28
+ showSurfaceLetters?: boolean;
29
+ /** Shape of the surface diagrams: `square` (default) or `circle`. */
30
+ surfaceShape?: SurfaceShapeKind;
31
+ surfaces?: OdontogramSurfaces;
32
+ teeth?: string[];
33
+ };
34
+ type __VLS_Slots = {
35
+ tooltip?: (props: {
36
+ tooth: ToothDefinition;
37
+ selected: boolean;
38
+ condition?: ToothVisualCondition;
39
+ state: ToothState;
40
+ /** Names of the findings on the tooth. */
41
+ findings: readonly string[];
42
+ /** Tooth number in the chart's notation; `tooth.id` stays FDI. */
43
+ number: string;
44
+ /**
45
+ * Hovered or focused surface, if the tooltip is for a surface; then
46
+ * `selected` and `findings` refer to that surface.
47
+ */
48
+ surface?: ToothSurface;
49
+ /** Clinical name of `surface` on the tooth, e.g. "Palatal". */
50
+ surfaceName?: string;
51
+ /**
52
+ * In the tooltip of a tooth, the findings of each surface with any; then
53
+ * `findings` lists only the findings of the whole tooth.
54
+ */
55
+ surfaceSummary: readonly TooltipSurfaceSummary[];
56
+ }) => unknown;
57
+ /**
58
+ * Menu opened by clicking a surface (or Enter/Space on it). When given, a
59
+ * surface no longer toggles its selection: the app shows its findings and
60
+ * records new ones, and calls `close` when done. Esc and a click outside
61
+ * close it too.
62
+ */
63
+ 'surface-menu'?: (props: {
64
+ toothId: string;
65
+ tooth: ToothDefinition;
66
+ surface: ToothSurface;
67
+ /** Clinical name of `surface` on the tooth, e.g. "Palatal". */
68
+ surfaceName: string;
69
+ /** Everything recorded on the tooth; `record.surfaces[surface]` for this surface. */
70
+ record: ToothRecord;
71
+ close: () => void;
72
+ }) => unknown;
73
+ /** SVG content drawn above the teeth, in the layout's viewBox coordinates. */
74
+ overlay?: (props: {
75
+ anchors: Readonly<Record<string, ToothAnchor>>;
76
+ viewBox: Box;
77
+ dentition: RenderableDentition;
78
+ layout: OdontogramLayout;
79
+ /** Surface diagrams drawn with `showSurfaces`, with their centers and boxes. */
80
+ surfaceDiagrams: readonly SurfaceDiagram[];
81
+ }) => unknown;
82
+ };
83
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
84
+ "update:modelValue": (selectedTeeth: string[]) => any;
85
+ change: (selectedTeeth: string[]) => any;
86
+ "tooth-click": (tooth: ToothDefinition, selectedTeeth: string[]) => any;
87
+ "update:surfaces": (surfaces: Partial<Record<string, ToothSurface[]>>) => any;
88
+ "surface-click": (tooth: ToothDefinition, surface: ToothSurface, surfaces: Partial<Record<string, ToothSurface[]>>) => any;
89
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
90
+ "onUpdate:modelValue"?: ((selectedTeeth: string[]) => any) | undefined;
91
+ onChange?: ((selectedTeeth: string[]) => any) | undefined;
92
+ "onTooth-click"?: ((tooth: ToothDefinition, selectedTeeth: string[]) => any) | undefined;
93
+ "onUpdate:surfaces"?: ((surfaces: Partial<Record<string, ToothSurface[]>>) => any) | undefined;
94
+ "onSurface-click"?: ((tooth: ToothDefinition, surface: ToothSurface, surfaces: Partial<Record<string, ToothSurface[]>>) => any) | undefined;
95
+ }>, {
96
+ teeth: string[];
97
+ findings: OdontogramFinding[];
98
+ surfaces: Partial<Record<string, ToothSurface[]>>;
99
+ conditions: OdontogramCondition[];
100
+ labels: Partial<Omit<import("..").OdontogramLabels, "chartTitles" | "states" | "surfaceNames" | "surfaceLetters" | "surfaceDescriptions" | "findingStatuses" | "inspector"> & {
101
+ chartTitles: Partial<import("..").OdontogramLabels["chartTitles"]>;
102
+ states: Partial<import("..").OdontogramLabels["states"]>;
103
+ surfaceNames: Partial<import("..").OdontogramLabels["surfaceNames"]>;
104
+ surfaceLetters: Partial<import("..").OdontogramLabels["surfaceLetters"]>;
105
+ surfaceDescriptions: Partial<import("..").OdontogramLabels["surfaceDescriptions"]>;
106
+ findingStatuses: Partial<import("..").OdontogramLabels["findingStatuses"]>;
107
+ inspector: Partial<import("..").OdontogramLabels["inspector"]>;
108
+ }>;
109
+ disabled: boolean;
110
+ modelValue: string[];
111
+ dentition: RenderableDentition;
112
+ notation: ToothNotation;
113
+ singleSelect: boolean;
114
+ showLabels: boolean;
115
+ showTooltip: boolean;
116
+ layout: OdontogramLayout;
117
+ showNumbers: boolean;
118
+ showHalf: OdontogramHalf;
119
+ toothStates: OdontogramToothStates;
120
+ findingCatalog: FindingCatalog;
121
+ showSurfaces: boolean;
122
+ showSurfaceLetters: boolean;
123
+ surfaceShape: SurfaceShapeKind;
124
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
125
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
126
+ export default _default;
127
+ type __VLS_WithSlots<T, S> = T & {
128
+ new (): {
129
+ $slots: S;
130
+ };
131
+ };
@@ -0,0 +1,82 @@
1
+ import type { OdontogramLabels, ToothDefinition, ToothState, ToothVisualCondition } from '../types/odontogram';
2
+ import type { ToothSurface } from '../types/surfaces';
3
+ export type { ToothVisualCondition };
4
+ /** One line of the per-surface summary of a tooth. */
5
+ export interface TooltipSurfaceSummary {
6
+ surface: ToothSurface;
7
+ /** Letter of the surface on the tooth, e.g. `P`. */
8
+ letter: string;
9
+ /** Clinical name, e.g. "Palatal". */
10
+ name: string;
11
+ /** Findings recorded on the surface. */
12
+ findings: readonly string[];
13
+ }
14
+ export type TooltipPlacement = 'top' | 'top-start' | 'top-end' | 'right' | 'right-start' | 'right-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end';
15
+ export interface TooltipAnchorRect {
16
+ top: number;
17
+ right: number;
18
+ bottom: number;
19
+ left: number;
20
+ }
21
+ type __VLS_Props = {
22
+ active: boolean;
23
+ tooth?: ToothDefinition;
24
+ selected?: boolean;
25
+ condition?: ToothVisualCondition;
26
+ state?: ToothState;
27
+ /** Names of the findings on the tooth. */
28
+ findings?: readonly string[];
29
+ /** Tooth number in the chart's notation; the FDI ID by default. */
30
+ number?: string;
31
+ /**
32
+ * Hovered or focused surface. The tooltip then describes that surface:
33
+ * `selected` and `findings` refer to it instead of the whole tooth.
34
+ */
35
+ surface?: ToothSurface;
36
+ /** Clinical name of `surface` on this tooth, e.g. "Palatal". */
37
+ surfaceName?: string;
38
+ /** What `surface` is, from `labels.surfaceDescriptions`. */
39
+ surfaceDescription?: string;
40
+ /** Findings of each surface of the tooth, for the tooltip of a tooth. */
41
+ surfaceSummary?: readonly TooltipSurfaceSummary[];
42
+ anchorRect?: TooltipAnchorRect;
43
+ placement?: TooltipPlacement;
44
+ margin?: number;
45
+ labels?: OdontogramLabels;
46
+ };
47
+ declare var __VLS_1: {
48
+ tooth: ToothDefinition;
49
+ selected: boolean;
50
+ condition: ToothVisualCondition;
51
+ state: ToothState;
52
+ findings: readonly string[];
53
+ number: string;
54
+ surface: ToothSurface;
55
+ surfaceName: string;
56
+ surfaceSummary: readonly TooltipSurfaceSummary[];
57
+ };
58
+ type __VLS_Slots = {} & {
59
+ default?: (props: typeof __VLS_1) => any;
60
+ };
61
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
62
+ number: string;
63
+ surface: ToothSurface;
64
+ selected: boolean;
65
+ condition: ToothVisualCondition;
66
+ state: ToothState;
67
+ findings: readonly string[];
68
+ surfaceSummary: readonly TooltipSurfaceSummary[];
69
+ surfaceName: string;
70
+ surfaceDescription: string;
71
+ anchorRect: TooltipAnchorRect;
72
+ placement: TooltipPlacement;
73
+ margin: number;
74
+ labels: OdontogramLabels;
75
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
76
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
77
+ export default _default;
78
+ type __VLS_WithSlots<T, S> = T & {
79
+ new (): {
80
+ $slots: S;
81
+ };
82
+ };
@@ -0,0 +1,33 @@
1
+ import type { OdontogramLabels } from '../types/odontogram';
2
+ import type { OdontogramSurfaces, ToothSurface } from '../types/surfaces';
3
+ import type { ToothAnchor } from '../utils/anchors';
4
+ import type { SurfaceDiagram } from '../utils/surfaces';
5
+ type __VLS_Props = {
6
+ diagrams: readonly SurfaceDiagram[];
7
+ /** Anchors of the visible teeth, for left/right navigation on screen. */
8
+ anchors: readonly ToothAnchor[];
9
+ surfaces: OdontogramSurfaces;
10
+ disabled: boolean;
11
+ /** Teeth whose surfaces cannot be selected, e.g. missing or extracted. */
12
+ inactiveTeeth: ReadonlySet<string>;
13
+ labels: OdontogramLabels;
14
+ /** Number read in accessible names, in the chart's notation. */
15
+ spokenNumber: (toothId: string) => string;
16
+ /** Activating a surface opens a menu instead of toggling its selection. */
17
+ menu?: boolean;
18
+ /** Surface whose menu is open, if any. */
19
+ openMenu?: {
20
+ toothId: string;
21
+ surface: ToothSurface;
22
+ };
23
+ };
24
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
25
+ activate: (toothId: string, surface: ToothSurface, element: SVGElement) => any;
26
+ enter: (toothId: string, surface: ToothSurface, event: Event) => any;
27
+ leave: () => any;
28
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
29
+ onActivate?: ((toothId: string, surface: ToothSurface, element: SVGElement) => any) | undefined;
30
+ onEnter?: ((toothId: string, surface: ToothSurface, event: Event) => any) | undefined;
31
+ onLeave?: (() => any) | undefined;
32
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
33
+ export default _default;
@@ -0,0 +1,47 @@
1
+ import type { FindingCatalog, OdontogramFinding } from '../types/findings';
2
+ import type { OdontogramLabelsInput, ToothNotation } from '../types/odontogram';
3
+ import { type SurfaceShapeKind, type ToothSurface } from '../types/surfaces';
4
+ type __VLS_Props = {
5
+ /** FDI ID of the tooth to explain. */
6
+ toothId: string;
7
+ /** Findings of the chart; the guide draws and lists this tooth's surface findings. */
8
+ findings?: OdontogramFinding[];
9
+ findingCatalog?: FindingCatalog;
10
+ /** Surfaces shown as selected, e.g. `surfaces[toothId]` of `v-model:surfaces`. */
11
+ selected?: ToothSurface[];
12
+ /** Highlighted surface; follows hover and focus, and can be set from outside. */
13
+ active?: ToothSurface;
14
+ labels?: OdontogramLabelsInput;
15
+ notation?: ToothNotation;
16
+ disabled?: boolean;
17
+ /** Shape of the diagram, like the chart's `surfaceShape`. */
18
+ shape?: SurfaceShapeKind;
19
+ /** Shows the list of surfaces next to the diagram; false keeps only the diagram. */
20
+ showList?: boolean;
21
+ };
22
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
23
+ "surface-click": (surface: ToothSurface) => any;
24
+ "update:active": (surface: ToothSurface | undefined) => any;
25
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
26
+ "onSurface-click"?: ((surface: ToothSurface) => any) | undefined;
27
+ "onUpdate:active"?: ((surface: ToothSurface | undefined) => any) | undefined;
28
+ }>, {
29
+ selected: ToothSurface[];
30
+ findings: OdontogramFinding[];
31
+ active: ToothSurface;
32
+ labels: Partial<Omit<import("..").OdontogramLabels, "chartTitles" | "states" | "surfaceNames" | "surfaceLetters" | "surfaceDescriptions" | "findingStatuses" | "inspector"> & {
33
+ chartTitles: Partial<import("..").OdontogramLabels["chartTitles"]>;
34
+ states: Partial<import("..").OdontogramLabels["states"]>;
35
+ surfaceNames: Partial<import("..").OdontogramLabels["surfaceNames"]>;
36
+ surfaceLetters: Partial<import("..").OdontogramLabels["surfaceLetters"]>;
37
+ surfaceDescriptions: Partial<import("..").OdontogramLabels["surfaceDescriptions"]>;
38
+ findingStatuses: Partial<import("..").OdontogramLabels["findingStatuses"]>;
39
+ inspector: Partial<import("..").OdontogramLabels["inspector"]>;
40
+ }>;
41
+ disabled: boolean;
42
+ notation: ToothNotation;
43
+ findingCatalog: FindingCatalog;
44
+ shape: SurfaceShapeKind;
45
+ showList: boolean;
46
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
47
+ export default _default;