tempest-react-sdk 0.40.0 → 0.42.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 (109) hide show
  1. package/README.md +3 -3
  2. package/bin/tempest.mjs +3 -3
  3. package/dist/br.cjs +1 -1
  4. package/dist/br.cjs.map +1 -1
  5. package/dist/br.d.ts +0 -13
  6. package/dist/br.js +14 -15
  7. package/dist/br.js.map +1 -1
  8. package/dist/charts/palette.cjs +1 -1
  9. package/dist/charts/palette.cjs.map +1 -1
  10. package/dist/charts/palette.js +4 -4
  11. package/dist/charts/palette.js.map +1 -1
  12. package/dist/charts.cjs +1 -1
  13. package/dist/charts.d.ts +0 -3
  14. package/dist/charts.js +8 -8
  15. package/dist/icons/generated/aliases.cjs +1 -1
  16. package/dist/icons/generated/aliases.cjs.map +1 -1
  17. package/dist/icons/generated/aliases.js +9 -0
  18. package/dist/icons/generated/aliases.js.map +1 -1
  19. package/dist/icons/generated/icon-names.cjs +1 -1
  20. package/dist/icons/generated/icon-names.cjs.map +1 -1
  21. package/dist/icons/generated/icon-names.js +1 -1
  22. package/dist/icons/generated/icon-names.js.map +1 -1
  23. package/dist/icons/generated/shard-a.cjs +1 -1
  24. package/dist/icons/generated/shard-a.cjs.map +1 -1
  25. package/dist/icons/generated/shard-a.js +61 -61
  26. package/dist/icons/generated/shard-a.js.map +1 -1
  27. package/dist/icons/generated/shard-b.cjs +1 -1
  28. package/dist/icons/generated/shard-b.cjs.map +1 -1
  29. package/dist/icons/generated/shard-b.js +15 -13
  30. package/dist/icons/generated/shard-b.js.map +1 -1
  31. package/dist/icons/generated/shard-e.cjs +1 -1
  32. package/dist/icons/generated/shard-e.cjs.map +1 -1
  33. package/dist/icons/generated/shard-e.js +20 -19
  34. package/dist/icons/generated/shard-e.js.map +1 -1
  35. package/dist/icons/generated/shard-f.cjs +1 -1
  36. package/dist/icons/generated/shard-f.cjs.map +1 -1
  37. package/dist/icons/generated/shard-f.js +140 -134
  38. package/dist/icons/generated/shard-f.js.map +1 -1
  39. package/dist/icons/generated/shard-h.cjs +1 -1
  40. package/dist/icons/generated/shard-h.cjs.map +1 -1
  41. package/dist/icons/generated/shard-h.js +13 -14
  42. package/dist/icons/generated/shard-h.js.map +1 -1
  43. package/dist/icons/generated/shard-l.cjs +1 -1
  44. package/dist/icons/generated/shard-l.cjs.map +1 -1
  45. package/dist/icons/generated/shard-l.js +73 -69
  46. package/dist/icons/generated/shard-l.js.map +1 -1
  47. package/dist/icons/generated/shard-m.cjs +1 -1
  48. package/dist/icons/generated/shard-m.cjs.map +1 -1
  49. package/dist/icons/generated/shard-m.js +101 -98
  50. package/dist/icons/generated/shard-m.js.map +1 -1
  51. package/dist/icons/generated/shard-p.cjs +1 -1
  52. package/dist/icons/generated/shard-p.cjs.map +1 -1
  53. package/dist/icons/generated/shard-p.js +19 -20
  54. package/dist/icons/generated/shard-p.js.map +1 -1
  55. package/dist/icons/generated/shard-r.cjs +1 -1
  56. package/dist/icons/generated/shard-r.cjs.map +1 -1
  57. package/dist/icons/generated/shard-r.js +19 -17
  58. package/dist/icons/generated/shard-r.js.map +1 -1
  59. package/dist/icons/generated/shard-s.cjs +1 -1
  60. package/dist/icons/generated/shard-s.cjs.map +1 -1
  61. package/dist/icons/generated/shard-s.js +160 -159
  62. package/dist/icons/generated/shard-s.js.map +1 -1
  63. package/dist/icons/generated/shard-u.cjs +1 -1
  64. package/dist/icons/generated/shard-u.cjs.map +1 -1
  65. package/dist/icons/generated/shard-u.js +11 -10
  66. package/dist/icons/generated/shard-u.js.map +1 -1
  67. package/dist/icons/shard-cache.cjs.map +1 -1
  68. package/dist/icons/shard-cache.js.map +1 -1
  69. package/dist/icons.d.ts +5 -5
  70. package/dist/imaging/encode.cjs +1 -1
  71. package/dist/imaging/encode.cjs.map +1 -1
  72. package/dist/imaging/encode.js +1 -4
  73. package/dist/imaging/encode.js.map +1 -1
  74. package/dist/imaging.cjs +1 -1
  75. package/dist/imaging.d.ts +0 -7
  76. package/dist/imaging.js +6 -6
  77. package/dist/tabular/compact.cjs +1 -1
  78. package/dist/tabular/compact.cjs.map +1 -1
  79. package/dist/tabular/compact.js +8 -8
  80. package/dist/tabular/compact.js.map +1 -1
  81. package/dist/tabular/manifest.cjs +1 -1
  82. package/dist/tabular/manifest.cjs.map +1 -1
  83. package/dist/tabular/manifest.js +13 -14
  84. package/dist/tabular/manifest.js.map +1 -1
  85. package/dist/tabular.cjs +1 -1
  86. package/dist/tabular.d.ts +0 -9
  87. package/dist/tabular.js +5 -5
  88. package/dist/tempest-react-sdk.cjs +1 -1
  89. package/dist/tempest-react-sdk.d.ts +0 -299
  90. package/dist/tempest-react-sdk.js +183 -188
  91. package/dist/vision/index.cjs +1 -1
  92. package/dist/vision/index.cjs.map +1 -1
  93. package/dist/vision/index.js +11 -11
  94. package/dist/vision/index.js.map +1 -1
  95. package/dist/vision/preprocess/pipeline.cjs +1 -1
  96. package/dist/vision/preprocess/pipeline.cjs.map +1 -1
  97. package/dist/vision/preprocess/pipeline.js +69 -3
  98. package/dist/vision/preprocess/pipeline.js.map +1 -1
  99. package/dist/vision/tasks/classifier.cjs +1 -1
  100. package/dist/vision/tasks/classifier.cjs.map +1 -1
  101. package/dist/vision/tasks/classifier.js +38 -17
  102. package/dist/vision/tasks/classifier.js.map +1 -1
  103. package/dist/vision.cjs +1 -1
  104. package/dist/vision.d.ts +140 -0
  105. package/dist/vision.js +13 -13
  106. package/dist/vite.cjs +1 -1
  107. package/dist/vite.d.ts +0 -25
  108. package/dist/vite.js +6 -6
  109. package/package.json +5 -5
package/dist/vision.d.ts CHANGED
@@ -205,6 +205,28 @@ export declare class Classifier extends VisionTask {
205
205
  private readonly _std;
206
206
  private readonly _applySoftmax;
207
207
  private constructor();
208
+ private _pipelineCache;
209
+ /**
210
+ * Run the model once on a zero tensor, paying one-time costs up front.
211
+ *
212
+ * The first inference of a session is not representative: WebGPU compiles its
213
+ * shaders on it and the WASM backend faults in its arenas. Calling this while
214
+ * a loading spinner is still up moves that cost somewhere the user is already
215
+ * waiting — which matters most for a classifier running as the last step of
216
+ * an on-device analysis, where the delay lands right before the answer shows.
217
+ *
218
+ * @param runs How many warm-up inferences to run. One is enough for WASM;
219
+ * WebGPU sometimes settles on the second.
220
+ */
221
+ warmup(runs?: number): Promise<void>;
222
+ /**
223
+ * The fused preprocessing pipeline, built on first use.
224
+ *
225
+ * Lazily, because constructing it reserves the output buffer: a task built in
226
+ * an environment without a canvas implementation stays constructible, and only
227
+ * fails if it is actually asked to preprocess something.
228
+ */
229
+ private get _pipeline();
208
230
  /** Load the model and resolve labels. */
209
231
  static create(model: ModelSource, options?: ClassifierOptions): Promise<Classifier>;
210
232
  /** Class labels indexed by class id. */
@@ -958,6 +980,19 @@ export declare const DEFAULT_PROVIDERS: readonly string[];
958
980
  readonly reused: boolean;
959
981
  }
960
982
 
983
+ /** Planar tensor data produced by {@link ResizePipeline}. */
984
+ export declare interface FusedResizeResult {
985
+ /** CHW float32, normalized, length `3 * targetHeight * targetWidth`. */
986
+ readonly data: Float32Array;
987
+ /**
988
+ * Whether {@link data} is the pipeline's reusable buffer.
989
+ *
990
+ * `true` means the next {@link ResizePipeline.run} overwrites it, so a caller
991
+ * keeping the values past its own inference has to copy them.
992
+ */
993
+ readonly reused: boolean;
994
+ }
995
+
961
996
  /** Value of the `ovs.kind` metadata key for a detector→classifier pipeline. */
962
997
  export declare const FUSION_KIND_DETECT_CLASSIFY = "detect_classify";
963
998
 
@@ -1571,6 +1606,90 @@ export declare const DEFAULT_PROVIDERS: readonly string[];
1571
1606
  /** Resize an image to `(targetWidth, targetHeight)` using high-quality canvas resampling. */
1572
1607
  export declare function resize(image: RGBImage, targetWidth: number, targetHeight: number): RGBImage;
1573
1608
 
1609
+ /**
1610
+ * Reusable stretch-resize → normalized tensor pipeline for one target size.
1611
+ *
1612
+ * The classification counterpart of {@link LetterboxPipeline}. A classifier
1613
+ * stretches to the model's square input instead of letterboxing into it — no
1614
+ * padding, no scale to invert later, because nothing is mapped back onto the
1615
+ * source image afterwards. That difference is why it cannot simply reuse the
1616
+ * letterbox path.
1617
+ *
1618
+ * What it does share is the technique. The composable route
1619
+ * (`resize` → `normalize` → `toCHW`) allocates an `RGBImage` and two
1620
+ * `Float32Array`s and walks each end to end on every call: about 1.4 MB of
1621
+ * fresh garbage per 224×224 `predict()`, produced at the exact moment a phone
1622
+ * near its memory ceiling can least afford it. Here one `drawImage` resizes,
1623
+ * and one loop reads the resulting RGBA and writes normalized planar float32
1624
+ * into a buffer held across calls.
1625
+ *
1626
+ * Create one per task, not per frame.
1627
+ */
1628
+ export declare class ResizePipeline {
1629
+ private readonly _targetWidth;
1630
+ private readonly _targetHeight;
1631
+ private readonly _mean;
1632
+ private readonly _std;
1633
+ private readonly _buffer;
1634
+ private _target;
1635
+ private _targetContext;
1636
+ private _source;
1637
+ private _sourceContext;
1638
+ private _bufferInUse;
1639
+ /**
1640
+ * @param targetWidth Model input width in pixels.
1641
+ * @param targetHeight Model input height in pixels.
1642
+ * @param mean Per-channel RGB mean in `[0, 1]`. Defaults to no shift.
1643
+ * @param std Per-channel RGB standard deviation. Defaults to no scaling.
1644
+ */
1645
+ constructor(targetWidth: number, targetHeight: number, mean?: readonly [number, number, number], std?: readonly [number, number, number]);
1646
+ /** The `[width, height]` this pipeline resizes into. */
1647
+ get targetSize(): readonly [number, number];
1648
+ /**
1649
+ * Resize an image to the target size and write it as normalized planar float32.
1650
+ *
1651
+ * An image that already arrives at the target size skips the canvas entirely
1652
+ * and is read straight out of its packed RGB — which is both faster and what
1653
+ * keeps the result identical to `resize()`, whose own fast path returns the
1654
+ * input untouched.
1655
+ *
1656
+ * @param image Source image in the SDK's canonical HWC RGB layout.
1657
+ */
1658
+ run(image: RGBImage): FusedResizeResult;
1659
+ /**
1660
+ * Mark the reusable buffer free again.
1661
+ *
1662
+ * Call it once the tensor built from a {@link run} result has been handed to
1663
+ * ONNX Runtime and the run has resolved — after that the values are inside
1664
+ * the WASM heap and the buffer can be overwritten.
1665
+ */
1666
+ release(): void;
1667
+ /**
1668
+ * Build the target canvas on first use.
1669
+ *
1670
+ * Lazily, so a pipeline constructed where no canvas implementation exists
1671
+ * (a Node test, a worker without OffscreenCanvas) only fails if it is asked
1672
+ * to resize something.
1673
+ */
1674
+ private _ensureTarget;
1675
+ /** Grow the scratch source canvas to fit an image, reusing it when possible. */
1676
+ private _ensureSource;
1677
+ }
1678
+
1679
+ /**
1680
+ * Resize an image into normalized planar float32 without keeping any state.
1681
+ *
1682
+ * The allocation-free path is {@link ResizePipeline}; this is the one-shot
1683
+ * form, for a caller who wants the fused behaviour without owning a pipeline.
1684
+ *
1685
+ * @param image Source image in the SDK's canonical HWC RGB layout.
1686
+ * @param targetWidth Model input width in pixels.
1687
+ * @param targetHeight Model input height in pixels.
1688
+ * @param mean Per-channel RGB mean in `[0, 1]`. Defaults to no shift.
1689
+ * @param std Per-channel RGB standard deviation. Defaults to no scaling.
1690
+ */
1691
+ export declare function resizeToTensorData(image: RGBImage, targetWidth: number, targetHeight: number, mean?: readonly [number, number, number], std?: readonly [number, number, number]): FusedResizeResult;
1692
+
1574
1693
  /**
1575
1694
  * Decide the input size a task will preprocess to.
1576
1695
  *
@@ -2054,6 +2173,27 @@ export declare const DEFAULT_PROVIDERS: readonly string[];
2054
2173
  get session(): OrtSession;
2055
2174
  }
2056
2175
 
2176
+ /**
2177
+ * Write an RGBA buffer as normalized planar float32.
2178
+ *
2179
+ * Shared by {@link ResizePipeline} and exported for a custom pipeline that
2180
+ * already holds pixels and wants the SDK's exact arithmetic.
2181
+ *
2182
+ * The expression is `(value / 255 - mean) / std`, evaluated in that order on
2183
+ * purpose: folding it into a single multiply-add (`value * k + b`) computes the
2184
+ * same quantity but rounds differently, and the tasks' output is asserted to be
2185
+ * bit-identical to the composable `normalize` → `toCHW` path.
2186
+ *
2187
+ * @param rgba Source pixels, 4 bytes per pixel, `width * height` long.
2188
+ * @param width Image width in pixels.
2189
+ * @param height Image height in pixels.
2190
+ * @param mean Per-channel RGB mean, already in `[0, 1]`.
2191
+ * @param std Per-channel RGB standard deviation.
2192
+ * @param out Destination buffer, `3 * width * height` long.
2193
+ * @param stride Bytes per source pixel: 4 for canvas RGBA, 3 for packed RGB.
2194
+ */
2195
+ export declare function writePlanarFloat32(rgba: Uint8ClampedArray | Uint8Array, width: number, height: number, mean: readonly [number, number, number], std: readonly [number, number, number], out: Float32Array, stride?: number): void;
2196
+
2057
2197
  /**
2058
2198
  * Build a zero-filled CHW tensor payload for a warm-up run.
2059
2199
  *
package/dist/vision.js CHANGED
@@ -11,16 +11,16 @@ import { OrtSession as N } from "./vision/core/session.js";
11
11
  import { loadImage as P } from "./vision/io/image.js";
12
12
  import { FUSION_KIND_DETECT_CLASSIFY as F, INPUT_IMAGE as I, INPUT_PAD as L, INPUT_SCALE as R, INPUT_SOURCE as z, METADATA_PREFIX as B, OUTPUT_BOXES as V, OUTPUT_CLASSES as H, OUTPUT_NUM_DETECTIONS as U, OUTPUT_PROBS as W, OUTPUT_SCORES as G, readFusionSpec as K } from "./vision/fusion.js";
13
13
  import { fromCv2 as q, letterbox as J, normalize as Y, resize as X, toCHW as Z, toCv2 as Q, toFloat32 as $, toFloat32Tensor as ee, toTensor as te } from "./vision/preprocess/image.js";
14
- import { LetterboxPipeline as ne, letterboxToTensorData as re, zeroTensorData as ie } from "./vision/preprocess/pipeline.js";
15
- import { softmax as ae, topK as oe } from "./vision/postprocess/classification.js";
16
- import { batchedNms as se, decodeYolo as ce, decodeYoloAnchors as le, nms as ue } from "./vision/postprocess/detection.js";
17
- import { decodeYoloSeg as de } from "./vision/postprocess/segmentation.js";
18
- import { VisionTask as fe, requireDetections as pe } from "./vision/tasks/base.js";
19
- import { Classifier as me } from "./vision/tasks/classifier.js";
20
- import { DetectClassify as he } from "./vision/tasks/detectClassify.js";
21
- import { Detector as ge } from "./vision/tasks/detector.js";
22
- import { Segmenter as _e } from "./vision/tasks/segmenter.js";
23
- import { VERSION as ve } from "./vision/index.js";
24
- import { LUMINANCE_SAMPLE_MAX_EDGE as ye, LowLuminanceError as be, computeImageLuminance as xe, isLuminanceAcceptable as Se } from "./vision/luminance.js";
25
- import { useLiveLuminance as Ce } from "./vision/use-live-luminance.js";
26
- export { l as BoundingBox, p as Boxes, b as COCO_CLASSES, m as ClassificationResults, me as Classifier, j as DEFAULT_PROVIDERS, he as DetectClassify, h as DetectClassifyResults, g as DetectionResults, ge as Detector, F as FUSION_KIND_DETECT_CLASSIFY, t as FusionError, I as INPUT_IMAGE, L as INPUT_PAD, R as INPUT_SCALE, z as INPUT_SOURCE, n as ImageLoadError, r as InferenceError, ye as LUMINANCE_SAMPLE_MAX_EDGE, i as LabelMapError, ne as LetterboxPipeline, be as LowLuminanceError, B as METADATA_PREFIX, u as Mask, _ as Masks, a as ModelLoadError, o as NoDetectionsError, V as OUTPUT_BOXES, H as OUTPUT_CLASSES, U as OUTPUT_NUM_DETECTIONS, W as OUTPUT_PROBS, G as OUTPUT_SCORES, N as OrtSession, s as OrtVisionError, v as Probs, c as ProviderNotAvailableError, d as RGBImage, y as SegmentationResults, _e as Segmenter, f as SpeedTimer, ve as VERSION, fe as VisionTask, se as batchedNms, C as classificationNumClasses, xe as computeImageLuminance, w as declaredShapesFrom, ce as decodeYolo, le as decodeYoloAnchors, de as decodeYoloSeg, x as defaultLabels, T as detectionNumClasses, q as fromCv2, Se as isLuminanceAcceptable, J as letterbox, re as letterboxToTensorData, P as loadImage, O as modelNames, ue as nms, Y as normalize, k as parseNames, K as readFusionSpec, A as readModelMetadata, pe as requireDetections, X as resize, E as resolveInputSize, S as resolveLabels, M as resolveProviders, ae as softmax, D as spatialInputSize, Z as toCHW, Q as toCv2, $ as toFloat32, ee as toFloat32Tensor, te as toTensor, oe as topK, e as useCameraStream, Ce as useLiveLuminance, ie as zeroTensorData };
14
+ import { LetterboxPipeline as ne, ResizePipeline as re, letterboxToTensorData as ie, resizeToTensorData as ae, writePlanarFloat32 as oe, zeroTensorData as se } from "./vision/preprocess/pipeline.js";
15
+ import { softmax as ce, topK as le } from "./vision/postprocess/classification.js";
16
+ import { batchedNms as ue, decodeYolo as de, decodeYoloAnchors as fe, nms as pe } from "./vision/postprocess/detection.js";
17
+ import { decodeYoloSeg as me } from "./vision/postprocess/segmentation.js";
18
+ import { VisionTask as he, requireDetections as ge } from "./vision/tasks/base.js";
19
+ import { Classifier as _e } from "./vision/tasks/classifier.js";
20
+ import { DetectClassify as ve } from "./vision/tasks/detectClassify.js";
21
+ import { Detector as ye } from "./vision/tasks/detector.js";
22
+ import { Segmenter as be } from "./vision/tasks/segmenter.js";
23
+ import { VERSION as xe } from "./vision/index.js";
24
+ import { LUMINANCE_SAMPLE_MAX_EDGE as Se, LowLuminanceError as Ce, computeImageLuminance as we, isLuminanceAcceptable as Te } from "./vision/luminance.js";
25
+ import { useLiveLuminance as Ee } from "./vision/use-live-luminance.js";
26
+ export { l as BoundingBox, p as Boxes, b as COCO_CLASSES, m as ClassificationResults, _e as Classifier, j as DEFAULT_PROVIDERS, ve as DetectClassify, h as DetectClassifyResults, g as DetectionResults, ye as Detector, F as FUSION_KIND_DETECT_CLASSIFY, t as FusionError, I as INPUT_IMAGE, L as INPUT_PAD, R as INPUT_SCALE, z as INPUT_SOURCE, n as ImageLoadError, r as InferenceError, Se as LUMINANCE_SAMPLE_MAX_EDGE, i as LabelMapError, ne as LetterboxPipeline, Ce as LowLuminanceError, B as METADATA_PREFIX, u as Mask, _ as Masks, a as ModelLoadError, o as NoDetectionsError, V as OUTPUT_BOXES, H as OUTPUT_CLASSES, U as OUTPUT_NUM_DETECTIONS, W as OUTPUT_PROBS, G as OUTPUT_SCORES, N as OrtSession, s as OrtVisionError, v as Probs, c as ProviderNotAvailableError, d as RGBImage, re as ResizePipeline, y as SegmentationResults, be as Segmenter, f as SpeedTimer, xe as VERSION, he as VisionTask, ue as batchedNms, C as classificationNumClasses, we as computeImageLuminance, w as declaredShapesFrom, de as decodeYolo, fe as decodeYoloAnchors, me as decodeYoloSeg, x as defaultLabels, T as detectionNumClasses, q as fromCv2, Te as isLuminanceAcceptable, J as letterbox, ie as letterboxToTensorData, P as loadImage, O as modelNames, pe as nms, Y as normalize, k as parseNames, K as readFusionSpec, A as readModelMetadata, ge as requireDetections, X as resize, ae as resizeToTensorData, E as resolveInputSize, S as resolveLabels, M as resolveProviders, ce as softmax, D as spatialInputSize, Z as toCHW, Q as toCv2, $ as toFloat32, ee as toFloat32Tensor, te as toTensor, le as topK, e as useCameraStream, Ee as useLiveLuminance, oe as writePlanarFloat32, se as zeroTensorData };
package/dist/vite.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./vite/tempest-icons.cjs"),t=require("./vite/create-vite-config.cjs"),n=require("./vite/tempest-pwa-manifest.cjs"),r=require("./vite/tempest-pwa-icons.cjs"),i=require("./vite/tempest-pwa-dev-sw.cjs");exports.TEMPEST_ICONS_ID=e.TEMPEST_ICONS_ID,exports.buildIconsModule=e.buildIconsModule,exports.createViteConfig=t.createViteConfig,exports.scanIconSlugs=e.scanIconSlugs,exports.tempestIcons=e.tempestIcons,exports.tempestPwaDevSw=i.tempestPwaDevSw,exports.tempestPwaIcons=r.tempestPwaIcons,exports.tempestPwaManifest=n.tempestPwaManifest;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./vite/tempest-icons.cjs"),t=require("./vite/create-vite-config.cjs"),n=require("./vite/tempest-pwa-manifest.cjs"),r=require("./vite/tempest-pwa-icons.cjs"),i=require("./vite/tempest-pwa-dev-sw.cjs");exports.createViteConfig=t.createViteConfig,exports.tempestIcons=e.tempestIcons,exports.tempestPwaDevSw=i.tempestPwaDevSw,exports.tempestPwaIcons=r.tempestPwaIcons,exports.tempestPwaManifest=n.tempestPwaManifest;
package/dist/vite.d.ts CHANGED
@@ -8,19 +8,6 @@ export declare interface AppleSplashSpec {
8
8
  ratio: number;
9
9
  }
10
10
 
11
- /**
12
- * Build the virtual module source for a set of slugs.
13
- *
14
- * Aliases resolve to their canonical slug before importing, because only the
15
- * canonical name is a real lucide export — but the alias key still points at the
16
- * component, so `<Icon name="alert-circle" />` stays a zero-request lookup.
17
- *
18
- * @param slugs - Validated slugs to include.
19
- * @param aliases - Alias slug → canonical slug.
20
- * @returns ES module source.
21
- */
22
- export declare function buildIconsModule(slugs: readonly string[], aliases: Record<string, string>): string;
23
-
24
11
  /**
25
12
  * Build a Tempest-flavored Vite config for a React app: the `@vitejs/plugin-react`
26
13
  * plugin, the `@` → `src` import alias, and sane dev-server defaults — so a
@@ -82,18 +69,6 @@ export declare interface CreateViteConfigOptions {
82
69
  */
83
70
  export declare type ProxyEntry = string | Record<string, unknown>;
84
71
 
85
- /**
86
- * Collect the icon slugs a source file references literally.
87
- *
88
- * @param code - File contents.
89
- * @param known - The set of real lucide slugs, aliases included.
90
- * @returns The slugs found, validated against `known`.
91
- */
92
- export declare function scanIconSlugs(code: string, known: ReadonlySet<string>): string[];
93
-
94
- /** The module id an app imports to get its static registry. */
95
- export declare const TEMPEST_ICONS_ID = "virtual:tempest-icons";
96
-
97
72
  /**
98
73
  * Generate a static icon registry from the slugs your source mentions.
99
74
  *
package/dist/vite.js CHANGED
@@ -1,6 +1,6 @@
1
- import { TEMPEST_ICONS_ID as e, buildIconsModule as t, scanIconSlugs as n, tempestIcons as r } from "./vite/tempest-icons.js";
2
- import { createViteConfig as i } from "./vite/create-vite-config.js";
3
- import { tempestPwaManifest as a } from "./vite/tempest-pwa-manifest.js";
4
- import { tempestPwaIcons as o } from "./vite/tempest-pwa-icons.js";
5
- import { tempestPwaDevSw as s } from "./vite/tempest-pwa-dev-sw.js";
6
- export { e as TEMPEST_ICONS_ID, t as buildIconsModule, i as createViteConfig, n as scanIconSlugs, r as tempestIcons, s as tempestPwaDevSw, o as tempestPwaIcons, a as tempestPwaManifest };
1
+ import { tempestIcons as e } from "./vite/tempest-icons.js";
2
+ import { createViteConfig as t } from "./vite/create-vite-config.js";
3
+ import { tempestPwaManifest as n } from "./vite/tempest-pwa-manifest.js";
4
+ import { tempestPwaIcons as r } from "./vite/tempest-pwa-icons.js";
5
+ import { tempestPwaDevSw as i } from "./vite/tempest-pwa-dev-sw.js";
6
+ export { t as createViteConfig, e as tempestIcons, i as tempestPwaDevSw, r as tempestPwaIcons, n as tempestPwaManifest };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tempest-react-sdk",
3
- "version": "0.40.0",
3
+ "version": "0.42.0",
4
4
  "description": "SDK público da Tempest com componentes, hooks e integrações para projetos React.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -136,7 +136,7 @@
136
136
  "@tanstack/react-query": "^5.0.0",
137
137
  "dexie": "^4.4.2",
138
138
  "fflate": "^0.8.3",
139
- "lucide-react": "^1.26.0",
139
+ "lucide-react": "^1.31.0",
140
140
  "react-hook-form": "^7.76.0",
141
141
  "react-router": "^8.3.0",
142
142
  "zod": "^3.23.0 || ^4.0.0",
@@ -203,10 +203,10 @@
203
203
  "fake-indexeddb": "^6.2.5",
204
204
  "globals": "^17.7.0",
205
205
  "husky": "^9.1.7",
206
- "jsdom": "^29.1.1",
206
+ "jsdom": "^30.0.1",
207
207
  "jsqr": "^1.4.0",
208
208
  "lint-staged": "^17.0.5",
209
- "lucide-react": "^1.26.0",
209
+ "lucide-react": "^1.31.0",
210
210
  "onnxruntime-web": "^1.27.0",
211
211
  "prettier": "^3.8.3",
212
212
  "react": "^19.1.0",
@@ -226,6 +226,6 @@
226
226
  "access": "public"
227
227
  },
228
228
  "engines": {
229
- "node": ">=20.19"
229
+ "node": ">=22.12"
230
230
  }
231
231
  }