dsh-model-extension 1.3.1 → 1.3.2
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/LICENSE +21 -21
- package/README.md +2 -0
- package/cordis.patch.yml +15 -15
- package/lib/client.js +242 -93
- package/lib/client.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/package.json +2 -1
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 lovezi0
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 lovezi0
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
package/cordis.patch.yml
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
- insert:
|
|
2
|
-
- id: model-extension-row
|
|
3
|
-
name: dsh-model-extension
|
|
4
|
-
# Hide the official Models page: this plugin's Models+ page replaces it.
|
|
5
|
-
# Id-targeted override (a patch row WITHOUT `insert`) — applyEntryPatches
|
|
6
|
-
# assigns `disabled: true` onto the ui-settings-models entry created by the
|
|
7
|
-
# web-app bundle patch, so no new loader entry is created. An insert row with
|
|
8
|
-
# the same id would be a duplicate loader entry and crash the boot.
|
|
9
|
-
# Side effects (accepted): the official onboarding components living in that
|
|
10
|
-
# package disappear too; if a future DSH release renames the entry, the
|
|
11
|
-
# override no longer matches (warn + official page returns silently) and must
|
|
12
|
-
# be re-checked on adapter-anchor bumps.
|
|
13
|
-
- id: ui-settings-models
|
|
14
|
-
name: '@deepseek-ai/dsh-client-ui-settings-models'
|
|
15
|
-
disabled: true
|
|
1
|
+
- insert:
|
|
2
|
+
- id: model-extension-row
|
|
3
|
+
name: dsh-model-extension
|
|
4
|
+
# Hide the official Models page: this plugin's Models+ page replaces it.
|
|
5
|
+
# Id-targeted override (a patch row WITHOUT `insert`) — applyEntryPatches
|
|
6
|
+
# assigns `disabled: true` onto the ui-settings-models entry created by the
|
|
7
|
+
# web-app bundle patch, so no new loader entry is created. An insert row with
|
|
8
|
+
# the same id would be a duplicate loader entry and crash the boot.
|
|
9
|
+
# Side effects (accepted): the official onboarding components living in that
|
|
10
|
+
# package disappear too; if a future DSH release renames the entry, the
|
|
11
|
+
# override no longer matches (warn + official page returns silently) and must
|
|
12
|
+
# be re-checked on adapter-anchor bumps.
|
|
13
|
+
- id: ui-settings-models
|
|
14
|
+
name: '@deepseek-ai/dsh-client-ui-settings-models'
|
|
15
|
+
disabled: true
|
package/lib/client.js
CHANGED
|
@@ -3,7 +3,7 @@ window.__ModuleLoader__.load({
|
|
|
3
3
|
factory: (require) => {
|
|
4
4
|
var module = { exports: {} };
|
|
5
5
|
var exports = module.exports;
|
|
6
|
-
var __extCss = ".PkL4gq_section{max-width:720px;color:var(--dsw-alias-label-primary);flex-direction:column;gap:12px;display:flex}.PkL4gq_titleRow{align-items:center;gap:10px;display:flex}.PkL4gq_title{color:var(--dsw-alias-label-primary);margin:0;font-size:16px;font-weight:500;line-height:24px}.PkL4gq_intro{color:var(--dsw-alias-label-tertiary);margin:0;font-size:14px;line-height:22px}.PkL4gq_savedNotice{color:var(--dsw-alias-state-success-primary);margin:0;font-size:12px;line-height:18px}.PkL4gq_error{color:var(--dsw-alias-state-error-primary);margin:0;font-size:12px;line-height:18px}.PkL4gq_rows{flex-direction:column;gap:8px;margin:12px 0 0;padding:0;list-style:none;display:flex}.PkL4gq_rowCard{border:.5px solid var(--dsw-alias-border-l4);border-radius:16px;flex-direction:column;gap:12px;padding:12px 14px;display:flex}.PkL4gq_rowHead{align-items:center;gap:10px;display:flex}.PkL4gq_rowIdentity{align-items:center;gap:6px;min-width:0;display:inline-flex}.PkL4gq_rowName{color:var(--dsw-alias-label-primary);font-size:14px;font-weight:500;line-height:22px}.PkL4gq_rowTag{border:.5px solid var(--dsw-alias-border-l3);color:var(--dsw-alias-label-secondary);border-radius:4px;flex:none;padding:1px 6px;font-size:11px;line-height:16px}.PkL4gq_credentialDot{box-sizing:border-box;border-radius:50%;flex:none;width:8px;height:8px;display:inline-block}.PkL4gq_credentialDotConfigured{background:var(--dsw-alias-state-success-primary)}.PkL4gq_credentialDotMissing{background:var(--dsw-alias-state-error-primary)}.PkL4gq_rowActions{align-items:center;gap:4px;margin-left:auto;display:inline-flex}.PkL4gq_primaryButton,.PkL4gq_secondaryButton,.PkL4gq_addButton{box-sizing:border-box;height:36px;font:inherit;cursor:pointer;border:none;border-radius:18px;justify-content:center;align-items:center;gap:4px;padding:0 14px;font-size:14px;line-height:22px;display:inline-flex}.PkL4gq_primaryButton{background:var(--dsw-alias-button-primary-fill);color:var(--dsw-alias-label-primary-foreground)}.PkL4gq_primaryButton:hover:not(:disabled){background:var(--dsw-alias-button-primary-hover)}.PkL4gq_secondaryButton,.PkL4gq_addButton{border:.5px solid var(--dsw-alias-border-l3);color:var(--dsw-alias-label-primary);background:0 0}.PkL4gq_secondaryButton:hover:not(:disabled),.PkL4gq_addButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}.PkL4gq_secondaryButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover-solid)}.PkL4gq_dangerButton{box-sizing:border-box;height:36px;color:var(--dsw-alias-state-error-primary);font:inherit;cursor:pointer;background:0 0;border:none;border-radius:18px;justify-content:center;align-items:center;padding:0 14px;font-size:14px;line-height:22px;display:inline-flex}.PkL4gq_dangerButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover-danger)}.PkL4gq_rowActions .PkL4gq_secondaryButton,.PkL4gq_rowActions .PkL4gq_dangerButton{border-radius:14px;height:28px;padding:0 10px;font-size:12px;line-height:18px}.PkL4gq_primaryButton:disabled,.PkL4gq_secondaryButton:disabled,.PkL4gq_dangerButton:disabled,.PkL4gq_addButton:disabled,.PkL4gq_linkButton:disabled,.PkL4gq_addModelButton:disabled{opacity:.4;cursor:default}.PkL4gq_primaryButton:focus-visible,.PkL4gq_secondaryButton:focus-visible,.PkL4gq_dangerButton:focus-visible,.PkL4gq_addButton:focus-visible,.PkL4gq_linkButton:focus-visible,.PkL4gq_addModelButton:focus-visible,.PkL4gq_iconButton:focus-visible,.PkL4gq_customizedSummary:focus-visible{box-shadow:0 0 0 2px var(--dsw-alias-border-l3);outline:none}.PkL4gq_editor{background:var(--dsw-alias-bg-module-platform);border-radius:12px;flex-direction:column;gap:14px;padding:14px 16px;display:flex}.PkL4gq_field{flex-direction:column;gap:6px;display:flex}.PkL4gq_fieldLabel{color:var(--dsw-alias-label-secondary);align-items:center;gap:10px;font-size:12px;font-weight:500;line-height:18px;display:inline-flex}.PkL4gq_linkButton{box-sizing:border-box;height:28px;color:var(--dsw-alias-label-tertiary);font:inherit;cursor:pointer;background:0 0;border:none;border-radius:14px;align-items:center;padding:0 10px;font-size:12px;line-height:18px;display:inline-flex}.PkL4gq_linkButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-secondary)}.PkL4gq_advancedHint{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:18px}.PkL4gq_editorActions{justify-content:flex-end;gap:8px;display:flex}.PkL4gq_addBlock{flex-direction:column;gap:12px;display:flex}.PkL4gq_addActions{flex-wrap:wrap;gap:10px;display:flex}.PkL4gq_addButton{border:1px dashed var(--dsw-alias-border-l3);border-radius:16px;flex:1 1 0;gap:6px;min-width:180px;height:44px}.PkL4gq_addCard{background:var(--dsw-alias-bg-module-platform);border-radius:12px;flex-direction:column;gap:14px;padding:14px 16px;list-style:none;display:flex}.PkL4gq_addCard .PkL4gq_editor,.PkL4gq_setupCard .PkL4gq_editor{background:0 0;padding:0}.PkL4gq_tabs{flex-direction:column;gap:12px;display:flex}.PkL4gq_tabBar{border-bottom:.5px solid var(--dsw-alias-border-l2);gap:4px;display:flex}.PkL4gq_tabButton{appearance:none;font:inherit;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:none;padding:6px 12px 8px;font-size:13px;line-height:20px;position:relative}.PkL4gq_tabButton:hover{color:var(--dsw-alias-label-primary)}.PkL4gq_tabButton:disabled{opacity:.4;cursor:default}.PkL4gq_tabButtonActive{color:var(--dsw-alias-label-primary);font-weight:500}.PkL4gq_tabButtonActive:after{content:\"\";background:var(--dsw-alias-brand-primary);border-radius:2px;height:2px;position:absolute;bottom:-1px;left:10px;right:10px}.PkL4gq_tabPanel{flex-direction:column;gap:12px;display:flex}.PkL4gq_modelCatalog{flex-direction:column;gap:10px;display:flex}.PkL4gq_modelCatalogHeading{flex-direction:column;gap:2px;display:flex}.PkL4gq_modelCatalogTitle{color:var(--dsw-alias-label-secondary);font-size:12px;font-weight:500;line-height:18px}.PkL4gq_modelCatalogMeta,.PkL4gq_modelEmpty{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:18px}.PkL4gq_modelList{flex-direction:column;gap:8px;display:flex}.PkL4gq_modelListHead{justify-content:space-between;align-items:flex-start;gap:12px;display:flex}.PkL4gq_modelEntry{border:.5px solid var(--dsw-alias-border-l4);border-radius:10px;padding:6px}.PkL4gq_modelRow{grid-template-columns:minmax(0,1.4fr) minmax(0,1fr) auto auto;align-items:center;gap:6px;display:grid}.PkL4gq_iconButton{box-sizing:border-box;width:28px;height:28px;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:none;border-radius:6px;justify-content:center;align-items:center;display:inline-flex}.PkL4gq_iconButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}.PkL4gq_iconButton:disabled{cursor:default;opacity:.4}.PkL4gq_iconButtonDanger:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover-danger);color:var(--dsw-alias-state-error-primary)}.PkL4gq_modelAdvanced{grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:8px;padding:8px 4px 2px;display:grid}.PkL4gq_modelField{flex-direction:column;gap:4px;display:flex}.PkL4gq_modelFieldLabel{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:18px}.PkL4gq_modelEmpty{border:1px dashed var(--dsw-alias-border-l3);text-align:center;border-radius:8px;padding:12px}.PkL4gq_addModelButton{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l3);height:28px;color:var(--dsw-alias-label-primary);font:inherit;cursor:pointer;background:0 0;border-radius:14px;align-self:flex-start;align-items:center;gap:4px;padding:0 10px;font-size:12px;line-height:18px;display:inline-flex}.PkL4gq_addModelButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}.PkL4gq_input{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l4);width:100%;height:32px;font:inherit;background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);border-radius:8px;padding:0 10px;font-size:14px;line-height:22px}select.PkL4gq_input{cursor:pointer;max-width:240px}.PkL4gq_input:focus{border-color:var(--dsw-alias-brand-primary);outline:none}.PkL4gq_input::placeholder{color:var(--dsw-alias-label-dimmed)}.PkL4gq_input:disabled{opacity:.6;cursor:default}.PkL4gq_selectInput{appearance:none;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%2381858C' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E\");background-position:right 12px center;background-repeat:no-repeat;background-size:12px 12px;padding-right:32px}.PkL4gq_deleteDialog{width:min(480px,100%)}.PkL4gq_deleteConfirm:not(:disabled){border-color:var(--dsw-alias-state-error-primary);color:var(--dsw-alias-state-error-primary)}.PkL4gq_deleteConfirm:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover-danger)}.PkL4gq_fetchDialog{max-width:520px}.PkL4gq_candidateToolbar{align-items:center;gap:8px;margin-bottom:6px;display:flex}.PkL4gq_candidateSearch{flex:240px;min-width:0}.PkL4gq_candidateList{flex-direction:column;gap:2px;max-height:320px;margin:0;padding:0;list-style:none;display:flex;overflow-y:auto}.PkL4gq_candidate{border-radius:6px}.PkL4gq_candidateLabel{cursor:pointer;align-items:center;gap:8px;padding:6px 8px;display:flex}.PkL4gq_candidateId{overflow-wrap:anywhere;flex:auto;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:13px}.PkL4gq_candidateEmpty{color:var(--dsw-alias-label-secondary);text-align:center;margin:24px 0;font-size:13px;line-height:20px}[hidden]{display:none!important}.PkL4gq_extBlock{border:.5px solid var(--dsw-alias-border-l3);background:var(--dsw-alias-bg-layer-1);border-radius:10px;flex-direction:column;gap:10px;margin:8px 4px 2px;padding:10px;display:flex}.PkL4gq_extGroup{border-top:.5px solid var(--dsw-alias-border-l2);padding-top:12px}.PkL4gq_extGroupFirst{border-top:none;padding-top:0}.PkL4gq_extCheck{cursor:pointer;align-items:flex-start;gap:8px;display:flex}.PkL4gq_extCheckLabel{color:var(--dsw-alias-label-primary);font-size:14px;line-height:22px}.PkL4gq_extHint{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:18px}.PkL4gq_extGated{flex-direction:column;gap:12px;padding-left:2px;display:flex}.PkL4gq_extField{flex-direction:column;gap:6px;display:flex}.PkL4gq_extLabel{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:18px}.PkL4gq_extTable{border:.5px solid var(--dsw-alias-border-l4);border-radius:8px;overflow:hidden}.PkL4gq_extTHead{color:var(--dsw-alias-label-tertiary);background:var(--dsw-alias-bg-module-platform);grid-template-columns:64px minmax(0,1fr) minmax(0,1.2fr);font-size:12px;line-height:18px;display:grid}.PkL4gq_extTHead>div{padding:6px 10px}.PkL4gq_extTHead>div+div{border-left:.5px solid var(--dsw-alias-border-l2)}.PkL4gq_extTRow{border-top:.5px solid var(--dsw-alias-border-l2);grid-template-columns:64px minmax(0,1fr) minmax(0,1.2fr);align-items:center;display:grid}.PkL4gq_extTRow>div{padding:6px 10px;font-size:14px}.PkL4gq_extTRow>div+div{border-left:.5px solid var(--dsw-alias-border-l2)}.PkL4gq_extTRow input[type=text]{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l4);width:100%;height:32px;font:inherit;background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);border-radius:8px;padding:0 10px;font-size:14px}.PkL4gq_extTRow input[type=text]:disabled{opacity:.6;cursor:default}.PkL4gq_extCheckbox{accent-color:var(--dsw-alias-brand-primary);flex:none;width:15px;height:15px}.PkL4gq_switchRow{cursor:pointer;align-items:center;gap:8px;font-size:14px;line-height:22px;display:flex}.PkL4gq_extTag{background:var(--dsw-static-deepseek-100);color:var(--dsw-static-deepseek-600);border:.5px solid #4176e659;border-radius:4px;flex:none;padding:1px 6px;font-size:11px;font-weight:500;line-height:16px}.PkL4gq_modalMask{background:var(--dsw-alias-bg-mask-1);z-index:100;justify-content:center;align-items:center;padding:24px;display:flex;position:fixed;inset:0}.PkL4gq_modal{background:var(--dsw-specific-menu);border-radius:16px;width:100%;padding:20px;box-shadow:0 12px 40px #0000002e}.PkL4gq_modalTitle{color:var(--dsw-alias-label-primary);margin-bottom:8px;font-size:16px;font-weight:500;line-height:24px}.PkL4gq_modalDesc{color:var(--dsw-alias-label-secondary);margin-bottom:16px;font-size:14px;line-height:22px}.PkL4gq_modalFoot{justify-content:flex-end;gap:8px;display:flex}.PkL4gq_quickWrap{flex-direction:column;gap:6px;display:flex;position:relative}.PkL4gq_quickList{z-index:20;background:var(--dsw-specific-menu);backdrop-filter:var(--dsw-menu-backdrop-filter);--dsw-elevation-stroke-color:var(--dsw-alias-border-l1);box-shadow:var(--dsw-elevation-prominent);border:0;border-radius:8px;max-height:264px;margin-top:2px;padding:4px;position:absolute;top:100%;left:0;right:0;overflow-y:auto}.PkL4gq_quickItem{width:100%;color:var(--dsw-alias-label-primary);text-align:left;cursor:pointer;background:0 0;border:none;border-radius:6px;flex-direction:column;gap:1px;padding:6px 8px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:13px;display:flex}.PkL4gq_quickItemId{overflow-wrap:anywhere}.PkL4gq_quickItemApi{color:var(--dsw-alias-label-tertiary);letter-spacing:.2px;font-size:11px;line-height:14px}.PkL4gq_quickItem:hover{background:var(--dsw-alias-interactive-bg-hover)}.PkL4gq_quickEmpty{color:var(--dsw-alias-label-tertiary);padding:6px 8px;font-size:12px;line-height:18px}@media (prefers-reduced-motion:reduce){.PkL4gq_customizedSummary:before{transition:none}}\n";
|
|
6
|
+
var __extCss = "._5ikCMa_section{max-width:720px;color:var(--dsw-alias-label-primary);flex-direction:column;gap:12px;display:flex}._5ikCMa_titleRow{align-items:center;gap:10px;display:flex}._5ikCMa_title{color:var(--dsw-alias-label-primary);margin:0;font-size:16px;font-weight:500;line-height:24px}._5ikCMa_intro{color:var(--dsw-alias-label-tertiary);margin:0;font-size:14px;line-height:22px}._5ikCMa_savedNotice{color:var(--dsw-alias-state-success-primary);margin:0;font-size:12px;line-height:18px}._5ikCMa_error{color:var(--dsw-alias-state-error-primary);margin:0;font-size:12px;line-height:18px}._5ikCMa_rows{flex-direction:column;gap:8px;margin:12px 0 0;padding:0;list-style:none;display:flex}._5ikCMa_rowCard{border:.5px solid var(--dsw-alias-border-l4);border-radius:16px;flex-direction:column;gap:12px;padding:12px 14px;display:flex}._5ikCMa_rowHead{align-items:center;gap:10px;display:flex}._5ikCMa_rowIdentity{align-items:center;gap:6px;min-width:0;display:inline-flex}._5ikCMa_rowName{color:var(--dsw-alias-label-primary);font-size:14px;font-weight:500;line-height:22px}._5ikCMa_rowTag{border:.5px solid var(--dsw-alias-border-l3);color:var(--dsw-alias-label-secondary);border-radius:4px;flex:none;padding:1px 6px;font-size:11px;line-height:16px}._5ikCMa_credentialDot{box-sizing:border-box;border-radius:50%;flex:none;width:8px;height:8px;display:inline-block}._5ikCMa_credentialDotConfigured{background:var(--dsw-alias-state-success-primary)}._5ikCMa_credentialDotMissing{background:var(--dsw-alias-state-error-primary)}._5ikCMa_rowActions{align-items:center;gap:4px;margin-left:auto;display:inline-flex}._5ikCMa_primaryButton,._5ikCMa_secondaryButton,._5ikCMa_addButton{box-sizing:border-box;height:36px;font:inherit;cursor:pointer;border:none;border-radius:18px;justify-content:center;align-items:center;gap:4px;padding:0 14px;font-size:14px;line-height:22px;display:inline-flex}._5ikCMa_primaryButton{background:var(--dsw-alias-button-primary-fill);color:var(--dsw-alias-label-primary-foreground)}._5ikCMa_primaryButton:hover:not(:disabled){background:var(--dsw-alias-button-primary-hover)}._5ikCMa_secondaryButton,._5ikCMa_addButton{border:.5px solid var(--dsw-alias-border-l3);color:var(--dsw-alias-label-primary);background:0 0}._5ikCMa_secondaryButton:hover:not(:disabled),._5ikCMa_addButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}._5ikCMa_secondaryButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover-solid)}._5ikCMa_dangerButton{box-sizing:border-box;height:36px;color:var(--dsw-alias-state-error-primary);font:inherit;cursor:pointer;background:0 0;border:none;border-radius:18px;justify-content:center;align-items:center;padding:0 14px;font-size:14px;line-height:22px;display:inline-flex}._5ikCMa_dangerButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover-danger)}._5ikCMa_rowActions ._5ikCMa_secondaryButton,._5ikCMa_rowActions ._5ikCMa_dangerButton{border-radius:14px;height:28px;padding:0 10px;font-size:12px;line-height:18px}._5ikCMa_primaryButton:disabled,._5ikCMa_secondaryButton:disabled,._5ikCMa_dangerButton:disabled,._5ikCMa_addButton:disabled,._5ikCMa_linkButton:disabled,._5ikCMa_addModelButton:disabled{opacity:.4;cursor:default}._5ikCMa_primaryButton:focus-visible,._5ikCMa_secondaryButton:focus-visible,._5ikCMa_dangerButton:focus-visible,._5ikCMa_addButton:focus-visible,._5ikCMa_linkButton:focus-visible,._5ikCMa_addModelButton:focus-visible,._5ikCMa_iconButton:focus-visible,._5ikCMa_dragHandle:focus-visible,._5ikCMa_customizedSummary:focus-visible{box-shadow:0 0 0 2px var(--dsw-alias-border-l3);outline:none}._5ikCMa_editor{background:var(--dsw-alias-bg-module-platform);border-radius:12px;flex-direction:column;gap:14px;padding:14px 16px;display:flex}._5ikCMa_field{flex-direction:column;gap:6px;display:flex}._5ikCMa_fieldLabel{color:var(--dsw-alias-label-secondary);align-items:center;gap:10px;font-size:12px;font-weight:500;line-height:18px;display:inline-flex}._5ikCMa_linkButton{box-sizing:border-box;height:28px;color:var(--dsw-alias-label-tertiary);font:inherit;cursor:pointer;background:0 0;border:none;border-radius:14px;align-items:center;padding:0 10px;font-size:12px;line-height:18px;display:inline-flex}._5ikCMa_linkButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-secondary)}._5ikCMa_advancedHint{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:18px}._5ikCMa_editorActions{justify-content:flex-end;gap:8px;display:flex}._5ikCMa_addBlock{flex-direction:column;gap:12px;display:flex}._5ikCMa_addActions{flex-wrap:wrap;gap:10px;display:flex}._5ikCMa_addButton{border:1px dashed var(--dsw-alias-border-l3);border-radius:16px;flex:1 1 0;gap:6px;min-width:180px;height:44px}._5ikCMa_addCard{background:var(--dsw-alias-bg-module-platform);border-radius:12px;flex-direction:column;gap:14px;padding:14px 16px;list-style:none;display:flex}._5ikCMa_addCard ._5ikCMa_editor,._5ikCMa_setupCard ._5ikCMa_editor{background:0 0;padding:0}._5ikCMa_tabs{flex-direction:column;gap:12px;display:flex}._5ikCMa_tabBar{border-bottom:.5px solid var(--dsw-alias-border-l2);gap:4px;display:flex}._5ikCMa_tabButton{appearance:none;font:inherit;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:none;padding:6px 12px 8px;font-size:13px;line-height:20px;position:relative}._5ikCMa_tabButton:hover{color:var(--dsw-alias-label-primary)}._5ikCMa_tabButton:disabled{opacity:.4;cursor:default}._5ikCMa_tabButtonActive{color:var(--dsw-alias-label-primary);font-weight:500}._5ikCMa_tabButtonActive:after{content:\"\";background:var(--dsw-alias-brand-primary);border-radius:2px;height:2px;position:absolute;bottom:-1px;left:10px;right:10px}._5ikCMa_tabPanel{flex-direction:column;gap:12px;display:flex}._5ikCMa_modelCatalog{flex-direction:column;gap:10px;display:flex}._5ikCMa_modelCatalogHeading{flex-direction:column;gap:2px;display:flex}._5ikCMa_modelCatalogTitle{color:var(--dsw-alias-label-secondary);font-size:12px;font-weight:500;line-height:18px}._5ikCMa_modelCatalogMeta,._5ikCMa_modelEmpty{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:18px}._5ikCMa_modelList{flex-direction:column;gap:8px;display:flex}._5ikCMa_modelListHead{justify-content:space-between;align-items:flex-start;gap:12px;display:flex}._5ikCMa_modelEntry{border:.5px solid var(--dsw-alias-border-l4);border-radius:10px;padding:6px}._5ikCMa_modelRow{grid-template-columns:minmax(0,1.4fr) minmax(0,1fr) auto auto auto;align-items:center;gap:6px;display:grid;position:relative}._5ikCMa_modelEntryDragging{border:.5px solid var(--dsw-alias-border-l4);opacity:.5;border-radius:10px;padding:6px}._5ikCMa_dragHandle{box-sizing:border-box;width:24px;height:28px;color:var(--dsw-alias-label-tertiary);cursor:grab;touch-action:none;background:0 0;border:none;border-radius:6px;justify-content:center;align-items:center;display:inline-flex}._5ikCMa_dragHandle:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}._5ikCMa_dragHandle:active:not(:disabled){cursor:grabbing}._5ikCMa_dragHandle:disabled{cursor:default;opacity:.4}._5ikCMa_modelDropLine{background:var(--dsw-alias-brand-primary);pointer-events:none;border-radius:2px;height:2px;position:absolute;left:0;right:0}._5ikCMa_modelDropLine[data-edge=before]{top:-5px}._5ikCMa_modelDropLine[data-edge=after]{bottom:-5px}._5ikCMa_iconButton{box-sizing:border-box;width:28px;height:28px;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:none;border-radius:6px;justify-content:center;align-items:center;display:inline-flex}._5ikCMa_iconButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}._5ikCMa_iconButton:disabled{cursor:default;opacity:.4}._5ikCMa_iconButtonDanger:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover-danger);color:var(--dsw-alias-state-error-primary)}._5ikCMa_modelAdvanced{grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:8px;padding:8px 4px 2px;display:grid}._5ikCMa_modelField{flex-direction:column;gap:4px;display:flex}._5ikCMa_modelFieldLabel{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:18px}._5ikCMa_modelEmpty{border:1px dashed var(--dsw-alias-border-l3);text-align:center;border-radius:8px;padding:12px}._5ikCMa_addModelButton{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l3);height:28px;color:var(--dsw-alias-label-primary);font:inherit;cursor:pointer;background:0 0;border-radius:14px;align-self:flex-start;align-items:center;gap:4px;padding:0 10px;font-size:12px;line-height:18px;display:inline-flex}._5ikCMa_addModelButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}._5ikCMa_input{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l4);width:100%;height:32px;font:inherit;background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);border-radius:8px;padding:0 10px;font-size:14px;line-height:22px}select._5ikCMa_input{cursor:pointer;max-width:240px}._5ikCMa_input:focus{border-color:var(--dsw-alias-brand-primary);outline:none}._5ikCMa_input::placeholder{color:var(--dsw-alias-label-dimmed)}._5ikCMa_input:disabled{opacity:.6;cursor:default}._5ikCMa_selectInput{appearance:none;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%2381858C' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E\");background-position:right 12px center;background-repeat:no-repeat;background-size:12px 12px;padding-right:32px}._5ikCMa_deleteDialog{width:min(480px,100%)}._5ikCMa_deleteConfirm:not(:disabled){border-color:var(--dsw-alias-state-error-primary);color:var(--dsw-alias-state-error-primary)}._5ikCMa_deleteConfirm:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover-danger)}._5ikCMa_fetchDialog{max-width:520px}._5ikCMa_candidateToolbar{align-items:center;gap:8px;margin-bottom:6px;display:flex}._5ikCMa_candidateSearch{flex:240px;min-width:0}._5ikCMa_candidateList{flex-direction:column;gap:2px;max-height:320px;margin:0;padding:0;list-style:none;display:flex;overflow-y:auto}._5ikCMa_candidate{border-radius:6px}._5ikCMa_candidateLabel{cursor:pointer;align-items:center;gap:8px;padding:6px 8px;display:flex}._5ikCMa_candidateId{overflow-wrap:anywhere;flex:auto;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:13px}._5ikCMa_candidateEmpty{color:var(--dsw-alias-label-secondary);text-align:center;margin:24px 0;font-size:13px;line-height:20px}[hidden]{display:none!important}._5ikCMa_extBlock{border:.5px solid var(--dsw-alias-border-l3);background:var(--dsw-alias-bg-layer-1);border-radius:10px;flex-direction:column;gap:10px;margin:8px 4px 2px;padding:10px;display:flex}._5ikCMa_extGroup{border-top:.5px solid var(--dsw-alias-border-l2);padding-top:12px}._5ikCMa_extGroupFirst{border-top:none;padding-top:0}._5ikCMa_extCheck{cursor:pointer;align-items:flex-start;gap:8px;display:flex}._5ikCMa_extCheckLabel{color:var(--dsw-alias-label-primary);font-size:14px;line-height:22px}._5ikCMa_extHint{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:18px}._5ikCMa_extGated{flex-direction:column;gap:12px;padding-left:2px;display:flex}._5ikCMa_extField{flex-direction:column;gap:6px;display:flex}._5ikCMa_extLabel{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:18px}._5ikCMa_extTable{border:.5px solid var(--dsw-alias-border-l4);border-radius:8px;overflow:hidden}._5ikCMa_extTHead{color:var(--dsw-alias-label-tertiary);background:var(--dsw-alias-bg-module-platform);grid-template-columns:64px minmax(0,1fr) minmax(0,1.2fr);font-size:12px;line-height:18px;display:grid}._5ikCMa_extTHead>div{padding:6px 10px}._5ikCMa_extTHead>div+div{border-left:.5px solid var(--dsw-alias-border-l2)}._5ikCMa_extTRow{border-top:.5px solid var(--dsw-alias-border-l2);grid-template-columns:64px minmax(0,1fr) minmax(0,1.2fr);align-items:center;display:grid}._5ikCMa_extTRow>div{padding:6px 10px;font-size:14px}._5ikCMa_extTRow>div+div{border-left:.5px solid var(--dsw-alias-border-l2)}._5ikCMa_extTRow input[type=text]{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l4);width:100%;height:32px;font:inherit;background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);border-radius:8px;padding:0 10px;font-size:14px}._5ikCMa_extTRow input[type=text]:disabled{opacity:.6;cursor:default}._5ikCMa_extCheckbox{accent-color:var(--dsw-alias-brand-primary);flex:none;width:15px;height:15px}._5ikCMa_switchRow{cursor:pointer;align-items:center;gap:8px;font-size:14px;line-height:22px;display:flex}._5ikCMa_extTag{background:var(--dsw-static-deepseek-100);color:var(--dsw-static-deepseek-600);border:.5px solid #4176e659;border-radius:4px;flex:none;padding:1px 6px;font-size:11px;font-weight:500;line-height:16px}._5ikCMa_modalMask{background:var(--dsw-alias-bg-mask-1);z-index:100;justify-content:center;align-items:center;padding:24px;display:flex;position:fixed;inset:0}._5ikCMa_modal{background:var(--dsw-specific-menu);border-radius:16px;width:100%;padding:20px;box-shadow:0 12px 40px #0000002e}._5ikCMa_modalTitle{color:var(--dsw-alias-label-primary);margin-bottom:8px;font-size:16px;font-weight:500;line-height:24px}._5ikCMa_modalDesc{color:var(--dsw-alias-label-secondary);margin-bottom:16px;font-size:14px;line-height:22px}._5ikCMa_modalFoot{justify-content:flex-end;gap:8px;display:flex}._5ikCMa_quickWrap{flex-direction:column;gap:6px;display:flex;position:relative}._5ikCMa_quickList{z-index:20;background:var(--dsw-specific-menu);backdrop-filter:var(--dsw-menu-backdrop-filter);--dsw-elevation-stroke-color:var(--dsw-alias-border-l1);box-shadow:var(--dsw-elevation-prominent);border:0;border-radius:8px;max-height:264px;margin-top:2px;padding:4px;position:absolute;top:100%;left:0;right:0;overflow-y:auto}._5ikCMa_quickItem{width:100%;color:var(--dsw-alias-label-primary);text-align:left;cursor:pointer;background:0 0;border:none;border-radius:6px;flex-direction:column;gap:1px;padding:6px 8px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:13px;display:flex}._5ikCMa_quickItemId{overflow-wrap:anywhere}._5ikCMa_quickItemApi{color:var(--dsw-alias-label-tertiary);letter-spacing:.2px;font-size:11px;line-height:14px}._5ikCMa_quickItem:hover{background:var(--dsw-alias-interactive-bg-hover)}._5ikCMa_quickEmpty{color:var(--dsw-alias-label-tertiary);padding:6px 8px;font-size:12px;line-height:18px}@media (prefers-reduced-motion:reduce){._5ikCMa_customizedSummary:before{transition:none}}\n";
|
|
7
7
|
if (typeof document !== 'undefined' && document.querySelector('style[data-plugin-css="dsh-model-extension"]') === null) {
|
|
8
8
|
var __tag = document.createElement('style');
|
|
9
9
|
__tag.dataset.plugin = "dsh-model-extension";
|
|
@@ -1169,95 +1169,98 @@ if (typeof document !== 'undefined' && document.querySelector('style[data-plugin
|
|
|
1169
1169
|
//#endregion
|
|
1170
1170
|
//#region src/client/models-plus/models-plus.module.css
|
|
1171
1171
|
var models_plus_module_default = {
|
|
1172
|
-
"addActions": "
|
|
1173
|
-
"addBlock": "
|
|
1174
|
-
"addButton": "
|
|
1175
|
-
"addCard": "
|
|
1176
|
-
"addModelButton": "
|
|
1177
|
-
"advancedHint": "
|
|
1178
|
-
"candidate": "
|
|
1179
|
-
"candidateEmpty": "
|
|
1180
|
-
"candidateId": "
|
|
1181
|
-
"candidateLabel": "
|
|
1182
|
-
"candidateList": "
|
|
1183
|
-
"candidateSearch": "
|
|
1184
|
-
"candidateToolbar": "
|
|
1185
|
-
"credentialDot": "
|
|
1186
|
-
"credentialDotConfigured": "
|
|
1187
|
-
"credentialDotMissing": "
|
|
1188
|
-
"customizedSummary": "
|
|
1189
|
-
"dangerButton": "
|
|
1190
|
-
"deleteConfirm": "
|
|
1191
|
-
"deleteDialog": "
|
|
1192
|
-
"
|
|
1193
|
-
"
|
|
1194
|
-
"
|
|
1195
|
-
"
|
|
1196
|
-
"
|
|
1197
|
-
"
|
|
1198
|
-
"
|
|
1199
|
-
"
|
|
1200
|
-
"
|
|
1201
|
-
"
|
|
1202
|
-
"
|
|
1203
|
-
"
|
|
1204
|
-
"
|
|
1205
|
-
"
|
|
1206
|
-
"
|
|
1207
|
-
"
|
|
1208
|
-
"
|
|
1209
|
-
"
|
|
1210
|
-
"
|
|
1211
|
-
"
|
|
1212
|
-
"
|
|
1213
|
-
"
|
|
1214
|
-
"
|
|
1215
|
-
"
|
|
1216
|
-
"
|
|
1217
|
-
"
|
|
1218
|
-
"
|
|
1219
|
-
"
|
|
1220
|
-
"
|
|
1221
|
-
"
|
|
1222
|
-
"
|
|
1223
|
-
"
|
|
1224
|
-
"
|
|
1225
|
-
"
|
|
1226
|
-
"
|
|
1227
|
-
"
|
|
1228
|
-
"
|
|
1229
|
-
"
|
|
1230
|
-
"
|
|
1231
|
-
"
|
|
1232
|
-
"
|
|
1233
|
-
"
|
|
1234
|
-
"
|
|
1235
|
-
"
|
|
1236
|
-
"
|
|
1237
|
-
"
|
|
1238
|
-
"
|
|
1239
|
-
"
|
|
1240
|
-
"
|
|
1241
|
-
"
|
|
1242
|
-
"
|
|
1243
|
-
"
|
|
1244
|
-
"
|
|
1245
|
-
"
|
|
1246
|
-
"
|
|
1247
|
-
"
|
|
1248
|
-
"
|
|
1249
|
-
"
|
|
1250
|
-
"
|
|
1251
|
-
"
|
|
1252
|
-
"
|
|
1253
|
-
"
|
|
1254
|
-
"
|
|
1255
|
-
"
|
|
1256
|
-
"
|
|
1257
|
-
"
|
|
1258
|
-
"
|
|
1259
|
-
"
|
|
1260
|
-
"
|
|
1172
|
+
"addActions": "_5ikCMa_addActions",
|
|
1173
|
+
"addBlock": "_5ikCMa_addBlock",
|
|
1174
|
+
"addButton": "_5ikCMa_addButton",
|
|
1175
|
+
"addCard": "_5ikCMa_addCard",
|
|
1176
|
+
"addModelButton": "_5ikCMa_addModelButton",
|
|
1177
|
+
"advancedHint": "_5ikCMa_advancedHint",
|
|
1178
|
+
"candidate": "_5ikCMa_candidate",
|
|
1179
|
+
"candidateEmpty": "_5ikCMa_candidateEmpty",
|
|
1180
|
+
"candidateId": "_5ikCMa_candidateId",
|
|
1181
|
+
"candidateLabel": "_5ikCMa_candidateLabel",
|
|
1182
|
+
"candidateList": "_5ikCMa_candidateList",
|
|
1183
|
+
"candidateSearch": "_5ikCMa_candidateSearch",
|
|
1184
|
+
"candidateToolbar": "_5ikCMa_candidateToolbar",
|
|
1185
|
+
"credentialDot": "_5ikCMa_credentialDot",
|
|
1186
|
+
"credentialDotConfigured": "_5ikCMa_credentialDotConfigured",
|
|
1187
|
+
"credentialDotMissing": "_5ikCMa_credentialDotMissing",
|
|
1188
|
+
"customizedSummary": "_5ikCMa_customizedSummary",
|
|
1189
|
+
"dangerButton": "_5ikCMa_dangerButton",
|
|
1190
|
+
"deleteConfirm": "_5ikCMa_deleteConfirm",
|
|
1191
|
+
"deleteDialog": "_5ikCMa_deleteDialog",
|
|
1192
|
+
"dragHandle": "_5ikCMa_dragHandle",
|
|
1193
|
+
"editor": "_5ikCMa_editor",
|
|
1194
|
+
"editorActions": "_5ikCMa_editorActions",
|
|
1195
|
+
"error": "_5ikCMa_error",
|
|
1196
|
+
"extBlock": "_5ikCMa_extBlock",
|
|
1197
|
+
"extCheck": "_5ikCMa_extCheck",
|
|
1198
|
+
"extCheckbox": "_5ikCMa_extCheckbox",
|
|
1199
|
+
"extCheckLabel": "_5ikCMa_extCheckLabel",
|
|
1200
|
+
"extField": "_5ikCMa_extField",
|
|
1201
|
+
"extGated": "_5ikCMa_extGated",
|
|
1202
|
+
"extGroup": "_5ikCMa_extGroup",
|
|
1203
|
+
"extGroupFirst": "_5ikCMa_extGroupFirst",
|
|
1204
|
+
"extHint": "_5ikCMa_extHint",
|
|
1205
|
+
"extLabel": "_5ikCMa_extLabel",
|
|
1206
|
+
"extTable": "_5ikCMa_extTable",
|
|
1207
|
+
"extTag": "_5ikCMa_extTag",
|
|
1208
|
+
"extTHead": "_5ikCMa_extTHead",
|
|
1209
|
+
"extTRow": "_5ikCMa_extTRow",
|
|
1210
|
+
"fetchDialog": "_5ikCMa_fetchDialog",
|
|
1211
|
+
"field": "_5ikCMa_field",
|
|
1212
|
+
"fieldLabel": "_5ikCMa_fieldLabel",
|
|
1213
|
+
"iconButton": "_5ikCMa_iconButton",
|
|
1214
|
+
"iconButtonDanger": "_5ikCMa_iconButtonDanger",
|
|
1215
|
+
"input": "_5ikCMa_input",
|
|
1216
|
+
"intro": "_5ikCMa_intro",
|
|
1217
|
+
"linkButton": "_5ikCMa_linkButton",
|
|
1218
|
+
"modal": "_5ikCMa_modal",
|
|
1219
|
+
"modalDesc": "_5ikCMa_modalDesc",
|
|
1220
|
+
"modalFoot": "_5ikCMa_modalFoot",
|
|
1221
|
+
"modalMask": "_5ikCMa_modalMask",
|
|
1222
|
+
"modalTitle": "_5ikCMa_modalTitle",
|
|
1223
|
+
"modelAdvanced": "_5ikCMa_modelAdvanced",
|
|
1224
|
+
"modelCatalog": "_5ikCMa_modelCatalog",
|
|
1225
|
+
"modelCatalogHeading": "_5ikCMa_modelCatalogHeading",
|
|
1226
|
+
"modelCatalogMeta": "_5ikCMa_modelCatalogMeta",
|
|
1227
|
+
"modelCatalogTitle": "_5ikCMa_modelCatalogTitle",
|
|
1228
|
+
"modelDropLine": "_5ikCMa_modelDropLine",
|
|
1229
|
+
"modelEmpty": "_5ikCMa_modelEmpty",
|
|
1230
|
+
"modelEntry": "_5ikCMa_modelEntry",
|
|
1231
|
+
"modelEntryDragging": "_5ikCMa_modelEntryDragging",
|
|
1232
|
+
"modelField": "_5ikCMa_modelField",
|
|
1233
|
+
"modelFieldLabel": "_5ikCMa_modelFieldLabel",
|
|
1234
|
+
"modelList": "_5ikCMa_modelList",
|
|
1235
|
+
"modelListHead": "_5ikCMa_modelListHead",
|
|
1236
|
+
"modelRow": "_5ikCMa_modelRow",
|
|
1237
|
+
"primaryButton": "_5ikCMa_primaryButton",
|
|
1238
|
+
"quickEmpty": "_5ikCMa_quickEmpty",
|
|
1239
|
+
"quickItem": "_5ikCMa_quickItem",
|
|
1240
|
+
"quickItemApi": "_5ikCMa_quickItemApi",
|
|
1241
|
+
"quickItemId": "_5ikCMa_quickItemId",
|
|
1242
|
+
"quickList": "_5ikCMa_quickList",
|
|
1243
|
+
"quickWrap": "_5ikCMa_quickWrap",
|
|
1244
|
+
"rowActions": "_5ikCMa_rowActions",
|
|
1245
|
+
"rowCard": "_5ikCMa_rowCard",
|
|
1246
|
+
"rowHead": "_5ikCMa_rowHead",
|
|
1247
|
+
"rowIdentity": "_5ikCMa_rowIdentity",
|
|
1248
|
+
"rowName": "_5ikCMa_rowName",
|
|
1249
|
+
"rows": "_5ikCMa_rows",
|
|
1250
|
+
"rowTag": "_5ikCMa_rowTag",
|
|
1251
|
+
"savedNotice": "_5ikCMa_savedNotice",
|
|
1252
|
+
"secondaryButton": "_5ikCMa_secondaryButton",
|
|
1253
|
+
"section": "_5ikCMa_section",
|
|
1254
|
+
"selectInput": "_5ikCMa_selectInput",
|
|
1255
|
+
"setupCard": "_5ikCMa_setupCard",
|
|
1256
|
+
"switchRow": "_5ikCMa_switchRow",
|
|
1257
|
+
"tabBar": "_5ikCMa_tabBar",
|
|
1258
|
+
"tabButton": "_5ikCMa_tabButton",
|
|
1259
|
+
"tabButtonActive": "_5ikCMa_tabButtonActive",
|
|
1260
|
+
"tabPanel": "_5ikCMa_tabPanel",
|
|
1261
|
+
"tabs": "_5ikCMa_tabs",
|
|
1262
|
+
"title": "_5ikCMa_title",
|
|
1263
|
+
"titleRow": "_5ikCMa_titleRow"
|
|
1261
1264
|
};
|
|
1262
1265
|
//#endregion
|
|
1263
1266
|
//#region src/client/models-plus/QuickLoad.tsx
|
|
@@ -2077,6 +2080,110 @@ if (typeof document !== 'undefined' && document.querySelector('style[data-plugin
|
|
|
2077
2080
|
return next;
|
|
2078
2081
|
});
|
|
2079
2082
|
};
|
|
2083
|
+
const [dragging, setDragging] = (0, react.useState)(void 0);
|
|
2084
|
+
const [dropAt, setDropAt] = (0, react.useState)(void 0);
|
|
2085
|
+
const [epoch, setEpoch] = (0, react.useState)(0);
|
|
2086
|
+
const draggingRef = (0, react.useRef)(void 0);
|
|
2087
|
+
const dropAtRef = (0, react.useRef)(void 0);
|
|
2088
|
+
/**
|
|
2089
|
+
* Where a drop lands once the dragged row is out of the way.
|
|
2090
|
+
*
|
|
2091
|
+
* The indicator names a GAP, not a row: `after` picks the gap above or below
|
|
2092
|
+
* the row under the pointer (its own midpoint, so the indicator says what a
|
|
2093
|
+
* release would do before the release), and the gap is counted in pre-move
|
|
2094
|
+
* positions. Removing the dragged row first shifts everything after it up by
|
|
2095
|
+
* one, so a gap beyond the drag's own slot has to come back by one to stay
|
|
2096
|
+
* the same slot.
|
|
2097
|
+
* @param from - the dragged row's position.
|
|
2098
|
+
* @param row - the row under the pointer.
|
|
2099
|
+
* @param after - whether the pointer sits past that row's midpoint.
|
|
2100
|
+
* @returns the insertion index for the post-removal array.
|
|
2101
|
+
*/
|
|
2102
|
+
const dropIndex = (from, row, after) => {
|
|
2103
|
+
const gap = after ? row + 1 : row;
|
|
2104
|
+
return from < gap ? gap - 1 : gap;
|
|
2105
|
+
};
|
|
2106
|
+
/**
|
|
2107
|
+
* Carry the expanded-row set through a move: the dragged row keeps its own
|
|
2108
|
+
* panel, and every row it passed shifts one slot.
|
|
2109
|
+
* @param current - the expanded positions before the move.
|
|
2110
|
+
* @param from - the dragged row's position.
|
|
2111
|
+
* @param to - its position after the move.
|
|
2112
|
+
* @returns the same panels, addressed by their new positions.
|
|
2113
|
+
*/
|
|
2114
|
+
const moveExpanded = (current, from, to) => {
|
|
2115
|
+
const next = /* @__PURE__ */ new Set();
|
|
2116
|
+
for (const at of current) if (at === from) next.add(to);
|
|
2117
|
+
else if (from < to ? at > from && at <= to : at >= to && at < from) next.add(at + (from < to ? -1 : 1));
|
|
2118
|
+
else next.add(at);
|
|
2119
|
+
return next;
|
|
2120
|
+
};
|
|
2121
|
+
/**
|
|
2122
|
+
* Put one row at another position in the draft.
|
|
2123
|
+
* @param from - the row's current position.
|
|
2124
|
+
* @param to - the position it should end up at.
|
|
2125
|
+
*/
|
|
2126
|
+
const moveRow = (from, to) => {
|
|
2127
|
+
if (from === to || from < 0 || to < 0 || from >= models.length || to >= models.length) return;
|
|
2128
|
+
const next = [...models];
|
|
2129
|
+
const [moved] = next.splice(from, 1);
|
|
2130
|
+
if (moved === void 0) return;
|
|
2131
|
+
next.splice(to, 0, moved);
|
|
2132
|
+
onChange(next);
|
|
2133
|
+
setExpanded((current) => moveExpanded(current, from, to));
|
|
2134
|
+
setEpoch((value) => value + 1);
|
|
2135
|
+
};
|
|
2136
|
+
/** @param index - the row the pointer took hold of. */
|
|
2137
|
+
const beginDrag = (index) => {
|
|
2138
|
+
draggingRef.current = index;
|
|
2139
|
+
dropAtRef.current = void 0;
|
|
2140
|
+
setDragging(index);
|
|
2141
|
+
setDropAt(void 0);
|
|
2142
|
+
};
|
|
2143
|
+
/**
|
|
2144
|
+
* Follow the pointer: keep the drop gap live so a release is predictable.
|
|
2145
|
+
* @param event - the dragover on a row.
|
|
2146
|
+
* @param index - that row's position.
|
|
2147
|
+
*/
|
|
2148
|
+
const trackDrag = (event, index) => {
|
|
2149
|
+
if (draggingRef.current === void 0) return;
|
|
2150
|
+
event.preventDefault();
|
|
2151
|
+
if (event.dataTransfer !== null) event.dataTransfer.dropEffect = "move";
|
|
2152
|
+
const box = event.currentTarget.getBoundingClientRect();
|
|
2153
|
+
const at = {
|
|
2154
|
+
row: index,
|
|
2155
|
+
after: event.clientY > box.top + box.height / 2
|
|
2156
|
+
};
|
|
2157
|
+
const current = dropAtRef.current;
|
|
2158
|
+
if (current !== void 0 && current.row === at.row && current.after === at.after) return;
|
|
2159
|
+
dropAtRef.current = at;
|
|
2160
|
+
setDropAt(at);
|
|
2161
|
+
};
|
|
2162
|
+
/** Commit the drop, or abandon it when the drag never named a gap. */
|
|
2163
|
+
const endDrag = () => {
|
|
2164
|
+
const from = draggingRef.current;
|
|
2165
|
+
const at = dropAtRef.current;
|
|
2166
|
+
draggingRef.current = void 0;
|
|
2167
|
+
dropAtRef.current = void 0;
|
|
2168
|
+
setDragging(void 0);
|
|
2169
|
+
setDropAt(void 0);
|
|
2170
|
+
if (from === void 0 || at === void 0) return;
|
|
2171
|
+
moveRow(from, dropIndex(from, at.row, at.after));
|
|
2172
|
+
};
|
|
2173
|
+
/**
|
|
2174
|
+
* Reorder from the keyboard.
|
|
2175
|
+
*
|
|
2176
|
+
* The handle is a button, so the move has to be reachable without a pointer.
|
|
2177
|
+
* Alt + Arrow is the conventional "move this thing" chord, and it leaves the
|
|
2178
|
+
* bare arrow keys to their normal page duty.
|
|
2179
|
+
* @param event - the key event on the handle.
|
|
2180
|
+
* @param index - this row's position.
|
|
2181
|
+
*/
|
|
2182
|
+
const handleHandleKey = (event, index) => {
|
|
2183
|
+
if (!event.altKey || event.key !== "ArrowUp" && event.key !== "ArrowDown") return;
|
|
2184
|
+
event.preventDefault();
|
|
2185
|
+
moveRow(index, index + (event.key === "ArrowUp" ? -1 : 1));
|
|
2186
|
+
};
|
|
2080
2187
|
const fetchModels = async () => {
|
|
2081
2188
|
setBusy(true);
|
|
2082
2189
|
setFailure(void 0);
|
|
@@ -2176,9 +2283,16 @@ if (typeof document !== 'undefined' && document.querySelector('style[data-plugin
|
|
|
2176
2283
|
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2177
2284
|
className: models_plus_module_default["modelList"],
|
|
2178
2285
|
children: models.map((model, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2179
|
-
className: models_plus_module_default["modelEntry"],
|
|
2286
|
+
className: dragging === index ? `${models_plus_module_default["modelEntry"]} ${models_plus_module_default["modelEntryDragging"]}` : models_plus_module_default["modelEntry"],
|
|
2180
2287
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2181
2288
|
className: models_plus_module_default["modelRow"],
|
|
2289
|
+
onDragOver: (event) => {
|
|
2290
|
+
trackDrag(event, index);
|
|
2291
|
+
},
|
|
2292
|
+
onDrop: (event) => {
|
|
2293
|
+
event.preventDefault();
|
|
2294
|
+
endDrag();
|
|
2295
|
+
},
|
|
2182
2296
|
children: [
|
|
2183
2297
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
2184
2298
|
className: models_plus_module_default["input"],
|
|
@@ -2253,7 +2367,42 @@ if (typeof document !== 'undefined' && document.querySelector('style[data-plugin
|
|
|
2253
2367
|
strokeLinejoin: "round"
|
|
2254
2368
|
})
|
|
2255
2369
|
})
|
|
2256
|
-
})
|
|
2370
|
+
}),
|
|
2371
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
2372
|
+
type: "button",
|
|
2373
|
+
className: models_plus_module_default["dragHandle"],
|
|
2374
|
+
"aria-label": `拖动以调整模型顺序 ${String(index + 1)}`,
|
|
2375
|
+
title: "拖动以调整顺序(也可用 Alt + ↑/↓)",
|
|
2376
|
+
disabled: disabled || models.length < 2,
|
|
2377
|
+
draggable: disabled !== true,
|
|
2378
|
+
onDragStart: (event) => {
|
|
2379
|
+
event.dataTransfer.effectAllowed = "move";
|
|
2380
|
+
event.dataTransfer.setData("text/plain", textOf(model, "id"));
|
|
2381
|
+
beginDrag(index);
|
|
2382
|
+
},
|
|
2383
|
+
onDragEnd: endDrag,
|
|
2384
|
+
onKeyDown: (event) => {
|
|
2385
|
+
handleHandleKey(event, index);
|
|
2386
|
+
},
|
|
2387
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
|
|
2388
|
+
width: "14",
|
|
2389
|
+
height: "14",
|
|
2390
|
+
viewBox: "0 0 16 16",
|
|
2391
|
+
fill: "none",
|
|
2392
|
+
"aria-hidden": "true",
|
|
2393
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
2394
|
+
d: "M5.5 4h.01M5.5 8h.01M5.5 12h.01M10.5 4h.01M10.5 8h.01M10.5 12h.01",
|
|
2395
|
+
stroke: "currentColor",
|
|
2396
|
+
strokeWidth: "1.6",
|
|
2397
|
+
strokeLinecap: "round"
|
|
2398
|
+
})
|
|
2399
|
+
})
|
|
2400
|
+
}),
|
|
2401
|
+
dropAt !== void 0 && dropAt.row === index ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2402
|
+
className: models_plus_module_default["modelDropLine"],
|
|
2403
|
+
"data-edge": dropAt.after ? "after" : "before",
|
|
2404
|
+
"aria-hidden": "true"
|
|
2405
|
+
}) : null
|
|
2257
2406
|
]
|
|
2258
2407
|
}), expanded.has(index) ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ModelEntryPanel, {
|
|
2259
2408
|
model,
|
|
@@ -2263,7 +2412,7 @@ if (typeof document !== 'undefined' && document.querySelector('style[data-plugin
|
|
|
2263
2412
|
onChange(models.map((row, at) => at === index ? next : row));
|
|
2264
2413
|
}
|
|
2265
2414
|
}) : null]
|
|
2266
|
-
}, String(index)))
|
|
2415
|
+
}, epoch + ":" + String(index)))
|
|
2267
2416
|
}),
|
|
2268
2417
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
2269
2418
|
type: "button",
|