@alfadocs/ui-kit 0.43.0 → 0.44.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 (34) hide show
  1. package/dist/_chunks/{bmi-calculator-DuVSFDuw.js → bmi-calculator-DFPWL2OJ.js} +92 -78
  2. package/dist/_chunks/{calculator-dialog-DdexHrTP.js → calculator-dialog-D-nfvteH.js} +2 -2
  3. package/dist/_chunks/{cycle-calculator-Dln-y1k_.js → cycle-calculator-ChHBcjet.js} +58 -50
  4. package/dist/_chunks/dialog-BTpZV6It.js +223 -0
  5. package/dist/_chunks/{due-date-calculator-Cc4dRqTI.js → due-date-calculator-CYXKLoof.js} +50 -38
  6. package/dist/_chunks/gestational-age-calculator-sRmoqgVr.js +190 -0
  7. package/dist/_chunks/insert-result-CoC1oo6R.js +334 -0
  8. package/dist/_chunks/{pregnancy-weight-gain-zZL5Ir2-.js → pregnancy-weight-gain-C5YhfYnL.js} +66 -57
  9. package/dist/_chunks/{unit-converter-CuXCXJhK.js → unit-converter-Ds9jalbN.js} +78 -67
  10. package/dist/agent-catalog.json +1 -1
  11. package/dist/components/_shared/index.d.ts +1 -1
  12. package/dist/components/_shared/insert-result.d.ts +100 -10
  13. package/dist/components/bmi-calculator/bmi-calculator.d.ts +6 -0
  14. package/dist/components/bmi-calculator/index.js +1 -1
  15. package/dist/components/calculator-dialog/index.js +1 -1
  16. package/dist/components/cycle-calculator/cycle-calculator.d.ts +6 -0
  17. package/dist/components/cycle-calculator/index.js +1 -1
  18. package/dist/components/dialog/dialog.d.ts +1 -0
  19. package/dist/components/dialog/index.js +1 -1
  20. package/dist/components/due-date-calculator/due-date-calculator.d.ts +6 -0
  21. package/dist/components/due-date-calculator/index.js +1 -1
  22. package/dist/components/gestational-age-calculator/gestational-age-calculator.d.ts +6 -0
  23. package/dist/components/gestational-age-calculator/index.js +1 -1
  24. package/dist/components/index.d.ts +1 -1
  25. package/dist/components/pregnancy-weight-gain/index.js +1 -1
  26. package/dist/components/pregnancy-weight-gain/pregnancy-weight-gain.d.ts +6 -0
  27. package/dist/components/unit-converter/index.js +1 -1
  28. package/dist/components/unit-converter/unit-converter.d.ts +6 -0
  29. package/dist/index.js +494 -493
  30. package/dist/tokens.css +1 -1
  31. package/package.json +1 -1
  32. package/dist/_chunks/dialog-DOYgd75U.js +0 -224
  33. package/dist/_chunks/gestational-age-calculator-ZMSrzkRW.js +0 -179
  34. package/dist/_chunks/insert-result-DisOY2G-.js +0 -243
@@ -1,12 +1,12 @@
1
1
  import { jsxs as d, jsx as e } from "react/jsx-runtime";
2
- import { forwardRef as j, useState as g, useMemo as _, useEffect as A } from "react";
3
- import { c as B } from "./index-D2ZczOXr.js";
4
- import { useTranslation as G } from "react-i18next";
5
- import { F as v } from "./form-field-BOm9hK35.js";
6
- import { N as Y } from "./number-input-Dj5L3pXK.js";
7
- import { S as y } from "./select-hsCaJSX3.js";
8
- import { I as D } from "./insert-result-DisOY2G-.js";
9
- const F = {
2
+ import { forwardRef as A, useState as v, useMemo as T, useEffect as H } from "react";
3
+ import { c as Y } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as j } from "react-i18next";
5
+ import { F as p } from "./form-field-BOm9hK35.js";
6
+ import { N as B } from "./number-input-Dj5L3pXK.js";
7
+ import { S as C } from "./select-hsCaJSX3.js";
8
+ import { I as L } from "./insert-result-CoC1oo6R.js";
9
+ const _ = {
10
10
  // weight → base kg
11
11
  kg: { id: "kg", category: "weight", factor: 1, offset: 0 },
12
12
  g: { id: "g", category: "weight", factor: 1e-3, offset: 0 },
@@ -23,19 +23,19 @@ const F = {
23
23
  // glucose → base mmol/L (1 mg/dL = 1/18.0156 mmol/L)
24
24
  mmol_l: { id: "mmol_l", category: "glucose", factor: 1, offset: 0 },
25
25
  mg_dl: { id: "mg_dl", category: "glucose", factor: 1 / 18.0156, offset: 0 }
26
- }, p = {
26
+ }, h = {
27
27
  weight: ["kg", "g", "lb", "oz"],
28
28
  length: ["cm", "m", "in", "ft"],
29
29
  temperature: ["c", "f"],
30
30
  glucose: ["mmol_l", "mg_dl"]
31
- }, L = [
31
+ }, D = [
32
32
  "weight",
33
33
  "length",
34
34
  "temperature",
35
35
  "glucose"
36
36
  ];
37
- function M(c, r, f) {
38
- const o = F[r], n = F[f];
37
+ function K(c, r, f) {
38
+ const o = _[r], n = _[f];
39
39
  if (!o || !n) throw new Error(`Unknown unit: ${r} → ${f}`);
40
40
  if (o.category !== n.category)
41
41
  throw new Error(
@@ -43,113 +43,124 @@ function M(c, r, f) {
43
43
  );
44
44
  return (c * o.factor + o.offset - n.offset) / n.factor;
45
45
  }
46
- const q = B("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
46
+ const M = Y("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
47
47
  variants: {
48
48
  width: { full: "ds:w-full", auto: "ds:inline-flex" }
49
49
  },
50
50
  defaultVariants: { width: "full" }
51
- }), H = j(
51
+ }), q = {
52
+ weight: "--info",
53
+ length: "--success",
54
+ temperature: "--warning",
55
+ glucose: "--accent"
56
+ }, J = A(
52
57
  ({
53
58
  defaultCategory: c = "weight",
54
59
  onResultChange: r,
55
60
  onInsert: f,
56
61
  insertVariant: o = "insert",
57
62
  onCopy: n,
58
- onError: C,
59
- id: U,
60
- width: E,
61
- className: S
62
- }, T) => {
63
- const { t, i18n: b } = G(), [$, V] = g(c), [i, k] = g(null), [m, w] = g(
64
- p[c][0]
65
- ), [l, x] = g(
66
- p[c][1]
67
- ), O = (s) => {
68
- const I = s, h = p[I];
69
- V(I), w(h[0]), x(h[1] ?? h[0]);
70
- }, a = _(
71
- () => i === null ? null : M(i, m, l),
72
- [i, m, l]
73
- ), u = _(
74
- () => new Intl.NumberFormat(b.language, { maximumFractionDigits: 3 }),
75
- [b.language]
63
+ onError: b,
64
+ insertBrand: E,
65
+ id: F,
66
+ width: U,
67
+ className: O
68
+ }, S) => {
69
+ const { t, i18n: $ } = j(), [g, k] = v(c), [i, G] = v(null), [u, w] = v(
70
+ h[c][0]
71
+ ), [l, N] = v(
72
+ h[c][1]
73
+ ), V = (s) => {
74
+ const I = s, y = h[I];
75
+ k(I), w(y[0]), N(y[1] ?? y[0]);
76
+ }, a = T(
77
+ () => i === null ? null : K(i, u, l),
78
+ [i, u, l]
79
+ ), m = T(
80
+ () => new Intl.NumberFormat($.language, { maximumFractionDigits: 3 }),
81
+ [$.language]
76
82
  );
77
- A(() => {
83
+ H(() => {
78
84
  r == null || r(a);
79
85
  }, [a, r]);
80
- const z = L.map((s) => ({
86
+ const z = D.map((s) => ({
81
87
  value: s,
82
88
  label: t(`unitConverter.category.${s}`)
83
- })), N = p[$].map((s) => ({
89
+ })), x = h[g].map((s) => ({
84
90
  value: s,
85
91
  label: t(`unitConverter.units.${s}`)
86
92
  }));
87
93
  return /* @__PURE__ */ d(
88
94
  "div",
89
95
  {
90
- ref: T,
96
+ ref: S,
91
97
  "data-component": "unit-converter",
92
- "data-component-id": U,
93
- className: q({ width: E, className: S }),
98
+ "data-component-id": F,
99
+ className: M({ width: U, className: O }),
94
100
  children: [
95
- /* @__PURE__ */ e(v, { label: t("unitConverter.categoryLabel"), children: /* @__PURE__ */ e(
96
- y,
101
+ /* @__PURE__ */ e(p, { label: t("unitConverter.categoryLabel"), children: /* @__PURE__ */ e(
102
+ C,
97
103
  {
98
104
  options: z,
99
- value: $,
100
- onValueChange: O
105
+ value: g,
106
+ onValueChange: V
101
107
  }
102
108
  ) }),
103
109
  /* @__PURE__ */ d("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-3", children: [
104
- /* @__PURE__ */ e(v, { label: t("unitConverter.value"), children: /* @__PURE__ */ e(Y, { mode: "decimal", value: i, onChange: k }) }),
105
- /* @__PURE__ */ e(v, { label: t("unitConverter.from"), children: /* @__PURE__ */ e(
106
- y,
110
+ /* @__PURE__ */ e(p, { label: t("unitConverter.value"), children: /* @__PURE__ */ e(B, { mode: "decimal", value: i, onChange: G }) }),
111
+ /* @__PURE__ */ e(p, { label: t("unitConverter.from"), children: /* @__PURE__ */ e(
112
+ C,
107
113
  {
108
- options: N,
109
- value: m,
114
+ options: x,
115
+ value: u,
110
116
  onValueChange: w
111
117
  }
112
118
  ) }),
113
- /* @__PURE__ */ e(v, { label: t("unitConverter.to"), children: /* @__PURE__ */ e(
114
- y,
119
+ /* @__PURE__ */ e(p, { label: t("unitConverter.to"), children: /* @__PURE__ */ e(
120
+ C,
115
121
  {
116
- options: N,
122
+ options: x,
117
123
  value: l,
118
- onValueChange: x
124
+ onValueChange: N
119
125
  }
120
126
  ) })
121
127
  ] }),
122
- /* @__PURE__ */ e("p", { className: "ds:sr-only", role: "status", "aria-live": "polite", children: a !== null ? `${u.format(i ?? 0)} ${t(
123
- `unitConverter.units.${m}`
124
- )} = ${u.format(a)} ${t(
128
+ /* @__PURE__ */ e("p", { className: "ds:sr-only", role: "status", "aria-live": "polite", children: a !== null ? `${m.format(i ?? 0)} ${t(
129
+ `unitConverter.units.${u}`
130
+ )} = ${m.format(a)} ${t(
125
131
  `unitConverter.units.${l}`
126
132
  )}` : "" }),
127
133
  a !== null ? /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
128
134
  /* @__PURE__ */ e("span", { className: "type-label ds:text-muted-foreground", children: t("unitConverter.result") }),
129
135
  /* @__PURE__ */ d("span", { className: "type-metric ds:text-foreground", children: [
130
- u.format(a),
136
+ m.format(a),
131
137
  " ",
132
138
  t(`unitConverter.units.${l}`)
133
139
  ] }),
134
140
  o === "copy" || f ? /* @__PURE__ */ e(
135
- D,
141
+ L,
136
142
  {
137
143
  variant: o,
138
144
  onInsert: f,
139
145
  onCopy: n,
140
- onError: C,
146
+ onError: b,
141
147
  card: {
142
148
  title: t("insert.title.unitConverter"),
149
+ highlight: t(`unitConverter.category.${g}`),
150
+ // Chip tints by measurement family so the inserted card
151
+ // signals the category at a glance.
152
+ highlightToken: q[g],
153
+ brand: E,
143
154
  fields: [
144
155
  {
145
156
  label: t("unitConverter.from"),
146
- value: `${u.format(i ?? 0)} ${t(
147
- `unitConverter.units.${m}`
157
+ value: `${m.format(i ?? 0)} ${t(
158
+ `unitConverter.units.${u}`
148
159
  )}`
149
160
  },
150
161
  {
151
162
  label: t("unitConverter.to"),
152
- value: `${u.format(a)} ${t(
163
+ value: `${m.format(a)} ${t(
153
164
  `unitConverter.units.${l}`
154
165
  )}`
155
166
  }
@@ -163,12 +174,12 @@ const q = B("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
163
174
  );
164
175
  }
165
176
  );
166
- H.displayName = "UnitConverter";
177
+ J.displayName = "UnitConverter";
167
178
  export {
168
- L as C,
169
- F as U,
170
- p as a,
171
- H as b,
172
- M as c
179
+ D as C,
180
+ _ as U,
181
+ h as a,
182
+ J as b,
183
+ K as c
173
184
  };
174
- //# sourceMappingURL=unit-converter-CuXCXJhK.js.map
185
+ //# sourceMappingURL=unit-converter-Ds9jalbN.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "packageVersion": "0.43.0",
3
+ "packageVersion": "0.44.0",
4
4
  "components": [
5
5
  {
6
6
  "kind": "component",
@@ -2,7 +2,7 @@ export { composeRefs } from './compose-refs';
2
2
  export { isSafeImageSrc, safeImageSrc } from './safe-image-src';
3
3
  export { SafeHtml, sanitiseHtml, type SafeHtmlProfile, type SafeHtmlProps, } from './safe-html';
4
4
  export { groupOptions } from './group-options';
5
- export { InsertButton, buildResultText, buildResultHtml, buildResultCardSvg, svgCardToPngDataUri, type InsertButtonProps, type InsertVariant, type InsertPayload, type InsertMode, type InsertCardData, type InsertCardField, type SvgCardToPngOptions, } from './insert-result';
5
+ export { InsertButton, buildResultText, buildResultHtml, buildResultCardSvg, svgCardToPngDataUri, svgCardToPng, type InsertButtonProps, type InsertVariant, type InsertPayload, type InsertPngResult, type InsertMode, type InsertCardData, type InsertCardField, type InsertCardGauge, type SvgCardToPngOptions, } from './insert-result';
6
6
  export { normalizeDiacritics } from './normalize-diacritics';
7
7
  export { useDebouncedCallback } from './use-debounced-callback';
8
8
  export { useFocusTrap, type UseFocusTrapOptions } from './use-focus-trap';
@@ -5,13 +5,62 @@ export interface InsertCardField {
5
5
  label: string;
6
6
  value: string;
7
7
  }
8
+ /**
9
+ * Optional radial gauge, drawn as a hand-rolled native-SVG donut (track
10
+ * `<circle>` + value arc via `stroke-dasharray`) so it survives the
11
+ * `<img>` → `<canvas>` → `toBlob` raster. No `<foreignObject>`, no charting lib.
12
+ */
13
+ export interface InsertCardGauge {
14
+ /** Big number rendered in the gauge centre (e.g. `'22.4'`). */
15
+ value: string;
16
+ /**
17
+ * Filled fraction of the ring, `0`–`1`. Takes precedence when supplied;
18
+ * otherwise derived from a `value`/`max` numeric parse (falling back to a
19
+ * full ring when neither is numeric).
20
+ */
21
+ fraction?: number;
22
+ /** Denominator used to derive `fraction` when `fraction` is omitted. */
23
+ max?: number;
24
+ /**
25
+ * Number of evenly-spaced segment gaps to notch into the ring (e.g. `4` for
26
+ * a quartered dial). `0`/omitted draws a continuous arc.
27
+ */
28
+ segments?: number;
29
+ /**
30
+ * DS token NAME for the arc colour — e.g. `'--success'`, `'--warning'`,
31
+ * `'--destructive'`, `'--info'`, or the light-orange overweight override.
32
+ * Resolved to a concrete colour from a probe span at raster time; never a
33
+ * hex literal in source.
34
+ */
35
+ colorToken: string;
36
+ /** Small category label under the value inside the ring. */
37
+ label?: string;
38
+ }
8
39
  export interface InsertCardData {
9
40
  /** Card heading. */
10
41
  title: string;
11
42
  /** Key/value rows. */
12
43
  fields: InsertCardField[];
13
- /** Optional highlighted line (e.g. category / status). */
44
+ /** Optional highlighted line, rendered as a category chip (pill). */
14
45
  highlight?: string;
46
+ /**
47
+ * DS token NAME for the highlight chip fill. Defaults to the accent token
48
+ * (`--primary`). The chip text uses the matching `<token>-foreground` when it
49
+ * resolves, else falls back to the card background for contrast.
50
+ */
51
+ highlightToken?: string;
52
+ /** Optional radial gauge drawn natively in the card. */
53
+ gauge?: InsertCardGauge;
54
+ /**
55
+ * Brand wordmark printed in the card footer.
56
+ *
57
+ * - omitted → the default `'AlfaDocs'` wordmark.
58
+ * - a string → that custom wordmark.
59
+ * - `false` → no brand line at all.
60
+ *
61
+ * A `brand` passed to {@link SvgCardToPngOptions} overrides this per-render.
62
+ */
63
+ brand?: string | false;
15
64
  }
16
65
  export interface InsertPayload {
17
66
  /** Which button the user chose. */
@@ -38,14 +87,30 @@ export interface InsertPayload {
38
87
  */
39
88
  imageDataUri: string;
40
89
  /**
41
- * Async thunk that resolves the result-card to an `image/png` data URI
42
- * the format intended for editor insertion. PNG is a flat raster: it carries
43
- * no script and survives the rich-text sanitiser that strips SVG. Resolves to
44
- * an empty string for mode `'text'` (no image is built). The PNG is rendered
45
- * lazily so the synchronous payload stays cheap; `await payload.pngDataUri()`
46
- * only when you actually need the raster.
90
+ * Async thunk that resolves the result-card raster the format intended for
91
+ * editor insertion. PNG is a flat raster: it carries no script and survives
92
+ * the rich-text sanitiser that strips SVG.
93
+ *
94
+ * Resolves to `{ dataUri, width, height }` where `width`/`height` are the
95
+ * **logical (un-scaled) CSS pixel** dimensions: set them on the inserted
96
+ * `<img width height>` and the supersampled (`>= 2×`) PNG renders crisp with
97
+ * no consumer-side shim. For mode `'text'` resolves to an empty
98
+ * `{ dataUri: '', width: 0, height: 0 }`. Rendered lazily so the synchronous
99
+ * payload stays cheap; `await payload.pngDataUri()` only when you need it.
100
+ *
101
+ * @since 0.43.0 — this return shape changed from a bare `Promise<string>` to
102
+ * `Promise<{ dataUri; width; height }>` (see CHANGELOG).
47
103
  */
48
- pngDataUri: () => Promise<string>;
104
+ pngDataUri: () => Promise<InsertPngResult>;
105
+ }
106
+ /** Resolved PNG raster plus its logical (un-scaled) `<img>` dimensions. */
107
+ export interface InsertPngResult {
108
+ /** `image/png` data URI, or `''` for the text-only mode. */
109
+ dataUri: string;
110
+ /** Logical (CSS px) width to set on the inserted `<img>`. `0` when empty. */
111
+ width: number;
112
+ /** Logical (CSS px) height to set on the inserted `<img>`. `0` when empty. */
113
+ height: number;
49
114
  }
50
115
  export interface InsertButtonProps {
51
116
  /** Structured result used to build every payload representation. */
@@ -84,10 +149,22 @@ interface ThemeColours {
84
149
  border: string;
85
150
  bg: string;
86
151
  font: string;
152
+ /**
153
+ * Concrete colours resolved from arbitrary DS token names, keyed by the token
154
+ * name the caller passed (e.g. `'--success'`). Populated for the gauge arc
155
+ * and the highlight chip; consulted by {@link buildResultCardSvg} via
156
+ * {@link resolveToken}.
157
+ */
158
+ tokens?: Record<string, string>;
87
159
  }
160
+ /**
161
+ * Internal resolved-colour shape, re-exported for tests that construct a card
162
+ * raster without a live DOM probe. Not part of the public component API.
163
+ */
164
+ export type ThemeColoursForTest = ThemeColours;
88
165
  export declare function buildResultText(card: InsertCardData): string;
89
166
  export declare function buildResultHtml(card: InsertCardData): string;
90
- export declare function buildResultCardSvg(card: InsertCardData, c: ThemeColours): string;
167
+ export declare function buildResultCardSvg(card: InsertCardData, c: ThemeColours, brand?: string | false): string;
91
168
  /** Options for {@link svgCardToPngDataUri}. */
92
169
  export interface SvgCardToPngOptions {
93
170
  /**
@@ -98,9 +175,15 @@ export interface SvgCardToPngOptions {
98
175
  colours?: ThemeColours;
99
176
  /**
100
177
  * Device-pixel scale factor for the raster. `2` yields a retina-sharp PNG.
101
- * Defaults to `1`.
178
+ * Defaults to `Math.max(2, devicePixelRatio)` so the inserted image is crisp
179
+ * without a consumer-side supersampling shim.
102
180
  */
103
181
  scale?: number;
182
+ /**
183
+ * Brand wordmark for the footer. Omitted → the card's own `brand` (then the
184
+ * default `'AlfaDocs'`); a string overrides it; `false` removes it.
185
+ */
186
+ brand?: string | false;
104
187
  }
105
188
  /**
106
189
  * Render an {@link InsertCardData} result card to an `image/png` data URI.
@@ -114,6 +197,13 @@ export interface SvgCardToPngOptions {
114
197
  * called in a non-DOM context or if the SVG fails to decode.
115
198
  */
116
199
  export declare function svgCardToPngDataUri(card: InsertCardData, opts?: SvgCardToPngOptions): Promise<string>;
200
+ /**
201
+ * Like {@link svgCardToPngDataUri} but also returns the **logical (un-scaled)**
202
+ * card dimensions so consumers can size the inserted `<img width height>` and
203
+ * drop their own supersampling shim. The PNG itself is rasterised at `scale`
204
+ * (default `Math.max(2, devicePixelRatio)`) for crispness.
205
+ */
206
+ export declare function svgCardToPng(card: InsertCardData, opts?: SvgCardToPngOptions): Promise<InsertPngResult>;
117
207
  export declare const InsertButton: import("react").ForwardRefExoticComponent<InsertButtonProps & import("react").RefAttributes<HTMLDivElement>>;
118
208
  export {};
119
209
  //# sourceMappingURL=insert-result.d.ts.map
@@ -27,6 +27,12 @@ export interface BmiCalculatorProps extends VariantProps<typeof rootVariants> {
27
27
  onCopy?: (mode: InsertMode) => void;
28
28
  /** `copy` variant only — fired if the clipboard write can't proceed. */
29
29
  onError?: (error: unknown) => void;
30
+ /**
31
+ * Brand wordmark printed in the inserted/copied result-card footer.
32
+ * Omitted → the default `'AlfaDocs'` wordmark; a string overrides it;
33
+ * `false` removes the brand line.
34
+ */
35
+ insertBrand?: string | false;
30
36
  /** Opaque instance id, emitted as `data-component-id`. */
31
37
  id?: string;
32
38
  /** Extra class names on the wrapper. */
@@ -1,4 +1,4 @@
1
- import { B as m } from "../../_chunks/bmi-calculator-DuVSFDuw.js";
1
+ import { B as m } from "../../_chunks/bmi-calculator-DFPWL2OJ.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 l } from "../../_chunks/calculator-dialog-DdexHrTP.js";
1
+ import { C as l } from "../../_chunks/calculator-dialog-D-nfvteH.js";
2
2
  export {
3
3
  l as CalculatorDialog
4
4
  };
@@ -21,6 +21,12 @@ export interface CycleCalculatorProps extends VariantProps<typeof rootVariants>
21
21
  onCopy?: (mode: InsertMode) => void;
22
22
  /** `copy` variant only — fired if the clipboard write can't proceed. */
23
23
  onError?: (error: unknown) => void;
24
+ /**
25
+ * Brand wordmark printed in the inserted/copied result-card footer.
26
+ * Omitted → the default `'AlfaDocs'` wordmark; a string overrides it;
27
+ * `false` removes the brand line.
28
+ */
29
+ insertBrand?: string | false;
24
30
  /** Opaque instance id, emitted as `data-component-id`. */
25
31
  id?: string;
26
32
  /** Extra class names on the wrapper. */
@@ -1,4 +1,4 @@
1
- import { C as e, L as l, p as r } from "../../_chunks/cycle-calculator-Dln-y1k_.js";
1
+ import { C as e, L as l, p as r } from "../../_chunks/cycle-calculator-ChHBcjet.js";
2
2
  export {
3
3
  e as CycleCalculator,
4
4
  l as LUTEAL_PHASE_DAYS,
@@ -36,6 +36,7 @@ export declare const Dialog: {
36
36
  Header: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
37
37
  Title: import("react").ForwardRefExoticComponent<Omit<RadixDialog.DialogTitleProps & import("react").RefAttributes<HTMLHeadingElement>, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
38
38
  Description: import("react").ForwardRefExoticComponent<Omit<RadixDialog.DialogDescriptionProps & import("react").RefAttributes<HTMLParagraphElement>, "ref"> & import("react").RefAttributes<HTMLParagraphElement>>;
39
+ Body: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
39
40
  Footer: import("react").ForwardRefExoticComponent<DialogFooterProps & import("react").RefAttributes<HTMLDivElement>>;
40
41
  Close: import("react").ForwardRefExoticComponent<Omit<RadixDialog.DialogCloseProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
41
42
  };
@@ -1,4 +1,4 @@
1
- import { D as g, d } from "../../_chunks/dialog-DOYgd75U.js";
1
+ import { D as g, d } from "../../_chunks/dialog-BTpZV6It.js";
2
2
  export {
3
3
  g as Dialog,
4
4
  d as dialogAgent
@@ -21,6 +21,12 @@ export interface DueDateCalculatorProps extends VariantProps<typeof rootVariants
21
21
  onCopy?: (mode: InsertMode) => void;
22
22
  /** `copy` variant only — fired if the clipboard write can't proceed. */
23
23
  onError?: (error: unknown) => void;
24
+ /**
25
+ * Brand wordmark printed in the inserted/copied result-card footer.
26
+ * Omitted → the default `'AlfaDocs'` wordmark; a string overrides it;
27
+ * `false` removes the brand line.
28
+ */
29
+ insertBrand?: string | false;
24
30
  /** Opaque instance id, emitted as `data-component-id`. */
25
31
  id?: string;
26
32
  /** Extra class names on the wrapper. */
@@ -1,4 +1,4 @@
1
- import { D as s } from "../../_chunks/due-date-calculator-Cc4dRqTI.js";
1
+ import { D as s } from "../../_chunks/due-date-calculator-CYXKLoof.js";
2
2
  import { D as E, G as o, M as D, T as r, c as T, g as _, t as C } from "../../_chunks/gestation-mWF4AXea.js";
3
3
  export {
4
4
  E as DEFAULT_CYCLE_LENGTH,
@@ -27,6 +27,12 @@ export interface GestationalAgeCalculatorProps extends VariantProps<typeof rootV
27
27
  onCopy?: (mode: InsertMode) => void;
28
28
  /** `copy` variant only — fired if the clipboard write can't proceed. */
29
29
  onError?: (error: unknown) => void;
30
+ /**
31
+ * Brand wordmark printed in the inserted/copied result-card footer.
32
+ * Omitted → the default `'AlfaDocs'` wordmark; a string overrides it;
33
+ * `false` removes the brand line.
34
+ */
35
+ insertBrand?: string | false;
30
36
  /** Opaque instance id, emitted as `data-component-id`. */
31
37
  id?: string;
32
38
  /** Extra class names on the wrapper. */
@@ -1,4 +1,4 @@
1
- import { G as t } from "../../_chunks/gestational-age-calculator-ZMSrzkRW.js";
1
+ import { G as t } from "../../_chunks/gestational-age-calculator-sRmoqgVr.js";
2
2
  export {
3
3
  t as GestationalAgeCalculator
4
4
  };
@@ -39,7 +39,7 @@ export * from './switch';
39
39
  export * from './text-area';
40
40
  export * from './text-input';
41
41
  export * from './time-picker';
42
- export { InsertButton, svgCardToPngDataUri, type InsertButtonProps, type InsertVariant, type InsertPayload, type InsertMode, type InsertCardData, type InsertCardField, type SvgCardToPngOptions, } from './_shared/insert-result';
42
+ export { InsertButton, svgCardToPngDataUri, svgCardToPng, type InsertButtonProps, type InsertVariant, type InsertPayload, type InsertPngResult, type InsertMode, type InsertCardData, type InsertCardField, type InsertCardGauge, type SvgCardToPngOptions, } from './_shared/insert-result';
43
43
  export * from './accordion';
44
44
  export * from './avatar';
45
45
  export * from './badge';
@@ -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-zZL5Ir2-.js";
1
+ import { P as s, R as n, T as i, a as r, r as A } from "../../_chunks/pregnancy-weight-gain-C5YhfYnL.js";
2
2
  export {
3
3
  s as PregnancyWeightGain,
4
4
  n as RATE_BANDS,
@@ -19,6 +19,12 @@ export interface PregnancyWeightGainProps extends VariantProps<typeof rootVarian
19
19
  onCopy?: (mode: InsertMode) => void;
20
20
  /** `copy` variant only — fired if the clipboard write can't proceed. */
21
21
  onError?: (error: unknown) => void;
22
+ /**
23
+ * Brand wordmark printed in the inserted/copied result-card footer.
24
+ * Omitted → the default `'AlfaDocs'` wordmark; a string overrides it;
25
+ * `false` removes the brand line.
26
+ */
27
+ insertBrand?: string | false;
22
28
  /** Opaque instance id, emitted as `data-component-id`. */
23
29
  id?: string;
24
30
  /** Extra class names on the wrapper. */
@@ -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-CuXCXJhK.js";
1
+ import { C as r, U as t, a as U, b as e, c as n } from "../../_chunks/unit-converter-Ds9jalbN.js";
2
2
  export {
3
3
  r as CATEGORIES,
4
4
  t as UNITS,
@@ -21,6 +21,12 @@ export interface UnitConverterProps extends VariantProps<typeof rootVariants> {
21
21
  onCopy?: (mode: InsertMode) => void;
22
22
  /** `copy` variant only — fired if the clipboard write can't proceed. */
23
23
  onError?: (error: unknown) => void;
24
+ /**
25
+ * Brand wordmark printed in the inserted/copied result-card footer.
26
+ * Omitted → the default `'AlfaDocs'` wordmark; a string overrides it;
27
+ * `false` removes the brand line.
28
+ */
29
+ insertBrand?: string | false;
24
30
  /** Opaque instance id, emitted as `data-component-id`. */
25
31
  id?: string;
26
32
  /** Extra class names on the wrapper. */