@jingyi0605/codingns4dsh 0.2.1-beta.11 → 0.2.1-beta.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/README.en.md +7 -5
- package/README.md +9 -5
- package/data/build/dist/bootstrap/dsh-connection-adapter.d.ts +1 -1
- package/data/build/dist/bootstrap/index.d.ts +1 -1
- package/data/build/dist/client/bundle.js +2280 -1495
- package/data/build/dist/client/bundle.js.map +1 -1
- package/data/build/dist/client/cli-slots.d.ts +3 -2
- package/data/build/dist/client/cli-slots.d.ts.map +1 -1
- package/data/build/dist/client/cli-slots.js +29 -5
- package/data/build/dist/client/cli-slots.js.map +1 -1
- package/data/build/dist/client/client.assistant-configuration-view.js +5 -5
- package/data/build/dist/client/client.assistant-configuration-view.js.map +1 -1
- package/data/build/dist/client/client.moss-voice-output.js +0 -166
- package/data/build/dist/client/client.moss-voice-output.js.map +1 -1
- package/data/build/dist/client/client.native-workspace-store.js +4 -4
- package/data/build/dist/client/client.native-workspace-store.js.map +1 -1
- package/data/build/dist/client/client.react-dom.js +166 -0
- package/data/build/dist/client/client.react-dom.js.map +1 -1
- package/data/build/dist/client/client.session-translation.js +9 -1
- package/data/build/dist/client/client.session-translation.js.map +1 -1
- package/data/build/dist/client/client.transport.js +46 -0
- package/data/build/dist/client/client.transport.js.map +1 -1
- package/data/build/dist/client/conversation-translation-settings.d.ts +10 -0
- package/data/build/dist/client/conversation-translation-settings.d.ts.map +1 -0
- package/data/build/dist/client/conversation-translation-settings.js +52 -0
- package/data/build/dist/client/conversation-translation-settings.js.map +1 -0
- package/data/build/dist/client/desktop-assistant.js +512 -439
- package/data/build/dist/client/features/cli-adapters.js +1 -1
- package/data/build/dist/client/features/cli-adapters.js.map +1 -1
- package/data/build/dist/client/features/session-translation.d.ts.map +1 -1
- package/data/build/dist/client/features/session-translation.js +7 -1
- package/data/build/dist/client/features/session-translation.js.map +1 -1
- package/data/build/dist/client/locales/panels.d.ts.map +1 -1
- package/data/build/dist/client/locales/panels.js +46 -0
- package/data/build/dist/client/locales/panels.js.map +1 -1
- package/data/build/dist/client/session-translation-chat.d.ts +9 -3
- package/data/build/dist/client/session-translation-chat.d.ts.map +1 -1
- package/data/build/dist/client/session-translation-chat.js +146 -48
- package/data/build/dist/client/session-translation-chat.js.map +1 -1
- package/data/build/dist/client/session-translation-pending-dom.d.ts +1 -1
- package/data/build/dist/client/session-translation-pending-dom.d.ts.map +1 -1
- package/data/build/dist/client/session-translation-pending-dom.js +4 -4
- package/data/build/dist/client/session-translation-pending-dom.js.map +1 -1
- package/data/build/dist/client/session-translation-retry.d.ts +16 -0
- package/data/build/dist/client/session-translation-retry.d.ts.map +1 -0
- package/data/build/dist/client/session-translation-retry.js +66 -0
- package/data/build/dist/client/session-translation-retry.js.map +1 -0
- package/data/build/dist/client/session-translation-rules.d.ts +13 -0
- package/data/build/dist/client/session-translation-rules.d.ts.map +1 -0
- package/data/build/dist/client/session-translation-rules.js +58 -0
- package/data/build/dist/client/session-translation-rules.js.map +1 -0
- package/data/build/dist/client/style.css +276 -276
- package/data/build/dist/dsh-capabilities/client/interaction-presentation-adapter.d.ts.map +1 -1
- package/data/build/dist/dsh-capabilities/client/interaction-presentation-adapter.js +4 -13
- package/data/build/dist/dsh-capabilities/client/interaction-presentation-adapter.js.map +1 -1
- package/data/build/dist/dsh-capabilities/client/interaction-text-dom.js +1 -1
- package/data/build/dist/dsh-capabilities/client/interaction-text-dom.js.map +1 -1
- package/data/build/dist/dsh-capabilities/client/message-presentation-adapter.d.ts +19 -0
- package/data/build/dist/dsh-capabilities/client/message-presentation-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/client/message-presentation-adapter.js +39 -0
- package/data/build/dist/dsh-capabilities/client/message-presentation-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/client/slot-presentation-mirror.d.ts +2 -0
- package/data/build/dist/dsh-capabilities/client/slot-presentation-mirror.d.ts.map +1 -1
- package/data/build/dist/dsh-capabilities/client/slot-presentation-mirror.js +28 -0
- package/data/build/dist/dsh-capabilities/client/slot-presentation-mirror.js.map +1 -1
- package/data/build/dist/dsh-capabilities/host/connection-peer-adapter.d.ts +10 -0
- package/data/build/dist/dsh-capabilities/host/connection-peer-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/connection-peer-adapter.js +34 -0
- package/data/build/dist/dsh-capabilities/host/connection-peer-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/native-dispatch-adapter.d.ts +21 -0
- package/data/build/dist/dsh-capabilities/host/native-dispatch-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/native-dispatch-adapter.js +11 -0
- package/data/build/dist/dsh-capabilities/host/native-dispatch-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/session-activation-adapter.d.ts +17 -0
- package/data/build/dist/dsh-capabilities/host/session-activation-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/session-activation-adapter.js +37 -0
- package/data/build/dist/dsh-capabilities/host/session-activation-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/session-model-selection-adapter.d.ts +17 -0
- package/data/build/dist/dsh-capabilities/host/session-model-selection-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/session-model-selection-adapter.js +45 -0
- package/data/build/dist/dsh-capabilities/host/session-model-selection-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/host/session-prompt-adapter.d.ts +28 -0
- package/data/build/dist/dsh-capabilities/host/session-prompt-adapter.d.ts.map +1 -0
- package/data/build/dist/dsh-capabilities/host/session-prompt-adapter.js +31 -0
- package/data/build/dist/dsh-capabilities/host/session-prompt-adapter.js.map +1 -0
- package/data/build/dist/dsh-capabilities/matrix.d.ts.map +1 -1
- package/data/build/dist/dsh-capabilities/matrix.js +12 -4
- package/data/build/dist/dsh-capabilities/matrix.js.map +1 -1
- package/data/build/dist/dsh-capabilities/routes.d.ts.map +1 -1
- package/data/build/dist/dsh-capabilities/routes.js +25 -5
- package/data/build/dist/dsh-capabilities/routes.js.map +1 -1
- package/data/build/dist/dsh-capabilities/types.d.ts +1 -1
- package/data/build/dist/dsh-capabilities/types.d.ts.map +1 -1
- package/data/build/dist/dsh-capabilities/types.js.map +1 -1
- package/data/build/dist/host/cli-adapters/antigravity-driver.js +1 -1
- package/data/build/dist/host/cli-adapters/antigravity-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/attachment-utils.d.ts +4 -3
- package/data/build/dist/host/cli-adapters/attachment-utils.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/attachment-utils.js +9 -8
- package/data/build/dist/host/cli-adapters/attachment-utils.js.map +1 -1
- package/data/build/dist/host/cli-adapters/claude-driver.js +1 -1
- package/data/build/dist/host/cli-adapters/claude-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/command-code-driver.js +1 -1
- package/data/build/dist/host/cli-adapters/command-code-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/driver.d.ts +2 -0
- package/data/build/dist/host/cli-adapters/driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/dsh-message-projector.d.ts +2 -0
- package/data/build/dist/host/cli-adapters/dsh-message-projector.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/dsh-message-projector.js +11 -3
- package/data/build/dist/host/cli-adapters/dsh-message-projector.js.map +1 -1
- package/data/build/dist/host/cli-adapters/feature.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/feature.js +154 -68
- package/data/build/dist/host/cli-adapters/feature.js.map +1 -1
- package/data/build/dist/host/cli-adapters/gemini-driver.js +1 -1
- package/data/build/dist/host/cli-adapters/gemini-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/grok-driver.d.ts +1 -0
- package/data/build/dist/host/cli-adapters/grok-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/grok-driver.js +128 -40
- package/data/build/dist/host/cli-adapters/grok-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/kimi-driver.js +2 -2
- package/data/build/dist/host/cli-adapters/kimi-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/mcode-driver.js +1 -1
- package/data/build/dist/host/cli-adapters/mcode-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/native-team-subagent.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/native-team-subagent.js +2 -1
- package/data/build/dist/host/cli-adapters/native-team-subagent.js.map +1 -1
- package/data/build/dist/host/cli-adapters/pi-driver.js +1 -1
- package/data/build/dist/host/cli-adapters/pi-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/registry.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/registry.js +23 -16
- package/data/build/dist/host/cli-adapters/registry.js.map +1 -1
- package/data/build/dist/host/cli-adapters/zcode-driver.js +1 -1
- package/data/build/dist/host/cli-adapters/zcode-driver.js.map +1 -1
- package/data/build/dist/host/features/global-voice-rpc.d.ts.map +1 -1
- package/data/build/dist/host/features/global-voice-rpc.js +2 -3
- package/data/build/dist/host/features/global-voice-rpc.js.map +1 -1
- package/data/build/dist/host/features/peer-host.js +6 -6
- package/data/build/dist/host/features/peer-host.js.map +1 -1
- package/data/build/dist/host/features/session-prompt-translation.d.ts +10 -0
- package/data/build/dist/host/features/session-prompt-translation.d.ts.map +1 -0
- package/data/build/dist/host/features/session-prompt-translation.js +197 -0
- package/data/build/dist/host/features/session-prompt-translation.js.map +1 -0
- package/data/build/dist/host/features/session-translation-protection.d.ts +6 -1
- package/data/build/dist/host/features/session-translation-protection.d.ts.map +1 -1
- package/data/build/dist/host/features/session-translation-protection.js +23 -5
- package/data/build/dist/host/features/session-translation-protection.js.map +1 -1
- package/data/build/dist/host/features/session-translation-recovery.d.ts +20 -0
- package/data/build/dist/host/features/session-translation-recovery.d.ts.map +1 -0
- package/data/build/dist/host/features/session-translation-recovery.js +122 -0
- package/data/build/dist/host/features/session-translation-recovery.js.map +1 -0
- package/data/build/dist/host/features/session-translation-service.d.ts +5 -2
- package/data/build/dist/host/features/session-translation-service.d.ts.map +1 -1
- package/data/build/dist/host/features/session-translation-service.js +60 -16
- package/data/build/dist/host/features/session-translation-service.js.map +1 -1
- package/data/build/dist/host/features/session-translation.d.ts.map +1 -1
- package/data/build/dist/host/features/session-translation.js +4 -1
- package/data/build/dist/host/features/session-translation.js.map +1 -1
- package/data/build/dist/host/modules/peer-host/peer-host-native-dispatch.d.ts +2 -2
- package/data/build/dist/host/modules/peer-host/peer-host-native-dispatch.d.ts.map +1 -1
- package/data/build/dist/host/modules/peer-host/peer-host-native-dispatch.js +10 -9
- package/data/build/dist/host/modules/peer-host/peer-host-native-dispatch.js.map +1 -1
- package/data/build/dist/host/modules/peer-host/peer-host-native-streams.d.ts +3 -3
- package/data/build/dist/host/modules/peer-host/peer-host-native-streams.d.ts.map +1 -1
- package/data/build/dist/host/modules/peer-host/peer-host-native-streams.js +26 -14
- package/data/build/dist/host/modules/peer-host/peer-host-native-streams.js.map +1 -1
- package/data/build/dist/host/native-session-bridge.d.ts +2 -1
- package/data/build/dist/host/native-session-bridge.d.ts.map +1 -1
- package/data/build/dist/host/native-session-bridge.js +5 -13
- package/data/build/dist/host/native-session-bridge.js.map +1 -1
- package/data/build/dist/host/rpc.d.ts.map +1 -1
- package/data/build/dist/host/rpc.js +14 -8
- package/data/build/dist/host/rpc.js.map +1 -1
- package/data/build/dist/host/settings.d.ts.map +1 -1
- package/data/build/dist/host/settings.js +5 -1
- package/data/build/dist/host/settings.js.map +1 -1
- package/data/build/dist/shared/attachment-prompts.d.ts +11 -0
- package/data/build/dist/shared/attachment-prompts.d.ts.map +1 -0
- package/data/build/dist/shared/attachment-prompts.js +17 -0
- package/data/build/dist/shared/attachment-prompts.js.map +1 -0
- package/data/build/dist/shared/contracts/cli-adapter.d.ts +8 -1
- package/data/build/dist/shared/contracts/cli-adapter.d.ts.map +1 -1
- package/data/build/dist/shared/contracts/errors.d.ts +2 -2
- package/data/build/dist/shared/contracts/session-translation.d.ts +13 -0
- package/data/build/dist/shared/contracts/session-translation.d.ts.map +1 -1
- package/data/build/dist/shared/contracts/session-translation.js +10 -0
- package/data/build/dist/shared/contracts/session-translation.js.map +1 -1
- package/data/build/dist/shared/contracts/version.d.ts +4 -4
- package/data/build/dist/shared/contracts/version.js +3 -3
- package/package.json +35 -34
- package/profile/README.md +2 -2
- package/profile/package.json +3 -3
- package/profile/version.json +3 -3
- package/version.json +3 -3
|
@@ -8991,6 +8991,12 @@
|
|
|
8991
8991
|
"cli.adapterDisabled": "{name} disabled",
|
|
8992
8992
|
"cli.translationConversation": "Translate conversation",
|
|
8993
8993
|
"cli.translationConversationToggle": "Toggle conversation translation",
|
|
8994
|
+
"cli.translationSettings": "Conversation translation settings",
|
|
8995
|
+
"cli.translationSettingsClose": "Close",
|
|
8996
|
+
"cli.translationSettingsDescription": "Choose which messages to translate in conversations with translation enabled.",
|
|
8997
|
+
"cli.translationUserMessages": "Translate user messages",
|
|
8998
|
+
"cli.translationThinkingMessages": "Translate AI thinking messages",
|
|
8999
|
+
"cli.translationAssistantMessages": "Translate AI final messages",
|
|
8994
9000
|
"lan.fieldListenPort": "listen port",
|
|
8995
9001
|
"lan.fieldDshPort": "DSH local port",
|
|
8996
9002
|
"lan.fieldMustBeNumber": "{field} must be a number",
|
|
@@ -9003,6 +9009,17 @@
|
|
|
9003
9009
|
"translation.outputTitle": "Translate the AI’s reasoning and final messages into the language specified below",
|
|
9004
9010
|
"translation.outputLanguage": "Reply language",
|
|
9005
9011
|
"translation.modelTitle": "Translation model pool",
|
|
9012
|
+
"translation.rulesTitle": "Translation rules",
|
|
9013
|
+
"translation.rulesHelp": "Rules apply to input, reasoning, and replies, including text already in the target language. They take priority over the default translation prompts.",
|
|
9014
|
+
"translation.rulesEmpty": "No custom rules. The default translation prompts apply.",
|
|
9015
|
+
"translation.ruleAdd": "Add rule",
|
|
9016
|
+
"translation.ruleEdit": "Edit rule {number}",
|
|
9017
|
+
"translation.ruleRemove": "Remove rule {number}",
|
|
9018
|
+
"translation.ruleText": "Rule instructions",
|
|
9019
|
+
"translation.rulePlaceholder": "For example: Keep product names in their original language.",
|
|
9020
|
+
"translation.ruleSave": "Save rule",
|
|
9021
|
+
"translation.ruleSaving": "Saving…",
|
|
9022
|
+
"translation.ruleCancel": "Cancel",
|
|
9006
9023
|
"translation.modelFollowDefault": "Use the default DSH model",
|
|
9007
9024
|
"translation.modelResetTitle": "Use the default DSH model?",
|
|
9008
9025
|
"translation.modelResetHelp": "This will clear all {count} models and their priority order from the pool, then follow the default DSH model. Continue?",
|
|
@@ -9034,6 +9051,12 @@
|
|
|
9034
9051
|
"translation.statusTranslating": "Translating…",
|
|
9035
9052
|
"translation.progressHelp": "Preparing and translating your message. The translation result will be available when this finishes.",
|
|
9036
9053
|
"translation.statusFailed": "Translation failed; original kept",
|
|
9054
|
+
"translation.retry": "Retry translation",
|
|
9055
|
+
"translation.sendDirectly": "Send directly",
|
|
9056
|
+
"translation.cancelSending": "Cancel sending",
|
|
9057
|
+
"translation.inputFailedTitle": "Message translation failed",
|
|
9058
|
+
"translation.inputFailedHelp": "Your message has not been sent. Choose how to continue.",
|
|
9059
|
+
"translation.decisionFailed": "Could not apply your choice. Please try again.",
|
|
9037
9060
|
"translation.statusNotNeeded": "Already in the target language; translation skipped",
|
|
9038
9061
|
"translation.detectedLanguage": "Detected language",
|
|
9039
9062
|
"translation.modelNotUsed": "Not used; translation was unnecessary",
|
|
@@ -9069,6 +9092,12 @@
|
|
|
9069
9092
|
"cli.adapterDisabled": "已停用 {name}",
|
|
9070
9093
|
"cli.translationConversation": "翻译对话",
|
|
9071
9094
|
"cli.translationConversationToggle": "切换对话翻译",
|
|
9095
|
+
"cli.translationSettings": "对话翻译设置",
|
|
9096
|
+
"cli.translationSettingsClose": "关闭",
|
|
9097
|
+
"cli.translationSettingsDescription": "选择已开启对话翻译的会话中需要翻译的消息类型。",
|
|
9098
|
+
"cli.translationUserMessages": "翻译用户消息",
|
|
9099
|
+
"cli.translationThinkingMessages": "翻译 AI 思考消息",
|
|
9100
|
+
"cli.translationAssistantMessages": "翻译 AI 正式消息",
|
|
9072
9101
|
"lan.fieldListenPort": "监听端口",
|
|
9073
9102
|
"lan.fieldDshPort": "DSH 本地端口",
|
|
9074
9103
|
"lan.fieldMustBeNumber": "{field} 必须是数字",
|
|
@@ -9081,6 +9110,17 @@
|
|
|
9081
9110
|
"translation.outputTitle": "AI的思考内容和正式消息翻译为以下指定语言",
|
|
9082
9111
|
"translation.outputLanguage": "回复语言",
|
|
9083
9112
|
"translation.modelTitle": "翻译模型池",
|
|
9113
|
+
"translation.rulesTitle": "翻译规则",
|
|
9114
|
+
"translation.rulesHelp": "规则适用于输入、思考和回复,包括已经是目标语言的文本。规则的优先级高于默认翻译提示词。",
|
|
9115
|
+
"translation.rulesEmpty": "尚未添加自定义规则,使用默认翻译提示词。",
|
|
9116
|
+
"translation.ruleAdd": "添加规则",
|
|
9117
|
+
"translation.ruleEdit": "编辑规则 {number}",
|
|
9118
|
+
"translation.ruleRemove": "移除规则 {number}",
|
|
9119
|
+
"translation.ruleText": "规则内容",
|
|
9120
|
+
"translation.rulePlaceholder": "例如:产品名称保留原文,不进行翻译。",
|
|
9121
|
+
"translation.ruleSave": "保存规则",
|
|
9122
|
+
"translation.ruleSaving": "正在保存…",
|
|
9123
|
+
"translation.ruleCancel": "取消",
|
|
9084
9124
|
"translation.modelFollowDefault": "跟随 DSH 默认模型",
|
|
9085
9125
|
"translation.modelResetTitle": "确认跟随 DSH 默认模型?",
|
|
9086
9126
|
"translation.modelResetHelp": "这将清空模型池中的全部 {count} 个模型及其优先级顺序,并改为跟随 DSH 默认模型。是否继续?",
|
|
@@ -9112,6 +9152,12 @@
|
|
|
9112
9152
|
"translation.statusTranslating": "正在翻译…",
|
|
9113
9153
|
"translation.progressHelp": "正在准备并翻译消息,完成后可查看翻译结果。",
|
|
9114
9154
|
"translation.statusFailed": "翻译失败,已保留原文",
|
|
9155
|
+
"translation.retry": "重试翻译",
|
|
9156
|
+
"translation.sendDirectly": "直接发送",
|
|
9157
|
+
"translation.cancelSending": "取消发送",
|
|
9158
|
+
"translation.inputFailedTitle": "消息翻译失败",
|
|
9159
|
+
"translation.inputFailedHelp": "消息尚未发送,请选择如何继续。",
|
|
9160
|
+
"translation.decisionFailed": "未能应用你的选择,请重试。",
|
|
9115
9161
|
"translation.statusNotNeeded": "原文已是目标语言,无需翻译",
|
|
9116
9162
|
"translation.detectedLanguage": "检测到的语言",
|
|
9117
9163
|
"translation.modelNotUsed": "未调用,原文无需翻译",
|
|
@@ -11602,84 +11648,77 @@
|
|
|
11602
11648
|
return n;
|
|
11603
11649
|
}
|
|
11604
11650
|
//#endregion
|
|
11605
|
-
//#region node_modules/.pnpm/@deepseek-ai+dsh-client-ui-primitives@0.2.1-alpha.
|
|
11651
|
+
//#region node_modules/.pnpm/@deepseek-ai+dsh-client-ui-primitives@0.2.1-alpha.3_@deepseek-ai+cordis@4.0.5-alpha.2/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/TextShimmer.module.css
|
|
11606
11652
|
var TextShimmer_module_default = {
|
|
11607
|
-
"content": "
|
|
11608
|
-
"decoration": "
|
|
11609
|
-
"dsh-row-shimmer-highlight": "
|
|
11610
|
-
"dsh-row-shimmer-sweep": "
|
|
11611
|
-
"highlight": "
|
|
11612
|
-
"root": "
|
|
11613
|
-
"sweep": "
|
|
11614
|
-
"text": "
|
|
11653
|
+
"content": "JPqLFa_content",
|
|
11654
|
+
"decoration": "JPqLFa_decoration",
|
|
11655
|
+
"dsh-row-shimmer-highlight": "JPqLFa_dsh-row-shimmer-highlight",
|
|
11656
|
+
"dsh-row-shimmer-sweep": "JPqLFa_dsh-row-shimmer-sweep",
|
|
11657
|
+
"highlight": "JPqLFa_highlight",
|
|
11658
|
+
"root": "JPqLFa_root",
|
|
11659
|
+
"sweep": "JPqLFa_sweep",
|
|
11660
|
+
"text": "JPqLFa_text"
|
|
11615
11661
|
};
|
|
11616
11662
|
//#endregion
|
|
11617
|
-
//#region node_modules/.pnpm/@deepseek-ai+dsh-client-ui-primitives@0.2.1-alpha.
|
|
11663
|
+
//#region node_modules/.pnpm/@deepseek-ai+dsh-client-ui-primitives@0.2.1-alpha.3_@deepseek-ai+cordis@4.0.5-alpha.2/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/DisclosureRow.module.css
|
|
11618
11664
|
var DisclosureRow_module_default = {
|
|
11619
|
-
"chevronHover": "
|
|
11620
|
-
"header": "
|
|
11621
|
-
"iconIdle": "
|
|
11622
|
-
"leading": "
|
|
11623
|
-
"root": "
|
|
11624
|
-
"row": "
|
|
11625
|
-
"title": "
|
|
11665
|
+
"chevronHover": "HRTIjW_chevronHover",
|
|
11666
|
+
"header": "HRTIjW_header",
|
|
11667
|
+
"iconIdle": "HRTIjW_iconIdle",
|
|
11668
|
+
"leading": "HRTIjW_leading",
|
|
11669
|
+
"root": "HRTIjW_root",
|
|
11670
|
+
"row": "HRTIjW_row",
|
|
11671
|
+
"title": "HRTIjW_title"
|
|
11626
11672
|
};
|
|
11627
11673
|
//#endregion
|
|
11628
|
-
//#region node_modules/.pnpm/@deepseek-ai+dsh-client-ui-primitives@0.2.1-alpha.
|
|
11674
|
+
//#region node_modules/.pnpm/@deepseek-ai+dsh-client-ui-primitives@0.2.1-alpha.3_@deepseek-ai+cordis@4.0.5-alpha.2/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/Button.module.css
|
|
11629
11675
|
var Button_module_default = {
|
|
11630
|
-
"button": "
|
|
11631
|
-
"ghost": "
|
|
11632
|
-
"icon": "
|
|
11633
|
-
"md": "
|
|
11634
|
-
"outline": "
|
|
11635
|
-
"primary": "
|
|
11636
|
-
"sm": "
|
|
11637
|
-
"toolbar": "
|
|
11676
|
+
"button": "qwxocG_button",
|
|
11677
|
+
"ghost": "qwxocG_ghost",
|
|
11678
|
+
"icon": "qwxocG_icon",
|
|
11679
|
+
"md": "qwxocG_md",
|
|
11680
|
+
"outline": "qwxocG_outline",
|
|
11681
|
+
"primary": "qwxocG_primary",
|
|
11682
|
+
"sm": "qwxocG_sm",
|
|
11683
|
+
"toolbar": "qwxocG_toolbar"
|
|
11638
11684
|
};
|
|
11639
11685
|
//#endregion
|
|
11640
|
-
//#region node_modules/.pnpm/@deepseek-ai+dsh-client-ui-primitives@0.2.1-alpha.
|
|
11686
|
+
//#region node_modules/.pnpm/@deepseek-ai+dsh-client-ui-primitives@0.2.1-alpha.3_@deepseek-ai+cordis@4.0.5-alpha.2/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/Input.module.css
|
|
11641
11687
|
var Input_module_default = {
|
|
11642
|
-
"icon": "
|
|
11643
|
-
"input": "
|
|
11644
|
-
"wrap": "
|
|
11688
|
+
"icon": "Z9tYSa_icon",
|
|
11689
|
+
"input": "Z9tYSa_input",
|
|
11690
|
+
"wrap": "Z9tYSa_wrap"
|
|
11645
11691
|
};
|
|
11646
11692
|
//#endregion
|
|
11647
|
-
//#region node_modules/.pnpm/@deepseek-ai+dsh-client-ui-primitives@0.2.1-alpha.
|
|
11693
|
+
//#region node_modules/.pnpm/@deepseek-ai+dsh-client-ui-primitives@0.2.1-alpha.3_@deepseek-ai+cordis@4.0.5-alpha.2/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/ShortcutKeys.module.css
|
|
11648
11694
|
var import_react_dom = require_react_dom();
|
|
11649
11695
|
var ShortcutKeys_module_default = {
|
|
11650
|
-
"joined": "
|
|
11651
|
-
"key": "
|
|
11652
|
-
"keys": "
|
|
11653
|
-
"separator": "
|
|
11654
|
-
"tooltip": "
|
|
11696
|
+
"joined": "QXraKa_joined",
|
|
11697
|
+
"key": "QXraKa_key",
|
|
11698
|
+
"keys": "QXraKa_keys",
|
|
11699
|
+
"separator": "QXraKa_separator",
|
|
11700
|
+
"tooltip": "QXraKa_tooltip"
|
|
11655
11701
|
};
|
|
11656
11702
|
//#endregion
|
|
11657
|
-
//#region node_modules/.pnpm/@deepseek-ai+dsh-client-ui-primitives@0.2.1-alpha.
|
|
11703
|
+
//#region node_modules/.pnpm/@deepseek-ai+dsh-client-ui-primitives@0.2.1-alpha.3_@deepseek-ai+cordis@4.0.5-alpha.2/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/MenuSurface.module.css
|
|
11658
11704
|
var MenuSurface_module_default = {
|
|
11659
|
-
"backing": "
|
|
11660
|
-
"compact": "
|
|
11661
|
-
"material": "
|
|
11662
|
-
"surface": "
|
|
11705
|
+
"backing": "UijD9G_backing",
|
|
11706
|
+
"compact": "UijD9G_compact",
|
|
11707
|
+
"material": "UijD9G_material",
|
|
11708
|
+
"surface": "UijD9G_surface"
|
|
11663
11709
|
};
|
|
11664
11710
|
//#endregion
|
|
11665
|
-
//#region node_modules/.pnpm/@deepseek-ai+dsh-client-ui-primitives@0.2.1-alpha.
|
|
11666
|
-
var Tooltip_module_default = {
|
|
11667
|
-
"bubble": "hMkNvq_bubble",
|
|
11668
|
-
"label": "hMkNvq_label",
|
|
11669
|
-
"tooltip-in": "hMkNvq_tooltip-in"
|
|
11670
|
-
};
|
|
11671
|
-
//#endregion
|
|
11672
|
-
//#region node_modules/.pnpm/@deepseek-ai+dsh-client-ui-primitives@0.2.1-alpha.2_@deepseek-ai+cordis@4.0.4/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/HoverCard.module.css
|
|
11711
|
+
//#region node_modules/.pnpm/@deepseek-ai+dsh-client-ui-primitives@0.2.1-alpha.3_@deepseek-ai+cordis@4.0.5-alpha.2/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/HoverCard.module.css
|
|
11673
11712
|
var HoverCard_module_default = {
|
|
11674
|
-
"card": "
|
|
11675
|
-
"copied": "
|
|
11676
|
-
"copyable": "
|
|
11677
|
-
"feedback": "
|
|
11678
|
-
"inline": "
|
|
11679
|
-
"media": "
|
|
11680
|
-
"preview": "
|
|
11681
|
-
"root": "
|
|
11682
|
-
"status": "
|
|
11713
|
+
"card": "wtRhtW_card",
|
|
11714
|
+
"copied": "wtRhtW_copied",
|
|
11715
|
+
"copyable": "wtRhtW_copyable",
|
|
11716
|
+
"feedback": "wtRhtW_feedback",
|
|
11717
|
+
"inline": "wtRhtW_inline",
|
|
11718
|
+
"media": "wtRhtW_media",
|
|
11719
|
+
"preview": "wtRhtW_preview",
|
|
11720
|
+
"root": "wtRhtW_root",
|
|
11721
|
+
"status": "wtRhtW_status"
|
|
11683
11722
|
};
|
|
11684
11723
|
//#endregion
|
|
11685
11724
|
//#region node_modules/.pnpm/simple-icons@16.31.0/node_modules/simple-icons/index.mjs
|
|
@@ -12043,19 +12082,26 @@
|
|
|
12043
12082
|
hex: "0084FF"
|
|
12044
12083
|
};
|
|
12045
12084
|
//#endregion
|
|
12046
|
-
//#region node_modules/.pnpm/@deepseek-ai+dsh-client-ui-primitives@0.2.1-alpha.
|
|
12085
|
+
//#region node_modules/.pnpm/@deepseek-ai+dsh-client-ui-primitives@0.2.1-alpha.3_@deepseek-ai+cordis@4.0.5-alpha.2/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/markdown/MarkdownText.module.css
|
|
12047
12086
|
var MarkdownText_module_default = {
|
|
12048
|
-
"compact": "
|
|
12049
|
-
"fileLink": "
|
|
12050
|
-
"fileMention": "
|
|
12051
|
-
"image": "
|
|
12052
|
-
"imageAlt": "
|
|
12053
|
-
"imageButton": "
|
|
12054
|
-
"linkIcon": "
|
|
12055
|
-
"markdown": "
|
|
12056
|
-
"previewName": "
|
|
12057
|
-
"tableFill": "
|
|
12058
|
-
"tableScroll": "
|
|
12087
|
+
"compact": "JW1tIq_compact",
|
|
12088
|
+
"fileLink": "JW1tIq_fileLink",
|
|
12089
|
+
"fileMention": "JW1tIq_fileMention",
|
|
12090
|
+
"image": "JW1tIq_image",
|
|
12091
|
+
"imageAlt": "JW1tIq_imageAlt",
|
|
12092
|
+
"imageButton": "JW1tIq_imageButton",
|
|
12093
|
+
"linkIcon": "JW1tIq_linkIcon",
|
|
12094
|
+
"markdown": "JW1tIq_markdown",
|
|
12095
|
+
"previewName": "JW1tIq_previewName",
|
|
12096
|
+
"tableFill": "JW1tIq_tableFill",
|
|
12097
|
+
"tableScroll": "JW1tIq_tableScroll"
|
|
12098
|
+
};
|
|
12099
|
+
//#endregion
|
|
12100
|
+
//#region node_modules/.pnpm/@deepseek-ai+dsh-client-ui-primitives@0.2.1-alpha.3_@deepseek-ai+cordis@4.0.5-alpha.2/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/Tooltip.module.css
|
|
12101
|
+
var Tooltip_module_default = {
|
|
12102
|
+
"bubble": "PhTCOW_bubble",
|
|
12103
|
+
"label": "PhTCOW_label",
|
|
12104
|
+
"tooltip-in": "PhTCOW_tooltip-in"
|
|
12059
12105
|
};
|
|
12060
12106
|
//#endregion
|
|
12061
12107
|
//#region node_modules/.pnpm/@shikijs+types@4.5.0/node_modules/@shikijs/types/dist/index.mjs
|
|
@@ -22614,7 +22660,7 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
22614
22660
|
json_default = [lang$72];
|
|
22615
22661
|
}));
|
|
22616
22662
|
//#endregion
|
|
22617
|
-
//#region node_modules/.pnpm/@deepseek-ai+dsh-util-code-language@0.2.1-alpha.
|
|
22663
|
+
//#region node_modules/.pnpm/@deepseek-ai+dsh-util-code-language@0.2.1-alpha.3_@deepseek-ai+cordis@4.0.5-alpha.2/node_modules/@deepseek-ai/dsh-util-code-language/lib/index.js
|
|
22618
22664
|
init_typescript();
|
|
22619
22665
|
init_shellscript();
|
|
22620
22666
|
init_json();
|
|
@@ -23255,15 +23301,15 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
23255
23301
|
};
|
|
23256
23302
|
})))();
|
|
23257
23303
|
var CodeCard_module_default = {
|
|
23258
|
-
"action": "
|
|
23259
|
-
"actions": "
|
|
23260
|
-
"body": "
|
|
23261
|
-
"card": "
|
|
23262
|
-
"header": "
|
|
23263
|
-
"heading": "
|
|
23264
|
-
"language": "
|
|
23265
|
-
"status": "
|
|
23266
|
-
"title": "
|
|
23304
|
+
"action": "YsOdSa_action",
|
|
23305
|
+
"actions": "YsOdSa_actions",
|
|
23306
|
+
"body": "YsOdSa_body",
|
|
23307
|
+
"card": "YsOdSa_card",
|
|
23308
|
+
"header": "YsOdSa_header",
|
|
23309
|
+
"heading": "YsOdSa_heading",
|
|
23310
|
+
"language": "YsOdSa_language",
|
|
23311
|
+
"status": "YsOdSa_status",
|
|
23312
|
+
"title": "YsOdSa_title"
|
|
23267
23313
|
};
|
|
23268
23314
|
//#endregion
|
|
23269
23315
|
//#region node_modules/.pnpm/diff@9.0.0/node_modules/diff/libesm/diff/base.js
|
|
@@ -23780,17 +23826,17 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
23780
23826
|
};
|
|
23781
23827
|
new ArrayDiff();
|
|
23782
23828
|
//#endregion
|
|
23783
|
-
//#region node_modules/.pnpm/@deepseek-ai+dsh-client-ui-primitives@0.2.1-alpha.
|
|
23829
|
+
//#region node_modules/.pnpm/@deepseek-ai+dsh-client-ui-primitives@0.2.1-alpha.3_@deepseek-ai+cordis@4.0.5-alpha.2/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/DiffBlock.module.css
|
|
23784
23830
|
var DiffBlock_module_default = {
|
|
23785
|
-
"add": "
|
|
23786
|
-
"block": "
|
|
23787
|
-
"body": "
|
|
23788
|
-
"context": "
|
|
23789
|
-
"del": "
|
|
23790
|
-
"expand": "
|
|
23791
|
-
"gap": "
|
|
23792
|
-
"line": "
|
|
23793
|
-
"path": "
|
|
23831
|
+
"add": "L2QO-G_add",
|
|
23832
|
+
"block": "L2QO-G_block",
|
|
23833
|
+
"body": "L2QO-G_body",
|
|
23834
|
+
"context": "L2QO-G_context",
|
|
23835
|
+
"del": "L2QO-G_del",
|
|
23836
|
+
"expand": "L2QO-G_expand",
|
|
23837
|
+
"gap": "L2QO-G_gap",
|
|
23838
|
+
"line": "L2QO-G_line",
|
|
23839
|
+
"path": "L2QO-G_path"
|
|
23794
23840
|
};
|
|
23795
23841
|
//#endregion
|
|
23796
23842
|
//#region node_modules/.pnpm/mdast-util-to-string@4.0.0/node_modules/mdast-util-to-string/lib/index.js
|
|
@@ -63516,35 +63562,35 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
63516
63562
|
chunkString: "chunkString"
|
|
63517
63563
|
};
|
|
63518
63564
|
//#endregion
|
|
63519
|
-
//#region node_modules/.pnpm/@deepseek-ai+dsh-client-ui-primitives@0.2.1-alpha.
|
|
63565
|
+
//#region node_modules/.pnpm/@deepseek-ai+dsh-client-ui-primitives@0.2.1-alpha.3_@deepseek-ai+cordis@4.0.5-alpha.2/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/markdown/CodeBlock.module.css
|
|
63520
63566
|
var CodeBlock_module_default = {
|
|
63521
|
-
"action": "
|
|
63522
|
-
"banner": "
|
|
63523
|
-
"bannerWrap": "
|
|
63524
|
-
"block": "
|
|
63525
|
-
"card": "
|
|
63526
|
-
"content": "
|
|
63527
|
-
"copyButton": "
|
|
63528
|
-
"infostring": "
|
|
63529
|
-
"numbered": "
|
|
63530
|
-
"plain": "
|
|
63531
|
-
"shiki": "
|
|
63567
|
+
"action": "DPs2Ha_action",
|
|
63568
|
+
"banner": "DPs2Ha_banner",
|
|
63569
|
+
"bannerWrap": "DPs2Ha_bannerWrap",
|
|
63570
|
+
"block": "DPs2Ha_block",
|
|
63571
|
+
"card": "DPs2Ha_card",
|
|
63572
|
+
"content": "DPs2Ha_content",
|
|
63573
|
+
"copyButton": "DPs2Ha_copyButton",
|
|
63574
|
+
"infostring": "DPs2Ha_infostring",
|
|
63575
|
+
"numbered": "DPs2Ha_numbered",
|
|
63576
|
+
"plain": "DPs2Ha_plain",
|
|
63577
|
+
"shiki": "DPs2Ha_shiki"
|
|
63532
63578
|
};
|
|
63533
63579
|
//#endregion
|
|
63534
|
-
//#region node_modules/.pnpm/@deepseek-ai+dsh-client-ui-primitives@0.2.1-alpha.
|
|
63580
|
+
//#region node_modules/.pnpm/@deepseek-ai+dsh-client-ui-primitives@0.2.1-alpha.3_@deepseek-ai+cordis@4.0.5-alpha.2/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/ImageLightbox.module.css
|
|
63535
63581
|
var ImageLightbox_module_default = {
|
|
63536
|
-
"backdrop": "
|
|
63537
|
-
"close": "
|
|
63538
|
-
"image": "
|
|
63539
|
-
"mask": "
|
|
63540
|
-
"stage": "
|
|
63582
|
+
"backdrop": "D0cLTG_backdrop",
|
|
63583
|
+
"close": "D0cLTG_close",
|
|
63584
|
+
"image": "D0cLTG_image",
|
|
63585
|
+
"mask": "D0cLTG_mask",
|
|
63586
|
+
"stage": "D0cLTG_stage"
|
|
63541
63587
|
};
|
|
63542
63588
|
//#endregion
|
|
63543
|
-
//#region node_modules/.pnpm/@deepseek-ai+dsh-client-ui-primitives@0.2.1-alpha.
|
|
63589
|
+
//#region node_modules/.pnpm/@deepseek-ai+dsh-client-ui-primitives@0.2.1-alpha.3_@deepseek-ai+cordis@4.0.5-alpha.2/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/ImagePreview.module.css
|
|
63544
63590
|
var ImagePreview_module_default = {
|
|
63545
|
-
"frame": "
|
|
63546
|
-
"image": "
|
|
63547
|
-
"status": "
|
|
63591
|
+
"frame": "FtSukG_frame",
|
|
63592
|
+
"image": "FtSukG_image",
|
|
63593
|
+
"status": "FtSukG_status"
|
|
63548
63594
|
};
|
|
63549
63595
|
//#endregion
|
|
63550
63596
|
//#region node_modules/.pnpm/@shikijs+langs@4.5.0/node_modules/@shikijs/langs/dist/python.mjs
|
|
@@ -64277,7 +64323,7 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
64277
64323
|
groovy_default = [lang];
|
|
64278
64324
|
}));
|
|
64279
64325
|
//#endregion
|
|
64280
|
-
//#region node_modules/.pnpm/@deepseek-ai+dsh-client-ui-primitives@0.2.1-alpha.
|
|
64326
|
+
//#region node_modules/.pnpm/@deepseek-ai+dsh-client-ui-primitives@0.2.1-alpha.3_@deepseek-ai+cordis@4.0.5-alpha.2/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/index.js
|
|
64281
64327
|
init_typescript();
|
|
64282
64328
|
init_shellscript();
|
|
64283
64329
|
init_json();
|
|
@@ -64856,317 +64902,8 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
64856
64902
|
el.remove();
|
|
64857
64903
|
}
|
|
64858
64904
|
}
|
|
64859
|
-
/**
|
|
64860
|
-
|
|
64861
|
-
* Tooltips follow the last input; rings follow navigation or a key followed by
|
|
64862
|
-
* focus on a different control. Modifiers and refocusing alone keep rings silent.
|
|
64863
|
-
* Module-level listeners live for the document lifetime; Node imports are inert.
|
|
64864
|
-
*/
|
|
64865
|
-
/** Modality values published on the document element. */
|
|
64866
|
-
const INPUT_MODALITY = {
|
|
64867
|
-
pointer: "pointer",
|
|
64868
|
-
keyboard: "keyboard"
|
|
64869
|
-
};
|
|
64870
|
-
/** Attribute carrying whether focus navigation last owned focus. */
|
|
64871
|
-
const INPUT_MODALITY_ATTRIBUTE = "data-input-modality";
|
|
64872
|
-
const FOCUS_NAVIGATION = /* @__PURE__ */ new Set([
|
|
64873
|
-
"Tab",
|
|
64874
|
-
"Home",
|
|
64875
|
-
"End",
|
|
64876
|
-
"PageUp",
|
|
64877
|
-
"PageDown"
|
|
64878
|
-
]);
|
|
64879
|
-
let pointer = false;
|
|
64880
|
-
let pointerOwnsFocus = false;
|
|
64881
|
-
let keyFocusOrigin;
|
|
64882
|
-
function publish() {
|
|
64883
|
-
document.documentElement.setAttribute(INPUT_MODALITY_ATTRIBUTE, pointerOwnsFocus ? INPUT_MODALITY.pointer : INPUT_MODALITY.keyboard);
|
|
64884
|
-
}
|
|
64885
|
-
/**
|
|
64886
|
-
* Whether the last input came from a pointer, independently of ring visibility.
|
|
64887
|
-
* @returns True after pointer input; false after any key.
|
|
64888
|
-
*/
|
|
64889
|
-
function pointerModality() {
|
|
64890
|
-
return pointer;
|
|
64891
|
-
}
|
|
64892
|
-
if (typeof window !== "undefined") {
|
|
64893
|
-
window.addEventListener("pointerdown", () => {
|
|
64894
|
-
pointer = true;
|
|
64895
|
-
pointerOwnsFocus = true;
|
|
64896
|
-
keyFocusOrigin = void 0;
|
|
64897
|
-
publish();
|
|
64898
|
-
}, true);
|
|
64899
|
-
window.addEventListener("keydown", (event) => {
|
|
64900
|
-
pointer = false;
|
|
64901
|
-
if (event.isComposing) {
|
|
64902
|
-
keyFocusOrigin = void 0;
|
|
64903
|
-
return;
|
|
64904
|
-
}
|
|
64905
|
-
keyFocusOrigin = event.composedPath()[0];
|
|
64906
|
-
if (!FOCUS_NAVIGATION.has(event.key) && !event.key.startsWith("Arrow")) return;
|
|
64907
|
-
pointerOwnsFocus = false;
|
|
64908
|
-
publish();
|
|
64909
|
-
}, true);
|
|
64910
|
-
window.addEventListener("focusin", (event) => {
|
|
64911
|
-
if (keyFocusOrigin === void 0 || event.composedPath()[0] === keyFocusOrigin) return;
|
|
64912
|
-
keyFocusOrigin = void 0;
|
|
64913
|
-
if (!pointerOwnsFocus) return;
|
|
64914
|
-
pointerOwnsFocus = false;
|
|
64915
|
-
publish();
|
|
64916
|
-
}, true);
|
|
64917
|
-
window.addEventListener("blur", () => {
|
|
64918
|
-
keyFocusOrigin = void 0;
|
|
64919
|
-
});
|
|
64920
|
-
}
|
|
64921
|
-
/** Anchor-preserving tooltips; an optional body portal escapes clipping containers and stacking contexts that cap the bubble's z-index. */
|
|
64922
|
-
/**
|
|
64923
|
-
* Suppression channel for enclosing tooltip and hover-card anchors: a visible
|
|
64924
|
-
* tooltip within an anchor withdraws the enclosing preview while its bubble is shown.
|
|
64925
|
-
*/
|
|
64926
|
-
const TooltipSuppression = (0, import_react.createContext)(null);
|
|
64927
|
-
/**
|
|
64928
|
-
* Attach a hover/focus tooltip to an anchor element.
|
|
64929
|
-
* @param props.label - bubble text, or a resolver evaluated only while visible; an empty string shows only shortcut keys.
|
|
64930
|
-
* @param props.shortcutKeys - effective key labels rendered as platform-formatted keycaps after optional text.
|
|
64931
|
-
* @param props.side - placement relative to the anchor (default 'right').
|
|
64932
|
-
* @param props.align - horizontal anchor-edge alignment for 'bottom'/'top' bubbles: 'end' pins
|
|
64933
|
-
* the bubble's right edge to the anchor's (for anchors beside other hover surfaces the centered
|
|
64934
|
-
* bubble would overlap); default 'center'. Ignored for side 'right'.
|
|
64935
|
-
* @param props.portal - render the bubble under document.body, so an ancestor's clipping or its
|
|
64936
|
-
* stacking context (which confines the bubble's z-index to that context) cannot hide it.
|
|
64937
|
-
* @param props.delayMs - hover delay in milliseconds (default 0).
|
|
64938
|
-
* @param props.focusDelayMs - keyboard focus delay in milliseconds (default 0); blur, click,
|
|
64939
|
-
* mouse leave, disabling, and unmount cancel a pending show.
|
|
64940
|
-
* @param props.gap - anchor-to-bubble distance in pixels for 'bottom'/'top' bubbles (default 8);
|
|
64941
|
-
* ignored for side 'right'.
|
|
64942
|
-
* @param props.disabled - suppress the bubble while true; the anchor renders identically so
|
|
64943
|
-
* toggling never remounts it (which would cut its CSS transitions).
|
|
64944
|
-
* @param props.maxWidth - bubble width cap in pixels, for labels long enough that the default
|
|
64945
|
-
* half-viewport cap would render a slab wider than the surface the anchor sits on.
|
|
64946
|
-
* @param props.openOnClick - clicking also pins the bubble for reading; another click, Escape,
|
|
64947
|
-
* Tab, or an outside pointerdown dismisses it. Defaults to false for ordinary action tooltips.
|
|
64948
|
-
* @param props.children - a single anchor element; its own ref (callback or object) is forwarded alongside the tooltip's.
|
|
64949
|
-
* @returns the cloned anchor plus a fixed-position bubble, optionally portaled to the body.
|
|
64950
|
-
* The bubble stays hidden until ResizeObserver supplies its size for viewport fitting; clicking the
|
|
64951
|
-
* anchor dismisses the bubble unless openOnClick is enabled, and focus arriving after a pointer
|
|
64952
|
-
* interaction (a closing menu refocusing its trigger) never raises it.
|
|
64953
|
-
*/
|
|
64954
|
-
function Tooltip({ label, shortcutKeys, side = "right", align = "center", delayMs = 0, focusDelayMs = 0, gap = 8, disabled = false, portal = false, maxWidth, openOnClick = false, children }) {
|
|
64955
|
-
const id = (0, import_react.useId)();
|
|
64956
|
-
const [pinned, setPinned] = (0, import_react.useState)(false);
|
|
64957
|
-
const anchor = (0, import_react.useRef)(null);
|
|
64958
|
-
const childRef = children.ref;
|
|
64959
|
-
const mergedRef = (0, import_react.useCallback)((el) => {
|
|
64960
|
-
anchor.current = el;
|
|
64961
|
-
if (typeof childRef === "function") childRef(el);
|
|
64962
|
-
else if (childRef != null) childRef.current = el;
|
|
64963
|
-
}, [childRef]);
|
|
64964
|
-
const [pos, setPos] = (0, import_react.useState)(null);
|
|
64965
|
-
const bubble = (0, import_react.useRef)(null);
|
|
64966
|
-
const resolvedLabel = pos === null ? null : typeof label === "function" ? label() : label;
|
|
64967
|
-
const y = pos === null ? 0 : side === "right" ? pos.top + (pos.bottom - pos.top) / 2 : side === "top" ? pos.top - gap : pos.bottom + gap;
|
|
64968
|
-
const showTimer = (0, import_react.useRef)(null);
|
|
64969
|
-
const triggers = (0, import_react.useRef)({
|
|
64970
|
-
hover: false,
|
|
64971
|
-
focus: false
|
|
64972
|
-
});
|
|
64973
|
-
const suppressAncestors = (0, import_react.useContext)(TooltipSuppression);
|
|
64974
|
-
const [suppressed, setSuppressed] = (0, import_react.useState)(false);
|
|
64975
|
-
const announce = (0, import_react.useCallback)((active) => {
|
|
64976
|
-
suppressAncestors?.(active);
|
|
64977
|
-
}, [suppressAncestors]);
|
|
64978
|
-
const visible = pos !== null && !disabled;
|
|
64979
|
-
(0, import_react.useEffect)(() => {
|
|
64980
|
-
const el = bubble.current;
|
|
64981
|
-
if (pos === null || !visible || suppressed || el === null) return;
|
|
64982
|
-
const edgeMargin = 12;
|
|
64983
|
-
let size;
|
|
64984
|
-
let placement = side;
|
|
64985
|
-
const fit = () => {
|
|
64986
|
-
if (size === void 0) return;
|
|
64987
|
-
const { inlineSize: width, blockSize: height } = size;
|
|
64988
|
-
const offset = side === "right" ? 0 : align === "end" ? width : width / 2;
|
|
64989
|
-
const left = Math.max(edgeMargin, Math.min(pos.x - offset, window.innerWidth - edgeMargin - width));
|
|
64990
|
-
const fitsBelow = pos.bottom + gap + height <= window.innerHeight - edgeMargin;
|
|
64991
|
-
const fitsAbove = pos.top - gap - height >= edgeMargin;
|
|
64992
|
-
if (placement === "bottom" && !fitsBelow && fitsAbove) placement = "top";
|
|
64993
|
-
else if (placement === "top" && !fitsAbove && fitsBelow) placement = "bottom";
|
|
64994
|
-
el.style.left = `${left + offset}px`;
|
|
64995
|
-
el.style.top = `${placement === "right" ? (pos.top + pos.bottom) / 2 : placement === "top" ? pos.top - gap : pos.bottom + gap}px`;
|
|
64996
|
-
el.dataset.side = placement;
|
|
64997
|
-
el.style.visibility = "visible";
|
|
64998
|
-
};
|
|
64999
|
-
const observer = new ResizeObserver((entries) => {
|
|
65000
|
-
size = entries[0]?.borderBoxSize[0];
|
|
65001
|
-
fit();
|
|
65002
|
-
});
|
|
65003
|
-
observer.observe(el, { box: "border-box" });
|
|
65004
|
-
window.addEventListener("resize", fit);
|
|
65005
|
-
return () => {
|
|
65006
|
-
observer.disconnect();
|
|
65007
|
-
window.removeEventListener("resize", fit);
|
|
65008
|
-
};
|
|
65009
|
-
}, [
|
|
65010
|
-
align,
|
|
65011
|
-
gap,
|
|
65012
|
-
pos,
|
|
65013
|
-
side,
|
|
65014
|
-
suppressed,
|
|
65015
|
-
visible
|
|
65016
|
-
]);
|
|
65017
|
-
(0, import_react.useEffect)(() => {
|
|
65018
|
-
announce(visible);
|
|
65019
|
-
return () => {
|
|
65020
|
-
announce(false);
|
|
65021
|
-
};
|
|
65022
|
-
}, [announce, visible]);
|
|
65023
|
-
const cancelShow = (0, import_react.useCallback)(() => {
|
|
65024
|
-
if (showTimer.current === null) return;
|
|
65025
|
-
clearTimeout(showTimer.current);
|
|
65026
|
-
showTimer.current = null;
|
|
65027
|
-
}, []);
|
|
65028
|
-
(0, import_react.useEffect)(() => {
|
|
65029
|
-
if (pinned && (disabled || !openOnClick)) setPinned(false);
|
|
65030
|
-
if (disabled) {
|
|
65031
|
-
cancelShow();
|
|
65032
|
-
triggers.current = {
|
|
65033
|
-
hover: false,
|
|
65034
|
-
focus: false
|
|
65035
|
-
};
|
|
65036
|
-
setPos(null);
|
|
65037
|
-
}
|
|
65038
|
-
return cancelShow;
|
|
65039
|
-
}, [
|
|
65040
|
-
cancelShow,
|
|
65041
|
-
disabled,
|
|
65042
|
-
openOnClick,
|
|
65043
|
-
pinned
|
|
65044
|
-
]);
|
|
65045
|
-
const show = () => {
|
|
65046
|
-
if (disabled) return;
|
|
65047
|
-
const el = anchor.current;
|
|
65048
|
-
/* v8 ignore next -- the ref is attached by event time: events fire on the cloned anchor. */
|
|
65049
|
-
if (el === null) return;
|
|
65050
|
-
const r = el.getBoundingClientRect();
|
|
65051
|
-
setPos({
|
|
65052
|
-
x: side === "right" ? r.right + 10 : align === "end" ? r.right : r.left + r.width / 2,
|
|
65053
|
-
top: r.top,
|
|
65054
|
-
bottom: r.bottom
|
|
65055
|
-
});
|
|
65056
|
-
announce(true);
|
|
65057
|
-
};
|
|
65058
|
-
const showAfterDelay = (delay) => {
|
|
65059
|
-
cancelShow();
|
|
65060
|
-
if (delay <= 0) {
|
|
65061
|
-
show();
|
|
65062
|
-
return;
|
|
65063
|
-
}
|
|
65064
|
-
showTimer.current = setTimeout(() => {
|
|
65065
|
-
showTimer.current = null;
|
|
65066
|
-
show();
|
|
65067
|
-
}, delay);
|
|
65068
|
-
};
|
|
65069
|
-
const withdraw = (0, import_react.useCallback)(() => {
|
|
65070
|
-
setPinned(false);
|
|
65071
|
-
setPos(null);
|
|
65072
|
-
announce(false);
|
|
65073
|
-
}, [announce]);
|
|
65074
|
-
const hide = () => {
|
|
65075
|
-
cancelShow();
|
|
65076
|
-
if (!triggers.current.hover && !triggers.current.focus && !pinned) withdraw();
|
|
65077
|
-
};
|
|
65078
|
-
const dismiss = (0, import_react.useCallback)(() => {
|
|
65079
|
-
cancelShow();
|
|
65080
|
-
triggers.current = {
|
|
65081
|
-
hover: false,
|
|
65082
|
-
focus: false
|
|
65083
|
-
};
|
|
65084
|
-
withdraw();
|
|
65085
|
-
}, [cancelShow, withdraw]);
|
|
65086
|
-
useDismissOnOutsidePointer(anchor, openOnClick && visible, dismiss, bubble);
|
|
65087
|
-
(0, import_react.useEffect)(() => {
|
|
65088
|
-
if (!openOnClick || !visible) return;
|
|
65089
|
-
const onKeyDown = (event) => {
|
|
65090
|
-
if (event.key !== "Escape" && event.key !== "Tab") return;
|
|
65091
|
-
if (event.key === "Escape") {
|
|
65092
|
-
event.preventDefault();
|
|
65093
|
-
event.stopPropagation();
|
|
65094
|
-
}
|
|
65095
|
-
dismiss();
|
|
65096
|
-
};
|
|
65097
|
-
document.addEventListener("keydown", onKeyDown, true);
|
|
65098
|
-
return () => {
|
|
65099
|
-
document.removeEventListener("keydown", onKeyDown, true);
|
|
65100
|
-
};
|
|
65101
|
-
}, [
|
|
65102
|
-
dismiss,
|
|
65103
|
-
openOnClick,
|
|
65104
|
-
visible
|
|
65105
|
-
]);
|
|
65106
|
-
const content = visible && !suppressed && (0, import_jsx_runtime.jsxs)("span", {
|
|
65107
|
-
ref: bubble,
|
|
65108
|
-
id: openOnClick ? id : void 0,
|
|
65109
|
-
className: Tooltip_module_default.bubble,
|
|
65110
|
-
"data-side": side,
|
|
65111
|
-
"data-portal": portal || void 0,
|
|
65112
|
-
"data-pinned": pinned || void 0,
|
|
65113
|
-
"data-align": align,
|
|
65114
|
-
"data-has-shortcut": shortcutKeys?.length ? true : void 0,
|
|
65115
|
-
style: {
|
|
65116
|
-
left: pos.x,
|
|
65117
|
-
top: y,
|
|
65118
|
-
visibility: "hidden",
|
|
65119
|
-
...maxWidth === void 0 ? {} : { maxWidth }
|
|
65120
|
-
},
|
|
65121
|
-
role: "tooltip",
|
|
65122
|
-
"aria-label": shortcutKeys?.length ? [resolvedLabel, shortcutKeys.join(" ")].filter(Boolean).join(" ") : void 0,
|
|
65123
|
-
children: [resolvedLabel && (0, import_jsx_runtime.jsx)("span", {
|
|
65124
|
-
className: Tooltip_module_default.label,
|
|
65125
|
-
children: resolvedLabel
|
|
65126
|
-
}), shortcutKeys !== void 0 && shortcutKeys.length > 0 && (0, import_jsx_runtime.jsx)(ShortcutKeys, {
|
|
65127
|
-
keys: shortcutKeys,
|
|
65128
|
-
variant: "tooltip"
|
|
65129
|
-
})]
|
|
65130
|
-
});
|
|
65131
|
-
return (0, import_jsx_runtime.jsxs)(TooltipSuppression.Provider, {
|
|
65132
|
-
value: setSuppressed,
|
|
65133
|
-
children: [(0, import_react.cloneElement)(children, {
|
|
65134
|
-
ref: mergedRef,
|
|
65135
|
-
"aria-describedby": openOnClick && visible ? [children.props["aria-describedby"], id].filter(Boolean).join(" ") : children.props["aria-describedby"],
|
|
65136
|
-
onMouseEnter: (e) => {
|
|
65137
|
-
children.props.onMouseEnter?.(e);
|
|
65138
|
-
triggers.current.hover = true;
|
|
65139
|
-
showAfterDelay(delayMs);
|
|
65140
|
-
},
|
|
65141
|
-
onMouseLeave: (e) => {
|
|
65142
|
-
children.props.onMouseLeave?.(e);
|
|
65143
|
-
triggers.current.hover = false;
|
|
65144
|
-
cancelShow();
|
|
65145
|
-
if (!pinned) withdraw();
|
|
65146
|
-
},
|
|
65147
|
-
onClick: (e) => {
|
|
65148
|
-
children.props.onClick?.(e);
|
|
65149
|
-
triggers.current.focus = false;
|
|
65150
|
-
cancelShow();
|
|
65151
|
-
if (openOnClick && !disabled && !pinned) {
|
|
65152
|
-
setPinned(true);
|
|
65153
|
-
show();
|
|
65154
|
-
} else withdraw();
|
|
65155
|
-
},
|
|
65156
|
-
onFocus: (e) => {
|
|
65157
|
-
children.props.onFocus?.(e);
|
|
65158
|
-
if (pointerModality()) return;
|
|
65159
|
-
triggers.current.focus = true;
|
|
65160
|
-
showAfterDelay(focusDelayMs);
|
|
65161
|
-
},
|
|
65162
|
-
onBlur: (e) => {
|
|
65163
|
-
children.props.onBlur?.(e);
|
|
65164
|
-
triggers.current.focus = false;
|
|
65165
|
-
hide();
|
|
65166
|
-
}
|
|
65167
|
-
}), portal ? content !== false && (0, import_react_dom.createPortal)(content, document.body) : content]
|
|
65168
|
-
});
|
|
65169
|
-
}
|
|
64905
|
+
/** Private coordination shared only by opted-in HoverCards inside one mounted group. */
|
|
64906
|
+
const HoverCardGroupContext = (0, import_react.createContext)(null);
|
|
65170
64907
|
/** Preview opacity transition and retained lifetime during dismissal. */
|
|
65171
64908
|
const PREVIEW_FADE_MS = 100;
|
|
65172
64909
|
const PREVIEW_MAX_HEIGHT = 420;
|
|
@@ -65175,7 +64912,7 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
65175
64912
|
const ANCHOR_GAP = 8;
|
|
65176
64913
|
const VIEWPORT_MARGIN = 8;
|
|
65177
64914
|
/**
|
|
65178
|
-
* Render an anchor with a hover-triggered preview card
|
|
64915
|
+
* Render an anchor with a hover-triggered preview card independently of nested tooltips.
|
|
65179
64916
|
* @param props.anchor - the hover target (rendered in place inside a wrapper span).
|
|
65180
64917
|
* @param props.content - card content; the pointer may rest on it, so it is
|
|
65181
64918
|
* readable and selectable, but it carries no dismissal affordance of its own.
|
|
@@ -65185,13 +64922,15 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
65185
64922
|
* @param props.widthAnchorRef - optional element whose width and horizontal position size the preview.
|
|
65186
64923
|
* @param props.inline - keep the anchor in prose; show a contained preview on hover or keyboard focus.
|
|
65187
64924
|
* @param props.disabled - suppress opening; turning true dismisses an open card.
|
|
64925
|
+
* @param props.grouped - share first-display dwell across the surrounding list and active portal.
|
|
64926
|
+
* Group replacement removes the previous card immediately, including a fading preview.
|
|
65188
64927
|
* @param props.copyText - optional primary value copied by activation and
|
|
65189
64928
|
* included in the card's accessible name.
|
|
65190
64929
|
* @param props.copyLabel - localized accessible activation-label prefix.
|
|
65191
64930
|
* @param props.copiedLabel - localized visible success label.
|
|
65192
64931
|
* @returns anchor wrapper with the conditional portaled card.
|
|
65193
64932
|
*/
|
|
65194
|
-
function HoverCard({ anchor, content, openDelayMs = 500, disabled = false, copyText, copyLabel, copiedLabel, variant = "compact", widthAnchorRef, inline = false }) {
|
|
64933
|
+
function HoverCard({ anchor, content, openDelayMs = 500, disabled = false, grouped = false, copyText, copyLabel, copiedLabel, variant = "compact", widthAnchorRef, inline = false }) {
|
|
65195
64934
|
const rootRef = (0, import_react.useRef)(null);
|
|
65196
64935
|
const cardRef = (0, import_react.useRef)(null);
|
|
65197
64936
|
const timerRef = (0, import_react.useRef)(null);
|
|
@@ -65206,7 +64945,9 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
65206
64945
|
const [pos, setPos] = (0, import_react.useState)(null);
|
|
65207
64946
|
const positioned = pos !== null;
|
|
65208
64947
|
const [copied, setCopied] = (0, import_react.useState)(false);
|
|
65209
|
-
const
|
|
64948
|
+
const parentGroup = (0, import_react.useContext)(HoverCardGroupContext);
|
|
64949
|
+
const group = grouped ? parentGroup : null;
|
|
64950
|
+
const [groupOwner] = (0, import_react.useState)(() => Symbol("hover-card"));
|
|
65210
64951
|
const clearCopied = (0, import_react.useCallback)(() => {
|
|
65211
64952
|
if (copyTimerRef.current !== null) {
|
|
65212
64953
|
clearTimeout(copyTimerRef.current);
|
|
@@ -65221,12 +64962,36 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
65221
64962
|
setPhase((current) => variant === "preview" && current !== "closed" ? "closing" : "closed");
|
|
65222
64963
|
}, [clearCopied, variant]);
|
|
65223
64964
|
const { arm: armClose, cancel: cancelClose } = usePointerGrace(close);
|
|
65224
|
-
const clearTimer = () => {
|
|
64965
|
+
const clearTimer = (0, import_react.useCallback)(() => {
|
|
65225
64966
|
if (timerRef.current !== null) {
|
|
65226
64967
|
clearTimeout(timerRef.current);
|
|
65227
64968
|
timerRef.current = null;
|
|
65228
64969
|
}
|
|
65229
|
-
};
|
|
64970
|
+
}, []);
|
|
64971
|
+
const dismissImmediately = (0, import_react.useCallback)(() => {
|
|
64972
|
+
clearTimer();
|
|
64973
|
+
cancelClose();
|
|
64974
|
+
copyEpochRef.current += 1;
|
|
64975
|
+
clearCopied();
|
|
64976
|
+
setPhase("closed");
|
|
64977
|
+
}, [
|
|
64978
|
+
clearTimer,
|
|
64979
|
+
cancelClose,
|
|
64980
|
+
clearCopied
|
|
64981
|
+
]);
|
|
64982
|
+
const groupVisible = open && positioned;
|
|
64983
|
+
(0, import_react.useLayoutEffect)(() => {
|
|
64984
|
+
if (!groupVisible || group === null) return;
|
|
64985
|
+
group.shown(groupOwner, dismissImmediately, cardRef.current);
|
|
64986
|
+
return () => {
|
|
64987
|
+
group.release(groupOwner);
|
|
64988
|
+
};
|
|
64989
|
+
}, [
|
|
64990
|
+
group,
|
|
64991
|
+
groupOwner,
|
|
64992
|
+
groupVisible,
|
|
64993
|
+
dismissImmediately
|
|
64994
|
+
]);
|
|
65230
64995
|
(0, import_react.useEffect)(() => {
|
|
65231
64996
|
if (!closing) return;
|
|
65232
64997
|
const timer = setTimeout(() => {
|
|
@@ -65351,7 +65116,7 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
65351
65116
|
inline
|
|
65352
65117
|
]);
|
|
65353
65118
|
(0, import_react.useLayoutEffect)(() => {
|
|
65354
|
-
if (!open || pos === null || variant === "preview" || inline
|
|
65119
|
+
if (!open || pos === null || variant === "preview" || inline) return;
|
|
65355
65120
|
/* v8 ignore next -- the card is mounted whenever pos is set, so the ref is attached here. */
|
|
65356
65121
|
const h = cardRef.current?.offsetHeight ?? 0;
|
|
65357
65122
|
if (pos.top + h > window.innerHeight - VIEWPORT_MARGIN) setPos({
|
|
@@ -65362,8 +65127,7 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
65362
65127
|
open,
|
|
65363
65128
|
pos,
|
|
65364
65129
|
variant,
|
|
65365
|
-
inline
|
|
65366
|
-
suppressed
|
|
65130
|
+
inline
|
|
65367
65131
|
]);
|
|
65368
65132
|
const copy = async (text) => {
|
|
65369
65133
|
if (copied || copyingRef.current) return;
|
|
@@ -65385,7 +65149,7 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
65385
65149
|
cancelClose();
|
|
65386
65150
|
close();
|
|
65387
65151
|
};
|
|
65388
|
-
const card = open && pos !== null &&
|
|
65152
|
+
const card = open && pos !== null && (0, import_jsx_runtime.jsx)("div", {
|
|
65389
65153
|
ref: cardRef,
|
|
65390
65154
|
className: clsx(HoverCard_module_default.card, variant === "preview" && HoverCard_module_default.preview, inline && HoverCard_module_default.media, copyable && HoverCard_module_default.copyable, copied && HoverCard_module_default.feedback),
|
|
65391
65155
|
"data-closing": closing || void 0,
|
|
@@ -65439,7 +65203,8 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
65439
65203
|
return;
|
|
65440
65204
|
}
|
|
65441
65205
|
clearTimer();
|
|
65442
|
-
|
|
65206
|
+
if (group?.isWarm()) setPhase("open");
|
|
65207
|
+
else timerRef.current = setTimeout(() => {
|
|
65443
65208
|
setPhase("open");
|
|
65444
65209
|
}, openDelayMs);
|
|
65445
65210
|
},
|
|
@@ -65450,11 +65215,8 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
65450
65215
|
onPointerDownCapture: dismissFromAnchor,
|
|
65451
65216
|
onClickCapture: dismissFromAnchor,
|
|
65452
65217
|
children: [
|
|
65453
|
-
|
|
65454
|
-
|
|
65455
|
-
children: anchor
|
|
65456
|
-
}),
|
|
65457
|
-
open && !suppressed && copyable && (0, import_jsx_runtime.jsx)("span", {
|
|
65218
|
+
anchor,
|
|
65219
|
+
open && copyable && (0, import_jsx_runtime.jsx)("span", {
|
|
65458
65220
|
className: HoverCard_module_default.status,
|
|
65459
65221
|
role: "status",
|
|
65460
65222
|
children: copied ? copiedLabel : ""
|
|
@@ -66159,6 +65921,317 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
66159
65921
|
});
|
|
66160
65922
|
}
|
|
66161
65923
|
/**
|
|
65924
|
+
* Document-wide input tracking shared by tooltips and focus-ring styles.
|
|
65925
|
+
* Tooltips follow the last input; rings follow navigation or a key followed by
|
|
65926
|
+
* focus on a different control. Modifiers and refocusing alone keep rings silent.
|
|
65927
|
+
* Module-level listeners live for the document lifetime; Node imports are inert.
|
|
65928
|
+
*/
|
|
65929
|
+
/** Modality values published on the document element. */
|
|
65930
|
+
const INPUT_MODALITY = {
|
|
65931
|
+
pointer: "pointer",
|
|
65932
|
+
keyboard: "keyboard"
|
|
65933
|
+
};
|
|
65934
|
+
/** Attribute carrying whether focus navigation last owned focus. */
|
|
65935
|
+
const INPUT_MODALITY_ATTRIBUTE = "data-input-modality";
|
|
65936
|
+
const FOCUS_NAVIGATION = /* @__PURE__ */ new Set([
|
|
65937
|
+
"Tab",
|
|
65938
|
+
"Home",
|
|
65939
|
+
"End",
|
|
65940
|
+
"PageUp",
|
|
65941
|
+
"PageDown"
|
|
65942
|
+
]);
|
|
65943
|
+
let pointer = false;
|
|
65944
|
+
let pointerOwnsFocus = false;
|
|
65945
|
+
let keyFocusOrigin;
|
|
65946
|
+
function publish() {
|
|
65947
|
+
document.documentElement.setAttribute(INPUT_MODALITY_ATTRIBUTE, pointerOwnsFocus ? INPUT_MODALITY.pointer : INPUT_MODALITY.keyboard);
|
|
65948
|
+
}
|
|
65949
|
+
/**
|
|
65950
|
+
* Whether the last input came from a pointer, independently of ring visibility.
|
|
65951
|
+
* @returns True after pointer input; false after any key.
|
|
65952
|
+
*/
|
|
65953
|
+
function pointerModality() {
|
|
65954
|
+
return pointer;
|
|
65955
|
+
}
|
|
65956
|
+
if (typeof window !== "undefined") {
|
|
65957
|
+
window.addEventListener("pointerdown", () => {
|
|
65958
|
+
pointer = true;
|
|
65959
|
+
pointerOwnsFocus = true;
|
|
65960
|
+
keyFocusOrigin = void 0;
|
|
65961
|
+
publish();
|
|
65962
|
+
}, true);
|
|
65963
|
+
window.addEventListener("keydown", (event) => {
|
|
65964
|
+
pointer = false;
|
|
65965
|
+
if (event.isComposing) {
|
|
65966
|
+
keyFocusOrigin = void 0;
|
|
65967
|
+
return;
|
|
65968
|
+
}
|
|
65969
|
+
keyFocusOrigin = event.composedPath()[0];
|
|
65970
|
+
if (!FOCUS_NAVIGATION.has(event.key) && !event.key.startsWith("Arrow")) return;
|
|
65971
|
+
pointerOwnsFocus = false;
|
|
65972
|
+
publish();
|
|
65973
|
+
}, true);
|
|
65974
|
+
window.addEventListener("focusin", (event) => {
|
|
65975
|
+
if (keyFocusOrigin === void 0 || event.composedPath()[0] === keyFocusOrigin) return;
|
|
65976
|
+
keyFocusOrigin = void 0;
|
|
65977
|
+
if (!pointerOwnsFocus) return;
|
|
65978
|
+
pointerOwnsFocus = false;
|
|
65979
|
+
publish();
|
|
65980
|
+
}, true);
|
|
65981
|
+
window.addEventListener("blur", () => {
|
|
65982
|
+
keyFocusOrigin = void 0;
|
|
65983
|
+
});
|
|
65984
|
+
}
|
|
65985
|
+
/** Anchor-preserving tooltips; an optional body portal escapes clipping containers and stacking contexts that cap the bubble's z-index. */
|
|
65986
|
+
/**
|
|
65987
|
+
* Suppression channel for nested tooltips: a visible descendant tooltip
|
|
65988
|
+
* withdraws the enclosing tooltip while its bubble is shown.
|
|
65989
|
+
*/
|
|
65990
|
+
const TooltipSuppression = (0, import_react.createContext)(null);
|
|
65991
|
+
/**
|
|
65992
|
+
* Attach a hover/focus tooltip to an anchor element.
|
|
65993
|
+
* @param props.label - bubble text, or a resolver evaluated only while visible; an empty string shows only shortcut keys.
|
|
65994
|
+
* @param props.shortcutKeys - effective key labels rendered as platform-formatted keycaps after optional text.
|
|
65995
|
+
* @param props.side - placement relative to the anchor (default 'right').
|
|
65996
|
+
* @param props.align - horizontal anchor-edge alignment for 'bottom'/'top' bubbles: 'end' pins
|
|
65997
|
+
* the bubble's right edge to the anchor's (for anchors beside other hover surfaces the centered
|
|
65998
|
+
* bubble would overlap); default 'center'. Ignored for side 'right'.
|
|
65999
|
+
* @param props.portal - render the bubble under document.body, so an ancestor's clipping or its
|
|
66000
|
+
* stacking context (which confines the bubble's z-index to that context) cannot hide it.
|
|
66001
|
+
* @param props.delayMs - hover delay in milliseconds (default 0).
|
|
66002
|
+
* @param props.focusDelayMs - keyboard focus delay in milliseconds (default 0); blur, click,
|
|
66003
|
+
* mouse leave, disabling, and unmount cancel a pending show.
|
|
66004
|
+
* @param props.gap - anchor-to-bubble distance in pixels for 'bottom'/'top' bubbles (default 8);
|
|
66005
|
+
* ignored for side 'right'.
|
|
66006
|
+
* @param props.disabled - suppress the bubble while true; the anchor renders identically so
|
|
66007
|
+
* toggling never remounts it (which would cut its CSS transitions).
|
|
66008
|
+
* @param props.maxWidth - bubble width cap in pixels, for labels long enough that the default
|
|
66009
|
+
* half-viewport cap would render a slab wider than the surface the anchor sits on.
|
|
66010
|
+
* @param props.openOnClick - clicking also pins the bubble for reading; another click, Escape,
|
|
66011
|
+
* Tab, or an outside pointerdown dismisses it. Defaults to false for ordinary action tooltips.
|
|
66012
|
+
* @param props.children - a single anchor element; its own ref (callback or object) is forwarded alongside the tooltip's.
|
|
66013
|
+
* @returns the cloned anchor plus a fixed-position bubble, optionally portaled to the body.
|
|
66014
|
+
* The bubble stays hidden until ResizeObserver supplies its size for viewport fitting; clicking the
|
|
66015
|
+
* anchor dismisses the bubble unless openOnClick is enabled, and focus arriving after a pointer
|
|
66016
|
+
* interaction (a closing menu refocusing its trigger) never raises it.
|
|
66017
|
+
*/
|
|
66018
|
+
function Tooltip({ label, shortcutKeys, side = "right", align = "center", delayMs = 0, focusDelayMs = 0, gap = 8, disabled = false, portal = false, maxWidth, openOnClick = false, children }) {
|
|
66019
|
+
const id = (0, import_react.useId)();
|
|
66020
|
+
const [pinned, setPinned] = (0, import_react.useState)(false);
|
|
66021
|
+
const anchor = (0, import_react.useRef)(null);
|
|
66022
|
+
const childRef = children.ref;
|
|
66023
|
+
const mergedRef = (0, import_react.useCallback)((el) => {
|
|
66024
|
+
anchor.current = el;
|
|
66025
|
+
if (typeof childRef === "function") childRef(el);
|
|
66026
|
+
else if (childRef != null) childRef.current = el;
|
|
66027
|
+
}, [childRef]);
|
|
66028
|
+
const [pos, setPos] = (0, import_react.useState)(null);
|
|
66029
|
+
const bubble = (0, import_react.useRef)(null);
|
|
66030
|
+
const resolvedLabel = pos === null ? null : typeof label === "function" ? label() : label;
|
|
66031
|
+
const y = pos === null ? 0 : side === "right" ? pos.top + (pos.bottom - pos.top) / 2 : side === "top" ? pos.top - gap : pos.bottom + gap;
|
|
66032
|
+
const showTimer = (0, import_react.useRef)(null);
|
|
66033
|
+
const triggers = (0, import_react.useRef)({
|
|
66034
|
+
hover: false,
|
|
66035
|
+
focus: false
|
|
66036
|
+
});
|
|
66037
|
+
const suppressAncestors = (0, import_react.useContext)(TooltipSuppression);
|
|
66038
|
+
const [suppressed, setSuppressed] = (0, import_react.useState)(false);
|
|
66039
|
+
const announce = (0, import_react.useCallback)((active) => {
|
|
66040
|
+
suppressAncestors?.(active);
|
|
66041
|
+
}, [suppressAncestors]);
|
|
66042
|
+
const visible = pos !== null && !disabled;
|
|
66043
|
+
(0, import_react.useEffect)(() => {
|
|
66044
|
+
const el = bubble.current;
|
|
66045
|
+
if (pos === null || !visible || suppressed || el === null) return;
|
|
66046
|
+
const edgeMargin = 12;
|
|
66047
|
+
let size;
|
|
66048
|
+
let placement = side;
|
|
66049
|
+
const fit = () => {
|
|
66050
|
+
if (size === void 0) return;
|
|
66051
|
+
const { inlineSize: width, blockSize: height } = size;
|
|
66052
|
+
const offset = side === "right" ? 0 : align === "end" ? width : width / 2;
|
|
66053
|
+
const left = Math.max(edgeMargin, Math.min(pos.x - offset, window.innerWidth - edgeMargin - width));
|
|
66054
|
+
const fitsBelow = pos.bottom + gap + height <= window.innerHeight - edgeMargin;
|
|
66055
|
+
const fitsAbove = pos.top - gap - height >= edgeMargin;
|
|
66056
|
+
if (placement === "bottom" && !fitsBelow && fitsAbove) placement = "top";
|
|
66057
|
+
else if (placement === "top" && !fitsAbove && fitsBelow) placement = "bottom";
|
|
66058
|
+
el.style.left = `${left + offset}px`;
|
|
66059
|
+
el.style.top = `${placement === "right" ? (pos.top + pos.bottom) / 2 : placement === "top" ? pos.top - gap : pos.bottom + gap}px`;
|
|
66060
|
+
el.dataset.side = placement;
|
|
66061
|
+
el.style.visibility = "visible";
|
|
66062
|
+
};
|
|
66063
|
+
const observer = new ResizeObserver((entries) => {
|
|
66064
|
+
size = entries[0]?.borderBoxSize[0];
|
|
66065
|
+
fit();
|
|
66066
|
+
});
|
|
66067
|
+
observer.observe(el, { box: "border-box" });
|
|
66068
|
+
window.addEventListener("resize", fit);
|
|
66069
|
+
return () => {
|
|
66070
|
+
observer.disconnect();
|
|
66071
|
+
window.removeEventListener("resize", fit);
|
|
66072
|
+
};
|
|
66073
|
+
}, [
|
|
66074
|
+
align,
|
|
66075
|
+
gap,
|
|
66076
|
+
pos,
|
|
66077
|
+
side,
|
|
66078
|
+
suppressed,
|
|
66079
|
+
visible
|
|
66080
|
+
]);
|
|
66081
|
+
(0, import_react.useEffect)(() => {
|
|
66082
|
+
announce(visible);
|
|
66083
|
+
return () => {
|
|
66084
|
+
announce(false);
|
|
66085
|
+
};
|
|
66086
|
+
}, [announce, visible]);
|
|
66087
|
+
const cancelShow = (0, import_react.useCallback)(() => {
|
|
66088
|
+
if (showTimer.current === null) return;
|
|
66089
|
+
clearTimeout(showTimer.current);
|
|
66090
|
+
showTimer.current = null;
|
|
66091
|
+
}, []);
|
|
66092
|
+
(0, import_react.useEffect)(() => {
|
|
66093
|
+
if (pinned && (disabled || !openOnClick)) setPinned(false);
|
|
66094
|
+
if (disabled) {
|
|
66095
|
+
cancelShow();
|
|
66096
|
+
triggers.current = {
|
|
66097
|
+
hover: false,
|
|
66098
|
+
focus: false
|
|
66099
|
+
};
|
|
66100
|
+
setPos(null);
|
|
66101
|
+
}
|
|
66102
|
+
return cancelShow;
|
|
66103
|
+
}, [
|
|
66104
|
+
cancelShow,
|
|
66105
|
+
disabled,
|
|
66106
|
+
openOnClick,
|
|
66107
|
+
pinned
|
|
66108
|
+
]);
|
|
66109
|
+
const show = () => {
|
|
66110
|
+
if (disabled) return;
|
|
66111
|
+
const el = anchor.current;
|
|
66112
|
+
/* v8 ignore next -- the ref is attached by event time: events fire on the cloned anchor. */
|
|
66113
|
+
if (el === null) return;
|
|
66114
|
+
const r = el.getBoundingClientRect();
|
|
66115
|
+
setPos({
|
|
66116
|
+
x: side === "right" ? r.right + 10 : align === "end" ? r.right : r.left + r.width / 2,
|
|
66117
|
+
top: r.top,
|
|
66118
|
+
bottom: r.bottom
|
|
66119
|
+
});
|
|
66120
|
+
announce(true);
|
|
66121
|
+
};
|
|
66122
|
+
const showAfterDelay = (delay) => {
|
|
66123
|
+
cancelShow();
|
|
66124
|
+
if (delay <= 0) {
|
|
66125
|
+
show();
|
|
66126
|
+
return;
|
|
66127
|
+
}
|
|
66128
|
+
showTimer.current = setTimeout(() => {
|
|
66129
|
+
showTimer.current = null;
|
|
66130
|
+
show();
|
|
66131
|
+
}, delay);
|
|
66132
|
+
};
|
|
66133
|
+
const withdraw = (0, import_react.useCallback)(() => {
|
|
66134
|
+
setPinned(false);
|
|
66135
|
+
setPos(null);
|
|
66136
|
+
announce(false);
|
|
66137
|
+
}, [announce]);
|
|
66138
|
+
const hide = () => {
|
|
66139
|
+
cancelShow();
|
|
66140
|
+
if (!triggers.current.hover && !triggers.current.focus && !pinned) withdraw();
|
|
66141
|
+
};
|
|
66142
|
+
const dismiss = (0, import_react.useCallback)(() => {
|
|
66143
|
+
cancelShow();
|
|
66144
|
+
triggers.current = {
|
|
66145
|
+
hover: false,
|
|
66146
|
+
focus: false
|
|
66147
|
+
};
|
|
66148
|
+
withdraw();
|
|
66149
|
+
}, [cancelShow, withdraw]);
|
|
66150
|
+
useDismissOnOutsidePointer(anchor, openOnClick && visible, dismiss, bubble);
|
|
66151
|
+
(0, import_react.useEffect)(() => {
|
|
66152
|
+
if (!openOnClick || !visible) return;
|
|
66153
|
+
const onKeyDown = (event) => {
|
|
66154
|
+
if (event.key !== "Escape" && event.key !== "Tab") return;
|
|
66155
|
+
if (event.key === "Escape") {
|
|
66156
|
+
event.preventDefault();
|
|
66157
|
+
event.stopPropagation();
|
|
66158
|
+
}
|
|
66159
|
+
dismiss();
|
|
66160
|
+
};
|
|
66161
|
+
document.addEventListener("keydown", onKeyDown, true);
|
|
66162
|
+
return () => {
|
|
66163
|
+
document.removeEventListener("keydown", onKeyDown, true);
|
|
66164
|
+
};
|
|
66165
|
+
}, [
|
|
66166
|
+
dismiss,
|
|
66167
|
+
openOnClick,
|
|
66168
|
+
visible
|
|
66169
|
+
]);
|
|
66170
|
+
const content = visible && !suppressed && (0, import_jsx_runtime.jsxs)("span", {
|
|
66171
|
+
ref: bubble,
|
|
66172
|
+
id: openOnClick ? id : void 0,
|
|
66173
|
+
className: Tooltip_module_default.bubble,
|
|
66174
|
+
"data-side": side,
|
|
66175
|
+
"data-portal": portal || void 0,
|
|
66176
|
+
"data-pinned": pinned || void 0,
|
|
66177
|
+
"data-align": align,
|
|
66178
|
+
"data-has-shortcut": shortcutKeys?.length ? true : void 0,
|
|
66179
|
+
style: {
|
|
66180
|
+
left: pos.x,
|
|
66181
|
+
top: y,
|
|
66182
|
+
visibility: "hidden",
|
|
66183
|
+
...maxWidth === void 0 ? {} : { maxWidth }
|
|
66184
|
+
},
|
|
66185
|
+
role: "tooltip",
|
|
66186
|
+
"aria-label": shortcutKeys?.length ? [resolvedLabel, shortcutKeys.join(" ")].filter(Boolean).join(" ") : void 0,
|
|
66187
|
+
children: [resolvedLabel && (0, import_jsx_runtime.jsx)("span", {
|
|
66188
|
+
className: Tooltip_module_default.label,
|
|
66189
|
+
children: resolvedLabel
|
|
66190
|
+
}), shortcutKeys !== void 0 && shortcutKeys.length > 0 && (0, import_jsx_runtime.jsx)(ShortcutKeys, {
|
|
66191
|
+
keys: shortcutKeys,
|
|
66192
|
+
variant: "tooltip"
|
|
66193
|
+
})]
|
|
66194
|
+
});
|
|
66195
|
+
return (0, import_jsx_runtime.jsxs)(TooltipSuppression.Provider, {
|
|
66196
|
+
value: setSuppressed,
|
|
66197
|
+
children: [(0, import_react.cloneElement)(children, {
|
|
66198
|
+
ref: mergedRef,
|
|
66199
|
+
"aria-describedby": openOnClick && visible ? [children.props["aria-describedby"], id].filter(Boolean).join(" ") : children.props["aria-describedby"],
|
|
66200
|
+
onMouseEnter: (e) => {
|
|
66201
|
+
children.props.onMouseEnter?.(e);
|
|
66202
|
+
triggers.current.hover = true;
|
|
66203
|
+
showAfterDelay(delayMs);
|
|
66204
|
+
},
|
|
66205
|
+
onMouseLeave: (e) => {
|
|
66206
|
+
children.props.onMouseLeave?.(e);
|
|
66207
|
+
triggers.current.hover = false;
|
|
66208
|
+
cancelShow();
|
|
66209
|
+
if (!pinned) withdraw();
|
|
66210
|
+
},
|
|
66211
|
+
onClick: (e) => {
|
|
66212
|
+
children.props.onClick?.(e);
|
|
66213
|
+
triggers.current.focus = false;
|
|
66214
|
+
cancelShow();
|
|
66215
|
+
if (openOnClick && !disabled && !pinned) {
|
|
66216
|
+
setPinned(true);
|
|
66217
|
+
show();
|
|
66218
|
+
} else withdraw();
|
|
66219
|
+
},
|
|
66220
|
+
onFocus: (e) => {
|
|
66221
|
+
children.props.onFocus?.(e);
|
|
66222
|
+
if (pointerModality()) return;
|
|
66223
|
+
triggers.current.focus = true;
|
|
66224
|
+
showAfterDelay(focusDelayMs);
|
|
66225
|
+
},
|
|
66226
|
+
onBlur: (e) => {
|
|
66227
|
+
children.props.onBlur?.(e);
|
|
66228
|
+
triggers.current.focus = false;
|
|
66229
|
+
hide();
|
|
66230
|
+
}
|
|
66231
|
+
}), portal ? content !== false && (0, import_react_dom.createPortal)(content, document.body) : content]
|
|
66232
|
+
});
|
|
66233
|
+
}
|
|
66234
|
+
/**
|
|
66162
66235
|
* The client's ONE syntax highlighter: a synchronous fine-grained shiki core
|
|
66163
66236
|
* (JavaScript regex engine — no oniguruma WASM, bundle-friendly) with an
|
|
66164
66237
|
* explicit grammar allowlist and a CSS-variables theme. Colors live in the
|