@chaibuilder/pages 0.7.1 → 0.7.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-Dg8muTyM.js → B4MFY5CR-BqG9q9zR.js} +1 -1
- package/dist/{B4MFY5CR-BqRW-_ng.cjs → B4MFY5CR-DYwDWUG-.cjs} +1 -1
- package/dist/{HO4MOOFI-DivydKfh.js → HO4MOOFI-CY1H4sV7.js} +2 -2
- package/dist/{HO4MOOFI-CH7D1iEj.cjs → HO4MOOFI-OOt5FGah.cjs} +1 -1
- package/dist/{HUY7CZI3-BLLp9Jcz.cjs → HUY7CZI3-BUe0zzsC.cjs} +1 -1
- package/dist/{HUY7CZI3-CcAdSlEC.js → HUY7CZI3-BYhzdTjj.js} +2 -2
- package/dist/{index-ChrKxf-h.js → index-1oRhGjYc.js} +3261 -3042
- package/dist/index-DuDuROy_.cjs +6 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +44 -0
- package/dist/index.js +24 -21
- package/dist/server.d.ts +1 -1
- package/package.json +2 -1
- package/dist/index-o4R9GlKZ.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-DuDuROy_.cjs"),s=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.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(s).forEach(a=>{a!=="default"&&!Object.prototype.hasOwnProperty.call(exports,a)&&Object.defineProperty(exports,a,{enumerable:!0,get:()=>s[a]})});
|
package/dist/index.d.ts
CHANGED
|
@@ -19,8 +19,33 @@ declare type ChaiBuilderPagesProps = {
|
|
|
19
19
|
getPreviewUrl?: (slug: string) => string;
|
|
20
20
|
getLiveUrl?: (slug: string) => string;
|
|
21
21
|
onLogout?: () => void;
|
|
22
|
+
realtimeInstance?: ChaiBuilderPagesRealtimeInterface;
|
|
22
23
|
} & Pick<ChaiBuilderEditorProps, "onError" | "translations" | "locale" | "htmlDir" | "autoSaveSupport" | "autoSaveInterval" | "fallbackLang" | "languages" | "themePresets">;
|
|
23
24
|
|
|
25
|
+
export declare class ChaiBuilderPagesRealtime implements ChaiBuilderPagesRealtimeInterface {
|
|
26
|
+
private client;
|
|
27
|
+
private channel;
|
|
28
|
+
constructor(socketProvider: any);
|
|
29
|
+
listenEvent(event: "TAKE_OVER_REQUESTED" | "TAKE_OVER_REQUEST_ACCEPTED" | "TAKE_OVER_REQUEST_REJECTED", callback: (payload: any) => void): void;
|
|
30
|
+
joinPage(pageId: string, userId: string): Promise<boolean>;
|
|
31
|
+
leavePage(): Promise<void>;
|
|
32
|
+
requestTakeOver(pageId: string, userId: string): Promise<void>;
|
|
33
|
+
acceptTakeOver(pageId: string, userId: string): Promise<void>;
|
|
34
|
+
rejectTakeOver(pageId: string, userId: string): Promise<void>;
|
|
35
|
+
private getOnlineUsers;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
declare interface ChaiBuilderPagesRealtimeInterface {
|
|
39
|
+
joinPage: (pageId: string, userId: string) => Promise<boolean>;
|
|
40
|
+
leavePage: (pageId: string, userId: string) => Promise<void>;
|
|
41
|
+
requestTakeOver: (pageId: string, userId: string) => Promise<void>;
|
|
42
|
+
acceptTakeOver: (pageId: string, userId: string) => Promise<void>;
|
|
43
|
+
rejectTakeOver: (pageId: string, userId: string) => Promise<void>;
|
|
44
|
+
listenEvent: (event: LISTEN_EVENTS, callback: (payload: any) => void) => void;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export declare const ChaiJsonInput: React.FC<SmartJsonInputProps>;
|
|
48
|
+
|
|
24
49
|
declare type ChaiWebsiteSetting = {
|
|
25
50
|
fallbackLang: string;
|
|
26
51
|
languages: string[];
|
|
@@ -41,6 +66,13 @@ declare interface ImagePickerProps {
|
|
|
41
66
|
disabled?: boolean;
|
|
42
67
|
}
|
|
43
68
|
|
|
69
|
+
export declare const LanguageSwitcher: ({ showAdd, variant, }: {
|
|
70
|
+
showAdd?: boolean;
|
|
71
|
+
variant?: "ghost" | "outline";
|
|
72
|
+
}) => JSX_2.Element | null;
|
|
73
|
+
|
|
74
|
+
declare type LISTEN_EVENTS = "TAKE_OVER_REQUESTED" | "TAKE_OVER_REQUEST_ACCEPTED" | "TAKE_OVER_REQUEST_REJECTED";
|
|
75
|
+
|
|
44
76
|
declare type LoggedInUser = {
|
|
45
77
|
accessToken: string;
|
|
46
78
|
refreshToken: string;
|
|
@@ -69,6 +101,18 @@ export declare const PermissionChecker: ({ permission, permissions, children, fa
|
|
|
69
101
|
|
|
70
102
|
export declare const registerChaiLoginComponent: (component: ComponentType) => void;
|
|
71
103
|
|
|
104
|
+
declare interface SmartJsonInputProps {
|
|
105
|
+
value: string;
|
|
106
|
+
onChange: (value: string) => void;
|
|
107
|
+
disabled?: boolean;
|
|
108
|
+
readOnly?: boolean;
|
|
109
|
+
placeholder?: string;
|
|
110
|
+
rows?: number;
|
|
111
|
+
id?: string;
|
|
112
|
+
pageData?: Record<string, any>;
|
|
113
|
+
handleFieldInsert?: (field: string, inputId: string) => void;
|
|
114
|
+
}
|
|
115
|
+
|
|
72
116
|
export declare const useActivePage: () => {
|
|
73
117
|
data: any;
|
|
74
118
|
isFetching: boolean;
|
package/dist/index.js
CHANGED
|
@@ -1,24 +1,27 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ah as s, a6 as t, a5 as i, a4 as u, X as g, a3 as r, W as h, a7 as o, Y as n, Z as P, ac as c, a8 as C, ae as d, ag as l, _ as m, af as p, a0 as f, a9 as b, a1 as L, a2 as k, ad as A, aa as F, ab as I } from "./index-1oRhGjYc.js";
|
|
2
2
|
export * from "@chaibuilder/sdk";
|
|
3
3
|
export {
|
|
4
|
-
s as
|
|
5
|
-
t as
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
c as
|
|
15
|
-
C as
|
|
16
|
-
d as
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
p as
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
4
|
+
s as ChaiBuilderPagesRealtime,
|
|
5
|
+
t as ChaiJsonInput,
|
|
6
|
+
i as ImagePicker,
|
|
7
|
+
u as LanguageSwitcher,
|
|
8
|
+
g as NestedPathSelector,
|
|
9
|
+
r as PermissionChecker,
|
|
10
|
+
h as default,
|
|
11
|
+
o as registerChaiLoginComponent,
|
|
12
|
+
n as useActivePage,
|
|
13
|
+
P as useBuilderPageData,
|
|
14
|
+
c as useChaiAuth,
|
|
15
|
+
C as useChaiCurrentPage,
|
|
16
|
+
d as useChaiFetch,
|
|
17
|
+
l as useChaiUserInfo,
|
|
18
|
+
m as useFallbackLang,
|
|
19
|
+
p as useFetch,
|
|
20
|
+
f as useGotoPage,
|
|
21
|
+
b as useLanguagePages,
|
|
22
|
+
L as usePageTypes,
|
|
23
|
+
k as useUpdateActivePageMetadata,
|
|
24
|
+
A as useUserPermissions,
|
|
25
|
+
F as useWebsitePages,
|
|
26
|
+
I as useWebsiteSetting
|
|
24
27
|
};
|
package/dist/server.d.ts
CHANGED
|
@@ -176,7 +176,7 @@ export declare class ChaiBuilderPagesUserManagement implements ChaiBuilderPagesU
|
|
|
176
176
|
}
|
|
177
177
|
|
|
178
178
|
export declare interface ChaiBuilderPagesUsersInterface {
|
|
179
|
-
login({ email, password
|
|
179
|
+
login({ email, password }: {
|
|
180
180
|
email: string;
|
|
181
181
|
password: string;
|
|
182
182
|
}): Promise<LoggedInUser | {
|
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.7.
|
|
6
|
+
"version": "0.7.2",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"files": [
|
|
9
9
|
"dist"
|
|
@@ -102,6 +102,7 @@
|
|
|
102
102
|
"@tanstack/react-query-devtools": "^5.64.2",
|
|
103
103
|
"@testing-library/jest-dom": "^6.6.3",
|
|
104
104
|
"@testing-library/react": "^16.2.0",
|
|
105
|
+
"@supabase/supabase-js": "^2.50.2",
|
|
105
106
|
"@testing-library/user-event": "^14.6.1",
|
|
106
107
|
"@types/canvas-confetti": "^1.9.0",
|
|
107
108
|
"@types/cors": "^2.8.17",
|