@benev/tact 0.1.0 → 0.2.0-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/README.md +30 -16
- package/package.json +13 -12
- package/s/core/bindings/parts/lens-algo.ts +2 -1
- package/s/core/core.test.ts +66 -35
- package/s/core/testing/testing.ts +11 -10
- package/s/deck/deck.ts +1 -14
- package/s/deck/index.ts +1 -2
- package/s/deck/parts/db.ts +2 -3
- package/s/deck/views/bindings/view.ts +95 -0
- package/s/deck/views/overlay/view.ts +46 -0
- package/s/demo/game/parts/renderer.ts +4 -5
- package/s/demo/game/parts/state.ts +1 -2
- package/s/demo/main.bundle.ts +1 -4
- package/s/demo/ui/theater/styles.css.ts +1 -2
- package/s/demo/ui/theater/view.ts +47 -52
- package/s/demo/ui/theater/virtual/view.ts +10 -12
- package/s/index.html.ts +53 -44
- package/s/nubs/index.ts +3 -4
- package/s/nubs/lookpad/{component.ts → view.ts} +10 -16
- package/s/nubs/stick/{component.ts → view.ts} +27 -34
- package/s/nubs/vpad/{component.ts → view.ts} +25 -33
- package/s/utils/circular-clamp.ts +1 -2
- package/s/utils/gamepads.ts +2 -2
- package/x/core/bindings/parts/lens-algo.js +1 -1
- package/x/core/bindings/parts/lens-algo.js.map +1 -1
- package/x/core/core.test.d.ts +1 -1
- package/x/core/core.test.js +58 -36
- package/x/core/core.test.js.map +1 -1
- package/x/core/devices/standard/stick.d.ts +2 -2
- package/x/core/testing/testing.d.ts +13 -6
- package/x/core/testing/testing.js +11 -10
- package/x/core/testing/testing.js.map +1 -1
- package/x/deck/deck.d.ts +0 -7
- package/x/deck/deck.js +1 -9
- package/x/deck/deck.js.map +1 -1
- package/x/deck/index.d.ts +1 -2
- package/x/deck/index.js +1 -2
- package/x/deck/index.js.map +1 -1
- package/x/deck/parts/db.d.ts +3 -3
- package/x/deck/parts/db.js.map +1 -1
- package/x/deck/parts/overlay-visibility.d.ts +3 -3
- package/x/deck/views/bindings/style.css.js.map +1 -0
- package/x/deck/views/bindings/view.d.ts +2 -0
- package/x/deck/views/bindings/view.js +80 -0
- package/x/deck/views/bindings/view.js.map +1 -0
- package/x/deck/views/overlay/style.css.js.map +1 -0
- package/x/deck/views/overlay/view.d.ts +2 -0
- package/x/deck/views/overlay/view.js +40 -0
- package/x/deck/views/overlay/view.js.map +1 -0
- package/x/demo/game/parts/renderer.js +4 -4
- package/x/demo/game/parts/renderer.js.map +1 -1
- package/x/demo/game/parts/state.js +1 -1
- package/x/demo/game/parts/state.js.map +1 -1
- package/x/demo/main.bundle.js +1 -5
- package/x/demo/main.bundle.js.map +1 -1
- package/x/demo/main.bundle.min.js +235 -237
- package/x/demo/main.bundle.min.js.map +4 -4
- package/x/demo/ui/theater/styles.css.js +1 -1
- package/x/demo/ui/theater/view.d.ts +1 -367
- package/x/demo/ui/theater/view.js +27 -32
- package/x/demo/ui/theater/view.js.map +1 -1
- package/x/demo/ui/theater/virtual/view.d.ts +1 -1
- package/x/demo/ui/theater/virtual/view.js +6 -6
- package/x/demo/ui/theater/virtual/view.js.map +1 -1
- package/x/index.html +41 -125
- package/x/index.html.js +50 -39
- package/x/index.html.js.map +1 -1
- package/x/nubs/index.d.ts +3 -4
- package/x/nubs/index.js +3 -4
- package/x/nubs/index.js.map +1 -1
- package/x/nubs/lookpad/view.d.ts +1 -0
- package/x/nubs/lookpad/{component.js → view.js} +11 -14
- package/x/nubs/lookpad/view.js.map +1 -0
- package/x/nubs/stick/view.d.ts +2 -0
- package/x/nubs/stick/{component.js → view.js} +28 -34
- package/x/nubs/stick/view.js.map +1 -0
- package/x/nubs/vpad/view.d.ts +2 -0
- package/x/nubs/vpad/{component.js → view.js} +26 -32
- package/x/nubs/vpad/view.js.map +1 -0
- package/x/utils/circular-clamp.js +1 -1
- package/x/utils/circular-clamp.js.map +1 -1
- package/x/utils/gamepads.js +2 -2
- package/s/deck/components/components.ts +0 -22
- package/s/deck/components/deck-bindings/component.ts +0 -99
- package/s/deck/components/deck-overlay/component.ts +0 -51
- package/s/deck/components/framework.ts +0 -17
- package/s/nubs/components.ts +0 -14
- package/s/utils/types.ts +0 -19
- package/x/deck/components/components.d.ts +0 -14
- package/x/deck/components/components.js +0 -9
- package/x/deck/components/components.js.map +0 -1
- package/x/deck/components/deck-bindings/component.d.ts +0 -6
- package/x/deck/components/deck-bindings/component.js +0 -83
- package/x/deck/components/deck-bindings/component.js.map +0 -1
- package/x/deck/components/deck-bindings/style.css.js.map +0 -1
- package/x/deck/components/deck-overlay/component.d.ts +0 -6
- package/x/deck/components/deck-overlay/component.js +0 -44
- package/x/deck/components/deck-overlay/component.js.map +0 -1
- package/x/deck/components/deck-overlay/style.css.js.map +0 -1
- package/x/deck/components/framework.d.ts +0 -7
- package/x/deck/components/framework.js +0 -13
- package/x/deck/components/framework.js.map +0 -1
- package/x/nubs/components.d.ts +0 -9
- package/x/nubs/components.js +0 -11
- package/x/nubs/components.js.map +0 -1
- package/x/nubs/lookpad/component.d.ts +0 -4
- package/x/nubs/lookpad/component.js.map +0 -1
- package/x/nubs/stick/component.d.ts +0 -368
- package/x/nubs/stick/component.js.map +0 -1
- package/x/nubs/vpad/component.d.ts +0 -368
- package/x/nubs/vpad/component.js.map +0 -1
- package/x/utils/types.d.ts +0 -3
- package/x/utils/types.js +0 -3
- package/x/utils/types.js.map +0 -1
- /package/s/deck/{components/deck-bindings → views/bindings}/style.css.ts +0 -0
- /package/s/deck/{components/deck-overlay → views/overlay}/style.css.ts +0 -0
- /package/x/deck/{components/deck-bindings → views/bindings}/style.css.d.ts +0 -0
- /package/x/deck/{components/deck-bindings → views/bindings}/style.css.js +0 -0
- /package/x/deck/{components/deck-overlay → views/overlay}/style.css.d.ts +0 -0
- /package/x/deck/{components/deck-overlay → views/overlay}/style.css.js +0 -0
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import {html} from "lit"
|
|
3
|
-
import {Bytename} from "@e280/stz"
|
|
4
|
-
import {cssReset, view} from "@e280/sly"
|
|
5
|
-
|
|
6
|
-
import {Deck} from "../../deck.js"
|
|
7
|
-
import styleCss from "./style.css.js"
|
|
8
|
-
import {DeckComponent} from "../framework.js"
|
|
9
|
-
import {Port} from "../../../core/hub/port.js"
|
|
10
|
-
import {Profile} from "../../parts/catalog.js"
|
|
11
|
-
import {Atom, Bindings, Bracket} from "../../../core/bindings/types.js"
|
|
12
|
-
|
|
13
|
-
export class DeckBindings extends (
|
|
14
|
-
view(use => (deck: Deck<any>) => {
|
|
15
|
-
use.css(cssReset, styleCss)
|
|
16
|
-
use.attrs.strings.deck = "bindings"
|
|
17
|
-
const {db, hub} = deck
|
|
18
|
-
|
|
19
|
-
const catalog = db.$catalog()
|
|
20
|
-
const defaultProfile: Profile = {id: "default", label: "default", bindings: deck.baseBindings}
|
|
21
|
-
const allProfiles = [defaultProfile, ...catalog.profiles.values()]
|
|
22
|
-
const $selectedProfileId = use.signal<string>("default")
|
|
23
|
-
const profile = db.$catalog().getProfile($selectedProfileId()) ?? defaultProfile
|
|
24
|
-
|
|
25
|
-
function renderPort(port: Port<Bindings>, index: number) {
|
|
26
|
-
const portProfile = catalog.getProfileForPort(index) ?? defaultProfile
|
|
27
|
-
return html`
|
|
28
|
-
<div class=port>
|
|
29
|
-
<span>port ${index + 1}</span>
|
|
30
|
-
<select>
|
|
31
|
-
${allProfiles.map(profile => html`
|
|
32
|
-
<option
|
|
33
|
-
data-id="${profile.id}"
|
|
34
|
-
?selected="${profile.id === portProfile.id}">
|
|
35
|
-
${profile.label}
|
|
36
|
-
</option>
|
|
37
|
-
`)}
|
|
38
|
-
</select>
|
|
39
|
-
</div>
|
|
40
|
-
`
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
function renderBindingBracket([mode, bracket]: [mode: string, bracket: Bracket]) {
|
|
44
|
-
return html`
|
|
45
|
-
<div class=bracket>
|
|
46
|
-
<strong class=mode>${mode}</strong>
|
|
47
|
-
<div>${Object.entries(bracket).map(renderBinds)}</div>
|
|
48
|
-
</div>
|
|
49
|
-
`
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
function renderBinds([action, atom]: [action: string, atom: Atom]) {
|
|
53
|
-
return html`
|
|
54
|
-
<div class=bind>
|
|
55
|
-
<span class=action>${action}</span>
|
|
56
|
-
</div>
|
|
57
|
-
`
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
const clickClone = async() => {
|
|
61
|
-
const {bindings} = profile
|
|
62
|
-
const label = Bytename.random(4)
|
|
63
|
-
const p = await db.createProfile(label, bindings)
|
|
64
|
-
$selectedProfileId(p.id)
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
const deleteProfile = (id: string) => async() => {
|
|
68
|
-
await db.deleteProfile(id)
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
const onSelected = (event: InputEvent) => {
|
|
72
|
-
const select = event.target as HTMLSelectElement
|
|
73
|
-
const id = select.value
|
|
74
|
-
$selectedProfileId(id)
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
return html`
|
|
78
|
-
<div class=portlist>
|
|
79
|
-
${hub.ports.map(renderPort)}
|
|
80
|
-
</div>
|
|
81
|
-
|
|
82
|
-
<div class=bindable>
|
|
83
|
-
<select @input="${onSelected}">
|
|
84
|
-
${allProfiles.map(p => html`
|
|
85
|
-
<option value="${p.id}" ?selected="${p.id === profile.id}">${p.label}</option>
|
|
86
|
-
`)}
|
|
87
|
-
</select>
|
|
88
|
-
<button @click="${clickClone}">clone</button>
|
|
89
|
-
<button ?disabled="${profile.id === defaultProfile.id}" @click="${deleteProfile(profile.id)}">delete</button>
|
|
90
|
-
<div class=bindings>
|
|
91
|
-
${Object.entries(profile.bindings).map(renderBindingBracket)}
|
|
92
|
-
</div>
|
|
93
|
-
</div>
|
|
94
|
-
`
|
|
95
|
-
})
|
|
96
|
-
.component(DeckComponent)
|
|
97
|
-
.props(el => [el.deck])
|
|
98
|
-
) {}
|
|
99
|
-
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import {html} from "lit"
|
|
3
|
-
import {cssReset, view} from "@e280/sly"
|
|
4
|
-
import {Deck} from "../../deck.js"
|
|
5
|
-
import styleCss from "./style.css.js"
|
|
6
|
-
import {DeckComponent} from "../framework.js"
|
|
7
|
-
import {Device} from "../../../core/devices/device.js"
|
|
8
|
-
|
|
9
|
-
export class DeckOverlay extends (
|
|
10
|
-
view(use => (deck: Deck<any>) => {
|
|
11
|
-
use.css(cssReset, styleCss)
|
|
12
|
-
use.attrs.strings.deck = "overlay"
|
|
13
|
-
const {hub, deviceSkins, overlayVisibility: {$visible, $showLabels}} = deck
|
|
14
|
-
|
|
15
|
-
function renderDevice(device: Device) {
|
|
16
|
-
const skin = deviceSkins.get(device)
|
|
17
|
-
const style = `--color: ${skin.color};`
|
|
18
|
-
const next = () => hub.shimmy(device, 1)
|
|
19
|
-
const previous = () => hub.shimmy(device, -1)
|
|
20
|
-
return html`
|
|
21
|
-
<div class=device style="${style}">
|
|
22
|
-
<div class="primary row">
|
|
23
|
-
<button @click="${previous}"><</button>
|
|
24
|
-
<div class=icon>${skin.icon}</div>
|
|
25
|
-
<button @click="${next}">></button>
|
|
26
|
-
</div>
|
|
27
|
-
|
|
28
|
-
${$showLabels() ? html`
|
|
29
|
-
<div class="secondary row">
|
|
30
|
-
<div class=label>${skin.label}</div>
|
|
31
|
-
</div>
|
|
32
|
-
` : null}
|
|
33
|
-
</div>
|
|
34
|
-
`
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
return html`
|
|
38
|
-
<div class=portlist ?data-active="${$visible()}">
|
|
39
|
-
${hub.ports.map((port, index) => html`
|
|
40
|
-
<div class=port>
|
|
41
|
-
<header>P${index + 1}</header>
|
|
42
|
-
${port.devices.array().map(renderDevice)}
|
|
43
|
-
</div>
|
|
44
|
-
`)}
|
|
45
|
-
</div>
|
|
46
|
-
`
|
|
47
|
-
})
|
|
48
|
-
.component(DeckComponent)
|
|
49
|
-
.props(el => [el.deck])
|
|
50
|
-
) {}
|
|
51
|
-
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import {BaseElement} from "@e280/sly"
|
|
3
|
-
import {Deck} from "../deck.js"
|
|
4
|
-
|
|
5
|
-
export class DeckComponent extends BaseElement {
|
|
6
|
-
#deck: Deck<any> | undefined
|
|
7
|
-
|
|
8
|
-
get deck() {
|
|
9
|
-
if (!this.#deck) throw new Error(".deck was not set on component, but is required")
|
|
10
|
-
return this.#deck
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
set deck(d: Deck<any>) {
|
|
14
|
-
this.#deck = d
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
package/s/nubs/components.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import {dom} from "@e280/sly"
|
|
3
|
-
import {NubLookpad} from "./lookpad/component.js"
|
|
4
|
-
import {NubStick} from "./stick/component.js"
|
|
5
|
-
import {NubVpad} from "./vpad/component.js"
|
|
6
|
-
|
|
7
|
-
export const nubs = () => ({
|
|
8
|
-
NubLookpad,
|
|
9
|
-
NubStick,
|
|
10
|
-
NubVpad,
|
|
11
|
-
})
|
|
12
|
-
|
|
13
|
-
export const registerNubs = () => dom.register(nubs())
|
|
14
|
-
|
package/s/utils/types.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
// TODO replace these types when they're available in stz
|
|
3
|
-
|
|
4
|
-
export type First<A extends any[]> = (
|
|
5
|
-
A extends [infer X, ...any[]]
|
|
6
|
-
? X
|
|
7
|
-
: never
|
|
8
|
-
)
|
|
9
|
-
|
|
10
|
-
export type DropFirst<A extends any[]> = (
|
|
11
|
-
A extends [any, ...infer X]
|
|
12
|
-
? X
|
|
13
|
-
: never
|
|
14
|
-
)
|
|
15
|
-
|
|
16
|
-
export type DropFirstParam<Fn extends (...params: any[]) => any> = (
|
|
17
|
-
(...params: DropFirst<Parameters<Fn>>) => ReturnType<Fn>
|
|
18
|
-
)
|
|
19
|
-
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Deck } from "../deck.js";
|
|
2
|
-
import { DropFirstParam } from "../../utils/types.js";
|
|
3
|
-
import { DeckOverlay } from "./deck-overlay/component.js";
|
|
4
|
-
import { DeckBindings } from "./deck-bindings/component.js";
|
|
5
|
-
declare const components: {
|
|
6
|
-
DeckOverlay: typeof DeckOverlay;
|
|
7
|
-
DeckBindings: typeof DeckBindings;
|
|
8
|
-
};
|
|
9
|
-
export declare const deckComponents: (deck: Deck<any>) => DeckComponents;
|
|
10
|
-
export type DeckComponents = typeof components;
|
|
11
|
-
export type DeckViews = {
|
|
12
|
-
[P in keyof DeckComponents]: (DropFirstParam<DeckComponents[P]["view"]>);
|
|
13
|
-
};
|
|
14
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ob } from "@e280/stz";
|
|
2
|
-
import { DeckOverlay } from "./deck-overlay/component.js";
|
|
3
|
-
import { DeckBindings } from "./deck-bindings/component.js";
|
|
4
|
-
const components = { DeckOverlay, DeckBindings };
|
|
5
|
-
export const deckComponents = (deck) => (ob(components)
|
|
6
|
-
.map(C => class extends C {
|
|
7
|
-
deck = deck;
|
|
8
|
-
}));
|
|
9
|
-
//# sourceMappingURL=components.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"components.js","sourceRoot":"","sources":["../../../s/deck/components/components.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,EAAE,EAAC,MAAM,WAAW,CAAA;AAG5B,OAAO,EAAC,WAAW,EAAC,MAAM,6BAA6B,CAAA;AACvD,OAAO,EAAC,YAAY,EAAC,MAAM,8BAA8B,CAAA;AAEzD,MAAM,UAAU,GAAG,EAAC,WAAW,EAAE,YAAY,EAAC,CAAA;AAE9C,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,IAAe,EAAE,EAAE,CAAC,CAClD,EAAE,CAAC,UAAU,CAAC;KACZ,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,KAAM,SAAQ,CAAC;IAAG,IAAI,GAAG,IAAI,CAAA;CAAE,CAAC,CACzB,CAAA"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Deck } from "../../deck.js";
|
|
2
|
-
import { DeckComponent } from "../framework.js";
|
|
3
|
-
declare const DeckBindings_base: import("@e280/sly").ComponentClass<typeof DeckComponent, [deck: Deck<any, any>]>;
|
|
4
|
-
export declare class DeckBindings extends DeckBindings_base {
|
|
5
|
-
}
|
|
6
|
-
export {};
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { html } from "lit";
|
|
2
|
-
import { Bytename } from "@e280/stz";
|
|
3
|
-
import { cssReset, view } from "@e280/sly";
|
|
4
|
-
import styleCss from "./style.css.js";
|
|
5
|
-
import { DeckComponent } from "../framework.js";
|
|
6
|
-
export class DeckBindings extends (view(use => (deck) => {
|
|
7
|
-
use.css(cssReset, styleCss);
|
|
8
|
-
use.attrs.strings.deck = "bindings";
|
|
9
|
-
const { db, hub } = deck;
|
|
10
|
-
const catalog = db.$catalog();
|
|
11
|
-
const defaultProfile = { id: "default", label: "default", bindings: deck.baseBindings };
|
|
12
|
-
const allProfiles = [defaultProfile, ...catalog.profiles.values()];
|
|
13
|
-
const $selectedProfileId = use.signal("default");
|
|
14
|
-
const profile = db.$catalog().getProfile($selectedProfileId()) ?? defaultProfile;
|
|
15
|
-
function renderPort(port, index) {
|
|
16
|
-
const portProfile = catalog.getProfileForPort(index) ?? defaultProfile;
|
|
17
|
-
return html `
|
|
18
|
-
<div class=port>
|
|
19
|
-
<span>port ${index + 1}</span>
|
|
20
|
-
<select>
|
|
21
|
-
${allProfiles.map(profile => html `
|
|
22
|
-
<option
|
|
23
|
-
data-id="${profile.id}"
|
|
24
|
-
?selected="${profile.id === portProfile.id}">
|
|
25
|
-
${profile.label}
|
|
26
|
-
</option>
|
|
27
|
-
`)}
|
|
28
|
-
</select>
|
|
29
|
-
</div>
|
|
30
|
-
`;
|
|
31
|
-
}
|
|
32
|
-
function renderBindingBracket([mode, bracket]) {
|
|
33
|
-
return html `
|
|
34
|
-
<div class=bracket>
|
|
35
|
-
<strong class=mode>${mode}</strong>
|
|
36
|
-
<div>${Object.entries(bracket).map(renderBinds)}</div>
|
|
37
|
-
</div>
|
|
38
|
-
`;
|
|
39
|
-
}
|
|
40
|
-
function renderBinds([action, atom]) {
|
|
41
|
-
return html `
|
|
42
|
-
<div class=bind>
|
|
43
|
-
<span class=action>${action}</span>
|
|
44
|
-
</div>
|
|
45
|
-
`;
|
|
46
|
-
}
|
|
47
|
-
const clickClone = async () => {
|
|
48
|
-
const { bindings } = profile;
|
|
49
|
-
const label = Bytename.random(4);
|
|
50
|
-
const p = await db.createProfile(label, bindings);
|
|
51
|
-
$selectedProfileId(p.id);
|
|
52
|
-
};
|
|
53
|
-
const deleteProfile = (id) => async () => {
|
|
54
|
-
await db.deleteProfile(id);
|
|
55
|
-
};
|
|
56
|
-
const onSelected = (event) => {
|
|
57
|
-
const select = event.target;
|
|
58
|
-
const id = select.value;
|
|
59
|
-
$selectedProfileId(id);
|
|
60
|
-
};
|
|
61
|
-
return html `
|
|
62
|
-
<div class=portlist>
|
|
63
|
-
${hub.ports.map(renderPort)}
|
|
64
|
-
</div>
|
|
65
|
-
|
|
66
|
-
<div class=bindable>
|
|
67
|
-
<select @input="${onSelected}">
|
|
68
|
-
${allProfiles.map(p => html `
|
|
69
|
-
<option value="${p.id}" ?selected="${p.id === profile.id}">${p.label}</option>
|
|
70
|
-
`)}
|
|
71
|
-
</select>
|
|
72
|
-
<button @click="${clickClone}">clone</button>
|
|
73
|
-
<button ?disabled="${profile.id === defaultProfile.id}" @click="${deleteProfile(profile.id)}">delete</button>
|
|
74
|
-
<div class=bindings>
|
|
75
|
-
${Object.entries(profile.bindings).map(renderBindingBracket)}
|
|
76
|
-
</div>
|
|
77
|
-
</div>
|
|
78
|
-
`;
|
|
79
|
-
})
|
|
80
|
-
.component(DeckComponent)
|
|
81
|
-
.props(el => [el.deck])) {
|
|
82
|
-
}
|
|
83
|
-
//# sourceMappingURL=component.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../../../s/deck/components/deck-bindings/component.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,IAAI,EAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAC,QAAQ,EAAC,MAAM,WAAW,CAAA;AAClC,OAAO,EAAC,QAAQ,EAAE,IAAI,EAAC,MAAM,WAAW,CAAA;AAGxC,OAAO,QAAQ,MAAM,gBAAgB,CAAA;AACrC,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAA;AAK7C,MAAM,OAAO,YAAa,SAAQ,CACjC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,IAAe,EAAE,EAAE;IAC/B,GAAG,CAAC,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAA;IAC3B,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,GAAG,UAAU,CAAA;IACnC,MAAM,EAAC,EAAE,EAAE,GAAG,EAAC,GAAG,IAAI,CAAA;IAEtB,MAAM,OAAO,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAA;IAC7B,MAAM,cAAc,GAAY,EAAC,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,CAAC,YAAY,EAAC,CAAA;IAC9F,MAAM,WAAW,GAAG,CAAC,cAAc,EAAE,GAAG,OAAO,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAA;IAClE,MAAM,kBAAkB,GAAG,GAAG,CAAC,MAAM,CAAS,SAAS,CAAC,CAAA;IACxD,MAAM,OAAO,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,UAAU,CAAC,kBAAkB,EAAE,CAAC,IAAI,cAAc,CAAA;IAEhF,SAAS,UAAU,CAAC,IAAoB,EAAE,KAAa;QACtD,MAAM,WAAW,GAAG,OAAO,CAAC,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kB,CAAC,EAAE,CAAC,CAAA;IACvB,CAAC,CAAA;IAED,OAAO,IAAI,CAAA;;MAEP,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC;;;;sBAIT,UAAU;OACzB,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAA;uBACT,CAAC,CAAC,EAAE,gBAAgB,CAAC,CAAC,EAAE,KAAK,OAAO,CAAC,EAAE,KAAK,CAAC,CAAC,KAAK;MACpE,CAAC;;sBAEe,UAAU;yBACP,OAAO,CAAC,EAAE,KAAK,cAAc,CAAC,EAAE,aAAa,aAAa,CAAC,OAAO,CAAC,EAAE,CAAC;;OAExF,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,oBAAoB,CAAC;;;GAG9D,CAAA;AACF,CAAC,CAAC;KACD,SAAS,CAAC,aAAa,CAAC;KACxB,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CACvB;CAAG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"style.css.js","sourceRoot":"","sources":["../../../../s/deck/components/deck-bindings/style.css.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAA;AACvB,eAAe,GAAG,CAAA;;CAEjB,CAAA"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Deck } from "../../deck.js";
|
|
2
|
-
import { DeckComponent } from "../framework.js";
|
|
3
|
-
declare const DeckOverlay_base: import("@e280/sly").ComponentClass<typeof DeckComponent, [deck: Deck<any, any>]>;
|
|
4
|
-
export declare class DeckOverlay extends DeckOverlay_base {
|
|
5
|
-
}
|
|
6
|
-
export {};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { html } from "lit";
|
|
2
|
-
import { cssReset, view } from "@e280/sly";
|
|
3
|
-
import styleCss from "./style.css.js";
|
|
4
|
-
import { DeckComponent } from "../framework.js";
|
|
5
|
-
export class DeckOverlay extends (view(use => (deck) => {
|
|
6
|
-
use.css(cssReset, styleCss);
|
|
7
|
-
use.attrs.strings.deck = "overlay";
|
|
8
|
-
const { hub, deviceSkins, overlayVisibility: { $visible, $showLabels } } = deck;
|
|
9
|
-
function renderDevice(device) {
|
|
10
|
-
const skin = deviceSkins.get(device);
|
|
11
|
-
const style = `--color: ${skin.color};`;
|
|
12
|
-
const next = () => hub.shimmy(device, 1);
|
|
13
|
-
const previous = () => hub.shimmy(device, -1);
|
|
14
|
-
return html `
|
|
15
|
-
<div class=device style="${style}">
|
|
16
|
-
<div class="primary row">
|
|
17
|
-
<button @click="${previous}"><</button>
|
|
18
|
-
<div class=icon>${skin.icon}</div>
|
|
19
|
-
<button @click="${next}">></button>
|
|
20
|
-
</div>
|
|
21
|
-
|
|
22
|
-
${$showLabels() ? html `
|
|
23
|
-
<div class="secondary row">
|
|
24
|
-
<div class=label>${skin.label}</div>
|
|
25
|
-
</div>
|
|
26
|
-
` : null}
|
|
27
|
-
</div>
|
|
28
|
-
`;
|
|
29
|
-
}
|
|
30
|
-
return html `
|
|
31
|
-
<div class=portlist ?data-active="${$visible()}">
|
|
32
|
-
${hub.ports.map((port, index) => html `
|
|
33
|
-
<div class=port>
|
|
34
|
-
<header>P${index + 1}</header>
|
|
35
|
-
${port.devices.array().map(renderDevice)}
|
|
36
|
-
</div>
|
|
37
|
-
`)}
|
|
38
|
-
</div>
|
|
39
|
-
`;
|
|
40
|
-
})
|
|
41
|
-
.component(DeckComponent)
|
|
42
|
-
.props(el => [el.deck])) {
|
|
43
|
-
}
|
|
44
|
-
//# sourceMappingURL=component.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../../../s/deck/components/deck-overlay/component.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,IAAI,EAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAC,QAAQ,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AC,OAAO,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,YAAY,CAAC;;KAEzC,CAAC;;GAEH,CAAA;AACF,CAAC,CAAC;KACD,SAAS,CAAC,aAAa,CAAC;KACxB,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CACvB;CAAG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"style.css.js","sourceRoot":"","sources":["../../../../s/deck/components/deck-overlay/style.css.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAA;AACvB,eAAe,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0GjB,CAAA"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { BaseElement } from "@e280/sly";
|
|
2
|
-
export class DeckComponent extends BaseElement {
|
|
3
|
-
#deck;
|
|
4
|
-
get deck() {
|
|
5
|
-
if (!this.#deck)
|
|
6
|
-
throw new Error(".deck was not set on component, but is required");
|
|
7
|
-
return this.#deck;
|
|
8
|
-
}
|
|
9
|
-
set deck(d) {
|
|
10
|
-
this.#deck = d;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=framework.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"framework.js","sourceRoot":"","sources":["../../../s/deck/components/framework.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,WAAW,EAAC,MAAM,WAAW,CAAA;AAGrC,MAAM,OAAO,aAAc,SAAQ,WAAW;IAC7C,KAAK,CAAuB;IAE5B,IAAI,IAAI;QACP,IAAI,CAAC,IAAI,CAAC,KAAK;YAAE,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAA;QACnF,OAAO,IAAI,CAAC,KAAK,CAAA;IAClB,CAAC;IAED,IAAI,IAAI,CAAC,CAAY;QACpB,IAAI,CAAC,KAAK,GAAG,CAAC,CAAA;IACf,CAAC;CACD"}
|
package/x/nubs/components.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { NubLookpad } from "./lookpad/component.js";
|
|
2
|
-
import { NubStick } from "./stick/component.js";
|
|
3
|
-
import { NubVpad } from "./vpad/component.js";
|
|
4
|
-
export declare const nubs: () => {
|
|
5
|
-
NubLookpad: typeof NubLookpad;
|
|
6
|
-
NubStick: typeof NubStick;
|
|
7
|
-
NubVpad: typeof NubVpad;
|
|
8
|
-
};
|
|
9
|
-
export declare const registerNubs: () => void;
|
package/x/nubs/components.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { dom } from "@e280/sly";
|
|
2
|
-
import { NubLookpad } from "./lookpad/component.js";
|
|
3
|
-
import { NubStick } from "./stick/component.js";
|
|
4
|
-
import { NubVpad } from "./vpad/component.js";
|
|
5
|
-
export const nubs = () => ({
|
|
6
|
-
NubLookpad,
|
|
7
|
-
NubStick,
|
|
8
|
-
NubVpad,
|
|
9
|
-
});
|
|
10
|
-
export const registerNubs = () => dom.register(nubs());
|
|
11
|
-
//# sourceMappingURL=components.js.map
|
package/x/nubs/components.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"components.js","sourceRoot":"","sources":["../../s/nubs/components.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,GAAG,EAAC,MAAM,WAAW,CAAA;AAC7B,OAAO,EAAC,UAAU,EAAC,MAAM,wBAAwB,CAAA;AACjD,OAAO,EAAC,QAAQ,EAAC,MAAM,sBAAsB,CAAA;AAC7C,OAAO,EAAC,OAAO,EAAC,MAAM,qBAAqB,CAAA;AAE3C,MAAM,CAAC,MAAM,IAAI,GAAG,GAAG,EAAE,CAAC,CAAC;IAC1B,UAAU;IACV,QAAQ;IACR,OAAO;CACP,CAAC,CAAA;AAEF,MAA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