@linxin666/dsh-liangshen 0.4.10 → 0.4.12

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/lib/client.js CHANGED
@@ -639,7 +639,7 @@ window.__ModuleLoader__.load({
639
639
  }
640
640
  //#endregion
641
641
  //#region \0dsh-css:packages/dsh-liangshen/src/client/settings-card.module.css.mjs
642
- const css = "._9t79wq_card{--settings-card-radius:12px;--settings-card-header-pad:16px;--settings-card-header-gap:13px;--settings-card-title-size:15px;--settings-card-description-size:13px;--settings-card-body-inset:16px;--settings-card-motion:.18s;border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-3);border-radius:var(--settings-card-radius);list-style:none;transition:border-color .16s,background .16s}._9t79wq_card:hover{border-color:var(--dsw-alias-label-dimmed)}._9t79wq_cardOpen{background:var(--dsw-alias-bg-layer-2);border-color:var(--dsw-alias-label-dimmed)}._9t79wq_cardNested{--settings-card-radius:10px;--settings-card-header-pad:10px 12px;--settings-card-header-gap:10px;--settings-card-title-size:13px;--settings-card-description-size:12px;--settings-card-body-inset:12px}._9t79wq_cardNested ._9t79wq_description{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}._9t79wq_header{appearance:none;box-sizing:border-box;width:100%;font:inherit;color:inherit;text-align:left;cursor:pointer;border-radius:var(--settings-card-radius);align-items:center;gap:var(--settings-card-header-gap);padding:var(--settings-card-header-pad);background:0 0;border:0;display:flex}._9t79wq_header:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:-2px}._9t79wq_headerStatic{box-sizing:border-box;border-radius:var(--settings-card-radius);align-items:center;gap:var(--settings-card-header-gap);width:100%;padding:var(--settings-card-header-pad);display:flex}._9t79wq_headText{flex-direction:column;flex:1;gap:4px;min-width:0;display:flex}._9t79wq_mark{background:var(--dsw-alias-bg-module-platform);width:34px;height:34px;color:var(--dsw-alias-label-secondary);border-radius:10px;flex:none;place-items:center;transition:color .16s;display:grid}._9t79wq_header:hover ._9t79wq_mark,._9t79wq_cardOpen ._9t79wq_mark{color:var(--dsw-alias-label-primary)}._9t79wq_name{color:var(--dsw-alias-label-primary);font-size:var(--settings-card-title-size);font-weight:600;line-height:1.4}._9t79wq_description{color:var(--dsw-alias-label-secondary);font-size:var(--settings-card-description-size);line-height:1.5}._9t79wq_pending{white-space:nowrap;background:var(--dsw-alias-bg-module-platform);color:var(--dsw-alias-label-secondary);border-radius:999px;flex:none;padding:1px 8px;font-size:11px;font-weight:500;line-height:17px}._9t79wq_headerAction{flex:none;align-items:center;display:inline-flex}._9t79wq_chevron{color:var(--dsw-alias-label-tertiary);flex:none;width:16px;height:16px;transition:transform .16s,color .16s}._9t79wq_header:hover ._9t79wq_chevron{color:var(--dsw-alias-label-secondary)}._9t79wq_chevronOpen{transform:rotate(180deg)}._9t79wq_disclosure{opacity:0;transition:grid-template-rows var(--settings-card-motion) ease, opacity var(--settings-card-motion) ease;grid-template-rows:0fr;display:grid}._9t79wq_disclosure[data-state=collapsed],._9t79wq_disclosure[data-state=entering],._9t79wq_disclosure[data-state=closing]{overflow:hidden}._9t79wq_disclosure[data-state=entering],._9t79wq_disclosure[data-state=shown]{opacity:1;grid-template-rows:1fr}._9t79wq_disclosure>._9t79wq_body{min-height:0}._9t79wq_body{border-top:1px solid var(--dsw-alias-border-l2);margin:0 var(--settings-card-body-inset);padding-bottom:8px}._9t79wq_readOnly{color:var(--dsw-alias-label-secondary);margin:12px 0 0;font-size:12px;line-height:1.5}._9t79wq_notExposed{color:var(--dsw-alias-state-warn-primary);margin:12px 0 0;font-size:12px;line-height:1.5}._9t79wq_footer{border-top:1px solid var(--dsw-alias-border-l2);justify-content:flex-end;align-items:center;gap:8px;padding:12px 0 4px;display:flex}._9t79wq_failed{min-width:0;color:var(--dsw-alias-state-error-primary,#b42318);text-overflow:ellipsis;white-space:nowrap;flex:1;margin:0;font-size:12px;line-height:1.5;overflow:hidden}._9t79wq_discard,._9t79wq_save{appearance:none;font:inherit;cursor:pointer;border:1px solid #0000;border-radius:8px;padding:5px 14px;font-size:13px;line-height:1.5}._9t79wq_discard{border-color:var(--dsw-alias-border-l2);color:var(--dsw-alias-label-secondary);background:0 0}._9t79wq_discard:hover:not(:disabled){color:var(--dsw-alias-label-primary);border-color:var(--dsw-alias-label-dimmed)}._9t79wq_save{background:var(--dsw-alias-label-primary);color:var(--dsw-alias-bg-layer-3)}._9t79wq_discard:disabled,._9t79wq_save:disabled{opacity:.4;cursor:default}._9t79wq_discard:focus-visible,._9t79wq_save:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}._9t79wq_field{flex-direction:column;gap:6px;padding:12px 0;display:flex}._9t79wq_field+._9t79wq_field{border-top:1px solid var(--dsw-alias-border-l2)}._9t79wq_head{align-items:center;gap:8px;display:flex}._9t79wq_label{min-width:0;color:var(--dsw-alias-label-primary);flex:1;font-size:13px;font-weight:500;line-height:1.5}._9t79wq_badges{align-items:center;gap:8px;display:inline-flex}._9t79wq_badge{white-space:nowrap;background:var(--dsw-alias-bg-module-platform);color:var(--dsw-alias-label-secondary);border-radius:999px;padding:1px 8px;font-size:11px;font-weight:500;line-height:17px}._9t79wq_reset{font:inherit;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;padding:0;font-size:12px;line-height:1.5}._9t79wq_reset:hover:not(:disabled){color:var(--dsw-alias-label-primary)}._9t79wq_reset:disabled{cursor:default}._9t79wq_reset:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:2px;outline:2px solid var(--dsw-alias-brand-primary);outline-offset:2px}._9t79wq_input,._9t79wq_select{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-3);height:34px;font:inherit;color:var(--dsw-alias-label-primary);border-radius:8px;padding:0 12px;font-size:13px;line-height:1.5}._9t79wq_input:focus-visible,._9t79wq_select:focus-visible{border-color:var(--dsw-alias-brand-primary);outline:none}._9t79wq_input:disabled,._9t79wq_select:disabled{color:var(--dsw-alias-label-tertiary);cursor:default}._9t79wq_inputInvalid{border:1px solid var(--dsw-alias-state-error-primary,#b42318);background:var(--dsw-alias-bg-layer-3);height:34px;font:inherit;color:var(--dsw-alias-label-primary);border-radius:8px;padding:0 12px;font-size:13px;line-height:1.5}._9t79wq_inputInvalid:focus-visible{outline:2px solid var(--dsw-alias-state-error-primary,#b42318);outline-offset:1px;border-color:var(--dsw-alias-state-error-primary,#b42318)}._9t79wq_selectWrap{position:relative}._9t79wq_selectButton{appearance:none;text-align:left;cursor:pointer;justify-content:space-between;align-items:center;gap:8px;width:100%;display:flex}._9t79wq_selectLabel{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}._9t79wq_selectChevron{color:var(--dsw-alias-label-tertiary);flex:none;transition:transform .16s}._9t79wq_selectChevronOpen{transform:rotate(180deg)}._9t79wq_selectPopup{z-index:40;border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-3);max-height:240px;box-shadow:0 8px 24px var(--dsw-alias-bg-mask-2);opacity:0;border-radius:8px;flex-direction:column;padding:4px;transition:opacity .1s,transform .1s;display:flex;position:absolute;top:calc(100% + 4px);left:0;right:0;overflow-y:auto;transform:translateY(-4px)}._9t79wq_selectPopupOpen{opacity:1;transform:none}._9t79wq_selectPopupClose{opacity:0;pointer-events:none;transform:translateY(-4px)}._9t79wq_selectOption{color:var(--dsw-alias-label-primary);cursor:pointer;white-space:nowrap;text-overflow:ellipsis;border-radius:6px;flex-shrink:0;padding:6px 10px;font-size:13px;line-height:1.5;overflow:hidden}._9t79wq_selectOption:hover,._9t79wq_selectOptionActive{background:var(--dsw-alias-interactive-bg-hover)}._9t79wq_selectOptionSelected{color:var(--dsw-alias-brand-primary);background:color-mix(in srgb, var(--dsw-alias-brand-primary-new-colorprimary-new-color) 10%, transparent);font-weight:500}._9t79wq_invalid{color:var(--dsw-alias-state-error-primary,#b42318);margin:0;font-size:12px;line-height:1.5}._9t79wq_hint{color:var(--dsw-alias-label-secondary);margin:0;font-size:12px;line-height:1.5}._9t79wq_toggle{appearance:none;cursor:pointer;font:inherit;background:0 0;border:0;border-radius:999px;align-items:center;margin:0;padding:0;display:inline-flex}._9t79wq_toggleTrack{background:var(--dsw-alias-label-dimmed);border-radius:999px;flex:none;width:30px;height:16px;transition:background .18s;position:relative}._9t79wq_toggleThumb{background:var(--dsw-alias-bg-layer-3);border-radius:50%;width:12px;height:12px;transition:left .18s;position:absolute;top:2px;left:2px}._9t79wq_toggle[aria-checked=true] ._9t79wq_toggleTrack{background:var(--dsw-alias-button-primary-fill,var(--dsw-alias-label-primary))}._9t79wq_toggle[aria-checked=true] ._9t79wq_toggleThumb{background:var(--dsw-alias-label-primary-foreground,var(--dsw-alias-bg-layer-3));left:16px}._9t79wq_toggle:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:2px}._9t79wq_toggle:disabled{opacity:.45;cursor:default}@media (prefers-reduced-motion:reduce){._9t79wq_card,._9t79wq_header,._9t79wq_mark,._9t79wq_chevron,._9t79wq_chevronOpen,._9t79wq_discard,._9t79wq_save,._9t79wq_selectChevron,._9t79wq_selectChevronOpen,._9t79wq_selectPopup,._9t79wq_toggleTrack,._9t79wq_toggleThumb{transition:none}._9t79wq_disclosure{transition-property:opacity}}";
642
+ const css = "._9t79wq_card{--settings-card-radius:12px;--settings-card-header-pad:16px;--settings-card-header-gap:13px;--settings-card-title-size:15px;--settings-card-description-size:13px;--settings-card-body-inset:16px;--settings-card-motion:.18s;border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-3);border-radius:var(--settings-card-radius);list-style:none;transition:border-color .16s,background .16s}._9t79wq_card:hover{border-color:var(--dsw-alias-label-dimmed)}._9t79wq_cardOpen{background:var(--dsw-alias-bg-layer-2);border-color:var(--dsw-alias-label-dimmed)}._9t79wq_cardNested{--settings-card-radius:10px;--settings-card-header-pad:10px 12px;--settings-card-header-gap:10px;--settings-card-title-size:13px;--settings-card-description-size:12px;--settings-card-body-inset:12px}._9t79wq_cardNested ._9t79wq_description{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}._9t79wq_header{appearance:none;box-sizing:border-box;width:100%;font:inherit;color:inherit;text-align:left;cursor:pointer;border-radius:var(--settings-card-radius);align-items:center;gap:var(--settings-card-header-gap);padding:var(--settings-card-header-pad);background:0 0;border:0;display:flex}._9t79wq_header:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:-2px}._9t79wq_headerStatic{box-sizing:border-box;border-radius:var(--settings-card-radius);align-items:center;gap:var(--settings-card-header-gap);width:100%;padding:var(--settings-card-header-pad);display:flex}._9t79wq_headText{flex-direction:column;flex:1;gap:4px;min-width:0;display:flex}._9t79wq_mark{background:var(--dsw-alias-bg-module-platform);width:34px;height:34px;color:var(--dsw-alias-label-secondary);border-radius:10px;flex:none;place-items:center;transition:color .16s;display:grid}._9t79wq_header:hover ._9t79wq_mark,._9t79wq_cardOpen ._9t79wq_mark{color:var(--dsw-alias-label-primary)}._9t79wq_name{color:var(--dsw-alias-label-primary);font-size:var(--settings-card-title-size);font-weight:600;line-height:1.4}._9t79wq_description{color:var(--dsw-alias-label-secondary);font-size:12px;line-height:18px}._9t79wq_headerAction{flex:none;align-items:center;display:inline-flex}._9t79wq_chevron{color:var(--dsw-alias-label-tertiary);flex:none;width:16px;height:16px;transition:transform .16s,color .16s}._9t79wq_header:hover ._9t79wq_chevron{color:var(--dsw-alias-label-secondary)}._9t79wq_chevronOpen{transform:rotate(180deg)}._9t79wq_disclosure{opacity:0;transition:grid-template-rows var(--settings-card-motion) ease, opacity var(--settings-card-motion) ease;grid-template-rows:0fr;display:grid}._9t79wq_disclosure[data-state=collapsed],._9t79wq_disclosure[data-state=entering],._9t79wq_disclosure[data-state=closing]{overflow:hidden}._9t79wq_disclosure[data-state=entering],._9t79wq_disclosure[data-state=shown]{opacity:1;grid-template-rows:1fr}._9t79wq_disclosure>._9t79wq_body{min-height:0}._9t79wq_body{border-top:1px solid var(--dsw-alias-border-l2);margin:0 var(--settings-card-body-inset);padding-bottom:8px;container:_9t79wq_settings-card/inline-size}._9t79wq_readOnly{color:var(--dsw-alias-label-secondary);margin:12px 0 0;font-size:12px;line-height:1.5}._9t79wq_notExposed{color:var(--dsw-alias-state-warn-primary);margin:12px 0 0;font-size:12px;line-height:1.5}._9t79wq_failed{color:var(--dsw-alias-state-error-primary,#b42318);overflow-wrap:anywhere;margin:8px 0 4px;font-size:12px;line-height:18px}._9t79wq_field{grid-template-columns:minmax(0,1fr) fit-content(50%);grid-template-areas:\"_9t79wq_head _9t79wq_control\"\"_9t79wq_hint _9t79wq_control\";align-items:center;gap:4px 24px;padding:16px 0;display:grid}._9t79wq_field>._9t79wq_head{grid-area:_9t79wq_head}._9t79wq_field>:is(._9t79wq_hint,._9t79wq_invalid){grid-area:_9t79wq_hint}._9t79wq_field>:not(._9t79wq_head,._9t79wq_hint,._9t79wq_invalid){grid-area:_9t79wq_control;justify-self:end;max-width:100%}._9t79wq_field+._9t79wq_field{border-top:1px solid var(--dsw-alias-border-l2)}._9t79wq_head{align-items:center;gap:8px;display:flex}._9t79wq_label{min-width:0;color:var(--dsw-alias-label-primary);flex:1;font-size:14px;font-weight:400;line-height:22px}._9t79wq_badges{align-items:center;gap:8px;display:inline-flex}._9t79wq_badge{white-space:nowrap;background:var(--dsw-alias-bg-module-platform);color:var(--dsw-alias-label-secondary);border-radius:999px;padding:1px 8px;font-size:11px;font-weight:500;line-height:17px}._9t79wq_reset{font:inherit;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;padding:0;font-size:12px;line-height:1.5}._9t79wq_reset:hover:not(:disabled){color:var(--dsw-alias-label-primary)}._9t79wq_reset:disabled{cursor:default}._9t79wq_reset:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:2px}._9t79wq_segmentGroup{background:color-mix(in srgb, var(--dsw-alias-label-primary) 7%, transparent);box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--dsw-alias-label-primary) 5%, transparent);border-radius:8px;flex-wrap:wrap;align-items:center;gap:2px;padding:2px;display:inline-flex;position:relative}._9t79wq_segment{appearance:none;color:var(--dsw-alias-label-secondary);font:inherit;white-space:nowrap;cursor:pointer;background:0 0;border:0;border-radius:7px;margin:0;padding:3px 12px;font-size:13px;font-weight:500;line-height:18px;transition:background-color .12s,color .12s}._9t79wq_segment:hover:not(:disabled):not([data-active]){color:var(--dsw-alias-label-primary)}._9t79wq_segmentGroup:not([data-pill])>._9t79wq_segment[data-active],._9t79wq_segmentGroup[data-pill]:before{background:var(--dsw-alias-bg-overlay,var(--dsw-alias-bg-layer-3));box-shadow:0 1px 2px #14141314}body[data-ds-dark-theme] ._9t79wq_segmentGroup:not([data-pill])>._9t79wq_segment[data-active],body[data-ds-dark-theme] ._9t79wq_segmentGroup[data-pill]:before{box-shadow:none;background:#ffffff24}._9t79wq_segment[data-active]{color:var(--dsw-alias-label-primary)}._9t79wq_segmentGroup[data-pill]:before{content:\"\";width:var(--segment-pill-w,0px);height:var(--segment-pill-h,0px);transform:translate(var(--segment-pill-x,0px), var(--segment-pill-y,0px));pointer-events:none;border-radius:7px;transition:transform .24s cubic-bezier(.22,.61,.36,1),width .24s cubic-bezier(.22,.61,.36,1),height .24s cubic-bezier(.22,.61,.36,1);position:absolute;top:0;left:0}._9t79wq_segmentGroup>*{z-index:1;position:relative}._9t79wq_segment:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}._9t79wq_segment:disabled{cursor:not-allowed;opacity:.45}._9t79wq_segmentGroup[data-pill]:has(>._9t79wq_segment:disabled):before{opacity:.45}._9t79wq_input,._9t79wq_select{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-3);height:34px;font:inherit;color:var(--dsw-alias-label-primary);border-radius:8px;padding:0 12px;font-size:13px;line-height:1.5}._9t79wq_input:focus-visible,._9t79wq_select:focus-visible{border-color:var(--dsw-alias-brand-primary);outline:none}._9t79wq_input:disabled,._9t79wq_select:disabled{color:var(--dsw-alias-label-tertiary);cursor:default}._9t79wq_inputInvalid{border:1px solid var(--dsw-alias-state-error-primary,#b42318);background:var(--dsw-alias-bg-layer-3);height:34px;font:inherit;color:var(--dsw-alias-label-primary);border-radius:8px;padding:0 12px;font-size:13px;line-height:1.5}._9t79wq_inputInvalid:focus-visible{outline:2px solid var(--dsw-alias-state-error-primary,#b42318);outline-offset:1px;border-color:var(--dsw-alias-state-error-primary,#b42318)}._9t79wq_field>:is(._9t79wq_input,._9t79wq_inputInvalid,._9t79wq_select,._9t79wq_selectWrap,._9t79wq_rangeAnchor){box-sizing:border-box;width:220px}._9t79wq_rangeAnchor>:is(._9t79wq_input,._9t79wq_inputInvalid){box-sizing:border-box;width:100%}@container _9t79wq_settings-card (width<=440px){._9t79wq_field{grid-template-columns:minmax(0,1fr);grid-template-areas:\"_9t79wq_head\"\"_9t79wq_hint\"\"_9t79wq_control\";row-gap:8px}._9t79wq_field>:not(._9t79wq_head,._9t79wq_hint,._9t79wq_invalid){justify-self:start}._9t79wq_field>:is(._9t79wq_input,._9t79wq_inputInvalid,._9t79wq_select,._9t79wq_selectWrap,._9t79wq_rangeAnchor){justify-self:stretch;width:auto}}._9t79wq_selectWrap{position:relative}._9t79wq_selectButton{appearance:none;text-align:left;cursor:pointer;justify-content:space-between;align-items:center;gap:8px;width:100%;display:flex}._9t79wq_selectLabel{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}._9t79wq_selectChevron{color:var(--dsw-alias-label-tertiary);flex:none;transition:transform .16s}._9t79wq_selectChevronOpen{transform:rotate(180deg)}._9t79wq_selectPopup{z-index:40;border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-3);max-height:240px;box-shadow:0 8px 24px var(--dsw-alias-bg-mask-2);opacity:0;border-radius:8px;flex-direction:column;padding:4px;transition:opacity .1s,transform .1s;display:flex;position:absolute;top:calc(100% + 4px);left:0;right:0;overflow-y:auto;transform:translateY(-4px)}._9t79wq_selectPopupOpen{opacity:1;transform:none}._9t79wq_selectPopupClose{opacity:0;pointer-events:none;transform:translateY(-4px)}._9t79wq_rangeAnchor{display:inline-flex;position:relative}._9t79wq_rangeBubble{z-index:40;box-sizing:border-box;border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-3);width:220px;box-shadow:0 8px 24px var(--dsw-alias-bg-mask-2);opacity:0;visibility:hidden;border-radius:10px;padding:10px 12px 6px;transition:opacity .12s,transform .12s,visibility 0s linear .12s;position:absolute;right:0}._9t79wq_rangeBubble[data-side=above]{bottom:calc(100% + 6px);transform:translateY(4px)}._9t79wq_rangeBubble[data-side=below]{top:calc(100% + 6px);transform:translateY(-4px)}._9t79wq_rangeBubble[data-open]{opacity:1;visibility:visible;transition:opacity .12s,transform .12s,visibility;transform:none}._9t79wq_rangeSlider{appearance:none;cursor:pointer;background:0 0;width:100%;height:18px;margin:0;display:block}._9t79wq_rangeSlider::-webkit-slider-runnable-track{background:linear-gradient(to right, var(--dsw-alias-brand-primary) var(--range-fill,0%), color-mix(in srgb, var(--dsw-alias-label-primary) 12%, transparent) var(--range-fill,0%));border-radius:999px;height:4px}._9t79wq_rangeSlider::-moz-range-track{background:color-mix(in srgb, var(--dsw-alias-label-primary) 12%, transparent);border-radius:999px;height:4px}._9t79wq_rangeSlider::-moz-range-progress{background:var(--dsw-alias-brand-primary);border-radius:999px;height:4px}._9t79wq_rangeSlider::-webkit-slider-thumb{appearance:none;background:#fff;border:0;border-radius:50%;width:14px;height:14px;margin-top:-5px;transition:transform .12s;box-shadow:0 0 0 1px #0000001f,0 1px 3px #00000040}._9t79wq_rangeSlider::-moz-range-thumb{background:#fff;border:0;border-radius:50%;width:14px;height:14px;box-shadow:0 0 0 1px #0000001f,0 1px 3px #00000040}._9t79wq_rangeSlider:active::-webkit-slider-thumb{transform:scale(1.15)}._9t79wq_rangeSlider:focus-visible{outline:none}._9t79wq_rangeSlider:focus-visible::-webkit-slider-thumb{box-shadow:0 0 0 2px var(--dsw-alias-brand-primary)}._9t79wq_rangeSlider:disabled{cursor:not-allowed}._9t79wq_rangeEnds{color:var(--dsw-alias-label-secondary);font-variant-numeric:tabular-nums;justify-content:space-between;margin-top:2px;font-size:11px;line-height:16px;display:flex}._9t79wq_selectOption{color:var(--dsw-alias-label-primary);cursor:pointer;white-space:nowrap;text-overflow:ellipsis;border-radius:6px;flex-shrink:0;padding:6px 10px;font-size:13px;line-height:1.5;overflow:hidden}._9t79wq_selectOption:hover,._9t79wq_selectOptionActive{background:var(--dsw-alias-interactive-bg-hover)}._9t79wq_selectOptionSelected{color:var(--dsw-alias-brand-primary);background:color-mix(in srgb, var(--dsw-alias-brand-primary) 10%, transparent);font-weight:500}._9t79wq_invalid{color:var(--dsw-alias-state-error-primary,#b42318);margin:0;font-size:12px;line-height:18px}._9t79wq_hint{color:var(--dsw-alias-label-secondary);margin:0;font-size:12px;line-height:18px}._9t79wq_toggle{appearance:none;cursor:pointer;font:inherit;background:0 0;border:0;border-radius:999px;align-items:center;margin:0;padding:0;display:inline-flex}._9t79wq_toggleTrack{background:var(--dsw-alias-label-dimmed);border-radius:999px;flex:none;width:36px;height:20px;transition:background-color .18s;position:relative}._9t79wq_toggleThumb{--toggle-travel:16px;--toggle-overshoot:1px;background:var(--dsw-alias-bg-layer-3);border-radius:50%;width:16px;height:16px;transition:translate .18s;position:absolute;top:2px;left:2px;translate:0;box-shadow:0 1px 2px #1414132e}._9t79wq_toggle[aria-checked=true] ._9t79wq_toggleTrack{background:var(--dsw-alias-button-primary-fill,var(--dsw-alias-label-primary))}._9t79wq_toggle[aria-checked=true] ._9t79wq_toggleThumb{translate:var(--toggle-travel) 0;background:var(--dsw-alias-label-primary-foreground,var(--dsw-alias-bg-layer-3))}._9t79wq_toggle[data-moved][aria-checked=true] ._9t79wq_toggleThumb{animation:.35s cubic-bezier(.34,1.45,.64,1) both _9t79wq_toggle-on}._9t79wq_toggle[data-moved][aria-checked=false] ._9t79wq_toggleThumb{animation:.35s cubic-bezier(.34,1.45,.64,1) both _9t79wq_toggle-off}@keyframes _9t79wq_toggle-on{0%{translate:0}55%{translate:calc(var(--toggle-travel) + var(--toggle-overshoot)) 0}80%,to{translate:var(--toggle-travel) 0}}@keyframes _9t79wq_toggle-off{0%{translate:var(--toggle-travel) 0}55%{translate:calc(0px - var(--toggle-overshoot)) 0}80%,to{translate:0}}._9t79wq_toggle:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:2px}._9t79wq_toggle:disabled{opacity:.45;cursor:not-allowed}@media (prefers-reduced-motion:reduce){._9t79wq_card,._9t79wq_header,._9t79wq_mark,._9t79wq_chevron,._9t79wq_chevronOpen,._9t79wq_rangeBubble,._9t79wq_selectChevron,._9t79wq_selectChevronOpen,._9t79wq_selectPopup,._9t79wq_toggleTrack,._9t79wq_toggleThumb{transition:none}._9t79wq_toggle[data-moved] ._9t79wq_toggleThumb{animation:none}._9t79wq_disclosure{transition-property:opacity}}";
643
643
  const tagId = "@linxin666/dsh-liangshen/packages/dsh-liangshen/src/client/settings-card.module.css";
644
644
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
645
645
  const tag = document.createElement("style");
@@ -657,12 +657,11 @@ window.__ModuleLoader__.load({
657
657
  "cardOpen": "_9t79wq_cardOpen",
658
658
  "chevron": "_9t79wq_chevron",
659
659
  "chevronOpen": "_9t79wq_chevronOpen",
660
+ "control": "_9t79wq_control",
660
661
  "description": "_9t79wq_description",
661
- "discard": "_9t79wq_discard",
662
662
  "disclosure": "_9t79wq_disclosure",
663
663
  "failed": "_9t79wq_failed",
664
664
  "field": "_9t79wq_field",
665
- "footer": "_9t79wq_footer",
666
665
  "head": "_9t79wq_head",
667
666
  "headText": "_9t79wq_headText",
668
667
  "header": "_9t79wq_header",
@@ -676,10 +675,14 @@ window.__ModuleLoader__.load({
676
675
  "mark": "_9t79wq_mark",
677
676
  "name": "_9t79wq_name",
678
677
  "notExposed": "_9t79wq_notExposed",
679
- "pending": "_9t79wq_pending",
678
+ "rangeAnchor": "_9t79wq_rangeAnchor",
679
+ "rangeBubble": "_9t79wq_rangeBubble",
680
+ "rangeEnds": "_9t79wq_rangeEnds",
681
+ "rangeSlider": "_9t79wq_rangeSlider",
680
682
  "readOnly": "_9t79wq_readOnly",
681
683
  "reset": "_9t79wq_reset",
682
- "save": "_9t79wq_save",
684
+ "segment": "_9t79wq_segment",
685
+ "segmentGroup": "_9t79wq_segmentGroup",
683
686
  "select": "_9t79wq_select",
684
687
  "selectButton": "_9t79wq_selectButton",
685
688
  "selectChevron": "_9t79wq_selectChevron",
@@ -692,20 +695,141 @@ window.__ModuleLoader__.load({
692
695
  "selectPopupClose": "_9t79wq_selectPopupClose",
693
696
  "selectPopupOpen": "_9t79wq_selectPopupOpen",
694
697
  "selectWrap": "_9t79wq_selectWrap",
698
+ "settings-card": "_9t79wq_settings-card",
695
699
  "toggle": "_9t79wq_toggle",
700
+ "toggle-off": "_9t79wq_toggle-off",
701
+ "toggle-on": "_9t79wq_toggle-on",
696
702
  "toggleThumb": "_9t79wq_toggleThumb",
697
703
  "toggleTrack": "_9t79wq_toggleTrack"
698
704
  };
699
705
  //#endregion
706
+ //#region src/client/RangeBubble.tsx
707
+ /**
708
+ * Coarse adjustment for a bounded number: resting the pointer on the control
709
+ * (or moving focus into it) raises a small bubble holding a slider across the
710
+ * field's whole range, so a large change is one drag instead of many presses
711
+ * or a retyped value. The control itself stays the precise entry.
712
+ *
713
+ * The bubble belongs to the anchor's subtree, so moving from the control onto
714
+ * the bubble never counts as leaving. It opens after a short rest and closes a
715
+ * moment after the pointer and focus have both gone, so crossing the control
716
+ * on the way elsewhere does not flash it. While a drag is in progress the
717
+ * bubble stays put even if the pointer strays off it.
718
+ *
719
+ * Dragging reports each value through `onInput`, so the field shows it live;
720
+ * releasing the thumb, or a key press on it, reports `onCommit` once. The
721
+ * bubble opens on the side of the control that has room inside the nearest
722
+ * scrolling ancestor, so a row near the top of a settings page does not hang
723
+ * its bubble under the page edge.
724
+ */
725
+ //#endregion
726
+ //#region src/client/SegmentGroup.tsx
727
+ /**
728
+ * The family's segmented control: a quiet track whose options share one
729
+ * highlight that slides to the pressed option, instead of each option fading
730
+ * its own background out and the next one in. The settings fields' small
731
+ * choices and the Web Extensions TAB strip both render through it, so the two
732
+ * read as one control.
733
+ *
734
+ * The caller builds the option buttons and marks the pressed one with
735
+ * `data-active`; the group measures that button after every render and writes
736
+ * its box as four custom properties, and the stylesheet draws the highlight
737
+ * there (`.segmentGroup[data-pill]::before`). Attribute and first placement
738
+ * land in the same task, so the highlight appears in place and only later
739
+ * changes slide. A ResizeObserver re-measures when the group or an option
740
+ * changes size: a longer locale, a font arriving, a container growing, a
741
+ * strip wrapping onto a second line.
742
+ */
743
+ /** The attribute marking a group whose highlight has been placed. */
744
+ const PILL_ATTR = "data-pill";
745
+ /** The pressed option, relative to the group. */
746
+ const ACTIVE_SELECTOR = ":scope > [data-active]";
747
+ const PILL_PROPERTIES = [
748
+ "--segment-pill-x",
749
+ "--segment-pill-y",
750
+ "--segment-pill-w",
751
+ "--segment-pill-h"
752
+ ];
753
+ /**
754
+ * Write the highlight's box from the pressed option's box, or take the
755
+ * highlight off when nothing is pressed or the group has no layout yet.
756
+ * The two boxes are read in viewport pixels and turned back into the group's
757
+ * own CSS pixels, so a dialog that opens through a scale transform still
758
+ * lands the highlight on its option.
759
+ */
760
+ function placePill(group) {
761
+ const item = group.querySelector(ACTIVE_SELECTOR);
762
+ const box = group.getBoundingClientRect();
763
+ if (item === null || group.offsetWidth === 0 || box.width === 0) {
764
+ group.removeAttribute(PILL_ATTR);
765
+ for (const property of PILL_PROPERTIES) group.style.removeProperty(property);
766
+ return;
767
+ }
768
+ const scale = box.width / group.offsetWidth;
769
+ const itemBox = item.getBoundingClientRect();
770
+ [
771
+ (itemBox.left - box.left) / scale - group.clientLeft,
772
+ (itemBox.top - box.top) / scale - group.clientTop,
773
+ itemBox.width / scale,
774
+ itemBox.height / scale
775
+ ].forEach((value, index) => {
776
+ group.style.setProperty(PILL_PROPERTIES[index], `${Math.round(value * 100) / 100}px`);
777
+ });
778
+ if (!group.hasAttribute(PILL_ATTR)) group.setAttribute(PILL_ATTR, "");
779
+ }
780
+ /**
781
+ * Render a segmented track around the caller's option buttons.
782
+ * @param props - the track's attributes (role, accessible name, key handler) and its options.
783
+ * @returns the track.
784
+ */
785
+ function SegmentGroup(props) {
786
+ const { children, className, ...rest } = props;
787
+ const group = (0, react.useRef)(null);
788
+ const count = react.Children.count(children);
789
+ (0, react.useLayoutEffect)(() => {
790
+ if (group.current !== null) placePill(group.current);
791
+ });
792
+ (0, react.useLayoutEffect)(() => {
793
+ const element = group.current;
794
+ if (element === null || typeof ResizeObserver === "undefined") return void 0;
795
+ const observer = new ResizeObserver(() => {
796
+ placePill(element);
797
+ });
798
+ observer.observe(element);
799
+ for (const item of Array.from(element.children)) observer.observe(item);
800
+ return () => {
801
+ observer.disconnect();
802
+ };
803
+ }, [count]);
804
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
805
+ ...rest,
806
+ ref: group,
807
+ className: className === void 0 ? settings_card_module_css_default.segmentGroup : `${settings_card_module_css_default.segmentGroup} ${className}`,
808
+ children
809
+ });
810
+ }
811
+ //#endregion
700
812
  //#region src/client/PluginSettingsCard.tsx
701
813
  /**
702
814
  * Family-shared chrome for plugin settings cards: a disclosure header naming
703
- * the plugin and what its settings govern, the controls inside, and the save
704
- * that writes them. Renders nothing while the namespace is unavailable — a
815
+ * the plugin and what its settings govern, the controls inside, and the line
816
+ * that reports a refused write. A pick is written the moment it is made and a
817
+ * typed value after a pause, so the card has no save button and nothing waits
818
+ * on the reader. Renders nothing while the namespace is unavailable — a
705
819
  * deployment that does not compose the owning plugin should show no trace of
706
820
  * it. Inlined into each consumer's client bundle; mirrors the official
707
821
  * ui-plugin-config PluginCard in a self-contained slice.
822
+ *
823
+ * Every field inside the body is one settings row: the label and its hint on
824
+ * the left, the control on the right, a hairline between two rows; a narrow
825
+ * card stacks the control under the text (settings-card.module.css).
826
+ */
827
+ /**
828
+ * What a text field inside a card reaches without its plugin wiring it: write
829
+ * the pending draft now (Enter, leaving the field) or put it back (Escape).
830
+ * Picks need neither; they are written the moment they are made.
708
831
  */
832
+ const CardApply = (0, react.createContext)(null);
709
833
  /** Length of the body's disclosure motion; it matches `--settings-card-motion` on the card root. */
710
834
  const BODY_MOTION_MS = 180;
711
835
  /**
@@ -745,7 +869,6 @@ window.__ModuleLoader__.load({
745
869
  const title = props.t(props.titleKey);
746
870
  const description = props.t(props.descriptionKey);
747
871
  const descriptionTitle = props.descriptionTitleKey === void 0 ? description : props.t(props.descriptionTitleKey);
748
- const blocked = !state.dirty || state.invalid || state.saving;
749
872
  const baseClass = expanded ? `${settings_card_module_css_default.cardOpen} ${settings_card_module_css_default.card}` : settings_card_module_css_default.card;
750
873
  const cardClass = props.density === "nested" ? `${baseClass} ${settings_card_module_css_default.cardNested}` : baseClass;
751
874
  /** The body region both legs share; a hidden phase renders nothing at all. */
@@ -782,11 +905,6 @@ window.__ModuleLoader__.load({
782
905
  props.headerAction !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
783
906
  className: settings_card_module_css_default.headerAction,
784
907
  children: props.headerAction
785
- }) : null,
786
- state.dirty ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
787
- className: settings_card_module_css_default.pending,
788
- title: props.t("settings.unsaved"),
789
- children: props.t("settings.unsaved")
790
908
  }) : null
791
909
  ]
792
910
  }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
@@ -820,11 +938,6 @@ window.__ModuleLoader__.load({
820
938
  className: settings_card_module_css_default.headerAction,
821
939
  children: props.headerAction
822
940
  }) : null,
823
- state.dirty ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
824
- className: settings_card_module_css_default.pending,
825
- title: props.t("settings.unsaved"),
826
- children: props.t("settings.unsaved")
827
- }) : null,
828
941
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
829
942
  width: "14",
830
943
  height: "14",
@@ -839,47 +952,36 @@ window.__ModuleLoader__.load({
839
952
  })
840
953
  ]
841
954
  });
955
+ const notExposedNotice = state.exposed || props.hideNotExposedNotice === true ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
956
+ className: settings_card_module_css_default.notExposed,
957
+ role: "status",
958
+ children: props.t("settings.notExposed")
959
+ });
842
960
  if (!state.exposed && props.renderChildrenWhenNotExposed !== true) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", {
843
961
  className: cardClass,
844
- children: [header, bodyRegion(props.hideNotExposedNotice !== true ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
845
- className: settings_card_module_css_default.notExposed,
846
- role: "status",
847
- children: props.t("settings.notExposed")
848
- }) : null)]
962
+ children: [header, bodyRegion(notExposedNotice)]
849
963
  });
850
964
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", {
851
965
  className: cardClass,
852
966
  children: [header, props.headerOnly !== true ? bodyRegion(/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
967
+ notExposedNotice,
853
968
  !state.writable ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
854
969
  className: settings_card_module_css_default.readOnly,
855
970
  role: "status",
856
971
  children: props.t("settings.readOnly")
857
972
  }) : null,
858
- props.children,
859
- props.hideFooter === true ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
860
- className: settings_card_module_css_default.footer,
861
- children: [
862
- state.failed ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
863
- className: settings_card_module_css_default.failed,
864
- role: "status",
865
- children: [props.t("settings.saveFailed"), state.failedReason ? " - " + state.failedReason : ""]
866
- }) : null,
867
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
868
- type: "button",
869
- className: settings_card_module_css_default.discard,
870
- disabled: !state.dirty || state.saving,
871
- onClick: props.onDiscard,
872
- children: props.t("settings.discard")
873
- }),
874
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
875
- type: "button",
876
- className: settings_card_module_css_default.save,
877
- disabled: blocked,
878
- onClick: props.onSave,
879
- children: props.t(!state.saving ? "settings.save" : "settings.saving")
880
- })
881
- ]
882
- })
973
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CardApply.Provider, {
974
+ value: {
975
+ commit: props.onSave,
976
+ revert: props.onDiscard
977
+ },
978
+ children: props.children
979
+ }),
980
+ props.hideFooter !== true && state.failed ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
981
+ className: settings_card_module_css_default.failed,
982
+ role: "status",
983
+ children: [props.t("settings.saveFailed"), state.failedReason ? " - " + state.failedReason : ""]
984
+ }) : null
883
985
  ] })) : null]
884
986
  });
885
987
  }
@@ -893,8 +995,8 @@ window.__ModuleLoader__.load({
893
995
  * renders the legacy native `<select>` untouched, so element-level skin
894
996
  * selectors keep working; under the default appearance it renders a
895
997
  * self-drawn `role="listbox"` popup whose open/close is transition-animated.
896
- * Staged cards reach it through BooleanField/ChoiceField; immediate-apply
897
- * editors (the side-card prefs) bind it directly through onEdit.
998
+ * Cards reach it through BooleanField/ChoiceField; editors outside a card
999
+ * (the side-card prefs) bind it directly through onEdit.
898
1000
  * 双模式下拉框:皮肤激活时用原生 select,默认外观用自绘动画弹层。
899
1001
  */
900
1002
  function SelectField(props) {
@@ -1052,14 +1154,48 @@ window.__ModuleLoader__.load({
1052
1154
  }) : null]
1053
1155
  });
1054
1156
  }
1055
- /** A staged boolean field: 继承 / 开 / 关. */
1157
+ /**
1158
+ * A visible segmented group for a small set of mutually exclusive values.
1159
+ * Every option stays on screen, so inherit/on/off and short enum fields take
1160
+ * one click without opening a popup. The pressed option carries the group's
1161
+ * sliding highlight and `aria-pressed`; the group takes the field label as its
1162
+ * accessible name.
1163
+ */
1164
+ function SegmentField(props) {
1165
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SegmentGroup, {
1166
+ id: props.id,
1167
+ role: "group",
1168
+ "aria-label": props.label,
1169
+ "aria-invalid": props.invalid || void 0,
1170
+ children: props.options.map((option, index) => {
1171
+ const active = option.value === props.value;
1172
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
1173
+ type: "button",
1174
+ className: settings_card_module_css_default.segment,
1175
+ "aria-pressed": active,
1176
+ disabled: props.disabled,
1177
+ "data-active": active ? "" : void 0,
1178
+ "data-segment-index": index,
1179
+ onClick: () => {
1180
+ if (!active) props.onEdit(option.value);
1181
+ },
1182
+ children: option.label
1183
+ }, option.value);
1184
+ })
1185
+ });
1186
+ }
1187
+ /** A boolean field: 继承 / 开 / 关. */
1056
1188
  function BooleanField(props) {
1189
+ const segmented = props.presentation !== "select";
1057
1190
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1058
1191
  className: settings_card_module_css_default.field,
1059
1192
  children: [
1060
1193
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1061
1194
  className: settings_card_module_css_default.head,
1062
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
1195
+ children: [segmented ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1196
+ className: settings_card_module_css_default.label,
1197
+ children: props.label
1198
+ }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
1063
1199
  className: settings_card_module_css_default.label,
1064
1200
  htmlFor: props.id,
1065
1201
  children: props.label
@@ -1077,7 +1213,28 @@ window.__ModuleLoader__.load({
1077
1213
  })]
1078
1214
  }) : null]
1079
1215
  }),
1080
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectField, {
1216
+ segmented ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SegmentField, {
1217
+ id: props.id,
1218
+ label: props.label,
1219
+ options: [
1220
+ {
1221
+ value: "",
1222
+ label: props.inheritLabel
1223
+ },
1224
+ {
1225
+ value: "true",
1226
+ label: props.onLabel
1227
+ },
1228
+ {
1229
+ value: "false",
1230
+ label: props.offLabel
1231
+ }
1232
+ ],
1233
+ value: props.text,
1234
+ disabled: props.disabled,
1235
+ invalid: props.invalid,
1236
+ onEdit: props.onEdit
1237
+ }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectField, {
1081
1238
  id: props.id,
1082
1239
  options: [
1083
1240
  {
@@ -1106,14 +1263,22 @@ window.__ModuleLoader__.load({
1106
1263
  ]
1107
1264
  });
1108
1265
  }
1109
- /** A staged enumerated field rendered as a select. */
1266
+ /** An enumerated field, selecting or segmenting its small choice set. */
1110
1267
  function ChoiceField(props) {
1268
+ const segmented = props.presentation === "segment";
1269
+ const options = [{
1270
+ value: "",
1271
+ label: props.inheritLabel
1272
+ }, ...props.choices];
1111
1273
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1112
1274
  className: settings_card_module_css_default.field,
1113
1275
  children: [
1114
1276
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1115
1277
  className: settings_card_module_css_default.head,
1116
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
1278
+ children: [segmented ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1279
+ className: settings_card_module_css_default.label,
1280
+ children: props.label
1281
+ }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
1117
1282
  className: settings_card_module_css_default.label,
1118
1283
  htmlFor: props.id,
1119
1284
  children: props.label
@@ -1131,12 +1296,17 @@ window.__ModuleLoader__.load({
1131
1296
  })]
1132
1297
  }) : null]
1133
1298
  }),
1134
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectField, {
1299
+ segmented ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SegmentField, {
1300
+ id: props.id,
1301
+ label: props.label,
1302
+ options,
1303
+ value: props.text,
1304
+ disabled: props.disabled,
1305
+ invalid: props.invalid,
1306
+ onEdit: props.onEdit
1307
+ }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectField, {
1135
1308
  id: props.id,
1136
- options: [{
1137
- value: "",
1138
- label: props.inheritLabel
1139
- }, ...props.choices],
1309
+ options,
1140
1310
  value: props.text,
1141
1311
  disabled: props.disabled,
1142
1312
  invalid: props.invalid,
@@ -1150,12 +1320,11 @@ window.__ModuleLoader__.load({
1150
1320
  ]
1151
1321
  });
1152
1322
  }
1153
- //#endregion
1154
- //#region src/client/settings-form.ts
1155
1323
  /** A boolean field, edited through true/false draft text. */
1156
1324
  function booleanField(field) {
1157
1325
  return {
1158
1326
  field,
1327
+ entry: "pick",
1159
1328
  format: (value) => typeof value === "boolean" ? String(value) : "",
1160
1329
  parse: (text) => {
1161
1330
  const trimmed = text.trim();
@@ -1175,6 +1344,7 @@ window.__ModuleLoader__.load({
1175
1344
  function choiceField(field, choices) {
1176
1345
  return {
1177
1346
  field,
1347
+ entry: "pick",
1178
1348
  format: (value) => typeof value === "string" && choices.includes(value) ? value : "",
1179
1349
  parse: (text) => {
1180
1350
  if (text === "") return { kind: "clear" };
@@ -1186,12 +1356,14 @@ window.__ModuleLoader__.load({
1186
1356
  };
1187
1357
  }
1188
1358
  /**
1189
- * Stages one card's edits over one settings namespace and writes them on save.
1359
+ * Applies one card's edits to one settings namespace as the reader makes them.
1190
1360
  *
1191
1361
  * The Host is the only authority on whether a value was accepted — its
1192
1362
  * validators own the constraints no schema can express — so the outcome is
1193
- * read back from the section rather than predicted here. A save that did not
1194
- * land keeps its drafts, so the user can correct them instead of retyping.
1363
+ * read back from the section rather than predicted here. A write that did not
1364
+ * land puts each pick back to the stored value, the way a switch that could not
1365
+ * flip springs back, and keeps typed text so the reader can correct it instead
1366
+ * of retyping.
1195
1367
  */
1196
1368
  var CardForm = class {
1197
1369
  scope;
@@ -1201,6 +1373,8 @@ window.__ModuleLoader__.load({
1201
1373
  /** The form subscription installed in the constructor; released by dispose(). */
1202
1374
  disposeForm;
1203
1375
  disposed = false;
1376
+ /** The pending write of typed text, waiting for typing to pause. */
1377
+ typePause;
1204
1378
  saving = false;
1205
1379
  /** A save asked for while one was in flight; it runs once the first settles (#1754). */
1206
1380
  saveQueued = false;
@@ -1221,6 +1395,7 @@ window.__ModuleLoader__.load({
1221
1395
  dispose() {
1222
1396
  if (this.disposed) return;
1223
1397
  this.disposed = true;
1398
+ clearTimeout(this.typePause);
1224
1399
  this.disposeForm();
1225
1400
  this.listeners.clear();
1226
1401
  }
@@ -1232,7 +1407,7 @@ window.__ModuleLoader__.load({
1232
1407
  });
1233
1408
  return store;
1234
1409
  }
1235
- /** Read the card-level state: what the Host serves, and what a save would do. */
1410
+ /** Read the card-level state: what the Host serves, and what is still waiting to be written. */
1236
1411
  shell() {
1237
1412
  const snapshot = this.scope.getSnapshot();
1238
1413
  const plan = this.plan();
@@ -1279,9 +1454,10 @@ window.__ModuleLoader__.load({
1279
1454
  });
1280
1455
  },
1281
1456
  save: () => {
1282
- this.requestSave();
1457
+ this.applyNow();
1283
1458
  },
1284
1459
  discard: () => {
1460
+ clearTimeout(this.typePause);
1285
1461
  if (this.staged.size === 0 && !this.failed) return;
1286
1462
  this.staged.clear();
1287
1463
  this.failed = false;
@@ -1291,32 +1467,14 @@ window.__ModuleLoader__.load({
1291
1467
  };
1292
1468
  }
1293
1469
  /**
1294
- * Write every staged edit in one atomic form mutation, then re-seed from
1295
- * what the Host accepted.
1296
- *
1297
- * The whole batch rides one mutate, so cross-field validate hooks
1298
- * (baseURL+model) judge it as a unit: the Host either applies every write
1299
- * or refuses the batch. The form contract answers a refusal or a skipped
1300
- * write with `false` (it recovers with a fresh Host view instead of
1301
- * throwing), so the outcome is judged twice: the answer itself, and then the
1302
- * settled snapshot read back one planned write at a time. One missed write
1303
- * fails the whole save. A transport that rejects instead (the dsh-web bridge
1304
- * controller on a dead connection) reports through the same failure path
1305
- * with its rejection message. A save that did not land keeps its drafts, so
1306
- * the user can correct them instead of retyping.
1307
- * @returns settlement after the mutation and the read-back.
1308
- */
1309
- /**
1310
- * Run one save, and re-run it once if another was asked for while this one
1470
+ * Run one write, and re-run it once if another was asked for while this one
1311
1471
  * was still in flight.
1312
1472
  *
1313
- * A save is a Host round trip that also drives the profile reconcile, and
1314
- * the Host runs that write inside one exclusive transaction. Answering a
1315
- * press that arrives mid-flight by returning immediately dropped the edit
1316
- * with no explanation, which is the "the save button stops working after a
1317
- * few rounds" report (#1754). Serializing instead means a save pressed while
1318
- * another is still settling runs against the settled state - which is what
1319
- * the operator meant by pressing it again.
1473
+ * A write is a Host round trip that also drives the profile reconcile, and
1474
+ * the Host runs it inside one exclusive transaction. Answering an edit that
1475
+ * arrives mid-flight by returning immediately dropped it with no explanation
1476
+ * (#1754). Serializing instead means an edit made while another write is
1477
+ * still settling is written against the settled state.
1320
1478
  * @returns settlement after the mutation and the read-back.
1321
1479
  */
1322
1480
  async requestSave() {
@@ -1329,12 +1487,28 @@ window.__ModuleLoader__.load({
1329
1487
  this.saveQueued = false;
1330
1488
  await this.requestSave();
1331
1489
  }
1490
+ /**
1491
+ * Write every valid draft in one atomic form mutation, then re-seed from
1492
+ * what the Host accepted. A draft the field does not accept stays on screen,
1493
+ * unwritten, without holding the others back.
1494
+ *
1495
+ * The batch rides one mutate, so cross-field validate hooks (baseURL+model)
1496
+ * judge it as a unit: the Host either applies every write or refuses the
1497
+ * batch. The form contract answers a refusal or a skipped write with `false`
1498
+ * (it recovers with a fresh Host view instead of throwing), so the outcome is
1499
+ * judged twice: the answer itself, and then the settled snapshot read back
1500
+ * one planned write at a time. One missed write fails the whole batch. A
1501
+ * transport that rejects instead (the dsh-web bridge controller on a dead
1502
+ * connection) reports through the same failure path with its rejection
1503
+ * message. A batch that did not land puts its picks and clears back to the
1504
+ * stored value and keeps its typed text, so the reader can correct it.
1505
+ * @returns settlement after the mutation and the read-back.
1506
+ */
1332
1507
  async save() {
1333
- const plan = this.plan();
1334
- const valid = plan.filter((item) => item.judge !== void 0);
1335
- if (plan.length === 0 || this.saving || valid.length !== plan.length) return;
1508
+ const valid = this.plan().filter((item) => item.judge !== void 0);
1509
+ if (valid.length === 0 || this.saving) return;
1336
1510
  const pending = /* @__PURE__ */ new Map();
1337
- for (const item of plan) pending.set(item.field, this.staged.get(item.field));
1511
+ for (const item of valid) pending.set(item.field, this.staged.get(item.field));
1338
1512
  this.saving = true;
1339
1513
  this.failed = false;
1340
1514
  this.failedReason = void 0;
@@ -1355,16 +1529,19 @@ window.__ModuleLoader__.load({
1355
1529
  failedReason = error instanceof Error ? error.message : String(error);
1356
1530
  }
1357
1531
  const landed = accepted && failedReason === void 0 && valid.every((item) => item.judge());
1358
- for (const [field, before] of pending) if (landed && this.staged.get(field) === before) this.staged.delete(field);
1532
+ for (const [field, before] of pending) {
1533
+ if (this.staged.get(field) !== before) continue;
1534
+ if (landed || before === void 0 || before.clear || this.specOf(field).entry === "pick") this.staged.delete(field);
1535
+ }
1359
1536
  this.saving = false;
1360
1537
  this.failed = !landed;
1361
1538
  this.failedReason = failedReason;
1362
1539
  this.publish();
1363
1540
  }
1364
1541
  /**
1365
- * Every staged edit a save would write. An entry whose draft is not a value
1366
- * its field accepts carries no write: the form is still dirty, and the save
1367
- * refuses rather than dropping the edit. A staged edit that matches the
1542
+ * Every staged edit a write would carry. An entry whose draft is not a value
1543
+ * its field accepts carries no write: the form is still dirty, and the draft
1544
+ * stays on screen rather than being dropped. A staged edit that matches the
1368
1545
  * effective section is not a write at all.
1369
1546
  * @returns the planned writes, in the order the fields were staged.
1370
1547
  */
@@ -1428,11 +1605,30 @@ window.__ModuleLoader__.load({
1428
1605
  landedUnset(field) {
1429
1606
  return !this.stored(field);
1430
1607
  }
1608
+ /**
1609
+ * Take one edit and schedule its write: a pick or a clear is written now,
1610
+ * typed text once typing has rested for TYPE_PAUSE_MS.
1611
+ */
1431
1612
  stage(field, edit) {
1432
1613
  this.staged.set(field, edit);
1433
1614
  this.failed = false;
1434
1615
  this.failedReason = void 0;
1435
1616
  this.publish();
1617
+ if (edit.clear || this.specOf(field).entry === "pick") {
1618
+ this.applyNow();
1619
+ return;
1620
+ }
1621
+ clearTimeout(this.typePause);
1622
+ this.typePause = setTimeout(() => {
1623
+ this.applyNow();
1624
+ }, 600);
1625
+ }
1626
+ /** Write every pending draft now, taking the place of a waiting pause. */
1627
+ applyNow() {
1628
+ clearTimeout(this.typePause);
1629
+ this.typePause = void 0;
1630
+ if (this.disposed) return;
1631
+ this.requestSave();
1436
1632
  }
1437
1633
  specOf(field) {
1438
1634
  const spec = this.specs.get(field);
@@ -1566,6 +1762,7 @@ window.__ModuleLoader__.load({
1566
1762
  value: choice,
1567
1763
  label: t(`presentation.${choice}`)
1568
1764
  })),
1765
+ presentation: "segment",
1569
1766
  ...fieldProps,
1570
1767
  ...state.presentation,
1571
1768
  onEdit: (text) => {
@@ -1618,32 +1815,28 @@ window.__ModuleLoader__.load({
1618
1815
  "burst.line1": "三秒,三辈子的代码",
1619
1816
  "burst.line2": "文言文 · 二进制 · 摩斯电码",
1620
1817
  "settings.title": "梁神模式",
1621
- "settings.description": "控制本插件与工具面呈现方式。",
1622
- "settings.enabled": "启用梁神模式",
1623
- "settings.enabledHint": "关闭后不声明预设、也不发 agent 公告。",
1624
- "settings.announceToAgent": "向 agent 公告本插件",
1625
- "settings.announceToAgentHint": "开启后向每一轮 agent 系统提示注入本插件公告;默认关闭以保持提示词干净。",
1626
- "settings.presentation": "工具面呈现方式",
1627
- "settings.presentationHint": "写入本插件声明的预设的 tool-catalog 行:ptc(出厂默认)把 wire 收拢为 run_code,其余工具经生成的 SDK 调用;native 保持原生工具清单。改动立即生效,但已开始的会话保持其已声明的组合。",
1628
- "settings.dispatcher": "调度者身份",
1629
- "settings.dispatcherHint": "开启后本模式按调度 Agent 工作:先分诊复杂度(L0/L1 直接执行,L2 走完整流程),L2 任务先澄清访谈再规划,由主代理派发子代理并逐层审查与验收。与工具面呈现方式无关,只决定身份与流程纪律。出厂默认开启;关闭后回到仅含工作纪律的极简 persona。",
1818
+ "settings.description": "梁神模式的开关、工具面与调度身份。",
1819
+ "settings.enabled": "总开关",
1820
+ "settings.enabledHint": "关掉后不再声明预设。",
1821
+ "settings.announceToAgent": "公告给 agent",
1822
+ "settings.announceToAgentHint": "每一轮系统提示都带上本插件公告。",
1823
+ "settings.presentation": "工具面",
1824
+ "settings.presentationHint": "ptc 把工具收进 run_code,native 保留原生清单。",
1825
+ "settings.dispatcher": "调度身份",
1826
+ "settings.dispatcherHint": "按调度 Agent 工作:分诊、访谈、派发子代理。",
1630
1827
  "settings.on": "开",
1631
1828
  "settings.off": "关",
1632
- "settings.inherit": "继承(跟随部署默认)",
1633
- "settings.overridden": "已覆盖",
1634
- "settings.reset": "重置",
1635
- "settings.notExposed": "当前 DSH 版本未向设置页暴露本插件的配置命名空间,表单不可用。可编辑 ~/.dsh/settings.yaml 直接配置,或将本命名空间加入 Host 设置白名单后重启。",
1636
- "settings.readOnly": "当前部署的设置只读。",
1829
+ "settings.inherit": "继承",
1830
+ "settings.overridden": "已修改",
1831
+ "settings.reset": "恢复默认",
1832
+ "settings.notExposed": "这个版本的 DSH 没有开放梁神模式的设置。",
1833
+ "settings.readOnly": "设置只读。",
1637
1834
  "settings.expand": "展开设置",
1638
1835
  "settings.collapse": "收起设置",
1639
- "settings.save": "保存",
1640
- "settings.saving": "保存中…",
1641
- "settings.discard": "放弃",
1642
- "settings.unsaved": "未保存",
1643
- "settings.saveFailed": "部署未接受这些值,已保留供你修改。",
1644
- "settings.invalidValue": "该取值不被接受",
1645
- "presentation.ptc": "ptc(仅 run_code)",
1646
- "presentation.native": "native(原生工具清单)"
1836
+ "settings.saveFailed": "没有保存成功。",
1837
+ "settings.invalidValue": "填一个可用的值。",
1838
+ "presentation.ptc": "ptc",
1839
+ "presentation.native": "native"
1647
1840
  };
1648
1841
  /** English counterpart; the key set mirrors {@link zh} exactly. */
1649
1842
  const en = {
@@ -1663,32 +1856,28 @@ window.__ModuleLoader__.load({
1663
1856
  "burst.line1": "Three seconds, three lifetimes of code",
1664
1857
  "burst.line2": "Classical Chinese · Binary · Morse code",
1665
1858
  "settings.title": "LiangShen mode",
1666
- "settings.description": "Controls this plugin and the wire presentation.",
1667
- "settings.enabled": "Enable LiangShen mode",
1668
- "settings.enabledHint": "When off, the preset is not declared and the agent announcement does not run.",
1669
- "settings.announceToAgent": "Announce this plugin to agents",
1670
- "settings.announceToAgentHint": "Adds this plugin announcement to every agent system prompt; off by default so prompts stay clean.",
1671
- "settings.presentation": "Wire presentation",
1672
- "settings.presentationHint": "Written into the tool-catalog row of the preset this plugin declares: ptc (the shipped default) collapses the wire to run_code with every other tool reached through the generated SDK; native keeps the native roster. A change re-declares the preset immediately; sessions that already started keep the composition they declared.",
1673
- "settings.dispatcher": "Dispatcher identity",
1674
- "settings.dispatcherHint": "When on, the mode works as a dispatcher agent: it triages complexity first (L0/L1 work is done directly, an L2 task runs the full flow), clarifies an L2 task through an interview before planning, and the lead agent dispatches subagents and reviews and accepts them layer by layer. It is unrelated to the wire presentation and decides identity and process discipline only. On by default; switching it off returns the prompt to the bare persona with its working discipline.",
1859
+ "settings.description": "The mode switch, the wire presentation and the dispatcher identity.",
1860
+ "settings.enabled": "Master switch",
1861
+ "settings.enabledHint": "When off, the preset is no longer declared.",
1862
+ "settings.announceToAgent": "Announce to agents",
1863
+ "settings.announceToAgentHint": "Every system prompt carries this plugin note.",
1864
+ "settings.presentation": "Wire",
1865
+ "settings.presentationHint": "ptc folds tools into run_code; native keeps the native roster.",
1866
+ "settings.dispatcher": "Dispatcher",
1867
+ "settings.dispatcherHint": "Works as a dispatcher: triage, interview, then dispatch subagents.",
1675
1868
  "settings.on": "On",
1676
1869
  "settings.off": "Off",
1677
- "settings.inherit": "Inherit (deployment default)",
1678
- "settings.overridden": "Overridden",
1679
- "settings.reset": "Reset",
1680
- "settings.notExposed": "This DSH version does not expose this plugin's settings namespace to the configuration page, so the form is unavailable. Edit ~/.dsh/settings.yaml directly, or add the namespace to the Host settings allowlist and restart.",
1681
- "settings.readOnly": "This deployment serves settings read-only.",
1870
+ "settings.inherit": "Inherit",
1871
+ "settings.overridden": "Changed",
1872
+ "settings.reset": "Reset to default",
1873
+ "settings.notExposed": "This DSH version does not open the LiangShen settings.",
1874
+ "settings.readOnly": "Settings are read-only.",
1682
1875
  "settings.expand": "Show settings",
1683
1876
  "settings.collapse": "Hide settings",
1684
- "settings.save": "Save",
1685
- "settings.saving": "Saving…",
1686
- "settings.discard": "Discard",
1687
- "settings.unsaved": "Unsaved",
1688
- "settings.saveFailed": "The deployment did not accept these values; they were left for you to correct.",
1689
- "settings.invalidValue": "The value is not accepted",
1690
- "presentation.ptc": "ptc (run_code only)",
1691
- "presentation.native": "native (native tool roster)"
1877
+ "settings.saveFailed": "Not saved.",
1878
+ "settings.invalidValue": "Enter a value this field accepts.",
1879
+ "presentation.ptc": "ptc",
1880
+ "presentation.native": "native"
1692
1881
  };
1693
1882
  //#endregion
1694
1883
  //#region src/client/plugin-card-seat.ts
@@ -1782,6 +1971,7 @@ window.__ModuleLoader__.load({
1782
1971
  if (reconciling) return;
1783
1972
  const target = familyGroupLoaded(ctx) ? FAMILY_PLUGIN_CARD_SEAT : OFFICIAL_PLUGIN_CARD_SEAT;
1784
1973
  if (current === target) return;
1974
+ if (typeof slots.spec === "function" && slots.spec(target) === void 0) return;
1785
1975
  reconciling = true;
1786
1976
  const previous = dispose;
1787
1977
  dispose = void 0;