byte-launcher 0.0.0-stage → 1.1.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.
Files changed (3) hide show
  1. package/README.md +34 -2
  2. package/index.html +101 -0
  3. package/package.json +6 -4
package/README.md CHANGED
@@ -1,3 +1,35 @@
1
- # Temporary Holding Version
1
+ # BYTE launcher for unpkg
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ One page (`index.html`): completely black until the first click, then a launcher with app tiles (BYTE, Games, Soundboard, Tools). The chosen app opens full-window in a frame; the browser Back button returns to the launcher. Published as an npm package,
4
+ it opens at `https://unpkg.com/<package-name>@<version>/index.html`.
5
+
6
+ BYTE itself still runs on its own server; this page is only a doorway to it. It needs the
7
+ BYTE version with the "embedded cookie" change (the community update) to be live, or sign-ins
8
+ in Server rewrite mode will not hold inside the frame.
9
+
10
+ ## Publish (you do this, with your own npm account)
11
+
12
+ 1. Make a free account at <https://www.npmjs.com/signup> if you have none.
13
+ 2. The name in `package.json` is `byte-launcher` (free on npm on 2026-11-22). If npm refuses it, pick another and change it there.
14
+ 3. In this folder:
15
+
16
+ ```bash
17
+ cd ~/lite-browser/unpkg
18
+ npm login
19
+ npm publish --access public
20
+ ```
21
+
22
+ 4. Open `https://unpkg.com/<your-name>@1.0.0/index.html`. The first load can take a minute.
23
+
24
+ To change the page later: edit it, raise `"version"` (1.0.1, …), `npm publish` again. A published
25
+ version can never be changed, and after 72 hours it cannot be removed either.
26
+
27
+ ## Good to know
28
+
29
+ - Everything in the package is public, including BYTE's address in `index.html`.
30
+ - Settings, bookmarks and tabs are kept separately from the ones at BYTE's own address,
31
+ because browsers keep storage per outer site.
32
+ - npm and unpkg are other people's services with their own rules. Either can remove a package
33
+ or stop serving HTML pages; this page is not something to rely on.
34
+ - Not tried on the real unpkg.com yet (nothing has been published). Tested locally by serving
35
+ this page from a different site than BYTE.
package/index.html ADDED
@@ -0,0 +1,101 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <meta name="robots" content="noindex">
7
+ <title>BYTE</title>
8
+ <link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect width='32' height='32' rx='8' fill='%231d6cff'/%3E%3Ctext x='16' y='23' font-size='20' font-weight='700' text-anchor='middle' fill='%23fff' font-family='Georgia,serif'%3EB%3C/text%3E%3C/svg%3E">
9
+ <style>
10
+ html, body { margin: 0; height: 100%; background: #000; overflow: hidden; color: #dbe4ff; font: 16px/1.5 system-ui, sans-serif; }
11
+ /* 1. Nothing but black until the first click or key press. */
12
+ #cover { position: fixed; inset: 0; z-index: 3; background: #000; border: 0; padding: 0; margin: 0; width: 100%; height: 100%; cursor: default; outline: 0; }
13
+ /* 2. The launcher. */
14
+ #launcher { position: fixed; inset: 0; z-index: 2; overflow: auto; background: radial-gradient(1200px 700px at 50% -10%, #12224a, #03060e 60%); }
15
+ #launcher .wrap { max-width: 880px; margin: 0 auto; padding: 9vh 16px 48px; }
16
+ #launcher h1 { margin: 0 0 4px; font-size: 34px; color: #fff; }
17
+ #launcher p.lead { margin: 0 0 28px; color: #9fb0d8; }
18
+ .grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
19
+ .tile { display: flex; flex-direction: column; gap: 8px; text-align: left; padding: 18px; border-radius: 16px; border: 1px solid #ffffff22; background: #ffffff0d; color: inherit; font: inherit; cursor: pointer; }
20
+ .tile:hover, .tile:focus-visible { background: #ffffff1a; border-color: #7db0ff; outline: 0; }
21
+ .tile .kind { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #7db0ff; }
22
+ .tile .name { font-size: 20px; font-weight: 700; color: #fff; }
23
+ .tile .text { color: #b9c6e6; font-size: 14px; flex: 1; }
24
+ .tile .go { align-self: flex-start; margin-top: 6px; padding: 7px 14px; border-radius: 999px; background: #1d6cff; color: #fff; font-weight: 600; font-size: 14px; }
25
+ #launcher .tip { margin-top: 26px; color: #7f8db3; font-size: 13px; }
26
+ /* 3. The app, full window. */
27
+ iframe { position: fixed; inset: 0; z-index: 1; width: 100%; height: 100%; border: 0; background: #03060e; }
28
+ #msg { position: fixed; inset: 0; z-index: 4; display: none; place-items: center; padding: 24px; text-align: center; background: #03060e; }
29
+ #msg a { color: #7db0ff; }
30
+ [hidden] { display: none !important; }
31
+ </style>
32
+ </head>
33
+ <body>
34
+ <!-- BYTE launcher. Black until clicked, then a list of apps; each app runs on BYTE's own server and is shown in a frame.
35
+ To point it at another BYTE address, change BYTE_SITE below and publish a new version. -->
36
+ <button id="cover" type="button" aria-label="Open"></button>
37
+ <div id="launcher" hidden><div class="wrap">
38
+ <h1>BYTE launcher</h1>
39
+ <p class="lead">Pick what to open.</p>
40
+ <div class="grid" id="apps"></div>
41
+ <p class="tip">To come back here and open another app, use your browser's Back button.</p>
42
+ </div></div>
43
+ <div id="msg"><p>That did not load here.<br><a id="direct" rel="noopener">Open it directly</a></p></div>
44
+ <script>
45
+ var BYTE_SITE = 'https://apps.handytechhelper.com';
46
+ var APPS = [
47
+ { id: 'byte', kind: 'Web browser', name: 'BYTE', text: 'A browser inside this page, with tabs, bookmarks and themes.', go: 'Open BYTE', url: BYTE_SITE + '/browse' },
48
+ { id: 'games', kind: 'Play', name: 'Games', text: 'Pick a game and play it right here. Nothing to install.', go: 'Open Games', url: BYTE_SITE + '/browse?url=' + encodeURIComponent('byte://games') },
49
+ { id: 'sounds', kind: 'Fun', name: 'Soundboard', text: 'Thousands of sound buttons. Search and tap to play.', go: 'Open Soundboard', url: BYTE_SITE + '/browse?url=' + encodeURIComponent('byte://soundboard') },
50
+ { id: 'tools', kind: 'Tools website', name: 'HandyTechHelper Tools', text: '80+ free tools for images, PDFs, text and code. Opens in a new tab.', go: 'Open', url: 'https://handytechhelper.com/', tab: true }
51
+ ];
52
+ var $ = function (id) { return document.getElementById(id); };
53
+ var frame = null, timer = 0;
54
+
55
+ function closeApp() {
56
+ clearTimeout(timer);
57
+ if (frame) { frame.remove(); frame = null; }
58
+ $('msg').style.display = 'none';
59
+ $('launcher').hidden = false;
60
+ }
61
+ function openApp(app) {
62
+ if (app.tab) { window.open(app.url, '_blank', 'noopener'); return; }
63
+ closeApp();
64
+ var f = frame = document.createElement('iframe');
65
+ f.allow = 'fullscreen; autoplay; clipboard-read; clipboard-write; gamepad; encrypted-media; picture-in-picture';
66
+ f.allowFullscreen = true;
67
+ f.title = app.name;
68
+ f.src = app.url;
69
+ document.body.appendChild(f);
70
+ $('launcher').hidden = true;
71
+ $('direct').href = app.url;
72
+ // If nothing has arrived after a while (BYTE is down or blocked on this network), say so.
73
+ var loaded = false;
74
+ f.addEventListener('load', function () { loaded = true; });
75
+ timer = setTimeout(function () { if (!loaded && frame === f) $('msg').style.display = 'grid'; }, 15000);
76
+ try { history.pushState({ app: app.id }, ''); } catch (e) {}
77
+ }
78
+ // The browser's Back button leaves the app and shows the launcher again.
79
+ addEventListener('popstate', function () { if (frame) closeApp(); });
80
+
81
+ APPS.forEach(function (app) {
82
+ var b = document.createElement('button');
83
+ b.type = 'button'; b.className = 'tile'; b.dataset.app = app.id;
84
+ [['kind', app.kind], ['name', app.name], ['text', app.text], ['go', app.go]].forEach(function (p) {
85
+ var s = document.createElement('span'); s.className = p[0]; s.textContent = p[1]; b.appendChild(s);
86
+ });
87
+ b.addEventListener('click', function () { openApp(app); });
88
+ $('apps').appendChild(b);
89
+ });
90
+
91
+ function uncover() {
92
+ if ($('cover').hidden) return;
93
+ $('cover').hidden = true;
94
+ $('launcher').hidden = false;
95
+ removeEventListener('keydown', uncover);
96
+ }
97
+ $('cover').addEventListener('click', uncover);
98
+ addEventListener('keydown', uncover);
99
+ </script>
100
+ </body>
101
+ </html>
package/package.json CHANGED
@@ -1,6 +1,8 @@
1
1
  {
2
2
  "name": "byte-launcher",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.1.0",
4
+ "description": "Launcher page for BYTE",
5
+ "main": "index.html",
6
+ "files": ["index.html"],
7
+ "license": "UNLICENSED"
8
+ }