@dickpy/dsh-imagegen 1.0.4 → 1.0.5
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/README.md +6 -6
- package/lib/client.js +131 -106
- package/lib/client.js.map +1 -1
- package/lib/index.js +1 -1
- package/package.json +1 -1
- package/src/client/ImageGenPanel.tsx +28 -6
- package/src/client/panel.module.css +16 -23
- package/src/protocol.ts +1 -1
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ DeepSeek Harness (DSH) Web GUI 的 AI 生图插件。它通过宿主进程安全
|
|
|
14
14
|
|
|
15
15
|
三栏工作台将参数、生成结果和历史记录放在同一视图中;生成的图片可预览、下载,并从历史记录恢复参数。
|
|
16
16
|
|
|
17
|
-

|
|
18
18
|
|
|
19
19
|
### 独立配置卡片
|
|
20
20
|
|
|
@@ -26,7 +26,7 @@ DeepSeek Harness (DSH) Web GUI 的 AI 生图插件。它通过宿主进程安全
|
|
|
26
26
|
|
|
27
27
|
- **文生图与图生图**:输入提示词生成图片,或上传 PNG、JPG、WEBP 参考图进行编辑。
|
|
28
28
|
- **可调生成参数**:尺寸、清晰度、生成数量和细节等级均可在界面中选择;未指定的参数保持自动。
|
|
29
|
-
-
|
|
29
|
+
- **结果操作**:结果区固定为四分格:单图铺满,双图占上排,三图占三格,四图为 2×2;支持下载、全屏预览、可滚动缩放、前后切换、复制优化提示词,以及一键将当前图片添加到图生图。
|
|
30
30
|
- **持久化历史**:保存提示词、参数和图片;支持查看、恢复、单条删除和清空,最多保留 50 条。
|
|
31
31
|
- **跨设备查看**:历史保存在 DSH 宿主侧,连接同一 DSH 的浏览器或设备共享同一份记录。
|
|
32
32
|
- **原生 DSH 体验**:侧栏入口、主题适配和设置卡片均遵循 DSH Web GUI 的 UI 规范。
|
|
@@ -42,13 +42,13 @@ DeepSeek Harness (DSH) Web GUI 的 AI 生图插件。它通过宿主进程安全
|
|
|
42
42
|
把下面提示词直接粘贴给 **DSH**(或 Codex / 其他 coding agent)执行即可:
|
|
43
43
|
|
|
44
44
|
```text
|
|
45
|
-
用 dsh plugin --profile web add @dickpy/dsh-imagegen@1.0.
|
|
45
|
+
用 dsh plugin --profile web add @dickpy/dsh-imagegen@1.0.5 安装 AI 生图插件(profile 名按实际修改),完成后重启 dsh web。
|
|
46
46
|
```
|
|
47
47
|
|
|
48
48
|
### 方式二:npm 安装(推荐)
|
|
49
49
|
|
|
50
50
|
```bash
|
|
51
|
-
dsh plugin --profile web add @dickpy/dsh-imagegen@1.0.
|
|
51
|
+
dsh plugin --profile web add @dickpy/dsh-imagegen@1.0.5
|
|
52
52
|
```
|
|
53
53
|
|
|
54
54
|
dsh 会自动把插件注册进 profile 的 bundle 清单(无需手动改 cordis.patch.yml),重启 dsh web 即可。
|
|
@@ -56,10 +56,10 @@ dsh 会自动把插件注册进 profile 的 bundle 清单(无需手动改 cord
|
|
|
56
56
|
### 方式三:聚合包(tarball)安装
|
|
57
57
|
|
|
58
58
|
从 [GitHub Releases](https://github.com/dickpy/dsh-imagegen/releases) 下载发布产物
|
|
59
|
-
(如 `dickpy-dsh-imagegen-1.0.
|
|
59
|
+
(如 `dickpy-dsh-imagegen-1.0.5.tgz`),然后:
|
|
60
60
|
|
|
61
61
|
```bash
|
|
62
|
-
dsh plugin --profile web add <下载路径>/dickpy-dsh-imagegen-1.0.
|
|
62
|
+
dsh plugin --profile web add <下载路径>/dickpy-dsh-imagegen-1.0.5.tgz
|
|
63
63
|
```
|
|
64
64
|
|
|
65
65
|
重启 dsh web。
|
package/lib/client.js
CHANGED
|
@@ -12,7 +12,7 @@ window.__ModuleLoader__.load({
|
|
|
12
12
|
let _deepseek_ai_dsh_client_runtime_client = require("@deepseek-ai/dsh-client-runtime/client");
|
|
13
13
|
//#region src/protocol.ts
|
|
14
14
|
/** Published package version shared by the host updater and the client UI. */
|
|
15
|
-
const PLUGIN_VERSION = "1.0.
|
|
15
|
+
const PLUGIN_VERSION = "1.0.5";
|
|
16
16
|
/** Same-origin route family (loopback-only, mirroring the dsh-ssh fence). */
|
|
17
17
|
const SETTINGS_API = {
|
|
18
18
|
describe: "/api/dsh-imagegen/settings/describe",
|
|
@@ -399,7 +399,7 @@ window.__ModuleLoader__.load({
|
|
|
399
399
|
}
|
|
400
400
|
//#endregion
|
|
401
401
|
//#region \0dsh-css:E:\dsh-plugin\src\client\panel.module.css.mjs
|
|
402
|
-
const css$1 = "[data-pane=conversation]{position:relative}[data-dsh-imagegen-view]{z-index:60;background:var(--dsw-alias-bg-base);display:none;position:absolute;inset:0}html[data-dsh-imagegen-active]:not([data-dsh-taskboard-active]):not([data-dsh-ssh-active]) [data-dsh-imagegen-view]{display:block}html[data-dsh-imagegen-active]:not([data-dsh-taskboard-active]):not([data-dsh-ssh-active]) [data-pane=conversation]>:not([data-dsh-imagegen-view]),html[data-dsh-imagegen-active]:not([data-dsh-taskboard-active]):not([data-dsh-ssh-active]) [class*=centerCol]>:not([data-dsh-imagegen-view]){display:none!important}.Yvqh9W_entry{width:100%;height:32px;color:var(--dsw-alias-label-secondary);cursor:pointer;white-space:nowrap;background:0 0;border:none;border-radius:8px;align-items:center;gap:8px;padding:0 12px;font-size:13px;display:flex}.Yvqh9W_entry:hover{background:var(--dsw-specific-sidebar-nav-item-hover);color:var(--dsw-alias-label-primary)}.Yvqh9W_entry[data-active]{background:var(--dsw-specific-sidebar-nav-item-active);color:var(--dsw-alias-label-primary);font-weight:600}.Yvqh9W_entryIcon{flex:none;justify-content:center;align-items:center;display:inline-flex}.Yvqh9W_entryLabel{text-overflow:ellipsis;overflow:hidden}[data-dsh-frame][data-sidebar-collapsed] .Yvqh9W_entry{justify-content:center;width:100%;padding:0}[data-dsh-frame][data-sidebar-collapsed] .Yvqh9W_entryLabel{display:none}.Yvqh9W_view{overflow:hidden}.Yvqh9W_panel,.Yvqh9W_panel *,.Yvqh9W_panel :before,.Yvqh9W_panel :after{box-sizing:border-box}.Yvqh9W_panel{background:var(--dsw-alias-bg-base);min-width:0;height:100%;min-height:0;color:var(--dsw-alias-label-primary);font-family:var(--dsw-font-family);flex-direction:column;gap:10px;padding:14px 16px 16px;display:flex;overflow:hidden}.Yvqh9W_panelHeader{flex:none;justify-content:space-between;align-items:center;gap:12px;display:flex}.Yvqh9W_panelHeading{align-items:baseline;gap:10px;min-width:0;display:flex}.Yvqh9W_panelTitle{color:var(--dsw-alias-label-primary);white-space:nowrap;margin:0;font-size:16px;font-weight:700}.Yvqh9W_panelSubtitle{color:var(--dsw-alias-label-tertiary);white-space:nowrap;text-overflow:ellipsis;font-size:12px;overflow:hidden}.Yvqh9W_connectionStatus{border:1px solid var(--dsw-alias-label-error);height:28px;color:var(--dsw-alias-label-error);font:inherit;white-space:nowrap;background:0 0;border-radius:8px;flex:none;align-items:center;gap:6px;padding:0 10px;font-size:12px;line-height:1;display:inline-flex}.Yvqh9W_connectionStatus[data-connected=true]{border-color:var(--dsw-alias-state-success-primary);color:var(--dsw-alias-state-success-primary)}.Yvqh9W_connectionDot{background:currentColor;border-radius:50%;width:6px;height:6px}.Yvqh9W_updateBanner{border:1px solid var(--dsw-alias-state-warn-primary);color:var(--dsw-alias-state-warn-primary);overflow-wrap:anywhere;border-radius:10px;flex:none;justify-content:space-between;align-items:center;gap:12px;padding:7px 10px 7px 12px;font-size:12px;line-height:1.5;display:flex}.Yvqh9W_updateBanner[data-kind=ok]{color:var(--dsw-alias-state-success-primary);border-color:var(--dsw-alias-state-success-primary)}.Yvqh9W_updateText{min-width:0}.Yvqh9W_updateActions{flex:none;align-items:center;gap:10px;display:inline-flex}.Yvqh9W_updateRelease{color:inherit;text-underline-offset:2px;white-space:nowrap;text-decoration:underline}@media (width<=700px){.Yvqh9W_panelHeader{align-items:flex-start}.Yvqh9W_panelHeading{flex-direction:column;align-items:flex-start;gap:2px}.Yvqh9W_updateBanner{flex-direction:column;align-items:flex-start}.Yvqh9W_updateActions{justify-content:space-between;width:100%}}.Yvqh9W_studio{flex:1;gap:14px;min-width:0;min-height:0;display:flex}.Yvqh9W_config{flex-direction:column;flex:none;gap:12px;width:300px;min-width:260px;max-width:340px;height:100%;min-height:0;display:flex;overflow:hidden}.Yvqh9W_configScroll{scrollbar-width:thin;scrollbar-color:var(--dsw-alias-border-l2) transparent;flex-direction:column;flex:1;gap:12px;min-height:0;padding-right:2px;display:flex;overflow-y:auto}.Yvqh9W_configScroll::-webkit-scrollbar{width:8px}.Yvqh9W_configScroll::-webkit-scrollbar-thumb{background:var(--dsw-alias-border-l2);border-radius:999px}.Yvqh9W_canvas{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);border-radius:12px;flex-direction:column;flex:1;min-width:0;min-height:0;display:flex;position:relative;overflow:hidden}.Yvqh9W_history{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);border-radius:12px;flex-direction:column;flex:none;width:240px;min-width:200px;max-width:280px;min-height:0;display:flex;overflow:hidden}.Yvqh9W_historyHeader{border-bottom:1px solid var(--dsw-alias-border-l1);flex:none;justify-content:space-between;align-items:center;gap:8px;padding:10px 12px;display:flex}.Yvqh9W_historyTitle{color:var(--dsw-alias-label-primary);font-size:13px;font-weight:600}.Yvqh9W_historyClear{font:inherit;color:var(--dsw-alias-label-tertiary);border:1px solid var(--dsw-alias-border-l2);cursor:pointer;background:0 0;border-radius:999px;padding:2px 8px;font-size:11.5px}.Yvqh9W_historyClear:hover{color:var(--dsw-alias-label-error);border-color:var(--dsw-alias-label-error)}.Yvqh9W_historyList{scrollbar-width:thin;scrollbar-color:var(--dsw-alias-border-l2) transparent;flex-direction:column;flex:1;gap:8px;min-height:0;padding:10px;display:flex;overflow-y:auto}.Yvqh9W_historyList::-webkit-scrollbar{width:8px}.Yvqh9W_historyList::-webkit-scrollbar-thumb{background:var(--dsw-alias-border-l2);border-radius:999px}.Yvqh9W_historyEmpty{text-align:center;color:var(--dsw-alias-label-tertiary);flex:1;justify-content:center;align-items:center;padding:20px;font-size:12px;line-height:1.6;display:flex}.Yvqh9W_historyItem{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-2);border-radius:10px;flex-direction:column;flex:none;gap:6px;padding:8px;display:flex}.Yvqh9W_historyItem:hover{border-color:var(--dsw-alias-border-l2)}.Yvqh9W_historyItem[data-active]{border-color:var(--dsw-alias-brand-primary)}.Yvqh9W_historyMain{font:inherit;color:inherit;text-align:left;cursor:pointer;background:0 0;border:none;align-items:flex-start;gap:8px;min-width:0;padding:0;display:flex}.Yvqh9W_historyThumb{object-fit:cover;background:var(--dsw-alias-bg-base);border-radius:8px;flex:none;width:52px;height:52px}.Yvqh9W_historyThumbPlaceholder{background:var(--dsw-alias-bg-layer-3);border-radius:8px;flex:none;width:52px;height:52px}.Yvqh9W_historyInfo{flex-direction:column;flex:1;gap:4px;min-width:0;display:flex}.Yvqh9W_historyPrompt{color:var(--dsw-alias-label-primary);-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:12px;line-height:1.4;display:-webkit-box;overflow:hidden}.Yvqh9W_historyMeta{color:var(--dsw-alias-label-tertiary);white-space:nowrap;text-overflow:ellipsis;font-size:11px;overflow:hidden}.Yvqh9W_historyActions{justify-content:flex-end;gap:6px;display:flex}.Yvqh9W_historyAction{font:inherit;color:var(--dsw-alias-label-secondary);border:1px solid var(--dsw-alias-border-l2);cursor:pointer;background:0 0;border-radius:999px;padding:2px 8px;font-size:11.5px}.Yvqh9W_historyAction:hover{color:var(--dsw-alias-label-primary);border-color:var(--dsw-alias-label-dimmed)}.Yvqh9W_historyAction[data-danger]:hover{color:var(--dsw-alias-label-error);border-color:var(--dsw-alias-label-error)}.Yvqh9W_card{background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l1);border-radius:12px;flex-direction:column;flex:none;gap:10px;padding:12px;display:flex}.Yvqh9W_modeRow{align-items:center;gap:8px;display:flex}.Yvqh9W_modePill{flex:1;justify-content:center;height:28px;font-size:13px}.Yvqh9W_uploadBox{min-height:128px;color:var(--dsw-alias-label-secondary);border:1.5px dashed var(--dsw-alias-border-l2);cursor:pointer;font:inherit;text-align:center;background:0 0;border-radius:12px;flex-direction:column;justify-content:center;align-items:center;gap:6px;padding:16px;font-size:12.5px;display:flex}.Yvqh9W_uploadBox:hover{color:var(--dsw-alias-label-primary);border-color:var(--dsw-alias-label-dimmed);background:var(--dsw-alias-interactive-bg-hover)}.Yvqh9W_uploadBox:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}.Yvqh9W_uploadIcon{color:var(--dsw-alias-label-tertiary);display:inline-flex}.Yvqh9W_uploadHint{color:var(--dsw-alias-label-tertiary);font-size:11px}.Yvqh9W_reference{flex-direction:column;gap:8px;display:flex}.Yvqh9W_referenceImage{object-fit:contain;background:var(--dsw-alias-bg-base);border:1px solid var(--dsw-alias-border-l1);border-radius:10px;width:100%;max-height:176px}.Yvqh9W_referenceActions{gap:8px;display:flex}.Yvqh9W_hiddenFile{display:none}.Yvqh9W_prompt{width:100%;min-height:120px;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-3);border:1px solid var(--dsw-alias-border-l2);resize:vertical;box-sizing:border-box;border-radius:10px;outline:none;padding:10px 12px;font-family:inherit;font-size:13px;line-height:1.6}.Yvqh9W_prompt:focus-visible{border-color:var(--dsw-alias-brand-primary)}.Yvqh9W_prompt::placeholder{color:var(--dsw-alias-label-tertiary)}.Yvqh9W_promptFooter{justify-content:flex-end;margin-top:-6px;display:flex}.Yvqh9W_promptCount{color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;font-size:11px}.Yvqh9W_paramGroup{flex-direction:column;gap:8px;display:flex}.Yvqh9W_paramLabel{color:var(--dsw-alias-label-secondary);font-size:12px;font-weight:600}.Yvqh9W_optionRow{flex-wrap:wrap;gap:6px;display:flex}.Yvqh9W_optionGrid{grid-template-columns:repeat(3,1fr);gap:6px;display:grid}.Yvqh9W_optionPill{justify-content:center}.Yvqh9W_paramHint{color:var(--dsw-alias-label-tertiary);font-size:11px;line-height:1.45}.Yvqh9W_footer{border-top:1px solid var(--dsw-alias-border-l1);flex-direction:column;flex:none;align-items:stretch;gap:8px;padding:10px 2px 0 0;display:flex}.Yvqh9W_modelWrap{flex-direction:column;gap:5px;min-width:0;display:flex}.Yvqh9W_modelLabel{color:var(--dsw-alias-label-secondary);font-size:12px;font-weight:600}.Yvqh9W_modelSelect{width:100%;height:36px;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l2);cursor:pointer;border-radius:18px;outline:none;padding:0 12px;font-family:inherit;font-size:13px}.Yvqh9W_modelSelect:focus-visible{border-color:var(--dsw-alias-brand-primary)}.Yvqh9W_modelSelect:disabled{opacity:.55}.Yvqh9W_generateButton{width:100%}.Yvqh9W_generateInner{align-items:center;gap:7px;display:inline-flex}.Yvqh9W_canvasState{text-align:center;color:var(--dsw-alias-label-tertiary);flex-direction:column;flex:1;justify-content:center;align-items:center;gap:8px;padding:24px;display:flex}.Yvqh9W_canvasStateTitle{color:var(--dsw-alias-label-secondary);font-size:14px;font-weight:600}.Yvqh9W_canvasStateHint{max-width:380px;font-size:12px;line-height:1.6}.Yvqh9W_canvasEmptyIcon{color:var(--dsw-alias-label-tertiary);margin-bottom:4px;display:inline-flex}.Yvqh9W_canvasError{color:var(--dsw-alias-label-error);background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-label-error);overflow-wrap:anywhere;border-radius:10px;flex:none;margin:14px;padding:10px 14px;font-size:12.5px;line-height:1.6}.Yvqh9W_canvasBody{scrollbar-width:thin;scrollbar-color:var(--dsw-alias-border-l2) transparent;flex-direction:column;flex:1;gap:10px;min-height:0;padding:14px;display:flex;overflow-y:auto}.Yvqh9W_canvasBody::-webkit-scrollbar{width:8px}.Yvqh9W_canvasBody::-webkit-scrollbar-thumb{background:var(--dsw-alias-border-l2);border-radius:999px}.Yvqh9W_canvasMeta{color:var(--dsw-alias-label-tertiary);flex:none;align-items:center;gap:8px;font-size:12px;display:flex}.Yvqh9W_canvasHistoryTag{color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l2);white-space:nowrap;border-radius:999px;padding:1px 8px;font-size:11px}.Yvqh9W_grid{flex:1;gap:14px;min-height:0;display:grid}.Yvqh9W_grid[data-count=\"1\"]{grid-template-rows:minmax(0,1fr);grid-template-columns:minmax(0,1fr)}.Yvqh9W_grid[data-count=\"2\"]{grid-template-rows:minmax(0,1fr);grid-template-columns:repeat(2,minmax(0,1fr))}.Yvqh9W_grid[data-count=\"3\"]{grid-template-rows:minmax(0,1fr);grid-template-columns:repeat(3,minmax(0,1fr))}.Yvqh9W_grid[data-count=\"4\"]{grid-template-rows:repeat(2,minmax(0,1fr));grid-template-columns:repeat(2,minmax(0,1fr))}.Yvqh9W_imageCard{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-2);cursor:zoom-in;border-radius:12px;flex-direction:column;min-height:0;margin:0;display:flex;position:relative;overflow:hidden}.Yvqh9W_imageCard:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}.Yvqh9W_image{object-fit:contain;background:var(--dsw-alias-bg-base);flex:1;width:100%;min-height:0;display:block}.Yvqh9W_imageCaption{color:var(--dsw-alias-label-tertiary);white-space:nowrap;text-overflow:ellipsis;border-top:1px solid var(--dsw-alias-border-l1);padding:7px 10px;font-size:11px;line-height:1.5;overflow:hidden}.Yvqh9W_download{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-mask-1);border:1px solid var(--dsw-alias-border-l2);opacity:0;backdrop-filter:blur(4px);border-radius:999px;padding:2px 10px;font-size:12px;font-weight:500;line-height:20px;text-decoration:none;transition:opacity .12s;position:absolute;top:8px;right:8px}.Yvqh9W_imageCard:hover .Yvqh9W_download{opacity:1}.Yvqh9W_download:hover{background:var(--dsw-alias-bg-base)}.Yvqh9W_zoomHint{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-mask-1);border:1px solid var(--dsw-alias-border-l2);opacity:0;backdrop-filter:blur(4px);pointer-events:none;border-radius:999px;align-items:center;gap:5px;padding:2px 10px;font-size:12px;font-weight:500;line-height:20px;transition:opacity .12s;display:inline-flex;position:absolute;bottom:8px;left:8px}.Yvqh9W_imageCard:hover .Yvqh9W_zoomHint{opacity:1}.Yvqh9W_spinner,.Yvqh9W_bigSpinner{border:2px solid;border-top-color:#0000;border-radius:50%;flex:none;animation:.8s linear infinite Yvqh9W_dshImageGenSpin;display:inline-block}.Yvqh9W_spinner{width:11px;height:11px}.Yvqh9W_bigSpinner{width:30px;height:30px;color:var(--dsw-alias-state-business-primary);border-width:3px;margin-bottom:6px}.Yvqh9W_lightbox{z-index:1000;backdrop-filter:blur(6px);background:#000000b8;justify-content:center;align-items:center;padding:24px;display:flex;position:fixed;inset:0}.Yvqh9W_lightboxClose{color:#fff;cursor:pointer;background:#ffffff24;border:1px solid #ffffff47;border-radius:50%;justify-content:center;align-items:center;width:38px;height:38px;display:inline-flex;position:absolute;top:16px;right:16px}.Yvqh9W_lightboxClose:hover{background:#ffffff42}.Yvqh9W_lightboxNav{color:#fff;cursor:pointer;background:#ffffff24;border:1px solid #ffffff47;border-radius:50%;justify-content:center;align-items:center;width:42px;height:42px;display:inline-flex;position:absolute;top:50%;transform:translateY(-50%)}.Yvqh9W_lightboxNav:hover{background:#ffffff42}.Yvqh9W_lightboxNav[data-dir=prev]{left:max(20px,50% - 640px)}.Yvqh9W_lightboxNav[data-dir=next]{right:max(20px,50% - 640px)}.Yvqh9W_lightboxFigure{flex-direction:column;gap:10px;width:min(1100px,100vw - 160px);max-width:min(1100px,100vw - 160px);height:min(820px,100vh - 48px);min-height:0;margin:0;display:flex}.Yvqh9W_lightboxStage{background:#ffffff0a;border-radius:10px;flex:1;place-items:center;min-height:0;display:grid;overflow:auto}.Yvqh9W_lightboxImage{object-fit:contain;border-radius:10px;max-width:calc(100% - 4px);max-height:calc(100% - 4px);transition:transform .12s;box-shadow:0 24px 80px #00000080}.Yvqh9W_lightboxTools{justify-content:center;align-items:center;gap:6px;display:flex}.Yvqh9W_lightboxTool,.Yvqh9W_lightboxZoomLevel,.Yvqh9W_lightboxCopy{color:#fff;cursor:pointer;background:#ffffff24;border:1px solid #ffffff47;justify-content:center;align-items:center;display:inline-flex}.Yvqh9W_lightboxTool,.Yvqh9W_lightboxZoomLevel{height:32px}.Yvqh9W_lightboxTool{border-radius:50%;width:32px}.Yvqh9W_lightboxZoomLevel{min-width:58px;font:inherit;font-variant-numeric:tabular-nums;border-radius:999px;padding:0 9px;font-size:12px}.Yvqh9W_lightboxTool:hover,.Yvqh9W_lightboxZoomLevel:hover,.Yvqh9W_lightboxCopy:hover{background:#ffffff42}.Yvqh9W_lightboxCaptionRow{align-items:flex-start;gap:8px;min-width:0;display:flex}.Yvqh9W_lightboxCaption{color:#ffffffe6;-webkit-line-clamp:3;-webkit-box-orient:vertical;flex:1;min-width:0;font-size:12px;line-height:1.6;display:-webkit-box;overflow:hidden}.Yvqh9W_lightboxCopy{min-height:28px;font:inherit;white-space:nowrap;border-radius:999px;flex:none;gap:5px;padding:4px 9px;font-size:12px}.Yvqh9W_lightboxMeta{justify-content:space-between;align-items:center;gap:12px;display:flex}.Yvqh9W_lightboxIndex{color:#fffc;font-variant-numeric:tabular-nums;font-size:12px}.Yvqh9W_lightboxActions{align-items:center;gap:8px;display:inline-flex}.Yvqh9W_lightboxDownload,.Yvqh9W_lightboxEdit{font:inherit;color:#fff;cursor:pointer;background:#ffffff24;border:1px solid #ffffff47;border-radius:999px;padding:4px 14px;font-size:12.5px;font-weight:500;text-decoration:none}.Yvqh9W_lightboxDownload:hover,.Yvqh9W_lightboxEdit:hover{background:#ffffff42}.Yvqh9W_lightboxEdit{color:#fff;background:#ffffff24;border:1px solid #ffffff47;border-radius:999px}@media (width<=720px){.Yvqh9W_lightbox{padding:16px}.Yvqh9W_lightboxFigure{width:calc(100vw - 32px);max-width:none}.Yvqh9W_lightboxNav[data-dir=prev]{left:20px}.Yvqh9W_lightboxNav[data-dir=next]{right:20px}.Yvqh9W_lightboxCaptionRow,.Yvqh9W_lightboxMeta{flex-direction:column;align-items:stretch}.Yvqh9W_lightboxCopy,.Yvqh9W_lightboxActions{align-self:flex-end}}@keyframes Yvqh9W_dshImageGenSpin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){.Yvqh9W_download,.Yvqh9W_spinner,.Yvqh9W_bigSpinner{transition:none;animation-duration:1.5s}}";
|
|
402
|
+
const css$1 = "[data-pane=conversation]{position:relative}[data-dsh-imagegen-view]{z-index:60;background:var(--dsw-alias-bg-base);display:none;position:absolute;inset:0}html[data-dsh-imagegen-active]:not([data-dsh-taskboard-active]):not([data-dsh-ssh-active]) [data-dsh-imagegen-view]{display:block}html[data-dsh-imagegen-active]:not([data-dsh-taskboard-active]):not([data-dsh-ssh-active]) [data-pane=conversation]>:not([data-dsh-imagegen-view]),html[data-dsh-imagegen-active]:not([data-dsh-taskboard-active]):not([data-dsh-ssh-active]) [class*=centerCol]>:not([data-dsh-imagegen-view]){display:none!important}.Yvqh9W_entry{width:100%;height:32px;color:var(--dsw-alias-label-secondary);cursor:pointer;white-space:nowrap;background:0 0;border:none;border-radius:8px;align-items:center;gap:8px;padding:0 12px;font-size:13px;display:flex}.Yvqh9W_entry:hover{background:var(--dsw-specific-sidebar-nav-item-hover);color:var(--dsw-alias-label-primary)}.Yvqh9W_entry[data-active]{background:var(--dsw-specific-sidebar-nav-item-active);color:var(--dsw-alias-label-primary);font-weight:600}.Yvqh9W_entryIcon{flex:none;justify-content:center;align-items:center;display:inline-flex}.Yvqh9W_entryLabel{text-overflow:ellipsis;overflow:hidden}[data-dsh-frame][data-sidebar-collapsed] .Yvqh9W_entry{justify-content:center;width:100%;padding:0}[data-dsh-frame][data-sidebar-collapsed] .Yvqh9W_entryLabel{display:none}.Yvqh9W_view{overflow:hidden}.Yvqh9W_panel,.Yvqh9W_panel *,.Yvqh9W_panel :before,.Yvqh9W_panel :after{box-sizing:border-box}.Yvqh9W_panel{background:var(--dsw-alias-bg-base);min-width:0;height:100%;min-height:0;color:var(--dsw-alias-label-primary);font-family:var(--dsw-font-family);flex-direction:column;gap:10px;padding:14px 16px 16px;display:flex;overflow:hidden}.Yvqh9W_panelHeader{flex:none;justify-content:space-between;align-items:center;gap:12px;display:flex}.Yvqh9W_panelHeading{align-items:baseline;gap:10px;min-width:0;display:flex}.Yvqh9W_panelTitle{color:var(--dsw-alias-label-primary);white-space:nowrap;margin:0;font-size:16px;font-weight:700}.Yvqh9W_panelSubtitle{color:var(--dsw-alias-label-tertiary);white-space:nowrap;text-overflow:ellipsis;font-size:12px;overflow:hidden}.Yvqh9W_connectionStatus{border:1px solid var(--dsw-alias-label-error);height:28px;color:var(--dsw-alias-label-error);font:inherit;white-space:nowrap;background:0 0;border-radius:8px;flex:none;align-items:center;gap:6px;padding:0 10px;font-size:12px;line-height:1;display:inline-flex}.Yvqh9W_connectionStatus[data-connected=true]{border-color:var(--dsw-alias-state-success-primary);color:var(--dsw-alias-state-success-primary)}.Yvqh9W_connectionDot{background:currentColor;border-radius:50%;width:6px;height:6px}.Yvqh9W_updateBanner{border:1px solid var(--dsw-alias-state-warn-primary);color:var(--dsw-alias-state-warn-primary);overflow-wrap:anywhere;border-radius:10px;flex:none;justify-content:space-between;align-items:center;gap:12px;padding:7px 10px 7px 12px;font-size:12px;line-height:1.5;display:flex}.Yvqh9W_updateBanner[data-kind=ok]{color:var(--dsw-alias-state-success-primary);border-color:var(--dsw-alias-state-success-primary)}.Yvqh9W_updateText{min-width:0}.Yvqh9W_updateActions{flex:none;align-items:center;gap:10px;display:inline-flex}.Yvqh9W_updateRelease{color:inherit;text-underline-offset:2px;white-space:nowrap;text-decoration:underline}@media (width<=700px){.Yvqh9W_panelHeader{align-items:flex-start}.Yvqh9W_panelHeading{flex-direction:column;align-items:flex-start;gap:2px}.Yvqh9W_updateBanner{flex-direction:column;align-items:flex-start}.Yvqh9W_updateActions{justify-content:space-between;width:100%}}.Yvqh9W_studio{flex:1;gap:14px;min-width:0;min-height:0;display:flex}.Yvqh9W_config{flex-direction:column;flex:none;gap:12px;width:300px;min-width:260px;max-width:340px;height:100%;min-height:0;display:flex;overflow:hidden}.Yvqh9W_configScroll{scrollbar-width:thin;scrollbar-color:var(--dsw-alias-border-l2) transparent;flex-direction:column;flex:1;gap:12px;min-height:0;padding-right:2px;display:flex;overflow-y:auto}.Yvqh9W_configScroll::-webkit-scrollbar{width:8px}.Yvqh9W_configScroll::-webkit-scrollbar-thumb{background:var(--dsw-alias-border-l2);border-radius:999px}.Yvqh9W_canvas{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);border-radius:12px;flex-direction:column;flex:1;min-width:0;min-height:0;display:flex;position:relative;overflow:hidden}.Yvqh9W_history{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);border-radius:12px;flex-direction:column;flex:none;width:240px;min-width:200px;max-width:280px;min-height:0;display:flex;overflow:hidden}.Yvqh9W_historyHeader{border-bottom:1px solid var(--dsw-alias-border-l1);flex:none;justify-content:space-between;align-items:center;gap:8px;padding:10px 12px;display:flex}.Yvqh9W_historyTitle{color:var(--dsw-alias-label-primary);font-size:13px;font-weight:600}.Yvqh9W_historyClear{font:inherit;color:var(--dsw-alias-label-tertiary);border:1px solid var(--dsw-alias-border-l2);cursor:pointer;background:0 0;border-radius:999px;padding:2px 8px;font-size:11.5px}.Yvqh9W_historyClear:hover{color:var(--dsw-alias-label-error);border-color:var(--dsw-alias-label-error)}.Yvqh9W_historyList{scrollbar-width:thin;scrollbar-color:var(--dsw-alias-border-l2) transparent;flex-direction:column;flex:1;gap:8px;min-height:0;padding:10px;display:flex;overflow-y:auto}.Yvqh9W_historyList::-webkit-scrollbar{width:8px}.Yvqh9W_historyList::-webkit-scrollbar-thumb{background:var(--dsw-alias-border-l2);border-radius:999px}.Yvqh9W_historyEmpty{text-align:center;color:var(--dsw-alias-label-tertiary);flex:1;justify-content:center;align-items:center;padding:20px;font-size:12px;line-height:1.6;display:flex}.Yvqh9W_historyItem{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-2);border-radius:10px;flex-direction:column;flex:none;gap:6px;padding:8px;display:flex}.Yvqh9W_historyItem:hover{border-color:var(--dsw-alias-border-l2)}.Yvqh9W_historyItem[data-active]{border-color:var(--dsw-alias-brand-primary)}.Yvqh9W_historyMain{font:inherit;color:inherit;text-align:left;cursor:pointer;background:0 0;border:none;align-items:flex-start;gap:8px;min-width:0;padding:0;display:flex}.Yvqh9W_historyThumb{object-fit:cover;background:var(--dsw-alias-bg-base);border-radius:8px;flex:none;width:52px;height:52px}.Yvqh9W_historyThumbPlaceholder{background:var(--dsw-alias-bg-layer-3);border-radius:8px;flex:none;width:52px;height:52px}.Yvqh9W_historyInfo{flex-direction:column;flex:1;gap:4px;min-width:0;display:flex}.Yvqh9W_historyPrompt{color:var(--dsw-alias-label-primary);-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:12px;line-height:1.4;display:-webkit-box;overflow:hidden}.Yvqh9W_historyMeta{color:var(--dsw-alias-label-tertiary);white-space:nowrap;text-overflow:ellipsis;font-size:11px;overflow:hidden}.Yvqh9W_historyActions{justify-content:flex-end;gap:6px;display:flex}.Yvqh9W_historyAction{font:inherit;color:var(--dsw-alias-label-secondary);border:1px solid var(--dsw-alias-border-l2);cursor:pointer;background:0 0;border-radius:999px;padding:2px 8px;font-size:11.5px}.Yvqh9W_historyAction:hover{color:var(--dsw-alias-label-primary);border-color:var(--dsw-alias-label-dimmed)}.Yvqh9W_historyAction[data-danger]:hover{color:var(--dsw-alias-label-error);border-color:var(--dsw-alias-label-error)}.Yvqh9W_card{background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l1);border-radius:12px;flex-direction:column;flex:none;gap:10px;padding:12px;display:flex}.Yvqh9W_modeRow{align-items:center;gap:8px;display:flex}.Yvqh9W_modePill{flex:1;justify-content:center;height:28px;font-size:13px}.Yvqh9W_uploadBox{min-height:128px;color:var(--dsw-alias-label-secondary);border:1.5px dashed var(--dsw-alias-border-l2);cursor:pointer;font:inherit;text-align:center;background:0 0;border-radius:12px;flex-direction:column;justify-content:center;align-items:center;gap:6px;padding:16px;font-size:12.5px;display:flex}.Yvqh9W_uploadBox:hover{color:var(--dsw-alias-label-primary);border-color:var(--dsw-alias-label-dimmed);background:var(--dsw-alias-interactive-bg-hover)}.Yvqh9W_uploadBox:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}.Yvqh9W_uploadIcon{color:var(--dsw-alias-label-tertiary);display:inline-flex}.Yvqh9W_uploadHint{color:var(--dsw-alias-label-tertiary);font-size:11px}.Yvqh9W_reference{flex-direction:column;gap:8px;display:flex}.Yvqh9W_referenceImage{object-fit:contain;background:var(--dsw-alias-bg-base);border:1px solid var(--dsw-alias-border-l1);border-radius:10px;width:100%;max-height:176px}.Yvqh9W_referenceActions{gap:8px;display:flex}.Yvqh9W_hiddenFile{display:none}.Yvqh9W_prompt{width:100%;min-height:120px;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-3);border:1px solid var(--dsw-alias-border-l2);resize:vertical;box-sizing:border-box;border-radius:10px;outline:none;padding:10px 12px;font-family:inherit;font-size:13px;line-height:1.6}.Yvqh9W_prompt:focus-visible{border-color:var(--dsw-alias-brand-primary)}.Yvqh9W_prompt::placeholder{color:var(--dsw-alias-label-tertiary)}.Yvqh9W_promptFooter{justify-content:flex-end;margin-top:-6px;display:flex}.Yvqh9W_promptCount{color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;font-size:11px}.Yvqh9W_paramGroup{flex-direction:column;gap:8px;display:flex}.Yvqh9W_paramLabel{color:var(--dsw-alias-label-secondary);font-size:12px;font-weight:600}.Yvqh9W_optionRow{flex-wrap:wrap;gap:6px;display:flex}.Yvqh9W_optionGrid{grid-template-columns:repeat(3,1fr);gap:6px;display:grid}.Yvqh9W_optionPill{justify-content:center}.Yvqh9W_paramHint{color:var(--dsw-alias-label-tertiary);font-size:11px;line-height:1.45}.Yvqh9W_footer{border-top:1px solid var(--dsw-alias-border-l1);flex-direction:column;flex:none;align-items:stretch;gap:8px;padding:10px 2px 0 0;display:flex}.Yvqh9W_modelWrap{flex-direction:column;gap:5px;min-width:0;display:flex}.Yvqh9W_modelLabel{color:var(--dsw-alias-label-secondary);font-size:12px;font-weight:600}.Yvqh9W_modelSelect{width:100%;height:36px;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l2);cursor:pointer;border-radius:18px;outline:none;padding:0 12px;font-family:inherit;font-size:13px}.Yvqh9W_modelSelect:focus-visible{border-color:var(--dsw-alias-brand-primary)}.Yvqh9W_modelSelect:disabled{opacity:.55}.Yvqh9W_generateButton{width:100%}.Yvqh9W_generateInner{align-items:center;gap:7px;display:inline-flex}.Yvqh9W_canvasState{text-align:center;color:var(--dsw-alias-label-tertiary);flex-direction:column;flex:1;justify-content:center;align-items:center;gap:8px;padding:24px;display:flex}.Yvqh9W_canvasStateTitle{color:var(--dsw-alias-label-secondary);font-size:14px;font-weight:600}.Yvqh9W_canvasStateHint{max-width:380px;font-size:12px;line-height:1.6}.Yvqh9W_canvasEmptyIcon{color:var(--dsw-alias-label-tertiary);margin-bottom:4px;display:inline-flex}.Yvqh9W_canvasError{color:var(--dsw-alias-label-error);background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-label-error);overflow-wrap:anywhere;border-radius:10px;flex:none;margin:14px;padding:10px 14px;font-size:12.5px;line-height:1.6}.Yvqh9W_canvasBody{scrollbar-width:thin;scrollbar-color:var(--dsw-alias-border-l2) transparent;flex-direction:column;flex:1;gap:10px;min-height:0;padding:14px;display:flex;overflow-y:auto}.Yvqh9W_canvasBody::-webkit-scrollbar{width:8px}.Yvqh9W_canvasBody::-webkit-scrollbar-thumb{background:var(--dsw-alias-border-l2);border-radius:999px}.Yvqh9W_canvasMeta{color:var(--dsw-alias-label-tertiary);flex:none;align-items:center;gap:8px;font-size:12px;display:flex}.Yvqh9W_canvasHistoryTag{color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l2);white-space:nowrap;border-radius:999px;padding:1px 8px;font-size:11px}.Yvqh9W_grid{flex:1;grid-template-rows:repeat(2,minmax(0,1fr));grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;min-height:0;display:grid}.Yvqh9W_grid[data-count=\"1\"] .Yvqh9W_imageCard{grid-area:1/1/3/3}.Yvqh9W_imageCard{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-2);cursor:zoom-in;border-radius:12px;flex-direction:column;min-height:0;margin:0;display:flex;position:relative;overflow:hidden}.Yvqh9W_imageCard:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}.Yvqh9W_image{object-fit:cover;background:var(--dsw-alias-bg-base);flex:1;width:100%;min-height:0;display:block}.Yvqh9W_imageCaption{color:var(--dsw-alias-label-tertiary);white-space:nowrap;text-overflow:ellipsis;border-top:1px solid var(--dsw-alias-border-l1);padding:7px 10px;font-size:11px;line-height:1.5;overflow:hidden}.Yvqh9W_download{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-mask-1);border:1px solid var(--dsw-alias-border-l2);opacity:0;backdrop-filter:blur(4px);border-radius:999px;padding:2px 10px;font-size:12px;font-weight:500;line-height:20px;text-decoration:none;transition:opacity .12s;position:absolute;top:8px;right:8px}.Yvqh9W_imageCard:hover .Yvqh9W_download{opacity:1}.Yvqh9W_download:hover{background:var(--dsw-alias-bg-base)}.Yvqh9W_zoomHint{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-mask-1);border:1px solid var(--dsw-alias-border-l2);opacity:0;backdrop-filter:blur(4px);pointer-events:none;border-radius:999px;align-items:center;gap:5px;padding:2px 10px;font-size:12px;font-weight:500;line-height:20px;transition:opacity .12s;display:inline-flex;position:absolute;bottom:8px;left:8px}.Yvqh9W_imageCard:hover .Yvqh9W_zoomHint{opacity:1}.Yvqh9W_spinner,.Yvqh9W_bigSpinner{border:2px solid;border-top-color:#0000;border-radius:50%;flex:none;animation:.8s linear infinite Yvqh9W_dshImageGenSpin;display:inline-block}.Yvqh9W_spinner{width:11px;height:11px}.Yvqh9W_bigSpinner{width:30px;height:30px;color:var(--dsw-alias-state-business-primary);border-width:3px;margin-bottom:6px}.Yvqh9W_lightbox{z-index:1000;backdrop-filter:blur(6px);background:#000000b8;justify-content:center;align-items:center;padding:24px;display:flex;position:fixed;inset:0}.Yvqh9W_lightboxClose{color:#fff;cursor:pointer;background:#ffffff24;border:1px solid #ffffff47;border-radius:50%;justify-content:center;align-items:center;width:38px;height:38px;display:inline-flex;position:absolute;top:16px;right:16px}.Yvqh9W_lightboxClose:hover{background:#ffffff42}.Yvqh9W_lightboxNav{color:#fff;cursor:pointer;background:#ffffff24;border:1px solid #ffffff47;border-radius:50%;justify-content:center;align-items:center;width:42px;height:42px;display:inline-flex;position:absolute;top:50%;transform:translateY(-50%)}.Yvqh9W_lightboxNav:hover{background:#ffffff42}.Yvqh9W_lightboxNav[data-dir=prev]{left:max(20px,50% - 640px)}.Yvqh9W_lightboxNav[data-dir=next]{right:max(20px,50% - 640px)}.Yvqh9W_lightboxFigure{flex-direction:column;gap:10px;width:min(1100px,100vw - 160px);max-width:min(1100px,100vw - 160px);height:min(820px,100vh - 48px);min-height:0;margin:0;display:flex}.Yvqh9W_lightboxStage{background:#ffffff0a;border-radius:10px;flex:1;min-height:0;position:relative;overflow:auto}.Yvqh9W_lightboxScaleFrame{justify-content:center;align-items:center;min-width:100%;min-height:100%;display:flex}.Yvqh9W_lightboxImage{object-fit:contain;border-radius:10px;max-width:100%;max-height:100%;display:block;box-shadow:0 24px 80px #00000080}.Yvqh9W_lightboxTools{justify-content:center;align-items:center;gap:6px;display:flex}.Yvqh9W_lightboxTool,.Yvqh9W_lightboxZoomLevel,.Yvqh9W_lightboxCopy{color:#fff;cursor:pointer;background:#ffffff24;border:1px solid #ffffff47;justify-content:center;align-items:center;display:inline-flex}.Yvqh9W_lightboxTool,.Yvqh9W_lightboxZoomLevel{height:32px}.Yvqh9W_lightboxTool{border-radius:50%;width:32px}.Yvqh9W_lightboxZoomLevel{min-width:58px;font:inherit;font-variant-numeric:tabular-nums;border-radius:999px;padding:0 9px;font-size:12px}.Yvqh9W_lightboxTool:hover,.Yvqh9W_lightboxZoomLevel:hover,.Yvqh9W_lightboxCopy:hover{background:#ffffff42}.Yvqh9W_lightboxCaptionRow{align-items:flex-start;gap:8px;min-width:0;display:flex}.Yvqh9W_lightboxCaption{color:#ffffffe6;-webkit-line-clamp:3;-webkit-box-orient:vertical;flex:1;min-width:0;font-size:12px;line-height:1.6;display:-webkit-box;overflow:hidden}.Yvqh9W_lightboxCopy{min-height:28px;font:inherit;white-space:nowrap;border-radius:999px;flex:none;gap:5px;padding:4px 9px;font-size:12px}.Yvqh9W_lightboxMeta{justify-content:space-between;align-items:center;gap:12px;display:flex}.Yvqh9W_lightboxIndex{color:#fffc;font-variant-numeric:tabular-nums;font-size:12px}.Yvqh9W_lightboxActions{align-items:center;gap:8px;display:inline-flex}.Yvqh9W_lightboxDownload,.Yvqh9W_lightboxEdit{font:inherit;color:#fff;cursor:pointer;background:#ffffff24;border:1px solid #ffffff47;border-radius:999px;padding:4px 14px;font-size:12.5px;font-weight:500;text-decoration:none}.Yvqh9W_lightboxDownload:hover,.Yvqh9W_lightboxEdit:hover{background:#ffffff42}.Yvqh9W_lightboxEdit{color:#fff;background:#ffffff24;border:1px solid #ffffff47;border-radius:999px}@media (width<=720px){.Yvqh9W_lightbox{padding:16px}.Yvqh9W_lightboxFigure{width:calc(100vw - 32px);max-width:none}.Yvqh9W_lightboxNav[data-dir=prev]{left:20px}.Yvqh9W_lightboxNav[data-dir=next]{right:20px}.Yvqh9W_lightboxCaptionRow,.Yvqh9W_lightboxMeta{flex-direction:column;align-items:stretch}.Yvqh9W_lightboxCopy,.Yvqh9W_lightboxActions{align-self:flex-end}}@keyframes Yvqh9W_dshImageGenSpin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){.Yvqh9W_download,.Yvqh9W_spinner,.Yvqh9W_bigSpinner{transition:none;animation-duration:1.5s}}";
|
|
403
403
|
const tagId$1 = "@dickpy/dsh-imagegen/panel.module.css";
|
|
404
404
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$1) + "]") === null) {
|
|
405
405
|
const tag = document.createElement("style");
|
|
@@ -409,99 +409,100 @@ window.__ModuleLoader__.load({
|
|
|
409
409
|
document.head.appendChild(tag);
|
|
410
410
|
}
|
|
411
411
|
var panel_module_css_default = {
|
|
412
|
-
"
|
|
412
|
+
"lightboxClose": "Yvqh9W_lightboxClose",
|
|
413
|
+
"panelHeading": "Yvqh9W_panelHeading",
|
|
414
|
+
"modelSelect": "Yvqh9W_modelSelect",
|
|
415
|
+
"config": "Yvqh9W_config",
|
|
416
|
+
"history": "Yvqh9W_history",
|
|
417
|
+
"lightboxActions": "Yvqh9W_lightboxActions",
|
|
418
|
+
"promptFooter": "Yvqh9W_promptFooter",
|
|
419
|
+
"historyMeta": "Yvqh9W_historyMeta",
|
|
420
|
+
"historyTitle": "Yvqh9W_historyTitle",
|
|
421
|
+
"footer": "Yvqh9W_footer",
|
|
422
|
+
"historyEmpty": "Yvqh9W_historyEmpty",
|
|
423
|
+
"canvasBody": "Yvqh9W_canvasBody",
|
|
424
|
+
"connectionStatus": "Yvqh9W_connectionStatus",
|
|
425
|
+
"imageCaption": "Yvqh9W_imageCaption",
|
|
426
|
+
"uploadHint": "Yvqh9W_uploadHint",
|
|
427
|
+
"optionPill": "Yvqh9W_optionPill",
|
|
428
|
+
"download": "Yvqh9W_download",
|
|
429
|
+
"lightboxDownload": "Yvqh9W_lightboxDownload",
|
|
430
|
+
"lightboxEdit": "Yvqh9W_lightboxEdit",
|
|
431
|
+
"generateButton": "Yvqh9W_generateButton",
|
|
432
|
+
"card": "Yvqh9W_card",
|
|
433
|
+
"uploadBox": "Yvqh9W_uploadBox",
|
|
434
|
+
"lightboxCaptionRow": "Yvqh9W_lightboxCaptionRow",
|
|
435
|
+
"optionRow": "Yvqh9W_optionRow",
|
|
436
|
+
"canvas": "Yvqh9W_canvas",
|
|
437
|
+
"updateText": "Yvqh9W_updateText",
|
|
438
|
+
"historyItem": "Yvqh9W_historyItem",
|
|
439
|
+
"historyList": "Yvqh9W_historyList",
|
|
440
|
+
"panelSubtitle": "Yvqh9W_panelSubtitle",
|
|
413
441
|
"prompt": "Yvqh9W_prompt",
|
|
414
|
-
"entryLabel": "Yvqh9W_entryLabel",
|
|
415
|
-
"historyThumbPlaceholder": "Yvqh9W_historyThumbPlaceholder",
|
|
416
|
-
"generateInner": "Yvqh9W_generateInner",
|
|
417
|
-
"historyActions": "Yvqh9W_historyActions",
|
|
418
442
|
"canvasStateHint": "Yvqh9W_canvasStateHint",
|
|
443
|
+
"canvasHistoryTag": "Yvqh9W_canvasHistoryTag",
|
|
419
444
|
"spinner": "Yvqh9W_spinner",
|
|
420
|
-
"bigSpinner": "Yvqh9W_bigSpinner",
|
|
421
|
-
"lightboxStage": "Yvqh9W_lightboxStage",
|
|
422
|
-
"historyHeader": "Yvqh9W_historyHeader",
|
|
423
|
-
"paramLabel": "Yvqh9W_paramLabel",
|
|
424
|
-
"canvasBody": "Yvqh9W_canvasBody",
|
|
425
445
|
"dshImageGenSpin": "Yvqh9W_dshImageGenSpin",
|
|
426
|
-
"
|
|
427
|
-
"
|
|
428
|
-
"
|
|
446
|
+
"lightboxNav": "Yvqh9W_lightboxNav",
|
|
447
|
+
"configScroll": "Yvqh9W_configScroll",
|
|
448
|
+
"lightboxTools": "Yvqh9W_lightboxTools",
|
|
449
|
+
"lightboxZoomLevel": "Yvqh9W_lightboxZoomLevel",
|
|
450
|
+
"lightboxImage": "Yvqh9W_lightboxImage",
|
|
451
|
+
"historyPrompt": "Yvqh9W_historyPrompt",
|
|
429
452
|
"panelTitle": "Yvqh9W_panelTitle",
|
|
430
|
-
"
|
|
453
|
+
"updateActions": "Yvqh9W_updateActions",
|
|
454
|
+
"modelLabel": "Yvqh9W_modelLabel",
|
|
455
|
+
"historyClear": "Yvqh9W_historyClear",
|
|
456
|
+
"canvasStateTitle": "Yvqh9W_canvasStateTitle",
|
|
457
|
+
"historyInfo": "Yvqh9W_historyInfo",
|
|
458
|
+
"historyMain": "Yvqh9W_historyMain",
|
|
459
|
+
"connectionDot": "Yvqh9W_connectionDot",
|
|
460
|
+
"grid": "Yvqh9W_grid",
|
|
461
|
+
"promptCount": "Yvqh9W_promptCount",
|
|
462
|
+
"entryLabel": "Yvqh9W_entryLabel",
|
|
463
|
+
"updateRelease": "Yvqh9W_updateRelease",
|
|
464
|
+
"canvasState": "Yvqh9W_canvasState",
|
|
465
|
+
"lightboxCaption": "Yvqh9W_lightboxCaption",
|
|
466
|
+
"paramGroup": "Yvqh9W_paramGroup",
|
|
467
|
+
"updateBanner": "Yvqh9W_updateBanner",
|
|
468
|
+
"historyThumbPlaceholder": "Yvqh9W_historyThumbPlaceholder",
|
|
431
469
|
"canvasError": "Yvqh9W_canvasError",
|
|
470
|
+
"panelHeader": "Yvqh9W_panelHeader",
|
|
432
471
|
"referenceImage": "Yvqh9W_referenceImage",
|
|
433
|
-
"
|
|
434
|
-
"
|
|
472
|
+
"canvasEmptyIcon": "Yvqh9W_canvasEmptyIcon",
|
|
473
|
+
"bigSpinner": "Yvqh9W_bigSpinner",
|
|
474
|
+
"generateInner": "Yvqh9W_generateInner",
|
|
475
|
+
"lightboxFigure": "Yvqh9W_lightboxFigure",
|
|
476
|
+
"optionGrid": "Yvqh9W_optionGrid",
|
|
477
|
+
"lightboxTool": "Yvqh9W_lightboxTool",
|
|
478
|
+
"lightboxCopy": "Yvqh9W_lightboxCopy",
|
|
479
|
+
"modelWrap": "Yvqh9W_modelWrap",
|
|
480
|
+
"lightboxMeta": "Yvqh9W_lightboxMeta",
|
|
435
481
|
"paramHint": "Yvqh9W_paramHint",
|
|
436
|
-
"
|
|
482
|
+
"lightboxScaleFrame": "Yvqh9W_lightboxScaleFrame",
|
|
483
|
+
"historyActions": "Yvqh9W_historyActions",
|
|
484
|
+
"image": "Yvqh9W_image",
|
|
437
485
|
"zoomHint": "Yvqh9W_zoomHint",
|
|
438
|
-
"
|
|
439
|
-
"
|
|
440
|
-
"config": "Yvqh9W_config",
|
|
441
|
-
"historyMain": "Yvqh9W_historyMain",
|
|
486
|
+
"modePill": "Yvqh9W_modePill",
|
|
487
|
+
"view": "Yvqh9W_view",
|
|
442
488
|
"historyThumb": "Yvqh9W_historyThumb",
|
|
443
|
-
"
|
|
444
|
-
"optionGrid": "Yvqh9W_optionGrid",
|
|
445
|
-
"lightbox": "Yvqh9W_lightbox",
|
|
446
|
-
"lightboxClose": "Yvqh9W_lightboxClose",
|
|
447
|
-
"lightboxImage": "Yvqh9W_lightboxImage",
|
|
448
|
-
"lightboxMeta": "Yvqh9W_lightboxMeta",
|
|
449
|
-
"modeRow": "Yvqh9W_modeRow",
|
|
450
|
-
"canvasStateTitle": "Yvqh9W_canvasStateTitle",
|
|
451
|
-
"panelHeading": "Yvqh9W_panelHeading",
|
|
452
|
-
"download": "Yvqh9W_download",
|
|
453
|
-
"historyTitle": "Yvqh9W_historyTitle",
|
|
489
|
+
"historyHeader": "Yvqh9W_historyHeader",
|
|
454
490
|
"imageCard": "Yvqh9W_imageCard",
|
|
455
|
-
"canvasState": "Yvqh9W_canvasState",
|
|
456
|
-
"promptFooter": "Yvqh9W_promptFooter",
|
|
457
|
-
"updateBanner": "Yvqh9W_updateBanner",
|
|
458
491
|
"lightboxIndex": "Yvqh9W_lightboxIndex",
|
|
459
|
-
"
|
|
460
|
-
"
|
|
492
|
+
"panel": "Yvqh9W_panel",
|
|
493
|
+
"studio": "Yvqh9W_studio",
|
|
494
|
+
"lightboxStage": "Yvqh9W_lightboxStage",
|
|
495
|
+
"modeRow": "Yvqh9W_modeRow",
|
|
461
496
|
"canvasMeta": "Yvqh9W_canvasMeta",
|
|
497
|
+
"paramLabel": "Yvqh9W_paramLabel",
|
|
462
498
|
"entryIcon": "Yvqh9W_entryIcon",
|
|
463
|
-
"canvas": "Yvqh9W_canvas",
|
|
464
|
-
"view": "Yvqh9W_view",
|
|
465
|
-
"historyPrompt": "Yvqh9W_historyPrompt",
|
|
466
|
-
"optionRow": "Yvqh9W_optionRow",
|
|
467
|
-
"modelSelect": "Yvqh9W_modelSelect",
|
|
468
|
-
"footer": "Yvqh9W_footer",
|
|
469
|
-
"image": "Yvqh9W_image",
|
|
470
|
-
"imageCaption": "Yvqh9W_imageCaption",
|
|
471
|
-
"uploadIcon": "Yvqh9W_uploadIcon",
|
|
472
|
-
"historyMeta": "Yvqh9W_historyMeta",
|
|
473
|
-
"canvasEmptyIcon": "Yvqh9W_canvasEmptyIcon",
|
|
474
|
-
"updateRelease": "Yvqh9W_updateRelease",
|
|
475
|
-
"modelWrap": "Yvqh9W_modelWrap",
|
|
476
|
-
"lightboxNav": "Yvqh9W_lightboxNav",
|
|
477
|
-
"lightboxCopy": "Yvqh9W_lightboxCopy",
|
|
478
|
-
"historyItem": "Yvqh9W_historyItem",
|
|
479
|
-
"modePill": "Yvqh9W_modePill",
|
|
480
|
-
"generateButton": "Yvqh9W_generateButton",
|
|
481
|
-
"historyClear": "Yvqh9W_historyClear",
|
|
482
|
-
"lightboxCaptionRow": "Yvqh9W_lightboxCaptionRow",
|
|
483
|
-
"promptCount": "Yvqh9W_promptCount",
|
|
484
|
-
"modelLabel": "Yvqh9W_modelLabel",
|
|
485
|
-
"lightboxZoomLevel": "Yvqh9W_lightboxZoomLevel",
|
|
486
|
-
"lightboxDownload": "Yvqh9W_lightboxDownload",
|
|
487
|
-
"referenceActions": "Yvqh9W_referenceActions",
|
|
488
|
-
"paramGroup": "Yvqh9W_paramGroup",
|
|
489
|
-
"lightboxTool": "Yvqh9W_lightboxTool",
|
|
490
|
-
"historyEmpty": "Yvqh9W_historyEmpty",
|
|
491
|
-
"panelHeader": "Yvqh9W_panelHeader",
|
|
492
|
-
"historyInfo": "Yvqh9W_historyInfo",
|
|
493
|
-
"panelSubtitle": "Yvqh9W_panelSubtitle",
|
|
494
|
-
"lightboxTools": "Yvqh9W_lightboxTools",
|
|
495
|
-
"historyAction": "Yvqh9W_historyAction",
|
|
496
|
-
"lightboxFigure": "Yvqh9W_lightboxFigure",
|
|
497
|
-
"uploadHint": "Yvqh9W_uploadHint",
|
|
498
499
|
"entry": "Yvqh9W_entry",
|
|
499
|
-
"
|
|
500
|
-
"
|
|
500
|
+
"reference": "Yvqh9W_reference",
|
|
501
|
+
"historyAction": "Yvqh9W_historyAction",
|
|
502
|
+
"lightbox": "Yvqh9W_lightbox",
|
|
503
|
+
"referenceActions": "Yvqh9W_referenceActions",
|
|
501
504
|
"hiddenFile": "Yvqh9W_hiddenFile",
|
|
502
|
-
"
|
|
503
|
-
"history": "Yvqh9W_history",
|
|
504
|
-
"connectionStatus": "Yvqh9W_connectionStatus"
|
|
505
|
+
"uploadIcon": "Yvqh9W_uploadIcon"
|
|
505
506
|
};
|
|
506
507
|
//#endregion
|
|
507
508
|
//#region src/client/ImageGenPanel.tsx
|
|
@@ -647,6 +648,7 @@ window.__ModuleLoader__.load({
|
|
|
647
648
|
const [updateMessage, setUpdateMessage] = (0, react.useState)(null);
|
|
648
649
|
const [updateResult, setUpdateResult] = (0, react.useState)(null);
|
|
649
650
|
const fileInput = (0, react.useRef)(null);
|
|
651
|
+
const previewStage = (0, react.useRef)(null);
|
|
650
652
|
const elapsed = useElapsed(generating, startedAt);
|
|
651
653
|
(0, react.useEffect)(() => {
|
|
652
654
|
let disposed = false;
|
|
@@ -785,6 +787,16 @@ window.__ModuleLoader__.load({
|
|
|
785
787
|
window.addEventListener("keydown", onKey);
|
|
786
788
|
return () => window.removeEventListener("keydown", onKey);
|
|
787
789
|
}, [preview]);
|
|
790
|
+
(0, react.useEffect)(() => {
|
|
791
|
+
if (preview === null) return;
|
|
792
|
+
const frame = window.requestAnimationFrame(() => {
|
|
793
|
+
const stage = previewStage.current;
|
|
794
|
+
if (stage === null) return;
|
|
795
|
+
stage.scrollLeft = Math.max(0, (stage.scrollWidth - stage.clientWidth) / 2);
|
|
796
|
+
stage.scrollTop = Math.max(0, (stage.scrollHeight - stage.clientHeight) / 2);
|
|
797
|
+
});
|
|
798
|
+
return () => window.cancelAnimationFrame(frame);
|
|
799
|
+
}, [preview, previewScale]);
|
|
788
800
|
/** Load a past generation's images into the canvas. */
|
|
789
801
|
const viewHistoryEntry = async (entry) => {
|
|
790
802
|
try {
|
|
@@ -833,6 +845,8 @@ window.__ModuleLoader__.load({
|
|
|
833
845
|
const generateDisabled = generating || !enabled || !configured;
|
|
834
846
|
const viewingEntry = viewingHistoryId === null ? null : history.find((entry) => entry.id === viewingHistoryId) ?? null;
|
|
835
847
|
const previewImage = preview === null ? null : preview.images[preview.index] ?? null;
|
|
848
|
+
const previewFrameScale = Math.max(1, previewScale);
|
|
849
|
+
const previewImageScale = previewScale / previewFrameScale;
|
|
836
850
|
const copyPreviewPrompt = async (text) => {
|
|
837
851
|
try {
|
|
838
852
|
if (navigator.clipboard?.writeText !== void 0) await navigator.clipboard.writeText(text);
|
|
@@ -1450,16 +1464,27 @@ window.__ModuleLoader__.load({
|
|
|
1450
1464
|
},
|
|
1451
1465
|
children: [
|
|
1452
1466
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1467
|
+
ref: previewStage,
|
|
1453
1468
|
className: panel_module_css_default.lightboxStage,
|
|
1454
1469
|
onWheel: (event) => {
|
|
1455
1470
|
event.preventDefault();
|
|
1456
1471
|
setPreviewScale((current) => clampPreviewScale(current + (event.deltaY < 0 ? PREVIEW_SCALE_STEP : -.25)));
|
|
1457
1472
|
},
|
|
1458
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("
|
|
1459
|
-
className: panel_module_css_default.
|
|
1460
|
-
style: {
|
|
1461
|
-
|
|
1462
|
-
|
|
1473
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1474
|
+
className: panel_module_css_default.lightboxScaleFrame,
|
|
1475
|
+
style: {
|
|
1476
|
+
width: `${previewFrameScale * 100}%`,
|
|
1477
|
+
height: `${previewFrameScale * 100}%`
|
|
1478
|
+
},
|
|
1479
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("img", {
|
|
1480
|
+
className: panel_module_css_default.lightboxImage,
|
|
1481
|
+
style: {
|
|
1482
|
+
width: `${previewImageScale * 100}%`,
|
|
1483
|
+
height: `${previewImageScale * 100}%`
|
|
1484
|
+
},
|
|
1485
|
+
src: srcOf(previewImage),
|
|
1486
|
+
alt: previewImage.revisedPrompt ?? tt("preview.title")
|
|
1487
|
+
})
|
|
1463
1488
|
})
|
|
1464
1489
|
}),
|
|
1465
1490
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -2075,35 +2100,35 @@ window.__ModuleLoader__.load({
|
|
|
2075
2100
|
document.head.appendChild(tag);
|
|
2076
2101
|
}
|
|
2077
2102
|
var settings_card_module_css_default = {
|
|
2078
|
-
"
|
|
2079
|
-
"label": "i1cc5G_label",
|
|
2080
|
-
"versionLabel": "i1cc5G_versionLabel",
|
|
2081
|
-
"field": "i1cc5G_field",
|
|
2082
|
-
"notExposed": "i1cc5G_notExposed",
|
|
2083
|
-
"save": "i1cc5G_save",
|
|
2084
|
-
"chevron": "i1cc5G_chevron",
|
|
2085
|
-
"input": "i1cc5G_input",
|
|
2086
|
-
"failed": "i1cc5G_failed",
|
|
2087
|
-
"versionValue": "i1cc5G_versionValue",
|
|
2088
|
-
"name": "i1cc5G_name",
|
|
2089
|
-
"footer": "i1cc5G_footer",
|
|
2090
|
-
"readOnly": "i1cc5G_readOnly",
|
|
2091
|
-
"head": "i1cc5G_head",
|
|
2092
|
-
"invalid": "i1cc5G_invalid",
|
|
2103
|
+
"versionRow": "i1cc5G_versionRow",
|
|
2093
2104
|
"body": "i1cc5G_body",
|
|
2105
|
+
"badge": "i1cc5G_badge",
|
|
2106
|
+
"footer": "i1cc5G_footer",
|
|
2094
2107
|
"badges": "i1cc5G_badges",
|
|
2095
|
-
"card": "i1cc5G_card",
|
|
2096
|
-
"pending": "i1cc5G_pending",
|
|
2097
2108
|
"discard": "i1cc5G_discard",
|
|
2098
|
-
"
|
|
2109
|
+
"readOnly": "i1cc5G_readOnly",
|
|
2110
|
+
"reset": "i1cc5G_reset",
|
|
2111
|
+
"header": "i1cc5G_header",
|
|
2112
|
+
"failed": "i1cc5G_failed",
|
|
2113
|
+
"card": "i1cc5G_card",
|
|
2114
|
+
"save": "i1cc5G_save",
|
|
2115
|
+
"chevron": "i1cc5G_chevron",
|
|
2116
|
+
"invalid": "i1cc5G_invalid",
|
|
2117
|
+
"input": "i1cc5G_input",
|
|
2118
|
+
"field": "i1cc5G_field",
|
|
2119
|
+
"hint": "i1cc5G_hint",
|
|
2120
|
+
"notExposed": "i1cc5G_notExposed",
|
|
2121
|
+
"label": "i1cc5G_label",
|
|
2099
2122
|
"chevronOpen": "i1cc5G_chevronOpen",
|
|
2123
|
+
"description": "i1cc5G_description",
|
|
2124
|
+
"pending": "i1cc5G_pending",
|
|
2100
2125
|
"select": "i1cc5G_select",
|
|
2126
|
+
"name": "i1cc5G_name",
|
|
2127
|
+
"versionLabel": "i1cc5G_versionLabel",
|
|
2101
2128
|
"headText": "i1cc5G_headText",
|
|
2102
|
-
"
|
|
2129
|
+
"versionValue": "i1cc5G_versionValue",
|
|
2103
2130
|
"inputInvalid": "i1cc5G_inputInvalid",
|
|
2104
|
-
"
|
|
2105
|
-
"versionRow": "i1cc5G_versionRow",
|
|
2106
|
-
"hint": "i1cc5G_hint"
|
|
2131
|
+
"head": "i1cc5G_head"
|
|
2107
2132
|
};
|
|
2108
2133
|
//#endregion
|
|
2109
2134
|
//#region src/client/SettingsCard.tsx
|