@blocklet/pages-kit-runtime 0.1.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/LICENSE +13 -0
- package/lib/cjs/client.js +301 -0
- package/lib/cjs/components/create-resource.js +32 -0
- package/lib/cjs/components/custom-component/index.js +18 -0
- package/lib/cjs/components/custom-component/settings.js +18 -0
- package/lib/cjs/components/index.js +19 -0
- package/lib/cjs/index.js +2 -0
- package/lib/cjs/locales/index.js +6 -0
- package/lib/cjs/tsconfig.tsbuildinfo +1 -0
- package/lib/cjs/types/index.js +5 -0
- package/lib/cjs/utils/index.js +1 -0
- package/lib/esm/client.js +260 -0
- package/lib/esm/components/create-resource.js +29 -0
- package/lib/esm/components/custom-component/index.js +2 -0
- package/lib/esm/components/custom-component/settings.js +2 -0
- package/lib/esm/components/index.js +3 -0
- package/lib/esm/index.js +1 -0
- package/lib/esm/locales/index.js +2 -0
- package/lib/esm/tsconfig.tsbuildinfo +1 -0
- package/lib/esm/types/index.js +2 -0
- package/lib/esm/utils/index.js +1 -0
- package/lib/types/client.d.ts +36 -0
- package/lib/types/components/create-resource.d.ts +7 -0
- package/lib/types/components/custom-component/index.d.ts +1 -0
- package/lib/types/components/custom-component/settings.d.ts +1 -0
- package/lib/types/components/index.d.ts +2 -0
- package/lib/types/index.d.ts +1 -0
- package/lib/types/locales/index.d.ts +1 -0
- package/lib/types/tsconfig.tsbuildinfo +1 -0
- package/lib/types/types/index.d.ts +39 -0
- package/lib/types/utils/index.d.ts +0 -0
- package/package.json +161 -0
- package/tsconfig.json +13 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { PageData } from '@blocklet/pages-kit-inner-components/home';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
type StateRef = {
|
|
4
|
+
getState: () => any;
|
|
5
|
+
waitForState: () => Promise<any>;
|
|
6
|
+
getPageData: () => any;
|
|
7
|
+
setPageData: (data: any) => void;
|
|
8
|
+
getPageInitData: ({ locale }: {
|
|
9
|
+
locale?: string;
|
|
10
|
+
}) => Promise<any>;
|
|
11
|
+
};
|
|
12
|
+
type Props = {
|
|
13
|
+
did?: string;
|
|
14
|
+
state?: any;
|
|
15
|
+
stateRef?: React.RefObject<StateRef>;
|
|
16
|
+
path?: string;
|
|
17
|
+
pageData?: PageData;
|
|
18
|
+
projectId?: string;
|
|
19
|
+
siteFrom?: string;
|
|
20
|
+
};
|
|
21
|
+
export declare const RuntimeComponent: (props: Props) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export type RuntimeProps = Props;
|
|
23
|
+
export type { StateRef };
|
|
24
|
+
export default class Runtime<PageDataType> {
|
|
25
|
+
stateRef: React.RefObject<StateRef>;
|
|
26
|
+
props: Props;
|
|
27
|
+
constructor(props: Props);
|
|
28
|
+
get rawState(): any;
|
|
29
|
+
set pageData(data: PageDataType);
|
|
30
|
+
get pageData(): PageDataType;
|
|
31
|
+
getPageInitData({ locale }: {
|
|
32
|
+
locale?: string;
|
|
33
|
+
}): Promise<any>;
|
|
34
|
+
waitForState(): Promise<any>;
|
|
35
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './settings';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@blocklet/pages-kit-inner-components/setting';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { translations } from '@blocklet/pages-kit-inner-components/locales';
|