@dasl/tile-loader 4.0.0 → 5.0.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
@@ -80,9 +80,10 @@ Four cooperating layers, all talking over `postMessage`:
80
80
  does not start: the dock will not frame it. A name that is a tile's CID is
81
81
  not one to give here, and throws: see `conf.cidOrigins`.
82
82
  - `conf.cidOrigins`: `true` to run each tile on the origin its own content
83
- names, the CID of its manifest, which is kept: what the tile stores there it
84
- finds again the next time it runs. `false` when left out. See "Origins named
85
- by a tile's CID". Not with `namedOrigin` (it throws).
83
+ names, the CID of its manifest. What the tile stores there goes as on an
84
+ origin made for the load: the origin is wiped when the tile is closed and
85
+ before it starts, and the frame is credentialless. `false` when left out.
86
+ See "Origins named by a tile's CID". Not with `namedOrigin` (it throws).
86
87
  - `conf.webrtcGuard`: `'exhaust'` (default) has the shuttle spend Chromium's
87
88
  per-process WebRTC budget before the tile loads (see Security model); `'none'`
88
89
  skips it, for hosts that block WebRTC themselves (an Electron app with the
@@ -145,9 +146,11 @@ Four cooperating layers, all talking over `postMessage`:
145
146
  - **`await close()`** — you are done with the tile: its runtime tidies up, its
146
147
  frame is removed, and the tile forgets it (a `close` event says when). It can
147
148
  be rendered again afterwards. See "When a tile goes away".
148
- - **`ephemeral`** — whether the origin the tile runs on is made for one load,
149
- and wiped when it is closed: `false` on a named origin, and on the origin a
150
- tile's CID names (see "Origins named by a tile's CID").
149
+ - **`ephemeral`** — whether what the tile stores goes with each run of it:
150
+ the origin it runs on is wiped when it is closed, and holds nothing from
151
+ before when it starts. `true` on an origin made for the load and on the
152
+ origin a tile's CID names (see "Origins named by a tile's CID"), `false` on
153
+ a named origin.
151
154
  - The **`load`** event — the tile's runtime is up, and its root document is
152
155
  being fetched for it. It says that all went well so far, not that anything
153
156
  is on screen; and for a tile that cannot start it never comes, which is
@@ -191,6 +194,11 @@ Four cooperating layers, all talking over `postMessage`:
191
194
  and the runtime there refused the manifest it was handed: not the one
192
195
  that CID names, or not one it reads (a .tile file whose header is not
193
196
  written in DRISL's one form). Nothing of the tile is served.
197
+ - `wipe`: the tile runs on the origin its CID names, and that origin could
198
+ not be wiped before the tile started there, tried twice, three seconds
199
+ apart (the tile server said it was not, or did not answer within ten
200
+ seconds): what an earlier run left could still be there, so the tile is
201
+ not run. Render it again to try again.
194
202
 
195
203
  For a tile on the origin its CID names, `version` also means that the
196
204
  tile server's dock did not say that its runtime holds such an origin to
@@ -209,7 +217,8 @@ Four cooperating layers, all talking over `postMessage`:
209
217
  origin can have the start reported as failed, for any of these reasons.
210
218
  On an origin made for the one load, nothing of the tile's runs before it
211
219
  has started and no other tile is there; tiles that share a named origin
212
- can do it to one another.
220
+ can do it to one another, and so can the runs of a tile on the origin its
221
+ CID names.
213
222
 
214
223
  A tile from AT has one more `error`, before its runtime is told to load:
215
224
  its content could not be had, and `ev.error` is the `TileLoadError` that
@@ -310,7 +319,7 @@ so that you are never left believing in a frame you do not have.
310
319
  | Option | When left out | What it is |
311
320
  | --- | --- | --- |
312
321
  | `sandbox` | `'allow-scripts allow-same-origin allow-forms'` | the frame's sandbox attribute in full |
313
- | `credentialless` | `true` on an origin made for the load, `false` on a named origin and on the origin a tile's CID names (`tile.ephemeral`) | whether the frame is credentialless |
322
+ | `credentialless` | `true`, unless the tile runs on a named origin (`tile.ephemeral`) | whether the frame is credentialless |
314
323
  | `tabindex` | none: the frame is in the tab order, unless the focus guard is on it | the frame's tabindex, `-1` to have Tab pass over the tile |
315
324
  | `refuse` | `['sync-xhr']` | features of the browser to take from the tile, the list in full |
316
325
 
@@ -386,12 +395,13 @@ is there included. What to know of it:
386
395
  able to keep the next ones on its page from loading, until the page is
387
396
  loaded again. `@dasl/tile-server`'s command reads 1 MiB; its README says
388
397
  what a front has to take.
389
- - A tile on a named origin (`namedOrigin`), or on the origin its CID names
390
- (`cidOrigins`), is there to find its storage again, and a credentialless
391
- frame loses it with every page: its frame is a plain one unless you ask.
392
- In Chrome a plain frame has the cookies of the loading server's domain,
393
- which Chrome does not keep apart by site unless its user blocks third-party
394
- cookies: see "Origins named by a tile's CID".
398
+ - A tile on a named origin (`namedOrigin`) is there to find its storage
399
+ again, and a credentialless frame loses it with every page: its frame is a
400
+ plain one unless you ask. In Chrome a plain frame has the cookies of the
401
+ loading server's domain, which Chrome does not keep apart by site unless its
402
+ user blocks third-party cookies. A tile on the origin its CID names
403
+ (`cidOrigins`) keeps nothing from one run to the next, and its frame is
404
+ credentialless, as on an origin made for the load.
395
405
 
396
406
  Closing a tile in such a frame wipes its origin from a credentialless frame
397
407
  too, since that is where what it stored is.
@@ -1283,11 +1293,15 @@ it, can only be wiped while it is still in the document.
1283
1293
 
1284
1294
  A host that never calls `close()` is not left with nothing: on its way out the
1285
1295
  runtime lets its worker's registration go, best effort. What the tile stored
1286
- stays until the browser evicts it.
1296
+ stays until the browser evicts it (on the origin a tile's CID names, until the
1297
+ tile next starts there, which wipes it first).
1287
1298
 
1288
1299
  A tile on a named origin (`namedOrigin`) is the exception throughout: that origin
1289
- is kept on purpose, so `close()` wipes nothing there. So is a tile on the origin
1290
- its CID names (`cidOrigins`); `tile.ephemeral` says which a tile is.
1300
+ is kept on purpose, so `close()` wipes nothing there; `tile.ephemeral` says which
1301
+ a tile is. A tile on the origin its CID names (`cidOrigins`) is wiped as one on
1302
+ an origin made for the load is, but that origin is the same for every run of
1303
+ the tile: it is also wiped before the tile starts, and the same tile shown twice
1304
+ on a page shares it (see "Origins named by a tile's CID").
1291
1305
 
1292
1306
  ## Origins named by a tile's CID
1293
1307
 
@@ -1304,10 +1318,44 @@ point a tile at another tile's origin. `tile.getLoadSource()` and the frames
1304
1318
  `renderContent()` makes name that origin, every time, and so does every page
1305
1319
  that runs the same tile.
1306
1320
 
1307
- What is that for: a tile that keeps what it stores, for as long as it is that
1308
- tile. A game's saves, a document's notes, its preferences, a tile in a feed
1309
- that keeps its state when it is scrolled away and back. Its worker stays
1310
- registered there too.
1321
+ What changes is the name, and only the name: the origin says which tile runs
1322
+ there, the same wherever and whenever the tile runs, and the tile server's
1323
+ runtime holds it to that tile. What the tile stores there goes with each run
1324
+ of it, as on an origin made for the load. A tile that has something to keep
1325
+ gives it to its host over a protocol (tp-data).
1326
+
1327
+ - **Wiped when the tile is closed**, as an origin made for the load is:
1328
+ `close()` has it wiped, and once more a few seconds later, and resolves to
1329
+ whether it was.
1330
+ - **Wiped before the tile starts.** The origin is the same for every run, so
1331
+ what one run left there the next would find, and a run that was never
1332
+ closed (a page that went without calling `close()`, one that crashed)
1333
+ leaves all of it. So before the first tile of the page starts there, the
1334
+ loader has the origin wiped, as `close()` does, and tells the tile's
1335
+ runtime to load it once that is done. A tile started there again within a
1336
+ few seconds of its close waits for the second wipe of that close instead
1337
+ (three seconds after the first, at most). A wipe that does not go through
1338
+ is tried once more three seconds later (something of a run that was never
1339
+ closed, a worker the browser has not stopped yet, can still be writing
1340
+ there: measured in Chrome with a tile whose worker never gives its thread
1341
+ back, shown again at once after its frame was removed); where that one
1342
+ does not either, the tile is not run: `error`, with `wipe`.
1343
+ - **In a credentialless frame**, unless you ask otherwise, as on an origin
1344
+ made for the load: nothing is lost by its storage going with the page, and
1345
+ in Chrome the tile has none of the cookies of the loading server's domain.
1346
+ - **The same tile twice on a page shares it**: one origin, one store, one
1347
+ worker. So neither wipe is done under a tile of the page that still runs
1348
+ there. Closed, a tile there has the origin wiped only if it was the last
1349
+ (the others' `close()` resolves `false`), and only the first to start
1350
+ there has it wiped. A frame that is taken out of the document and put
1351
+ back counts as one that starts there again, once the others there went on
1352
+ without it. That holds for every mothership of the page made by the same
1353
+ copy of the loader. In Chrome, a frame of the tile that is credentialless
1354
+ and one that is not (`credentialless: false`) are on two stores, each
1355
+ wiped as its own, from a frame of its kind. Two copies of the loader on
1356
+ one page (two bundles, each with its own) know nothing of each other's
1357
+ tiles, and neither does a page in another tab: what keeps their wipes off
1358
+ each other's runs is the runtime's lock (see "Beyond the page").
1311
1359
 
1312
1360
  What it takes:
1313
1361
 
@@ -1323,60 +1371,100 @@ What it takes:
1323
1371
  `integrity`. The loading server has to be at `load.<base>`.
1324
1372
  - **A tile with nothing to be named by** runs on an origin made for the load,
1325
1373
  as without the option: a webxdc tile, one in memory, and one whose loader
1326
- has no manifest bytes to give. `tile.ephemeral` is `false` for a tile on the
1327
- origin its CID names, `true` otherwise.
1328
- - **It is kept**: `close()` wipes nothing and resolves `false`, and the frame
1329
- is plain unless you ask for `credentialless: true`, which keeps nothing past
1330
- the page in Chromium.
1331
-
1332
- What a tile keeps there, it keeps per tile content, per top-level site and per
1333
- browser profile, and for as long as the browser keeps it:
1334
-
1335
- - **A new version starts with nothing.** Another manifest has another CID,
1336
- and another origin. Nothing carries data from one version to the next: a
1337
- tile that must gives it to its host over a protocol (tp-data). The old
1338
- version's origin stays in the browser until it is cleared. The same tile as
1339
- a .tile file and on AT has two CIDs, and two origins.
1340
- - **Every run of the tile on one site shares it**: its storage, its worker,
1341
- and on one page each other's documents. What one run is given, all can have.
1342
- Do not run on such an origin a tile whose runs must be kept apart (one tile
1343
- shown across private conversations, say).
1344
- - **Each site that shows it has its own.** Where the browser keeps storage
1345
- apart by the top-level site:
1346
-
1347
- | | Storage and the worker | Cookies of the loading server's domain, in a plain frame |
1348
- | --- | --- | --- |
1349
- | Chrome | per top-level site (and per whether an ancestor is of another site) | the same jar on every site, unless its user blocks third-party cookies: a channel between tiles across sites |
1350
- | Firefox | per top-level site | per top-level site |
1351
- | Safari | per top-level site; what script wrote may be deleted after seven days of use without a visit to the site | blocked |
1352
- | A WKWebView | the app's own store | the app's |
1353
- | Android's WebView | not known | not known |
1354
-
1355
- Where the page that shows tiles is on the tile server's own site (as
1356
- webtil.es and its tiles are), every frame is of the same site and a tile's
1357
- store is that site's own: every page of the site shares it, a link to one
1358
- included. So are the cookies of that site, in every browser: where it is
1359
- your site too (as `t.mu.social` is under `mu.social`), a tile in a plain
1360
- frame there reads the cookies of yours that a script can read, and sets
1361
- cookies your site then receives. Keep such origins off there.
1362
- - **Best effort.** Storage is cleared under pressure and by its user.
1374
+ has no manifest bytes to give.
1375
+
1376
+ A new version of a tile has another manifest, another CID, and another
1377
+ origin. The same tile as a .tile file and on AT has two CIDs, and two origins.
1378
+
1379
+ **Beyond the page.** A browser keeps a frame's storage and its worker by its
1380
+ origin and by the site at the top, and, for a credentialless frame, by the
1381
+ page. The same tile shown at once in two tabs of one site is on one origin
1382
+ in both, and, where the browser keeps one store for the site, on one store:
1383
+ what one run stores there the other finds, and wiping it for one would take
1384
+ it from the other. So the tile server's runtime holds each run of a tile
1385
+ there to a lock, from before anything of the run is set up until the run
1386
+ ends, and wipes nothing while a run holds it: a wipe asked for before a
1387
+ start or at a close, by the loader of another tab or by another copy of the
1388
+ loader on the page, is held off, and the loader is told so. A tile that
1389
+ starts beside a run of another page starts on what that run has, as the
1390
+ second tile of a page does, and the last of them to be closed has the origin
1391
+ wiped (`close()` resolves `false` for the others, with no warning). The
1392
+ lock is a Web Lock, which the runtime's dock holds on the loading server's
1393
+ own origin: the browser keeps locks for each storage partition, as it keeps
1394
+ the stores, so the dock's are kept as the tile origin's store is, and lets
1395
+ a page's locks go when the page goes, however it goes (its frame removed,
1396
+ its tab closed or navigated, a crash), within 30 ms in every browser
1397
+ measured. (Not on the tile's origin, which is wiped: in Chrome a lock asked
1398
+ for there before a wipe is not seen by one asked for after it, and two runs
1399
+ that start at the same moment were measured wiping under each other.) The
1400
+ loader takes the runtime's word that a run holds a
1401
+ wipe off only where the loading server's dock says that its runtime holds
1402
+ runs to the lock (`@dasl/tile-server` after 4.0.0).
1403
+
1404
+ Measured with two tabs (two web views on one data store, for WebKit), each
1405
+ showing the tile, the second started once the first had stored something
1406
+ (and the same with the two started at the same moment, and with one started
1407
+ as the other is closed):
1408
+
1409
+ | | What the second tab's tile does to the first's |
1410
+ | --- | --- |
1411
+ | Chrome, in the credentialless frame the loader makes | nothing: each page has a store of its own, empty to begin with and gone with the page, which each tab's start and close wipe as its own |
1412
+ | Chrome, in a plain frame (`credentialless: false`) | nothing: it starts beside the first, on what the first stored (its start waits a second for the lock, then goes on), and its close wipes nothing. The first's tile keeps what it stored, its worker and its files, through the second's start and its close; the first's close, the last, wipes the origin |
1413
+ | Firefox | the same as a plain frame in Chrome, whatever the frame (Firefox ignores the attribute) |
1414
+ | Safari, and a WKWebView | the same (measured in macOS's WKWebView) |
1415
+ | Android's WebView | not known |
1416
+
1417
+ Two copies of the loader on one page do the same to each other, in every
1418
+ browser (in Chrome's credentialless frames as well: one page is one store).
1419
+ A page in the back/forward cache keeps its locks, and its run of the tile
1420
+ with them: in WebKit (Safari, a WKWebView) it holds the wipes of other pages
1421
+ off until it is shown again, with what it stored, or let go; Chrome lets
1422
+ such a page go as soon as another asks for a lock it holds, which ends that
1423
+ run; Firefox does not keep such a page. The tile has no hand in the lock:
1424
+ it has no page on the loading server's origin, and a lock it takes on its
1425
+ own holds nothing off. Nor does a worker of the tile's outlive its pages
1426
+ there, with what it holds in memory, which no wipe reaches: the runtime
1427
+ starts no shared worker on such an origin, from any file, and the tile
1428
+ policy none from a blob or a `data:` URL (see "Origins named by a tile's
1429
+ CID" in tile-server's README). Behind a runtime from before that
1430
+ (`@dasl/tile-server` 4.0.0), one made with `extendedLifetime` lives five
1431
+ minutes past them in Chrome, carries what it holds to the tile's next run,
1432
+ and can write it back after a wipe.
1433
+
1434
+ Behind a loading server whose runtime takes no lock (`@dasl/tile-server`
1435
+ 4.0.0, and what is built from it), nothing holds a wipe off: where the
1436
+ browser keeps one store for the site (Firefox, Safari, Chrome in a plain
1437
+ frame), the second tab's start wipes the origin under the first's tile, and
1438
+ its close does the same: what it stored and its worker are gone, and it is
1439
+ refused its own files from then on; two copies of the loader on one page
1440
+ wipe under each other's tiles the same way.
1363
1441
 
1364
1442
  And what it costs:
1365
1443
 
1366
1444
  - **The host name says which tile is shown**, to DNS resolvers, to the
1367
1445
  network unless the browser hides it (Encrypted Client Hello), and to the
1368
1446
  tile server and whatever is in front of it. A minted name says nothing.
1369
- - **Pages of the same site, and every frame in them, can use what the tile
1370
- kept.** Any page of the site the tile is shown under can run the genuine
1371
- tile on its origin, with what it kept there, and feed it whatever it likes
1372
- over the tile protocols, or answer none of its requests, or have its origin
1373
- wiped. So can any frame in such a page, whatever site the frame is from: an
1374
- ad, an embedded player, a widget, and whatever they frame in turn. The
1375
- browser keeps the tile's store by the site at the top, and not by who
1376
- frames the tile (measured in Chrome and Firefox). None can run any other
1377
- tile there, nor other bytes or headers. Treat what a tile kept as the
1378
- tile's, not as yours to trust, and run tiles on the origins their CIDs name
1379
- only on pages whose frames you would let do this.
1447
+ - **A wipe before each start.** The first tile of the page to start there
1448
+ waits for its origin to be wiped: a frame of the loader's own that loads
1449
+ the dock and the runtime for that origin, and the tile server's wipe. One
1450
+ that a run of another page holds off is given a second to come first.
1451
+ Measured on loopback in Chrome, Firefox and WebKit (the median of five
1452
+ starts, in two runs), that wipe took 30 to 65 ms, and the tile was up 20 to
1453
+ 100 ms later than one on an origin made for the load; over a network it is
1454
+ a few round trips to the tile server more.
1455
+ - **Pages of the same site, and every frame in them, can reach a run of the
1456
+ tile.** Any page of the site the tile is shown under can run the genuine
1457
+ tile on its origin and feed it whatever it likes over the tile protocols,
1458
+ or answer none of its requests; and where the browser keeps one store for
1459
+ the site (above), its run of the tile starts on what a run of the tile in
1460
+ another of its pages has, and says to it whatever the tile says to its
1461
+ host. (Behind a loading server whose runtime takes no lock, it can also
1462
+ have the origin wiped under that run, by starting or closing its own.)
1463
+ So can any frame in such a page,
1464
+ whatever site the frame is from: an ad, an embedded player, a widget, and
1465
+ whatever they frame in turn. None can run any other tile there, nor other
1466
+ bytes or headers. Run tiles on the origins their CIDs name only on pages
1467
+ whose frames you would let do this.
1380
1468
 
1381
1469
  ## Loading a tile
1382
1470
 
@@ -1622,8 +1710,9 @@ for (const post of document.querySelectorAll('.post')) {
1622
1710
  is left alone, and its tile is not even loaded.
1623
1711
  - It is **closed** when its place has been out of view for a while
1624
1712
  (`closeAfter`, ten seconds), with `tile.close()`: the frame goes and the
1625
- origin is wiped. Shown again, it starts afresh on another origin, so this is
1626
- for tiles whose state you do not mean to keep.
1713
+ origin is wiped. Shown again, it starts afresh, on another origin (or on
1714
+ the one its CID names, wiped), so this is for tiles whose state you do not
1715
+ mean to keep.
1627
1716
  - No more than `maxLive` (six) are **live at once**. When another tile needs
1628
1717
  the room, the live one that has been out of view longest is closed for it.
1629
1718
  A tile in view is never closed for another: the other waits.
package/dist/index.d.ts CHANGED
@@ -20,17 +20,26 @@ export interface MothershipConfig {
20
20
  * Whether a tile runs on the origin its own content names: `<cid>.<base>`,
21
21
  * where `<cid>` is the CID of the tile's manifest, as its loader computed
22
22
  * it from the bytes it loaded (the record's `tile` on AT, the header of a
23
- * .tile file). Such an origin is kept: what the tile stores there it finds
24
- * again the next time it runs, on any page of the same site. It is shared
25
- * by every run of that tile on that site, and a new version of the tile,
26
- * which has another manifest, starts on another origin, with nothing.
23
+ * .tile file). The name says which tile runs there, and nothing more: what
24
+ * the tile stores there goes as it does on an origin made for one load.
25
+ * The origin is wiped when the tile is closed, and before it starts, so a
26
+ * run never finds what an earlier one left, closed or not; and its frame
27
+ * is credentialless. The one difference is that the same tile shown twice
28
+ * on a page is on the same origin twice, with one store: its wipes wait
29
+ * for the last of them to be closed, and the first to start. So does a
30
+ * run of it in another page of the site, where the browser keeps one
31
+ * store for the site (another tab, in Firefox or Safari, or with a plain
32
+ * frame in Chrome), or from another copy of the loader on this page,
33
+ * when the loading server's runtime holds each run there to a lock its
34
+ * wipes wait for (its dock says so): a tile that starts beside such a run
35
+ * shares what it has, and the last of them to be closed has it wiped.
27
36
  *
28
37
  * Anyone can name such an origin, so the loading server's runtime holds it
29
38
  * to the one tile whose manifest it is named by, and the loader runs a
30
39
  * tile there only when the loading server says that its runtime does. A
31
40
  * tile its loader has no manifest bytes for (a webxdc tile, one in memory)
32
- * runs on an origin made for the load, as without this; `tile.ephemeral`
33
- * says which. False when left out. Not with `namedOrigin`.
41
+ * runs on an origin made for the load, as without this. False when left
42
+ * out. Not with `namedOrigin`.
34
43
  */
35
44
  cidOrigins?: boolean;
36
45
  /**
@@ -164,7 +173,8 @@ export interface StoppedEvent extends Event {
164
173
  * - `worker`: the runtime could not start the tile's service worker. Some
165
174
  * browsers refuse one to a frame of another site once the user blocks
166
175
  * cross-site storage.
167
- * - `unsupported`: the browser lacks what the runtime needs.
176
+ * - `unsupported`: the browser lacks what the runtime needs (on the origin
177
+ * named by the tile's CID, Web Locks with the rest).
168
178
  * - `content`: the tile's root document is not to be had: resolving it
169
179
  * failed, or the tile's worker gave up waiting for it (after a minute: a
170
180
  * deadline shorter than that has reported it first, as `timeout`).
@@ -172,6 +182,14 @@ export interface StoppedEvent extends Event {
172
182
  * the manifest it was handed: it is not the one that CID names, or not
173
183
  * one it could read (a .tile file whose header is not in DRISL's one
174
184
  * form). Nothing is served there.
185
+ * - `wipe`: the origin named by the tile's CID could not be wiped before the
186
+ * tile started there, twice, a few seconds apart (the loading server said
187
+ * it was not, or did not answer in time): what an earlier run left could
188
+ * still be there, so the tile is not run. Rendered again, it is tried
189
+ * again. A wipe that a run of the tile in another page there holds off
190
+ * is not one: the tile starts beside that run. (Only a runtime whose dock
191
+ * says that it holds runs to a lock holds a wipe off, and only its word
192
+ * that it did is taken.)
175
193
  *
176
194
  * A start (a frame the tile is attached to, each time it loads) fires one at
177
195
  * most. `worker` and `unsupported` are the runtime's own account, which
@@ -179,10 +197,11 @@ export interface StoppedEvent extends Event {
179
197
  * its frame says under any name: what runs on that origin can have the start
180
198
  * reported as failed, for any of these reasons. On an origin made for the
181
199
  * one load nothing of the tile's runs before it has started, and no other
182
- * tile is there; tiles that share a named origin can do it to one another.
200
+ * tile is there; tiles that share a named origin can do it to one another,
201
+ * and so can the runs of one tile on the origin its CID names.
183
202
  */
184
203
  export interface TileErrorEvent extends Event {
185
- reason: 'timeout' | 'version' | 'worker' | 'unsupported' | 'content' | 'integrity';
204
+ reason: 'timeout' | 'version' | 'worker' | 'unsupported' | 'content' | 'integrity' | 'wipe';
186
205
  /** With `timeout`: what the tile was still waiting for. */
187
206
  stage?: 'dock' | 'shuttle' | 'worker' | 'content';
188
207
  /** With `version`: the generation the dock named, when it named a number. */
@@ -196,7 +215,7 @@ export interface TileErrorEvent extends Event {
196
215
  export interface FrameOptions {
197
216
  /** The frame's sandbox attribute in full: `allow-scripts allow-same-origin allow-forms` when left out. */
198
217
  sandbox?: string;
199
- /** Whether the frame is credentialless: `true` or `false`; when left out, it is on an origin made for the load, and not on a named origin or the origin named by the tile's CID (`tile.ephemeral`). */
218
+ /** Whether the frame is credentialless: `true` or `false`; when left out, it is unless the tile runs on a named origin (`tile.ephemeral`). */
200
219
  credentialless?: boolean;
201
220
  /** The frame's tabindex, a whole number from -32767 to 32767: `-1` has the Tab key pass over the tile. None when left out. The focus guard takes a frame it guards out of the tab order whatever this says (see `tabOrder` in @dasl/tile-loader/guard). */
202
221
  tabindex?: number;
@@ -257,14 +276,17 @@ export declare class TileMothership {
257
276
  * `sizing` goes along: the shuttle measures the content of a tile that
258
277
  * declares `fit` (see @dasl/tile-loader/size). So does whether its origin
259
278
  * is its own, made for this load: one that is can be thrown away with it.
279
+ * The origin named by a tile's CID is wiped too, but by us, and not under
280
+ * another run of the tile there, which needs its worker: it is not this
281
+ * run's to throw away on its own.
260
282
  */
261
283
  loadPayload(tile: Tile): Record<string, unknown>;
262
284
  /** @internal How long a tile gets to start, in milliseconds; 0 for no deadline. */
263
285
  get startDeadline(): number;
264
286
  /**
265
- * Whether tiles get an origin of their own for every load (no
266
- * `namedOrigin`). With `cidOrigins`, those that have a CID to be named by
267
- * do not: see `tile.ephemeral`.
287
+ * Whether what tiles store goes with each run, their origins wiped (no
288
+ * `namedOrigin`): an origin of their own for every load, or, with
289
+ * `cidOrigins`, the one their CID names. See `tile.ephemeral`.
268
290
  */
269
291
  get ephemeral(): boolean;
270
292
  /**
@@ -280,7 +302,8 @@ export declare class TileMothership {
280
302
  originNamedIn(src: unknown): string | undefined;
281
303
  /**
282
304
  * @internal Has a tile origin wiped, from a frame of our own making: what
283
- * closing a tile comes down to once its frame is out of the document.
305
+ * closing a tile comes down to once its frame is out of the document, and
306
+ * what a tile on the origin named by its CID starts after.
284
307
  *
285
308
  * The wipe answers a page of the origin it empties and no one else, and
286
309
  * this page is not one. So a frame is made, out of sight, that loads the
@@ -301,6 +324,23 @@ export declare class TileMothership {
301
324
  * false when it says not, or says nothing for WIPE_MS.
302
325
  */
303
326
  wipeOrigin(origin: string, credentialless?: boolean): Promise<boolean>;
327
+ /**
328
+ * @internal Has a tile origin wiped, as wipeOrigin() does, and says how it
329
+ * went: `wiped`; `held`, not wiped because a run of the tile there holds
330
+ * the run's lock; or `failed`, not wiped, or not as far as can be told.
331
+ *
332
+ * On an origin named by a tile's CID the runs of that tile share one store
333
+ * with whatever other page of the site runs it, where the browser keeps
334
+ * one store for the site: another tab, another copy of the loader on this
335
+ * page. Each holds the run's lock for as long as it runs, and the runtime
336
+ * wipes nothing while one does (see the run's lock in @dasl/tile-server's
337
+ * dock/dock.js): the last of them to be closed has it wiped. Only a runtime
338
+ * whose dock says that it holds runs to the lock (`lock` in its ready
339
+ * message, which that of @dasl/tile-server 4.0.0 does not say) is taken
340
+ * at its word that one does: from any other, a wipe that was not done is
341
+ * one that failed.
342
+ */
343
+ clearOrigin(origin: string, credentialless?: boolean): Promise<'wiped' | 'held' | 'failed'>;
304
344
  addLoader(loader: TileLoader): void;
305
345
  removeLoader(loader: TileLoader): void;
306
346
  /** The origin of the loading server: where the dock is, and so who we talk to. */
@@ -331,6 +371,13 @@ export declare class TileMothership {
331
371
  */
332
372
  loadTile(url: string, options?: TileLoadOptions): Promise<Tile | false>;
333
373
  }
374
+ interface SharedOrigin {
375
+ origin: string;
376
+ credentialless: boolean;
377
+ tiles: Set<WeakRef<Tile>>;
378
+ ready: Promise<boolean>;
379
+ again: boolean;
380
+ }
334
381
  export declare class Tile extends EventTarget {
335
382
  #private;
336
383
  constructor(mothership: TileMothership, url: string, manifest: AnyMasl, pathLoader: TilePathLoader, identity?: TileIdentity);
@@ -349,13 +396,18 @@ export declare class Tile extends EventTarget {
349
396
  /** @internal The bytes of its manifest, and their CID, where its loader has them. */
350
397
  get manifestBytes(): TileIdentity['manifestBytes'];
351
398
  /**
352
- * Whether the origin this tile runs on is made for one load and wiped when
353
- * it is closed. It is unless its mothership names an origin for its tiles
354
- * (`namedOrigin`), or runs them on the origin named by their CID
355
- * (`cidOrigins`) and this tile has a CID to be named by: such an origin is
356
- * kept, for the tile to find what it stored there again.
399
+ * Whether what this tile stores goes with each run of it: the origin it
400
+ * runs on is wiped when it is closed, and holds nothing from before when
401
+ * it starts. It is, on an origin made for one load and on the origin named
402
+ * by its CID (`cidOrigins`), unless its mothership names an origin for its
403
+ * tiles (`namedOrigin`): that one is kept, for a tile to find what it
404
+ * stored there again.
357
405
  */
358
406
  get ephemeral(): boolean;
407
+ /** @internal The origin named by a CID this run of the tile shares with the page's other tiles there, if it has started there. */
408
+ get sharedOrigin(): string | undefined;
409
+ /** @internal Whether this tile runs on that store now: it has started there, in a frame that is in the document. */
410
+ runsOn(shared: SharedOrigin): boolean;
359
411
  /**
360
412
  * @internal The bytes of the manifest that names this tile's origin, when
361
413
  * it runs on the origin named by its CID: what that origin's runtime is
@@ -384,7 +436,8 @@ export declare class Tile extends EventTarget {
384
436
  * this one run of the tile. It is the same address every time it is asked
385
437
  * for, so that it can sit in a template that is rendered again and again,
386
438
  * until the tile is closed: after that it is another run, on another
387
- * origin.
439
+ * origin. (With `cidOrigins`, the origin its CID names, every run: the
440
+ * next one finds it wiped.)
388
441
  */
389
442
  getLoadSource(): string;
390
443
  /**
@@ -421,7 +474,20 @@ export declare class Tile extends EventTarget {
421
474
  * one.
422
475
  */
423
476
  failed(reason: TileErrorEvent['reason'], detail?: Pick<TileErrorEvent, 'stage' | 'generation'>): void;
424
- /** @internal Tells the runtime in the frame to load the tile. */
477
+ /**
478
+ * @internal Tells the runtime in the frame to load the tile. On an origin
479
+ * named by a CID, the first tile of the page to start there has it wiped
480
+ * first, whatever an earlier run left there, closed or not (a page that
481
+ * went without closing it, one that crashed): the runtime is told once
482
+ * that is done, and is not told at all if it was not, the second time it
483
+ * was tried either (`wipe`). A tile that starts there while another of
484
+ * the page runs there finds what that one has: they share the origin, and
485
+ * wiping it would take it from that one.
486
+ * A frame that loads again goes on with the run it is in, unless it was
487
+ * out of the document while the others there went on without it (they
488
+ * may have had the origin wiped meanwhile, or be about to): then it
489
+ * starts there as any other tile does.
490
+ */
425
491
  start(): void;
426
492
  /** @internal The runtime says it has cleaned up. */
427
493
  runtimeClosed(): void;
@@ -442,8 +508,11 @@ export declare class Tile extends EventTarget {
442
508
  * reach is what the tile left in the browser. Every tile runs on an origin
443
509
  * made for that one load, and its worker's registration, and anything the
444
510
  * tile stored, would stay there for good. `close()` has that origin wiped
445
- * (not a named origin, `namedOrigin`, nor the origin named by the tile's
446
- * CID, `cidOrigins`: both are kept on purpose, see `tile.ephemeral`).
511
+ * (not a named origin, `namedOrigin`, which is kept on purpose: see
512
+ * `tile.ephemeral`). So it does the origin named by the tile's CID
513
+ * (`cidOrigins`), but only once the last tile of the page there is
514
+ * closed: the same tile shown twice on a page is on it twice, and the
515
+ * other still needs what is there.
447
516
  *
448
517
  * It does not matter what became of the frame first, nor what the tile
449
518
  * did. The frame's address names the origin (getLoadSource() does, and so
@@ -461,8 +530,11 @@ export declare class Tile extends EventTarget {
461
530
  * CLOSE_MS to answer. Out of the document, there is no one to ask.
462
531
  *
463
532
  * What it resolves to: true when the origin was wiped, and when the tile
464
- * never started (there was nothing to wipe); false for a named origin and
465
- * for the origin named by the tile's CID, which are kept, and when the
533
+ * never started (there was nothing to wipe); false for a named origin,
534
+ * which is kept; for the origin named by the tile's CID while another tile
535
+ * of the page still runs there, whose close has it wiped, or a run of
536
+ * another page (another tab of the site, another copy of the loader)
537
+ * holds it to its lock, which the runtime does not wipe under; and when the
466
538
  * wipe could not be done or was not confirmed, which is also logged as a
467
539
  * warning.
468
540
  */
@@ -492,11 +564,11 @@ export declare class Tile extends EventTarget {
492
564
  * everything inside cookies and storage of its own, empty to begin with
493
565
  * and gone with the page, and keeps its password manager out. Other
494
566
  * browsers ignore the attribute. When nothing is said, the frame is
495
- * credentialless if the tile's origin was made for this one load
496
- * (`tile.ephemeral`): nothing is lost by its storage going with the page.
497
- * A named origin, or the origin named by the tile's CID, is there for a
498
- * tile to find its storage again, which such a frame loses with every
499
- * page, so its frame is a plain one. `true` or
567
+ * credentialless if what the tile stores goes with its run
568
+ * (`tile.ephemeral`), on an origin made for this one load or on the one
569
+ * its CID names: nothing is lost by its storage going with the page. A
570
+ * named origin is there for a tile to find its storage again, which such
571
+ * a frame loses with every page, so its frame is a plain one. `true` or
500
572
  * `false` for a host that wants it otherwise, either way, and anything
501
573
  * else throws.
502
574
  *
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAwCA,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAE7E,MAAM,WAAW,gBAAgB;IAC/B,+FAA+F;IAC/F,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;;;;;;OAUG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oFAAoF;IACpF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;;;;;;;;;;;;OAeG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,WAAW,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;IACjC;;;;;;;;OAQG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,2DAA2D;IAC3D,MAAM,CAAC,EAAE,UAAU,CAAC;CACrB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,UAAU;IACzB;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,oEAAoE;IACpE,YAAY,CAAC,EAAE,MA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