@rezi-ui/core 0.1.0-alpha.26 → 0.1.0-alpha.27
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/dist/app/widgetRenderer.d.ts +6 -0
- package/dist/app/widgetRenderer.d.ts.map +1 -1
- package/dist/app/widgetRenderer.js +415 -3
- package/dist/app/widgetRenderer.js.map +1 -1
- package/dist/renderer/renderToDrawlist/renderTree.d.ts +1 -1
- package/dist/renderer/renderToDrawlist/renderTree.d.ts.map +1 -1
- package/dist/renderer/renderToDrawlist/renderTree.js +2 -2
- package/dist/renderer/renderToDrawlist/renderTree.js.map +1 -1
- package/dist/renderer/renderToDrawlist/simpleVNode.d.ts.map +1 -1
- package/dist/renderer/renderToDrawlist/simpleVNode.js +9 -5
- package/dist/renderer/renderToDrawlist/simpleVNode.js.map +1 -1
- package/dist/renderer/renderToDrawlist/types.d.ts +2 -0
- package/dist/renderer/renderToDrawlist/types.d.ts.map +1 -1
- package/dist/renderer/renderToDrawlist/widgets/basic.d.ts +1 -1
- package/dist/renderer/renderToDrawlist/widgets/basic.d.ts.map +1 -1
- package/dist/renderer/renderToDrawlist/widgets/basic.js +27 -5
- package/dist/renderer/renderToDrawlist/widgets/basic.js.map +1 -1
- package/dist/renderer/renderToDrawlist/widgets/collections.d.ts.map +1 -1
- package/dist/renderer/renderToDrawlist/widgets/collections.js +50 -13
- package/dist/renderer/renderToDrawlist/widgets/collections.js.map +1 -1
- package/dist/renderer/renderToDrawlist/widgets/containers.d.ts.map +1 -1
- package/dist/renderer/renderToDrawlist/widgets/containers.js +43 -11
- package/dist/renderer/renderToDrawlist/widgets/containers.js.map +1 -1
- package/dist/renderer/renderToDrawlist/widgets/editors.d.ts.map +1 -1
- package/dist/renderer/renderToDrawlist/widgets/editors.js +57 -20
- package/dist/renderer/renderToDrawlist/widgets/editors.js.map +1 -1
- package/dist/renderer/renderToDrawlist/widgets/files.d.ts.map +1 -1
- package/dist/renderer/renderToDrawlist/widgets/files.js +35 -17
- package/dist/renderer/renderToDrawlist/widgets/files.js.map +1 -1
- package/dist/renderer/renderToDrawlist/widgets/focusConfig.d.ts +9 -0
- package/dist/renderer/renderToDrawlist/widgets/focusConfig.d.ts.map +1 -0
- package/dist/renderer/renderToDrawlist/widgets/focusConfig.js +43 -0
- package/dist/renderer/renderToDrawlist/widgets/focusConfig.js.map +1 -0
- package/dist/renderer/renderToDrawlist/widgets/overlays.d.ts.map +1 -1
- package/dist/renderer/renderToDrawlist/widgets/overlays.js +19 -3
- package/dist/renderer/renderToDrawlist/widgets/overlays.js.map +1 -1
- package/dist/renderer/renderToDrawlist.d.ts.map +1 -1
- package/dist/renderer/renderToDrawlist.js +1 -1
- package/dist/renderer/renderToDrawlist.js.map +1 -1
- package/dist/widgets/types.d.ts +57 -0
- package/dist/widgets/types.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -129,6 +129,12 @@ export declare class WidgetRenderer<S> {
|
|
|
129
129
|
private pressedTable;
|
|
130
130
|
private pressedTableHeader;
|
|
131
131
|
private lastTableClick;
|
|
132
|
+
private pressedFileTree;
|
|
133
|
+
private lastFileTreeClick;
|
|
134
|
+
private pressedFilePicker;
|
|
135
|
+
private lastFilePickerClick;
|
|
136
|
+
private pressedTree;
|
|
137
|
+
private lastTreeClick;
|
|
132
138
|
private traps;
|
|
133
139
|
private zoneMetaById;
|
|
134
140
|
private focusInfoById;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"widgetRenderer.d.ts","sourceRoot":"","sources":["../../src/app/widgetRenderer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAG7C,OAAO,EAAkD,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpG,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EAIvB,MAAM,sBAAsB,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OAAO,CAAC,qBAAqB;IAkB7B,OAAO,CAAC,8CAA8C;IA2BtD,OAAO,CAAC,yBAAyB;IAyBjC,OAAO,CAAC,mCAAmC;IAmB3C,OAAO,CAAC,oBAAoB;IA0B5B,OAAO,CAAC,oBAAoB;IAU5B,OAAO,CAAC,0BAA0B;IA8ClC;;;;;;;;;;;;;;;;OAgBG;IACH,WAAW,CACT,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EACjB,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,EACrB,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,mBAAmB,EAC1B,IAAI,GAAE,gBAA6E,GAClF,wBAAwB;CAgpC5B"}
|
|
@@ -101,6 +101,17 @@ function describeThrown(v) {
|
|
|
101
101
|
return `${v.name}: ${v.message}`;
|
|
102
102
|
return String(v);
|
|
103
103
|
}
|
|
104
|
+
function invokeCallbackSafely(callback, ...args) {
|
|
105
|
+
if (typeof callback !== "function")
|
|
106
|
+
return false;
|
|
107
|
+
try {
|
|
108
|
+
callback(...args);
|
|
109
|
+
return true;
|
|
110
|
+
}
|
|
111
|
+
catch {
|
|
112
|
+
return false;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
104
115
|
function isI32NonNegative(n) {
|
|
105
116
|
return Number.isInteger(n) && n >= 0 && n <= 2147483647;
|
|
106
117
|
}
|
|
@@ -113,6 +124,14 @@ function clampInt(v, min, max) {
|
|
|
113
124
|
return max;
|
|
114
125
|
return v;
|
|
115
126
|
}
|
|
127
|
+
function clampIndexScrollTopForRows(scrollTop, totalRows, viewportRows) {
|
|
128
|
+
const maxScrollTop = Math.max(0, totalRows - viewportRows);
|
|
129
|
+
if (!Number.isFinite(scrollTop) || scrollTop <= 0)
|
|
130
|
+
return 0;
|
|
131
|
+
if (scrollTop >= maxScrollTop)
|
|
132
|
+
return maxScrollTop;
|
|
133
|
+
return Math.trunc(scrollTop);
|
|
134
|
+
}
|
|
116
135
|
function encodeLayerZIndex(baseZ, overlaySeq) {
|
|
117
136
|
if (baseZ === null)
|
|
118
137
|
return overlaySeq;
|
|
@@ -437,6 +456,12 @@ export class WidgetRenderer {
|
|
|
437
456
|
pressedTable = null;
|
|
438
457
|
pressedTableHeader = null;
|
|
439
458
|
lastTableClick = null;
|
|
459
|
+
pressedFileTree = null;
|
|
460
|
+
lastFileTreeClick = null;
|
|
461
|
+
pressedFilePicker = null;
|
|
462
|
+
lastFilePickerClick = null;
|
|
463
|
+
pressedTree = null;
|
|
464
|
+
lastTreeClick = null;
|
|
440
465
|
traps = new Map();
|
|
441
466
|
zoneMetaById = new Map();
|
|
442
467
|
focusInfoById = new Map();
|
|
@@ -2380,6 +2405,372 @@ export class WidgetRenderer {
|
|
|
2380
2405
|
this.pressedTableHeader = null;
|
|
2381
2406
|
}
|
|
2382
2407
|
}
|
|
2408
|
+
// Mouse click for FilePicker:
|
|
2409
|
+
// - on down: select clicked node (skip right button)
|
|
2410
|
+
// - on up: detect double-click to open file or toggle directory
|
|
2411
|
+
if (event.kind === "mouse" && (event.mouseKind === 3 || event.mouseKind === 4)) {
|
|
2412
|
+
const targetId = mouseTargetId;
|
|
2413
|
+
if (targetId !== null) {
|
|
2414
|
+
const fp = this.filePickerById.get(targetId);
|
|
2415
|
+
const rect = this.rectById.get(targetId);
|
|
2416
|
+
if (fp && rect) {
|
|
2417
|
+
const state = this.treeStore.get(fp.id);
|
|
2418
|
+
const flatNodes = readFileNodeFlatCache(state, fp.data, fp.expandedPaths) ??
|
|
2419
|
+
(() => {
|
|
2420
|
+
const next = flattenTree(fp.data, fileNodeGetKey, fileNodeGetChildren, fileNodeHasChildren, fp.expandedPaths);
|
|
2421
|
+
this.treeStore.set(fp.id, {
|
|
2422
|
+
flatCache: makeFileNodeFlatCache(fp.data, fp.expandedPaths, next),
|
|
2423
|
+
});
|
|
2424
|
+
return next;
|
|
2425
|
+
})();
|
|
2426
|
+
const computeNodeIndex = () => {
|
|
2427
|
+
const localY = event.y - rect.y;
|
|
2428
|
+
if (localY < 0 || localY >= rect.h)
|
|
2429
|
+
return null;
|
|
2430
|
+
if (flatNodes.length === 0)
|
|
2431
|
+
return null;
|
|
2432
|
+
const effectiveScrollTop = clampIndexScrollTopForRows(state.scrollTop, flatNodes.length, rect.h);
|
|
2433
|
+
const idx = effectiveScrollTop + localY;
|
|
2434
|
+
if (idx < 0 || idx >= flatNodes.length)
|
|
2435
|
+
return null;
|
|
2436
|
+
return idx;
|
|
2437
|
+
};
|
|
2438
|
+
if (event.mouseKind === 3) {
|
|
2439
|
+
this.pressedFilePicker = null;
|
|
2440
|
+
const RIGHT_BUTTON = 1 << 2;
|
|
2441
|
+
if ((event.buttons & RIGHT_BUTTON) !== 0) {
|
|
2442
|
+
// No right-click behavior for file picker.
|
|
2443
|
+
}
|
|
2444
|
+
else {
|
|
2445
|
+
const nodeIndex = computeNodeIndex();
|
|
2446
|
+
if (nodeIndex !== null) {
|
|
2447
|
+
const fn = flatNodes[nodeIndex];
|
|
2448
|
+
if (fn) {
|
|
2449
|
+
invokeCallbackSafely(fp.onSelect, fn.key);
|
|
2450
|
+
this.treeStore.set(fp.id, { focusedKey: fn.key });
|
|
2451
|
+
this.pressedFilePicker = Object.freeze({
|
|
2452
|
+
id: fp.id,
|
|
2453
|
+
nodeIndex,
|
|
2454
|
+
nodeKey: fn.key,
|
|
2455
|
+
});
|
|
2456
|
+
localNeedsRender = true;
|
|
2457
|
+
}
|
|
2458
|
+
}
|
|
2459
|
+
else {
|
|
2460
|
+
this.pressedFilePicker = null;
|
|
2461
|
+
this.lastFilePickerClick = null;
|
|
2462
|
+
}
|
|
2463
|
+
}
|
|
2464
|
+
}
|
|
2465
|
+
else {
|
|
2466
|
+
const pressed = this.pressedFilePicker;
|
|
2467
|
+
this.pressedFilePicker = null;
|
|
2468
|
+
if (pressed && pressed.id === fp.id) {
|
|
2469
|
+
const nodeIndex = computeNodeIndex();
|
|
2470
|
+
if (nodeIndex !== null && nodeIndex === pressed.nodeIndex) {
|
|
2471
|
+
const fn = flatNodes[nodeIndex];
|
|
2472
|
+
if (!fn || fn.key !== pressed.nodeKey) {
|
|
2473
|
+
this.lastFilePickerClick = null;
|
|
2474
|
+
}
|
|
2475
|
+
else {
|
|
2476
|
+
const DOUBLE_PRESS_MS = 500;
|
|
2477
|
+
const last = this.lastFilePickerClick;
|
|
2478
|
+
const dt = last ? event.timeMs - last.timeMs : Number.POSITIVE_INFINITY;
|
|
2479
|
+
const isDouble = last &&
|
|
2480
|
+
last.id === fp.id &&
|
|
2481
|
+
last.nodeIndex === nodeIndex &&
|
|
2482
|
+
last.nodeKey === fn.key &&
|
|
2483
|
+
dt >= 0 &&
|
|
2484
|
+
dt <= DOUBLE_PRESS_MS;
|
|
2485
|
+
if (isDouble) {
|
|
2486
|
+
if (fn.node.type === "directory") {
|
|
2487
|
+
invokeCallbackSafely(fp.onToggle, fn.key, !fp.expandedPaths.includes(fn.key));
|
|
2488
|
+
}
|
|
2489
|
+
else {
|
|
2490
|
+
invokeCallbackSafely(fp.onOpen, fn.key);
|
|
2491
|
+
}
|
|
2492
|
+
this.lastFilePickerClick = null;
|
|
2493
|
+
localNeedsRender = true;
|
|
2494
|
+
}
|
|
2495
|
+
else {
|
|
2496
|
+
this.lastFilePickerClick = Object.freeze({
|
|
2497
|
+
id: fp.id,
|
|
2498
|
+
nodeIndex,
|
|
2499
|
+
nodeKey: fn.key,
|
|
2500
|
+
timeMs: event.timeMs,
|
|
2501
|
+
});
|
|
2502
|
+
localNeedsRender = true;
|
|
2503
|
+
}
|
|
2504
|
+
}
|
|
2505
|
+
}
|
|
2506
|
+
else {
|
|
2507
|
+
this.lastFilePickerClick = null;
|
|
2508
|
+
}
|
|
2509
|
+
}
|
|
2510
|
+
}
|
|
2511
|
+
}
|
|
2512
|
+
else if (event.mouseKind === 4) {
|
|
2513
|
+
this.pressedFilePicker = null;
|
|
2514
|
+
}
|
|
2515
|
+
}
|
|
2516
|
+
else if (event.mouseKind === 4) {
|
|
2517
|
+
this.pressedFilePicker = null;
|
|
2518
|
+
}
|
|
2519
|
+
}
|
|
2520
|
+
// Mouse click for FileTreeExplorer:
|
|
2521
|
+
// - on down: select clicked node (skip right button)
|
|
2522
|
+
// - on up: detect double-click and fire onActivate
|
|
2523
|
+
if (event.kind === "mouse" && (event.mouseKind === 3 || event.mouseKind === 4)) {
|
|
2524
|
+
const targetId = mouseTargetId;
|
|
2525
|
+
if (targetId !== null) {
|
|
2526
|
+
const fte = this.fileTreeExplorerById.get(targetId);
|
|
2527
|
+
const rect = this.rectById.get(targetId);
|
|
2528
|
+
if (fte && rect) {
|
|
2529
|
+
const state = this.treeStore.get(fte.id);
|
|
2530
|
+
const flatNodes = readFileNodeFlatCache(state, fte.data, fte.expanded) ??
|
|
2531
|
+
(() => {
|
|
2532
|
+
const next = flattenTree(fte.data, fileNodeGetKey, fileNodeGetChildren, fileNodeHasChildren, fte.expanded);
|
|
2533
|
+
this.treeStore.set(fte.id, {
|
|
2534
|
+
flatCache: makeFileNodeFlatCache(fte.data, fte.expanded, next),
|
|
2535
|
+
});
|
|
2536
|
+
return next;
|
|
2537
|
+
})();
|
|
2538
|
+
const computeNodeIndex = () => {
|
|
2539
|
+
const localY = event.y - rect.y;
|
|
2540
|
+
if (localY < 0 || localY >= rect.h)
|
|
2541
|
+
return null;
|
|
2542
|
+
if (flatNodes.length === 0)
|
|
2543
|
+
return null;
|
|
2544
|
+
const effectiveScrollTop = clampIndexScrollTopForRows(state.scrollTop, flatNodes.length, rect.h);
|
|
2545
|
+
const idx = effectiveScrollTop + localY;
|
|
2546
|
+
if (idx < 0 || idx >= flatNodes.length)
|
|
2547
|
+
return null;
|
|
2548
|
+
return idx;
|
|
2549
|
+
};
|
|
2550
|
+
if (event.mouseKind === 3) {
|
|
2551
|
+
this.pressedFileTree = null;
|
|
2552
|
+
const RIGHT_BUTTON = 1 << 2;
|
|
2553
|
+
if ((event.buttons & RIGHT_BUTTON) !== 0) {
|
|
2554
|
+
// Right-click is handled by the context menu block below.
|
|
2555
|
+
}
|
|
2556
|
+
else {
|
|
2557
|
+
const nodeIndex = computeNodeIndex();
|
|
2558
|
+
if (nodeIndex !== null) {
|
|
2559
|
+
const fn = flatNodes[nodeIndex];
|
|
2560
|
+
if (fn) {
|
|
2561
|
+
invokeCallbackSafely(fte.onSelect, fn.node);
|
|
2562
|
+
this.treeStore.set(fte.id, { focusedKey: fn.key });
|
|
2563
|
+
this.pressedFileTree = Object.freeze({
|
|
2564
|
+
id: fte.id,
|
|
2565
|
+
nodeIndex,
|
|
2566
|
+
nodeKey: fn.key,
|
|
2567
|
+
});
|
|
2568
|
+
localNeedsRender = true;
|
|
2569
|
+
}
|
|
2570
|
+
}
|
|
2571
|
+
else {
|
|
2572
|
+
this.pressedFileTree = null;
|
|
2573
|
+
this.lastFileTreeClick = null;
|
|
2574
|
+
}
|
|
2575
|
+
}
|
|
2576
|
+
}
|
|
2577
|
+
else {
|
|
2578
|
+
const pressedFT = this.pressedFileTree;
|
|
2579
|
+
this.pressedFileTree = null;
|
|
2580
|
+
if (pressedFT && pressedFT.id === fte.id) {
|
|
2581
|
+
const nodeIndex = computeNodeIndex();
|
|
2582
|
+
if (nodeIndex !== null && nodeIndex === pressedFT.nodeIndex) {
|
|
2583
|
+
const fn = flatNodes[nodeIndex];
|
|
2584
|
+
if (!fn || fn.key !== pressedFT.nodeKey) {
|
|
2585
|
+
this.lastFileTreeClick = null;
|
|
2586
|
+
}
|
|
2587
|
+
else {
|
|
2588
|
+
const DOUBLE_PRESS_MS = 500;
|
|
2589
|
+
const last = this.lastFileTreeClick;
|
|
2590
|
+
const dt = last ? event.timeMs - last.timeMs : Number.POSITIVE_INFINITY;
|
|
2591
|
+
const isDouble = last &&
|
|
2592
|
+
last.id === fte.id &&
|
|
2593
|
+
last.nodeIndex === nodeIndex &&
|
|
2594
|
+
last.nodeKey === fn.key &&
|
|
2595
|
+
dt >= 0 &&
|
|
2596
|
+
dt <= DOUBLE_PRESS_MS;
|
|
2597
|
+
if (isDouble) {
|
|
2598
|
+
if (fn.node.type === "directory") {
|
|
2599
|
+
invokeCallbackSafely(fte.onToggle, fn.node, !fte.expanded.includes(fn.key));
|
|
2600
|
+
}
|
|
2601
|
+
invokeCallbackSafely(fte.onActivate, fn.node);
|
|
2602
|
+
this.lastFileTreeClick = null;
|
|
2603
|
+
}
|
|
2604
|
+
else {
|
|
2605
|
+
this.lastFileTreeClick = Object.freeze({
|
|
2606
|
+
id: fte.id,
|
|
2607
|
+
nodeIndex,
|
|
2608
|
+
nodeKey: fn.key,
|
|
2609
|
+
timeMs: event.timeMs,
|
|
2610
|
+
});
|
|
2611
|
+
}
|
|
2612
|
+
localNeedsRender = true;
|
|
2613
|
+
}
|
|
2614
|
+
}
|
|
2615
|
+
else {
|
|
2616
|
+
this.lastFileTreeClick = null;
|
|
2617
|
+
}
|
|
2618
|
+
}
|
|
2619
|
+
}
|
|
2620
|
+
}
|
|
2621
|
+
else if (event.mouseKind === 4) {
|
|
2622
|
+
this.pressedFileTree = null;
|
|
2623
|
+
}
|
|
2624
|
+
}
|
|
2625
|
+
else if (event.mouseKind === 4) {
|
|
2626
|
+
this.pressedFileTree = null;
|
|
2627
|
+
}
|
|
2628
|
+
}
|
|
2629
|
+
// Mouse click for generic tree:
|
|
2630
|
+
// - on down: select clicked node (skip right button)
|
|
2631
|
+
// - on up: detect double-click and fire onActivate, with optional onToggle for expandable nodes
|
|
2632
|
+
if (event.kind === "mouse" && (event.mouseKind === 3 || event.mouseKind === 4)) {
|
|
2633
|
+
const targetId = mouseTargetId;
|
|
2634
|
+
if (targetId !== null) {
|
|
2635
|
+
const tree = this.treeById.get(targetId);
|
|
2636
|
+
const rect = this.rectById.get(targetId);
|
|
2637
|
+
if (tree && rect) {
|
|
2638
|
+
const state = this.treeStore.get(tree.id);
|
|
2639
|
+
const expandedSet = state.expandedSetRef === tree.expanded && state.expandedSet
|
|
2640
|
+
? state.expandedSet
|
|
2641
|
+
: new Set(tree.expanded);
|
|
2642
|
+
if (state.expandedSetRef !== tree.expanded) {
|
|
2643
|
+
this.treeStore.set(tree.id, { expandedSetRef: tree.expanded, expandedSet });
|
|
2644
|
+
}
|
|
2645
|
+
const loaded = this.loadedTreeChildrenByTreeId.get(tree.id);
|
|
2646
|
+
const getChildrenRaw = tree.getChildren;
|
|
2647
|
+
const getKey = tree.getKey;
|
|
2648
|
+
const getChildren = loaded
|
|
2649
|
+
? (n) => {
|
|
2650
|
+
const k = getKey(n);
|
|
2651
|
+
const cached = loaded.get(k);
|
|
2652
|
+
return cached ?? getChildrenRaw?.(n);
|
|
2653
|
+
}
|
|
2654
|
+
: getChildrenRaw;
|
|
2655
|
+
const cached = state.flatCache;
|
|
2656
|
+
const canReuseFlatCache = cached &&
|
|
2657
|
+
cached.kind === "tree" &&
|
|
2658
|
+
cached.dataRef === tree.data &&
|
|
2659
|
+
cached.expandedRef === tree.expanded &&
|
|
2660
|
+
cached.getKeyRef === tree.getKey &&
|
|
2661
|
+
cached.getChildrenRef === tree.getChildren &&
|
|
2662
|
+
cached.hasChildrenRef === tree.hasChildren &&
|
|
2663
|
+
cached.loadedRef === loaded;
|
|
2664
|
+
const flatNodes = canReuseFlatCache
|
|
2665
|
+
? cached.flatNodes
|
|
2666
|
+
: flattenTree(tree.data, getKey, getChildren, tree.hasChildren, tree.expanded, expandedSet);
|
|
2667
|
+
if (!canReuseFlatCache) {
|
|
2668
|
+
this.treeStore.set(tree.id, {
|
|
2669
|
+
flatCache: Object.freeze({
|
|
2670
|
+
kind: "tree",
|
|
2671
|
+
dataRef: tree.data,
|
|
2672
|
+
expandedRef: tree.expanded,
|
|
2673
|
+
loadedRef: loaded,
|
|
2674
|
+
getKeyRef: tree.getKey,
|
|
2675
|
+
getChildrenRef: tree.getChildren,
|
|
2676
|
+
hasChildrenRef: tree.hasChildren,
|
|
2677
|
+
flatNodes: flatNodes,
|
|
2678
|
+
}),
|
|
2679
|
+
});
|
|
2680
|
+
}
|
|
2681
|
+
const computeNodeIndex = () => {
|
|
2682
|
+
const localY = event.y - rect.y;
|
|
2683
|
+
if (localY < 0 || localY >= rect.h)
|
|
2684
|
+
return null;
|
|
2685
|
+
if (flatNodes.length === 0)
|
|
2686
|
+
return null;
|
|
2687
|
+
const effectiveScrollTop = clampIndexScrollTopForRows(state.scrollTop, flatNodes.length, rect.h);
|
|
2688
|
+
const idx = effectiveScrollTop + localY;
|
|
2689
|
+
if (idx < 0 || idx >= flatNodes.length)
|
|
2690
|
+
return null;
|
|
2691
|
+
return idx;
|
|
2692
|
+
};
|
|
2693
|
+
if (event.mouseKind === 3) {
|
|
2694
|
+
this.pressedTree = null;
|
|
2695
|
+
const RIGHT_BUTTON = 1 << 2;
|
|
2696
|
+
if ((event.buttons & RIGHT_BUTTON) !== 0) {
|
|
2697
|
+
// No right-click behavior for generic tree.
|
|
2698
|
+
}
|
|
2699
|
+
else {
|
|
2700
|
+
const nodeIndex = computeNodeIndex();
|
|
2701
|
+
if (nodeIndex !== null) {
|
|
2702
|
+
const fn = flatNodes[nodeIndex];
|
|
2703
|
+
if (fn) {
|
|
2704
|
+
if (tree.onSelect)
|
|
2705
|
+
invokeCallbackSafely(tree.onSelect, fn.node);
|
|
2706
|
+
this.treeStore.set(tree.id, { focusedKey: fn.key });
|
|
2707
|
+
this.pressedTree = Object.freeze({
|
|
2708
|
+
id: tree.id,
|
|
2709
|
+
nodeIndex,
|
|
2710
|
+
nodeKey: fn.key,
|
|
2711
|
+
});
|
|
2712
|
+
localNeedsRender = true;
|
|
2713
|
+
}
|
|
2714
|
+
}
|
|
2715
|
+
else {
|
|
2716
|
+
this.pressedTree = null;
|
|
2717
|
+
this.lastTreeClick = null;
|
|
2718
|
+
}
|
|
2719
|
+
}
|
|
2720
|
+
}
|
|
2721
|
+
else {
|
|
2722
|
+
const pressedTree = this.pressedTree;
|
|
2723
|
+
this.pressedTree = null;
|
|
2724
|
+
if (pressedTree && pressedTree.id === tree.id) {
|
|
2725
|
+
const nodeIndex = computeNodeIndex();
|
|
2726
|
+
if (nodeIndex !== null && nodeIndex === pressedTree.nodeIndex) {
|
|
2727
|
+
const fn = flatNodes[nodeIndex];
|
|
2728
|
+
if (!fn || fn.key !== pressedTree.nodeKey) {
|
|
2729
|
+
this.lastTreeClick = null;
|
|
2730
|
+
}
|
|
2731
|
+
else {
|
|
2732
|
+
const DOUBLE_PRESS_MS = 500;
|
|
2733
|
+
const last = this.lastTreeClick;
|
|
2734
|
+
const dt = last ? event.timeMs - last.timeMs : Number.POSITIVE_INFINITY;
|
|
2735
|
+
const isDouble = last &&
|
|
2736
|
+
last.id === tree.id &&
|
|
2737
|
+
last.nodeIndex === nodeIndex &&
|
|
2738
|
+
last.nodeKey === fn.key &&
|
|
2739
|
+
dt >= 0 &&
|
|
2740
|
+
dt <= DOUBLE_PRESS_MS;
|
|
2741
|
+
if (isDouble) {
|
|
2742
|
+
if (fn.hasChildren) {
|
|
2743
|
+
invokeCallbackSafely(tree.onToggle, fn.node, !tree.expanded.includes(fn.key));
|
|
2744
|
+
}
|
|
2745
|
+
if (tree.onActivate)
|
|
2746
|
+
invokeCallbackSafely(tree.onActivate, fn.node);
|
|
2747
|
+
this.lastTreeClick = null;
|
|
2748
|
+
}
|
|
2749
|
+
else {
|
|
2750
|
+
this.lastTreeClick = Object.freeze({
|
|
2751
|
+
id: tree.id,
|
|
2752
|
+
nodeIndex,
|
|
2753
|
+
nodeKey: fn.key,
|
|
2754
|
+
timeMs: event.timeMs,
|
|
2755
|
+
});
|
|
2756
|
+
}
|
|
2757
|
+
localNeedsRender = true;
|
|
2758
|
+
}
|
|
2759
|
+
}
|
|
2760
|
+
else {
|
|
2761
|
+
this.lastTreeClick = null;
|
|
2762
|
+
}
|
|
2763
|
+
}
|
|
2764
|
+
}
|
|
2765
|
+
}
|
|
2766
|
+
else if (event.mouseKind === 4) {
|
|
2767
|
+
this.pressedTree = null;
|
|
2768
|
+
}
|
|
2769
|
+
}
|
|
2770
|
+
else if (event.mouseKind === 4) {
|
|
2771
|
+
this.pressedTree = null;
|
|
2772
|
+
}
|
|
2773
|
+
}
|
|
2383
2774
|
// Right-click context menu for FileTreeExplorer.
|
|
2384
2775
|
if (event.kind === "mouse" && event.mouseKind === 3) {
|
|
2385
2776
|
const targetId = mouseTargetId;
|
|
@@ -2401,10 +2792,11 @@ export class WidgetRenderer {
|
|
|
2401
2792
|
});
|
|
2402
2793
|
return next;
|
|
2403
2794
|
})();
|
|
2404
|
-
const
|
|
2795
|
+
const effectiveScrollTop = clampIndexScrollTopForRows(state.scrollTop, flatNodes.length, rect.h);
|
|
2796
|
+
const idx = effectiveScrollTop + localY;
|
|
2405
2797
|
const fn = flatNodes[idx];
|
|
2406
2798
|
if (fn) {
|
|
2407
|
-
fte.onContextMenu
|
|
2799
|
+
invokeCallbackSafely(fte.onContextMenu, fn.node);
|
|
2408
2800
|
localNeedsRender = true;
|
|
2409
2801
|
}
|
|
2410
2802
|
}
|
|
@@ -3896,6 +4288,25 @@ export class WidgetRenderer {
|
|
|
3896
4288
|
this.treeStore.delete(prevId);
|
|
3897
4289
|
}
|
|
3898
4290
|
}
|
|
4291
|
+
// Clear stale FileTreeExplorer click tracking state.
|
|
4292
|
+
if (this.pressedFileTree && !this.fileTreeExplorerById.has(this.pressedFileTree.id)) {
|
|
4293
|
+
this.pressedFileTree = null;
|
|
4294
|
+
}
|
|
4295
|
+
if (this.lastFileTreeClick && !this.fileTreeExplorerById.has(this.lastFileTreeClick.id)) {
|
|
4296
|
+
this.lastFileTreeClick = null;
|
|
4297
|
+
}
|
|
4298
|
+
if (this.pressedFilePicker && !this.filePickerById.has(this.pressedFilePicker.id)) {
|
|
4299
|
+
this.pressedFilePicker = null;
|
|
4300
|
+
}
|
|
4301
|
+
if (this.lastFilePickerClick && !this.filePickerById.has(this.lastFilePickerClick.id)) {
|
|
4302
|
+
this.lastFilePickerClick = null;
|
|
4303
|
+
}
|
|
4304
|
+
if (this.pressedTree && !this.treeById.has(this.pressedTree.id)) {
|
|
4305
|
+
this.pressedTree = null;
|
|
4306
|
+
}
|
|
4307
|
+
if (this.lastTreeClick && !this.treeById.has(this.lastTreeClick.id)) {
|
|
4308
|
+
this.lastTreeClick = null;
|
|
4309
|
+
}
|
|
3899
4310
|
// Garbage collect command palette async state for palettes that were removed.
|
|
3900
4311
|
for (const prevId of this._pooledPrevCommandPaletteIds) {
|
|
3901
4312
|
if (!this.commandPaletteById.has(prevId)) {
|
|
@@ -4049,7 +4460,7 @@ export class WidgetRenderer {
|
|
|
4049
4460
|
}
|
|
4050
4461
|
for (const damageRect of damageRects) {
|
|
4051
4462
|
this.builder.pushClip(damageRect.x, damageRect.y, damageRect.w, damageRect.h);
|
|
4052
|
-
renderTree(this.builder, this.focusState, this.layoutTree, this._pooledRectById, viewport, theme, tick, DEFAULT_BASE_STYLE, this.committedRoot, this.animatedRectByInstanceId, this.animatedOpacityByInstanceId, cursorInfo, this.virtualListStore, this.tableStore, this.treeStore, this.loadedTreeChildrenByTreeId, this.commandPaletteItemsById, this.commandPaletteLoadingById, this.toolApprovalFocusedActionById, this.dropdownSelectedIndexById, this.diffViewerFocusedHunkById, this.diffViewerExpandedHunksById, this.tableRenderCacheById, this.logsConsoleRenderCacheById, this.diffRenderCacheById, this.codeEditorRenderCacheById, focusAnnouncement, { damageRect }, this.terminalProfile);
|
|
4463
|
+
renderTree(this.builder, this.focusState, this.layoutTree, this._pooledRectById, viewport, theme, tick, DEFAULT_BASE_STYLE, this.committedRoot, this.animatedRectByInstanceId, this.animatedOpacityByInstanceId, cursorInfo, this.virtualListStore, this.tableStore, this.treeStore, this.loadedTreeChildrenByTreeId, this.commandPaletteItemsById, this.commandPaletteLoadingById, this.toolApprovalFocusedActionById, this.dropdownSelectedIndexById, this.diffViewerFocusedHunkById, this.diffViewerExpandedHunksById, this.tableRenderCacheById, this.logsConsoleRenderCacheById, this.diffRenderCacheById, this.codeEditorRenderCacheById, focusAnnouncement, { damageRect }, this.terminalProfile, this.pressedId);
|
|
4053
4464
|
this.builder.popClip();
|
|
4054
4465
|
}
|
|
4055
4466
|
runtimeCursorSummary = this.emitIncrementalCursor(cursorInfo);
|
|
@@ -4063,6 +4474,7 @@ export class WidgetRenderer {
|
|
|
4063
4474
|
layout: this.layoutTree,
|
|
4064
4475
|
viewport,
|
|
4065
4476
|
focusState: this.focusState,
|
|
4477
|
+
pressedId: this.pressedId,
|
|
4066
4478
|
builder: this.builder,
|
|
4067
4479
|
tick,
|
|
4068
4480
|
theme,
|