@flighthq/interaction 0.4.0-next.1821.efb1cbc → 0.4.0-next.1836.147ae1e
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/contract.d.ts +0 -1
- package/dist/contract.d.ts.map +1 -1
- package/dist/contract.js +0 -1
- package/dist/contract.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +13 -13
- package/dist/cursorBackend.d.ts +0 -12
- package/dist/cursorBackend.d.ts.map +0 -1
- package/dist/cursorBackend.js +0 -17
- package/dist/cursorBackend.js.map +0 -1
- package/src/cursorBackend.test.ts +0 -24
package/dist/contract.d.ts
CHANGED
package/dist/contract.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC"}
|
package/dist/contract.js
CHANGED
package/dist/contract.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract.js","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"contract.js","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { captureInteractionPointer, clearFocus, connectFocusNavigation, connectInputToInteraction, connectInteractionSignal, containsNode2D, createFocusManager, createInteractionManager, createNodeInteractionState,
|
|
1
|
+
export { captureInteractionPointer, clearFocus, connectFocusNavigation, connectInputToInteraction, connectInteractionSignal, containsNode2D, createFocusManager, createInteractionManager, createNodeInteractionState, describeGraphHit, disableInteractionGuards, disconnectInteractionSignal, dispatchInteractionContextMenu, dispatchInteractionKeyDown, dispatchInteractionKeyUp, dispatchInteractionPointerCancel, dispatchInteractionPointerDown, dispatchInteractionPointerMove, dispatchInteractionPointerUp, dispatchInteractionWheel, enableInteractionGuards, enableInteractionSignals, enableNodeInteractionState, explainInteractionHitEligibility, findGraphHitTarget, findGraphHitTargetPrecise, findGraphHitTargets, findGraphHitTargetsPrecise, findSpatialInteractionTarget, focusNextNode, focusNodeInDirection, focusPreviousNode, getFocusOrder, getFocusedNode, getInteractionSignals, getNode2DOverlapRectangle, getNodeCursor, getNodeHitArea, getNodeInteractionState, getNodeTabIndex, hitTestAreaQuery, hitTestAreaQueryCircle, hitTestGraphLocalBounds, hitTestGraphPoint, hitTestGraphPointPrecise, hitTestNode2Ds, hitTestNode2DsShape, hitTestNodeRegion, isNodeFocusable, isNodeFocused, isNodeHitTestEnabled, refreshInteractionSpatialIndex, registerSpriteHitTest, registerDefaultHitTests, registerHitTest, registerHitTestPrecise, registerShapeHitTest, registerTextHitTest, releaseInteractionPointer, setFocusedNode, setInteractionConnectGuard, setNodeCursor, setNodeFocusable, setNodeHitArea, setNodeHitTestEnabled, setNodeTabIndex, } from './contract';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EACzB,UAAU,EACV,sBAAsB,EACtB,yBAAyB,EACzB,wBAAwB,EACxB,cAAc,EACd,kBAAkB,EAClB,wBAAwB,EACxB,0BAA0B,EAC1B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EACzB,UAAU,EACV,sBAAsB,EACtB,yBAAyB,EACzB,wBAAwB,EACxB,cAAc,EACd,kBAAkB,EAClB,wBAAwB,EACxB,0BAA0B,EAC1B,gBAAgB,EAChB,wBAAwB,EACxB,2BAA2B,EAC3B,8BAA8B,EAC9B,0BAA0B,EAC1B,wBAAwB,EACxB,gCAAgC,EAChC,8BAA8B,EAC9B,8BAA8B,EAC9B,4BAA4B,EAC5B,wBAAwB,EACxB,uBAAuB,EACvB,wBAAwB,EACxB,0BAA0B,EAC1B,gCAAgC,EAChC,kBAAkB,EAClB,yBAAyB,EACzB,mBAAmB,EACnB,0BAA0B,EAC1B,4BAA4B,EAC5B,aAAa,EACb,oBAAoB,EACpB,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,qBAAqB,EACrB,yBAAyB,EACzB,aAAa,EACb,cAAc,EACd,uBAAuB,EACvB,eAAe,EACf,gBAAgB,EAChB,sBAAsB,EACtB,uBAAuB,EACvB,iBAAiB,EACjB,wBAAwB,EACxB,cAAc,EACd,mBAAmB,EACnB,iBAAiB,EACjB,eAAe,EACf,aAAa,EACb,oBAAoB,EACpB,8BAA8B,EAC9B,qBAAqB,EACrB,uBAAuB,EACvB,eAAe,EACf,sBAAsB,EACtB,oBAAoB,EACpB,mBAAmB,EACnB,yBAAyB,EACzB,cAAc,EACd,0BAA0B,EAC1B,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,qBAAqB,EACrB,eAAe,GAChB,MAAM,YAAY,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { captureInteractionPointer, clearFocus, connectFocusNavigation, connectInputToInteraction, connectInteractionSignal, containsNode2D, createFocusManager, createInteractionManager, createNodeInteractionState,
|
|
1
|
+
export { captureInteractionPointer, clearFocus, connectFocusNavigation, connectInputToInteraction, connectInteractionSignal, containsNode2D, createFocusManager, createInteractionManager, createNodeInteractionState, describeGraphHit, disableInteractionGuards, disconnectInteractionSignal, dispatchInteractionContextMenu, dispatchInteractionKeyDown, dispatchInteractionKeyUp, dispatchInteractionPointerCancel, dispatchInteractionPointerDown, dispatchInteractionPointerMove, dispatchInteractionPointerUp, dispatchInteractionWheel, enableInteractionGuards, enableInteractionSignals, enableNodeInteractionState, explainInteractionHitEligibility, findGraphHitTarget, findGraphHitTargetPrecise, findGraphHitTargets, findGraphHitTargetsPrecise, findSpatialInteractionTarget, focusNextNode, focusNodeInDirection, focusPreviousNode, getFocusOrder, getFocusedNode, getInteractionSignals, getNode2DOverlapRectangle, getNodeCursor, getNodeHitArea, getNodeInteractionState, getNodeTabIndex, hitTestAreaQuery, hitTestAreaQueryCircle, hitTestGraphLocalBounds, hitTestGraphPoint, hitTestGraphPointPrecise, hitTestNode2Ds, hitTestNode2DsShape, hitTestNodeRegion, isNodeFocusable, isNodeFocused, isNodeHitTestEnabled, refreshInteractionSpatialIndex, registerSpriteHitTest, registerDefaultHitTests, registerHitTest, registerHitTestPrecise, registerShapeHitTest, registerTextHitTest, releaseInteractionPointer, setFocusedNode, setInteractionConnectGuard, setNodeCursor, setNodeFocusable, setNodeHitArea, setNodeHitTestEnabled, setNodeTabIndex, } from './contract';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EACzB,UAAU,EACV,sBAAsB,EACtB,yBAAyB,EACzB,wBAAwB,EACxB,cAAc,EACd,kBAAkB,EAClB,wBAAwB,EACxB,0BAA0B,EAC1B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EACzB,UAAU,EACV,sBAAsB,EACtB,yBAAyB,EACzB,wBAAwB,EACxB,cAAc,EACd,kBAAkB,EAClB,wBAAwB,EACxB,0BAA0B,EAC1B,gBAAgB,EAChB,wBAAwB,EACxB,2BAA2B,EAC3B,8BAA8B,EAC9B,0BAA0B,EAC1B,wBAAwB,EACxB,gCAAgC,EAChC,8BAA8B,EAC9B,8BAA8B,EAC9B,4BAA4B,EAC5B,wBAAwB,EACxB,uBAAuB,EACvB,wBAAwB,EACxB,0BAA0B,EAC1B,gCAAgC,EAChC,kBAAkB,EAClB,yBAAyB,EACzB,mBAAmB,EACnB,0BAA0B,EAC1B,4BAA4B,EAC5B,aAAa,EACb,oBAAoB,EACpB,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,qBAAqB,EACrB,yBAAyB,EACzB,aAAa,EACb,cAAc,EACd,uBAAuB,EACvB,eAAe,EACf,gBAAgB,EAChB,sBAAsB,EACtB,uBAAuB,EACvB,iBAAiB,EACjB,wBAAwB,EACxB,cAAc,EACd,mBAAmB,EACnB,iBAAiB,EACjB,eAAe,EACf,aAAa,EACb,oBAAoB,EACpB,8BAA8B,EAC9B,qBAAqB,EACrB,uBAAuB,EACvB,eAAe,EACf,sBAAsB,EACtB,oBAAoB,EACpB,mBAAmB,EACnB,yBAAyB,EACzB,cAAc,EACd,0BAA0B,EAC1B,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,qBAAqB,EACrB,eAAe,GAChB,MAAM,YAAY,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flighthq/interaction",
|
|
3
|
-
"version": "0.4.0-next.
|
|
3
|
+
"version": "0.4.0-next.1836.147ae1e",
|
|
4
4
|
"author": "Joshua Granick and other contributors",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -38,18 +38,18 @@
|
|
|
38
38
|
"clean:dist": "tsx ../../scripts/clean-package-dist.ts"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@flighthq/geometry": "0.4.0-next.
|
|
42
|
-
"@flighthq/node": "0.4.0-next.
|
|
43
|
-
"@flighthq/scene2d": "0.4.0-next.
|
|
44
|
-
"@flighthq/log": "0.4.0-next.
|
|
45
|
-
"@flighthq/path": "0.4.0-next.
|
|
46
|
-
"@flighthq/shape": "0.4.0-next.
|
|
47
|
-
"@flighthq/spatial": "0.4.0-next.
|
|
48
|
-
"@flighthq/signals": "0.4.0-next.
|
|
49
|
-
"@flighthq/bitmap": "0.4.0-next.
|
|
50
|
-
"@flighthq/text": "0.4.0-next.
|
|
51
|
-
"@flighthq/textlayout": "0.4.0-next.
|
|
52
|
-
"@flighthq/types": "0.4.0-next.
|
|
41
|
+
"@flighthq/geometry": "0.4.0-next.1836.147ae1e",
|
|
42
|
+
"@flighthq/node": "0.4.0-next.1836.147ae1e",
|
|
43
|
+
"@flighthq/scene2d": "0.4.0-next.1836.147ae1e",
|
|
44
|
+
"@flighthq/log": "0.4.0-next.1836.147ae1e",
|
|
45
|
+
"@flighthq/path": "0.4.0-next.1836.147ae1e",
|
|
46
|
+
"@flighthq/shape": "0.4.0-next.1836.147ae1e",
|
|
47
|
+
"@flighthq/spatial": "0.4.0-next.1836.147ae1e",
|
|
48
|
+
"@flighthq/signals": "0.4.0-next.1836.147ae1e",
|
|
49
|
+
"@flighthq/bitmap": "0.4.0-next.1836.147ae1e",
|
|
50
|
+
"@flighthq/text": "0.4.0-next.1836.147ae1e",
|
|
51
|
+
"@flighthq/textlayout": "0.4.0-next.1836.147ae1e",
|
|
52
|
+
"@flighthq/types": "0.4.0-next.1836.147ae1e"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@flighthq/quadbatch": "*",
|
package/dist/cursorBackend.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { CursorBackend } from '@flighthq/types/contract';
|
|
2
|
-
/**
|
|
3
|
-
* Web cursor backend: applies the resolved rollover cursor to a DOM element's `style.cursor`
|
|
4
|
-
* (typically the render canvas). `setCursor(null)` clears back to the element's default. Pass the
|
|
5
|
-
* result to `createInteractionManager` via `cursorBackend`, or assign it to `manager.cursorBackend`.
|
|
6
|
-
*
|
|
7
|
-
* The backend is held per manager rather than globally, so multiple canvases each drive their own
|
|
8
|
-
* cursor zone. Import side-effect-free: this only constructs the backend; nothing is applied until
|
|
9
|
-
* pointer dispatch resolves a rollover.
|
|
10
|
-
*/
|
|
11
|
-
export declare function createWebCursorBackend(element: HTMLElement): CursorBackend;
|
|
12
|
-
//# sourceMappingURL=cursorBackend.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cursorBackend.d.ts","sourceRoot":"","sources":["../src/cursorBackend.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAU,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEtE;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,WAAW,GAAG,aAAa,CAM1E"}
|
package/dist/cursorBackend.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Web cursor backend: applies the resolved rollover cursor to a DOM element's `style.cursor`
|
|
3
|
-
* (typically the render canvas). `setCursor(null)` clears back to the element's default. Pass the
|
|
4
|
-
* result to `createInteractionManager` via `cursorBackend`, or assign it to `manager.cursorBackend`.
|
|
5
|
-
*
|
|
6
|
-
* The backend is held per manager rather than globally, so multiple canvases each drive their own
|
|
7
|
-
* cursor zone. Import side-effect-free: this only constructs the backend; nothing is applied until
|
|
8
|
-
* pointer dispatch resolves a rollover.
|
|
9
|
-
*/
|
|
10
|
-
export function createWebCursorBackend(element) {
|
|
11
|
-
return {
|
|
12
|
-
setCursor(cursor) {
|
|
13
|
-
element.style.cursor = cursor ?? '';
|
|
14
|
-
},
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=cursorBackend.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cursorBackend.js","sourceRoot":"","sources":["../src/cursorBackend.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH,MAAM,UAAU,sBAAsB,CAAC,OAAoB;IACzD,OAAO;QACL,SAAS,CAAC,MAAqB;YAC7B,OAAO,CAAC,KAAK,CAAC,MAAM,GAAG,MAAM,IAAI,EAAE,CAAC;QACtC,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { Cursor } from '@flighthq/types/contract';
|
|
2
|
-
|
|
3
|
-
import { createWebCursorBackend } from './cursorBackend';
|
|
4
|
-
|
|
5
|
-
describe('createWebCursorBackend', () => {
|
|
6
|
-
function fakeElement(): { style: { cursor: string } } {
|
|
7
|
-
return { style: { cursor: 'init' } };
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
it('writes the cursor value to element.style.cursor', () => {
|
|
11
|
-
const el = fakeElement();
|
|
12
|
-
const backend = createWebCursorBackend(el as unknown as HTMLElement);
|
|
13
|
-
backend.setCursor('pointer' as Cursor);
|
|
14
|
-
expect(el.style.cursor).toBe('pointer');
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
it('clears to the empty string when given null', () => {
|
|
18
|
-
const el = fakeElement();
|
|
19
|
-
const backend = createWebCursorBackend(el as unknown as HTMLElement);
|
|
20
|
-
backend.setCursor('grab' as Cursor);
|
|
21
|
-
backend.setCursor(null);
|
|
22
|
-
expect(el.style.cursor).toBe('');
|
|
23
|
-
});
|
|
24
|
-
});
|