- 画像の表示枠を高さ固定のスクロール領域にし、幅の上限(640/560px)を撤廃 - ズーム(新規 stage-zoom.js): −/+・全体ボタン、Ctrl+ホイール(カーソル基準)、 中ボタンドラッグでスクロール、+ / - / 0 キー。倍率は全体表示 = 100% - MOSS の pointerdown を左ボタンのみに、タブ再表示時に再描画 - i18n(日英中)・ヘルプ(日英中)・README 3 言語・DEVLOG を更新 - docs/thumb.png を新しい画像に差し替え(720×480) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
284 lines
12 KiB
CSS
284 lines
12 KiB
CSS
/* ComfyUI連携スタイル (Nanobananaタブと共用) */
|
|
|
|
/* 接続設定 & ヘッダー */
|
|
.comfyui-header-row {
|
|
display: flex;
|
|
gap: 15px;
|
|
flex-wrap: wrap;
|
|
align-items: center;
|
|
padding-bottom: 15px;
|
|
border-bottom: 1px solid var(--border-color);
|
|
}
|
|
|
|
.comfyui-status {
|
|
padding: 4px 10px;
|
|
border-radius: 12px;
|
|
font-size: 13px;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.comfyui-status.connected {
|
|
background-color: rgba(40, 167, 69, 0.2);
|
|
color: #28a745;
|
|
}
|
|
|
|
.comfyui-status.disconnected {
|
|
background-color: rgba(220, 53, 69, 0.2);
|
|
color: #dc3545;
|
|
}
|
|
|
|
.comfyui-url-group {
|
|
display: flex;
|
|
gap: 5px;
|
|
align-items: center;
|
|
}
|
|
|
|
/* メインエディタエリア */
|
|
.comfyui-editor-layout {
|
|
display: flex;
|
|
gap: 20px;
|
|
flex: 1;
|
|
min-height: 400px;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.comfyui-left-col {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 10px;
|
|
overflow-y: auto;
|
|
padding-right: 10px;
|
|
}
|
|
|
|
.comfyui-right-col {
|
|
width: 320px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 15px;
|
|
border-left: 1px solid var(--border-color);
|
|
padding-left: 20px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
/* サブタブ */
|
|
.comfyui-subtab-nav {
|
|
display: flex;
|
|
gap: 2px;
|
|
border-bottom: 1px solid var(--border-color);
|
|
}
|
|
|
|
.comfyui-subtab-btn {
|
|
background: none;
|
|
border: none;
|
|
padding: 8px 16px;
|
|
color: var(--text-color);
|
|
cursor: pointer;
|
|
opacity: 0.6;
|
|
border-bottom: 2px solid transparent;
|
|
}
|
|
|
|
.comfyui-subtab-btn:hover {
|
|
opacity: 1;
|
|
background-color: var(--hover-color);
|
|
}
|
|
|
|
.comfyui-subtab-btn.active {
|
|
opacity: 1;
|
|
border-bottom-color: var(--primary-color);
|
|
font-weight: bold;
|
|
}
|
|
|
|
.comfyui-subtab-content {
|
|
padding-top: 15px;
|
|
}
|
|
|
|
.comfyui-input {
|
|
width: 100%;
|
|
box-sizing: border-box;
|
|
padding: 4px 8px;
|
|
font-size: 12px;
|
|
border: 1px solid var(--border-color);
|
|
border-radius: 4px;
|
|
background: var(--bg-secondary, #1a1a1a);
|
|
color: var(--text-primary, #eee);
|
|
}
|
|
|
|
/* フィールドスタイル */
|
|
.comfyui-field-group {
|
|
background-color: rgba(255, 255, 255, 0.03);
|
|
padding: 12px;
|
|
border-radius: 6px;
|
|
margin-bottom: 15px;
|
|
border: 1px solid var(--border-color);
|
|
}
|
|
|
|
.comfyui-group-title {
|
|
margin: 0 0 10px 0;
|
|
font-size: 13px;
|
|
color: #aaa;
|
|
border-bottom: 1px solid rgba(255, 255, 255, 0.05);
|
|
padding-bottom: 5px;
|
|
}
|
|
|
|
.comfyui-field {
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.comfyui-field:last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.comfyui-field-inline {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.comfyui-label {
|
|
display: block;
|
|
font-size: 13px;
|
|
margin-bottom: 5px;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.comfyui-label.positive { color: #88cc88; }
|
|
.comfyui-label.negative { color: #cc8888; }
|
|
|
|
.comfyui-select, .comfyui-number-input, .comfyui-text-input {
|
|
width: 100%;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
/* 生成プレビュー */
|
|
.comfyui-generate-panel {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 10px;
|
|
}
|
|
|
|
.comfyui-progress-container {
|
|
text-align: center;
|
|
}
|
|
|
|
.comfyui-result-container {
|
|
flex: 1;
|
|
background-color: #000;
|
|
border: 1px solid var(--border-color);
|
|
border-radius: 4px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
overflow: hidden;
|
|
position: relative;
|
|
min-height: 250px;
|
|
}
|
|
|
|
.comfyui-seed-panel {
|
|
background-color: rgba(255, 255, 255, 0.05);
|
|
padding: 10px;
|
|
border-radius: 4px;
|
|
margin-top: 10px;
|
|
border: 1px solid var(--border-color);
|
|
}
|
|
|
|
/* ── MOSS-Image タブ: レイアウトエディタ ── */
|
|
.moss-type-radio { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; cursor: pointer; }
|
|
.moss-box { position: absolute; box-sizing: border-box; border: 2px solid var(--moss-c, #4caf50); background: color-mix(in srgb, var(--moss-c, #4caf50) 14%, transparent); cursor: move; overflow: visible; }
|
|
.moss-box[data-type="panel"] { --moss-c: #ffc107; }
|
|
.moss-box[data-type="character"] { --moss-c: #ff69b4; }
|
|
.moss-box[data-type="text"] { --moss-c: #4fd8ff; }
|
|
.moss-box.selected { border-width: 3px; box-shadow: 0 0 0 1px #fff inset; }
|
|
.moss-box .moss-badge { position: absolute; left: -2px; top: -2px; min-width: 16px; padding: 0 3px; font-size: 10px; line-height: 15px; background: var(--moss-c, #4caf50); color: #000; font-weight: 700; pointer-events: none; }
|
|
.moss-box .moss-label { position: absolute; left: 3px; top: 15px; right: 3px; bottom: 2px; overflow: hidden; font-size: 10px; color: #ddd; pointer-events: none; white-space: pre-wrap; word-break: break-all; }
|
|
.moss-box .moss-handle { position: absolute; width: 10px; height: 10px; background: #fff; border: 1px solid #000; display: none; }
|
|
.moss-box.selected .moss-handle { display: block; }
|
|
.moss-handle[data-h="nw"] { left: -6px; top: -6px; cursor: nwse-resize; }
|
|
.moss-handle[data-h="ne"] { right: -6px; top: -6px; cursor: nesw-resize; }
|
|
.moss-handle[data-h="sw"] { left: -6px; bottom: -6px; cursor: nesw-resize; }
|
|
.moss-handle[data-h="se"] { right: -6px; bottom: -6px; cursor: nwse-resize; }
|
|
.moss-panel-row { display: flex; gap: 6px; align-items: flex-start; margin-bottom: 6px; }
|
|
.moss-panel-row textarea { flex: 1; background: #111; color: #fff; box-sizing: border-box; }
|
|
|
|
/* ── MOSS-Image タブ: 3カラム(レイアウト | 設定 | 生成・結果) ── */
|
|
.moss-settings-col {
|
|
width: 360px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 10px;
|
|
overflow-y: auto;
|
|
border-left: 1px solid var(--border-color);
|
|
padding-left: 20px;
|
|
flex-shrink: 0;
|
|
}
|
|
@media (max-width: 1500px) {
|
|
#moss-tab .comfyui-editor-layout { flex-wrap: wrap; overflow: auto; }
|
|
#moss-tab .moss-layout-col { flex: 1 1 100%; }
|
|
}
|
|
|
|
/* 描画種別のセグメントボタン */
|
|
.moss-type-btns { display: inline-flex; border: 1px solid var(--border-color); border-radius: 4px; overflow: hidden; }
|
|
.moss-type-btn { padding: 4px 12px; font-size: 12px; background: transparent; color: var(--text-secondary); border: 0; border-right: 1px solid var(--border-color); cursor: pointer; }
|
|
.moss-type-btn:last-child { border-right: 0; }
|
|
.moss-type-btn[data-type="object"].active { background: #4caf50; color: #000; }
|
|
.moss-type-btn[data-type="panel"].active { background: #ffc107; color: #000; }
|
|
.moss-type-btn[data-type="character"].active { background: #ff69b4; color: #000; }
|
|
.moss-type-btn[data-type="text"].active { background: #4fd8ff; color: #000; }
|
|
/* 選択モード(ドラッグで枠を描かない)/ OCRタブの描画モード */
|
|
.moss-type-btn[data-type="select"].active, .moss-type-btn[data-mode].active { background: #9e9e9e; color: #000; }
|
|
.moss-type-btn[data-mode="draw"].active { background: #4caf50; }
|
|
|
|
/* 文字枠: 描画する文字そのものを表示し、枠内で直接入力できる */
|
|
.moss-box .moss-label.moss-label-text { color: #fff; font-weight: 600; right: 0; bottom: 0; white-space: pre; overflow: visible; text-shadow: 0 0 3px #000, 0 0 3px #000; }
|
|
.moss-box .moss-label.moss-label-dim { color: #7fb8c8; font-style: italic; }
|
|
.moss-box .moss-inline-edit { position: absolute; inset: 0; width: 100%; height: 100%; box-sizing: border-box; resize: none; border: 0; outline: 2px solid #4fd8ff; padding: 15px 3px 2px; background: rgba(0, 0, 0, 0.78); color: #fff; font-weight: 600; line-height: 1.25; z-index: 5; cursor: text; }
|
|
|
|
/* 折りたたみ可能なグループ(<details>)。MOSS-Imageタブの「生成対象」 */
|
|
.moss-collapse > summary { cursor: pointer; list-style: none; font-size: 13px; font-weight: 600; color: var(--text-secondary); padding: 6px 4px; user-select: none; display: flex; align-items: center; gap: 6px; }
|
|
.moss-collapse > summary::-webkit-details-marker { display: none; }
|
|
.moss-collapse > summary::before { content: "\25B6"; font-size: 10px; transition: transform 0.15s; }
|
|
.moss-collapse[open] > summary::before { transform: rotate(90deg); }
|
|
.moss-collapse[open] > summary { margin-bottom: 4px; }
|
|
.moss-type-btn[data-vertical].active { background: #4fd8ff; color: #000; }
|
|
.moss-box.moss-skipped { border-style: dashed; opacity: 0.55; }
|
|
|
|
/* ── OCRタブ ── */
|
|
:root { --ocr-text: #4fd8ff; --ocr-balloon: #8be9fd; --ocr-sfx: #ff9f43; --ocr-caption: #a29bfe; --ocr-panel: #ffc107; --ocr-character: #ff69b4; --ocr-face: #ff8fc8; --ocr-object: #4caf50; }
|
|
.ocr-toolbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 6px; }
|
|
.ocr-stage { position: relative; flex-shrink: 0; margin: auto; background: #1a1a1a; border: 1px solid #444; touch-action: none; user-select: none; min-width: 320px; min-height: 240px; }
|
|
.ocr-stage.dragover { outline: 2px dashed #4fd8ff; }
|
|
.ocr-stage img { display: block; width: 100%; height: 100%; pointer-events: none; -webkit-user-drag: none; }
|
|
.ocr-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #777; font-size: 13px; pointer-events: none; }
|
|
.ocr-box { position: absolute; box-sizing: border-box; border: 2px solid var(--ocr-c, #4caf50); background: color-mix(in srgb, var(--ocr-c, #4caf50) 14%, transparent); cursor: move; }
|
|
.ocr-box.selected { border-width: 3px; box-shadow: 0 0 0 1px #fff inset; }
|
|
.ocr-box .ocr-badge { position: absolute; left: -2px; top: -2px; min-width: 16px; padding: 0 3px; font-size: 10px; line-height: 15px; background: var(--ocr-c, #4caf50); color: #000; font-weight: 700; pointer-events: none; }
|
|
.ocr-box .ocr-handle { position: absolute; width: 10px; height: 10px; background: #fff; border: 1px solid #000; display: none; }
|
|
.ocr-box.selected .ocr-handle { display: block; }
|
|
.ocr-handle[data-h="nw"] { left: -6px; top: -6px; cursor: nwse-resize; }
|
|
.ocr-handle[data-h="ne"] { right: -6px; top: -6px; cursor: nesw-resize; }
|
|
.ocr-handle[data-h="sw"] { left: -6px; bottom: -6px; cursor: nesw-resize; }
|
|
.ocr-handle[data-h="se"] { right: -6px; bottom: -6px; cursor: nwse-resize; }
|
|
.ocr-class-row { display: flex; flex-wrap: wrap; gap: 4px 10px; }
|
|
.ocr-class-chk { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; cursor: pointer; border-left: 3px solid var(--ocr-c); padding-left: 4px; }
|
|
.ocr-list { max-height: 320px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
|
|
.ocr-row { display: flex; gap: 4px; align-items: flex-start; padding: 3px; border-left: 3px solid var(--ocr-c, #4caf50); background: rgba(255,255,255,0.04); }
|
|
.ocr-row.selected { background: rgba(255,255,255,0.12); }
|
|
.ocr-row .ocr-no { min-width: 20px; font-size: 11px; color: #aaa; padding-top: 4px; }
|
|
.ocr-row select { width: 92px; flex-shrink: 0; background: #111; color: #fff; font-size: 11px; }
|
|
.ocr-row textarea { flex: 1; min-width: 0; background: #111; color: #fff; font-size: 12px; box-sizing: border-box; resize: vertical; }
|
|
.ocr-actions { display: flex; gap: 6px; margin-top: 6px; }
|
|
#ocr-tab .ocr-image-col { flex: 1; min-width: 0; }
|
|
|
|
/* OCR / MOSS-Image のステージ: 高さ固定のスクロール領域(stage-zoom.js でズーム)。
|
|
中身は margin:auto で中央寄せ(justify-content:center だと拡大時に左・上へはみ出た部分へスクロールできない) */
|
|
.stage-viewport { width: 100%; height: clamp(360px, calc(100vh - 300px), 1400px); display: flex; overflow: auto; padding: 8px; box-sizing: border-box; background: #111; border: 1px solid #333; border-radius: 4px; }
|
|
.stage-viewport.panning { cursor: grabbing; }
|
|
.stage-viewport.panning * { cursor: grabbing !important; }
|
|
.stage-zoom-ctl { display: inline-flex; align-items: center; gap: 2px; margin-left: auto; }
|
|
.stage-zoom-ctl .stage-zoom-btn { min-width: 26px; padding-left: 6px; padding-right: 6px; }
|
|
.stage-zoom-label { min-width: 44px; text-align: center; font-size: 12px; color: var(--text-secondary); cursor: help; }
|
|
|
|
/* Nanobanana+タブ: ローカルモードではクラウド専用項目(Gemini/ネイティブ設定・履歴・シード)を隠す */
|
|
#nanobanana-tab[data-mode="local"] .nb-cloud-only { display: none !important; }
|
|
#nanobanana-tab:not([data-mode="local"]) .nb-local-only { display: none !important; }
|