@skippr/live-agent-sdk 0.41.0 → 0.43.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skippr/live-agent-sdk",
3
- "version": "0.41.0",
3
+ "version": "0.43.0",
4
4
  "type": "module",
5
5
  "main": "dist/esm/lib-exports.js",
6
6
  "module": "dist/esm/lib-exports.js",
@@ -1,26 +0,0 @@
1
- import * as React from 'react';
2
- /**
3
- * React 18 / 19 compatibility layer. The SDK declares `react: "^18 || ^19"`, so
4
- * it must run on whichever React the host provides. React 19-only APIs that
5
- * have a behaviourally identical 18 equivalent are mapped here; APIs with no 18
6
- * equivalent (the Actions hooks, suspending `use(promise)`, Server Components)
7
- * must be guarded with an explicit runtime check, never silently shimmed.
8
- *
9
- * Always consume these helpers instead of importing the raw API from `react` —
10
- * the Biome `noRestrictedImports` rule enforces it.
11
- */
12
- type UseContextHook = <T>(context: React.Context<T>) => T;
13
- /**
14
- * Picks the hook used to read a context. React 19's `use(context)` is identical
15
- * to `useContext(context)` for context reads, so we prefer the native `use`
16
- * when present and fall back to `useContext` on React 18, where `use` is
17
- * `undefined`. Pure and exported so the version branching is unit-testable.
18
- */
19
- export declare function selectContextHook(use: UseContextHook | undefined, useContext: UseContextHook): UseContextHook;
20
- /**
21
- * Reads a context value, version-agnostic. React's identity is fixed for the
22
- * process, so resolving the hook once at module load keeps the call order
23
- * stable across renders.
24
- */
25
- export declare const useContextValue: UseContextHook;
26
- export {};