@ihabdevteam/core 0.423.0 → 0.425.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/CHANGELOG.md +185 -0
- package/README.md +9 -4
- package/dist/components.cjs.js +183 -183
- package/dist/components.esm.css +1 -1
- package/dist/hooks.cjs.js +5 -5
- package/dist/i18n.cjs.js +1 -1
- package/dist/ihabdevteam-core-tokens.css +1 -1
- package/dist/ihabdevteam-core.cjs.js +191 -191
- package/dist/ihabdevteam-core.css +1 -1
- package/dist/ihabdevteam-core.d.ts +138 -3
- package/dist/packages/core/src/components/HeroVisual.css +390 -0
- package/dist/packages/core/src/components/HeroVisual.d.ts +102 -0
- package/dist/packages/core/src/components/HeroVisual.js +435 -0
- package/dist/packages/core/src/components/Word/WordTableBlock.d.ts +1 -1
- package/dist/packages/core/src/components/Word/WordTableBlock.js +3 -3
- package/dist/packages/core/src/components/Word/wordTableBlockTypes.d.ts +6 -0
- package/dist/packages/core/src/components/WordTable.d.ts +18 -1
- package/dist/packages/core/src/components/WordTable.js +2 -2
- package/dist/packages/core/src/components.d.ts +2 -0
- package/dist/packages/core/src/components.js +1 -0
- package/dist/packages/core/src/hooks/useWordPoolViability.d.ts +24 -0
- package/dist/packages/core/src/hooks/useWordPoolViability.js +101 -0
- package/dist/packages/core/src/hooks/useWordTrainingFilter.d.ts +6 -42
- package/dist/packages/core/src/hooks/useWordTrainingFilter.js +16 -245
- package/dist/packages/core/src/hooks/wordTrainingFilterSections.d.ts +120 -0
- package/dist/packages/core/src/hooks/wordTrainingFilterSections.js +183 -0
- package/dist/packages/core/src/styles.css +6 -1
- package/dist/packages/core/src/tokens.css +17 -7
- package/dist/packages/core/src/version.d.ts +1 -1
- package/dist/packages/core/src/version.js +1 -1
- package/dist/utils.cjs.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,435 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { useEffect, useId, useRef } from 'react';
|
|
4
|
+
import { cx } from '../utils/cx';
|
|
5
|
+
import { devWarnOnce } from '../utils/devWarn';
|
|
6
|
+
import './HeroVisual.css';
|
|
7
|
+
/**
|
|
8
|
+
* **가장 늦게 드는 조각의 차례.** 조각이 여럿인 꼴에서 마지막 조각은 한 바퀴의 이만큼
|
|
9
|
+
* 뒤에 끝난다 — `onCycleEnd` 를 어림잡을 때 쓴다(잰 값을 못 읽는 자리에서만).
|
|
10
|
+
*
|
|
11
|
+
* 아래 `enter(…, { turn })` 가운데 가장 큰 값보다 작으면 **다 나가기 전에 알리게**
|
|
12
|
+
* 되므로, `test/heroVisual1109.test.tsx` 가 실제 차례와 맞대어 센다.
|
|
13
|
+
*/
|
|
14
|
+
const LATEST_TURN = 0.15;
|
|
15
|
+
/**
|
|
16
|
+
* 제 자리에서 계속 도는 움직임 — 숨·떨림·떠다님.
|
|
17
|
+
*
|
|
18
|
+
* **`backwards` 가 있어야 한다**(말귀 요청 384, 2026-11-09). 늦춰 시작하는 조각은
|
|
19
|
+
* 기다리는 동안 **안 움직인 모습**으로 서 있다가, 제 차례가 오는 순간 틀의 0% 로
|
|
20
|
+
* **뛰어든다** — 0% 가 제자리와 다른 틀이 다 걸린다(`sway` 는 6도, `blink` 는 짙기
|
|
21
|
+
* 0.75 만큼 튄다. 말귀 실측: `dotGrid` 에서 300ms 간격으로 일곱 번).
|
|
22
|
+
*
|
|
23
|
+
* `backwards` 는 기다리는 동안을 **0% 의 모습**으로 채운다 — 그래서 안 튄다.
|
|
24
|
+
*/
|
|
25
|
+
function spin(name, seconds, delay = 0) {
|
|
26
|
+
return { animation: `hero-visual-${name} ${seconds}s ease-in-out ${delay}s infinite backwards` };
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* **들고 나는 움직임** — 한 바퀴와 같은 시간을 쓴다.
|
|
30
|
+
*
|
|
31
|
+
* `turn` 은 **차례**다(한 바퀴에 대한 비율). 조각이 여럿인 꼴에서 0.03 씩 밀면 하나씩
|
|
32
|
+
* 돋는 것으로 보인다. `backwards` 가 있어야 제 차례 전에는 "아직 안 나온 모습" 으로
|
|
33
|
+
* 선다 — 없으면 기다리는 동안 **다 그려진 채로** 있다가 갑자기 사라진다.
|
|
34
|
+
*/
|
|
35
|
+
function enter(name, opts = {}) {
|
|
36
|
+
return {
|
|
37
|
+
className: `hero-visual__in hero-visual__in--${name}`,
|
|
38
|
+
style: {
|
|
39
|
+
transformOrigin: opts.origin,
|
|
40
|
+
'--hero-visual-turn': opts.turn ?? 0,
|
|
41
|
+
...opts.vars,
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
/** 선이 제 손으로 그어지게 한다 — 길이에 안 매이도록 `pathLength` 를 1 로 둔다 */
|
|
46
|
+
const DRAWN = { pathLength: 1, strokeDasharray: '1 1' };
|
|
47
|
+
/** 제자리에서 커지거나 도는 것은 **제 중심**을 축으로 삼아야 한다 */
|
|
48
|
+
const SELF = { transformBox: 'fill-box', transformOrigin: 'center' };
|
|
49
|
+
/** 브랜드에서 끌어낸 한 줄기 — 1 이 가장 짙고 6 이 가장 옅다(`HeroVisual.css` 머리말) */
|
|
50
|
+
const C = {
|
|
51
|
+
c1: 'var(--hero-visual-1)',
|
|
52
|
+
c2: 'var(--hero-visual-2)',
|
|
53
|
+
c3: 'var(--hero-visual-3)',
|
|
54
|
+
c4: 'var(--hero-visual-4)',
|
|
55
|
+
c5: 'var(--hero-visual-5)',
|
|
56
|
+
c6: 'var(--hero-visual-6)',
|
|
57
|
+
};
|
|
58
|
+
const RAMP = [C.c1, C.c2, C.c3, C.c4, C.c5, C.c6];
|
|
59
|
+
/** 원 위에 고르게 놓는다 — 0도는 오른쪽, 시계 방향(SVG 는 y 가 아래로 자란다) */
|
|
60
|
+
function around(cx, cy, radius, count) {
|
|
61
|
+
return Array.from({ length: count }, (_, i) => {
|
|
62
|
+
const a = (i / count) * Math.PI * 2;
|
|
63
|
+
return { x: cx + radius * Math.cos(a), y: cy + radius * Math.sin(a) };
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
const ART = {
|
|
67
|
+
/* **피어난다** — 가운데에서 커지며 서고, 번지며 걷힌다 */
|
|
68
|
+
blobs: {
|
|
69
|
+
viewBox: '0 20 660 660',
|
|
70
|
+
width: 660,
|
|
71
|
+
height: 660,
|
|
72
|
+
render: (u) => (_jsxs(_Fragment, { children: [_jsxs("defs", { children: [_jsxs("linearGradient", { id: `${u}-big`, x1: "0", y1: "0", x2: "1", y2: "1", children: [_jsx("stop", { offset: ".5", stopColor: "var(--color-main)" }), _jsx("stop", { offset: ".8", stopColor: "var(--color-sub)" })] }), _jsxs("linearGradient", { id: `${u}-small`, x1: "0", y1: "0", x2: "1", y2: "1", children: [_jsx("stop", { offset: ".5", stopColor: "var(--color-sub)" }), _jsx("stop", { offset: ".8", stopColor: "color-mix(in srgb, #ffffbb 30%, var(--color-sub))" })] })] }), _jsx("g", { ...enter('bloom', { turn: 0, origin: '330px 350px' }), children: _jsxs("g", { style: spin('blob-1', 22), children: [_jsx("circle", { cx: 330, cy: 350, r: 240, fill: `url(#${u}-big)` }), [
|
|
73
|
+
{ stroke: 'rgba(77, 205, 192, 0.45)', delay: 0 },
|
|
74
|
+
{ stroke: 'rgba(73, 156, 223, 0.35)', delay: 1.35 },
|
|
75
|
+
{ stroke: 'rgba(77, 205, 192, 0.25)', delay: 2.7 },
|
|
76
|
+
].map((ring) => (_jsx("circle", { className: "hero-visual__ring", cx: 330, cy: 350, r: 241, fill: "none", stroke: ring.stroke, strokeWidth: 2, style: { ...SELF, animation: `hero-visual-wave 4s ease-out ${ring.delay}s infinite backwards` } }, ring.delay)))] }) }), _jsx("g", { ...enter('bloom', { turn: 0.06, origin: '490px 490px' }), children: _jsx("circle", { cx: 490, cy: 490, r: 100, fill: `url(#${u}-small)`, style: spin('blob-2', 17, -5) }) })] })),
|
|
77
|
+
},
|
|
78
|
+
/* **제 손으로 그어진다** — 관이 한쪽 끝에서 자라 반대쪽으로 흘러갔다 지워진다 */
|
|
79
|
+
ribbon: {
|
|
80
|
+
viewBox: '-40 140 880 294',
|
|
81
|
+
width: 880,
|
|
82
|
+
height: 294,
|
|
83
|
+
render: (u) => {
|
|
84
|
+
const road = 'M-40,420 C140,470 240,330 360,340 S520,500 600,400 S560,200 440,250 S480,420 580,360 S740,200 840,140';
|
|
85
|
+
const tail = 'M440,250 C320,300 480,420 580,360 S740,200 840,140';
|
|
86
|
+
return (_jsxs(_Fragment, { children: [_jsxs("defs", { children: [_jsxs("linearGradient", { id: `${u}-rib`, gradientUnits: "userSpaceOnUse", x1: "0", y1: "420", x2: "760", y2: "120", children: [_jsx("stop", { offset: "0", stopColor: C.c1 }), _jsx("stop", { offset: ".4", stopColor: C.c3 }), _jsx("stop", { offset: ".7", stopColor: C.c4 }), _jsx("stop", { offset: "1", stopColor: C.c6 })] }), _jsxs("mask", { id: `${u}-mask`, maskUnits: "userSpaceOnUse", x: "-100", y: "-100", width: "1000", height: "800", children: [_jsx("rect", { x: "-100", y: "-100", width: "1000", height: "800", fill: "#000" }), _jsx("path", { d: road, fill: "none", stroke: "#fff", strokeWidth: 62, strokeLinecap: "round" })] }), _jsx("filter", { id: `${u}-blur`, x: "-20%", y: "-20%", width: "140%", height: "140%", children: _jsx("feGaussianBlur", { stdDeviation: "9" }) })] }), _jsxs("g", { style: spin('floaty', 7), children: [_jsx("path", { d: road, fill: "none", stroke: `url(#${u}-rib)`, strokeWidth: 64, strokeLinecap: "round", strokeLinejoin: "round", ...DRAWN, ...enter('draw') }), _jsx("g", { mask: `url(#${u}-mask)`, ...enter('fade', { turn: 0.04 }), children: _jsx("path", { d: tail, fill: "none", stroke: C.c1, strokeWidth: 64, strokeLinecap: "butt", strokeDasharray: "0 130 3000", opacity: ".34", filter: `url(#${u}-blur)`, transform: "translate(0,10)" }) }), _jsx("path", { d: tail, fill: "none", stroke: `url(#${u}-rib)`, strokeWidth: 64, strokeLinecap: "round", strokeLinejoin: "round", ...DRAWN, ...enter('draw', { turn: 0.06 }) })] })] }));
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
/* **떠오른다** — 아래에서 하나씩 올라와 서고, 위로 빠진다 */
|
|
90
|
+
spheres: {
|
|
91
|
+
viewBox: '0 -10 640 580',
|
|
92
|
+
width: 640,
|
|
93
|
+
height: 580,
|
|
94
|
+
render: (u) => {
|
|
95
|
+
const balls = [
|
|
96
|
+
{ cx: 450, cy: 240, r: 190, fill: `url(#${u}-halo)`, opacity: 0.8, blur: true, idle: spin('breathe', 9), self: true, turn: 0 },
|
|
97
|
+
{ cx: 275, cy: 45, r: 55, fill: `url(#${u}-drop)`, idle: spin('drift', 8), turn: 0.09 },
|
|
98
|
+
{ cx: 310, cy: 310, r: 160, fill: `url(#${u}-lime)`, idle: spin('floaty', 7), turn: 0.03 },
|
|
99
|
+
{ cx: 150, cy: 430, r: 150, fill: `url(#${u}-fade)`, opacity: 0.75, blend: true, idle: spin('floaty', 7, 2.5), turn: 0.06 },
|
|
100
|
+
{ cx: 361, cy: 521, r: 21, fill: `url(#${u}-bead)`, idle: spin('drift', 6, 1), turn: 0.12 },
|
|
101
|
+
/* 아래 `origin` 이 없으면 `scale(.78)` 이 좌표계의 0, 0 을 향해 줄어들어
|
|
102
|
+
**구체가 왼쪽 위로 끌려간다**(`flower` 에서 겪은 것과 같은 자리). */
|
|
103
|
+
];
|
|
104
|
+
return (_jsxs(_Fragment, { children: [_jsxs("defs", { children: [_jsxs("radialGradient", { id: `${u}-halo`, cx: ".4", cy: ".4", r: ".85", children: [_jsx("stop", { offset: "0", stopColor: C.c5 }), _jsx("stop", { offset: ".55", stopColor: C.c2 }), _jsx("stop", { offset: ".72", stopColor: "#ffffff" }), _jsx("stop", { offset: "1", stopColor: "#ffffff" })] }), _jsxs("linearGradient", { id: `${u}-drop`, x1: "0", y1: "0", x2: "0", y2: "1", children: [_jsx("stop", { offset: "0", stopColor: C.c1 }), _jsx("stop", { offset: ".7", stopColor: C.c5 }), _jsx("stop", { offset: "1", stopColor: C.c5, stopOpacity: "0" })] }), _jsxs("linearGradient", { id: `${u}-lime`, x1: ".67", y1: ".03", x2: ".33", y2: ".97", children: [_jsx("stop", { offset: "0", stopColor: C.c6 }), _jsx("stop", { offset: ".45", stopColor: C.c4 }), _jsx("stop", { offset: "1", stopColor: C.c1 })] }), _jsxs("linearGradient", { id: `${u}-fade`, x1: "0", y1: "0", x2: "0", y2: "1", children: [_jsx("stop", { offset: "0", stopColor: C.c1 }), _jsx("stop", { offset: ".45", stopColor: C.c3 }), _jsx("stop", { offset: ".95", stopColor: C.c3, stopOpacity: "0" })] }), _jsxs("linearGradient", { id: `${u}-bead`, x1: "0", y1: "0", x2: "0", y2: "1", children: [_jsx("stop", { offset: "0", stopColor: C.c4 }), _jsx("stop", { offset: "1", stopColor: C.c1 })] }), _jsx("filter", { id: `${u}-soft`, x: "-30%", y: "-30%", width: "160%", height: "160%", children: _jsx("feGaussianBlur", { stdDeviation: "34" }) })] }), balls.map((b) => (_jsx("g", { ...enter('settle', { turn: b.turn, origin: `${b.cx}px ${b.cy}px` }), children: _jsx("circle", { className: b.blend ? 'hero-visual__blades' : undefined, cx: b.cx, cy: b.cy, r: b.r, fill: b.fill, opacity: b.opacity, filter: b.blur ? `url(#${u}-soft)` : undefined, style: b.self ? { ...SELF, ...b.idle } : b.idle }) }, `${b.cx},${b.cy}`)))] }));
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
/* **네 코너가 하나씩 돋는다** */
|
|
108
|
+
clover: {
|
|
109
|
+
viewBox: '203.5 123.5 273 273',
|
|
110
|
+
width: 273,
|
|
111
|
+
height: 273,
|
|
112
|
+
render: (u) => {
|
|
113
|
+
const petals = [
|
|
114
|
+
{ d: 'M360,140 A140,140 0 0 1 220,280 L220,232 A92,92 0 0 0 312,140 Z', fill: `url(#${u}-p1)`, origin: '220px 140px', turn: 0 },
|
|
115
|
+
{ d: 'M460,280 A140,140 0 0 1 320,140 L368,140 A92,92 0 0 0 460,232 Z', fill: `url(#${u}-p3)`, origin: '460px 140px', turn: 0.03 },
|
|
116
|
+
{ d: 'M320,380 A140,140 0 0 1 460,240 L460,288 A92,92 0 0 0 368,380 Z', fill: `url(#${u}-p4)`, origin: '460px 380px', turn: 0.06 },
|
|
117
|
+
{ d: 'M220,240 A140,140 0 0 1 360,380 L312,380 A92,92 0 0 0 220,288 Z', fill: `url(#${u}-p2)`, origin: '220px 380px', turn: 0.09 },
|
|
118
|
+
];
|
|
119
|
+
return (_jsxs(_Fragment, { children: [_jsxs("defs", { children: [_jsxs("linearGradient", { id: `${u}-p1`, x1: "0", y1: "0", x2: "1", y2: "1", children: [_jsx("stop", { offset: "0", stopColor: C.c3 }), _jsx("stop", { offset: "1", stopColor: C.c6 })] }), _jsxs("linearGradient", { id: `${u}-p2`, x1: "0", y1: "1", x2: "1", y2: "0", children: [_jsx("stop", { offset: "0", stopColor: C.c1 }), _jsx("stop", { offset: "1", stopColor: C.c4 })] }), _jsxs("linearGradient", { id: `${u}-p3`, x1: "0", y1: "0", x2: "1", y2: "0", children: [_jsx("stop", { offset: "0", stopColor: C.c4 }), _jsx("stop", { offset: "1", stopColor: C.c3 })] }), _jsxs("linearGradient", { id: `${u}-p4`, x1: "1", y1: "0", x2: "0", y2: "1", children: [_jsx("stop", { offset: "0", stopColor: C.c6 }), _jsx("stop", { offset: "1", stopColor: C.c3 })] })] }), _jsx("g", { className: "hero-visual__petals", children: petals.map((p) => (_jsx("path", { d: p.d, fill: p.fill, ...enter('pop', { turn: p.turn, origin: p.origin }) }, p.origin))) })] }));
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
/*
|
|
123
|
+
* **하나였다가 셋으로 갈라진다**(사용자 지시 2026-11-09 — *"1개였다가 4개로 배치되는
|
|
124
|
+
* 방식으로 나오게 해줘"* · *"4개 -> 3개로 바꾸자"*).
|
|
125
|
+
*
|
|
126
|
+
* 기울기를 **바깥 묶음에 박아 두지 않는다** — 모였을 때 셋이 같은 각이어야 하나로
|
|
127
|
+
* 보이므로, 각도 들고 나는 틀이 돌린다(`--a`). 흔들림(`sway`)만 안쪽 막대에 남는다.
|
|
128
|
+
*
|
|
129
|
+
* **색은 면 안에서 흐른다**(사용자 지시 2026-11-09 — *"연두컬러쪽이 부족해 맞춰줘"*).
|
|
130
|
+
* 단색 셋으로는 줄기의 더운 쪽(연두)이 아예 안 나왔다 — 장마다 두 칸씩 걸치게 해
|
|
131
|
+
* 여섯 칸을 다 쓴다.
|
|
132
|
+
*
|
|
133
|
+
* **막대의 수는 그대로다**(340 × 120). 넷이던 때 가로세로가 0.67 이라 혼자 길쭉해
|
|
134
|
+
* 막대를 넓혀 봤는데, 그러니 **막대 하나하나가 길쭉해졌다**(사용자 지시 —
|
|
135
|
+
* *"길죽하게 바뀌었는데? 아까것이 좋았는데"*). 막대는 두고 **장을 하나 줄여** 0.82 가
|
|
136
|
+
* 됐다 — 쌓인 높이가 줄어 가로세로가 저절로 맞는다.
|
|
137
|
+
*/
|
|
138
|
+
stackedPills: {
|
|
139
|
+
viewBox: '-46.5 -88.9 493 493',
|
|
140
|
+
width: 493,
|
|
141
|
+
height: 493,
|
|
142
|
+
render: (u) => (_jsxs(_Fragment, { children: [_jsxs("defs", { children: [_jsxs("linearGradient", { id: `${u}-p1`, x1: "0", y1: "0", x2: "1", y2: "1", children: [_jsx("stop", { offset: "0", stopColor: C.c5 }), _jsx("stop", { offset: "1", stopColor: C.c6 })] }), _jsxs("linearGradient", { id: `${u}-p2`, x1: "0", y1: "0", x2: "1", y2: "1", children: [_jsx("stop", { offset: "0", stopColor: C.c3 }), _jsx("stop", { offset: "1", stopColor: C.c4 })] }), _jsxs("linearGradient", { id: `${u}-p3`, x1: "0", y1: "0", x2: "1", y2: "1", children: [_jsx("stop", { offset: "0", stopColor: C.c1 }), _jsx("stop", { offset: "1", stopColor: C.c2 })] })] }), [
|
|
143
|
+
{ cy: 60, angle: -16, color: `url(#${u}-p1)`, opacity: 0.75 },
|
|
144
|
+
{ cy: 160, angle: 14, color: `url(#${u}-p2)`, opacity: 0.85 },
|
|
145
|
+
{ cy: 260, angle: -14, color: `url(#${u}-p3)`, opacity: 0.95 },
|
|
146
|
+
].map((p, i) => (_jsx("g", { ...enter('fan', {
|
|
147
|
+
origin: `200px ${p.cy}px`,
|
|
148
|
+
/* 모일 곳은 셋의 한가운데(160) — 거기서 포개져 하나로 보인다 */
|
|
149
|
+
vars: { '--dy': `${160 - p.cy}px`, '--a': `${p.angle}deg` },
|
|
150
|
+
}), children: _jsx("rect", { x: 30, y: p.cy - 60, width: 340, height: 120, rx: 60, fill: p.color, opacity: p.opacity, style: { ...SELF, ...spin('sway', 7, i) } }) }, p.cy)))] })),
|
|
151
|
+
},
|
|
152
|
+
/*
|
|
153
|
+
* **서로 꿰인 고리** — 두꺼운 테 둘이 **엮여서** 돈다
|
|
154
|
+
* (사용자 지시 2026-11-09 — *"고리형태로도 가능해?"*).
|
|
155
|
+
*
|
|
156
|
+
* 전에는 하나가 다른 하나를 통째로 덮어, 겹친 자리가 그냥 가려진 것으로 보였다.
|
|
157
|
+
* 지금은 **위쪽 교차에서는 왼쪽 고리가 위로, 아래쪽 교차에서는 오른쪽 고리가 위로**
|
|
158
|
+
* 지난다 — 사슬이 꿰인 꼴이다.
|
|
159
|
+
*
|
|
160
|
+
* 엮는 길: 왼쪽을 긋고 · 오른쪽을 긋고 · **왼쪽을 위쪽 절반만 다시 긋는다.**
|
|
161
|
+
* 두 테가 만나는 자리는 재어 보면 (382, 489) 와 (445, 158) 이라, 그 사이인 y 323 에서
|
|
162
|
+
* 가르면 두 교차가 서로 다른 쪽으로 떨어진다.
|
|
163
|
+
*/
|
|
164
|
+
doubleRing: {
|
|
165
|
+
/*
|
|
166
|
+
* **두 고리가 가운데에 선다**(사용자 지시 2026-11-09 — *"가운데 있도록"*).
|
|
167
|
+
*
|
|
168
|
+
* 원래는 히어로 카드가 오른쪽을 잘라 쓰라고 그린 꼴이라 상자가 `0 0 680 560` 였고,
|
|
169
|
+
* 오른쪽 고리가 틀 밖으로 47 · 아래로 7 잘렸다. 심볼로 올라온 뒤로는 **잘릴 틀이
|
|
170
|
+
* 없으므로**, 두 고리를 다 품는 자리로 바꿨다 — 43..727 × 53..567.
|
|
171
|
+
*
|
|
172
|
+
* **드리운 그림자는 걷었다**(사용자 지시 2026-11-09 — *"끊어져 보이는 부분이 있는데?"*).
|
|
173
|
+
* 오른쪽 고리가 그림자를 드리우면 그것이 **왼쪽 고리 위에 깔리는데**, 덮어 그리는
|
|
174
|
+
* 자리(띠 안)에는 안 깔린다 — 띠의 가장자리를 따라 **짙기가 뚝 끊긴 금**이 생겼다.
|
|
175
|
+
* 꿰인 것만으로 앞뒤가 읽히므로 그림자가 따로 없어도 된다.
|
|
176
|
+
*/
|
|
177
|
+
viewBox: '-3.5 -78.5 777 777',
|
|
178
|
+
width: 777,
|
|
179
|
+
height: 777,
|
|
180
|
+
render: (u) => {
|
|
181
|
+
/*
|
|
182
|
+
* **두 번 그려지는 테** — 한 번은 밑에, 한 번은 오른쪽 테 위에(꿰인 자리).
|
|
183
|
+
* 도는 움직임을 **여기 한 군데**에 적어 둘이 똑같이 돌게 한다 — 따로 적으면
|
|
184
|
+
* 어긋날 길이 생기고, 어긋나면 덮어 그린 자리의 색이 밑과 달라져 금이 보인다.
|
|
185
|
+
*/
|
|
186
|
+
const left = (_jsx("g", { style: { animation: 'hero-visual-rove-a 19s ease-in-out infinite' }, children: _jsx("g", { style: { transformOrigin: '290px 300px', animation: 'hero-visual-revolve 26s linear infinite' }, children: _jsx("circle", { cx: 290, cy: 300, r: 210, fill: "none", stroke: `url(#${u}-r1)`, strokeWidth: 74,
|
|
187
|
+
/* 닫힌 테는 시작과 끝이 맞닿는 자리에 실금이 난다 — 끝을 둥글려 덮는다 */
|
|
188
|
+
strokeLinecap: "round", ...DRAWN, ...enter('draw') }) }) }));
|
|
189
|
+
return (_jsxs(_Fragment, { children: [_jsxs("defs", { children: [_jsxs("linearGradient", { id: `${u}-r1`, gradientUnits: "userSpaceOnUse", x1: "60", y1: "80", x2: "520", y2: "520", children: [_jsx("stop", { offset: "0", stopColor: C.c6 }), _jsx("stop", { offset: ".5", stopColor: C.c4 }), _jsx("stop", { offset: "1", stopColor: C.c2 })] }), _jsxs("linearGradient", { id: `${u}-r2`, gradientUnits: "userSpaceOnUse", x1: "300", y1: "120", x2: "700", y2: "560", children: [_jsx("stop", { offset: "0", stopColor: C.c3 }), _jsx("stop", { offset: ".55", stopColor: C.c1 }), _jsx("stop", { offset: "1", stopColor: C.c1 })] }), _jsxs("mask", { id: `${u}-over`, maskUnits: "userSpaceOnUse", x: "0", y: "0", width: "800", height: "640", children: [_jsx("rect", { x: "0", y: "0", width: "800", height: "640", fill: "#000" }), _jsx("circle", { cx: 500, cy: 340, r: 190, fill: "none", stroke: "#fff", strokeWidth: 82, style: { animation: 'hero-visual-rove-b 23s ease-in-out infinite' } }), _jsx("rect", { x: "0", y: "323", width: "800", height: "320", fill: "#000" })] })] }), _jsxs("g", { style: { transformOrigin: '380px 300px', ...spin('breathe', 9) }, children: [left, _jsx("g", { style: { animation: 'hero-visual-rove-b 23s ease-in-out infinite' }, children: _jsx("g", { style: { transformOrigin: '500px 340px', animation: 'hero-visual-revolve-r 22s linear infinite' }, children: _jsx("circle", { cx: 500, cy: 340, r: 190, fill: "none", stroke: `url(#${u}-r2)`, strokeWidth: 74, strokeLinecap: "round", ...DRAWN, ...enter('draw', { turn: 0.08 }) }) }) }), _jsx("g", { mask: `url(#${u}-over)`, children: left })] })] }));
|
|
190
|
+
},
|
|
191
|
+
},
|
|
192
|
+
/* **동심 원** — 띠 넷이 가운데에서 차례로 번져 나간다
|
|
193
|
+
(사용자 지시 2026-11-09 — *"동심 아치는 -> 동심 원 으로 구성해줘"*).
|
|
194
|
+
전에는 바닥에서 솟는 반원이었다. 띠 두께(52)와 색·박자는 그대로 두고 **원으로** 닫았다. */
|
|
195
|
+
concentric: {
|
|
196
|
+
viewBox: '-23.5 -83.5 727 727',
|
|
197
|
+
width: 727,
|
|
198
|
+
height: 727,
|
|
199
|
+
render: (u) => (_jsxs(_Fragment, { children: [_jsxs("defs", { children: [_jsxs("linearGradient", { id: `${u}-outer`, gradientUnits: "userSpaceOnUse", x1: "20", y1: "-40", x2: "660", y2: "600", children: [_jsx("stop", { offset: "0", stopColor: C.c3 }), _jsx("stop", { offset: "1", stopColor: C.c6 })] }), _jsxs("linearGradient", { id: `${u}-mid`, gradientUnits: "userSpaceOnUse", x1: "120", y1: "280", x2: "560", y2: "280", children: [_jsx("stop", { offset: "0", stopColor: C.c2 }), _jsx("stop", { offset: "1", stopColor: C.c4 })] }), _jsxs("linearGradient", { id: `${u}-inner`, gradientUnits: "userSpaceOnUse", x1: "200", y1: "420", x2: "480", y2: "140", children: [_jsx("stop", { offset: "0", stopColor: C.c1 }), _jsx("stop", { offset: ".5", stopColor: C.c1 }), _jsx("stop", { offset: "1", stopColor: C.c3 })] })] }), [
|
|
200
|
+
{ r: 54, stroke: C.c2, opacity: 1, idle: 0, turn: 0 },
|
|
201
|
+
{ r: 134, stroke: `url(#${u}-inner)`, opacity: 0.9, idle: 0.4, turn: 0.04 },
|
|
202
|
+
{ r: 214, stroke: `url(#${u}-mid)`, opacity: 0.8, idle: 0.8, turn: 0.08 },
|
|
203
|
+
{ r: 294, stroke: `url(#${u}-outer)`, opacity: 0.55, idle: 1.2, turn: 0.12 },
|
|
204
|
+
].map((ring) => (_jsx("g", { ...enter('pop', { turn: ring.turn, origin: '340px 280px' }), children: _jsx("circle", { cx: 340, cy: 280, r: ring.r, fill: "none", stroke: ring.stroke, strokeWidth: 52, opacity: ring.opacity, style: { transformOrigin: '340px 280px', ...spin('pulse', 4, ring.idle) } }) }, ring.r)))] })),
|
|
205
|
+
},
|
|
206
|
+
/* **겹쳐 있다 갈라진다** — 작은 방울이 큰 방울 안에서 미끄러져 나오며 혹이 돋는다 */
|
|
207
|
+
metaball: {
|
|
208
|
+
viewBox: '-16 82 530 536',
|
|
209
|
+
width: 530,
|
|
210
|
+
height: 536,
|
|
211
|
+
render: (u) => (_jsxs(_Fragment, { children: [_jsxs("defs", { children: [_jsxs("filter", { id: `${u}-goo`, x: "-20%", y: "-20%", width: "140%", height: "140%", children: [_jsx("feGaussianBlur", { stdDeviation: "18" }), _jsx("feColorMatrix", { values: "1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 26 -12" })] }), _jsxs("linearGradient", { id: `${u}-big`, x1: "0", y1: "0", x2: "1", y2: "1", children: [_jsx("stop", { offset: ".5", stopColor: "var(--color-main)" }), _jsx("stop", { offset: ".8", stopColor: "var(--color-sub)" })] }), _jsxs("linearGradient", { id: `${u}-small`, x1: "0", y1: "0", x2: "1", y2: "1", children: [_jsx("stop", { offset: ".5", stopColor: "var(--color-sub)" }), _jsx("stop", { offset: ".8", stopColor: "color-mix(in srgb, #ffffbb 30%, var(--color-sub))" })] })] }), _jsxs("g", { filter: `url(#${u}-goo)`, children: [_jsx("g", { ...enter('meet', { vars: { '--from': '20px' } }), children: _jsx("circle", { cx: 240, cy: 350, r: 240, fill: `url(#${u}-big)`, style: spin('blob-1', 22) }) }), _jsx("g", { ...enter('meet', { turn: 0.03, vars: { '--from': '-120px' } }), children: _jsx("circle", { cx: 400, cy: 490, r: 100, fill: `url(#${u}-small)`, style: spin('blob-2', 17, -5) }) })] })] })),
|
|
212
|
+
},
|
|
213
|
+
/* **가운데에서 번져 나간다** — 고리 하나씩 */
|
|
214
|
+
dottedRipple: {
|
|
215
|
+
viewBox: '87.5 27.5 505 505',
|
|
216
|
+
width: 505,
|
|
217
|
+
height: 505,
|
|
218
|
+
render: () => (_jsxs("g", { style: { transformOrigin: '340px 280px', ...spin('breathe', 6) }, children: [_jsx("g", { ...enter('pop', { turn: 0, origin: '340px 280px' }), children: _jsx("circle", { cx: 340, cy: 280, r: 22, fill: C.c1 }) }), Array.from({ length: 5 }, (_, ring) => (_jsx("g", { ...enter('pop', { turn: 0.03 * (ring + 1), origin: '340px 280px' }), children: around(340, 280, 50 + 42 * ring, 8 + 8 * ring).map((p) => (_jsx("circle", { cx: p.x, cy: p.y, r: 9 - 1.2 * ring, fill: RAMP[ring] }, `${p.x},${p.y}`))) }, ring)))] })),
|
|
219
|
+
},
|
|
220
|
+
/*
|
|
221
|
+
* **가운데에 겹쳐 있다 갈라진다** — 둘이 만나 렌즈가 되는 것이 이 꼴의 뜻이다.
|
|
222
|
+
*
|
|
223
|
+
* **면이 둘뿐이라 단색으로는 다른 꼴들과 안 어울렸다**(사용자 지시 2026-11-09 —
|
|
224
|
+
* *"면이 2개밖에 없는데 단색이니까 다른것들과 안맞는거 같아 그라데이션으로 조정해줘"*).
|
|
225
|
+
* 다른 꼴은 조각이 여럿이라 **조각 사이**에서 색이 흐르는데, 이쪽은 조각이 둘이라
|
|
226
|
+
* 그 흐름이 **면 안에** 있어야 한다.
|
|
227
|
+
*
|
|
228
|
+
* 한쪽은 찬 쪽(파랑→시안), 다른 쪽은 더운 쪽(틸→연두)으로 둔다 — 겹친 자리가
|
|
229
|
+
* 무슨 색인지 읽히려면 두 쪽이 서로 다른 데서 와야 한다.
|
|
230
|
+
*/
|
|
231
|
+
vesica: {
|
|
232
|
+
viewBox: '67.5 7.5 545 545',
|
|
233
|
+
width: 545,
|
|
234
|
+
height: 545,
|
|
235
|
+
render: (u) => (_jsxs(_Fragment, { children: [_jsxs("defs", { children: [_jsxs("linearGradient", { id: `${u}-cool`, x1: "0", y1: "0", x2: "1", y2: "1", children: [_jsx("stop", { offset: "0", stopColor: C.c1 }), _jsx("stop", { offset: "1", stopColor: C.c3 })] }), _jsxs("linearGradient", { id: `${u}-warm`, x1: "0", y1: "0", x2: "1", y2: "1", children: [_jsx("stop", { offset: "0", stopColor: C.c4 }), _jsx("stop", { offset: "1", stopColor: C.c6 })] })] }), _jsxs("g", { className: "hero-visual__lens", children: [_jsx("g", { ...enter('meet', { vars: { '--from': '70px' } }), children: _jsx("circle", { cx: 270, cy: 280, r: 170, fill: `url(#${u}-cool)`, opacity: ".8", style: spin('approach-r', 6) }) }), _jsx("g", { ...enter('meet', { vars: { '--from': '-70px' } }), children: _jsx("circle", { cx: 410, cy: 280, r: 170, fill: `url(#${u}-warm)`, opacity: ".8", style: spin('approach', 6) }) })] })] })),
|
|
236
|
+
},
|
|
237
|
+
/* **맨 위 판부터 차례로 돋는다** — 위에서 떨어뜨리려 했으나 상자 위쪽에 남은 자리가
|
|
238
|
+
14 뿐이라 들어오는 동안 잘렸다. 차례(`turn`)가 위에서 아래로 쌓이는 느낌을 낸다. */
|
|
239
|
+
stackedDiscs: {
|
|
240
|
+
viewBox: '112.5 67.5 455 455',
|
|
241
|
+
width: 455,
|
|
242
|
+
height: 455,
|
|
243
|
+
render: () => (_jsx("g", { className: "hero-visual__discs", children: RAMP.map((fill, i) => (_jsx("g", { ...enter('pop', { turn: i * 0.025, origin: `340px ${150 + 58 * i}px` }), children: _jsx("ellipse", { cx: 340, cy: 150 + 58 * i, rx: 200 - 12 * i, ry: 46, fill: fill, opacity: ".8", style: spin('floaty', 7, 0.4 * i) }) }, fill))) })),
|
|
244
|
+
},
|
|
245
|
+
/* **가운데에 모였다 펴진다** — 걷힐 때도 모이며 사라진다 */
|
|
246
|
+
flower: {
|
|
247
|
+
viewBox: '124 64 432 432',
|
|
248
|
+
width: 432,
|
|
249
|
+
height: 432,
|
|
250
|
+
render: () => (
|
|
251
|
+
/* 움직임이 두 겹이다 — 묶음은 9초로 숨 쉬고, 원 여섯은 36초에 한 번 모인다(= 숨 네 번) */
|
|
252
|
+
_jsx("g", { className: "hero-visual__blades", style: { transformOrigin: '340px 280px', ...spin('breathe', 9) }, children: around(340, 280, 95, 6).map((p, i) => (
|
|
253
|
+
/* **가운데에서 피어난다**(사용자 지시 2026-11-09 — *"가운데에서 나타나도록"*).
|
|
254
|
+
축을 꽃의 한가운데에 박아야 한다 — 안 박으면 `scale(.3)` 이 좌표계의 0, 0
|
|
255
|
+
(틀의 왼쪽 위)을 향해 줄어들어, 가운데가 아니라 **모서리에서** 날아온다. */
|
|
256
|
+
_jsx("g", { ...enter('unfold', {
|
|
257
|
+
turn: i * 0.025,
|
|
258
|
+
origin: '340px 280px',
|
|
259
|
+
vars: { '--gx': `${340 - p.x}px`, '--gy': `${280 - p.y}px` },
|
|
260
|
+
}), children: _jsx("circle", { cx: p.x, cy: p.y, r: 95, fill: RAMP[i], opacity: ".6", style: spin('gather', 36) }) }, `${p.x},${p.y}`))) })),
|
|
261
|
+
},
|
|
262
|
+
/*
|
|
263
|
+
* **겹 스퀘어클** — 디자인 판 `말귀 심볼 확장` 의 `s21 breath`.
|
|
264
|
+
*
|
|
265
|
+
* 세 겹이 **저마다 다른 때에** 숨 쉰다(0 · .5 · 1초 늦게). 함께 쉬면 한 덩어리가
|
|
266
|
+
* 커졌다 작아지는 것으로 보여, 겹이 셋이라는 것이 안 읽힌다.
|
|
267
|
+
*/
|
|
268
|
+
squircles: {
|
|
269
|
+
viewBox: '7 7 186 186',
|
|
270
|
+
width: 186,
|
|
271
|
+
height: 186,
|
|
272
|
+
render: (u) => (_jsxs(_Fragment, { children: [_jsxs("defs", { children: [_jsxs("linearGradient", { id: `${u}-q1`, x1: "0", y1: "0", x2: "1", y2: "1", children: [_jsx("stop", { offset: "0", stopColor: C.c6 }), _jsx("stop", { offset: "1", stopColor: C.c4 })] }), _jsxs("linearGradient", { id: `${u}-q2`, x1: "0", y1: "0", x2: "1", y2: "1", children: [_jsx("stop", { offset: "0", stopColor: C.c3 }), _jsx("stop", { offset: "1", stopColor: C.c4 })] }), _jsxs("linearGradient", { id: `${u}-q3`, x1: "0", y1: "0", x2: "1", y2: "1", children: [_jsx("stop", { offset: "0", stopColor: C.c1 }), _jsx("stop", { offset: "1", stopColor: C.c2 })] })] }), [
|
|
273
|
+
{ d: 'M100 18 C150 18 182 50 182 100 C182 150 150 182 100 182 C50 182 18 150 18 100 C18 50 50 18 100 18 Z', fill: `url(#${u}-q1)`, opacity: 0.55, idle: 0, turn: 0 },
|
|
274
|
+
{ d: 'M100 42 C136 42 158 64 158 100 C158 136 136 158 100 158 C64 158 42 136 42 100 C42 64 64 42 100 42 Z', fill: `url(#${u}-q2)`, opacity: 0.75, idle: 0.5, turn: 0.03 },
|
|
275
|
+
{ d: 'M100 66 C122 66 134 78 134 100 C134 122 122 134 100 134 C78 134 66 122 66 100 C66 78 78 66 100 66 Z', fill: `url(#${u}-q3)`, opacity: 1, idle: 1, turn: 0.06 },
|
|
276
|
+
].map((p) => (_jsx("g", { ...enter('bloom', { turn: p.turn, origin: '100px 100px' }), children: _jsx("g", { style: { transformOrigin: '100px 100px', ...spin('breathe', 5, p.idle) }, children: _jsx("path", { d: p.d, fill: p.fill, opacity: p.opacity }) }) }, p.turn)))] })),
|
|
277
|
+
},
|
|
278
|
+
/*
|
|
279
|
+
* **아홉 점** — 디자인 판의 `s39 nine`.
|
|
280
|
+
*
|
|
281
|
+
* 가운데 한 점만 **안 깜빡인다.** 아홉이 다 깜빡이면 어디를 보라는 것인지가 없어진다.
|
|
282
|
+
*/
|
|
283
|
+
dotGrid: {
|
|
284
|
+
/*
|
|
285
|
+
* **눈으로 맞춘 자리다.** 다른 꼴처럼 0.88 로 담으면 **유독 커 보인다**(사용자 지시
|
|
286
|
+
* 2026-11-09 — *"s9가 유난히 좀 커보이기는 해"*). 잉크가 상자의 **네 모서리까지**
|
|
287
|
+
* 닿는 유일한 꼴이라 그렇다 — 가운데는 비고 테두리에 몰려 있어, 눈은 상자가 아니라
|
|
288
|
+
* 그 테두리를 크기로 읽는다.
|
|
289
|
+
*
|
|
290
|
+
* 실측(가운데에서 잉크까지의 평균 거리 ÷ 상자 반지름): 0.88 로 담으면 0.726 인데
|
|
291
|
+
* 다른 열 꼴은 0.46~0.635 다. 상자를 1.11 배(155 → 172)로 키우니 0.645 로 내려와
|
|
292
|
+
* `stairs` 0.635 · `concentric` 0.608 과 나란해진다. 바깥 5분의 1 에 놓인 잉크도
|
|
293
|
+
* 44% → 26% 로 준다.
|
|
294
|
+
*/
|
|
295
|
+
viewBox: '14 14 172 172',
|
|
296
|
+
width: 172,
|
|
297
|
+
height: 172,
|
|
298
|
+
render: (u) => {
|
|
299
|
+
const dots = [50, 100, 150].flatMap((cy, row) => [50, 100, 150].map((cx, col) => ({
|
|
300
|
+
cx,
|
|
301
|
+
cy,
|
|
302
|
+
/* 아래 줄이 더운 쪽 — 줄이 내려갈수록 줄기의 뒤쪽을 쓴다 */
|
|
303
|
+
fill: `url(#${u}-${cx === 100 && cy === 100 ? 'n3' : row === 2 ? 'n2' : 'n1'})`,
|
|
304
|
+
middle: cx === 100 && cy === 100,
|
|
305
|
+
idle: (row * 3 + col) * 0.3,
|
|
306
|
+
turn: (row * 3 + col) * 0.015,
|
|
307
|
+
})));
|
|
308
|
+
return (_jsxs(_Fragment, { children: [_jsx("defs", { children: [
|
|
309
|
+
['n1', C.c3, C.c4],
|
|
310
|
+
['n2', C.c6, C.c5],
|
|
311
|
+
['n3', C.c1, C.c2],
|
|
312
|
+
].map(([id, from, to]) => (_jsxs("linearGradient", { id: `${u}-${id}`, x1: "0", y1: "0", x2: "1", y2: "1", children: [_jsx("stop", { offset: "0", stopColor: from }), _jsx("stop", { offset: "1", stopColor: to })] }, id))) }), dots.map((d) => (_jsx("g", { ...enter('pop', { turn: d.turn, origin: `${d.cx}px ${d.cy}px` }), children: _jsx("circle", { cx: d.cx, cy: d.cy, r: 18, fill: d.fill, style: d.middle ? undefined : spin('blink', 2.7, d.idle) }) }, `${d.cx},${d.cy}`)))] }));
|
|
313
|
+
},
|
|
314
|
+
},
|
|
315
|
+
/*
|
|
316
|
+
* **오르는 막대** — 디자인 판의 `s48 stair`.
|
|
317
|
+
*
|
|
318
|
+
* 축을 막대의 **발치**(174)에 박는다 — 가운데에 박으면 자랄 때 아래로도 뻗어
|
|
319
|
+
* 바닥선이 흐트러지고, 층계로 안 읽힌다.
|
|
320
|
+
*/
|
|
321
|
+
stairs: {
|
|
322
|
+
viewBox: '13.5 18.5 175 175',
|
|
323
|
+
width: 175,
|
|
324
|
+
height: 175,
|
|
325
|
+
render: (u) => (_jsxs(_Fragment, { children: [_jsx("defs", { children: [
|
|
326
|
+
['t1', C.c6, C.c5, 110],
|
|
327
|
+
['t2', C.c4, C.c3, 86],
|
|
328
|
+
['t3', C.c3, C.c2, 62],
|
|
329
|
+
['t4', C.c1, C.c2, 38],
|
|
330
|
+
].map(([id, from, to, top]) => (_jsxs("linearGradient", { id: `${u}-${id}`, gradientUnits: "userSpaceOnUse", x1: "0", y1: top, x2: "0", y2: 174, children: [_jsx("stop", { offset: "0", stopColor: to }), _jsx("stop", { offset: "1", stopColor: from })] }, id))) }), [
|
|
331
|
+
{ x: 24, y: 110, stroke: `url(#${u}-t1)` },
|
|
332
|
+
{ x: 66, y: 86, stroke: `url(#${u}-t2)` },
|
|
333
|
+
{ x: 108, y: 62, stroke: `url(#${u}-t3)` },
|
|
334
|
+
{ x: 150, y: 38, stroke: `url(#${u}-t4)` },
|
|
335
|
+
].map((b, i) => (
|
|
336
|
+
/*
|
|
337
|
+
* **네모가 아니라 선이다**(사용자 지시 2026-11-09 — *"크기 변형시 곡선 부분
|
|
338
|
+
* 눌리지 않도록"*). 둥근 네모를 세로로 늘였다 줄이면 **둥근 모서리가 함께
|
|
339
|
+
* 눌려** 타원이 된다. 선의 둥근 마개는 굵기로 정해지므로 길이를 어떻게 해도
|
|
340
|
+
* 동그란 채다.
|
|
341
|
+
*
|
|
342
|
+
* 마개가 굵기의 절반(14)씩 나오므로, 보이는 끝을 네모였을 때와 맞추려면
|
|
343
|
+
* 그만큼 안으로 당겨 긋는다. 자라는 것은 아래에서 위로다.
|
|
344
|
+
*/
|
|
345
|
+
_jsx("g", { style: spin('floaty', 3.6, i * 0.3), children: _jsx("line", { x1: b.x + 14, y1: 160, x2: b.x + 14, y2: b.y + 14, stroke: b.stroke, strokeWidth: 28, strokeLinecap: "round", ...DRAWN, ...enter('draw', { turn: i * 0.03 }) }) }, b.x)))] })),
|
|
346
|
+
},
|
|
347
|
+
};
|
|
348
|
+
/** 꼴의 이름들 — 놀이터가 전부를 훑을 때 쓴다 @public */
|
|
349
|
+
export const HERO_VISUAL_VARIANTS = Object.keys(ART);
|
|
350
|
+
/**
|
|
351
|
+
* **히어로 비주얼** — 랜딩 머리에 세우는 그림.
|
|
352
|
+
*
|
|
353
|
+
* 디자인 판(claude.ai/design 의 `Hero Visual Options` · `말귀 심볼 확장`)에서 고른 꼴을
|
|
354
|
+
* 한 컴포넌트가 쥔다. `variant` 하나만 바꾸면 그림이 바뀐다.
|
|
355
|
+
*
|
|
356
|
+
* **한 바퀴는 등장 · 머묾 · 퇴장이다.** 차례로 갈아 끼우려면 `motion="once"` 로 두고
|
|
357
|
+
* `onCycleEnd` 를 받는다 — 되풀이되는 동안에는 조각마다 차례가 달라 **모두가 함께
|
|
358
|
+
* 비는 때가 없어서**, 아무 때나 갈아 끼우면 사라지는 중인 조각이 잘린다.
|
|
359
|
+
* 머무는 동안이 한 바퀴의 6할이라, 그림이 제 꼴로
|
|
360
|
+
* 서 있는 시간이 가장 길다. `motion="still"` 이면 **멈춰 선 한 장**이 되는데, 이때는 한
|
|
361
|
+
* 바퀴뿐 아니라 그림 안쪽의 숨·떨림까지 멈춘다 — 바깥만 멈추면 "멈춘 그림" 이 아니라
|
|
362
|
+
* "제자리에서 꿈틀대는 그림" 이 된다.
|
|
363
|
+
*
|
|
364
|
+
* **크기는 쓰는 쪽이 정한다.** 가로를 100% 로 채우고 세로는 제 비율대로 따라오므로,
|
|
365
|
+
* 감싸는 자리의 폭만 정해 주면 된다.
|
|
366
|
+
*
|
|
367
|
+
* ```tsx
|
|
368
|
+
* <div style={{ width: 520 }}>
|
|
369
|
+
* <HeroVisual variant="blobs" />
|
|
370
|
+
* </div>
|
|
371
|
+
* <HeroVisual variant="clover" motion="still" />
|
|
372
|
+
* ```
|
|
373
|
+
*
|
|
374
|
+
* @public
|
|
375
|
+
*/
|
|
376
|
+
export default function HeroVisual({ variant, motion = 'loop', cycleMs = 9000, label, className, style, onCycleEnd, }) {
|
|
377
|
+
const rootRef = useRef(null);
|
|
378
|
+
/* 쓰는 쪽이 매번 새 함수를 넘겨도 아래 셈이 다시 걸리지 않게 그릇에 담아 둔다 */
|
|
379
|
+
const endRef = useRef(onCycleEnd);
|
|
380
|
+
endRef.current = onCycleEnd;
|
|
381
|
+
useEffect(() => {
|
|
382
|
+
if (motion !== 'once' || !endRef.current)
|
|
383
|
+
return;
|
|
384
|
+
const el = rootRef.current;
|
|
385
|
+
if (!el)
|
|
386
|
+
return;
|
|
387
|
+
let done = false;
|
|
388
|
+
const fire = () => {
|
|
389
|
+
if (done)
|
|
390
|
+
return;
|
|
391
|
+
done = true;
|
|
392
|
+
endRef.current?.();
|
|
393
|
+
};
|
|
394
|
+
/* **조각마다 끝나는 때가 다르다** — 차례(`--hero-visual-turn`)만큼 늦게 든 조각이
|
|
395
|
+
가장 늦게 나간다. 그 하나까지 기다린다. */
|
|
396
|
+
const pieces = el.querySelectorAll('.hero-visual__in');
|
|
397
|
+
let left = pieces.length;
|
|
398
|
+
const onEnd = (e) => {
|
|
399
|
+
const target = e.target;
|
|
400
|
+
if (!target?.classList?.contains('hero-visual__in'))
|
|
401
|
+
return;
|
|
402
|
+
if (--left <= 0)
|
|
403
|
+
fire();
|
|
404
|
+
};
|
|
405
|
+
el.addEventListener('animationend', onEnd);
|
|
406
|
+
/* **움직임이 멎은 자리에서는 `animationend` 가 안 온다** — 움직임을 줄여 달라고 한
|
|
407
|
+
기기, 숨은 탭이 그렇다. 그러면 이것으로 다음 꼴을 세우는 쪽이 첫 꼴에서 멈춘 채
|
|
408
|
+
조용해진다. 실제로 걸린 시각을 읽어 그보다 조금 뒤에 반드시 한 번 부른다. */
|
|
409
|
+
/* `getAnimations` 가 없는 자리가 있다(시험 러너·옛 브라우저). 가드 없이 부르면
|
|
410
|
+
그리는 도중에 터져 **쪽이 통째로 안 뜬다** — 없으면 한 바퀴 길이로 어림잡는다.
|
|
411
|
+
어림이 맞으려면 가장 늦은 조각의 차례만큼 더 기다려야 한다. */
|
|
412
|
+
const ends = typeof el.getAnimations === 'function'
|
|
413
|
+
? el
|
|
414
|
+
.getAnimations({ subtree: true })
|
|
415
|
+
.map((a) => Number(a.effect?.getComputedTiming().endTime ?? 0))
|
|
416
|
+
.filter((x) => Number.isFinite(x) && x > 0)
|
|
417
|
+
: [];
|
|
418
|
+
const last = ends.length > 0 ? Math.max(...ends) : cycleMs * (1 + LATEST_TURN);
|
|
419
|
+
const timer = setTimeout(fire, last + 120);
|
|
420
|
+
return () => {
|
|
421
|
+
el.removeEventListener('animationend', onEnd);
|
|
422
|
+
clearTimeout(timer);
|
|
423
|
+
};
|
|
424
|
+
}, [motion, variant, cycleMs]);
|
|
425
|
+
/* 한 쪽에 둘 이상 서면 그라데이션 이름이 부딪힌다 — 먼저 선 쪽의 것이 이기고,
|
|
426
|
+
나중 것은 **남의 색으로** 칠해진다. React 가 주는 이름으로 갈라 둔다.
|
|
427
|
+
`:` 가 섞여 오므로 걷는다(조각 참조에서 탈이 난다). */
|
|
428
|
+
const uid = `hero-visual-${useId().replace(/:/g, '')}`;
|
|
429
|
+
/* 없는 이름이 들어와도 **빈 자리로 두지 않는다** — 그러면 화면에는 아무 말 없이
|
|
430
|
+
구멍만 남는다. 랜딩의 배경으로 세우고 개발 중에만 한 번 일러둔다. */
|
|
431
|
+
const art = ART[variant] ?? ART.blobs;
|
|
432
|
+
if (!ART[variant])
|
|
433
|
+
devWarnOnce(`HeroVisual: 모르는 variant '${variant}' — blobs 로 세운다`);
|
|
434
|
+
return (_jsx("div", { ref: rootRef, className: cx('hero-visual', `hero-visual--${variant}`, motion === 'still' && 'hero-visual--still', motion === 'once' && 'hero-visual--once', className), style: { aspectRatio: `${art.width} / ${art.height}`, '--hero-visual-cycle': `${cycleMs}ms`, ...style }, role: label ? 'img' : undefined, "aria-label": label, "aria-hidden": label ? undefined : true, children: _jsx("svg", { className: "hero-visual__svg", viewBox: art.viewBox, preserveAspectRatio: "xMidYMid meet", focusable: "false", children: art.render(uid) }) }));
|
|
435
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import './WordTableBlock.css';
|
|
2
2
|
import type { WordTableBlockProps } from './wordTableBlockTypes';
|
|
3
3
|
export type { WordEntry, WordTableBlockProps } from './wordTableBlockTypes';
|
|
4
|
-
export default function WordTableBlock({ title, titleIcon, disc, filterTitle, filterCollapsible, filterDefaultCollapsed, filterCollapsed, onFilterCollapsedChange, filterHeaderSummary, brand, code, baseItem, baseContentTypes, cellCapacity, maxItemsPerPage, items, onSaveComplete, onLoad, onRemoveItem, onCopyItem, onReplaceItem, onPickForm, onReset, resetLabel, saveButtonLabel, secondarySaveButtonLabel, onReorder, showCellCount, onAddItem, className, renderSavePopup, renderWordSearch, hideControls, saveOnly, tableName, nameValue, onNameChange, descriptionValue, onDescriptionChange, namePlaceholder, descriptionPlaceholder, existingNames, editingName, onCancel, initialItemsPerPage, renderCellAction, actionsLeftExtra }: WordTableBlockProps): import("react").JSX.Element;
|
|
4
|
+
export default function WordTableBlock({ title, titleIcon, disc, filterTitle, filterCollapsible, filterDefaultCollapsed, filterCollapsed, onFilterCollapsedChange, filterHeaderSummary, brand, code, baseItem, baseContentTypes, cellCapacity, maxItemsPerPage, items, onSaveComplete, onLoad, onRemoveItem, onCopyItem, onReplaceItem, onPickForm, onReset, resetLabel, saveButtonLabel, secondarySaveButtonLabel, onReorder, showCellCount, onAddItem, fillerAdd, className, renderSavePopup, renderWordSearch, hideControls, saveOnly, tableName, nameValue, onNameChange, descriptionValue, onDescriptionChange, namePlaceholder, descriptionPlaceholder, existingNames, editingName, onCancel, initialItemsPerPage, renderCellAction, actionsLeftExtra }: WordTableBlockProps): import("react").JSX.Element;
|
|
@@ -44,7 +44,7 @@ function withUniqueIds(list) {
|
|
|
44
44
|
return id === it.id ? it : { ...it, id };
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
|
-
export default function WordTableBlock({ title, titleIcon, disc, filterTitle, filterCollapsible, filterDefaultCollapsed, filterCollapsed, onFilterCollapsedChange, filterHeaderSummary, brand, code, baseItem, baseContentTypes, cellCapacity, maxItemsPerPage, items, onSaveComplete, onLoad, onRemoveItem, onCopyItem, onReplaceItem, onPickForm, onReset, resetLabel, saveButtonLabel, secondarySaveButtonLabel, onReorder, showCellCount, onAddItem, className, renderSavePopup, renderWordSearch, hideControls, saveOnly, tableName, nameValue, onNameChange, descriptionValue, onDescriptionChange, namePlaceholder, descriptionPlaceholder, existingNames, editingName, onCancel, initialItemsPerPage, renderCellAction, actionsLeftExtra }) {
|
|
47
|
+
export default function WordTableBlock({ title, titleIcon, disc, filterTitle, filterCollapsible, filterDefaultCollapsed, filterCollapsed, onFilterCollapsedChange, filterHeaderSummary, brand, code, baseItem, baseContentTypes, cellCapacity, maxItemsPerPage, items, onSaveComplete, onLoad, onRemoveItem, onCopyItem, onReplaceItem, onPickForm, onReset, resetLabel, saveButtonLabel, secondarySaveButtonLabel, onReorder, showCellCount, onAddItem, fillerAdd, className, renderSavePopup, renderWordSearch, hideControls, saveOnly, tableName, nameValue, onNameChange, descriptionValue, onDescriptionChange, namePlaceholder, descriptionPlaceholder, existingNames, editingName, onCancel, initialItemsPerPage, renderCellAction, actionsLeftExtra }) {
|
|
48
48
|
const { t } = useTranslation();
|
|
49
49
|
const resolvedResetLabel = resetLabel ?? t('wordPrint.clearAllSelection', '모두 선택 해제');
|
|
50
50
|
const isEditable = items === undefined;
|
|
@@ -399,7 +399,7 @@ export default function WordTableBlock({ title, titleIcon, disc, filterTitle, fi
|
|
|
399
399
|
/* **빈 칸과 '추가하기' 는 쪽이 나뉘어도 선다**(청 (327)) — 전에는 한 장짜리 가지에만
|
|
400
400
|
실려 있어 쪽이 둘이 되는 순간 단추가 조용히 사라졌다. 칸 번호는 위 둘과 같은 셈으로
|
|
401
401
|
**표 전체 기준**으로 올린다. */
|
|
402
|
-
showFillerAdd: !!onAddItem, onActivateCell: onAddItem ? (n => setActiveCell(n + i * itemsPerPage)) : undefined,
|
|
402
|
+
showFillerAdd: !!onAddItem, fillerAdd: fillerAdd, onActivateCell: onAddItem ? (n => setActiveCell(n + i * itemsPerPage)) : undefined,
|
|
403
403
|
/* 칸 크기가 쪽마다 같아야 해서 `count` 는 모든 쪽이 '페이지당 개수' 다 —
|
|
404
404
|
채울 자리는 마지막 쪽에서 모자랄 수 있으니 그것만 따로 센다.
|
|
405
405
|
|
|
@@ -422,7 +422,7 @@ export default function WordTableBlock({ title, titleIcon, disc, filterTitle, fi
|
|
|
422
422
|
자리에서는 `count === capacity` 라 둘이 같다(154~158줄). */
|
|
423
423
|
addableCount: capacitySet ? count : undefined,
|
|
424
424
|
/* 편집 모드에는 얹을 항목이 없다 — 칸을 손으로 채우는 꼴이다 */
|
|
425
|
-
renderCellAction: !isEditable ? renderCellAction : undefined, brand: band, code: code, showFillerAdd: !!onAddItem, contentRef: contentRef })), !hideControls && !saveOnly && actionsLeftExtra != null && (_jsx("div", { className: "word-table-block__table-actions", children: actionsLeftExtra })), inlineNameFields && !hideControls && (_jsxs(Panel, { size: "medium", labelWidth: 64, useBorder: false, useRowBorder: false, className: "word-table-block__meta", children: [_jsx(PanelRow, { variant: "custom", label: t('wordTable.save.nameLabel', '이름'), required: true, align: "vertical", useFullWidth: true, children: _jsx(TextField, { required: true, value: nameValue ?? '', onChange: onNameChange, placeholder: namePlaceholder ? namePlaceholder + t('wordTable.save.autoFillHint', ' (Tab 또는 space 입력시 자동 입력)') : t('wordTable.save.placeholder', '이 단어표에 대한 제목을 입력하세요.'),
|
|
425
|
+
renderCellAction: !isEditable ? renderCellAction : undefined, brand: band, code: code, showFillerAdd: !!onAddItem, fillerAdd: fillerAdd, contentRef: contentRef })), !hideControls && !saveOnly && actionsLeftExtra != null && (_jsx("div", { className: "word-table-block__table-actions", children: actionsLeftExtra })), inlineNameFields && !hideControls && (_jsxs(Panel, { size: "medium", labelWidth: 64, useBorder: false, useRowBorder: false, className: "word-table-block__meta", children: [_jsx(PanelRow, { variant: "custom", label: t('wordTable.save.nameLabel', '이름'), required: true, align: "vertical", useFullWidth: true, children: _jsx(TextField, { required: true, value: nameValue ?? '', onChange: onNameChange, placeholder: namePlaceholder ? namePlaceholder + t('wordTable.save.autoFillHint', ' (Tab 또는 space 입력시 자동 입력)') : t('wordTable.save.placeholder', '이 단어표에 대한 제목을 입력하세요.'),
|
|
426
426
|
/* PanelRow의 라벨은 시각적으로만 붙어 있고 입력과 연결돼 있지 않아, 낭독기에는
|
|
427
427
|
이름 없는 입력으로 읽혔다. placeholder는 자동완성 안내문("Tab 또는 space…")이
|
|
428
428
|
섞여 있어 이름으로 부적절하므로 같은 라벨 문구를 넘긴다. */
|
|
@@ -154,6 +154,12 @@ export interface WordTableBlockProps {
|
|
|
154
154
|
showCellCount?: boolean;
|
|
155
155
|
/** display 모드에서 칸 수 안의 빈 칸에 추가하기 버튼 표시 → `renderWordSearch` 로 고른 첫 낱말을 새 항목으로 넘긴다. 칸 수는 `showCellCount` 로만 늘릴 수 있어 **함께 줘야** 빈 칸이 생긴다(없으면 칸 수 = 항목 수라 단추가 뜰 자리가 없다). */
|
|
156
156
|
onAddItem?: (item: WordSearchResultItem) => void;
|
|
157
|
+
/**
|
|
158
|
+
* `onAddItem` 일 때 **어느 빈 칸에 `+` 를 세울지** — 안 주면 `'first'`(쪽마다 첫 빈 칸
|
|
159
|
+
* 하나). 그대로 `WordTable` 로 내려간다. 까닭은 거기 `fillerAdd` 에 적어 뒀다
|
|
160
|
+
* (말귀 청 (386), 2026-11-09).
|
|
161
|
+
*/
|
|
162
|
+
fillerAdd?: 'first' | 'every';
|
|
157
163
|
className?: string;
|
|
158
164
|
/** 저장 팝업 렌더러 */
|
|
159
165
|
renderSavePopup?: (props: {
|
|
@@ -109,6 +109,23 @@ export interface WordTableProps {
|
|
|
109
109
|
totalCount?: number;
|
|
110
110
|
/** 표시 모드에서 `count` 안의 빈칸(항목 수 뒤 ~ count)에 '추가' 버튼 노출. count 가 항목 수와 같으면 그런 칸이 없다. `onActivateCell` 필요. */
|
|
111
111
|
showFillerAdd?: boolean;
|
|
112
|
+
/**
|
|
113
|
+
* `showFillerAdd` 일 때 **어느 빈 칸에 `+` 를 세울지** — 안 주면 `'first'`.
|
|
114
|
+
*
|
|
115
|
+
* `'first'` 는 **첫 빈 칸 하나**에만 세운다(말귀 청 (386), 2026-11-09. 사장님 지시
|
|
116
|
+
* *"처음 + 버튼에만 tooltip info 로 추가하기 표현하기로 하지 않았나?"*).
|
|
117
|
+
*
|
|
118
|
+
* 전에는 빈 칸마다 세웠다. 그런데 **어느 빈 칸을 눌러도 다음 자리에 들어가므로**
|
|
119
|
+
* 단추가 여럿일 까닭이 없고, 빈 칸이 열둘인 활용표에서는 같은 `+` 가 넷 줄지어 서서
|
|
120
|
+
* 칸보다 단추가 먼저 읽혔다. 풍선 글(「클릭해서 추가하기」)도 넷이 같은 말을 한다.
|
|
121
|
+
*
|
|
122
|
+
* `'every'` 는 옛 길이다 — 빈 칸마다 세운다. 칸마다 다른 자리에 들어가게 만든
|
|
123
|
+
* 화면이 있다면 그것을 쓴다.
|
|
124
|
+
*
|
|
125
|
+
* **쪽으로 나뉜 표에서는 쪽마다 하나씩** 선다. 다른 쪽은 안 보이므로, 거기서도
|
|
126
|
+
* 채울 수 있으려면 그 쪽에도 단추가 있어야 한다.
|
|
127
|
+
*/
|
|
128
|
+
fillerAdd?: 'first' | 'every';
|
|
112
129
|
/**
|
|
113
130
|
* '추가하기' 가 설 수 있는 칸 수 — 안 주면 `count` 를 따른다.
|
|
114
131
|
*
|
|
@@ -268,4 +285,4 @@ export interface WordTableProps {
|
|
|
268
285
|
* 표시(items)·편집(editCells) 두 모드를 지원한다.
|
|
269
286
|
* @public
|
|
270
287
|
*/
|
|
271
|
-
export default function WordTable({ title, titleIcon, disc, className, orientation, contentTypes, baseItem, baseContentTypes, cutLine, showOutline, showDivLine, items, editCells, count, activeCell, onActivateCell, onRemoveCell, onRemoveItem, onReorder, onCopyItem, onReplaceItem, onPickForm, indexOffset, totalCount, renderCellAction, showFillerAdd, addableCount, contentRef, buttonSize, brand, code, pageNumber, pageNumberPosition, fitHeight, scoring, marks, onMarkClick, scoreIndexOffset, }: WordTableProps): import("react").JSX.Element;
|
|
288
|
+
export default function WordTable({ title, titleIcon, disc, className, orientation, contentTypes, baseItem, baseContentTypes, cutLine, showOutline, showDivLine, items, editCells, count, activeCell, onActivateCell, onRemoveCell, onRemoveItem, onReorder, onCopyItem, onReplaceItem, onPickForm, indexOffset, totalCount, renderCellAction, showFillerAdd, fillerAdd, addableCount, contentRef, buttonSize, brand, code, pageNumber, pageNumberPosition, fitHeight, scoring, marks, onMarkClick, scoreIndexOffset, }: WordTableProps): import("react").JSX.Element;
|
|
@@ -329,7 +329,7 @@ function WordCell({ label, subLabel, colloquialLabel, captionLabel, captionBadge
|
|
|
329
329
|
* 표시(items)·편집(editCells) 두 모드를 지원한다.
|
|
330
330
|
* @public
|
|
331
331
|
*/
|
|
332
|
-
export default function WordTable({ title, titleIcon, disc, className, orientation = 'landscape', contentTypes = ['image', 'word', 'standardPron'], baseItem, baseContentTypes, cutLine = 'show', showOutline = true, showDivLine = true, items, editCells, count, activeCell = null, onActivateCell, onRemoveCell, onRemoveItem, onReorder, onCopyItem, onReplaceItem, onPickForm, indexOffset = 0, totalCount, renderCellAction, showFillerAdd = false, addableCount, contentRef, buttonSize = 40, brand, code, pageNumber, pageNumberPosition = 'right', fitHeight = false, scoring = false, marks, onMarkClick, scoreIndexOffset = 0, }) {
|
|
332
|
+
export default function WordTable({ title, titleIcon, disc, className, orientation = 'landscape', contentTypes = ['image', 'word', 'standardPron'], baseItem, baseContentTypes, cutLine = 'show', showOutline = true, showDivLine = true, items, editCells, count, activeCell = null, onActivateCell, onRemoveCell, onRemoveItem, onReorder, onCopyItem, onReplaceItem, onPickForm, indexOffset = 0, totalCount, renderCellAction, showFillerAdd = false, fillerAdd = 'first', addableCount, contentRef, buttonSize = 40, brand, code, pageNumber, pageNumberPosition = 'right', fitHeight = false, scoring = false, marks, onMarkClick, scoreIndexOffset = 0, }) {
|
|
333
333
|
const clickMark = useCallback((cellIndex, clicked) => {
|
|
334
334
|
onMarkClick?.(scoreIndexOffset + cellIndex, clicked);
|
|
335
335
|
}, [onMarkClick, scoreIndexOffset]);
|
|
@@ -821,7 +821,7 @@ export default function WordTable({ title, titleIcon, disc, className, orientati
|
|
|
821
821
|
const gridCells = itemCols * itemRows;
|
|
822
822
|
const addableLimit = addableCount ?? gridCells;
|
|
823
823
|
const isWithinCount = (items?.length ?? 0) + i < addableLimit;
|
|
824
|
-
return (_jsx("div", { className: withLegacy("word-table__card word-table__card--filler"), children: showFillerAdd && onActivateCell && isWithinCount && (
|
|
824
|
+
return (_jsx("div", { className: withLegacy("word-table__card word-table__card--filler"), children: showFillerAdd && onActivateCell && isWithinCount && (fillerAdd === 'every' || i === 0) && (
|
|
825
825
|
/* **점 단추 하나**(사장님 지시 2026-10-28: *"Button dot size 40 베리언트
|
|
826
826
|
디폴트로"*). 전에는 `추가하기` 글자를 단 가로 단추였는데, 빈 칸이 열둘인
|
|
827
827
|
활용표에서는 같은 글자가 열두 번 서서 칸보다 글자가 먼저 읽혔다.
|
|
@@ -350,6 +350,8 @@ export { default as WordTableButton } from './components/Word/WordTableButton';
|
|
|
350
350
|
export type { WordTableButtonProps } from './components/Word/WordTableButton';
|
|
351
351
|
export { default as TrainingResultPopup } from './components/Popup/TrainingResultPopup';
|
|
352
352
|
export { default as WordDataUpdatePopup } from './components/Popup/WordDataUpdatePopup';
|
|
353
|
+
export { default as HeroVisual, HERO_VISUAL_VARIANTS } from './components/HeroVisual';
|
|
354
|
+
export type { HeroVisualProps, HeroVisualVariant } from './components/HeroVisual';
|
|
353
355
|
export { default as Tooltip } from './components/Tooltip/Tooltip';
|
|
354
356
|
export type { TooltipProps } from './components/Tooltip/Tooltip';
|
|
355
357
|
export { default as WordImageTooltip } from './components/Tooltip/WordImageTooltip';
|
|
@@ -271,6 +271,7 @@ export { default as WordTableThumbnail } from './components/Word/WordTableThumbn
|
|
|
271
271
|
export { default as WordTableButton } from './components/Word/WordTableButton';
|
|
272
272
|
export { default as TrainingResultPopup } from './components/Popup/TrainingResultPopup';
|
|
273
273
|
export { default as WordDataUpdatePopup } from './components/Popup/WordDataUpdatePopup';
|
|
274
|
+
export { default as HeroVisual, HERO_VISUAL_VARIANTS } from './components/HeroVisual';
|
|
274
275
|
export { default as Tooltip } from './components/Tooltip/Tooltip';
|
|
275
276
|
export { default as WordImageTooltip } from './components/Tooltip/WordImageTooltip';
|
|
276
277
|
export { default as DebugResultLauncher } from './components/Tooltip/DebugTooltip';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { DifficultyLevel } from '../utils/koreanSyllable';
|
|
2
|
+
import { type WordComposition } from './wordTrainingFilterModel';
|
|
3
|
+
import type { ViableComposition, WordTrainingFilterCaps } from './wordTrainingFilterSections';
|
|
4
|
+
/** `useWordPoolViability` 가 내놓는 것 */
|
|
5
|
+
export interface WordPoolViability {
|
|
6
|
+
/** 풀에 실제로 있는 자모·음절 수 */
|
|
7
|
+
viable: ViableComposition;
|
|
8
|
+
/** 자모를 한 번이라도 받아 왔는가 — 받기 전에는 저장된 선택을 풀면 안 된다 */
|
|
9
|
+
viableReady: boolean;
|
|
10
|
+
/** 지금 필터로 나올 정답 낱말 수 (null = 아직 안 셈) */
|
|
11
|
+
wordCount: number | null;
|
|
12
|
+
/** 풀이 바뀔 때마다 오르는 수 — 부르는 쪽이 제 다시-세기에 쓴다 */
|
|
13
|
+
poolVersion: number;
|
|
14
|
+
}
|
|
15
|
+
export declare function useWordPoolViability(args: {
|
|
16
|
+
caps: WordTrainingFilterCaps;
|
|
17
|
+
difficulty: DifficultyLevel;
|
|
18
|
+
contrastCount: number;
|
|
19
|
+
composition: WordComposition;
|
|
20
|
+
phonemeView: 'char' | 'pron' | 'direct';
|
|
21
|
+
excludeNoImage: boolean;
|
|
22
|
+
sameStructureOnly: boolean;
|
|
23
|
+
gradeFilter: string[];
|
|
24
|
+
}): WordPoolViability;
|