@blocklet/pages-kit 0.2.353 → 0.2.355
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/api/call.js +1 -2
- package/lib/cjs/api/pages-kit.js +1 -2
- package/lib/cjs/builtin/async/ai-runtime/api/agent.js +1 -2
- package/lib/cjs/builtin/async/ai-runtime/api/dataset.js +11 -12
- package/lib/cjs/builtin/async/ai-runtime/api/message.js +2 -3
- package/lib/cjs/builtin/async/ai-runtime/api/request.js +2 -2
- package/lib/cjs/builtin/async/ai-runtime/api/secret.js +1 -2
- package/lib/cjs/builtin/async/ai-runtime/api/session.js +7 -8
- package/lib/cjs/builtin/async/ai-runtime/components/ActionButton.js +1 -1
- package/lib/cjs/builtin/async/ai-runtime/components/AgentErrorBoundary.js +6 -4
- package/lib/cjs/builtin/async/ai-runtime/components/AgentInputField/index.js +1 -1
- package/lib/cjs/builtin/async/ai-runtime/components/AgentSettings/AgentSettingsDialog.js +1 -1
- package/lib/cjs/builtin/async/ai-runtime/components/GlobalLoading/index.js +1 -1
- package/lib/cjs/builtin/async/ai-runtime/components/Header/SimpleHeader.js +1 -1
- package/lib/cjs/builtin/async/ai-runtime/components/Layout/SimpleLayout.js +1 -1
- package/lib/cjs/builtin/async/ai-runtime/components/MenuButton.js +1 -1
- package/lib/cjs/builtin/async/ai-runtime/components/OutputFieldContainer/index.js +1 -1
- package/lib/cjs/builtin/async/ai-runtime/components/PopperMenuButton/LoadingMenuItem.js +3 -3
- package/lib/cjs/builtin/async/ai-runtime/components/PopperMenuButton/index.js +3 -3
- package/lib/cjs/builtin/async/ai-runtime/components/RuntimeCommonProvider.js +2 -3
- package/lib/cjs/builtin/async/ai-runtime/components/ScrollView.js +1 -1
- package/lib/cjs/builtin/async/ai-runtime/components/ShareActions/index.js +1 -1
- package/lib/cjs/builtin/async/ai-runtime/components/SocialShare.js +3 -4
- package/lib/cjs/builtin/async/ai-runtime/components/ThemeProvider.js +1 -1
- package/lib/cjs/builtin/async/ai-runtime/components/UserInfo.js +3 -4
- package/lib/cjs/builtin/async/ai-runtime/constants.js +2 -2
- package/lib/cjs/builtin/async/ai-runtime/contexts/ActiveAgent.js +2 -3
- package/lib/cjs/builtin/async/ai-runtime/contexts/ComponentPreferences.js +2 -3
- package/lib/cjs/builtin/async/ai-runtime/contexts/CurrentAgent.js +2 -3
- package/lib/cjs/builtin/async/ai-runtime/contexts/CurrentMessage.js +2 -3
- package/lib/cjs/builtin/async/ai-runtime/contexts/Runtime.js +3 -4
- package/lib/cjs/builtin/async/ai-runtime/hooks/use-agent-admin.js +1 -2
- package/lib/cjs/builtin/async/ai-runtime/hooks/use-appearances.js +4 -5
- package/lib/cjs/builtin/async/ai-runtime/hooks/use-header-menu.js +1 -2
- package/lib/cjs/builtin/async/ai-runtime/runtime/ChatBotButton/index.js +1 -1
- package/lib/cjs/builtin/async/ai-runtime/runtime/Runtime/index.js +1 -1
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/AutoForm/index.js +1 -1
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/ChatOutput/MessageErrorView.js +1 -1
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/ChatOutput/MessageItemView.js +1 -2
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/ChatOutput/MessageMetadataRenderer.js +1 -1
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/ChatOutput/MessageSuggestedQuestions.js +2 -3
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/ChatOutput/ReferenceLinks.js +1 -1
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/ChatOutput/index.js +1 -1
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/GoogleSearch/GoogleSearchRelatedQuestionsView.js +1 -1
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/GoogleSearch/GoogleSearchSourcesView.js +1 -1
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/ImagesView/index.js +1 -1
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/MarkdownView/index.js +1 -1
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/OpeningQuestionsView/index.js +1 -1
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/PhotoGallery/index.js +1 -1
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/PhotoGalleryItem/index.js +1 -1
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/ReferencedLinksView/index.js +1 -1
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/ShareView/index.js +1 -1
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/SimpleChat/BackgroundImage.js +1 -1
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/SimpleChat/InputsView.js +1 -1
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/SimpleChat/MessageView.js +1 -2
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/SimpleChat/MessagesView.js +1 -1
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/SimpleChat/UserMessageView.js +1 -1
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/SimpleChat/index.js +1 -1
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/SimpleOutput/index.js +1 -1
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/SimplePage/index.js +1 -1
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/SuggestedQuestionsView/index.js +1 -1
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/V0/Input.js +1 -1
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/V0/Output.js +3 -3
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/V0/Page.js +1 -1
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/V0/components/CodePreview.js +4 -4
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/V0/components/Loading.js +2 -3
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/V0/components/UserQuestion.js +1 -1
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/V0/contexts/V0Runtime.js +2 -3
- package/lib/cjs/builtin/async/ai-runtime/state/agent.js +1 -2
- package/lib/cjs/builtin/async/ai-runtime/state/runtime.js +1 -2
- package/lib/cjs/builtin/async/ai-runtime/state/session.js +21 -21
- package/lib/cjs/builtin/async/ai-runtime/utils/agent-inputs.js +2 -2
- package/lib/cjs/builtin/async/ai-runtime/utils/download-image.js +2 -3
- package/lib/cjs/builtin/async/ai-runtime/utils/map-right.js +1 -1
- package/lib/cjs/builtin/async/ai-runtime/utils/runtime-output-schema.js +1 -2
- package/lib/cjs/builtin/async/ai-runtime/utils/zustand.js +1 -2
- package/lib/cjs/builtin/call.js +1 -2
- package/lib/cjs/builtin/iconify/react.js +1 -2
- package/lib/cjs/builtin/page/header.js +2 -2
- package/lib/cjs/builtin/session.js +1 -2
- package/lib/cjs/builtin/utils.js +2 -2
- package/lib/cjs/components/CustomComponentRenderer/BlockletReactComponentRenderer.js +1 -1
- package/lib/cjs/components/CustomComponentRenderer/DevProvider.js +2 -3
- package/lib/cjs/components/CustomComponentRenderer/index.js +1 -1
- package/lib/cjs/components/CustomComponentRenderer/state.js +3 -3
- package/lib/cjs/tsconfig.tsbuildinfo +1 -1
- package/lib/cjs/utils/preload.js +1 -2
- package/lib/cjs/utils/property.js +5 -5
- package/lib/esm/builtin/async/ai-runtime/components/AgentErrorBoundary.js +4 -1
- package/lib/esm/builtin/async/ai-runtime/components/PopperMenuButton/LoadingMenuItem.js +2 -2
- package/lib/esm/builtin/async/ai-runtime/components/PopperMenuButton/index.js +2 -2
- package/lib/esm/builtin/async/ai-runtime/runtime-components/V0/Output.js +2 -2
- package/lib/esm/builtin/async/ai-runtime/state/session.js +17 -17
- package/lib/esm/tsconfig.tsbuildinfo +1 -1
- package/lib/types/builtin/async/ai-runtime/api/request.d.ts +1 -1
- package/lib/types/builtin/async/ai-runtime/components/AgentInputField/LanguageField.d.ts +2 -3
- package/lib/types/builtin/async/ai-runtime/components/AgentInputField/NumberField.d.ts +2 -3
- package/lib/types/builtin/async/ai-runtime/components/AgentInputField/RadioField.d.ts +2 -3
- package/lib/types/builtin/async/ai-runtime/components/AgentInputField/SelectField.d.ts +2 -3
- package/lib/types/builtin/async/ai-runtime/components/AgentInputField/StringField.d.ts +2 -3
- package/lib/types/builtin/async/ai-runtime/components/LoadingButton.d.ts +0 -1
- package/lib/types/builtin/async/ai-runtime/hooks/use-appearances.d.ts +7 -7
- package/lib/types/builtin/async/ai-runtime/runtime-components/SimpleChat/MessageView.d.ts +0 -1
- package/lib/types/builtin/async/ai-runtime/runtime-components/SimpleChat/OpeningMessageView.d.ts +0 -1
- package/lib/types/builtin/async/ai-runtime/runtime-components/V0/components/CodePreview.d.ts +0 -1
- package/lib/types/builtin/async/ai-runtime/runtime-components/V0/components/ConfirmDialog.d.ts +0 -1
- package/lib/types/builtin/async/ai-runtime/runtime-components/V0/components/PropertiesSetting.d.ts +0 -1
- package/lib/types/builtin/async/ai-runtime/state/runtime.d.ts +4 -4
- package/lib/types/builtin/async/react-scroll-to-bottom.d.ts +22 -23
- package/lib/types/builtin/async/react-syntax-highlighter.d.ts +0 -1
- package/lib/types/builtin/call.d.ts +0 -1
- package/lib/types/tsconfig.tsbuildinfo +1 -1
- package/lib/types/utils/typescript/builtin-module-transformer.d.ts +1 -1
- package/lib/types/utils/typescript/imports-removal-transformer.d.ts +1 -1
- package/package.json +6 -6
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const getAIRuntimeApiPrefix: () => any;
|
|
2
|
-
export declare const fetch: (input: string |
|
|
2
|
+
export declare const fetch: (input: string | Request | URL, options?: RequestInit) => Promise<Response>;
|
|
3
3
|
export declare function request<T>({ url, query, body, ...init }: {
|
|
4
4
|
url: string;
|
|
5
5
|
query?: {
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { SelectParameter } from '@blocklet/ai-runtime/types';
|
|
3
2
|
import { TextFieldProps } from '@mui/material';
|
|
4
3
|
declare const LanguageField: import("react").ForwardRefExoticComponent<Omit<{
|
|
5
|
-
readOnly?: boolean
|
|
6
|
-
parameter?: SelectParameter
|
|
4
|
+
readOnly?: boolean;
|
|
5
|
+
parameter?: SelectParameter;
|
|
7
6
|
onChange: (value: string | undefined) => void;
|
|
8
7
|
} & Omit<TextFieldProps, "onChange">, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
9
8
|
export default LanguageField;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { NumberParameter } from '@blocklet/ai-runtime/types';
|
|
3
2
|
import { TextFieldProps } from '@mui/material';
|
|
4
3
|
declare const NumberField: import("react").ForwardRefExoticComponent<Omit<{
|
|
5
|
-
readOnly?: boolean
|
|
6
|
-
parameter?: NumberParameter
|
|
4
|
+
readOnly?: boolean;
|
|
5
|
+
parameter?: NumberParameter;
|
|
7
6
|
onChange: (value: number) => void;
|
|
8
7
|
} & Omit<TextFieldProps, "onChange">, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
9
8
|
export default NumberField;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { SelectParameter } from '@blocklet/ai-runtime/types';
|
|
3
2
|
import { RadioGroupProps } from '@mui/material';
|
|
4
3
|
declare const RadioField: import("react").ForwardRefExoticComponent<Omit<{
|
|
5
|
-
readOnly?: boolean
|
|
6
|
-
parameter?: SelectParameter
|
|
4
|
+
readOnly?: boolean;
|
|
5
|
+
parameter?: SelectParameter;
|
|
7
6
|
onChange: (value: string) => void;
|
|
8
7
|
} & Omit<RadioGroupProps, "onChange">, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
9
8
|
export default RadioField;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { SelectParameter } from '@blocklet/ai-runtime/types';
|
|
3
2
|
import { TextFieldProps } from '@mui/material';
|
|
4
3
|
declare const SelectField: import("react").ForwardRefExoticComponent<Omit<{
|
|
5
|
-
readOnly?: boolean
|
|
6
|
-
parameter?: SelectParameter
|
|
4
|
+
readOnly?: boolean;
|
|
5
|
+
parameter?: SelectParameter;
|
|
7
6
|
onChange: (value: string) => void;
|
|
8
7
|
} & Omit<TextFieldProps, "onChange">, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
9
8
|
export default SelectField;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { StringParameter } from '@blocklet/ai-runtime/types';
|
|
3
2
|
import { TextFieldProps } from '@mui/material';
|
|
4
3
|
declare const StringField: import("react").ForwardRefExoticComponent<Omit<{
|
|
5
|
-
readOnly?: boolean
|
|
6
|
-
parameter?: StringParameter
|
|
4
|
+
readOnly?: boolean;
|
|
5
|
+
parameter?: StringParameter;
|
|
7
6
|
onChange: (value: string) => void;
|
|
8
7
|
} & Omit<TextFieldProps, "onChange">, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
9
8
|
export default StringField;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { LoadingButtonProps } from '@mui/lab';
|
|
3
2
|
declare const LoadingButton: import("react").ForwardRefExoticComponent<Omit<Partial<LoadingButtonProps>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
4
3
|
export default LoadingButton;
|
|
@@ -5,16 +5,16 @@ export default function useAppearances(args?: {
|
|
|
5
5
|
}): {
|
|
6
6
|
appearancePage: {
|
|
7
7
|
componentId: string;
|
|
8
|
-
componentBlockletDid?: string
|
|
9
|
-
componentName?: string
|
|
8
|
+
componentBlockletDid?: string;
|
|
9
|
+
componentName?: string;
|
|
10
10
|
componentProperties?: {
|
|
11
11
|
[key: string]: any;
|
|
12
|
-
}
|
|
12
|
+
};
|
|
13
13
|
componentProps?: {
|
|
14
14
|
[key: string]: any;
|
|
15
|
-
}
|
|
16
|
-
title?: string
|
|
17
|
-
icon?: string
|
|
15
|
+
};
|
|
16
|
+
title?: string;
|
|
17
|
+
icon?: string;
|
|
18
18
|
};
|
|
19
19
|
appearanceInput: import("@blocklet/ai-runtime/types").RuntimeOutputAppearance;
|
|
20
20
|
appearanceOutput: import("@blocklet/ai-runtime/types").RuntimeOutputAppearance;
|
|
@@ -46,7 +46,7 @@ export declare function useOpeningQuestions(args?: {
|
|
|
46
46
|
}): {
|
|
47
47
|
questions: {
|
|
48
48
|
id: string;
|
|
49
|
-
title?: string
|
|
49
|
+
title?: string;
|
|
50
50
|
parameters?: any;
|
|
51
51
|
}[];
|
|
52
52
|
} | undefined;
|
|
@@ -4,11 +4,11 @@ export declare function useRuntimeState(): {
|
|
|
4
4
|
working: boolean | undefined;
|
|
5
5
|
agent: import("../api/agent").Agent;
|
|
6
6
|
execute: (options: {
|
|
7
|
-
blockletDid?: string
|
|
8
|
-
sessionId?: string
|
|
7
|
+
blockletDid?: string;
|
|
8
|
+
sessionId?: string;
|
|
9
9
|
aid: string;
|
|
10
|
-
working?: boolean
|
|
10
|
+
working?: boolean;
|
|
11
11
|
parameters: any;
|
|
12
|
-
onResponseStart?: (
|
|
12
|
+
onResponseStart?: () => void;
|
|
13
13
|
}) => Promise<void>;
|
|
14
14
|
};
|
|
@@ -1,47 +1,46 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
declare const _default: () => Promise<{
|
|
3
2
|
Composer: typeof import("react-scroll-to-bottom").default;
|
|
4
3
|
useInternalContext: any;
|
|
5
4
|
default(props: import("react").PropsWithChildren<{
|
|
6
|
-
checkInterval?: number
|
|
7
|
-
className?: string
|
|
8
|
-
debounce?: number
|
|
9
|
-
debug?: boolean
|
|
10
|
-
followButtonClassName?: string
|
|
11
|
-
initialScrollBehavior?: "auto" | "smooth"
|
|
12
|
-
mode?: "
|
|
13
|
-
nonce?: string
|
|
14
|
-
scroller?: (
|
|
5
|
+
checkInterval?: number;
|
|
6
|
+
className?: string;
|
|
7
|
+
debounce?: number;
|
|
8
|
+
debug?: boolean;
|
|
9
|
+
followButtonClassName?: string;
|
|
10
|
+
initialScrollBehavior?: "auto" | "smooth";
|
|
11
|
+
mode?: "bottom" | "top";
|
|
12
|
+
nonce?: string;
|
|
13
|
+
scroller?: (values: {
|
|
15
14
|
maxValue: number;
|
|
16
15
|
minValue: number;
|
|
17
16
|
offsetHeight: number;
|
|
18
17
|
scrollHeight: number;
|
|
19
18
|
scrollTop: number;
|
|
20
|
-
}) => number
|
|
21
|
-
scrollViewClassName?: string
|
|
19
|
+
}) => number;
|
|
20
|
+
scrollViewClassName?: string;
|
|
22
21
|
}>): null;
|
|
23
22
|
useScrollTo(): (scrollTop: number | "100%") => void;
|
|
24
|
-
useScrollToBottom(): (option?: import("react-scroll-to-bottom").ScrollOption
|
|
25
|
-
useScrollToEnd(): (option?: import("react-scroll-to-bottom").ScrollOption
|
|
26
|
-
useScrollToStart(): (option?: import("react-scroll-to-bottom").ScrollOption
|
|
27
|
-
useScrollToTop(): (option?: import("react-scroll-to-bottom").ScrollOption
|
|
28
|
-
useObserveScrollPosition(observer:
|
|
23
|
+
useScrollToBottom(): (option?: import("react-scroll-to-bottom").ScrollOption) => void;
|
|
24
|
+
useScrollToEnd(): (option?: import("react-scroll-to-bottom").ScrollOption) => void;
|
|
25
|
+
useScrollToStart(): (option?: import("react-scroll-to-bottom").ScrollOption) => void;
|
|
26
|
+
useScrollToTop(): (option?: import("react-scroll-to-bottom").ScrollOption) => void;
|
|
27
|
+
useObserveScrollPosition(observer: (({ scrollTop }: {
|
|
29
28
|
scrollTop: number;
|
|
30
|
-
}) => void)): void;
|
|
29
|
+
}) => void) | false): void;
|
|
31
30
|
useAnimating(): [boolean];
|
|
32
31
|
useAnimatingToEnd(): [boolean];
|
|
33
32
|
useAtBottom(): [boolean];
|
|
34
33
|
useAtEnd(): [boolean];
|
|
35
34
|
useAtStart(): [boolean];
|
|
36
35
|
useAtTop(): [boolean];
|
|
37
|
-
useMode(): ["
|
|
36
|
+
useMode(): ["bottom" | "top"];
|
|
38
37
|
useSticky(): [boolean];
|
|
39
38
|
FunctionContext: import("react").Context<{
|
|
40
39
|
scrollTo: (scrollTop: number | "100%") => void;
|
|
41
|
-
scrollToBottom: (option?: import("react-scroll-to-bottom").ScrollOption
|
|
42
|
-
scrollToEnd: (option?: import("react-scroll-to-bottom").ScrollOption
|
|
43
|
-
scrollToStart: (option?: import("react-scroll-to-bottom").ScrollOption
|
|
44
|
-
scrollToTop: (option?: import("react-scroll-to-bottom").ScrollOption
|
|
40
|
+
scrollToBottom: (option?: import("react-scroll-to-bottom").ScrollOption) => void;
|
|
41
|
+
scrollToEnd: (option?: import("react-scroll-to-bottom").ScrollOption) => void;
|
|
42
|
+
scrollToStart: (option?: import("react-scroll-to-bottom").ScrollOption) => void;
|
|
43
|
+
scrollToTop: (option?: import("react-scroll-to-bottom").ScrollOption) => void;
|
|
45
44
|
}>;
|
|
46
45
|
StateContext: import("react").Context<{
|
|
47
46
|
animating: boolean;
|