@g1cloud/ui-modeler-next 5.0.0-alpha.5 → 5.0.0-alpha.7
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/dist/catalog/builtin/shared.d.ts +10 -1
- package/dist/preview/assets/{BSAlertModal-DBRQ0cCa-BQCvSSM1.js → BSAlertModal-DBRQ0cCa-C73eZaze.js} +1 -1
- package/dist/preview/assets/{BSGridColumnSettingModal-C7xgLov6-BYzy2kky.js → BSGridColumnSettingModal-C7xgLov6-DMlfJD9n.js} +1 -1
- package/dist/preview/assets/{BSRichTextMaximizedModal-D4w5hGdQ-hg2rzzuT.js → BSRichTextMaximizedModal-D4w5hGdQ-CQ7wFv4j.js} +1 -1
- package/dist/preview/assets/{BSYesNoModal-Dj2nMArb-wP82yakn.js → BSYesNoModal-Dj2nMArb-TqxPznXt.js} +1 -1
- package/dist/preview/assets/{BSYoutubeInputModal-Mro_98AC-CXiYOb3K.js → BSYoutubeInputModal-Mro_98AC-B6upksIx.js} +1 -1
- package/dist/preview/assets/{ImageInsertModal-DeL97iRr-DDzSLJIk.js → ImageInsertModal-DeL97iRr-BIVv-r6P.js} +1 -1
- package/dist/preview/assets/{ImageProperties.vue_vue_type_script_setup_true_lang-DCv-pBh_-T-ILTV7r.js → ImageProperties.vue_vue_type_script_setup_true_lang-DCv-pBh_-lYwGLrld.js} +1 -1
- package/dist/preview/assets/{ImagePropertiesModal-DD6cl6c0-0fA7KJrs.js → ImagePropertiesModal-DD6cl6c0-DZaNaGWF.js} +1 -1
- package/dist/preview/assets/{LinkPropertiesModal-CkgkjB7g-Dyc2FSXf.js → LinkPropertiesModal-CkgkjB7g-CP9nnQA-.js} +1 -1
- package/dist/preview/assets/{TableInsertModal-CNnGZuaP-BZ0qSzpl.js → TableInsertModal-CNnGZuaP-9vXSXL3z.js} +1 -1
- package/dist/preview/assets/{TablePropertiesModal-BYjN7jg3-COyAw-_r.js → TablePropertiesModal-BYjN7jg3-D0ouZ8nW.js} +1 -1
- package/dist/preview/assets/{VideoInsertModal-DIIzKI53-BxEdG-8V.js → VideoInsertModal-DIIzKI53-JJAgBeYK.js} +1 -1
- package/dist/preview/assets/{VideoProperties.vue_vue_type_script_setup_true_lang-BR8B1ON_-i9uEBi3B.js → VideoProperties.vue_vue_type_script_setup_true_lang-BR8B1ON_-BZEmxAM1.js} +1 -1
- package/dist/preview/assets/{VideoPropertiesModal-DyMdwd1w-02tQ5F4G.js → VideoPropertiesModal-DyMdwd1w-D4pRxiMM.js} +1 -1
- package/dist/preview/assets/{YoutubeInsertModal-BSIDbYkd-DksljVe-.js → YoutubeInsertModal-BSIDbYkd-jz0A6rji.js} +1 -1
- package/dist/preview/assets/{YoutubeProperties.vue_vue_type_script_setup_true_lang-BlmuRJva-lA3ayoji.js → YoutubeProperties.vue_vue_type_script_setup_true_lang-BlmuRJva-C16bkOGp.js} +1 -1
- package/dist/preview/assets/{YoutubePropertiesModal-VDPQiwEJ-Bb3xoLAi.js → YoutubePropertiesModal-VDPQiwEJ-DBGLNXqD.js} +1 -1
- package/dist/preview/assets/{preview-wcediaBn.js → preview-CHK7Vd6U.js} +46 -46
- package/dist/preview/assets/preview-D_Yvfk8p.css +1 -0
- package/dist/preview/preview.html +2 -2
- package/dist/ui-modeler-next.css +1 -1
- package/dist/ui-modeler.js +2230 -2027
- package/dist/ui-modeler.umd.cjs +1 -1
- package/dist/view/PartCanvas.vue.d.ts +3 -0
- package/dist/view/RendererRegistry.d.ts +10 -2
- package/dist/view/SchematicPart.vue.d.ts +6 -0
- package/dist/view/dnd.d.ts +22 -4
- package/dist/view/layout.d.ts +74 -0
- package/dist/view/preview/IframePreview.vue.d.ts +9 -0
- package/dist/view/preview/protocol.d.ts +43 -2
- package/package.json +1 -1
- package/dist/preview/assets/preview-C0Mnn1o5.css +0 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { PartModel } from '../core/types';
|
|
2
2
|
import { RendererRegistry } from './RendererRegistry';
|
|
3
|
+
import { LayoutKind } from './layout';
|
|
3
4
|
type __VLS_Props = {
|
|
4
5
|
node?: PartModel;
|
|
5
6
|
registry?: RendererRegistry;
|
|
@@ -7,6 +8,8 @@ type __VLS_Props = {
|
|
|
7
8
|
parentId?: string;
|
|
8
9
|
/** 부모 children 내 이 노드의 인덱스 — 형제 삽입 gap 계산. */
|
|
9
10
|
index?: number;
|
|
11
|
+
/** 부모 컨테이너의 레이아웃 kind — 이 노드의 배치(align/expand/그리드셀)·드롭 축 판정에 쓴다. */
|
|
12
|
+
parentKind?: LayoutKind;
|
|
10
13
|
};
|
|
11
14
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
12
15
|
export default _default;
|
|
@@ -12,8 +12,16 @@ export interface PartRenderer {
|
|
|
12
12
|
}
|
|
13
13
|
export type RendererRegistry = Map<string, PartRenderer>;
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
16
|
-
* (
|
|
15
|
+
* 캔버스 표시용 caption — `captionText`(리터럴)로 안 풀리는 **message-key/locale 맵**도 사람이 식별할 수
|
|
16
|
+
* 있게 표면화한다(프리뷰 `displayCaption`과 동일 규칙, 메모리 preview-caption-messagekey-display). 특히
|
|
17
|
+
* ColumnDef처럼 caption이 MESSAGE_TEXT(키형)라 `captionText`가 undefined를 주던 파트가 캔버스에서 "무슨
|
|
18
|
+
* 항목"인지 보이게 한다(#{key} 표시). captionProp attr이 아예 없으면 undefined(describeScreen과 동형 —
|
|
19
|
+
* caption 키 생략 유지).
|
|
20
|
+
*/
|
|
21
|
+
export declare function displayCaptionOf(part: PartModel, catalog: PartCatalog | undefined): string | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* 스키매틱 개념 props(순수 — 테스트 가능). caption은 `displayCaptionOf`(리터럴 + 키형 #{key} 표면화)로
|
|
24
|
+
* 산출해 message-key 캡션도 캔버스에서 식별 가능하다. partName/category는 카탈로그 파생.
|
|
17
25
|
*/
|
|
18
26
|
export declare function schematicProps(part: PartModel, catalog: PartCatalog): Record<string, unknown>;
|
|
19
27
|
/**
|
|
@@ -14,6 +14,12 @@ type __VLS_Props = {
|
|
|
14
14
|
container?: boolean;
|
|
15
15
|
/** 컨테이너가 비어 있는지(드롭 영역 힌트 노출). */
|
|
16
16
|
empty?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* 컨테이너 본문(자식 슬롯)의 레이아웃 style — `view/layout` `containerLayoutOf(node).style`(순수 서술자).
|
|
19
|
+
* 실제 방향(가로/그리드/폼셀)으로 자식을 배치해 "인지한 위치에 드롭"을 가능케 한다(L1). 미지정/빈 객체면
|
|
20
|
+
* 기본 CSS(세로 스택) 유지 → BS 위임 4종(card/tabs/grid/popup, 빈 style)·stack fallback은 현행 그대로.
|
|
21
|
+
*/
|
|
22
|
+
bodyStyle?: Record<string, string>;
|
|
17
23
|
};
|
|
18
24
|
declare var __VLS_1: {};
|
|
19
25
|
type __VLS_Slots = {} & {
|
package/dist/view/dnd.d.ts
CHANGED
|
@@ -1,14 +1,32 @@
|
|
|
1
1
|
import { PartModel } from '../core/types';
|
|
2
2
|
/** 드롭 존 — 형제 앞/뒤 삽입(before/after) 또는 컨테이너 자식으로(into). */
|
|
3
3
|
export type DropZone = 'before' | 'after' | 'into';
|
|
4
|
+
/** 드롭 대상 — controller.addPart/movePart가 받는 {부모 id, 삽입 index}. index 생략 = append. */
|
|
5
|
+
export interface DropTarget {
|
|
6
|
+
parentId: string;
|
|
7
|
+
index?: number;
|
|
8
|
+
}
|
|
4
9
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
10
|
+
* 드롭 존을 controller가 기대하는 {대상 부모 id, 삽입 index}로 리졸브한다 — **캔버스·iframe 프리뷰
|
|
11
|
+
* 공용**(Path C). into=대상 파트 자신의 자식(append), before/after=대상 파트의 형제(부모 children 내 gap).
|
|
12
|
+
* root(부모 없음)에는 형제 삽입 불가라 before/after는 null(into만 유효). 대상 partId가 트리에 없으면 null.
|
|
13
|
+
* (move의 gap 보정은 별도 `adjustMoveIndex` — 이 함수는 add/move 공용 "제거 전" gap을 낸다.)
|
|
8
14
|
*/
|
|
9
|
-
export declare function
|
|
15
|
+
export declare function resolveDropTarget(root: PartModel, targetPartId: string, zone: DropZone): DropTarget | null;
|
|
16
|
+
/**
|
|
17
|
+
* 커서 위치로 드롭 존을 판정한다 — **부모 배치 주축 인식**(L1). 형제가 좌우로 놓이는 가로 부모(orientation
|
|
18
|
+
* 'horizontal')는 커서 X비율로, 세로 부모('vertical')는 Y비율로 before/after를 가른다. 이렇게 해야 가로
|
|
19
|
+
* 툴바에서 "이 버튼 왼쪽/오른쪽에 삽입"이 표현된다(레거시 인지 위치 격차 해소).
|
|
20
|
+
* - 컨테이너: 3분할(주축 <0.3 before / 중 into / >0.7 after). 단 root(hasParent=false)는 형제가 없어 항상 into.
|
|
21
|
+
* - leaf: 2분할(<0.5 before / after) — 자식을 담을 수 없으므로 into 없음.
|
|
22
|
+
*/
|
|
23
|
+
export declare function dropZoneAt(ratios: {
|
|
24
|
+
x: number;
|
|
25
|
+
y: number;
|
|
26
|
+
}, opts: {
|
|
10
27
|
container: boolean;
|
|
11
28
|
hasParent: boolean;
|
|
29
|
+
orientation: 'vertical' | 'horizontal';
|
|
12
30
|
}): DropZone;
|
|
13
31
|
/**
|
|
14
32
|
* 형제 상대 삽입 gap(대상 부모의 **현재(제거 전)** children 기준)을 move command가 기대하는
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { PartModel } from '../core/types';
|
|
2
|
+
import { PartType } from '../core/partType';
|
|
3
|
+
/**
|
|
4
|
+
* 컨테이너 렌더 종류. flex/grid는 CSS로 직접 낮추고, card/tabs는 실 BS 컴포넌트에 위임(PreviewNode 분기).
|
|
5
|
+
* slot = 단일 슬롯 홀더(InternalLayoutArea/TableLayoutCell/TabSheetPanel/GridCellPanel/ListField),
|
|
6
|
+
* stack = 팝업 콘텐츠·미지 컨테이너 fallback.
|
|
7
|
+
*/
|
|
8
|
+
export type LayoutKind = 'flex-col' | 'flex-row' | 'flex-wrap' | 'form' | 'table' | 'action' | 'expansion' | 'card' | 'tabs' | 'grid' | 'popup' | 'slot' | 'stack';
|
|
9
|
+
/** 컨테이너 레이아웃 서술자. style은 camelCase CSS(Vue `:style` 바인딩용). */
|
|
10
|
+
export interface ContainerLayout {
|
|
11
|
+
kind: LayoutKind;
|
|
12
|
+
style: Record<string, string>;
|
|
13
|
+
/** form=columnCount / table=colCount (Vue grid 힌트, style에 이미 반영됨). */
|
|
14
|
+
columns?: number;
|
|
15
|
+
/** table=rowCount. */
|
|
16
|
+
rows?: number;
|
|
17
|
+
}
|
|
18
|
+
/** 파트의 레이아웃 종류만(PreviewNode 분기용·자식에 전달할 parentKind). */
|
|
19
|
+
export declare function layoutKindOf(partType: PartType): LayoutKind;
|
|
20
|
+
/** 부모 배치 주축. */
|
|
21
|
+
export type Orientation = 'vertical' | 'horizontal';
|
|
22
|
+
/**
|
|
23
|
+
* 부모 레이아웃 kind → 형제가 배치되는 주축. 캔버스 드롭존이 before/after를 X축(가로 부모) vs Y축(세로 부모)
|
|
24
|
+
* 중 어느 쪽으로 판정할지 고르는 데 쓴다. horizontal: flex-row/flex-wrap/action + form/table(그리드 행 우선
|
|
25
|
+
* 근사) + grid(캔버스에서 컬럼을 가로 헤더 스트립으로 그림, `schematicBodyStyle` 참조). 그 외(flex-col/
|
|
26
|
+
* expansion/stack/slot + BS 위임 card/tabs/popup)=vertical. 2D 셀 판정은 후속 정제.
|
|
27
|
+
*/
|
|
28
|
+
export declare function orientationOf(kind: LayoutKind | undefined): Orientation;
|
|
29
|
+
/**
|
|
30
|
+
* 캔버스(스키매틱 설계 표면) 전용 컨테이너 본문 style. CSS-lowered 9종은 `containerLayoutOf`와 동일하되,
|
|
31
|
+
* **Grid**는 실 렌더가 BSGrid에 위임돼 `containerLayoutOf`가 빈 style을 주므로 캔버스에서 컬럼이 세로로
|
|
32
|
+
* 쌓여 읽히지 않는다 → 자식 ColumnDef를 **가로 헤더 스트립**(flex-row wrap)으로 배치해 "무슨 컬럼"인지
|
|
33
|
+
* 보이게 한다. 나머지 BS 위임 kind(card/tabs/popup)는 세로 스택 기본 유지(후속 정제 대상).
|
|
34
|
+
*/
|
|
35
|
+
export declare function schematicBodyStyle(part: PartModel): Record<string, string>;
|
|
36
|
+
/**
|
|
37
|
+
* 컨테이너 파트 → CSS 레이아웃 서술자. gap은 `spacing`(bool) attr, padding은 `margin`(bool) attr에서.
|
|
38
|
+
* form/table은 grid 특성상 gap 기본값을 준다(0이면 셀이 붙어 판독 불가).
|
|
39
|
+
*/
|
|
40
|
+
export declare function containerLayoutOf(part: PartModel): ContainerLayout;
|
|
41
|
+
/**
|
|
42
|
+
* 자식 파트가 부모 레이아웃 안에서 갖는 배치 style(camelCase CSS). PreviewNode가 자기 루트 요소에 적용한다.
|
|
43
|
+
*
|
|
44
|
+
* - expandRatio > 0 → flex-grow(flex 부모에서만). Vaadin expandRatio의 비율 배분 근사.
|
|
45
|
+
* - componentAlignment(6값 enum) → 부모 축 기준 정렬:
|
|
46
|
+
* · flex-col(교차축=수평): 수평값 LEFT/CENTER/RIGHT → align-self, 수직값 TOP/MIDDLE/BOTTOM → 주축 auto 마진.
|
|
47
|
+
* · flex-row/wrap/action(교차축=수직): 수직값 → align-self, 수평값 → 교차 방향 auto 마진.
|
|
48
|
+
* · form/table(grid): 수평 → justify-self, 수직 → align-self.
|
|
49
|
+
* - form 부모: takeOneRow → 전 열 span. 명시 `column`/`row`(Vaadin GridLayout 셀 좌표, 0-based) →
|
|
50
|
+
* grid-column/grid-row-start(1-based)로 sparse 배치 보존. colspan>1 → n열 span(명시 col과 결합 가능).
|
|
51
|
+
*/
|
|
52
|
+
export declare function childLayoutStyle(child: PartModel, parent: LayoutKind): Record<string, string>;
|
|
53
|
+
/**
|
|
54
|
+
* Grid 컬럼 서술자. bluesea `Column`의 순수-TS 구조 부분집합(`propertyId`·`caption`·`width`·`cellType`)이라
|
|
55
|
+
* PreviewNode가 `:columns`로 그대로 넘길 수 있다(bluesea import 없이 승격형 유지). caption은 평문 문자열만
|
|
56
|
+
* (프리뷰엔 메시지 카탈로그가 없어 messageKey는 렌더 불가 → 읽을 수 있는 propertyId로 폴백).
|
|
57
|
+
*/
|
|
58
|
+
export interface GridColumnSpec {
|
|
59
|
+
propertyId: string;
|
|
60
|
+
caption: string;
|
|
61
|
+
width?: number;
|
|
62
|
+
/** ColumnDef cellType 중 BSGrid GridCellType과 교집합인 값만(그 외는 생략→기본 TEXT 렌더). */
|
|
63
|
+
cellType?: 'TEXT' | 'NUMBER' | 'DATE' | 'PERCENTAGE';
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Grid 파트의 ColumnDef 자식 → 컬럼 서술자. TabSheet가 TabSheetPanel을 탭으로 소비하듯, Grid는 ColumnDef를
|
|
67
|
+
* 자식 노드로 재귀 렌더하지 않고 **컬럼 정의로 소비**한다(현 fallback: ColumnDef가 점선 플레이스홀더로 렌더).
|
|
68
|
+
*
|
|
69
|
+
* - `propertyId` ← `actualPropertyId`(없으면 partId).
|
|
70
|
+
* - `caption` ← `caption`(평문일 때만; messageKey/맵은 프리뷰에서 표시 불가 → `actualPropertyId`로 폴백).
|
|
71
|
+
* - `width` ← `width`("90px"→90, 단위/공백 무시). 파싱 실패 시 생략(BSGrid 기본 폭).
|
|
72
|
+
* - `cellType` ← `cellType`(BSGrid 교집합 4종만; 그 외 생략).
|
|
73
|
+
*/
|
|
74
|
+
export declare function gridColumnsOf(part: PartModel): GridColumnSpec[];
|
|
@@ -4,6 +4,8 @@ type __VLS_Props = {
|
|
|
4
4
|
model: PartModel;
|
|
5
5
|
/** 모델 revision — 변경 감지 트리거(controller.revision 배선). */
|
|
6
6
|
revision?: number;
|
|
7
|
+
/** 현재 선택 partId — iframe에 highlight로 push(실물 위 선택 아웃라인 동기화). */
|
|
8
|
+
selection?: string | null;
|
|
7
9
|
/** iframe 진입 문서 URL(자체 bluesea@5.x 렌더러 번들). */
|
|
8
10
|
src: string;
|
|
9
11
|
/** postMessage targetOrigin — 기본 동일 출처('/'). 교차 출처면 명시. */
|
|
@@ -11,12 +13,19 @@ type __VLS_Props = {
|
|
|
11
13
|
};
|
|
12
14
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
13
15
|
error: (message: string) => any;
|
|
16
|
+
select: (partId: string | null) => any;
|
|
14
17
|
ready: () => any;
|
|
18
|
+
addPart: (parentId: string, partType: string, index?: number | undefined) => any;
|
|
19
|
+
movePart: (movedId: string, toParentId: string, index?: number | undefined) => any;
|
|
15
20
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
16
21
|
onError?: ((message: string) => any) | undefined;
|
|
22
|
+
onSelect?: ((partId: string | null) => any) | undefined;
|
|
17
23
|
onReady?: (() => any) | undefined;
|
|
24
|
+
onAddPart?: ((parentId: string, partType: string, index?: number | undefined) => any) | undefined;
|
|
25
|
+
onMovePart?: ((movedId: string, toParentId: string, index?: number | undefined) => any) | undefined;
|
|
18
26
|
}>, {
|
|
19
27
|
revision: number;
|
|
28
|
+
selection: string | null;
|
|
20
29
|
targetOrigin: string;
|
|
21
30
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
22
31
|
export default _default;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { PartModel } from '../../core/types';
|
|
2
|
+
import { DropZone } from '../dnd';
|
|
2
3
|
/** postMessage 네임스페이스 — 다른 트래픽과 충돌 방지. */
|
|
3
4
|
export declare const PREVIEW_CHANNEL: "ui-modeler-preview";
|
|
4
5
|
/** 부모 → iframe: 렌더할 모델 스냅샷(PartModel은 전부 JSON-safe — attr/MultiLangText/구조값 plain). */
|
|
@@ -26,14 +27,54 @@ export interface PreviewErrorMessage {
|
|
|
26
27
|
type: 'error';
|
|
27
28
|
message: string;
|
|
28
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* iframe → 부모: 실물 위 파트 클릭 → 선택(전략 B 편집 표면화). 부모는 이 partId로 controller.select를
|
|
32
|
+
* 호출해 트리·속성 패널·프리뷰 하이라이트를 동기화한다. 실 컴포넌트 기본 동작은 iframe 렌더측이 억제한다.
|
|
33
|
+
*/
|
|
34
|
+
export interface PreviewSelectMessage {
|
|
35
|
+
channel: typeof PREVIEW_CHANNEL;
|
|
36
|
+
type: 'select';
|
|
37
|
+
/** 선택된 파트 id. 빈 영역 클릭 시 null(선택 해제). */
|
|
38
|
+
partId: string | null;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* 부모 → iframe: 현재 선택 파트 push(선택 아웃라인 동기화). 부모 selection 변화(트리/캔버스/프리뷰 어디서
|
|
42
|
+
* 발생하든)를 실물 위 아웃라인으로 반영한다. null이면 하이라이트 해제.
|
|
43
|
+
*/
|
|
44
|
+
export interface PreviewHighlightMessage {
|
|
45
|
+
channel: typeof PREVIEW_CHANNEL;
|
|
46
|
+
type: 'highlight';
|
|
47
|
+
partId: string | null;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* iframe → 부모: 실물 위 드롭 → 구조 편집(Path C, C-a). iframe은 **hit 리포터**로서 드롭 지점의 대상
|
|
51
|
+
* 파트(`data-part-id`)와 존(`dropZoneAt` 로컬 판정)만 실어 보내고, **모델 변형은 부모 controller**가
|
|
52
|
+
* 권위 모델에 수행한다(iframe 스냅샷은 stale 가능 → 부모 live 모델이 `resolveDropTarget`+`adjustMoveIndex`
|
|
53
|
+
* 소비). dragKind로 add(payload=partType)/move(payload=partId) 분기. targetPartId=null이면 빈/루트 영역.
|
|
54
|
+
*/
|
|
55
|
+
export interface PreviewDropMessage {
|
|
56
|
+
channel: typeof PREVIEW_CHANNEL;
|
|
57
|
+
type: 'drop';
|
|
58
|
+
/** add=팔레트 신규 파트 / move=iframe 내부 기존 파트 이동. */
|
|
59
|
+
dragKind: 'add' | 'move';
|
|
60
|
+
/** add면 partType, move면 이동 파트 partId. */
|
|
61
|
+
payload: string;
|
|
62
|
+
/** 드롭 지점 최내곽 파트 id. null=빈 영역(루트 into). */
|
|
63
|
+
targetPartId: string | null;
|
|
64
|
+
/** 대상 파트 기준 존(before/after=형제, into=자식). */
|
|
65
|
+
zone: DropZone;
|
|
66
|
+
}
|
|
29
67
|
/** 부모가 보내는 메시지(iframe이 수신). */
|
|
30
|
-
export type PreviewOutbound = PreviewRenderMessage;
|
|
68
|
+
export type PreviewOutbound = PreviewRenderMessage | PreviewHighlightMessage;
|
|
31
69
|
/** 부모가 받는 메시지(iframe이 송신). */
|
|
32
|
-
export type PreviewInbound = PreviewReadyMessage | PreviewResizeMessage | PreviewErrorMessage;
|
|
70
|
+
export type PreviewInbound = PreviewReadyMessage | PreviewResizeMessage | PreviewErrorMessage | PreviewSelectMessage | PreviewDropMessage;
|
|
33
71
|
export declare function renderMessage(model: PartModel, revision: number): PreviewRenderMessage;
|
|
34
72
|
export declare function readyMessage(): PreviewReadyMessage;
|
|
35
73
|
export declare function resizeMessage(height: number): PreviewResizeMessage;
|
|
36
74
|
export declare function errorMessage(message: string): PreviewErrorMessage;
|
|
75
|
+
export declare function selectMessage(partId: string | null): PreviewSelectMessage;
|
|
76
|
+
export declare function highlightMessage(partId: string | null): PreviewHighlightMessage;
|
|
77
|
+
export declare function dropMessage(dragKind: 'add' | 'move', payload: string, targetPartId: string | null, zone: DropZone): PreviewDropMessage;
|
|
37
78
|
/** 부모 수신 필터 — iframe이 보낸 ready/resize/error만 통과. */
|
|
38
79
|
export declare function isPreviewInbound(data: unknown): data is PreviewInbound;
|
|
39
80
|
/** iframe 수신 필터 — 부모가 보낸 render만 통과. */
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.pv-frame[data-v-71e6eb5f]{display:flex;flex-direction:column}.pv-logo[data-v-71e6eb5f]{padding-left:16px}.pv-content[data-v-71e6eb5f]{padding:16px}.pv-layout[data-v-0be0a6f1]{min-width:0}.pv-card[data-v-0be0a6f1]{margin:4px 0}.pv-grid[data-v-0be0a6f1]{margin:4px 0;min-width:0}.pv-leaf[data-v-0be0a6f1]{display:inline-block}.pv-field[data-v-0be0a6f1]{display:flex;flex-direction:column;gap:2px;min-width:0}.pv-field .pv-leaf[data-v-0be0a6f1]{display:block}.pv-placeholder[data-v-0be0a6f1]{font-size:12px;color:#94a3b8;padding:4px 6px;border:1px dashed #cbd5e1;border-radius:4px;margin:4px 0}.pv-empty-state[data-v-0be0a6f1]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:72px;padding:12px;margin:4px 0;border:1px solid #e2e8f0;border-radius:6px;background:#f8fafc;color:#64748b}.pv-empty-state-icon[data-v-0be0a6f1]{font-family:Material Symbols Outlined;font-size:28px;line-height:1;color:#94a3b8}.pv-empty-state-label[data-v-0be0a6f1]{font-size:13px;font-weight:600;color:#475569}.pv-empty-state-hint[data-v-0be0a6f1]{font-size:11px;color:#94a3b8}.pv-root[data-v-c59d7bca]{padding:12px;font-family:system-ui,sans-serif}.pv-empty[data-v-c59d7bca]{color:#94a3b8;font-size:13px}
|