tempest-react-sdk 0.26.1 → 0.28.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 (132) hide show
  1. package/README.md +25 -1
  2. package/bin/lib/css/analyze.mjs +149 -0
  3. package/bin/lib/css/analyze.test.mjs +136 -0
  4. package/bin/lib/css/collect.mjs +152 -0
  5. package/bin/lib/css/findings.mjs +79 -0
  6. package/bin/lib/css/fix.e2e.test.mjs +99 -0
  7. package/bin/lib/css/fix.mjs +138 -0
  8. package/bin/lib/css/fix.test.mjs +108 -0
  9. package/bin/lib/css/index.mjs +16 -0
  10. package/bin/lib/css/parse.mjs +398 -0
  11. package/bin/lib/css/parse.test.mjs +146 -0
  12. package/bin/lib/css/properties.mjs +399 -0
  13. package/bin/lib/css/repetition.mjs +213 -0
  14. package/bin/lib/css/repetition.test.mjs +166 -0
  15. package/bin/lib/css/semantic.mjs +327 -0
  16. package/bin/lib/css/semantic.test.mjs +201 -0
  17. package/bin/lib/css/tokens.mjs +119 -0
  18. package/bin/lib/doctor/doctor.e2e.test.mjs +246 -0
  19. package/bin/tempest.mjs +272 -36
  20. package/dist/charts/scales.cjs +2 -0
  21. package/dist/charts/scales.cjs.map +1 -0
  22. package/dist/charts/scales.js +29 -0
  23. package/dist/charts/scales.js.map +1 -0
  24. package/dist/charts.cjs +1 -1
  25. package/dist/charts.d.ts +91 -0
  26. package/dist/charts.js +9 -8
  27. package/dist/components/BottomNavigation/BottomNavigation.module.cjs.map +1 -1
  28. package/dist/components/BottomNavigation/BottomNavigation.module.js.map +1 -1
  29. package/dist/components/Carousel/Carousel.module.cjs.map +1 -1
  30. package/dist/components/Carousel/Carousel.module.js.map +1 -1
  31. package/dist/components/CodeBlock/CodeBlock.cjs +3 -0
  32. package/dist/components/CodeBlock/CodeBlock.cjs.map +1 -0
  33. package/dist/components/CodeBlock/CodeBlock.js +53 -0
  34. package/dist/components/CodeBlock/CodeBlock.js.map +1 -0
  35. package/dist/components/CodeBlock/CodeBlock.module.cjs +2 -0
  36. package/dist/components/CodeBlock/CodeBlock.module.cjs.map +1 -0
  37. package/dist/components/CodeBlock/CodeBlock.module.js +29 -0
  38. package/dist/components/CodeBlock/CodeBlock.module.js.map +1 -0
  39. package/dist/components/CodeBlock/tokenize.cjs +3 -0
  40. package/dist/components/CodeBlock/tokenize.cjs.map +1 -0
  41. package/dist/components/CodeBlock/tokenize.js +267 -0
  42. package/dist/components/CodeBlock/tokenize.js.map +1 -0
  43. package/dist/components/ImageCropper/ImageCropper.cjs +2 -0
  44. package/dist/components/ImageCropper/ImageCropper.cjs.map +1 -0
  45. package/dist/components/ImageCropper/ImageCropper.js +240 -0
  46. package/dist/components/ImageCropper/ImageCropper.js.map +1 -0
  47. package/dist/components/ImageCropper/ImageCropper.module.cjs +2 -0
  48. package/dist/components/ImageCropper/ImageCropper.module.cjs.map +1 -0
  49. package/dist/components/ImageCropper/ImageCropper.module.js +15 -0
  50. package/dist/components/ImageCropper/ImageCropper.module.js.map +1 -0
  51. package/dist/components/ImageCropper/crop-geometry.cjs +2 -0
  52. package/dist/components/ImageCropper/crop-geometry.cjs.map +1 -0
  53. package/dist/components/ImageCropper/crop-geometry.js +52 -0
  54. package/dist/components/ImageCropper/crop-geometry.js.map +1 -0
  55. package/dist/components/Navbar/Navbar.module.cjs.map +1 -1
  56. package/dist/components/Navbar/Navbar.module.js.map +1 -1
  57. package/dist/components/QRCode/QRCode.cjs +2 -0
  58. package/dist/components/QRCode/QRCode.cjs.map +1 -0
  59. package/dist/components/QRCode/QRCode.js +49 -0
  60. package/dist/components/QRCode/QRCode.js.map +1 -0
  61. package/dist/components/QRCode/QRCode.module.cjs +2 -0
  62. package/dist/components/QRCode/QRCode.module.cjs.map +1 -0
  63. package/dist/components/QRCode/QRCode.module.js +9 -0
  64. package/dist/components/QRCode/QRCode.module.js.map +1 -0
  65. package/dist/components/QRCode/qr-encode.cjs +2 -0
  66. package/dist/components/QRCode/qr-encode.cjs.map +1 -0
  67. package/dist/components/QRCode/qr-encode.js +295 -0
  68. package/dist/components/QRCode/qr-encode.js.map +1 -0
  69. package/dist/components/QRCode/qr-tables.cjs +2 -0
  70. package/dist/components/QRCode/qr-tables.cjs.map +1 -0
  71. package/dist/components/QRCode/qr-tables.js +366 -0
  72. package/dist/components/QRCode/qr-tables.js.map +1 -0
  73. package/dist/components/Scheduler/Scheduler.cjs +2 -0
  74. package/dist/components/Scheduler/Scheduler.cjs.map +1 -0
  75. package/dist/components/Scheduler/Scheduler.js +134 -0
  76. package/dist/components/Scheduler/Scheduler.js.map +1 -0
  77. package/dist/components/Scheduler/Scheduler.module.cjs +2 -0
  78. package/dist/components/Scheduler/Scheduler.module.cjs.map +1 -0
  79. package/dist/components/Scheduler/Scheduler.module.js +26 -0
  80. package/dist/components/Scheduler/Scheduler.module.js.map +1 -0
  81. package/dist/components/Scheduler/scheduler-layout.cjs +2 -0
  82. package/dist/components/Scheduler/scheduler-layout.cjs.map +1 -0
  83. package/dist/components/Scheduler/scheduler-layout.js +97 -0
  84. package/dist/components/Scheduler/scheduler-layout.js.map +1 -0
  85. package/dist/components/ScrollArea/ScrollArea.cjs +1 -1
  86. package/dist/components/ScrollArea/ScrollArea.cjs.map +1 -1
  87. package/dist/components/ScrollArea/ScrollArea.js +22 -16
  88. package/dist/components/ScrollArea/ScrollArea.js.map +1 -1
  89. package/dist/components/ScrollArea/ScrollArea.module.cjs.map +1 -1
  90. package/dist/components/ScrollArea/ScrollArea.module.js.map +1 -1
  91. package/dist/components/Sparkline/Sparkline.cjs +2 -0
  92. package/dist/components/Sparkline/Sparkline.cjs.map +1 -0
  93. package/dist/components/Sparkline/Sparkline.js +64 -0
  94. package/dist/components/Sparkline/Sparkline.js.map +1 -0
  95. package/dist/components/Sparkline/Sparkline.module.cjs +2 -0
  96. package/dist/components/Sparkline/Sparkline.module.cjs.map +1 -0
  97. package/dist/components/Sparkline/Sparkline.module.js +10 -0
  98. package/dist/components/Sparkline/Sparkline.module.js.map +1 -0
  99. package/dist/components/Sparkline/sparkline-geometry.cjs +2 -0
  100. package/dist/components/Sparkline/sparkline-geometry.cjs.map +1 -0
  101. package/dist/components/Sparkline/sparkline-geometry.js +56 -0
  102. package/dist/components/Sparkline/sparkline-geometry.js.map +1 -0
  103. package/dist/components/Table/Table.cjs +1 -1
  104. package/dist/components/Table/Table.cjs.map +1 -1
  105. package/dist/components/Table/Table.js +37 -30
  106. package/dist/components/Table/Table.js.map +1 -1
  107. package/dist/components/Table/Table.module.cjs.map +1 -1
  108. package/dist/components/Table/Table.module.js.map +1 -1
  109. package/dist/components/VirtualList/VirtualList.cjs +1 -1
  110. package/dist/components/VirtualList/VirtualList.cjs.map +1 -1
  111. package/dist/components/VirtualList/VirtualList.js +13 -11
  112. package/dist/components/VirtualList/VirtualList.js.map +1 -1
  113. package/dist/components/VirtualList/VirtualList.module.cjs.map +1 -1
  114. package/dist/components/VirtualList/VirtualList.module.js.map +1 -1
  115. package/dist/hooks/use-scroll-overflow.cjs +2 -0
  116. package/dist/hooks/use-scroll-overflow.cjs.map +1 -0
  117. package/dist/hooks/use-scroll-overflow.js +22 -0
  118. package/dist/hooks/use-scroll-overflow.js.map +1 -0
  119. package/dist/styles.css +1 -1
  120. package/dist/tempest-react-sdk.cjs +1 -1
  121. package/dist/tempest-react-sdk.d.ts +607 -2
  122. package/dist/tempest-react-sdk.js +197 -188
  123. package/dist/theme/create-theme.cjs +3 -3
  124. package/dist/theme/create-theme.cjs.map +1 -1
  125. package/dist/theme/create-theme.js +52 -28
  126. package/dist/theme/create-theme.js.map +1 -1
  127. package/dist/theme/data-viz-ramps.cjs +2 -0
  128. package/dist/theme/data-viz-ramps.cjs.map +1 -0
  129. package/dist/theme/data-viz-ramps.js +58 -0
  130. package/dist/theme/data-viz-ramps.js.map +1 -0
  131. package/package.json +2 -1
  132. package/template/package.json +1 -1
@@ -1092,6 +1092,9 @@ export declare const CEPInput: ForwardRefExoticComponent<Omit<InputProps, "value
1092
1092
  onChange: (value: string) => void;
1093
1093
  } & RefAttributes<HTMLInputElement>>;
1094
1094
 
1095
+ /** A `var(--tempest-chart-…)` reference, so the value follows the active theme. */
1096
+ export declare type ChartColorToken = string;
1097
+
1095
1098
  /**
1096
1099
  * Accessible checkbox. Supports a tri-state via `indeterminate` and pairs the
1097
1100
  * input with a label/description column for forms.
@@ -1213,6 +1216,50 @@ export declare const CNPJInput: ForwardRefExoticComponent<Omit<InputProps, "valu
1213
1216
  onChange: (value: string) => void;
1214
1217
  } & RefAttributes<HTMLInputElement>>;
1215
1218
 
1219
+ /**
1220
+ * A read-only code sample: syntax colours, optional line numbers, copy button.
1221
+ *
1222
+ * The `<pre>` is always focusable. A code block is scrollable and holds nothing
1223
+ * focusable inside, so without a tab stop a keyboard user can see there is more
1224
+ * code past the edge and has no way to reach it. It is the one scroll container
1225
+ * where the stop is unconditional rather than measured — a code sample is
1226
+ * expected to be reachable, read and selected on its own.
1227
+ *
1228
+ * Colours come from an approximate scanner, not a parser — see {@link tokenize}.
1229
+ *
1230
+ * @example
1231
+ * <CodeBlock code={snippet} language="ts" filename="src/main.ts" showLineNumbers />
1232
+ * <CodeBlock code={log} language="bash" maxHeight={280} />
1233
+ */
1234
+ export declare function CodeBlock({ code, language, filename, showLineNumbers, highlightLines, copyable, maxHeight, wrap, label, className, ...rest }: CodeBlockProps): JSX.Element;
1235
+
1236
+ export declare interface CodeBlockProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
1237
+ /** The source to display. Leading and trailing blank lines are trimmed. */
1238
+ code: string;
1239
+ /** Grammar name or alias (`ts`, `bash`, `json`…). Unknown values render plain. */
1240
+ language?: string;
1241
+ /** Shown in the header, usually a file path. */
1242
+ filename?: ReactNode;
1243
+ /** Number the lines. Default `false`. */
1244
+ showLineNumbers?: boolean;
1245
+ /** 1-based line numbers to mark as the point of the snippet. */
1246
+ highlightLines?: readonly number[];
1247
+ /** Offer a copy button. Default `true`. */
1248
+ copyable?: boolean;
1249
+ /** Cap the height in px or any CSS length; the body scrolls past it. */
1250
+ maxHeight?: number | string;
1251
+ /** Wrap long lines instead of scrolling sideways. Default `false`. */
1252
+ wrap?: boolean;
1253
+ /**
1254
+ * Accessible name for the code region. Defaults to naming the language, and
1255
+ * to the filename when there is one.
1256
+ */
1257
+ label?: string;
1258
+ }
1259
+
1260
+ /** Languages the tokenizer knows. Anything else renders as plain text. */
1261
+ export declare type CodeLanguage = "typescript" | "javascript" | "tsx" | "jsx" | "json" | "css" | "html" | "bash" | "python" | "sql" | "plain";
1262
+
1216
1263
  /**
1217
1264
  * A single expand/collapse region — a lighter alternative to `Accordion` for
1218
1265
  * one toggleable block. The trigger is a `<button aria-expanded aria-controls>`
@@ -2479,6 +2526,12 @@ export declare interface DateRangePickerProps extends Omit<HTMLAttributes<HTMLDi
2479
2526
  weekStartsOn?: WeekStart_2;
2480
2527
  }
2481
2528
 
2529
+ /** The visible time window of a day, in minutes from midnight. */
2530
+ export declare interface DayWindow {
2531
+ startMinute: number;
2532
+ endMinute: number;
2533
+ }
2534
+
2482
2535
  /**
2483
2536
  * Create a trailing-edge debounced version of `fn`.
2484
2537
  *
@@ -2596,6 +2649,40 @@ export declare interface DisclosureHandlers {
2596
2649
  toggle: () => void;
2597
2650
  }
2598
2651
 
2652
+ /** How many steps the diverging token scale has, midpoint included. */
2653
+ export declare const DIVERGING_STEP_COUNT = 9;
2654
+
2655
+ /**
2656
+ * Build a polarity scale over the diverging tokens.
2657
+ *
2658
+ * Each arm is scaled against its **own** distance from the centre, so an asymmetric
2659
+ * domain (say −5…+80) still uses the full cool arm for its small negatives. Scaling
2660
+ * both arms by the wider one — the easy mistake — would collapse every negative
2661
+ * into the step next to the midpoint and hide the sign entirely.
2662
+ *
2663
+ * @example
2664
+ * const color = divergingScale({ min: -12, max: 40 }); // centre 0
2665
+ * const budget = divergingScale({ min: 80, max: 130, center: 100 });
2666
+ *
2667
+ * @param options - The data domain and the neutral centre.
2668
+ * @returns A function from value to a CSS colour reference.
2669
+ */
2670
+ export declare function divergingScale(options: DivergingScaleOptions): (value: number) => ChartColorToken;
2671
+
2672
+ export declare interface DivergingScaleOptions {
2673
+ /** Lowest value in the data. */
2674
+ min: number;
2675
+ /** Highest value in the data. */
2676
+ max: number;
2677
+ /**
2678
+ * The value that means "no deviation". Default `0`.
2679
+ *
2680
+ * It is a parameter because the interesting midpoint is often not zero — a
2681
+ * budget variance diverges around the target, not around nothing.
2682
+ */
2683
+ center?: number;
2684
+ }
2685
+
2599
2686
  /**
2600
2687
  * Horizontal or vertical visual separator. When `label` is provided in
2601
2688
  * horizontal mode the divider splits and centers the label between two lines.
@@ -2759,6 +2846,25 @@ export declare interface EmptyStateProps {
2759
2846
  className?: string;
2760
2847
  }
2761
2848
 
2849
+ /**
2850
+ * Encode text into a QR matrix.
2851
+ *
2852
+ * The whole pipeline of ISO/IEC 18004: pick the densest mode the payload
2853
+ * qualifies for, pick the smallest version that fits, build the bit stream, add
2854
+ * Reed-Solomon correction, interleave the blocks, lay the modules out, then try
2855
+ * all eight masks and keep the one the standard's penalty function likes best.
2856
+ *
2857
+ * @param text - The payload. Byte mode encodes it as UTF-8.
2858
+ * @param options - Level and an optional version floor.
2859
+ * @returns The finished matrix, without a quiet zone.
2860
+ * @throws {QRCapacityError} When the payload does not fit at that level.
2861
+ *
2862
+ * @example
2863
+ * const qr = encodeQR("https://tempest.dev", { level: "Q" });
2864
+ * qr.modules[0][0]; // true — top-left of the finder pattern
2865
+ */
2866
+ export declare function encodeQR(text: string, options?: QREncodeOptions): QRMatrix;
2867
+
2762
2868
  /**
2763
2869
  * Class-based React error boundary with a render-prop or static fallback.
2764
2870
  * Auto-resets when any value in `resetKeys` changes.
@@ -3633,6 +3739,72 @@ export declare interface I18nProviderProps {
3633
3739
  declare function Image_2({ src, fallback, alt, lazy, className, onError, ...props }: ImageProps): JSX.Element;
3634
3740
  export { Image_2 as Image }
3635
3741
 
3742
+ /**
3743
+ * Crop an image to a fixed aspect ratio.
3744
+ *
3745
+ * The frame stays put and the image pans and zooms behind it — the model an avatar
3746
+ * or document-photo flow wants, where the output shape is decided by the app and
3747
+ * the user only chooses what lands inside it. (A free-form draggable rectangle is a
3748
+ * different component; this one cannot produce an off-ratio crop by construction.)
3749
+ *
3750
+ * The export reads the *natural* pixels through a canvas, so a 4000 px photo is not
3751
+ * silently downsampled to whatever the on-screen preview measured. The image is
3752
+ * also always clamped to cover the frame, so an export can never contain the empty
3753
+ * bands you get from panning past an edge.
3754
+ *
3755
+ * Works by pointer, wheel and keyboard: arrows pan, `+`/`-` zoom, `0` resets.
3756
+ *
3757
+ * @example
3758
+ * const cropper = useRef<ImageCropperHandle>(null);
3759
+ *
3760
+ * <ImageCropper ref={cropper} src={file} aspect={1} shape="circle" maxSize={512} />
3761
+ * <Button onClick={async () => upload(await cropper.current?.crop())}>Salvar</Button>
3762
+ */
3763
+ export declare function ImageCropper({ src, aspect, maxZoom, maxSize, outputType, outputQuality, shape, onCropChange, label, className, ref, ...rest }: ImageCropperProps): JSX.Element;
3764
+
3765
+ /** Imperative handle for exporting the current crop. */
3766
+ export declare interface ImageCropperHandle {
3767
+ /**
3768
+ * Render the current crop and resolve with it.
3769
+ *
3770
+ * Resolves `null` when the image has not loaded yet or the browser refuses to
3771
+ * encode — never throws, so a submit handler does not need a try/catch.
3772
+ */
3773
+ crop: () => Promise<Blob | null>;
3774
+ /** Recentre at zoom 1. */
3775
+ reset: () => void;
3776
+ }
3777
+
3778
+ export declare interface ImageCropperProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
3779
+ /** The image to crop: a `File`/`Blob` from an input, or a URL. */
3780
+ src: File | Blob | string;
3781
+ /** Crop aspect ratio as `width / height`. Default `1` (square). */
3782
+ aspect?: number;
3783
+ /** Maximum zoom over the cover scale. Default `4`. */
3784
+ maxZoom?: number;
3785
+ /**
3786
+ * Cap on the longest edge of the exported image, in px.
3787
+ *
3788
+ * Without it the export keeps the source resolution, which is right for a
3789
+ * document scan and wasteful for an avatar.
3790
+ */
3791
+ maxSize?: number;
3792
+ /** Output MIME type. Default `"image/png"`. */
3793
+ outputType?: string;
3794
+ /** Output quality for lossy types, `0`–`1`. Default `0.92`. */
3795
+ outputQuality?: number;
3796
+ /** Overlay shape. `"circle"` for an avatar, `"rect"` for a document. Default `"rect"`. */
3797
+ shape?: "rect" | "circle";
3798
+ /** Called whenever the crop changes, e.g. to enable a submit button. */
3799
+ onCropChange?: (state: {
3800
+ zoom: number;
3801
+ offset: Offset;
3802
+ }) => void;
3803
+ /** Accessible name for the crop area. */
3804
+ label?: string;
3805
+ ref?: React.Ref<ImageCropperHandle>;
3806
+ }
3807
+
3636
3808
  export declare interface ImageProps extends Omit<ImgHTMLAttributes<HTMLImageElement>, "src"> {
3637
3809
  /** Primary image source URL. */
3638
3810
  src: string;
@@ -4439,6 +4611,19 @@ export declare interface LongPressHandlers {
4439
4611
  onContextMenu: (event: MouseEvent_2) => void;
4440
4612
  }
4441
4613
 
4614
+ /**
4615
+ * The matrix as an SVG path, one `M…h…v…h…z` rectangle per dark module.
4616
+ *
4617
+ * A path beats one `<rect>` per module: a version-10 symbol is 3 481 modules,
4618
+ * and that many elements is a real cost to parse and to paint. Coordinates are
4619
+ * whole numbers in module space, so the shape stays crisp at any size.
4620
+ *
4621
+ * @param matrix - An encoded matrix.
4622
+ * @param margin - Quiet zone in modules. The standard asks for 4.
4623
+ * @returns The `d` attribute, empty when there is nothing dark.
4624
+ */
4625
+ export declare function matrixToPath(matrix: QRMatrix, margin?: number): string;
4626
+
4442
4627
  /**
4443
4628
  * Memoize only the most recent call of `fn`, keyed by shallow-equal arguments.
4444
4629
  *
@@ -5166,6 +5351,12 @@ export declare interface OfflineSyncConfig<TPayload, TRemote> {
5166
5351
  broadcastChannelName?: string;
5167
5352
  }
5168
5353
 
5354
+ /** A pan offset in frame pixels, measured from the centered position. */
5355
+ declare interface Offset {
5356
+ x: number;
5357
+ y: number;
5358
+ }
5359
+
5169
5360
  /** Offset-paginated response envelope (fastapi-pagination `Page[T]`). */
5170
5361
  export declare interface OffsetPage<T> {
5171
5362
  /** The rows for the current page. */
@@ -5270,6 +5461,16 @@ export declare interface OpenModalOptions {
5270
5461
  onClose?: () => void;
5271
5462
  }
5272
5463
 
5464
+ /**
5465
+ * First sequential step that clears 2:1 against the chart surface.
5466
+ *
5467
+ * A sequential scale may let its near-zero end recede into the surface — on a
5468
+ * heatmap that is exactly what "almost nothing" should look like. An **ordinal**
5469
+ * scale may not: every step is a discrete mark someone has to see. Starting an
5470
+ * ordinal ramp here is the difference.
5471
+ */
5472
+ export declare const ORDINAL_START_STEP = 3;
5473
+
5273
5474
  /** Options for {@link createOSRMBackend}. */
5274
5475
  export declare interface OSRMBackendOptions {
5275
5476
  /**
@@ -5559,6 +5760,21 @@ export declare interface PixelPoint {
5559
5760
  y: number;
5560
5761
  }
5561
5762
 
5763
+ /** An event placed in the grid: which day, where vertically, which column. */
5764
+ export declare interface PlacedEvent {
5765
+ event: SchedulerEvent;
5766
+ /** Index into the rendered day list. */
5767
+ dayIndex: number;
5768
+ /** Distance from the top of the day column, as a fraction of its height. */
5769
+ top: number;
5770
+ /** Height as a fraction of the day column. */
5771
+ height: number;
5772
+ /** Column this event occupies among its overlapping cluster, zero-based. */
5773
+ column: number;
5774
+ /** How many columns the cluster was split into. */
5775
+ columns: number;
5776
+ }
5777
+
5562
5778
  /**
5563
5779
  * Convenience wrapper around a shared {@link AudioPlayer}. Use this for
5564
5780
  * one-off notification sounds. For more complex flows (e.g. several
@@ -5759,6 +5975,103 @@ export declare interface PushPayload {
5759
5975
  data?: Record<string, unknown>;
5760
5976
  }
5761
5977
 
5978
+ /** Raised when a payload cannot be encoded at the requested level. */
5979
+ export declare class QRCapacityError extends Error {
5980
+ readonly length: number;
5981
+ readonly level: QRErrorCorrection;
5982
+ constructor(length: number, level: QRErrorCorrection);
5983
+ }
5984
+
5985
+ /**
5986
+ * A QR symbol, encoded in the browser and drawn as SVG.
5987
+ *
5988
+ * No dependency and no network round trip: an image service would leak the
5989
+ * payload — a payment link, a session token, an invite — to a third party, and
5990
+ * the encoder is a few kilobytes.
5991
+ *
5992
+ * SVG rather than canvas so the symbol stays sharp at any size and prints at
5993
+ * the printer's resolution instead of the screen's. Everything is one path
5994
+ * (horizontal runs merged), because a version-10 symbol is 3 481 modules and
5995
+ * that many elements costs real paint time.
5996
+ *
5997
+ * The colours are **black on white in both themes, on purpose** — they are the
5998
+ * one part of the SDK that ignores the theme tokens. Scanners expect
5999
+ * dark-on-light, and the ones that cope with an inverted symbol do it slowly and
6000
+ * unreliably; a QR that looks integrated with a dark page and scans on the third
6001
+ * try is worse than one that looks pasted on. Wiring the modules to
6002
+ * `--tempest-text` would flip them light in dark mode and leave a light symbol
6003
+ * on the white background, which scans as nothing at all. Override
6004
+ * `color`/`background` only with a scanner in hand.
6005
+ *
6006
+ * @throws {QRCapacityError} When the payload is too long for a version-40
6007
+ * symbol at the chosen level. That is a programming error rather than a state
6008
+ * to render, so it surfaces instead of silently drawing nothing — wrap it in
6009
+ * `ErrorBoundary` if the payload comes from user input.
6010
+ *
6011
+ * @example
6012
+ * <QRCode value="https://tempest.dev" />
6013
+ * <QRCode value={pixPayload} level="H" size={220} label="QR do Pix" />
6014
+ */
6015
+ export declare function QRCode({ value, size, level, margin, color, background, label, className, style, ...rest }: QRCodeProps): JSX.Element;
6016
+
6017
+ export declare interface QRCodeProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
6018
+ /** The payload. Encoded as UTF-8 when it is not plain digits or upper-case text. */
6019
+ value: string;
6020
+ /** Rendered side in px, quiet zone included. Default `160`. */
6021
+ size?: number;
6022
+ /** Error correction level. Default `"M"`. */
6023
+ level?: QRErrorCorrection;
6024
+ /** Quiet zone in modules. The standard asks for 4; below that, scanners start to miss. */
6025
+ margin?: number;
6026
+ /** Module colour. Defaults to black — see the note on dark mode below. */
6027
+ color?: string;
6028
+ /** Background colour. Defaults to white. */
6029
+ background?: string;
6030
+ /**
6031
+ * Accessible name. Defaults to naming the payload, because a screen reader
6032
+ * user cannot scan the symbol: the content has to reach them as text.
6033
+ */
6034
+ label?: string;
6035
+ }
6036
+
6037
+ export declare interface QREncodeOptions {
6038
+ /** Error correction level. Default `"M"`. */
6039
+ level?: QRErrorCorrection;
6040
+ /**
6041
+ * Force a minimum version. The encoder still grows past it when the payload
6042
+ * does not fit — a version is a floor, never a cap that silently truncates.
6043
+ */
6044
+ minVersion?: number;
6045
+ }
6046
+
6047
+ /**
6048
+ * The fixed tables of ISO/IEC 18004, transcribed.
6049
+ *
6050
+ * They are data, not logic: the standard specifies them and there is nothing to
6051
+ * derive. They live apart from {@link ./qr-encode} so the algorithm reads as
6052
+ * algorithm and a typo in a table stays findable.
6053
+ */
6054
+ /** Error correction level, by how much of the symbol it can lose and survive. */
6055
+ export declare type QRErrorCorrection = "L" | "M" | "Q" | "H";
6056
+
6057
+ export declare interface QRMatrix {
6058
+ /** Side length in modules, including no quiet zone. */
6059
+ size: number;
6060
+ /** Row-major modules; `true` is dark. */
6061
+ modules: boolean[][];
6062
+ /** Symbol version, 1 to 40. */
6063
+ version: number;
6064
+ /** Level the symbol was encoded at. */
6065
+ level: QRErrorCorrection;
6066
+ /** The mode chosen for the payload. */
6067
+ mode: QRMode;
6068
+ /** Which of the eight masks scored best. */
6069
+ mask: number;
6070
+ }
6071
+
6072
+ /** How the payload is packed into bits. */
6073
+ export declare type QRMode = "numeric" | "alphanumeric" | "byte";
6074
+
5762
6075
  /**
5763
6076
  * Wrapper around `QueryClientProvider` that bootstraps a `QueryClient` with
5764
6077
  * sane SDK defaults (5-minute stale time, 30-minute gc time, 1 retry).
@@ -6133,6 +6446,14 @@ export declare interface ResizableProps extends Omit<HTMLAttributes<HTMLDivEleme
6133
6446
 
6134
6447
  export declare type ResolvedTheme = "light" | "dark";
6135
6448
 
6449
+ /**
6450
+ * Normalise a language name onto a known grammar.
6451
+ *
6452
+ * @param language - Whatever the caller passed, e.g. `"ts"` or `"Shell"`.
6453
+ * @returns The grammar to use; `"plain"` when there is no match.
6454
+ */
6455
+ export declare function resolveLanguage(language: string | undefined): CodeLanguage;
6456
+
6136
6457
  declare type Resolver<T> = (values: unknown, context: unknown, options: {
6137
6458
  criteriaMode?: "firstError" | "all";
6138
6459
  }) => Promise<ResolverOutput<T>>;
@@ -6327,11 +6648,97 @@ export declare interface SafeAreaProps extends HTMLAttributes<HTMLDivElement> {
6327
6648
  /** The ten steps of a Tempest tint scale, lightest to darkest. */
6328
6649
  export declare type ScaleStep = 50 | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;
6329
6650
 
6651
+ /**
6652
+ * Every step of a token scale, in order — for rendering a legend.
6653
+ *
6654
+ * A continuous scale needs a legend showing the ramp with its end labels; without
6655
+ * one the reader has no way to turn a colour back into a number.
6656
+ *
6657
+ * @param kind - Which scale.
6658
+ * @returns The token references, lightest/coolest first.
6659
+ */
6660
+ export declare function scaleSteps(kind: "sequential" | "diverging"): ChartColorToken[];
6661
+
6662
+ /**
6663
+ * An agenda: events placed on a time grid across consecutive days.
6664
+ *
6665
+ * `Calendar` is a date *picker* — it answers "which day?". This answers "what is on
6666
+ * those days, and when", which needs a different structure entirely: a vertical time
6667
+ * axis, events sized by duration, and overlapping events sitting side by side.
6668
+ *
6669
+ * That last part is the one worth naming. Overlapping events are grouped into
6670
+ * clusters of mutual overlap and every event in a cluster shares one column count,
6671
+ * so widths line up; a column is reused the moment it frees, so `9–10`, `9–10`,
6672
+ * `10–11` takes two columns and not three. The layout is pure and lives in
6673
+ * `scheduler-layout.ts`.
6674
+ *
6675
+ * Times are local. An event crossing midnight is split into both day columns, and
6676
+ * the day range is built by incrementing the calendar day, so a DST boundary does
6677
+ * not duplicate or skip a date.
6678
+ *
6679
+ * @example
6680
+ * <Scheduler
6681
+ * events={bookings}
6682
+ * days={7}
6683
+ * startHour={7}
6684
+ * endHour={21}
6685
+ * onEventClick={(e) => open(e.id)}
6686
+ * onSlotClick={(start) => createAt(start)}
6687
+ * />
6688
+ */
6689
+ declare function Scheduler_2({ events, anchor, days: dayCount, startHour, endHour, snapMinutes, onEventClick, onSlotClick, renderEvent, locale, showCurrentTime, now, className, ...rest }: SchedulerProps): JSX.Element;
6690
+ export { Scheduler_2 as Scheduler }
6691
+
6692
+ /** An event on the schedule. `start`/`end` are absolute instants in local time. */
6693
+ export declare interface SchedulerEvent {
6694
+ id: string;
6695
+ title: string;
6696
+ start: Date;
6697
+ end: Date;
6698
+ /** Render across the all-day lane instead of the time grid. */
6699
+ allDay?: boolean;
6700
+ /** Free-form payload the app passes through. */
6701
+ data?: Record<string, unknown>;
6702
+ }
6703
+
6704
+ export declare interface SchedulerProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
6705
+ /** Events to place. Instants are read in the browser's local time. */
6706
+ events: readonly SchedulerEvent[];
6707
+ /** Any day within the range to show. Default: today. */
6708
+ anchor?: Date;
6709
+ /** How many consecutive days to render. `1` is a day view, `7` a week. Default `7`. */
6710
+ days?: number;
6711
+ /** First visible hour, `0`–`23`. Default `8`. */
6712
+ startHour?: number;
6713
+ /** Last visible hour, `1`–`24`. Default `20`. */
6714
+ endHour?: number;
6715
+ /** Minutes a click on empty space snaps to. Default `30`. */
6716
+ snapMinutes?: number;
6717
+ /** Called when an event is activated by click, `Enter` or `Space`. */
6718
+ onEventClick?: (event: SchedulerEvent) => void;
6719
+ /** Called with the snapped instant when empty space is clicked. */
6720
+ onSlotClick?: (start: Date) => void;
6721
+ /** Render an event's contents. Defaults to its title and start time. */
6722
+ renderEvent?: (event: SchedulerEvent) => ReactNode;
6723
+ /** Locale for the day and hour labels. Default `"pt-BR"`. */
6724
+ locale?: string;
6725
+ /** Draw the current-time line. Default `true`. */
6726
+ showCurrentTime?: boolean;
6727
+ /** Fixed "now" for the indicator. Default: the real clock, ticking each minute. */
6728
+ now?: Date;
6729
+ }
6730
+
6330
6731
  /**
6331
6732
  * A styled scroll container that overflows on the chosen axis and renders a
6332
6733
  * thin custom scrollbar (WebKit) while staying fully functional in browsers
6333
6734
  * without scrollbar styling. Forwards `className`, `style` and the ref to the
6334
6735
  * underlying `<div>`.
6736
+ *
6737
+ * While the content overflows, the container becomes a named, focusable group.
6738
+ * A scroll area whose children are plain text holds nothing focusable, so
6739
+ * without that a keyboard user can see the scrollbar and has no way to move it.
6740
+ * The tab stop disappears again once the content fits, so an area that does not
6741
+ * scroll never adds one. Callers may still override `tabIndex` or `role`.
6335
6742
  */
6336
6743
  export declare const ScrollArea: ForwardRefExoticComponent<ScrollAreaProps & RefAttributes<HTMLDivElement>>;
6337
6744
 
@@ -6342,8 +6749,17 @@ export declare interface ScrollAreaProps extends HTMLAttributes<HTMLDivElement>
6342
6749
  maxHeight?: number | string;
6343
6750
  /** Which axis scrolls. Default `"vertical"`. */
6344
6751
  orientation?: ScrollAreaOrientation;
6752
+ /**
6753
+ * Accessible name used while the content actually overflows, when the area
6754
+ * takes a tab stop of its own. Defaults to a generic one; name it when the
6755
+ * page holds several scroll areas.
6756
+ */
6757
+ scrollLabel?: string;
6345
6758
  }
6346
6759
 
6760
+ /** Which axis to watch for overflow. */
6761
+ export declare type ScrollOverflowAxis = "horizontal" | "vertical" | "both";
6762
+
6347
6763
  /**
6348
6764
  * Search input with magnifier icon and a clear button. Controlled component:
6349
6765
  * pass `value` and `onChange`.
@@ -6401,6 +6817,19 @@ export declare interface SegmentedControlProps<TValue extends string = string> e
6401
6817
  */
6402
6818
  export declare const Select: ForwardRefExoticComponent<SelectProps & RefAttributes<HTMLSelectElement>>;
6403
6819
 
6820
+ /**
6821
+ * Pick the densest mode the payload qualifies for.
6822
+ *
6823
+ * Numeric packs 3 digits into 10 bits and alphanumeric 2 characters into 11, so
6824
+ * a phone number or an upper-case code encodes far smaller than the same string
6825
+ * as bytes — often a whole version smaller, which is a visibly coarser symbol
6826
+ * and therefore easier to scan.
6827
+ *
6828
+ * @param text - The payload.
6829
+ * @returns The narrowest mode that can represent it.
6830
+ */
6831
+ export declare function selectMode(text: string): QRMode;
6832
+
6404
6833
  export declare interface SelectOption {
6405
6834
  value: string | number;
6406
6835
  label: string;
@@ -6437,6 +6866,39 @@ export declare interface SentryLike {
6437
6866
  flush?: (timeout?: number) => Promise<boolean>;
6438
6867
  }
6439
6868
 
6869
+ /** How many steps the sequential token scale has. */
6870
+ export declare const SEQUENTIAL_STEP_COUNT = 7;
6871
+
6872
+ /**
6873
+ * Build a magnitude scale over the sequential tokens.
6874
+ *
6875
+ * Returns `var(--tempest-chart-sequential-N)` rather than a hex string, so a
6876
+ * heatmap painted once follows the theme — including dark mode, whose steps are
6877
+ * chosen for the dark surface rather than flipped.
6878
+ *
6879
+ * @example
6880
+ * const color = sequentialScale({ min: 0, max: 250 });
6881
+ * <rect fill={color(value)} />
6882
+ *
6883
+ * @param options - The data domain, and whether every step must stay visible.
6884
+ * @returns A function from value to a CSS colour reference.
6885
+ */
6886
+ export declare function sequentialScale(options: SequentialScaleOptions): (value: number) => ChartColorToken;
6887
+
6888
+ export declare interface SequentialScaleOptions {
6889
+ /** Lowest value in the data. */
6890
+ min: number;
6891
+ /** Highest value in the data. */
6892
+ max: number;
6893
+ /**
6894
+ * Keep every step visible against the surface, for discrete ordered marks.
6895
+ *
6896
+ * Off by default: a heatmap *wants* its near-zero cells to recede. Turn it on
6897
+ * for tiers, funnel stages or anything where each step is its own mark.
6898
+ */
6899
+ ordinal?: boolean;
6900
+ }
6901
+
6440
6902
  /**
6441
6903
  * Wrap the Web Share API with a uniform result object. Falls through to
6442
6904
  * `unsupported: true` when the browser lacks `navigator.share`, leaving the
@@ -6744,6 +7206,58 @@ export declare interface SpacerProps extends HTMLAttributes<HTMLDivElement> {
6744
7206
  axis?: SpacerAxis;
6745
7207
  }
6746
7208
 
7209
+ /**
7210
+ * A tiny inline chart: shape only, no axes, no legend.
7211
+ *
7212
+ * Sized to sit in a table cell or beside a number, which is why it is plain SVG on
7213
+ * the root entry rather than a recharts wrapper — a sparkline in a data table should
7214
+ * not oblige an app to install a charting library.
7215
+ *
7216
+ * It carries `role="img"` and a spoken description of the series (direction, ends,
7217
+ * extremes). Without that it is an unlabelled image: a sparkline has no axis or
7218
+ * legend to fall back on, so a screen reader would reach it and read nothing. Pair it
7219
+ * with the number it annotates — the shape is context, never the only way to read the
7220
+ * value.
7221
+ *
7222
+ * @example
7223
+ * <Sparkline data={last30Days} />
7224
+ * <Sparkline data={revenue} variant="area" width={120} height={32} />
7225
+ *
7226
+ * // Same axis across a column, so the rows are comparable
7227
+ * <Sparkline data={row.series} min={0} max={columnMax} />
7228
+ */
7229
+ export declare function Sparkline({ data, width, height, variant, color, showEnd, min, max, valueFormatter, label, className, ...rest }: SparklineProps): JSX.Element;
7230
+
7231
+ export declare interface SparklineProps extends Omit<HTMLAttributes<HTMLSpanElement>, "children"> {
7232
+ /** The series, in order. Non-finite entries are skipped. */
7233
+ data: readonly number[];
7234
+ /** Drawing width in px. Default `88`. */
7235
+ width?: number;
7236
+ /** Drawing height in px. Default `24`. */
7237
+ height?: number;
7238
+ /** Which mark to draw. Default `"line"`. */
7239
+ variant?: SparklineVariant;
7240
+ /** Any CSS colour. Defaults to the first chart series token. */
7241
+ color?: string;
7242
+ /** Draw a dot on the last point. Default `true` for line and area. */
7243
+ showEnd?: boolean;
7244
+ /** Force the low end of the value axis — use it to compare several sparklines. */
7245
+ min?: number;
7246
+ /** Force the high end. */
7247
+ max?: number;
7248
+ /** Render a value; used in the accessible description. */
7249
+ valueFormatter?: (value: number) => string;
7250
+ /**
7251
+ * Accessible name. Defaults to a sentence describing the series.
7252
+ *
7253
+ * Pass one when the surrounding text already says what is plotted — the default
7254
+ * still appends the shape, so a caller never ends up with an unlabelled image.
7255
+ */
7256
+ label?: string;
7257
+ }
7258
+
7259
+ export declare type SparklineVariant = "line" | "area" | "bar";
7260
+
6747
7261
  /**
6748
7262
  * Loading spinner with preset sizes (xs..xl). Provide `label` for screen
6749
7263
  * readers, `caption` for a visible message, and `overlay` to center it inside a
@@ -7052,7 +7566,7 @@ export declare interface TabItem {
7052
7566
  * - `stackOnMobile` re-renders each row as a label/value card on mobile,
7053
7567
  * avoiding horizontal scroll for dense data.
7054
7568
  */
7055
- export declare function Table<T>({ columns, data, rowKey, onRowClick, emptyMessage, className, stackOnMobile, }: TableProps<T>): JSX.Element;
7569
+ export declare function Table<T>({ columns, data, rowKey, onRowClick, emptyMessage, className, stackOnMobile, scrollLabel, }: TableProps<T>): JSX.Element;
7056
7570
 
7057
7571
  export declare type TableAlign = "left" | "right" | "center";
7058
7572
 
@@ -7085,6 +7599,12 @@ export declare interface TableProps<T> {
7085
7599
  * Better than horizontal scroll when each row has 3+ columns of dense data.
7086
7600
  */
7087
7601
  stackOnMobile?: boolean;
7602
+ /**
7603
+ * Accessible name for the scrollable region, used only while the table is
7604
+ * actually wider than its box. A focus stop that announces nothing is worse
7605
+ * than no focus stop, so name the table when the page holds several.
7606
+ */
7607
+ scrollLabel?: string;
7088
7608
  }
7089
7609
 
7090
7610
  /**
@@ -7576,6 +8096,50 @@ export declare type ToggleSize = "sm" | "md" | "lg";
7576
8096
 
7577
8097
  export declare type ToggleVariant = "default" | "outline";
7578
8098
 
8099
+ export declare interface Token {
8100
+ kind: TokenKind;
8101
+ value: string;
8102
+ }
8103
+
8104
+ /**
8105
+ * Split source into coloured tokens.
8106
+ *
8107
+ * This is a **scanner, not a parser**: it recognises comments, strings, numbers,
8108
+ * keywords and punctuation by pattern, and knows nothing about scope, types or
8109
+ * grammar. That is a deliberate ceiling. A real parser per language is a
8110
+ * dependency the size of the rest of the SDK, and the payoff — being right about
8111
+ * the corner cases in a documentation snippet — is small. Where it is unsure it
8112
+ * emits `plain`, which renders as ordinary text rather than as something wrong.
8113
+ *
8114
+ * Unknown languages produce a single `plain` token, so an unhighlighted block is
8115
+ * a normal outcome and never an error.
8116
+ *
8117
+ * @param code - The source.
8118
+ * @param language - Grammar name or alias.
8119
+ * @returns Tokens covering the input exactly, in order.
8120
+ *
8121
+ * @example
8122
+ * tokenize("const x = 1;", "ts");
8123
+ * // [{kind: "keyword", value: "const"}, {kind: "plain", value: " x "}, …]
8124
+ */
8125
+ export declare function tokenize(code: string, language: string | undefined): Token[];
8126
+
8127
+ /**
8128
+ * The same tokens, split at newlines so each line can be rendered on its own.
8129
+ *
8130
+ * Line numbers and highlighted lines both need a per-line structure, and a token
8131
+ * is free to span a line break — a block comment usually does. Splitting here
8132
+ * keeps that out of the component.
8133
+ *
8134
+ * @param code - The source.
8135
+ * @param language - Grammar name or alias.
8136
+ * @returns One token array per line. Always at least one line.
8137
+ */
8138
+ export declare function tokenizeLines(code: string, language: string | undefined): Token[][];
8139
+
8140
+ /** What a token is painted as. */
8141
+ export declare type TokenKind = "plain" | "comment" | "string" | "number" | "keyword" | "literal" | "function" | "punctuation" | "tag" | "attribute" | "property";
8142
+
7579
8143
  /**
7580
8144
  * Lightweight tooltip. Shows on hover and on focus (keyboard-friendly). Wraps
7581
8145
  * a single child element via `cloneElement`, so the trigger keeps its own ref
@@ -9186,6 +9750,41 @@ export { useRouteError }
9186
9750
  */
9187
9751
  export declare function useScrollLock(active: boolean): void;
9188
9752
 
9753
+ /**
9754
+ * Track whether an element's content currently overflows its box.
9755
+ *
9756
+ * The use this exists for is keyboard access. A scroll container holding no
9757
+ * focusable content is unreachable by keyboard: the user can see there is more
9758
+ * content past the edge and has no way to get to it, because focus never lands
9759
+ * anywhere the arrow keys would scroll. Giving the container `tabIndex={0}`
9760
+ * fixes it — but doing that unconditionally puts a tab stop on every such
9761
+ * container on the page, including the ones whose content fits and have nothing
9762
+ * to scroll. The stop is only wanted while the overflow is real, which is what
9763
+ * this reports. (It is also what axe checks as `scrollable-region-focusable`.)
9764
+ *
9765
+ * Both the container and its content are observed: content can outgrow a box
9766
+ * whose own dimensions never change, and a box can shrink around content that
9767
+ * never changes. Watching one alone misses half the transitions.
9768
+ *
9769
+ * A one-pixel difference is ignored — that is layout rounding, not overflow.
9770
+ *
9771
+ * @param ref - The scroll container.
9772
+ * @param axis - Which axis to measure. Defaults to `"both"`.
9773
+ * @returns `true` while the content is larger than the box on that axis.
9774
+ *
9775
+ * @example
9776
+ * const ref = useRef<HTMLDivElement>(null);
9777
+ * const scrollable = useScrollOverflow(ref, "horizontal");
9778
+ *
9779
+ * <div
9780
+ * ref={ref}
9781
+ * tabIndex={scrollable ? 0 : undefined}
9782
+ * role={scrollable ? "group" : undefined}
9783
+ * aria-label={scrollable ? "Tabela rolável" : undefined}
9784
+ * >
9785
+ */
9786
+ export declare function useScrollOverflow(ref: RefObject<HTMLElement | null>, axis?: ScrollOverflowAxis): boolean;
9787
+
9189
9788
  export { useSearchParams }
9190
9789
 
9191
9790
  /**
@@ -9604,7 +10203,7 @@ export declare interface ViaCEPResult {
9604
10203
  * For variable heights, use `react-window`/`@tanstack/react-virtual` — those
9605
10204
  * solve a more general problem at the cost of extra setup.
9606
10205
  */
9607
- export declare function VirtualList<T>({ items, itemHeight, renderItem, height, overscan, getKey, className, style, }: VirtualListProps<T>): JSX.Element;
10206
+ export declare function VirtualList<T>({ items, itemHeight, renderItem, height, overscan, getKey, className, style, label, }: VirtualListProps<T>): JSX.Element;
9608
10207
 
9609
10208
  export declare interface VirtualListProps<T> {
9610
10209
  items: T[];
@@ -9620,6 +10219,12 @@ export declare interface VirtualListProps<T> {
9620
10219
  getKey?: (item: T, index: number) => string | number;
9621
10220
  className?: string;
9622
10221
  style?: CSSProperties;
10222
+ /**
10223
+ * Accessible name for the list. Worth setting when the list scrolls: it
10224
+ * then carries a tab stop of its own, and a focus stop that announces
10225
+ * nothing is worse than no focus stop.
10226
+ */
10227
+ label?: string;
9623
10228
  }
9624
10229
 
9625
10230
  /**