@blocklet/pages-kit 0.2.396 → 0.2.398
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/components/ShareActions/index.js +3 -2
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/GoogleSearch/GoogleSearchSourcesView.js +2 -2
- package/lib/cjs/tsconfig.tsbuildinfo +1 -1
- package/lib/esm/builtin/async/ai-runtime/components/ShareActions/index.js +3 -2
- package/lib/esm/builtin/async/ai-runtime/runtime-components/GoogleSearch/GoogleSearchSourcesView.js +2 -2
- package/lib/esm/tsconfig.tsbuildinfo +1 -1
- package/lib/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +9 -8
|
@@ -52,6 +52,7 @@ const types_1 = require("@blocklet/ai-runtime/types");
|
|
|
52
52
|
const react_1 = require("@iconify/react");
|
|
53
53
|
const material_1 = require("@mui/material");
|
|
54
54
|
const file_saver_1 = require("file-saver");
|
|
55
|
+
const isomorphic_dompurify_1 = __importDefault(require("isomorphic-dompurify"));
|
|
55
56
|
const react_2 = require("react");
|
|
56
57
|
const ufo_1 = require("ufo");
|
|
57
58
|
const locale_1 = require("../../../../locale");
|
|
@@ -182,9 +183,9 @@ function ShareSave({ inputs, shareAttach, }) {
|
|
|
182
183
|
element.innerHTML += `<p><a href="{${link}}">${link}</a></p>`;
|
|
183
184
|
}
|
|
184
185
|
if (shareAttach.shareAttachInputs) {
|
|
185
|
-
element.innerHTML += `<p><blockquote>${inputs}</blockquote></p>`;
|
|
186
|
+
element.innerHTML += `<p><blockquote>${isomorphic_dompurify_1.default.sanitize(inputs)}</blockquote></p>`;
|
|
186
187
|
}
|
|
187
|
-
element.innerHTML += `<p>${content}</p>`;
|
|
188
|
+
element.innerHTML += `<p>${isomorphic_dompurify_1.default.sanitize(content)}</p>`;
|
|
188
189
|
yield html2pdf()
|
|
189
190
|
.set({
|
|
190
191
|
margin: 1,
|
package/lib/cjs/builtin/async/ai-runtime/runtime-components/GoogleSearch/GoogleSearchSourcesView.js
CHANGED
|
@@ -21,7 +21,7 @@ const searchResultSchema = joi_1.default.object({
|
|
|
21
21
|
})),
|
|
22
22
|
});
|
|
23
23
|
function GoogleSearchSourcesView({ output, outputValue }) {
|
|
24
|
-
var _a;
|
|
24
|
+
var _a, _b;
|
|
25
25
|
const { message } = (_a = (0, CurrentMessage_1.useCurrentMessage)({ optional: true })) !== null && _a !== void 0 ? _a : {};
|
|
26
26
|
const [showAll, setShowAll] = (0, react_1.useState)(false);
|
|
27
27
|
const searchResult = (0, react_1.useMemo)(() => {
|
|
@@ -31,7 +31,7 @@ function GoogleSearchSourcesView({ output, outputValue }) {
|
|
|
31
31
|
return result.value;
|
|
32
32
|
}, [outputValue]);
|
|
33
33
|
const handleToggle = () => setShowAll(!showAll);
|
|
34
|
-
if (!message || (!(searchResult === null || searchResult === void 0 ? void 0 : searchResult.organic_results.length) && !message.loading))
|
|
34
|
+
if (!message || (!((_b = searchResult === null || searchResult === void 0 ? void 0 : searchResult.organic_results) === null || _b === void 0 ? void 0 : _b.length) && !message.loading))
|
|
35
35
|
return null;
|
|
36
36
|
const list = [...((searchResult === null || searchResult === void 0 ? void 0 : searchResult.organic_results) || [])];
|
|
37
37
|
const itemsToShow = showAll
|