@blocklet/pages-kit 0.6.44 → 0.6.46
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/tsconfig.tsbuildinfo +1 -1
- package/lib/cjs/utils/builtin.js +0 -1
- package/lib/cjs/utils/inject-global-components-dump-json.js +0 -45
- package/lib/cjs/utils/inject-global-components.js +1 -2
- package/lib/cjs/utils/typescript/builtin-module-transformer.js +3 -1
- package/lib/esm/tsconfig.tsbuildinfo +1 -1
- package/lib/esm/utils/builtin.js +0 -1
- package/lib/esm/utils/inject-global-components-dump-json.js +0 -45
- package/lib/esm/utils/inject-global-components.js +1 -2
- package/lib/esm/utils/typescript/builtin-module-transformer.js +3 -1
- package/lib/types/tsconfig.tsbuildinfo +1 -1
- package/lib/types/utils/builtin.d.ts +0 -1
- package/package.json +8 -14
- package/lib/cjs/builtin/async/ai-runtime.js +0 -17
- package/lib/esm/builtin/async/ai-runtime.js +0 -1
- package/lib/types/builtin/async/ai-runtime.d.ts +0 -1
package/lib/esm/utils/builtin.js
CHANGED
|
@@ -34,7 +34,6 @@ export const BuiltinModules = {
|
|
|
34
34
|
'@blocklet/pages-kit/builtin/async/react-markdown': {},
|
|
35
35
|
'@blocklet/pages-kit/builtin/async/react-syntax-highlighter': {},
|
|
36
36
|
'@blocklet/pages-kit/builtin/async/image-preview': {},
|
|
37
|
-
'@blocklet/pages-kit/builtin/async/ai-runtime': {},
|
|
38
37
|
'@blocklet/pages-kit/builtin/uploader': {},
|
|
39
38
|
'@blocklet/pages-kit/builtin/color-picker': {},
|
|
40
39
|
'@blocklet/pages-kit/builtin/markdown/index': {},
|
|
@@ -1026,51 +1026,6 @@ export default () =>
|
|
|
1026
1026
|
examples: [],
|
|
1027
1027
|
},
|
|
1028
1028
|
},
|
|
1029
|
-
// '@blocklet/pages-kit/builtin/async/ai-runtime'
|
|
1030
|
-
{
|
|
1031
|
-
name: '@blocklet/pages-kit/builtin/async/ai-runtime',
|
|
1032
|
-
description: 'A ai-runtime component for pages-kit builtin package',
|
|
1033
|
-
docs: {
|
|
1034
|
-
components: [
|
|
1035
|
-
'CurrentAgent',
|
|
1036
|
-
'CurrentAgentProvider',
|
|
1037
|
-
'CurrentMessage',
|
|
1038
|
-
'CurrentMessageProvider',
|
|
1039
|
-
'Runtime',
|
|
1040
|
-
'ChatBotButton',
|
|
1041
|
-
'SimplePage',
|
|
1042
|
-
'SimpleChat',
|
|
1043
|
-
'PhotoGallery',
|
|
1044
|
-
'AutoForm',
|
|
1045
|
-
'SimpleOutput',
|
|
1046
|
-
'ChatOutput',
|
|
1047
|
-
'PhotoGalleryItem',
|
|
1048
|
-
],
|
|
1049
|
-
import: "import * as AiRuntime from '@blocklet/pages-kit/builtin/async/ai-runtime'",
|
|
1050
|
-
export: `
|
|
1051
|
-
export * from './contexts/CurrentAgent';
|
|
1052
|
-
export { default as CurrentAgentProvider } from './contexts/CurrentAgent';
|
|
1053
|
-
|
|
1054
|
-
export * from './contexts/CurrentMessage';
|
|
1055
|
-
export { default as CurrentMessageProvider } from './contexts/CurrentMessage';
|
|
1056
|
-
|
|
1057
|
-
export * from './state/runtime';
|
|
1058
|
-
export * from './state/session';
|
|
1059
|
-
|
|
1060
|
-
export { default as Runtime } from './runtime/Runtime';
|
|
1061
|
-
export { default as ChatBotButton } from './runtime/ChatBotButton';
|
|
1062
|
-
|
|
1063
|
-
export { default as SimplePage } from './runtime-components/SimplePage';
|
|
1064
|
-
export { default as SimpleChat } from './runtime-components/SimpleChat';
|
|
1065
|
-
export { default as PhotoGallery } from './runtime-components/PhotoGallery';
|
|
1066
|
-
export { default as AutoForm } from './runtime-components/AutoForm';
|
|
1067
|
-
export { default as SimpleOutput } from './runtime-components/SimpleOutput';
|
|
1068
|
-
export { default as ChatOutput } from './runtime-components/ChatOutput';
|
|
1069
|
-
export { default as PhotoGalleryItem } from './runtime-components/PhotoGalleryItem';
|
|
1070
|
-
`,
|
|
1071
|
-
examples: [],
|
|
1072
|
-
},
|
|
1073
|
-
},
|
|
1074
1029
|
// '@blocklet/pages-kit/builtin/pages-kit'
|
|
1075
1030
|
{
|
|
1076
1031
|
name: '@blocklet/pages-kit/builtin/pages-kit',
|
|
@@ -82,7 +82,6 @@ export function injectGlobalComponents() {
|
|
|
82
82
|
'@blocklet/pages-kit/builtin/async/react-markdown': reactMarkdown,
|
|
83
83
|
'@blocklet/pages-kit/builtin/async/react-syntax-highlighter': reactSyntaxHighlighter,
|
|
84
84
|
'@blocklet/pages-kit/builtin/async/image-preview': imagePreview,
|
|
85
|
-
'@blocklet/pages-kit/builtin/async/ai-runtime': import('../builtin/async/ai-runtime'),
|
|
86
85
|
'@blocklet/pages-kit/builtin/event-bus': eventBus,
|
|
87
86
|
'@blocklet/pages-kit/builtin/zod': zod,
|
|
88
87
|
};
|
|
@@ -209,7 +208,7 @@ export function injectGlobalComponents() {
|
|
|
209
208
|
: [];
|
|
210
209
|
// create module code
|
|
211
210
|
const moduleCode = `// GENERATED FILE. DO NOT EDIT.
|
|
212
|
-
const moduleSource = window['${BuiltinModulesGlobalVariableName}'].modules['${modulePath}'];
|
|
211
|
+
const moduleSource = window['${BuiltinModulesGlobalVariableName}'].modules['${modulePath}'];
|
|
213
212
|
${namedExports.map((name) => `export const ${name} = moduleSource['${name}'];`).join('\n')}
|
|
214
213
|
${defaultExports.map((name) => `export const ${name} = moduleSource.default['${name}'];`).join('\n')}
|
|
215
214
|
export default ${hasDefaultExport ? 'moduleSource.default' : 'moduleSource'};
|
|
@@ -9,7 +9,9 @@ export const isAsyncModule = (moduleSpecifier) => {
|
|
|
9
9
|
if (!moduleSpecifier) {
|
|
10
10
|
return false;
|
|
11
11
|
}
|
|
12
|
-
return ['@blocklet/pages-kit/builtin/async/ai-runtime'].includes(moduleSpecifier);
|
|
12
|
+
// return ['@blocklet/pages-kit/builtin/async/ai-runtime'].includes(moduleSpecifier);
|
|
13
|
+
// FIXME 看起来原来的条件像是有问题,目前已经没有 ai-runtime 了,暂时先注释掉,直接返回 false
|
|
14
|
+
return false;
|
|
13
15
|
};
|
|
14
16
|
// check if the module is a target module
|
|
15
17
|
export const isBuiltinModule = (moduleSpecifier) => {
|