@leviosa-ai/detail-page-editor 0.11.2 → 0.11.4
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.
|
@@ -26,6 +26,7 @@ import {
|
|
|
26
26
|
import { useTranslation } from "react-i18next";
|
|
27
27
|
|
|
28
28
|
import { observer } from "./canvas-observer";
|
|
29
|
+
import { detailPageEditorProfile } from "../../lib/detail-page/editor-profile";
|
|
29
30
|
import {
|
|
30
31
|
applySectionHeight,
|
|
31
32
|
type SectionHeightPage,
|
|
@@ -56,7 +57,9 @@ export const SectionHeightHandle = observer(function SectionHeightHandle({
|
|
|
56
57
|
history?: HistoryLike;
|
|
57
58
|
}) {
|
|
58
59
|
const { t } = useTranslation("branding");
|
|
59
|
-
const drag = useRef<{ pointerId: number; y: number; base: number } | null>(
|
|
60
|
+
const drag = useRef<{ pointerId: number; y: number; base: number } | null>(
|
|
61
|
+
null,
|
|
62
|
+
);
|
|
60
63
|
const [dragging, setDragging] = useState(false);
|
|
61
64
|
const height = Math.round(Number(page.computedHeight) || 0);
|
|
62
65
|
|
|
@@ -65,7 +68,7 @@ export const SectionHeightHandle = observer(function SectionHeightHandle({
|
|
|
65
68
|
// Konva 가 이 누름을 보면 캔버스 빈 곳 클릭으로 읽어 선택을 풀어 버린다.
|
|
66
69
|
e.preventDefault();
|
|
67
70
|
e.stopPropagation();
|
|
68
|
-
e.currentTarget.setPointerCapture(e.pointerId);
|
|
71
|
+
e.currentTarget.setPointerCapture?.(e.pointerId);
|
|
69
72
|
history?.startTransaction?.();
|
|
70
73
|
drag.current = { pointerId: e.pointerId, y: e.clientY, base: height };
|
|
71
74
|
setDragging(true);
|
|
@@ -115,15 +118,33 @@ export const SectionHeightHandle = observer(function SectionHeightHandle({
|
|
|
115
118
|
pointerEvents: "auto",
|
|
116
119
|
}}
|
|
117
120
|
>
|
|
121
|
+
{/* 흰 알약 + 테두리. 예전에는 반투명 회색 막대 하나였는데, 사진이나 어두운
|
|
122
|
+
배경으로 끝나는 장 밑에서는 배경에 묻혀 «없어진» 것처럼 보였다. */}
|
|
118
123
|
<div
|
|
119
124
|
style={{
|
|
120
|
-
width: dragging ? 64 :
|
|
121
|
-
height:
|
|
125
|
+
width: dragging ? 64 : 48,
|
|
126
|
+
height: 10,
|
|
122
127
|
borderRadius: 999,
|
|
123
|
-
|
|
128
|
+
display: "flex",
|
|
129
|
+
alignItems: "center",
|
|
130
|
+
justifyContent: "center",
|
|
131
|
+
background: dragging ? "rgb(139, 92, 246)" : "rgba(255,255,255,0.96)",
|
|
132
|
+
border: dragging ? "none" : "1px solid rgba(23,23,23,0.18)",
|
|
133
|
+
boxShadow: "0 1px 3px rgba(0,0,0,0.18)",
|
|
124
134
|
transition: "width 120ms ease, background 120ms ease",
|
|
125
135
|
}}
|
|
126
|
-
|
|
136
|
+
>
|
|
137
|
+
<div
|
|
138
|
+
style={{
|
|
139
|
+
width: 22,
|
|
140
|
+
height: 2,
|
|
141
|
+
borderRadius: 999,
|
|
142
|
+
background: dragging
|
|
143
|
+
? "rgba(255,255,255,0.9)"
|
|
144
|
+
: "rgba(23,23,23,0.45)",
|
|
145
|
+
}}
|
|
146
|
+
/>
|
|
147
|
+
</div>
|
|
127
148
|
{dragging ? (
|
|
128
149
|
<span
|
|
129
150
|
style={{
|
|
@@ -196,7 +217,9 @@ export const CanvasSectionHeightHandle = observer(
|
|
|
196
217
|
const measure = () => {
|
|
197
218
|
const host = containerRef.current;
|
|
198
219
|
const node = pageId
|
|
199
|
-
? host?.querySelector<HTMLElement>(
|
|
220
|
+
? host?.querySelector<HTMLElement>(
|
|
221
|
+
`[data-lc-page="${CSS.escape(pageId)}"]`,
|
|
222
|
+
)
|
|
200
223
|
: null;
|
|
201
224
|
const next: Box | null =
|
|
202
225
|
host && node
|
|
@@ -249,6 +272,8 @@ export const CanvasSectionHeightHandle = observer(
|
|
|
249
272
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
250
273
|
}, [pageId, scrollRef]);
|
|
251
274
|
|
|
275
|
+
// 캐러셀 판은 1080×1350 고정이다 — 끌 수 있는 손잡이를 두면 안 된다.
|
|
276
|
+
if (detailPageEditorProfile().page.fixed) return null;
|
|
252
277
|
if (!page || !box) return null;
|
|
253
278
|
|
|
254
279
|
return (
|
|
@@ -261,14 +286,12 @@ export const CanvasSectionHeightHandle = observer(
|
|
|
261
286
|
width: box.width,
|
|
262
287
|
height: box.height,
|
|
263
288
|
pointerEvents: "none",
|
|
264
|
-
|
|
289
|
+
// 아래 띠(페이지 목록)와 하단 독보다 위다. 장의 아래 끝이 화면 밑쪽에
|
|
290
|
+
// 오면 그것들이 손잡이를 덮어서 «없어진» 것처럼 보였다.
|
|
291
|
+
zIndex: 31,
|
|
265
292
|
}}
|
|
266
293
|
>
|
|
267
|
-
<SectionHeightHandle
|
|
268
|
-
page={page}
|
|
269
|
-
scale={scale}
|
|
270
|
-
history={s.history}
|
|
271
|
-
/>
|
|
294
|
+
<SectionHeightHandle page={page} scale={scale} history={s.history} />
|
|
272
295
|
</div>
|
|
273
296
|
);
|
|
274
297
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leviosa-ai/detail-page-editor",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.4",
|
|
4
4
|
"description": "Leviosa detail-page editor shell. Source-only: consumers compile it through Next transpilePackages. Every app coupling (sourcing server, brand store, cache keys, toast) arrives through the DetailPageHost interface, and every URL it fetches comes from configureDetailPageEditor.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "UNLICENSED",
|