@weasel-js/hud 1.6.0 → 1.7.0
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/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/react/index.js +18 -18
- package/dist/react/index.js.map +1 -1
- package/dist/react/useHud.d.ts +20 -15
- package/dist/react/useHud.d.ts.map +1 -1
- package/dist/{tool-C2amOWae.js → tool-Dbd-7ffu.js} +167 -164
- package/dist/tool-Dbd-7ffu.js.map +1 -0
- package/dist/tool.d.ts +11 -5
- package/dist/tool.d.ts.map +1 -1
- package/dist/widgets/window/window.d.ts.map +1 -1
- package/package.json +7 -7
- package/dist/tool-C2amOWae.js.map +0 -1
package/dist/tool.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { SurfaceContribution } from '@weasel-js/core';
|
|
2
|
+
import { type AttachHudOptions } from './attach';
|
|
3
|
+
import type { Hud } from './hud';
|
|
2
4
|
import { type Widget } from './widget';
|
|
3
5
|
/** What the HUD layer's `hitTest` resolves and hands to the actions below. */
|
|
4
6
|
export interface HudHitPayload {
|
|
@@ -13,11 +15,15 @@ export declare const HUD_AFFORDANCE_KIND = "layer:weasel-hud";
|
|
|
13
15
|
* whatever tool is active, live only for input its own layer claimed.
|
|
14
16
|
*
|
|
15
17
|
* ```tsx
|
|
16
|
-
* const hud = useHud(
|
|
17
|
-
* const
|
|
18
|
-
* <SceneCanvas
|
|
18
|
+
* const hud = useHud();
|
|
19
|
+
* const hudEntry = useHudContribution(hud);
|
|
20
|
+
* <SceneCanvas ambient={[hudEntry]} … />
|
|
19
21
|
* ```
|
|
20
22
|
*
|
|
23
|
+
* Given a HUD, the entry's `attach` binds it to the canvas the entry is
|
|
24
|
+
* installed on. Without one, the entry routes input only, for a HUD attached
|
|
25
|
+
* some other way (`attachHud`, or `useHud(ref)`).
|
|
26
|
+
*
|
|
21
27
|
* The press protocol alone spans three gesture kinds:
|
|
22
28
|
*
|
|
23
29
|
* - `pointerDown` sends `down` at press time, before the dispatcher knows
|
|
@@ -34,5 +40,5 @@ export declare const HUD_AFFORDANCE_KIND = "layer:weasel-hud";
|
|
|
34
40
|
* This replaces a `DragChannel` the HUD's `hitTest` used to hand back for the
|
|
35
41
|
* tool-routing dispatcher to drive. That dispatcher is gone.
|
|
36
42
|
*/
|
|
37
|
-
export declare function createHudContribution():
|
|
43
|
+
export declare function createHudContribution(hud?: Hud, options?: AttachHudOptions): SurfaceContribution;
|
|
38
44
|
//# sourceMappingURL=tool.d.ts.map
|
package/dist/tool.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool.d.ts","sourceRoot":"","sources":["../src/tool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"tool.d.ts","sourceRoot":"","sources":["../src/tool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAC+D,mBAAmB,EAC7F,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAa,KAAK,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAY,KAAK,MAAM,EAAwB,MAAM,UAAU,CAAC;AAEvE,8EAA8E;AAC9E,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;wEACwE;AACxE,eAAO,MAAM,mBAAmB,qBAAqB,CAAC;AAqKtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,gBAAgB,GAAG,mBAAmB,CA4BhG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"window.d.ts","sourceRoot":"","sources":["../../../src/widgets/window/window.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,MAA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AQ,CAAC,EAAE,CAAC,CAAC,EAAE,YAAY,KAAK,IAAI,CAAC;IACrC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC5B;;uDAEmD;IACnD,cAAc,CAAC,EAAE,CAAC,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IACvD,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,wDAAwD;IACxD,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;CAC5B;AAED;;;;GAIG;AACH,MAAM,WAAW,YAAa,SAAQ,MAAM;IAC1C,QAAQ,CAAC,WAAW,EAAE,YAAY,CAAC;IACnC,SAAS,CAAC,CAAC,EAAE,YAAY,GAAG,IAAI,CAAC;IACjC,SAAS,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC;IACjC,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;IAC5C,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;IACjD,OAAO,IAAI,IAAI,CAAC;CACjB;AAgBD,wBAAgB,YAAY,CAAC,IAAI,EAAE,aAAa,GAAG,YAAY,CAgO9D"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weasel-js/hud",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"description": "WebGL-rendered UI widgets that composite into a weasel canvas",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -21,14 +21,14 @@
|
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
23
|
"react": ">=18",
|
|
24
|
-
"@weasel-js/core": "1.
|
|
25
|
-
"@weasel-js/font": "1.
|
|
24
|
+
"@weasel-js/core": "1.7.0",
|
|
25
|
+
"@weasel-js/font": "1.7.0"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@weasel-js/geom": "1.
|
|
29
|
-
"@weasel-js/loupe": "1.
|
|
30
|
-
"@weasel-js/paint": "1.
|
|
31
|
-
"@weasel-js/theme": "1.
|
|
28
|
+
"@weasel-js/geom": "1.7.0",
|
|
29
|
+
"@weasel-js/loupe": "1.7.0",
|
|
30
|
+
"@weasel-js/paint": "1.7.0",
|
|
31
|
+
"@weasel-js/theme": "1.7.0"
|
|
32
32
|
},
|
|
33
33
|
"author": "orochi235",
|
|
34
34
|
"homepage": "https://orochi235.github.io/weasel/",
|