react-advanced-odontogram 2.3.0 → 2.4.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 +1 -1
- package/dist/index.d.ts +87 -79
- package/dist/loader-BN_gLe6T.js.map +1 -1
- package/dist/notoArabic-En58EmGw.js.map +1 -1
- package/dist/notoSC-G1i3iX-D.js.map +1 -1
- package/dist/odontogram.js +6844 -4910
- package/dist/odontogram.js.map +1 -1
- package/dist/roboto-Bywi16HJ.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# 🦷 React Advanced Odontogram
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/react-advanced-odontogram)
|
|
4
|
-
[](https://github.com/ZoliQua/React-Odontogram-Modul/releases)
|
|
5
5
|
[](https://github.com/ZoliQua/React-Odontogram-Modul/blob/main/LICENSE)
|
|
6
6
|
[](https://doi.org/10.5281/zenodo.21156787)
|
|
7
7
|
|
package/dist/index.d.ts
CHANGED
|
@@ -7,29 +7,6 @@ export declare function acceptDualStateConfirm(): void;
|
|
|
7
7
|
|
|
8
8
|
declare type Any = any;
|
|
9
9
|
|
|
10
|
-
/**
|
|
11
|
-
* Root React component for the Odontogram Editor.
|
|
12
|
-
*
|
|
13
|
-
* Renders the full dental chart UI: top bar with language/numbering/dark-mode
|
|
14
|
-
* controls, the SVG tooth grid, and the right-hand control panel for setting
|
|
15
|
-
* tooth states (caries, fillings, crowns, endo, inflammation, etc.).
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* ```tsx
|
|
19
|
-
* // Standalone usage
|
|
20
|
-
* <App />
|
|
21
|
-
*
|
|
22
|
-
* // Controlled by a host application
|
|
23
|
-
* <App
|
|
24
|
-
* language="en"
|
|
25
|
-
* onLanguageChange={setLang}
|
|
26
|
-
* numberingSystem="FDI"
|
|
27
|
-
* onNumberingChange={setNumbering}
|
|
28
|
-
* darkMode={isDark}
|
|
29
|
-
* onDarkModeChange={setDark}
|
|
30
|
-
* />
|
|
31
|
-
* ```
|
|
32
|
-
*/
|
|
33
10
|
declare function App({ language, onLanguageChange, numberingSystem, onNumberingChange, darkMode, onDarkModeChange, themeConfig, plugins, readOnly: readOnlyProp, enableNotes, enableIcdas, pulpDetailLevel, secondaryCariesMode, rootCariesMode, radiographicDepthMode, cariesDepthEnabled, wearDetailLevel, discolorationDetailLevel, surfaceNotation, showStatusCard: showStatusCardProp, showOrthoCard: showOrthoCardProp, }: AppProps): JSX_2.Element;
|
|
34
11
|
export { App as OdontogramShell }
|
|
35
12
|
export default App;
|
|
@@ -152,6 +129,9 @@ export declare function cancelDualStateConfirm(): void;
|
|
|
152
129
|
|
|
153
130
|
declare type ChartMode = "status" | "plan";
|
|
154
131
|
|
|
132
|
+
/** Remove the stored entry for the active (or default) key. */
|
|
133
|
+
export declare function clearPersistedState(): void;
|
|
134
|
+
|
|
155
135
|
/**
|
|
156
136
|
* Clear the current tooth selection and reset the active tooth. Useful when
|
|
157
137
|
* switching to view or quote-builder mode from the host application.
|
|
@@ -168,6 +148,17 @@ export declare function closePerioOverlay(): void;
|
|
|
168
148
|
*/
|
|
169
149
|
export declare function destroyOdontogram(): void;
|
|
170
150
|
|
|
151
|
+
/** Stop persisting. The stored entry is left in place (see clearPersistedState).
|
|
152
|
+
* A pending debounced save is flushed first so the last edit isn't lost. */
|
|
153
|
+
export declare function disablePersistence(): void;
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Turn on localStorage persistence: restores a previously saved case (if any),
|
|
157
|
+
* then saves on every state change. Idempotent — calling again replaces the
|
|
158
|
+
* previous subscription and options. Call AFTER the odontogram has mounted.
|
|
159
|
+
*/
|
|
160
|
+
export declare function enablePersistence(options?: PersistenceOptions): void;
|
|
161
|
+
|
|
171
162
|
/**
|
|
172
163
|
* Export the current odontogram as an HL7 FHIR R4 collection Bundle (JSON).
|
|
173
164
|
* @param options - Optional subject reference (e.g. "Patient/123"); when
|
|
@@ -183,8 +174,8 @@ export declare function exportFhir(options?: FhirExportOptions): void;
|
|
|
183
174
|
export declare function exportImage(format?: "png" | "jpg"): Promise<void>;
|
|
184
175
|
|
|
185
176
|
/**
|
|
186
|
-
*
|
|
187
|
-
*
|
|
177
|
+
* Assemble a printable PDF report (jsPDF-native — vector text + raster chart
|
|
178
|
+
* PNGs, no svg2pdf.js). Gathers all `data` (SVG→PNG
|
|
188
179
|
* rasterization via {@link rasterizeSvgToPng}, summary/classification text,
|
|
189
180
|
* `hasAnyPerioData()`), drives the export-progress overlay, then hands off
|
|
190
181
|
* to the PURE `assemblePdf()` (`src/perioPdf.ts`), which decides section
|
|
@@ -194,21 +185,20 @@ export declare function exportImage(format?: "png" | "jpg"): Promise<void>;
|
|
|
194
185
|
* browser canvas/font internals jsdom doesn't fully provide, so this
|
|
195
186
|
* wrapper is NOT unit-tested directly — `assemblePdf`'s section-gating IS
|
|
196
187
|
* thoroughly unit-tested with an injectable fake doc (see
|
|
197
|
-
* `ui3b-export-pdf.test.ts`). This wrapper's own raster→layout→save path is
|
|
198
|
-
*
|
|
188
|
+
* `ui3b-export-pdf.test.ts`). This wrapper's own raster→layout→save path is a
|
|
189
|
+
* browser-verify item.
|
|
199
190
|
*/
|
|
200
191
|
export declare function exportPdf(opts: PdfExportOptions): Promise<void>;
|
|
201
192
|
|
|
202
|
-
/**
|
|
193
|
+
/** Export the full perio chart as PNG/JPG (SVG → canvas @2×, via the
|
|
203
194
|
* shared {@link rasterizeSvgToCanvas} raster core). */
|
|
204
195
|
export declare function exportPerioImage(format?: "png" | "jpg"): Promise<void>;
|
|
205
196
|
|
|
206
|
-
/**
|
|
197
|
+
/** Export the full perio chart as a standalone vector SVG file. */
|
|
207
198
|
export declare function exportPerioSvg(): Promise<void>;
|
|
208
199
|
|
|
209
200
|
export declare function exportStatus(): void;
|
|
210
201
|
|
|
211
|
-
/** Export the odontogram as a downloadable, scalable SVG file. */
|
|
212
202
|
export declare function exportSvg(): Promise<void>;
|
|
213
203
|
|
|
214
204
|
/** Options for buildFhirBundle / exportFhir. */
|
|
@@ -236,6 +226,14 @@ export declare function getChartMode(): ChartMode;
|
|
|
236
226
|
|
|
237
227
|
export declare function getDiscolorationDetailLevel(): ToothDetailLevel;
|
|
238
228
|
|
|
229
|
+
export declare function getFillingComplexity(): "complex" | "simple";
|
|
230
|
+
|
|
231
|
+
export declare function getFillingDefectEnabled(): boolean;
|
|
232
|
+
|
|
233
|
+
export declare function getFillingMaterialAvailability(): Record<string, boolean>;
|
|
234
|
+
|
|
235
|
+
export declare function getFissureSealingEnabled(): boolean;
|
|
236
|
+
|
|
239
237
|
export declare function getIcdasEnabled(): boolean;
|
|
240
238
|
|
|
241
239
|
/**
|
|
@@ -322,8 +320,8 @@ export declare function getToothStateSummary(toothNo: number): string[];
|
|
|
322
320
|
|
|
323
321
|
export declare function getWearDetailLevel(): ToothDetailLevel;
|
|
324
322
|
|
|
325
|
-
/**
|
|
326
|
-
*
|
|
323
|
+
/** True iff ANY periodontal axis has been charted anywhere in the mouth. Used
|
|
324
|
+
* to auto-skip the perio section of an export and to disable the
|
|
327
325
|
* perio image-export menu items on a blank chart. Derived entirely from
|
|
328
326
|
* `getPerioSummary()` — no new traversal. */
|
|
329
327
|
export declare function hasAnyPerioData(): boolean;
|
|
@@ -343,6 +341,9 @@ export declare function isDualStateConfirmPending(): boolean;
|
|
|
343
341
|
/** Whether the perio-chart overlay is currently open. */
|
|
344
342
|
export declare function isPerioOverlayOpen(): boolean;
|
|
345
343
|
|
|
344
|
+
/** True while a state-change subscription is active. */
|
|
345
|
+
export declare function isPersistenceEnabled(): boolean;
|
|
346
|
+
|
|
346
347
|
/**
|
|
347
348
|
* Supported UI languages.
|
|
348
349
|
*
|
|
@@ -423,10 +424,10 @@ export declare type OdontogramSummary = {
|
|
|
423
424
|
overview: string;
|
|
424
425
|
permanentList: string | null;
|
|
425
426
|
missingList: string | null;
|
|
426
|
-
/**
|
|
427
|
-
*
|
|
427
|
+
/** Grouped dentition table (the flat permanent/missing lists stay for
|
|
428
|
+
* back-compat). */
|
|
428
429
|
toothTable: OdontogramToothTable;
|
|
429
|
-
/**
|
|
430
|
+
/** True when any odontogram-markable periodontal finding
|
|
430
431
|
* (inflammation, mobility, calculus, …) exists — drives showing the perio
|
|
431
432
|
* summary line in the PDF's odontogram section even with no perio module. */
|
|
432
433
|
periodontalHasFindings: boolean;
|
|
@@ -438,13 +439,13 @@ export declare type OdontogramSummary = {
|
|
|
438
439
|
} | null;
|
|
439
440
|
periodontalTitle: string;
|
|
440
441
|
periodontalText: string;
|
|
441
|
-
/**
|
|
442
|
+
/** The status->plan diff (see {@link getPlanChanges}), verbatim.
|
|
442
443
|
* `[]` whenever the plan chart hasn't been initialized or plan === status —
|
|
443
444
|
* a distinct field, not a section, since it's a diff rather than a status
|
|
444
445
|
* list. The "What changes" box in App.tsx renders from this field only
|
|
445
446
|
* when it's non-empty. */
|
|
446
447
|
plannedChanges: PlanChange[];
|
|
447
|
-
/**
|
|
448
|
+
/** Per-tooth free-text notes — one "<tooth>: <note>" line per tooth
|
|
448
449
|
* that carries a note (gated on the notes-enabled setting, like the tooltip).
|
|
449
450
|
* `null` when no tooth has a note, so the panel/PDF omit the section entirely. */
|
|
450
451
|
individualNotes: {
|
|
@@ -536,28 +537,25 @@ export declare function openPerioOverlay(): void;
|
|
|
536
537
|
|
|
537
538
|
declare type PdfBorderThickness = "thin" | "medium" | "thick";
|
|
538
539
|
|
|
539
|
-
/**
|
|
540
|
-
*
|
|
540
|
+
/** Selectable report colour themes — the default is "blue"; the other three are
|
|
541
|
+
* distinct but equally calm/medical. */
|
|
541
542
|
declare type PdfColorTheme = "blue" | "teal" | "amber" | "slate";
|
|
542
543
|
|
|
543
544
|
declare type PdfDateFormat = "iso" | "dmy" | "mdy";
|
|
544
545
|
|
|
545
|
-
/**
|
|
546
|
-
*
|
|
547
|
-
*
|
|
548
|
-
*
|
|
546
|
+
/** Which PDF sections the user opted into. The perio sections are additionally
|
|
547
|
+
* auto-skipped whenever `data.hasPerio` is false (see {@link assemblePdf}),
|
|
548
|
+
* regardless of these flags — a blank perio chart never gets an empty
|
|
549
|
+
* "Periodontal status" page. */
|
|
549
550
|
declare interface PdfExportOptions {
|
|
550
551
|
patientData: boolean;
|
|
551
|
-
/**
|
|
552
|
-
*
|
|
553
|
-
* selectable in the export dialog. */
|
|
552
|
+
/** The odontogram chart IMAGE — selectable independently of its prose
|
|
553
|
+
* description in the export dialog. */
|
|
554
554
|
odontogramChart: boolean;
|
|
555
|
-
/**
|
|
556
|
-
* chart image under the old `odontogram` flag). */
|
|
555
|
+
/** The whole-mouth odontogram summary PROSE. */
|
|
557
556
|
odontogramDescription: boolean;
|
|
558
|
-
/**
|
|
559
|
-
*
|
|
560
|
-
* flag. */
|
|
557
|
+
/** The per-tooth "Individual notes" section — omitted whenever no tooth
|
|
558
|
+
* carries a note (`data.individualNotes` empty), regardless of this flag. */
|
|
561
559
|
individualNotes: boolean;
|
|
562
560
|
perioStatus: boolean;
|
|
563
561
|
perioDescription: boolean;
|
|
@@ -626,24 +624,19 @@ declare type PdfToothNumberSize = "small" | "normal" | "xlarge";
|
|
|
626
624
|
declare type PdfToothSpacing = "wide" | "medium" | "close";
|
|
627
625
|
|
|
628
626
|
/**
|
|
629
|
-
* Full-
|
|
630
|
-
*
|
|
631
|
-
*
|
|
632
|
-
*
|
|
633
|
-
* (`
|
|
634
|
-
* `
|
|
635
|
-
* `change` listeners are enough here.
|
|
636
|
-
*
|
|
637
|
-
* The 32-tooth x 6-site grid (~450+ interactive cells) is built with plain
|
|
638
|
-
* DOM (`buildArch`), NOT JSX/React state, and updated via targeted
|
|
639
|
-
* `syncToothCells` calls rather than a full React re-render (R3 perf) — see
|
|
640
|
-
* `syncOneTooth`/`fullResync` below. Only the compact summary bar is
|
|
641
|
-
* React-controlled (`useState`), since re-rendering ~4 numbers on every edit
|
|
642
|
-
* is cheap. `suppressResyncRef` prevents the grid's own edits from ALSO
|
|
627
|
+
* Full-mouth perio-chart. The 32-tooth x 6-site grid (~450+ interactive
|
|
628
|
+
* cells) is built with plain DOM (`buildArch`), NOT JSX/React state, and
|
|
629
|
+
* updated via targeted `syncToothCells` calls rather than a full React
|
|
630
|
+
* re-render — see `syncOneTooth`/`fullResync` below. Only the compact summary
|
|
631
|
+
* bar is React-controlled (`useState`), since re-rendering ~4 numbers on every
|
|
632
|
+
* edit is cheap. `suppressResyncRef` prevents the grid's own edits from ALSO
|
|
643
633
|
* triggering a redundant full resync via the `onStateChange` subscription
|
|
644
|
-
* (setPerioSite/setToothMobility both fire it synchronously) — external
|
|
645
|
-
*
|
|
646
|
-
*
|
|
634
|
+
* (setPerioSite/setToothMobility both fire it synchronously) — external edits
|
|
635
|
+
* (dual-state chart-mode switch, or another consumer editing perio data while
|
|
636
|
+
* the overlay is open) still trigger the full resync normally. All writes go
|
|
637
|
+
* through the data core (`setPerioSite`/`getToothPerio`/`getToothCal`/
|
|
638
|
+
* `getPerioSummary`/`getPerioChart`); keyboard auto-advance between cells is
|
|
639
|
+
* handled by `handleGridKeyDown`.
|
|
647
640
|
*
|
|
648
641
|
* Layers OVER the odontogram, which it never unmounts: `position: fixed`,
|
|
649
642
|
* full-screen, high z-index (`.perio-overlay` in `index.css`). Mirrors
|
|
@@ -652,17 +645,15 @@ declare type PdfToothSpacing = "wide" | "medium" | "close";
|
|
|
652
645
|
* single element (`#perioOverlay` itself is the dialog; there is no separate
|
|
653
646
|
* backdrop element, unlike `SettingsModal`).
|
|
654
647
|
*
|
|
655
|
-
*
|
|
656
|
-
* optional `inline` prop selects a second chrome for the SAME body (grid +
|
|
648
|
+
* The optional `inline` prop selects a second chrome for the SAME body (grid +
|
|
657
649
|
* summary bar) — a plain panel (`#perioInlinePanel`) meant to fill the chart
|
|
658
650
|
* area in place of the hidden-but-mounted odontogram, instead of the
|
|
659
651
|
* fixed-position modal dialog. `open`/`onClose` are the MODAL chrome's
|
|
660
652
|
* contract and are ignored when `inline` is true (the caller controls
|
|
661
|
-
* mount/unmount of an inline instance directly via conditional rendering
|
|
662
|
-
*
|
|
663
|
-
*
|
|
664
|
-
*
|
|
665
|
-
* to the inline chrome at all.
|
|
653
|
+
* mount/unmount of an inline instance directly via conditional rendering) —
|
|
654
|
+
* there is nothing to "close" in an embedded panel. Dialog-only concerns
|
|
655
|
+
* (focus trap/restore, Esc-to-close, backdrop click, `role="dialog"`) do not
|
|
656
|
+
* apply to the inline chrome at all.
|
|
666
657
|
*/
|
|
667
658
|
export declare function PerioChart({ open, onClose, inline, }: {
|
|
668
659
|
open?: boolean;
|
|
@@ -678,6 +669,15 @@ export declare type PerioRowId = "plaque" | "bop" | "cal" | "gm" | "pd" | "furca
|
|
|
678
669
|
|
|
679
670
|
export declare type PerioViewMode = "toggle" | "popup";
|
|
680
671
|
|
|
672
|
+
export declare type PersistenceOptions = {
|
|
673
|
+
/** localStorage key. Default: "react-advanced-odontogram". */
|
|
674
|
+
key?: string;
|
|
675
|
+
/** Persist the plan chart too (payload's `plan` field). Default: false. */
|
|
676
|
+
includePlan?: boolean;
|
|
677
|
+
/** Called on any storage/parse error instead of console.warn. */
|
|
678
|
+
onError?: (err: Error) => void;
|
|
679
|
+
};
|
|
680
|
+
|
|
681
681
|
declare type PlanChange = {
|
|
682
682
|
toothNo: number;
|
|
683
683
|
axis: string;
|
|
@@ -730,6 +730,14 @@ export declare function setChartMode(mode: ChartMode): void;
|
|
|
730
730
|
|
|
731
731
|
export declare function setDiscolorationDetailLevel(value: ToothDetailLevel): void;
|
|
732
732
|
|
|
733
|
+
export declare function setFillingComplexity(v: "complex" | "simple"): void;
|
|
734
|
+
|
|
735
|
+
export declare function setFillingDefectEnabled(v: boolean): void;
|
|
736
|
+
|
|
737
|
+
export declare function setFillingMaterialAvailability(material: string, v: boolean): void;
|
|
738
|
+
|
|
739
|
+
export declare function setFissureSealingEnabled(v: boolean): void;
|
|
740
|
+
|
|
733
741
|
/** Toggle visibility of the healthy-pulp layer on all teeth. */
|
|
734
742
|
export declare function setHealthyPulpVisible(on: Any): void;
|
|
735
743
|
|
|
@@ -758,13 +766,13 @@ export declare function setOcclusalVisible(on: Any): void;
|
|
|
758
766
|
|
|
759
767
|
export declare function setPdfSettings(patch: Partial<PdfSettings>): void;
|
|
760
768
|
|
|
761
|
-
/** Switch the perio index-name display mode. No-op (
|
|
769
|
+
/** Switch the perio index-name display mode. No-op (does not notify) if unchanged. */
|
|
762
770
|
export declare function setPerioIndexNameMode(mode: PerioIndexNameMode): void;
|
|
763
771
|
|
|
764
|
-
/** Show/hide one perio-chart index row. No-op (
|
|
772
|
+
/** Show/hide one perio-chart index row. No-op (does not notify) if unchanged. */
|
|
765
773
|
export declare function setPerioRowVisibility(id: PerioRowId, visible: boolean): void;
|
|
766
774
|
|
|
767
|
-
/** Switch the perio-chart housing mode. No-op (
|
|
775
|
+
/** Switch the perio-chart housing mode. No-op (does not notify) if unchanged. */
|
|
768
776
|
export declare function setPerioViewMode(mode: PerioViewMode): void;
|
|
769
777
|
|
|
770
778
|
/**
|
|
@@ -827,7 +835,7 @@ declare interface ToothTableCell {
|
|
|
827
835
|
status: ToothTableStatus;
|
|
828
836
|
}
|
|
829
837
|
|
|
830
|
-
/**
|
|
838
|
+
/** Per-tooth status in the grouped dentition table — `empty`
|
|
831
839
|
* (nothing charted), `content` (has some finding/treatment — shown bold/accent),
|
|
832
840
|
* `problem` (caries / root inflammation / diagnosis / wear / discoloration —
|
|
833
841
|
* shown bold-italic in a warning colour). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader-BN_gLe6T.js","sources":["../src/fonts/arabicShaper.ts","../src/fonts/loader.ts"],"sourcesContent":["// Part of React Advanced Odontogram - https://github.com/ZoliQua/React-Odontogram-Modul\n// Created by Zoltan Dul (https://github.com/ZoliQua) 2025-2026\n//\n// Round 2 (phase 2): Arabic text shaping for the PDF report. jsPDF applies NO\n// OpenType layout (GSUB/GPOS), so it draws Arabic base letters in their\n// disconnected ISOLATED forms, left-to-right — unreadable. `shapeArabic()`\n// pre-processes a string into what jsPDF must be handed directly:\n// 1. contextual joining — map each Arabic letter to its isolated/initial/\n// medial/final Presentation-Forms-B glyph based on its neighbours, and\n// 2. a SIMPLIFIED bidi reorder — reverse RTL runs (and the run order) so a\n// left-drawn line reads right-to-left, while Latin/digit runs keep order.\n//\n// This is a pragmatic shaper for the report's mostly-pure-Arabic labels, NOT a\n// full Unicode Bidirectional Algorithm: complex mixed-direction lines (Arabic\n// interleaved with Latin abbreviations/numbers) may not be perfectly ordered.\n// Lam-alef ligatures and tashkeel (combining marks) are not composed.\n\n/** base Arabic codepoint -> its Presentation-Forms-B glyphs.\n * length 4 = dual-joining [isolated, final, initial, medial];\n * length 2 = right-joining [isolated, final] (never connects to the NEXT letter);\n * length 1 = non-joining [isolated]. */\nconst FORMS: Record<number, number[]> = {\n 0x0621: [0xFE80],\n 0x0622: [0xFE81, 0xFE82],\n 0x0623: [0xFE83, 0xFE84],\n 0x0624: [0xFE85, 0xFE86],\n 0x0625: [0xFE87, 0xFE88],\n 0x0626: [0xFE89, 0xFE8A, 0xFE8B, 0xFE8C],\n 0x0627: [0xFE8D, 0xFE8E],\n 0x0628: [0xFE8F, 0xFE90, 0xFE91, 0xFE92],\n 0x0629: [0xFE93, 0xFE94],\n 0x062A: [0xFE95, 0xFE96, 0xFE97, 0xFE98],\n 0x062B: [0xFE99, 0xFE9A, 0xFE9B, 0xFE9C],\n 0x062C: [0xFE9D, 0xFE9E, 0xFE9F, 0xFEA0],\n 0x062D: [0xFEA1, 0xFEA2, 0xFEA3, 0xFEA4],\n 0x062E: [0xFEA5, 0xFEA6, 0xFEA7, 0xFEA8],\n 0x062F: [0xFEA9, 0xFEAA],\n 0x0630: [0xFEAB, 0xFEAC],\n 0x0631: [0xFEAD, 0xFEAE],\n 0x0632: [0xFEAF, 0xFEB0],\n 0x0633: [0xFEB1, 0xFEB2, 0xFEB3, 0xFEB4],\n 0x0634: [0xFEB5, 0xFEB6, 0xFEB7, 0xFEB8],\n 0x0635: [0xFEB9, 0xFEBA, 0xFEBB, 0xFEBC],\n 0x0636: [0xFEBD, 0xFEBE, 0xFEBF, 0xFEC0],\n 0x0637: [0xFEC1, 0xFEC2, 0xFEC3, 0xFEC4],\n 0x0638: [0xFEC5, 0xFEC6, 0xFEC7, 0xFEC8],\n 0x0639: [0xFEC9, 0xFECA, 0xFECB, 0xFECC],\n 0x063A: [0xFECD, 0xFECE, 0xFECF, 0xFED0],\n 0x0641: [0xFED1, 0xFED2, 0xFED3, 0xFED4],\n 0x0642: [0xFED5, 0xFED6, 0xFED7, 0xFED8],\n 0x0643: [0xFED9, 0xFEDA, 0xFEDB, 0xFEDC],\n 0x0644: [0xFEDD, 0xFEDE, 0xFEDF, 0xFEE0],\n 0x0645: [0xFEE1, 0xFEE2, 0xFEE3, 0xFEE4],\n 0x0646: [0xFEE5, 0xFEE6, 0xFEE7, 0xFEE8],\n 0x0647: [0xFEE9, 0xFEEA, 0xFEEB, 0xFEEC],\n 0x0648: [0xFEED, 0xFEEE],\n 0x0649: [0xFEEF, 0xFEF0],\n 0x064A: [0xFEF1, 0xFEF2, 0xFEF3, 0xFEF4],\n};\n\nconst isArabicLetter = (cp: number) => cp in FORMS;\n/** Any RTL-script codepoint (base Arabic block or a Presentation-Forms glyph). */\nconst isRtl = (cp: number) =>\n (cp >= 0x0600 && cp <= 0x06FF) || (cp >= 0xFB50 && cp <= 0xFDFF) || (cp >= 0xFE70 && cp <= 0xFEFF);\n\n/** True if the string contains any Arabic-script character worth shaping. */\nexport function hasArabic(s: string): boolean {\n for (const ch of s) if (isRtl(ch.codePointAt(0)!)) return true;\n return false;\n}\n\n/** Step 1: contextual joining — replace each Arabic letter with its correct\n * positional Presentation-Forms-B glyph. Non-Arabic characters pass through. */\nfunction joinForms(chars: string[]): string[] {\n const cps = chars.map((c) => c.codePointAt(0)!);\n const dual = (cp: number) => (FORMS[cp]?.length ?? 0) === 4; // can join to the NEXT letter\n const canBack = (cp: number) => (FORMS[cp]?.length ?? 0) >= 2; // can take a final/medial form\n return chars.map((ch, i) => {\n const cp = cps[i];\n const f = FORMS[cp];\n if (!f) return ch;\n const prevCp = i > 0 ? cps[i - 1] : 0;\n const nextCp = i < cps.length - 1 ? cps[i + 1] : 0;\n const joinPrev = isArabicLetter(prevCp) && dual(prevCp) && canBack(cp);\n const joinNext = dual(cp) && isArabicLetter(nextCp) && canBack(nextCp);\n let idx = 0; // isolated\n if (joinPrev && joinNext) idx = 3; // medial\n else if (joinPrev) idx = 1; // final\n else if (joinNext) idx = 2; // initial\n const glyph = f[idx] ?? f[0];\n return String.fromCodePoint(glyph);\n });\n}\n\n/** Step 2: simplified bidi — reverse the sequence of runs, and reverse the\n * characters WITHIN each RTL run, while Latin/digit runs keep their order. */\nfunction bidiReorder(shaped: string[]): string {\n type Run = { rtl: boolean; chars: string[] };\n const runs: Run[] = [];\n for (const ch of shaped) {\n const rtl = isRtl(ch.codePointAt(0)!);\n const last = runs[runs.length - 1];\n if (!last || last.rtl !== rtl) runs.push({ rtl, chars: [ch] });\n else last.chars.push(ch);\n }\n return runs\n .reverse()\n .map((r) => (r.rtl ? r.chars.reverse().join(\"\") : r.chars.join(\"\")))\n .join(\"\");\n}\n\n/**\n * Shape + reorder an Arabic string for direct rendering by jsPDF's `doc.text`.\n * Returns the input unchanged when it contains no Arabic script, so it is safe\n * to apply to every string (Latin/Cyrillic/CJK/numbers pass through untouched).\n */\nexport function shapeArabic(input: string): string {\n if (!input || !hasArabic(input)) return input;\n const chars = Array.from(input);\n return bidiReorder(joinForms(chars));\n}\n","// Part of React Advanced Odontogram - https://github.com/ZoliQua/React-Odontogram-Modul\n// Created by Zoltan Dul (https://github.com/ZoliQua) 2025-2026\n//\n// Round 2 (phase 2): language-aware PDF font loader. Picks the right embedded\n// Unicode font for the active UI language and returns a descriptor the export\n// path uses: the jsPDF family name, a registration fn, and a per-string text\n// transform (Arabic shaping; identity otherwise). Each font module is loaded via\n// a DYNAMIC import so only the font for the language actually being exported is\n// pulled in — the fonts stay code-split out of the main bundle (they are still\n// bundled in the package = fully offline, never fetched from the network).\nimport type { FontRegistrable } from \"./roboto\";\nimport { shapeArabic } from \"./arabicShaper\";\n\nexport interface PdfFont {\n /** jsPDF family name to pass to `doc.setFont(family, style)`. */\n family: string;\n /** Register the font's VFS + styles on a jsPDF doc; false if unsupported. */\n register: (doc: FontRegistrable) => boolean;\n /** Per-string transform applied before `doc.text` (Arabic shaping; else identity). */\n transform: (s: string) => string;\n}\n\n/** Load + describe the PDF font for `lang` (the active UI language code). */\nexport async function loadPdfFont(lang: string): Promise<PdfFont> {\n if (lang === \"ar\") {\n const { registerArabicFont, PDF_FONT_ARABIC } = await import(\"./notoArabic\");\n return { family: PDF_FONT_ARABIC, register: registerArabicFont, transform: shapeArabic };\n }\n if (lang === \"zh\") {\n const { registerCjkFont, PDF_FONT_CJK } = await import(\"./notoSC\");\n return { family: PDF_FONT_CJK, register: registerCjkFont, transform: (s) => s };\n }\n // hu, en, de, es, it, sk, pl, ru, pt-br, fr — Latin + Cyrillic.\n const { registerRobotoFont, PDF_FONT_FAMILY } = await import(\"./roboto\");\n return { family: PDF_FONT_FAMILY, register: registerRobotoFont, transform: (s) => s };\n}\n"],"names":["FORMS","isArabicLetter","cp","isRtl","hasArabic","s","ch","joinForms","chars","cps","c","dual","canBack","i","prevCp","nextCp","joinPrev","joinNext","idx","glyph","bidiReorder","shaped","runs","rtl","last","r","shapeArabic","input","loadPdfFont","lang","registerArabicFont","PDF_FONT_ARABIC","registerCjkFont","PDF_FONT_CJK","registerRobotoFont","PDF_FONT_FAMILY"],"mappings":"AAqBA,MAAMA,IAAkC;AAAA,EACtC,MAAQ,CAAC,KAAM;AAAA,EACf,MAAQ,CAAC,OAAQ,KAAM;AAAA,EACvB,MAAQ,CAAC,OAAQ,KAAM;AAAA,EACvB,MAAQ,CAAC,OAAQ,KAAM;AAAA,EACvB,MAAQ,CAAC,OAAQ,KAAM;AAAA,EACvB,MAA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QAAQA,GAAiB,UAAUD,GAAoB,WAAW,CAAC7B,MAAMA,EAAA;AACpF;"}
|
|
1
|
+
{"version":3,"file":"loader-BN_gLe6T.js","sources":["../src/fonts/arabicShaper.ts","../src/fonts/loader.ts"],"sourcesContent":["// Part of React Advanced Odontogram - https://github.com/ZoliQua/React-Odontogram-Modul\n// Created by Zoltan Dul (https://github.com/ZoliQua) 2025-2026\n//\n// Arabic text shaping for the PDF report. jsPDF applies no\n// OpenType layout (GSUB/GPOS), so it draws Arabic base letters in their\n// disconnected ISOLATED forms, left-to-right — unreadable. `shapeArabic()`\n// pre-processes a string into what jsPDF must be handed directly:\n// 1. contextual joining — map each Arabic letter to its isolated/initial/\n// medial/final Presentation-Forms-B glyph based on its neighbours, and\n// 2. a SIMPLIFIED bidi reorder — reverse RTL runs (and the run order) so a\n// left-drawn line reads right-to-left, while Latin/digit runs keep order.\n//\n// This is a pragmatic shaper for the report's mostly-pure-Arabic labels, NOT a\n// full Unicode Bidirectional Algorithm: complex mixed-direction lines (Arabic\n// interleaved with Latin abbreviations/numbers) may not be perfectly ordered.\n// Lam-alef ligatures and tashkeel (combining marks) are not composed.\n\n/** base Arabic codepoint -> its Presentation-Forms-B glyphs.\n * length 4 = dual-joining [isolated, final, initial, medial];\n * length 2 = right-joining [isolated, final] (never connects to the NEXT letter);\n * length 1 = non-joining [isolated]. */\nconst FORMS: Record<number, number[]> = {\n 0x0621: [0xFE80],\n 0x0622: [0xFE81, 0xFE82],\n 0x0623: [0xFE83, 0xFE84],\n 0x0624: [0xFE85, 0xFE86],\n 0x0625: [0xFE87, 0xFE88],\n 0x0626: [0xFE89, 0xFE8A, 0xFE8B, 0xFE8C],\n 0x0627: [0xFE8D, 0xFE8E],\n 0x0628: [0xFE8F, 0xFE90, 0xFE91, 0xFE92],\n 0x0629: [0xFE93, 0xFE94],\n 0x062A: [0xFE95, 0xFE96, 0xFE97, 0xFE98],\n 0x062B: [0xFE99, 0xFE9A, 0xFE9B, 0xFE9C],\n 0x062C: [0xFE9D, 0xFE9E, 0xFE9F, 0xFEA0],\n 0x062D: [0xFEA1, 0xFEA2, 0xFEA3, 0xFEA4],\n 0x062E: [0xFEA5, 0xFEA6, 0xFEA7, 0xFEA8],\n 0x062F: [0xFEA9, 0xFEAA],\n 0x0630: [0xFEAB, 0xFEAC],\n 0x0631: [0xFEAD, 0xFEAE],\n 0x0632: [0xFEAF, 0xFEB0],\n 0x0633: [0xFEB1, 0xFEB2, 0xFEB3, 0xFEB4],\n 0x0634: [0xFEB5, 0xFEB6, 0xFEB7, 0xFEB8],\n 0x0635: [0xFEB9, 0xFEBA, 0xFEBB, 0xFEBC],\n 0x0636: [0xFEBD, 0xFEBE, 0xFEBF, 0xFEC0],\n 0x0637: [0xFEC1, 0xFEC2, 0xFEC3, 0xFEC4],\n 0x0638: [0xFEC5, 0xFEC6, 0xFEC7, 0xFEC8],\n 0x0639: [0xFEC9, 0xFECA, 0xFECB, 0xFECC],\n 0x063A: [0xFECD, 0xFECE, 0xFECF, 0xFED0],\n 0x0641: [0xFED1, 0xFED2, 0xFED3, 0xFED4],\n 0x0642: [0xFED5, 0xFED6, 0xFED7, 0xFED8],\n 0x0643: [0xFED9, 0xFEDA, 0xFEDB, 0xFEDC],\n 0x0644: [0xFEDD, 0xFEDE, 0xFEDF, 0xFEE0],\n 0x0645: [0xFEE1, 0xFEE2, 0xFEE3, 0xFEE4],\n 0x0646: [0xFEE5, 0xFEE6, 0xFEE7, 0xFEE8],\n 0x0647: [0xFEE9, 0xFEEA, 0xFEEB, 0xFEEC],\n 0x0648: [0xFEED, 0xFEEE],\n 0x0649: [0xFEEF, 0xFEF0],\n 0x064A: [0xFEF1, 0xFEF2, 0xFEF3, 0xFEF4],\n};\n\nconst isArabicLetter = (cp: number) => cp in FORMS;\n/** Any RTL-script codepoint (base Arabic block or a Presentation-Forms glyph). */\nconst isRtl = (cp: number) =>\n (cp >= 0x0600 && cp <= 0x06FF) || (cp >= 0xFB50 && cp <= 0xFDFF) || (cp >= 0xFE70 && cp <= 0xFEFF);\n\n/** True if the string contains any Arabic-script character worth shaping. */\nexport function hasArabic(s: string): boolean {\n for (const ch of s) if (isRtl(ch.codePointAt(0)!)) return true;\n return false;\n}\n\n/** Step 1: contextual joining — replace each Arabic letter with its correct\n * positional Presentation-Forms-B glyph. Non-Arabic characters pass through. */\nfunction joinForms(chars: string[]): string[] {\n const cps = chars.map((c) => c.codePointAt(0)!);\n const dual = (cp: number) => (FORMS[cp]?.length ?? 0) === 4; // can join to the NEXT letter\n const canBack = (cp: number) => (FORMS[cp]?.length ?? 0) >= 2; // can take a final/medial form\n return chars.map((ch, i) => {\n const cp = cps[i];\n const f = FORMS[cp];\n if (!f) return ch;\n const prevCp = i > 0 ? cps[i - 1] : 0;\n const nextCp = i < cps.length - 1 ? cps[i + 1] : 0;\n const joinPrev = isArabicLetter(prevCp) && dual(prevCp) && canBack(cp);\n const joinNext = dual(cp) && isArabicLetter(nextCp) && canBack(nextCp);\n let idx = 0; // isolated\n if (joinPrev && joinNext) idx = 3; // medial\n else if (joinPrev) idx = 1; // final\n else if (joinNext) idx = 2; // initial\n const glyph = f[idx] ?? f[0];\n return String.fromCodePoint(glyph);\n });\n}\n\n/** Step 2: simplified bidi — reverse the sequence of runs, and reverse the\n * characters WITHIN each RTL run, while Latin/digit runs keep their order. */\nfunction bidiReorder(shaped: string[]): string {\n type Run = { rtl: boolean; chars: string[] };\n const runs: Run[] = [];\n for (const ch of shaped) {\n const rtl = isRtl(ch.codePointAt(0)!);\n const last = runs[runs.length - 1];\n if (!last || last.rtl !== rtl) runs.push({ rtl, chars: [ch] });\n else last.chars.push(ch);\n }\n return runs\n .reverse()\n .map((r) => (r.rtl ? r.chars.reverse().join(\"\") : r.chars.join(\"\")))\n .join(\"\");\n}\n\n/**\n * Shape + reorder an Arabic string for direct rendering by jsPDF's `doc.text`.\n * Returns the input unchanged when it contains no Arabic script, so it is safe\n * to apply to every string (Latin/Cyrillic/CJK/numbers pass through untouched).\n */\nexport function shapeArabic(input: string): string {\n if (!input || !hasArabic(input)) return input;\n const chars = Array.from(input);\n return bidiReorder(joinForms(chars));\n}\n","// Part of React Advanced Odontogram - https://github.com/ZoliQua/React-Odontogram-Modul\n// Created by Zoltan Dul (https://github.com/ZoliQua) 2025-2026\n//\n// Language-aware PDF font loader. Picks the right embedded Unicode font for the\n// active UI language and returns a descriptor the export path uses: the jsPDF\n// family name, a registration fn, and a per-string text transform (Arabic\n// shaping; identity otherwise). Each font module is loaded via a dynamic import\n// so only the font for the language actually being exported is pulled in — the\n// fonts stay code-split out of the main bundle (they are still bundled in the\n// package = fully offline, never fetched from the network).\nimport type { FontRegistrable } from \"./roboto\";\nimport { shapeArabic } from \"./arabicShaper\";\n\nexport interface PdfFont {\n /** jsPDF family name to pass to `doc.setFont(family, style)`. */\n family: string;\n /** Register the font's VFS + styles on a jsPDF doc; false if unsupported. */\n register: (doc: FontRegistrable) => boolean;\n /** Per-string transform applied before `doc.text` (Arabic shaping; else identity). */\n transform: (s: string) => string;\n}\n\n/** Load + describe the PDF font for `lang` (the active UI language code). */\nexport async function loadPdfFont(lang: string): Promise<PdfFont> {\n if (lang === \"ar\") {\n const { registerArabicFont, PDF_FONT_ARABIC } = await import(\"./notoArabic\");\n return { family: PDF_FONT_ARABIC, register: registerArabicFont, transform: shapeArabic };\n }\n if (lang === \"zh\") {\n const { registerCjkFont, PDF_FONT_CJK } = await import(\"./notoSC\");\n return { family: PDF_FONT_CJK, register: registerCjkFont, transform: (s) => s };\n }\n // hu, en, de, es, it, sk, pl, ru, pt-br, fr — Latin + Cyrillic.\n const { registerRobotoFont, PDF_FONT_FAMILY } = await import(\"./roboto\");\n return { family: PDF_FONT_FAMILY, register: registerRobotoFont, transform: (s) => s };\n}\n"],"names":["FORMS","isArabicLetter","cp","isRtl","hasArabic","s","ch","joinForms","chars","cps","c","dual","canBack","i","prevCp","nextCp","joinPrev","joinNext","idx","glyph","bidiReorder","shaped","runs","rtl","last","r","shapeArabic","input","loadPdfF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