thuthi-plugin 0.0.0-stage → 0.1.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/.claude-plugin/marketplace.json +55 -0
- package/README.md +13 -2
- package/bin/parallel-browser.js +109 -0
- package/extension/background.js +1329 -0
- package/extension/config.json +1 -0
- package/extension/guard.js +44 -0
- package/extension/manifest.json +10 -0
- package/extension/overlay.js +104 -0
- package/extension/popup.html +34 -0
- package/extension/popup.js +39 -0
- package/extension-reloader/manifest.json +13 -0
- package/extension-reloader/sw.js +17 -0
- package/package.json +13 -4
- package/plugins/thuthi/.claude-plugin/plugin.json +8 -0
- package/plugins/thuthi/context.md +3 -0
- package/plugins/thuthi/hooks/hooks.json +15 -0
- package/plugins/thuthi/skills/setup/SKILL.md +55 -0
- package/plugins/thuthi/skills/setup/scripts/doctor.py +249 -0
- package/plugins/thuthi/skills/setup/scripts/selftest.py +188 -0
- package/plugins/thuthi/tools/claude-switch/claude_switch.py +8 -0
- package/plugins/thuthi/tools/legacy_launcher.py +65 -0
- package/plugins/thuthi/tools/statusline/statusline.py +8 -0
- package/plugins/thuthi-accounts/.claude-plugin/plugin.json +9 -0
- package/plugins/thuthi-accounts/bin/claude-switch +5 -0
- package/plugins/thuthi-accounts/bin/claude-switch.cmd +4 -0
- package/plugins/thuthi-accounts/hooks/hooks.json +15 -0
- package/plugins/thuthi-accounts/lib/tls.py +68 -0
- package/plugins/thuthi-accounts/lib/usage_store.py +150 -0
- package/plugins/thuthi-accounts/setup_check.py +21 -0
- package/plugins/thuthi-accounts/skills/claude-switch/SKILL.md +48 -0
- package/plugins/thuthi-accounts/tools/claude-switch/claude-switch-tui.py +397 -0
- package/plugins/thuthi-accounts/tools/claude-switch/claude_switch.py +1204 -0
- package/plugins/thuthi-accounts/tools/claude-switch/credstore.py +417 -0
- package/plugins/thuthi-accounts/tools/claude-switch/install.py +301 -0
- package/plugins/thuthi-accounts/tools/claude-switch/tests/selftest.py +491 -0
- package/plugins/thuthi-accounts/tools/statusline/statusline.py +212 -0
- package/plugins/thuthi-agenda-picker/.claude-plugin/plugin.json +9 -0
- package/plugins/thuthi-agenda-picker/context.md +3 -0
- package/plugins/thuthi-agenda-picker/hooks/hooks.json +15 -0
- package/plugins/thuthi-agenda-picker/lib/pbpage.py +397 -0
- package/plugins/thuthi-agenda-picker/setup_check.py +18 -0
- package/plugins/thuthi-agenda-picker/skills/agenda-picker/SKILL.md +280 -0
- package/plugins/thuthi-agenda-picker/skills/agenda-picker/references/design-rules.md +110 -0
- package/plugins/thuthi-agenda-picker/skills/agenda-picker/references/diagram/base.css +33 -0
- package/plugins/thuthi-agenda-picker/skills/agenda-picker/references/example/agenda.json +146 -0
- package/plugins/thuthi-agenda-picker/skills/agenda-picker/references/example/shots/A-dark.svg +5 -0
- package/plugins/thuthi-agenda-picker/skills/agenda-picker/references/example/shots/A-light.svg +5 -0
- package/plugins/thuthi-agenda-picker/skills/agenda-picker/references/example/shots/B-dark.svg +5 -0
- package/plugins/thuthi-agenda-picker/skills/agenda-picker/references/example/shots/B-light.svg +5 -0
- package/plugins/thuthi-agenda-picker/skills/agenda-picker/references/example/shots/C-dark.svg +5 -0
- package/plugins/thuthi-agenda-picker/skills/agenda-picker/references/example/shots/C-light.svg +5 -0
- package/plugins/thuthi-agenda-picker/skills/agenda-picker/references/example/shots/base.css +33 -0
- package/plugins/thuthi-agenda-picker/skills/agenda-picker/references/example/shots/name-B.html +15 -0
- package/plugins/thuthi-agenda-picker/skills/agenda-picker/references/example/shots/now-dark.svg +5 -0
- package/plugins/thuthi-agenda-picker/skills/agenda-picker/references/example/shots/now-light.svg +5 -0
- package/plugins/thuthi-agenda-picker/skills/agenda-picker/scripts/picker.py +1286 -0
- package/plugins/thuthi-agenda-picker/skills/agenda-picker/scripts/selftest.py +771 -0
- package/plugins/thuthi-agenda-picker/skills/agenda-picker/scripts/shot.py +117 -0
- package/plugins/thuthi-agenda-picker/skills/agenda-picker/scripts/template.html +1029 -0
- package/plugins/thuthi-arch-diagram/.claude-plugin/plugin.json +9 -0
- package/plugins/thuthi-arch-diagram/lib/pbpage.py +397 -0
- package/plugins/thuthi-arch-diagram/lib/tls.py +68 -0
- package/plugins/thuthi-arch-diagram/setup_check.py +10 -0
- package/plugins/thuthi-arch-diagram/skills/arch-diagram/SKILL.md +125 -0
- package/plugins/thuthi-arch-diagram/skills/arch-diagram/references/design-rules.md +110 -0
- package/plugins/thuthi-arch-diagram/skills/arch-diagram/references/example-shop.py +167 -0
- package/plugins/thuthi-arch-diagram/skills/arch-diagram/scripts/check.py +194 -0
- package/plugins/thuthi-arch-diagram/skills/arch-diagram/scripts/diagramkit.py +682 -0
- package/plugins/thuthi-arch-diagram/skills/arch-diagram/scripts/interact_test.py +115 -0
- package/plugins/thuthi-arch-diagram/skills/arch-diagram/scripts/render.py +113 -0
- package/plugins/thuthi-browser/.claude-plugin/plugin.json +9 -0
- package/plugins/thuthi-browser/context.md +3 -0
- package/plugins/thuthi-browser/hooks/hooks.json +15 -0
- package/plugins/thuthi-browser/lib/pbpage.py +397 -0
- package/plugins/thuthi-browser/setup_check.py +93 -0
- package/plugins/thuthi-browser/skills/parallel-browser/SKILL.md +271 -0
- package/plugins/thuthi-browser/skills/parallel-browser/references/api.md +243 -0
- package/plugins/thuthi-browser/skills/parallel-browser/references/install.md +106 -0
- package/plugins/thuthi-demo-video/.claude-plugin/plugin.json +9 -0
- package/plugins/thuthi-demo-video/lib/pbpage.py +397 -0
- package/plugins/thuthi-demo-video/setup_check.py +14 -0
- package/plugins/thuthi-demo-video/skills/demo-video/SKILL.md +261 -0
- package/plugins/thuthi-demo-video/skills/demo-video/scripts/caption.html +16 -0
- package/plugins/thuthi-demo-video/skills/demo-video/scripts/cursor.js +132 -0
- package/plugins/thuthi-demo-video/skills/demo-video/scripts/demo_video.py +2416 -0
- package/plugins/thuthi-demo-video/skills/demo-video/scripts/example_scenario.py +97 -0
- package/plugins/thuthi-demo-video/skills/demo-video/scripts/frame.html +95 -0
- package/plugins/thuthi-demo-video/skills/demo-video/scripts/overlay.js +129 -0
- package/plugins/thuthi-demo-video/skills/demo-video/scripts/title.html +30 -0
- package/plugins/thuthi-no-more-slop/.claude-plugin/plugin.json +9 -0
- package/plugins/thuthi-no-more-slop/setup_check.py +10 -0
- package/plugins/thuthi-no-more-slop/skills/no-more-slop/LICENSE +21 -0
- package/plugins/thuthi-no-more-slop/skills/no-more-slop/SKILL.md +235 -0
- package/plugins/thuthi-no-more-slop/skills/no-more-slop/SOURCE.txt +1 -0
- package/plugins/thuthi-no-more-slop/skills/no-more-slop/agents/openai.yaml +6 -0
- package/plugins/thuthi-no-more-slop/skills/no-more-slop/references/examples.md +289 -0
- package/plugins/thuthi-no-more-slop/skills/no-more-slop/references/tokens.md +46 -0
- package/plugins/thuthi-no-more-slop/skills/no-more-slop/references/unslop-fallback.md +36 -0
- package/plugins/thuthi-no-more-slop/skills/no-more-slop/scripts/count_tells.py +426 -0
- package/plugins/thuthi-orca/.claude-plugin/plugin.json +9 -0
- package/plugins/thuthi-orca/context.md +5 -0
- package/plugins/thuthi-orca/hooks/hooks.json +18 -0
- package/plugins/thuthi-orca/hooks/orca-team-grid.ts +21 -0
- package/plugins/thuthi-orca/setup_check.py +12 -0
- package/plugins/thuthi-orca/skills/orca-new-work/SKILL.md +492 -0
- package/plugins/thuthi-orca/tools/orca-team-grid/bin/tmux +338 -0
- package/plugins/thuthi-orca/tools/orca-team-grid/tests/selftest.py +299 -0
- package/runtime/client.js +69 -0
- package/runtime/daemon.js +503 -0
- package/runtime/focus-monitor.js +53 -0
- package/runtime/keys.js +86 -0
- package/runtime/owner.js +64 -0
- package/runtime/recorder.js +267 -0
- package/runtime/relay.js +95 -0
- package/runtime/session.js +1599 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
"""시나리오 예시 — 이 파일을 복사해서 고쳐 쓴다.
|
|
3
|
+
|
|
4
|
+
시나리오가 제공해야 하는 것:
|
|
5
|
+
START_URL (필수) 처음 열 주소
|
|
6
|
+
prepare(page) (선택) 로그인 · 이동 · "찍을 준비가 됐는지" 확인. 이 구간은 영상에서 잘린다
|
|
7
|
+
page 는 Playwright 동기 Page 와 같은 이름의 메서드를 가진 parallel-browser page 다
|
|
8
|
+
scenario(d) (필수) 본편. d 는 Director
|
|
9
|
+
STYLE (선택) 색·간격 덮어쓰기
|
|
10
|
+
|
|
11
|
+
Director 에서 쓸 수 있는 것:
|
|
12
|
+
d.say(text | None, hold=None) 하단 자막. hold="auto" 면 읽을 시간만큼 기다린다
|
|
13
|
+
d.point(label, 방향, selector=/contains=) 대상에 링 + 화살표 + 말풍선
|
|
14
|
+
d.unpoint() 화살표 제거
|
|
15
|
+
d.fast(n) / d.normal() 빨리 감을 구간 (1~8배)
|
|
16
|
+
d.cut(label=None) / d.normal() 잘라 낼 구간 (긴 기다림). 그 자리에 "▶▶| 3분 뒤"
|
|
17
|
+
d.sleep(sec)
|
|
18
|
+
d.wait_until(js, timeout) / d.wait_text(text, timeout)
|
|
19
|
+
d.kill_port(port) / d.shell(cmd) / d.wait_port(port, up=)
|
|
20
|
+
d.page page (click · fill · locator · keyboard · mouse · wait_for_function …)
|
|
21
|
+
|
|
22
|
+
방향은 말풍선이 대상 기준 어느 쪽에 놓이는가 — 우상 / 좌상 / 좌하 / 우하.
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
START_URL = "http://127.0.0.1:8765/"
|
|
26
|
+
|
|
27
|
+
# 화살표 · 줌 대상을 못 찾으면 멈춘다 (기본 True). 경고만 받고 이어 찍으려면 False.
|
|
28
|
+
# STRICT = False
|
|
29
|
+
|
|
30
|
+
# 선택 — 있으면 영상 맨 앞에 타이틀 카드가 붙는다 (글자 페이드인 → 본편 크로스페이드).
|
|
31
|
+
# TITLE = {"badge": "IT250218R-000", "title": "무엇을 보여 주는 영상인지", "subtitle": "한 줄 설명"}
|
|
32
|
+
|
|
33
|
+
# 선택 — 기본값을 바꾸고 싶을 때만.
|
|
34
|
+
STYLE = {
|
|
35
|
+
# "accent": "rgba(37,99,235,.95)", # 강조색을 파랑으로
|
|
36
|
+
# "captionBottom": 120,
|
|
37
|
+
# 브라우저 창 프레임 (기본 켜짐). 주소창의 URL 은 녹화 중 자동으로 잡히니 적을 필요 없다.
|
|
38
|
+
# "frame": False, # 프레임 없이 화면만
|
|
39
|
+
# "frame": {
|
|
40
|
+
# "origin": "aidu.studio", # 127.0.0.1:5181 같은 로컬 origin 을 이렇게 보여 준다
|
|
41
|
+
# "hide_query": True, # ?a=b 숨김
|
|
42
|
+
# "rewrite": [[r"&tab=", " · "]], # [정규식, 치환] 순서대로 적용
|
|
43
|
+
# "bg": "#0f172a", # 배경 CSS (그라디언트 가능)
|
|
44
|
+
# "pad": 64, "bar": 48, "radius": 14,
|
|
45
|
+
# },
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def prepare(page):
|
|
50
|
+
"""로그인이나 이동이 필요하면 여기서. 여기까지는 영상에서 잘려 나간다."""
|
|
51
|
+
page.wait_for_function(
|
|
52
|
+
"() => document.body.innerText.includes('데모 화면')", timeout=20_000
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
def scenario(d):
|
|
57
|
+
# 1) 평소 상태를 보여 주고, 무엇을 볼지 가리킨다
|
|
58
|
+
d.say("정상 상태입니다")
|
|
59
|
+
d.point("여기를 봐 주세요", "우상", contains="중요한 값")
|
|
60
|
+
d.sleep(3) # 화살표를 볼 시간. 자막만 읽히면 되는 장면은 d.say(..., hold="auto")
|
|
61
|
+
|
|
62
|
+
# 2) 무슨 일을 일으킨다 (버튼 클릭, 서버 종료 등)
|
|
63
|
+
d.unpoint()
|
|
64
|
+
d.say("버튼을 누릅니다")
|
|
65
|
+
d.page.click("#go")
|
|
66
|
+
d.wait_text("바뀐 값", timeout=10)
|
|
67
|
+
|
|
68
|
+
d.point("이렇게 바뀝니다", "좌하", contains="바뀐 값")
|
|
69
|
+
d.say("값이 바뀌었습니다", hold="auto")
|
|
70
|
+
|
|
71
|
+
# 2b) 주소가 바뀐 장면이면 브라우저 창 프레임의 주소창을 가리킬 수 있다 (프레임이 켜져 있을 때)
|
|
72
|
+
# d.point_url("주소가 /result 로 바뀌었어요", "우하")
|
|
73
|
+
# d.sleep(3)
|
|
74
|
+
|
|
75
|
+
# 2c) 작은 요소를 보여 줄 땐 카메라가 다가가듯 확대 (smootherstep 1초, 자막은 확대 밖에 고정)
|
|
76
|
+
# d.zoom(1.8, contains="바뀐 값")
|
|
77
|
+
# d.point("여기", "좌하", contains="바뀐 값")
|
|
78
|
+
# d.sleep(3)
|
|
79
|
+
# d.unpoint()
|
|
80
|
+
# d.zoom(1.8, contains="다음 값") # 줌 상태에서 다시 부르면 줌아웃 없이 카메라가 이동
|
|
81
|
+
# d.sleep(3)
|
|
82
|
+
# d.unzoom()
|
|
83
|
+
|
|
84
|
+
# 3) 기다리기만 하는 구간은 빨리 감는다 (화면 우측 아래에 배속 표시가 뜬다)
|
|
85
|
+
d.unpoint()
|
|
86
|
+
d.fast(6)
|
|
87
|
+
d.say("결과를 기다립니다")
|
|
88
|
+
d.sleep(8)
|
|
89
|
+
d.normal()
|
|
90
|
+
|
|
91
|
+
# 3b) 몇 분씩 걸리는 기다림은 잘라 낸다 (그 자리에 "▶▶| 3분 12초 뒤" 가 뜬다)
|
|
92
|
+
# d.cut()
|
|
93
|
+
# d.wait_text("완료", timeout=600)
|
|
94
|
+
# d.normal()
|
|
95
|
+
|
|
96
|
+
# 4) 마무리
|
|
97
|
+
d.say("끝났습니다", hold="auto")
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<!--
|
|
3
|
+
브라우저 창 프레임 템플릿. render 단계가 이 문서를 parallel-browser 탭에서 캔버스 크기만큼
|
|
4
|
+
투명 배경으로 찍어 영상 위에 얹는다. 영상이 들어갈 자리(구멍)는 아무것도 칠하지 않아
|
|
5
|
+
투명하게 남고, 그 밖(배경 그라디언트 · 창 그림자 · 타이틀바 · 주소창)만 불투명하다.
|
|
6
|
+
|
|
7
|
+
치환 자리표시자: __CW__ __CH__ __PAD__ __BAR__ __W__ __H__ __R__ __BG__
|
|
8
|
+
__URL_HOST__ __URL_REST__ __TITLE__
|
|
9
|
+
-->
|
|
10
|
+
<html lang="ko">
|
|
11
|
+
<head>
|
|
12
|
+
<meta charset="utf-8">
|
|
13
|
+
<style>
|
|
14
|
+
:root {
|
|
15
|
+
--cw: __CW__px; --ch: __CH__px; --pad: __PAD__px; --bar: __BAR__px;
|
|
16
|
+
--w: __W__px; --h: __H__px; --r: __R__px;
|
|
17
|
+
--bar-bg: #f5f5f7; --bar-line: rgba(0,0,0,.08);
|
|
18
|
+
--pill-bg: #ffffff; --pill-line: rgba(0,0,0,.08);
|
|
19
|
+
--host: #1d1d1f; --rest: #8e8e93; --icon: #9a9aa0;
|
|
20
|
+
--shadow: 0 30px 70px rgba(15, 23, 42, .28), 0 4px 14px rgba(15, 23, 42, .12);
|
|
21
|
+
}
|
|
22
|
+
html, body { margin: 0; width: var(--cw); height: var(--ch); overflow: hidden; background: transparent; }
|
|
23
|
+
body { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Pretendard", "Noto Sans KR", Helvetica, Arial, sans-serif; }
|
|
24
|
+
|
|
25
|
+
/* 배경 — 영상 자리만 evenodd 경로로 도려낸다 (아래 두 모서리는 창 radius 로 둥글게) */
|
|
26
|
+
.bg { position: absolute; inset: 0; background: __BG__; clip-path: path(evenodd, "__HOLE_PATH__"); }
|
|
27
|
+
|
|
28
|
+
/* 창 그림자 — 상자 자체는 비워 두고 바깥 그림자만 칠한다 */
|
|
29
|
+
.shadow { position: absolute; left: var(--pad); top: var(--pad); width: var(--w); height: calc(var(--bar) + var(--h));
|
|
30
|
+
border-radius: var(--r); box-shadow: var(--shadow); }
|
|
31
|
+
|
|
32
|
+
/* 타이틀바 (신호등 + 주소 pill) */
|
|
33
|
+
.bar { position: absolute; left: var(--pad); top: var(--pad); width: var(--w); height: var(--bar);
|
|
34
|
+
background: var(--bar-bg); border-radius: var(--r) var(--r) 0 0;
|
|
35
|
+
box-shadow: inset 0 -1px 0 var(--bar-line); display: flex; align-items: center; box-sizing: border-box; padding: 0 16px; }
|
|
36
|
+
.lights { display: flex; gap: 8px; flex: 0 0 auto; }
|
|
37
|
+
.lights i { width: 12px; height: 12px; border-radius: 50%; display: block; }
|
|
38
|
+
.lights .r { background: #ff5f57; } .lights .y { background: #febc2e; } .lights .g { background: #28c840; }
|
|
39
|
+
.nav { display: flex; gap: 14px; margin-left: 18px; color: var(--icon); flex: 0 0 auto; }
|
|
40
|
+
.nav svg { width: 14px; height: 14px; display: block; }
|
|
41
|
+
.pill { flex: 1 1 auto; margin: 0 auto; max-width: 62%; height: 30px; border-radius: 9px; background: var(--pill-bg);
|
|
42
|
+
box-shadow: 0 0 0 1px var(--pill-line); display: flex; align-items: center; gap: 8px; padding: 0 12px;
|
|
43
|
+
font-size: 13.5px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; }
|
|
44
|
+
.pill svg { width: 12px; height: 12px; flex: 0 0 auto; color: var(--icon); }
|
|
45
|
+
.pill .url { overflow: hidden; text-overflow: ellipsis; }
|
|
46
|
+
.pill .host { color: var(--host); font-weight: 500; }
|
|
47
|
+
.pill .rest { color: var(--rest); }
|
|
48
|
+
.spacer { flex: 0 0 auto; width: 96px; } /* 좌측(신호등+화살표) 폭만큼 오른쪽을 비워 pill 을 가운데에 */
|
|
49
|
+
</style>
|
|
50
|
+
</head>
|
|
51
|
+
<body>
|
|
52
|
+
<div class="bg"></div>
|
|
53
|
+
<div class="shadow"></div>
|
|
54
|
+
<div class="bar">
|
|
55
|
+
<div class="lights"><i class="r"></i><i class="y"></i><i class="g"></i></div>
|
|
56
|
+
<div class="nav">
|
|
57
|
+
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M10 3 5 8l5 5"/></svg>
|
|
58
|
+
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="m6 3 5 5-5 5"/></svg>
|
|
59
|
+
</div>
|
|
60
|
+
<div class="pill">
|
|
61
|
+
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round"><rect x="3" y="7" width="10" height="7" rx="1.5"/><path d="M5.5 7V5a2.5 2.5 0 0 1 5 0v2"/></svg>
|
|
62
|
+
<span class="url"><span class="host">__URL_HOST__</span><span class="rest">__URL_REST__</span></span>
|
|
63
|
+
</div>
|
|
64
|
+
<div class="spacer"></div>
|
|
65
|
+
</div>
|
|
66
|
+
<!-- 주소창을 가리키는 화살표 (d.point_url) — 페이지 안 화살표(overlay.js)와 같은 생김새 -->
|
|
67
|
+
<div id="ptr" style="position:absolute;inset:0;pointer-events:none"></div>
|
|
68
|
+
<script>
|
|
69
|
+
(() => {
|
|
70
|
+
const P = __POINTER_JSON__;
|
|
71
|
+
if (!P) return;
|
|
72
|
+
const accent = P.accent || 'rgba(220,38,38,.95)';
|
|
73
|
+
const bubble = P.bubble || 'rgba(185,28,28,0.92)';
|
|
74
|
+
const r = document.querySelector('.pill').getBoundingClientRect();
|
|
75
|
+
const DIRS = { '우상': [1, -1], '좌상': [-1, -1], '좌하': [-1, 1], '우하': [1, 1],
|
|
76
|
+
tr: [1, -1], tl: [-1, -1], bl: [-1, 1], br: [1, 1] };
|
|
77
|
+
const [sx, sy] = DIRS[P.direction] || DIRS['우하'];
|
|
78
|
+
const tx = r.left + r.width / 2 + sx * Math.min(r.width / 2, 48);
|
|
79
|
+
const ty = r.top + r.height / 2 + sy * (r.height / 2 + 6);
|
|
80
|
+
const bx = Math.min(Math.max(tx + sx * (P.gapX || 120), 12), innerWidth - 12);
|
|
81
|
+
const by = Math.min(Math.max(ty + sy * (P.gapY || 86), 12), innerHeight - 12);
|
|
82
|
+
const esc = (s) => String(s).replace(/&/g, '&').replace(/</g, '<');
|
|
83
|
+
document.getElementById('ptr').innerHTML =
|
|
84
|
+
`<div style="position:absolute;left:${r.left - 6}px;top:${r.top - 6}px;width:${r.width + 12}px;height:${r.height + 12}px;` +
|
|
85
|
+
`border:2px solid ${accent};border-radius:13px;box-shadow:0 0 0 4px rgba(220,38,38,.18)"></div>` +
|
|
86
|
+
`<svg style="position:absolute;inset:0;width:100%;height:100%;overflow:visible">` +
|
|
87
|
+
`<defs><marker id="h" markerWidth="7" markerHeight="7" refX="5.6" refY="3" orient="auto"><path d="M0,0 L6,3 L0,6 z" fill="${accent}"/></marker></defs>` +
|
|
88
|
+
`<line x1="${bx}" y1="${by}" x2="${tx}" y2="${ty}" stroke="${accent}" stroke-width="2.5" stroke-linecap="round" stroke-dasharray="7 7" marker-end="url(#h)"/></svg>` +
|
|
89
|
+
`<div style="position:absolute;left:${bx}px;top:${by}px;transform:translate(${sx > 0 ? 0 : -100}%,${sy > 0 ? 0 : -100}%);` +
|
|
90
|
+
`max-width:280px;padding:8px 13px;border-radius:8px;background:${bubble};color:#fff;font-size:14px;font-weight:600;line-height:1.45;` +
|
|
91
|
+
`font-family:system-ui,-apple-system,'Apple SD Gothic Neo',sans-serif">${esc(P.label)}</div>`;
|
|
92
|
+
})();
|
|
93
|
+
</script>
|
|
94
|
+
</body>
|
|
95
|
+
</html>
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
// 시연 영상 화면 주석 — 가리키는 화살표 (자막 · 배속 표시는 render 가 그린다).
|
|
2
|
+
//
|
|
3
|
+
// 페이지 안에 DOM 으로 얹는다. 녹화가 25fps 로 실제 프레임을 담으므로 CSS
|
|
4
|
+
// 애니메이션이 그대로 영상에 담긴다 (정지 이미지에 화살표를 합성한 것과 달리 등장과
|
|
5
|
+
// 호흡이 살아 있다).
|
|
6
|
+
//
|
|
7
|
+
// 인자는 부분 갱신이다 — 넘긴 키만 바뀌고 나머지는 그대로 둔다.
|
|
8
|
+
// { pointer: {...} | null } 화살표, null 이면 제거
|
|
9
|
+
// { style: {...} } 색·간격 등 덮어쓰기
|
|
10
|
+
(arg) => {
|
|
11
|
+
const Z = 2147483646;
|
|
12
|
+
const S = Object.assign(
|
|
13
|
+
{
|
|
14
|
+
accent: 'rgba(220,38,38,.95)', // 강조색 (링 · 화살표)
|
|
15
|
+
bubble: 'rgba(185,28,28,0.92)', // 말풍선 배경
|
|
16
|
+
caption: 'rgba(18,18,18,0.82)', // 자막 배경
|
|
17
|
+
captionBottom: 96, // 자막을 화면 아래에서 얼마나 띄울지 (px)
|
|
18
|
+
captionRadius: 8, // 자막 모서리 (px)
|
|
19
|
+
fastRadius: 8, // 배속 표시 모서리 (px)
|
|
20
|
+
bubbleRadius: 8, // 화살표 말풍선 모서리 (px)
|
|
21
|
+
ringRadius: 6, // 대상 강조 링 모서리 (px)
|
|
22
|
+
gapX: 120, // 말풍선 가로 거리 (px)
|
|
23
|
+
gapY: 86, // 말풍선 세로 거리 (px)
|
|
24
|
+
ringMaxWidth: 900, // 이보다 넓은 대상은 링을 그리지 않는다
|
|
25
|
+
font: "system-ui,-apple-system,'Apple SD Gothic Neo',sans-serif",
|
|
26
|
+
},
|
|
27
|
+
arg.style || {},
|
|
28
|
+
);
|
|
29
|
+
|
|
30
|
+
if (!document.getElementById('__dv_style')) {
|
|
31
|
+
const st = document.createElement('style');
|
|
32
|
+
st.id = '__dv_style';
|
|
33
|
+
st.textContent = `
|
|
34
|
+
@keyframes __dvFadeUp { from { opacity:0; transform:translateY(6px) } to { opacity:1; transform:none } }
|
|
35
|
+
@keyframes __dvRing { 0%,100% { box-shadow:0 0 0 0 rgba(220,38,38,.55) } 50% { box-shadow:0 0 0 7px rgba(220,38,38,0) } }
|
|
36
|
+
@keyframes __dvDash { to { stroke-dashoffset:-14 } }
|
|
37
|
+
`;
|
|
38
|
+
document.head.appendChild(st);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
// 자막 · 배속 표시는 render 가 최종 화면에 그린다 (2026-10-11). 여기서는 화살표만 그린다.
|
|
44
|
+
const keepTop = () => { if (window.__dvKeepTop) window.__dvKeepTop(true); };
|
|
45
|
+
|
|
46
|
+
// ── 가리키는 화살표 ──────────────────────────────────────────────────────
|
|
47
|
+
if (!('pointer' in arg)) return { ok: true };
|
|
48
|
+
document.getElementById('__dv_pointer')?.remove();
|
|
49
|
+
if (!arg.pointer) return { ok: true };
|
|
50
|
+
|
|
51
|
+
const { selector, contains, direction, label, ring = true, scroll = true } = arg.pointer;
|
|
52
|
+
|
|
53
|
+
let target = null;
|
|
54
|
+
if (selector) {
|
|
55
|
+
target = document.querySelector(selector);
|
|
56
|
+
} else if (contains) {
|
|
57
|
+
// 텍스트를 담은 가장 안쪽 요소 — 셀렉터가 마땅치 않은 대상용.
|
|
58
|
+
const hits = [...document.querySelectorAll('body *')].filter(
|
|
59
|
+
(n) => n.children.length === 0 && n.textContent && n.textContent.includes(contains),
|
|
60
|
+
);
|
|
61
|
+
target = hits[hits.length - 1] || null;
|
|
62
|
+
}
|
|
63
|
+
if (!target) return { ok: false, reason: 'target-not-found' };
|
|
64
|
+
|
|
65
|
+
if (scroll) {
|
|
66
|
+
const pre = target.getBoundingClientRect();
|
|
67
|
+
const out = pre.top < 0 || pre.bottom > innerHeight || pre.left < 0 || pre.right > innerWidth;
|
|
68
|
+
if (out) target.scrollIntoView({ block: 'center', inline: 'center' });
|
|
69
|
+
}
|
|
70
|
+
const r = target.getBoundingClientRect();
|
|
71
|
+
if (r.width === 0 && r.height === 0) return { ok: false, reason: 'target-invisible' };
|
|
72
|
+
|
|
73
|
+
// 방향 = 말풍선이 대상 기준 어느 쪽에 놓이는가. 화살표는 거기서 대상으로 향한다.
|
|
74
|
+
const DIRS = {
|
|
75
|
+
'우상': [1, -1], '좌상': [-1, -1], '좌하': [-1, 1], '우하': [1, 1],
|
|
76
|
+
'tr': [1, -1], 'tl': [-1, -1], 'bl': [-1, 1], 'br': [1, 1],
|
|
77
|
+
};
|
|
78
|
+
const [sx, sy] = DIRS[direction] || DIRS['우상'];
|
|
79
|
+
|
|
80
|
+
const tx = r.left + r.width / 2 + sx * Math.min(r.width / 2, 48);
|
|
81
|
+
const ty = r.top + r.height / 2 + sy * (r.height / 2 + 6);
|
|
82
|
+
// 말풍선이 화면 밖으로 나가지 않게 가둔다.
|
|
83
|
+
const bx = Math.min(Math.max(tx + sx * S.gapX, 12), innerWidth - 12);
|
|
84
|
+
const by = Math.min(Math.max(ty + sy * S.gapY, 12), innerHeight - 12);
|
|
85
|
+
|
|
86
|
+
const root = document.createElement('div');
|
|
87
|
+
root.id = '__dv_pointer';
|
|
88
|
+
root.style.cssText =
|
|
89
|
+
// 크기를 직접 준다. 모달 위로 올릴 때 popover 기본값 (fit-content) 이면 0×0 이 되어 말풍선 글자가 세로로 쌓인다.
|
|
90
|
+
'position:fixed;inset:0;width:100vw;height:100vh;z-index:' + Z + ';pointer-events:none;' +
|
|
91
|
+
'animation:__dvFadeUp .32s ease-out both;';
|
|
92
|
+
|
|
93
|
+
// 링은 좁은 대상에서만 의미가 있다 — 전체 폭 요소에 두르면 밑줄처럼 보인다.
|
|
94
|
+
if (ring && r.width <= S.ringMaxWidth) {
|
|
95
|
+
const ringEl = document.createElement('div');
|
|
96
|
+
ringEl.style.cssText =
|
|
97
|
+
'position:fixed;left:' + (r.left - 6) + 'px;top:' + (r.top - 6) + 'px;' +
|
|
98
|
+
'width:' + (r.width + 12) + 'px;height:' + (r.height + 12) + 'px;' +
|
|
99
|
+
'border:2px solid ' + S.accent + ';border-radius:' + S.ringRadius + 'px;' +
|
|
100
|
+
'animation:__dvRing 1.8s ease-in-out infinite;';
|
|
101
|
+
root.appendChild(ringEl);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
|
|
105
|
+
svg.setAttribute('style', 'position:fixed;inset:0;width:100%;height:100%;overflow:visible;');
|
|
106
|
+
svg.innerHTML =
|
|
107
|
+
'<defs><marker id="__dvHead" markerWidth="7" markerHeight="7" refX="5.6" refY="3" orient="auto">' +
|
|
108
|
+
'<path d="M0,0 L6,3 L0,6 z" fill="' + S.accent + '"/></marker></defs>' +
|
|
109
|
+
'<line x1="' + bx + '" y1="' + by + '" x2="' + tx + '" y2="' + ty + '" stroke="' + S.accent + '" ' +
|
|
110
|
+
'stroke-width="2.5" stroke-linecap="round" stroke-dasharray="7 7" marker-end="url(#__dvHead)" ' +
|
|
111
|
+
'style="animation:__dvDash 1s linear infinite"/>';
|
|
112
|
+
root.appendChild(svg);
|
|
113
|
+
|
|
114
|
+
if (label) {
|
|
115
|
+
const box = document.createElement('div');
|
|
116
|
+
box.textContent = label;
|
|
117
|
+
box.style.cssText =
|
|
118
|
+
'position:fixed;left:' + bx + 'px;top:' + by + 'px;' +
|
|
119
|
+
'transform:translate(' + (sx > 0 ? '0' : '-100') + '%,' + (sy > 0 ? '0' : '-100') + '%);' +
|
|
120
|
+
'max-width:280px;padding:8px 13px;border-radius:' + S.bubbleRadius + 'px;' +
|
|
121
|
+
'background:' + S.bubble + ';color:#fff;font-size:14px;font-weight:600;' +
|
|
122
|
+
'line-height:1.45;font-family:' + S.font + ';';
|
|
123
|
+
root.appendChild(box);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
document.body.appendChild(root);
|
|
127
|
+
keepTop();
|
|
128
|
+
return { ok: true };
|
|
129
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<!--
|
|
3
|
+
도입부 타이틀 카드 — render 가 두 장으로 찍는다. mode=bg 는 배경만(불투명), mode=text 는
|
|
4
|
+
글자만(투명 배경). ffmpeg 가 글자 레이어를 페이드 + 위로 떠오르게 얹어 애니메이션한다.
|
|
5
|
+
치환 자리표시자: __CW__ __CH__ __BG__ __MODE__ __BADGE__ __TITLE__ __SUBTITLE__
|
|
6
|
+
-->
|
|
7
|
+
<html lang="ko"><head><meta charset="utf-8">
|
|
8
|
+
<style>
|
|
9
|
+
html, body { margin: 0; width: __CW__px; height: __CH__px; overflow: hidden; background: transparent; }
|
|
10
|
+
body { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif; }
|
|
11
|
+
.bg { position: absolute; inset: 0; background: __BG__; }
|
|
12
|
+
.card { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
|
|
13
|
+
text-align: center; padding: 0 12%; box-sizing: border-box; color: #1d1d1f; }
|
|
14
|
+
.badge { display: inline-block; padding: 6px 14px; border-radius: 999px; background: rgba(185,28,28,.92); color: #fff;
|
|
15
|
+
font-size: 15px; font-weight: 700; letter-spacing: .02em; margin-bottom: 22px; }
|
|
16
|
+
.badge:empty { display: none; }
|
|
17
|
+
.title { font-size: 46px; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; word-break: keep-all; }
|
|
18
|
+
.subtitle { margin-top: 16px; font-size: 21px; font-weight: 500; color: rgba(29,29,31,.62); line-height: 1.5; word-break: keep-all; }
|
|
19
|
+
.subtitle:empty { display: none; }
|
|
20
|
+
[data-mode="text"] .bg { display: none; }
|
|
21
|
+
[data-mode="bg"] .card { display: none; }
|
|
22
|
+
</style></head>
|
|
23
|
+
<body data-mode="__MODE__">
|
|
24
|
+
<div class="bg"></div>
|
|
25
|
+
<div class="card">
|
|
26
|
+
<div class="badge">__BADGE__</div>
|
|
27
|
+
<div class="title">__TITLE__</div>
|
|
28
|
+
<div class="subtitle">__SUBTITLE__</div>
|
|
29
|
+
</div>
|
|
30
|
+
</body></html>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "thuthi-no-more-slop",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "no-more-slop 스킬: 화면 · 차트 문구와 장식에서 AI 티를 지운다 (군더더기 라벨 · 번호 · 부제 · 배지 · 범례, 그라디언트 · 글로우 · 눈금 밖 간격). 사용자가 /no-more-slop 으로 부를 때만 돈다",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "thuthi"
|
|
7
|
+
},
|
|
8
|
+
"dependencies": ["thuthi"]
|
|
9
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"""thuthi-no-more-slop 점검 (thuthi:setup 의 doctor.py 가 부른다). count_tells.py 는 표준 라이브러리만 쓴다."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
import sys
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def check(d) -> list:
|
|
8
|
+
py = sys.version_info[:2] >= (3, 9)
|
|
9
|
+
return [("no-more-slop", d.OK if py else d.BAD, "python3 (표준 라이브러리만)",
|
|
10
|
+
"scripts/count_tells.py 로 티를 센다")]
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Felipe Basurto
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|