@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.
@@ -0,0 +1,2 @@
1
+ export const STATE_MODES = ['production', 'draft'];
2
+ export const PUBLISH_MODES = ['production'];
@@ -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,7 @@
1
+ export declare function CreateResource({ open, onClose, blockletDid, mode, }: {
2
+ open: boolean;
3
+ onClose: () => void;
4
+ blockletDid: string;
5
+ mode: 'dialog' | 'page';
6
+ }): import("react/jsx-runtime").JSX.Element | null;
7
+ export default CreateResource;
@@ -0,0 +1 @@
1
+ export * from './settings';
@@ -0,0 +1 @@
1
+ export * from '@blocklet/pages-kit-inner-components/setting';
@@ -0,0 +1,2 @@
1
+ export * from './create-resource';
2
+ export * from './custom-component';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export { translations } from '@blocklet/pages-kit-inner-components/locales';