website-xp-phone 2.2.12 → 2.4.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/.github/workflows/ci.yml +2 -2
- package/README.md +17 -3
- package/build/blogDirsPlugin.ts +100 -0
- package/build/env.ts +4 -1
- package/build/routeSkeletonsPlugin.ts +44 -2
- package/package.json +14 -10
- package/public/blog/archive/eighth-post-lost-in-the-sauce.json +36 -0
- package/public/blog/archive/noise/eleventh-post-discussion-java-gist.md +5 -0
- package/public/blog/archive/noise/fifteenth-post-very-rare-windows-funny.md +8 -0
- package/public/blog/archive/noise/fourth-post-meta-blog.md +3 -0
- package/public/blog/archive/noise/sixteenth-post-meta-fantasy-blog.md +4 -0
- package/public/blog/archive/noise/tenth-post-meta-funny-redacted-and-timetravelled.md +3 -0
- package/public/blog/archive/noise/twelfth-post-mixing-phase-technique-audio-music.md +48 -0
- package/public/blog/archive/noise/welcome-back-ramble-meta.md +6 -0
- package/public/blog/archive/noise/welcome-to-my-blog-meta-blog-welcome-to-my-website.md +7 -0
- package/public/blog/archive/seventh-post-lie-theory-na2000.json +22 -0
- package/public/blog/archive/sophus-lie.json +36 -0
- package/public/blog/hlwm_and_herbstutil.md +11 -0
- package/public/blog/random/hlwm.md +8 -0
- package/public/blog/writing/hot-action-under-a-cold-moon.json +9 -0
- package/public/checksums.txt +91 -66
- package/public/documents/drift-report.json +42 -28
- package/render.yaml +11 -1
- package/scripts/mutable-assets.mjs +13 -22
- package/scripts/refresh-content.mjs +53 -32
- package/scripts/refresh-soundcloud.mjs +221 -136
- package/scripts/write-dist-checksums.mjs +48 -4
- package/src/content/blog.json +16 -363
- package/src/content/blogDirs.ts +196 -0
- package/src/content/configs.json +1 -1
- package/src/content/contacts.json +2 -2
- package/src/content/includes/make-recipes.md +18 -0
- package/src/content/index.ts +156 -57
- package/src/content/music-ext.json +1 -1
- package/src/content/projects/doftiles.json +88 -4
- package/src/content/projects/herbctl.json +58 -0
- package/src/content/projects/herbstutil.json +50 -20
- package/src/content/projects/on-deploy.json +57 -0
- package/src/content/projects/polyframes.json +83 -0
- package/src/content/schema.ts +7 -4
- package/src/content/sections.json +11 -10
- package/src/content/soundcloud.json +95 -47
- package/src/lib/clippy.ts +29 -8
- package/src/lib/embeds.ts +43 -24
- package/src/lib/history.ts +152 -0
- package/src/lib/markdown.tsx +19 -22
- package/src/lib/rehypeYoutubeEmbed.ts +65 -0
- package/src/lib/sanitizeSchema.ts +32 -0
- package/src/lib/scrollTo.ts +45 -0
- package/src/lib/signals.tsx +271 -0
- package/src/main.tsx +20 -4
- package/src/pages/BlogDirPage.tsx +36 -0
- package/src/pages/BlogPostPage.tsx +76 -3
- package/src/pages/ProjectPage.tsx +9 -3
- package/src/pages/WowPage.tsx +8 -3
- package/src/pages/index.ts +2 -0
- package/src/shell/App.tsx +14 -8
- package/src/shell/Clippy.tsx +13 -3
- package/src/shell/MenuBar.tsx +7 -4
- package/src/shell/resolveRoute.ts +41 -2
- package/src/shell/routerSignals.ts +34 -0
- package/src/styles/extras.css +27 -0
- package/src/styles/layout.css +2 -2
- package/src/styles/menu.css +1 -1
- package/src/styles/window.css +19 -9
- package/src/themes/pageSlide/index.ts +120 -42
- package/src/themes/pageSlide/pageSlide.css +20 -9
- package/src/virtual.d.ts +14 -0
- package/src/window/MaximizedWindow.tsx +97 -64
- package/src/window/OkButton.tsx +42 -25
- package/src/window/PageWindows.tsx +7 -0
- package/src/window/TitleBar.tsx +3 -1
- package/src/window/Window.tsx +132 -87
- package/src/window/closeSounds.ts +27 -0
- package/src/window/model.ts +11 -0
- package/src/window/state.tsx +290 -50
- package/src/window/themes.ts +23 -2
- package/test/content.test.js +15 -10
- package/test/deploy-pipeline.test.js +73 -0
- package/test/embeds.test.js +89 -0
- package/test/markdown-tables.test.js +96 -0
- package/test/mutable-assets.test.js +16 -4
- package/test/route-skeletons.test.js +38 -0
- package/test/soundcloud-refresh.test.js +68 -0
- package/test/youtubeEmbed.test.js +157 -0
- package/tsconfig.node.tsbuildinfo +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/vite.config.ts +7 -1
- package/.opencode/cache/index.akinevz.html +0 -54
- package/public/blog/4th.md +0 -28
- package/public/blog/wsl.1.md +0 -40
- package/src/window/hidden.ts +0 -22
- /package/public/blog/{ → archive/noise/}/321/200/321/203/320/275/320/270/321/201/321/207-/320/263/320/273/320/276/321/201/321/201/320/260/321/200/320/270/320/271.md" +0 -0
- /package/src/content/{characters.json → includes/characters.json} +0 -0
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
{
|
|
2
|
+
"slug": "polyframes",
|
|
3
|
+
"title": "polyframes",
|
|
4
|
+
"description": "Polybar window-list renderer for herbstluftwm: a bunli/Bun CLI compiled to a standalone native binary - rofi menus, typed one-shot window rules, and the WM read as typed JSON via herbstutil; the float-register imperatives come from herbctl.",
|
|
5
|
+
"github": "https://github.com/akinevz2/polyframes",
|
|
6
|
+
"content": {
|
|
7
|
+
"heading": "polyframes - the polybar window-list renderer, as a native binary",
|
|
8
|
+
"content": [
|
|
9
|
+
"polyframes renders herbstluftwm's window state as the polybar center module: one label per (frame, window-class) group, decorated by state (focused gold underline, floating, minimized dimmed), with click/scroll actions that re-exec the binary itself. Built with Bun and bunli, compiled to a standalone executable - so it runs wherever the bar runs, no node, no nvm PATH, no shim.",
|
|
10
|
+
"[https://github.com/akinevz2/polyframes](https://github.com/akinevz2/polyframes)",
|
|
11
|
+
{
|
|
12
|
+
"heading": "The bar daemon",
|
|
13
|
+
"theme": "open",
|
|
14
|
+
"content": [
|
|
15
|
+
"A bare invocation is polybar's contract: print one bar line, then keep it fresh - a `herbstclient --idle` hook listener for instant focus/tag/title updates, plus a 1s layout poll that hashes `herbstclient dump` (frame splits and removals emit no hook in hlwm 0.9.5).",
|
|
16
|
+
"`polyframes bar` prints a single line and exits - the same pure renderer, scriptable."
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"heading": "Grouping model",
|
|
21
|
+
"theme": "open",
|
|
22
|
+
"content": [
|
|
23
|
+
"Clients on the focused tag arrive in WM order, enriched per window: class, title, minimized, floating, and its parent frame's flat index (`-1` when the root is unsplit).",
|
|
24
|
+
"Group keys: `minflt|wid` and `unframed|wid` are solo labels; `frame|frame|class` groups same-class windows sharing a frame. A group's representative is the frame's selected client - but only when it belongs to the group's class, so a mixed-class frame never leaks another group's title.",
|
|
25
|
+
"Render order keeps WM order, pushes minimized labels last, truncates to `char_limit` with an ellipsis, folds forbidden classes (the bar itself), and emits a `+N` overflow marker past `max_windows`."
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"heading": "The keybind registers live in doftiles",
|
|
30
|
+
"theme": "open",
|
|
31
|
+
"content": [
|
|
32
|
+
"The float registers bound to the binary (mod-f / mod-x / mod-ctrl-f: state toggles, layer focus, yank/slurp, deco-flush fill) are herbstluftwm configuration - they are documented in the [doftiles project](/projects/doftiles), which owns the WM config."
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"heading": "The helper suite, migrated in",
|
|
37
|
+
"theme": "open",
|
|
38
|
+
"content": [
|
|
39
|
+
"The dotfiles' herbst helpers moved in as subcommands, so one binary manages them all:",
|
|
40
|
+
"`tags`, `hidden`, `windows`, `launch` - the rofi menus (script-mode protocol, NUL-separated rows, per-row icons and states)",
|
|
41
|
+
"`switcher-menu`, `window-menu` - detached menu targets the click actions spawn",
|
|
42
|
+
"`tile` - closest-empty-frame navigation or split (the frame-tree surgery)",
|
|
43
|
+
"`center` - decoration-aware centering (`--wid` targets a specific window's own frame)",
|
|
44
|
+
"`resize` - delta nudges, frame/root deco-flush fills, explicit content rects",
|
|
45
|
+
"`fit` - constraint pass: shrink oversized, nudge off-screen (monitor or frame target)",
|
|
46
|
+
"`spawn` - one-shot `herbstclient rule once` spawns with typed flags (`--class/--float/--center/--tag`)"
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"heading": "herbstutil + herbctl inside",
|
|
51
|
+
"theme": "open",
|
|
52
|
+
"content": [
|
|
53
|
+
"Two sibling libraries ride along at build time:",
|
|
54
|
+
"herbstutil (npm) - parseAttr for every WM read: typed JSON out of hlwm's attr output, one round trip instead of a per-client attribute walk.",
|
|
55
|
+
"herbctl - the imperatives the scroll/click actions run: float+center, minimize-keep-frame, empty-frame removal - the keybind state machines as importable functions.",
|
|
56
|
+
"Both resolve as sibling submodules in the doftiles depends/ layout and from the npm/GitHub registries everywhere else."
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"heading": "Links",
|
|
61
|
+
"theme": "open",
|
|
62
|
+
"content": [
|
|
63
|
+
{
|
|
64
|
+
"heading": "GitHub repository",
|
|
65
|
+
"link": "https://github.com/akinevz2/polyframes"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"heading": "doftiles (the dotfiles it ships from)",
|
|
69
|
+
"link": "https://github.com/akinevz2/doftiles"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"heading": "herbctl (the keybind imperatives)",
|
|
73
|
+
"link": "https://github.com/akinevz2/herbctl"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"heading": "herbstutil (the JSON bridge)",
|
|
77
|
+
"link": "https://github.com/akinevz2/herbstutil"
|
|
78
|
+
}
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
}
|
package/src/content/schema.ts
CHANGED
|
@@ -11,10 +11,13 @@ export type Embed = {
|
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
* A content-file include directive: `{"include": "<
|
|
15
|
-
* load time (src/content/index.ts), into the referenced
|
|
16
|
-
*
|
|
17
|
-
* the "include" mechanism for reusing a section across pages.
|
|
14
|
+
* A content-file include directive: `{"include": "<file>"}` expands, at
|
|
15
|
+
* load time (src/content/index.ts), into the referenced Section under
|
|
16
|
+
* src/content/includes/ as a nested child — JSON cannot import, so this
|
|
17
|
+
* is the "include" mechanism for reusing a section across pages.
|
|
18
|
+
* <file> is the FULL file name: a `.json` holding a Section, or an
|
|
19
|
+
* author-written `.md` file wrapped as one. Anything dropped into that
|
|
20
|
+
* directory is includable — no registration needed.
|
|
18
21
|
*/
|
|
19
22
|
export type IncludeRef = { include: string };
|
|
20
23
|
|
|
@@ -106,16 +106,15 @@
|
|
|
106
106
|
"content": [
|
|
107
107
|
"**public live projects**:",
|
|
108
108
|
{
|
|
109
|
-
"
|
|
110
|
-
"
|
|
109
|
+
"link": "https://github.com/akinevz2/",
|
|
110
|
+
"heading": "my github",
|
|
111
|
+
"content": [
|
|
112
|
+
"[projects here](https://github.com/akinevz2?tab=repositories)"
|
|
113
|
+
]
|
|
111
114
|
},
|
|
112
115
|
{
|
|
113
|
-
"
|
|
114
|
-
"
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
"heading": "rarebert, akinevz2/rarebert",
|
|
118
|
-
"link": "https://github.com/akinevz2/rarebert/commit/936a6ff"
|
|
116
|
+
"link": "/projects",
|
|
117
|
+
"heading": "my projects page on this website"
|
|
119
118
|
}
|
|
120
119
|
]
|
|
121
120
|
},
|
|
@@ -133,11 +132,13 @@
|
|
|
133
132
|
"arts and expressions of free will",
|
|
134
133
|
{
|
|
135
134
|
"heading": "music",
|
|
136
|
-
"link": "https://soundcloud.com/akinevz"
|
|
135
|
+
"link": "https://soundcloud.com/akinevz",
|
|
136
|
+
"content": ["where i post really heavy music"]
|
|
137
137
|
},
|
|
138
138
|
{
|
|
139
139
|
"heading": "another music",
|
|
140
|
-
"link": "https://soundcloud.com/akinevz2"
|
|
140
|
+
"link": "https://soundcloud.com/akinevz2",
|
|
141
|
+
"content": ["where i post music for the sake of memes"]
|
|
141
142
|
},
|
|
142
143
|
"and endlessly, deeply",
|
|
143
144
|
{
|
|
@@ -1,9 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"source": "https://soundcloud.com/akinevz",
|
|
3
|
-
"generatedAt": "2026-10-
|
|
4
|
-
"asOfUploadingTrackCount":
|
|
5
|
-
"trackCount":
|
|
3
|
+
"generatedAt": "2026-10-28T04:29:58.385Z",
|
|
4
|
+
"asOfUploadingTrackCount": 95,
|
|
5
|
+
"trackCount": 95,
|
|
6
6
|
"tracks": [
|
|
7
|
+
{
|
|
8
|
+
"owner": "akinevz",
|
|
9
|
+
"path": "/akinevz/on-a-saturday",
|
|
10
|
+
"title": "Together",
|
|
11
|
+
"url": "https://soundcloud.com/akinevz/on-a-saturday"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"owner": "akinevz",
|
|
15
|
+
"path": "/akinevz/amorphous",
|
|
16
|
+
"title": "Rendexvous",
|
|
17
|
+
"url": "https://soundcloud.com/akinevz/amorphous"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"owner": "akinevz",
|
|
21
|
+
"path": "/akinevz/roam",
|
|
22
|
+
"title": "Roam",
|
|
23
|
+
"url": "https://soundcloud.com/akinevz/roam"
|
|
24
|
+
},
|
|
7
25
|
{
|
|
8
26
|
"owner": "akinevz",
|
|
9
27
|
"path": "/akinevz/outer",
|
|
@@ -66,9 +84,9 @@
|
|
|
66
84
|
},
|
|
67
85
|
{
|
|
68
86
|
"owner": "akinevz",
|
|
69
|
-
"path": "/akinevz/
|
|
70
|
-
"title": "
|
|
71
|
-
"url": "https://soundcloud.com/akinevz/
|
|
87
|
+
"path": "/akinevz/fragments",
|
|
88
|
+
"title": "Marrowful Fragments",
|
|
89
|
+
"url": "https://soundcloud.com/akinevz/fragments"
|
|
72
90
|
},
|
|
73
91
|
{
|
|
74
92
|
"owner": "akinevz",
|
|
@@ -84,15 +102,15 @@
|
|
|
84
102
|
},
|
|
85
103
|
{
|
|
86
104
|
"owner": "akinevz",
|
|
87
|
-
"path": "/akinevz/
|
|
88
|
-
"title": "
|
|
89
|
-
"url": "https://soundcloud.com/akinevz/
|
|
105
|
+
"path": "/akinevz/atrophy",
|
|
106
|
+
"title": "Atrophy Cultism",
|
|
107
|
+
"url": "https://soundcloud.com/akinevz/atrophy"
|
|
90
108
|
},
|
|
91
109
|
{
|
|
92
110
|
"owner": "akinevz",
|
|
93
|
-
"path": "/akinevz/
|
|
94
|
-
"title": "
|
|
95
|
-
"url": "https://soundcloud.com/akinevz/
|
|
111
|
+
"path": "/akinevz/corporate",
|
|
112
|
+
"title": "ASCII Art",
|
|
113
|
+
"url": "https://soundcloud.com/akinevz/corporate"
|
|
96
114
|
},
|
|
97
115
|
{
|
|
98
116
|
"owner": "akinevz",
|
|
@@ -109,7 +127,7 @@
|
|
|
109
127
|
{
|
|
110
128
|
"owner": "akinevz",
|
|
111
129
|
"path": "/akinevz/calculus",
|
|
112
|
-
"title": "
|
|
130
|
+
"title": "Calculated Reception",
|
|
113
131
|
"url": "https://soundcloud.com/akinevz/calculus"
|
|
114
132
|
},
|
|
115
133
|
{
|
|
@@ -126,9 +144,9 @@
|
|
|
126
144
|
},
|
|
127
145
|
{
|
|
128
146
|
"owner": "akinevz",
|
|
129
|
-
"path": "/akinevz/frozen-
|
|
147
|
+
"path": "/akinevz/frozen-scream",
|
|
130
148
|
"title": "Freezing Point",
|
|
131
|
-
"url": "https://soundcloud.com/akinevz/frozen-
|
|
149
|
+
"url": "https://soundcloud.com/akinevz/frozen-scream"
|
|
132
150
|
},
|
|
133
151
|
{
|
|
134
152
|
"owner": "akinevz",
|
|
@@ -163,7 +181,7 @@
|
|
|
163
181
|
{
|
|
164
182
|
"owner": "akinevz",
|
|
165
183
|
"path": "/akinevz/letdown",
|
|
166
|
-
"title": "
|
|
184
|
+
"title": "Letdown",
|
|
167
185
|
"url": "https://soundcloud.com/akinevz/letdown"
|
|
168
186
|
},
|
|
169
187
|
{
|
|
@@ -181,7 +199,7 @@
|
|
|
181
199
|
{
|
|
182
200
|
"owner": "akinevz",
|
|
183
201
|
"path": "/akinevz/crow",
|
|
184
|
-
"title": "Crow
|
|
202
|
+
"title": "Crow",
|
|
185
203
|
"url": "https://soundcloud.com/akinevz/crow"
|
|
186
204
|
},
|
|
187
205
|
{
|
|
@@ -229,7 +247,7 @@
|
|
|
229
247
|
{
|
|
230
248
|
"owner": "akinevz",
|
|
231
249
|
"path": "/akinevz/pein",
|
|
232
|
-
"title": "
|
|
250
|
+
"title": "Er",
|
|
233
251
|
"url": "https://soundcloud.com/akinevz/pein"
|
|
234
252
|
},
|
|
235
253
|
{
|
|
@@ -268,12 +286,6 @@
|
|
|
268
286
|
"title": "Open Door",
|
|
269
287
|
"url": "https://soundcloud.com/akinevz/open-door"
|
|
270
288
|
},
|
|
271
|
-
{
|
|
272
|
-
"owner": "akinevz",
|
|
273
|
-
"path": "/akinevz/wat",
|
|
274
|
-
"title": "Er",
|
|
275
|
-
"url": "https://soundcloud.com/akinevz/wat"
|
|
276
|
-
},
|
|
277
289
|
{
|
|
278
290
|
"owner": "akinevz",
|
|
279
291
|
"path": "/akinevz/warrer-style",
|
|
@@ -352,6 +364,18 @@
|
|
|
352
364
|
"title": "They Were Laid to Rest Cont.",
|
|
353
365
|
"url": "https://soundcloud.com/akinevz/u-dont-know-gabber"
|
|
354
366
|
},
|
|
367
|
+
{
|
|
368
|
+
"owner": "akinevz2",
|
|
369
|
+
"path": "/akinevz2/dresscode",
|
|
370
|
+
"title": "Momento Mori",
|
|
371
|
+
"url": "https://soundcloud.com/akinevz2/dresscode"
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
"owner": "akinevz2",
|
|
375
|
+
"path": "/akinevz2/diagonal",
|
|
376
|
+
"title": "Slanted",
|
|
377
|
+
"url": "https://soundcloud.com/akinevz2/diagonal"
|
|
378
|
+
},
|
|
355
379
|
{
|
|
356
380
|
"owner": "akinevz2",
|
|
357
381
|
"path": "/akinevz2/wat",
|
|
@@ -556,8 +580,26 @@
|
|
|
556
580
|
"owner": "akinevz",
|
|
557
581
|
"source": "https://soundcloud.com/akinevz",
|
|
558
582
|
"profileImageUrl": null,
|
|
559
|
-
"trackCount":
|
|
583
|
+
"trackCount": 60,
|
|
560
584
|
"tracks": [
|
|
585
|
+
{
|
|
586
|
+
"owner": "akinevz",
|
|
587
|
+
"path": "/akinevz/on-a-saturday",
|
|
588
|
+
"title": "Together",
|
|
589
|
+
"url": "https://soundcloud.com/akinevz/on-a-saturday"
|
|
590
|
+
},
|
|
591
|
+
{
|
|
592
|
+
"owner": "akinevz",
|
|
593
|
+
"path": "/akinevz/amorphous",
|
|
594
|
+
"title": "Rendexvous",
|
|
595
|
+
"url": "https://soundcloud.com/akinevz/amorphous"
|
|
596
|
+
},
|
|
597
|
+
{
|
|
598
|
+
"owner": "akinevz",
|
|
599
|
+
"path": "/akinevz/roam",
|
|
600
|
+
"title": "Roam",
|
|
601
|
+
"url": "https://soundcloud.com/akinevz/roam"
|
|
602
|
+
},
|
|
561
603
|
{
|
|
562
604
|
"owner": "akinevz",
|
|
563
605
|
"path": "/akinevz/outer",
|
|
@@ -620,9 +662,9 @@
|
|
|
620
662
|
},
|
|
621
663
|
{
|
|
622
664
|
"owner": "akinevz",
|
|
623
|
-
"path": "/akinevz/
|
|
624
|
-
"title": "
|
|
625
|
-
"url": "https://soundcloud.com/akinevz/
|
|
665
|
+
"path": "/akinevz/fragments",
|
|
666
|
+
"title": "Marrowful Fragments",
|
|
667
|
+
"url": "https://soundcloud.com/akinevz/fragments"
|
|
626
668
|
},
|
|
627
669
|
{
|
|
628
670
|
"owner": "akinevz",
|
|
@@ -638,15 +680,15 @@
|
|
|
638
680
|
},
|
|
639
681
|
{
|
|
640
682
|
"owner": "akinevz",
|
|
641
|
-
"path": "/akinevz/
|
|
642
|
-
"title": "
|
|
643
|
-
"url": "https://soundcloud.com/akinevz/
|
|
683
|
+
"path": "/akinevz/atrophy",
|
|
684
|
+
"title": "Atrophy Cultism",
|
|
685
|
+
"url": "https://soundcloud.com/akinevz/atrophy"
|
|
644
686
|
},
|
|
645
687
|
{
|
|
646
688
|
"owner": "akinevz",
|
|
647
|
-
"path": "/akinevz/
|
|
648
|
-
"title": "
|
|
649
|
-
"url": "https://soundcloud.com/akinevz/
|
|
689
|
+
"path": "/akinevz/corporate",
|
|
690
|
+
"title": "ASCII Art",
|
|
691
|
+
"url": "https://soundcloud.com/akinevz/corporate"
|
|
650
692
|
},
|
|
651
693
|
{
|
|
652
694
|
"owner": "akinevz",
|
|
@@ -663,7 +705,7 @@
|
|
|
663
705
|
{
|
|
664
706
|
"owner": "akinevz",
|
|
665
707
|
"path": "/akinevz/calculus",
|
|
666
|
-
"title": "
|
|
708
|
+
"title": "Calculated Reception",
|
|
667
709
|
"url": "https://soundcloud.com/akinevz/calculus"
|
|
668
710
|
},
|
|
669
711
|
{
|
|
@@ -680,9 +722,9 @@
|
|
|
680
722
|
},
|
|
681
723
|
{
|
|
682
724
|
"owner": "akinevz",
|
|
683
|
-
"path": "/akinevz/frozen-
|
|
725
|
+
"path": "/akinevz/frozen-scream",
|
|
684
726
|
"title": "Freezing Point",
|
|
685
|
-
"url": "https://soundcloud.com/akinevz/frozen-
|
|
727
|
+
"url": "https://soundcloud.com/akinevz/frozen-scream"
|
|
686
728
|
},
|
|
687
729
|
{
|
|
688
730
|
"owner": "akinevz",
|
|
@@ -717,7 +759,7 @@
|
|
|
717
759
|
{
|
|
718
760
|
"owner": "akinevz",
|
|
719
761
|
"path": "/akinevz/letdown",
|
|
720
|
-
"title": "
|
|
762
|
+
"title": "Letdown",
|
|
721
763
|
"url": "https://soundcloud.com/akinevz/letdown"
|
|
722
764
|
},
|
|
723
765
|
{
|
|
@@ -735,7 +777,7 @@
|
|
|
735
777
|
{
|
|
736
778
|
"owner": "akinevz",
|
|
737
779
|
"path": "/akinevz/crow",
|
|
738
|
-
"title": "Crow
|
|
780
|
+
"title": "Crow",
|
|
739
781
|
"url": "https://soundcloud.com/akinevz/crow"
|
|
740
782
|
},
|
|
741
783
|
{
|
|
@@ -783,7 +825,7 @@
|
|
|
783
825
|
{
|
|
784
826
|
"owner": "akinevz",
|
|
785
827
|
"path": "/akinevz/pein",
|
|
786
|
-
"title": "
|
|
828
|
+
"title": "Er",
|
|
787
829
|
"url": "https://soundcloud.com/akinevz/pein"
|
|
788
830
|
},
|
|
789
831
|
{
|
|
@@ -822,12 +864,6 @@
|
|
|
822
864
|
"title": "Open Door",
|
|
823
865
|
"url": "https://soundcloud.com/akinevz/open-door"
|
|
824
866
|
},
|
|
825
|
-
{
|
|
826
|
-
"owner": "akinevz",
|
|
827
|
-
"path": "/akinevz/wat",
|
|
828
|
-
"title": "Er",
|
|
829
|
-
"url": "https://soundcloud.com/akinevz/wat"
|
|
830
|
-
},
|
|
831
867
|
{
|
|
832
868
|
"owner": "akinevz",
|
|
833
869
|
"path": "/akinevz/warrer-style",
|
|
@@ -912,8 +948,20 @@
|
|
|
912
948
|
"owner": "akinevz2",
|
|
913
949
|
"source": "https://soundcloud.com/akinevz2",
|
|
914
950
|
"profileImageUrl": null,
|
|
915
|
-
"trackCount":
|
|
951
|
+
"trackCount": 35,
|
|
916
952
|
"tracks": [
|
|
953
|
+
{
|
|
954
|
+
"owner": "akinevz2",
|
|
955
|
+
"path": "/akinevz2/dresscode",
|
|
956
|
+
"title": "Momento Mori",
|
|
957
|
+
"url": "https://soundcloud.com/akinevz2/dresscode"
|
|
958
|
+
},
|
|
959
|
+
{
|
|
960
|
+
"owner": "akinevz2",
|
|
961
|
+
"path": "/akinevz2/diagonal",
|
|
962
|
+
"title": "Slanted",
|
|
963
|
+
"url": "https://soundcloud.com/akinevz2/diagonal"
|
|
964
|
+
},
|
|
917
965
|
{
|
|
918
966
|
"owner": "akinevz2",
|
|
919
967
|
"path": "/akinevz2/wat",
|
package/src/lib/clippy.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { playLayeredAudio } from "./audio";
|
|
2
|
+
import { onSignal } from "./signals";
|
|
2
3
|
import {
|
|
3
4
|
advanceWord,
|
|
4
5
|
blipRollMs,
|
|
@@ -23,6 +24,9 @@ export type ClippyState = {
|
|
|
23
24
|
saysNo: boolean;
|
|
24
25
|
/** The unhide list is shown instead of a bubble (masks it completely). */
|
|
25
26
|
listOpen: boolean;
|
|
27
|
+
/** The bubble carries the post-park offer ("oh where did that go?").
|
|
28
|
+
* Independent of saysNo: neither flag outlives its bubble. */
|
|
29
|
+
offering: boolean;
|
|
26
30
|
};
|
|
27
31
|
|
|
28
32
|
const storedVisible = () =>
|
|
@@ -34,6 +38,7 @@ let state: ClippyState = {
|
|
|
34
38
|
bubble: false,
|
|
35
39
|
saysNo: false,
|
|
36
40
|
listOpen: false,
|
|
41
|
+
offering: false,
|
|
37
42
|
};
|
|
38
43
|
const listeners = new Set<() => void>();
|
|
39
44
|
const set = (patch: Partial<ClippyState>) => {
|
|
@@ -126,12 +131,26 @@ const hint = () => {
|
|
|
126
131
|
// The hint is the priority UI: dismiss the unhide list in the same
|
|
127
132
|
// atomically-committed state update so it can never mask the bubble
|
|
128
133
|
// (the stray "haha it said no"/hiding interplay of the flag mirrors).
|
|
129
|
-
set({ bubble: true, saysNo: false, listOpen: false });
|
|
134
|
+
set({ bubble: true, saysNo: false, offering: false, listOpen: false });
|
|
130
135
|
bubbleTimer = setTimeout(
|
|
131
136
|
// saysNo dies with its bubble: a stale veto would otherwise turn every
|
|
132
137
|
// later bubble into "haha it said no" (visible the moment another
|
|
133
138
|
// bubble is unmasked, e.g. dismissing the reopen list).
|
|
134
|
-
() => set({ bubble: false, saysNo: false }),
|
|
139
|
+
() => set({ bubble: false, saysNo: false, offering: false }),
|
|
140
|
+
BUBBLE_MS,
|
|
141
|
+
);
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
/** The post-park pipe-up: ✕ closed a window while Clippy was on screen,
|
|
145
|
+
* so the window went into Clippy's keep — say the line and offer the
|
|
146
|
+
* unhide roster (the roster button lives on the image which is already
|
|
147
|
+
* the tap target that opens the list). The offer bubble follows the
|
|
148
|
+
* same lifecycle and priority atomics as the hint's. */
|
|
149
|
+
const offer = () => {
|
|
150
|
+
clearTimeout(bubbleTimer);
|
|
151
|
+
set({ bubble: true, saysNo: false, offering: true, listOpen: false });
|
|
152
|
+
bubbleTimer = setTimeout(
|
|
153
|
+
() => set({ bubble: false, saysNo: false, offering: false }),
|
|
135
154
|
BUBBLE_MS,
|
|
136
155
|
);
|
|
137
156
|
};
|
|
@@ -188,23 +207,25 @@ export const toggleClippyList = () => {
|
|
|
188
207
|
// said no" veto state — so the reopen list owns the attention; pending
|
|
189
208
|
// bubble timers are cancelled alongside.
|
|
190
209
|
clearTimeout(bubbleTimer);
|
|
191
|
-
set({ listOpen: true, bubble: false, saysNo: false });
|
|
210
|
+
set({ listOpen: true, bubble: false, saysNo: false, offering: false });
|
|
192
211
|
};
|
|
193
212
|
|
|
194
|
-
const onCrunchy = (
|
|
195
|
-
if (state.listOpen || !state.bubble || state.saysNo) return;
|
|
196
|
-
|
|
213
|
+
const onCrunchy = ({ refuse }: { refuse: () => void }) => {
|
|
214
|
+
if (state.listOpen || !state.bubble || state.saysNo || state.offering) return;
|
|
215
|
+
refuse();
|
|
197
216
|
set({ saysNo: true });
|
|
198
217
|
};
|
|
199
218
|
|
|
200
219
|
/** Attaches the global listeners; returns the detach function. */
|
|
201
220
|
export function attachClippy(): () => void {
|
|
202
221
|
window.addEventListener("keydown", onKeyDown);
|
|
203
|
-
|
|
222
|
+
const offWindowClose = onSignal("window:close", onCrunchy);
|
|
223
|
+
const offHid = onSignal("clippy:hid", offer);
|
|
204
224
|
getAudio().addEventListener("ended", onAudioEnded);
|
|
205
225
|
return () => {
|
|
206
226
|
window.removeEventListener("keydown", onKeyDown);
|
|
207
|
-
|
|
227
|
+
offWindowClose();
|
|
228
|
+
offHid();
|
|
208
229
|
getAudio().removeEventListener("ended", onAudioEnded);
|
|
209
230
|
clearBlip();
|
|
210
231
|
activeMs = 0;
|
package/src/lib/embeds.ts
CHANGED
|
@@ -2,7 +2,10 @@ export type EmbedSpec = {
|
|
|
2
2
|
provider: "spotify" | "youtube" | "soundcloud";
|
|
3
3
|
label: string;
|
|
4
4
|
src: string;
|
|
5
|
-
height
|
|
5
|
+
/** Fixed pixel height for fixed-aspect players (Spotify, SoundCloud).
|
|
6
|
+
* Omitted for YouTube: those players are 16:9 and size themselves from
|
|
7
|
+
* their width via CSS (.embed-youtube). */
|
|
8
|
+
height?: number;
|
|
6
9
|
};
|
|
7
10
|
|
|
8
11
|
const SPOTIFY_TYPES = new Set([
|
|
@@ -14,6 +17,41 @@ const SPOTIFY_TYPES = new Set([
|
|
|
14
17
|
"show",
|
|
15
18
|
]);
|
|
16
19
|
const SPOTIFY_HEIGHT = 152;
|
|
20
|
+
const YOUTUBE_ID = /^[A-Za-z0-9_-]+$/;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Extracts a video id from common YouTube URL forms:
|
|
24
|
+
* https://youtu.be/<id>
|
|
25
|
+
* https://www.youtube.com/watch?v=<id>
|
|
26
|
+
* https://www.youtube.com/embed/<id> (also /shorts/, /live/ and /v/)
|
|
27
|
+
* www./m./music. subdomains and youtube-nocookie.com are accepted.
|
|
28
|
+
* Returns null for anything else — including any link carrying a ?list=
|
|
29
|
+
* parameter: it points at a playlist (often unlisted), and every caller
|
|
30
|
+
* renders those as plain links instead of embeds.
|
|
31
|
+
*/
|
|
32
|
+
export function youtubeVideoId(url: string): string | null {
|
|
33
|
+
let parsed: URL;
|
|
34
|
+
try {
|
|
35
|
+
parsed = new URL(url);
|
|
36
|
+
} catch {
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
if (parsed.searchParams.get("list")) return null;
|
|
40
|
+
const host = parsed.hostname.replace(/^(www|m|music)\./, "");
|
|
41
|
+
if (host === "youtu.be") {
|
|
42
|
+
const id = parsed.pathname.slice(1).split("/")[0];
|
|
43
|
+
return id && YOUTUBE_ID.test(id) ? id : null;
|
|
44
|
+
}
|
|
45
|
+
if (host !== "youtube.com" && host !== "youtube-nocookie.com") return null;
|
|
46
|
+
if (parsed.pathname === "/watch") {
|
|
47
|
+
const id = parsed.searchParams.get("v");
|
|
48
|
+
return id && YOUTUBE_ID.test(id) ? id : null;
|
|
49
|
+
}
|
|
50
|
+
const embed = parsed.pathname.match(
|
|
51
|
+
/^\/(?:embed|shorts|live|v)\/([A-Za-z0-9_-]+)/,
|
|
52
|
+
);
|
|
53
|
+
return embed?.[1] ?? null;
|
|
54
|
+
}
|
|
17
55
|
|
|
18
56
|
function parse(url: string): URL | null {
|
|
19
57
|
try {
|
|
@@ -72,23 +110,12 @@ export function resolveEmbed(
|
|
|
72
110
|
};
|
|
73
111
|
}
|
|
74
112
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
host === "youtube.com" ||
|
|
78
|
-
host === "www.youtube.com"
|
|
79
|
-
) {
|
|
80
|
-
// Playlists are often unlisted, so they fall back to a plain link.
|
|
81
|
-
if (parsed.searchParams.get("list")) return null;
|
|
82
|
-
const id =
|
|
83
|
-
host === "youtu.be"
|
|
84
|
-
? parsed.pathname.slice(1)
|
|
85
|
-
: parsed.searchParams.get("v");
|
|
86
|
-
if (!id) return null;
|
|
113
|
+
const youtubeId = youtubeVideoId(url);
|
|
114
|
+
if (youtubeId) {
|
|
87
115
|
return {
|
|
88
116
|
provider: "youtube",
|
|
89
117
|
label: "YouTube",
|
|
90
|
-
src: `https://www.youtube.com/embed/${
|
|
91
|
-
height: SPOTIFY_HEIGHT,
|
|
118
|
+
src: `https://www.youtube.com/embed/${youtubeId}`,
|
|
92
119
|
};
|
|
93
120
|
}
|
|
94
121
|
|
|
@@ -96,14 +123,6 @@ export function resolveEmbed(
|
|
|
96
123
|
}
|
|
97
124
|
|
|
98
125
|
export function youTubeThumbnail(url: string): string | null {
|
|
99
|
-
const
|
|
100
|
-
if (!parsed || parsed.searchParams.get("list")) return null;
|
|
101
|
-
const host = parsed.hostname;
|
|
102
|
-
const id =
|
|
103
|
-
host === "youtu.be"
|
|
104
|
-
? parsed.pathname.slice(1)
|
|
105
|
-
: host === "youtube.com" || host === "www.youtube.com"
|
|
106
|
-
? parsed.searchParams.get("v")
|
|
107
|
-
: null;
|
|
126
|
+
const id = youtubeVideoId(url);
|
|
108
127
|
return id ? `https://i.ytimg.com/vi/${id}/maxresdefault.jpg` : null;
|
|
109
128
|
}
|