@blocklet/pages-kit 0.2.314 → 0.2.316
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/runtime/Runtime/index.js +8 -4
- package/lib/cjs/components/CustomComponentRenderer/state.js +1 -1
- package/lib/cjs/tsconfig.tsbuildinfo +1 -1
- package/lib/esm/builtin/async/ai-runtime/runtime/Runtime/index.js +8 -4
- package/lib/esm/components/CustomComponentRenderer/state.js +1 -1
- package/lib/esm/tsconfig.tsbuildinfo +1 -1
- package/lib/types/builtin/async/ai-runtime/runtime/Runtime/index.d.ts +4 -1
- package/lib/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -38,7 +38,7 @@ const utils_1 = require("../../../../utils");
|
|
|
38
38
|
const RuntimeCommonProvider_1 = __importStar(require("../../components/RuntimeCommonProvider"));
|
|
39
39
|
const SocialShare_1 = __importDefault(require("../../components/SocialShare"));
|
|
40
40
|
const constants_1 = require("../../constants");
|
|
41
|
-
const Runtime_1 = require("../../contexts/Runtime");
|
|
41
|
+
const Runtime_1 = __importStar(require("../../contexts/Runtime"));
|
|
42
42
|
const use_appearances_1 = __importDefault(require("../../hooks/use-appearances"));
|
|
43
43
|
const runtime_1 = require("../../state/runtime");
|
|
44
44
|
const logoSize = 44;
|
|
@@ -46,8 +46,12 @@ function AgentCreatedBy({ did }) {
|
|
|
46
46
|
const { t } = (0, locale_1.useLocaleContext)();
|
|
47
47
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [t('by'), " ", (0, jsx_runtime_1.jsx)(material_1.Box, { component: ux_1.DID, did: did, copyable: false, responsive: true })] }));
|
|
48
48
|
}
|
|
49
|
-
function Runtime() {
|
|
50
|
-
|
|
49
|
+
function Runtime({ aid, working }) {
|
|
50
|
+
const children = ((0, jsx_runtime_1.jsx)(RuntimeCommonProvider_1.default, { children: (0, jsx_runtime_1.jsx)(RuntimeView, {}) }));
|
|
51
|
+
if (aid) {
|
|
52
|
+
return ((0, jsx_runtime_1.jsx)(Runtime_1.default, { aid: aid, working: working, children: children }));
|
|
53
|
+
}
|
|
54
|
+
return (0, jsx_runtime_1.jsx)(Runtime_1.RuntimeProviderFromUrl, { children: children });
|
|
51
55
|
}
|
|
52
56
|
exports.default = Runtime;
|
|
53
57
|
function RuntimeView() {
|
|
@@ -84,5 +88,5 @@ ${agent === null || agent === void 0 ? void 0 : agent.description}
|
|
|
84
88
|
};
|
|
85
89
|
}, [locale, isMobile, agent]);
|
|
86
90
|
const componentId = (_a = appearancePage === null || appearancePage === void 0 ? void 0 : appearancePage.componentId) !== null && _a !== void 0 ? _a : constants_1.DEFAULT_PAGE_COMPONENT_ID;
|
|
87
|
-
return ((0, jsx_runtime_1.jsxs)(
|
|
91
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(react_helmet_1.Helmet, { children: [agent.project.name && (0, jsx_runtime_1.jsx)("title", { children: agent.project.name }), agent.project.description && (0, jsx_runtime_1.jsx)("meta", { name: "description", content: agent.project.description })] }), (0, jsx_runtime_1.jsx)(CustomComponentRenderer_1.default, { componentId: componentId, properties: appearancePage === null || appearancePage === void 0 ? void 0 : appearancePage.componentProps })] }));
|
|
88
92
|
}
|
|
@@ -163,7 +163,7 @@ function usePreloadComponent({ instanceId, componentId, properties, locale, dev
|
|
|
163
163
|
previousRef.current = result;
|
|
164
164
|
return result;
|
|
165
165
|
}
|
|
166
|
-
if (
|
|
166
|
+
if (instanceId) {
|
|
167
167
|
const key = [instanceId, realLocale].join('-');
|
|
168
168
|
(_a = COMPONENT_LOADER_MAP[key]) !== null && _a !== void 0 ? _a : (COMPONENT_LOADER_MAP[key] = (0, exports.customComponentStates)()
|
|
169
169
|
.getState()
|