@easy-editor/react-renderer 0.0.1
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/CHANGELOG.md +9 -0
- package/LICENSE +9 -0
- package/README.md +4 -0
- package/dist/cjs/index.development.js +2149 -0
- package/dist/cjs/index.development.js.map +1 -0
- package/dist/cjs/index.js +2149 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/index.production.js +2149 -0
- package/dist/cjs/index.production.js.map +1 -0
- package/dist/configure-renderer/SettingSetter.d.ts +7 -0
- package/dist/configure-renderer/context.d.ts +12 -0
- package/dist/configure-renderer/index.d.ts +10 -0
- package/dist/esm/index.development.js +2114 -0
- package/dist/esm/index.development.js.map +1 -0
- package/dist/esm/index.js +2114 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/index.production.js +2114 -0
- package/dist/esm/index.production.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +2113 -0
- package/dist/renderer-core/adapter/index.d.ts +17 -0
- package/dist/renderer-core/base.d.ts +11 -0
- package/dist/renderer-core/component.d.ts +2 -0
- package/dist/renderer-core/components/FaultComponent.d.ts +7 -0
- package/dist/renderer-core/components/NotFoundComponent.d.ts +7 -0
- package/dist/renderer-core/context.d.ts +6 -0
- package/dist/renderer-core/hoc/comp.d.ts +2 -0
- package/dist/renderer-core/hoc/index.d.ts +2 -0
- package/dist/renderer-core/hoc/leaf.d.ts +27 -0
- package/dist/renderer-core/index.d.ts +9 -0
- package/dist/renderer-core/page.d.ts +2 -0
- package/dist/renderer-core/renderer.d.ts +2 -0
- package/dist/renderer-core/types.d.ts +187 -0
- package/dist/renderer-core/utils/classnames.d.ts +1 -0
- package/dist/renderer-core/utils/common.d.ts +54 -0
- package/dist/renderer-core/utils/hoc.d.ts +2 -0
- package/dist/renderer-core/utils/index.d.ts +4 -0
- package/dist/renderer-core/utils/logger.d.ts +5 -0
- package/package.json +82 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ComponentType } from 'react';
|
|
2
|
+
import type { BaseRenderComponent } from '../types';
|
|
3
|
+
export interface RendererModules {
|
|
4
|
+
BaseRenderer?: BaseRenderComponent;
|
|
5
|
+
PageRenderer: BaseRenderComponent;
|
|
6
|
+
ComponentRenderer: BaseRenderComponent;
|
|
7
|
+
}
|
|
8
|
+
declare class Adapter {
|
|
9
|
+
renderers: RendererModules;
|
|
10
|
+
setRenderers(renderers: RendererModules): void;
|
|
11
|
+
setBaseRenderer(BaseRenderer: BaseRenderComponent): void;
|
|
12
|
+
setPageRenderer(PageRenderer: BaseRenderComponent): void;
|
|
13
|
+
setComponentRenderer(ComponentRenderer: BaseRenderComponent): void;
|
|
14
|
+
getRenderers(): Record<string, ComponentType<any>>;
|
|
15
|
+
}
|
|
16
|
+
export declare const adapter: Adapter;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type NodeSchema, type RootSchema } from '@easy-editor/core';
|
|
2
|
+
import type { BaseRenderComponent } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* execute method in schema.lifeCycles with context
|
|
5
|
+
*/
|
|
6
|
+
export declare function executeLifeCycleMethod(context: any, schema: RootSchema, method: string, args: any, thisRequiredInJSE: boolean | undefined): any;
|
|
7
|
+
/**
|
|
8
|
+
* get children from a node schema
|
|
9
|
+
*/
|
|
10
|
+
export declare function getSchemaChildren(schema: NodeSchema | undefined): NodeSchema[] | undefined;
|
|
11
|
+
export declare function baseRendererFactory(): BaseRenderComponent;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { NodeSchema } from '@easy-editor/core';
|
|
2
|
+
import type { FC } from 'react';
|
|
3
|
+
export interface NotFoundComponentProps extends NodeSchema {
|
|
4
|
+
enableStrictNotFoundMode?: boolean;
|
|
5
|
+
}
|
|
6
|
+
declare const NotFoundComponent: FC<NotFoundComponentProps>;
|
|
7
|
+
export default NotFoundComponent;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type ComponentType } from 'react';
|
|
2
|
+
import type { BaseRendererInstance, Schema } from '../types';
|
|
3
|
+
export interface ComponentHocInfo {
|
|
4
|
+
schema: Schema;
|
|
5
|
+
baseRenderer: BaseRendererInstance;
|
|
6
|
+
componentInfo: any;
|
|
7
|
+
scope: any;
|
|
8
|
+
}
|
|
9
|
+
export type ComponentConstruct = (Comp: ComponentType, info: ComponentHocInfo) => ComponentType;
|
|
10
|
+
export interface ComponentHocProps {
|
|
11
|
+
__tag: any;
|
|
12
|
+
componentId: any;
|
|
13
|
+
_leaf: any;
|
|
14
|
+
forwardedRef?: any;
|
|
15
|
+
children?: any | undefined;
|
|
16
|
+
}
|
|
17
|
+
export interface ComponentHocState {
|
|
18
|
+
childrenInState: boolean;
|
|
19
|
+
nodeChildren: any;
|
|
20
|
+
nodeCacheProps: any;
|
|
21
|
+
/** 控制是否显示隐藏 */
|
|
22
|
+
visible: boolean;
|
|
23
|
+
/** 控制是否渲染 */
|
|
24
|
+
condition: boolean;
|
|
25
|
+
nodeProps: any;
|
|
26
|
+
}
|
|
27
|
+
export declare const leafWrapper: ComponentConstruct;
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import type { DesignMode, JSONObject, Node, NodeSchema, RootSchema, Simulator, SimulatorRenderer } from '@easy-editor/core';
|
|
2
|
+
import type { Component } from 'react';
|
|
3
|
+
import type { FaultComponentProps } from './components/FaultComponent';
|
|
4
|
+
import type { NotFoundComponentProps } from './components/NotFoundComponent';
|
|
5
|
+
export type Schema = NodeSchema | RootSchema;
|
|
6
|
+
export interface RendererState {
|
|
7
|
+
engineRenderError?: boolean;
|
|
8
|
+
error?: Error;
|
|
9
|
+
}
|
|
10
|
+
export interface RendererProps {
|
|
11
|
+
/** 符合低代码搭建协议的数据 */
|
|
12
|
+
schema: RootSchema | NodeSchema;
|
|
13
|
+
/** 组件依赖的实例 */
|
|
14
|
+
components: Record<string, React.ComponentType<any>>;
|
|
15
|
+
/** CSS 类名 */
|
|
16
|
+
className?: string;
|
|
17
|
+
/** style */
|
|
18
|
+
style?: React.CSSProperties;
|
|
19
|
+
/** id */
|
|
20
|
+
id?: string | number;
|
|
21
|
+
/** 当前文档的 id */
|
|
22
|
+
documentId?: string;
|
|
23
|
+
/** 主要用于设置渲染模块的全局上下文,里面定义的内容可以在低代码中通过 this 来访问,比如 this.utils */
|
|
24
|
+
appHelper?: RendererAppHelper;
|
|
25
|
+
/**
|
|
26
|
+
* 配置规范参见《低代码搭建组件描述协议》https://lowcode-engine.cn/lowcode
|
|
27
|
+
* 主要在搭建场景中使用,用于提升用户搭建体验。
|
|
28
|
+
*
|
|
29
|
+
* > 在生产环境下不需要设置
|
|
30
|
+
*/
|
|
31
|
+
componentsMap?: Record<string, any>;
|
|
32
|
+
/** 设计模式,可选值:live、design */
|
|
33
|
+
designMode?: DesignMode;
|
|
34
|
+
/** 渲染模块是否挂起,当设置为 true 时,渲染模块最外层容器的 shouldComponentUpdate 将始终返回false,在下钻编辑或者多引擎渲染的场景会用到该参数。 */
|
|
35
|
+
suspended?: boolean;
|
|
36
|
+
/** 组件获取 ref 时触发的钩子 */
|
|
37
|
+
onCompGetRef?: (schema: NodeSchema, ref: any) => void;
|
|
38
|
+
/** 组件 ctx 更新回调 */
|
|
39
|
+
onCompGetCtx?: (schema: NodeSchema, ref: any) => void;
|
|
40
|
+
/** 传入的 schema 是否有变更 */
|
|
41
|
+
getSchemaChangedSymbol?: () => boolean;
|
|
42
|
+
/** 设置 schema 是否有变更 */
|
|
43
|
+
setSchemaChangedSymbol?: (symbol: boolean) => void;
|
|
44
|
+
/** 自定义创建 element 的钩子 */
|
|
45
|
+
customCreateElement?: (Component: any, props: any, children: any) => any;
|
|
46
|
+
/** 渲染类型,标识当前模块是以什么类型进行渲染的 */
|
|
47
|
+
rendererName?: 'LowCodeRenderer' | 'PageRenderer' | string;
|
|
48
|
+
/** 当找不到组件时,显示的组件 */
|
|
49
|
+
notFoundComponent?: React.ComponentType<NotFoundComponentProps>;
|
|
50
|
+
/** 当组件渲染异常时,显示的组件 */
|
|
51
|
+
faultComponent?: React.ComponentType<FaultComponentProps>;
|
|
52
|
+
/** 设备信息 */
|
|
53
|
+
device?: 'default' | 'pc' | 'mobile' | string;
|
|
54
|
+
/**
|
|
55
|
+
* @default true
|
|
56
|
+
* JSExpression 是否只支持使用 this 来访问上下文变量
|
|
57
|
+
*/
|
|
58
|
+
thisRequiredInJSE?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* @default false
|
|
61
|
+
* 当开启组件未找到严格模式时,渲染模块不会默认给一个容器组件
|
|
62
|
+
*/
|
|
63
|
+
enableStrictNotFoundMode?: boolean;
|
|
64
|
+
/** 获取节点的方法 */
|
|
65
|
+
getNode?: (id: string) => Node;
|
|
66
|
+
/** 渲染模块的 host */
|
|
67
|
+
__host?: Simulator;
|
|
68
|
+
/** 渲染模块的 container */
|
|
69
|
+
__container?: SimulatorRenderer;
|
|
70
|
+
}
|
|
71
|
+
export interface RenderComponent {
|
|
72
|
+
displayName: string;
|
|
73
|
+
defaultProps: RendererProps;
|
|
74
|
+
new (props: RendererProps): Component<RendererProps, RendererState> & {
|
|
75
|
+
[x: string]: any;
|
|
76
|
+
__getRef: (ref: any) => void;
|
|
77
|
+
componentDidMount(): Promise<void> | void;
|
|
78
|
+
componentDidUpdate(): Promise<void> | void;
|
|
79
|
+
componentWillUnmount(): Promise<void> | void;
|
|
80
|
+
componentDidCatch(e: any): Promise<void> | void;
|
|
81
|
+
shouldComponentUpdate(nextProps: RendererProps): boolean;
|
|
82
|
+
isValidComponent(SetComponent: any): any;
|
|
83
|
+
createElement(SetComponent: any, props: any, children?: any): any;
|
|
84
|
+
getNotFoundComponent(): any;
|
|
85
|
+
getFaultComponent(): any;
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
export interface RendererAppHelper {
|
|
89
|
+
/** 全局公共函数 */
|
|
90
|
+
utils?: Record<string, any>;
|
|
91
|
+
/** 全局常量 */
|
|
92
|
+
constants?: Record<string, any>;
|
|
93
|
+
/** @experimental 内部使用 */
|
|
94
|
+
requestHandlersMap?: Record<string, any>;
|
|
95
|
+
}
|
|
96
|
+
export interface NodeInfo {
|
|
97
|
+
schema?: NodeSchema;
|
|
98
|
+
Comp: any;
|
|
99
|
+
componentInfo?: any;
|
|
100
|
+
componentChildren?: any;
|
|
101
|
+
}
|
|
102
|
+
export interface JSExpression {
|
|
103
|
+
type: string;
|
|
104
|
+
value: string;
|
|
105
|
+
}
|
|
106
|
+
export interface DataSourceItem {
|
|
107
|
+
id: string;
|
|
108
|
+
isInit?: boolean | JSExpression;
|
|
109
|
+
type?: string;
|
|
110
|
+
options?: {
|
|
111
|
+
uri: string | JSExpression;
|
|
112
|
+
params?: JSONObject | JSExpression;
|
|
113
|
+
method?: string | JSExpression;
|
|
114
|
+
shouldFetch?: string;
|
|
115
|
+
willFetch?: string;
|
|
116
|
+
fit?: string;
|
|
117
|
+
didFetch?: string;
|
|
118
|
+
};
|
|
119
|
+
dataHandler?: JSExpression;
|
|
120
|
+
}
|
|
121
|
+
export interface DataSource {
|
|
122
|
+
list?: DataSourceItem[];
|
|
123
|
+
dataHandler?: JSExpression;
|
|
124
|
+
}
|
|
125
|
+
export interface BaseRendererProps {
|
|
126
|
+
__appHelper?: RendererAppHelper;
|
|
127
|
+
__components: Record<string, React.ComponentType>;
|
|
128
|
+
__ctx?: Record<string, any>;
|
|
129
|
+
__schema: RootSchema;
|
|
130
|
+
__designMode?: DesignMode;
|
|
131
|
+
__host?: Simulator;
|
|
132
|
+
__container?: SimulatorRenderer;
|
|
133
|
+
config?: Record<string, any>;
|
|
134
|
+
designMode?: DesignMode;
|
|
135
|
+
className?: string;
|
|
136
|
+
style?: React.CSSProperties;
|
|
137
|
+
id?: string | number;
|
|
138
|
+
getSchemaChangedSymbol?: () => boolean;
|
|
139
|
+
setSchemaChangedSymbol?: (symbol: boolean) => void;
|
|
140
|
+
thisRequiredInJSE?: boolean;
|
|
141
|
+
documentId?: string;
|
|
142
|
+
getNode?: any;
|
|
143
|
+
/**
|
|
144
|
+
* 设备类型,默认值:'default'
|
|
145
|
+
*/
|
|
146
|
+
device?: 'default' | 'pc' | 'mobile' | string;
|
|
147
|
+
componentName?: string;
|
|
148
|
+
}
|
|
149
|
+
export interface BaseRendererContext {
|
|
150
|
+
appHelper: RendererAppHelper;
|
|
151
|
+
components: Record<string, React.ComponentType>;
|
|
152
|
+
engine: Record<string, any>;
|
|
153
|
+
pageContext?: BaseRenderComponent;
|
|
154
|
+
compContext?: BaseRenderComponent;
|
|
155
|
+
}
|
|
156
|
+
export type BaseRendererInstance = Component<BaseRendererProps, Record<string, any>, any> & {
|
|
157
|
+
reloadDataSource(): Promise<any>;
|
|
158
|
+
__beforeInit(props: BaseRendererProps): void;
|
|
159
|
+
__init(props: BaseRendererProps): void;
|
|
160
|
+
__afterInit(props: BaseRendererProps): void;
|
|
161
|
+
__executeLifeCycleMethod(method: string, args?: any[]): void;
|
|
162
|
+
__getComponentView(): React.ComponentType | undefined;
|
|
163
|
+
__bindCustomMethods(props: BaseRendererProps): void;
|
|
164
|
+
__generateCtx(ctx: Record<string, any>): void;
|
|
165
|
+
__parseData(data: any, ctx?: any): any;
|
|
166
|
+
__initDataSource(props: BaseRendererProps): void;
|
|
167
|
+
__writeCss(props: BaseRendererProps): void;
|
|
168
|
+
__render(): void;
|
|
169
|
+
__getRef(ref: any): void;
|
|
170
|
+
__getSchemaChildrenVirtualDom(schema: NodeSchema | undefined, Comp: any, nodeChildrenMap?: any): any;
|
|
171
|
+
__getComponentProps(schema: NodeSchema | undefined, scope: any, Comp: any, componentInfo?: any): any;
|
|
172
|
+
__createDom(): any;
|
|
173
|
+
__createVirtualDom(schema: any, self: any, parentInfo: NodeInfo, idx: string | number): any;
|
|
174
|
+
__createLoopVirtualDom(schema: any, self: any, parentInfo: NodeInfo, idx: number | string): any;
|
|
175
|
+
__parseProps(props: any, self: any, path: string, info: NodeInfo): any;
|
|
176
|
+
__renderContextProvider(customProps?: object, children?: any): any;
|
|
177
|
+
__renderContextConsumer(children: any): any;
|
|
178
|
+
__renderContent(children: any): any;
|
|
179
|
+
__checkSchema(schema: NodeSchema | undefined, extraComponents?: string | string[]): any;
|
|
180
|
+
__renderComp(Comp: any, ctxProps: object): any;
|
|
181
|
+
$(id: string, instance?: any): any;
|
|
182
|
+
context: BaseRendererContext;
|
|
183
|
+
__designModeIsDesign?: boolean;
|
|
184
|
+
};
|
|
185
|
+
export interface BaseRenderComponent {
|
|
186
|
+
new (props: BaseRendererProps): BaseRendererInstance;
|
|
187
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const classnames: (...args: any[]) => string;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { type NodeSchema } from '@easy-editor/core';
|
|
2
|
+
import { type ComponentClass, type ComponentType } from 'react';
|
|
3
|
+
export declare function inSameDomain(): boolean;
|
|
4
|
+
/**
|
|
5
|
+
* get css styled name from schema`s fileName
|
|
6
|
+
* FileName -> lce-file-name
|
|
7
|
+
* @returns string
|
|
8
|
+
*/
|
|
9
|
+
export declare function getFileCssName(fileName: string): string | undefined;
|
|
10
|
+
export declare const isSchema: (schema: any) => schema is NodeSchema;
|
|
11
|
+
export declare const getValue: (obj: any, path: string, defaultValue?: {}) => any;
|
|
12
|
+
export declare function transformArrayToMap(arr: any[], key: string, overwrite?: boolean): any;
|
|
13
|
+
interface IParseOptions {
|
|
14
|
+
thisRequiredInJSE?: boolean;
|
|
15
|
+
logScope?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare const parseData: (schema: unknown, self: any, options?: IParseOptions) => any;
|
|
18
|
+
export declare const isUseLoop: (loop: null | any[], isDesignMode: boolean) => boolean;
|
|
19
|
+
export declare function checkPropTypes(value: any, name: string, rule: any, componentName: string): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* transform string to a function
|
|
22
|
+
* @param str function in string form
|
|
23
|
+
* @returns funtion
|
|
24
|
+
*/
|
|
25
|
+
export declare function transformStringToFunction(str: string): any;
|
|
26
|
+
/**
|
|
27
|
+
* 对象类型JSExpression,支持省略this
|
|
28
|
+
* @param str expression in string form
|
|
29
|
+
* @param self scope object
|
|
30
|
+
* @returns funtion
|
|
31
|
+
*/
|
|
32
|
+
declare function parseExpression(options: {
|
|
33
|
+
str: any;
|
|
34
|
+
self: any;
|
|
35
|
+
thisRequired?: boolean;
|
|
36
|
+
logScope?: string;
|
|
37
|
+
}): any;
|
|
38
|
+
declare function parseExpression(str: any, self: any, thisRequired?: boolean): any;
|
|
39
|
+
export { parseExpression };
|
|
40
|
+
export declare function parseThisRequiredExpression(str: any, self: any): any;
|
|
41
|
+
/**
|
|
42
|
+
* check str passed in is a string type of not
|
|
43
|
+
* @param str obj to be checked
|
|
44
|
+
* @returns boolean
|
|
45
|
+
*/
|
|
46
|
+
export declare function isString(str: any): boolean;
|
|
47
|
+
/**
|
|
48
|
+
* capitalize first letter
|
|
49
|
+
* @param word string to be proccessed
|
|
50
|
+
* @returns string capitalized string
|
|
51
|
+
*/
|
|
52
|
+
export declare function capitalizeFirstLetter(word: string): string;
|
|
53
|
+
export declare const isReactClass: (obj: any) => obj is ComponentClass<any>;
|
|
54
|
+
export declare function isReactComponent(obj: any): obj is ComponentType<any>;
|
package/package.json
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@easy-editor/react-renderer",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "React Renderer package for EasyEditor.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist",
|
|
9
|
+
"LICENSE",
|
|
10
|
+
"CHANGELOG.md",
|
|
11
|
+
"README.md"
|
|
12
|
+
],
|
|
13
|
+
"publishConfig": {
|
|
14
|
+
"access": "public"
|
|
15
|
+
},
|
|
16
|
+
"homepage": "https://github.com/Easy-Editor/EasyEditor",
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"author": "JinSo <kimjinso@qq.com>",
|
|
19
|
+
"contributors": [
|
|
20
|
+
{
|
|
21
|
+
"name": "NoahCodeGG",
|
|
22
|
+
"email": "noahcodegg@gmail.com",
|
|
23
|
+
"url": "https://github.com/NoahCodeGG"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"keywords": [
|
|
27
|
+
"@easy-editor",
|
|
28
|
+
"easyeditor",
|
|
29
|
+
"low-code",
|
|
30
|
+
"editor",
|
|
31
|
+
"engine",
|
|
32
|
+
"dashboard",
|
|
33
|
+
"react",
|
|
34
|
+
"renderer"
|
|
35
|
+
],
|
|
36
|
+
"repository": {
|
|
37
|
+
"type": "git",
|
|
38
|
+
"url": "https://github.com/Easy-Editor/EasyEditor"
|
|
39
|
+
},
|
|
40
|
+
"bugs": {
|
|
41
|
+
"url": "https://github.com/Easy-Editor/EasyEditor/issues"
|
|
42
|
+
},
|
|
43
|
+
"peerDependencies": {
|
|
44
|
+
"@types/react": "^18.3.12",
|
|
45
|
+
"@types/react-dom": "^18.3.1",
|
|
46
|
+
"react": "^18.3.1",
|
|
47
|
+
"react-dom": "^18.3.1",
|
|
48
|
+
"@easy-editor/core": "0.0.2"
|
|
49
|
+
},
|
|
50
|
+
"dependencies": {
|
|
51
|
+
"lodash-es": "^4.17.21",
|
|
52
|
+
"mobx-react": "^9.2.0",
|
|
53
|
+
"prop-types": "^15.8.1",
|
|
54
|
+
"react-is": "^18.3.1"
|
|
55
|
+
},
|
|
56
|
+
"devDependencies": {
|
|
57
|
+
"@types/lodash-es": "^4.17.12",
|
|
58
|
+
"@types/prop-types": "^15.7.14",
|
|
59
|
+
"@types/react-is": "^18.3.0"
|
|
60
|
+
},
|
|
61
|
+
"scripts": {
|
|
62
|
+
"dev": "deno run --watch ./src/index.ts",
|
|
63
|
+
"format": "biome format --write .",
|
|
64
|
+
"lint": "biome check .",
|
|
65
|
+
"build": "npm-run-all -nl build:*",
|
|
66
|
+
"build:clean": "rimraf dist/",
|
|
67
|
+
"build:js": "rollup -c",
|
|
68
|
+
"types": "npm-run-all -nl types:*",
|
|
69
|
+
"types:src": "tsc --project tsconfig.build.json",
|
|
70
|
+
"test-types": "tsc --project tsconfig.test.json"
|
|
71
|
+
},
|
|
72
|
+
"types": "dist/index.d.ts",
|
|
73
|
+
"typings": "dist/index.d.ts",
|
|
74
|
+
"module": "dist/index.js",
|
|
75
|
+
"exports": {
|
|
76
|
+
".": {
|
|
77
|
+
"import": "./dist/index.js",
|
|
78
|
+
"require": "./dist/cjs/index.js",
|
|
79
|
+
"default": "./dist/index.js"
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|