@tamagui/use-did-finish-ssr 1.125.20 → 1.125.21

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": "@tamagui/use-did-finish-ssr",
3
- "version": "1.125.20",
3
+ "version": "1.125.21",
4
4
  "types": "./types/index.d.ts",
5
5
  "main": "dist/cjs",
6
6
  "module": "dist/esm",
@@ -31,7 +31,7 @@
31
31
  }
32
32
  },
33
33
  "devDependencies": {
34
- "@tamagui/build": "1.125.20",
34
+ "@tamagui/build": "1.125.21",
35
35
  "react": "*"
36
36
  },
37
37
  "publishConfig": {
@@ -1,14 +0,0 @@
1
- {
2
- "mappings": "AAEA,OAAO,iBAAS,gBAAgB,aAAaA,QAAQ,IAAI,IAAI;KAiBxD,gBAAgB,SAAS,0BAA0B,IAAI,IAAI;AAEhE,OAAO,iBAAS,eAAe,OAAOC,QAAQ,QAAQ,gBAAgB",
3
- "names": [
4
- "value?: A",
5
- "value?: Value"
6
- ],
7
- "sources": [
8
- "src/index.ts"
9
- ],
10
- "sourcesContent": [
11
- "import * as React from 'react'\n\nexport function useDidFinishSSR<A = boolean>(value?: A): A | false {\n if (process.env.TAMAGUI_TARGET === 'native') {\n // @ts-expect-error\n return value ?? true\n }\n\n return React.useSyncExternalStore(\n subscribe,\n () => value ?? true,\n () => {\n return false as any\n }\n )\n}\n\nconst subscribe = () => () => {}\n\ntype FunctionOrValue<Value> = Value extends () => infer X ? X : Value\n\nexport function useClientValue<Value>(value?: Value): FunctionOrValue<Value> | undefined {\n const done = useDidFinishSSR()\n return !done ? undefined : typeof value === 'function' ? value() : value\n}\n"
12
- ],
13
- "version": 3
14
- }