@g1cloud/ui-modeler-next 5.0.0-alpha.8 → 5.0.0-alpha.9

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.
Files changed (28) hide show
  1. package/dist/preview/assets/{BSAlertModal-DBRQ0cCa-C73eZaze.js → BSAlertModal-DBRQ0cCa-CigXGA-U.js} +1 -1
  2. package/dist/preview/assets/{BSGridColumnSettingModal-C7xgLov6-DMlfJD9n.js → BSGridColumnSettingModal-C7xgLov6-FbgzMqxq.js} +1 -1
  3. package/dist/preview/assets/{BSRichTextMaximizedModal-D4w5hGdQ-CQ7wFv4j.js → BSRichTextMaximizedModal-D4w5hGdQ-BXNSoK72.js} +1 -1
  4. package/dist/preview/assets/{BSYesNoModal-Dj2nMArb-TqxPznXt.js → BSYesNoModal-Dj2nMArb-CuDGkN_r.js} +1 -1
  5. package/dist/preview/assets/{BSYoutubeInputModal-Mro_98AC-B6upksIx.js → BSYoutubeInputModal-Mro_98AC-Ymz4JdiS.js} +1 -1
  6. package/dist/preview/assets/{ImageInsertModal-DeL97iRr-BIVv-r6P.js → ImageInsertModal-DeL97iRr-C6mfU8fR.js} +1 -1
  7. package/dist/preview/assets/{ImageProperties.vue_vue_type_script_setup_true_lang-DCv-pBh_-lYwGLrld.js → ImageProperties.vue_vue_type_script_setup_true_lang-DCv-pBh_-B6JyC4mm.js} +1 -1
  8. package/dist/preview/assets/{ImagePropertiesModal-DD6cl6c0-DZaNaGWF.js → ImagePropertiesModal-DD6cl6c0-SWgb4CoW.js} +1 -1
  9. package/dist/preview/assets/{LinkPropertiesModal-CkgkjB7g-CP9nnQA-.js → LinkPropertiesModal-CkgkjB7g-CG8ZyNg5.js} +1 -1
  10. package/dist/preview/assets/{TableInsertModal-CNnGZuaP-9vXSXL3z.js → TableInsertModal-CNnGZuaP-DVOtcTN4.js} +1 -1
  11. package/dist/preview/assets/{TablePropertiesModal-BYjN7jg3-D0ouZ8nW.js → TablePropertiesModal-BYjN7jg3-R2SXrico.js} +1 -1
  12. package/dist/preview/assets/{VideoInsertModal-DIIzKI53-JJAgBeYK.js → VideoInsertModal-DIIzKI53-D6kRSOj0.js} +1 -1
  13. package/dist/preview/assets/{VideoProperties.vue_vue_type_script_setup_true_lang-BR8B1ON_-BZEmxAM1.js → VideoProperties.vue_vue_type_script_setup_true_lang-BR8B1ON_-CWTltBAK.js} +1 -1
  14. package/dist/preview/assets/{VideoPropertiesModal-DyMdwd1w-D4pRxiMM.js → VideoPropertiesModal-DyMdwd1w-DEc15QUZ.js} +1 -1
  15. package/dist/preview/assets/{YoutubeInsertModal-BSIDbYkd-jz0A6rji.js → YoutubeInsertModal-BSIDbYkd-Ch6pPIqU.js} +1 -1
  16. package/dist/preview/assets/{YoutubeProperties.vue_vue_type_script_setup_true_lang-BlmuRJva-C16bkOGp.js → YoutubeProperties.vue_vue_type_script_setup_true_lang-BlmuRJva-bFkRNnqH.js} +1 -1
  17. package/dist/preview/assets/{YoutubePropertiesModal-VDPQiwEJ-DBGLNXqD.js → YoutubePropertiesModal-VDPQiwEJ-0ufjNj1C.js} +1 -1
  18. package/dist/preview/assets/preview-CaxJbErF.css +1 -0
  19. package/dist/preview/assets/{preview-CHK7Vd6U.js → preview-Cor-RDYB.js} +40 -40
  20. package/dist/preview/preview.html +2 -2
  21. package/dist/ui-modeler-next.css +1 -1
  22. package/dist/ui-modeler.js +506 -491
  23. package/dist/ui-modeler.umd.cjs +1 -1
  24. package/dist/view/layout.d.ts +13 -2
  25. package/dist/view/preview/IframePreview.vue.d.ts +6 -0
  26. package/dist/view/preview/protocol.d.ts +15 -2
  27. package/package.json +1 -1
  28. package/dist/preview/assets/preview-D_Yvfk8p.css +0 -1
@@ -1,5 +1,6 @@
1
1
  import { PartModel } from '../core/types';
2
2
  import { PartType } from '../core/partType';
3
+ import { MultiLangText } from '../core/lang';
3
4
  /**
4
5
  * 컨테이너 렌더 종류. flex/grid는 CSS로 직접 낮추고, card/tabs는 실 BS 컴포넌트에 위임(PreviewNode 분기).
5
6
  * slot = 단일 슬롯 홀더(InternalLayoutArea/TableLayoutCell/TabSheetPanel/GridCellPanel/ListField),
@@ -57,6 +58,11 @@ export declare function childLayoutStyle(child: PartModel, parent: LayoutKind):
57
58
  */
58
59
  export interface GridColumnSpec {
59
60
  propertyId: string;
61
+ /**
62
+ * 컬럼 헤더 표시 문자열(이미 flatten). 우선순위 = **리졸버 해소분**(부모가 주입한 메시지 카탈로그) →
63
+ * 평문 caption → `actualPropertyId`(읽을 수 있는 구조 식별자). 캡션 경로와 달리 미해소 키를 `#{key}`로
64
+ * 폴백하지 않는다 — 컬럼엔 `itemCode` 같은 propertyId가 `#{ecp.itemCode}`보다 읽기 좋기 때문.
65
+ */
60
66
  caption: string;
61
67
  width?: number;
62
68
  /** ColumnDef cellType 중 BSGrid GridCellType과 교집합인 값만(그 외는 생략→기본 TEXT 렌더). */
@@ -67,8 +73,13 @@ export interface GridColumnSpec {
67
73
  * 자식 노드로 재귀 렌더하지 않고 **컬럼 정의로 소비**한다(현 fallback: ColumnDef가 점선 플레이스홀더로 렌더).
68
74
  *
69
75
  * - `propertyId` ← `actualPropertyId`(없으면 partId).
70
- * - `caption` ← `caption`(평문일 때만; messageKey/맵은 프리뷰에서 표시 불가 → `actualPropertyId`로 폴백).
76
+ * - `caption` ← 리졸버 해소분(부모 메시지 카탈로그, 옵션) 평문 `caption` → `actualPropertyId` 폴백.
71
77
  * - `width` ← `width`("90px"→90, 단위/공백 무시). 파싱 실패 시 생략(BSGrid 기본 폭).
72
78
  * - `cellType` ← `cellType`(BSGrid 교집합 4종만; 그 외 생략).
79
+ *
80
+ * `resolve`는 프리뷰 메시지 카탈로그 해소기(`preview/messages.resolveCaptionText`)를 주입받는 seam이다.
81
+ * 순수 lib 모듈이 preview 반응형 스토어에 결합하지 않도록 **옵션 파라미터**로 역주입한다(불변식 #1 계층 유지).
82
+ * 미지정 시 현행(평문/`actualPropertyId`) 동작 — 호출자·기존 테스트 무변경. 미해소 메시지 키는 `#{key}`가
83
+ * 아니라 `actualPropertyId`로 폴백한다(캡션 경로와 의도적 상이, `GridColumnSpec.caption` 참조).
73
84
  */
74
- export declare function gridColumnsOf(part: PartModel): GridColumnSpec[];
85
+ export declare function gridColumnsOf(part: PartModel, resolve?: (t: MultiLangText) => string | undefined): GridColumnSpec[];
@@ -6,6 +6,11 @@ type __VLS_Props = {
6
6
  revision?: number;
7
7
  /** 현재 선택 partId — iframe에 highlight로 push(실물 위 선택 아웃라인 동기화). */
8
8
  selection?: string | null;
9
+ /**
10
+ * 메시지 카탈로그(key→표시텍스트) — iframe에 catalog로 push해 캡션 `#{key}`를 실 텍스트로 해소한다.
11
+ * 미지정/빈 맵이면 iframe이 지금처럼 `#{key}` 폴백. 실 출처는 호스트 번들, dev는 illustrative fixture.
12
+ */
13
+ messages?: Record<string, string>;
9
14
  /** iframe 진입 문서 URL(자체 bluesea@5.x 렌더러 번들). */
10
15
  src: string;
11
16
  /** postMessage targetOrigin — 기본 동일 출처('/'). 교차 출처면 명시. */
@@ -26,6 +31,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
26
31
  }>, {
27
32
  revision: number;
28
33
  selection: string | null;
34
+ messages: Record<string, string>;
29
35
  targetOrigin: string;
30
36
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
31
37
  export default _default;
@@ -46,6 +46,18 @@ export interface PreviewHighlightMessage {
46
46
  type: 'highlight';
47
47
  partId: string | null;
48
48
  }
49
+ /**
50
+ * 부모 → iframe: 메시지 카탈로그 push(캡션 `#{key}` 해소용). 프리뷰엔 메시지 리소스가 없어 실샘플 캡션의
51
+ * 대부분(레거시 `#{key}` 형)이 미해소인데, 부모가 key→표시텍스트 맵을 push하면 실 텍스트로 렌더된다(맵에
52
+ * 없는 키는 지금처럼 `#{key}` 폴백). **모델과 직교**(편집마다 안 바뀜)라 render와 분리 — ready 후 1회 +
53
+ * 카탈로그 변경 시 push. 반응형 해소라 render보다 늦게 도착해도 캡션이 재평가된다.
54
+ */
55
+ export interface PreviewCatalogMessage {
56
+ channel: typeof PREVIEW_CHANNEL;
57
+ type: 'catalog';
58
+ /** 메시지 키 → 표시 텍스트(활성 locale 평면 맵). */
59
+ messages: Record<string, string>;
60
+ }
49
61
  /**
50
62
  * iframe → 부모: 실물 위 드롭 → 구조 편집(Path C, C-a). iframe은 **hit 리포터**로서 드롭 지점의 대상
51
63
  * 파트(`data-part-id`)와 존(`dropZoneAt` 로컬 판정)만 실어 보내고, **모델 변형은 부모 controller**가
@@ -65,7 +77,7 @@ export interface PreviewDropMessage {
65
77
  zone: DropZone;
66
78
  }
67
79
  /** 부모가 보내는 메시지(iframe이 수신). */
68
- export type PreviewOutbound = PreviewRenderMessage | PreviewHighlightMessage;
80
+ export type PreviewOutbound = PreviewRenderMessage | PreviewHighlightMessage | PreviewCatalogMessage;
69
81
  /** 부모가 받는 메시지(iframe이 송신). */
70
82
  export type PreviewInbound = PreviewReadyMessage | PreviewResizeMessage | PreviewErrorMessage | PreviewSelectMessage | PreviewDropMessage;
71
83
  export declare function renderMessage(model: PartModel, revision: number): PreviewRenderMessage;
@@ -74,8 +86,9 @@ export declare function resizeMessage(height: number): PreviewResizeMessage;
74
86
  export declare function errorMessage(message: string): PreviewErrorMessage;
75
87
  export declare function selectMessage(partId: string | null): PreviewSelectMessage;
76
88
  export declare function highlightMessage(partId: string | null): PreviewHighlightMessage;
89
+ export declare function catalogMessage(messages: Record<string, string>): PreviewCatalogMessage;
77
90
  export declare function dropMessage(dragKind: 'add' | 'move', payload: string, targetPartId: string | null, zone: DropZone): PreviewDropMessage;
78
91
  /** 부모 수신 필터 — iframe이 보낸 ready/resize/error만 통과. */
79
92
  export declare function isPreviewInbound(data: unknown): data is PreviewInbound;
80
- /** iframe 수신 필터 — 부모가 보낸 render만 통과. */
93
+ /** iframe 수신 필터 — 부모가 보낸 render/highlight/catalog만 통과. */
81
94
  export declare function isPreviewOutbound(data: unknown): data is PreviewOutbound;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@g1cloud/ui-modeler-next",
3
3
  "private": false,
4
- "version": "5.0.0-alpha.8",
4
+ "version": "5.0.0-alpha.9",
5
5
  "description": "Vue 3 visual UI-modeling / screen-design editor",
6
6
  "type": "module",
7
7
  "files": [
@@ -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-selected[data-v-891c387b]{outline:2px solid #2563eb;outline-offset:1px;border-radius:2px}.pv-layout[data-v-891c387b]{min-width:0}.pv-card[data-v-891c387b]{margin:4px 0}.pv-grid[data-v-891c387b]{margin:4px 0;min-width:0}.pv-leaf[data-v-891c387b]{display:inline-block}.pv-field[data-v-891c387b]{display:flex;flex-direction:column;gap:2px;min-width:0}.pv-field .pv-leaf[data-v-891c387b]{display:block}.pv-placeholder[data-v-891c387b]{font-size:12px;color:#94a3b8;padding:4px 6px;border:1px dashed #cbd5e1;border-radius:4px;margin:4px 0}.pv-empty-state[data-v-891c387b]{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-891c387b]{font-family:Material Symbols Outlined;font-size:28px;line-height:1;color:#94a3b8}.pv-empty-state-label[data-v-891c387b]{font-size:13px;font-weight:600;color:#475569}.pv-empty-state-hint[data-v-891c387b]{font-size:11px;color:#94a3b8}.pv-root[data-v-280fb755]{position:relative;padding:12px;font-family:system-ui,sans-serif}.pv-empty[data-v-280fb755]{color:#94a3b8;font-size:13px}.pv-drop-indicator[data-v-280fb755]{position:absolute;z-index:50;pointer-events:none;--pv-drop: #3b82f6}.pv-drop-box[data-v-280fb755]{outline:2px dashed var(--pv-drop);outline-offset:1px;border-radius:4px;background:#3b82f614}.pv-drop-line[data-v-280fb755]{background:var(--pv-drop);border-radius:2px}.pv-grab[data-v-280fb755]{position:absolute;z-index:60;display:flex;align-items:center;justify-content:center;width:18px;height:18px;margin-top:-9px;margin-left:-9px;border-radius:4px;background:#2563eb;color:#fff;font-size:11px;line-height:1;cursor:grab;-webkit-user-select:none;user-select:none;box-shadow:0 1px 3px #0000004d}.pv-grab[data-v-280fb755]:active{cursor:grabbing}