@alfadocs/ui-kit 1.4.16 → 1.5.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.
Files changed (82) hide show
  1. package/dist/_chunks/{anamnesis-summary-rows-CVzxC2X3.js → anamnesis-summary-rows-BpYztFUv.js} +20 -4
  2. package/dist/_chunks/{care-plan-card-C83Hb9EE.js → care-plan-card-CehAU7F_.js} +2 -2
  3. package/dist/_chunks/{care-plan-entry-card-CHMPSTCz.js → care-plan-entry-card-ChWRMfMw.js} +2 -2
  4. package/dist/_chunks/{periodontal-chart-brakjj0s.js → periodontal-chart-C0nNQKKK.js} +121 -121
  5. package/dist/_chunks/tooth-data-DR8Kdnup.js +903 -0
  6. package/dist/_chunks/tooth-finding-palette-vqC-D2Ye.js +708 -0
  7. package/dist/_chunks/tooth-scheme-BPXE1_3N.js +2051 -0
  8. package/dist/agent-catalog.json +465 -21
  9. package/dist/agent-i18n/en.json +23 -6
  10. package/dist/components/care-plan-card/index.js +1 -1
  11. package/dist/components/care-plan-entry-card/index.js +1 -1
  12. package/dist/components/index.d.ts +1 -0
  13. package/dist/components/periodontal-chart/index.js +1 -1
  14. package/dist/components/tooth-finding-palette/index.d.ts +4 -0
  15. package/dist/components/tooth-finding-palette/index.js +9 -0
  16. package/dist/components/tooth-finding-palette/tooth-finding-palette.agent.d.ts +4 -0
  17. package/dist/components/tooth-finding-palette/tooth-finding-palette.d.ts +89 -0
  18. package/dist/components/tooth-scheme/index.d.ts +2 -2
  19. package/dist/components/tooth-scheme/index.js +57 -30
  20. package/dist/components/tooth-scheme/tooth-data.d.ts +279 -10
  21. package/dist/components/tooth-scheme/tooth-scheme.agent.d.ts +2 -2
  22. package/dist/components/tooth-scheme/tooth-scheme.d.ts +30 -3
  23. package/dist/i18n/locales/ar.d.ts +40 -1
  24. package/dist/i18n/locales/ar.js +41 -2
  25. package/dist/i18n/locales/de.d.ts +40 -1
  26. package/dist/i18n/locales/de.js +41 -2
  27. package/dist/i18n/locales/el.d.ts +40 -1
  28. package/dist/i18n/locales/el.js +41 -2
  29. package/dist/i18n/locales/en.d.ts +40 -1
  30. package/dist/i18n/locales/en.js +41 -2
  31. package/dist/i18n/locales/es.d.ts +40 -1
  32. package/dist/i18n/locales/es.js +41 -2
  33. package/dist/i18n/locales/fr.d.ts +40 -1
  34. package/dist/i18n/locales/fr.js +41 -2
  35. package/dist/i18n/locales/hi.d.ts +40 -1
  36. package/dist/i18n/locales/hi.js +41 -2
  37. package/dist/i18n/locales/it.d.ts +40 -1
  38. package/dist/i18n/locales/it.js +41 -2
  39. package/dist/i18n/locales/ja.d.ts +40 -1
  40. package/dist/i18n/locales/ja.js +41 -2
  41. package/dist/i18n/locales/nl.d.ts +40 -1
  42. package/dist/i18n/locales/nl.js +41 -2
  43. package/dist/i18n/locales/pl.d.ts +40 -1
  44. package/dist/i18n/locales/pl.js +41 -2
  45. package/dist/i18n/locales/pt.d.ts +40 -1
  46. package/dist/i18n/locales/pt.js +41 -2
  47. package/dist/i18n/locales/ro.d.ts +40 -1
  48. package/dist/i18n/locales/ro.js +41 -2
  49. package/dist/i18n/locales/ru.d.ts +40 -1
  50. package/dist/i18n/locales/ru.js +41 -2
  51. package/dist/i18n/locales/sq.d.ts +40 -1
  52. package/dist/i18n/locales/sq.js +41 -2
  53. package/dist/i18n/locales/sv.d.ts +40 -1
  54. package/dist/i18n/locales/sv.js +41 -2
  55. package/dist/i18n/locales/tr.d.ts +40 -1
  56. package/dist/i18n/locales/tr.js +41 -2
  57. package/dist/i18n/locales/zh.d.ts +40 -1
  58. package/dist/i18n/locales/zh.js +41 -2
  59. package/dist/index.js +448 -415
  60. package/dist/locales/ar.json +41 -2
  61. package/dist/locales/de.json +41 -2
  62. package/dist/locales/el.json +41 -2
  63. package/dist/locales/en.json +41 -2
  64. package/dist/locales/es.json +41 -2
  65. package/dist/locales/fr.json +41 -2
  66. package/dist/locales/hi.json +41 -2
  67. package/dist/locales/it.json +41 -2
  68. package/dist/locales/ja.json +41 -2
  69. package/dist/locales/nl.json +41 -2
  70. package/dist/locales/pl.json +41 -2
  71. package/dist/locales/pt.json +41 -2
  72. package/dist/locales/ro.json +41 -2
  73. package/dist/locales/ru.json +41 -2
  74. package/dist/locales/sq.json +41 -2
  75. package/dist/locales/sv.json +41 -2
  76. package/dist/locales/tr.json +41 -2
  77. package/dist/locales/zh.json +41 -2
  78. package/dist/patterns/anamnesis/index.js +1 -1
  79. package/dist/tokens.css +1 -1
  80. package/package.json +5 -1
  81. package/dist/_chunks/tooth-data-BwuoKFf4.js +0 -660
  82. package/dist/_chunks/tooth-scheme-s0ipC0-Z.js +0 -1483
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "packageVersion": "1.4.16",
3
+ "packageVersion": "1.5.0",
4
4
  "components": [
5
5
  {
6
6
  "kind": "component",
@@ -14120,20 +14120,155 @@
14120
14120
  }
14121
14121
  }
14122
14122
  },
14123
+ {
14124
+ "kind": "component",
14125
+ "id": "tooth-finding-palette",
14126
+ "capabilities": [
14127
+ "pick",
14128
+ "select_single",
14129
+ "set_value"
14130
+ ],
14131
+ "state": [
14132
+ {
14133
+ "name": "activeFinding",
14134
+ "type": "string | null",
14135
+ "description": "Id of the armed finding tool, or null when no tool is selected. Identifies a finding TYPE — never a patient, and never a charted finding.",
14136
+ "descriptionKey": "ui.agent.toothFindingPalette.state.activeFinding"
14137
+ },
14138
+ {
14139
+ "name": "status",
14140
+ "type": "string",
14141
+ "description": "Execution status the next charted finding takes — 'planned' or 'executed'.",
14142
+ "descriptionKey": "ui.agent.toothFindingPalette.state.status"
14143
+ },
14144
+ {
14145
+ "name": "tools",
14146
+ "type": "string[]",
14147
+ "description": "Every finding id the palette currently offers, in render order — built-ins plus any practice-defined ids. The authoritative vocabulary for select_finding.",
14148
+ "descriptionKey": "ui.agent.toothFindingPalette.state.tools"
14149
+ }
14150
+ ],
14151
+ "actions": [
14152
+ {
14153
+ "name": "select_finding",
14154
+ "safety": "read",
14155
+ "argsType": "{ condition: ConditionId }",
14156
+ "argsSchema": {
14157
+ "type": "object",
14158
+ "properties": {
14159
+ "condition": {
14160
+ "type": "string",
14161
+ "description": "Finding id — either a built-in condition (the enum on tooth-scheme's set_finding: caries, filled, crowned, rootCanal, implant, …) or a practice-defined id supplied through the conditionRegistry prop. Read the live list from the `tools` state slot rather than guessing."
14162
+ }
14163
+ },
14164
+ "required": [
14165
+ "condition"
14166
+ ]
14167
+ },
14168
+ "idempotent": true,
14169
+ "errors": [
14170
+ "The condition is not among the palette's tools — read the \"tools\" state slot for the live list."
14171
+ ],
14172
+ "examples": [
14173
+ {
14174
+ "args": {
14175
+ "condition": "caries"
14176
+ },
14177
+ "note": "Arm the caries tool before marking a decayed surface."
14178
+ }
14179
+ ],
14180
+ "description": "Arm a finding tool, so the next tooth (or surface, or root) picked on the paired dental chart records that finding.",
14181
+ "descriptionKey": "ui.agent.toothFindingPalette.actions.selectFinding"
14182
+ },
14183
+ {
14184
+ "name": "clear_selection",
14185
+ "safety": "read",
14186
+ "idempotent": true,
14187
+ "description": "Disarm the palette so clicks on the chart stop recording a finding. Charted findings are untouched.",
14188
+ "descriptionKey": "ui.agent.toothFindingPalette.actions.clearSelection"
14189
+ },
14190
+ {
14191
+ "name": "set_status",
14192
+ "safety": "write",
14193
+ "argsType": "{ status: SymbolStatus }",
14194
+ "argsSchema": {
14195
+ "type": "object",
14196
+ "properties": {
14197
+ "status": {
14198
+ "enum": [
14199
+ "planned",
14200
+ "executed"
14201
+ ],
14202
+ "description": "Execution status the next charted finding takes — 'planned' (proposed treatment) or 'executed' (work already carried out)."
14203
+ }
14204
+ },
14205
+ "required": [
14206
+ "status"
14207
+ ]
14208
+ },
14209
+ "idempotent": true,
14210
+ "examples": [
14211
+ {
14212
+ "args": {
14213
+ "status": "executed"
14214
+ },
14215
+ "note": "Record the next finding as work already carried out."
14216
+ }
14217
+ ],
14218
+ "description": "Choose whether the next charted finding is recorded as planned or executed.",
14219
+ "descriptionKey": "ui.agent.toothFindingPalette.actions.setStatus"
14220
+ },
14221
+ {
14222
+ "name": "focus_tool",
14223
+ "safety": "read",
14224
+ "argsType": "{ condition: ConditionId }",
14225
+ "argsSchema": {
14226
+ "type": "object",
14227
+ "properties": {
14228
+ "condition": {
14229
+ "type": "string",
14230
+ "description": "Finding id — either a built-in condition (the enum on tooth-scheme's set_finding: caries, filled, crowned, rootCanal, implant, …) or a practice-defined id supplied through the conditionRegistry prop. Read the live list from the `tools` state slot rather than guessing."
14231
+ }
14232
+ },
14233
+ "required": [
14234
+ "condition"
14235
+ ]
14236
+ },
14237
+ "idempotent": true,
14238
+ "description": "Move keyboard focus to a tool without arming it — relocates the toolbar's single roving tab stop.",
14239
+ "descriptionKey": "ui.agent.toothFindingPalette.actions.focusTool"
14240
+ }
14241
+ ],
14242
+ "domHooks": {
14243
+ "root": {
14244
+ "attr": "data-component",
14245
+ "value": "tooth-finding-palette",
14246
+ "description": "Marks the palette toolbar wrapper."
14247
+ },
14248
+ "instanceId": {
14249
+ "attr": "data-component-id",
14250
+ "sourceProp": "id",
14251
+ "description": "Sourced from the id prop. Required to address a specific palette from the agent."
14252
+ },
14253
+ "item": {
14254
+ "attr": "data-condition",
14255
+ "description": "Each tool button emits its finding id as data-condition, and the armed tool also carries data-active=\"true\". Group wrappers carry data-group with the group id; the planned/executed pills carry data-status."
14256
+ }
14257
+ }
14258
+ },
14123
14259
  {
14124
14260
  "kind": "component",
14125
14261
  "id": "tooth-scheme",
14126
14262
  "capabilities": [
14127
14263
  "pick",
14128
14264
  "set_value",
14129
- "edit_inline",
14130
- "view_change"
14265
+ "edit_inline"
14131
14266
  ],
14132
14267
  "state": [
14133
14268
  {
14134
14269
  "name": "chart",
14135
- "type": "object",
14136
- "description": "Current dental chart — findings (and marked surfaces) keyed by FDI id, or by a special-element id (quadrant / sextant / arch / general) for region-spanning findings.",
14270
+ "type": "Record<FdiId, { conditions: ToothCondition[]; surfaces: Surface[]; symbols: { id?: string; condition: ConditionId; part?: SymbolPart; surfaces?: Surface[]; roots?: Root[]; status?: SymbolStatus; color?: string }[] }>",
14271
+ "description": "Current dental chart keyed by FDI id, or by a special-element id (quadrant / sextant / arch / general) for region-spanning findings. Each entry carries the flat `conditions` + `surfaces` pair AND the normalised per-symbol list, where every finding scopes its own surfaces, roots, planned/executed status and colour. Free-text clinical notes are PHI and omitted — read them per tooth via get_symbols / get_notes.",
14137
14272
  "descriptionKey": "ui.agent.toothScheme.state.chart"
14138
14273
  },
14139
14274
  {
@@ -14173,6 +14308,9 @@
14173
14308
  ]
14174
14309
  },
14175
14310
  "idempotent": true,
14311
+ "errors": [
14312
+ "In the `both` view the registered instance renders no SVG of its own (the four sub-charts do, and deliberately do not register), so this action has no effect there."
14313
+ ],
14176
14314
  "description": "Move focus to a specific tooth by FDI id.",
14177
14315
  "descriptionKey": "ui.agent.toothScheme.actions.focusTooth"
14178
14316
  },
@@ -14207,14 +14345,141 @@
14207
14345
  "implantExtraction",
14208
14346
  "stub",
14209
14347
  "destroyed",
14210
- "rootCanal"
14211
- ]
14348
+ "rootCanal",
14349
+ "pin",
14350
+ "rootAmputation",
14351
+ "anchorage",
14352
+ "hook",
14353
+ "attachment",
14354
+ "mucogingivalSurgery",
14355
+ "periodontalSurgery",
14356
+ "curettage",
14357
+ "medication",
14358
+ "xray"
14359
+ ],
14360
+ "description": "Built-in finding id. 'destroyed' is the retained root (*radice persistente*); 'xray' is the chartable radiograph SYMBOL, distinct from the image archive reached via get_radiographs."
14212
14361
  }
14213
14362
  },
14214
14363
  "idempotent": true,
14215
- "description": "Read the findings recorded on one tooth (FDI id).",
14364
+ "description": "Read the BUILT-IN findings recorded on one tooth (FDI id), as a flat list of condition ids. Practice-defined findings, per-finding surfaces, roots and status are not included — use get_symbols for the tooth's full record.",
14216
14365
  "descriptionKey": "ui.agent.toothScheme.actions.getTooth"
14217
14366
  },
14367
+ {
14368
+ "name": "get_symbols",
14369
+ "safety": "phi",
14370
+ "argsType": "{ id: FdiId }",
14371
+ "argsSchema": {
14372
+ "type": "object",
14373
+ "properties": {
14374
+ "id": {
14375
+ "type": "string",
14376
+ "description": "FDI tooth id ('11'–'48' permanent, '51'–'85' primary) or a special-element id ('Q1'–'Q4' quadrants, 'S1'–'S6' sextants, 'AS'/'AI' arches, 'general'; primary mirrors with an 'm' prefix)."
14377
+ }
14378
+ },
14379
+ "required": [
14380
+ "id"
14381
+ ]
14382
+ },
14383
+ "returns": "ToothSymbol[]",
14384
+ "returnsSchema": {
14385
+ "type": "array",
14386
+ "items": {
14387
+ "type": "object",
14388
+ "properties": {
14389
+ "id": {
14390
+ "type": "string",
14391
+ "description": "Provenance id — the host's care-plan / finding entry this symbol came from. Present on symbols the host seeded; supply it to update that exact entry."
14392
+ },
14393
+ "condition": {
14394
+ "type": "string",
14395
+ "description": "Finding id — either a built-in (the enum on set_finding) or a practice-defined id from the host's `conditionRegistry`."
14396
+ },
14397
+ "part": {
14398
+ "enum": [
14399
+ "element",
14400
+ "surface",
14401
+ "root"
14402
+ ],
14403
+ "description": "Anatomical layer the finding marks. Omit to take the condition's natural part (caries and fillings are 'surface', root canals are 'root', crowns and implants are 'element')."
14404
+ },
14405
+ "surfaces": {
14406
+ "type": "array",
14407
+ "items": {
14408
+ "enum": [
14409
+ "mesial",
14410
+ "distal",
14411
+ "occlusal",
14412
+ "buccal",
14413
+ "lingual"
14414
+ ],
14415
+ "description": "Tooth surface, named anatomically."
14416
+ }
14417
+ },
14418
+ "roots": {
14419
+ "type": "array",
14420
+ "items": {
14421
+ "enum": [
14422
+ "mesial",
14423
+ "distal",
14424
+ "palatal",
14425
+ "buccal",
14426
+ "single"
14427
+ ],
14428
+ "description": "Root, named ANATOMICALLY (not by screen side) — 'palatal' exists only on upper molars, 'single' covers every one-rooted tooth. On flank-mounted markers (anchorage, hook) 'mesial' / 'distal' select the side of the tooth instead."
14429
+ }
14430
+ },
14431
+ "status": {
14432
+ "enum": [
14433
+ "planned",
14434
+ "executed"
14435
+ ],
14436
+ "description": "Execution status — 'planned' (proposed treatment) vs 'executed' (already done). Omit when the finding carries no plan/executed distinction."
14437
+ },
14438
+ "color": {
14439
+ "type": "string",
14440
+ "description": "Per-practice colour override — a CSS colour or `var(--token)`. Omit to take the condition's own colour."
14441
+ },
14442
+ "note": {
14443
+ "type": "string",
14444
+ "description": "Free-text clinical note. PHI — never in a state snapshot."
14445
+ }
14446
+ },
14447
+ "required": [
14448
+ "condition"
14449
+ ]
14450
+ }
14451
+ },
14452
+ "idempotent": true,
14453
+ "description": "Read one tooth's full finding record (incl. notes) — one entry per symbol, each with its own surfaces, roots, planned/executed status, colour override, provenance id and free-text note. Normalised, so a tooth charted with the flat conditions/surfaces pair reports the same shape.",
14454
+ "descriptionKey": "ui.agent.toothScheme.actions.getSymbols"
14455
+ },
14456
+ {
14457
+ "name": "get_notes",
14458
+ "safety": "phi",
14459
+ "argsType": "{ id: FdiId }",
14460
+ "argsSchema": {
14461
+ "type": "object",
14462
+ "properties": {
14463
+ "id": {
14464
+ "type": "string",
14465
+ "description": "FDI tooth id ('11'–'48' permanent, '51'–'85' primary) or a special-element id ('Q1'–'Q4' quadrants, 'S1'–'S6' sextants, 'AS'/'AI' arches, 'general'; primary mirrors with an 'm' prefix)."
14466
+ }
14467
+ },
14468
+ "required": [
14469
+ "id"
14470
+ ]
14471
+ },
14472
+ "returns": "string | null",
14473
+ "returnsSchema": {
14474
+ "type": [
14475
+ "string",
14476
+ "null"
14477
+ ]
14478
+ },
14479
+ "idempotent": true,
14480
+ "description": "Read the tooth-level free-text clinical note, or null when there is none. Per-finding notes are separate — they come back from get_symbols.",
14481
+ "descriptionKey": "ui.agent.toothScheme.actions.getNotes"
14482
+ },
14218
14483
  {
14219
14484
  "name": "teeth_with",
14220
14485
  "safety": "read",
@@ -14234,8 +14499,19 @@
14234
14499
  "implantExtraction",
14235
14500
  "stub",
14236
14501
  "destroyed",
14237
- "rootCanal"
14238
- ]
14502
+ "rootCanal",
14503
+ "pin",
14504
+ "rootAmputation",
14505
+ "anchorage",
14506
+ "hook",
14507
+ "attachment",
14508
+ "mucogingivalSurgery",
14509
+ "periodontalSurgery",
14510
+ "curettage",
14511
+ "medication",
14512
+ "xray"
14513
+ ],
14514
+ "description": "Built-in finding id. 'destroyed' is the retained root (*radice persistente*); 'xray' is the chartable radiograph SYMBOL, distinct from the image archive reached via get_radiographs."
14239
14515
  }
14240
14516
  },
14241
14517
  "required": [
@@ -14251,12 +14527,40 @@
14251
14527
  }
14252
14528
  },
14253
14529
  "idempotent": true,
14254
- "description": "List the ids carrying a given finding — FDI tooth ids and/or special-element ids (e.g. all teeth with caries).",
14530
+ "description": "List the ids carrying a given built-in finding — FDI tooth ids and/or special-element ids (e.g. all teeth with caries). For a practice-defined finding use teeth_with_symbol.",
14255
14531
  "descriptionKey": "ui.agent.toothScheme.actions.teethWith"
14256
14532
  },
14257
14533
  {
14258
- "name": "get_radiographs",
14534
+ "name": "teeth_with_symbol",
14259
14535
  "safety": "read",
14536
+ "argsType": "{ condition: ConditionId }",
14537
+ "argsSchema": {
14538
+ "type": "object",
14539
+ "properties": {
14540
+ "condition": {
14541
+ "type": "string",
14542
+ "description": "Finding id — either a built-in (the enum on set_finding) or a practice-defined id from the host's `conditionRegistry`."
14543
+ }
14544
+ },
14545
+ "required": [
14546
+ "condition"
14547
+ ]
14548
+ },
14549
+ "returns": "FdiId[]",
14550
+ "returnsSchema": {
14551
+ "type": "array",
14552
+ "items": {
14553
+ "type": "string",
14554
+ "description": "FDI tooth id ('11'–'48' permanent, '51'–'85' primary) or a special-element id ('Q1'–'Q4' quadrants, 'S1'–'S6' sextants, 'AS'/'AI' arches, 'general'; primary mirrors with an 'm' prefix)."
14555
+ }
14556
+ },
14557
+ "idempotent": true,
14558
+ "description": "As teeth_with, but open to the practice-defined ids in the host's `conditionRegistry` as well as the built-ins.",
14559
+ "descriptionKey": "ui.agent.toothScheme.actions.teethWithSymbol"
14560
+ },
14561
+ {
14562
+ "name": "get_radiographs",
14563
+ "safety": "phi",
14260
14564
  "argsType": "{ id: FdiId }",
14261
14565
  "argsSchema": {
14262
14566
  "type": "object",
@@ -14311,7 +14615,7 @@
14311
14615
  }
14312
14616
  },
14313
14617
  "idempotent": true,
14314
- "description": "Read the radiographs (x-rays) attached to one tooth.",
14618
+ "description": "Read the radiographs (x-rays) attached to one tooth, including their notes, dates and image urls.",
14315
14619
  "descriptionKey": "ui.agent.toothScheme.actions.getRadiographs"
14316
14620
  },
14317
14621
  {
@@ -14331,6 +14635,9 @@
14331
14635
  ]
14332
14636
  },
14333
14637
  "idempotent": true,
14638
+ "errors": [
14639
+ "In the `both` view the registered instance renders no SVG of its own (the four sub-charts do, and deliberately do not register), so this action has no effect there."
14640
+ ],
14334
14641
  "description": "Focus a tooth and open its radiograph archive (fires the host's onOpenRadiographs).",
14335
14642
  "descriptionKey": "ui.agent.toothScheme.actions.openRadiographs"
14336
14643
  },
@@ -14357,8 +14664,19 @@
14357
14664
  "implantExtraction",
14358
14665
  "stub",
14359
14666
  "destroyed",
14360
- "rootCanal"
14361
- ]
14667
+ "rootCanal",
14668
+ "pin",
14669
+ "rootAmputation",
14670
+ "anchorage",
14671
+ "hook",
14672
+ "attachment",
14673
+ "mucogingivalSurgery",
14674
+ "periodontalSurgery",
14675
+ "curettage",
14676
+ "medication",
14677
+ "xray"
14678
+ ],
14679
+ "description": "Built-in finding id. 'destroyed' is the retained root (*radice persistente*); 'xray' is the chartable radiograph SYMBOL, distinct from the image archive reached via get_radiographs."
14362
14680
  },
14363
14681
  "surfaces": {
14364
14682
  "type": "array",
@@ -14369,7 +14687,8 @@
14369
14687
  "occlusal",
14370
14688
  "buccal",
14371
14689
  "lingual"
14372
- ]
14690
+ ],
14691
+ "description": "Tooth surface, named anatomically."
14373
14692
  }
14374
14693
  }
14375
14694
  },
@@ -14379,9 +14698,123 @@
14379
14698
  ]
14380
14699
  },
14381
14700
  "idempotent": true,
14382
- "description": "Record a finding on a tooth or region element (crown, implant, root canal, caries, …). Optionally mark the affected surfaces for a surface finding.",
14701
+ "description": "Record a built-in finding on a tooth or region element (crown, implant, root canal, caries, …). Optionally mark the affected surfaces for a surface finding. Structural only — to set a finding’s roots, planned/executed status, colour or note, or to chart a practice-defined finding, use set_symbol.",
14383
14702
  "descriptionKey": "ui.agent.toothScheme.actions.setFinding"
14384
14703
  },
14704
+ {
14705
+ "name": "set_symbol",
14706
+ "safety": "phi",
14707
+ "argsType": "{ id: FdiId; symbol: ToothSymbol }",
14708
+ "argsSchema": {
14709
+ "type": "object",
14710
+ "properties": {
14711
+ "id": {
14712
+ "type": "string",
14713
+ "description": "FDI tooth id ('11'–'48' permanent, '51'–'85' primary) or a special-element id ('Q1'–'Q4' quadrants, 'S1'–'S6' sextants, 'AS'/'AI' arches, 'general'; primary mirrors with an 'm' prefix)."
14714
+ },
14715
+ "symbol": {
14716
+ "type": "object",
14717
+ "properties": {
14718
+ "id": {
14719
+ "type": "string",
14720
+ "description": "Provenance id — the host's care-plan / finding entry this symbol came from. Present on symbols the host seeded; supply it to update that exact entry."
14721
+ },
14722
+ "condition": {
14723
+ "type": "string",
14724
+ "description": "Finding id — either a built-in (the enum on set_finding) or a practice-defined id from the host's `conditionRegistry`."
14725
+ },
14726
+ "part": {
14727
+ "enum": [
14728
+ "element",
14729
+ "surface",
14730
+ "root"
14731
+ ],
14732
+ "description": "Anatomical layer the finding marks. Omit to take the condition's natural part (caries and fillings are 'surface', root canals are 'root', crowns and implants are 'element')."
14733
+ },
14734
+ "surfaces": {
14735
+ "type": "array",
14736
+ "items": {
14737
+ "enum": [
14738
+ "mesial",
14739
+ "distal",
14740
+ "occlusal",
14741
+ "buccal",
14742
+ "lingual"
14743
+ ],
14744
+ "description": "Tooth surface, named anatomically."
14745
+ }
14746
+ },
14747
+ "roots": {
14748
+ "type": "array",
14749
+ "items": {
14750
+ "enum": [
14751
+ "mesial",
14752
+ "distal",
14753
+ "palatal",
14754
+ "buccal",
14755
+ "single"
14756
+ ],
14757
+ "description": "Root, named ANATOMICALLY (not by screen side) — 'palatal' exists only on upper molars, 'single' covers every one-rooted tooth. On flank-mounted markers (anchorage, hook) 'mesial' / 'distal' select the side of the tooth instead."
14758
+ }
14759
+ },
14760
+ "status": {
14761
+ "enum": [
14762
+ "planned",
14763
+ "executed"
14764
+ ],
14765
+ "description": "Execution status — 'planned' (proposed treatment) vs 'executed' (already done). Omit when the finding carries no plan/executed distinction."
14766
+ },
14767
+ "color": {
14768
+ "type": "string",
14769
+ "description": "Per-practice colour override — a CSS colour or `var(--token)`. Omit to take the condition's own colour."
14770
+ },
14771
+ "note": {
14772
+ "type": "string",
14773
+ "description": "Free-text clinical note. PHI — never in a state snapshot."
14774
+ }
14775
+ },
14776
+ "required": [
14777
+ "condition"
14778
+ ]
14779
+ }
14780
+ },
14781
+ "required": [
14782
+ "id",
14783
+ "symbol"
14784
+ ]
14785
+ },
14786
+ "idempotent": true,
14787
+ "examples": [
14788
+ {
14789
+ "args": {
14790
+ "id": "16",
14791
+ "symbol": {
14792
+ "condition": "filled",
14793
+ "surfaces": [
14794
+ "mesial"
14795
+ ],
14796
+ "status": "executed"
14797
+ }
14798
+ },
14799
+ "note": "Record an executed mesial filling on tooth 16, leaving any other finding on that tooth untouched."
14800
+ },
14801
+ {
14802
+ "args": {
14803
+ "id": "26",
14804
+ "symbol": {
14805
+ "condition": "rootCanal",
14806
+ "roots": [
14807
+ "palatal"
14808
+ ],
14809
+ "status": "planned"
14810
+ }
14811
+ },
14812
+ "note": "Plan a root canal on the palatal root of tooth 26 ('palatal' is the anatomical root, not a screen side)."
14813
+ }
14814
+ ],
14815
+ "description": "Add or replace one finding on a tooth or region element, with its own part, surfaces, roots, planned/executed status, colour override and note. Matched by `symbol.id` when the symbol carries provenance, otherwise by its condition; appended when nothing matches. Accepts practice-defined `conditionRegistry` ids as well as the built-ins.",
14816
+ "descriptionKey": "ui.agent.toothScheme.actions.setSymbol"
14817
+ },
14385
14818
  {
14386
14819
  "name": "remove_finding",
14387
14820
  "safety": "write",
@@ -14405,8 +14838,19 @@
14405
14838
  "implantExtraction",
14406
14839
  "stub",
14407
14840
  "destroyed",
14408
- "rootCanal"
14409
- ]
14841
+ "rootCanal",
14842
+ "pin",
14843
+ "rootAmputation",
14844
+ "anchorage",
14845
+ "hook",
14846
+ "attachment",
14847
+ "mucogingivalSurgery",
14848
+ "periodontalSurgery",
14849
+ "curettage",
14850
+ "medication",
14851
+ "xray"
14852
+ ],
14853
+ "description": "Built-in finding id. 'destroyed' is the retained root (*radice persistente*); 'xray' is the chartable radiograph SYMBOL, distinct from the image archive reached via get_radiographs."
14410
14854
  }
14411
14855
  },
14412
14856
  "required": [
@@ -14415,7 +14859,7 @@
14415
14859
  ]
14416
14860
  },
14417
14861
  "idempotent": true,
14418
- "description": "Remove a single finding from a tooth.",
14862
+ "description": "Remove a finding from a tooth — every symbol carrying that condition goes, whatever its surfaces or roots. Built-in ids only.",
14419
14863
  "descriptionKey": "ui.agent.toothScheme.actions.removeFinding"
14420
14864
  },
14421
14865
  {
@@ -14451,7 +14895,7 @@
14451
14895
  },
14452
14896
  "item": {
14453
14897
  "attr": "data-fdi",
14454
- "description": "Each rendered tooth `<g>` carries its FDI id as `data-fdi`; selectable special-element slots carry their id there too (plus `data-special` naming the kind). The `data-projection` / `data-view-mode` attributes on the root expose the side/plan/both view."
14898
+ "description": "Each rendered tooth `<g>` carries its FDI id as `data-fdi`, its first finding as `data-condition`, the full space-separated list as `data-conditions`, the finding count as `data-symbol-count` and the first finding's status as `data-status`; selectable special-element slots carry their id in `data-fdi` too (plus `data-special` naming the kind). Per-surface pick targets carry `data-zone`, per-root pick targets `data-root` (the anatomical root name). The `data-projection` / `data-view-mode` attributes on the root expose the side/plan/both view."
14455
14899
  }
14456
14900
  }
14457
14901
  },
@@ -1439,21 +1439,38 @@
1439
1439
  "insert": "Emit a merge-token to the consumer for cursor insertion."
1440
1440
  }
1441
1441
  },
1442
+ "toothFindingPalette": {
1443
+ "state": {
1444
+ "activeFinding": "Id of the armed finding tool, or null when no tool is selected. Identifies a finding TYPE — never a patient, and never a charted finding.",
1445
+ "status": "Execution status the next charted finding takes — 'planned' or 'executed'.",
1446
+ "tools": "Every finding id the palette currently offers, in render order — built-ins plus any practice-defined ids. The authoritative vocabulary for select_finding."
1447
+ },
1448
+ "actions": {
1449
+ "selectFinding": "Arm a finding tool, so the next tooth (or surface, or root) picked on the paired dental chart records that finding.",
1450
+ "clearSelection": "Disarm the palette so clicks on the chart stop recording a finding. Charted findings are untouched.",
1451
+ "setStatus": "Choose whether the next charted finding is recorded as planned or executed.",
1452
+ "focusTool": "Move keyboard focus to a tool without arming it — relocates the toolbar's single roving tab stop."
1453
+ }
1454
+ },
1442
1455
  "toothScheme": {
1443
1456
  "state": {
1444
- "chart": "Current dental chart — findings (and marked surfaces) keyed by FDI id, or by a special-element id (quadrant / sextant / arch / general) for region-spanning findings.",
1457
+ "chart": "Current dental chart keyed by FDI id, or by a special-element id (quadrant / sextant / arch / general) for region-spanning findings. Each entry carries the flat `conditions` + `surfaces` pair AND the normalised per-symbol list, where every finding scopes its own surfaces, roots, planned/executed status and colour. Free-text clinical notes are PHI and omitted — read them per tooth via get_symbols / get_notes.",
1445
1458
  "chartedTeeth": "Ids carrying at least one finding — FDI tooth ids and/or special-element ids (quadrant / sextant / arch / general).",
1446
1459
  "radiographs": "Structural references (id + kind) to the radiographs on each tooth, keyed by FDI id. Notes, dates and image URLs are not exposed here — fetch them on demand via get_radiographs.",
1447
1460
  "teethWithRadiographs": "FDI ids of every tooth carrying at least one radiograph."
1448
1461
  },
1449
1462
  "actions": {
1450
1463
  "focusTooth": "Move focus to a specific tooth by FDI id.",
1451
- "getTooth": "Read the findings recorded on one tooth (FDI id).",
1452
- "teethWith": "List the ids carrying a given findingFDI tooth ids and/or special-element ids (e.g. all teeth with caries).",
1453
- "getRadiographs": "Read the radiographs (x-rays) attached to one tooth.",
1464
+ "getTooth": "Read the BUILT-IN findings recorded on one tooth (FDI id), as a flat list of condition ids. Practice-defined findings, per-finding surfaces, roots and status are not included — use get_symbols for the tooth's full record.",
1465
+ "getSymbols": "Read one tooth's full finding record (incl. notes) one entry per symbol, each with its own surfaces, roots, planned/executed status, colour override, provenance id and free-text note. Normalised, so a tooth charted with the flat conditions/surfaces pair reports the same shape.",
1466
+ "getNotes": "Read the tooth-level free-text clinical note, or null when there is none. Per-finding notes are separate — they come back from get_symbols.",
1467
+ "teethWith": "List the ids carrying a given built-in finding — FDI tooth ids and/or special-element ids (e.g. all teeth with caries). For a practice-defined finding use teeth_with_symbol.",
1468
+ "teethWithSymbol": "As teeth_with, but open to the practice-defined ids in the host's `conditionRegistry` as well as the built-ins.",
1469
+ "getRadiographs": "Read the radiographs (x-rays) attached to one tooth, including their notes, dates and image urls.",
1454
1470
  "openRadiographs": "Focus a tooth and open its radiograph archive (fires the host's onOpenRadiographs).",
1455
- "setFinding": "Record a finding on a tooth or region element (crown, implant, root canal, caries, …). Optionally mark the affected surfaces for a surface finding.",
1456
- "removeFinding": "Remove a single finding from a tooth.",
1471
+ "setFinding": "Record a built-in finding on a tooth or region element (crown, implant, root canal, caries, …). Optionally mark the affected surfaces for a surface finding. Structural only — to set a finding’s roots, planned/executed status, colour or note, or to chart a practice-defined finding, use set_symbol.",
1472
+ "setSymbol": "Add or replace one finding on a tooth or region element, with its own part, surfaces, roots, planned/executed status, colour override and note. Matched by `symbol.id` when the symbol carries provenance, otherwise by its condition; appended when nothing matches. Accepts practice-defined `conditionRegistry` ids as well as the built-ins.",
1473
+ "removeFinding": "Remove a finding from a tooth — every symbol carrying that condition goes, whatever its surfaces or roots. Built-in ids only.",
1457
1474
  "clearTooth": "Clear every finding from a tooth."
1458
1475
  }
1459
1476
  },
@@ -1,4 +1,4 @@
1
- import { C as e, c as C } from "../../_chunks/care-plan-card-C83Hb9EE.js";
1
+ import { C as e, c as C } from "../../_chunks/care-plan-card-CehAU7F_.js";
2
2
  export {
3
3
  e as CarePlanCard,
4
4
  C as carePlanCardAgent
@@ -1,4 +1,4 @@
1
- import { C as n, c as e } from "../../_chunks/care-plan-entry-card-CHMPSTCz.js";
1
+ import { C as n, c as e } from "../../_chunks/care-plan-entry-card-ChWRMfMw.js";
2
2
  export {
3
3
  n as CarePlanEntryCard,
4
4
  e as carePlanEntryCardAgent