@benev/tact 0.2.0 → 0.3.0-2
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.md +48 -390
- package/package.json +25 -27
- package/s/_archive/README.md +435 -0
- package/s/_archive/deck/deck.ts +69 -0
- package/s/_archive/demo/main.bundle.ts +10 -0
- package/s/_archive/demo/main.css +85 -0
- package/s/_archive/index.html.ts +61 -0
- package/s/_archive/index.ts +8 -0
- package/s/_archive/tests.test.ts +6 -0
- package/s/_archive/utils/circular-clamp.ts +14 -0
- package/s/_archive/utils/evergreen.ts +10 -0
- package/s/_archive/utils/split-axis.ts +15 -0
- package/s/assets/b.png +0 -0
- package/s/core/atom/defaults.ts +32 -0
- package/s/core/atom/lens-algo.ts +84 -0
- package/s/core/atom/types.ts +44 -0
- package/s/core/bindings/normalize.ts +27 -0
- package/s/core/bindings/shape.ts +15 -0
- package/s/core/bindings/table.ts +22 -0
- package/s/core/intent/bucket.ts +28 -0
- package/s/core/intent/consts.ts +4 -0
- package/s/core/intent/decode.ts +23 -0
- package/s/core/intent/encode.ts +20 -0
- package/s/core/intent/merge.ts +15 -0
- package/s/core/parts/action.ts +36 -0
- package/s/core/parts/sample-map.ts +24 -0
- package/s/core/resolvers/actions.ts +30 -0
- package/s/core/resolvers/intents.ts +106 -0
- package/s/core/types.ts +40 -0
- package/s/deck/controller.ts +35 -0
- package/s/deck/deck.ts +76 -53
- package/s/deck/parts/profiles.ts +39 -0
- package/s/deck/parts/runtime.ts +11 -0
- package/s/deck/parts/settings.ts +30 -0
- package/s/deck/port.ts +35 -0
- package/s/deck/types.ts +16 -0
- package/s/demo/demo-app/element.ts +17 -0
- package/s/demo/demo-app/style.css.ts +10 -0
- package/s/demo/main.bundle.ts +67 -6
- package/s/demo/main.css +6 -8
- package/s/device/devices.ts +24 -0
- package/s/device/gamepad.ts +42 -0
- package/s/device/keyboard.ts +33 -0
- package/s/device/pad/on-pad.ts +50 -0
- package/s/device/pad/pad.ts +10 -0
- package/s/device/pointer.ts +97 -0
- package/s/device/sampler.ts +25 -0
- package/s/device/stick.ts +24 -0
- package/s/gamepad/gamepad-app/element.ts +65 -0
- package/s/gamepad/gamepad-app/style.css.ts +73 -0
- package/s/gamepad/index.html.ts +44 -0
- package/s/gamepad/main.bundle.ts +6 -0
- package/s/gamepad/main.css +60 -0
- package/s/index-ui.ts +3 -0
- package/s/index.html.ts +10 -17
- package/s/index.ts +28 -5
- package/s/test.ts +339 -0
- package/s/ui/views/desk/style.css.ts +70 -0
- package/s/ui/views/desk/view.ts +122 -0
- package/s/utils/circular-clamp.ts +2 -2
- package/s/utils/do-async.ts +5 -0
- package/s/utils/freeze-clone.ts +7 -0
- package/s/utils/identifier.ts +30 -0
- package/s/utils/insert.ts +6 -0
- package/s/utils/is-down.ts +5 -0
- package/s/utils/make-id.ts +7 -0
- package/s/utils/remap.ts +7 -0
- package/s/utils/shift-limit.ts +9 -0
- package/s/utils/sort-by-key.ts +7 -0
- package/s/utils/tmax.ts +7 -0
- package/s/utils/tmin.ts +7 -0
- package/x/_archive/demo/main.css +85 -0
- package/x/assets/b.png +0 -0
- package/x/core/{bindings/parts → atom}/defaults.d.ts +1 -1
- package/x/core/atom/defaults.js.map +1 -0
- package/x/core/{bindings/parts → atom}/lens-algo.d.ts +1 -1
- package/x/core/{bindings/parts → atom}/lens-algo.js +8 -8
- package/x/core/atom/lens-algo.js.map +1 -0
- package/x/core/{bindings → atom}/types.d.ts +1 -15
- package/x/core/{devices → atom}/types.js.map +1 -1
- package/x/core/bindings/normalize.d.ts +2 -0
- package/x/core/bindings/normalize.js +17 -0
- package/x/core/bindings/normalize.js.map +1 -0
- package/x/core/bindings/shape.d.ts +2 -0
- package/x/core/bindings/shape.js +10 -0
- package/x/core/bindings/shape.js.map +1 -0
- package/x/core/bindings/table.d.ts +2 -0
- package/x/core/bindings/table.js +15 -0
- package/x/core/bindings/table.js.map +1 -0
- package/x/core/intent/bucket.d.ts +7 -0
- package/x/core/intent/bucket.js +21 -0
- package/x/core/intent/bucket.js.map +1 -0
- package/x/core/intent/consts.d.ts +2 -0
- package/x/core/intent/consts.js +3 -0
- package/x/core/intent/consts.js.map +1 -0
- package/x/core/intent/decode.d.ts +3 -0
- package/x/core/intent/decode.js +18 -0
- package/x/core/intent/decode.js.map +1 -0
- package/x/core/intent/encode.d.ts +3 -0
- package/x/core/intent/encode.js +15 -0
- package/x/core/intent/encode.js.map +1 -0
- package/x/core/intent/merge.d.ts +3 -0
- package/x/core/intent/merge.js +10 -0
- package/x/core/intent/merge.js.map +1 -0
- package/x/core/{bindings → parts}/action.d.ts +5 -3
- package/x/core/parts/action.js +30 -0
- package/x/core/parts/action.js.map +1 -0
- package/x/core/parts/sample-map.d.ts +6 -0
- package/x/core/{bindings → parts}/sample-map.js +2 -3
- package/x/core/parts/sample-map.js.map +1 -0
- package/x/core/resolvers/actions.d.ts +2 -0
- package/x/core/resolvers/actions.js +23 -0
- package/x/core/resolvers/actions.js.map +1 -0
- package/x/core/resolvers/intents.d.ts +2 -0
- package/x/core/{bindings/resolver.js → resolvers/intents.js} +39 -43
- package/x/core/resolvers/intents.js.map +1 -0
- package/x/core/types.d.ts +43 -0
- package/x/core/types.js +2 -0
- package/x/core/types.js.map +1 -0
- package/x/deck/controller.d.ts +11 -0
- package/x/deck/controller.js +28 -0
- package/x/deck/controller.js.map +1 -0
- package/x/deck/deck.d.ts +30 -26
- package/x/deck/deck.js +64 -43
- package/x/deck/deck.js.map +1 -1
- package/x/deck/parts/profiles.d.ts +12 -0
- package/x/deck/parts/profiles.js +31 -0
- package/x/deck/parts/profiles.js.map +1 -0
- package/x/deck/parts/runtime.d.ts +8 -0
- package/x/deck/parts/runtime.js +7 -0
- package/x/deck/parts/runtime.js.map +1 -0
- package/x/deck/parts/settings.d.ts +11 -0
- package/x/deck/parts/settings.js +26 -0
- package/x/deck/parts/settings.js.map +1 -0
- package/x/deck/port.d.ts +10 -0
- package/x/deck/port.js +24 -0
- package/x/deck/port.js.map +1 -0
- package/x/deck/types.d.ts +11 -0
- package/x/deck/types.js +2 -0
- package/x/deck/types.js.map +1 -0
- package/x/demo/demo-app/element.d.ts +3 -0
- package/x/demo/demo-app/element.js +13 -0
- package/x/demo/demo-app/element.js.map +1 -0
- package/x/demo/demo-app/style.css.js +9 -0
- package/x/demo/demo-app/style.css.js.map +1 -0
- package/x/demo/main.bundle.js +53 -5
- package/x/demo/main.bundle.js.map +1 -1
- package/x/demo/main.bundle.min.js +106 -395
- package/x/demo/main.bundle.min.js.LEGAL.txt +33 -0
- package/x/demo/main.bundle.min.js.map +4 -4
- package/x/demo/main.css +6 -8
- package/x/device/devices.d.ts +7 -0
- package/x/device/devices.js +17 -0
- package/x/device/devices.js.map +1 -0
- package/x/device/gamepad.d.ts +9 -0
- package/x/device/gamepad.js +37 -0
- package/x/device/gamepad.js.map +1 -0
- package/x/{core/devices/standard → device}/keyboard.d.ts +1 -1
- package/x/{core/devices/standard → device}/keyboard.js +4 -2
- package/x/device/keyboard.js.map +1 -0
- package/x/device/pad/on-pad.d.ts +3 -0
- package/x/device/pad/on-pad.js +42 -0
- package/x/device/pad/on-pad.js.map +1 -0
- package/x/device/pad/pad.d.ts +6 -0
- package/x/device/pad/pad.js +11 -0
- package/x/device/pad/pad.js.map +1 -0
- package/x/{core/devices/standard → device}/pointer.d.ts +2 -2
- package/x/{core/devices/standard → device}/pointer.js +4 -4
- package/x/device/pointer.js.map +1 -0
- package/x/device/sampler.d.ts +9 -0
- package/x/device/sampler.js +19 -0
- package/x/device/sampler.js.map +1 -0
- package/x/{core/devices/standard → device}/stick.d.ts +2 -3
- package/x/{core/devices/standard → device}/stick.js +4 -6
- package/x/device/stick.js.map +1 -0
- package/x/gamepad/gamepad-app/element.d.ts +1 -0
- package/x/gamepad/gamepad-app/element.js +54 -0
- package/x/gamepad/gamepad-app/element.js.map +1 -0
- package/x/gamepad/gamepad-app/style.css.js +72 -0
- package/x/gamepad/gamepad-app/style.css.js.map +1 -0
- package/x/gamepad/index.html +35 -0
- package/x/gamepad/index.html.d.ts +2 -0
- package/x/gamepad/index.html.js +41 -0
- package/x/gamepad/index.html.js.map +1 -0
- package/x/gamepad/main.bundle.js +4 -0
- package/x/gamepad/main.bundle.js.map +1 -0
- package/x/gamepad/main.bundle.min.js +126 -0
- package/x/gamepad/main.bundle.min.js.LEGAL.txt +33 -0
- package/x/gamepad/main.bundle.min.js.map +7 -0
- package/x/gamepad/main.css +60 -0
- package/x/index-ui.d.ts +1 -0
- package/x/index-ui.js +2 -0
- package/x/index-ui.js.map +1 -0
- package/x/index.d.ts +27 -5
- package/x/index.html +17 -24
- package/x/index.html.js +10 -17
- package/x/index.html.js.map +1 -1
- package/x/index.js +27 -5
- package/x/index.js.map +1 -1
- package/x/test.d.ts +9 -0
- package/x/test.js +307 -0
- package/x/test.js.map +1 -0
- package/x/ui/views/desk/style.css.js +69 -0
- package/x/ui/views/desk/style.css.js.map +1 -0
- package/x/ui/views/desk/view.d.ts +7 -0
- package/x/ui/views/desk/view.js +102 -0
- package/x/ui/views/desk/view.js.map +1 -0
- package/x/utils/circular-clamp.js +2 -2
- package/x/utils/circular-clamp.js.map +1 -1
- package/x/utils/do-async.d.ts +1 -0
- package/x/utils/do-async.js +4 -0
- package/x/utils/do-async.js.map +1 -0
- package/x/utils/freeze-clone.d.ts +1 -0
- package/x/utils/freeze-clone.js +5 -0
- package/x/utils/freeze-clone.js.map +1 -0
- package/x/utils/identifier.d.ts +6 -0
- package/x/utils/identifier.js +25 -0
- package/x/utils/identifier.js.map +1 -0
- package/x/utils/insert.d.ts +1 -0
- package/x/utils/insert.js +5 -0
- package/x/utils/insert.js.map +1 -0
- package/x/utils/is-down.d.ts +1 -0
- package/x/utils/is-down.js +4 -0
- package/x/utils/is-down.js.map +1 -0
- package/x/utils/make-id.d.ts +1 -0
- package/x/utils/make-id.js +5 -0
- package/x/utils/make-id.js.map +1 -0
- package/x/utils/remap.d.ts +1 -0
- package/x/utils/remap.js +6 -0
- package/x/utils/remap.js.map +1 -0
- package/x/utils/shift-limit.d.ts +2 -0
- package/x/utils/shift-limit.js +7 -0
- package/x/utils/shift-limit.js.map +1 -0
- package/x/utils/sort-by-key.d.ts +1 -0
- package/x/utils/sort-by-key.js +6 -0
- package/x/utils/sort-by-key.js.map +1 -0
- package/x/utils/{quick-math.d.ts → tmax.d.ts} +0 -1
- package/x/utils/tmax.js +6 -0
- package/x/utils/tmax.js.map +1 -0
- package/x/utils/tmin.d.ts +1 -0
- package/x/utils/tmin.js +6 -0
- package/x/utils/tmin.js.map +1 -0
- package/s/tests.test.ts +0 -6
- package/x/core/bindings/action.js +0 -24
- package/x/core/bindings/action.js.map +0 -1
- package/x/core/bindings/parts/defaults.js.map +0 -1
- package/x/core/bindings/parts/is-pressed.d.ts +0 -1
- package/x/core/bindings/parts/is-pressed.js +0 -4
- package/x/core/bindings/parts/is-pressed.js.map +0 -1
- package/x/core/bindings/parts/lens-algo.js.map +0 -1
- package/x/core/bindings/parts/lookup-proxies.js +0 -19
- package/x/core/bindings/parts/lookup-proxies.js.map +0 -1
- package/x/core/bindings/resolver.d.ts +0 -9
- package/x/core/bindings/resolver.js.map +0 -1
- package/x/core/bindings/sample-map.d.ts +0 -7
- package/x/core/bindings/sample-map.js.map +0 -1
- package/x/core/bindings/types.js +0 -4
- package/x/core/bindings/types.js.map +0 -1
- package/x/core/core.test.d.ts +0 -13
- package/x/core/core.test.js +0 -138
- package/x/core/core.test.js.map +0 -1
- package/x/core/devices/auto-gamepads.d.ts +0 -2
- package/x/core/devices/auto-gamepads.js +0 -6
- package/x/core/devices/auto-gamepads.js.map +0 -1
- package/x/core/devices/device.d.ts +0 -5
- package/x/core/devices/device.js +0 -7
- package/x/core/devices/device.js.map +0 -1
- package/x/core/devices/infra/group.d.ts +0 -7
- package/x/core/devices/infra/group.js +0 -21
- package/x/core/devices/infra/group.js.map +0 -1
- package/x/core/devices/infra/sampler.d.ts +0 -9
- package/x/core/devices/infra/sampler.js +0 -18
- package/x/core/devices/infra/sampler.js.map +0 -1
- package/x/core/devices/standard/gamepad.d.ts +0 -11
- package/x/core/devices/standard/gamepad.js +0 -65
- package/x/core/devices/standard/gamepad.js.map +0 -1
- package/x/core/devices/standard/index.d.ts +0 -6
- package/x/core/devices/standard/index.js +0 -7
- package/x/core/devices/standard/index.js.map +0 -1
- package/x/core/devices/standard/keyboard.js.map +0 -1
- package/x/core/devices/standard/pointer.js.map +0 -1
- package/x/core/devices/standard/primary.d.ts +0 -10
- package/x/core/devices/standard/primary.js +0 -17
- package/x/core/devices/standard/primary.js.map +0 -1
- package/x/core/devices/standard/stick.js.map +0 -1
- package/x/core/devices/standard/vpad.d.ts +0 -7
- package/x/core/devices/standard/vpad.js +0 -20
- package/x/core/devices/standard/vpad.js.map +0 -1
- package/x/core/devices/types.d.ts +0 -1
- package/x/core/hub/hub.d.ts +0 -32
- package/x/core/hub/hub.js +0 -101
- package/x/core/hub/hub.js.map +0 -1
- package/x/core/hub/meta-bindings.d.ts +0 -2
- package/x/core/hub/meta-bindings.js +0 -21
- package/x/core/hub/meta-bindings.js.map +0 -1
- package/x/core/hub/parts/connected.d.ts +0 -14
- package/x/core/hub/parts/connected.js +0 -12
- package/x/core/hub/parts/connected.js.map +0 -1
- package/x/core/hub/port.d.ts +0 -9
- package/x/core/hub/port.js +0 -19
- package/x/core/hub/port.js.map +0 -1
- package/x/core/hub/types.d.ts +0 -9
- package/x/core/hub/types.js +0 -2
- package/x/core/hub/types.js.map +0 -1
- package/x/core/index.d.ts +0 -15
- package/x/core/index.js +0 -16
- package/x/core/index.js.map +0 -1
- package/x/core/testing/testing.d.ts +0 -52
- package/x/core/testing/testing.js +0 -45
- package/x/core/testing/testing.js.map +0 -1
- package/x/deck/index.d.ts +0 -9
- package/x/deck/index.js +0 -10
- package/x/deck/index.js.map +0 -1
- package/x/deck/parts/catalog.d.ts +0 -22
- package/x/deck/parts/catalog.js +0 -35
- package/x/deck/parts/catalog.js.map +0 -1
- package/x/deck/parts/db.d.ts +0 -17
- package/x/deck/parts/db.js +0 -52
- package/x/deck/parts/db.js.map +0 -1
- package/x/deck/parts/device-skins/device-icons.d.ts +0 -12
- package/x/deck/parts/device-skins/device-icons.js +0 -27
- package/x/deck/parts/device-skins/device-icons.js.map +0 -1
- package/x/deck/parts/device-skins/device-skin.d.ts +0 -14
- package/x/deck/parts/device-skins/device-skin.js +0 -22
- package/x/deck/parts/device-skins/device-skin.js.map +0 -1
- package/x/deck/parts/local-storage-kv.d.ts +0 -2
- package/x/deck/parts/local-storage-kv.js +0 -6
- package/x/deck/parts/local-storage-kv.js.map +0 -1
- package/x/deck/parts/merge-bindings.d.ts +0 -2
- package/x/deck/parts/merge-bindings.js +0 -15
- package/x/deck/parts/merge-bindings.js.map +0 -1
- package/x/deck/parts/overlay-visibility.d.ts +0 -18
- package/x/deck/parts/overlay-visibility.js +0 -35
- package/x/deck/parts/overlay-visibility.js.map +0 -1
- package/x/deck/views/bindings/style.css.js +0 -5
- package/x/deck/views/bindings/style.css.js.map +0 -1
- package/x/deck/views/bindings/view.d.ts +0 -2
- package/x/deck/views/bindings/view.js +0 -80
- package/x/deck/views/bindings/view.js.map +0 -1
- package/x/deck/views/overlay/style.css.js +0 -109
- package/x/deck/views/overlay/style.css.js.map +0 -1
- package/x/deck/views/overlay/view.d.ts +0 -2
- package/x/deck/views/overlay/view.js +0 -40
- package/x/deck/views/overlay/view.js.map +0 -1
- package/x/demo/game/game.d.ts +0 -17
- package/x/demo/game/game.js +0 -63
- package/x/demo/game/game.js.map +0 -1
- package/x/demo/game/parts/agent.d.ts +0 -7
- package/x/demo/game/parts/agent.js +0 -8
- package/x/demo/game/parts/agent.js.map +0 -1
- package/x/demo/game/parts/game-bindings.d.ts +0 -15
- package/x/demo/game/parts/game-bindings.js +0 -10
- package/x/demo/game/parts/game-bindings.js.map +0 -1
- package/x/demo/game/parts/logic.d.ts +0 -8
- package/x/demo/game/parts/logic.js +0 -21
- package/x/demo/game/parts/logic.js.map +0 -1
- package/x/demo/game/parts/player.d.ts +0 -14
- package/x/demo/game/parts/player.js +0 -26
- package/x/demo/game/parts/player.js.map +0 -1
- package/x/demo/game/parts/renderer.d.ts +0 -13
- package/x/demo/game/parts/renderer.js +0 -91
- package/x/demo/game/parts/renderer.js.map +0 -1
- package/x/demo/game/parts/state.d.ts +0 -8
- package/x/demo/game/parts/state.js +0 -20
- package/x/demo/game/parts/state.js.map +0 -1
- package/x/demo/game/parts/virtual-device.d.ts +0 -8
- package/x/demo/game/parts/virtual-device.js +0 -11
- package/x/demo/game/parts/virtual-device.js.map +0 -1
- package/x/demo/ui/theater/styles.css.d.ts +0 -1
- package/x/demo/ui/theater/styles.css.js +0 -57
- package/x/demo/ui/theater/styles.css.js.map +0 -1
- package/x/demo/ui/theater/view.d.ts +0 -2
- package/x/demo/ui/theater/view.js +0 -45
- package/x/demo/ui/theater/view.js.map +0 -1
- package/x/demo/ui/theater/virtual/style.css.js +0 -42
- package/x/demo/ui/theater/virtual/style.css.js.map +0 -1
- package/x/demo/ui/theater/virtual/view.d.ts +0 -4
- package/x/demo/ui/theater/virtual/view.js +0 -19
- package/x/demo/ui/theater/virtual/view.js.map +0 -1
- package/x/demo/ui/utils/loader.d.ts +0 -2
- package/x/demo/ui/utils/loader.js +0 -3
- package/x/demo/ui/utils/loader.js.map +0 -1
- package/x/nubs/index.d.ts +0 -3
- package/x/nubs/index.js +0 -4
- package/x/nubs/index.js.map +0 -1
- package/x/nubs/lookpad/styles.d.ts +0 -1
- package/x/nubs/lookpad/styles.js +0 -21
- package/x/nubs/lookpad/styles.js.map +0 -1
- package/x/nubs/lookpad/view.d.ts +0 -1
- package/x/nubs/lookpad/view.js +0 -33
- package/x/nubs/lookpad/view.js.map +0 -1
- package/x/nubs/stick/style.css.d.ts +0 -2
- package/x/nubs/stick/style.css.js +0 -69
- package/x/nubs/stick/style.css.js.map +0 -1
- package/x/nubs/stick/view.d.ts +0 -2
- package/x/nubs/stick/view.js +0 -95
- package/x/nubs/stick/view.js.map +0 -1
- package/x/nubs/vpad/styles.css.d.ts +0 -2
- package/x/nubs/vpad/styles.css.js +0 -133
- package/x/nubs/vpad/styles.css.js.map +0 -1
- package/x/nubs/vpad/utils/gamepad-inputs.d.ts +0 -29
- package/x/nubs/vpad/utils/gamepad-inputs.js +0 -31
- package/x/nubs/vpad/utils/gamepad-inputs.js.map +0 -1
- package/x/nubs/vpad/utils/prevent-default-touch-shenanigans.d.ts +0 -1
- package/x/nubs/vpad/utils/prevent-default-touch-shenanigans.js +0 -9
- package/x/nubs/vpad/utils/prevent-default-touch-shenanigans.js.map +0 -1
- package/x/nubs/vpad/utils/touch-tracking.d.ts +0 -6
- package/x/nubs/vpad/utils/touch-tracking.js +0 -55
- package/x/nubs/vpad/utils/touch-tracking.js.map +0 -1
- package/x/nubs/vpad/view.d.ts +0 -2
- package/x/nubs/vpad/view.js +0 -123
- package/x/nubs/vpad/view.js.map +0 -1
- package/x/tests.test.d.ts +0 -1
- package/x/tests.test.js +0 -4
- package/x/tests.test.js.map +0 -1
- package/x/utils/dispensers.d.ts +0 -7
- package/x/utils/dispensers.js +0 -16
- package/x/utils/dispensers.js.map +0 -1
- package/x/utils/gamepads.d.ts +0 -14
- package/x/utils/gamepads.js +0 -40
- package/x/utils/gamepads.js.map +0 -1
- package/x/utils/quick-math.js +0 -11
- package/x/utils/quick-math.js.map +0 -1
- /package/s/{core → _archive/core}/bindings/action.ts +0 -0
- /package/s/{core → _archive/core}/bindings/parts/defaults.ts +0 -0
- /package/s/{core → _archive/core}/bindings/parts/is-pressed.ts +0 -0
- /package/s/{core → _archive/core}/bindings/parts/lens-algo.ts +0 -0
- /package/s/{core → _archive/core}/bindings/parts/lookup-proxies.ts +0 -0
- /package/s/{core → _archive/core}/bindings/resolver.ts +0 -0
- /package/s/{core → _archive/core}/bindings/sample-map.ts +0 -0
- /package/s/{core → _archive/core}/bindings/types.ts +0 -0
- /package/s/{core → _archive/core}/core.test.ts +0 -0
- /package/s/{core → _archive/core}/devices/auto-gamepads.ts +0 -0
- /package/s/{core → _archive/core}/devices/device.ts +0 -0
- /package/s/{core → _archive/core}/devices/infra/group.ts +0 -0
- /package/s/{core → _archive/core}/devices/infra/sampler.ts +0 -0
- /package/s/{core → _archive/core}/devices/standard/gamepad.ts +0 -0
- /package/s/{core → _archive/core}/devices/standard/index.ts +0 -0
- /package/s/{core → _archive/core}/devices/standard/keyboard.ts +0 -0
- /package/s/{core → _archive/core}/devices/standard/pointer.ts +0 -0
- /package/s/{core → _archive/core}/devices/standard/primary.ts +0 -0
- /package/s/{core → _archive/core}/devices/standard/stick.ts +0 -0
- /package/s/{core → _archive/core}/devices/standard/vpad.ts +0 -0
- /package/s/{core → _archive/core}/devices/types.ts +0 -0
- /package/s/{core → _archive/core}/hub/hub.ts +0 -0
- /package/s/{core → _archive/core}/hub/meta-bindings.ts +0 -0
- /package/s/{core → _archive/core}/hub/parts/connected.ts +0 -0
- /package/s/{core → _archive/core}/hub/port.ts +0 -0
- /package/s/{core → _archive/core}/hub/types.ts +0 -0
- /package/s/{core → _archive/core}/index.ts +0 -0
- /package/s/{core → _archive/core}/testing/testing.ts +0 -0
- /package/s/{deck → _archive/deck}/index.ts +0 -0
- /package/s/{deck → _archive/deck}/parts/catalog.ts +0 -0
- /package/s/{deck → _archive/deck}/parts/db.ts +0 -0
- /package/s/{deck → _archive/deck}/parts/device-skins/device-icons.ts +0 -0
- /package/s/{deck → _archive/deck}/parts/device-skins/device-skin.ts +0 -0
- /package/s/{deck → _archive/deck}/parts/local-storage-kv.ts +0 -0
- /package/s/{deck → _archive/deck}/parts/merge-bindings.ts +0 -0
- /package/s/{deck → _archive/deck}/parts/overlay-visibility.ts +0 -0
- /package/s/{deck → _archive/deck}/views/bindings/style.css.ts +0 -0
- /package/s/{deck → _archive/deck}/views/bindings/view.ts +0 -0
- /package/s/{deck → _archive/deck}/views/overlay/style.css.ts +0 -0
- /package/s/{deck → _archive/deck}/views/overlay/view.ts +0 -0
- /package/s/{demo → _archive/demo}/game/game.ts +0 -0
- /package/s/{demo → _archive/demo}/game/parts/agent.ts +0 -0
- /package/s/{demo → _archive/demo}/game/parts/game-bindings.ts +0 -0
- /package/s/{demo → _archive/demo}/game/parts/logic.ts +0 -0
- /package/s/{demo → _archive/demo}/game/parts/player.ts +0 -0
- /package/s/{demo → _archive/demo}/game/parts/renderer.ts +0 -0
- /package/s/{demo → _archive/demo}/game/parts/state.ts +0 -0
- /package/s/{demo → _archive/demo}/game/parts/virtual-device.ts +0 -0
- /package/s/{demo → _archive/demo}/ui/theater/styles.css.ts +0 -0
- /package/s/{demo → _archive/demo}/ui/theater/view.ts +0 -0
- /package/s/{demo → _archive/demo}/ui/theater/virtual/style.css.ts +0 -0
- /package/s/{demo → _archive/demo}/ui/theater/virtual/view.ts +0 -0
- /package/s/{demo → _archive/demo}/ui/utils/loader.ts +0 -0
- /package/s/{nubs → _archive/nubs}/index.ts +0 -0
- /package/s/{nubs → _archive/nubs}/lookpad/styles.ts +0 -0
- /package/s/{nubs → _archive/nubs}/lookpad/view.ts +0 -0
- /package/s/{nubs → _archive/nubs}/stick/style.css.ts +0 -0
- /package/s/{nubs → _archive/nubs}/stick/view.ts +0 -0
- /package/s/{nubs → _archive/nubs}/vpad/styles.css.ts +0 -0
- /package/s/{nubs → _archive/nubs}/vpad/utils/gamepad-inputs.ts +0 -0
- /package/s/{nubs → _archive/nubs}/vpad/utils/prevent-default-touch-shenanigans.ts +0 -0
- /package/s/{nubs → _archive/nubs}/vpad/utils/touch-tracking.ts +0 -0
- /package/s/{nubs → _archive/nubs}/vpad/view.ts +0 -0
- /package/s/{utils → _archive/utils}/dispensers.ts +0 -0
- /package/s/{utils → _archive/utils}/gamepads.ts +0 -0
- /package/s/{utils → _archive/utils}/quick-math.ts +0 -0
- /package/x/core/{bindings/parts → atom}/defaults.js +0 -0
- /package/x/core/{devices → atom}/types.js +0 -0
- /package/x/{deck/views/bindings → demo/demo-app}/style.css.d.ts +0 -0
- /package/x/{deck/views/overlay → gamepad/gamepad-app}/style.css.d.ts +0 -0
- /package/x/{core/bindings/parts/lookup-proxies.d.ts → gamepad/main.bundle.d.ts} +0 -0
- /package/x/{demo/ui/theater/virtual → ui/views/desk}/style.css.d.ts +0 -0
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Port } from "../port.js";
|
|
2
|
-
import { MetaBindings } from "../types.js";
|
|
3
|
-
import { Device } from "../../devices/device.js";
|
|
4
|
-
export declare class Connected {
|
|
5
|
-
device: Device;
|
|
6
|
-
metaPort: Port<MetaBindings>;
|
|
7
|
-
constructor(device: Device, metaB?: {
|
|
8
|
-
meta: {
|
|
9
|
-
revealOverlay: import("../../index.js").Atom;
|
|
10
|
-
shimmyNext: import("../../index.js").Atom;
|
|
11
|
-
shimmyPrevious: import("../../index.js").Atom;
|
|
12
|
-
};
|
|
13
|
-
});
|
|
14
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Port } from "../port.js";
|
|
2
|
-
import { makeMetaBindings } from "../meta-bindings.js";
|
|
3
|
-
export class Connected {
|
|
4
|
-
device;
|
|
5
|
-
metaPort;
|
|
6
|
-
constructor(device, metaB = makeMetaBindings()) {
|
|
7
|
-
this.device = device;
|
|
8
|
-
this.metaPort = new Port(metaB);
|
|
9
|
-
this.metaPort.devices.add(device);
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=connected.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"connected.js","sourceRoot":"","sources":["../../../../s/core/hub/parts/connected.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,IAAI,EAAC,MAAM,YAAY,CAAA;AAG/B,OAAO,EAAC,gBAAgB,EAAC,MAAM,qBAAqB,CAAA;AAEpD,MAAM,OAAO,SAAS;IAGF;IAFnB,QAAQ,CAAoB;IAE5B,YAAmB,MAAc,EAAE,KAAK,GAAG,gBAAgB,EAAE;QAA1C,WAAM,GAAN,MAAM,CAAQ;QAChC,IAAI,CAAC,QAAQ,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,CAAA;QAC/B,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;IAClC,CAAC;CACD"}
|
package/x/core/hub/port.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Bindings } from "../bindings/types.js";
|
|
2
|
-
import { Resolver } from "../bindings/resolver.js";
|
|
3
|
-
export declare class Port<B extends Bindings> extends Resolver<B> {
|
|
4
|
-
#private;
|
|
5
|
-
readonly devices: import("@e280/stz").GSet<import("../index.js").Device>;
|
|
6
|
-
readonly modes: import("@e280/stz").GSet<keyof B>;
|
|
7
|
-
constructor(bindings: B);
|
|
8
|
-
resolve(now?: number): import("../bindings/types.js").Actions<B>;
|
|
9
|
-
}
|
package/x/core/hub/port.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { SetG } from "@e280/stz";
|
|
2
|
-
import { Resolver } from "../bindings/resolver.js";
|
|
3
|
-
import { SampleMap } from "../bindings/sample-map.js";
|
|
4
|
-
import { GroupDevice } from "../devices/infra/group.js";
|
|
5
|
-
export class Port extends Resolver {
|
|
6
|
-
#group = new GroupDevice();
|
|
7
|
-
devices = this.#group.devices;
|
|
8
|
-
modes = new SetG();
|
|
9
|
-
constructor(bindings) {
|
|
10
|
-
super(bindings);
|
|
11
|
-
// start with all modes enabled by default
|
|
12
|
-
this.modes.adds(...Object.keys(bindings));
|
|
13
|
-
}
|
|
14
|
-
resolve(now = Date.now()) {
|
|
15
|
-
const sampleMap = new SampleMap(this.#group.samples());
|
|
16
|
-
return super.resolve(now, this.modes, sampleMap);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=port.js.map
|
package/x/core/hub/port.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"port.js","sourceRoot":"","sources":["../../../s/core/hub/port.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,IAAI,EAAC,MAAM,WAAW,CAAA;AAE9B,OAAO,EAAC,QAAQ,EAAC,MAAM,yBAAyB,CAAA;AAChD,OAAO,EAAC,SAAS,EAAC,MAAM,2BAA2B,CAAA;AACnD,OAAO,EAAC,WAAW,EAAC,MAAM,2BAA2B,CAAA;AAErD,MAAM,OAAO,IAAyB,SAAQ,QAAW;IACxD,MAAM,GAAG,IAAI,WAAW,EAAE,CAAA;IAEjB,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,CAAA;IAC7B,KAAK,GAAG,IAAI,IAAI,EAAW,CAAA;IAEpC,YAAY,QAAW;QACtB,KAAK,CAAC,QAAQ,CAAC,CAAA;QAEf,0CAA0C;QAC1C,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAA;IAC1C,CAAC;IAED,OAAO,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE;QACvB,MAAM,SAAS,GAAG,IAAI,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,CAAA;QACtD,OAAO,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,KAAK,EAAE,SAAS,CAAC,CAAA;IACjD,CAAC;CACD"}
|
package/x/core/hub/types.d.ts
DELETED
package/x/core/hub/types.js
DELETED
package/x/core/hub/types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../s/core/hub/types.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,QAAQ,GAAG,MAAe,CAAA"}
|
package/x/core/index.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export * from "./bindings/action.js";
|
|
2
|
-
export * from "./bindings/resolver.js";
|
|
3
|
-
export * from "./bindings/sample-map.js";
|
|
4
|
-
export * from "./bindings/types.js";
|
|
5
|
-
export * from "./devices/infra/group.js";
|
|
6
|
-
export * from "./devices/infra/sampler.js";
|
|
7
|
-
export * from "./devices/standard/index.js";
|
|
8
|
-
export * as devices from "./devices/standard/index.js";
|
|
9
|
-
export * from "./devices/auto-gamepads.js";
|
|
10
|
-
export * from "./devices/device.js";
|
|
11
|
-
export * from "./devices/types.js";
|
|
12
|
-
export * from "./hub/hub.js";
|
|
13
|
-
export * from "./hub/meta-bindings.js";
|
|
14
|
-
export * from "./hub/port.js";
|
|
15
|
-
export * from "./hub/types.js";
|
package/x/core/index.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export * from "./bindings/action.js";
|
|
2
|
-
export * from "./bindings/resolver.js";
|
|
3
|
-
export * from "./bindings/sample-map.js";
|
|
4
|
-
export * from "./bindings/types.js";
|
|
5
|
-
export * from "./devices/infra/group.js";
|
|
6
|
-
export * from "./devices/infra/sampler.js";
|
|
7
|
-
export * from "./devices/standard/index.js";
|
|
8
|
-
export * as devices from "./devices/standard/index.js";
|
|
9
|
-
export * from "./devices/auto-gamepads.js";
|
|
10
|
-
export * from "./devices/device.js";
|
|
11
|
-
export * from "./devices/types.js";
|
|
12
|
-
export * from "./hub/hub.js";
|
|
13
|
-
export * from "./hub/meta-bindings.js";
|
|
14
|
-
export * from "./hub/port.js";
|
|
15
|
-
export * from "./hub/types.js";
|
|
16
|
-
//# sourceMappingURL=index.js.map
|
package/x/core/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../s/core/index.ts"],"names":[],"mappings":"AACA,cAAc,sBAAsB,CAAA;AACpC,cAAc,wBAAwB,CAAA;AACtC,cAAc,0BAA0B,CAAA;AACxC,cAAc,qBAAqB,CAAA;AAEnC,cAAc,0BAA0B,CAAA;AACxC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,6BAA6B,CAAA;AAC3C,OAAO,KAAK,OAAO,MAAM,6BAA6B,CAAA;AACtD,cAAc,4BAA4B,CAAA;AAC1C,cAAc,qBAAqB,CAAA;AACnC,cAAc,oBAAoB,CAAA;AAElC,cAAc,cAAc,CAAA;AAC5B,cAAc,wBAAwB,CAAA;AACtC,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { Hub } from "../hub/hub.js";
|
|
2
|
-
import { Device } from "../devices/device.js";
|
|
3
|
-
import { Resolver } from "../bindings/resolver.js";
|
|
4
|
-
import { Code } from "../bindings/types.js";
|
|
5
|
-
import { SamplerDevice } from "../devices/infra/sampler.js";
|
|
6
|
-
export declare class TestClock {
|
|
7
|
-
time: number;
|
|
8
|
-
set frame(frame: number);
|
|
9
|
-
}
|
|
10
|
-
export declare function testBindings(): {
|
|
11
|
-
basic: {
|
|
12
|
-
jump: string;
|
|
13
|
-
shoot: string;
|
|
14
|
-
grenade: Code;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
export declare function testPlug<C extends Device>(hub: Hub<any>, device: C): C;
|
|
18
|
-
export declare function testSetupAlpha(): {
|
|
19
|
-
device: SamplerDevice;
|
|
20
|
-
resolver: Resolver<{
|
|
21
|
-
basic: {
|
|
22
|
-
jump: string;
|
|
23
|
-
shoot: string;
|
|
24
|
-
grenade: Code;
|
|
25
|
-
};
|
|
26
|
-
}>;
|
|
27
|
-
resolve: () => import("../bindings/types.js").Actions<{
|
|
28
|
-
basic: {
|
|
29
|
-
jump: string;
|
|
30
|
-
shoot: string;
|
|
31
|
-
grenade: Code;
|
|
32
|
-
};
|
|
33
|
-
}>;
|
|
34
|
-
clock: TestClock;
|
|
35
|
-
actions: import("../bindings/types.js").Actions<{
|
|
36
|
-
basic: {
|
|
37
|
-
jump: string;
|
|
38
|
-
shoot: string;
|
|
39
|
-
grenade: Code;
|
|
40
|
-
};
|
|
41
|
-
}>;
|
|
42
|
-
};
|
|
43
|
-
export declare function testSetupBravo(): {
|
|
44
|
-
hub: Hub<{
|
|
45
|
-
basic: {
|
|
46
|
-
jump: string;
|
|
47
|
-
shoot: string;
|
|
48
|
-
grenade: Code;
|
|
49
|
-
};
|
|
50
|
-
}, any>;
|
|
51
|
-
clock: TestClock;
|
|
52
|
-
};
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { Hub } from "../hub/hub.js";
|
|
2
|
-
import { Port } from "../hub/port.js";
|
|
3
|
-
import { Resolver } from "../bindings/resolver.js";
|
|
4
|
-
import { SampleMap } from "../bindings/sample-map.js";
|
|
5
|
-
import { asBindings } from "../bindings/types.js";
|
|
6
|
-
import { SamplerDevice } from "../devices/infra/sampler.js";
|
|
7
|
-
export class TestClock {
|
|
8
|
-
time = 0;
|
|
9
|
-
set frame(frame) {
|
|
10
|
-
this.time = frame * (1000 / 60);
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
export function testBindings() {
|
|
14
|
-
return asBindings({
|
|
15
|
-
basic: {
|
|
16
|
-
jump: "Space",
|
|
17
|
-
shoot: "pointer.button.left",
|
|
18
|
-
grenade: ["code", "KeyG", { timing: ["hold", 200] }]
|
|
19
|
-
},
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
export function testPlug(hub, device) {
|
|
23
|
-
hub.plug(device);
|
|
24
|
-
return device;
|
|
25
|
-
}
|
|
26
|
-
export function testSetupAlpha() {
|
|
27
|
-
const clock = new TestClock();
|
|
28
|
-
const device = new SamplerDevice();
|
|
29
|
-
const resolver = new Resolver(testBindings());
|
|
30
|
-
const modes = new Set(Object.keys(resolver.bindings));
|
|
31
|
-
const actions = resolver.actions;
|
|
32
|
-
const resolve = () => resolver.resolve(clock.time, modes, new SampleMap(device.samples()));
|
|
33
|
-
return { device, resolver, resolve, clock, actions };
|
|
34
|
-
}
|
|
35
|
-
export function testSetupBravo() {
|
|
36
|
-
const clock = new TestClock();
|
|
37
|
-
const port = () => {
|
|
38
|
-
const port = new Port(testBindings());
|
|
39
|
-
port.modes.adds("basic");
|
|
40
|
-
return port;
|
|
41
|
-
};
|
|
42
|
-
const hub = new Hub([port(), port(), port(), port()]);
|
|
43
|
-
return { hub, clock };
|
|
44
|
-
}
|
|
45
|
-
//# sourceMappingURL=testing.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"testing.js","sourceRoot":"","sources":["../../../s/core/testing/testing.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,GAAG,EAAC,MAAM,eAAe,CAAA;AACjC,OAAO,EAAC,IAAI,EAAC,MAAM,gBAAgB,CAAA;AAEnC,OAAO,EAAC,QAAQ,EAAC,MAAM,yBAAyB,CAAA;AAChD,OAAO,EAAC,SAAS,EAAC,MAAM,2BAA2B,CAAA;AACnD,OAAO,EAAC,UAAU,EAAO,MAAM,sBAAsB,CAAA;AACrD,OAAO,EAAC,aAAa,EAAC,MAAM,6BAA6B,CAAA;AAEzD,MAAM,OAAO,SAAS;IACrB,IAAI,GAAG,CAAC,CAAA;IAER,IAAI,KAAK,CAAC,KAAa;QACtB,IAAI,CAAC,IAAI,GAAG,KAAK,GAAG,CAAC,IAAI,GAAG,EAAE,CAAC,CAAA;IAChC,CAAC;CACD;AAED,MAAM,UAAU,YAAY;IAC3B,OAAO,UAAU,CAAC;QACjB,KAAK,EAAE;YACN,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,qBAAqB;YAC5B,OAAO,EAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,EAAC,MAAM,EAAE,CAAC,MAAM,EAAE,GAAG,CAAC,EAAC,CAAC;SACxD;KACD,CAAC,CAAA;AACH,CAAC;AAED,MAAM,UAAU,QAAQ,CAAmB,GAAa,EAAE,MAAS;IAClE,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IAChB,OAAO,MAAM,CAAA;AACd,CAAC;AAED,MAAM,UAAU,cAAc;IAC7B,MAAM,KAAK,GAAG,IAAI,SAAS,EAAE,CAAA;IAC7B,MAAM,MAAM,GAAG,IAAI,aAAa,EAAE,CAAA;IAClC,MAAM,QAAQ,GAAG,IAAI,QAAQ,CAAC,YAAY,EAAE,CAAC,CAAA;IAC7C,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAA;IACrD,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAA;IAChC,MAAM,OAAO,GAAG,GAAG,EAAE,CAAC,QAAQ,CAAC,OAAO,CACrC,KAAK,CAAC,IAAI,EACV,KAAY,EACZ,IAAI,SAAS,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,CAC/B,CAAA;IACD,OAAO,EAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAC,CAAA;AACnD,CAAC;AAED,MAAM,UAAU,cAAc;IAC7B,MAAM,KAAK,GAAG,IAAI,SAAS,EAAE,CAAA;IAC7B,MAAM,IAAI,GAAG,GAAG,EAAE;QACjB,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC,CAAA;QACrC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QACxB,OAAO,IAAI,CAAA;IACZ,CAAC,CAAA;IACD,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;IACrD,OAAO,EAAC,GAAG,EAAE,KAAK,EAAC,CAAA;AACpB,CAAC"}
|
package/x/deck/index.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export * from "./parts/device-skins/device-icons.js";
|
|
2
|
-
export * from "./parts/device-skins/device-skin.js";
|
|
3
|
-
export * from "./parts/catalog.js";
|
|
4
|
-
export * from "./parts/db.js";
|
|
5
|
-
export * from "./parts/local-storage-kv.js";
|
|
6
|
-
export * from "./parts/merge-bindings.js";
|
|
7
|
-
export * from "./parts/overlay-visibility.js";
|
|
8
|
-
export * from "./views/overlay/view.js";
|
|
9
|
-
export * from "./deck.js";
|
package/x/deck/index.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export * from "./parts/device-skins/device-icons.js";
|
|
2
|
-
export * from "./parts/device-skins/device-skin.js";
|
|
3
|
-
export * from "./parts/catalog.js";
|
|
4
|
-
export * from "./parts/db.js";
|
|
5
|
-
export * from "./parts/local-storage-kv.js";
|
|
6
|
-
export * from "./parts/merge-bindings.js";
|
|
7
|
-
export * from "./parts/overlay-visibility.js";
|
|
8
|
-
export * from "./views/overlay/view.js";
|
|
9
|
-
export * from "./deck.js";
|
|
10
|
-
//# sourceMappingURL=index.js.map
|
package/x/deck/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../s/deck/index.ts"],"names":[],"mappings":"AACA,cAAc,sCAAsC,CAAA;AACpD,cAAc,qCAAqC,CAAA;AACnD,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe,CAAA;AAC7B,cAAc,6BAA6B,CAAA;AAC3C,cAAc,2BAA2B,CAAA;AACzC,cAAc,+BAA+B,CAAA;AAE7C,cAAc,yBAAyB,CAAA;AAEvC,cAAc,WAAW,CAAA"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { MetaBindings } from "../../core/hub/types.js";
|
|
2
|
-
import { Bindings } from "../../core/bindings/types.js";
|
|
3
|
-
export type Profile = {
|
|
4
|
-
id: string;
|
|
5
|
-
label: string;
|
|
6
|
-
bindings: Bindings;
|
|
7
|
-
};
|
|
8
|
-
export type CatalogData = {
|
|
9
|
-
profiles: Profile[];
|
|
10
|
-
portProfiles: (string | null)[];
|
|
11
|
-
metaBindings: MetaBindings | null;
|
|
12
|
-
};
|
|
13
|
-
export declare class Catalog {
|
|
14
|
-
profiles: import("@e280/stz").GMap<string, Profile>;
|
|
15
|
-
portProfiles: (string | null)[];
|
|
16
|
-
metaBindings: MetaBindings | null;
|
|
17
|
-
constructor(data?: CatalogData);
|
|
18
|
-
toJSON(): CatalogData;
|
|
19
|
-
clone(): Catalog;
|
|
20
|
-
getProfile(profileId: string): Profile | undefined;
|
|
21
|
-
getProfileForPort(portIndex: number): Profile | undefined;
|
|
22
|
-
}
|
package/x/deck/parts/catalog.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { deep, MapG } from "@e280/stz";
|
|
2
|
-
export class Catalog {
|
|
3
|
-
profiles = new MapG();
|
|
4
|
-
portProfiles = [];
|
|
5
|
-
metaBindings = null;
|
|
6
|
-
constructor(data) {
|
|
7
|
-
if (data) {
|
|
8
|
-
for (const profile of data.profiles)
|
|
9
|
-
this.profiles.set(profile.id, profile);
|
|
10
|
-
this.portProfiles = data.portProfiles
|
|
11
|
-
.map(id => id && (this.profiles.has(id) ? id : null));
|
|
12
|
-
this.metaBindings = data.metaBindings;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
toJSON() {
|
|
16
|
-
return deep.clone({
|
|
17
|
-
profiles: [...this.profiles.values()],
|
|
18
|
-
portProfiles: this.portProfiles,
|
|
19
|
-
metaBindings: this.metaBindings,
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
clone() {
|
|
23
|
-
return new Catalog(this.toJSON());
|
|
24
|
-
}
|
|
25
|
-
getProfile(profileId) {
|
|
26
|
-
return this.profiles.get(profileId);
|
|
27
|
-
}
|
|
28
|
-
getProfileForPort(portIndex) {
|
|
29
|
-
const profileId = this.portProfiles.at(portIndex);
|
|
30
|
-
return profileId
|
|
31
|
-
? this.getProfile(profileId)
|
|
32
|
-
: undefined;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
//# sourceMappingURL=catalog.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"catalog.js","sourceRoot":"","sources":["../../../s/deck/parts/catalog.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,IAAI,EAAE,IAAI,EAAC,MAAM,WAAW,CAAA;AAgBpC,MAAM,OAAO,OAAO;IACnB,QAAQ,GAAG,IAAI,IAAI,EAAmB,CAAA;IACtC,YAAY,GAAsB,EAAE,CAAA;IACpC,YAAY,GAAwB,IAAI,CAAA;IAExC,YAAY,IAAkB;QAC7B,IAAI,IAAI,EAAE,CAAC;YACV,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,QAAQ;gBAClC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,EAAE,OAAO,CAAC,CAAA;YAEvC,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY;iBACnC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA,EAAE,CAAC,CAAC,CAAA,IAAI,CAAC,CAAC,CAAA;YAEpD,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAA;QACtC,CAAC;IACF,CAAC;IAED,MAAM;QACL,OAAO,IAAI,CAAC,KAAK,CAAC;YACjB,QAAQ,EAAE,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;YACrC,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,YAAY,EAAE,IAAI,CAAC,YAAY;SAC/B,CAAC,CAAA;IACH,CAAC;IAED,KAAK;QACJ,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAA;IAClC,CAAC;IAED,UAAU,CAAC,SAAiB;QAC3B,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,SAAS,CAAC,CAAA;IACpC,CAAC;IAED,iBAAiB,CAAC,SAAiB;QAClC,MAAM,SAAS,GAAG,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC,SAAS,CAAC,CAAA;QACjD,OAAO,SAAS;YACf,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC;YAC5B,CAAC,CAAC,SAAS,CAAA;IACb,CAAC;CACD"}
|
package/x/deck/parts/db.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Signal } from "@e280/strata";
|
|
2
|
-
import { Store } from "@e280/kv";
|
|
3
|
-
import { Bindings } from "../../core/bindings/types.js";
|
|
4
|
-
import { Catalog, CatalogData, Profile } from "./catalog.js";
|
|
5
|
-
export declare class Db {
|
|
6
|
-
#private;
|
|
7
|
-
private store;
|
|
8
|
-
$catalog: Signal<Catalog>;
|
|
9
|
-
static load(store: Store<CatalogData>): Promise<Db>;
|
|
10
|
-
dispose: import("@e280/stz").Disposer;
|
|
11
|
-
constructor(store: Store<CatalogData>, $catalog: Signal<Catalog>);
|
|
12
|
-
reload(): Promise<void>;
|
|
13
|
-
save(catalog: Catalog): Promise<void>;
|
|
14
|
-
createProfile(label: string, bindings: Bindings): Promise<Profile>;
|
|
15
|
-
deleteProfile(id: string): Promise<void>;
|
|
16
|
-
assignPortProfile(index: number, profileId: string | null): Promise<void>;
|
|
17
|
-
}
|
package/x/deck/parts/db.js
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { disposer, Hex } from "@e280/stz";
|
|
2
|
-
import { signal } from "@e280/strata";
|
|
3
|
-
import { StorageDriver } from "@e280/kv";
|
|
4
|
-
import { Catalog } from "./catalog.js";
|
|
5
|
-
export class Db {
|
|
6
|
-
store;
|
|
7
|
-
$catalog;
|
|
8
|
-
static async load(store) {
|
|
9
|
-
const $catalog = signal(new Catalog(await store.get()));
|
|
10
|
-
return new this(store, $catalog);
|
|
11
|
-
}
|
|
12
|
-
dispose = disposer();
|
|
13
|
-
constructor(store, $catalog) {
|
|
14
|
-
this.store = store;
|
|
15
|
-
this.$catalog = $catalog;
|
|
16
|
-
this.dispose.schedule(StorageDriver.onStorageEvent(async () => this.reload()));
|
|
17
|
-
}
|
|
18
|
-
async reload() {
|
|
19
|
-
const fresh = new Catalog(await this.store.get());
|
|
20
|
-
await this.$catalog.set(fresh);
|
|
21
|
-
}
|
|
22
|
-
async save(catalog) {
|
|
23
|
-
await this.store.set(catalog.toJSON());
|
|
24
|
-
await this.$catalog(catalog);
|
|
25
|
-
}
|
|
26
|
-
async #mutateAndSave(fn) {
|
|
27
|
-
const catalog = this.$catalog().clone();
|
|
28
|
-
const result = fn(catalog);
|
|
29
|
-
await this.store.set(catalog.toJSON());
|
|
30
|
-
await this.$catalog(catalog);
|
|
31
|
-
return result;
|
|
32
|
-
}
|
|
33
|
-
async createProfile(label, bindings) {
|
|
34
|
-
return this.#mutateAndSave(catalog => {
|
|
35
|
-
const id = Hex.random();
|
|
36
|
-
const profile = { id, label, bindings };
|
|
37
|
-
catalog.profiles.set(id, profile);
|
|
38
|
-
return profile;
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
async deleteProfile(id) {
|
|
42
|
-
return this.#mutateAndSave(catalog => {
|
|
43
|
-
catalog.profiles.delete(id);
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
async assignPortProfile(index, profileId) {
|
|
47
|
-
return this.#mutateAndSave(catalog => {
|
|
48
|
-
catalog.portProfiles[index] = profileId;
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
//# sourceMappingURL=db.js.map
|
package/x/deck/parts/db.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"db.js","sourceRoot":"","sources":["../../../s/deck/parts/db.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,QAAQ,EAAE,GAAG,EAAC,MAAM,WAAW,CAAA;AACvC,OAAO,EAAC,MAAM,EAAS,MAAM,cAAc,CAAA;AAC3C,OAAO,EAAC,aAAa,EAAQ,MAAM,UAAU,CAAA;AAG7C,OAAO,EAAC,OAAO,EAAuB,MAAM,cAAc,CAAA;AAE1D,MAAM,OAAO,EAAE;IASJ;IACD;IATT,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAyB;QAC1C,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAA;QACvD,OAAO,IAAI,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;IACjC,CAAC;IAED,OAAO,GAAG,QAAQ,EAAE,CAAA;IAEpB,YACU,KAAyB,EAC1B,QAAyB;QADxB,UAAK,GAAL,KAAK,CAAoB;QAC1B,aAAQ,GAAR,QAAQ,CAAiB;QAGjC,IAAI,CAAC,OAAO,CAAC,QAAQ,CACpB,aAAa,CAAC,cAAc,CAAC,KAAK,IAAG,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CACtD,CAAA;IACF,CAAC;IAED,KAAK,CAAC,MAAM;QACX,MAAM,KAAK,GAAG,IAAI,OAAO,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAA;QACjD,MAAM,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;IAC/B,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,OAAgB;QAC1B,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAA;QACtC,MAAM,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;IAC7B,CAAC;IAED,KAAK,CAAC,cAAc,CAAI,EAA2B;QAClD,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAA;QACvC,MAAM,MAAM,GAAG,EAAE,CAAC,OAAO,CAAC,CAAA;QAC1B,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAA;QACtC,MAAM,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;QAC5B,OAAO,MAAM,CAAA;IACd,CAAC;IAED,KAAK,CAAC,aAAa,CAAC,KAAa,EAAE,QAAkB;QACpD,OAAO,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE;YACpC,MAAM,EAAE,GAAG,GAAG,CAAC,MAAM,EAAE,CAAA;YACvB,MAAM,OAAO,GAAY,EAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAC,CAAA;YAC9C,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,EAAE,OAAO,CAAC,CAAA;YACjC,OAAO,OAAO,CAAA;QACf,CAAC,CAAC,CAAA;IACH,CAAC;IAED,KAAK,CAAC,aAAa,CAAC,EAAU;QAC7B,OAAO,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE;YACpC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,CAAA;QAC5B,CAAC,CAAC,CAAA;IACH,CAAC;IAED,KAAK,CAAC,iBAAiB,CAAC,KAAa,EAAE,SAAwB;QAC9D,OAAO,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE;YACpC,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,GAAG,SAAS,CAAA;QACxC,CAAC,CAAC,CAAA;IACH,CAAC;CACD"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Content } from "@e280/sly";
|
|
2
|
-
import { Constructor } from "@e280/stz";
|
|
3
|
-
import { Device } from "../../../core/devices/device.js";
|
|
4
|
-
export type DeviceIconEntry = [DeviceClass: Constructor<Device>, icon: Content];
|
|
5
|
-
export declare class DeviceIcons {
|
|
6
|
-
#private;
|
|
7
|
-
fallback: Content;
|
|
8
|
-
constructor(entries?: DeviceIconEntry[]);
|
|
9
|
-
get(DeviceClass: Constructor<Device>): Content;
|
|
10
|
-
add(...entries: DeviceIconEntry[]): this;
|
|
11
|
-
clear(): this;
|
|
12
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { VpadDevice } from "../../../core/devices/standard/vpad.js";
|
|
2
|
-
import { PrimaryDevice } from "../../../core/devices/standard/primary.js";
|
|
3
|
-
import { GamepadDevice } from "../../../core/devices/standard/gamepad.js";
|
|
4
|
-
export class DeviceIcons {
|
|
5
|
-
fallback = "❔";
|
|
6
|
-
#map = new Map();
|
|
7
|
-
constructor(entries = [
|
|
8
|
-
[PrimaryDevice, "💻"],
|
|
9
|
-
[GamepadDevice, "🎮"],
|
|
10
|
-
[VpadDevice, "📱"],
|
|
11
|
-
]) {
|
|
12
|
-
this.add(...entries);
|
|
13
|
-
}
|
|
14
|
-
get(DeviceClass) {
|
|
15
|
-
return this.#map.get(DeviceClass) ?? this.fallback;
|
|
16
|
-
}
|
|
17
|
-
add(...entries) {
|
|
18
|
-
for (const [dc, icon] of entries)
|
|
19
|
-
this.#map.set(dc, icon);
|
|
20
|
-
return this;
|
|
21
|
-
}
|
|
22
|
-
clear() {
|
|
23
|
-
this.#map.clear();
|
|
24
|
-
return this;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=device-icons.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"device-icons.js","sourceRoot":"","sources":["../../../../s/deck/parts/device-skins/device-icons.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,UAAU,EAAC,MAAM,wCAAwC,CAAA;AACjE,OAAO,EAAC,aAAa,EAAC,MAAM,2CAA2C,CAAA;AACvE,OAAO,EAAC,aAAa,EAAC,MAAM,2CAA2C,CAAA;AAIvE,MAAM,OAAO,WAAW;IACvB,QAAQ,GAAY,GAAG,CAAA;IACvB,IAAI,GAAG,IAAI,GAAG,EAAgC,CAAA;IAE9C,YAAY,UAA6B;QACvC,CAAC,aAAa,EAAE,IAAI,CAAC;QACrB,CAAC,aAAa,EAAE,IAAI,CAAC;QACrB,CAAC,UAAU,EAAE,IAAI,CAAC;KAClB;QACD,IAAI,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,CAAA;IACrB,CAAC;IAED,GAAG,CAAC,WAAgC;QACnC,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAA;IACnD,CAAC;IAED,GAAG,CAAC,GAAG,OAA0B;QAChC,KAAK,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,IAAI,OAAO;YAC/B,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,IAAI,CAAC,CAAA;QACxB,OAAO,IAAI,CAAA;IACZ,CAAC;IAED,KAAK;QACJ,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAA;QACjB,OAAO,IAAI,CAAA;IACZ,CAAC;CACD"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Content } from "@e280/sly";
|
|
2
|
-
import { DeviceIcons } from "./device-icons.js";
|
|
3
|
-
import { Device } from "../../../core/devices/device.js";
|
|
4
|
-
export declare class DeviceSkin {
|
|
5
|
-
icon: Content;
|
|
6
|
-
label: string;
|
|
7
|
-
color: string;
|
|
8
|
-
constructor(icon: Content, label: string, color: string);
|
|
9
|
-
}
|
|
10
|
-
export declare class DeviceSkins {
|
|
11
|
-
#private;
|
|
12
|
-
icons: DeviceIcons;
|
|
13
|
-
get(device: Device): DeviceSkin;
|
|
14
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Hex, WeakMapG } from "@e280/stz";
|
|
2
|
-
import { DeviceIcons } from "./device-icons.js";
|
|
3
|
-
import { ColorDispenser } from "../../../utils/dispensers.js";
|
|
4
|
-
export class DeviceSkin {
|
|
5
|
-
icon;
|
|
6
|
-
label;
|
|
7
|
-
color;
|
|
8
|
-
constructor(icon, label, color) {
|
|
9
|
-
this.icon = icon;
|
|
10
|
-
this.label = label;
|
|
11
|
-
this.color = color;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
export class DeviceSkins {
|
|
15
|
-
icons = new DeviceIcons();
|
|
16
|
-
#map = new WeakMapG();
|
|
17
|
-
#colors = new ColorDispenser();
|
|
18
|
-
get(device) {
|
|
19
|
-
return this.#map.guarantee(device, () => new DeviceSkin(this.icons.get(device.constructor), Hex.random(4), this.#colors.takeFirst()));
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=device-skin.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"device-skin.js","sourceRoot":"","sources":["../../../../s/deck/parts/device-skins/device-skin.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,GAAG,EAAE,QAAQ,EAAC,MAAM,WAAW,CAAA;AACvC,OAAO,EAAC,WAAW,EAAC,MAAM,mBAAmB,CAAA;AAE7C,OAAO,EAAC,cAAc,EAAC,MAAM,8BAA8B,CAAA;AAE3D,MAAM,OAAO,UAAU;IAEd;IACA;IACA;IAHR,YACQ,IAAa,EACb,KAAa,EACb,KAAa;QAFb,SAAI,GAAJ,IAAI,CAAS;QACb,UAAK,GAAL,KAAK,CAAQ;QACb,UAAK,GAAL,KAAK,CAAQ;IAClB,CAAC;CACJ;AAED,MAAM,OAAO,WAAW;IACvB,KAAK,GAAG,IAAI,WAAW,EAAE,CAAA;IACzB,IAAI,GAAG,IAAI,QAAQ,EAAsB,CAAA;IACzC,OAAO,GAAG,IAAI,cAAc,EAAE,CAAA;IAE9B,GAAG,CAAC,MAAc;QACjB,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,UAAU,CACtD,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,WAAkB,CAAC,EACzC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EACb,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,CACxB,CAAC,CAAA;IACH,CAAC;CACD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"local-storage-kv.js","sourceRoot":"","sources":["../../../s/deck/parts/local-storage-kv.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,EAAE,EAAE,aAAa,EAAC,MAAM,UAAU,CAAA;AAE1C,MAAM,UAAU,cAAc;IAC7B,MAAM,MAAM,GAAG,IAAI,aAAa,CAAC,MAAM,CAAC,YAAY,CAAC,CAAA;IACrD,OAAO,IAAI,EAAE,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;AACpC,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { deep } from "@e280/stz";
|
|
2
|
-
export function mergeBindings(normative, sus) {
|
|
3
|
-
const bindings = deep.clone(normative);
|
|
4
|
-
if (!sus)
|
|
5
|
-
return bindings;
|
|
6
|
-
for (const [mode, bracket] of Object.entries(bindings)) {
|
|
7
|
-
for (const actionKey of Object.keys(bracket)) {
|
|
8
|
-
const susAction = sus[mode]?.[actionKey];
|
|
9
|
-
if (susAction)
|
|
10
|
-
bracket[actionKey] = susAction;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
return bindings;
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=merge-bindings.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"merge-bindings.js","sourceRoot":"","sources":["../../../s/deck/parts/merge-bindings.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,IAAI,EAAC,MAAM,WAAW,CAAA;AAG9B,MAAM,UAAU,aAAa,CAAqB,SAAY,EAAE,GAAO;IACtE,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAA;IAEtC,IAAI,CAAC,GAAG;QACP,OAAO,QAAQ,CAAA;IAEhB,KAAK,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;QACxD,KAAK,MAAM,SAAS,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;YAC9C,MAAM,SAAS,GAAG,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,SAAS,CAAC,CAAA;YACxC,IAAI,SAAS;gBACZ,OAAO,CAAC,SAAS,CAAC,GAAG,SAAS,CAAA;QAChC,CAAC;IACF,CAAC;IAED,OAAO,QAAQ,CAAA;AAChB,CAAC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Hub } from "../../core/hub/hub.js";
|
|
2
|
-
import { DeviceSkins } from "./device-skins/device-skin.js";
|
|
3
|
-
export declare class OverlayVisibility {
|
|
4
|
-
#private;
|
|
5
|
-
hub: Hub<any>;
|
|
6
|
-
deviceSkins: DeviceSkins;
|
|
7
|
-
auto: boolean;
|
|
8
|
-
dispose: import("@e280/stz").Disposer;
|
|
9
|
-
/** manual override for whether the ports view should be visible */
|
|
10
|
-
readonly $manual: import("@e280/strata").Signal<boolean>;
|
|
11
|
-
/** derived signal about whether the ports view should be visible */
|
|
12
|
-
readonly $visible: import("@e280/strata").Derived<boolean>;
|
|
13
|
-
/** whether or not to show labels in the overlay ui */
|
|
14
|
-
readonly $showLabels: import("@e280/strata").Signal<boolean>;
|
|
15
|
-
constructor(hub: Hub<any>, deviceSkins?: DeviceSkins);
|
|
16
|
-
bump(): Promise<void>;
|
|
17
|
-
toggle(active?: boolean): Promise<boolean>;
|
|
18
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { signal } from "@e280/strata";
|
|
2
|
-
import { debounce, disposer } from "@e280/stz";
|
|
3
|
-
import { DeviceSkins } from "./device-skins/device-skin.js";
|
|
4
|
-
export class OverlayVisibility {
|
|
5
|
-
hub;
|
|
6
|
-
deviceSkins;
|
|
7
|
-
auto = true;
|
|
8
|
-
dispose = disposer();
|
|
9
|
-
#created = Date.now();
|
|
10
|
-
#$auto = signal(false);
|
|
11
|
-
/** manual override for whether the ports view should be visible */
|
|
12
|
-
$manual = signal(false);
|
|
13
|
-
/** derived signal about whether the ports view should be visible */
|
|
14
|
-
$visible = signal.derived(() => (this.$manual() || (this.auto && this.#$auto())));
|
|
15
|
-
/** whether or not to show labels in the overlay ui */
|
|
16
|
-
$showLabels = signal(false);
|
|
17
|
-
constructor(hub, deviceSkins = new DeviceSkins()) {
|
|
18
|
-
this.hub = hub;
|
|
19
|
-
this.deviceSkins = deviceSkins;
|
|
20
|
-
this.dispose.schedule(hub.on(async () => {
|
|
21
|
-
const since = Date.now() - this.#created;
|
|
22
|
-
if (since > 100)
|
|
23
|
-
await this.bump();
|
|
24
|
-
}));
|
|
25
|
-
}
|
|
26
|
-
#autoOff = debounce(1500, () => this.#$auto(false));
|
|
27
|
-
async bump() {
|
|
28
|
-
await this.#$auto(true);
|
|
29
|
-
await this.#autoOff();
|
|
30
|
-
}
|
|
31
|
-
async toggle(active = !this.$manual()) {
|
|
32
|
-
return this.$manual.set(active);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
//# sourceMappingURL=overlay-visibility.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"overlay-visibility.js","sourceRoot":"","sources":["../../../s/deck/parts/overlay-visibility.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,MAAM,EAAC,MAAM,cAAc,CAAA;AACnC,OAAO,EAAC,QAAQ,EAAE,QAAQ,EAAC,MAAM,WAAW,CAAA;AAE5C,OAAO,EAAC,WAAW,EAAC,MAAM,+BAA+B,CAAA;AAEzD,MAAM,OAAO,iBAAiB;IAmBpB;IACA;IAnBT,IAAI,GAAG,IAAI,CAAA;IACX,OAAO,GAAG,QAAQ,EAAE,CAAA;IAEpB,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;IACrB,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;IAEtB,mEAAmE;IAC1D,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;IAEhC,oEAAoE;IAC3D,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CACxC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC,CAC9C,CAAC,CAAA;IAEF,sDAAsD;IAC7C,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;IAEpC,YACS,GAAa,EACb,cAAc,IAAI,WAAW,EAAE;QAD/B,QAAG,GAAH,GAAG,CAAU;QACb,gBAAW,GAAX,WAAW,CAAoB;QAGvC,IAAI,CAAC,OAAO,CAAC,QAAQ,CACpB,GAAG,CAAC,EAAE,CAAC,KAAK,IAAG,EAAE;YAChB,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,QAAQ,CAAA;YACxC,IAAI,KAAK,GAAG,GAAG;gBAAE,MAAM,IAAI,CAAC,IAAI,EAAE,CAAA;QACnC,CAAC,CAAC,CACF,CAAA;IACF,CAAC;IAED,QAAQ,GAAG,QAAQ,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAA;IAEnD,KAAK,CAAC,IAAI;QACT,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;QACvB,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAA;IACtB,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,OAAO,EAAE;QACpC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;IAChC,CAAC;CACD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"style.css.js","sourceRoot":"","sources":["../../../../s/deck/views/bindings/style.css.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAA;AACvB,eAAe,GAAG,CAAA;;CAEjB,CAAA"}
|