@jbpark/live-editor 1.8.0 → 1.9.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/README.ko.md +12 -9
- package/README.md +12 -9
- package/dist/index.d.mts +49 -4
- package/dist/index.mjs +235 -191
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.ko.md
CHANGED
|
@@ -12,16 +12,19 @@ live-editor/
|
|
|
12
12
|
│ ├─ components/
|
|
13
13
|
│ │ ├─ Context/ # 전역 상태 관리
|
|
14
14
|
│ │ ├─ Dnd/ # 드래그 앤 드롭 시스템 및 편집 패널
|
|
15
|
-
│ │ ├─ Editor/
|
|
16
|
-
│ │ ├─ Error/
|
|
17
|
-
│ │
|
|
15
|
+
│ │ ├─ Editor/ # 코드 에디터
|
|
16
|
+
│ │ ├─ Error/ # 에러 바운더리
|
|
17
|
+
│ │ ├─ Frame/ # iframe/shadow DOM 프리뷰 격리
|
|
18
|
+
│ │ └─ Preview/ # 격리된 프리뷰 런타임
|
|
18
19
|
│ ├─ pages/
|
|
19
|
-
│ │ ├─
|
|
20
|
-
│ │
|
|
21
|
-
│ ├─
|
|
22
|
-
│
|
|
23
|
-
│ ├─
|
|
24
|
-
│
|
|
20
|
+
│ │ ├─ Docs/ # 문서 형태 데모 사이트 (개요 + 기능별 페이지)
|
|
21
|
+
│ │ ├─ Editor/ # 전체 에디터 앱 (에디터 + DnD 전환)
|
|
22
|
+
│ │ ├─ Playground/ # 데이터 바인딩 설정 테스트 페이지
|
|
23
|
+
│ │ └─ Preview/ # 전체화면 프리뷰 페이지
|
|
24
|
+
│ ├─ utils/ast/ # AST 조작 및 코드 생성
|
|
25
|
+
│ ├─ constants/ # 상수 및 설정
|
|
26
|
+
│ ├─ types/ # TypeScript 타입 정의
|
|
27
|
+
│ └─ main.tsx # 앱 진입점 + 라우팅
|
|
25
28
|
└─ package.json
|
|
26
29
|
```
|
|
27
30
|
|
package/README.md
CHANGED
|
@@ -12,16 +12,19 @@ live-editor/
|
|
|
12
12
|
│ ├─ components/
|
|
13
13
|
│ │ ├─ Context/ # Global state management
|
|
14
14
|
│ │ ├─ Dnd/ # Drag-and-drop system with editing panels
|
|
15
|
-
│ │ ├─ Editor/
|
|
16
|
-
│ │ ├─ Error/
|
|
17
|
-
│ │
|
|
15
|
+
│ │ ├─ Editor/ # Code editor
|
|
16
|
+
│ │ ├─ Error/ # Error boundary
|
|
17
|
+
│ │ ├─ Frame/ # iframe/shadow-DOM preview isolation
|
|
18
|
+
│ │ └─ Preview/ # Isolated preview runtime
|
|
18
19
|
│ ├─ pages/
|
|
19
|
-
│ │ ├─
|
|
20
|
-
│ │
|
|
21
|
-
│ ├─
|
|
22
|
-
│
|
|
23
|
-
│ ├─
|
|
24
|
-
│
|
|
20
|
+
│ │ ├─ Docs/ # Docs-style demo site (overview + feature pages)
|
|
21
|
+
│ │ ├─ Editor/ # Full editor app (editor + DnD toggle)
|
|
22
|
+
│ │ ├─ Playground/ # Data-binding config test page
|
|
23
|
+
│ │ └─ Preview/ # Full-screen preview page
|
|
24
|
+
│ ├─ utils/ast/ # AST manipulation & code generation
|
|
25
|
+
│ ├─ constants/ # Constants and configurations
|
|
26
|
+
│ ├─ types/ # TypeScript type definitions
|
|
27
|
+
│ └─ main.tsx # App entry + routing
|
|
25
28
|
└─ package.json
|
|
26
29
|
```
|
|
27
30
|
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { n as Section } from "./index-DdSjzvA3.mjs";
|
|
2
2
|
import "@jbpark/ui-kit/style.css";
|
|
3
|
+
import * as react from "react";
|
|
3
4
|
import React$1, { ReactNode } from "react";
|
|
4
5
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
6
|
import { Extension } from "@uiw/react-codemirror";
|
|
@@ -49,6 +50,7 @@ interface Props$6 {
|
|
|
49
50
|
children: React$1.ReactNode;
|
|
50
51
|
fallback?: (message?: string) => React$1.ReactNode;
|
|
51
52
|
onError?: (e: Error, info: React$1.ErrorInfo) => void;
|
|
53
|
+
resetKeys?: readonly unknown[];
|
|
52
54
|
}
|
|
53
55
|
interface State {
|
|
54
56
|
hasError: boolean;
|
|
@@ -58,7 +60,8 @@ declare class ErrorBoundary extends React$1.Component<Props$6, State> {
|
|
|
58
60
|
constructor(props: Props$6);
|
|
59
61
|
static getDerivedStateFromError(error: Error): State;
|
|
60
62
|
componentDidCatch(error: Error, errorInfo: React$1.ErrorInfo): void;
|
|
61
|
-
|
|
63
|
+
componentDidUpdate(prevProps: Props$6): void;
|
|
64
|
+
render(): string | number | bigint | boolean | Iterable<React$1.ReactNode> | Promise<string | number | bigint | boolean | React$1.ReactPortal | React$1.ReactElement<unknown, string | React$1.JSXElementConstructor<any>> | Iterable<React$1.ReactNode> | null | undefined> | react_jsx_runtime0.JSX.Element | null | undefined;
|
|
62
65
|
}
|
|
63
66
|
//#endregion
|
|
64
67
|
//#region src/components/error/error.d.ts
|
|
@@ -148,7 +151,32 @@ type EditorComponent = typeof Editor$1 & {
|
|
|
148
151
|
};
|
|
149
152
|
declare const Editor: EditorComponent;
|
|
150
153
|
//#endregion
|
|
154
|
+
//#region src/components/dnd/draggable.d.ts
|
|
155
|
+
interface DraggableItemDragState {
|
|
156
|
+
ref: (node: HTMLElement | null) => void;
|
|
157
|
+
dragProps: React.HTMLAttributes<HTMLElement>;
|
|
158
|
+
isDragging: boolean;
|
|
159
|
+
}
|
|
160
|
+
interface DraggableItemProps {
|
|
161
|
+
item: Section;
|
|
162
|
+
children: (drag: DraggableItemDragState) => React.ReactNode;
|
|
163
|
+
}
|
|
164
|
+
declare const DraggableItem: ({
|
|
165
|
+
item,
|
|
166
|
+
children
|
|
167
|
+
}: DraggableItemProps) => react.ReactNode;
|
|
168
|
+
//#endregion
|
|
151
169
|
//#region src/components/dnd/dnd.d.ts
|
|
170
|
+
interface PaletteRenderData {
|
|
171
|
+
items: Section[];
|
|
172
|
+
onAdd: (item: Section) => void;
|
|
173
|
+
DraggableItem: typeof DraggableItem;
|
|
174
|
+
}
|
|
175
|
+
interface PanelRenderData {
|
|
176
|
+
item?: Section;
|
|
177
|
+
onChange: (next: Partial<Section>) => void;
|
|
178
|
+
onDelete: (id: string) => void;
|
|
179
|
+
}
|
|
152
180
|
interface Props extends Omit<React.ComponentPropsWithRef<'div'>, 'onChange'> {
|
|
153
181
|
value?: string;
|
|
154
182
|
props?: Record<string, unknown>;
|
|
@@ -157,8 +185,10 @@ interface Props extends Omit<React.ComponentPropsWithRef<'div'>, 'onChange'> {
|
|
|
157
185
|
frame?: FrameProps;
|
|
158
186
|
provider?: (children: React.ReactNode) => React.ReactNode;
|
|
159
187
|
onChange?: (value: string) => void;
|
|
188
|
+
renderPalette?: (data: PaletteRenderData) => React.ReactNode;
|
|
189
|
+
renderPanel?: (data: PanelRenderData) => React.ReactNode;
|
|
160
190
|
}
|
|
161
|
-
declare const Dnd: ({
|
|
191
|
+
declare const Dnd$1: ({
|
|
162
192
|
value: _value,
|
|
163
193
|
props,
|
|
164
194
|
modules,
|
|
@@ -167,9 +197,17 @@ declare const Dnd: ({
|
|
|
167
197
|
items,
|
|
168
198
|
frame,
|
|
169
199
|
provider,
|
|
200
|
+
renderPalette,
|
|
201
|
+
renderPanel,
|
|
170
202
|
...restProps
|
|
171
203
|
}: Props) => react_jsx_runtime0.JSX.Element;
|
|
172
204
|
//#endregion
|
|
205
|
+
//#region src/components/dnd/index.d.ts
|
|
206
|
+
type DndComponent = typeof Dnd$1 & {
|
|
207
|
+
DraggableItem: typeof DraggableItem;
|
|
208
|
+
};
|
|
209
|
+
declare const Dnd: DndComponent;
|
|
210
|
+
//#endregion
|
|
173
211
|
//#region src/index.d.ts
|
|
174
212
|
declare const App: {
|
|
175
213
|
({
|
|
@@ -230,7 +268,7 @@ declare const App: {
|
|
|
230
268
|
...props
|
|
231
269
|
}: Props$2) => react_jsx_runtime0.JSX.Element;
|
|
232
270
|
};
|
|
233
|
-
Dnd: ({
|
|
271
|
+
Dnd: (({
|
|
234
272
|
value: _value,
|
|
235
273
|
props,
|
|
236
274
|
modules,
|
|
@@ -239,8 +277,15 @@ declare const App: {
|
|
|
239
277
|
items,
|
|
240
278
|
frame,
|
|
241
279
|
provider,
|
|
280
|
+
renderPalette,
|
|
281
|
+
renderPanel,
|
|
242
282
|
...restProps
|
|
243
|
-
}: Props) => react_jsx_runtime0.JSX.Element
|
|
283
|
+
}: Props) => react_jsx_runtime0.JSX.Element) & {
|
|
284
|
+
DraggableItem: ({
|
|
285
|
+
item,
|
|
286
|
+
children
|
|
287
|
+
}: DraggableItemProps) => react.ReactNode;
|
|
288
|
+
};
|
|
244
289
|
};
|
|
245
290
|
declare const LiveRenderer: ({
|
|
246
291
|
code,
|