@lodado/sdui-template 1.0.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/LICENCE +8 -0
- package/README.md +462 -0
- package/dist/cjs/client/index.cjs +1 -0
- package/dist/es/client/src/components/componentMap.mjs +2 -0
- package/dist/es/client/src/index.mjs +1 -0
- package/dist/es/client/src/react-wrapper/components/SduiLayoutRenderer.mjs +2 -0
- package/dist/es/client/src/react-wrapper/context/SduiLayoutContext.mjs +2 -0
- package/dist/es/client/src/react-wrapper/hooks/useRenderNode.mjs +2 -0
- package/dist/es/client/src/react-wrapper/hooks/useSduiLayoutAction.mjs +2 -0
- package/dist/es/client/src/react-wrapper/hooks/useSduiNodeSubscription.mjs +2 -0
- package/dist/es/client/src/store/SduiLayoutStore.mjs +1 -0
- package/dist/es/client/src/store/errors.mjs +1 -0
- package/dist/es/client/src/store/managers/DocumentManager.mjs +1 -0
- package/dist/es/client/src/store/managers/LayoutStateRepository.mjs +1 -0
- package/dist/es/client/src/store/managers/SubscriptionManager.mjs +1 -0
- package/dist/es/client/src/store/managers/VariablesManager.mjs +1 -0
- package/dist/es/client/src/utils/normalize/denormalize.mjs +1 -0
- package/dist/es/client/src/utils/normalize/normalize.mjs +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/setupTests.d.ts +1 -0
- package/dist/types/src/components/componentMap.d.ts +15 -0
- package/dist/types/src/components/index.d.ts +7 -0
- package/dist/types/src/components/types.d.ts +18 -0
- package/dist/types/src/index.d.ts +38 -0
- package/dist/types/src/react-wrapper/components/SduiLayoutRenderer.d.ts +62 -0
- package/dist/types/src/react-wrapper/components/index.d.ts +6 -0
- package/dist/types/src/react-wrapper/context/SduiLayoutContext.d.ts +37 -0
- package/dist/types/src/react-wrapper/context/index.d.ts +6 -0
- package/dist/types/src/react-wrapper/hooks/index.d.ts +8 -0
- package/dist/types/src/react-wrapper/hooks/useRenderNode.d.ts +10 -0
- package/dist/types/src/react-wrapper/hooks/useSduiLayoutAction.d.ts +15 -0
- package/dist/types/src/react-wrapper/hooks/useSduiNodeSubscription.d.ts +45 -0
- package/dist/types/src/react-wrapper/index.d.ts +8 -0
- package/dist/types/src/schema/base.d.ts +44 -0
- package/dist/types/src/schema/document.d.ts +16 -0
- package/dist/types/src/schema/index.d.ts +8 -0
- package/dist/types/src/schema/node.d.ts +19 -0
- package/dist/types/src/store/SduiLayoutStore.d.ts +192 -0
- package/dist/types/src/store/errors.d.ts +37 -0
- package/dist/types/src/store/index.d.ts +8 -0
- package/dist/types/src/store/managers/DocumentManager.d.ts +67 -0
- package/dist/types/src/store/managers/LayoutStateRepository.d.ts +110 -0
- package/dist/types/src/store/managers/SubscriptionManager.d.ts +48 -0
- package/dist/types/src/store/managers/VariablesManager.d.ts +38 -0
- package/dist/types/src/store/managers/index.d.ts +9 -0
- package/dist/types/src/store/types.d.ts +46 -0
- package/dist/types/src/utils/normalize/denormalize.d.ts +24 -0
- package/dist/types/src/utils/normalize/index.d.ts +8 -0
- package/dist/types/src/utils/normalize/normalize.d.ts +28 -0
- package/dist/types/src/utils/normalize/types.d.ts +15 -0
- package/package.json +89 -0
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LayoutStateRepository
|
|
3
|
+
*
|
|
4
|
+
* 레이아웃 상태 데이터를 저장하고 조회하는 Repository입니다.
|
|
5
|
+
* 상태 저장소의 단일 책임을 담당합니다.
|
|
6
|
+
*/
|
|
7
|
+
import type { SduiLayoutNode } from '../../schema';
|
|
8
|
+
import type { SduiLayoutStoreState } from '../types';
|
|
9
|
+
/**
|
|
10
|
+
* LayoutStateRepository
|
|
11
|
+
*
|
|
12
|
+
* 레이아웃 상태 데이터를 저장하고 조회합니다.
|
|
13
|
+
*/
|
|
14
|
+
export declare class LayoutStateRepository {
|
|
15
|
+
/** Store 상태 (일반 변수) */
|
|
16
|
+
private _state;
|
|
17
|
+
/**
|
|
18
|
+
* Store 상태를 반환합니다.
|
|
19
|
+
*/
|
|
20
|
+
get state(): SduiLayoutStoreState;
|
|
21
|
+
/**
|
|
22
|
+
* 노드 엔티티를 반환합니다.
|
|
23
|
+
*/
|
|
24
|
+
get nodes(): Record<string, SduiLayoutNode>;
|
|
25
|
+
/**
|
|
26
|
+
* ID로 노드를 조회합니다.
|
|
27
|
+
*
|
|
28
|
+
* @param nodeId - 조회할 노드 ID
|
|
29
|
+
* @returns 노드 또는 undefined
|
|
30
|
+
*/
|
|
31
|
+
getNodeById(nodeId: string): SduiLayoutNode | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* ID로 노드 타입을 조회합니다.
|
|
34
|
+
*
|
|
35
|
+
* @param nodeId - 조회할 노드 ID
|
|
36
|
+
* @returns 노드 타입 또는 undefined
|
|
37
|
+
*/
|
|
38
|
+
getNodeTypeById(nodeId: string): string | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* ID로 자식 노드 ID 목록을 조회합니다.
|
|
41
|
+
*
|
|
42
|
+
* @param nodeId - 조회할 노드 ID
|
|
43
|
+
* @returns 자식 노드 ID 배열 또는 빈 배열
|
|
44
|
+
*/
|
|
45
|
+
getChildrenIdsById(nodeId: string): string[];
|
|
46
|
+
/**
|
|
47
|
+
* 루트 노드 ID를 반환합니다.
|
|
48
|
+
*
|
|
49
|
+
* @returns 루트 노드 ID 또는 undefined
|
|
50
|
+
*/
|
|
51
|
+
getRootId(): string | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* 초기 상태를 설정합니다.
|
|
54
|
+
*
|
|
55
|
+
* @param initialState - 초기 상태
|
|
56
|
+
*/
|
|
57
|
+
initializeState(initialState?: Partial<SduiLayoutStoreState>): void;
|
|
58
|
+
/**
|
|
59
|
+
* 노드 엔티티를 업데이트합니다.
|
|
60
|
+
*
|
|
61
|
+
* @param nodes - 노드 엔티티 맵
|
|
62
|
+
*/
|
|
63
|
+
updateNodes(nodes: Record<string, SduiLayoutNode>): void;
|
|
64
|
+
/**
|
|
65
|
+
* 특정 노드의 상태를 업데이트합니다.
|
|
66
|
+
*
|
|
67
|
+
* @param nodeId - 노드 ID
|
|
68
|
+
* @param state - 레이아웃 상태
|
|
69
|
+
*/
|
|
70
|
+
updateNodeState(nodeId: string, state: Record<string, unknown>): void;
|
|
71
|
+
/**
|
|
72
|
+
* 특정 노드의 속성을 업데이트합니다.
|
|
73
|
+
*
|
|
74
|
+
* @param nodeId - 노드 ID
|
|
75
|
+
* @param attributes - 레이아웃 속성
|
|
76
|
+
*/
|
|
77
|
+
updateNodeAttributes(nodeId: string, attributes: Record<string, unknown>): void;
|
|
78
|
+
/**
|
|
79
|
+
* 루트 노드 ID를 설정합니다.
|
|
80
|
+
*
|
|
81
|
+
* @param rootId - 루트 노드 ID
|
|
82
|
+
*/
|
|
83
|
+
setRootId(rootId: string): void;
|
|
84
|
+
/**
|
|
85
|
+
* 선택된 노드 ID를 설정합니다.
|
|
86
|
+
*
|
|
87
|
+
* @param nodeId - 선택된 노드 ID
|
|
88
|
+
*/
|
|
89
|
+
setSelectedNodeId(nodeId?: string): string | undefined;
|
|
90
|
+
/**
|
|
91
|
+
* 편집 상태를 설정합니다.
|
|
92
|
+
*
|
|
93
|
+
* @param isEdited - 편집 여부
|
|
94
|
+
*/
|
|
95
|
+
setEdited(isEdited: boolean): void;
|
|
96
|
+
/**
|
|
97
|
+
* 변수를 업데이트합니다.
|
|
98
|
+
*
|
|
99
|
+
* @param variables - 변수 맵
|
|
100
|
+
*/
|
|
101
|
+
updateVariables(variables: Record<string, unknown>): void;
|
|
102
|
+
/**
|
|
103
|
+
* version을 증가시킵니다.
|
|
104
|
+
*/
|
|
105
|
+
incrementVersion(): void;
|
|
106
|
+
/**
|
|
107
|
+
* 상태를 초기화합니다.
|
|
108
|
+
*/
|
|
109
|
+
reset(): void;
|
|
110
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SubscriptionManager
|
|
3
|
+
*
|
|
4
|
+
* Observer Pattern을 구현하여 구독 시스템을 관리합니다.
|
|
5
|
+
* ID별 구독자와 version 구독자를 관리합니다.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* SubscriptionManager
|
|
9
|
+
*
|
|
10
|
+
* 구독 시스템을 독립적으로 관리하는 클래스입니다.
|
|
11
|
+
*/
|
|
12
|
+
export declare class SubscriptionManager {
|
|
13
|
+
/** ID별 구독자 관리 (layoutStates/layoutAttributes 변경 감지용) */
|
|
14
|
+
private _nodeListeners;
|
|
15
|
+
/** version 구독자 관리 (nodes, rootId, variables 변경 감지용) */
|
|
16
|
+
private _versionListeners;
|
|
17
|
+
/**
|
|
18
|
+
* 특정 노드 ID를 구독합니다.
|
|
19
|
+
*
|
|
20
|
+
* @param nodeId - 구독할 노드 ID
|
|
21
|
+
* @param callback - 변경 시 호출될 콜백 (forceRender)
|
|
22
|
+
* @returns 구독 해제 함수
|
|
23
|
+
*/
|
|
24
|
+
subscribeNode(nodeId: string, callback: () => void): () => void;
|
|
25
|
+
/**
|
|
26
|
+
* version을 구독합니다. (nodes, rootId, variables 변경 감지용)
|
|
27
|
+
*
|
|
28
|
+
* @param callback - 변경 시 호출될 콜백 (forceRender)
|
|
29
|
+
* @returns 구독 해제 함수
|
|
30
|
+
*/
|
|
31
|
+
subscribeVersion(callback: () => void): () => void;
|
|
32
|
+
/**
|
|
33
|
+
* 특정 노드의 구독자에게 변경을 알립니다.
|
|
34
|
+
*
|
|
35
|
+
* @param nodeId - 변경된 노드 ID
|
|
36
|
+
*/
|
|
37
|
+
notifyNode(nodeId: string): void;
|
|
38
|
+
/**
|
|
39
|
+
* 여러 노드의 구독자에게 변경을 알립니다.
|
|
40
|
+
*
|
|
41
|
+
* @param nodeIds - 변경된 노드 ID 배열
|
|
42
|
+
*/
|
|
43
|
+
notifyNodes(nodeIds: string[]): void;
|
|
44
|
+
/**
|
|
45
|
+
* version 구독자에게 변경을 알립니다.
|
|
46
|
+
*/
|
|
47
|
+
notifyVersion(): void;
|
|
48
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* VariablesManager
|
|
3
|
+
*
|
|
4
|
+
* 전역 변수 관리를 담당합니다.
|
|
5
|
+
*/
|
|
6
|
+
import type { LayoutStateRepository } from './LayoutStateRepository';
|
|
7
|
+
import type { SubscriptionManager } from './SubscriptionManager';
|
|
8
|
+
/**
|
|
9
|
+
* VariablesManager
|
|
10
|
+
*
|
|
11
|
+
* 전역 변수 관리를 담당합니다.
|
|
12
|
+
*/
|
|
13
|
+
export declare class VariablesManager {
|
|
14
|
+
private repository;
|
|
15
|
+
private subscriptionManager;
|
|
16
|
+
constructor(repository: LayoutStateRepository, subscriptionManager: SubscriptionManager);
|
|
17
|
+
/**
|
|
18
|
+
* 전역 변수를 업데이트합니다.
|
|
19
|
+
* 깊은 복사로 새 객체를 생성하여 version을 증가시킵니다.
|
|
20
|
+
*
|
|
21
|
+
* @param variables - 새로운 전역 변수 객체
|
|
22
|
+
*/
|
|
23
|
+
updateVariables(variables: Record<string, unknown>): void;
|
|
24
|
+
/**
|
|
25
|
+
* 개별 전역 변수를 업데이트합니다.
|
|
26
|
+
* 깊은 복사로 새 객체를 생성하여 version을 증가시킵니다.
|
|
27
|
+
*
|
|
28
|
+
* @param key - 변수 키
|
|
29
|
+
* @param value - 변수 값
|
|
30
|
+
*/
|
|
31
|
+
updateVariable(key: string, value: unknown): void;
|
|
32
|
+
/**
|
|
33
|
+
* 전역 변수를 삭제합니다.
|
|
34
|
+
*
|
|
35
|
+
* @param key - 삭제할 변수 키
|
|
36
|
+
*/
|
|
37
|
+
deleteVariable(key: string): void;
|
|
38
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Server-Driven UI - Store Types
|
|
3
|
+
*
|
|
4
|
+
* Store 상태 및 옵션 타입 정의
|
|
5
|
+
*/
|
|
6
|
+
import type { ReactNode } from "react";
|
|
7
|
+
import type { SduiLayoutNode } from "../schema";
|
|
8
|
+
/**
|
|
9
|
+
* 자식 노드 렌더링 함수 타입 (Render Props)
|
|
10
|
+
*
|
|
11
|
+
* 상위에서 주입되어 자식 노드를 렌더링할 때 사용합니다.
|
|
12
|
+
*/
|
|
13
|
+
export type RenderNodeFn = (childId: string) => ReactNode;
|
|
14
|
+
/**
|
|
15
|
+
* 컴포넌트 팩토리 타입
|
|
16
|
+
*
|
|
17
|
+
* id, renderNode를 받아서 컴포넌트를 렌더링합니다.
|
|
18
|
+
*/
|
|
19
|
+
export type ComponentFactory = (id: string, renderNode: RenderNodeFn) => ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* Store 상태
|
|
22
|
+
*
|
|
23
|
+
* nodes, rootId, variables 등은 일반 변수로 관리하고
|
|
24
|
+
* version을 구독하여 변경을 감지합니다.
|
|
25
|
+
*/
|
|
26
|
+
export interface SduiLayoutStoreState {
|
|
27
|
+
/** 전체 리렌더 트리거용 버전 */
|
|
28
|
+
version: number;
|
|
29
|
+
/** 루트 노드 ID (트리 구조 변경 시 리렌더 필요) */
|
|
30
|
+
rootId?: string;
|
|
31
|
+
/** 노드 엔티티 (id → node) - 컴포넌트 구조 정의 */
|
|
32
|
+
nodes: Record<string, SduiLayoutNode>;
|
|
33
|
+
/** 선택된 노드 ID */
|
|
34
|
+
selectedNodeId?: string;
|
|
35
|
+
/** 레이아웃 편집 상태 */
|
|
36
|
+
isEdited?: boolean;
|
|
37
|
+
/** 전역 변수 (깊은 복사로 리렌더 트리거) */
|
|
38
|
+
variables: Record<string, unknown>;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* SduiLayoutStore 생성 옵션
|
|
42
|
+
*/
|
|
43
|
+
export interface SduiLayoutStoreOptions {
|
|
44
|
+
/** 컴포넌트 오버라이드 맵 (ID 우선, 없으면 타입으로 조회) */
|
|
45
|
+
componentOverrides?: Record<string, ComponentFactory>;
|
|
46
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SDUI Layout Denormalize
|
|
3
|
+
*
|
|
4
|
+
* Normalized entities에서 문서를 복원합니다.
|
|
5
|
+
*/
|
|
6
|
+
import type { SduiLayoutDocument, SduiLayoutNode } from '../../schema';
|
|
7
|
+
import type { NormalizedSduiEntities } from './types';
|
|
8
|
+
/**
|
|
9
|
+
* Normalized entities에서 노드를 denormalize
|
|
10
|
+
*
|
|
11
|
+
* @param nodeId - 복원할 노드 ID
|
|
12
|
+
* @param entities - normalize된 entities
|
|
13
|
+
* @returns 복원된 노드
|
|
14
|
+
*/
|
|
15
|
+
export declare function denormalizeSduiNode(nodeId: string, entities: NormalizedSduiEntities): SduiLayoutNode | null;
|
|
16
|
+
/**
|
|
17
|
+
* Normalized entities에서 전체 문서를 denormalize
|
|
18
|
+
*
|
|
19
|
+
* @param rootId - 루트 노드 ID
|
|
20
|
+
* @param entities - normalize된 entities
|
|
21
|
+
* @param metadata - 문서 메타데이터 (선택적)
|
|
22
|
+
* @returns 복원된 문서
|
|
23
|
+
*/
|
|
24
|
+
export declare function denormalizeSduiLayout(rootId: string, entities: NormalizedSduiEntities, metadata?: SduiLayoutDocument['metadata']): SduiLayoutDocument | null;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SDUI Layout Normalize
|
|
3
|
+
*
|
|
4
|
+
* normalizr를 사용하여 SduiLayoutDocument를 normalize하고
|
|
5
|
+
* id를 통해 조회 가능한 entities로 변환합니다.
|
|
6
|
+
*/
|
|
7
|
+
import type { SduiLayoutDocument, SduiLayoutNode } from '../../schema';
|
|
8
|
+
import type { NormalizedSduiEntities } from './types';
|
|
9
|
+
/**
|
|
10
|
+
* SduiLayoutNode를 normalize하여 entities로 변환
|
|
11
|
+
*
|
|
12
|
+
* @param node - normalize할 노드
|
|
13
|
+
* @returns normalize된 결과 (entities와 result)
|
|
14
|
+
*/
|
|
15
|
+
export declare function normalizeSduiNode(node: SduiLayoutNode): {
|
|
16
|
+
result: string;
|
|
17
|
+
entities: NormalizedSduiEntities;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* SduiLayoutDocument를 normalize
|
|
21
|
+
*
|
|
22
|
+
* @param document - normalize할 문서
|
|
23
|
+
* @returns normalize된 결과
|
|
24
|
+
*/
|
|
25
|
+
export declare function normalizeSduiLayout(document: SduiLayoutDocument): {
|
|
26
|
+
result: string;
|
|
27
|
+
entities: NormalizedSduiEntities;
|
|
28
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Server-Driven UI - Normalized Entities Types
|
|
3
|
+
*
|
|
4
|
+
* Normalize된 엔티티 구조 정의
|
|
5
|
+
*/
|
|
6
|
+
import type { SduiLayoutNode } from '../../schema';
|
|
7
|
+
/**
|
|
8
|
+
* Normalize된 엔티티 구조
|
|
9
|
+
*
|
|
10
|
+
* id를 키로 사용하여 조회 가능한 형태로 변환됩니다.
|
|
11
|
+
*/
|
|
12
|
+
export interface NormalizedSduiEntities {
|
|
13
|
+
/** 노드 엔티티 (id → SduiLayoutNode, state와 attributes 포함) */
|
|
14
|
+
nodes?: Record<string, SduiLayoutNode>;
|
|
15
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
{
|
|
2
|
+
"author": "lodado",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"bugs": {
|
|
5
|
+
"url": "https://github.com/lodado/sdui-template/issues"
|
|
6
|
+
},
|
|
7
|
+
"contributors": [],
|
|
8
|
+
"dependencies": {
|
|
9
|
+
"lodash-es": "^4.17.21",
|
|
10
|
+
"normalizr": "^3.6.2",
|
|
11
|
+
"zod": "^3.23.8"
|
|
12
|
+
},
|
|
13
|
+
"description": "SDUI (Server-Driven UI) template library for React. A flexible and powerful template system for building server-driven user interfaces with dynamic layouts and components.",
|
|
14
|
+
"peerDependencies": {
|
|
15
|
+
"@types/react": "^18.3.12",
|
|
16
|
+
"@types/react-dom": "^18.3.1",
|
|
17
|
+
"react": "^18.0"
|
|
18
|
+
},
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"@testing-library/jest-dom": "^6.1.5",
|
|
21
|
+
"@testing-library/react": "^14.1.2",
|
|
22
|
+
"@types/lodash-es": "^4.17.12",
|
|
23
|
+
"@types/node": "^20.12.7",
|
|
24
|
+
"@types/react": "^18.3.5",
|
|
25
|
+
"@types/react-dom": "^18.3.0",
|
|
26
|
+
"babel-jest": "29.5.0",
|
|
27
|
+
"eslint": "^8.57.0",
|
|
28
|
+
"react": "^18.3.1",
|
|
29
|
+
"react-dom": "^18.3.1",
|
|
30
|
+
"ts-jest": "29.0.5",
|
|
31
|
+
"jest-config": "0.0.0",
|
|
32
|
+
"tsconfig": "0.0.0",
|
|
33
|
+
"eslint-config-sdui-template": "0.0.0",
|
|
34
|
+
"rollup-config": "0.0.1"
|
|
35
|
+
},
|
|
36
|
+
"exports": {
|
|
37
|
+
".": {
|
|
38
|
+
"import": {
|
|
39
|
+
"default": "./dist/es/client/index.mjs",
|
|
40
|
+
"types": "./dist/types/index.d.ts"
|
|
41
|
+
},
|
|
42
|
+
"require": {
|
|
43
|
+
"default": "./dist/cjs/client/index.cjs",
|
|
44
|
+
"types": "./dist/types/index.d.ts"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"files": [
|
|
49
|
+
"dist/**",
|
|
50
|
+
"README.md"
|
|
51
|
+
],
|
|
52
|
+
"homepage": "https://github.com/lodado/sdui-template",
|
|
53
|
+
"keywords": [
|
|
54
|
+
"react",
|
|
55
|
+
"sdui",
|
|
56
|
+
"server-driven-ui",
|
|
57
|
+
"template",
|
|
58
|
+
"layout",
|
|
59
|
+
"dynamic",
|
|
60
|
+
"components",
|
|
61
|
+
"ui"
|
|
62
|
+
],
|
|
63
|
+
"license": "MIT",
|
|
64
|
+
"main": "./dist/cjs/client/index.cjs",
|
|
65
|
+
"module": "./dist/es/client/index.mjs",
|
|
66
|
+
"name": "@lodado/sdui-template",
|
|
67
|
+
"peerDependenciesMeta": {
|
|
68
|
+
"@types/react": {
|
|
69
|
+
"optional": true
|
|
70
|
+
},
|
|
71
|
+
"@types/react-dom": {
|
|
72
|
+
"optional": true
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"publishConfig": {
|
|
76
|
+
"access": "public",
|
|
77
|
+
"source": "./src/index.ts"
|
|
78
|
+
},
|
|
79
|
+
"sideEffects": false,
|
|
80
|
+
"source": "./src/index.ts",
|
|
81
|
+
"types": "./dist/types/index.d.ts",
|
|
82
|
+
"scripts": {
|
|
83
|
+
"build": "rollup -c && tsc --emitDeclarationOnly --declarationMap false --declaration --declarationDir dist/types",
|
|
84
|
+
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
|
|
85
|
+
"lint": "eslint \"src/**/*.ts*\"",
|
|
86
|
+
"manual-release": "pnpm run build && pnpm publish --no-git-checks",
|
|
87
|
+
"test": "jest --passWithNoTests"
|
|
88
|
+
}
|
|
89
|
+
}
|