@alfadocs/ui-kit-debug 0.58.0 → 0.60.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 (145) hide show
  1. package/dist/_chunks/{bishop-score-CMQxsdy4.js → bishop-score-B9tvgoIq.js} +2 -2
  2. package/dist/_chunks/{bishop-score-CMQxsdy4.js.map → bishop-score-B9tvgoIq.js.map} +1 -1
  3. package/dist/_chunks/{bmi-calculator-DuUneHuZ.js → bmi-calculator-DA2NGmVK.js} +2 -2
  4. package/dist/_chunks/{bmi-calculator-DuUneHuZ.js.map → bmi-calculator-DA2NGmVK.js.map} +1 -1
  5. package/dist/_chunks/{calendar-oYWOCrnf.js → calendar-CkuJIg3s.js} +1 -1
  6. package/dist/_chunks/{calendar-oYWOCrnf.js.map → calendar-CkuJIg3s.js.map} +1 -1
  7. package/dist/_chunks/{cycle-calculator-vTtZZAmn.js → cycle-calculator-C_t1Hs8V.js} +2 -2
  8. package/dist/_chunks/{cycle-calculator-vTtZZAmn.js.map → cycle-calculator-C_t1Hs8V.js.map} +1 -1
  9. package/dist/_chunks/date-picker-variants-CXEAx3O_.js.map +1 -1
  10. package/dist/_chunks/{due-date-calculator-CUm5KJbf.js → due-date-calculator-Q8MIwEVV.js} +2 -2
  11. package/dist/_chunks/{due-date-calculator-CUm5KJbf.js.map → due-date-calculator-Q8MIwEVV.js.map} +1 -1
  12. package/dist/_chunks/{fetal-weight-Xf8-ZoDy.js → fetal-weight-D1a6BmM-.js} +2 -2
  13. package/dist/_chunks/{fetal-weight-Xf8-ZoDy.js.map → fetal-weight-D1a6BmM-.js.map} +1 -1
  14. package/dist/_chunks/{gestational-age-calculator-830KJql3.js → gestational-age-calculator-AkNFfZYs.js} +2 -2
  15. package/dist/_chunks/{gestational-age-calculator-830KJql3.js.map → gestational-age-calculator-AkNFfZYs.js.map} +1 -1
  16. package/dist/_chunks/{hcg-doubling-kVOpDfny.js → hcg-doubling-Dg0Hr7ey.js} +2 -2
  17. package/dist/_chunks/{hcg-doubling-kVOpDfny.js.map → hcg-doubling-Dg0Hr7ey.js.map} +1 -1
  18. package/dist/_chunks/{insert-result-njqBthzT.js → insert-result-C1SYdueh.js} +125 -115
  19. package/dist/_chunks/insert-result-C1SYdueh.js.map +1 -0
  20. package/dist/_chunks/{pregnancy-dating-BA37LSkF.js → pregnancy-dating-Dg6dTe1p.js} +2 -2
  21. package/dist/_chunks/{pregnancy-dating-BA37LSkF.js.map → pregnancy-dating-Dg6dTe1p.js.map} +1 -1
  22. package/dist/_chunks/{pregnancy-weight-gain-BMRBeA8V.js → pregnancy-weight-gain-DI7X-0JX.js} +2 -2
  23. package/dist/_chunks/{pregnancy-weight-gain-BMRBeA8V.js.map → pregnancy-weight-gain-DI7X-0JX.js.map} +1 -1
  24. package/dist/_chunks/rich-text-editor-B03qM22-.js +334 -0
  25. package/dist/_chunks/rich-text-editor-B03qM22-.js.map +1 -0
  26. package/dist/_chunks/{unit-converter-BQ6lEYvd.js → unit-converter-3sINXO3m.js} +2 -2
  27. package/dist/_chunks/{unit-converter-BQ6lEYvd.js.map → unit-converter-3sINXO3m.js.map} +1 -1
  28. package/dist/agent-catalog.json +2 -2
  29. package/dist/components/_shared/safe-html.d.ts +1 -1
  30. package/dist/components/bishop-score/index.js +1 -1
  31. package/dist/components/bmi-calculator/index.js +1 -1
  32. package/dist/components/calendar/index.js +1 -1
  33. package/dist/components/cycle-calculator/index.js +1 -1
  34. package/dist/components/due-date-calculator/index.js +1 -1
  35. package/dist/components/fetal-weight/index.js +1 -1
  36. package/dist/components/gestational-age-calculator/index.js +1 -1
  37. package/dist/components/hcg-doubling/index.js +1 -1
  38. package/dist/components/pregnancy-dating/index.js +1 -1
  39. package/dist/components/pregnancy-weight-gain/index.js +1 -1
  40. package/dist/components/rich-text-editor/index.d.ts +2 -2
  41. package/dist/components/rich-text-editor/index.d.ts.map +1 -1
  42. package/dist/components/rich-text-editor/index.js +4 -7
  43. package/dist/components/rich-text-editor/rich-text-editor.agent.d.ts.map +1 -1
  44. package/dist/components/rich-text-editor/rich-text-editor.d.ts +21 -15
  45. package/dist/components/rich-text-editor/rich-text-editor.d.ts.map +1 -1
  46. package/dist/components/unit-converter/index.js +1 -1
  47. package/dist/i18n/locales/ar.d.ts +1 -0
  48. package/dist/i18n/locales/ar.d.ts.map +1 -1
  49. package/dist/i18n/locales/ar.js +1 -0
  50. package/dist/i18n/locales/ar.js.map +1 -1
  51. package/dist/i18n/locales/de.d.ts +1 -0
  52. package/dist/i18n/locales/de.d.ts.map +1 -1
  53. package/dist/i18n/locales/de.js +1 -0
  54. package/dist/i18n/locales/de.js.map +1 -1
  55. package/dist/i18n/locales/el.d.ts +1 -0
  56. package/dist/i18n/locales/el.d.ts.map +1 -1
  57. package/dist/i18n/locales/el.js +1 -0
  58. package/dist/i18n/locales/el.js.map +1 -1
  59. package/dist/i18n/locales/en.d.ts +1 -0
  60. package/dist/i18n/locales/en.d.ts.map +1 -1
  61. package/dist/i18n/locales/en.js +1 -0
  62. package/dist/i18n/locales/en.js.map +1 -1
  63. package/dist/i18n/locales/es.d.ts +1 -0
  64. package/dist/i18n/locales/es.d.ts.map +1 -1
  65. package/dist/i18n/locales/es.js +1 -0
  66. package/dist/i18n/locales/es.js.map +1 -1
  67. package/dist/i18n/locales/fr.d.ts +1 -0
  68. package/dist/i18n/locales/fr.d.ts.map +1 -1
  69. package/dist/i18n/locales/fr.js +1 -0
  70. package/dist/i18n/locales/fr.js.map +1 -1
  71. package/dist/i18n/locales/hi.d.ts +1 -0
  72. package/dist/i18n/locales/hi.d.ts.map +1 -1
  73. package/dist/i18n/locales/hi.js +1 -0
  74. package/dist/i18n/locales/hi.js.map +1 -1
  75. package/dist/i18n/locales/it.d.ts +1 -0
  76. package/dist/i18n/locales/it.d.ts.map +1 -1
  77. package/dist/i18n/locales/it.js +1 -0
  78. package/dist/i18n/locales/it.js.map +1 -1
  79. package/dist/i18n/locales/ja.d.ts +1 -0
  80. package/dist/i18n/locales/ja.d.ts.map +1 -1
  81. package/dist/i18n/locales/ja.js +1 -0
  82. package/dist/i18n/locales/ja.js.map +1 -1
  83. package/dist/i18n/locales/nl.d.ts +1 -0
  84. package/dist/i18n/locales/nl.d.ts.map +1 -1
  85. package/dist/i18n/locales/nl.js +1 -0
  86. package/dist/i18n/locales/nl.js.map +1 -1
  87. package/dist/i18n/locales/pl.d.ts +1 -0
  88. package/dist/i18n/locales/pl.d.ts.map +1 -1
  89. package/dist/i18n/locales/pl.js +1 -0
  90. package/dist/i18n/locales/pl.js.map +1 -1
  91. package/dist/i18n/locales/pt.d.ts +1 -0
  92. package/dist/i18n/locales/pt.d.ts.map +1 -1
  93. package/dist/i18n/locales/pt.js +1 -0
  94. package/dist/i18n/locales/pt.js.map +1 -1
  95. package/dist/i18n/locales/ro.d.ts +1 -0
  96. package/dist/i18n/locales/ro.d.ts.map +1 -1
  97. package/dist/i18n/locales/ro.js +1 -0
  98. package/dist/i18n/locales/ro.js.map +1 -1
  99. package/dist/i18n/locales/ru.d.ts +1 -0
  100. package/dist/i18n/locales/ru.d.ts.map +1 -1
  101. package/dist/i18n/locales/ru.js +1 -0
  102. package/dist/i18n/locales/ru.js.map +1 -1
  103. package/dist/i18n/locales/sq.d.ts +1 -0
  104. package/dist/i18n/locales/sq.d.ts.map +1 -1
  105. package/dist/i18n/locales/sq.js +1 -0
  106. package/dist/i18n/locales/sq.js.map +1 -1
  107. package/dist/i18n/locales/sv.d.ts +1 -0
  108. package/dist/i18n/locales/sv.d.ts.map +1 -1
  109. package/dist/i18n/locales/sv.js +1 -0
  110. package/dist/i18n/locales/sv.js.map +1 -1
  111. package/dist/i18n/locales/tr.d.ts +1 -0
  112. package/dist/i18n/locales/tr.d.ts.map +1 -1
  113. package/dist/i18n/locales/tr.js +1 -0
  114. package/dist/i18n/locales/tr.js.map +1 -1
  115. package/dist/i18n/locales/zh.d.ts +1 -0
  116. package/dist/i18n/locales/zh.d.ts.map +1 -1
  117. package/dist/i18n/locales/zh.js +1 -0
  118. package/dist/i18n/locales/zh.js.map +1 -1
  119. package/dist/index.js +143 -146
  120. package/dist/locales/ar.json +1 -0
  121. package/dist/locales/de.json +1 -0
  122. package/dist/locales/el.json +1 -0
  123. package/dist/locales/en.json +1 -0
  124. package/dist/locales/es.json +1 -0
  125. package/dist/locales/fr.json +1 -0
  126. package/dist/locales/hi.json +1 -0
  127. package/dist/locales/it.json +1 -0
  128. package/dist/locales/ja.json +1 -0
  129. package/dist/locales/nl.json +1 -0
  130. package/dist/locales/pl.json +1 -0
  131. package/dist/locales/pt.json +1 -0
  132. package/dist/locales/ro.json +1 -0
  133. package/dist/locales/ru.json +1 -0
  134. package/dist/locales/sq.json +1 -0
  135. package/dist/locales/sv.json +1 -0
  136. package/dist/locales/tr.json +1 -0
  137. package/dist/locales/zh.json +1 -0
  138. package/dist/safe-html/index.js.map +1 -1
  139. package/dist/tokens.css +23 -25
  140. package/package.json +2 -52
  141. package/dist/_chunks/image-C6RM5hfF.js +0 -16
  142. package/dist/_chunks/image-C6RM5hfF.js.map +0 -1
  143. package/dist/_chunks/insert-result-njqBthzT.js.map +0 -1
  144. package/dist/_chunks/rich-text-editor-DhGIBd4a.js +0 -921
  145. package/dist/_chunks/rich-text-editor-DhGIBd4a.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"unit-converter-BQ6lEYvd.js","sources":["../../src/components/unit-converter/units.ts","../../src/components/unit-converter/unit-converter.tsx"],"sourcesContent":["/* ------------------------------------------------------------------ */\n/* Generic unit conversion — pure, framework-free, unit-testable. */\n/* */\n/* Every unit is described by an affine map to its category's base */\n/* unit: base = value * factor + offset. Conversion is base-in then */\n/* base-out, so the same code handles linear scales (weight, length, */\n/* glucose) and offset scales (temperature) uniformly. */\n/* ------------------------------------------------------------------ */\n\nexport type UnitCategory = 'weight' | 'length' | 'temperature' | 'glucose';\n\nexport interface UnitDef {\n id: string;\n category: UnitCategory;\n /** Multiplier to the category base unit. */\n factor: number;\n /** Additive offset to the base unit (non-zero only for temperature). */\n offset: number;\n}\n\n/* Base units: kg, cm, °C, mmol/L. */\nexport const UNITS: Record<string, UnitDef> = {\n // weight → base kg\n kg: { id: 'kg', category: 'weight', factor: 1, offset: 0 },\n g: { id: 'g', category: 'weight', factor: 0.001, offset: 0 },\n lb: { id: 'lb', category: 'weight', factor: 0.45359237, offset: 0 },\n oz: { id: 'oz', category: 'weight', factor: 0.028349523125, offset: 0 },\n // length → base cm\n cm: { id: 'cm', category: 'length', factor: 1, offset: 0 },\n m: { id: 'm', category: 'length', factor: 100, offset: 0 },\n in: { id: 'in', category: 'length', factor: 2.54, offset: 0 },\n ft: { id: 'ft', category: 'length', factor: 30.48, offset: 0 },\n // temperature → base °C (affine: °C = °F·5/9 − 32·5/9)\n c: { id: 'c', category: 'temperature', factor: 1, offset: 0 },\n f: { id: 'f', category: 'temperature', factor: 5 / 9, offset: (-32 * 5) / 9 },\n // glucose → base mmol/L (1 mg/dL = 1/18.0156 mmol/L)\n mmol_l: { id: 'mmol_l', category: 'glucose', factor: 1, offset: 0 },\n mg_dl: { id: 'mg_dl', category: 'glucose', factor: 1 / 18.0156, offset: 0 },\n};\n\nexport const UNITS_BY_CATEGORY: Record<UnitCategory, string[]> = {\n weight: ['kg', 'g', 'lb', 'oz'],\n length: ['cm', 'm', 'in', 'ft'],\n temperature: ['c', 'f'],\n glucose: ['mmol_l', 'mg_dl'],\n};\n\nexport const CATEGORIES: UnitCategory[] = [\n 'weight',\n 'length',\n 'temperature',\n 'glucose',\n];\n\n/**\n * Convert `value` from one unit to another. Both ids must belong to the same\n * category; mismatched categories throw (a programming error, not user input).\n */\nexport function convertUnits(\n value: number,\n fromId: string,\n toId: string,\n): number {\n const from = UNITS[fromId];\n const to = UNITS[toId];\n if (!from || !to) throw new Error(`Unknown unit: ${fromId} → ${toId}`);\n if (from.category !== to.category) {\n throw new Error(\n `Cannot convert across categories: ${from.category} → ${to.category}`,\n );\n }\n const base = value * from.factor + from.offset;\n return (base - to.offset) / to.factor;\n}\n","/* ------------------------------------------------------------------ */\n/* UnitConverter — generic clinical/everyday unit conversion across */\n/* weight, length, temperature and glucose. */\n/* */\n/* Maths lives in `./units` (pure, separately tested). */\n/* ------------------------------------------------------------------ */\n\nimport { forwardRef, useEffect, useMemo, useState } from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { FormField } from '../form-field';\nimport { NumberInput } from '../number-input';\nimport { Select } from '../select';\nimport {\n InsertButton,\n type InsertPayload,\n type InsertVariant,\n type InsertMode,\n} from '../_shared/insert-result';\nimport {\n type UnitCategory,\n CATEGORIES,\n UNITS_BY_CATEGORY,\n convertUnits,\n} from './units';\n\nconst rootVariants = cva('ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]', {\n variants: {\n width: { full: 'ds:w-full', auto: 'ds:inline-flex' },\n },\n defaultVariants: { width: 'full' },\n});\n\n/**\n * DS token NAME backing the result-card category chip, one per measurement\n * family. The converter shows no on-screen badge, but the inserted card carries\n * a category chip so the reader can tell at a glance which family the figure\n * belongs to; each token is a closed-palette semantic alias resolved to a\n * concrete colour at raster time by `InsertButton`.\n */\nconst CATEGORY_HIGHLIGHT_TOKEN: Record<UnitCategory, string> = {\n weight: '--info',\n length: '--success',\n temperature: '--warning-readable',\n glucose: '--accent',\n};\n\n/**\n * Category chip token. The `temperature` family resolves to `--warning-readable`,\n * which the result card's colour probe resolves in the live themed DOM: orange-600\n * in light, non-accessible mode (where bare `--warning` yellow only reaches\n * ~3.2:1 on the white card) and `--warning` elsewhere, whose deepened ramp already\n * clears contrast. Resolving the token NAME at the card means the choice tracks\n * the live theme regardless of where the theme class lives. Other families are\n * unchanged.\n */\nfunction categoryHighlightToken(category: UnitCategory): string {\n return CATEGORY_HIGHLIGHT_TOKEN[category];\n}\n\nexport interface UnitConverterProps extends VariantProps<typeof rootVariants> {\n /** Initial category. Defaults to `'weight'`. */\n defaultCategory?: UnitCategory;\n /** Fires with the converted value (and `null` when input is empty). */\n onResultChange?: (value: number | null) => void;\n /** When provided, shows an \"Insert\" button that emits the result for an editor. */\n onInsert?: (payload: InsertPayload) => void;\n /**\n * Which verb the result button performs. Defaults to `'insert'`.\n * Use `'copy'` in an app-shell surface (no editor to insert into) — the\n * button writes the result to the clipboard as a multi-format `ClipboardItem`.\n */\n insertVariant?: InsertVariant;\n /** `copy` variant only — fired after a successful clipboard write. */\n onCopy?: (mode: InsertMode) => void;\n /** `copy` variant only — fired if the clipboard write can't proceed. */\n onError?: (error: unknown) => void;\n /**\n * Brand wordmark printed in the inserted/copied result-card footer.\n * Omitted → no brand line (and no footer hairline); a string → that custom\n * brand; `false` → no brand line. Brand is opt-in.\n */\n insertBrand?: string | false;\n /** Opaque instance id, emitted as `data-component-id`. */\n id?: string;\n /** Extra class names on the wrapper. */\n className?: string;\n}\n\nexport const UnitConverter = forwardRef<HTMLDivElement, UnitConverterProps>(\n (\n {\n defaultCategory = 'weight',\n onResultChange,\n onInsert,\n insertVariant = 'insert',\n onCopy,\n onError,\n insertBrand,\n id,\n width,\n className,\n },\n ref,\n ) => {\n const { t, i18n } = useTranslation();\n\n const [category, setCategory] = useState<UnitCategory>(defaultCategory);\n const [value, setValue] = useState<number | null>(null);\n const [fromId, setFromId] = useState<string>(\n UNITS_BY_CATEGORY[defaultCategory][0],\n );\n const [toId, setToId] = useState<string>(\n UNITS_BY_CATEGORY[defaultCategory][1],\n );\n\n const handleCategoryChange = (next: string): void => {\n const cat = next as UnitCategory;\n const units = UNITS_BY_CATEGORY[cat];\n setCategory(cat);\n setFromId(units[0]);\n setToId(units[1] ?? units[0]);\n };\n\n const converted = useMemo(\n () => (value === null ? null : convertUnits(value, fromId, toId)),\n [value, fromId, toId],\n );\n\n const numberFmt = useMemo(\n () => new Intl.NumberFormat(i18n.language, { maximumFractionDigits: 3 }),\n [i18n.language],\n );\n\n useEffect(() => {\n onResultChange?.(converted);\n }, [converted, onResultChange]);\n\n const categoryOptions = CATEGORIES.map((c) => ({\n value: c,\n label: t(`unitConverter.category.${c}`),\n }));\n const unitOptions = UNITS_BY_CATEGORY[category].map((u) => ({\n value: u,\n label: t(`unitConverter.units.${u}`),\n }));\n\n return (\n <div\n ref={ref}\n data-component=\"unit-converter\"\n data-component-id={id}\n className={rootVariants({ width, className })}\n >\n <FormField label={t('unitConverter.categoryLabel')}>\n <Select\n options={categoryOptions}\n value={category}\n onValueChange={handleCategoryChange}\n />\n </FormField>\n\n <div className=\"ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-3\">\n <FormField label={t('unitConverter.value')}>\n <NumberInput mode=\"decimal\" value={value} onChange={setValue} />\n </FormField>\n <FormField label={t('unitConverter.from')}>\n <Select\n options={unitOptions}\n value={fromId}\n onValueChange={setFromId}\n />\n </FormField>\n <FormField label={t('unitConverter.to')}>\n <Select\n options={unitOptions}\n value={toId}\n onValueChange={setToId}\n />\n </FormField>\n </div>\n\n <p className=\"ds:sr-only\" role=\"status\" aria-live=\"polite\">\n {converted !== null\n ? `${numberFmt.format(value ?? 0)} ${t(\n `unitConverter.units.${fromId}`,\n )} = ${numberFmt.format(converted)} ${t(\n `unitConverter.units.${toId}`,\n )}`\n : ''}\n </p>\n\n {converted !== null ? (\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]\">\n <span className=\"type-label ds:text-muted-foreground\">\n {t('unitConverter.result')}\n </span>\n <span className=\"type-metric ds:text-foreground\">\n {numberFmt.format(converted)} {t(`unitConverter.units.${toId}`)}\n </span>\n {insertVariant === 'copy' || onInsert ? (\n <InsertButton\n variant={insertVariant}\n onInsert={onInsert}\n onCopy={onCopy}\n onError={onError}\n card={{\n title: t('insert.title.unitConverter'),\n icon: 'ruler',\n highlight: t(`unitConverter.category.${category}`),\n // Chip tints by measurement family so the inserted card\n // signals the category at a glance — with the contrast-safe\n // orange override for the `--warning` temperature family.\n highlightToken: categoryHighlightToken(category),\n brand: insertBrand,\n fields: [\n {\n // Source measurement → ruler glyph (matches the header).\n icon: 'ruler',\n label: t('unitConverter.from'),\n value: `${numberFmt.format(value ?? 0)} ${t(\n `unitConverter.units.${fromId}`,\n )}`,\n },\n {\n // Converted result → trending-up (arrow) glyph signals the\n // conversion direction to the output value.\n icon: 'trending-up',\n label: t('unitConverter.to'),\n value: `${numberFmt.format(converted)} ${t(\n `unitConverter.units.${toId}`,\n )}`,\n },\n ],\n }}\n />\n ) : null}\n </div>\n ) : (\n <p className=\"type-body ds:text-muted-foreground\">\n {t('unitConverter.empty')}\n </p>\n )}\n </div>\n );\n },\n);\n\nUnitConverter.displayName = 'UnitConverter';\n"],"names":["UNITS","UNITS_BY_CATEGORY","CATEGORIES","convertUnits","value","fromId","toId","from","to","rootVariants","cva","CATEGORY_HIGHLIGHT_TOKEN","categoryHighlightToken","category","UnitConverter","forwardRef","defaultCategory","onResultChange","onInsert","insertVariant","onCopy","onError","insertBrand","id","width","className","ref","i18n","useTranslation","setCategory","useState","setValue","setFromId","setToId","handleCategoryChange","next","cat","units","converted","useMemo","numberFmt","useEffect","categoryOptions","c","unitOptions","u","jsxs","jsx","FormField","Select","NumberInput","InsertButton"],"mappings":";;;;;;;;AAqBO,MAAMA,IAAiC;AAAA;AAAA,EAE5C,IAAI,EAAE,IAAI,MAAM,UAAU,UAAU,QAAQ,GAAG,QAAQ,EAAA;AAAA,EACvD,GAAG,EAAE,IAAI,KAAK,UAAU,UAAU,QAAQ,MAAO,QAAQ,EAAA;AAAA,EACzD,IAAI,EAAE,IAAI,MAAM,UAAU,UAAU,QAAQ,YAAY,QAAQ,EAAA;AAAA,EAChE,IAAI,EAAE,IAAI,MAAM,UAAU,UAAU,QAAQ,gBAAgB,QAAQ,EAAA;AAAA;AAAA,EAEpE,IAAI,EAAE,IAAI,MAAM,UAAU,UAAU,QAAQ,GAAG,QAAQ,EAAA;AAAA,EACvD,GAAG,EAAE,IAAI,KAAK,UAAU,UAAU,QAAQ,KAAK,QAAQ,EAAA;AAAA,EACvD,IAAI,EAAE,IAAI,MAAM,UAAU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M;AAAA,sBAAA,CAC9B;AAAA,oBAAA;AAAA,oBAEH;AAAA;AAAA;AAAA,sBAGE,MAAM;AAAA,sBACN,OAAO,EAAE,kBAAkB;AAAA,sBAC3B,OAAO,GAAGmC,EAAU,OAAOF,CAAS,CAAC,IAAI;AAAA,wBACvC,uBAAuBhC,CAAI;AAAA,sBAAA,CAC5B;AAAA,oBAAA;AAAA,kBACH;AAAA,gBACF;AAAA,cACF;AAAA,YAAA,IAEA;AAAA,UAAA,GACN,IAEA,gBAAAyC,EAAC,KAAA,EAAE,WAAU,sCACV,UAAA,EAAE,qBAAqB,EAAA,CAC1B;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF;AAEAjC,EAAc,cAAc;"}
1
+ {"version":3,"file":"unit-converter-3sINXO3m.js","sources":["../../src/components/unit-converter/units.ts","../../src/components/unit-converter/unit-converter.tsx"],"sourcesContent":["/* ------------------------------------------------------------------ */\n/* Generic unit conversion — pure, framework-free, unit-testable. */\n/* */\n/* Every unit is described by an affine map to its category's base */\n/* unit: base = value * factor + offset. Conversion is base-in then */\n/* base-out, so the same code handles linear scales (weight, length, */\n/* glucose) and offset scales (temperature) uniformly. */\n/* ------------------------------------------------------------------ */\n\nexport type UnitCategory = 'weight' | 'length' | 'temperature' | 'glucose';\n\nexport interface UnitDef {\n id: string;\n category: UnitCategory;\n /** Multiplier to the category base unit. */\n factor: number;\n /** Additive offset to the base unit (non-zero only for temperature). */\n offset: number;\n}\n\n/* Base units: kg, cm, °C, mmol/L. */\nexport const UNITS: Record<string, UnitDef> = {\n // weight → base kg\n kg: { id: 'kg', category: 'weight', factor: 1, offset: 0 },\n g: { id: 'g', category: 'weight', factor: 0.001, offset: 0 },\n lb: { id: 'lb', category: 'weight', factor: 0.45359237, offset: 0 },\n oz: { id: 'oz', category: 'weight', factor: 0.028349523125, offset: 0 },\n // length → base cm\n cm: { id: 'cm', category: 'length', factor: 1, offset: 0 },\n m: { id: 'm', category: 'length', factor: 100, offset: 0 },\n in: { id: 'in', category: 'length', factor: 2.54, offset: 0 },\n ft: { id: 'ft', category: 'length', factor: 30.48, offset: 0 },\n // temperature → base °C (affine: °C = °F·5/9 − 32·5/9)\n c: { id: 'c', category: 'temperature', factor: 1, offset: 0 },\n f: { id: 'f', category: 'temperature', factor: 5 / 9, offset: (-32 * 5) / 9 },\n // glucose → base mmol/L (1 mg/dL = 1/18.0156 mmol/L)\n mmol_l: { id: 'mmol_l', category: 'glucose', factor: 1, offset: 0 },\n mg_dl: { id: 'mg_dl', category: 'glucose', factor: 1 / 18.0156, offset: 0 },\n};\n\nexport const UNITS_BY_CATEGORY: Record<UnitCategory, string[]> = {\n weight: ['kg', 'g', 'lb', 'oz'],\n length: ['cm', 'm', 'in', 'ft'],\n temperature: ['c', 'f'],\n glucose: ['mmol_l', 'mg_dl'],\n};\n\nexport const CATEGORIES: UnitCategory[] = [\n 'weight',\n 'length',\n 'temperature',\n 'glucose',\n];\n\n/**\n * Convert `value` from one unit to another. Both ids must belong to the same\n * category; mismatched categories throw (a programming error, not user input).\n */\nexport function convertUnits(\n value: number,\n fromId: string,\n toId: string,\n): number {\n const from = UNITS[fromId];\n const to = UNITS[toId];\n if (!from || !to) throw new Error(`Unknown unit: ${fromId} → ${toId}`);\n if (from.category !== to.category) {\n throw new Error(\n `Cannot convert across categories: ${from.category} → ${to.category}`,\n );\n }\n const base = value * from.factor + from.offset;\n return (base - to.offset) / to.factor;\n}\n","/* ------------------------------------------------------------------ */\n/* UnitConverter — generic clinical/everyday unit conversion across */\n/* weight, length, temperature and glucose. */\n/* */\n/* Maths lives in `./units` (pure, separately tested). */\n/* ------------------------------------------------------------------ */\n\nimport { forwardRef, useEffect, useMemo, useState } from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { FormField } from '../form-field';\nimport { NumberInput } from '../number-input';\nimport { Select } from '../select';\nimport {\n InsertButton,\n type InsertPayload,\n type InsertVariant,\n type InsertMode,\n} from '../_shared/insert-result';\nimport {\n type UnitCategory,\n CATEGORIES,\n UNITS_BY_CATEGORY,\n convertUnits,\n} from './units';\n\nconst rootVariants = cva('ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]', {\n variants: {\n width: { full: 'ds:w-full', auto: 'ds:inline-flex' },\n },\n defaultVariants: { width: 'full' },\n});\n\n/**\n * DS token NAME backing the result-card category chip, one per measurement\n * family. The converter shows no on-screen badge, but the inserted card carries\n * a category chip so the reader can tell at a glance which family the figure\n * belongs to; each token is a closed-palette semantic alias resolved to a\n * concrete colour at raster time by `InsertButton`.\n */\nconst CATEGORY_HIGHLIGHT_TOKEN: Record<UnitCategory, string> = {\n weight: '--info',\n length: '--success',\n temperature: '--warning-readable',\n glucose: '--accent',\n};\n\n/**\n * Category chip token. The `temperature` family resolves to `--warning-readable`,\n * which the result card's colour probe resolves in the live themed DOM: orange-600\n * in light, non-accessible mode (where bare `--warning` yellow only reaches\n * ~3.2:1 on the white card) and `--warning` elsewhere, whose deepened ramp already\n * clears contrast. Resolving the token NAME at the card means the choice tracks\n * the live theme regardless of where the theme class lives. Other families are\n * unchanged.\n */\nfunction categoryHighlightToken(category: UnitCategory): string {\n return CATEGORY_HIGHLIGHT_TOKEN[category];\n}\n\nexport interface UnitConverterProps extends VariantProps<typeof rootVariants> {\n /** Initial category. Defaults to `'weight'`. */\n defaultCategory?: UnitCategory;\n /** Fires with the converted value (and `null` when input is empty). */\n onResultChange?: (value: number | null) => void;\n /** When provided, shows an \"Insert\" button that emits the result for an editor. */\n onInsert?: (payload: InsertPayload) => void;\n /**\n * Which verb the result button performs. Defaults to `'insert'`.\n * Use `'copy'` in an app-shell surface (no editor to insert into) — the\n * button writes the result to the clipboard as a multi-format `ClipboardItem`.\n */\n insertVariant?: InsertVariant;\n /** `copy` variant only — fired after a successful clipboard write. */\n onCopy?: (mode: InsertMode) => void;\n /** `copy` variant only — fired if the clipboard write can't proceed. */\n onError?: (error: unknown) => void;\n /**\n * Brand wordmark printed in the inserted/copied result-card footer.\n * Omitted → no brand line (and no footer hairline); a string → that custom\n * brand; `false` → no brand line. Brand is opt-in.\n */\n insertBrand?: string | false;\n /** Opaque instance id, emitted as `data-component-id`. */\n id?: string;\n /** Extra class names on the wrapper. */\n className?: string;\n}\n\nexport const UnitConverter = forwardRef<HTMLDivElement, UnitConverterProps>(\n (\n {\n defaultCategory = 'weight',\n onResultChange,\n onInsert,\n insertVariant = 'insert',\n onCopy,\n onError,\n insertBrand,\n id,\n width,\n className,\n },\n ref,\n ) => {\n const { t, i18n } = useTranslation();\n\n const [category, setCategory] = useState<UnitCategory>(defaultCategory);\n const [value, setValue] = useState<number | null>(null);\n const [fromId, setFromId] = useState<string>(\n UNITS_BY_CATEGORY[defaultCategory][0],\n );\n const [toId, setToId] = useState<string>(\n UNITS_BY_CATEGORY[defaultCategory][1],\n );\n\n const handleCategoryChange = (next: string): void => {\n const cat = next as UnitCategory;\n const units = UNITS_BY_CATEGORY[cat];\n setCategory(cat);\n setFromId(units[0]);\n setToId(units[1] ?? units[0]);\n };\n\n const converted = useMemo(\n () => (value === null ? null : convertUnits(value, fromId, toId)),\n [value, fromId, toId],\n );\n\n const numberFmt = useMemo(\n () => new Intl.NumberFormat(i18n.language, { maximumFractionDigits: 3 }),\n [i18n.language],\n );\n\n useEffect(() => {\n onResultChange?.(converted);\n }, [converted, onResultChange]);\n\n const categoryOptions = CATEGORIES.map((c) => ({\n value: c,\n label: t(`unitConverter.category.${c}`),\n }));\n const unitOptions = UNITS_BY_CATEGORY[category].map((u) => ({\n value: u,\n label: t(`unitConverter.units.${u}`),\n }));\n\n return (\n <div\n ref={ref}\n data-component=\"unit-converter\"\n data-component-id={id}\n className={rootVariants({ width, className })}\n >\n <FormField label={t('unitConverter.categoryLabel')}>\n <Select\n options={categoryOptions}\n value={category}\n onValueChange={handleCategoryChange}\n />\n </FormField>\n\n <div className=\"ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-3\">\n <FormField label={t('unitConverter.value')}>\n <NumberInput mode=\"decimal\" value={value} onChange={setValue} />\n </FormField>\n <FormField label={t('unitConverter.from')}>\n <Select\n options={unitOptions}\n value={fromId}\n onValueChange={setFromId}\n />\n </FormField>\n <FormField label={t('unitConverter.to')}>\n <Select\n options={unitOptions}\n value={toId}\n onValueChange={setToId}\n />\n </FormField>\n </div>\n\n <p className=\"ds:sr-only\" role=\"status\" aria-live=\"polite\">\n {converted !== null\n ? `${numberFmt.format(value ?? 0)} ${t(\n `unitConverter.units.${fromId}`,\n )} = ${numberFmt.format(converted)} ${t(\n `unitConverter.units.${toId}`,\n )}`\n : ''}\n </p>\n\n {converted !== null ? (\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]\">\n <span className=\"type-label ds:text-muted-foreground\">\n {t('unitConverter.result')}\n </span>\n <span className=\"type-metric ds:text-foreground\">\n {numberFmt.format(converted)} {t(`unitConverter.units.${toId}`)}\n </span>\n {insertVariant === 'copy' || onInsert ? (\n <InsertButton\n variant={insertVariant}\n onInsert={onInsert}\n onCopy={onCopy}\n onError={onError}\n card={{\n title: t('insert.title.unitConverter'),\n icon: 'ruler',\n highlight: t(`unitConverter.category.${category}`),\n // Chip tints by measurement family so the inserted card\n // signals the category at a glance — with the contrast-safe\n // orange override for the `--warning` temperature family.\n highlightToken: categoryHighlightToken(category),\n brand: insertBrand,\n fields: [\n {\n // Source measurement → ruler glyph (matches the header).\n icon: 'ruler',\n label: t('unitConverter.from'),\n value: `${numberFmt.format(value ?? 0)} ${t(\n `unitConverter.units.${fromId}`,\n )}`,\n },\n {\n // Converted result → trending-up (arrow) glyph signals the\n // conversion direction to the output value.\n icon: 'trending-up',\n label: t('unitConverter.to'),\n value: `${numberFmt.format(converted)} ${t(\n `unitConverter.units.${toId}`,\n )}`,\n },\n ],\n }}\n />\n ) : null}\n </div>\n ) : (\n <p className=\"type-body ds:text-muted-foreground\">\n {t('unitConverter.empty')}\n </p>\n )}\n </div>\n );\n },\n);\n\nUnitConverter.displayName = 'UnitConverter';\n"],"names":["UNITS","UNITS_BY_CATEGORY","CATEGORIES","convertUnits","value","fromId","toId","from","to","rootVariants","cva","CATEGORY_HIGHLIGHT_TOKEN","categoryHighlightToken","category","UnitConverter","forwardRef","defaultCategory","onResultChange","onInsert","insertVariant","onCopy","onError","insertBrand","id","width","className","ref","i18n","useTranslation","setCategory","useState","setValue","setFromId","setToId","handleCategoryChange","next","cat","units","converted","useMemo","numberFmt","useEffect","categoryOptions","c","unitOptions","u","jsxs","jsx","FormField","Select","NumberInput","InsertButton"],"mappings":";;;;;;;;AAqBO,MAAMA,IAAiC;AAAA;AAAA,EAE5C,IAAI,EAAE,IAAI,MAAM,UAAU,UAAU,QAAQ,GAAG,QAAQ,EAAA;AAAA,EACvD,GAAG,EAAE,IAAI,KAAK,UAAU,UAAU,QAAQ,MAAO,QAAQ,EAAA;AAAA,EACzD,IAAI,EAAE,IAAI,MAAM,UAAU,UAAU,QAAQ,YAAY,QAAQ,EAAA;AAAA,EAChE,IAAI,EAAE,IAAI,MAAM,UAAU,UAAU,QAAQ,gBAAgB,QAAQ,EAAA;AAAA;AAAA,EAEpE,IAAI,EAAE,IAAI,MAAM,UAAU,UAAU,QAAQ,GAAG,QAAQ,EAAA;AAAA,EACvD,GAAG,EAAE,IAAI,KAAK,UAAU,UAAU,QAAQ,KAAK,QAAQ,EAAA;AAAA,EACvD,IAAI,EAAE,IAAI,MAAM,UAAU,UAAU,QAAQ,MAAM,QAAQ,EAAA;AAAA,EAC1D,IAAI,EAAE,IAAI,MAAM,UAAU,UAAU,QAAQ,OAAO,QAAQ,EAAA;AAAA;AAAA,EAE3D,GAAG,EAAE,IAAI,KAAK,UAAU,eAAe,QAAQ,GAAG,QAAQ,EAAA;AAAA,EAC1D,GAAG,EAAE,IAAI,KAAK,UAAU,eAAe,QAAQ,IAAI,GAAG,QAAS,OAAW,EAAA;AAAA;AAAA,EAE1E,QAAQ,EAAE,IAAI,UAAU,UAAU,WAAW,QAAQ,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AAU,sCACV,UAAA,EAAE,qBAAqB,EAAA,CAC1B;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF;AAEAjC,EAAc,cAAc;"}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "packageVersion": "0.58.0",
3
+ "packageVersion": "0.60.0",
4
4
  "components": [
5
5
  {
6
6
  "kind": "component",
@@ -3587,7 +3587,7 @@
3587
3587
  {
3588
3588
  "name": "markdown",
3589
3589
  "type": "string",
3590
- "description": "Markdown representation of the editor content."
3590
+ "description": "Markdown representation of the editor content. The Redactor engine has no native Markdown serialiser, so this is always empty — read `html` instead."
3591
3591
  }
3592
3592
  ],
3593
3593
  "actions": [
@@ -11,7 +11,7 @@ import { type HTMLAttributes } from 'react';
11
11
  * strong/em, simple code, lists). Used by ChatMessage's LLM output.
12
12
  * - `email` — paragraphs + links only; everything else coerced to text.
13
13
  * Used for rendering transactional email previews.
14
- * - `rich-text`— full Tiptap-compatible HTML (headings, lists, tables,
14
+ * - `rich-text`— full Redactor-compatible HTML (headings, lists, tables,
15
15
  * inline formatting, safe images, safe links). Used by RichTextEditor
16
16
  * when setting / reading content programmatically.
17
17
  *
@@ -1,4 +1,4 @@
1
- import { B as O, a as S, b as o, c as B, d as P, e } from "../../_chunks/bishop-score-CMQxsdy4.js";
1
+ import { B as O, a as S, b as o, c as B, d as P, e } from "../../_chunks/bishop-score-B9tvgoIq.js";
2
2
  export {
3
3
  O as BISHOP_COMPONENTS,
4
4
  S as BISHOP_MAX_SCORE,
@@ -1,4 +1,4 @@
1
- import { B as m } from "../../_chunks/bmi-calculator-DuUneHuZ.js";
1
+ import { B as m } from "../../_chunks/bmi-calculator-DA2NGmVK.js";
2
2
  import { b as e, a as t, c as r, d as T, e as c, f as i, i as b, k as n, l as f } from "../../_chunks/bmi-BxD-tFzU.js";
3
3
  export {
4
4
  m as BmiCalculator,
@@ -1,4 +1,4 @@
1
- import { C as r, c as l, r as n } from "../../_chunks/calendar-oYWOCrnf.js";
1
+ import { C as r, c as l, r as n } from "../../_chunks/calendar-CkuJIg3s.js";
2
2
  export {
3
3
  r as Calendar,
4
4
  l as calendarAgent,
@@ -1,4 +1,4 @@
1
- import { C as e, L as l, p as r } from "../../_chunks/cycle-calculator-vTtZZAmn.js";
1
+ import { C as e, L as l, p as r } from "../../_chunks/cycle-calculator-C_t1Hs8V.js";
2
2
  export {
3
3
  e as CycleCalculator,
4
4
  l as LUTEAL_PHASE_DAYS,
@@ -1,4 +1,4 @@
1
- import { D as e } from "../../_chunks/due-date-calculator-CUm5KJbf.js";
1
+ import { D as e } from "../../_chunks/due-date-calculator-Q8MIwEVV.js";
2
2
  import { C as r, a as o, D, G as _, M as T, T as M, c as E, b as l, g as C, p as A, r as N, d as i, t as n } from "../../_chunks/antenatal-schedule-timeline-CdiqkF05.js";
3
3
  export {
4
4
  r as CRL_DATING_MAX_MM,
@@ -1,4 +1,4 @@
1
- import { F as a, e as i } from "../../_chunks/fetal-weight-Xf8-ZoDy.js";
1
+ import { F as a, e as i } from "../../_chunks/fetal-weight-D1a6BmM-.js";
2
2
  export {
3
3
  a as FetalWeight,
4
4
  i as estimateFetalWeight
@@ -1,4 +1,4 @@
1
- import { G as t } from "../../_chunks/gestational-age-calculator-830KJql3.js";
1
+ import { G as t } from "../../_chunks/gestational-age-calculator-AkNFfZYs.js";
2
2
  export {
3
3
  t as GestationalAgeCalculator
4
4
  };
@@ -1,4 +1,4 @@
1
- import { H, M as g, a as o } from "../../_chunks/hcg-doubling-kVOpDfny.js";
1
+ import { H, M as g, a as o } from "../../_chunks/hcg-doubling-Dg0Hr7ey.js";
2
2
  export {
3
3
  H as HcgDoubling,
4
4
  g as MINIMAL_48H_RISE_PERCENT,
@@ -1,4 +1,4 @@
1
- import { P as r } from "../../_chunks/pregnancy-dating-BA37LSkF.js";
1
+ import { P as r } from "../../_chunks/pregnancy-dating-Dg6dTe1p.js";
2
2
  export {
3
3
  r as PregnancyDating
4
4
  };
@@ -1,4 +1,4 @@
1
- import { P as s, R as n, T as i, a as r, r as A } from "../../_chunks/pregnancy-weight-gain-BMRBeA8V.js";
1
+ import { P as s, R as n, T as i, a as r, r as A } from "../../_chunks/pregnancy-weight-gain-DI7X-0JX.js";
2
2
  export {
3
3
  s as PregnancyWeightGain,
4
4
  n as RATE_BANDS,
@@ -1,4 +1,4 @@
1
- export { RichTextEditor, toolbarButtonVariants, toolbarVariants, wrapperVariants, editorSurfaceVariants, } from './rich-text-editor';
2
- export type { RichTextEditorHandle, RichTextEditorProps, RichTextEditorToolbar, } from './rich-text-editor';
1
+ export { RichTextEditor, wrapperVariants } from './rich-text-editor';
2
+ export type { RichTextEditorHandle, RichTextEditorProps, RichTextEditorToolbar, RedactorFactory, } from './rich-text-editor';
3
3
  export { richTextEditorAgent } from './rich-text-editor.agent';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/rich-text-editor/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,eAAe,EACf,eAAe,EACf,qBAAqB,GACtB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EACV,oBAAoB,EACpB,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/rich-text-editor/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrE,YAAY,EACV,oBAAoB,EACpB,mBAAmB,EACnB,qBAAqB,EACrB,eAAe,GAChB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC"}
@@ -1,10 +1,7 @@
1
- import { R as t, e as o, r as s, t as i, a as e, w as n } from "../../_chunks/rich-text-editor-DhGIBd4a.js";
1
+ import { R as a, r as e, w as i } from "../../_chunks/rich-text-editor-B03qM22-.js";
2
2
  export {
3
- t as RichTextEditor,
4
- o as editorSurfaceVariants,
5
- s as richTextEditorAgent,
6
- i as toolbarButtonVariants,
7
- e as toolbarVariants,
8
- n as wrapperVariants
3
+ a as RichTextEditor,
4
+ e as richTextEditorAgent,
5
+ i as wrapperVariants
9
6
  };
10
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"rich-text-editor.agent.d.ts","sourceRoot":"","sources":["../../../src/components/rich-text-editor/rich-text-editor.agent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE/D,eAAO,MAAM,mBAAmB,EAAE,YAAY,CAAC,oBAAoB,CA+ClE,CAAC"}
1
+ {"version":3,"file":"rich-text-editor.agent.d.ts","sourceRoot":"","sources":["../../../src/components/rich-text-editor/rich-text-editor.agent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE/D,eAAO,MAAM,mBAAmB,EAAE,YAAY,CAAC,oBAAoB,CAgDlE,CAAC"}
@@ -1,18 +1,19 @@
1
- import '../../tokens/themes/bridges/tiptap-theme.css';
1
+ import '../../tokens/themes/bridges/redactor-theme.css';
2
+ export type RedactorFactory = (selector: string | HTMLElement, command?: unknown, ...args: unknown[]) => unknown;
2
3
  export type RichTextEditorToolbar = 'minimal' | 'standard' | 'full';
3
4
  export interface RichTextEditorProps {
4
5
  /** Opaque instance id — emitted as `data-component-id` for the agent registry. */
5
6
  id?: string;
6
- /** HTML or Markdown initial value. Runs through DOMPurify. */
7
+ /** HTML initial value (uncontrolled). Runs through DOMPurify. */
7
8
  defaultValue?: string;
8
- /** Controlled value (HTML). */
9
+ /** Controlled value (HTML). Sanitised; synced with a skip-once caret guard. */
9
10
  value?: string;
10
- /** Emits on every change — debounced by 100ms. */
11
+ /** Emits on every change — debounced 100ms. `markdown` is '' (Redactor has no serializer). */
11
12
  onChange?: (payload: {
12
13
  html: string;
13
14
  markdown: string;
14
15
  }) => void;
15
- /** Toolbar preset. */
16
+ /** Toolbar preset → Redactor `buttons`. */
16
17
  toolbar?: RichTextEditorToolbar;
17
18
  /** Placeholder text — translates via useTranslation if omitted. */
18
19
  placeholder?: string;
@@ -24,24 +25,29 @@ export interface RichTextEditorProps {
24
25
  minHeight?: 'sm' | 'md' | 'lg';
25
26
  /** Extra class names on the wrapper. */
26
27
  className?: string;
28
+ /** Inject the Redactor factory explicitly; else `window.$R` / `window.Redactor`. */
29
+ redactor?: RedactorFactory;
30
+ /** Raw Redactor options, deep-merged LAST over the kit defaults (callbacks reserved). */
31
+ options?: Record<string, unknown>;
32
+ /** Redactor plugin names to enable (the consumer must register/load them). */
33
+ plugins?: string[];
34
+ /** Redactor lang code; default derived from the active i18n locale. */
35
+ lang?: string;
36
+ /** Consumer image-upload endpoint → Redactor `imageUpload`. Omitted if absent. */
37
+ imageUploadUrl?: string;
38
+ /** App keyboard-shortcut seam (e.g. Ctrl/Cmd+Enter to save). */
39
+ onKeyDown?: (event: KeyboardEvent) => void;
27
40
  }
28
41
  export interface RichTextEditorHandle {
29
42
  getHTML: () => string;
43
+ /** Always '' — Redactor has no native Markdown serializer (see MDX). */
30
44
  getMarkdown: () => string;
31
- /** HTML goes through DOMPurify before reaching Tiptap. */
45
+ /** HTML goes through DOMPurify before reaching Redactor. */
32
46
  setContent: (html: string) => void;
33
47
  focus: () => void;
34
48
  clear: () => void;
35
49
  }
36
50
  declare const wrapperVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
37
- declare const toolbarVariants: (props?: ({
38
- direction?: "ltr" | "rtl" | null | undefined;
39
- } & import("class-variance-authority/types").ClassProp) | undefined) => string;
40
- declare const toolbarButtonVariants: (props?: ({
41
- pressed?: boolean | null | undefined;
42
- disabled?: boolean | null | undefined;
43
- } & import("class-variance-authority/types").ClassProp) | undefined) => string;
44
- declare const editorSurfaceVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
45
51
  export declare const RichTextEditor: import("react").ForwardRefExoticComponent<RichTextEditorProps & import("react").RefAttributes<RichTextEditorHandle>>;
46
- export { toolbarButtonVariants, toolbarVariants, wrapperVariants, editorSurfaceVariants, };
52
+ export { wrapperVariants };
47
53
  //# sourceMappingURL=rich-text-editor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rich-text-editor.d.ts","sourceRoot":"","sources":["../../../src/components/rich-text-editor/rich-text-editor.tsx"],"names":[],"mappings":"AAuEA,OAAO,8CAA8C,CAAC;AA4CtD,MAAM,MAAM,qBAAqB,GAAG,SAAS,GAAG,UAAU,GAAG,MAAM,CAAC;AAEpE,MAAM,WAAW,mBAAmB;IAClC,kFAAkF;IAClF,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,8DAA8D;IAC9D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,+BAA+B;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kDAAkD;IAClD,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IACjE,sBAAsB;IACtB,OAAO,CAAC,EAAE,qBAAqB,CAAC;IAChC,mEAAmE;IACnE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sBAAsB;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,8CAA8C;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qEAAqE;IACrE,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC/B,wCAAwC;IACxC,SAAS,CAAC,EAAE,M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2C;IAC3C,OAAO,CAAC,EAAE,qBAAqB,CAAC;IAChC,mEAAmE;IACnE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sBAAsB;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,8CAA8C;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qEAAqE;IACrE,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC/B,wCAAwC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;IAGnB,oFAAoF;IACpF,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,yFAAyF;IACzF,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,8EAA8E;IAC9E,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,uEAAuE;IACvE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,kFAAkF;IAClF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gEAAgE;IAChE,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;CAC5C;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,MAAM,CAAC;IACtB,wEAAwE;IACxE,WAAW,EAAE,MAAM,MAAM,CAAC;IAC1B,4DAA4D;IAC5D,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAiDD,QAAA,MAAM,eAAe,oFAEpB,CAAC;AAsBF,eAAO,MAAM,cAAc,sHA2S1B,CAAC;AAIF,OAAO,EAAE,eAAe,EAAE,CAAC"}
@@ -1,4 +1,4 @@
1
- import { C as r, U as t, a as U, b as e, c as n } from "../../_chunks/unit-converter-BQ6lEYvd.js";
1
+ import { C as r, U as t, a as U, b as e, c as n } from "../../_chunks/unit-converter-3sINXO3m.js";
2
2
  export {
3
3
  r as CATEGORIES,
4
4
  t as UNITS,
@@ -1655,6 +1655,7 @@ export declare const arUi: {
1655
1655
  };
1656
1656
  readonly editor: {
1657
1657
  readonly toolbarLabel: "تنسيق النص";
1658
+ readonly regionLabel: "محرر النص المنسق";
1658
1659
  readonly placeholder: "ابدأ الكتابة…";
1659
1660
  readonly bold: "غامق";
1660
1661
  readonly italic: "مائل";
@@ -1 +1 @@
1
- {"version":3,"file":"ar.d.ts","sourceRoot":"","sources":["../../../src/i18n/locales/ar.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8lFP,CAAC"}
@@ -1638,6 +1638,7 @@ const e = {
1638
1638
  },
1639
1639
  editor: {
1640
1640
  toolbarLabel: "تنسيق النص",
1641
+ regionLabel: "محرر النص المنسق",
1641
1642
  placeholder: "ابدأ الكتابة…",
1642
1643
  bold: "غامق",
1643
1644
  italic: "مائل",