@chaibuilder/pages 0.9.1 → 0.9.2
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/{B4MFY5CR-STu_pSkt.js → B4MFY5CR-CiovF75K.js} +1 -1
- package/dist/{B4MFY5CR-BL-PPLU0.cjs → B4MFY5CR-KtEUBopS.cjs} +1 -1
- package/dist/{HO4MOOFI-BnT5iIVN.js → HO4MOOFI-CuXikmPc.js} +2 -2
- package/dist/{HO4MOOFI-DVNeBTUq.cjs → HO4MOOFI-DJNgUjg_.cjs} +1 -1
- package/dist/{HUY7CZI3-nJy9t9d5.cjs → HUY7CZI3-1KbTmr8N.cjs} +1 -1
- package/dist/{HUY7CZI3-BNJgWjIg.js → HUY7CZI3-Di-nGfZT.js} +2 -2
- package/dist/{index-DOXL1shw.js → index-BNA2NDaf.js} +4069 -3867
- package/dist/index-CbOxTkR_.cjs +6 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +27 -12
- package/dist/index.js +1 -1
- package/dist/server.d.ts +1 -0
- package/package.json +3 -3
- package/dist/index-CyG9_kPQ.cjs +0 -6
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./index-CbOxTkR_.cjs"),t=require("@chaibuilder/sdk");exports.ChaiBuilderPagesRealtime=e.ChaiBuilderPagesRealtime;exports.ChaiJsonInput=e.SmartJsonInput;exports.ImagePicker=e.ImagePicker;exports.LanguageSwitcher=e.LanguageSwitcher;exports.NestedPathSelector=e.NestedPathSelector;exports.PermissionChecker=e.PermissionChecker;exports.default=e.ChaiBuilderPages;exports.registerChaiLoginComponent=e.registerLoginComponent;exports.registerChaiSiteSetting=e.registerChaiSiteSetting;exports.useActivePage=e.useActivePage;exports.useBuilderPageData=e.useBuilderPageData;exports.useChaiAuth=e.useChaiAuth;exports.useChaiCurrentPage=e.useCurrentPage;exports.useChaiFetch=e.useChaiFetch;exports.useChaiUserInfo=e.useChaiUserInfo;exports.useFallbackLang=e.useFallbackLang;exports.useFetch=e.useFetch;exports.useGotoPage=e.useGotoPage;exports.useLanguagePages=e.useLanguagePages;exports.usePageTypes=e.usePageTypes;exports.useUpdateActivePageMetadata=e.useUpdateActivePageMetadata;exports.useUserPermissions=e.useUserRoleAndPermissions;exports.useWebsitePages=e.useWebsitePages;exports.useWebsiteSetting=e.useWebsiteSetting;Object.keys(t).forEach(a=>{a!=="default"&&!Object.prototype.hasOwnProperty.call(exports,a)&&Object.defineProperty(exports,a,{enumerable:!0,get:()=>t[a]})});
|
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { DefinedUseQueryResult } from '@tanstack/react-query';
|
|
|
5
5
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
6
6
|
import { ReactNode } from 'react';
|
|
7
7
|
import { RESET } from 'jotai/utils';
|
|
8
|
+
import { SupabaseClient } from '@supabase/supabase-js';
|
|
8
9
|
import { UseMutationResult } from '@tanstack/react-query';
|
|
9
10
|
import { UseQueryResult } from '@tanstack/react-query';
|
|
10
11
|
|
|
@@ -20,25 +21,32 @@ declare type ChaiBuilderPagesProps = {
|
|
|
20
21
|
getLiveUrl?: (slug: string) => string;
|
|
21
22
|
onLogout?: () => void;
|
|
22
23
|
getAccessToken?: () => Promise<string>;
|
|
23
|
-
|
|
24
|
+
supabaseInstance?: SupabaseClient;
|
|
24
25
|
} & Pick<ChaiBuilderEditorProps, "onError" | "translations" | "locale" | "htmlDir" | "autoSaveSupport" | "autoSaveInterval" | "fallbackLang" | "languages" | "themePresets">;
|
|
25
26
|
|
|
26
27
|
export declare class ChaiBuilderPagesRealtime implements ChaiBuilderPagesRealtimeInterface {
|
|
27
|
-
private
|
|
28
|
+
private channelId;
|
|
29
|
+
private supabase;
|
|
28
30
|
private channel;
|
|
29
|
-
private
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
private userId;
|
|
32
|
+
private clientId;
|
|
33
|
+
private pageId;
|
|
34
|
+
private callback;
|
|
35
|
+
constructor(supabase: SupabaseClient, websiteId: string, userId: string, cb: (event: string, payload?: any) => void);
|
|
36
|
+
private getClientId;
|
|
37
|
+
private getOnlineUsers;
|
|
38
|
+
private getPageOwner;
|
|
39
|
+
private getPageUserMapping;
|
|
40
|
+
private onReceiveEvent;
|
|
41
|
+
joinPage(pageId: string): Promise<void>;
|
|
32
42
|
leavePage(): Promise<void>;
|
|
33
|
-
sendEvent(event: LISTEN_EVENTS,
|
|
34
|
-
private updateLockingState;
|
|
35
|
-
private getCurrentOnlineUser;
|
|
43
|
+
sendEvent(event: LISTEN_EVENTS, eventPayload?: any): Promise<void>;
|
|
36
44
|
}
|
|
37
45
|
|
|
38
46
|
declare interface ChaiBuilderPagesRealtimeInterface {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
sendEvent: (event: LISTEN_EVENTS, payload?:
|
|
47
|
+
leavePage: () => Promise<void>;
|
|
48
|
+
joinPage: (pageId: string) => Promise<void>;
|
|
49
|
+
sendEvent: (event: LISTEN_EVENTS, payload?: EVENT_PAYLOAD) => Promise<void>;
|
|
42
50
|
}
|
|
43
51
|
|
|
44
52
|
export declare const ChaiJsonInput: React.FC<SmartJsonInputProps>;
|
|
@@ -54,11 +62,18 @@ declare interface ChaiSiteSetting {
|
|
|
54
62
|
}
|
|
55
63
|
|
|
56
64
|
declare type ChaiWebsiteSetting = {
|
|
65
|
+
appKey: string;
|
|
57
66
|
fallbackLang: string;
|
|
58
67
|
languages: string[];
|
|
59
68
|
theme: Record<"fontFamily" | "borderRadius" | "colors", any>;
|
|
60
69
|
};
|
|
61
70
|
|
|
71
|
+
declare type EVENT_PAYLOAD = {
|
|
72
|
+
senderClientId?: string;
|
|
73
|
+
targetClientId?: string;
|
|
74
|
+
requestingClientId?: string;
|
|
75
|
+
} & Record<string, any>;
|
|
76
|
+
|
|
62
77
|
export declare const ImagePicker: default_2.FC<ImagePickerProps>;
|
|
63
78
|
|
|
64
79
|
declare interface ImagePickerProps {
|
|
@@ -78,7 +93,7 @@ export declare const LanguageSwitcher: ({ showAdd, variant, }: {
|
|
|
78
93
|
variant?: "ghost" | "outline";
|
|
79
94
|
}) => JSX_2.Element | null;
|
|
80
95
|
|
|
81
|
-
declare type LISTEN_EVENTS = "PAGE_LOCKED" | "USER_JOINED" | "TAKE_OVER_REQUESTED" | "TAKE_OVER_REQUEST_ACCEPTED" | "TAKE_OVER_REQUEST_REJECTED";
|
|
96
|
+
declare type LISTEN_EVENTS = "PAGE_LOCKED" | "USER_JOINED" | "TAKE_OVER_REQUESTED" | "UPDATE_ONLINE_USERS" | "TAKE_OVER_REQUEST_ACCEPTED" | "TAKE_OVER_REQUEST_REJECTED";
|
|
82
97
|
|
|
83
98
|
declare type LoggedInUser = {
|
|
84
99
|
accessToken: string;
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ai as s, a6 as t, a5 as i, a4 as u, X as g, a3 as r, W as h, a7 as n, a8 as o, Y as P, Z as C, ad as c, a9 as d, af as l, ah as m, _ as p, ag as f, a0 as S, aa as b, a1 as L, a2 as k, ae as A, ab as F, ac as I } from "./index-
|
|
1
|
+
import { ai as s, a6 as t, a5 as i, a4 as u, X as g, a3 as r, W as h, a7 as n, a8 as o, Y as P, Z as C, ad as c, a9 as d, af as l, ah as m, _ as p, ag as f, a0 as S, aa as b, a1 as L, a2 as k, ae as A, ab as F, ac as I } from "./index-BNA2NDaf.js";
|
|
2
2
|
export * from "@chaibuilder/sdk";
|
|
3
3
|
export {
|
|
4
4
|
s as ChaiBuilderPagesRealtime,
|
package/dist/server.d.ts
CHANGED
|
@@ -249,6 +249,7 @@ export declare type ChaiDynamicPage = {
|
|
|
249
249
|
export { ChaiPageProps }
|
|
250
250
|
|
|
251
251
|
export declare type ChaiWebsiteSetting = {
|
|
252
|
+
appKey: string;
|
|
252
253
|
fallbackLang: string;
|
|
253
254
|
languages: string[];
|
|
254
255
|
theme: Record<"fontFamily" | "borderRadius" | "colors", any>;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"author": "Suraj Air",
|
|
4
4
|
"license": "Private",
|
|
5
5
|
"homepage": "https://chaibuilder.com",
|
|
6
|
-
"version": "0.9.
|
|
6
|
+
"version": "0.9.2",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"files": [
|
|
9
9
|
"dist"
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
},
|
|
66
66
|
"peerDependencies": {
|
|
67
67
|
"@chaibuilder/runtime": "2.2.0",
|
|
68
|
-
"@chaibuilder/sdk": "2.4.
|
|
68
|
+
"@chaibuilder/sdk": "2.4.2",
|
|
69
69
|
"@types/react": "*",
|
|
70
70
|
"@types/react-dom": "*",
|
|
71
71
|
"react": "^18.0 || ^19.0 || ^19.1",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
},
|
|
82
82
|
"dependencies": {
|
|
83
83
|
"@chaibuilder/runtime": "2.2.0",
|
|
84
|
-
"@chaibuilder/sdk": "2.4.
|
|
84
|
+
"@chaibuilder/sdk": "2.4.2",
|
|
85
85
|
"@mhsdesign/jit-browser-tailwindcss": "^0.4.2",
|
|
86
86
|
"@tailwindcss/aspect-ratio": "^0.4.2",
|
|
87
87
|
"@tailwindcss/forms": "^0.5.10",
|