@alfadocs/ui-kit-debug 0.43.0 → 0.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/{alia-sidebar-BpX4z_af.js → alia-sidebar-Be8FhKYd.js} +332 -237
- package/dist/_chunks/alia-sidebar-Be8FhKYd.js.map +1 -0
- package/dist/_chunks/{autocomplete-DIgdhCGJ.js → autocomplete-CDqxB68B.js} +2 -2
- package/dist/_chunks/{autocomplete-DIgdhCGJ.js.map → autocomplete-CDqxB68B.js.map} +1 -1
- package/dist/_chunks/bmi-calculator-CQqXTVNL.js +258 -0
- package/dist/_chunks/bmi-calculator-CQqXTVNL.js.map +1 -0
- package/dist/_chunks/{booking-CtLwaxkK.js → booking-DlDVuWMd.js} +2 -2
- package/dist/_chunks/{booking-CtLwaxkK.js.map → booking-DlDVuWMd.js.map} +1 -1
- package/dist/_chunks/{calculator-dialog-DdexHrTP.js → calculator-dialog-D-nfvteH.js} +2 -2
- package/dist/_chunks/{calculator-dialog-DdexHrTP.js.map → calculator-dialog-D-nfvteH.js.map} +1 -1
- package/dist/_chunks/{cycle-calculator-Dln-y1k_.js → cycle-calculator-KxA8dqDf.js} +73 -54
- package/dist/_chunks/cycle-calculator-KxA8dqDf.js.map +1 -0
- package/dist/_chunks/dialog-BTpZV6It.js +223 -0
- package/dist/_chunks/dialog-BTpZV6It.js.map +1 -0
- package/dist/_chunks/{due-date-calculator-Cc4dRqTI.js → due-date-calculator-mFxpHLml.js} +73 -49
- package/dist/_chunks/due-date-calculator-mFxpHLml.js.map +1 -0
- package/dist/_chunks/{editable-currency-cell-renderer-9jqwDv5x.js → editable-currency-cell-renderer-BEBUQl9P.js} +2 -2
- package/dist/_chunks/{editable-currency-cell-renderer-9jqwDv5x.js.map → editable-currency-cell-renderer-BEBUQl9P.js.map} +1 -1
- package/dist/_chunks/{freemium-paywall-BLXESpH4.js → freemium-paywall-BYist2sJ.js} +2 -2
- package/dist/_chunks/{freemium-paywall-BLXESpH4.js.map → freemium-paywall-BYist2sJ.js.map} +1 -1
- package/dist/_chunks/gestational-age-calculator-gWI_uRA1.js +203 -0
- package/dist/_chunks/gestational-age-calculator-gWI_uRA1.js.map +1 -0
- package/dist/_chunks/insert-result-C5ABnzDl.js +711 -0
- package/dist/_chunks/insert-result-C5ABnzDl.js.map +1 -0
- package/dist/_chunks/{marketplace-app-shell-Dc5cTIt8.js → marketplace-app-shell-Gfsf78ge.js} +2 -2
- package/dist/_chunks/{marketplace-app-shell-Dc5cTIt8.js.map → marketplace-app-shell-Gfsf78ge.js.map} +1 -1
- package/dist/_chunks/{patient-search-DPe2ZYEL.js → patient-search-CocVcGJ3.js} +2 -2
- package/dist/_chunks/{patient-search-DPe2ZYEL.js.map → patient-search-CocVcGJ3.js.map} +1 -1
- package/dist/_chunks/{payment-form-BzVsG6Ks.js → payment-form-DqEiEJRO.js} +247 -195
- package/dist/_chunks/payment-form-DqEiEJRO.js.map +1 -0
- package/dist/_chunks/{pdf-viewer-B6MC6VTx.js → pdf-viewer-CWEXTlwq.js} +2 -2
- package/dist/_chunks/{pdf-viewer-B6MC6VTx.js.map → pdf-viewer-CWEXTlwq.js.map} +1 -1
- package/dist/_chunks/{practice-results-CrLpEiiW.js → practice-results-DDi-kvaD.js} +2 -2
- package/dist/_chunks/{practice-results-CrLpEiiW.js.map → practice-results-DDi-kvaD.js.map} +1 -1
- package/dist/_chunks/{pregnancy-weight-gain-zZL5Ir2-.js → pregnancy-weight-gain-BtEHaSqy.js} +78 -56
- package/dist/_chunks/pregnancy-weight-gain-BtEHaSqy.js.map +1 -0
- package/dist/_chunks/{search-bar-CP6wUJFY.js → search-bar-CvN_S0jW.js} +2 -2
- package/dist/_chunks/{search-bar-CP6wUJFY.js.map → search-bar-CvN_S0jW.js.map} +1 -1
- package/dist/_chunks/{search-input-C1C3jQpD.js → search-input-D3aMvi4l.js} +2 -2
- package/dist/_chunks/{search-input-C1C3jQpD.js.map → search-input-D3aMvi4l.js.map} +1 -1
- package/dist/_chunks/{sign-document-B-3k_0LO.js → sign-document-BCyLpFHJ.js} +2 -2
- package/dist/_chunks/{sign-document-B-3k_0LO.js.map → sign-document-BCyLpFHJ.js.map} +1 -1
- package/dist/_chunks/{sign-in-with-alfadocs-button-DeHBFRNS.js → sign-in-with-alfadocs-button-CuYn_kKP.js} +2 -2
- package/dist/_chunks/{sign-in-with-alfadocs-button-DeHBFRNS.js.map → sign-in-with-alfadocs-button-CuYn_kKP.js.map} +1 -1
- package/dist/_chunks/{social-sign-in-button-X54ySJr1.js → social-sign-in-button-uJYLM366.js} +2 -2
- package/dist/_chunks/{social-sign-in-button-X54ySJr1.js.map → social-sign-in-button-uJYLM366.js.map} +1 -1
- package/dist/_chunks/{spinner-CCByyvcb.js → spinner-OjQNn8oN.js} +7 -3
- package/dist/_chunks/spinner-OjQNn8oN.js.map +1 -0
- package/dist/_chunks/{transcript-panel-CR7VY1uw.js → transcript-panel-B4HiC7ed.js} +2 -2
- package/dist/_chunks/{transcript-panel-CR7VY1uw.js.map → transcript-panel-B4HiC7ed.js.map} +1 -1
- package/dist/_chunks/{unit-converter-CuXCXJhK.js → unit-converter-u3CwNDpP.js} +96 -74
- package/dist/_chunks/unit-converter-u3CwNDpP.js.map +1 -0
- package/dist/_chunks/{wallet-pay-button-DK4ESYge.js → wallet-pay-button-DuDPBlCO.js} +2 -2
- package/dist/_chunks/{wallet-pay-button-DK4ESYge.js.map → wallet-pay-button-DuDPBlCO.js.map} +1 -1
- package/dist/agent-catalog.json +1 -1
- package/dist/components/_shared/banded-gauge.d.ts +193 -0
- package/dist/components/_shared/banded-gauge.d.ts.map +1 -0
- package/dist/components/_shared/index.d.ts +1 -1
- package/dist/components/_shared/index.d.ts.map +1 -1
- package/dist/components/_shared/insert-result.d.ts +173 -10
- package/dist/components/_shared/insert-result.d.ts.map +1 -1
- package/dist/components/autocomplete/index.js +1 -1
- package/dist/components/bmi-calculator/bmi-calculator.d.ts +6 -0
- package/dist/components/bmi-calculator/bmi-calculator.d.ts.map +1 -1
- package/dist/components/bmi-calculator/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/calculator-dialog/index.js +1 -1
- package/dist/components/cycle-calculator/cycle-calculator.d.ts +6 -0
- package/dist/components/cycle-calculator/cycle-calculator.d.ts.map +1 -1
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/dialog/dialog.d.ts +1 -0
- package/dist/components/dialog/dialog.d.ts.map +1 -1
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/due-date-calculator/due-date-calculator.d.ts +6 -0
- package/dist/components/due-date-calculator/due-date-calculator.d.ts.map +1 -1
- package/dist/components/due-date-calculator/index.js +1 -1
- package/dist/components/freemium-paywall/index.js +1 -1
- package/dist/components/gestational-age-calculator/gestational-age-calculator.d.ts +6 -0
- package/dist/components/gestational-age-calculator/gestational-age-calculator.d.ts.map +1 -1
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/patient-search/index.js +1 -1
- package/dist/components/payment-form/index.js +1 -1
- package/dist/components/payment-form/payment-form.d.ts +24 -2
- package/dist/components/payment-form/payment-form.d.ts.map +1 -1
- package/dist/components/pdf-viewer/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/pregnancy-weight-gain/index.js +1 -1
- package/dist/components/pregnancy-weight-gain/pregnancy-weight-gain.d.ts +6 -0
- package/dist/components/pregnancy-weight-gain/pregnancy-weight-gain.d.ts.map +1 -1
- package/dist/components/search-bar/index.js +1 -1
- package/dist/components/search-input/index.js +1 -1
- package/dist/components/sign-document/index.js +1 -1
- package/dist/components/sign-in-with-alfadocs-button/index.js +1 -1
- package/dist/components/social-sign-in-button/index.js +1 -1
- package/dist/components/spinner/index.js +1 -1
- package/dist/components/spinner/spinner.d.ts +2 -2
- package/dist/components/spinner/spinner.d.ts.map +1 -1
- package/dist/components/transcript-panel/index.js +1 -1
- package/dist/components/unit-converter/index.js +1 -1
- package/dist/components/unit-converter/unit-converter.d.ts +6 -0
- package/dist/components/unit-converter/unit-converter.d.ts.map +1 -1
- package/dist/components/wallet-pay-button/index.js +1 -1
- package/dist/i18n/locales/ar.d.ts +1 -1
- package/dist/i18n/locales/ar.js +1 -1
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/de.d.ts +1 -1
- package/dist/i18n/locales/de.js +1 -1
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/el.d.ts +1 -1
- package/dist/i18n/locales/el.js +1 -1
- package/dist/i18n/locales/el.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +1 -1
- package/dist/i18n/locales/en.js +1 -1
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +1 -1
- package/dist/i18n/locales/es.js +1 -1
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +1 -1
- package/dist/i18n/locales/fr.js +1 -1
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts +1 -1
- package/dist/i18n/locales/hi.js +1 -1
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +1 -1
- package/dist/i18n/locales/it.js +1 -1
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts +1 -1
- package/dist/i18n/locales/ja.js +1 -1
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts +1 -1
- package/dist/i18n/locales/nl.js +1 -1
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts +1 -1
- package/dist/i18n/locales/pl.js +1 -1
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts +1 -1
- package/dist/i18n/locales/pt.js +1 -1
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ro.d.ts +1 -1
- package/dist/i18n/locales/ro.js +1 -1
- package/dist/i18n/locales/ro.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts +1 -1
- package/dist/i18n/locales/ru.js +1 -1
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/sq.d.ts +1 -1
- package/dist/i18n/locales/sq.js +1 -1
- package/dist/i18n/locales/sq.js.map +1 -1
- package/dist/i18n/locales/sv.d.ts +1 -1
- package/dist/i18n/locales/sv.js +1 -1
- package/dist/i18n/locales/sv.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts +1 -1
- package/dist/i18n/locales/tr.js +1 -1
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +1 -1
- package/dist/i18n/locales/zh.js +1 -1
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.js +497 -496
- package/dist/locales/ar.json +1 -1
- package/dist/locales/de.json +1 -1
- package/dist/locales/el.json +1 -1
- package/dist/locales/en.json +1 -1
- package/dist/locales/es.json +1 -1
- package/dist/locales/fr.json +1 -1
- package/dist/locales/hi.json +1 -1
- package/dist/locales/it.json +1 -1
- package/dist/locales/ja.json +1 -1
- package/dist/locales/nl.json +1 -1
- package/dist/locales/pl.json +1 -1
- package/dist/locales/pt.json +1 -1
- package/dist/locales/ro.json +1 -1
- package/dist/locales/ru.json +1 -1
- package/dist/locales/sq.json +1 -1
- package/dist/locales/sv.json +1 -1
- package/dist/locales/tr.json +1 -1
- package/dist/locales/zh.json +1 -1
- package/dist/patterns/alia-assistant/alia-chat-surface.d.ts.map +1 -1
- package/dist/patterns/alia-assistant/alia-types.d.ts +20 -0
- package/dist/patterns/alia-assistant/alia-types.d.ts.map +1 -1
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/alia-sidebar-BpX4z_af.js.map +0 -1
- package/dist/_chunks/bmi-calculator-DuVSFDuw.js +0 -259
- package/dist/_chunks/bmi-calculator-DuVSFDuw.js.map +0 -1
- package/dist/_chunks/cycle-calculator-Dln-y1k_.js.map +0 -1
- package/dist/_chunks/dialog-DOYgd75U.js +0 -224
- package/dist/_chunks/dialog-DOYgd75U.js.map +0 -1
- package/dist/_chunks/due-date-calculator-Cc4dRqTI.js.map +0 -1
- package/dist/_chunks/gestational-age-calculator-ZMSrzkRW.js +0 -179
- package/dist/_chunks/gestational-age-calculator-ZMSrzkRW.js.map +0 -1
- package/dist/_chunks/insert-result-DisOY2G-.js +0 -243
- package/dist/_chunks/insert-result-DisOY2G-.js.map +0 -1
- package/dist/_chunks/payment-form-BzVsG6Ks.js.map +0 -1
- package/dist/_chunks/pregnancy-weight-gain-zZL5Ir2-.js.map +0 -1
- package/dist/_chunks/spinner-CCByyvcb.js.map +0 -1
- package/dist/_chunks/unit-converter-CuXCXJhK.js.map +0 -1
package/dist/agent-catalog.json
CHANGED
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
/** One coloured zone of the track, filled up to (and excluding) `upTo`. */
|
|
2
|
+
export interface BandedGaugeBand {
|
|
3
|
+
/**
|
|
4
|
+
* Upper boundary of the band on the scale (exclusive). The final band's
|
|
5
|
+
* `upTo` is conventionally the scale `max` so it fills to the bar end.
|
|
6
|
+
*/
|
|
7
|
+
upTo: number;
|
|
8
|
+
/**
|
|
9
|
+
* DS token NAME for the band fill — e.g. `'--info'`, `'--success'`,
|
|
10
|
+
* `'--warning-readable'`, `'--destructive'`. Resolved by the surface's
|
|
11
|
+
* `resolve` callback (concrete `rgb()` for the card, `var(<token>)` for the
|
|
12
|
+
* widget). Never a hex/rgb literal in source.
|
|
13
|
+
*/
|
|
14
|
+
colorToken: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* A banded-linear gauge. Every visible string (`valueLabel`, `categoryLabel`,
|
|
18
|
+
* `rangeLabel`, `ariaLabel`) arrives ALREADY TRANSLATED — this module is
|
|
19
|
+
* i18n-agnostic; the BMI calculator supplies `t()`-resolved text.
|
|
20
|
+
*/
|
|
21
|
+
export interface BandedGaugeModel {
|
|
22
|
+
/** The true value (printed verbatim even when clamped to a bar end). */
|
|
23
|
+
value: number;
|
|
24
|
+
/** Ascending coloured zones; the last `upTo` should equal `max`. */
|
|
25
|
+
bands: BandedGaugeBand[];
|
|
26
|
+
/** Low end of the drawn scale (maps to the bar's inline start). */
|
|
27
|
+
min: number;
|
|
28
|
+
/** High end of the drawn scale (maps to the bar's inline end). */
|
|
29
|
+
max: number;
|
|
30
|
+
/** Big number rendered above the marker (e.g. `'24.6'`). */
|
|
31
|
+
valueLabel: string;
|
|
32
|
+
/** Band name shown beside the value (e.g. `'normal'`). Pre-translated. */
|
|
33
|
+
categoryLabel?: string;
|
|
34
|
+
/** Range string for the band (e.g. `'18.5–24.9'`). Pre-translated. */
|
|
35
|
+
rangeLabel?: string;
|
|
36
|
+
/** Full accessible name, e.g. `'BMI 24.6 — normal (18.5–24.9)'`. */
|
|
37
|
+
ariaLabel: string;
|
|
38
|
+
/** Threshold tick values drawn under the bar (e.g. `[18.5, 25, 30]`). */
|
|
39
|
+
ticks?: number[];
|
|
40
|
+
}
|
|
41
|
+
/** Drawn BMI scale: 15 (deep underweight) → 40 (deep obesity). */
|
|
42
|
+
export declare const BMI_BANDED_MIN = 15;
|
|
43
|
+
export declare const BMI_BANDED_MAX = 40;
|
|
44
|
+
/** WHO adult cut-offs drawn as ticks under the bar. */
|
|
45
|
+
export declare const BMI_BAND_THRESHOLDS: readonly [18.5, 25, 30];
|
|
46
|
+
/**
|
|
47
|
+
* The four WHO zones as `{ upTo, colorToken }`, plus the scale + ticks, so
|
|
48
|
+
* both the on-screen widget and the insert card share ONE definition:
|
|
49
|
+
*
|
|
50
|
+
* underweight < 18.5 → `--info`
|
|
51
|
+
* normal 18.5–24.9 → `--success`
|
|
52
|
+
* overweight 25–29.9 → `--warning-readable` (contrast-safe orange)
|
|
53
|
+
* obese ≥ 30 → `--destructive` (one obese zone)
|
|
54
|
+
*
|
|
55
|
+
* `--warning-readable` is the kit's contrast-safe orange token — it already
|
|
56
|
+
* resolves correctly per theme (orange-600 in light/non-accessible, `--warning`
|
|
57
|
+
* elsewhere), so NO `document.documentElement` JS override is needed here.
|
|
58
|
+
*/
|
|
59
|
+
export declare function bmiBands(): {
|
|
60
|
+
bands: BandedGaugeBand[];
|
|
61
|
+
min: number;
|
|
62
|
+
max: number;
|
|
63
|
+
ticks: number[];
|
|
64
|
+
};
|
|
65
|
+
/** One filled zone rect in card/widget coordinates. */
|
|
66
|
+
export interface BandRect {
|
|
67
|
+
/** Inline-start x of the zone. */
|
|
68
|
+
x: number;
|
|
69
|
+
/** Zone width. */
|
|
70
|
+
w: number;
|
|
71
|
+
/** Token NAME to fill it with (resolved by the surface). */
|
|
72
|
+
colorToken: string;
|
|
73
|
+
}
|
|
74
|
+
/** The value marker: its drawn x plus the clamp envelope it lives in. */
|
|
75
|
+
export interface MarkerGeometry {
|
|
76
|
+
/** Drawn x of the marker (clamped into `[clampedStart, clampedEnd]`). */
|
|
77
|
+
x: number;
|
|
78
|
+
/** Inline-start x the marker can reach (bar start). */
|
|
79
|
+
clampedStart: number;
|
|
80
|
+
/** Inline-end x the marker can reach (bar end). */
|
|
81
|
+
clampedEnd: number;
|
|
82
|
+
/**
|
|
83
|
+
* `'start'` when the true value sits below `min` (marker pinned to the bar
|
|
84
|
+
* start), `'end'` when it sits above `max`, `null` when it's in range. Drives
|
|
85
|
+
* the out-of-range caret/chevron.
|
|
86
|
+
*/
|
|
87
|
+
overflow: 'start' | 'end' | null;
|
|
88
|
+
}
|
|
89
|
+
/** A threshold tick: its x plus the scale value it marks. */
|
|
90
|
+
export interface TickGeometry {
|
|
91
|
+
x: number;
|
|
92
|
+
value: number;
|
|
93
|
+
}
|
|
94
|
+
/** Everything the two builders need, derived once. */
|
|
95
|
+
export interface BandedGaugeGeometry {
|
|
96
|
+
/** Outer SVG width. */
|
|
97
|
+
width: number;
|
|
98
|
+
/** Outer SVG height. */
|
|
99
|
+
height: number;
|
|
100
|
+
/** Inline-start x of the bar. */
|
|
101
|
+
barStart: number;
|
|
102
|
+
/** Inline-end x of the bar. */
|
|
103
|
+
barEnd: number;
|
|
104
|
+
/** Bar top y. */
|
|
105
|
+
barY: number;
|
|
106
|
+
/** Bar thickness. */
|
|
107
|
+
barH: number;
|
|
108
|
+
/** Bar corner radius. */
|
|
109
|
+
barRadius: number;
|
|
110
|
+
/** Coloured zones, left → right. */
|
|
111
|
+
bands: BandRect[];
|
|
112
|
+
/** The value marker. */
|
|
113
|
+
marker: MarkerGeometry;
|
|
114
|
+
/** Threshold ticks under the bar. */
|
|
115
|
+
ticks: TickGeometry[];
|
|
116
|
+
/** Baseline y for the value label above the bar. */
|
|
117
|
+
valueLabelY: number;
|
|
118
|
+
/** Baseline y for the tick number labels under the bar. */
|
|
119
|
+
tickLabelY: number;
|
|
120
|
+
/** Pre-translated value label (verbatim from the model). */
|
|
121
|
+
valueLabel: string;
|
|
122
|
+
/** Optional `category (range)` summary shown beside the value. */
|
|
123
|
+
summaryLabel: string;
|
|
124
|
+
/** Full accessible name for `<title>` / `aria-label`. */
|
|
125
|
+
ariaLabel: string;
|
|
126
|
+
}
|
|
127
|
+
/** Layout knobs for {@link computeBandedGaugeGeometry}. */
|
|
128
|
+
export interface BandedGaugeLayoutOptions {
|
|
129
|
+
/** Outer SVG width. */
|
|
130
|
+
width: number;
|
|
131
|
+
/** Outer SVG height. */
|
|
132
|
+
height: number;
|
|
133
|
+
}
|
|
134
|
+
export declare const INSET_X = 14;
|
|
135
|
+
/**
|
|
136
|
+
* Pure geometry pass — the ONE place value→x mapping, band widths, marker
|
|
137
|
+
* clamping, and tick positions are computed. Both the SVG-string builder and
|
|
138
|
+
* the JSX component consume this so the two surfaces never drift.
|
|
139
|
+
*
|
|
140
|
+
* The marker x is CLAMPED to `[barStart, barEnd]`, but `valueLabel` always
|
|
141
|
+
* prints the true value; `marker.overflow` flags an out-of-range value so the
|
|
142
|
+
* surface can draw a caret at the clamped end.
|
|
143
|
+
*/
|
|
144
|
+
export declare function computeBandedGaugeGeometry(model: BandedGaugeModel, { width, height }: BandedGaugeLayoutOptions): BandedGaugeGeometry;
|
|
145
|
+
/** A token-name → concrete-colour resolver supplied by each surface. */
|
|
146
|
+
export type ColorResolver = (colorToken: string) => string;
|
|
147
|
+
/** Theme colours + font + resolver for {@link buildBandedGaugeSvgString}. */
|
|
148
|
+
export interface BandedGaugeSvgOptions {
|
|
149
|
+
/**
|
|
150
|
+
* Maps a band token NAME to the colour string painted into the markup. The
|
|
151
|
+
* card passes a probe-resolved `rgb(...)` resolver so the baked PNG carries
|
|
152
|
+
* theme-correct colours; never a literal in source.
|
|
153
|
+
*/
|
|
154
|
+
resolve: ColorResolver;
|
|
155
|
+
/** Font family for the text (resolved from the theme, e.g. `--font-sans`). */
|
|
156
|
+
font: string;
|
|
157
|
+
/** Foreground colour for the value label + marker (concrete). */
|
|
158
|
+
fg: string;
|
|
159
|
+
/** Muted colour for the tick numbers + summary (concrete). */
|
|
160
|
+
muted: string;
|
|
161
|
+
/** Track / unfilled-rail colour, also used for tick rules (concrete). */
|
|
162
|
+
track: string;
|
|
163
|
+
}
|
|
164
|
+
export declare function buildBandedGaugeSvgString(geometry: BandedGaugeGeometry, options: BandedGaugeSvgOptions): string;
|
|
165
|
+
export declare const DEFAULT_HEIGHT = 64;
|
|
166
|
+
export interface BandedGaugeProps {
|
|
167
|
+
/** The gauge model (value, bands, scale, pre-translated labels). */
|
|
168
|
+
model: BandedGaugeModel;
|
|
169
|
+
/** SVG width. Defaults to {@link DEFAULT_WIDTH}. */
|
|
170
|
+
width?: number;
|
|
171
|
+
/** SVG height. Defaults to {@link DEFAULT_HEIGHT}. */
|
|
172
|
+
height?: number;
|
|
173
|
+
/** Extra class names on the root `<svg>`. */
|
|
174
|
+
className?: string;
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Presentational banded-linear gauge for the on-screen widget. Renders the SAME
|
|
178
|
+
* geometry as {@link buildBandedGaugeSvgString} but as JSX, filling each band
|
|
179
|
+
* with `fill="var(<token>)"` so the live theme resolves the colour (and a theme
|
|
180
|
+
* switch repaints with no re-sample). Visually equivalent to the card string.
|
|
181
|
+
*
|
|
182
|
+
* The track + marker are decorative; the accessible name on the root carries
|
|
183
|
+
* the meaning (`role="img"` + `aria-label`, mirrored in `<title>`). All text in
|
|
184
|
+
* the model is pre-translated by the caller.
|
|
185
|
+
*
|
|
186
|
+
* The measurement axis runs low→high left-to-right regardless of document
|
|
187
|
+
* direction — SVG coordinates are inherently LTR (a `<rect x>` is unaffected by
|
|
188
|
+
* `direction`), and `direction="ltr"` is pinned on the root to keep any nested
|
|
189
|
+
* `<text>` directionality explicit. Logical properties govern the surrounding
|
|
190
|
+
* layout, never this axis.
|
|
191
|
+
*/
|
|
192
|
+
export declare const BandedGauge: import("react").ForwardRefExoticComponent<BandedGaugeProps & import("react").RefAttributes<SVGSVGElement>>;
|
|
193
|
+
//# sourceMappingURL=banded-gauge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"banded-gauge.d.ts","sourceRoot":"","sources":["../../../src/components/_shared/banded-gauge.tsx"],"names":[],"mappings":"AAoCA,2EAA2E;AAC3E,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;;OAKG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,wEAAwE;IACxE,KAAK,EAAE,MAAM,CAAC;IACd,oEAAoE;IACpE,KAAK,EAAE,eAAe,EAAE,CAAC;IACzB,mEAAmE;IACnE,GAAG,EAAE,MAAM,CAAC;IACZ,kEAAkE;IAClE,GAAG,EAAE,MAAM,CAAC;IACZ,4DAA4D;IAC5D,UAAU,EAAE,MAAM,CAAC;IACnB,0EAA0E;IAC1E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,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BAAmB,EAC7B,OAAO,EAAE,qBAAqB,GAC7B,MAAM,CAqGR;AAQD,eAAO,MAAM,cAAc,KAAK,CAAC;AAWjC,MAAM,WAAW,gBAAgB;IAC/B,oEAAoE;IACpE,KAAK,EAAE,gBAAgB,CAAC;IACxB,oDAAoD;IACpD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sDAAsD;IACtD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6CAA6C;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,WAAW,4GAmJvB,CAAC"}
|
|
@@ -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';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/_shared/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,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,EAAE,MAAM,UAAU,CAAC;AAC5C,YAAY,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/_shared/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EACL,QAAQ,EACR,YAAY,EACZ,KAAK,eAAe,EACpB,KAAK,aAAa,GACnB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EACL,YAAY,EACZ,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EACnB,YAAY,EACZ,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,mBAAmB,GACzB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,KAAK,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC1E,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EACL,YAAY,EACZ,oBAAoB,EACpB,KAAK,SAAS,GACf,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,EAClB,uBAAuB,EACvB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,GACtB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,GACrB,MAAM,wBAAwB,CAAC;AAChC,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,YAAY,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC"}
|
|
@@ -1,17 +1,139 @@
|
|
|
1
1
|
import { type ButtonProps } from '../button';
|
|
2
|
+
import { type BandedGaugeBand } from './banded-gauge';
|
|
2
3
|
export type InsertMode = 'text' | 'image' | 'text-image';
|
|
3
4
|
export type InsertVariant = 'insert' | 'copy';
|
|
5
|
+
/**
|
|
6
|
+
* The handful of lucide glyphs the result-card header can carry. Each maps to a
|
|
7
|
+
* static native-SVG geometry string in {@link ICON_GEOMETRY}, hand-transcribed
|
|
8
|
+
* from lucide-react 1.8.0's `__iconNode` arrays (pinned to that version so the
|
|
9
|
+
* paths match the on-screen React glyphs exactly). We do NOT import the lucide
|
|
10
|
+
* React components into the raster path — they can't be serialised into the
|
|
11
|
+
* `<img>` data-URI — so the geometry is inlined as raw `<path>` elements.
|
|
12
|
+
*/
|
|
13
|
+
export type IconKey = 'activity' | 'scale' | 'ruler' | 'calendar' | 'calendar-heart' | 'baby' | 'heart' | 'droplets' | 'clock' | 'tag' | 'trending-up' | 'percent';
|
|
4
14
|
export interface InsertCardField {
|
|
5
15
|
label: string;
|
|
6
16
|
value: string;
|
|
17
|
+
/**
|
|
18
|
+
* Optional leading glyph for the row, drawn at {@link FIELD_ICON_SLOT} in
|
|
19
|
+
* place of the default bullet dot. One of the known {@link IconKey} names; an
|
|
20
|
+
* unknown / omitted value falls back to the muted bullet (fully
|
|
21
|
+
* back-compatible — a field without an icon renders exactly as before).
|
|
22
|
+
*/
|
|
23
|
+
icon?: IconKey;
|
|
7
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* Radial gauge — a hand-rolled native-SVG donut (track `<circle>` + value arc
|
|
27
|
+
* via `stroke-dasharray`) drawn in the card's inline-end corner box. Survives
|
|
28
|
+
* the `<img>` → `<canvas>` → `toBlob` raster. No `<foreignObject>`, no charting
|
|
29
|
+
* lib.
|
|
30
|
+
*
|
|
31
|
+
* This is the original gauge shape; `variant` is optional and defaults to
|
|
32
|
+
* `'radial'`, so a gauge object authored before the banded variant existed
|
|
33
|
+
* renders exactly as before.
|
|
34
|
+
*/
|
|
35
|
+
export interface InsertCardRadialGauge {
|
|
36
|
+
/** Discriminant. Optional — omitted means `'radial'` (back-compat). */
|
|
37
|
+
variant?: 'radial';
|
|
38
|
+
/** Big number rendered in the gauge centre (e.g. `'22.4'`). */
|
|
39
|
+
value: string;
|
|
40
|
+
/**
|
|
41
|
+
* Filled fraction of the ring, `0`–`1`. Takes precedence when supplied;
|
|
42
|
+
* otherwise derived from a `value`/`max` numeric parse (falling back to a
|
|
43
|
+
* full ring when neither is numeric).
|
|
44
|
+
*/
|
|
45
|
+
fraction?: number;
|
|
46
|
+
/** Denominator used to derive `fraction` when `fraction` is omitted. */
|
|
47
|
+
max?: number;
|
|
48
|
+
/**
|
|
49
|
+
* Number of evenly-spaced segment gaps to notch into the ring (e.g. `4` for
|
|
50
|
+
* a quartered dial). `0`/omitted draws a continuous arc.
|
|
51
|
+
*/
|
|
52
|
+
segments?: number;
|
|
53
|
+
/**
|
|
54
|
+
* DS token NAME for the arc colour — e.g. `'--success'`, `'--warning'`,
|
|
55
|
+
* `'--destructive'`, `'--info'`, or the light-orange overweight override.
|
|
56
|
+
* Resolved to a concrete colour from a probe span at raster time; never a
|
|
57
|
+
* hex literal in source.
|
|
58
|
+
*/
|
|
59
|
+
colorToken: string;
|
|
60
|
+
/** Small category label under the value inside the ring. */
|
|
61
|
+
label?: string;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Banded gauge — a full-width horizontal track split into coloured zones with a
|
|
65
|
+
* marker at the value's position (the WHO BMI dial, drawn via the shared
|
|
66
|
+
* `banded-gauge` module). It spans the card edge-to-edge below the field rows.
|
|
67
|
+
* Same raster-safety guarantees as the radial donut: pure native SVG, no
|
|
68
|
+
* `<foreignObject>`.
|
|
69
|
+
*
|
|
70
|
+
* Every visible string (`valueLabel`, `categoryLabel`, `rangeLabel`,
|
|
71
|
+
* `ariaLabel`) arrives ALREADY TRANSLATED — the calculator supplies `t()`-
|
|
72
|
+
* resolved text. Every band's `colorToken` is registered for probe sampling so
|
|
73
|
+
* the baked raster carries theme-correct fills.
|
|
74
|
+
*/
|
|
75
|
+
export interface InsertCardBandedGauge {
|
|
76
|
+
/** Discriminant for the banded layout. */
|
|
77
|
+
variant: 'banded';
|
|
78
|
+
/** The true value (printed verbatim even when clamped to a bar end). */
|
|
79
|
+
value: number;
|
|
80
|
+
/** Ascending coloured zones; the last `upTo` should equal `max`. */
|
|
81
|
+
bands: BandedGaugeBand[];
|
|
82
|
+
/** Low end of the drawn scale (maps to the bar's inline start). */
|
|
83
|
+
min: number;
|
|
84
|
+
/** High end of the drawn scale (maps to the bar's inline end). */
|
|
85
|
+
max: number;
|
|
86
|
+
/** Big number rendered above the marker (e.g. `'24.6'`). */
|
|
87
|
+
valueLabel: string;
|
|
88
|
+
/** Band name shown beside the value (e.g. `'normal'`). Pre-translated. */
|
|
89
|
+
categoryLabel?: string;
|
|
90
|
+
/** Range string for the band (e.g. `'18.5–24.9'`). Pre-translated. */
|
|
91
|
+
rangeLabel?: string;
|
|
92
|
+
/** Full accessible name, e.g. `'BMI 24.6 — normal (18.5–24.9)'`. */
|
|
93
|
+
ariaLabel: string;
|
|
94
|
+
/** Threshold tick values drawn under the bar (e.g. `[18.5, 25, 30]`). */
|
|
95
|
+
ticks?: number[];
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Optional in-card gauge. A discriminated union on `variant`:
|
|
99
|
+
*
|
|
100
|
+
* • `'radial'` (default when `variant` is omitted) — the corner-box donut.
|
|
101
|
+
* • `'banded'` — a full-width horizontal banded bar below the fields.
|
|
102
|
+
*/
|
|
103
|
+
export type InsertCardGauge = InsertCardRadialGauge | InsertCardBandedGauge;
|
|
8
104
|
export interface InsertCardData {
|
|
9
105
|
/** Card heading. */
|
|
10
106
|
title: string;
|
|
11
107
|
/** Key/value rows. */
|
|
12
108
|
fields: InsertCardField[];
|
|
13
|
-
/**
|
|
109
|
+
/**
|
|
110
|
+
* Optional header glyph drawn inline-end of the title, tinted with the card's
|
|
111
|
+
* category colour ({@link InsertCardData.highlightToken}). One of the known
|
|
112
|
+
* {@link IconKey} names; an unknown / omitted value simply skips the glyph
|
|
113
|
+
* (fully back-compatible — a card without an icon renders as before).
|
|
114
|
+
*/
|
|
115
|
+
icon?: IconKey;
|
|
116
|
+
/** Optional highlighted line, rendered as a category chip (pill). */
|
|
14
117
|
highlight?: string;
|
|
118
|
+
/**
|
|
119
|
+
* DS token NAME for the highlight chip fill. Defaults to the accent token
|
|
120
|
+
* (`--primary`). The chip text uses the matching `<token>-foreground` when it
|
|
121
|
+
* resolves, else falls back to the card background for contrast.
|
|
122
|
+
*/
|
|
123
|
+
highlightToken?: string;
|
|
124
|
+
/** Optional radial gauge drawn natively in the card. */
|
|
125
|
+
gauge?: InsertCardGauge;
|
|
126
|
+
/**
|
|
127
|
+
* Optional brand wordmark line printed at the foot of the card.
|
|
128
|
+
*
|
|
129
|
+
* - omitted / `false` → no brand line and no footer at all; the card ends
|
|
130
|
+
* after the fields/gauge.
|
|
131
|
+
* - a string → that wordmark, rendered as a single quiet line (no hairline
|
|
132
|
+
* rule above it).
|
|
133
|
+
*
|
|
134
|
+
* A `brand` passed to {@link SvgCardToPngOptions} overrides this per-render.
|
|
135
|
+
*/
|
|
136
|
+
brand?: string | false;
|
|
15
137
|
}
|
|
16
138
|
export interface InsertPayload {
|
|
17
139
|
/** Which button the user chose. */
|
|
@@ -38,14 +160,30 @@ export interface InsertPayload {
|
|
|
38
160
|
*/
|
|
39
161
|
imageDataUri: string;
|
|
40
162
|
/**
|
|
41
|
-
* Async thunk that resolves the result-card
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
163
|
+
* Async thunk that resolves the result-card raster — the format intended for
|
|
164
|
+
* editor insertion. PNG is a flat raster: it carries no script and survives
|
|
165
|
+
* the rich-text sanitiser that strips SVG.
|
|
166
|
+
*
|
|
167
|
+
* Resolves to `{ dataUri, width, height }` where `width`/`height` are the
|
|
168
|
+
* **logical (un-scaled) CSS pixel** dimensions: set them on the inserted
|
|
169
|
+
* `<img width height>` and the supersampled (`>= 2×`) PNG renders crisp with
|
|
170
|
+
* no consumer-side shim. For mode `'text'` resolves to an empty
|
|
171
|
+
* `{ dataUri: '', width: 0, height: 0 }`. Rendered lazily so the synchronous
|
|
172
|
+
* payload stays cheap; `await payload.pngDataUri()` only when you need it.
|
|
173
|
+
*
|
|
174
|
+
* @since 0.43.0 — this return shape changed from a bare `Promise<string>` to
|
|
175
|
+
* `Promise<{ dataUri; width; height }>` (see CHANGELOG).
|
|
47
176
|
*/
|
|
48
|
-
pngDataUri: () => Promise<
|
|
177
|
+
pngDataUri: () => Promise<InsertPngResult>;
|
|
178
|
+
}
|
|
179
|
+
/** Resolved PNG raster plus its logical (un-scaled) `<img>` dimensions. */
|
|
180
|
+
export interface InsertPngResult {
|
|
181
|
+
/** `image/png` data URI, or `''` for the text-only mode. */
|
|
182
|
+
dataUri: string;
|
|
183
|
+
/** Logical (CSS px) width to set on the inserted `<img>`. `0` when empty. */
|
|
184
|
+
width: number;
|
|
185
|
+
/** Logical (CSS px) height to set on the inserted `<img>`. `0` when empty. */
|
|
186
|
+
height: number;
|
|
49
187
|
}
|
|
50
188
|
export interface InsertButtonProps {
|
|
51
189
|
/** Structured result used to build every payload representation. */
|
|
@@ -84,10 +222,22 @@ interface ThemeColours {
|
|
|
84
222
|
border: string;
|
|
85
223
|
bg: string;
|
|
86
224
|
font: string;
|
|
225
|
+
/**
|
|
226
|
+
* Concrete colours resolved from arbitrary DS token names, keyed by the token
|
|
227
|
+
* name the caller passed (e.g. `'--success'`). Populated for the gauge arc
|
|
228
|
+
* and the highlight chip; consulted by {@link buildResultCardSvg} via
|
|
229
|
+
* {@link resolveToken}.
|
|
230
|
+
*/
|
|
231
|
+
tokens?: Record<string, string>;
|
|
87
232
|
}
|
|
233
|
+
/**
|
|
234
|
+
* Internal resolved-colour shape, re-exported for tests that construct a card
|
|
235
|
+
* raster without a live DOM probe. Not part of the public component API.
|
|
236
|
+
*/
|
|
237
|
+
export type ThemeColoursForTest = ThemeColours;
|
|
88
238
|
export declare function buildResultText(card: InsertCardData): string;
|
|
89
239
|
export declare function buildResultHtml(card: InsertCardData): string;
|
|
90
|
-
export declare function buildResultCardSvg(card: InsertCardData, c: ThemeColours): string;
|
|
240
|
+
export declare function buildResultCardSvg(card: InsertCardData, c: ThemeColours, brand?: string | false): string;
|
|
91
241
|
/** Options for {@link svgCardToPngDataUri}. */
|
|
92
242
|
export interface SvgCardToPngOptions {
|
|
93
243
|
/**
|
|
@@ -98,9 +248,15 @@ export interface SvgCardToPngOptions {
|
|
|
98
248
|
colours?: ThemeColours;
|
|
99
249
|
/**
|
|
100
250
|
* Device-pixel scale factor for the raster. `2` yields a retina-sharp PNG.
|
|
101
|
-
* Defaults to `
|
|
251
|
+
* Defaults to `Math.max(2, devicePixelRatio)` so the inserted image is crisp
|
|
252
|
+
* without a consumer-side supersampling shim.
|
|
102
253
|
*/
|
|
103
254
|
scale?: number;
|
|
255
|
+
/**
|
|
256
|
+
* Brand wordmark for the footer. Omitted → the card's own `brand` (then the
|
|
257
|
+
* default `'AlfaDocs'`); a string overrides it; `false` removes it.
|
|
258
|
+
*/
|
|
259
|
+
brand?: string | false;
|
|
104
260
|
}
|
|
105
261
|
/**
|
|
106
262
|
* Render an {@link InsertCardData} result card to an `image/png` data URI.
|
|
@@ -114,6 +270,13 @@ export interface SvgCardToPngOptions {
|
|
|
114
270
|
* called in a non-DOM context or if the SVG fails to decode.
|
|
115
271
|
*/
|
|
116
272
|
export declare function svgCardToPngDataUri(card: InsertCardData, opts?: SvgCardToPngOptions): Promise<string>;
|
|
273
|
+
/**
|
|
274
|
+
* Like {@link svgCardToPngDataUri} but also returns the **logical (un-scaled)**
|
|
275
|
+
* card dimensions so consumers can size the inserted `<img width height>` and
|
|
276
|
+
* drop their own supersampling shim. The PNG itself is rasterised at `scale`
|
|
277
|
+
* (default `Math.max(2, devicePixelRatio)`) for crispness.
|
|
278
|
+
*/
|
|
279
|
+
export declare function svgCardToPng(card: InsertCardData, opts?: SvgCardToPngOptions): Promise<InsertPngResult>;
|
|
117
280
|
export declare const InsertButton: import("react").ForwardRefExoticComponent<InsertButtonProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
118
281
|
export {};
|
|
119
282
|
//# sourceMappingURL=insert-result.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"insert-result.d.ts","sourceRoot":"","sources":["../../../src/components/_shared/insert-result.tsx"],"names":[],"mappings":"AA8BA,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"insert-result.d.ts","sourceRoot":"","sources":["../../../src/components/_shared/insert-result.tsx"],"names":[],"mappings":"AA8BA,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EAKL,KAAK,eAAe,EACrB,MAAM,gBAAgB,CAAC;AAExB,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,YAAY,CAAC;AAEzD,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,MAAM,CAAC;AAE9C;;;;;;;GAOG;AACH,MAAM,MAAM,OAAO,GACf,UAAU,GACV,OAAO,GACP,OAAO,GACP,UAAU,GACV,gBAAgB,GAChB,MAAM,GACN,OAAO,GACP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e1B;AAuFD,eAAO,MAAM,YAAY,8GAqHxB,CAAC"}
|
|
@@ -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 → no brand line (and no footer hairline); a string → that custom
|
|
33
|
+
* brand; `false` → no brand line. Brand is opt-in.
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bmi-calculator.d.ts","sourceRoot":"","sources":["../../../src/components/bmi-calculator/bmi-calculator.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bmi-calculator.d.ts","sourceRoot":"","sources":["../../../src/components/bmi-calculator/bmi-calculator.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAOlE,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,UAAU,EAChB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,KAAK,UAAU,EACf,KAAK,WAAW,EAOjB,MAAM,OAAO,CAAC;AAMf,MAAM,WAAW,SAAS;IACxB,oBAAoB;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,uCAAuC;IACvC,QAAQ,EAAE,WAAW,CAAC;CACvB;AAMD,QAAA,MAAM,YAAY;;8EAQhB,CAAC;AAmCH,MAAM,WAAW,kBAAmB,SAAQ,YAAY,CAAC,OAAO,YAAY,CAAC;IAC3E,mDAAmD;IACnD,iBAAiB,CAAC,EAAE,UAAU,CAAC;IAC/B,kFAAkF;IAClF,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,KAAK,IAAI,CAAC;IACpD,mFAAmF;IACnF,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,IAAI,CAAC;IAC5C;;;;OAIG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,sEAAsE;IACtE,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;IACpC,wEAAwE;IACxE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IAC7B,0DAA0D;IAC1D,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,wCAAwC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAKD,eAAO,MAAM,aAAa,+GAwRzB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as m } from "../../_chunks/bmi-calculator-
|
|
1
|
+
import { B as m } from "../../_chunks/bmi-calculator-CQqXTVNL.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,
|
|
@@ -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 → no brand line (and no footer hairline); a string → that custom
|
|
27
|
+
* brand; `false` → no brand line. Brand is opt-in.
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cycle-calculator.d.ts","sourceRoot":"","sources":["../../../src/components/cycle-calculator/cycle-calculator.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAQlE,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,UAAU,EAChB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,KAAK,eAAe,EAGrB,MAAM,SAAS,CAAC;AAEjB,QAAA,MAAM,YAAY;;8EAKhB,CAAC;
|
|
1
|
+
{"version":3,"file":"cycle-calculator.d.ts","sourceRoot":"","sources":["../../../src/components/cycle-calculator/cycle-calculator.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAQlE,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,UAAU,EAChB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,KAAK,eAAe,EAGrB,MAAM,SAAS,CAAC;AAEjB,QAAA,MAAM,YAAY;;8EAKhB,CAAC;AAUH,MAAM,WAAW,oBAAqB,SAAQ,YAAY,CACxD,OAAO,YAAY,CACpB;IACC,oDAAoD;IACpD,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,8EAA8E;IAC9E,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,GAAG,IAAI,KAAK,IAAI,CAAC;IAC1D,kFAAkF;IAClF,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,IAAI,CAAC;IAC5C;;;;OAIG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,sEAAsE;IACtE,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;IACpC,wEAAwE;IACxE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IAC7B,0DAA0D;IAC1D,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,wCAAwC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,eAAe,iHAwL3B,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as l, B as r, C as t, a as s, D as n, b as d, c as i, d as o, E as C, e as R, I as F, L as g, N as T, f as b, S as u, g as c, h as D, T as m, i as p, j as x, k as f, l as y, m as E, n as S, o as h, U as A, p as L, q as N, u as k } from "../../_chunks/editable-currency-cell-renderer-
|
|
1
|
+
import { A as l, B as r, C as t, a as s, D as n, b as d, c as i, d as o, E as C, e as R, I as F, L as g, N as T, f as b, S as u, g as c, h as D, T as m, i as p, j as x, k as f, l as y, m as E, n as S, o as h, U as A, p as L, q as N, u as k } from "../../_chunks/editable-currency-cell-renderer-BEBUQl9P.js";
|
|
2
2
|
export {
|
|
3
3
|
l as ActionsCellRenderer,
|
|
4
4
|
r as BalanceCellRenderer,
|
|
@@ -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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../../src/components/dialog/dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,wBAAwB,EAC7B,KAAK,cAAc,EACnB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,WAAW,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../../src/components/dialog/dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,wBAAwB,EAC7B,KAAK,cAAc,EACnB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,WAAW,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AA0ClE,QAAA,MAAM,eAAe;;8EAUnB,CAAC;AAGH,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,MAAM,OAAO,CAAC;IACzB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAED,MAAM,WAAW,eAAgB,SAAQ,wBAAwB,CAC/D,OAAO,WAAW,CAAC,IAAI,CACxB;IACC,+EAA+E;IAC/E,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAgED,MAAM,WAAW,kBACf,SACE,IAAI,CAAC,wBAAwB,CAAC,OAAO,WAAW,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,EAClE,YAAY,CAAC,OAAO,eAAe,CAAC;IACtC,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,YAAY,CAAC;IACzC,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,cAAc,CAAC;IAC/C,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAiHD,UAAU,iBAAkB,SAAQ,cAAc,CAAC,cAAc,CAAC;IAChE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAqBD,eAAO,MAAM,MAAM;4EAtMhB,eAAe;;;;gFAAf,eAAe;;;;;;;;;;;CAgNhB,CAAC;AAEH,YAAY,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -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 → no brand line (and no footer hairline); a string → that custom
|
|
27
|
+
* brand; `false` → no brand line. Brand is opt-in.
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"due-date-calculator.d.ts","sourceRoot":"","sources":["../../../src/components/due-date-calculator/due-date-calculator.tsx"],"names":[],"mappings":"AAYA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAQlE,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,UAAU,EAChB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,KAAK,aAAa,EAGlB,KAAK,aAAa,EAGnB,MAAM,aAAa,CAAC;AAErB,QAAA,MAAM,YAAY;;8EAKhB,CAAC;
|
|
1
|
+
{"version":3,"file":"due-date-calculator.d.ts","sourceRoot":"","sources":["../../../src/components/due-date-calculator/due-date-calculator.tsx"],"names":[],"mappings":"AAYA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAQlE,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,UAAU,EAChB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,KAAK,aAAa,EAGlB,KAAK,aAAa,EAGnB,MAAM,aAAa,CAAC;AAErB,QAAA,MAAM,YAAY;;8EAKhB,CAAC;AAgDH,MAAM,WAAW,sBAAuB,SAAQ,YAAY,CAC1D,OAAO,YAAY,CACpB;IACC,kDAAkD;IAClD,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,iFAAiF;IACjF,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI,KAAK,IAAI,CAAC;IACxD,mFAAmF;IACnF,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,IAAI,CAAC;IAC5C;;;;OAIG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,sEAAsE;IACtE,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;IACpC,wEAAwE;IACxE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IAC7B,0DAA0D;IAC1D,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,wCAAwC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,iBAAiB,mHAqN7B,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as s } from "../../_chunks/due-date-calculator-
|
|
1
|
+
import { D as s } from "../../_chunks/due-date-calculator-mFxpHLml.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,
|