react-advanced-odontogram 2.0.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/LICENSE +21 -0
- package/README.md +1382 -0
- package/dist/App.d.ts +148 -0
- package/dist/DualStateConfirm.d.ts +25 -0
- package/dist/ExportOptionsModal.d.ts +26 -0
- package/dist/PerioChart.d.ts +67 -0
- package/dist/PerioSidebar.d.ts +1 -0
- package/dist/SettingsModal.d.ts +84 -0
- package/dist/bridgeOverlay.d.ts +116 -0
- package/dist/fhir/codesystems.d.ts +51 -0
- package/dist/fhir/fieldMappings.d.ts +35 -0
- package/dist/fhir/fromFhir.d.ts +7 -0
- package/dist/fhir/primitives.d.ts +16 -0
- package/dist/fhir/toFhir.d.ts +20 -0
- package/dist/fhir/toFhirPerio.d.ts +70 -0
- package/dist/fhir/types.d.ts +108 -0
- package/dist/i18n/translations.d.ts +27 -0
- package/dist/i18n/useI18n.d.ts +39 -0
- package/dist/index.d.ts +4 -0
- package/dist/odontogram.d.ts +1214 -0
- package/dist/odontogram.js +20645 -0
- package/dist/odontogram.js.map +1 -0
- package/dist/perioClassification.d.ts +90 -0
- package/dist/perioExport.d.ts +13 -0
- package/dist/perioGraphic.d.ts +496 -0
- package/dist/perioIndexNames.d.ts +29 -0
- package/dist/perioPdf.d.ts +77 -0
- package/dist/plugin.d.ts +63 -0
- package/dist/registry/axes.d.ts +9 -0
- package/dist/registry/fhir.d.ts +3 -0
- package/dist/registry/fromFhir.d.ts +3 -0
- package/dist/registry/restorations.d.ts +26 -0
- package/dist/registry/svgActivate.d.ts +15 -0
- package/dist/registry/svgLayers.d.ts +14 -0
- package/dist/registry/types.d.ts +70 -0
- package/dist/registry/uiOptions.d.ts +17 -0
- package/dist/registry/validate.d.ts +4 -0
- package/dist/status_extras.d.ts +58 -0
- package/dist/style.css +1 -0
- package/dist/theme.d.ts +51 -0
- package/dist/tour.d.ts +9 -0
- package/dist/utils/numbering.d.ts +23 -0
- package/package.json +99 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/** UI-3b Task 6/7: which PDF sections the user opted into. The perio
|
|
2
|
+
* sections are additionally auto-skipped whenever `data.hasPerio` is false
|
|
3
|
+
* (see {@link assemblePdf}), regardless of these flags — a blank perio
|
|
4
|
+
* chart never gets an empty "Periodontal status" page. */
|
|
5
|
+
export interface PdfExportOptions {
|
|
6
|
+
patientData: boolean;
|
|
7
|
+
odontogram: boolean;
|
|
8
|
+
perioStatus: boolean;
|
|
9
|
+
perioDescription: boolean;
|
|
10
|
+
}
|
|
11
|
+
/** Minimal case-identity shape the PDF header needs (patient name + exam
|
|
12
|
+
* date). Deliberately a LOCAL structural type rather than importing
|
|
13
|
+
* odontogram.ts's `CaseMeta` — `getCaseMeta()`'s return value satisfies it
|
|
14
|
+
* structurally, and keeping this module free of any `odontogram.ts` import
|
|
15
|
+
* avoids a circular dependency (odontogram.ts is the one importing FROM
|
|
16
|
+
* perioPdf.ts). */
|
|
17
|
+
export interface PdfCaseIdentity {
|
|
18
|
+
patientName: string | null;
|
|
19
|
+
examDate: string | null;
|
|
20
|
+
}
|
|
21
|
+
/** Pixel dimensions of a rasterized chart, used to keep the embedded PDF
|
|
22
|
+
* image's aspect ratio correct. Optional — `assemblePdf` falls back to a
|
|
23
|
+
* reasonable default aspect ratio when omitted (e.g. in the unit test's
|
|
24
|
+
* minimal fixture). */
|
|
25
|
+
export interface PdfImageSize {
|
|
26
|
+
width: number;
|
|
27
|
+
height: number;
|
|
28
|
+
}
|
|
29
|
+
/** Pre-rendered input for {@link assemblePdf} — every PNG/text value is
|
|
30
|
+
* already computed by `exportPdf()` before this is built; `assemblePdf`
|
|
31
|
+
* itself performs no I/O. */
|
|
32
|
+
export interface PdfAssembleData {
|
|
33
|
+
/** `hasAnyPerioData()` — when false, BOTH perio sections are omitted no
|
|
34
|
+
* matter what `opts.perioStatus`/`opts.perioDescription` ask for. */
|
|
35
|
+
hasPerio: boolean;
|
|
36
|
+
caseMeta: PdfCaseIdentity;
|
|
37
|
+
odontogramPng: string;
|
|
38
|
+
odontogramSummaryText: string;
|
|
39
|
+
odontogramImageSize?: PdfImageSize;
|
|
40
|
+
perioPng: string;
|
|
41
|
+
perioSummaryText: string;
|
|
42
|
+
perioImageSize?: PdfImageSize;
|
|
43
|
+
}
|
|
44
|
+
/** The minimal jsPDF surface `assemblePdf` drives — lets tests inject a
|
|
45
|
+
* lightweight fake without constructing a real `jsPDF` (see the jsdom note
|
|
46
|
+
* above). A real `jsPDF` instance satisfies this structurally. */
|
|
47
|
+
export interface PdfDocLike {
|
|
48
|
+
text: (text: string, x: number, y: number, options?: any) => PdfDocLike;
|
|
49
|
+
addImage: (imageData: string, format: string, x: number, y: number, width: number, height: number) => PdfDocLike;
|
|
50
|
+
addPage: (...args: any[]) => PdfDocLike;
|
|
51
|
+
setFontSize: (size: number) => PdfDocLike;
|
|
52
|
+
setFont: (fontName: string, fontStyle?: string) => PdfDocLike;
|
|
53
|
+
save: (filename?: string) => void;
|
|
54
|
+
internal: {
|
|
55
|
+
pageSize: {
|
|
56
|
+
getWidth: () => number;
|
|
57
|
+
getHeight: () => number;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Assemble the PDF report from pre-rendered `data`, gated by `opts`. PURE —
|
|
63
|
+
* no I/O, no rasterization; `docFactory` defaults to a real `new jsPDF()`
|
|
64
|
+
* but tests always inject a fake (see the jsdom note above).
|
|
65
|
+
*
|
|
66
|
+
* Section order: (1) header (patient name + exam date) when
|
|
67
|
+
* `opts.patientData`; (2) odontogram image + summary prose when
|
|
68
|
+
* `opts.odontogram`; (3) perio chart image when `data.hasPerio &&
|
|
69
|
+
* opts.perioStatus`; (4) perio summary/classification text + the
|
|
70
|
+
* explanatory abbreviation-legend footer when `data.hasPerio &&
|
|
71
|
+
* opts.perioDescription` — the footer is tied to `perioDescription`
|
|
72
|
+
* (mirrors the export dialog's "Perio description + footer" grouping) not
|
|
73
|
+
* to "any perio section shown", so enabling only the perio graphic
|
|
74
|
+
* (`perioStatus`) without the description never prints a legend for text
|
|
75
|
+
* that isn't there.
|
|
76
|
+
*/
|
|
77
|
+
export declare function assemblePdf(opts: PdfExportOptions, data: PdfAssembleData, docFactory?: () => PdfDocLike): PdfDocLike;
|
package/dist/plugin.d.ts
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { Language } from "./i18n/translations";
|
|
2
|
+
/**
|
|
3
|
+
* Defines the SVG layer where a plugin's visual output will be inserted.
|
|
4
|
+
*
|
|
5
|
+
* | Layer | Z-order | Description |
|
|
6
|
+
* |---------------|---------|----------------------------------------|
|
|
7
|
+
* | `base` | 0 | Below the tooth — background indicators |
|
|
8
|
+
* | `restoration` | 3 | Between endo and crown layers |
|
|
9
|
+
* | `overlay` | 6 | Top-most — badges, markers, highlights |
|
|
10
|
+
*/
|
|
11
|
+
export type PluginLayer = "base" | "restoration" | "overlay";
|
|
12
|
+
/**
|
|
13
|
+
* Custom SVG plugin definition for the Odontogram engine.
|
|
14
|
+
*
|
|
15
|
+
* Plugins can inject custom SVG content into each tooth's rendering and
|
|
16
|
+
* maintain per-tooth custom state that is automatically included in
|
|
17
|
+
* JSON export/import.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```typescript
|
|
21
|
+
* const implantBrandPlugin: OdontogramPlugin = {
|
|
22
|
+
* id: "implant-brand",
|
|
23
|
+
* label: { hu: "Implantátum márka", en: "Implant brand", de: "Implantat-Marke", ... },
|
|
24
|
+
* layer: "overlay",
|
|
25
|
+
* renderSvg: (toothNo, _quadrant, customState) => {
|
|
26
|
+
* if (!customState?.brand) return null;
|
|
27
|
+
* return `<text x="16" y="60" font-size="6" fill="#3b7bff">${customState.brand}</text>`;
|
|
28
|
+
* },
|
|
29
|
+
* };
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
export type OdontogramPlugin = {
|
|
33
|
+
/** Unique plugin identifier (used as key in customStates). */
|
|
34
|
+
id: string;
|
|
35
|
+
/** Localized display label for the plugin (shown in the state tooltip). */
|
|
36
|
+
label: Partial<Record<Language, string>>;
|
|
37
|
+
/**
|
|
38
|
+
* SVG layer where this plugin's output will be rendered.
|
|
39
|
+
* @see {@link PluginLayer}
|
|
40
|
+
*/
|
|
41
|
+
layer: PluginLayer;
|
|
42
|
+
/**
|
|
43
|
+
* Render SVG markup for a specific tooth. Return an SVG fragment string
|
|
44
|
+
* (will be wrapped in a `<g>` element) or `null`/`undefined` to render nothing.
|
|
45
|
+
*
|
|
46
|
+
* @param toothNo - The FDI tooth number (11–48).
|
|
47
|
+
* @param quadrant - The quadrant (1–4) derived from the tooth number.
|
|
48
|
+
* @param customState - The plugin's custom state for this tooth, or `undefined`.
|
|
49
|
+
*/
|
|
50
|
+
renderSvg: (toothNo: number, quadrant: 1 | 2 | 3 | 4, customState: unknown) => string | null | undefined;
|
|
51
|
+
/**
|
|
52
|
+
* Optional: which panel section this plugin adds controls to.
|
|
53
|
+
* When set to `"custom"`, the engine will render a dedicated panel
|
|
54
|
+
* section for the plugin (future expansion).
|
|
55
|
+
*/
|
|
56
|
+
panelSection?: "custom";
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Get the quadrant number (1–4) for a given FDI tooth number.
|
|
60
|
+
*/
|
|
61
|
+
export declare function getQuadrant(toothNo: number): 1 | 2 | 3 | 4;
|
|
62
|
+
/** Z-index priority for SVG plugin layers. */
|
|
63
|
+
export declare const LAYER_Z: Record<PluginLayer, number>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Registry catalog coding data (SP2 Stage 0). One `ClinicalAxis` per
|
|
3
|
+
* `FIELD_MAPPINGS` row (`src/fhir/fieldMappings.ts`), with finding codes and
|
|
4
|
+
* value codings transcribed from `LOCAL_VALUE_MAPS` (`src/fhir/codesystems.ts`).
|
|
5
|
+
* Enforced verbatim by `src/__tests__/parity.test.ts` ("registry catalog
|
|
6
|
+
* matches today's tables"). No SNOMED/ICD codes populated (SP2 keeps them empty).
|
|
7
|
+
*/
|
|
8
|
+
import type { ClinicalAxis } from "./types";
|
|
9
|
+
export declare const AXES: ClinicalAxis[];
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { Bundle, OdontogramExportPayload, FhirExportOptions } from "../fhir/types";
|
|
2
|
+
/** Registry-driven FHIR bundle build. Byte-identical to the legacy buildFhirBundle. */
|
|
3
|
+
export declare function buildFhirBundleFromRegistry(payload: OdontogramExportPayload, options?: FhirExportOptions): Bundle;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export type RestorationType = "none" | "crown" | "inlay" | "onlay" | "veneer" | "bridge";
|
|
2
|
+
export type RestorationMaterial = "none" | "emax" | "gold" | "gradia" | "zircon" | "metal" | "metal-ceramic" | "telescope" | "temporary";
|
|
3
|
+
export type ToothView = "front" | "occlusal";
|
|
4
|
+
export declare const RESTORATION_MATRIX: Record<Exclude<RestorationType, "none">, {
|
|
5
|
+
materials: RestorationMaterial[];
|
|
6
|
+
occlusalOnly?: boolean;
|
|
7
|
+
}>;
|
|
8
|
+
export declare function isValidRestoration(type: RestorationType, material: RestorationMaterial, view: ToothView): boolean;
|
|
9
|
+
export declare function composeRestorationLayers(type: RestorationType, material: RestorationMaterial, view: ToothView): string[];
|
|
10
|
+
export declare function allRestorationLayers(): string[];
|
|
11
|
+
export interface RestorationOption {
|
|
12
|
+
restorationType: RestorationType;
|
|
13
|
+
restorationMaterial: RestorationMaterial;
|
|
14
|
+
labelKey: string;
|
|
15
|
+
typeLabelKey?: string;
|
|
16
|
+
materialLabelKey?: string;
|
|
17
|
+
prefixKey?: string;
|
|
18
|
+
prosthesis?: ProsthesisValue;
|
|
19
|
+
}
|
|
20
|
+
export type ProsthesisValue = "healing-abutment" | "locator" | "locator-denture" | "bar" | "bar-denture" | "removable-partial" | "removable-full";
|
|
21
|
+
export interface RestorationOptionsCtx {
|
|
22
|
+
isImplant?: boolean;
|
|
23
|
+
view?: ToothView;
|
|
24
|
+
toothSelection?: string;
|
|
25
|
+
}
|
|
26
|
+
export declare function restorationOptions(view: ToothView, ctx?: RestorationOptionsCtx): RestorationOption[];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { FlagCtx } from "./types";
|
|
2
|
+
interface Deps {
|
|
3
|
+
setActive: (el: any, on: boolean) => void;
|
|
4
|
+
svgGetById: (root: any, id: string) => any;
|
|
5
|
+
isToothPresent: (sel: string) => boolean;
|
|
6
|
+
isUnderGum: (sel: string) => boolean;
|
|
7
|
+
isExtraction: (sel: string) => boolean;
|
|
8
|
+
fissureAllowedTeeth: Set<number>;
|
|
9
|
+
brokenVariants: Set<string>;
|
|
10
|
+
}
|
|
11
|
+
/** Compute the render's derived booleans (mirrors applyStateToSvgSingle). */
|
|
12
|
+
export declare function buildFlagCtx(state: any, toothNo: number, d: Deps): FlagCtx;
|
|
13
|
+
/** Activate the in-scope boolean-flag layers + the mods set layers. Order-independent. */
|
|
14
|
+
export declare function applyFlagLayers(svg: any, state: any, ctx: FlagCtx, d: Deps): void;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** Non-axis layers the render clears (base/pulp/milktooth/bruxism/crown-branch intermediates/etc.).
|
|
2
|
+
* Transcribed verbatim from odontogram.ts applyStateToSvgSingle's clear block (:742-787).
|
|
3
|
+
* Also includes "implant" and "milktooth": those two ids are NOT cleared by the :742-787
|
|
4
|
+
* block itself (they are activation-toggled right after it, at :763-764 via
|
|
5
|
+
* setActive("implant", isImplant) / setActive("milktooth", isMilktooth)), but
|
|
6
|
+
* axisClearLayers() below derives them from AXES (toothSelection.svgLayer) since they
|
|
7
|
+
* are legitimate switchable SVG layers. Clearing them here is byte-identical to today's
|
|
8
|
+
* render because :763-764 immediately re-sets them to the correct value right after —
|
|
9
|
+
* setActive() is a pure, idempotent attribute write. They are listed explicitly here so
|
|
10
|
+
* allClearLayers() equals this list as a set (see the set-equality test). */
|
|
11
|
+
export declare const FIXED_CLEAR_LAYERS: string[];
|
|
12
|
+
export declare function axisClearLayers(): string[];
|
|
13
|
+
/** The full set of layers the render turns off before applying active state. */
|
|
14
|
+
export declare function allClearLayers(): string[];
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/** Registry type definitions for the clinical-axis engine (SP2). Types only. */
|
|
2
|
+
export type AxisKind = "enum" | "boolean" | "set" | "surfaceSet" | "restoration" | "derived" | "global";
|
|
3
|
+
/** Context for filtering curated UI option lists (`uiOptions` / `optionsFor`). */
|
|
4
|
+
export interface UiOptCtx {
|
|
5
|
+
isMilktooth?: boolean;
|
|
6
|
+
}
|
|
7
|
+
/** A coded concept: local code always present; SNOMED/ICD optional and additive. */
|
|
8
|
+
export interface ConceptRef {
|
|
9
|
+
local: string;
|
|
10
|
+
display: string;
|
|
11
|
+
snomed?: string;
|
|
12
|
+
icd?: {
|
|
13
|
+
system: string;
|
|
14
|
+
code: string;
|
|
15
|
+
}[];
|
|
16
|
+
}
|
|
17
|
+
/** One allowed value of an axis. svgLayer/ui are added in later stages. */
|
|
18
|
+
export interface AxisValue {
|
|
19
|
+
id: string;
|
|
20
|
+
coding: ConceptRef;
|
|
21
|
+
labelKey?: string;
|
|
22
|
+
svgLayer?: string | string[];
|
|
23
|
+
}
|
|
24
|
+
/** Precomputed render context for flag activation (mirrors the render's derived booleans). */
|
|
25
|
+
export interface FlagCtx {
|
|
26
|
+
isImplant: boolean;
|
|
27
|
+
isMilktooth: boolean;
|
|
28
|
+
underGum: boolean;
|
|
29
|
+
extraction: boolean;
|
|
30
|
+
isNone: boolean;
|
|
31
|
+
toothPresent: boolean;
|
|
32
|
+
fissureAllowed: boolean;
|
|
33
|
+
contactAllowed: boolean;
|
|
34
|
+
bruxismAllowed: boolean;
|
|
35
|
+
extractionPlanAllowed: boolean;
|
|
36
|
+
}
|
|
37
|
+
/** One chartable tooth axis. Resolver fields are optional here (filled per stage). */
|
|
38
|
+
export interface ClinicalAxis {
|
|
39
|
+
id: string;
|
|
40
|
+
field: string;
|
|
41
|
+
kind: AxisKind;
|
|
42
|
+
finding: ConceptRef;
|
|
43
|
+
valueGroup?: string;
|
|
44
|
+
values?: AxisValue[];
|
|
45
|
+
skipValue?: string;
|
|
46
|
+
surfacesField?: string;
|
|
47
|
+
flag?: string;
|
|
48
|
+
svgLayer?: string;
|
|
49
|
+
appliesWhen?: (ctx: FlagCtx, state: any) => boolean;
|
|
50
|
+
uiOptions?: {
|
|
51
|
+
value: string;
|
|
52
|
+
labelKey: string;
|
|
53
|
+
when?: (ctx: UiOptCtx) => boolean;
|
|
54
|
+
}[];
|
|
55
|
+
}
|
|
56
|
+
/** Per-tooth rendering context (static tables; populated in later stages). */
|
|
57
|
+
export interface ToothContext {
|
|
58
|
+
fdi: number;
|
|
59
|
+
template: 11 | 13 | 14 | 16;
|
|
60
|
+
view: "front" | "occlusal";
|
|
61
|
+
isAnterior: boolean;
|
|
62
|
+
isMolar: boolean;
|
|
63
|
+
mirror: boolean;
|
|
64
|
+
rot: 0 | 180;
|
|
65
|
+
fissureAllowed: boolean;
|
|
66
|
+
milktoothAllowed: boolean;
|
|
67
|
+
}
|
|
68
|
+
/** Placeholder for the eventual axis-keyed state; SP2 keeps the current container.
|
|
69
|
+
* Kept as a nominal type so later stages can tighten it. */
|
|
70
|
+
export type ToothState = Record<string, unknown>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { UiOptCtx } from "./types";
|
|
2
|
+
/** Feature-flag state consumed by the registry (extensible key→boolean map). */
|
|
3
|
+
export type RegistryFlags = Record<string, boolean>;
|
|
4
|
+
/**
|
|
5
|
+
* First consumer of `ClinicalAxis.flag` (SP4 Task 5). An axis with no `flag`
|
|
6
|
+
* is always active; an axis carrying a `flag` is active only when that flag is
|
|
7
|
+
* set in `flags`. Currently gates `pulpLatin` (`flag: "latinPulpDetail"`),
|
|
8
|
+
* which is satisfied iff the pulp-detail setting is "latin". This governs UI
|
|
9
|
+
* authoring only — a stored value still serializes / round-trips regardless.
|
|
10
|
+
*/
|
|
11
|
+
export declare function isAxisFlagSatisfied(axisId: string, flags?: RegistryFlags): boolean;
|
|
12
|
+
/** Ordered {value, labelKey} option list for an axis (curated UI metadata).
|
|
13
|
+
* Returns `[]` for a flag-gated axis whose flag is unsatisfied. */
|
|
14
|
+
export declare function optionsFor(axisId: string, ctx?: UiOptCtx, flags?: RegistryFlags): {
|
|
15
|
+
value: string;
|
|
16
|
+
labelKey: string;
|
|
17
|
+
}[];
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** The allowed enum/set values for an axis, sourced from the registry catalog. */
|
|
2
|
+
export declare function validValues(axisId: string): Set<string>;
|
|
3
|
+
/** The allowed tooth-surface ids (a value group used by caries/filling, not an axis). */
|
|
4
|
+
export declare function validSurfaces(): Set<string>;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pre-configured dental status presets for quick application of common
|
|
3
|
+
* restorative scenarios (bridges, full-arch, partial/full removable, bar dentures).
|
|
4
|
+
*
|
|
5
|
+
* `arches` defines the FDI tooth layout; `options` is the array of presets
|
|
6
|
+
* selectable from the "Extras" dropdown in the UI.
|
|
7
|
+
*/
|
|
8
|
+
export declare const STATUS_EXTRAS: {
|
|
9
|
+
arches: {
|
|
10
|
+
upper: number[];
|
|
11
|
+
lower: number[];
|
|
12
|
+
wisdom: {
|
|
13
|
+
upper: number[];
|
|
14
|
+
lower: number[];
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
options: ({
|
|
18
|
+
id: string;
|
|
19
|
+
labelKey: string;
|
|
20
|
+
type: string;
|
|
21
|
+
teeth: number[];
|
|
22
|
+
material: string;
|
|
23
|
+
arch?: undefined;
|
|
24
|
+
missingMaterial?: undefined;
|
|
25
|
+
implants?: undefined;
|
|
26
|
+
missing?: undefined;
|
|
27
|
+
} | {
|
|
28
|
+
id: string;
|
|
29
|
+
labelKey: string;
|
|
30
|
+
type: string;
|
|
31
|
+
arch: string;
|
|
32
|
+
material: string;
|
|
33
|
+
missingMaterial: string;
|
|
34
|
+
teeth?: undefined;
|
|
35
|
+
implants?: undefined;
|
|
36
|
+
missing?: undefined;
|
|
37
|
+
} | {
|
|
38
|
+
id: string;
|
|
39
|
+
labelKey: string;
|
|
40
|
+
type: string;
|
|
41
|
+
arch: string;
|
|
42
|
+
teeth?: undefined;
|
|
43
|
+
material?: undefined;
|
|
44
|
+
missingMaterial?: undefined;
|
|
45
|
+
implants?: undefined;
|
|
46
|
+
missing?: undefined;
|
|
47
|
+
} | {
|
|
48
|
+
id: string;
|
|
49
|
+
labelKey: string;
|
|
50
|
+
type: string;
|
|
51
|
+
arch: string;
|
|
52
|
+
implants: number[];
|
|
53
|
+
missing: number[];
|
|
54
|
+
teeth?: undefined;
|
|
55
|
+
material?: undefined;
|
|
56
|
+
missingMaterial?: undefined;
|
|
57
|
+
})[];
|
|
58
|
+
};
|
package/dist/style.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{--bg: var(--odon-bg, #f3f6fb);--panel: var(--odon-panel, #ffffff);--card: var(--odon-card, #ffffff);--muted: var(--odon-muted, #5b6b7d);--text: var(--odon-text, #1e2a3a);--line: var(--odon-line, #d7e0ec);--accent: var(--odon-accent, #3b7bff);--accent2: var(--odon-accent2, #12b981)}.odontogram-root{--bg: var(--odon-bg, #f3f6fb);--panel: var(--odon-panel, #ffffff);--card: var(--odon-card, #ffffff);--muted: var(--odon-muted, #5b6b7d);--text: var(--odon-text, #1e2a3a);--line: var(--odon-line, #d7e0ec);--accent: var(--odon-accent, #3b7bff);--accent2: var(--odon-accent2, #12b981);color:var(--text)}.dark .odontogram-root{--bg: var(--odon-bg, #0f172a);--panel: var(--odon-panel, #1e293b);--card: var(--odon-card, #1e293b);--muted: var(--odon-muted, #94a3b8);--text: var(--odon-text, #f1f5f9);--line: var(--odon-line, #334155)}*{box-sizing:border-box}html,body{height:100%}body{margin:0;font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial;background:radial-gradient(1200px 600px at 15% 0%,#ffffff 0%,var(--bg) 60%);color:var(--text)}.topbar{display:flex;align-items:center;justify-content:space-between;padding:14px 18px;border-bottom:1px solid var(--line);background:#ffffffd9;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);position:sticky;top:0;z-index:10}.brand{display:flex;gap:12px;align-items:center}.dot{width:10px;height:10px;border-radius:999px;background:var(--accent2);box-shadow:0 0 0 6px #12b9811f}.title{font-weight:700;letter-spacing:.2px}.subtitle{font-size:12px;color:var(--muted);margin-top:2px}.topbar-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.topbar-group{display:flex;align-items:center;gap:8px}.segmented{display:flex;gap:6px}.btn{border:1px solid var(--line);color:var(--text);background:#3b7bff1f;padding:8px 12px;border-radius:12px;cursor:pointer;font-weight:600}.btn-sm{padding:6px 10px;font-size:12px}.btn:hover{background:#3b7bff2e}.btn-ghost{background:#0000000a}.btn-ghost:hover{background:#00000014}.btn-danger{background:#d945451f;border-color:#d9454566;color:#b83a3a}.btn-danger:hover{background:#d9454533}.btn-toggle[aria-pressed=true]{background:#640feb33;border-color:#12b98180}.btn-toggle[aria-pressed=false]{background:#0000000a}.dropdown{position:relative}.dropdown-menu{position:absolute;right:0;top:100%;margin-top:6px;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:0 12px 24px #1e2a3a1f;padding:6px;display:flex;flex-direction:column;gap:4px;min-width:180px;z-index:20}.dropdown-item{border:1px solid var(--line);background:#0000000a;color:var(--text);padding:8px 10px;border-radius:10px;font-weight:600;cursor:pointer;text-align:start}.dropdown-item:hover{background:#00000014}.dropdown-item:disabled{opacity:.45;cursor:not-allowed}.dropdown-item:disabled:hover{background:#0000000a}.dropdown-item[aria-checked=true]{background:#3b7bff2e;border-color:#3b7bff73}select{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:1px solid var(--line);background:#3b7bff1f;color:var(--text);padding:8px 34px 8px 12px;border-radius:12px;font-weight:600;min-width:220px;cursor:pointer;background-image:linear-gradient(45deg,transparent 50%,var(--text) 50%),linear-gradient(135deg,var(--text) 50%,transparent 50%);background-position:calc(100% - 18px) 52%,calc(100% - 12px) 52%;background-size:6px 6px,6px 6px;background-repeat:no-repeat}select:focus{outline:none;box-shadow:0 0 0 3px #3b7bff2e}.layout{display:grid;grid-template-columns:1fr 360px;gap:14px;padding:14px}.perio-launch-bar{grid-column:1 / -1;display:flex;justify-content:flex-end}.chart{background:#ffffffe6;border:1px solid var(--line);border-radius:18px;overflow:hidden}.chart-header{padding:12px 14px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:12px}.chart-title{font-weight:700}.chart-hint{font-size:12px;color:var(--muted);margin-top:4px}.chart-actions{display:flex;align-items:center;gap:8px}.chart-mode-toggle{display:flex;align-items:center;gap:4px;padding:4px;border:1px solid var(--line);border-radius:999px;background:#00000008}.chart-mode-btn{border:none;background:transparent;color:var(--text);padding:6px 14px;border-radius:999px;font-weight:600;font-size:13px;cursor:pointer}.chart-mode-btn:hover{background:#3b7bff24}.chart-mode-btn.is-active{background:var(--accent);color:#fff}.chart-mode-btn.is-active:hover{background:var(--accent)}.plan-badge{display:inline-flex;align-items:center;padding:3px 10px;border-radius:999px;font-size:11px;font-weight:700;letter-spacing:.4px;background:#3b7bff29;color:var(--accent);border:1px solid rgba(59,123,255,.4)}.chart.plan-mode{border-color:var(--accent);box-shadow:0 0 0 2px #3b7bff2e}.proposed-legend{display:none;align-items:center;gap:6px;margin-top:4px;font-size:12px;color:var(--muted)}.chart.plan-mode .proposed-legend{display:flex}.proposed-legend-swatch{display:inline-block;width:18px;height:0;border-top:2px dashed var(--accent)}.tooth-grid,.chart-column,.dental-chart-column,.perio-fullgrid-scroll,[data-perio-arch]{direction:ltr}.tooth-grid{display:grid;grid-template-columns:repeat(16,minmax(36px,1fr));gap:4px;padding:10px;position:relative}.tooth-grid>svg.bridge-overlay{position:absolute;inset:0;pointer-events:none;z-index:5}.tooth-label-row{display:contents}.tooth-label-cell{text-align:center;font-size:11px;color:#1e2a3acc;padding:2px 0 4px;font-weight:600;cursor:pointer}.tooth-label-cell:hover{color:#1e2a3a}.tooth-tile{position:relative;border:1px solid var(--line);border-radius:14px;background:#ffffffb3;padding:2px;cursor:pointer;transition:transform .05s ease,border-color .12s ease,background .12s ease;min-height:100px}.tooth-tile.occl-view{min-height:78px}.tooth-tile.placeholder{cursor:default;background:#ffffff4d}.tooth-tile.placeholder .tooth-svg svg{opacity:0}.tooth-tile:hover{background:#3b7bff14}.tooth-tile:active{transform:scale(.99)}@keyframes odon-dash-pulse{0%,to{border-color:#3b7bff80}50%{border-color:#3b7bffe6}}@keyframes odon-glow-pulse{0%,to{filter:drop-shadow(0 0 3px rgba(59,123,255,.2))}50%{filter:drop-shadow(0 0 7px rgba(59,123,255,.45))}}.tooth-tile:after{content:"";position:absolute;inset:-2px;border-radius:15px;border:2px dashed transparent;pointer-events:none;transition:border-color .25s ease}.tooth-tile .tooth-svg svg{transition:filter .25s ease}.tooth-tile.active{border-color:#3b7bffb3;background:#3b7bff0f;transition:border-color .2s ease,background .2s ease}.tooth-tile.active:after{border-color:#3b7bff8c;animation:odon-dash-pulse 1.6s ease-in-out infinite}.tooth-tile.active .tooth-svg svg{filter:drop-shadow(0 0 4px rgba(59,123,255,.3));animation:odon-glow-pulse 2.5s ease-in-out infinite}.tooth-tile:focus{outline:none}.tooth-tile:focus-visible{outline:2px solid var(--accent);outline-offset:2px;box-shadow:0 0 0 3px #3b7bff40;z-index:1}.tooth-grid.read-only .tooth-tile{cursor:default;pointer-events:none}.tooth-grid.read-only .tooth-tile:hover{background:inherit}.tooth-grid.read-only .tooth-label-cell{cursor:default;pointer-events:none}.panel.read-only{pointer-events:none;opacity:.5;-webkit-user-select:none;-moz-user-select:none;user-select:none}.perio-overlay.read-only{pointer-events:none}.perio-overlay.read-only .perio-overlay-panel{opacity:.5}.perio-inline-panel.read-only{pointer-events:none;opacity:.5;-webkit-user-select:none;-moz-user-select:none;user-select:none}@media(prefers-reduced-motion:reduce){.tooth-tile.active:after{animation:none;border-color:#3b7bffb3}.tooth-tile.active .tooth-svg svg{animation:none;filter:drop-shadow(0 0 4px rgba(59,123,255,.35))}}.tooth-svg{width:100%;height:120px;display:flex;align-items:center;justify-content:center}.tooth-svg svg{width:72px;height:122px;pointer-events:none}.tooth-tile.occl-view .tooth-svg{height:80px}.tooth-tile.occl-view .tooth-svg svg{width:64px;height:64px}.tooth-tile.tpl-14 .tooth-svg svg{width:68px;height:116px}.tooth-tile.tpl-11 .tooth-svg svg,.tooth-tile.tpl-13 .tooth-svg svg{width:60px;height:102px}.tooth-tile.wisdom-hidden{opacity:.45;pointer-events:none}.tooth-tile.wisdom-hidden .tooth-svg svg{opacity:0}.tooth-tile.occl-hidden,.tooth-svg [data-active="0"]{display:none!important}.panel{grid-column:2;background:#fffffff2;border:1px solid var(--line);border-radius:18px;overflow:hidden}.panel-header{padding:12px 14px;border-bottom:1px solid var(--line)}.select-actions{display:flex;flex-direction:column;gap:8px;margin-top:8px}.select-actions-row{display:flex;flex-wrap:wrap;gap:6px}.status-actions{flex-wrap:wrap;gap:6px}.status-extra-row{align-items:center;gap:8px;flex-wrap:wrap}.status-extra-row select{min-width:220px}.btn-icon{padding:9px 15px;font-size:12px}.btn-icon .icon,.btn-icon .icon-img,.btn-icon svg{width:32px;height:32px;display:block}.fade-toggle{transition:opacity .16s ease,max-width .16s ease,padding .16s ease,margin .16s ease,border-width .16s ease,transform .16s ease;max-width:200px}.fade-toggle.is-hidden{opacity:0;pointer-events:none;max-width:0;padding-left:0;padding-right:0;margin:0;border-width:0;transform:scale(.96)}.panel-title-row{display:flex;align-items:center;justify-content:space-between;gap:10px}.panel-title-actions{display:flex;align-items:center;gap:8px}.panel-title{font-weight:800}.panel-subtitle{font-size:12px;color:var(--muted);margin-top:4px}.pill{display:inline-block;background:#12b98124;border:1px solid rgba(18,185,129,.25);padding:2px 8px;border-radius:999px;font-weight:700;color:var(--text)}.warnings{margin-top:10px;display:flex;flex-direction:column;gap:8px}.warning{font-size:12px;color:#8a5b1a;border:1px solid rgba(255,198,116,.45);background:#ffc67438;padding:8px 10px;border-radius:12px}.panel-body{padding:14px;display:flex;flex-direction:column;gap:12px;max-height:calc(100vh - 110px);overflow:auto}.card{background:#ffffffe6;border:1px solid var(--line);border-radius:16px;padding:12px}.card-title{font-weight:800;margin-bottom:8px}.card-title-row{display:flex;align-items:center;justify-content:space-between;gap:8px}.card.collapsed .card-title{margin-bottom:0}.card.collapsed>:not(.card-title-row){display:none}.icon-btn{border:1px solid var(--line);background:#ffffffb3;color:var(--text);border-radius:999px;width:28px;height:28px;display:flex;align-items:center;justify-content:center;cursor:pointer;font-weight:700;line-height:1}.icon-btn .icon{width:16px;height:16px}.icon-btn:hover{background:#3b7bff1f}.icon-btn-danger{color:#d94545;border-color:#d9454566;background:#d9454514}.icon-btn-danger:hover{background:#d9454526}.card-subtitle{font-weight:700;margin:6px 0}.hint{font-size:12px;color:var(--muted);margin:6px 0 10px}.row{display:flex;gap:10px;align-items:center;font-size:13px;padding:6px 2px}.contact-row{margin-bottom:6px}.bruxism-row{margin-top:6px;gap:8px}.wear-stack{display:flex;flex-direction:column;gap:6px}.wear-stack .row{margin-top:0}.fissure-row{margin-top:10px;justify-content:center;text-align:center}#crownReplaceRow,#crownNeededRow,#missingClosedRow{margin-top:8px}.bridge-pillar-row{margin-top:10px}.inline-checks{padding:0}.inline-checks+.inline-checks{margin-top:8px}#calculusRow{margin-top:8px}.inline-checks label{display:flex;gap:10px;align-items:center;font-size:13px;padding:6px 10px;border-radius:12px;border:1px solid var(--line);background:#00000005;cursor:pointer}.inline-checks label:hover{background:#3b7bff0f}.inline-checks input[type=checkbox]{display:none}.inline-checks label:has(input[type=checkbox]:checked){background:#12b9812e;border-color:#12b98180}.check-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.check-grid label{display:flex;gap:10px;align-items:center;font-size:13px;padding:6px 8px;border-radius:12px;border:1px solid var(--line);background:#00000005;cursor:pointer}.check-grid label:hover{background:#3b7bff0f}.check-grid input[type=checkbox]{display:none}.check-grid label:has(input[type=checkbox]:checked){background:#12b9812e;border-color:#12b98180}.surface-cross{display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,auto);gap:8px;max-width:340px;margin:4px auto}.surface-cross .surface-cell{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;text-align:center;padding:10px 6px;border-radius:14px;border:1px solid var(--line);background:#00000005;cursor:pointer}.surface-cross .surface-cell:hover{background:#3b7bff0f}.surface-cross .surface-cell input[type=checkbox]{display:none}.surface-cross .surface-cell .surf-letter{font-weight:700;font-size:18px;line-height:1}.surface-cross .surface-cell .surf-name{font-size:11px;color:var(--muted)}.surface-cross .surface-cell:has(input[type=checkbox]:checked){background:#12b9812e;border-color:#12b98180}.surface-cross .pos-buccal{grid-column:2;grid-row:1}.surface-cross .pos-mesial{grid-column:1;grid-row:2}.surface-cross .pos-occlusal{grid-column:2;grid-row:2}.surface-cross .pos-distal{grid-column:3;grid-row:2}.surface-cross .pos-lingual{grid-column:2;grid-row:3}.subcrown-row{margin-top:8px}.surface-cross .surface-cell[data-material=amalgam]{box-shadow:inset 0 0 0 2px #7a7f87}.surface-cross .surface-cell[data-material=composite]{box-shadow:inset 0 0 0 2px #d9a441}.surface-cross .surface-cell[data-material=gic]{box-shadow:inset 0 0 0 2px #4aa3df}.surface-cross .surface-cell[data-material=temporary]{box-shadow:inset 0 0 0 2px #b07ad9}.surface-cross .surface-cell{position:relative}.surf-depth{position:absolute;top:5px;right:5px;display:none;flex-direction:column;gap:1.5px;padding:2px;cursor:pointer;border-radius:4px}.surface-cross .surface-cell:has(input[type=checkbox]:checked) .surf-depth{display:flex}.surf-depth:hover{background:#0000000f}.surf-depth i{display:block;width:11px;height:3px;border-radius:1px;background:#b3261e38}.surf-depth[data-depth=surface] i:nth-child(1){background:#b3261e}.surf-depth[data-depth=dentin] i:nth-child(-n+2){background:#b3261e}.surf-depth[data-depth=deep] i{background:#b3261e}.surf-depth.has-subcaries{border:2px solid #1f2937;padding:1px}.surf-depth.icdas.has-subcaries{border:2px solid #1f2937;box-shadow:0 0 0 1px #fff}.surf-depth.radio-badge[data-radio]{display:flex}.surf-defect{position:absolute;top:5px;left:5px;display:none;align-items:center;justify-content:center;padding:2px;cursor:pointer;border-radius:4px}.surface-cross .surface-cell:has(input[type=checkbox]:checked) .surf-defect{display:flex}.surf-defect:hover{background:#0000000f}.surf-defect i{display:block;width:9px;height:9px;border-radius:50%;background:#2e319240}.surf-defect.has-defect{border:2px solid #2e3192;padding:1px}.surf-defect.has-defect i{background:#f5ff15;box-shadow:0 0 0 1px #2e3192}.odon-depth-popup{position:fixed;z-index:130;background:var(--panel);border:1px solid var(--line);border-radius:12px;box-shadow:0 12px 24px #1e2a3a2e;padding:6px;display:flex;flex-direction:column;gap:4px;min-width:150px}.odon-depth-group{display:flex;flex-direction:column;gap:4px}.odon-depth-option{border:1px solid var(--line);background:#0000000a;color:var(--text);padding:8px 10px;border-radius:10px;font-weight:600;cursor:pointer;text-align:start;font-size:13px}.odon-depth-option:hover{background:#3b7bff1f}.odon-depth-option.is-active{border-color:var(--accent,#3b7bff);background:#3b7bff29}.odon-depth-group-label{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:var(--muted,#7b8794);padding:6px 4px 2px}.odon-depth-group-label:first-child{padding-top:2px}.odon-depth-title{font-size:12px;font-weight:800;color:var(--text);padding:2px 4px 6px;border-bottom:1px solid var(--line);margin-bottom:2px}.row input[type=checkbox]{display:none}.row:has(input[type=checkbox]){border-radius:12px;border:1px solid var(--line);padding:6px 10px;background:#00000005;cursor:pointer}.inline-checks:has(input[type=checkbox]){border:0;background:none;padding:0}.row:has(input[type=checkbox]:checked){background:#12b9812e;border-color:#12b98180}.inline-checks:has(input[type=checkbox]:checked){background:none;border:0}.wear-stack .row:has(input[type=checkbox]),.wear-stack .row:has(input[type=checkbox]:checked),.dark .wear-stack .row:has(input[type=checkbox]){border:0;background:none;padding:6px 2px;border-radius:0;cursor:default}.radio-list{display:flex;flex-direction:column;gap:8px}.radio-list label{display:flex;gap:10px;align-items:center;font-size:13px;padding:6px 8px;border-radius:12px;border:1px solid var(--line);background:#00000005}.radio-list label:hover{background:#3b7bff0f}.divider{height:1px;background:var(--line);margin:10px 0}.perio-block{margin-top:10px}.perio-block-title{font-size:13px;font-weight:600;margin-bottom:6px;color:var(--text)}.perio-grid{display:flex;flex-direction:column;gap:6px}.perio-site-row{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}.perio-site-cell{display:flex;flex-direction:column;gap:3px;padding:6px;border:1px solid var(--line);border-radius:8px;background:#00000005}.perio-site-label{font-weight:700;text-align:center;font-size:12px;margin-bottom:2px;color:var(--text)}.perio-field{display:flex;justify-content:space-between;align-items:center;gap:4px;font-size:11px}.perio-field span{color:var(--muted)}.perio-field input[type=number]{width:46px;font-size:11px;padding:2px 4px;border:1px solid var(--line);border-radius:4px;background:var(--card);color:var(--text)}.perio-check{display:flex;align-items:center;gap:4px;font-size:11px}.perio-check span{color:var(--muted)}.perio-readout{margin-top:4px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11px}.hidden{display:none!important}@media(max-width:1100px){.layout{grid-template-columns:1fr}.chart-column,.dental-chart-column{grid-column:auto}.panel{grid-column:auto;order:2}}.dark{--bg: var(--odon-bg, #0f172a);--panel: var(--odon-panel, #1e293b);--card: var(--odon-card, #1e293b);--muted: var(--odon-muted, #94a3b8);--text: var(--odon-text, #f1f5f9);--line: var(--odon-line, #334155)}.dark body{background:var(--bg)}.dark .topbar{background:#0f172aeb;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.dark .btn{background:#60a5fa26}.dark .btn:hover{background:#60a5fa40}.dark .btn-ghost{background:#ffffff0f}.dark .btn-ghost:hover{background:#ffffff1f}.dark .btn-danger{background:#f871711f;border-color:#f871714d;color:#f87171}.dark .btn-danger:hover{background:#f8717138}.dark .btn-toggle[aria-pressed=false]{background:#ffffff0f}.dark .dropdown-menu{background:#1e293b;box-shadow:0 12px 24px #00000073}.dark .dropdown-item{background:#ffffff0f}.dark .dropdown-item:hover{background:#ffffff1f}.dark .dropdown-item[aria-checked=true]{background:#60a5fa33;border-color:#60a5fa73}.dark select{background:#60a5fa26;background-image:linear-gradient(45deg,transparent 50%,var(--text) 50%),linear-gradient(135deg,var(--text) 50%,transparent 50%);background-position:calc(100% - 18px) 52%,calc(100% - 12px) 52%;background-size:6px 6px,6px 6px;background-repeat:no-repeat}.dark .chart{background:#1e293be6}.dark .chart-mode-toggle{background:#ffffff0f;border-color:var(--line)}.dark .chart-mode-btn{color:var(--text)}.dark .chart-mode-btn:hover{background:#60a5fa2e}.dark .chart-mode-btn.is-active{background:#60a5fa73;color:#fff}.dark .chart-mode-btn.is-active:hover{background:#60a5fa73}.dark .plan-badge{background:#60a5fa2e;color:#93c5fd;border-color:#60a5fa73}.dark .chart.plan-mode{border-color:#60a5fa99;box-shadow:0 0 0 2px #60a5fa47}.dark .proposed-legend{color:var(--text)}.dark .proposed-legend-swatch{border-top-color:#60a5fad9}.dark .tooth-label-cell{color:#f1f5f999}.dark .tooth-label-cell:hover{color:#f1f5f9}.dark .tooth-tile{background:#1e293bb3}.dark .tooth-tile.placeholder{background:#1e293b4d}.dark .tooth-tile:hover{background:#60a5fa1f}@keyframes odon-dash-pulse-dark{0%,to{border-color:#60a5fa73}50%{border-color:#60a5fad9}}@keyframes odon-glow-pulse-dark{0%,to{filter:drop-shadow(0 0 3px rgba(96,165,250,.2))}50%{filter:drop-shadow(0 0 7px rgba(96,165,250,.45))}}.dark .tooth-tile.active{border-color:#60a5fa99;background:#60a5fa14}.dark .tooth-tile.active:after{border-color:#60a5fa73;animation-name:odon-dash-pulse-dark}.dark .tooth-tile.active .tooth-svg svg{animation-name:odon-glow-pulse-dark;filter:drop-shadow(0 0 4px rgba(96,165,250,.3))}.dark .tooth-tile:focus-visible{outline-color:#60a5facc;box-shadow:0 0 0 3px #60a5fa40}.dark .odon-note-backdrop{background:#0000008c}.dark .odon-note-popover{background:var(--panel);box-shadow:0 16px 48px #00000080}.dark .odon-note-textarea{background:#ffffff0f;border-color:var(--line);color:var(--text)}.dark .odon-note-textarea:focus{box-shadow:0 0 0 3px #60a5fa33;border-color:#60a5fa80}.dark .panel{background:#1e293bf2}.dark .card{background:#1e293bcc;border-color:var(--line)}.dark .icon-btn{background:#1e293bb3}.dark .icon-btn:hover{background:#60a5fa26}.dark .icon-btn-danger{color:#f87171;border-color:#f871714d;background:#f871711a}.dark .icon-btn-danger:hover{background:#f8717133}.dark .warning{color:#fbbf24;border-color:#fbbf244d;background:#fbbf241a}.dark .inline-checks label,.dark .check-grid label,.dark .radio-list label{background:#ffffff0a}.dark .inline-checks label:hover,.dark .check-grid label:hover,.dark .radio-list label:hover{background:#60a5fa1a}.dark .row:has(input[type=checkbox]){background:#ffffff0a}.dark .pill{background:#34d39926;border-color:#34d3994d}.btn-theme{display:flex;align-items:center;justify-content:center;width:36px;height:36px;padding:0;border:1px solid var(--line);border-radius:12px;background:#0000000a;color:var(--text);cursor:pointer;transition:background .15s ease}.btn-theme:hover{background:#3b7bff1f}.dark .btn-theme{background:#ffffff0f}.dark .btn-theme:hover{background:#60a5fa26}.tooth-note-icon{display:inline-flex;align-items:center;margin-inline-start:3px;vertical-align:middle;color:var(--text)}.tooth-note-icon svg{width:13px;height:13px}.odon-note-backdrop{position:fixed;inset:0;z-index:120;background:#00000059;animation:odon-fade-in .12s ease}.odon-note-popover{position:relative;background:var(--panel, #fff);border:1px solid var(--line);border-radius:16px;box-shadow:0 16px 48px #0003;padding:14px;width:min(320px,90vw);display:flex;flex-direction:column;gap:10px;animation:odon-ctx-pop .12s ease}.odon-note-header{display:flex;align-items:center;justify-content:space-between}.odon-note-title{font-weight:700;font-size:14px;color:var(--text)}.odon-note-textarea{width:100%;min-height:60px;border:1px solid var(--line);border-radius:10px;padding:8px 10px;font-family:inherit;font-size:13px;color:var(--text);background:#00000005;resize:vertical}.odon-note-textarea:focus{outline:none;box-shadow:0 0 0 3px #3b7bff2e;border-color:#3b7bff80}.odon-note-textarea::-moz-placeholder{color:var(--muted)}.odon-note-textarea::placeholder{color:var(--muted)}.odon-note-actions{display:flex;gap:8px}.odon-note-actions .odon-zoom-btn{flex:1}.warning-item{padding:6px 10px;border-radius:8px;background:#eab3081f;color:#92400e;font-size:12px;font-weight:600;line-height:1.4;margin-bottom:4px}.dark .warning-item{background:#facc151a;color:#fde047}.odon-zoom-overlay{position:fixed;inset:0;z-index:100;background:#0006;display:flex;align-items:center;justify-content:center;animation:odon-fade-in .15s ease}@keyframes odon-fade-in{0%{opacity:0}to{opacity:1}}.odon-zoom-popover{background:var(--panel, #fff);border:1px solid var(--line);border-radius:20px;box-shadow:0 20px 60px #00000040;padding:16px;max-width:min(360px,90vw);width:100%;display:flex;flex-direction:column;align-items:center;gap:12px}.odon-zoom-header{width:100%;display:flex;align-items:center;justify-content:space-between}.odon-zoom-title{font-weight:800;font-size:16px;color:var(--text)}.odon-zoom-close{width:32px;height:32px;border:1px solid var(--line);border-radius:999px;background:#0000000a;color:var(--text);font-size:18px;font-weight:700;cursor:pointer;display:flex;align-items:center;justify-content:center;line-height:1}.odon-zoom-close:hover{background:#d945451f;color:#d94545}.odon-zoom-svg{width:200px;height:200px;display:flex;align-items:center;justify-content:center}.odon-zoom-svg svg{width:180px;height:180px;pointer-events:none}.odon-zoom-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;width:100%}.odon-zoom-btn{border:1px solid var(--line);background:#3b7bff14;color:var(--text);padding:10px 8px;border-radius:12px;font-weight:600;font-size:13px;cursor:pointer;text-align:center}.odon-zoom-btn:hover{background:#3b7bff2e}.odon-zoom-btn.active{background:#12b9812e;border-color:#12b98180}.odon-zoom-btn.danger{background:#d9454514;border-color:#d945454d;color:#b83a3a}.odon-zoom-btn.danger:hover{background:#d945452e}.odon-ctx-menu{position:fixed;z-index:110;background:var(--panel, #fff);border:1px solid var(--line);border-radius:16px;box-shadow:0 12px 40px #0003;padding:6px;min-width:180px;display:flex;flex-direction:column;gap:4px;animation:odon-ctx-pop .12s ease}@keyframes odon-ctx-pop{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}.odon-ctx-item{border:1px solid var(--line);background:#00000005;color:var(--text);padding:10px 14px;border-radius:12px;font-weight:600;font-size:13px;cursor:pointer;text-align:start}.odon-ctx-item:hover{background:#3b7bff1a}.odon-ctx-item.danger{color:#b83a3a}.odon-ctx-item.danger:hover{background:#d945451f}.odon-ctx-divider{height:1px;background:var(--line);margin:2px 0}.dark .odon-zoom-overlay{background:#0009}.dark .odon-zoom-popover{background:var(--panel);box-shadow:0 20px 60px #00000080}.dark .odon-zoom-close{background:#ffffff0f}.dark .odon-zoom-close:hover{background:#f8717126;color:#f87171}.dark .odon-zoom-btn{background:#60a5fa1a}.dark .odon-zoom-btn:hover{background:#60a5fa33}.dark .odon-zoom-btn.active{background:#34d3992e;border-color:#34d39966}.dark .odon-zoom-btn.danger{background:#f871711a;border-color:#f8717140;color:#f87171}.dark .odon-ctx-menu{background:var(--panel);box-shadow:0 12px 40px #00000080}.dark .odon-ctx-item{background:#ffffff0a}.dark .odon-ctx-item:hover{background:#60a5fa1f}.dark .odon-ctx-item.danger{color:#f87171}.tooth-grid.odon-pinch-active{touch-action:none;transform-origin:center center;transition:transform .05s ease}@media(pointer:coarse){.tooth-tile{min-height:56px}.tooth-tile .tooth-svg{height:80px}.tooth-tile.occl-view .tooth-svg{height:60px}.tooth-label-cell{min-height:44px;min-width:44px;display:flex;align-items:center;justify-content:center}.chart-actions .btn-icon{min-width:44px;min-height:44px}}.odon-arch-toggle{display:none;justify-content:center;gap:8px;padding:8px 10px;border-bottom:1px solid var(--line)}.odon-arch-toggle .odon-arch-btn{border:1px solid var(--line);background:#0000000a;color:var(--text);padding:8px 20px;border-radius:12px;font-weight:700;font-size:13px;cursor:pointer;flex:1;text-align:center}.odon-arch-toggle .odon-arch-btn.active{background:#3b7bff2e;border-color:#3b7bff73}.dark .odon-arch-toggle .odon-arch-btn{background:#ffffff0f}.dark .odon-arch-toggle .odon-arch-btn.active{background:#60a5fa33;border-color:#60a5fa73}@media(max-width:600px){.odon-arch-toggle{display:flex}.tooth-grid.odon-arch-upper .lower-row,.tooth-grid.odon-arch-upper .lower-row+.tooth-label-row{display:none!important}.tooth-grid.odon-arch-lower .upper-row,.tooth-grid.odon-arch-lower .tooth-label-row:first-child{display:none!important}}.odon-export-overlay{position:fixed;inset:0;z-index:130;display:flex;align-items:center;justify-content:center;background:#141c288c;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.odon-export-card{background:var(--panel);border-radius:18px;box-shadow:0 20px 60px #1e2a3a40;padding:28px 40px;text-align:center;min-width:240px}.odon-export-title{font-weight:600;font-size:14px;color:var(--muted);margin-bottom:8px}.odon-export-pct{font-weight:800;font-size:40px;line-height:1;color:var(--text)}.odon-export-phase{font-size:12px;color:var(--muted);margin-top:8px}.odon-tour-backdrop{position:fixed;inset:0;z-index:140;background:#141c2873}.odon-tour-highlight{position:fixed;z-index:141;border:3px solid var(--accent,#3b7bff);border-radius:12px;box-shadow:0 0 0 9999px #141c2873;pointer-events:none;transition:all .15s ease}.odon-tour-card{position:fixed;z-index:142;background:var(--panel);border-radius:16px;box-shadow:0 16px 48px #1e2a3a40;padding:18px 20px;width:300px}.odon-tour-card-center{top:50%;left:50%;transform:translate(-50%,-50%)}.odon-tour-counter{font-size:11px;color:var(--muted);margin-bottom:6px}.odon-tour-title{font-weight:700;font-size:16px;margin-bottom:6px;color:var(--text)}.odon-tour-text{font-size:13px;color:var(--muted);margin-bottom:14px}.odon-tour-actions{display:flex;gap:8px;justify-content:flex-end}.odon-tour-btn{border:1px solid var(--line);background:#0000000a;color:var(--text);padding:6px 12px;border-radius:10px;font-weight:600;cursor:pointer}.odon-tour-btn:disabled{opacity:.4;cursor:default}.odon-tour-skip{margin-right:auto;background:transparent}.odon-tour-next{background:#3b7bff2e;border-color:#3b7bff73}.caries-deep path,.caries-deep circle,.caries-deep ellipse{stroke:#b3261e;stroke-width:.5px}.settings-menu{min-width:200px}.settings-group-label{font-size:11px;color:var(--muted);font-weight:700;padding:4px 8px 2px}.settings-sep{height:1px;background:var(--line);margin:6px 4px}.surf-depth.icdas{flex-direction:row;gap:0;padding:0;min-width:15px;height:15px;align-items:center;justify-content:center;border-radius:50%;font-size:10px;font-weight:800;color:#fff;background:#b3261e}.surf-depth.icdas[data-depth=surface]{background:#e6a23c}.surf-depth.icdas[data-depth=dentin]{background:#d9663d}.surf-depth.icdas[data-depth=deep]{background:#b3261e}.surf-depth.icdas i{display:none}.chart-column{grid-column:1;display:flex;flex-direction:column;gap:14px;min-width:0}.dental-chart-column{grid-column:1;display:flex;flex-direction:column;min-width:0}.perio-inline-panel{min-height:480px}.tooth-info{margin-top:0}.tooth-info-overview{margin:0 0 10px;font-weight:600}.tooth-info-list{margin:0 0 6px;font-size:13px;color:var(--muted)}.tooth-info-line{margin:6px 0 0;font-size:13px;line-height:1.5}.tooth-info-heading{font-weight:700}.tooth-info-empty{color:var(--muted);font-style:italic}.planned-changes{margin-top:10px;padding:8px 10px;border-radius:12px;background:#3b7bff14;border:1px solid rgba(59,123,255,.35)}.planned-changes .tooth-info-heading{margin-bottom:4px}.planned-changes-item{margin:4px 0 0;font-size:13px;line-height:1.5}.dark .planned-changes{background:#60a5fa1f;border-color:#60a5fa66}.odon-settings-backdrop{position:fixed;inset:0;z-index:150;display:flex;align-items:center;justify-content:center;padding:16px;background:#141c288c;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);animation:odon-fade-in .12s ease}.odon-settings-modal{position:relative;display:flex;flex-direction:column;width:min(640px,96vw);max-height:min(84vh,720px);background:var(--panel, #fff);border:1px solid var(--line);border-radius:18px;box-shadow:0 24px 64px #141c284d;overflow:hidden;animation:odon-ctx-pop .12s ease}.odon-settings-header{display:flex;align-items:center;justify-content:space-between;padding:16px 18px;border-bottom:1px solid var(--line)}.odon-settings-title{margin:0;font-size:16px;font-weight:700;color:var(--text)}.odon-settings-close{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border:1px solid var(--line);border-radius:10px;background:#0000000a;color:var(--text);cursor:pointer}.odon-settings-close:hover{background:#00000014}.odon-settings-close:focus-visible{outline:none;box-shadow:0 0 0 3px #3b7bff59}.odon-settings-body{display:flex;min-height:0;flex:1}.odon-settings-tabs{display:flex;flex-direction:column;gap:2px;width:168px;flex-shrink:0;padding:12px 10px;border-right:1px solid var(--line);overflow-y:auto}.odon-settings-tab{text-align:start;padding:8px 12px;border:1px solid transparent;border-radius:10px;background:transparent;color:var(--muted);font-size:13px;font-weight:600;cursor:pointer}.odon-settings-tab:hover{background:#0000000a;color:var(--text)}.odon-settings-tab.is-active{background:#3b7bff24;border-color:#3b7bff59;color:var(--text)}.odon-settings-tab:focus-visible{outline:none;box-shadow:0 0 0 3px #3b7bff4d}.odon-settings-panel{flex:1;min-width:0;padding:16px 18px;overflow-y:auto;display:flex;flex-direction:column;gap:14px}.odon-settings-group-title{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);margin:4px 0 -2px}.odon-settings-group-title:first-child{margin-top:0}.odon-settings-row{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.odon-settings-row-disabled{opacity:.6}.odon-settings-row-text{min-width:0;flex:1}.odon-settings-row-label{font-size:13px;font-weight:700;color:var(--text)}.odon-settings-row-desc{margin-top:3px;font-size:12px;line-height:1.45;color:var(--muted)}.odon-settings-row-control{flex-shrink:0}.odon-settings-badge{display:inline-block;margin-inline-start:6px;padding:1px 7px;border-radius:999px;background:#3b7bff24;color:var(--accent, #3b7bff);font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.03em;vertical-align:middle}.odon-settings-select{min-width:150px;padding:6px 10px;border:1px solid var(--line);border-radius:10px;background:var(--panel, #fff);color:var(--text);font-size:13px;font-family:inherit}.odon-settings-select:focus-visible{outline:none;box-shadow:0 0 0 3px #3b7bff4d;border-color:#3b7bff80}.odon-settings-switch{position:relative;display:inline-flex;align-items:center;width:42px;height:24px;cursor:pointer}.odon-settings-switch input{position:absolute;opacity:0;width:100%;height:100%;margin:0;cursor:pointer}.odon-settings-switch-track{position:absolute;inset:0;border-radius:999px;background:#78829159;transition:background .15s ease}.odon-settings-switch-track:after{content:"";position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #0000004d;transition:transform .15s ease}.odon-settings-switch input:checked+.odon-settings-switch-track{background:var(--accent, #3b7bff)}.odon-settings-switch input:checked+.odon-settings-switch-track:after{transform:translate(18px)}.odon-settings-switch input:focus-visible+.odon-settings-switch-track{box-shadow:0 0 0 3px #3b7bff4d}.dark .odon-settings-close{background:#ffffff0f}.dark .odon-settings-close:hover{background:#ffffff1f}.dark .odon-settings-tab:hover{background:#ffffff0f}.dark .odon-settings-select{background:#1e293b}@media(max-width:520px){.odon-settings-body{flex-direction:column}.odon-settings-tabs{flex-direction:row;width:auto;border-right:none;border-bottom:1px solid var(--line);overflow-x:auto}}.odon-confirm-backdrop{position:fixed;inset:0;z-index:200;display:flex;align-items:center;justify-content:center;padding:16px;background:#141c288c;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);animation:odon-fade-in .12s ease}.odon-confirm-modal{position:relative;display:flex;flex-direction:column;gap:18px;width:min(420px,96vw);padding:22px 22px 18px;background:var(--panel, #fff);border:1px solid var(--line);border-radius:16px;box-shadow:0 24px 64px #141c284d;animation:odon-ctx-pop .12s ease}.odon-confirm-message{margin:0;font-size:14px;line-height:1.5;color:var(--text)}.odon-confirm-actions{display:flex;justify-content:flex-end;gap:10px}.odon-confirm-btn{padding:8px 16px;border:1px solid var(--line);border-radius:10px;font-size:14px;font-weight:600;cursor:pointer}.odon-confirm-btn:focus-visible{outline:none;box-shadow:0 0 0 3px #3b7bff59}.odon-confirm-cancel{background:#0000000a;color:var(--text)}.odon-confirm-cancel:hover{background:#00000014}.odon-confirm-accept{background:var(--brand, #3b7bff);color:#fff;border-color:transparent}.odon-confirm-accept:hover{filter:brightness(1.05)}.dark .odon-confirm-cancel{background:#ffffff0f}.dark .odon-confirm-cancel:hover{background:#ffffff1f}.perio-overlay{position:fixed;inset:0;z-index:160;display:flex;align-items:center;justify-content:center;padding:16px;background:#141c288c;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);animation:odon-fade-in .12s ease}.perio-overlay-panel{display:flex;flex-direction:column;width:min(960px,96vw);max-height:min(90vh,800px);background:var(--panel, #fff);border:1px solid var(--line);border-radius:18px;box-shadow:0 24px 64px #141c284d;overflow:hidden;animation:odon-ctx-pop .12s ease}.perio-overlay-header{display:flex;align-items:center;justify-content:space-between;padding:16px 18px;border-bottom:1px solid var(--line)}.perio-overlay-title{margin:0;font-size:16px;font-weight:700;color:var(--text)}.perio-overlay-close{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border:1px solid var(--line);border-radius:10px;background:#0000000a;color:var(--text);cursor:pointer}.perio-overlay-close:hover{background:#00000014}.perio-overlay-close:focus-visible{outline:none;box-shadow:0 0 0 3px #3b7bff59}.perio-overlay-body{flex:1;min-height:240px;padding:16px 18px;overflow-y:auto;display:flex;flex-direction:column;gap:10px}.dark .perio-overlay-close{background:#ffffff0f}.dark .perio-overlay-close:hover{background:#ffffff1f}.perio-fullgrid-summary{flex:0 0 auto;display:flex;flex-wrap:wrap;gap:14px;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:#00000005;position:sticky;top:0;z-index:3}.dark .perio-fullgrid-summary{background:#ffffff0a}.perio-fullgrid-summary-item{display:flex;align-items:baseline;gap:6px;font-size:12px}.perio-fullgrid-summary-label{color:var(--muted)}.perio-fullgrid-summary-value{font-weight:700;color:var(--text);font-variant-numeric:tabular-nums}.perio-summary-card,.case-meta-panel{background:#ffffffe6;border:1px solid var(--line);border-radius:16px}.dark .perio-summary-card,.dark .case-meta-panel{background:#1e293bcc;border-color:var(--line)}.perio-summary-card{padding:12px}.perio-summary-card-title{font-weight:800;margin-bottom:10px;color:var(--text)}.perio-summary-card .perio-fullgrid-summary{position:static;border:none;background:transparent;padding:0;display:grid;grid-template-columns:repeat(2,1fr);gap:8px 16px}.case-meta-panel{overflow:hidden}.case-meta-panel-title{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:12px;font-weight:800;color:var(--text);cursor:pointer;list-style:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.case-meta-panel-title::-webkit-details-marker{display:none}.case-meta-panel-title:after{content:"";width:8px;height:8px;flex-shrink:0;border-right:2px solid var(--muted);border-bottom:2px solid var(--muted);transform:rotate(-45deg);transition:transform .15s ease}.case-meta-panel[open] .case-meta-panel-title:after{transform:rotate(45deg)}.case-meta-panel-title:hover{background:#00000008}.dark .case-meta-panel-title:hover{background:#ffffff0a}.case-meta-panel-title:focus-visible{outline:none;box-shadow:inset 0 0 0 3px #3b7bff4d}.case-meta-panel-body{padding:2px 12px 14px;border-top:1px solid var(--line);display:flex;flex-direction:column}.case-meta-row{display:grid;grid-template-columns:max-content 1fr;align-items:center;-moz-column-gap:12px;column-gap:12px;padding-top:10px}.case-meta-row:first-child{padding-top:12px}.case-meta-row-label{font-size:13px;font-weight:600;color:var(--text)}.case-meta-row-disabled{opacity:.55}.case-meta-row-disabled .case-meta-row-label{color:var(--muted)}.case-meta-input,.case-meta-select{justify-self:start;padding:6px 10px;border:1px solid var(--line);border-radius:10px;background:var(--panel, #fff);color:var(--text);font-size:13px;font-family:inherit}.case-meta-input:focus-visible,.case-meta-select:focus-visible{outline:none;box-shadow:0 0 0 3px #3b7bff4d;border-color:#3b7bff80}.case-meta-input-narrow{width:72px}.dark .case-meta-input,.dark .case-meta-select{background:#1e293b}.case-meta-panel-subheading{margin-top:10px;padding-top:12px;border-top:1px solid var(--line);font-weight:800;font-size:13px;color:var(--text)}.perio-class-row{display:grid;grid-template-columns:max-content 1fr;align-items:center;-moz-column-gap:12px;column-gap:12px;row-gap:6px;padding-top:10px}.perio-class-row-label{font-size:13px;font-weight:600;color:var(--text)}.perio-class-derived{font-size:12px;color:var(--muted);font-style:italic;justify-self:start}.perio-class-row .case-meta-select{grid-column:1 / -1;width:100%;min-width:0}@media(max-width:600px){.perio-summary-card .perio-fullgrid-summary{grid-template-columns:1fr}.case-meta-row,.perio-class-row{grid-template-columns:1fr;row-gap:6px}.case-meta-input,.case-meta-select{justify-self:stretch;width:100%}.case-meta-input-narrow{width:100%}}.perio-tooth-arch{display:block;width:100%;height:auto}.perio-curve-cej{stroke:#e11d48;stroke-width:.8;opacity:.85}.perio-curve-band{fill:#3b82f6;fill-opacity:.18;stroke:none}.perio-curve-margin{fill:none;stroke:#f472b6;stroke-width:.9;stroke-linejoin:round;stroke-linecap:round}.perio-curve-pocket{fill:none;stroke:#1d4ed8;stroke-width:1.1;stroke-linejoin:round;stroke-linecap:round}.dark .perio-curve-band{fill-opacity:.24}.dark .perio-curve-pocket{stroke:#60a5fa}.dark .perio-curve-margin{stroke:#f9a8d4}.perio-mm-line{stroke:#94a3b8;fill:none;vector-effect:non-scaling-stroke}.perio-mm-line-minor{stroke-width:.35;opacity:.28}.perio-mm-line-major{stroke-width:.6;opacity:.5}.perio-mm-label{fill:#64748b;font-size:5px;font-weight:600;opacity:.7;dominant-baseline:middle;pointer-events:none}.dark .perio-mm-line{stroke:#64748b}.dark .perio-mm-line-minor{opacity:.35}.dark .perio-mm-line-major{opacity:.55}.dark .perio-mm-label{fill:#94a3b8;opacity:.8}.perio-chart-header{flex-wrap:wrap;row-gap:10px;-moz-column-gap:12px;column-gap:12px}.perio-chart-header .chart-title{font-weight:800}.perio-overlay-switch{display:inline-flex;align-items:center;gap:6px;flex-wrap:wrap}.perio-overlay-switch-btn{border:1px solid var(--line);background:var(--card, #fff);color:var(--text);border-radius:999px;padding:3px 10px;font-size:12px;font-weight:600;cursor:pointer;line-height:1.4}.perio-overlay-switch-btn:hover{border-color:var(--accent, #3b82f6)}.perio-overlay-switch-btn.is-active{background:var(--accent, #3b82f6);border-color:var(--accent, #3b82f6);color:#fff}.perio-overlay-switch-btn:focus-visible{outline:2px solid var(--accent, #3b82f6);outline-offset:1px}.perio-overlay-readout{margin-inline-start:6px;font-size:12px;font-weight:700;color:var(--text);font-variant-numeric:tabular-nums}.dark .perio-overlay-switch-btn{background:#ffffff0a}.dark .perio-overlay-switch-btn.is-active{color:#0b1220}.perio-overlay-mark{vector-effect:non-scaling-stroke}.perio-overlay-bop{fill:#e11d48;opacity:.9;stroke:#fff;stroke-width:.4}.perio-overlay-plaque{fill:#f59e0b;opacity:.85;stroke:#fff;stroke-width:.4}.perio-overlay-pd5{fill:#fb923c;fill-opacity:.55;stroke:none}.perio-overlay-pd6{fill:#dc2626;fill-opacity:.55;stroke:none}.dark .perio-overlay-bop{fill:#fb7185;stroke:#0b1220}.dark .perio-overlay-plaque{fill:#fbbf24;stroke:#0b1220}.dark .perio-overlay-pd5{fill:#fdba74;fill-opacity:.5}.dark .perio-overlay-pd6{fill:#f87171;fill-opacity:.5}.perio-overlay-pd .perio-overlay-heat-shallow,.perio-overlay-cal .perio-overlay-heat-shallow{fill:#facc15;fill-opacity:.55;stroke:none}.perio-overlay-pd .perio-overlay-heat-moderate,.perio-overlay-cal .perio-overlay-heat-moderate{fill:#fb923c;fill-opacity:.6;stroke:none}.perio-overlay-pd .perio-overlay-heat-deep,.perio-overlay-cal .perio-overlay-heat-deep{fill:#dc2626;fill-opacity:.65;stroke:none}.perio-overlay-gr .perio-overlay-heat-shallow{fill:#7dd3fc;fill-opacity:.6;stroke:none}.perio-overlay-gr .perio-overlay-heat-moderate{fill:#38bdf8;fill-opacity:.65;stroke:none}.perio-overlay-gr .perio-overlay-heat-deep{fill:#0369a1;fill-opacity:.7;stroke:none}.dark .perio-overlay-pd .perio-overlay-heat-shallow,.dark .perio-overlay-cal .perio-overlay-heat-shallow{fill:#fde047;fill-opacity:.5}.dark .perio-overlay-pd .perio-overlay-heat-moderate,.dark .perio-overlay-cal .perio-overlay-heat-moderate{fill:#fdba74;fill-opacity:.55}.dark .perio-overlay-pd .perio-overlay-heat-deep,.dark .perio-overlay-cal .perio-overlay-heat-deep{fill:#f87171;fill-opacity:.6}.dark .perio-overlay-gr .perio-overlay-heat-shallow{fill:#93c5fd;fill-opacity:.55}.dark .perio-overlay-gr .perio-overlay-heat-moderate{fill:#60a5fa;fill-opacity:.6}.dark .perio-overlay-gr .perio-overlay-heat-deep{fill:#38bdf8;fill-opacity:.75}.perio-fullgrid-scroll{flex:1 1 auto;overflow:auto;border:1px solid var(--line);border-radius:10px}.perio-fullgrid-arch{display:grid;align-items:stretch}.perio-fullgrid-arch+.perio-fullgrid-arch{border-top:2px solid var(--line)}.perio-fullgrid-row-label{position:sticky;left:0;z-index:2;display:flex;align-items:center;gap:6px;padding:6px 10px;font-size:11px;font-weight:600;color:var(--muted);background:var(--panel);border-bottom:1px solid var(--line);border-right:1px solid var(--line)}.perio-fullgrid-row-label-text{min-width:0;white-space:normal;overflow-wrap:break-word;line-height:1.25}.perio-info-btn{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;border-radius:50%;border:1px solid var(--muted, #7b8794);background:transparent;color:var(--muted, #7b8794);font-size:9px;font-weight:700;font-style:italic;line-height:1;padding:0;cursor:pointer}.perio-info-btn:hover{border-color:var(--accent, #3b7bff);color:var(--accent, #3b7bff)}.perio-info-btn:focus-visible{outline:none;border-color:var(--accent, #3b7bff);color:var(--accent, #3b7bff);box-shadow:0 0 0 2px #3b7bff59}.perio-info-popover{position:fixed;z-index:165;max-width:280px;background:var(--panel);border:1px solid var(--line);border-radius:10px;box-shadow:0 12px 24px #1e2a3a2e;padding:10px 12px}.perio-info-popover-text{margin:0;font-size:12px;line-height:1.5;color:var(--text)}.perio-fullgrid-header-cell{position:sticky;top:0;z-index:1;display:flex;align-items:center;justify-content:center;padding:6px 4px;font-size:12px;font-weight:700;color:var(--text);background:var(--panel);border-bottom:1px solid var(--line)}.perio-fullgrid-arch .perio-fullgrid-row-label:first-child,.perio-fullgrid-header-cell+.perio-fullgrid-header-cell:first-of-type{z-index:4}.perio-fullgrid-graphic-cell{display:block;overflow:hidden;line-height:0;border-bottom:1px solid var(--line);border-left:1px solid var(--line)}.perio-fullgrid-graphic-cell .perio-tooth-arch{display:block}.perio-fullgrid-band-label{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:4px 10px;font-size:13px;font-weight:700;letter-spacing:.01em;color:var(--text);background:var(--panel);border-bottom:1px solid var(--line);border-left:1px solid var(--line)}.perio-fullgrid-band-label-buccal,.perio-fullgrid-band-label-lingual{white-space:nowrap}.perio-fullgrid-band-label-lingual{margin-inline-start:auto}.perio-fullgrid-cell{display:flex;align-items:center;justify-content:center;padding:3px 1px;border-bottom:1px solid var(--line);border-left:1px solid var(--line)}.perio-fullgrid-sitegroup{display:flex;gap:1px;width:100%}.perio-fullgrid-input{flex:1 1 0;width:100%;min-width:0;box-sizing:border-box;font-size:10px;text-align:center;padding:3px 0;border:1px solid var(--line);border-radius:4px;background:var(--card);color:var(--text);-moz-appearance:textfield}.perio-fullgrid-input::-webkit-outer-spin-button,.perio-fullgrid-input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.perio-fullgrid-input:disabled,.perio-fullgrid-mobility-select:disabled{opacity:.45;cursor:not-allowed}.perio-fullgrid-cal{flex:1 1 0;width:100%;min-width:0;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;font-size:10px;font-weight:700;font-variant-numeric:tabular-nums;color:var(--muted)}.perio-fullgrid-kg{width:30px;flex:0 0 auto}.perio-fullgrid-bop{width:14px;height:14px;margin:auto}.perio-fullgrid-cell-mobility{padding:3px 6px}.perio-fullgrid-mobility-select{width:100%;font-size:11px;padding:3px 4px;border:1px solid var(--line);border-radius:4px;background:var(--card);color:var(--text)}.perio-fullgrid-furc{width:20px;height:20px;padding:0;font-size:10px;font-weight:700;line-height:1;text-align:center;cursor:pointer;border:1px solid var(--line);border-radius:4px;background:var(--card);color:var(--muted);font-variant-numeric:tabular-nums}.perio-fullgrid-furc[data-grade]:not([data-grade="0"]){border-color:var(--accent, #c0392b);background:var(--accent, #c0392b);color:#fff}.perio-fullgrid-furc:disabled{opacity:.45;cursor:not-allowed}.perio-fullgrid-plaque-quad{display:grid;grid-template-areas:"buc buc" "mes dis" "lin lin";grid-template-columns:repeat(2,16px);grid-template-rows:repeat(3,16px);gap:2px}.perio-fullgrid-plaque-quad>button{width:16px;height:16px}.perio-fullgrid-plaque-buccal,.perio-fullgrid-plaque-lingual,.perio-fullgrid-pi-buccal,.perio-fullgrid-pi-lingual,.perio-fullgrid-gi-buccal,.perio-fullgrid-gi-lingual,.perio-fullgrid-mpi-buccal,.perio-fullgrid-mpi-lingual,.perio-fullgrid-mbi-buccal,.perio-fullgrid-mbi-lingual{justify-self:center}.perio-fullgrid-plaque{width:16px;height:16px;padding:0;cursor:pointer;font-size:0;border:1px solid var(--line);border-radius:3px;background:var(--card)}.perio-fullgrid-plaque[data-present="1"]{background:var(--accent, #2d6cdf);border-color:var(--accent, #2d6cdf)}.perio-fullgrid-plaque:disabled{opacity:.45;cursor:not-allowed}.dark .perio-fullgrid-furc,.dark .perio-fullgrid-plaque{background:#ffffff0a}.dark .perio-fullgrid-furc[data-grade]:not([data-grade="0"]){background:var(--accent, #e05252);border-color:var(--accent, #e05252)}.dark .perio-fullgrid-plaque[data-present="1"]{background:var(--accent, #4d8bff);border-color:var(--accent, #4d8bff)}.perio-fullgrid-cej,.perio-fullgrid-rootconcavity,.perio-fullgrid-gt,.perio-fullgrid-miller{width:30px;height:24px;padding:0;font-size:9px;font-weight:700;line-height:1;text-align:center;cursor:pointer;border:1px solid var(--line);border-radius:4px;background:var(--card);color:var(--muted);font-variant-numeric:tabular-nums}.perio-fullgrid-cej[data-value]:not([data-value=none]),.perio-fullgrid-rootconcavity[data-value]:not([data-value=none]),.perio-fullgrid-gt[data-value]:not([data-value=unknown]),.perio-fullgrid-miller[data-value]:not([data-value=none]){border-color:var(--accent, #c0392b);background:var(--accent, #c0392b);color:#fff}.perio-fullgrid-cej:disabled,.perio-fullgrid-rootconcavity:disabled,.perio-fullgrid-gt:disabled,.perio-fullgrid-miller:disabled{opacity:.45;cursor:not-allowed}.dark .perio-fullgrid-cej,.dark .perio-fullgrid-rootconcavity,.dark .perio-fullgrid-gt,.dark .perio-fullgrid-miller{background:#ffffff0a}.dark .perio-fullgrid-cej[data-value]:not([data-value=none]),.dark .perio-fullgrid-rootconcavity[data-value]:not([data-value=none]),.dark .perio-fullgrid-gt[data-value]:not([data-value=unknown]),.dark .perio-fullgrid-miller[data-value]:not([data-value=none]){background:var(--accent, #e05252);border-color:var(--accent, #e05252)}@media(max-width:1100px){.perio-fullgrid-bop{width:12px;height:12px}.perio-fullgrid-plaque-quad{grid-template-columns:repeat(2,13px);grid-template-rows:repeat(3,13px);gap:1px}.perio-fullgrid-plaque-quad>button{width:13px;height:13px}.perio-fullgrid-plaque{width:13px;height:13px}.perio-fullgrid-furc{width:17px;height:17px}.perio-fullgrid-cej,.perio-fullgrid-rootconcavity,.perio-fullgrid-gt,.perio-fullgrid-miller{width:25px;height:21px}.perio-fullgrid-kg{width:24px}}@media(max-width:600px){.perio-fullgrid-bop{width:11px;height:11px}.perio-fullgrid-plaque-quad{grid-template-columns:repeat(2,10px);grid-template-rows:repeat(3,10px);gap:1px}.perio-fullgrid-plaque-quad>button{width:10px;height:10px}.perio-fullgrid-plaque{width:10px;height:10px}.perio-fullgrid-furc{width:15px;height:15px;font-size:9px}.perio-fullgrid-cej,.perio-fullgrid-rootconcavity,.perio-fullgrid-gt,.perio-fullgrid-miller{width:20px;height:17px;font-size:8px}.perio-fullgrid-kg{width:20px}.perio-fullgrid-mobility-select{font-size:10px;padding:2px 3px}}@media(max-width:520px){.perio-fullgrid-plaque-quad{grid-template-columns:repeat(2,8px);grid-template-rows:repeat(3,8px)}.perio-fullgrid-plaque-quad>button{width:8px;height:8px}.perio-fullgrid-plaque{width:8px;height:8px}.perio-fullgrid-cej,.perio-fullgrid-rootconcavity,.perio-fullgrid-gt,.perio-fullgrid-miller{width:17px;height:15px}.perio-fullgrid-kg{width:16px}}
|
package/dist/theme.d.ts
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Theme configuration for the Odontogram component.
|
|
3
|
+
*
|
|
4
|
+
* Allows host applications to override the default color palette without
|
|
5
|
+
* modifying CSS files. All properties are optional — only the provided
|
|
6
|
+
* values are overridden; the rest fall back to the built-in defaults.
|
|
7
|
+
*
|
|
8
|
+
* Colors are applied as CSS custom properties (`--odon-*`) on the
|
|
9
|
+
* component root element, so they work regardless of whether the host
|
|
10
|
+
* uses Tailwind CSS or plain CSS.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```tsx
|
|
14
|
+
* const myTheme: OdontogramThemeConfig = {
|
|
15
|
+
* colors: {
|
|
16
|
+
* accent: '#e74c3c',
|
|
17
|
+
* background: '#fafafa',
|
|
18
|
+
* },
|
|
19
|
+
* };
|
|
20
|
+
* <App themeConfig={myTheme} />
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export type OdontogramThemeConfig = {
|
|
24
|
+
colors?: {
|
|
25
|
+
/** Primary background. Default: `#f3f6fb` (light) / `#0f172a` (dark). */
|
|
26
|
+
background?: string;
|
|
27
|
+
/** Panel & card background. Default: `#ffffff` (light) / `#1e293b` (dark). */
|
|
28
|
+
panel?: string;
|
|
29
|
+
/** Card background. Default: same as panel. */
|
|
30
|
+
card?: string;
|
|
31
|
+
/** Primary text color. Default: `#1e2a3a` (light) / `#f1f5f9` (dark). */
|
|
32
|
+
text?: string;
|
|
33
|
+
/** Muted / secondary text color. Default: `#5b6b7d` (light) / `#94a3b8` (dark). */
|
|
34
|
+
muted?: string;
|
|
35
|
+
/** Border / divider color. Default: `#d7e0ec` (light) / `#334155` (dark). */
|
|
36
|
+
line?: string;
|
|
37
|
+
/** Primary accent (buttons, active states). Default: `#3b7bff`. */
|
|
38
|
+
accent?: string;
|
|
39
|
+
/** Secondary accent (success, selected states). Default: `#12b981`. */
|
|
40
|
+
accent2?: string;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Apply an {@link OdontogramThemeConfig} to a DOM element by setting
|
|
45
|
+
* CSS custom properties. Pass `null` or `undefined` to clear all
|
|
46
|
+
* theme overrides.
|
|
47
|
+
*
|
|
48
|
+
* @param element - The root element to apply theme variables to.
|
|
49
|
+
* @param config - The theme configuration, or `null`/`undefined` to reset.
|
|
50
|
+
*/
|
|
51
|
+
export declare function applyThemeConfig(element: HTMLElement | null, config: OdontogramThemeConfig | null | undefined): void;
|
package/dist/tour.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface TourStep {
|
|
2
|
+
selector: string;
|
|
3
|
+
titleKey: string;
|
|
4
|
+
textKey: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const TOUR_STEPS: TourStep[];
|
|
7
|
+
export declare function clampStep(i: number): number;
|
|
8
|
+
/** Start the 12-step interactive intro tour. */
|
|
9
|
+
export declare function startIntroTour(): void;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Supported tooth numbering systems.
|
|
3
|
+
* - **FDI** – ISO 3950 two-digit notation (default in most countries).
|
|
4
|
+
* - **UNIVERSAL** – ADA numbering (1-32 adult, A-T primary).
|
|
5
|
+
* - **PALMER** – Quadrant-based notation (UR/UL/LL/LR + position).
|
|
6
|
+
*/
|
|
7
|
+
export type NumberingSystem = "FDI" | "UNIVERSAL" | "PALMER";
|
|
8
|
+
/**
|
|
9
|
+
* Convert an FDI tooth number to the label for the requested numbering system.
|
|
10
|
+
*
|
|
11
|
+
* @param fdiTooth - Tooth number in FDI notation (e.g. `14`, `55`). Accepts a string that can be parsed as a number.
|
|
12
|
+
* @param system - The target numbering system (`"FDI"`, `"UNIVERSAL"`, or `"PALMER"`).
|
|
13
|
+
* @returns The formatted label (e.g. `"5"` for Universal, `"UR-4"` for Palmer). Returns the input as-is when it cannot be mapped.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* toLabel(14, "FDI"); // "14"
|
|
18
|
+
* toLabel(14, "UNIVERSAL"); // "5"
|
|
19
|
+
* toLabel(14, "PALMER"); // "UR-4"
|
|
20
|
+
* toLabel(55, "UNIVERSAL"); // "A"
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export declare function toLabel(fdiTooth: number | string, system: NumberingSystem): string;
|