@blocklet/pages-kit 0.2.286 → 0.2.288
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/lib/cjs/builtin/async/ai-runtime/api/assistant.js +26 -0
- package/lib/cjs/builtin/async/ai-runtime/api/dataset.js +127 -0
- package/lib/cjs/builtin/async/ai-runtime/api/message.js +33 -0
- package/lib/cjs/builtin/async/ai-runtime/api/request.js +55 -0
- package/lib/cjs/builtin/async/ai-runtime/api/session.js +121 -0
- package/lib/cjs/builtin/async/ai-runtime/api/subscription.js +32 -0
- package/lib/cjs/builtin/async/ai-runtime/components/ActionButton.js +63 -0
- package/lib/cjs/builtin/async/ai-runtime/components/GlobalLoading.js +24 -0
- package/lib/cjs/builtin/async/ai-runtime/components/LoadingButton.js +40 -0
- package/lib/cjs/builtin/async/ai-runtime/components/LoadingListItemButton.js +49 -0
- package/lib/cjs/builtin/async/ai-runtime/components/MarkdownRenderer.js +156 -0
- package/lib/cjs/builtin/async/ai-runtime/components/MenuButton.js +43 -0
- package/lib/cjs/builtin/async/ai-runtime/components/PoweredBy.js +30 -0
- package/lib/cjs/builtin/async/ai-runtime/components/RuntimeProvider.js +22 -0
- package/lib/cjs/builtin/async/ai-runtime/components/ScrollView.js +109 -0
- package/lib/cjs/builtin/async/ai-runtime/components/SocialShare.js +102 -0
- package/lib/cjs/builtin/async/ai-runtime/components/ThemeProvider.js +193 -0
- package/lib/cjs/builtin/async/ai-runtime/components/collection/CollectionEditDialog.js +92 -0
- package/lib/cjs/builtin/async/ai-runtime/components/collection/CollectionListView.js +197 -0
- package/lib/cjs/builtin/async/ai-runtime/components/collection/CollectionView.js +122 -0
- package/lib/cjs/builtin/async/ai-runtime/components/collection/DocumentListView.js +152 -0
- package/lib/cjs/builtin/async/ai-runtime/components/collection/DocumentView.js +135 -0
- package/lib/cjs/builtin/async/ai-runtime/components/common/ChatBot.js +104 -0
- package/lib/cjs/builtin/async/ai-runtime/components/common/MessageMetadataRenderer.js +21 -0
- package/lib/cjs/builtin/async/ai-runtime/components/common/MessageSuggestedQuestions.js +35 -0
- package/lib/cjs/builtin/async/ai-runtime/components/common/index.js +12 -0
- package/lib/cjs/builtin/async/ai-runtime/components/form/ParameterForm.js +89 -0
- package/lib/cjs/builtin/async/ai-runtime/components/form/ParameterFormDialog.js +66 -0
- package/lib/cjs/builtin/async/ai-runtime/components/form/ParameterFormFields.js +57 -0
- package/lib/cjs/builtin/async/ai-runtime/components/form/QuestionField.js +44 -0
- package/lib/cjs/builtin/async/ai-runtime/components/form/SettingButton.js +81 -0
- package/lib/cjs/builtin/async/ai-runtime/components/lottie/index.js +34 -0
- package/lib/cjs/builtin/async/ai-runtime/components/message/MessageActions.js +38 -0
- package/lib/cjs/builtin/async/ai-runtime/components/message/MessageErrorView.js +30 -0
- package/lib/cjs/builtin/async/ai-runtime/components/message/MessageItemView.js +129 -0
- package/lib/cjs/builtin/async/ai-runtime/components/message/MessageListView.js +47 -0
- package/lib/cjs/builtin/async/ai-runtime/components/message/ReferenceLinks.js +11 -0
- package/lib/cjs/builtin/async/ai-runtime/components/parameters/LanguageField.js +55 -0
- package/lib/cjs/builtin/async/ai-runtime/components/parameters/NumberField.js +21 -0
- package/lib/cjs/builtin/async/ai-runtime/components/parameters/SelectField.js +24 -0
- package/lib/cjs/builtin/async/ai-runtime/components/parameters/StringField.js +21 -0
- package/lib/cjs/builtin/async/ai-runtime/components/parameters/index.js +37 -0
- package/lib/cjs/builtin/async/ai-runtime/components/runtime-chat/InitialForm.js +111 -0
- package/lib/cjs/builtin/async/ai-runtime/components/runtime-chat/RuntimeChatHeader.js +60 -0
- package/lib/cjs/builtin/async/ai-runtime/components/runtime-chat/RuntimeChatSession.js +52 -0
- package/lib/cjs/builtin/async/ai-runtime/components/runtime-chat/index.js +28 -0
- package/lib/cjs/builtin/async/ai-runtime/components/runtime-form/RuntimeFormForms.js +120 -0
- package/lib/cjs/builtin/async/ai-runtime/components/runtime-form/RuntimeFormHeader.js +22 -0
- package/lib/cjs/builtin/async/ai-runtime/components/runtime-form/RuntimeFormResult.js +72 -0
- package/lib/cjs/builtin/async/ai-runtime/components/runtime-form/RuntimeFormSubmit.js +31 -0
- package/lib/cjs/builtin/async/ai-runtime/components/runtime-form/index.js +22 -0
- package/lib/cjs/builtin/async/ai-runtime/components/session/CheckSession.js +65 -0
- package/lib/cjs/builtin/async/ai-runtime/components/session/SessionListView.js +88 -0
- package/lib/cjs/builtin/async/ai-runtime/constants.js +5 -0
- package/lib/cjs/builtin/async/ai-runtime/error.js +10 -0
- package/lib/cjs/builtin/async/ai-runtime/hooks/header.js +32 -0
- package/lib/cjs/builtin/async/ai-runtime/hooks/navigate.js +38 -0
- package/lib/cjs/builtin/async/ai-runtime/hooks/subscribe.js +35 -0
- package/lib/cjs/builtin/async/ai-runtime/hooks/useAsync.js +32 -0
- package/lib/cjs/builtin/async/ai-runtime/index.js +81 -0
- package/lib/cjs/builtin/async/ai-runtime/locales/index.js +147 -0
- package/lib/cjs/builtin/async/ai-runtime/state/assistant.js +59 -0
- package/lib/cjs/builtin/async/ai-runtime/state/index.js +423 -0
- package/lib/cjs/builtin/async/ai-runtime/state/loading.js +39 -0
- package/lib/cjs/builtin/async/ai-runtime/state/session.js +217 -0
- package/lib/cjs/builtin/async/ai-runtime/state/subscription.js +52 -0
- package/lib/cjs/builtin/async/ai-runtime/utils.js +49 -0
- package/lib/cjs/builtin/async/react-scroll-to-bottom.js +1 -1
- package/lib/cjs/utils/builtin.js +1 -0
- package/lib/cjs/utils/inject-global-components.js +2 -0
- package/lib/esm/builtin/async/ai-runtime/api/assistant.js +22 -0
- package/lib/esm/builtin/async/ai-runtime/api/dataset.js +113 -0
- package/lib/esm/builtin/async/ai-runtime/api/message.js +28 -0
- package/lib/esm/builtin/async/ai-runtime/api/request.js +51 -0
- package/lib/esm/builtin/async/ai-runtime/api/session.js +112 -0
- package/lib/esm/builtin/async/ai-runtime/api/subscription.js +27 -0
- package/lib/esm/builtin/async/ai-runtime/components/ActionButton.js +56 -0
- package/lib/esm/builtin/async/ai-runtime/components/GlobalLoading.js +21 -0
- package/lib/esm/builtin/async/ai-runtime/components/LoadingButton.js +38 -0
- package/lib/esm/builtin/async/ai-runtime/components/LoadingListItemButton.js +46 -0
- package/lib/esm/builtin/async/ai-runtime/components/MarkdownRenderer.js +129 -0
- package/lib/esm/builtin/async/ai-runtime/components/MenuButton.js +40 -0
- package/lib/esm/builtin/async/ai-runtime/components/PoweredBy.js +27 -0
- package/lib/esm/builtin/async/ai-runtime/components/RuntimeProvider.js +16 -0
- package/lib/esm/builtin/async/ai-runtime/components/ScrollView.js +101 -0
- package/lib/esm/builtin/async/ai-runtime/components/SocialShare.js +93 -0
- package/lib/esm/builtin/async/ai-runtime/components/ThemeProvider.js +190 -0
- package/lib/esm/builtin/async/ai-runtime/components/collection/CollectionEditDialog.js +92 -0
- package/lib/esm/builtin/async/ai-runtime/components/collection/CollectionListView.js +197 -0
- package/lib/esm/builtin/async/ai-runtime/components/collection/CollectionView.js +122 -0
- package/lib/esm/builtin/async/ai-runtime/components/collection/DocumentListView.js +152 -0
- package/lib/esm/builtin/async/ai-runtime/components/collection/DocumentView.js +135 -0
- package/lib/esm/builtin/async/ai-runtime/components/common/ChatBot.js +98 -0
- package/lib/esm/builtin/async/ai-runtime/components/common/MessageMetadataRenderer.js +15 -0
- package/lib/esm/builtin/async/ai-runtime/components/common/MessageSuggestedQuestions.js +30 -0
- package/lib/esm/builtin/async/ai-runtime/components/common/index.js +3 -0
- package/lib/esm/builtin/async/ai-runtime/components/form/ParameterForm.js +60 -0
- package/lib/esm/builtin/async/ai-runtime/components/form/ParameterFormDialog.js +59 -0
- package/lib/esm/builtin/async/ai-runtime/components/form/ParameterFormFields.js +50 -0
- package/lib/esm/builtin/async/ai-runtime/components/form/QuestionField.js +38 -0
- package/lib/esm/builtin/async/ai-runtime/components/form/SettingButton.js +75 -0
- package/lib/esm/builtin/async/ai-runtime/components/lottie/index.js +8 -0
- package/lib/esm/builtin/async/ai-runtime/components/message/MessageActions.js +35 -0
- package/lib/esm/builtin/async/ai-runtime/components/message/MessageErrorView.js +24 -0
- package/lib/esm/builtin/async/ai-runtime/components/message/MessageItemView.js +100 -0
- package/lib/esm/builtin/async/ai-runtime/components/message/MessageListView.js +41 -0
- package/lib/esm/builtin/async/ai-runtime/components/message/ReferenceLinks.js +8 -0
- package/lib/esm/builtin/async/ai-runtime/components/parameters/LanguageField.js +53 -0
- package/lib/esm/builtin/async/ai-runtime/components/parameters/NumberField.js +19 -0
- package/lib/esm/builtin/async/ai-runtime/components/parameters/SelectField.js +22 -0
- package/lib/esm/builtin/async/ai-runtime/components/parameters/StringField.js +19 -0
- package/lib/esm/builtin/async/ai-runtime/components/parameters/index.js +31 -0
- package/lib/esm/builtin/async/ai-runtime/components/runtime-chat/InitialForm.js +103 -0
- package/lib/esm/builtin/async/ai-runtime/components/runtime-chat/RuntimeChatHeader.js +34 -0
- package/lib/esm/builtin/async/ai-runtime/components/runtime-chat/RuntimeChatSession.js +46 -0
- package/lib/esm/builtin/async/ai-runtime/components/runtime-chat/index.js +22 -0
- package/lib/esm/builtin/async/ai-runtime/components/runtime-form/RuntimeFormForms.js +114 -0
- package/lib/esm/builtin/async/ai-runtime/components/runtime-form/RuntimeFormHeader.js +19 -0
- package/lib/esm/builtin/async/ai-runtime/components/runtime-form/RuntimeFormResult.js +66 -0
- package/lib/esm/builtin/async/ai-runtime/components/runtime-form/RuntimeFormSubmit.js +25 -0
- package/lib/esm/builtin/async/ai-runtime/components/runtime-form/index.js +16 -0
- package/lib/esm/builtin/async/ai-runtime/components/session/CheckSession.js +59 -0
- package/lib/esm/builtin/async/ai-runtime/components/session/SessionListView.js +88 -0
- package/lib/esm/builtin/async/ai-runtime/constants.js +2 -0
- package/lib/esm/builtin/async/ai-runtime/error.js +6 -0
- package/lib/esm/builtin/async/ai-runtime/hooks/header.js +25 -0
- package/lib/esm/builtin/async/ai-runtime/hooks/navigate.js +32 -0
- package/lib/esm/builtin/async/ai-runtime/hooks/subscribe.js +31 -0
- package/lib/esm/builtin/async/ai-runtime/hooks/useAsync.js +29 -0
- package/lib/esm/builtin/async/ai-runtime/index.js +72 -0
- package/lib/esm/builtin/async/ai-runtime/locales/index.js +144 -0
- package/lib/esm/builtin/async/ai-runtime/state/assistant.js +54 -0
- package/lib/esm/builtin/async/ai-runtime/state/index.js +423 -0
- package/lib/esm/builtin/async/ai-runtime/state/loading.js +36 -0
- package/lib/esm/builtin/async/ai-runtime/state/session.js +209 -0
- package/lib/esm/builtin/async/ai-runtime/state/subscription.js +47 -0
- package/lib/esm/builtin/async/ai-runtime/utils.js +42 -0
- package/lib/esm/builtin/async/react-scroll-to-bottom.js +1 -1
- package/lib/esm/utils/builtin.js +1 -0
- package/lib/esm/utils/inject-global-components.js +2 -0
- package/lib/types/builtin/async/ai-runtime/api/assistant.d.ts +18 -0
- package/lib/types/builtin/async/ai-runtime/api/dataset.d.ts +39 -0
- package/lib/types/builtin/async/ai-runtime/api/message.d.ts +39 -0
- package/lib/types/builtin/async/ai-runtime/api/request.d.ts +5 -0
- package/lib/types/builtin/async/ai-runtime/api/session.d.ts +54 -0
- package/lib/types/builtin/async/ai-runtime/api/subscription.d.ts +15 -0
- package/lib/types/builtin/async/ai-runtime/components/ActionButton.d.ts +11 -0
- package/lib/types/builtin/async/ai-runtime/components/GlobalLoading.d.ts +2 -0
- package/lib/types/builtin/async/ai-runtime/components/LoadingButton.d.ts +3 -0
- package/lib/types/builtin/async/ai-runtime/components/LoadingListItemButton.d.ts +5 -0
- package/lib/types/builtin/async/ai-runtime/components/MarkdownRenderer.d.ts +2 -0
- package/lib/types/builtin/async/ai-runtime/components/MenuButton.d.ts +9 -0
- package/lib/types/builtin/async/ai-runtime/components/PoweredBy.d.ts +4 -0
- package/lib/types/builtin/async/ai-runtime/components/RuntimeProvider.d.ts +4 -0
- package/lib/types/builtin/async/ai-runtime/components/ScrollView.d.ts +61 -0
- package/lib/types/builtin/async/ai-runtime/components/SocialShare.d.ts +17 -0
- package/lib/types/builtin/async/ai-runtime/components/ThemeProvider.d.ts +6 -0
- package/lib/types/builtin/async/ai-runtime/components/collection/CollectionEditDialog.d.ts +0 -0
- package/lib/types/builtin/async/ai-runtime/components/collection/CollectionListView.d.ts +0 -0
- package/lib/types/builtin/async/ai-runtime/components/collection/CollectionView.d.ts +0 -0
- package/lib/types/builtin/async/ai-runtime/components/collection/DocumentListView.d.ts +0 -0
- package/lib/types/builtin/async/ai-runtime/components/collection/DocumentView.d.ts +0 -0
- package/lib/types/builtin/async/ai-runtime/components/common/ChatBot.d.ts +13 -0
- package/lib/types/builtin/async/ai-runtime/components/common/MessageMetadataRenderer.d.ts +4 -0
- package/lib/types/builtin/async/ai-runtime/components/common/MessageSuggestedQuestions.d.ts +7 -0
- package/lib/types/builtin/async/ai-runtime/components/common/index.d.ts +3 -0
- package/lib/types/builtin/async/ai-runtime/components/form/ParameterForm.d.ts +12 -0
- package/lib/types/builtin/async/ai-runtime/components/form/ParameterFormDialog.d.ts +28 -0
- package/lib/types/builtin/async/ai-runtime/components/form/ParameterFormFields.d.ts +11 -0
- package/lib/types/builtin/async/ai-runtime/components/form/QuestionField.d.ts +13 -0
- package/lib/types/builtin/async/ai-runtime/components/form/SettingButton.d.ts +6 -0
- package/lib/types/builtin/async/ai-runtime/components/lottie/index.d.ts +4 -0
- package/lib/types/builtin/async/ai-runtime/components/message/MessageActions.d.ts +4 -0
- package/lib/types/builtin/async/ai-runtime/components/message/MessageErrorView.d.ts +6 -0
- package/lib/types/builtin/async/ai-runtime/components/message/MessageItemView.d.ts +8 -0
- package/lib/types/builtin/async/ai-runtime/components/message/MessageListView.d.ts +5 -0
- package/lib/types/builtin/async/ai-runtime/components/message/ReferenceLinks.d.ts +4 -0
- package/lib/types/builtin/async/ai-runtime/components/parameters/LanguageField.d.ts +9 -0
- package/lib/types/builtin/async/ai-runtime/components/parameters/NumberField.d.ts +9 -0
- package/lib/types/builtin/async/ai-runtime/components/parameters/SelectField.d.ts +9 -0
- package/lib/types/builtin/async/ai-runtime/components/parameters/StringField.d.ts +9 -0
- package/lib/types/builtin/async/ai-runtime/components/parameters/index.d.ts +7 -0
- package/lib/types/builtin/async/ai-runtime/components/runtime-chat/InitialForm.d.ts +10 -0
- package/lib/types/builtin/async/ai-runtime/components/runtime-chat/RuntimeChatHeader.d.ts +5 -0
- package/lib/types/builtin/async/ai-runtime/components/runtime-chat/RuntimeChatSession.d.ts +6 -0
- package/lib/types/builtin/async/ai-runtime/components/runtime-chat/index.d.ts +5 -0
- package/lib/types/builtin/async/ai-runtime/components/runtime-form/RuntimeFormForms.d.ts +5 -0
- package/lib/types/builtin/async/ai-runtime/components/runtime-form/RuntimeFormHeader.d.ts +5 -0
- package/lib/types/builtin/async/ai-runtime/components/runtime-form/RuntimeFormResult.d.ts +5 -0
- package/lib/types/builtin/async/ai-runtime/components/runtime-form/RuntimeFormSubmit.d.ts +5 -0
- package/lib/types/builtin/async/ai-runtime/components/runtime-form/index.d.ts +4 -0
- package/lib/types/builtin/async/ai-runtime/components/session/CheckSession.d.ts +8 -0
- package/lib/types/builtin/async/ai-runtime/components/session/SessionListView.d.ts +0 -0
- package/lib/types/builtin/async/ai-runtime/constants.d.ts +2 -0
- package/lib/types/builtin/async/ai-runtime/error.d.ts +4 -0
- package/lib/types/builtin/async/ai-runtime/hooks/header.d.ts +4 -0
- package/lib/types/builtin/async/ai-runtime/hooks/navigate.d.ts +25 -0
- package/lib/types/builtin/async/ai-runtime/hooks/subscribe.d.ts +6 -0
- package/lib/types/builtin/async/ai-runtime/hooks/useAsync.d.ts +1 -0
- package/lib/types/builtin/async/ai-runtime/index.d.ts +17 -0
- package/lib/types/builtin/async/ai-runtime/locales/index.d.ts +126 -0
- package/lib/types/builtin/async/ai-runtime/state/assistant.d.ts +17 -0
- package/lib/types/builtin/async/ai-runtime/state/index.d.ts +0 -0
- package/lib/types/builtin/async/ai-runtime/state/loading.d.ts +10 -0
- package/lib/types/builtin/async/ai-runtime/state/session.d.ts +40 -0
- package/lib/types/builtin/async/ai-runtime/state/subscription.d.ts +15 -0
- package/lib/types/builtin/async/ai-runtime/utils.d.ts +20 -0
- package/lib/types/builtin/async/react-scroll-to-bottom.d.ts +3 -2
- package/lib/types/builtin/page/header.d.ts +1 -6
- package/lib/types/builtin/session.d.ts +11 -1
- package/lib/types/components/CustomComponentRenderer/state.d.ts +1 -116
- package/lib/types/utils/builtin.d.ts +1 -0
- package/package.json +14 -9
- package/tsconfig.json +5 -1
|
@@ -5,10 +5,5 @@ export interface HeaderState {
|
|
|
5
5
|
addons?: (...exists: any[]) => any[];
|
|
6
6
|
}
|
|
7
7
|
export declare const useHeaderState: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<HeaderState>, "setState"> & {
|
|
8
|
-
setState(nextStateOrUpdater: HeaderState | Partial<HeaderState> | ((state:
|
|
9
|
-
logo?: any;
|
|
10
|
-
brand?: any;
|
|
11
|
-
description?: any;
|
|
12
|
-
addons?: ((...exists: any[]) => any[]) | undefined;
|
|
13
|
-
}) => void), shouldReplace?: boolean | undefined): void;
|
|
8
|
+
setState(nextStateOrUpdater: HeaderState | Partial<HeaderState> | ((state: import("immer").WritableDraft<HeaderState>) => void), shouldReplace?: boolean | undefined): void;
|
|
14
9
|
}>;
|
|
@@ -18,122 +18,7 @@ export interface CustomComponentStates {
|
|
|
18
18
|
loadComponents(input: Pick<PreloadComponentsInput, 'mode' | 'locale' | 'instances'>): Promise<void>;
|
|
19
19
|
}
|
|
20
20
|
export declare const customComponentStates: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<CustomComponentStates>, "setState"> & {
|
|
21
|
-
setState(nextStateOrUpdater: CustomComponentStates | Partial<CustomComponentStates> | ((state:
|
|
22
|
-
state: {
|
|
23
|
-
config: {
|
|
24
|
-
defaultLocale?: string | undefined;
|
|
25
|
-
supportedLocales?: {
|
|
26
|
-
locale: string;
|
|
27
|
-
}[] | undefined;
|
|
28
|
-
};
|
|
29
|
-
components: {
|
|
30
|
-
[x: string]: {
|
|
31
|
-
componentModuleGlobalVariable?: string | undefined;
|
|
32
|
-
component: {
|
|
33
|
-
id: string;
|
|
34
|
-
createdAt: string;
|
|
35
|
-
updatedAt: string;
|
|
36
|
-
name?: string | undefined;
|
|
37
|
-
renderer?: {
|
|
38
|
-
type: "web-component";
|
|
39
|
-
script?: string | undefined;
|
|
40
|
-
} | {
|
|
41
|
-
type: "react-component";
|
|
42
|
-
script?: string | undefined;
|
|
43
|
-
} | {
|
|
44
|
-
type: "component";
|
|
45
|
-
componentId?: string | undefined;
|
|
46
|
-
properties?: {
|
|
47
|
-
[x: string]: {
|
|
48
|
-
locales?: {
|
|
49
|
-
[x: string]: {
|
|
50
|
-
value?: any;
|
|
51
|
-
};
|
|
52
|
-
} | undefined;
|
|
53
|
-
};
|
|
54
|
-
} | undefined;
|
|
55
|
-
} | undefined;
|
|
56
|
-
properties?: {
|
|
57
|
-
[x: string]: {
|
|
58
|
-
index: number;
|
|
59
|
-
data: {
|
|
60
|
-
type: "number" | "boolean" | "json" | "url";
|
|
61
|
-
id: string;
|
|
62
|
-
key?: string | undefined;
|
|
63
|
-
locales?: {
|
|
64
|
-
[x: string]: {
|
|
65
|
-
name?: string | undefined;
|
|
66
|
-
defaultValue?: any;
|
|
67
|
-
};
|
|
68
|
-
} | undefined;
|
|
69
|
-
} | {
|
|
70
|
-
type: "custom";
|
|
71
|
-
componentId?: string | undefined;
|
|
72
|
-
id: string;
|
|
73
|
-
key?: string | undefined;
|
|
74
|
-
locales?: {
|
|
75
|
-
[x: string]: {
|
|
76
|
-
name?: string | undefined;
|
|
77
|
-
defaultValue?: any;
|
|
78
|
-
};
|
|
79
|
-
} | undefined;
|
|
80
|
-
} | {
|
|
81
|
-
type?: "string" | undefined;
|
|
82
|
-
multiline?: boolean | undefined;
|
|
83
|
-
id: string;
|
|
84
|
-
key?: string | undefined;
|
|
85
|
-
locales?: {
|
|
86
|
-
[x: string]: {
|
|
87
|
-
name?: string | undefined;
|
|
88
|
-
defaultValue?: any;
|
|
89
|
-
};
|
|
90
|
-
} | undefined;
|
|
91
|
-
} | {
|
|
92
|
-
type: "component";
|
|
93
|
-
locales?: {
|
|
94
|
-
[x: string]: {
|
|
95
|
-
name?: undefined;
|
|
96
|
-
defaultValue?: {
|
|
97
|
-
componentId?: string | undefined;
|
|
98
|
-
properties: any;
|
|
99
|
-
} | undefined;
|
|
100
|
-
};
|
|
101
|
-
} | undefined;
|
|
102
|
-
id: string;
|
|
103
|
-
key?: string | undefined;
|
|
104
|
-
};
|
|
105
|
-
};
|
|
106
|
-
} | undefined;
|
|
107
|
-
};
|
|
108
|
-
Component?: ComponentType | undefined;
|
|
109
|
-
};
|
|
110
|
-
};
|
|
111
|
-
instances: {
|
|
112
|
-
[x: string]: {
|
|
113
|
-
componentId: string;
|
|
114
|
-
locales?: {
|
|
115
|
-
[x: string]: {
|
|
116
|
-
props?: {
|
|
117
|
-
[x: string]: any;
|
|
118
|
-
} | undefined;
|
|
119
|
-
};
|
|
120
|
-
} | undefined;
|
|
121
|
-
};
|
|
122
|
-
};
|
|
123
|
-
};
|
|
124
|
-
getComponent: (options: {
|
|
125
|
-
locale: string;
|
|
126
|
-
instanceId?: string;
|
|
127
|
-
componentId: string;
|
|
128
|
-
}) => {
|
|
129
|
-
component: CustomComponent;
|
|
130
|
-
Component: ComponentType;
|
|
131
|
-
props?: {
|
|
132
|
-
[key: string]: any;
|
|
133
|
-
};
|
|
134
|
-
} | null;
|
|
135
|
-
loadComponents: (input: Pick<PreloadComponentsInput, 'mode' | 'locale' | 'instances'>) => Promise<void>;
|
|
136
|
-
}) => void), shouldReplace?: boolean | undefined): void;
|
|
21
|
+
setState(nextStateOrUpdater: CustomComponentStates | Partial<CustomComponentStates> | ((state: import("immer").WritableDraft<CustomComponentStates>) => void), shouldReplace?: boolean | undefined): void;
|
|
137
22
|
}>;
|
|
138
23
|
export declare function useComponent({ instanceId, componentId, properties, locale, dev }: CustomComponentRendererProps): {
|
|
139
24
|
error?: Error;
|
|
@@ -37,4 +37,5 @@ export declare const BuiltinModules: {
|
|
|
37
37
|
'@blocklet/pages-kit/builtin/async/react-markdown': {};
|
|
38
38
|
'@blocklet/pages-kit/builtin/async/react-syntax-highlighter': {};
|
|
39
39
|
'@blocklet/pages-kit/builtin/async/image-preview': {};
|
|
40
|
+
'@blocklet/pages-kit/builtin/async/ai-runtime': {};
|
|
40
41
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/pages-kit",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.288",
|
|
4
4
|
"description": "Pages Kit components and utils",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -93,14 +93,18 @@
|
|
|
93
93
|
"prepare": "npm run build"
|
|
94
94
|
},
|
|
95
95
|
"dependencies": {
|
|
96
|
-
"@arcblock/did-connect": "^2.9.
|
|
96
|
+
"@arcblock/did-connect": "^2.9.73",
|
|
97
97
|
"@blocklet/ai-kit": "^0.1.27",
|
|
98
|
-
"@blocklet/
|
|
98
|
+
"@blocklet/ai-runtime": "^0.1.349",
|
|
99
|
+
"@blocklet/js-sdk": "1.16.26-beta-cca12425",
|
|
100
|
+
"@blocklet/sdk": "^1.16.26",
|
|
99
101
|
"@iconify/react": "^4.1.1",
|
|
102
|
+
"@lottiefiles/lottie-player": "^1.7.1",
|
|
100
103
|
"axios": "^1.6.8",
|
|
101
104
|
"dayjs": "^1.11.10",
|
|
102
105
|
"eventsource-parser": "^1.1.2",
|
|
103
|
-
"immer": "^10.
|
|
106
|
+
"immer": "^10.1.1",
|
|
107
|
+
"js-base64": "^3.7.7",
|
|
104
108
|
"lodash": "^4.17.21",
|
|
105
109
|
"nanoid": "^3.3.7",
|
|
106
110
|
"node-fetch": "^2.7.0",
|
|
@@ -109,6 +113,7 @@
|
|
|
109
113
|
"react-hook-form": "^7.51.3",
|
|
110
114
|
"react-markdown": "^9.0.1",
|
|
111
115
|
"react-scroll-to-bottom": "^4.2.0",
|
|
116
|
+
"react-share": "^5.1.0",
|
|
112
117
|
"react-syntax-highlighter": "^15.5.0",
|
|
113
118
|
"react-wrap-balancer": "^1.1.0",
|
|
114
119
|
"typescript": "^5.4.5",
|
|
@@ -129,7 +134,7 @@
|
|
|
129
134
|
"react-router-dom": "^6.16.0"
|
|
130
135
|
},
|
|
131
136
|
"devDependencies": {
|
|
132
|
-
"@arcblock/ux": "^2.9.
|
|
137
|
+
"@arcblock/ux": "^2.9.73",
|
|
133
138
|
"@emotion/cache": "^11.11.0",
|
|
134
139
|
"@emotion/css": "^11.11.2",
|
|
135
140
|
"@emotion/react": "^11.11.4",
|
|
@@ -139,14 +144,14 @@
|
|
|
139
144
|
"@types/lodash": "^4.17.0",
|
|
140
145
|
"@types/mustache": "^4.2.5",
|
|
141
146
|
"@types/node-fetch": "^2.6.11",
|
|
142
|
-
"@types/react": "^18.
|
|
147
|
+
"@types/react": "^18.3.1",
|
|
143
148
|
"@types/react-scroll-to-bottom": "^4.2.5",
|
|
144
149
|
"@types/react-syntax-highlighter": "^15.5.11",
|
|
145
150
|
"axios": "^1.6.8",
|
|
146
151
|
"npm-run-all": "^4.1.5",
|
|
147
|
-
"react": "^18.
|
|
148
|
-
"react-dom": "^18.
|
|
149
|
-
"react-router-dom": "^6.
|
|
152
|
+
"react": "^18.3.1",
|
|
153
|
+
"react-dom": "^18.3.1",
|
|
154
|
+
"react-router-dom": "^6.23.0",
|
|
150
155
|
"rimraf": "^5.0.5"
|
|
151
156
|
}
|
|
152
157
|
}
|
package/tsconfig.json
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
"compilerOptions": {
|
|
4
4
|
"noEmit": false,
|
|
5
5
|
"outDir": "lib",
|
|
6
|
-
"lib": ["DOM"]
|
|
6
|
+
"lib": ["DOM"],
|
|
7
|
+
"paths": {
|
|
8
|
+
// FIXME: Just for local dev, comment next line before publish
|
|
9
|
+
"@blocklet/ai-runtime/*": ["../../../ai-studio/packages/ai-runtime/src/*"]
|
|
10
|
+
}
|
|
7
11
|
}
|
|
8
12
|
}
|