@browserbox/hyper-frame 3.0.0 → 3.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.
package/README.md CHANGED
@@ -75,6 +75,9 @@ await bbx.cleanSlate('https://example.com');
75
75
  | `media-permissions` | no | `"default"` | Set to `"none"` to deny mic/camera/display-capture |
76
76
  | `session-unload-warning` | no | `"default"` | Set to `"none"` to suppress beforeunload warning |
77
77
  | `beforeunload-behavior` | no | `"default"` | `"leave"` to auto-depart, `"remain"` to auto-stay |
78
+ | `first-load-cleanse` | no | — | Close all tabs on first session load; if the value is a URL, open that URL after cleansing |
79
+
80
+ `first-load-cleanse` runs once for each `login-link`. Use a non-empty URL to close existing tabs and open that replacement tab. Use an empty value, such as `first-load-cleanse=""`, to close existing tabs without opening a replacement. The `firstLoadCleanse(url?)` method follows the same rule: a non-empty string opens that URL, and an empty string performs the delete-only cleanse.
78
81
 
79
82
  ## Namespaced API
80
83
 
@@ -0,0 +1,306 @@
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.0">
6
+ <title>Hyper-Frame - an iframe that can frame any website</title>
7
+ <meta name="description" content="Hyper-Frame is a custom element that embeds a live remote browser, so pages with X-Frame-Options or CSP frame restrictions can still be viewed, controlled, and captured from your app.">
8
+ <meta property="og:title" content="Hyper-Frame - an iframe that can frame any website">
9
+ <meta property="og:description" content="Try the live console. Embed, navigate, automate, and capture pages through a remote browser-backed iframe.">
10
+ <meta property="og:image" content="https://hyper-frame.art/og-image.png">
11
+ <meta property="og:url" content="https://hyper-frame.art/">
12
+ <meta property="og:type" content="website">
13
+ <meta name="twitter:card" content="summary_large_image">
14
+ <meta name="twitter:title" content="Hyper-Frame - an iframe that can frame any website">
15
+ <meta name="twitter:description" content="Try the live console. Embed, navigate, automate, and capture pages through a remote browser-backed iframe.">
16
+ <meta name="twitter:image" content="https://hyper-frame.art/og-image.png">
17
+ <link rel="preload" href="/fonts/ibm-plex-serif-400.woff2" as="font" type="font/woff2" crossorigin>
18
+ <link rel="preload" href="/fonts/ibm-plex-serif-700.woff2" as="font" type="font/woff2" crossorigin>
19
+ <link rel="preload" href="/fonts/ibm-plex-mono-400.woff2" as="font" type="font/woff2" crossorigin>
20
+ <style>
21
+ @font-face {
22
+ font-family: 'IBM Plex Serif';
23
+ font-style: normal;
24
+ font-weight: 400;
25
+ font-display: block;
26
+ src: url('/fonts/ibm-plex-serif-400.woff2') format('woff2');
27
+ }
28
+
29
+ @font-face {
30
+ font-family: 'IBM Plex Serif';
31
+ font-style: normal;
32
+ font-weight: 700;
33
+ font-display: block;
34
+ src: url('/fonts/ibm-plex-serif-700.woff2') format('woff2');
35
+ }
36
+
37
+ @font-face {
38
+ font-family: 'IBM Plex Mono';
39
+ font-style: normal;
40
+ font-weight: 400;
41
+ font-display: block;
42
+ src: url('/fonts/ibm-plex-mono-400.woff2') format('woff2');
43
+ }
44
+
45
+ :root {
46
+ color-scheme: light;
47
+ --paper: #fbfaf4;
48
+ --ink: #111;
49
+ --muted: #57534e;
50
+ --rule: #111;
51
+ --soft-rule: #c8c1b6;
52
+ --code: #f0eee6;
53
+ --visited: #551a8b;
54
+ --link: #0000ee;
55
+ }
56
+
57
+ * {
58
+ box-sizing: border-box;
59
+ }
60
+
61
+ html {
62
+ background: var(--paper);
63
+ }
64
+
65
+ body {
66
+ max-width: 860px;
67
+ margin: 0 auto;
68
+ padding: 28px 18px 48px;
69
+ color: var(--ink);
70
+ background: var(--paper);
71
+ font: 16px/1.55 "IBM Plex Serif", Georgia, "Times New Roman", serif;
72
+ }
73
+
74
+ header,
75
+ section,
76
+ footer {
77
+ border-top: 1px solid var(--rule);
78
+ padding-top: 18px;
79
+ margin-top: 24px;
80
+ }
81
+
82
+ header {
83
+ border-top: 4px double var(--rule);
84
+ margin-top: 0;
85
+ }
86
+
87
+ h1,
88
+ h2,
89
+ h3,
90
+ p,
91
+ ul,
92
+ pre {
93
+ margin: 0 0 14px;
94
+ }
95
+
96
+ h1 {
97
+ font-size: clamp(2.2rem, 10vw, 5.4rem);
98
+ line-height: 0.95;
99
+ letter-spacing: 0;
100
+ font-weight: 400;
101
+ }
102
+
103
+ h2 {
104
+ font-size: 1.35rem;
105
+ line-height: 1.2;
106
+ margin-top: 0;
107
+ }
108
+
109
+ h3 {
110
+ font-size: 1rem;
111
+ text-transform: uppercase;
112
+ letter-spacing: 0.04em;
113
+ }
114
+
115
+ a {
116
+ color: var(--link);
117
+ text-decoration: underline;
118
+ }
119
+
120
+ a:visited {
121
+ color: var(--visited);
122
+ }
123
+
124
+ code,
125
+ pre,
126
+ .mono {
127
+ font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
128
+ font-size: 0.93em;
129
+ }
130
+
131
+ code {
132
+ background: var(--code);
133
+ padding: 0 0.2em;
134
+ }
135
+
136
+ pre {
137
+ overflow-x: auto;
138
+ padding: 12px;
139
+ border: 1px solid var(--soft-rule);
140
+ background: var(--code);
141
+ white-space: pre;
142
+ }
143
+
144
+ ul {
145
+ padding-left: 1.35rem;
146
+ }
147
+
148
+ .lede {
149
+ font-size: clamp(1.2rem, 3vw, 1.65rem);
150
+ line-height: 1.35;
151
+ max-width: 760px;
152
+ }
153
+
154
+ .try-line {
155
+ display: flex;
156
+ flex-wrap: wrap;
157
+ gap: 10px 18px;
158
+ align-items: baseline;
159
+ margin: 22px 0 0;
160
+ padding: 12px 0;
161
+ border-top: 1px solid var(--soft-rule);
162
+ border-bottom: 1px solid var(--soft-rule);
163
+ }
164
+
165
+ .primary-link {
166
+ font: 700 1.05rem/1 "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
167
+ }
168
+
169
+ .note,
170
+ footer {
171
+ color: var(--muted);
172
+ }
173
+
174
+ .two-col {
175
+ display: grid;
176
+ grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
177
+ gap: 24px;
178
+ }
179
+
180
+ .facts {
181
+ border-collapse: collapse;
182
+ width: 100%;
183
+ margin: 0 0 14px;
184
+ }
185
+
186
+ .facts th,
187
+ .facts td {
188
+ border-top: 1px solid var(--soft-rule);
189
+ padding: 8px 8px 8px 0;
190
+ text-align: left;
191
+ vertical-align: top;
192
+ }
193
+
194
+ .facts th {
195
+ width: 10rem;
196
+ font-weight: 700;
197
+ }
198
+
199
+ @media (max-width: 680px) {
200
+ body {
201
+ padding: 20px 14px 36px;
202
+ }
203
+
204
+ .two-col {
205
+ grid-template-columns: 1fr;
206
+ gap: 8px;
207
+ }
208
+ }
209
+ </style>
210
+ </head>
211
+ <body>
212
+ <header>
213
+ <p class="mono">Show HN candidate / live prototype</p>
214
+ <h1>Hyper-Frame</h1>
215
+ <p class="lede">An iframe that can frame any website.</p>
216
+ <p>
217
+ <code>&lt;hyper-frame&gt;</code> is a custom element backed by a live remote browser.
218
+ Your page gets an embeddable surface, navigation controls, automation calls,
219
+ screenshots, tab events, and streaming health metrics.
220
+ </p>
221
+ <p class="try-line">
222
+ <a class="primary-link" href="/console.html">Open the live console</a>
223
+ <span class="note">No account needed for the demo path. Try a URL that normal iframes refuse.</span>
224
+ </p>
225
+ </header>
226
+
227
+ <section>
228
+ <h2>What to try first</h2>
229
+ <div class="two-col">
230
+ <ul>
231
+ <li>Open the console.</li>
232
+ <li>Click <strong>Connect</strong>.</li>
233
+ <li>Navigate to a site with frame restrictions.</li>
234
+ <li>Watch the FPS, transport, tabs, and events update.</li>
235
+ </ul>
236
+ <ul>
237
+ <li>Use the Direct API tab to call <code>getTabs</code>, <code>evaluate</code>, or <code>getFrame</code>.</li>
238
+ <li>Copy the embed snippet and wire the same element into your own page.</li>
239
+ </ul>
240
+ </div>
241
+ </section>
242
+
243
+ <section>
244
+ <h2>The whole API can start this small</h2>
245
+ <pre><code>&lt;script type="module" src="https://hyper-frame.art/hyper-frame.js"&gt;&lt;/script&gt;
246
+
247
+ &lt;hyper-frame
248
+ login-link="https://browserbox.example/login?token=..."
249
+ width="100%"
250
+ height="640"&gt;
251
+ &lt;/hyper-frame&gt;</code></pre>
252
+ <p>
253
+ After the element is ready, call methods on it:
254
+ <code>navigateTo(url)</code>, <code>createTab(url)</code>,
255
+ <code>evaluate(js)</code>, <code>getFrame()</code>,
256
+ <code>getTransportDiagnostics()</code>.
257
+ </p>
258
+ </section>
259
+
260
+ <section>
261
+ <h2>Why this exists</h2>
262
+ <table class="facts">
263
+ <tr>
264
+ <th>Problem</th>
265
+ <td>Real sites often cannot be placed in a normal iframe because of <code>X-Frame-Options</code> and <code>Content-Security-Policy</code>.</td>
266
+ </tr>
267
+ <tr>
268
+ <th>Approach</th>
269
+ <td>Run the page in an isolated BrowserBox session, stream the browser surface, and expose a narrow element API to the embedding page.</td>
270
+ </tr>
271
+ <tr>
272
+ <th>Use cases</th>
273
+ <td>Remote browser isolation, product embeds, browser automation, support consoles, web QA, and agent-facing browsers.</td>
274
+ </tr>
275
+ <tr>
276
+ <th>Status</th>
277
+ <td>Working demo and developer console. Commercial packaging is in progress.</td>
278
+ </tr>
279
+ </table>
280
+ </section>
281
+
282
+ <section>
283
+ <h2>Links</h2>
284
+ <ul>
285
+ <li><a href="/console.html">Developer console</a></li>
286
+ <li><a href="https://win9-5.com/api/">API docs</a></li>
287
+ <li><a href="https://github.com/BrowserBox/hyper-frame">Hyper-Frame package</a></li>
288
+ <li><a href="https://browserbox.io">BrowserBox</a></li>
289
+ <li><a href="https://win9-5.com">Windows 98.5 demo</a></li>
290
+ </ul>
291
+ </section>
292
+
293
+ <section>
294
+ <h2>Commercial note</h2>
295
+ <p>
296
+ Hyper-Frame is proprietary software powered by the BrowserBox engine.
297
+ The public demo is here for trying the interface and API shape. Production
298
+ use requires a commercial BrowserBox license.
299
+ </p>
300
+ </section>
301
+
302
+ <footer>
303
+ <p>Copyright 2026 DOSAYGO Corporation. Powered by <a href="https://browserbox.io">BrowserBox</a>.</p>
304
+ </footer>
305
+ </body>
306
+ </html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@browserbox/hyper-frame",
3
- "version": "3.0.0",
3
+ "version": "3.1.0",
4
4
  "author": "@dosy",
5
5
  "description": "Hyper-Frame — an iframe that can frame any website",
6
6
  "type": "module",