@vibes.diy/vibe-runtime 2.2.18 → 2.3.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 +1 -1
- package/package.json +3 -3
- package/use-viewer.d.ts +1 -0
- package/use-viewer.js +2 -1
- package/use-viewer.js.map +1 -1
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vibes.diy/vibe-runtime",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"@adviser/cement": "~0.5.34",
|
|
11
|
-
"@vibes.diy/base": "2.
|
|
12
|
-
"@vibes.diy/vibe-types": "2.
|
|
11
|
+
"@vibes.diy/base": "2.3.0",
|
|
12
|
+
"@vibes.diy/vibe-types": "2.3.0",
|
|
13
13
|
"arktype": "~2.2.0",
|
|
14
14
|
"charwise": "~3.0.1",
|
|
15
15
|
"react": "~19.2.5",
|
package/use-viewer.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export interface UseViewerResult {
|
|
|
7
7
|
readonly access: DocAccessLevel;
|
|
8
8
|
readonly dbAcls: Record<string, DbAcl>;
|
|
9
9
|
readonly can: (action: "read" | "write" | "delete", dbName?: string) => boolean;
|
|
10
|
+
readonly isViewerPending: boolean;
|
|
10
11
|
}
|
|
11
12
|
export declare function useViewer(): UseViewerResult;
|
|
12
13
|
export {};
|
package/use-viewer.js
CHANGED
|
@@ -3,6 +3,7 @@ import { useVibeContext } from "./VibeContext.js";
|
|
|
3
3
|
export function useViewer() {
|
|
4
4
|
const { mountParams } = useVibeContext();
|
|
5
5
|
const env = mountParams.viewerEnv;
|
|
6
|
+
const isViewerPending = env === undefined;
|
|
6
7
|
const viewer = env?.viewer ?? null;
|
|
7
8
|
const access = env?.access ?? "none";
|
|
8
9
|
const dbAcls = env?.dbAcls ?? {};
|
|
@@ -18,6 +19,6 @@ export function useViewer() {
|
|
|
18
19
|
}
|
|
19
20
|
return true;
|
|
20
21
|
}
|
|
21
|
-
return { viewer, access, dbAcls, can };
|
|
22
|
+
return { viewer, access, dbAcls, can, isViewerPending };
|
|
22
23
|
}
|
|
23
24
|
//# sourceMappingURL=use-viewer.js.map
|
package/use-viewer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-viewer.js","sourceRoot":"","sources":["../jsr/use-viewer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAc,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"use-viewer.js","sourceRoot":"","sources":["../jsr/use-viewer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAc,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAiBlD,MAAM,UAAU,SAAS;IACvB,MAAM,EAAE,WAAW,EAAE,GAAG,cAAc,EAAE,CAAC;IACzC,MAAM,GAAG,GAAG,WAAW,CAAC,SAAS,CAAC;IAClC,MAAM,eAAe,GAAG,GAAG,KAAK,SAAS,CAAC;IAC1C,MAAM,MAAM,GAAG,GAAG,EAAE,MAAM,IAAI,IAAI,CAAC;IACnC,MAAM,MAAM,GAAmB,GAAG,EAAE,MAAM,IAAI,MAAM,CAAC;IACrD,MAAM,MAAM,GAA0B,GAAG,EAAE,MAAM,IAAI,EAAE,CAAC;IAExD,SAAS,GAAG,CAAC,MAAmC,EAAE,MAAe;QAC/D,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YACzB,OAAO,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;Q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