@e280/sly 0.0.0-4 → 0.0.0-6

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 (78) hide show
  1. package/README.md +99 -88
  2. package/package.json +2 -2
  3. package/s/demo/demo.bundle.ts +3 -47
  4. package/s/demo/demo.css +16 -6
  5. package/s/demo/views/counter.ts +42 -0
  6. package/s/demo/views/demo.ts +25 -0
  7. package/s/demo/views/loaders.ts +71 -0
  8. package/s/features/op/loaders/make-loader.ts +18 -0
  9. package/s/features/op/loaders/parts/anims.ts +413 -0
  10. package/s/features/op/loaders/parts/ascii-anim.ts +38 -0
  11. package/s/features/{loady → op/loaders}/parts/error-display.ts +10 -10
  12. package/s/features/op/op.ts +42 -20
  13. package/s/features/op/podium.ts +67 -0
  14. package/s/features/views/use.ts +6 -5
  15. package/s/features/views/view.ts +12 -5
  16. package/s/index.html.ts +2 -2
  17. package/s/index.ts +4 -3
  18. package/x/demo/demo.bundle.js +2 -36
  19. package/x/demo/demo.bundle.js.map +1 -1
  20. package/x/demo/demo.bundle.min.js +72 -10
  21. package/x/demo/demo.bundle.min.js.map +4 -4
  22. package/x/demo/demo.css +16 -6
  23. package/x/demo/views/counter.d.ts +1 -0
  24. package/x/demo/views/counter.js +34 -0
  25. package/x/demo/views/counter.js.map +1 -0
  26. package/x/demo/views/demo.d.ts +1 -0
  27. package/x/demo/views/demo.js +21 -0
  28. package/x/demo/views/demo.js.map +1 -0
  29. package/x/demo/views/loaders.d.ts +1 -0
  30. package/x/demo/views/loaders.js +63 -0
  31. package/x/demo/views/loaders.js.map +1 -0
  32. package/x/features/op/loaders/make-loader.d.ts +5 -0
  33. package/x/features/op/loaders/make-loader.js +7 -0
  34. package/x/features/op/loaders/make-loader.js.map +1 -0
  35. package/x/features/op/loaders/parts/anims.d.ts +34 -0
  36. package/x/features/op/loaders/parts/anims.js +377 -0
  37. package/x/features/op/loaders/parts/anims.js.map +1 -0
  38. package/x/features/op/loaders/parts/ascii-anim.d.ts +6 -0
  39. package/x/features/op/loaders/parts/ascii-anim.js +26 -0
  40. package/x/features/op/loaders/parts/ascii-anim.js.map +1 -0
  41. package/x/features/op/loaders/parts/error-display.d.ts +1 -0
  42. package/x/features/{loady → op/loaders}/parts/error-display.js +9 -9
  43. package/x/features/op/loaders/parts/error-display.js.map +1 -0
  44. package/x/features/op/op.d.ts +12 -3
  45. package/x/features/op/op.js +33 -17
  46. package/x/features/op/op.js.map +1 -1
  47. package/x/features/op/podium.d.ts +9 -0
  48. package/x/features/op/podium.js +53 -0
  49. package/x/features/op/podium.js.map +1 -0
  50. package/x/features/views/use.d.ts +4 -3
  51. package/x/features/views/use.js +7 -5
  52. package/x/features/views/use.js.map +1 -1
  53. package/x/features/views/view.js +11 -5
  54. package/x/features/views/view.js.map +1 -1
  55. package/x/index.d.ts +4 -3
  56. package/x/index.html +20 -10
  57. package/x/index.html.js +2 -2
  58. package/x/index.html.js.map +1 -1
  59. package/x/index.js +4 -3
  60. package/x/index.js.map +1 -1
  61. package/s/features/loady/ascii-loader.ts +0 -38
  62. package/s/features/loady/parts/ascii-anim.ts +0 -27
  63. package/s/features/loady/parts/ascii-loader.ts +0 -14
  64. package/s/features/op/pod.ts +0 -19
  65. package/x/features/loady/ascii-loader.d.ts +0 -5
  66. package/x/features/loady/ascii-loader.js +0 -33
  67. package/x/features/loady/ascii-loader.js.map +0 -1
  68. package/x/features/loady/parts/ascii-anim.d.ts +0 -1
  69. package/x/features/loady/parts/ascii-anim.js +0 -21
  70. package/x/features/loady/parts/ascii-anim.js.map +0 -1
  71. package/x/features/loady/parts/ascii-loader.d.ts +0 -3
  72. package/x/features/loady/parts/ascii-loader.js +0 -10
  73. package/x/features/loady/parts/ascii-loader.js.map +0 -1
  74. package/x/features/loady/parts/error-display.d.ts +0 -1
  75. package/x/features/loady/parts/error-display.js.map +0 -1
  76. package/x/features/op/pod.d.ts +0 -5
  77. package/x/features/op/pod.js +0 -16
  78. package/x/features/op/pod.js.map +0 -1
package/x/demo/demo.css CHANGED
@@ -5,6 +5,7 @@
5
5
  :root {
6
6
  --prime: #1eff00;
7
7
  --accent: #387d42;
8
+ --pill: #1276391a;
8
9
  --bg: #0e2316;
9
10
  --link: cyan;
10
11
  }
@@ -51,15 +52,13 @@
51
52
 
52
53
  @layer page {
53
54
  :root {
54
- color-scheme: dark;
55
-
56
- padding: 5vw 0.5em;
57
- min-height: 100%;
58
- scrollbar-gutter: stable;
59
-
55
+ height: 100%;
60
56
  font-size: 21px;
61
57
  font-family: sans-serif;
62
58
 
59
+ color-scheme: dark;
60
+ scrollbar-gutter: stable;
61
+
63
62
  color: color-mix(in lch, var(--prime), #fff8 50%);
64
63
  background: radial-gradient(
65
64
  circle,
@@ -69,6 +68,13 @@
69
68
  }
70
69
 
71
70
  body {
71
+ width: 100%;
72
+ min-height: 100%;
73
+ max-width: 32em;
74
+ margin: auto;
75
+ padding: 1em;
76
+ padding-bottom: 6em;
77
+
72
78
  display: flex;
73
79
  flex-direction: column;
74
80
  align-items: center;
@@ -88,6 +94,10 @@
88
94
  font-size: 0.8em;
89
95
  }
90
96
 
97
+ .demo {
98
+ width: 100%;
99
+ }
100
+
91
101
  :not(:defined) {
92
102
  display: none;
93
103
  }
@@ -0,0 +1 @@
1
+ export declare const CounterView: import("../../index.js").View<[]>;
@@ -0,0 +1,34 @@
1
+ import { css, html } from "lit";
2
+ import { repeat } from "@e280/stz";
3
+ import { view } from "../../features/views/view.js";
4
+ import { cssReset } from "../../features/views/css-reset.js";
5
+ export const CounterView = view(use => () => {
6
+ use.name("counter");
7
+ use.styles(cssReset, styles);
8
+ const start = use.once(() => Date.now());
9
+ const seconds = use.signal(0);
10
+ use.mount(() => repeat(async () => {
11
+ const since = Date.now() - start;
12
+ seconds(Math.floor(since / 1000));
13
+ }));
14
+ const count = use.signal(0);
15
+ const increment = () => count(count() + 1);
16
+ return html `
17
+ <div>
18
+ <span>${seconds()}</span>
19
+ </div>
20
+ <div>
21
+ <span>${count()}</span>
22
+ <button @click="${increment}">+</button>
23
+ </div>
24
+ `;
25
+ });
26
+ const styles = css `
27
+ :host {
28
+ display: flex;
29
+ flex-direction: column;
30
+ justify-content: center;
31
+ text-align: center;
32
+ }
33
+ `;
34
+ //# sourceMappingURL=counter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"counter.js","sourceRoot":"","sources":["../../../s/demo/views/counter.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,GAAG,EAAE,IAAI,EAAC,MAAM,KAAK,CAAA;AAC7B,OAAO,EAAC,MAAM,EAAC,MAAM,WAAW,CAAA;AAEhC,OAAO,EAAC,IAAI,EAAC,MAAM,8BAA8B,CAAA;AACjD,OAAO,EAAC,QAAQ,EAAC,MAAM,mCAAmC,CAAA;AAE1D,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE;IAC3C,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;IACnB,GAAG,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAA;IAE5B,MAAM,KAAK,GAAG,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAA;IACxC,MAAM,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;IAE7B,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,IAAG,EAAE;QAChC,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK,CAAA;QAChC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,CAAA;IAClC,CAAC,CAAC,CAAC,CAAA;IAEH,MAAM,KAAK,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;IAC3B,MAAM,SAAS,GAAG,GAAG,EAAE,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAA;IAE1C,OAAO,IAAI,CAAA;;WAED,OAAO,EAAE;;;WAGT,KAAK,EAAE;qBACG,SAAS;;EAE5B,CAAA;AACF,CAAC,CAAC,CAAA;AAEF,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;CAOjB,CAAA"}
@@ -0,0 +1 @@
1
+ export declare const DemoView: import("../../index.js").View<[]>;
@@ -0,0 +1,21 @@
1
+ import { css, html } from "lit";
2
+ import { CounterView } from "./counter.js";
3
+ import { LoadersView } from "./loaders.js";
4
+ import { view } from "../../features/views/view.js";
5
+ import { cssReset } from "../../features/views/css-reset.js";
6
+ export const DemoView = view(use => () => {
7
+ use.name("demo");
8
+ use.styles(cssReset, styles);
9
+ return html `
10
+ ${CounterView()}
11
+ ${LoadersView()}
12
+ `;
13
+ });
14
+ const styles = css `
15
+ :host {
16
+ display: flex;
17
+ flex-direction: column;
18
+ gap: 1em;
19
+ }
20
+ `;
21
+ //# sourceMappingURL=demo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"demo.js","sourceRoot":"","sources":["../../../s/demo/views/demo.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,GAAG,EAAE,IAAI,EAAC,MAAM,KAAK,CAAA;AAC7B,OAAO,EAAC,WAAW,EAAC,MAAM,cAAc,CAAA;AACxC,OAAO,EAAC,WAAW,EAAC,MAAM,cAAc,CAAA;AACxC,OAAO,EAAC,IAAI,EAAC,MAAM,8BAA8B,CAAA;AACjD,OAAO,EAAC,QAAQ,EAAC,MAAM,mCAAmC,CAAA;AAE1D,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE;IACxC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IAChB,GAAG,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAA;IAE5B,OAAO,IAAI,CAAA;IACR,WAAW,EAAE;IACb,WAAW,EAAE;EACf,CAAA;AACF,CAAC,CAAC,CAAA;AAEF,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;CAMjB,CAAA"}
@@ -0,0 +1 @@
1
+ export declare const LoadersView: import("../../index.js").View<[]>;
@@ -0,0 +1,63 @@
1
+ import { css, html } from "lit";
2
+ import { Op } from "../../features/op/op.js";
3
+ import { view } from "../../features/views/view.js";
4
+ import { cssReset } from "../../features/views/css-reset.js";
5
+ import { anims, makeLoader } from "../../features/op/loaders/make-loader.js";
6
+ export const LoadersView = view(use => () => {
7
+ use.name("loaders");
8
+ use.styles(cssReset, styles);
9
+ const op = use.once(() => Op.loading());
10
+ const loaders = use.once(() => Object.entries(anims).map(([key, anim]) => ({
11
+ key,
12
+ loader: makeLoader(anim)
13
+ })));
14
+ return loaders.map(({ key, loader }) => html `
15
+ <div data-anim="${key}">
16
+ <span>${key}</span>
17
+ <span>${loader(op, () => null)}</span>
18
+ </div>
19
+ `);
20
+ });
21
+ const styles = css `
22
+ :host {
23
+ display: flex;
24
+ flex-direction: row;
25
+ justify-content: center;
26
+ flex-wrap: wrap;
27
+
28
+ gap: 0.2em;
29
+ padding: 1em;
30
+
31
+ width: 100%;
32
+ }
33
+
34
+ div {
35
+ font-family: monospace;
36
+
37
+ display: flex;
38
+ flex-direction: column;
39
+ justify-content: center;
40
+ align-items: center;
41
+ text-align: center;
42
+
43
+ gap: 0.4em;
44
+ padding: 0.2em 0.5em;
45
+ background: var(--pill);
46
+ border-radius: 0.5em;
47
+
48
+ span:nth-child(1) {
49
+ font-size: 0.6em;
50
+ }
51
+
52
+ span:nth-child(2) {
53
+ display: flex;
54
+ justify-content: center;
55
+ align-items: center;
56
+
57
+ font-size: 1.2em;
58
+ min-width: 7em;
59
+ min-height: 2.5em;
60
+ }
61
+ }
62
+ `;
63
+ //# sourceMappingURL=loaders.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loaders.js","sourceRoot":"","sources":["../../../s/demo/views/loaders.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,GAAG,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anims.js";
4
+ export type Loader = <V>(op: Op<V>, ready: (value: V) => Content) => Content;
5
+ export declare function makeLoader(loading?: () => Content, error?: (error: any) => Content): Loader;
@@ -0,0 +1,7 @@
1
+ import { braille } from "./parts/anims.js";
2
+ import { ErrorDisplay } from "./parts/error-display.js";
3
+ export * as anims from "./parts/anims.js";
4
+ export function makeLoader(loading = braille, error = (error) => ErrorDisplay(error)) {
5
+ return (op, ready) => op.select({ loading, ready, error });
6
+ }
7
+ //# sourceMappingURL=make-loader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"make-loader.js","sourceRoot":"","sources":["../../../../s/features/op/loaders/make-loader.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,OAAO,EAAC,MAAM,kBAAkB,CAAA;AAExC,OAAO,EAAC,YAAY,EAAC,MAAM,0BAA0B,CAAA;AAErD,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAA;AAIzC,MAAM,UAAU,UAAU,CACxB,UAAyB,OAAO,EAChC,QAAiC,CAAC,KAAU,EAAE,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC;IAGrE,OAAO,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE,CAAC,EAAE,CAAC,MAAM,CAAC,EAAC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAC,CAAC,CAAA;AACzD,CAAC"}
@@ -0,0 +1,34 @@
1
+ import { Content } from "../../../views/types.js";
2
+ export declare const spinner: () => Content;
3
+ export declare const braille: () => Content;
4
+ export declare const arrow: () => Content;
5
+ export declare const bar: () => Content;
6
+ export declare const bar2: () => Content;
7
+ export declare const bar3: () => Content;
8
+ export declare const bar4: () => Content;
9
+ export declare const block: () => Content;
10
+ export declare const block2: () => Content;
11
+ export declare const runner: () => Content;
12
+ export declare const pie: () => Content;
13
+ export declare const cylon: () => Content;
14
+ export declare const slider: () => Content;
15
+ export declare const brackets: () => Content;
16
+ export declare const brackets2: () => Content;
17
+ export declare const dots: () => Content;
18
+ export declare const dots2: () => Content;
19
+ export declare const wave: () => Content;
20
+ export declare const wavescrub: () => Content;
21
+ export declare const wavepulse: () => Content;
22
+ export declare const wavepulse2: () => Content;
23
+ export declare const bin: () => Content;
24
+ export declare const binary: () => Content;
25
+ export declare const binary2: () => Content;
26
+ export declare const pulseblue: () => Content;
27
+ export declare const kiss: () => Content;
28
+ export declare const clock: () => Content;
29
+ export declare const fistbump: () => Content;
30
+ export declare const earth: () => Content;
31
+ export declare const lock: () => Content;
32
+ export declare const bright: () => Content;
33
+ export declare const speaker: () => Content;
34
+ export declare const moon: () => Content;
@@ -0,0 +1,377 @@
1
+ import { makeAsciiAnim } from "./ascii-anim.js";
2
+ const fast = 20;
3
+ const mid = 10;
4
+ const slow = 4;
5
+ export const spinner = makeAsciiAnim(fast, [
6
+ "|",
7
+ "/",
8
+ "-",
9
+ "\\",
10
+ ]);
11
+ export const braille = makeAsciiAnim(fast, [
12
+ "⠈",
13
+ "⠐",
14
+ "⠠",
15
+ "⢀",
16
+ "⡀",
17
+ "⠄",
18
+ "⠂",
19
+ "⠁",
20
+ ]);
21
+ export const arrow = makeAsciiAnim(fast, [
22
+ "⬆️",
23
+ "↗️",
24
+ "➡️",
25
+ "↘️",
26
+ "⬇️",
27
+ "↙️",
28
+ "⬅️",
29
+ "↖️",
30
+ ]);
31
+ export const bar = makeAsciiAnim(fast, [
32
+ "▰▱▱▱▱",
33
+ "▰▱▱▱▱",
34
+ "▱▰▱▱▱",
35
+ "▱▱▰▱▱",
36
+ "▱▱▱▰▱",
37
+ "▱▱▱▱▰",
38
+ "▱▱▱▱▰",
39
+ "▱▱▱▰▱",
40
+ "▱▱▰▱▱",
41
+ "▱▰▱▱▱",
42
+ ]);
43
+ export const bar2 = makeAsciiAnim(fast, [
44
+ "▱▱▰▱▱",
45
+ "▱▱▱▰▱",
46
+ "▱▱▱▰▰",
47
+ "▱▱▱▰▰",
48
+ "▱▱▱▱▰",
49
+ "▱▱▱▱▰",
50
+ "▱▱▱▱▰",
51
+ "▱▱▱▰▰",
52
+ "▱▱▱▰▰",
53
+ "▱▱▱▰▱",
54
+ "▱▱▰▱▱",
55
+ "▱▰▱▱▱",
56
+ "▰▰▱▱▱",
57
+ "▰▰▱▱▱",
58
+ "▰▱▱▱▱",
59
+ "▰▱▱▱▱",
60
+ "▰▱▱▱▱",
61
+ "▰▰▱▱▱",
62
+ "▰▰▱▱▱",
63
+ "▱▰▱▱▱",
64
+ ]);
65
+ export const bar3 = makeAsciiAnim(fast, [
66
+ "▰▱▱▱▱",
67
+ "▰▱▱▱▱",
68
+ "▰▰▱▱▱",
69
+ "▰▰▰▱▱",
70
+ "▱▰▰▰▱",
71
+ "▱▱▰▰▰",
72
+ "▱▱▱▰▰",
73
+ "▱▱▱▱▰",
74
+ "▱▱▱▱▰",
75
+ "▱▱▱▰▰",
76
+ "▱▱▰▰▰",
77
+ "▱▰▰▰▱",
78
+ "▰▰▰▱▱",
79
+ "▰▰▱▱▱",
80
+ ]);
81
+ export const bar4 = makeAsciiAnim(fast, [
82
+ "▱▱▱▱▱",
83
+ "▱▱▱▱▱",
84
+ "▰▱▱▱▱",
85
+ "▰▰▱▱▱",
86
+ "▰▰▰▱▱",
87
+ "▰▰▰▰▱",
88
+ "▰▰▰▰▰",
89
+ "▰▰▰▰▰",
90
+ "▱▰▰▰▰",
91
+ "▱▱▰▰▰",
92
+ "▱▱▱▰▰",
93
+ "▱▱▱▱▰",
94
+ ]);
95
+ export const block = makeAsciiAnim(fast, [
96
+ "▁▁▁▁▁",
97
+ "▁▁▁▁▁",
98
+ "█▁▁▁▁",
99
+ "██▁▁▁",
100
+ "███▁▁",
101
+ "████▁",
102
+ "█████",
103
+ "█████",
104
+ "▁████",
105
+ "▁▁███",
106
+ "▁▁▁██",
107
+ "▁▁▁▁█",
108
+ ]);
109
+ export const block2 = makeAsciiAnim(fast, [
110
+ "█▁▁▁▁",
111
+ "█▁▁▁▁",
112
+ "██▁▁▁",
113
+ "███▁▁",
114
+ "████▁",
115
+ "█████",
116
+ "█████",
117
+ "▁████",
118
+ "▁▁███",
119
+ "▁▁▁██",
120
+ "▁▁▁▁█",
121
+ "▁▁▁▁█",
122
+ "▁▁▁██",
123
+ "▁▁███",
124
+ "▁████",
125
+ "█████",
126
+ "█████",
127
+ "████▁",
128
+ "███▁▁",
129
+ "██▁▁▁",
130
+ ]);
131
+ export const runner = makeAsciiAnim(slow, [
132
+ "🚶",
133
+ "🏃",
134
+ ]);
135
+ export const pie = makeAsciiAnim(mid, [
136
+ "◷",
137
+ "◶",
138
+ "◵",
139
+ "◴",
140
+ ]);
141
+ export const cylon = makeAsciiAnim(fast, [
142
+ "=----",
143
+ "-=---",
144
+ "--=--",
145
+ "---=-",
146
+ "----=",
147
+ "----=",
148
+ "---=-",
149
+ "--=--",
150
+ "-=---",
151
+ "=----",
152
+ ]);
153
+ export const slider = makeAsciiAnim(fast, [
154
+ "o----",
155
+ "-o---",
156
+ "--o--",
157
+ "---o-",
158
+ "----o",
159
+ "----o",
160
+ "---o-",
161
+ "--o--",
162
+ "-o---",
163
+ "o----",
164
+ ]);
165
+ export const brackets = makeAsciiAnim(mid, [
166
+ "[ ]",
167
+ "[ ]",
168
+ "[= ]",
169
+ "[== ]",
170
+ "[===]",
171
+ "[ ==]",
172
+ "[ =]",
173
+ ]);
174
+ export const brackets2 = makeAsciiAnim(mid, [
175
+ "[ ]",
176
+ "[ ]",
177
+ "[= ]",
178
+ "[== ]",
179
+ "[===]",
180
+ "[ ==]",
181
+ "[ =]",
182
+ "[ ]",
183
+ "[ ]",
184
+ "[ =]",
185
+ "[ ==]",
186
+ "[===]",
187
+ "[== ]",
188
+ "[= ]",
189
+ ]);
190
+ export const dots = makeAsciiAnim(mid, [
191
+ " ",
192
+ " ",
193
+ ". ",
194
+ ".. ",
195
+ "...",
196
+ " ..",
197
+ " .",
198
+ ]);
199
+ export const dots2 = makeAsciiAnim(fast, [
200
+ ". ",
201
+ ". ",
202
+ ".. ",
203
+ "...",
204
+ " ..",
205
+ " .",
206
+ " .",
207
+ " ..",
208
+ "...",
209
+ ".. ",
210
+ ]);
211
+ export const wave = makeAsciiAnim(fast, [
212
+ ".....",
213
+ ".....",
214
+ ":....",
215
+ "::...",
216
+ ":::..",
217
+ "::::.",
218
+ ":::::",
219
+ ":::::",
220
+ ".::::",
221
+ "..:::",
222
+ "...::",
223
+ "....:",
224
+ ]);
225
+ export const wavescrub = makeAsciiAnim(fast, [
226
+ ":....",
227
+ ":....",
228
+ "::...",
229
+ ".::..",
230
+ "..::.",
231
+ "...::",
232
+ "....:",
233
+ "....:",
234
+ "...::",
235
+ "..::.",
236
+ ".::..",
237
+ "::...",
238
+ ]);
239
+ export const wavepulse = makeAsciiAnim(fast, [
240
+ ".....",
241
+ ".....",
242
+ "..:..",
243
+ ".:::.",
244
+ ".:::.",
245
+ ":::::",
246
+ ":::::",
247
+ "::.::",
248
+ ":...:",
249
+ ]);
250
+ export const wavepulse2 = makeAsciiAnim(fast, [
251
+ ".....",
252
+ ".....",
253
+ "..:..",
254
+ ".:::.",
255
+ ".:::.",
256
+ ":::::",
257
+ ":::::",
258
+ "::.::",
259
+ ":...:",
260
+ ".....",
261
+ ".....",
262
+ ":...:",
263
+ "::.::",
264
+ ":::::",
265
+ ":::::",
266
+ ".:::.",
267
+ ".:::.",
268
+ "..:..",
269
+ ]);
270
+ export const bin = makeAsciiAnim(fast, [
271
+ "000",
272
+ "100",
273
+ "110",
274
+ "111",
275
+ "011",
276
+ "001",
277
+ ]);
278
+ export const binary = makeAsciiAnim(fast, [
279
+ "11111",
280
+ "01111",
281
+ "00111",
282
+ "10011",
283
+ "11001",
284
+ "01100",
285
+ "00110",
286
+ "10011",
287
+ "11001",
288
+ "11100",
289
+ "11110",
290
+ ]);
291
+ export const binary2 = makeAsciiAnim(fast, [
292
+ "11111",
293
+ "01111",
294
+ "10111",
295
+ "11011",
296
+ "11101",
297
+ "11110",
298
+ "11111",
299
+ "11110",
300
+ "11101",
301
+ "11011",
302
+ "10111",
303
+ "01111",
304
+ ]);
305
+ export const pulseblue = makeAsciiAnim(slow, [
306
+ "🔹",
307
+ "🔵",
308
+ ]);
309
+ export const kiss = makeAsciiAnim(mid, [
310
+ "🙂",
311
+ "🙂",
312
+ "😗",
313
+ "😙",
314
+ "😘",
315
+ "😘",
316
+ "😙",
317
+ ]);
318
+ export const clock = makeAsciiAnim(fast, [
319
+ "🕐",
320
+ "🕑",
321
+ "🕒",
322
+ "🕓",
323
+ "🕔",
324
+ "🕕",
325
+ "🕖",
326
+ "🕗",
327
+ "🕘",
328
+ "🕙",
329
+ "🕚",
330
+ "🕛",
331
+ ]);
332
+ export const fistbump = makeAsciiAnim(fast, [
333
+ "🤜 🤛",
334
+ "🤜 🤛",
335
+ "🤜 🤛",
336
+ " 🤜 🤛 ",
337
+ " 🤜🤛 ",
338
+ " 🤜🤛 ",
339
+ " 🤜💥🤛 ",
340
+ "🤜 💥 🤛",
341
+ "🤜 ✨ 🤛",
342
+ "🤜 ✨ 🤛",
343
+ ]);
344
+ export const earth = makeAsciiAnim(slow, [
345
+ "🌎",
346
+ "🌏",
347
+ "🌍",
348
+ ]);
349
+ export const lock = makeAsciiAnim(slow, [
350
+ "🔓",
351
+ "🔒",
352
+ ]);
353
+ export const bright = makeAsciiAnim(slow, [
354
+ "🔅",
355
+ "🔆",
356
+ ]);
357
+ export const speaker = makeAsciiAnim(slow, [
358
+ "🔈",
359
+ "🔈",
360
+ "🔉",
361
+ "🔊",
362
+ "🔊",
363
+ "🔉",
364
+ ]);
365
+ export const moon = makeAsciiAnim(mid, [
366
+ "🌑",
367
+ "🌑",
368
+ "🌑",
369
+ "🌘",
370
+ "🌗",
371
+ "🌖",
372
+ "🌕",
373
+ "🌔",
374
+ "🌓",
375
+ "🌒",
376
+ ]);
377
+ //# sourceMappingURL=anims.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"anims.js","sourceRoot":"","sources":["../../../../../s/features/op/loaders/parts/anims.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAi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hz: number, frames: string[]): () => Content;
3
+ export declare const AsciiAnim: import("../../../views/types.js").View<[{
4
+ hz: number;
5
+ frames: string[];
6
+ }]>;
@@ -0,0 +1,26 @@
1
+ import { css } from "lit";
2
+ import { nap, repeat } from "@e280/stz";
3
+ import { view } from "../../../views/view.js";
4
+ import { cssReset } from "../../../views/css-reset.js";
5
+ export function makeAsciiAnim(hz, frames) {
6
+ return () => AsciiAnim({ hz, frames });
7
+ }
8
+ export const AsciiAnim = view(use => ({ hz, frames }) => {
9
+ use.name("loading");
10
+ use.styles(cssReset, style);
11
+ const frame = use.signal(0);
12
+ use.mount(() => repeat(async () => {
13
+ await nap(1000 / hz);
14
+ const next = frame() + 1;
15
+ frame(next >= frames.length ? 0 : next);
16
+ }));
17
+ return frames.at(frame());
18
+ });
19
+ const style = css `
20
+ :host {
21
+ font-family: monospace;
22
+ white-space: pre;
23
+ user-select: none;
24
+ }
25
+ `;
26
+ //# sourceMappingURL=ascii-anim.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ascii-anim.js","sourceRoot":"","sources":["../../../../../s/features/op/loaders/parts/ascii-anim.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAA;AACvB,OAAO,EAAC,GAAG,EAAE,MAAM,EAAC,MAAM,WAAW,CAAA;AAErC,OAAO,EAAC,IAAI,EAAC,MAAM,wBAAwB,CAAA;AAE3C,OAAO,EAAC,QAAQ,EAAC,MAAM,6BAA6B,CAAA;AAEpD,MAAM,UAAU,aAAa,CAAC,EAAU,EAAE,MAAgB;IACzD,OAAO,GAAG,EAAE,CAAC,SAAS,CAAC,EAAC,EAAE,EAAE,MAAM,EAAC,CAAC,CAAA;AACrC,CAAC;AAED,MAAM,CAAC,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,EAAC,EAAE,EAAE,MAAM,EAG/C,EAAE,EAAE;IAEL,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;IACnB,GAAG,CAAC,MAAM,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAA;IAC3B,MAAM,KAAK,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;IAE3B,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,IAAG,EAAE;QAChC,MAAM,GAAG,CAAC,IAAI,GAAG,EAAE,CAAC,CAAA;QACpB,MAAM,IAAI,GAAG,KAAK,EAAE,GAAG,CAAC,CAAA;QACxB,KAAK,CAAC,IAAI,IAAI,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAA;IACxC,CAAC,CAAC,CAAC,CAAA;IAEH,OAAO,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,CAAA;AAC1B,CAAC,CAAC,CAAA;AAEF,MAAM,KAAK,GAAG,GAAG,CAAA;;;;;;CAMhB,CAAA"}
@@ -0,0 +1 @@
1
+ export declare const ErrorDisplay: import("../../../views/types.js").View<[error: any]>;