@blocklet/pages-kit 0.5.55 → 0.6.0
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/color-picker.js +4 -3
- package/lib/cjs/builtin/components/LanguageField/index.js +2 -3
- package/lib/cjs/builtin/markdown/action-button.js +5 -3
- package/lib/cjs/builtin/markdown/loading-button.js +2 -2
- package/lib/cjs/builtin/markdown/markdown-renderer.js +9 -1
- package/lib/cjs/builtin/react-dom.js +30 -2
- package/lib/cjs/builtin/react.js +50 -59
- package/lib/cjs/components/CustomComponentRenderer/state.js +1 -1
- package/lib/cjs/tsconfig.tsbuildinfo +1 -1
- package/lib/cjs/utils/inject-global-components.js +4 -3
- package/lib/esm/builtin/color-picker.js +4 -4
- package/lib/esm/builtin/components/LanguageField/index.js +2 -3
- package/lib/esm/builtin/markdown/action-button.js +5 -3
- package/lib/esm/builtin/markdown/loading-button.js +3 -3
- package/lib/esm/builtin/markdown/markdown-renderer.js +9 -1
- package/lib/esm/builtin/react-dom.js +15 -1
- package/lib/esm/builtin/react.js +9 -2
- package/lib/esm/components/CustomComponentRenderer/state.js +1 -1
- package/lib/esm/tsconfig.tsbuildinfo +1 -1
- package/lib/esm/utils/inject-global-components.js +4 -3
- package/lib/types/builtin/color-picker.d.ts +3 -1
- package/lib/types/builtin/components/LanguageField/index.d.ts +1 -7
- package/lib/types/builtin/markdown/loading-button.d.ts +1 -1
- package/lib/types/builtin/react-dom.d.ts +5 -1
- package/lib/types/builtin/react.d.ts +3 -2
- package/lib/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +22 -22
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import 'es-module-shims';
|
|
2
|
-
import React from 'react';
|
|
3
2
|
import { joinURL } from 'ufo';
|
|
4
3
|
import * as arcblockUx from '../builtin/arcblock/ux';
|
|
5
4
|
import * as imagePreview from '../builtin/async/image-preview';
|
|
@@ -47,7 +46,6 @@ export function injectGlobalComponents() {
|
|
|
47
46
|
// avoid addImportMap error
|
|
48
47
|
};
|
|
49
48
|
}
|
|
50
|
-
win.React = React;
|
|
51
49
|
win[RelativeModulesGlobalVariableName] = {};
|
|
52
50
|
// create module map
|
|
53
51
|
const modules = {
|
|
@@ -115,7 +113,9 @@ export function injectGlobalComponents() {
|
|
|
115
113
|
'/';
|
|
116
114
|
const fullUrl = joinURL(window.location.origin, relativeChunksMountPoint, 'chunks', fileName);
|
|
117
115
|
if (!win[RelativeModulesGlobalVariableName][fullUrl]) {
|
|
118
|
-
|
|
116
|
+
// @ts-ignore
|
|
117
|
+
if (enableShim && window?.importShim) {
|
|
118
|
+
// @ts-ignore
|
|
119
119
|
win[RelativeModulesGlobalVariableName][fullUrl] = window.importShim(/* @vite-ignore */ fullUrl);
|
|
120
120
|
}
|
|
121
121
|
else {
|
|
@@ -229,6 +229,7 @@ export default ${hasDefaultExport ? 'moduleSource.default' : 'moduleSource'};
|
|
|
229
229
|
// 添加 resolve 配置
|
|
230
230
|
const importMap = { imports };
|
|
231
231
|
win.importMap = importMap;
|
|
232
|
+
// @ts-ignore
|
|
232
233
|
if (enableShim && !!window?.esmsInitOptions?.shimMode) {
|
|
233
234
|
try {
|
|
234
235
|
win.importShim.addImportMap(importMap);
|
|
@@ -40,6 +40,8 @@ interface CornerBorderProps {
|
|
|
40
40
|
}
|
|
41
41
|
export declare function CornerBorder({ border, cornerSize, borderRadius, sx }: CornerBorderProps): import("react/jsx-runtime").JSX.Element;
|
|
42
42
|
export declare function ColorItem({ color, sx, ...props }: ColorItemProps): import("react/jsx-runtime").JSX.Element;
|
|
43
|
-
export declare const ConfigColorDialog:
|
|
43
|
+
export declare const ConfigColorDialog: ({ ref, onSave, enableMuiPalette, }: ConfigColorDialogProps & {
|
|
44
|
+
ref: React.RefObject<ConfigColorDialogRef | null>;
|
|
45
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
44
46
|
export declare function ColorPicker({ value, onChange, style, sx }: ColorPickerProps): import("react/jsx-runtime").JSX.Element;
|
|
45
47
|
export default ColorPicker;
|
|
@@ -1,8 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { TextFieldProps } from '@mui/material';
|
|
3
|
-
declare const LanguageField: import("react").ForwardRefExoticComponent<Omit<{
|
|
4
|
-
readOnly?: boolean;
|
|
5
|
-
parameter?: SelectParameter;
|
|
6
|
-
onChange: (value: string | undefined) => void;
|
|
7
|
-
} & Omit<TextFieldProps, "onChange">, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
1
|
+
declare const LanguageField: ({ ref, readOnly, parameter, onChange, ...props }: any) => import("react/jsx-runtime").JSX.Element;
|
|
8
2
|
export default LanguageField;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { LoadingButtonProps } from '@mui/lab';
|
|
2
|
-
declare const LoadingButton:
|
|
2
|
+
declare const LoadingButton: ({ ref, onClick, ...props }: Partial<LoadingButtonProps>) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default LoadingButton;
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import ReactDOM from 'react-dom';
|
|
2
2
|
export default ReactDOM;
|
|
3
|
+
export { createPortal, flushSync, useFormStatus, requestFormReset, preload, preinit, preconnect, prefetchDNS, } from 'react-dom';
|
|
4
|
+
export { createRoot, hydrateRoot } from 'react-dom/client';
|
|
5
|
+
export { prerender, prerenderToNodeStream } from 'react-dom/static';
|
|
6
|
+
export * as client from 'react-dom/client';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
export default React;
|
|
3
|
-
export { Children, Component, Fragment, Profiler, PureComponent, StrictMode, Suspense, cloneElement, createContext, createElement,
|
|
3
|
+
export { Children, Component, Fragment, Profiler, PureComponent, StrictMode, Suspense, cloneElement, createContext, createElement, createRef, forwardRef, isValidElement, lazy, memo, startTransition, useCallback, useContext, useDebugValue, useDeferredValue, useEffect, useId, useImperativeHandle, useInsertionEffect, useLayoutEffect, useMemo, useReducer, useRef, useState, useSyncExternalStore, useTransition, version, useActionState, useOptimistic, use, } from 'react';
|
|
4
|
+
export { jsx, jsxs, Fragment as JSXFragment } from 'react/jsx-runtime';
|