@vvedantb/ui 0.18.0 → 0.18.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vvedantb/ui",
3
- "version": "0.18.0",
3
+ "version": "0.18.1",
4
4
  "license": "MIT",
5
5
  "description": "Shared React 19 UI for web apps: one JavaScript entry (primitives, shell pieces, app helpers including the Convex and Clerk provider, VITE env parsing and ensure-user, artifact viewers over the @vvedantb/server artifacts core, native tokens), design-token CSS, shared Tailwind v4 CSS and a Tailwind preset.",
6
6
  "type": "module",
@@ -35,15 +35,17 @@ interface SpeechRecognitionAlternative {
35
35
  confidence: number;
36
36
  }
37
37
  // Read the constructors through a local type: a package must not augment the
38
- // global Window, which would clash with apps and the DOM lib.
39
- type SpeechRecognitionWindow = Window & {
38
+ // global Window. Apps often declare their own `Window.SpeechRecognition`, so
39
+ // `window` is cast to this shape rather than assigned (see
40
+ // consumer/window-speech-global.d.ts).
41
+ type SpeechRecognitionWindow = {
40
42
  SpeechRecognition?: SpeechRecognitionConstructor;
41
43
  webkitSpeechRecognition?: SpeechRecognitionConstructor;
42
44
  };
43
45
  const getSpeechRecognitionConstructor = ():
44
46
  | SpeechRecognitionConstructor
45
47
  | undefined => {
46
- const speechWindow: SpeechRecognitionWindow = window;
48
+ const speechWindow = window as unknown as SpeechRecognitionWindow;
47
49
  return speechWindow.SpeechRecognition || speechWindow.webkitSpeechRecognition;
48
50
  };
49
51
  type SpeechInputMode = "speech-recognition" | "media-recorder" | "none";