@blocklet/pages-kit 0.2.202 → 0.2.204

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.
@@ -38,8 +38,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
38
38
  const jsx_runtime_1 = require("react/jsx-runtime");
39
39
  const cache_1 = __importDefault(require("@emotion/cache"));
40
40
  const react_1 = require("@emotion/react");
41
+ const react_2 = require("@iconify/react");
41
42
  const material_1 = require("@mui/material");
42
- const react_2 = __importStar(require("react"));
43
+ const react_3 = __importStar(require("react"));
43
44
  const client_1 = __importDefault(require("react-dom/client"));
44
45
  const react_error_boundary_1 = require("react-error-boundary");
45
46
  const react_frame_component_1 = require("react-frame-component");
@@ -50,10 +51,11 @@ const immer_1 = require("zustand/middleware/immer");
50
51
  const win = window;
51
52
  win.joinURL = ufo_1.joinURL;
52
53
  win.withQuery = ufo_1.withQuery;
53
- win.React = react_2.default;
54
+ win.React = react_3.default;
54
55
  win.Box = material_1.Box;
55
56
  win.Stack = material_1.Stack;
56
57
  win.Button = material_1.Button;
58
+ win.IconifyIcon = react_2.Icon;
57
59
  const CUSTOM_COMPONENT_RENDERER = 'custom-component-renderer';
58
60
  const defineCustomElements = (win) => {
59
61
  if (!win.customElements.get(CUSTOM_COMPONENT_RENDERER)) {
@@ -175,7 +177,7 @@ function CustomComponentRenderer({ id, componentId, components, properties, loca
175
177
  customComponentState(component.id, { component }).setState({ component });
176
178
  });
177
179
  customComponentProperties(id, { properties }).setState({ properties });
178
- (0, react_2.useEffect)(() => {
180
+ (0, react_3.useEffect)(() => {
179
181
  defineCustomElements(frame.window || window);
180
182
  }, [frame]);
181
183
  return ((0, jsx_runtime_1.jsx)(react_error_boundary_1.ErrorBoundary, { fallbackRender: E, children: (0, jsx_runtime_1.jsx)("custom-component-renderer", { "component-id": componentId, id: id, locale: locale, "default-locale": defaultLocale }) }));
@@ -10,6 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  import { jsx as _jsx } from "react/jsx-runtime";
11
11
  import createCache from '@emotion/cache';
12
12
  import { CacheProvider } from '@emotion/react';
13
+ import { Icon as IconifyIcon } from '@iconify/react';
13
14
  import { Alert, Box, Button, CssBaseline, Stack } from '@mui/material';
14
15
  import React, { useEffect } from 'react';
15
16
  import ReactDOM from 'react-dom/client';
@@ -26,6 +27,7 @@ win.React = React;
26
27
  win.Box = Box;
27
28
  win.Stack = Stack;
28
29
  win.Button = Button;
30
+ win.IconifyIcon = IconifyIcon;
29
31
  const CUSTOM_COMPONENT_RENDERER = 'custom-component-renderer';
30
32
  const defineCustomElements = (win) => {
31
33
  if (!win.customElements.get(CUSTOM_COMPONENT_RENDERER)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/pages-kit",
3
- "version": "0.2.202",
3
+ "version": "0.2.204",
4
4
  "description": "Pages Kit components and utils",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -77,6 +77,7 @@
77
77
  },
78
78
  "dependencies": {
79
79
  "@blocklet/sdk": "^1.16.22",
80
+ "@iconify/react": "^4.1.1",
80
81
  "axios": "^1.6.5",
81
82
  "lodash": "^4.17.21",
82
83
  "nanoid": "^3.3.7",