@triplit/react 0.0.10 → 0.0.12
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/dist/index.js +1 -1
- package/package.json +5 -6
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useEffect as y,useState as n}from"react";var m=e=>`http://localhost:3000/queryTriples?live=true&query=${encodeURIComponent(JSON.stringify(e))}`;function d(e,t){let[s,l]=n(void 0),[o,r]=n(!1),{selectStatements:c,whereStatements:i}=t,u=m({collection:t.
|
|
1
|
+
import{useEffect as y,useState as n}from"react";var m=e=>`http://localhost:3000/queryTriples?live=true&query=${encodeURIComponent(JSON.stringify(e))}`;function d(e,t){let[s,l]=n(void 0),[o,r]=n(!1),{selectStatements:c,whereStatements:i}=t,u=m({collection:t.collectionName,select:c,where:i,clientId:e.clientId});return y(()=>{r(!0);let a=e.subscribe(t,f=>{r(!1),l(f)});return()=>{a()}},[u]),{fetchingLocal:o,results:s,error:null}}export{d as useQuery};
|
package/package.json
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@triplit/react",
|
|
3
3
|
"packageManager": "yarn@3.4.1",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.12",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"scripts": {
|
|
9
9
|
"build": "yarn build:code && yarn build:types",
|
|
10
10
|
"build:code": "node build.cjs",
|
|
11
|
-
"build:types": "tsc --noEmit false --emitDeclarationOnly --declaration --outDir dist",
|
|
12
|
-
"lint": "tsc"
|
|
13
|
-
"prepack": "node prepack.cjs"
|
|
11
|
+
"build:types": "tsc --noEmit false --emitDeclarationOnly --declaration --baseUrl . --outDir dist",
|
|
12
|
+
"lint": "tsc"
|
|
14
13
|
},
|
|
15
14
|
"files": [
|
|
16
15
|
"/dist"
|
|
17
16
|
],
|
|
18
17
|
"dependencies": {
|
|
19
|
-
"@triplit/client": "
|
|
18
|
+
"@triplit/client": "workspace:^"
|
|
20
19
|
},
|
|
21
20
|
"devDependencies": {
|
|
22
21
|
"@types/react": "^18.2.0",
|
|
@@ -25,4 +24,4 @@
|
|
|
25
24
|
"peerDependencies": {
|
|
26
25
|
"react": "*"
|
|
27
26
|
}
|
|
28
|
-
}
|
|
27
|
+
}
|