@dickpy/dsh-imagegen 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -7
- package/docs/images/image-generation-studio.png +0 -0
- package/docs/images/plugin-settings.png +0 -0
- package/lib/client.js +307 -111
- package/lib/client.js.map +1 -1
- package/lib/index.js +1 -1
- package/package.json +1 -1
- package/src/client/ImageGenPanel.tsx +110 -19
- package/src/client/locales.ts +16 -0
- package/src/client/panel.module.css +157 -12
- package/src/protocol.ts +1 -1
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.4";
|
|
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",
|
|
@@ -215,6 +215,14 @@ window.__ModuleLoader__.load({
|
|
|
215
215
|
"preview.prev": "上一张",
|
|
216
216
|
"preview.next": "下一张",
|
|
217
217
|
"preview.index": "{index} / {total}",
|
|
218
|
+
"preview.zoomControls": "图片缩放控制",
|
|
219
|
+
"preview.zoomIn": "放大",
|
|
220
|
+
"preview.zoomOut": "缩小",
|
|
221
|
+
"preview.zoomReset": "重置缩放",
|
|
222
|
+
"preview.zoomLevel": "{percent}%",
|
|
223
|
+
"preview.copyPrompt": "复制提示词",
|
|
224
|
+
"preview.copied": "已复制",
|
|
225
|
+
"preview.addToEdit": "添加到图生图",
|
|
218
226
|
"config.missing": "尚未配置 API:请前往「设置 → 插件 → 可配置」为 AI 生图填写 api_url 与 api_key。",
|
|
219
227
|
"config.configured": "已连接 {url}",
|
|
220
228
|
"config.disabled": "插件已停用,请在设置中重新启用。",
|
|
@@ -317,6 +325,14 @@ window.__ModuleLoader__.load({
|
|
|
317
325
|
"preview.prev": "Previous",
|
|
318
326
|
"preview.next": "Next",
|
|
319
327
|
"preview.index": "{index} / {total}",
|
|
328
|
+
"preview.zoomControls": "Image zoom controls",
|
|
329
|
+
"preview.zoomIn": "Zoom in",
|
|
330
|
+
"preview.zoomOut": "Zoom out",
|
|
331
|
+
"preview.zoomReset": "Reset zoom",
|
|
332
|
+
"preview.zoomLevel": "{percent}%",
|
|
333
|
+
"preview.copyPrompt": "Copy prompt",
|
|
334
|
+
"preview.copied": "Copied",
|
|
335
|
+
"preview.addToEdit": "Add to image to image",
|
|
320
336
|
"config.missing": "API not configured: open \"Settings → Plugins → Configurable\" and fill in api_url and api_key for AI Image.",
|
|
321
337
|
"config.configured": "Connected to {url}",
|
|
322
338
|
"config.disabled": "The plugin is disabled — re-enable it in Settings.",
|
|
@@ -383,7 +399,7 @@ window.__ModuleLoader__.load({
|
|
|
383
399
|
}
|
|
384
400
|
//#endregion
|
|
385
401
|
//#region \0dsh-css:E:\dsh-plugin\src\client\panel.module.css.mjs
|
|
386
|
-
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{grid-template-columns:repeat(auto-fill,minmax(240px,1fr));align-content:start;gap:14px;display:grid}.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;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{aspect-ratio:1;object-fit:cover;background:var(--dsw-alias-bg-base);width:100%;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:16px}.Yvqh9W_lightboxNav[data-dir=next]{right:16px}.Yvqh9W_lightboxFigure{flex-direction:column;gap:10px;max-width:min(1100px,100vw - 160px);max-height:calc(100vh - 48px);margin:0;display:flex}.Yvqh9W_lightboxImage{object-fit:contain;background:#ffffff0a;border-radius:10px;max-width:100%;max-height:calc(100vh - 160px);box-shadow:0 24px 80px #00000080}.Yvqh9W_lightboxCaption{color:#ffffffe6;-webkit-line-clamp:3;-webkit-box-orient:vertical;font-size:12px;line-height:1.6;display:-webkit-box;overflow:hidden}.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_lightboxDownload{color:#fff;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{background:#ffffff42}@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;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}}";
|
|
387
403
|
const tagId$1 = "@dickpy/dsh-imagegen/panel.module.css";
|
|
388
404
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$1) + "]") === null) {
|
|
389
405
|
const tag = document.createElement("style");
|
|
@@ -393,91 +409,99 @@ window.__ModuleLoader__.load({
|
|
|
393
409
|
document.head.appendChild(tag);
|
|
394
410
|
}
|
|
395
411
|
var panel_module_css_default = {
|
|
412
|
+
"canvasHistoryTag": "Yvqh9W_canvasHistoryTag",
|
|
413
|
+
"prompt": "Yvqh9W_prompt",
|
|
414
|
+
"entryLabel": "Yvqh9W_entryLabel",
|
|
415
|
+
"historyThumbPlaceholder": "Yvqh9W_historyThumbPlaceholder",
|
|
416
|
+
"generateInner": "Yvqh9W_generateInner",
|
|
417
|
+
"historyActions": "Yvqh9W_historyActions",
|
|
418
|
+
"canvasStateHint": "Yvqh9W_canvasStateHint",
|
|
419
|
+
"spinner": "Yvqh9W_spinner",
|
|
420
|
+
"bigSpinner": "Yvqh9W_bigSpinner",
|
|
421
|
+
"lightboxStage": "Yvqh9W_lightboxStage",
|
|
422
|
+
"historyHeader": "Yvqh9W_historyHeader",
|
|
423
|
+
"paramLabel": "Yvqh9W_paramLabel",
|
|
424
|
+
"canvasBody": "Yvqh9W_canvasBody",
|
|
425
|
+
"dshImageGenSpin": "Yvqh9W_dshImageGenSpin",
|
|
426
|
+
"lightboxActions": "Yvqh9W_lightboxActions",
|
|
427
|
+
"lightboxEdit": "Yvqh9W_lightboxEdit",
|
|
428
|
+
"updateText": "Yvqh9W_updateText",
|
|
429
|
+
"panelTitle": "Yvqh9W_panelTitle",
|
|
430
|
+
"reference": "Yvqh9W_reference",
|
|
431
|
+
"canvasError": "Yvqh9W_canvasError",
|
|
432
|
+
"referenceImage": "Yvqh9W_referenceImage",
|
|
433
|
+
"optionPill": "Yvqh9W_optionPill",
|
|
434
|
+
"lightboxCaption": "Yvqh9W_lightboxCaption",
|
|
435
|
+
"paramHint": "Yvqh9W_paramHint",
|
|
436
|
+
"grid": "Yvqh9W_grid",
|
|
437
|
+
"zoomHint": "Yvqh9W_zoomHint",
|
|
438
|
+
"panel": "Yvqh9W_panel",
|
|
439
|
+
"updateActions": "Yvqh9W_updateActions",
|
|
396
440
|
"config": "Yvqh9W_config",
|
|
397
|
-
"optionRow": "Yvqh9W_optionRow",
|
|
398
|
-
"uploadBox": "Yvqh9W_uploadBox",
|
|
399
441
|
"historyMain": "Yvqh9W_historyMain",
|
|
400
442
|
"historyThumb": "Yvqh9W_historyThumb",
|
|
401
|
-
"
|
|
402
|
-
"
|
|
403
|
-
"panelTitle": "Yvqh9W_panelTitle",
|
|
404
|
-
"historyMeta": "Yvqh9W_historyMeta",
|
|
405
|
-
"canvasMeta": "Yvqh9W_canvasMeta",
|
|
406
|
-
"historyAction": "Yvqh9W_historyAction",
|
|
407
|
-
"panelHeader": "Yvqh9W_panelHeader",
|
|
408
|
-
"panelHeading": "Yvqh9W_panelHeading",
|
|
443
|
+
"card": "Yvqh9W_card",
|
|
444
|
+
"optionGrid": "Yvqh9W_optionGrid",
|
|
409
445
|
"lightbox": "Yvqh9W_lightbox",
|
|
410
|
-
"
|
|
411
|
-
"
|
|
412
|
-
"
|
|
413
|
-
"
|
|
414
|
-
"modelLabel": "Yvqh9W_modelLabel",
|
|
446
|
+
"lightboxClose": "Yvqh9W_lightboxClose",
|
|
447
|
+
"lightboxImage": "Yvqh9W_lightboxImage",
|
|
448
|
+
"lightboxMeta": "Yvqh9W_lightboxMeta",
|
|
449
|
+
"modeRow": "Yvqh9W_modeRow",
|
|
415
450
|
"canvasStateTitle": "Yvqh9W_canvasStateTitle",
|
|
416
|
-
"
|
|
417
|
-
"canvasEmptyIcon": "Yvqh9W_canvasEmptyIcon",
|
|
451
|
+
"panelHeading": "Yvqh9W_panelHeading",
|
|
418
452
|
"download": "Yvqh9W_download",
|
|
419
|
-
"connectionDot": "Yvqh9W_connectionDot",
|
|
420
|
-
"prompt": "Yvqh9W_prompt",
|
|
421
|
-
"spinner": "Yvqh9W_spinner",
|
|
422
|
-
"historyPrompt": "Yvqh9W_historyPrompt",
|
|
423
453
|
"historyTitle": "Yvqh9W_historyTitle",
|
|
424
|
-
"configScroll": "Yvqh9W_configScroll",
|
|
425
|
-
"imageCaption": "Yvqh9W_imageCaption",
|
|
426
|
-
"lightboxMeta": "Yvqh9W_lightboxMeta",
|
|
427
|
-
"canvasState": "Yvqh9W_canvasState",
|
|
428
454
|
"imageCard": "Yvqh9W_imageCard",
|
|
429
|
-
"
|
|
430
|
-
"entryIcon": "Yvqh9W_entryIcon",
|
|
431
|
-
"modePill": "Yvqh9W_modePill",
|
|
432
|
-
"referenceActions": "Yvqh9W_referenceActions",
|
|
433
|
-
"uploadHint": "Yvqh9W_uploadHint",
|
|
434
|
-
"promptCount": "Yvqh9W_promptCount",
|
|
435
|
-
"dshImageGenSpin": "Yvqh9W_dshImageGenSpin",
|
|
455
|
+
"canvasState": "Yvqh9W_canvasState",
|
|
436
456
|
"promptFooter": "Yvqh9W_promptFooter",
|
|
457
|
+
"updateBanner": "Yvqh9W_updateBanner",
|
|
458
|
+
"lightboxIndex": "Yvqh9W_lightboxIndex",
|
|
459
|
+
"historyList": "Yvqh9W_historyList",
|
|
460
|
+
"configScroll": "Yvqh9W_configScroll",
|
|
461
|
+
"canvasMeta": "Yvqh9W_canvasMeta",
|
|
462
|
+
"entryIcon": "Yvqh9W_entryIcon",
|
|
463
|
+
"canvas": "Yvqh9W_canvas",
|
|
464
|
+
"view": "Yvqh9W_view",
|
|
465
|
+
"historyPrompt": "Yvqh9W_historyPrompt",
|
|
466
|
+
"optionRow": "Yvqh9W_optionRow",
|
|
437
467
|
"modelSelect": "Yvqh9W_modelSelect",
|
|
438
|
-
"paramHint": "Yvqh9W_paramHint",
|
|
439
|
-
"canvasBody": "Yvqh9W_canvasBody",
|
|
440
468
|
"footer": "Yvqh9W_footer",
|
|
441
|
-
"
|
|
442
|
-
"
|
|
443
|
-
"modeRow": "Yvqh9W_modeRow",
|
|
469
|
+
"image": "Yvqh9W_image",
|
|
470
|
+
"imageCaption": "Yvqh9W_imageCaption",
|
|
444
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",
|
|
445
478
|
"historyItem": "Yvqh9W_historyItem",
|
|
446
|
-
"
|
|
447
|
-
"updateActions": "Yvqh9W_updateActions",
|
|
479
|
+
"modePill": "Yvqh9W_modePill",
|
|
448
480
|
"generateButton": "Yvqh9W_generateButton",
|
|
449
|
-
"
|
|
450
|
-
"
|
|
451
|
-
"
|
|
452
|
-
"
|
|
453
|
-
"
|
|
454
|
-
"optionPill": "Yvqh9W_optionPill",
|
|
455
|
-
"lightboxFigure": "Yvqh9W_lightboxFigure",
|
|
456
|
-
"updateText": "Yvqh9W_updateText",
|
|
457
|
-
"card": "Yvqh9W_card",
|
|
458
|
-
"lightboxClose": "Yvqh9W_lightboxClose",
|
|
459
|
-
"entryLabel": "Yvqh9W_entryLabel",
|
|
460
|
-
"lightboxImage": "Yvqh9W_lightboxImage",
|
|
461
|
-
"view": "Yvqh9W_view",
|
|
462
|
-
"paramLabel": "Yvqh9W_paramLabel",
|
|
463
|
-
"history": "Yvqh9W_history",
|
|
464
|
-
"updateBanner": "Yvqh9W_updateBanner",
|
|
465
|
-
"historyHeader": "Yvqh9W_historyHeader",
|
|
466
|
-
"studio": "Yvqh9W_studio",
|
|
467
|
-
"canvas": "Yvqh9W_canvas",
|
|
468
|
-
"historyActions": "Yvqh9W_historyActions",
|
|
469
|
-
"panel": "Yvqh9W_panel",
|
|
470
|
-
"grid": "Yvqh9W_grid",
|
|
471
|
-
"historyEmpty": "Yvqh9W_historyEmpty",
|
|
472
|
-
"lightboxIndex": "Yvqh9W_lightboxIndex",
|
|
481
|
+
"historyClear": "Yvqh9W_historyClear",
|
|
482
|
+
"lightboxCaptionRow": "Yvqh9W_lightboxCaptionRow",
|
|
483
|
+
"promptCount": "Yvqh9W_promptCount",
|
|
484
|
+
"modelLabel": "Yvqh9W_modelLabel",
|
|
485
|
+
"lightboxZoomLevel": "Yvqh9W_lightboxZoomLevel",
|
|
473
486
|
"lightboxDownload": "Yvqh9W_lightboxDownload",
|
|
487
|
+
"referenceActions": "Yvqh9W_referenceActions",
|
|
474
488
|
"paramGroup": "Yvqh9W_paramGroup",
|
|
475
|
-
"
|
|
476
|
-
"
|
|
489
|
+
"lightboxTool": "Yvqh9W_lightboxTool",
|
|
490
|
+
"historyEmpty": "Yvqh9W_historyEmpty",
|
|
491
|
+
"panelHeader": "Yvqh9W_panelHeader",
|
|
477
492
|
"historyInfo": "Yvqh9W_historyInfo",
|
|
478
|
-
"
|
|
479
|
-
"
|
|
480
|
-
"
|
|
493
|
+
"panelSubtitle": "Yvqh9W_panelSubtitle",
|
|
494
|
+
"lightboxTools": "Yvqh9W_lightboxTools",
|
|
495
|
+
"historyAction": "Yvqh9W_historyAction",
|
|
496
|
+
"lightboxFigure": "Yvqh9W_lightboxFigure",
|
|
497
|
+
"uploadHint": "Yvqh9W_uploadHint",
|
|
498
|
+
"entry": "Yvqh9W_entry",
|
|
499
|
+
"connectionDot": "Yvqh9W_connectionDot",
|
|
500
|
+
"studio": "Yvqh9W_studio",
|
|
501
|
+
"hiddenFile": "Yvqh9W_hiddenFile",
|
|
502
|
+
"uploadBox": "Yvqh9W_uploadBox",
|
|
503
|
+
"history": "Yvqh9W_history",
|
|
504
|
+
"connectionStatus": "Yvqh9W_connectionStatus"
|
|
481
505
|
};
|
|
482
506
|
//#endregion
|
|
483
507
|
//#region src/client/ImageGenPanel.tsx
|
|
@@ -527,6 +551,12 @@ window.__ModuleLoader__.load({
|
|
|
527
551
|
];
|
|
528
552
|
const PROMPT_MAX = 2e3;
|
|
529
553
|
const REF_IMAGE_MAX_BYTES = 10 * 1024 * 1024;
|
|
554
|
+
const PREVIEW_SCALE_MIN = .5;
|
|
555
|
+
const PREVIEW_SCALE_MAX = 3;
|
|
556
|
+
const PREVIEW_SCALE_STEP = .25;
|
|
557
|
+
function clampPreviewScale(scale) {
|
|
558
|
+
return Math.min(PREVIEW_SCALE_MAX, Math.max(PREVIEW_SCALE_MIN, scale));
|
|
559
|
+
}
|
|
530
560
|
/** Read the current config from the settings scope snapshot. */
|
|
531
561
|
function useConfig(scope) {
|
|
532
562
|
const [value, setValue] = (0, react.useState)(scope.getSnapshot().value);
|
|
@@ -610,6 +640,8 @@ window.__ModuleLoader__.load({
|
|
|
610
640
|
const [history, setHistory] = (0, react.useState)([]);
|
|
611
641
|
const [viewingHistoryId, setViewingHistoryId] = (0, react.useState)(null);
|
|
612
642
|
const [preview, setPreview] = (0, react.useState)(null);
|
|
643
|
+
const [previewScale, setPreviewScale] = (0, react.useState)(1);
|
|
644
|
+
const [promptCopied, setPromptCopied] = (0, react.useState)(false);
|
|
613
645
|
const [update, setUpdate] = (0, react.useState)(null);
|
|
614
646
|
const [updating, setUpdating] = (0, react.useState)(false);
|
|
615
647
|
const [updateMessage, setUpdateMessage] = (0, react.useState)(null);
|
|
@@ -719,9 +751,18 @@ window.__ModuleLoader__.load({
|
|
|
719
751
|
images: previewImages,
|
|
720
752
|
index
|
|
721
753
|
});
|
|
754
|
+
setPreviewScale(1);
|
|
755
|
+
setPromptCopied(false);
|
|
756
|
+
};
|
|
757
|
+
const closePreview = () => {
|
|
758
|
+
setPreview(null);
|
|
759
|
+
setPreviewScale(1);
|
|
760
|
+
setPromptCopied(false);
|
|
722
761
|
};
|
|
723
762
|
/** Step the preview by ±1, wrapping around. */
|
|
724
763
|
const stepPreview = (delta) => {
|
|
764
|
+
setPreviewScale(1);
|
|
765
|
+
setPromptCopied(false);
|
|
725
766
|
setPreview((current) => {
|
|
726
767
|
if (current === null) return null;
|
|
727
768
|
const total = current.images.length;
|
|
@@ -734,9 +775,12 @@ window.__ModuleLoader__.load({
|
|
|
734
775
|
(0, react.useEffect)(() => {
|
|
735
776
|
if (preview === null) return;
|
|
736
777
|
const onKey = (event) => {
|
|
737
|
-
if (event.key === "Escape")
|
|
778
|
+
if (event.key === "Escape") closePreview();
|
|
738
779
|
else if (event.key === "ArrowLeft") stepPreview(-1);
|
|
739
780
|
else if (event.key === "ArrowRight") stepPreview(1);
|
|
781
|
+
else if (event.key === "+" || event.key === "=") setPreviewScale((current) => clampPreviewScale(current + PREVIEW_SCALE_STEP));
|
|
782
|
+
else if (event.key === "-") setPreviewScale((current) => clampPreviewScale(current - PREVIEW_SCALE_STEP));
|
|
783
|
+
else if (event.key === "0") setPreviewScale(1);
|
|
740
784
|
};
|
|
741
785
|
window.addEventListener("keydown", onKey);
|
|
742
786
|
return () => window.removeEventListener("keydown", onKey);
|
|
@@ -789,6 +833,39 @@ window.__ModuleLoader__.load({
|
|
|
789
833
|
const generateDisabled = generating || !enabled || !configured;
|
|
790
834
|
const viewingEntry = viewingHistoryId === null ? null : history.find((entry) => entry.id === viewingHistoryId) ?? null;
|
|
791
835
|
const previewImage = preview === null ? null : preview.images[preview.index] ?? null;
|
|
836
|
+
const copyPreviewPrompt = async (text) => {
|
|
837
|
+
try {
|
|
838
|
+
if (navigator.clipboard?.writeText !== void 0) await navigator.clipboard.writeText(text);
|
|
839
|
+
else {
|
|
840
|
+
const textarea = document.createElement("textarea");
|
|
841
|
+
textarea.value = text;
|
|
842
|
+
textarea.style.position = "fixed";
|
|
843
|
+
textarea.style.opacity = "0";
|
|
844
|
+
document.body.appendChild(textarea);
|
|
845
|
+
textarea.select();
|
|
846
|
+
const copied = document.execCommand("copy");
|
|
847
|
+
textarea.remove();
|
|
848
|
+
if (!copied) throw new Error("copy failed");
|
|
849
|
+
}
|
|
850
|
+
setPromptCopied(true);
|
|
851
|
+
window.setTimeout(() => {
|
|
852
|
+
setPromptCopied(false);
|
|
853
|
+
}, 1800);
|
|
854
|
+
} catch {
|
|
855
|
+
setPromptCopied(false);
|
|
856
|
+
}
|
|
857
|
+
};
|
|
858
|
+
const addPreviewToEdit = () => {
|
|
859
|
+
if (previewImage === null || preview === null) return;
|
|
860
|
+
setMode("edit");
|
|
861
|
+
setRefImage({
|
|
862
|
+
dataUrl: srcOf(previewImage),
|
|
863
|
+
name: `dsh-image-${preview.index + 1}.${extensionOf(previewImage.mime)}`
|
|
864
|
+
});
|
|
865
|
+
if (prompt.trim() === "" && previewImage.revisedPrompt !== void 0) setPrompt(previewImage.revisedPrompt);
|
|
866
|
+
setError(null);
|
|
867
|
+
closePreview();
|
|
868
|
+
};
|
|
792
869
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
793
870
|
className: panel_module_css_default.panel,
|
|
794
871
|
children: [
|
|
@@ -1159,6 +1236,7 @@ window.__ModuleLoader__.load({
|
|
|
1159
1236
|
}) : null]
|
|
1160
1237
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1161
1238
|
className: panel_module_css_default.grid,
|
|
1239
|
+
"data-count": images.length,
|
|
1162
1240
|
children: images.map((image, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("figure", {
|
|
1163
1241
|
className: panel_module_css_default.imageCard,
|
|
1164
1242
|
role: "button",
|
|
@@ -1302,17 +1380,14 @@ window.__ModuleLoader__.load({
|
|
|
1302
1380
|
role: "dialog",
|
|
1303
1381
|
"aria-modal": "true",
|
|
1304
1382
|
"aria-label": tt("preview.title"),
|
|
1305
|
-
onClick:
|
|
1306
|
-
setPreview(null);
|
|
1307
|
-
},
|
|
1383
|
+
onClick: closePreview,
|
|
1308
1384
|
children: [
|
|
1309
1385
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
1310
1386
|
type: "button",
|
|
1311
1387
|
className: panel_module_css_default.lightboxClose,
|
|
1312
1388
|
"aria-label": tt("preview.close"),
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
},
|
|
1389
|
+
title: tt("preview.close"),
|
|
1390
|
+
onClick: closePreview,
|
|
1316
1391
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
|
|
1317
1392
|
viewBox: "0 0 16 16",
|
|
1318
1393
|
width: "18",
|
|
@@ -1374,15 +1449,128 @@ window.__ModuleLoader__.load({
|
|
|
1374
1449
|
event.stopPropagation();
|
|
1375
1450
|
},
|
|
1376
1451
|
children: [
|
|
1377
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("
|
|
1378
|
-
className: panel_module_css_default.
|
|
1379
|
-
|
|
1380
|
-
|
|
1452
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1453
|
+
className: panel_module_css_default.lightboxStage,
|
|
1454
|
+
onWheel: (event) => {
|
|
1455
|
+
event.preventDefault();
|
|
1456
|
+
setPreviewScale((current) => clampPreviewScale(current + (event.deltaY < 0 ? PREVIEW_SCALE_STEP : -.25)));
|
|
1457
|
+
},
|
|
1458
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("img", {
|
|
1459
|
+
className: panel_module_css_default.lightboxImage,
|
|
1460
|
+
style: { transform: `scale(${previewScale})` },
|
|
1461
|
+
src: srcOf(previewImage),
|
|
1462
|
+
alt: previewImage.revisedPrompt ?? tt("preview.title")
|
|
1463
|
+
})
|
|
1464
|
+
}),
|
|
1465
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1466
|
+
className: panel_module_css_default.lightboxTools,
|
|
1467
|
+
role: "group",
|
|
1468
|
+
"aria-label": tt("preview.zoomControls"),
|
|
1469
|
+
children: [
|
|
1470
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
1471
|
+
type: "button",
|
|
1472
|
+
className: panel_module_css_default.lightboxTool,
|
|
1473
|
+
"aria-label": tt("preview.zoomOut"),
|
|
1474
|
+
title: tt("preview.zoomOut"),
|
|
1475
|
+
onClick: () => {
|
|
1476
|
+
setPreviewScale((current) => clampPreviewScale(current - PREVIEW_SCALE_STEP));
|
|
1477
|
+
},
|
|
1478
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
|
|
1479
|
+
viewBox: "0 0 16 16",
|
|
1480
|
+
width: "17",
|
|
1481
|
+
height: "17",
|
|
1482
|
+
fill: "none",
|
|
1483
|
+
stroke: "currentColor",
|
|
1484
|
+
strokeWidth: "1.7",
|
|
1485
|
+
strokeLinecap: "round",
|
|
1486
|
+
"aria-hidden": "true",
|
|
1487
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
|
|
1488
|
+
cx: "7",
|
|
1489
|
+
cy: "7",
|
|
1490
|
+
r: "4.2"
|
|
1491
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M4.8 7h4.4M13 13l-2.8-2.8" })]
|
|
1492
|
+
})
|
|
1493
|
+
}),
|
|
1494
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
1495
|
+
type: "button",
|
|
1496
|
+
className: panel_module_css_default.lightboxZoomLevel,
|
|
1497
|
+
"aria-label": tt("preview.zoomReset"),
|
|
1498
|
+
title: tt("preview.zoomReset"),
|
|
1499
|
+
onClick: () => {
|
|
1500
|
+
setPreviewScale(1);
|
|
1501
|
+
},
|
|
1502
|
+
children: tt("preview.zoomLevel", { percent: Math.round(previewScale * 100) })
|
|
1503
|
+
}),
|
|
1504
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
1505
|
+
type: "button",
|
|
1506
|
+
className: panel_module_css_default.lightboxTool,
|
|
1507
|
+
"aria-label": tt("preview.zoomIn"),
|
|
1508
|
+
title: tt("preview.zoomIn"),
|
|
1509
|
+
onClick: () => {
|
|
1510
|
+
setPreviewScale((current) => clampPreviewScale(current + PREVIEW_SCALE_STEP));
|
|
1511
|
+
},
|
|
1512
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
|
|
1513
|
+
viewBox: "0 0 16 16",
|
|
1514
|
+
width: "17",
|
|
1515
|
+
height: "17",
|
|
1516
|
+
fill: "none",
|
|
1517
|
+
stroke: "currentColor",
|
|
1518
|
+
strokeWidth: "1.7",
|
|
1519
|
+
strokeLinecap: "round",
|
|
1520
|
+
"aria-hidden": "true",
|
|
1521
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
|
|
1522
|
+
cx: "7",
|
|
1523
|
+
cy: "7",
|
|
1524
|
+
r: "4.2"
|
|
1525
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M7 4.8v4.4M4.8 7h4.4M13 13l-2.8-2.8" })]
|
|
1526
|
+
})
|
|
1527
|
+
})
|
|
1528
|
+
]
|
|
1381
1529
|
}),
|
|
1382
|
-
previewImage.revisedPrompt !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.
|
|
1383
|
-
className: panel_module_css_default.
|
|
1384
|
-
|
|
1385
|
-
|
|
1530
|
+
previewImage.revisedPrompt !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1531
|
+
className: panel_module_css_default.lightboxCaptionRow,
|
|
1532
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("figcaption", {
|
|
1533
|
+
className: panel_module_css_default.lightboxCaption,
|
|
1534
|
+
title: previewImage.revisedPrompt,
|
|
1535
|
+
children: tt("revisedPrompt", { prompt: previewImage.revisedPrompt })
|
|
1536
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
1537
|
+
type: "button",
|
|
1538
|
+
className: panel_module_css_default.lightboxCopy,
|
|
1539
|
+
"aria-label": tt(promptCopied ? "preview.copied" : "preview.copyPrompt"),
|
|
1540
|
+
title: tt(promptCopied ? "preview.copied" : "preview.copyPrompt"),
|
|
1541
|
+
onClick: () => {
|
|
1542
|
+
copyPreviewPrompt(previewImage.revisedPrompt);
|
|
1543
|
+
},
|
|
1544
|
+
children: [promptCopied ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
|
|
1545
|
+
viewBox: "0 0 16 16",
|
|
1546
|
+
width: "16",
|
|
1547
|
+
height: "16",
|
|
1548
|
+
fill: "none",
|
|
1549
|
+
stroke: "currentColor",
|
|
1550
|
+
strokeWidth: "1.8",
|
|
1551
|
+
strokeLinecap: "round",
|
|
1552
|
+
strokeLinejoin: "round",
|
|
1553
|
+
"aria-hidden": "true",
|
|
1554
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M3 8l3 3 7-7" })
|
|
1555
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
|
|
1556
|
+
viewBox: "0 0 16 16",
|
|
1557
|
+
width: "16",
|
|
1558
|
+
height: "16",
|
|
1559
|
+
fill: "none",
|
|
1560
|
+
stroke: "currentColor",
|
|
1561
|
+
strokeWidth: "1.5",
|
|
1562
|
+
strokeLinecap: "round",
|
|
1563
|
+
strokeLinejoin: "round",
|
|
1564
|
+
"aria-hidden": "true",
|
|
1565
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("rect", {
|
|
1566
|
+
x: "5",
|
|
1567
|
+
y: "5",
|
|
1568
|
+
width: "7",
|
|
1569
|
+
height: "8",
|
|
1570
|
+
rx: "1"
|
|
1571
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M3 10V3.8c0-.44.36-.8.8-.8H9" })]
|
|
1572
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: tt(promptCopied ? "preview.copied" : "preview.copyPrompt") })]
|
|
1573
|
+
})]
|
|
1386
1574
|
}) : null,
|
|
1387
1575
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1388
1576
|
className: panel_module_css_default.lightboxMeta,
|
|
@@ -1392,11 +1580,19 @@ window.__ModuleLoader__.load({
|
|
|
1392
1580
|
index: preview.index + 1,
|
|
1393
1581
|
total: preview.images.length
|
|
1394
1582
|
})
|
|
1395
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.
|
|
1396
|
-
className: panel_module_css_default.
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1583
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
1584
|
+
className: panel_module_css_default.lightboxActions,
|
|
1585
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
1586
|
+
type: "button",
|
|
1587
|
+
className: panel_module_css_default.lightboxEdit,
|
|
1588
|
+
onClick: addPreviewToEdit,
|
|
1589
|
+
children: tt("preview.addToEdit")
|
|
1590
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("a", {
|
|
1591
|
+
className: panel_module_css_default.lightboxDownload,
|
|
1592
|
+
href: srcOf(previewImage),
|
|
1593
|
+
download: `dsh-image-${preview.index + 1}.${extensionOf(previewImage.mime)}`,
|
|
1594
|
+
children: tt("download")
|
|
1595
|
+
})]
|
|
1400
1596
|
})]
|
|
1401
1597
|
})
|
|
1402
1598
|
]
|
|
@@ -1879,35 +2075,35 @@ window.__ModuleLoader__.load({
|
|
|
1879
2075
|
document.head.appendChild(tag);
|
|
1880
2076
|
}
|
|
1881
2077
|
var settings_card_module_css_default = {
|
|
1882
|
-
"
|
|
1883
|
-
"versionValue": "i1cc5G_versionValue",
|
|
2078
|
+
"description": "i1cc5G_description",
|
|
1884
2079
|
"label": "i1cc5G_label",
|
|
1885
|
-
"
|
|
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",
|
|
1886
2091
|
"head": "i1cc5G_head",
|
|
2092
|
+
"invalid": "i1cc5G_invalid",
|
|
2093
|
+
"body": "i1cc5G_body",
|
|
2094
|
+
"badges": "i1cc5G_badges",
|
|
1887
2095
|
"card": "i1cc5G_card",
|
|
1888
2096
|
"pending": "i1cc5G_pending",
|
|
2097
|
+
"discard": "i1cc5G_discard",
|
|
1889
2098
|
"badge": "i1cc5G_badge",
|
|
2099
|
+
"chevronOpen": "i1cc5G_chevronOpen",
|
|
2100
|
+
"select": "i1cc5G_select",
|
|
2101
|
+
"headText": "i1cc5G_headText",
|
|
1890
2102
|
"reset": "i1cc5G_reset",
|
|
1891
|
-
"footer": "i1cc5G_footer",
|
|
1892
|
-
"badges": "i1cc5G_badges",
|
|
1893
|
-
"discard": "i1cc5G_discard",
|
|
1894
|
-
"versionLabel": "i1cc5G_versionLabel",
|
|
1895
|
-
"name": "i1cc5G_name",
|
|
1896
|
-
"versionRow": "i1cc5G_versionRow",
|
|
1897
2103
|
"inputInvalid": "i1cc5G_inputInvalid",
|
|
1898
|
-
"field": "i1cc5G_field",
|
|
1899
|
-
"description": "i1cc5G_description",
|
|
1900
2104
|
"header": "i1cc5G_header",
|
|
1901
|
-
"
|
|
1902
|
-
"hint": "i1cc5G_hint"
|
|
1903
|
-
"save": "i1cc5G_save",
|
|
1904
|
-
"headText": "i1cc5G_headText",
|
|
1905
|
-
"body": "i1cc5G_body",
|
|
1906
|
-
"notExposed": "i1cc5G_notExposed",
|
|
1907
|
-
"chevronOpen": "i1cc5G_chevronOpen",
|
|
1908
|
-
"input": "i1cc5G_input",
|
|
1909
|
-
"invalid": "i1cc5G_invalid",
|
|
1910
|
-
"failed": "i1cc5G_failed"
|
|
2105
|
+
"versionRow": "i1cc5G_versionRow",
|
|
2106
|
+
"hint": "i1cc5G_hint"
|
|
1911
2107
|
};
|
|
1912
2108
|
//#endregion
|
|
1913
2109
|
//#region src/client/SettingsCard.tsx
|