dsh-hyperliquid 0.4.3 → 0.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/client.js +14 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.4 — 2026-10-17
|
|
4
|
+
|
|
5
|
+
- 修复:触摸屏上无法画线。lightweight-charts 处理轻点时会在 touchend 上 preventDefault,浏览器不再补发 click,而落锚点依赖原生 click;现在未拖动的触摸 pointerup 直接按点击处理(同一轻点之后若仍有 click 会被忽略)。
|
|
6
|
+
- 修复:手指拖动锚点或画线时被浏览器当作页面滚动而中途取消(pointercancel);图表区域设为 `touch-action: none`,与 TradingView 一致由图表处理全部手势。
|
|
7
|
+
- 冒烟新增 touch 阶段(点画、选中、拖锚点、单指平移)。
|
|
8
|
+
|
|
3
9
|
## 0.4.3 — 2026-10-17
|
|
4
10
|
|
|
5
11
|
- 趋势线可分别向左、向右延长(浮动工具条两个开关,agent 工具 `extendLeft` / `extendRight`);价格提醒按延长后的线判断,延长的线不参与屏幕外剔除。
|
package/client.js
CHANGED
|
@@ -949,6 +949,9 @@ body:has(.dhl-divider.dragging) * { cursor: col-resize !important; }
|
|
|
949
949
|
|
|
950
950
|
/* One row like TradingView's floating toolbar: a wrapped toolbar covered drawings near the top of a narrow chart. */
|
|
951
951
|
.dhl-draw-toolbar > * { flex: none; }
|
|
952
|
+
/* Touch: the chart owns every gesture inside it (anchor and drawing drags, pans), as TradingView does;
|
|
953
|
+
otherwise the browser claims a finger drag for scrolling and cancels the pointer mid-drag. */
|
|
954
|
+
.dhl-chart, .dhl-chart-drawing-overlay, .dhl-chart-drawing-overlay * { touch-action: none; }
|
|
952
955
|
`;
|
|
953
956
|
|
|
954
957
|
// src/client/locale.ts
|
|
@@ -19018,13 +19021,16 @@ function CandleChart({ candles, marks, indicators, expanded, resetToken, drawMod
|
|
|
19018
19021
|
box.addEventListener("pointermove", move, true);
|
|
19019
19022
|
box.addEventListener("pointerup", move, true);
|
|
19020
19023
|
box.addEventListener("pointercancel", cancel, true);
|
|
19024
|
+
let touchTapAt = -Infinity;
|
|
19025
|
+
const fromTouch = (event) => event.pointerType === "touch" || Boolean(event.sourceCapabilities?.firesTouchEvents);
|
|
19021
19026
|
const chartClick = (event) => {
|
|
19027
|
+
if (event.type === "click" && fromTouch(event) && performance.now() - touchTapAt < 800) return false;
|
|
19022
19028
|
const visible = chart.timeScale().getVisibleLogicalRange();
|
|
19023
19029
|
const panned = !pressStillAClick(press?.range ?? null, visible ? { from: visible.from, to: visible.to } : null);
|
|
19024
19030
|
const clicked = Boolean(press && !press.dragged && !panned && event.button === 0);
|
|
19025
19031
|
press = null;
|
|
19026
|
-
if (!clicked) return;
|
|
19027
|
-
if (!(event.target instanceof HTMLCanvasElement)) return;
|
|
19032
|
+
if (!clicked) return false;
|
|
19033
|
+
if (!(event.target instanceof HTMLCanvasElement)) return false;
|
|
19028
19034
|
const rect = box.getBoundingClientRect();
|
|
19029
19035
|
const x = event.clientX - rect.left;
|
|
19030
19036
|
const y = event.clientY - rect.top;
|
|
@@ -19075,6 +19081,11 @@ function CandleChart({ candles, marks, indicators, expanded, resetToken, drawMod
|
|
|
19075
19081
|
}
|
|
19076
19082
|
};
|
|
19077
19083
|
box.addEventListener("click", chartClick);
|
|
19084
|
+
const touchTap = (event) => {
|
|
19085
|
+
if (event.pointerType !== "touch" || press?.id !== event.pointerId) return;
|
|
19086
|
+
if (chartClick(event) !== false) touchTapAt = performance.now();
|
|
19087
|
+
};
|
|
19088
|
+
box.addEventListener("pointerup", touchTap);
|
|
19078
19089
|
let rangeTimer = null;
|
|
19079
19090
|
let viewportFrame = 0;
|
|
19080
19091
|
const refreshOverlay = () => {
|
|
@@ -19144,6 +19155,7 @@ function CandleChart({ candles, marks, indicators, expanded, resetToken, drawMod
|
|
|
19144
19155
|
box.removeEventListener("pointerup", move, true);
|
|
19145
19156
|
box.removeEventListener("pointercancel", cancel, true);
|
|
19146
19157
|
box.removeEventListener("click", chartClick);
|
|
19158
|
+
box.removeEventListener("pointerup", touchTap);
|
|
19147
19159
|
chart.timeScale().unsubscribeVisibleLogicalRangeChange(refreshOverlay);
|
|
19148
19160
|
box.removeEventListener("pointermove", scaleDrag);
|
|
19149
19161
|
box.removeEventListener("pointerdown", beginCanvasGesture);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-hyperliquid",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.4",
|
|
4
4
|
"description": "Hyperliquid trading desk for the DeepSeek Harness (dsh) - market workspace, native agent conversation and guarded live / paper trading over the Hyperliquid API.",
|
|
5
5
|
"icon": "./icon.svg",
|
|
6
6
|
"type": "module",
|