@linxin666/dsh-client-ui-task-board 0.4.10 → 0.4.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.i18n.yaml +2 -2
- package/README.md +1 -1
- package/README.zh.md +1 -1
- package/lib/client.js +542 -167
- package/lib/client.js.map +1 -1
- package/lib/types/client/PluginSettingsCard.d.ts +69 -22
- package/lib/types/client/RangeBubble.d.ts +46 -0
- package/lib/types/client/SegmentGroup.d.ts +28 -0
- package/lib/types/client/locales.d.ts +1 -4
- package/lib/types/client/plugin-card-seat.d.ts +2 -0
- package/lib/types/client/settings-form.d.ts +73 -51
- package/package.json +1 -1
- package/src/client/PluginSettingsCard.tsx +226 -93
- package/src/client/RangeBubble.tsx +164 -0
- package/src/client/SegmentGroup.tsx +93 -0
- package/src/client/TaskBoardSettingsCard.tsx +12 -5
- package/src/client/locales.ts +46 -52
- package/src/client/plugin-card-seat.ts +6 -0
- package/src/client/settings-card.module.css +341 -94
- package/src/client/settings-form.ts +102 -60
package/lib/client.js
CHANGED
|
@@ -3697,20 +3697,20 @@ window.__ModuleLoader__.load({
|
|
|
3697
3697
|
"exec.hint.short": "留空继承部署默认,执行时生效",
|
|
3698
3698
|
"settings.title": "任务看板",
|
|
3699
3699
|
"settings.description": "任务编排、agent 播报与目标验收。",
|
|
3700
|
-
"settings.enabled": "
|
|
3701
|
-
"settings.enabledCardHint": "
|
|
3700
|
+
"settings.enabled": "总开关",
|
|
3701
|
+
"settings.enabledCardHint": "播报、睡眠保护与子任务层级。",
|
|
3702
3702
|
"settings.enabledHint": "关闭后隐藏侧边栏入口与看板视图,并注销 task_board_* agent 工具;开启时任何会话都可以通过这些工具读写看板、子任务与定时计划。",
|
|
3703
|
-
"settings.enabledHintBrief": "
|
|
3704
|
-
"settings.announceToAgent": "
|
|
3703
|
+
"settings.enabledHintBrief": "关掉后隐藏入口与看板视图,并注销 task_board_* 工具。",
|
|
3704
|
+
"settings.announceToAgent": "播报给 agent",
|
|
3705
3705
|
"settings.announceToAgentHint": "开启:每条 agent 系统提示都会包含本看板的说明;关闭:不播报,agent 仅在用户主动提及时了解看板。",
|
|
3706
|
-
"settings.announceToAgentHintBrief": "
|
|
3706
|
+
"settings.announceToAgentHintBrief": "每条系统提示都带上本看板说明。",
|
|
3707
3707
|
"settings.preventIdleSleep": "阻止系统空闲睡眠",
|
|
3708
3708
|
"settings.preventIdleSleepHint": "默认关闭。开启后,只要存在运行中的 DSH 会话、已启用的定时任务或会话状态尚未确认,Host 就阻止整机因空闲睡眠;屏幕仍可自动关闭。",
|
|
3709
|
-
"settings.preventIdleSleepHintBrief": "
|
|
3710
|
-
"settings.trustForwardedProxy": "
|
|
3709
|
+
"settings.preventIdleSleepHintBrief": "有会话在跑或计划已启用时,阻止整机空闲睡眠。",
|
|
3710
|
+
"settings.trustForwardedProxy": "信任反代转发的请求",
|
|
3711
3711
|
"settings.trustForwardedProxyHint": "默认关闭。关闭时行为与没有这项设置完全一致:带 CF-Connecting-IP 或 X-Forwarded-For 的请求一律不当作本机请求。只有反代或隧道由你自己(运维)运行、并且它拨的是本机回环上游(127.0.0.1:<端口>)时才打开:此时这类请求仍必须带浏览器同源标记,显式跨站请求照旧拒绝。第三方托管的反向代理不要打开——它可以替你伪造这些标记。",
|
|
3712
|
-
"settings.trustForwardedProxyHintBrief": "
|
|
3713
|
-
"settings.powerBoundary": "
|
|
3712
|
+
"settings.trustForwardedProxyHintBrief": "只在自己的反代指向本机回环时开启。",
|
|
3713
|
+
"settings.powerBoundary": "合盖、休眠、关机或低电量不在保证范围内。",
|
|
3714
3714
|
"settings.powerError": "最近一次电源保护错误:{error}",
|
|
3715
3715
|
"settings.powerPhase": "保护状态",
|
|
3716
3716
|
"settings.powerPlatform": "平台",
|
|
@@ -3720,42 +3720,38 @@ window.__ModuleLoader__.load({
|
|
|
3720
3720
|
"settings.inherit": "继承",
|
|
3721
3721
|
"settings.on": "开",
|
|
3722
3722
|
"settings.off": "关",
|
|
3723
|
-
"settings.overridden": "
|
|
3723
|
+
"settings.overridden": "已修改",
|
|
3724
3724
|
"settings.reset": "恢复默认",
|
|
3725
|
-
"settings.notExposed": "
|
|
3726
|
-
"settings.readOnly": "
|
|
3725
|
+
"settings.notExposed": "这个版本的 DSH 没有开放任务看板的设置。",
|
|
3726
|
+
"settings.readOnly": "设置只读。",
|
|
3727
3727
|
"settings.expand": "展开设置",
|
|
3728
3728
|
"settings.collapse": "收起设置",
|
|
3729
|
-
"settings.
|
|
3730
|
-
"settings.
|
|
3731
|
-
"settings.discard": "放弃",
|
|
3732
|
-
"settings.unsaved": "未保存",
|
|
3733
|
-
"settings.saveFailed": "部署未接受这些值,已保留供你修改。",
|
|
3734
|
-
"settings.invalidNumber": "请输入数字,留空则使用默认值。",
|
|
3729
|
+
"settings.saveFailed": "没有保存成功。",
|
|
3730
|
+
"settings.invalidNumber": "填一个数字,留空用默认值。",
|
|
3735
3731
|
"settings.sessionPollSeconds": "会话轮询间隔(秒)",
|
|
3736
3732
|
"settings.sessionPollSecondsHint": "默认 5 秒。仅在看板有需要核对的事情——运行中的卡片或未结算的执行——时才读取会话名册;两者都没有时不再轮询,Host 不会持续扫描持久化会话目录。取值 1–300 秒:间隔越短结算越快、Host 负载越高。",
|
|
3737
|
-
"settings.sessionPollSecondsHintBrief": "
|
|
3733
|
+
"settings.sessionPollSecondsHintBrief": "多久核对一次会话,越短结算越快。",
|
|
3738
3734
|
"settings.maxSubtaskDepth": "子任务深度上限",
|
|
3739
3735
|
"settings.maxSubtaskDepthHint": "默认 1:一个任务只允许一层子任务,子任务不能再创建或关联子任务。最大 3。它只决定一张卡下面能挂多深的子任务:执行一张卡始终只开它自己的一个会话,子任务由它自己按依赖顺序派发,所以层级深浅不改变一次执行开几个会话。",
|
|
3740
|
-
"settings.maxSubtaskDepthHintBrief": "
|
|
3736
|
+
"settings.maxSubtaskDepthHintBrief": "子任务最多挂几层。",
|
|
3741
3737
|
"settings.maxSubtaskDepthOption": "{depth} 层",
|
|
3742
3738
|
"settings.runLaunchWidth": "并发启动上限",
|
|
3743
3739
|
"settings.runLaunchWidthHint": "默认 3。多张卡片同时要执行时(手动执行、重新执行与到点定时一样),同一刻最多有这么多个执行被准入、创建会话并入队 Prompt,其余排队等待;每张卡的一次执行只开它自己一个会话,所以这个值不改变单卡的执行形态。默认值取自本仓「重型实施子代理并发 ≤ 3」的实测纪律。取值 1–16:越大启动越快,Host 的内存与 swap 压力越高。执行中修改只影响尚未入列的启动。",
|
|
3744
|
-
"settings.runLaunchWidthHintBrief": "
|
|
3740
|
+
"settings.runLaunchWidthHintBrief": "同时最多几个执行开始建会话,其余排队。",
|
|
3745
3741
|
"settings.spendBudgetTokens": "每日 token 上限",
|
|
3746
3742
|
"settings.spendBudgetTokensHint": "默认 0,表示不设闸,行为与没有这项设置时完全一致(不读账本、不计数)。设为正整数后,今日已用 token 达到该值时:手动执行与重新执行被拒绝,调用方看到的拒绝文本就是原因;到点的定时执行把原因写进调度错误并跳过本次触发,不消耗计划次数,因此调高上限或跨过本地零点后下一次触发照常执行。计量单位是 token 而不是金额:使用账本只对 DeepSeek 官方路由计价,其他路由恒为 0。今日已用取自该账本按本地日期分桶的输入、缓存读写与输出之和,与「使用统计」面板的口径一致。",
|
|
3747
|
-
"settings.spendBudgetTokensHintBrief": "
|
|
3743
|
+
"settings.spendBudgetTokensHintBrief": "今日用量到顶后,手动执行被拒绝,定时触发跳过。",
|
|
3748
3744
|
"settings.runBehaviorTitle": "运行行为",
|
|
3749
3745
|
"settings.runBehaviorCardHint": "全局原生 /goal 执行开关(总开关,默认关闭)。",
|
|
3750
|
-
"settings.goalRunGlobal": "
|
|
3746
|
+
"settings.goalRunGlobal": "原生 /goal 执行",
|
|
3751
3747
|
"settings.goalRunGlobalHint": "默认关闭。关闭时所有任务都按普通单回合执行,不调用 dsh 内置的 /goal;只有这里开启、且任务级「以 /goal 开始执行」被勾选时,才执行原生 /goal。任务级勾选始终可操作、也不会被这里的开关改写,总开关只决定它是否生效。开关按执行启动时冻结,只影响之后新开的执行。",
|
|
3752
|
-
"settings.goalRunGlobalHintBrief": "
|
|
3748
|
+
"settings.goalRunGlobalHintBrief": "开启后执行才使用原生 /goal。",
|
|
3753
3749
|
"settings.goalRunGlobalDisabledTaskOption": "全局「原生 /goal 执行」总开关已关闭:任务级选项仍可随时勾选或取消,但暂不生效,你保存的偏好也不会被改写;开启总开关后即按该偏好执行。本次执行按普通单回合进行,未执行 goal 验收。",
|
|
3754
3750
|
"settings.goalVerificationTitle": "任务验收",
|
|
3755
|
-
"settings.goalVerification": "
|
|
3751
|
+
"settings.goalVerification": "任务验收",
|
|
3756
3752
|
"settings.goalVerificationCardHint": "验收开关、裁判模型与判据阈值。",
|
|
3757
3753
|
"settings.goalVerificationHint": "默认打开:以 goal 形式执行的任务在 update_goal 标记完成前必须先通过一次验收(三项 coding 判据(本分区面向工程任务)、阈值 0.65、每项两轮且交换 A/B 位置,实际工作须胜过空工作基线)。首次不通过会把总分、逐项分数与可定位问题反馈给 agent 修复,同一执行最多两次验收;第二次仍不通过则本次执行判失败。仅作用于本插件以 goal 形式执行的任务,不影响普通聊天,也不影响显式 goalRun:false 的单回合任务。每次验收都会真实调用裁判模型并消耗额度。",
|
|
3758
|
-
"settings.goalVerificationHintBrief": "
|
|
3754
|
+
"settings.goalVerificationHintBrief": "每项判据两轮,每次验收都会调用裁判模型。",
|
|
3759
3755
|
"settings.goalVerificationModel": "验收模型",
|
|
3760
3756
|
"settings.goalVerificationModelHint": "留空即继承宿主:使用宿主模型目录的默认路由,而不是任务卡钉住的执行模型。",
|
|
3761
3757
|
"settings.goalVerificationModelHintBrief": "留空继承宿主默认路由,不跟随卡片钉住的执行模型。",
|
|
@@ -3897,7 +3893,8 @@ window.__ModuleLoader__.load({
|
|
|
3897
3893
|
"board.group.collapse": "收起",
|
|
3898
3894
|
"board.hideSubtasks": "隐藏子任务",
|
|
3899
3895
|
"board.showSubtasks": "显示子任务",
|
|
3900
|
-
"board.subtaskFilterHint": "看板默认只显示父任务;搜索或按标签筛选时会自动展开子任务。"
|
|
3896
|
+
"board.subtaskFilterHint": "看板默认只显示父任务;搜索或按标签筛选时会自动展开子任务。",
|
|
3897
|
+
"settings.enabledTopic": "基础"
|
|
3901
3898
|
};
|
|
3902
3899
|
/** en dictionary, complete against the zh key set. */
|
|
3903
3900
|
const en = {
|
|
@@ -4175,20 +4172,20 @@ window.__ModuleLoader__.load({
|
|
|
4175
4172
|
"exec.hint.short": "Blank inherits the deployment default; applied at run time",
|
|
4176
4173
|
"settings.title": "Task Board",
|
|
4177
4174
|
"settings.description": "Task orchestration, agent announcement and goal acceptance.",
|
|
4178
|
-
"settings.enabled": "
|
|
4179
|
-
"settings.enabledCardHint": "
|
|
4175
|
+
"settings.enabled": "Master switch",
|
|
4176
|
+
"settings.enabledCardHint": "Announcement, sleep protection and subtask depth.",
|
|
4180
4177
|
"settings.enabledHint": "When off, the sidebar entry and board view are hidden and the task_board_* agent tools are unregistered; while on, any session can read and drive the board, its subtasks and its schedules through those tools.",
|
|
4181
|
-
"settings.enabledHintBrief": "
|
|
4182
|
-
"settings.announceToAgent": "Announce
|
|
4178
|
+
"settings.enabledHintBrief": "Off hides the entry and board view and unregisters the task_board_* tools.",
|
|
4179
|
+
"settings.announceToAgent": "Announce to agents",
|
|
4183
4180
|
"settings.announceToAgentHint": "On: every agent system prompt includes a note about this board. Off: no announcement; agents learn about the board only when you mention it.",
|
|
4184
|
-
"settings.announceToAgentHintBrief": "
|
|
4181
|
+
"settings.announceToAgentHintBrief": "Every system prompt carries a note about this board.",
|
|
4185
4182
|
"settings.preventIdleSleep": "Prevent idle system sleep",
|
|
4186
4183
|
"settings.preventIdleSleepHint": "Off by default. When enabled, the Host prevents idle system sleep while any DSH session runs, any schedule is enabled, or session state is not yet known. The display may still turn off.",
|
|
4187
|
-
"settings.preventIdleSleepHintBrief": "
|
|
4188
|
-
"settings.trustForwardedProxy": "Trust
|
|
4184
|
+
"settings.preventIdleSleepHintBrief": "Blocks idle system sleep while a session runs or a schedule is enabled.",
|
|
4185
|
+
"settings.trustForwardedProxy": "Trust forwarded requests",
|
|
4189
4186
|
"settings.trustForwardedProxyHint": "Off by default. While it is off the fence behaves exactly as if the setting did not exist: a request carrying CF-Connecting-IP or X-Forwarded-For is never treated as local. Turn it on only when the reverse proxy or tunnel is one you (the operator) run yourself and it dials this machine loopback upstream (127.0.0.1:<port>): even then such a request must still carry a browser same-origin marker, and an explicit cross-site request stays refused. Do not enable it for a reverse proxy hosted by a third party, which can forge those markers on your behalf.",
|
|
4190
|
-
"settings.trustForwardedProxyHintBrief": "
|
|
4191
|
-
"settings.powerBoundary": "
|
|
4187
|
+
"settings.trustForwardedProxyHintBrief": "On only for a proxy of your own that dials this machine loopback.",
|
|
4188
|
+
"settings.powerBoundary": "Closing the lid, hibernate, shutdown or a low battery is outside the guarantee.",
|
|
4192
4189
|
"settings.powerError": "Latest power-protection error: {error}",
|
|
4193
4190
|
"settings.powerPhase": "Protection",
|
|
4194
4191
|
"settings.powerPlatform": "Platform",
|
|
@@ -4198,42 +4195,38 @@ window.__ModuleLoader__.load({
|
|
|
4198
4195
|
"settings.inherit": "Inherit",
|
|
4199
4196
|
"settings.on": "On",
|
|
4200
4197
|
"settings.off": "Off",
|
|
4201
|
-
"settings.overridden": "
|
|
4198
|
+
"settings.overridden": "Changed",
|
|
4202
4199
|
"settings.reset": "Reset to default",
|
|
4203
|
-
"settings.notExposed": "This DSH version does not
|
|
4204
|
-
"settings.readOnly": "
|
|
4200
|
+
"settings.notExposed": "This DSH version does not open the task board settings.",
|
|
4201
|
+
"settings.readOnly": "Settings are read-only.",
|
|
4205
4202
|
"settings.expand": "Show settings",
|
|
4206
4203
|
"settings.collapse": "Hide settings",
|
|
4207
|
-
"settings.
|
|
4208
|
-
"settings.
|
|
4209
|
-
"settings.discard": "Discard",
|
|
4210
|
-
"settings.unsaved": "Unsaved",
|
|
4211
|
-
"settings.saveFailed": "The deployment did not accept these values; they were left for you to correct.",
|
|
4212
|
-
"settings.invalidNumber": "Enter a number, or leave blank to use the default.",
|
|
4204
|
+
"settings.saveFailed": "Not saved.",
|
|
4205
|
+
"settings.invalidNumber": "Enter a number, or leave it empty for the default.",
|
|
4213
4206
|
"settings.sessionPollSeconds": "Session poll interval (seconds)",
|
|
4214
4207
|
"settings.sessionPollSecondsHint": "Default 5. The Host reads the DSH session roster only while the board has something to reconcile: a running card or an open execution. With neither it stops polling and never re-scans the persisted session directory. Range 1 to 300 seconds: a shorter interval settles runs sooner and costs the Host more.",
|
|
4215
|
-
"settings.sessionPollSecondsHintBrief": "
|
|
4208
|
+
"settings.sessionPollSecondsHintBrief": "How often sessions are checked; shorter settles sooner.",
|
|
4216
4209
|
"settings.maxSubtaskDepth": "Subtask depth limit",
|
|
4217
4210
|
"settings.maxSubtaskDepthHint": "Default 1: a task may carry one level of subtasks, and a subtask cannot create or link further subtasks. Maximum 3. The limit only decides how deep the tree under one card can go: a run still opens that card's own single session and dispatches its subtasks itself, so the depth never changes how many sessions a run opens.",
|
|
4218
|
-
"settings.maxSubtaskDepthHintBrief": "
|
|
4211
|
+
"settings.maxSubtaskDepthHintBrief": "How deep subtasks may go.",
|
|
4219
4212
|
"settings.maxSubtaskDepthOption": "{depth} levels",
|
|
4220
4213
|
"settings.runLaunchWidth": "Concurrent run launches",
|
|
4221
4214
|
"settings.runLaunchWidthHint": "Default 3. When several cards want to run at the same time, a manual run, a re-run and a due schedule alike, only this many runs are admitted at once: each creates its session and queues its prompt, and the rest wait their turn. Running one card always opens just that card's own session, so this value never changes the shape of a single-card run. The default comes from this repository's measured guidance for heavy implementation subagents (at most three). Range 1 to 16: a larger width starts runs sooner and costs the Host more memory and swap. Edited during a run, it bounds the launches that have not been admitted yet.",
|
|
4222
|
-
"settings.runLaunchWidthHintBrief": "
|
|
4215
|
+
"settings.runLaunchWidthHintBrief": "How many runs start at once; the rest wait.",
|
|
4223
4216
|
"settings.spendBudgetTokens": "Daily token cap",
|
|
4224
4217
|
"settings.spendBudgetTokensHint": "Default 0 means no gate: behavior is exactly what it was before this setting existed, with no ledger read and no counting. With a positive cap, once today's measured spend reaches it a manual run or re-run is refused and the caller sees that message as the refusal, while a due schedule writes the reason to the scheduler error and skips that occurrence without spending a planned run — raising the cap, or the local day rolling over, lets the next trigger run as usual. The unit is tokens rather than money: the usage ledger prices only DeepSeek's own routes and stays 0 on every other route. Today's spend is that ledger's local-date bucket summed over input, cache read/write and output, the same measure the usage panel shows.",
|
|
4225
|
-
"settings.spendBudgetTokensHintBrief": "
|
|
4218
|
+
"settings.spendBudgetTokensHintBrief": "Past today's cap, manual runs are refused and due schedules skip.",
|
|
4226
4219
|
"settings.runBehaviorTitle": "Run behavior",
|
|
4227
4220
|
"settings.runBehaviorCardHint": "The global native /goal switch (master control, off by default).",
|
|
4228
|
-
"settings.goalRunGlobal": "
|
|
4221
|
+
"settings.goalRunGlobal": "Native /goal",
|
|
4229
4222
|
"settings.goalRunGlobalHint": "Off by default. While off, every task runs one plain turn and never calls dsh built-in /goal; a run uses native /goal only when this is on AND the task-level option is checked (see the task option below). The task-level checkbox always stays operable and this switch never rewrites it: the master switch only decides whether that choice takes effect. The switch is frozen when an execution starts, so it only affects runs opened afterwards.",
|
|
4230
|
-
"settings.goalRunGlobalHintBrief": "
|
|
4223
|
+
"settings.goalRunGlobalHintBrief": "A run uses native /goal only while this is on.",
|
|
4231
4224
|
"settings.goalRunGlobalDisabledTaskOption": "The global native /goal switch is off: the task-level option can still be checked or cleared, but it has no effect right now and the preference you save is never rewritten; turning the global switch back on applies it. This execution runs one plain turn and performs no goal acceptance.",
|
|
4232
4225
|
"settings.goalVerificationTitle": "Task acceptance",
|
|
4233
|
-
"settings.goalVerification": "
|
|
4226
|
+
"settings.goalVerification": "Task acceptance",
|
|
4234
4227
|
"settings.goalVerificationCardHint": "The switch, the judge model and the criteria threshold.",
|
|
4235
4228
|
"settings.goalVerificationHint": "On by default: a task executed in goal form must pass one acceptance before update_goal may mark it complete (the three coding criteria, aimed at engineering tasks, a 0.65 threshold, two rounds per criterion with the A/B slots swapped, and the work must beat the empty-work baseline). A first failure returns the total, the per-criterion scores and the located findings to the fixing agent, and one execution may accept at most twice; a second failure fails that execution. It affects only this board goal-form executions, never plain chat and never a task pinned to goalRun: false. Every acceptance really calls the judge model and spends quota.",
|
|
4236
|
-
"settings.goalVerificationHintBrief": "
|
|
4229
|
+
"settings.goalVerificationHintBrief": "Two rounds per criterion, and each acceptance calls the judge model.",
|
|
4237
4230
|
"settings.goalVerificationModel": "Judge model",
|
|
4238
4231
|
"settings.goalVerificationModelHint": "Blank inherits the host: the default route of the host model catalog, never the card pinned execution model.",
|
|
4239
4232
|
"settings.goalVerificationModelHintBrief": "Blank inherits the host default route, never the model pinned on the card.",
|
|
@@ -4375,7 +4368,8 @@ window.__ModuleLoader__.load({
|
|
|
4375
4368
|
"board.group.collapse": "Collapse",
|
|
4376
4369
|
"board.hideSubtasks": "Hide subtasks",
|
|
4377
4370
|
"board.showSubtasks": "Show subtasks",
|
|
4378
|
-
"board.subtaskFilterHint": "The board shows parent tasks only; a text or label filter reveals the subtasks automatically."
|
|
4371
|
+
"board.subtaskFilterHint": "The board shows parent tasks only; a text or label filter reveals the subtasks automatically.",
|
|
4372
|
+
"settings.enabledTopic": "Basics"
|
|
4379
4373
|
};
|
|
4380
4374
|
/** Active dictionary, picked by the document language at call time. */
|
|
4381
4375
|
function dictionary() {
|
|
@@ -11825,7 +11819,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
11825
11819
|
}
|
|
11826
11820
|
//#endregion
|
|
11827
11821
|
//#region \0dsh-css:packages/dsh-task-board/src/client/settings-card.module.css.mjs
|
|
11828
|
-
const css$1 = ".Jh0q7G_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}.Jh0q7G_card:hover{border-color:var(--dsw-alias-label-dimmed)}.Jh0q7G_cardOpen{background:var(--dsw-alias-bg-layer-2);border-color:var(--dsw-alias-label-dimmed)}.Jh0q7G_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}.Jh0q7G_cardNested .Jh0q7G_description{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.Jh0q7G_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}.Jh0q7G_header:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:-2px}.Jh0q7G_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}.Jh0q7G_headText{flex-direction:column;flex:1;gap:4px;min-width:0;display:flex}.Jh0q7G_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}.Jh0q7G_header:hover .Jh0q7G_mark,.Jh0q7G_cardOpen .Jh0q7G_mark{color:var(--dsw-alias-label-primary)}.Jh0q7G_name{color:var(--dsw-alias-label-primary);font-size:var(--settings-card-title-size);font-weight:600;line-height:1.4}.Jh0q7G_description{color:var(--dsw-alias-label-secondary);font-size:var(--settings-card-description-size);line-height:1.5}.Jh0q7G_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}.Jh0q7G_headerAction{flex:none;align-items:center;display:inline-flex}.Jh0q7G_chevron{color:var(--dsw-alias-label-tertiary);flex:none;width:16px;height:16px;transition:transform .16s,color .16s}.Jh0q7G_header:hover .Jh0q7G_chevron{color:var(--dsw-alias-label-secondary)}.Jh0q7G_chevronOpen{transform:rotate(180deg)}.Jh0q7G_disclosure{opacity:0;transition:grid-template-rows var(--settings-card-motion) ease, opacity var(--settings-card-motion) ease;grid-template-rows:0fr;display:grid}.Jh0q7G_disclosure[data-state=collapsed],.Jh0q7G_disclosure[data-state=entering],.Jh0q7G_disclosure[data-state=closing]{overflow:hidden}.Jh0q7G_disclosure[data-state=entering],.Jh0q7G_disclosure[data-state=shown]{opacity:1;grid-template-rows:1fr}.Jh0q7G_disclosure>.Jh0q7G_body{min-height:0}.Jh0q7G_body{border-top:1px solid var(--dsw-alias-border-l2);margin:0 var(--settings-card-body-inset);padding-bottom:8px}.Jh0q7G_readOnly{color:var(--dsw-alias-label-secondary);margin:12px 0 0;font-size:12px;line-height:1.5}.Jh0q7G_notExposed{color:var(--dsw-alias-state-warn-primary);margin:12px 0 0;font-size:12px;line-height:1.5}.Jh0q7G_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}.Jh0q7G_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}.Jh0q7G_discard,.Jh0q7G_save{appearance:none;font:inherit;cursor:pointer;border:1px solid #0000;border-radius:8px;padding:5px 14px;font-size:13px;line-height:1.5}.Jh0q7G_discard{border-color:var(--dsw-alias-border-l2);color:var(--dsw-alias-label-secondary);background:0 0}.Jh0q7G_discard:hover:not(:disabled){color:var(--dsw-alias-label-primary);border-color:var(--dsw-alias-label-dimmed)}.Jh0q7G_save{background:var(--dsw-alias-label-primary);color:var(--dsw-alias-bg-layer-3)}.Jh0q7G_discard:disabled,.Jh0q7G_save:disabled{opacity:.4;cursor:default}.Jh0q7G_discard:focus-visible,.Jh0q7G_save:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}.Jh0q7G_field{flex-direction:column;gap:6px;padding:12px 0;display:flex}.Jh0q7G_field+.Jh0q7G_field{border-top:1px solid var(--dsw-alias-border-l2)}.Jh0q7G_head{align-items:center;gap:8px;display:flex}.Jh0q7G_label{min-width:0;color:var(--dsw-alias-label-primary);flex:1;font-size:13px;font-weight:500;line-height:1.5}.Jh0q7G_badges{align-items:center;gap:8px;display:inline-flex}.Jh0q7G_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}.Jh0q7G_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}.Jh0q7G_reset:hover:not(:disabled){color:var(--dsw-alias-label-primary)}.Jh0q7G_reset:disabled{cursor:default}.Jh0q7G_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}.Jh0q7G_input,.Jh0q7G_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}.Jh0q7G_input:focus-visible,.Jh0q7G_select:focus-visible{border-color:var(--dsw-alias-brand-primary);outline:none}.Jh0q7G_input:disabled,.Jh0q7G_select:disabled{color:var(--dsw-alias-label-tertiary);cursor:default}.Jh0q7G_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}.Jh0q7G_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)}.Jh0q7G_selectWrap{position:relative}.Jh0q7G_selectButton{appearance:none;text-align:left;cursor:pointer;justify-content:space-between;align-items:center;gap:8px;width:100%;display:flex}.Jh0q7G_selectLabel{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.Jh0q7G_selectChevron{color:var(--dsw-alias-label-tertiary);flex:none;transition:transform .16s}.Jh0q7G_selectChevronOpen{transform:rotate(180deg)}.Jh0q7G_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)}.Jh0q7G_selectPopupOpen{opacity:1;transform:none}.Jh0q7G_selectPopupClose{opacity:0;pointer-events:none;transform:translateY(-4px)}.Jh0q7G_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}.Jh0q7G_selectOption:hover,.Jh0q7G_selectOptionActive{background:var(--dsw-alias-interactive-bg-hover)}.Jh0q7G_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}.Jh0q7G_invalid{color:var(--dsw-alias-state-error-primary,#b42318);margin:0;font-size:12px;line-height:1.5}.Jh0q7G_hint{color:var(--dsw-alias-label-secondary);margin:0;font-size:12px;line-height:1.5}.Jh0q7G_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}.Jh0q7G_toggleTrack{background:var(--dsw-alias-label-dimmed);border-radius:999px;flex:none;width:30px;height:16px;transition:background .18s;position:relative}.Jh0q7G_toggleThumb{background:var(--dsw-alias-bg-layer-3);border-radius:50%;width:12px;height:12px;transition:left .18s;position:absolute;top:2px;left:2px}.Jh0q7G_toggle[aria-checked=true] .Jh0q7G_toggleTrack{background:var(--dsw-alias-button-primary-fill,var(--dsw-alias-label-primary))}.Jh0q7G_toggle[aria-checked=true] .Jh0q7G_toggleThumb{background:var(--dsw-alias-label-primary-foreground,var(--dsw-alias-bg-layer-3));left:16px}.Jh0q7G_toggle:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:2px}.Jh0q7G_toggle:disabled{opacity:.45;cursor:default}@media (prefers-reduced-motion:reduce){.Jh0q7G_card,.Jh0q7G_header,.Jh0q7G_mark,.Jh0q7G_chevron,.Jh0q7G_chevronOpen,.Jh0q7G_discard,.Jh0q7G_save,.Jh0q7G_selectChevron,.Jh0q7G_selectChevronOpen,.Jh0q7G_selectPopup,.Jh0q7G_toggleTrack,.Jh0q7G_toggleThumb{transition:none}.Jh0q7G_disclosure{transition-property:opacity}}";
|
|
11822
|
+
const css$1 = ".Jh0q7G_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}.Jh0q7G_card:hover{border-color:var(--dsw-alias-label-dimmed)}.Jh0q7G_cardOpen{background:var(--dsw-alias-bg-layer-2);border-color:var(--dsw-alias-label-dimmed)}.Jh0q7G_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}.Jh0q7G_cardNested .Jh0q7G_description{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.Jh0q7G_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}.Jh0q7G_header:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:-2px}.Jh0q7G_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}.Jh0q7G_headText{flex-direction:column;flex:1;gap:4px;min-width:0;display:flex}.Jh0q7G_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}.Jh0q7G_header:hover .Jh0q7G_mark,.Jh0q7G_cardOpen .Jh0q7G_mark{color:var(--dsw-alias-label-primary)}.Jh0q7G_name{color:var(--dsw-alias-label-primary);font-size:var(--settings-card-title-size);font-weight:600;line-height:1.4}.Jh0q7G_description{color:var(--dsw-alias-label-secondary);font-size:12px;line-height:18px}.Jh0q7G_headerAction{flex:none;align-items:center;display:inline-flex}.Jh0q7G_chevron{color:var(--dsw-alias-label-tertiary);flex:none;width:16px;height:16px;transition:transform .16s,color .16s}.Jh0q7G_header:hover .Jh0q7G_chevron{color:var(--dsw-alias-label-secondary)}.Jh0q7G_chevronOpen{transform:rotate(180deg)}.Jh0q7G_disclosure{opacity:0;transition:grid-template-rows var(--settings-card-motion) ease, opacity var(--settings-card-motion) ease;grid-template-rows:0fr;display:grid}.Jh0q7G_disclosure[data-state=collapsed],.Jh0q7G_disclosure[data-state=entering],.Jh0q7G_disclosure[data-state=closing]{overflow:hidden}.Jh0q7G_disclosure[data-state=entering],.Jh0q7G_disclosure[data-state=shown]{opacity:1;grid-template-rows:1fr}.Jh0q7G_disclosure>.Jh0q7G_body{min-height:0}.Jh0q7G_body{border-top:1px solid var(--dsw-alias-border-l2);margin:0 var(--settings-card-body-inset);padding-bottom:8px;container:Jh0q7G_settings-card/inline-size}.Jh0q7G_readOnly{color:var(--dsw-alias-label-secondary);margin:12px 0 0;font-size:12px;line-height:1.5}.Jh0q7G_notExposed{color:var(--dsw-alias-state-warn-primary);margin:12px 0 0;font-size:12px;line-height:1.5}.Jh0q7G_failed{color:var(--dsw-alias-state-error-primary,#b42318);overflow-wrap:anywhere;margin:8px 0 4px;font-size:12px;line-height:18px}.Jh0q7G_field{grid-template-columns:minmax(0,1fr) fit-content(50%);grid-template-areas:\"Jh0q7G_head Jh0q7G_control\"\"Jh0q7G_hint Jh0q7G_control\";align-items:center;gap:4px 24px;padding:16px 0;display:grid}.Jh0q7G_field>.Jh0q7G_head{grid-area:Jh0q7G_head}.Jh0q7G_field>:is(.Jh0q7G_hint,.Jh0q7G_invalid){grid-area:Jh0q7G_hint}.Jh0q7G_field>:not(.Jh0q7G_head,.Jh0q7G_hint,.Jh0q7G_invalid){grid-area:Jh0q7G_control;justify-self:end;max-width:100%}.Jh0q7G_field+.Jh0q7G_field{border-top:1px solid var(--dsw-alias-border-l2)}.Jh0q7G_head{align-items:center;gap:8px;display:flex}.Jh0q7G_label{min-width:0;color:var(--dsw-alias-label-primary);flex:1;font-size:14px;font-weight:400;line-height:22px}.Jh0q7G_badges{align-items:center;gap:8px;display:inline-flex}.Jh0q7G_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}.Jh0q7G_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}.Jh0q7G_reset:hover:not(:disabled){color:var(--dsw-alias-label-primary)}.Jh0q7G_reset:disabled{cursor:default}.Jh0q7G_reset:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:2px}.Jh0q7G_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}.Jh0q7G_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}.Jh0q7G_segment:hover:not(:disabled):not([data-active]){color:var(--dsw-alias-label-primary)}.Jh0q7G_segmentGroup:not([data-pill])>.Jh0q7G_segment[data-active],.Jh0q7G_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] .Jh0q7G_segmentGroup:not([data-pill])>.Jh0q7G_segment[data-active],body[data-ds-dark-theme] .Jh0q7G_segmentGroup[data-pill]:before{box-shadow:none;background:#ffffff24}.Jh0q7G_segment[data-active]{color:var(--dsw-alias-label-primary)}.Jh0q7G_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}.Jh0q7G_segmentGroup>*{z-index:1;position:relative}.Jh0q7G_segment:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}.Jh0q7G_segment:disabled{cursor:not-allowed;opacity:.45}.Jh0q7G_segmentGroup[data-pill]:has(>.Jh0q7G_segment:disabled):before{opacity:.45}.Jh0q7G_input,.Jh0q7G_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}.Jh0q7G_input:focus-visible,.Jh0q7G_select:focus-visible{border-color:var(--dsw-alias-brand-primary);outline:none}.Jh0q7G_input:disabled,.Jh0q7G_select:disabled{color:var(--dsw-alias-label-tertiary);cursor:default}.Jh0q7G_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}.Jh0q7G_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)}.Jh0q7G_field>:is(.Jh0q7G_input,.Jh0q7G_inputInvalid,.Jh0q7G_select,.Jh0q7G_selectWrap,.Jh0q7G_rangeAnchor){box-sizing:border-box;width:220px}.Jh0q7G_rangeAnchor>:is(.Jh0q7G_input,.Jh0q7G_inputInvalid){box-sizing:border-box;width:100%}@container Jh0q7G_settings-card (width<=440px){.Jh0q7G_field{grid-template-columns:minmax(0,1fr);grid-template-areas:\"Jh0q7G_head\"\"Jh0q7G_hint\"\"Jh0q7G_control\";row-gap:8px}.Jh0q7G_field>:not(.Jh0q7G_head,.Jh0q7G_hint,.Jh0q7G_invalid){justify-self:start}.Jh0q7G_field>:is(.Jh0q7G_input,.Jh0q7G_inputInvalid,.Jh0q7G_select,.Jh0q7G_selectWrap,.Jh0q7G_rangeAnchor){justify-self:stretch;width:auto}}.Jh0q7G_selectWrap{position:relative}.Jh0q7G_selectButton{appearance:none;text-align:left;cursor:pointer;justify-content:space-between;align-items:center;gap:8px;width:100%;display:flex}.Jh0q7G_selectLabel{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.Jh0q7G_selectChevron{color:var(--dsw-alias-label-tertiary);flex:none;transition:transform .16s}.Jh0q7G_selectChevronOpen{transform:rotate(180deg)}.Jh0q7G_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)}.Jh0q7G_selectPopupOpen{opacity:1;transform:none}.Jh0q7G_selectPopupClose{opacity:0;pointer-events:none;transform:translateY(-4px)}.Jh0q7G_rangeAnchor{display:inline-flex;position:relative}.Jh0q7G_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}.Jh0q7G_rangeBubble[data-side=above]{bottom:calc(100% + 6px);transform:translateY(4px)}.Jh0q7G_rangeBubble[data-side=below]{top:calc(100% + 6px);transform:translateY(-4px)}.Jh0q7G_rangeBubble[data-open]{opacity:1;visibility:visible;transition:opacity .12s,transform .12s,visibility;transform:none}.Jh0q7G_rangeSlider{appearance:none;cursor:pointer;background:0 0;width:100%;height:18px;margin:0;display:block}.Jh0q7G_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}.Jh0q7G_rangeSlider::-moz-range-track{background:color-mix(in srgb, var(--dsw-alias-label-primary) 12%, transparent);border-radius:999px;height:4px}.Jh0q7G_rangeSlider::-moz-range-progress{background:var(--dsw-alias-brand-primary);border-radius:999px;height:4px}.Jh0q7G_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}.Jh0q7G_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}.Jh0q7G_rangeSlider:active::-webkit-slider-thumb{transform:scale(1.15)}.Jh0q7G_rangeSlider:focus-visible{outline:none}.Jh0q7G_rangeSlider:focus-visible::-webkit-slider-thumb{box-shadow:0 0 0 2px var(--dsw-alias-brand-primary)}.Jh0q7G_rangeSlider:disabled{cursor:not-allowed}.Jh0q7G_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}.Jh0q7G_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}.Jh0q7G_selectOption:hover,.Jh0q7G_selectOptionActive{background:var(--dsw-alias-interactive-bg-hover)}.Jh0q7G_selectOptionSelected{color:var(--dsw-alias-brand-primary);background:color-mix(in srgb, var(--dsw-alias-brand-primary) 10%, transparent);font-weight:500}.Jh0q7G_invalid{color:var(--dsw-alias-state-error-primary,#b42318);margin:0;font-size:12px;line-height:18px}.Jh0q7G_hint{color:var(--dsw-alias-label-secondary);margin:0;font-size:12px;line-height:18px}.Jh0q7G_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}.Jh0q7G_toggleTrack{background:var(--dsw-alias-label-dimmed);border-radius:999px;flex:none;width:36px;height:20px;transition:background-color .18s;position:relative}.Jh0q7G_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}.Jh0q7G_toggle[aria-checked=true] .Jh0q7G_toggleTrack{background:var(--dsw-alias-button-primary-fill,var(--dsw-alias-label-primary))}.Jh0q7G_toggle[aria-checked=true] .Jh0q7G_toggleThumb{translate:var(--toggle-travel) 0;background:var(--dsw-alias-label-primary-foreground,var(--dsw-alias-bg-layer-3))}.Jh0q7G_toggle[data-moved][aria-checked=true] .Jh0q7G_toggleThumb{animation:.35s cubic-bezier(.34,1.45,.64,1) both Jh0q7G_toggle-on}.Jh0q7G_toggle[data-moved][aria-checked=false] .Jh0q7G_toggleThumb{animation:.35s cubic-bezier(.34,1.45,.64,1) both Jh0q7G_toggle-off}@keyframes Jh0q7G_toggle-on{0%{translate:0}55%{translate:calc(var(--toggle-travel) + var(--toggle-overshoot)) 0}80%,to{translate:var(--toggle-travel) 0}}@keyframes Jh0q7G_toggle-off{0%{translate:var(--toggle-travel) 0}55%{translate:calc(0px - var(--toggle-overshoot)) 0}80%,to{translate:0}}.Jh0q7G_toggle:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:2px}.Jh0q7G_toggle:disabled{opacity:.45;cursor:not-allowed}@media (prefers-reduced-motion:reduce){.Jh0q7G_card,.Jh0q7G_header,.Jh0q7G_mark,.Jh0q7G_chevron,.Jh0q7G_chevronOpen,.Jh0q7G_rangeBubble,.Jh0q7G_selectChevron,.Jh0q7G_selectChevronOpen,.Jh0q7G_selectPopup,.Jh0q7G_toggleTrack,.Jh0q7G_toggleThumb{transition:none}.Jh0q7G_toggle[data-moved] .Jh0q7G_toggleThumb{animation:none}.Jh0q7G_disclosure{transition-property:opacity}}";
|
|
11829
11823
|
const tagId$1 = "@linxin666/dsh-client-ui-task-board/packages/dsh-task-board/src/client/settings-card.module.css";
|
|
11830
11824
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$1) + "]") === null) {
|
|
11831
11825
|
const tag = document.createElement("style");
|
|
@@ -11843,12 +11837,11 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
11843
11837
|
"cardOpen": "Jh0q7G_cardOpen",
|
|
11844
11838
|
"chevron": "Jh0q7G_chevron",
|
|
11845
11839
|
"chevronOpen": "Jh0q7G_chevronOpen",
|
|
11840
|
+
"control": "Jh0q7G_control",
|
|
11846
11841
|
"description": "Jh0q7G_description",
|
|
11847
|
-
"discard": "Jh0q7G_discard",
|
|
11848
11842
|
"disclosure": "Jh0q7G_disclosure",
|
|
11849
11843
|
"failed": "Jh0q7G_failed",
|
|
11850
11844
|
"field": "Jh0q7G_field",
|
|
11851
|
-
"footer": "Jh0q7G_footer",
|
|
11852
11845
|
"head": "Jh0q7G_head",
|
|
11853
11846
|
"headText": "Jh0q7G_headText",
|
|
11854
11847
|
"header": "Jh0q7G_header",
|
|
@@ -11862,10 +11855,14 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
11862
11855
|
"mark": "Jh0q7G_mark",
|
|
11863
11856
|
"name": "Jh0q7G_name",
|
|
11864
11857
|
"notExposed": "Jh0q7G_notExposed",
|
|
11865
|
-
"
|
|
11858
|
+
"rangeAnchor": "Jh0q7G_rangeAnchor",
|
|
11859
|
+
"rangeBubble": "Jh0q7G_rangeBubble",
|
|
11860
|
+
"rangeEnds": "Jh0q7G_rangeEnds",
|
|
11861
|
+
"rangeSlider": "Jh0q7G_rangeSlider",
|
|
11866
11862
|
"readOnly": "Jh0q7G_readOnly",
|
|
11867
11863
|
"reset": "Jh0q7G_reset",
|
|
11868
|
-
"
|
|
11864
|
+
"segment": "Jh0q7G_segment",
|
|
11865
|
+
"segmentGroup": "Jh0q7G_segmentGroup",
|
|
11869
11866
|
"select": "Jh0q7G_select",
|
|
11870
11867
|
"selectButton": "Jh0q7G_selectButton",
|
|
11871
11868
|
"selectChevron": "Jh0q7G_selectChevron",
|
|
@@ -11878,7 +11875,10 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
11878
11875
|
"selectPopupClose": "Jh0q7G_selectPopupClose",
|
|
11879
11876
|
"selectPopupOpen": "Jh0q7G_selectPopupOpen",
|
|
11880
11877
|
"selectWrap": "Jh0q7G_selectWrap",
|
|
11878
|
+
"settings-card": "Jh0q7G_settings-card",
|
|
11881
11879
|
"toggle": "Jh0q7G_toggle",
|
|
11880
|
+
"toggle-off": "Jh0q7G_toggle-off",
|
|
11881
|
+
"toggle-on": "Jh0q7G_toggle-on",
|
|
11882
11882
|
"toggleThumb": "Jh0q7G_toggleThumb",
|
|
11883
11883
|
"toggleTrack": "Jh0q7G_toggleTrack"
|
|
11884
11884
|
};
|
|
@@ -11961,15 +11961,264 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
11961
11961
|
});
|
|
11962
11962
|
}
|
|
11963
11963
|
//#endregion
|
|
11964
|
+
//#region src/client/RangeBubble.tsx
|
|
11965
|
+
/**
|
|
11966
|
+
* Coarse adjustment for a bounded number: resting the pointer on the control
|
|
11967
|
+
* (or moving focus into it) raises a small bubble holding a slider across the
|
|
11968
|
+
* field's whole range, so a large change is one drag instead of many presses
|
|
11969
|
+
* or a retyped value. The control itself stays the precise entry.
|
|
11970
|
+
*
|
|
11971
|
+
* The bubble belongs to the anchor's subtree, so moving from the control onto
|
|
11972
|
+
* the bubble never counts as leaving. It opens after a short rest and closes a
|
|
11973
|
+
* moment after the pointer and focus have both gone, so crossing the control
|
|
11974
|
+
* on the way elsewhere does not flash it. While a drag is in progress the
|
|
11975
|
+
* bubble stays put even if the pointer strays off it.
|
|
11976
|
+
*
|
|
11977
|
+
* Dragging reports each value through `onInput`, so the field shows it live;
|
|
11978
|
+
* releasing the thumb, or a key press on it, reports `onCommit` once. The
|
|
11979
|
+
* bubble opens on the side of the control that has room inside the nearest
|
|
11980
|
+
* scrolling ancestor, so a row near the top of a settings page does not hang
|
|
11981
|
+
* its bubble under the page edge.
|
|
11982
|
+
*/
|
|
11983
|
+
/** Rest on the control before the bubble opens. */
|
|
11984
|
+
const OPEN_DELAY_MS = 220;
|
|
11985
|
+
/** Grace after pointer and focus have left before the bubble closes. */
|
|
11986
|
+
const CLOSE_DELAY_MS = 200;
|
|
11987
|
+
/** Room the bubble needs between the control and the scroller's edge. */
|
|
11988
|
+
const BUBBLE_ROOM_PX = 64;
|
|
11989
|
+
/** The nearest ancestor that scrolls vertically, or the viewport's root. */
|
|
11990
|
+
function scroller(node) {
|
|
11991
|
+
for (let parent = node.parentElement; parent !== null; parent = parent.parentElement) {
|
|
11992
|
+
const overflow = getComputedStyle(parent).overflowY;
|
|
11993
|
+
if (overflow === "auto" || overflow === "scroll") return parent;
|
|
11994
|
+
}
|
|
11995
|
+
return node.ownerDocument.documentElement;
|
|
11996
|
+
}
|
|
11997
|
+
/**
|
|
11998
|
+
* Render the control with its coarse-adjustment bubble.
|
|
11999
|
+
* @param props - the range, the value and the two report callbacks.
|
|
12000
|
+
* @returns the anchor holding the control and the bubble.
|
|
12001
|
+
*/
|
|
12002
|
+
function RangeBubble(props) {
|
|
12003
|
+
const { min, max, step, disabled = false } = props;
|
|
12004
|
+
const [open, setOpen] = (0, react.useState)(false);
|
|
12005
|
+
const [side, setSide] = (0, react.useState)("above");
|
|
12006
|
+
const [live, setLive] = (0, react.useState)(null);
|
|
12007
|
+
const anchorRef = (0, react.useRef)(null);
|
|
12008
|
+
const timer = (0, react.useRef)(void 0);
|
|
12009
|
+
const hovered = (0, react.useRef)(false);
|
|
12010
|
+
const focused = (0, react.useRef)(false);
|
|
12011
|
+
const dragging = (0, react.useRef)(false);
|
|
12012
|
+
(0, react.useEffect)(() => () => {
|
|
12013
|
+
clearTimeout(timer.current);
|
|
12014
|
+
}, []);
|
|
12015
|
+
(0, react.useEffect)(() => {
|
|
12016
|
+
if (disabled) {
|
|
12017
|
+
clearTimeout(timer.current);
|
|
12018
|
+
setOpen(false);
|
|
12019
|
+
}
|
|
12020
|
+
}, [disabled]);
|
|
12021
|
+
const show = () => {
|
|
12022
|
+
const anchor = anchorRef.current;
|
|
12023
|
+
if (anchor !== null) {
|
|
12024
|
+
const room = anchor.getBoundingClientRect().top - scroller(anchor).getBoundingClientRect().top;
|
|
12025
|
+
setSide(room >= BUBBLE_ROOM_PX ? "above" : "below");
|
|
12026
|
+
}
|
|
12027
|
+
setOpen(true);
|
|
12028
|
+
};
|
|
12029
|
+
const schedule = () => {
|
|
12030
|
+
clearTimeout(timer.current);
|
|
12031
|
+
if (disabled) return;
|
|
12032
|
+
if (hovered.current || focused.current || dragging.current) {
|
|
12033
|
+
if (!open) timer.current = setTimeout(show, focused.current ? 0 : OPEN_DELAY_MS);
|
|
12034
|
+
return;
|
|
12035
|
+
}
|
|
12036
|
+
timer.current = setTimeout(() => {
|
|
12037
|
+
setOpen(false);
|
|
12038
|
+
}, CLOSE_DELAY_MS);
|
|
12039
|
+
};
|
|
12040
|
+
const commit = (value) => {
|
|
12041
|
+
dragging.current = false;
|
|
12042
|
+
setLive(null);
|
|
12043
|
+
props.onCommit(value);
|
|
12044
|
+
schedule();
|
|
12045
|
+
};
|
|
12046
|
+
const onChange = (event) => {
|
|
12047
|
+
const value = Number(event.target.value);
|
|
12048
|
+
setLive(value);
|
|
12049
|
+
props.onInput(value);
|
|
12050
|
+
};
|
|
12051
|
+
const onKeyUp = (event) => {
|
|
12052
|
+
if (live !== null) commit(live);
|
|
12053
|
+
if (event.key === "Escape") {
|
|
12054
|
+
clearTimeout(timer.current);
|
|
12055
|
+
setOpen(false);
|
|
12056
|
+
}
|
|
12057
|
+
};
|
|
12058
|
+
const shown = live ?? Math.min(max, Math.max(min, props.value));
|
|
12059
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
12060
|
+
ref: anchorRef,
|
|
12061
|
+
className: settings_card_module_css_default.rangeAnchor,
|
|
12062
|
+
onPointerEnter: () => {
|
|
12063
|
+
hovered.current = true;
|
|
12064
|
+
schedule();
|
|
12065
|
+
},
|
|
12066
|
+
onPointerLeave: () => {
|
|
12067
|
+
hovered.current = false;
|
|
12068
|
+
schedule();
|
|
12069
|
+
},
|
|
12070
|
+
onFocus: () => {
|
|
12071
|
+
focused.current = true;
|
|
12072
|
+
schedule();
|
|
12073
|
+
},
|
|
12074
|
+
onBlur: (event) => {
|
|
12075
|
+
if (event.currentTarget.contains(event.relatedTarget)) return;
|
|
12076
|
+
focused.current = false;
|
|
12077
|
+
if (live !== null) commit(live);
|
|
12078
|
+
else schedule();
|
|
12079
|
+
},
|
|
12080
|
+
children: [props.children, /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
12081
|
+
className: settings_card_module_css_default.rangeBubble,
|
|
12082
|
+
"data-open": open ? "" : void 0,
|
|
12083
|
+
"data-side": side,
|
|
12084
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
12085
|
+
type: "range",
|
|
12086
|
+
className: settings_card_module_css_default.rangeSlider,
|
|
12087
|
+
min,
|
|
12088
|
+
max,
|
|
12089
|
+
step,
|
|
12090
|
+
value: shown,
|
|
12091
|
+
"aria-label": props.label,
|
|
12092
|
+
tabIndex: open ? 0 : -1,
|
|
12093
|
+
disabled,
|
|
12094
|
+
style: { "--range-fill": `${(shown - min) / (max - min) * 100}%` },
|
|
12095
|
+
onPointerDown: () => {
|
|
12096
|
+
dragging.current = true;
|
|
12097
|
+
},
|
|
12098
|
+
onPointerUp: (event) => {
|
|
12099
|
+
commit(Number(event.currentTarget.value));
|
|
12100
|
+
},
|
|
12101
|
+
onPointerCancel: (event) => {
|
|
12102
|
+
commit(Number(event.currentTarget.value));
|
|
12103
|
+
},
|
|
12104
|
+
onChange,
|
|
12105
|
+
onKeyUp
|
|
12106
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
12107
|
+
className: settings_card_module_css_default.rangeEnds,
|
|
12108
|
+
"aria-hidden": "true",
|
|
12109
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: min }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: max })]
|
|
12110
|
+
})]
|
|
12111
|
+
})]
|
|
12112
|
+
});
|
|
12113
|
+
}
|
|
12114
|
+
//#endregion
|
|
12115
|
+
//#region src/client/SegmentGroup.tsx
|
|
12116
|
+
/**
|
|
12117
|
+
* The family's segmented control: a quiet track whose options share one
|
|
12118
|
+
* highlight that slides to the pressed option, instead of each option fading
|
|
12119
|
+
* its own background out and the next one in. The settings fields' small
|
|
12120
|
+
* choices and the Web Extensions TAB strip both render through it, so the two
|
|
12121
|
+
* read as one control.
|
|
12122
|
+
*
|
|
12123
|
+
* The caller builds the option buttons and marks the pressed one with
|
|
12124
|
+
* `data-active`; the group measures that button after every render and writes
|
|
12125
|
+
* its box as four custom properties, and the stylesheet draws the highlight
|
|
12126
|
+
* there (`.segmentGroup[data-pill]::before`). Attribute and first placement
|
|
12127
|
+
* land in the same task, so the highlight appears in place and only later
|
|
12128
|
+
* changes slide. A ResizeObserver re-measures when the group or an option
|
|
12129
|
+
* changes size: a longer locale, a font arriving, a container growing, a
|
|
12130
|
+
* strip wrapping onto a second line.
|
|
12131
|
+
*/
|
|
12132
|
+
/** The attribute marking a group whose highlight has been placed. */
|
|
12133
|
+
const PILL_ATTR = "data-pill";
|
|
12134
|
+
/** The pressed option, relative to the group. */
|
|
12135
|
+
const ACTIVE_SELECTOR = ":scope > [data-active]";
|
|
12136
|
+
const PILL_PROPERTIES = [
|
|
12137
|
+
"--segment-pill-x",
|
|
12138
|
+
"--segment-pill-y",
|
|
12139
|
+
"--segment-pill-w",
|
|
12140
|
+
"--segment-pill-h"
|
|
12141
|
+
];
|
|
12142
|
+
/**
|
|
12143
|
+
* Write the highlight's box from the pressed option's box, or take the
|
|
12144
|
+
* highlight off when nothing is pressed or the group has no layout yet.
|
|
12145
|
+
* The two boxes are read in viewport pixels and turned back into the group's
|
|
12146
|
+
* own CSS pixels, so a dialog that opens through a scale transform still
|
|
12147
|
+
* lands the highlight on its option.
|
|
12148
|
+
*/
|
|
12149
|
+
function placePill(group) {
|
|
12150
|
+
const item = group.querySelector(ACTIVE_SELECTOR);
|
|
12151
|
+
const box = group.getBoundingClientRect();
|
|
12152
|
+
if (item === null || group.offsetWidth === 0 || box.width === 0) {
|
|
12153
|
+
group.removeAttribute(PILL_ATTR);
|
|
12154
|
+
for (const property of PILL_PROPERTIES) group.style.removeProperty(property);
|
|
12155
|
+
return;
|
|
12156
|
+
}
|
|
12157
|
+
const scale = box.width / group.offsetWidth;
|
|
12158
|
+
const itemBox = item.getBoundingClientRect();
|
|
12159
|
+
[
|
|
12160
|
+
(itemBox.left - box.left) / scale - group.clientLeft,
|
|
12161
|
+
(itemBox.top - box.top) / scale - group.clientTop,
|
|
12162
|
+
itemBox.width / scale,
|
|
12163
|
+
itemBox.height / scale
|
|
12164
|
+
].forEach((value, index) => {
|
|
12165
|
+
group.style.setProperty(PILL_PROPERTIES[index], `${Math.round(value * 100) / 100}px`);
|
|
12166
|
+
});
|
|
12167
|
+
if (!group.hasAttribute(PILL_ATTR)) group.setAttribute(PILL_ATTR, "");
|
|
12168
|
+
}
|
|
12169
|
+
/**
|
|
12170
|
+
* Render a segmented track around the caller's option buttons.
|
|
12171
|
+
* @param props - the track's attributes (role, accessible name, key handler) and its options.
|
|
12172
|
+
* @returns the track.
|
|
12173
|
+
*/
|
|
12174
|
+
function SegmentGroup(props) {
|
|
12175
|
+
const { children, className, ...rest } = props;
|
|
12176
|
+
const group = (0, react.useRef)(null);
|
|
12177
|
+
const count = react.Children.count(children);
|
|
12178
|
+
(0, react.useLayoutEffect)(() => {
|
|
12179
|
+
if (group.current !== null) placePill(group.current);
|
|
12180
|
+
});
|
|
12181
|
+
(0, react.useLayoutEffect)(() => {
|
|
12182
|
+
const element = group.current;
|
|
12183
|
+
if (element === null || typeof ResizeObserver === "undefined") return void 0;
|
|
12184
|
+
const observer = new ResizeObserver(() => {
|
|
12185
|
+
placePill(element);
|
|
12186
|
+
});
|
|
12187
|
+
observer.observe(element);
|
|
12188
|
+
for (const item of Array.from(element.children)) observer.observe(item);
|
|
12189
|
+
return () => {
|
|
12190
|
+
observer.disconnect();
|
|
12191
|
+
};
|
|
12192
|
+
}, [count]);
|
|
12193
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
12194
|
+
...rest,
|
|
12195
|
+
ref: group,
|
|
12196
|
+
className: className === void 0 ? settings_card_module_css_default.segmentGroup : `${settings_card_module_css_default.segmentGroup} ${className}`,
|
|
12197
|
+
children
|
|
12198
|
+
});
|
|
12199
|
+
}
|
|
12200
|
+
//#endregion
|
|
11964
12201
|
//#region src/client/PluginSettingsCard.tsx
|
|
11965
12202
|
/**
|
|
11966
12203
|
* Family-shared chrome for plugin settings cards: a disclosure header naming
|
|
11967
|
-
* the plugin and what its settings govern, the controls inside, and the
|
|
11968
|
-
* that
|
|
12204
|
+
* the plugin and what its settings govern, the controls inside, and the line
|
|
12205
|
+
* that reports a refused write. A pick is written the moment it is made and a
|
|
12206
|
+
* typed value after a pause, so the card has no save button and nothing waits
|
|
12207
|
+
* on the reader. Renders nothing while the namespace is unavailable — a
|
|
11969
12208
|
* deployment that does not compose the owning plugin should show no trace of
|
|
11970
12209
|
* it. Inlined into each consumer's client bundle; mirrors the official
|
|
11971
12210
|
* ui-plugin-config PluginCard in a self-contained slice.
|
|
12211
|
+
*
|
|
12212
|
+
* Every field inside the body is one settings row: the label and its hint on
|
|
12213
|
+
* the left, the control on the right, a hairline between two rows; a narrow
|
|
12214
|
+
* card stacks the control under the text (settings-card.module.css).
|
|
11972
12215
|
*/
|
|
12216
|
+
/**
|
|
12217
|
+
* What a text field inside a card reaches without its plugin wiring it: write
|
|
12218
|
+
* the pending draft now (Enter, leaving the field) or put it back (Escape).
|
|
12219
|
+
* Picks need neither; they are written the moment they are made.
|
|
12220
|
+
*/
|
|
12221
|
+
const CardApply = (0, react.createContext)(null);
|
|
11973
12222
|
/** Length of the body's disclosure motion; it matches `--settings-card-motion` on the card root. */
|
|
11974
12223
|
const BODY_MOTION_MS = 180;
|
|
11975
12224
|
/**
|
|
@@ -12009,7 +12258,6 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
12009
12258
|
const title = props.t(props.titleKey);
|
|
12010
12259
|
const description = props.t(props.descriptionKey);
|
|
12011
12260
|
const descriptionTitle = props.descriptionTitleKey === void 0 ? description : props.t(props.descriptionTitleKey);
|
|
12012
|
-
const blocked = !state.dirty || state.invalid || state.saving;
|
|
12013
12261
|
const baseClass = expanded ? `${settings_card_module_css_default.cardOpen} ${settings_card_module_css_default.card}` : settings_card_module_css_default.card;
|
|
12014
12262
|
const cardClass = props.density === "nested" ? `${baseClass} ${settings_card_module_css_default.cardNested}` : baseClass;
|
|
12015
12263
|
/** The body region both legs share; a hidden phase renders nothing at all. */
|
|
@@ -12046,11 +12294,6 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
12046
12294
|
props.headerAction !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
12047
12295
|
className: settings_card_module_css_default.headerAction,
|
|
12048
12296
|
children: props.headerAction
|
|
12049
|
-
}) : null,
|
|
12050
|
-
state.dirty ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
12051
|
-
className: settings_card_module_css_default.pending,
|
|
12052
|
-
title: props.t("settings.unsaved"),
|
|
12053
|
-
children: props.t("settings.unsaved")
|
|
12054
12297
|
}) : null
|
|
12055
12298
|
]
|
|
12056
12299
|
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
@@ -12084,11 +12327,6 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
12084
12327
|
className: settings_card_module_css_default.headerAction,
|
|
12085
12328
|
children: props.headerAction
|
|
12086
12329
|
}) : null,
|
|
12087
|
-
state.dirty ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
12088
|
-
className: settings_card_module_css_default.pending,
|
|
12089
|
-
title: props.t("settings.unsaved"),
|
|
12090
|
-
children: props.t("settings.unsaved")
|
|
12091
|
-
}) : null,
|
|
12092
12330
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
|
|
12093
12331
|
width: "14",
|
|
12094
12332
|
height: "14",
|
|
@@ -12119,36 +12357,56 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
12119
12357
|
role: "status",
|
|
12120
12358
|
children: props.t("settings.readOnly")
|
|
12121
12359
|
}) : null,
|
|
12122
|
-
|
|
12123
|
-
|
|
12124
|
-
|
|
12125
|
-
|
|
12126
|
-
|
|
12127
|
-
|
|
12128
|
-
|
|
12129
|
-
|
|
12130
|
-
|
|
12131
|
-
|
|
12132
|
-
|
|
12133
|
-
|
|
12134
|
-
disabled: !state.dirty || state.saving,
|
|
12135
|
-
onClick: props.onDiscard,
|
|
12136
|
-
children: props.t("settings.discard")
|
|
12137
|
-
}),
|
|
12138
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
12139
|
-
type: "button",
|
|
12140
|
-
className: settings_card_module_css_default.save,
|
|
12141
|
-
disabled: blocked,
|
|
12142
|
-
onClick: props.onSave,
|
|
12143
|
-
children: props.t(!state.saving ? "settings.save" : "settings.saving")
|
|
12144
|
-
})
|
|
12145
|
-
]
|
|
12146
|
-
})
|
|
12360
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(CardApply.Provider, {
|
|
12361
|
+
value: {
|
|
12362
|
+
commit: props.onSave,
|
|
12363
|
+
revert: props.onDiscard
|
|
12364
|
+
},
|
|
12365
|
+
children: props.children
|
|
12366
|
+
}),
|
|
12367
|
+
props.hideFooter !== true && state.failed ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
|
|
12368
|
+
className: settings_card_module_css_default.failed,
|
|
12369
|
+
role: "status",
|
|
12370
|
+
children: [props.t("settings.saveFailed"), state.failedReason ? " - " + state.failedReason : ""]
|
|
12371
|
+
}) : null
|
|
12147
12372
|
] })) : null]
|
|
12148
12373
|
});
|
|
12149
12374
|
}
|
|
12150
|
-
/**
|
|
12375
|
+
/**
|
|
12376
|
+
* A typed value field. Its draft is written after a pause in typing, at once on
|
|
12377
|
+
* Enter or when focus leaves, and Escape puts the stored value back. `numeric`
|
|
12378
|
+
* only hints the keypad: which drafts a field accepts is decided by its spec.
|
|
12379
|
+
* A field given a `range` also offers the coarse slider bubble: dragging fills
|
|
12380
|
+
* the draft live and releasing writes it.
|
|
12381
|
+
*/
|
|
12151
12382
|
function ValueField(props) {
|
|
12383
|
+
const apply = (0, react.useContext)(CardApply);
|
|
12384
|
+
const onKeyDown = (event) => {
|
|
12385
|
+
if (apply === null || event.key !== "Enter" && event.key !== "Escape") return;
|
|
12386
|
+
event.preventDefault();
|
|
12387
|
+
if (event.key === "Enter") apply.commit();
|
|
12388
|
+
else apply.revert();
|
|
12389
|
+
event.currentTarget.blur();
|
|
12390
|
+
};
|
|
12391
|
+
const input = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
12392
|
+
id: props.id,
|
|
12393
|
+
className: props.invalid ? settings_card_module_css_default.inputInvalid : settings_card_module_css_default.input,
|
|
12394
|
+
type: "text",
|
|
12395
|
+
...props.numeric === true ? { inputMode: "numeric" } : {},
|
|
12396
|
+
...props.invalid ? { "aria-invalid": true } : {},
|
|
12397
|
+
value: props.text,
|
|
12398
|
+
placeholder: props.placeholder ?? "",
|
|
12399
|
+
disabled: props.disabled,
|
|
12400
|
+
onChange: (event) => {
|
|
12401
|
+
props.onEdit(event.target.value);
|
|
12402
|
+
},
|
|
12403
|
+
onKeyDown,
|
|
12404
|
+
onBlur: () => {
|
|
12405
|
+
apply?.commit();
|
|
12406
|
+
}
|
|
12407
|
+
});
|
|
12408
|
+
const { range } = props;
|
|
12409
|
+
const typed = Number(props.text);
|
|
12152
12410
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
12153
12411
|
className: settings_card_module_css_default.field,
|
|
12154
12412
|
children: [
|
|
@@ -12172,18 +12430,21 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
12172
12430
|
})]
|
|
12173
12431
|
}) : null]
|
|
12174
12432
|
}),
|
|
12175
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
12176
|
-
|
|
12177
|
-
|
|
12178
|
-
|
|
12179
|
-
|
|
12180
|
-
|
|
12181
|
-
value: props.text,
|
|
12182
|
-
placeholder: props.placeholder ?? "",
|
|
12433
|
+
range === void 0 ? input : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RangeBubble, {
|
|
12434
|
+
min: range.min,
|
|
12435
|
+
max: range.max,
|
|
12436
|
+
step: range.step,
|
|
12437
|
+
value: props.text.trim() === "" || Number.isNaN(typed) ? range.min : typed,
|
|
12438
|
+
label: `${props.label} ${range.min}–${range.max}`,
|
|
12183
12439
|
disabled: props.disabled,
|
|
12184
|
-
|
|
12185
|
-
props.onEdit(
|
|
12186
|
-
}
|
|
12440
|
+
onInput: (value) => {
|
|
12441
|
+
props.onEdit(String(value));
|
|
12442
|
+
},
|
|
12443
|
+
onCommit: (value) => {
|
|
12444
|
+
props.onEdit(String(value));
|
|
12445
|
+
apply?.commit();
|
|
12446
|
+
},
|
|
12447
|
+
children: input
|
|
12187
12448
|
}),
|
|
12188
12449
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
12189
12450
|
className: props.invalid ? settings_card_module_css_default.invalid : settings_card_module_css_default.hint,
|
|
@@ -12203,8 +12464,8 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
12203
12464
|
* renders the legacy native `<select>` untouched, so element-level skin
|
|
12204
12465
|
* selectors keep working; under the default appearance it renders a
|
|
12205
12466
|
* self-drawn `role="listbox"` popup whose open/close is transition-animated.
|
|
12206
|
-
*
|
|
12207
|
-
*
|
|
12467
|
+
* Cards reach it through BooleanField/ChoiceField; editors outside a card
|
|
12468
|
+
* (the side-card prefs) bind it directly through onEdit.
|
|
12208
12469
|
* 双模式下拉框:皮肤激活时用原生 select,默认外观用自绘动画弹层。
|
|
12209
12470
|
*/
|
|
12210
12471
|
function SelectField(props) {
|
|
@@ -12362,14 +12623,48 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
12362
12623
|
}) : null]
|
|
12363
12624
|
});
|
|
12364
12625
|
}
|
|
12365
|
-
/**
|
|
12626
|
+
/**
|
|
12627
|
+
* A visible segmented group for a small set of mutually exclusive values.
|
|
12628
|
+
* Every option stays on screen, so inherit/on/off and short enum fields take
|
|
12629
|
+
* one click without opening a popup. The pressed option carries the group's
|
|
12630
|
+
* sliding highlight and `aria-pressed`; the group takes the field label as its
|
|
12631
|
+
* accessible name.
|
|
12632
|
+
*/
|
|
12633
|
+
function SegmentField(props) {
|
|
12634
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SegmentGroup, {
|
|
12635
|
+
id: props.id,
|
|
12636
|
+
role: "group",
|
|
12637
|
+
"aria-label": props.label,
|
|
12638
|
+
"aria-invalid": props.invalid || void 0,
|
|
12639
|
+
children: props.options.map((option, index) => {
|
|
12640
|
+
const active = option.value === props.value;
|
|
12641
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
12642
|
+
type: "button",
|
|
12643
|
+
className: settings_card_module_css_default.segment,
|
|
12644
|
+
"aria-pressed": active,
|
|
12645
|
+
disabled: props.disabled,
|
|
12646
|
+
"data-active": active ? "" : void 0,
|
|
12647
|
+
"data-segment-index": index,
|
|
12648
|
+
onClick: () => {
|
|
12649
|
+
if (!active) props.onEdit(option.value);
|
|
12650
|
+
},
|
|
12651
|
+
children: option.label
|
|
12652
|
+
}, option.value);
|
|
12653
|
+
})
|
|
12654
|
+
});
|
|
12655
|
+
}
|
|
12656
|
+
/** A boolean field: 继承 / 开 / 关. */
|
|
12366
12657
|
function BooleanField(props) {
|
|
12658
|
+
const segmented = props.presentation !== "select";
|
|
12367
12659
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
12368
12660
|
className: settings_card_module_css_default.field,
|
|
12369
12661
|
children: [
|
|
12370
12662
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
12371
12663
|
className: settings_card_module_css_default.head,
|
|
12372
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("
|
|
12664
|
+
children: [segmented ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
12665
|
+
className: settings_card_module_css_default.label,
|
|
12666
|
+
children: props.label
|
|
12667
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
|
|
12373
12668
|
className: settings_card_module_css_default.label,
|
|
12374
12669
|
htmlFor: props.id,
|
|
12375
12670
|
children: props.label
|
|
@@ -12387,7 +12682,28 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
12387
12682
|
})]
|
|
12388
12683
|
}) : null]
|
|
12389
12684
|
}),
|
|
12390
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
12685
|
+
segmented ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SegmentField, {
|
|
12686
|
+
id: props.id,
|
|
12687
|
+
label: props.label,
|
|
12688
|
+
options: [
|
|
12689
|
+
{
|
|
12690
|
+
value: "",
|
|
12691
|
+
label: props.inheritLabel
|
|
12692
|
+
},
|
|
12693
|
+
{
|
|
12694
|
+
value: "true",
|
|
12695
|
+
label: props.onLabel
|
|
12696
|
+
},
|
|
12697
|
+
{
|
|
12698
|
+
value: "false",
|
|
12699
|
+
label: props.offLabel
|
|
12700
|
+
}
|
|
12701
|
+
],
|
|
12702
|
+
value: props.text,
|
|
12703
|
+
disabled: props.disabled,
|
|
12704
|
+
invalid: props.invalid,
|
|
12705
|
+
onEdit: props.onEdit
|
|
12706
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectField, {
|
|
12391
12707
|
id: props.id,
|
|
12392
12708
|
options: [
|
|
12393
12709
|
{
|
|
@@ -12416,14 +12732,22 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
12416
12732
|
]
|
|
12417
12733
|
});
|
|
12418
12734
|
}
|
|
12419
|
-
/**
|
|
12735
|
+
/** An enumerated field, selecting or segmenting its small choice set. */
|
|
12420
12736
|
function ChoiceField(props) {
|
|
12737
|
+
const segmented = props.presentation === "segment";
|
|
12738
|
+
const options = [{
|
|
12739
|
+
value: "",
|
|
12740
|
+
label: props.inheritLabel
|
|
12741
|
+
}, ...props.choices];
|
|
12421
12742
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
12422
12743
|
className: settings_card_module_css_default.field,
|
|
12423
12744
|
children: [
|
|
12424
12745
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
12425
12746
|
className: settings_card_module_css_default.head,
|
|
12426
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("
|
|
12747
|
+
children: [segmented ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
12748
|
+
className: settings_card_module_css_default.label,
|
|
12749
|
+
children: props.label
|
|
12750
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
|
|
12427
12751
|
className: settings_card_module_css_default.label,
|
|
12428
12752
|
htmlFor: props.id,
|
|
12429
12753
|
children: props.label
|
|
@@ -12441,12 +12765,17 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
12441
12765
|
})]
|
|
12442
12766
|
}) : null]
|
|
12443
12767
|
}),
|
|
12444
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
12768
|
+
segmented ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SegmentField, {
|
|
12445
12769
|
id: props.id,
|
|
12446
|
-
|
|
12447
|
-
|
|
12448
|
-
|
|
12449
|
-
|
|
12770
|
+
label: props.label,
|
|
12771
|
+
options,
|
|
12772
|
+
value: props.text,
|
|
12773
|
+
disabled: props.disabled,
|
|
12774
|
+
invalid: props.invalid,
|
|
12775
|
+
onEdit: props.onEdit
|
|
12776
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectField, {
|
|
12777
|
+
id: props.id,
|
|
12778
|
+
options,
|
|
12450
12779
|
value: props.text,
|
|
12451
12780
|
disabled: props.disabled,
|
|
12452
12781
|
invalid: props.invalid,
|
|
@@ -12460,12 +12789,14 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
12460
12789
|
]
|
|
12461
12790
|
});
|
|
12462
12791
|
}
|
|
12463
|
-
|
|
12464
|
-
|
|
12465
|
-
|
|
12466
|
-
|
|
12792
|
+
/**
|
|
12793
|
+
* A free-text field. An empty draft clears the field. `entry` is `pick` when
|
|
12794
|
+
* the text arrives whole from a picker (a preset or a reasoning level).
|
|
12795
|
+
*/
|
|
12796
|
+
function textField(field, entry = "type") {
|
|
12467
12797
|
return {
|
|
12468
12798
|
field,
|
|
12799
|
+
entry,
|
|
12469
12800
|
format: (value) => typeof value === "string" ? value : "",
|
|
12470
12801
|
parse: (text) => {
|
|
12471
12802
|
const trimmed = text.trim();
|
|
@@ -12480,6 +12811,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
12480
12811
|
function booleanField(field) {
|
|
12481
12812
|
return {
|
|
12482
12813
|
field,
|
|
12814
|
+
entry: "pick",
|
|
12483
12815
|
format: (value) => typeof value === "boolean" ? String(value) : "",
|
|
12484
12816
|
parse: (text) => {
|
|
12485
12817
|
const trimmed = text.trim();
|
|
@@ -12499,6 +12831,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
12499
12831
|
function choiceField(field, choices) {
|
|
12500
12832
|
return {
|
|
12501
12833
|
field,
|
|
12834
|
+
entry: "pick",
|
|
12502
12835
|
format: (value) => typeof value === "string" && choices.includes(value) ? value : "",
|
|
12503
12836
|
parse: (text) => {
|
|
12504
12837
|
if (text === "") return { kind: "clear" };
|
|
@@ -12510,12 +12843,14 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
12510
12843
|
};
|
|
12511
12844
|
}
|
|
12512
12845
|
/**
|
|
12513
|
-
*
|
|
12846
|
+
* Applies one card's edits to one settings namespace as the reader makes them.
|
|
12514
12847
|
*
|
|
12515
12848
|
* The Host is the only authority on whether a value was accepted — its
|
|
12516
12849
|
* validators own the constraints no schema can express — so the outcome is
|
|
12517
|
-
* read back from the section rather than predicted here. A
|
|
12518
|
-
* land
|
|
12850
|
+
* read back from the section rather than predicted here. A write that did not
|
|
12851
|
+
* land puts each pick back to the stored value, the way a switch that could not
|
|
12852
|
+
* flip springs back, and keeps typed text so the reader can correct it instead
|
|
12853
|
+
* of retyping.
|
|
12519
12854
|
*/
|
|
12520
12855
|
var CardForm = class {
|
|
12521
12856
|
scope;
|
|
@@ -12525,6 +12860,8 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
12525
12860
|
/** The form subscription installed in the constructor; released by dispose(). */
|
|
12526
12861
|
disposeForm;
|
|
12527
12862
|
disposed = false;
|
|
12863
|
+
/** The pending write of typed text, waiting for typing to pause. */
|
|
12864
|
+
typePause;
|
|
12528
12865
|
saving = false;
|
|
12529
12866
|
/** A save asked for while one was in flight; it runs once the first settles (#1754). */
|
|
12530
12867
|
saveQueued = false;
|
|
@@ -12545,6 +12882,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
12545
12882
|
dispose() {
|
|
12546
12883
|
if (this.disposed) return;
|
|
12547
12884
|
this.disposed = true;
|
|
12885
|
+
clearTimeout(this.typePause);
|
|
12548
12886
|
this.disposeForm();
|
|
12549
12887
|
this.listeners.clear();
|
|
12550
12888
|
}
|
|
@@ -12556,7 +12894,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
12556
12894
|
});
|
|
12557
12895
|
return store;
|
|
12558
12896
|
}
|
|
12559
|
-
/** Read the card-level state: what the Host serves, and what
|
|
12897
|
+
/** Read the card-level state: what the Host serves, and what is still waiting to be written. */
|
|
12560
12898
|
shell() {
|
|
12561
12899
|
const snapshot = this.scope.getSnapshot();
|
|
12562
12900
|
const plan = this.plan();
|
|
@@ -12603,9 +12941,10 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
12603
12941
|
});
|
|
12604
12942
|
},
|
|
12605
12943
|
save: () => {
|
|
12606
|
-
this.
|
|
12944
|
+
this.applyNow();
|
|
12607
12945
|
},
|
|
12608
12946
|
discard: () => {
|
|
12947
|
+
clearTimeout(this.typePause);
|
|
12609
12948
|
if (this.staged.size === 0 && !this.failed) return;
|
|
12610
12949
|
this.staged.clear();
|
|
12611
12950
|
this.failed = false;
|
|
@@ -12615,32 +12954,14 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
12615
12954
|
};
|
|
12616
12955
|
}
|
|
12617
12956
|
/**
|
|
12618
|
-
*
|
|
12619
|
-
* what the Host accepted.
|
|
12620
|
-
*
|
|
12621
|
-
* The whole batch rides one mutate, so cross-field validate hooks
|
|
12622
|
-
* (baseURL+model) judge it as a unit: the Host either applies every write
|
|
12623
|
-
* or refuses the batch. The form contract answers a refusal or a skipped
|
|
12624
|
-
* write with `false` (it recovers with a fresh Host view instead of
|
|
12625
|
-
* throwing), so the outcome is judged twice: the answer itself, and then the
|
|
12626
|
-
* settled snapshot read back one planned write at a time. One missed write
|
|
12627
|
-
* fails the whole save. A transport that rejects instead (the dsh-web bridge
|
|
12628
|
-
* controller on a dead connection) reports through the same failure path
|
|
12629
|
-
* with its rejection message. A save that did not land keeps its drafts, so
|
|
12630
|
-
* the user can correct them instead of retyping.
|
|
12631
|
-
* @returns settlement after the mutation and the read-back.
|
|
12632
|
-
*/
|
|
12633
|
-
/**
|
|
12634
|
-
* Run one save, and re-run it once if another was asked for while this one
|
|
12957
|
+
* Run one write, and re-run it once if another was asked for while this one
|
|
12635
12958
|
* was still in flight.
|
|
12636
12959
|
*
|
|
12637
|
-
* A
|
|
12638
|
-
* the Host runs
|
|
12639
|
-
*
|
|
12640
|
-
*
|
|
12641
|
-
*
|
|
12642
|
-
* another is still settling runs against the settled state - which is what
|
|
12643
|
-
* the operator meant by pressing it again.
|
|
12960
|
+
* A write is a Host round trip that also drives the profile reconcile, and
|
|
12961
|
+
* the Host runs it inside one exclusive transaction. Answering an edit that
|
|
12962
|
+
* arrives mid-flight by returning immediately dropped it with no explanation
|
|
12963
|
+
* (#1754). Serializing instead means an edit made while another write is
|
|
12964
|
+
* still settling is written against the settled state.
|
|
12644
12965
|
* @returns settlement after the mutation and the read-back.
|
|
12645
12966
|
*/
|
|
12646
12967
|
async requestSave() {
|
|
@@ -12653,12 +12974,28 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
12653
12974
|
this.saveQueued = false;
|
|
12654
12975
|
await this.requestSave();
|
|
12655
12976
|
}
|
|
12977
|
+
/**
|
|
12978
|
+
* Write every valid draft in one atomic form mutation, then re-seed from
|
|
12979
|
+
* what the Host accepted. A draft the field does not accept stays on screen,
|
|
12980
|
+
* unwritten, without holding the others back.
|
|
12981
|
+
*
|
|
12982
|
+
* The batch rides one mutate, so cross-field validate hooks (baseURL+model)
|
|
12983
|
+
* judge it as a unit: the Host either applies every write or refuses the
|
|
12984
|
+
* batch. The form contract answers a refusal or a skipped write with `false`
|
|
12985
|
+
* (it recovers with a fresh Host view instead of throwing), so the outcome is
|
|
12986
|
+
* judged twice: the answer itself, and then the settled snapshot read back
|
|
12987
|
+
* one planned write at a time. One missed write fails the whole batch. A
|
|
12988
|
+
* transport that rejects instead (the dsh-web bridge controller on a dead
|
|
12989
|
+
* connection) reports through the same failure path with its rejection
|
|
12990
|
+
* message. A batch that did not land puts its picks and clears back to the
|
|
12991
|
+
* stored value and keeps its typed text, so the reader can correct it.
|
|
12992
|
+
* @returns settlement after the mutation and the read-back.
|
|
12993
|
+
*/
|
|
12656
12994
|
async save() {
|
|
12657
|
-
const
|
|
12658
|
-
|
|
12659
|
-
if (plan.length === 0 || this.saving || valid.length !== plan.length) return;
|
|
12995
|
+
const valid = this.plan().filter((item) => item.judge !== void 0);
|
|
12996
|
+
if (valid.length === 0 || this.saving) return;
|
|
12660
12997
|
const pending = /* @__PURE__ */ new Map();
|
|
12661
|
-
for (const item of
|
|
12998
|
+
for (const item of valid) pending.set(item.field, this.staged.get(item.field));
|
|
12662
12999
|
this.saving = true;
|
|
12663
13000
|
this.failed = false;
|
|
12664
13001
|
this.failedReason = void 0;
|
|
@@ -12679,16 +13016,19 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
12679
13016
|
failedReason = error instanceof Error ? error.message : String(error);
|
|
12680
13017
|
}
|
|
12681
13018
|
const landed = accepted && failedReason === void 0 && valid.every((item) => item.judge());
|
|
12682
|
-
for (const [field, before] of pending)
|
|
13019
|
+
for (const [field, before] of pending) {
|
|
13020
|
+
if (this.staged.get(field) !== before) continue;
|
|
13021
|
+
if (landed || before === void 0 || before.clear || this.specOf(field).entry === "pick") this.staged.delete(field);
|
|
13022
|
+
}
|
|
12683
13023
|
this.saving = false;
|
|
12684
13024
|
this.failed = !landed;
|
|
12685
13025
|
this.failedReason = failedReason;
|
|
12686
13026
|
this.publish();
|
|
12687
13027
|
}
|
|
12688
13028
|
/**
|
|
12689
|
-
* Every staged edit a
|
|
12690
|
-
* its field accepts carries no write: the form is still dirty, and the
|
|
12691
|
-
*
|
|
13029
|
+
* Every staged edit a write would carry. An entry whose draft is not a value
|
|
13030
|
+
* its field accepts carries no write: the form is still dirty, and the draft
|
|
13031
|
+
* stays on screen rather than being dropped. A staged edit that matches the
|
|
12692
13032
|
* effective section is not a write at all.
|
|
12693
13033
|
* @returns the planned writes, in the order the fields were staged.
|
|
12694
13034
|
*/
|
|
@@ -12752,11 +13092,30 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
12752
13092
|
landedUnset(field) {
|
|
12753
13093
|
return !this.stored(field);
|
|
12754
13094
|
}
|
|
13095
|
+
/**
|
|
13096
|
+
* Take one edit and schedule its write: a pick or a clear is written now,
|
|
13097
|
+
* typed text once typing has rested for TYPE_PAUSE_MS.
|
|
13098
|
+
*/
|
|
12755
13099
|
stage(field, edit) {
|
|
12756
13100
|
this.staged.set(field, edit);
|
|
12757
13101
|
this.failed = false;
|
|
12758
13102
|
this.failedReason = void 0;
|
|
12759
13103
|
this.publish();
|
|
13104
|
+
if (edit.clear || this.specOf(field).entry === "pick") {
|
|
13105
|
+
this.applyNow();
|
|
13106
|
+
return;
|
|
13107
|
+
}
|
|
13108
|
+
clearTimeout(this.typePause);
|
|
13109
|
+
this.typePause = setTimeout(() => {
|
|
13110
|
+
this.applyNow();
|
|
13111
|
+
}, 600);
|
|
13112
|
+
}
|
|
13113
|
+
/** Write every pending draft now, taking the place of a waiting pause. */
|
|
13114
|
+
applyNow() {
|
|
13115
|
+
clearTimeout(this.typePause);
|
|
13116
|
+
this.typePause = void 0;
|
|
13117
|
+
if (this.disposed) return;
|
|
13118
|
+
this.requestSave();
|
|
12760
13119
|
}
|
|
12761
13120
|
specOf(field) {
|
|
12762
13121
|
const spec = this.specs.get(field);
|
|
@@ -12819,6 +13178,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
12819
13178
|
function sessionPollField() {
|
|
12820
13179
|
return {
|
|
12821
13180
|
field: "sessionPollSeconds",
|
|
13181
|
+
entry: "type",
|
|
12822
13182
|
format: (value) => typeof value === "number" && Number.isInteger(value) ? String(value) : "",
|
|
12823
13183
|
parse: (text) => {
|
|
12824
13184
|
const trimmed = text.trim();
|
|
@@ -12841,6 +13201,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
12841
13201
|
function subtaskDepthField() {
|
|
12842
13202
|
return {
|
|
12843
13203
|
field: "maxSubtaskDepth",
|
|
13204
|
+
entry: "pick",
|
|
12844
13205
|
format: (value) => typeof value === "number" && Number.isInteger(value) ? String(value) : "",
|
|
12845
13206
|
parse: (text) => {
|
|
12846
13207
|
const trimmed = text.trim();
|
|
@@ -12861,6 +13222,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
12861
13222
|
function runLaunchWidthField() {
|
|
12862
13223
|
return {
|
|
12863
13224
|
field: "runLaunchWidth",
|
|
13225
|
+
entry: "type",
|
|
12864
13226
|
format: (value) => typeof value === "number" && Number.isInteger(value) ? String(value) : "",
|
|
12865
13227
|
parse: (text) => {
|
|
12866
13228
|
const trimmed = text.trim();
|
|
@@ -12882,6 +13244,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
12882
13244
|
function spendBudgetField() {
|
|
12883
13245
|
return {
|
|
12884
13246
|
field: "spendBudgetTokens",
|
|
13247
|
+
entry: "type",
|
|
12885
13248
|
format: (value) => typeof value === "number" && Number.isInteger(value) ? String(value) : "",
|
|
12886
13249
|
parse: (text) => {
|
|
12887
13250
|
const trimmed = text.trim();
|
|
@@ -12904,6 +13267,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
12904
13267
|
function modelRouteField(field) {
|
|
12905
13268
|
return {
|
|
12906
13269
|
field,
|
|
13270
|
+
entry: "pick",
|
|
12907
13271
|
format: (value) => typeof value === "string" ? value : "",
|
|
12908
13272
|
parse: (text) => {
|
|
12909
13273
|
const trimmed = text.trim();
|
|
@@ -12937,11 +13301,11 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
12937
13301
|
booleanField("goalRunEnabled"),
|
|
12938
13302
|
booleanField("goalVerification"),
|
|
12939
13303
|
modelRouteField("goalVerificationModel"),
|
|
12940
|
-
textField("goalVerificationReasoningEffort"),
|
|
12941
|
-
textField("cardDefaultMode"),
|
|
13304
|
+
textField("goalVerificationReasoningEffort", "pick"),
|
|
13305
|
+
textField("cardDefaultMode", "pick"),
|
|
12942
13306
|
choiceField("cardDefaultPermission", TASK_PERMISSIONS),
|
|
12943
13307
|
modelRouteField("cardDefaultModel"),
|
|
12944
|
-
textField("cardDefaultReasoningEffort")
|
|
13308
|
+
textField("cardDefaultReasoningEffort", "pick")
|
|
12945
13309
|
]);
|
|
12946
13310
|
this.store = this.form.bind(() => this.projection());
|
|
12947
13311
|
}
|
|
@@ -13138,7 +13502,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
13138
13502
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(PluginSettingsCard, {
|
|
13139
13503
|
t,
|
|
13140
13504
|
density: "nested",
|
|
13141
|
-
titleKey: "settings.
|
|
13505
|
+
titleKey: "settings.enabledTopic",
|
|
13142
13506
|
descriptionKey: "settings.enabledCardHint",
|
|
13143
13507
|
defaultOpen: false,
|
|
13144
13508
|
hideFooter: true,
|
|
@@ -13220,6 +13584,11 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
13220
13584
|
hint: t("settings.sessionPollSecondsHintBrief"),
|
|
13221
13585
|
hintTitle: t("settings.sessionPollSecondsHint"),
|
|
13222
13586
|
numeric: true,
|
|
13587
|
+
range: {
|
|
13588
|
+
min: 1,
|
|
13589
|
+
max: 300,
|
|
13590
|
+
step: 1
|
|
13591
|
+
},
|
|
13223
13592
|
...fieldProps,
|
|
13224
13593
|
...state.sessionPollSeconds,
|
|
13225
13594
|
onEdit: (text) => {
|
|
@@ -13254,6 +13623,11 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
13254
13623
|
hint: t("settings.runLaunchWidthHintBrief"),
|
|
13255
13624
|
hintTitle: t("settings.runLaunchWidthHint"),
|
|
13256
13625
|
numeric: true,
|
|
13626
|
+
range: {
|
|
13627
|
+
min: 1,
|
|
13628
|
+
max: 16,
|
|
13629
|
+
step: 1
|
|
13630
|
+
},
|
|
13257
13631
|
...fieldProps,
|
|
13258
13632
|
...state.runLaunchWidth,
|
|
13259
13633
|
onEdit: (text) => {
|
|
@@ -13896,7 +14270,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
13896
14270
|
/** The building package's version, when the bundle carries it. */
|
|
13897
14271
|
function bakedVersion() {
|
|
13898
14272
|
try {
|
|
13899
|
-
return "0.4.
|
|
14273
|
+
return "0.4.11";
|
|
13900
14274
|
} catch {
|
|
13901
14275
|
return;
|
|
13902
14276
|
}
|
|
@@ -14071,6 +14445,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
14071
14445
|
if (reconciling) return;
|
|
14072
14446
|
const target = familyGroupLoaded(ctx) ? FAMILY_PLUGIN_CARD_SEAT : OFFICIAL_PLUGIN_CARD_SEAT;
|
|
14073
14447
|
if (current === target) return;
|
|
14448
|
+
if (typeof slots.spec === "function" && slots.spec(target) === void 0) return;
|
|
14074
14449
|
reconciling = true;
|
|
14075
14450
|
const previous = dispose;
|
|
14076
14451
|
dispose = void 0;
|