@tanstack/pacer-devtools 1.4.0 → 1.5.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/README.md +4 -4
- package/dist/{components-BwHXH_1Y.js → components-BwcTEJfm.js} +15 -7
- package/dist/{components-BXAd-LGS.js → components-D6zc5Wjw.js} +24 -16
- package/dist/index.d.ts +6 -3
- package/dist/index.js +1 -1
- package/dist/production/index.d.ts +2 -2
- package/dist/production/index.js +1 -1
- package/dist/production/server.js +1 -1
- package/dist/server.js +1 -1
- package/package.json +10 -10
- package/src/PacerContextProvider.tsx +0 -172
- package/src/components/ActionButtons.tsx +0 -170
- package/src/components/DetailsPanel.tsx +0 -62
- package/src/components/Shell.tsx +0 -176
- package/src/components/StateHeader.tsx +0 -139
- package/src/components/UtilList.tsx +0 -62
- package/src/components/UtilStateJsonTree.tsx +0 -25
- package/src/components/index.tsx +0 -19
- package/src/components/util-groups.ts +0 -54
- package/src/core.tsx +0 -9
- package/src/index.ts +0 -10
- package/src/production.ts +0 -5
- package/src/styles/tokens.ts +0 -305
- package/src/styles/use-styles.ts +0 -385
- package/src/utils/read-pacer-store-state.ts +0 -33
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/** TanStack Store (`@tanstack/store`) used by pacer utils. */
|
|
2
|
-
export function isPacerUtilTanStackStore(x: unknown): x is {
|
|
3
|
-
subscribe: (cb: (s: unknown) => void) => { unsubscribe: () => void }
|
|
4
|
-
get: () => unknown
|
|
5
|
-
} {
|
|
6
|
-
return (
|
|
7
|
-
typeof x === 'object' &&
|
|
8
|
-
x !== null &&
|
|
9
|
-
'subscribe' in x &&
|
|
10
|
-
typeof (x as { subscribe: unknown }).subscribe === 'function' &&
|
|
11
|
-
'get' in x &&
|
|
12
|
-
typeof (x as { get: unknown }).get === 'function'
|
|
13
|
-
)
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Core pacer utils expose TanStack `Store` (`get()` / `state`). React hooks may
|
|
18
|
-
* also expose a reactive `state` field. Use this for devtools UI that needs a
|
|
19
|
-
* plain snapshot (e.g. JsonTree).
|
|
20
|
-
*/
|
|
21
|
-
export function getPacerUtilStoreState(instance: {
|
|
22
|
-
store?: { get?: () => unknown; state?: unknown }
|
|
23
|
-
state?: unknown
|
|
24
|
-
}): unknown {
|
|
25
|
-
const store = instance.store
|
|
26
|
-
if (store && typeof store.get === 'function') {
|
|
27
|
-
return store.get()
|
|
28
|
-
}
|
|
29
|
-
if (store && store.state !== undefined) {
|
|
30
|
-
return store.state
|
|
31
|
-
}
|
|
32
|
-
return instance.state
|
|
33
|
-
}
|