@benev/tact 0.1.0-4 → 0.1.0-5

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.
Files changed (99) hide show
  1. package/README.md +4 -3
  2. package/package.json +4 -4
  3. package/s/core/bindings/parts/defaults.ts +1 -0
  4. package/s/core/bindings/parts/lens-algo.ts +5 -1
  5. package/s/core/bindings/parts/lookup-proxies.ts +17 -0
  6. package/s/core/bindings/types.ts +1 -0
  7. package/s/core/devices/standard/gamepad.ts +1 -1
  8. package/s/core/devices/standard/pointer.ts +4 -0
  9. package/s/deck/components/components.ts +22 -0
  10. package/s/deck/components/deck-bindings/component.ts +99 -0
  11. package/s/{demo/ui/tact-demo → deck/components/deck-bindings}/style.css.ts +3 -1
  12. package/s/deck/components/deck-overlay/component.ts +51 -0
  13. package/s/deck/{views → components}/deck-overlay/style.css.ts +0 -2
  14. package/s/deck/components/framework.ts +17 -0
  15. package/s/deck/deck.ts +12 -7
  16. package/s/deck/index.ts +2 -2
  17. package/s/deck/parts/db.ts +1 -1
  18. package/s/demo/main.bundle.ts +7 -2
  19. package/s/demo/ui/theater/styles.css.ts +1 -0
  20. package/s/demo/ui/theater/view.ts +51 -44
  21. package/s/demo/ui/theater/virtual/view.ts +1 -1
  22. package/s/demo/ui/utils/loader.ts +2 -2
  23. package/s/index.html.ts +1 -1
  24. package/s/nubs/vpad/styles.css.ts +4 -4
  25. package/s/utils/types.ts +19 -0
  26. package/x/core/bindings/parts/defaults.js +1 -0
  27. package/x/core/bindings/parts/defaults.js.map +1 -1
  28. package/x/core/bindings/parts/lens-algo.js +5 -1
  29. package/x/core/bindings/parts/lens-algo.js.map +1 -1
  30. package/x/core/bindings/parts/lookup-proxies.d.ts +1 -0
  31. package/x/core/bindings/parts/lookup-proxies.js +19 -0
  32. package/x/core/bindings/parts/lookup-proxies.js.map +1 -0
  33. package/x/core/bindings/types.d.ts +1 -0
  34. package/x/core/devices/standard/gamepad.js +1 -1
  35. package/x/core/devices/standard/gamepad.js.map +1 -1
  36. package/x/core/devices/standard/pointer.js +4 -0
  37. package/x/core/devices/standard/pointer.js.map +1 -1
  38. package/x/deck/components/components.d.ts +14 -0
  39. package/x/deck/components/components.js +9 -0
  40. package/x/deck/components/components.js.map +1 -0
  41. package/x/deck/components/deck-bindings/component.d.ts +6 -0
  42. package/x/deck/components/deck-bindings/component.js +83 -0
  43. package/x/deck/components/deck-bindings/component.js.map +1 -0
  44. package/x/deck/components/deck-bindings/style.css.js +5 -0
  45. package/x/deck/components/deck-bindings/style.css.js.map +1 -0
  46. package/x/deck/components/deck-overlay/component.d.ts +6 -0
  47. package/x/deck/components/deck-overlay/component.js +44 -0
  48. package/x/deck/components/deck-overlay/component.js.map +1 -0
  49. package/x/deck/components/deck-overlay/style.css.js.map +1 -0
  50. package/x/deck/components/framework.d.ts +7 -0
  51. package/x/deck/components/framework.js +13 -0
  52. package/x/deck/components/framework.js.map +1 -0
  53. package/x/deck/deck.d.ts +8 -6
  54. package/x/deck/deck.js +12 -7
  55. package/x/deck/deck.js.map +1 -1
  56. package/x/deck/index.d.ts +2 -2
  57. package/x/deck/index.js +2 -2
  58. package/x/deck/index.js.map +1 -1
  59. package/x/deck/parts/db.d.ts +1 -1
  60. package/x/deck/parts/db.js +1 -1
  61. package/x/deck/parts/db.js.map +1 -1
  62. package/x/demo/main.bundle.js +8 -2
  63. package/x/demo/main.bundle.js.map +1 -1
  64. package/x/demo/main.bundle.min.js +90 -45
  65. package/x/demo/main.bundle.min.js.map +4 -4
  66. package/x/demo/ui/theater/styles.css.js +1 -0
  67. package/x/demo/ui/theater/styles.css.js.map +1 -1
  68. package/x/demo/ui/theater/view.d.ts +367 -1
  69. package/x/demo/ui/theater/view.js +25 -17
  70. package/x/demo/ui/theater/view.js.map +1 -1
  71. package/x/demo/ui/theater/virtual/view.js +1 -1
  72. package/x/demo/ui/theater/virtual/view.js.map +1 -1
  73. package/x/demo/ui/utils/loader.d.ts +2 -1
  74. package/x/demo/ui/utils/loader.js +2 -2
  75. package/x/demo/ui/utils/loader.js.map +1 -1
  76. package/x/index.html +3 -3
  77. package/x/index.html.js +1 -1
  78. package/x/nubs/vpad/styles.css.js +4 -4
  79. package/x/utils/types.d.ts +3 -0
  80. package/x/utils/types.js +3 -0
  81. package/x/utils/types.js.map +1 -0
  82. package/s/deck/views/deck-overlay/component.ts +0 -48
  83. package/s/deck/views/framework.ts +0 -14
  84. package/s/demo/ui/tact-demo/component.ts +0 -13
  85. package/x/deck/views/deck-overlay/component.d.ts +0 -2
  86. package/x/deck/views/deck-overlay/component.js +0 -40
  87. package/x/deck/views/deck-overlay/component.js.map +0 -1
  88. package/x/deck/views/deck-overlay/style.css.js.map +0 -1
  89. package/x/deck/views/framework.d.ts +0 -3
  90. package/x/deck/views/framework.js +0 -8
  91. package/x/deck/views/framework.js.map +0 -1
  92. package/x/demo/ui/tact-demo/component.d.ts +0 -4
  93. package/x/demo/ui/tact-demo/component.js +0 -12
  94. package/x/demo/ui/tact-demo/component.js.map +0 -1
  95. package/x/demo/ui/tact-demo/style.css.js +0 -3
  96. package/x/demo/ui/tact-demo/style.css.js.map +0 -1
  97. /package/x/deck/{views/deck-overlay → components/deck-bindings}/style.css.d.ts +0 -0
  98. /package/x/{demo/ui/tact-demo → deck/components/deck-overlay}/style.css.d.ts +0 -0
  99. /package/x/deck/{views → components}/deck-overlay/style.css.js +0 -0
@@ -1,2 +0,0 @@
1
- import { Deck } from "../../deck.js";
2
- export declare const DeckOverlay: (deck: Deck<any>) => import("@e280/sly").View<[]>;
@@ -1,40 +0,0 @@
1
- import { html } from "lit";
2
- import { cssReset } from "@e280/sly";
3
- import styleCss from "./style.css.js";
4
- import { deckView } from "../framework.js";
5
- export const DeckOverlay = deckView(deck => use => {
6
- use.css(cssReset, styleCss);
7
- use.attrs.string.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}">&lt;</button>
18
- <div class=icon>${skin.icon}</div>
19
- <button @click="${next}">&gt;</button>
20
- </div>
21
- ${$showLabels() ? html `
22
- <div class="secondary row">
23
- <div class=label>${skin.label}</div>
24
- </div>
25
- ` : null}
26
- </div>
27
- `;
28
- }
29
- return html `
30
- <div class=portlist ?data-active="${$visible()}">
31
- ${hub.ports.map((port, index) => html `
32
- <div class=port>
33
- <header>P${index + 1}</header>
34
- ${port.devices.array().map(renderDevice)}
35
- </div>
36
- `)}
37
- </div>
38
- `;
39
- });
40
- //# sourceMappingURL=component.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"component.js","sourceRoot":"","sources":["../../../../s/deck/views/deck-overlay/component.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,IAAI,EAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAC,QAAQ,EAAC,MAAM,WAAW,CAAA;AAElC,OAAO,QAAQ,MAAM,gBAAgB,CAAA;AACrC,OAAO,EAAC,QAAQ,EAAC,MAAM,iBAAiB,CAAA;AAGxC,MAAM,CAAC,MAAM,WAAW,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE;IACjD,GAAG,CAAC,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAA;IAC3B,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,GAAG,SAAS,CAAA;IAEjC,MAAM,EAAC,GAAG,EAAE,WAAW,EAAE,iBAAiB,EAAE,EAAC,QAAQ,EAAE,WAAW,EAAC,EAAC,GAAG,IAAI,CAAA;IAE3E,SAAS,YAAY,CAAC,MAAc;QACnC,MAAM,IAAI,GAAG,WAAW,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;QACpC,MAAM,KAAK,GAAG,YAAY,IAAI,CAAC,KAAK,GAAG,CAAA;QACvC,MAAM,IAAI,GAAG,GAAG,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAA;QACxC,MAAM,QAAQ,GAAG,GAAG,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAA;QAC7C,OAAO,IAAI,CAAA;8BACiB,KAAK;;uBAEZ,QAAQ;uBACR,IAAI,CAAC,IAAI;uBACT,IAAI;;MAErB,WAAW,EAAE,CAAC,CAAC,CAAC,IAAI,CAAA;;yBAED,IAAI,CAAC,KAAK;;KAE9B,CAAC,CAAC,CAAC,IAAI;;GAET,CAAA;IACF,CAAC;IAED,OAAO,IAAI,CAAA;sCAC0B,QAAQ,EAAE;KAC3C,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAA;;gBAExB,KAAK,GAAG,CAAC;OAClB,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,YAAY,CAAC;;IAEzC,CAAC;;EAEH,CAAA;AAEF,CAAC,CAAC,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"style.css.js","sourceRoot":"","sources":["../../../../s/deck/views/deck-overlay/style.css.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAA;AACvB,eAAe,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0GjB,CAAA"}
@@ -1,3 +0,0 @@
1
- import { Content, Use } from "@e280/sly";
2
- import { Deck } from "../deck.js";
3
- export declare function deckView(fn: (deck: Deck<any>) => (use: Use) => Content): (deck: Deck<any>) => import("@e280/sly").View<[]>;
@@ -1,8 +0,0 @@
1
- import { view } from "@e280/sly";
2
- export function deckView(fn) {
3
- return (deck) => {
4
- const fn2 = fn(deck);
5
- return view(use => () => fn2(use));
6
- };
7
- }
8
- //# sourceMappingURL=framework.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"framework.js","sourceRoot":"","sources":["../../../s/deck/views/framework.ts"],"names":[],"mappings":"AACA,OAAO,EAAe,IAAI,EAAC,MAAM,WAAW,CAAA;AAG5C,MAAM,UAAU,QAAQ,CACtB,EAA8C;IAG/C,OAAO,CAAC,IAAe,EAAE,EAAE;QAC1B,MAAM,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,CAAA;QACpB,OAAO,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAA;IACnC,CAAC,CAAA;AACF,CAAC"}
@@ -1,4 +0,0 @@
1
- declare const TactDemo_base: import("@e280/sly").ComponentClass<typeof import("@e280/sly").BaseElement, []>;
2
- export declare class TactDemo extends TactDemo_base {
3
- }
4
- export {};
@@ -1,12 +0,0 @@
1
- import { cssReset, view } from "@e280/sly";
2
- import styleCss from "./style.css.js";
3
- import { Game } from "../../game/game.js";
4
- import { loader } from "../utils/loader.js";
5
- import { Theater } from "../theater/view.js";
6
- export class TactDemo extends view.component(use => {
7
- use.css(cssReset, styleCss);
8
- const opGame = use.op.load(async () => Game.load());
9
- return loader(opGame, game => Theater(game));
10
- }) {
11
- }
12
- //# sourceMappingURL=component.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"component.js","sourceRoot":"","sources":["../../../../s/demo/ui/tact-demo/component.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,QAAQ,EAAE,IAAI,EAAC,MAAM,WAAW,CAAA;AACxC,OAAO,QAAQ,MAAM,gBAAgB,CAAA;AACrC,OAAO,EAAC,IAAI,EAAC,MAAM,oBAAoB,CAAA;AACvC,OAAO,EAAC,MAAM,EAAC,MAAM,oBAAoB,CAAA;AACzC,OAAO,EAAC,OAAO,EAAC,MAAM,oBAAoB,CAAA;AAE1C,MAAM,OAAO,QAAS,SAAQ,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE;IAClD,GAAG,CAAC,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAA;IAC3B,MAAM,MAAM,GAAG,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,IAAG,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAA;IAClD,OAAO,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAA;AAC7C,CAAC,CAAC;CAAG"}
@@ -1,3 +0,0 @@
1
- import { css } from "lit";
2
- export default css ``;
3
- //# sourceMappingURL=style.css.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"style.css.js","sourceRoot":"","sources":["../../../../s/demo/ui/tact-demo/style.css.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAA;AACvB,eAAe,GAAG,CAAA,EAAE,CAAA"}