react-advanced-odontogram 2.7.0 → 2.8.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.
- package/README.md +3 -2
- package/dist/index.d.ts +68 -0
- package/dist/{measured-DUS5yrAa.js → measured-8WG28eck.js} +2134 -2134
- package/dist/measured-8WG28eck.js.map +1 -0
- package/dist/odontogram.js +5827 -5738
- package/dist/odontogram.js.map +1 -1
- package/package.json +2 -2
- package/dist/measured-DUS5yrAa.js.map +0 -1
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
# 🦷 React Advanced Odontogram
|
|
6
6
|
|
|
7
7
|
[](https://www.npmjs.com/package/react-advanced-odontogram)
|
|
8
|
-
[](https://github.com/ZoliQua/React-Advanced-Odontogram/releases)
|
|
9
9
|
[](https://github.com/ZoliQua/React-Advanced-Odontogram/blob/main/LICENSE)
|
|
10
10
|
[](https://doi.org/10.5281/zenodo.21156787)
|
|
11
11
|
|
|
@@ -75,7 +75,8 @@ Per-site probing depth, gingival margin, bleeding on probing (+ suppuration) at
|
|
|
75
75
|
|
|
76
76
|
- 🦷 Permanent / primary / implant / missing teeth; substrate, restorations (crown/inlay/onlay/veneer/bridge × materials), removable & implant prosthetics
|
|
77
77
|
- 📐 **Two anatomy profiles.** The schematic `classic` set, or `measured` — one literature-measured template per clinically distinct position, permanent and deciduous, generated from a millimetre specification. In `measured` the crown and root carry a **dentin core**, so enamel and dentin can be coloured apart.
|
|
78
|
-
- 🎨 **Themable tooth artwork.** Every colour in the drawings is a CSS custom property with the shipped colour as its fallback, set through `themeConfig.tooth` / `themeConfig.tokens`; a dark palette ships with it, and an export resolves the tokens before the file leaves the page.
|
|
78
|
+
- 🎨 **Themable tooth artwork.** Every colour in the drawings is a CSS custom property with the shipped colour as its fallback, set through `themeConfig.tooth` / `themeConfig.tokens`; a dark palette ships with it, and an export resolves the tokens before the file leaves the page. The contour's **width** is settable too, across every state a tooth can be charted in and in the occlusal view as well, so it never snaps back on a root remnant, a fracture or the occlusal row (`themeConfig.tooth.outlineWidth`). The implant fixture is the deliberate exception: its ~58 shading greys are never themable one at a time, only together — shifted by one filter token (`--odon-implant-tint`) or replaced by one flat colour (`--odon-implant-fill`), each falling back to the grey it is drawn in.
|
|
79
|
+
- 🖌️ **Host-supplied tooth drawings**. `setToothTemplateOverrides()` and the `toothTemplates` prop let a host replace the factory SVG per anatomy profile, without forking. A template is vetted before it can be drawn — rejected outright rather than quietly sanitized — and a refused one is reported while the factory drawing stays in place.
|
|
79
80
|
- 🔍 Multi-surface caries & fillings (ICDAS / CARS severity, root & radiographic caries), endo & AAE pulp diagnosis, apical diagnosis, peri-implant status, wear, discoloration, orthodontics
|
|
80
81
|
- 🩺 Full periodontal module (see above) + 2017 classification
|
|
81
82
|
- 🔗 **HL7 FHIR R4** export/import; JSON export/import with migrations
|
package/dist/index.d.ts
CHANGED
|
@@ -716,6 +716,9 @@ export declare function getToothInfoVisible(): boolean;
|
|
|
716
716
|
*/
|
|
717
717
|
export declare function getToothStateSummary(toothNo: number): string[];
|
|
718
718
|
|
|
719
|
+
/** Templates refused so far (and why). A profile whose artwork is not loaded yet reports when it loads. */
|
|
720
|
+
export declare function getToothTemplateRejections(): readonly TemplateRejection[];
|
|
721
|
+
|
|
719
722
|
export declare function getWearDetailLevel(): ToothDetailLevel;
|
|
720
723
|
|
|
721
724
|
/** True iff ANY periodontal axis has been charted anywhere in the mouth. Used
|
|
@@ -866,6 +869,11 @@ declare type OdontogramProviderProps = {
|
|
|
866
869
|
* overlays and per-tooth custom state. See {@link OdontogramPlugin}.
|
|
867
870
|
*/
|
|
868
871
|
plugins?: OdontogramPlugin[];
|
|
872
|
+
/**
|
|
873
|
+
* Tooth drawings (SVG text) that replace the factory ones, per anatomy profile. The markup is vetted and a refused template keeps the
|
|
874
|
+
* factory one; see {@link ToothTemplateOverrides} and `getToothTemplateRejections()`. Omitted (the default): the factory artwork.
|
|
875
|
+
*/
|
|
876
|
+
toothTemplates?: ToothTemplateOverrides;
|
|
869
877
|
/**
|
|
870
878
|
* When true, disables all interactions (click, touch, keyboard).
|
|
871
879
|
* Useful for print/report/view modes.
|
|
@@ -1105,6 +1113,21 @@ export declare type OdontogramThemeConfig = {
|
|
|
1105
1113
|
dentin?: string;
|
|
1106
1114
|
/** Crown and root outline. */
|
|
1107
1115
|
outline?: string;
|
|
1116
|
+
/** The width of that outline, as a CSS length in SVG user units
|
|
1117
|
+
* (`"1"`, `"1.4"`, `"0.75"`). Not a colour — it is here because it is
|
|
1118
|
+
* the other half of `outline` above.
|
|
1119
|
+
*
|
|
1120
|
+
* It rides every layer that is the tooth's own silhouette, so the
|
|
1121
|
+
* contour keeps one thickness whatever the tooth is charted as: a
|
|
1122
|
+
* natural or deciduous crown, a root remnant, a prepared crown, a tooth
|
|
1123
|
+
* under the gum, any of the seven fracture states, or the occlusal
|
|
1124
|
+
* projection — whose tiles sit in the same chart grid as the side views
|
|
1125
|
+
* and therefore widen with them. The occlusal grooves are deliberately
|
|
1126
|
+
* not included and stay hairlines.
|
|
1127
|
+
*
|
|
1128
|
+
* Unset, the drawings declare no width at all and stroke at the SVG
|
|
1129
|
+
* initial value of `1`. */
|
|
1130
|
+
outlineWidth?: string;
|
|
1108
1131
|
/** Crown sheen (the "beauty" layer). */
|
|
1109
1132
|
highlight?: string;
|
|
1110
1133
|
/** The deciduous tooth's silhouette. */
|
|
@@ -1145,8 +1168,29 @@ export declare type OdontogramThemeConfig = {
|
|
|
1145
1168
|
* Keys must start with `--odon-`; anything else is ignored, so this cannot
|
|
1146
1169
|
* be used to set unrelated custom properties on the host's element.
|
|
1147
1170
|
*
|
|
1171
|
+
* Not every token is a colour. `--odon-implant-tint` is a **CSS filter**
|
|
1172
|
+
* over the implant fixture as a whole: the drawing's ~65 metal greys encode
|
|
1173
|
+
* a light source, so they are deliberately not themable one by one, and a
|
|
1174
|
+
* filter shifts them together instead of flattening the shading. It is
|
|
1175
|
+
* `none` unless set, and it does not touch the peri-implant bone-loss
|
|
1176
|
+
* overlay, which sits outside the filtered group.
|
|
1177
|
+
*
|
|
1178
|
+
* `--odon-implant-fill` is the **flat** counterpart of that tint, for a
|
|
1179
|
+
* palette that wants one solid colour rather than shaded metal. It is a
|
|
1180
|
+
* colour, and it replaces the fill of every shape in the fixture at once.
|
|
1181
|
+
* Each of those shapes falls back to the grey it is drawn in, so unset it
|
|
1182
|
+
* changes nothing at all — there is no single default to state. The two
|
|
1183
|
+
* compose: the fill flattens the fixture, the filter then shifts it. It
|
|
1184
|
+
* leaves the peri-implant bone-loss overlay alone for the same reason the
|
|
1185
|
+
* tint does, and the occlusal screw-hole rims keep their outline, because
|
|
1186
|
+
* only `fill` is affected.
|
|
1187
|
+
*
|
|
1148
1188
|
* @example
|
|
1149
1189
|
* { tokens: { "--odon-rest-gold": "#d4af37", "--odon-fill-composite": "#eae0c8" } }
|
|
1190
|
+
* @example
|
|
1191
|
+
* { tokens: { "--odon-implant-tint": "hue-rotate(205deg) saturate(.85)" } }
|
|
1192
|
+
* @example
|
|
1193
|
+
* { tokens: { "--odon-implant-fill": "#8fa6b8" } }
|
|
1150
1194
|
*/
|
|
1151
1195
|
tokens?: Record<string, string>;
|
|
1152
1196
|
/**
|
|
@@ -1947,6 +1991,11 @@ export declare function setToothInfoVisible(value: boolean): void;
|
|
|
1947
1991
|
* `setEdentulous(false)` when the base is not "none"). */
|
|
1948
1992
|
export declare function setToothSelectionForSelection(value: string): void;
|
|
1949
1993
|
|
|
1994
|
+
/** Replace the factory tooth drawings with host-supplied SVG, per anatomy profile (see `anatomy/templateOverrides.ts`: the markup is vetted,
|
|
1995
|
+
* a refused template is reported by `getToothTemplateRejections()` and the factory one stays). Pass `null` to go back to the factory artwork.
|
|
1996
|
+
* Invalidates the perio-chart template cache; the grid is rebuilt by the caller (`OdontogramProvider`'s `toothTemplates` prop does it). */
|
|
1997
|
+
export declare function setToothTemplateOverrides(overrides: ToothTemplateOverrides | null): void;
|
|
1998
|
+
|
|
1950
1999
|
/** Cervical wear type on the current selection (complex-mode select). */
|
|
1951
2000
|
export declare function setWearCervicalForSelection(value: string): void;
|
|
1952
2001
|
|
|
@@ -2002,6 +2051,13 @@ export declare type SurfaceIndicator = {
|
|
|
2002
2051
|
|
|
2003
2052
|
export declare type SurfaceNotation = "simple" | "full";
|
|
2004
2053
|
|
|
2054
|
+
export declare type TemplateRejection = {
|
|
2055
|
+
profile: "classic" | "measured";
|
|
2056
|
+
set: keyof ToothTemplateSet;
|
|
2057
|
+
key: number;
|
|
2058
|
+
reason: string;
|
|
2059
|
+
};
|
|
2060
|
+
|
|
2005
2061
|
/** Selectable tooth-anatomy profiles. Stage A: only `classic` is realized;
|
|
2006
2062
|
* `measured` is accepted but falls back to the classic profile (harmless). */
|
|
2007
2063
|
export declare type ToothAnatomy = "classic" | "measured";
|
|
@@ -2041,6 +2097,18 @@ declare interface ToothTableCell {
|
|
|
2041
2097
|
* shown bold-italic in a warning colour). */
|
|
2042
2098
|
declare type ToothTableStatus = "empty" | "content" | "problem";
|
|
2043
2099
|
|
|
2100
|
+
export declare type ToothTemplateOverrides = Partial<Record<"classic" | "measured", ToothTemplateSet>>;
|
|
2101
|
+
|
|
2102
|
+
/** The four template maps of a profile that a host may replace. Keys are the template numbers of THAT profile;
|
|
2103
|
+
* the `primary*` maps are the deciduous artwork of a profile that has it (`measured`), keyed by the permanent
|
|
2104
|
+
* FDI position the milk tooth occupies. */
|
|
2105
|
+
export declare type ToothTemplateSet = {
|
|
2106
|
+
templates?: Record<number, string>;
|
|
2107
|
+
templatesOccl?: Record<number, string>;
|
|
2108
|
+
primaryTemplates?: Record<number, string>;
|
|
2109
|
+
primaryTemplatesOccl?: Record<number, string>;
|
|
2110
|
+
};
|
|
2111
|
+
|
|
2044
2112
|
/** The translate function surfaced by {@link useI18n}. */
|
|
2045
2113
|
declare type TranslateFn = ReturnType<typeof useI18n>["t"];
|
|
2046
2114
|
|