@descix/frqtl-web 0.6.1-p3.4 → 0.6.1

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 (47) hide show
  1. package/CLAUDE.md +11 -13
  2. package/LICENSE.md +63 -79
  3. package/README.md +7 -9
  4. package/dist/artifact/double-slit.html +1 -1
  5. package/dist/dist-manifest.json +37 -42
  6. package/dist/frqtl/compat/providers/wasm-load-browser.js +1 -2
  7. package/dist/frqtl/compat/renderer/providers/godrays-layer.js +12 -301
  8. package/dist/frqtl/compat/renderer/providers/p5-provider.js +0 -6
  9. package/dist/frqtl/compat/renderer/providers/three-provider.js +17 -66
  10. package/dist/frqtl/objects/FrqtlApp.js +1 -17
  11. package/dist/frqtl/objects/RecipeContext.js +41 -38
  12. package/dist/frqtl/objects/objects/QuantumEmitter.js +1 -1
  13. package/dist/frqtl/objects/objects/sustainedSource.js +2 -2
  14. package/dist/frqtl/objects/record/Record.js +9 -4
  15. package/dist/frqtl/objects/setup/setupConeEmitter3D.js +3 -3
  16. package/dist/frqtl/objects/setup/setupSphereEmitter3D.js +6 -8
  17. package/dist/frqtl/parts/FrqtlVision.js +27 -158
  18. package/dist/frqtl/parts/GraphingDetectorWall.js +1 -1
  19. package/dist/frqtl/parts/LiveChart.js +1 -1
  20. package/dist/frqtl/parts/SphereEmitter.js +2 -2
  21. package/dist/frqtl/parts/Tunnel.js +1 -1
  22. package/dist/frqtl/parts/Wall.js +10 -97
  23. package/dist/frqtl/scenes/dse-tunnel-rebuild.js +22 -33
  24. package/dist/frqtl/scenes/mirror-route.js +6 -10
  25. package/dist/frqtl-web.min.js +51 -56
  26. package/dist/notebooks/notebooks.json +1 -1
  27. package/dist/sdk.html +2 -3
  28. package/dist/shim/controls/index.js +2 -2
  29. package/dist/shim/engine/router.js +30 -49
  30. package/dist/shim/field-descriptor/index.js +5 -5
  31. package/dist/shim/host/host-view.js +10 -7
  32. package/dist/shim/host/index.js +1 -2
  33. package/dist/shim/project/index.js +3 -13
  34. package/dist/shim/project/record-format.js +4 -96
  35. package/dist/shim/project/specifiers.js +3 -5
  36. package/dist/shim/registry/exhibits.js +11 -11
  37. package/dist/shim/registry/index.js +0 -6
  38. package/dist/shim/registry/walkthrough.js +90 -38
  39. package/dist/shim/render/capture-envelope.js +0 -21
  40. package/dist/shim/render/sun-look.js +11 -6
  41. package/llms.txt +8 -9
  42. package/package.json +2 -3
  43. package/dist/shim/engine/site-graph.js +0 -184
  44. package/dist/shim/host/device.js +0 -42
  45. package/dist/shim/project/parts-spelling.js +0 -77
  46. package/dist/shim/registry/showcase-link.js +0 -61
  47. package/dist/shim/registry/studio-landing.js +0 -70
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 1,
3
- "description": "Curated FRQTL native-notebook index \u2014 the BROWSER's list/group index. It is the shipped set: the packages and the static site serve this file as released. scripts/notebook-runnability.mjs measures whether every row can RUN on the WASM-only math dist (the names each notebook's cells use against the names the built math dist exposes), and scripts/assemble-static-deploy.mjs refuses a site bundle holding a row that cannot; an unrunnable notebook is fixed in its cells or its row here, never by a site rewrite. id is the file stem (no .html); ?notebook=<id> round-trips through the presets.js sanitizer charset [a-zA-Z0-9._-]. firstContact is the id FAT opens on when no ?notebook= is named; lib/shim/notebook/catalog.js firstContactNotebook is its one reader and fails loud when it is absent or not a roster id.",
3
+ "description": "Curated FRQTL native-notebook index \u2014 the BROWSER's list/group index. It does NOT own the shipped set: scripts/notebook-runnability.mjs owns which curated notebooks the static site can actually RUN (the intersection of the names each notebook's cells use and the names the built math dist exposes), and scripts/assemble-static-deploy.mjs consumes that decision for the site bundle. A row here is a precondition for a notebook being reachable, not a guarantee it ships. id is the file stem (no .html); ?notebook=<id> round-trips through the presets.js sanitizer charset [a-zA-Z0-9._-]. firstContact is the id FAT opens on when no ?notebook= is named; lib/shim/notebook/catalog.js firstContactNotebook is its one reader and fails loud when it is absent or not a roster id.",
4
4
  "firstContact": "iso-entropy-log",
5
5
  "notebooks": [
6
6
  {
package/dist/sdk.html CHANGED
@@ -132,7 +132,7 @@ universe.experimentTickFunctions.push(<span class="keyword">function</span> (u)
132
132
 
133
133
  <p>In the browser (<code>@descix/frqtl-web</code>), <code>bootScene(mount, sketch)</code> boots the engine and the renderer and runs a sketch — a <code>buildExperiment(exp)</code> function whose first statement creates the world. Import the parts the sketch uses from the same dist the doors come from:</p>
134
134
 
135
- <pre><code><span class="keyword">const</span> DIST = <span class="string">'https://cdn.jsdelivr.net/npm/@descix/frqtl-web@0.6.1-p3.4/dist'</span>;
135
+ <pre><code><span class="keyword">const</span> DIST = <span class="string">'https://cdn.jsdelivr.net/npm/@descix/frqtl-web@0.6.1/dist'</span>;
136
136
  <span class="keyword">const</span> { bootScene } = <span class="keyword">await</span> import(DIST + <span class="string">'/frqtl/experiments/_shared/doors.js'</span>);
137
137
  <span class="keyword">const</span> { SphereEmitter } = <span class="keyword">await</span> import(DIST + <span class="string">'/frqtl/parts/index.js'</span>);
138
138
 
@@ -343,8 +343,7 @@ screen.getCollisionHistogram(tickData); <span class="comment">// y -> count on
343
343
  <tr><th>Method</th><th>Description</th></tr>
344
344
  <tr><td><code>setV2Prop(prop, value)</code></td><td>Retarget a lexicon field live (collisionBehavior / bounceDirection / decoherence / hooks / markTag / countFilter / capacity / orientationDeg / pitchDeg) — recompiles the running op-program. <code>emissivity</code> is also accepted and takes the short path: a radiator knob, so it retunes the live radiator with no recompile</td></tr>
345
345
  <tr><td><code>getCollisionHistogram(tickData)</code></td><td>For a wall carrying the <code>count</code> hook: accumulate and return <code>{combined, grid, total}</code> hit counts</td></tr>
346
- <tr><td><code>getLiveCount(tickData)</code></td><td>For a NON-removing wall with the count hook (<code>nothing</code> / <code>block</code> / <code>bounce</code>): the number of frames inside its zone this tick — the wall's rect padded by one cell of the frames' scale, so a full-area <code>nothing</code> wall reads the live population. Throws on a <code>destroy</code> or <code>absorb</code> wall: use <code>getArrivals</code></td></tr>
347
- <tr><td><code>getArrivals(tickData)</code></td><td>For a wall with the count hook: <code>{total, delta}</code> read from the engine's own per-wall count — each frame that triggers the wall counts once (on a <code>destroy</code>/<code>absorb</code> wall, once per frame removed). <code>total</code> is cumulative; <code>delta</code> is the change since the previous sampled tick</td></tr>
346
+ <tr><td><code>getLiveCount(tickData)</code></td><td>For a wall with the count hook: the number of frames colliding this tick (live population)</td></tr>
348
347
  <tr><td><code>resetHistogram()</code></td><td>Clear the accumulated histogram</td></tr>
349
348
  <tr><td><code>dispose()</code></td><td>Tear down (unregisters any host tick-fn, disposes the inner LargeObject)</td></tr>
350
349
  <tr><td><code>setOrientation(deg)</code> / <code>getOrientation()</code></td><td>Live re-aim (see <code>orientationDeg</code> below)</td></tr>
@@ -82,8 +82,8 @@
82
82
  // vector — an ordered numeric tuple, written WHOLE (never a torn per-component
83
83
  // write). THE placement/drag answer (census #4/#5, Transport Fit §2):
84
84
  // covers x/y(/z), the 2D rect [l,t,w,h], the 3D 6-tuple
85
- // [l,t,z,w,h,d] (LargeObject.rect already documents z/d — see
86
- // reference_lo_z_depth_wire_contract), and rgb [r,g,b]. Length is
85
+ // [l,t,z,w,h,d] (LargeObject.rect already documents z/d),
86
+ // and rgb [r,g,b]. Length is
87
87
  // FREE (not fixed at construction) — a 2-tuple, 4-tuple, and 6-tuple
88
88
  // are all the same kind, just different `value.length`. Shape:
89
89
  // {id,label,value,min,max,step,fmt,onChange,bind} — `min`/`max`/`step`
@@ -35,10 +35,6 @@
35
35
 
36
36
  'use strict';
37
37
 
38
- // The static site's shape (graph dir, build stamp, build id, entry page, package placements) — owned by site-graph.js,
39
- // imported from there by every consumer; the router uses them and does not re-export them.
40
- import { SITE_GRAPH_DIR, SITE_BUILD_ATTR, SITE_BUILD_ID_RE, STATIC_APP_PAGE, SITE_PLACEMENTS } from './site-graph.js';
41
-
42
38
  // ── Path profiles ────────────────────────────────────────────────────────────
43
39
  //
44
40
  // Each profile maps a frqtl-relative prefix → URL prefix.
@@ -152,8 +148,8 @@ var DIST_PROFILE = buildDistProfile('../..');
152
148
  // lib/shim/engine/test/router.test.mjs asserts them against the two
153
149
  // package.json#version fields so a forgotten bump fails `make verify`, not a
154
150
  // silent stale-CDN-URL bug.
155
- var CDN_SDK_VERSION = '0.6.1-p3.4'; // sdk/frqtl-web/package.json#version (the ONE version owner) — bound by router.test.mjs
156
- var CDN_MATH_SDK_VERSION = '0.3.3-p2.1'; // sdk/egpt-math-sdk/package.json#version — bound by router.test.mjs; bumped with each npm publish
151
+ var CDN_SDK_VERSION = '0.6.1'; // sdk/frqtl-web/package.json#version (the ONE version owner) — bound by router.test.mjs
152
+ var CDN_MATH_SDK_VERSION = '0.3.3'; // sdk/egpt-math-sdk/package.json#version — bound by router.test.mjs; bumped with each npm publish
157
153
 
158
154
  /**
159
155
  * The jsdelivr dist root of @descix/frqtl-web at `version` — the ONE spelling of the package's CDN URL.
@@ -270,71 +266,51 @@ var CDN_PROFILE = buildCdnProfile(CDN_BASE);
270
266
  // THE DELIBERATE DIVERGENCE FROM CDN_PROFILE (design §A.3 / §E flag 4):
271
267
  // CDN_PROFILE's math + notebook bases are hardwired CROSS-ORIGIN at CDN_MATH_BASE; the
272
268
  // static-site semantic is "everything self-contained under ONE origin prefix": the math SDK
273
- // is co-served at its SITE_PLACEMENTS directory under graphBase and the curated notebooks ride the
274
- // frqtl-web dist's OWN copy at '<its placement>/notebooks'. A DISTINCT profile here is the
269
+ // is co-served at graphBase + '/egpt-math-sdk/...' and the curated notebooks ride the
270
+ // frqtl-web dist's OWN copy at graphBase + '/notebooks'. A DISTINCT profile here is the
275
271
  // correct DRY call — the SAME justification that keeps CDN_PROFILE distinct from DIST_PROFILE.
276
272
  //
277
- // buildStaticProfile(graphBase, entryBase) — every GRAPH key anchors at its package's placement
278
- // under `graphBase` (site-graph.js::SITE_PLACEMENTS — the directory fact; the router stays the URL
279
- // authority); the general 'experiments/' key (the experiment ENTRY pages STUDIO/GYM frame) anchors
280
- // at `entryBase`. Both are required: a host whose entries and graph share one directory passes
273
+ // buildStaticProfile(graphBase, entryBase) — every GRAPH key anchors at `graphBase`; the
274
+ // general 'experiments/' key (the experiment ENTRY pages STUDIO/GYM frame) anchors at
275
+ // `entryBase`. Both are required: a host whose entries and graph share one directory passes
281
276
  // the same base twice.
282
-
283
- // The two packages the static profile places (site-graph.js::SITE_PLACEMENTS rows); router.test.mjs binds them to the
284
- // sdk/*/package.json names and to the CDN bases above. The CDN URLs stay literal: G-PIN (scripts/test/cdn-pins.test.mjs)
285
- // reads them as text.
286
- var FRQTL_WEB_PACKAGE_NAME = '@descix/frqtl-web';
287
- var MATH_SDK_PACKAGE = '@descix/egpt-math-sdk';
288
-
289
- /**
290
- * The URL of `pkg`'s placement under `graphBase` (no trailing slash). THROWS for a package no
291
- * SITE_PLACEMENTS row places.
292
- * @param {string} graphBase
293
- * @param {string} pkg
294
- * @returns {string}
295
- */
296
- function placedBase(graphBase, pkg) {
297
- var row = SITE_PLACEMENTS.find(function (r) { return r.package === pkg; });
298
- if (!row) {
299
- throw new Error('[engineRouter] no site-graph.js::SITE_PLACEMENTS row places ' + pkg + ' (rows: ' +
300
- SITE_PLACEMENTS.map(function (r) { return r.package; }).join(', ') + ').');
301
- }
302
- return row.dir ? graphBase + '/' + row.dir : graphBase;
303
- }
304
-
305
277
  function buildStaticProfile(graphBase, entryBase) {
306
278
  if (!graphBase || !entryBase) {
307
279
  throw new Error('[engineRouter] buildStaticProfile(graphBase, entryBase) needs both bases (got ' +
308
280
  JSON.stringify(graphBase) + ', ' + JSON.stringify(entryBase) + ') — the graph and the entry ' +
309
281
  'pages are anchored separately; a co-served host passes the same base twice.');
310
282
  }
311
- var webBase = placedBase(graphBase, FRQTL_WEB_PACKAGE_NAME);
312
- var mathBase = placedBase(graphBase, MATH_SDK_PACKAGE);
313
283
  return {
314
284
  // THE package root: the GRAPH (immutable per build) at its lib-identity placement.
315
- '__frqtlRoot': webBase + '/',
316
- 'assets/models/': webBase + '/js/models/',
285
+ '__frqtlRoot': graphBase + '/',
286
+ 'assets/models/': graphBase + '/js/models/',
317
287
  // The experiment pages are ENTRIES: resolve('experiments/{id}/index.html') is the fixed page,
318
288
  // which itself points into the graph.
319
289
  'experiments/': entryBase + '/experiments/',
320
290
  // Math + notebook lanes anchored SAME-ORIGIN into the co-served payload —
321
291
  // the deliberate divergence from CDN_PROFILE. See the factory docstring.
322
- '__mathSdkUrl': mathBase + '/index.js',
323
- '__mathWasmUrl': mathBase + '/wasm/egpt_math_sdk_wasm_bg.wasm',
324
- '__mathWasmModuleUrl': mathBase + '/wasm/egpt_math_sdk_wasm.js',
292
+ '__mathSdkUrl': graphBase + '/egpt-math-sdk/index.js',
293
+ '__mathWasmUrl': graphBase + '/egpt-math-sdk/wasm/egpt_math_sdk_wasm_bg.wasm',
294
+ '__mathWasmModuleUrl': graphBase + '/egpt-math-sdk/wasm/egpt_math_sdk_wasm.js',
325
295
  '__mathBackend': 'wasm-math',
326
296
  // Notebooks come from the frqtl-web dist's OWN copy (build.js copyDir
327
297
  // lib/notebooks → dist/notebooks) — NOT under egpt-math-sdk (design §A.3/§B.1).
328
- '__notebookBase': webBase + '/notebooks',
298
+ '__notebookBase': graphBase + '/notebooks',
329
299
  // Vendor import-map root — frqtl-web's OWN dist/vendor/ (same as CDN, self-
330
300
  // sufficient), just same-origin instead of jsdelivr.
331
- '__vendorBase': webBase + '/vendor'
301
+ '__vendorBase': graphBase + '/vendor'
332
302
  };
333
303
  }
334
304
 
335
- // The static site's sdk directory, relative to the site's document (site-graph.js::SITE_GRAPH_DIR);
336
- // the entries sit directly in it, the graph under its build-stamped child.
337
- var STATIC_SDK_DIR = './' + SITE_GRAPH_DIR;
305
+ // The static site's sdk directory, relative to the site's document. The ONLY place it is
306
+ // spelled; the entries sit directly in it, the graph under its build-stamped child.
307
+ var STATIC_SDK_DIR = './pub';
308
+
309
+ // The <html> attribute carrying the static site's build id — the cross-repo contract
310
+ // (egpt-frqtl scripts/refresh-site.sh reads it). Every reader and writer names it through here.
311
+ var SITE_BUILD_ATTR = 'data-frqtl-site-build';
312
+ // A build id: the 8-hex-digit short sha of the commit the bundle was built from.
313
+ var SITE_BUILD_ID_RE = /^[0-9a-f]{8}$/;
338
314
 
339
315
  /**
340
316
  * The validated build id, or a thrown error naming what was supplied.
@@ -405,6 +381,11 @@ function documentSiteBuild() {
405
381
  return assertSiteBuildId(attr);
406
382
  }
407
383
 
384
+ // The static IDE bundle's entry document, beside its front page. The bundle ships THIS name and no
385
+ // index.html: a site's index.html is the publisher's front page (lib/shim/host/host-view.js::HOST_FRONT_PAGE),
386
+ // which the IDE brand links home to.
387
+ var STATIC_APP_PAGE = 'app.html';
388
+
408
389
  // The static IDE bundle's own chunk directory (vite assetsDir), relative to the document. Not
409
390
  // `assets/`: the DeSciX platform routes `/assets/` on an app subdomain to app MEDIA, not the site.
410
391
  var STATIC_APP_ASSETS_DIR = 'app-assets';
@@ -526,7 +507,7 @@ var _assertProfileParity = (function () {
526
507
  * // CDN mode (static hosting — the artifact host shell has no server, no page anchor):
527
508
  * const cdnRouter = engineRouter({ mode: 'cdn', engine: 'wasm' });
528
509
  * console.log(cdnRouter.resolve('compat/engine.js'));
529
- * // 'https://cdn.jsdelivr.net/npm/@descix/frqtl-web@0.6.1-p3.4/dist/frqtl/compat/engine.js'
510
+ * // 'https://cdn.jsdelivr.net/npm/@descix/frqtl-web@0.6.1/dist/frqtl/compat/engine.js'
530
511
  *
531
512
  * // CDN mode, self-hosted: a copy of dist/ served from the consumer's own origin:
532
513
  * const selfHosted = engineRouter({ mode: 'cdn', engine: 'wasm', base: 'https://example.org/vendor/frqtl-web/dist' });
@@ -706,4 +687,4 @@ export function engineRouter(opts) {
706
687
 
707
688
 
708
689
  // Export profiles for the sdk build to consume.
709
- export { LIB_IDENTITY_PREFIXES, DEV_CORE_PROFILE, DIST_PROFILE, CDN_PROFILE, STATIC_SDK_DIR, STATIC_APP_ASSETS_DIR, STATIC_HOST_VIEW_ENTRY, CDN_SDK_VERSION, CDN_MATH_SDK_VERSION, CDN_BASE, cdnDistBaseFor, CDN_MATH_BASE, buildCdnProfile, buildDistProfile, buildStaticProfile, staticGraphDir, staticSdkBase, staticEntryBase };
690
+ export { LIB_IDENTITY_PREFIXES, DEV_CORE_PROFILE, DIST_PROFILE, CDN_PROFILE, STATIC_SDK_DIR, STATIC_APP_PAGE, STATIC_APP_ASSETS_DIR, STATIC_HOST_VIEW_ENTRY, SITE_BUILD_ATTR, SITE_BUILD_ID_RE, CDN_SDK_VERSION, CDN_MATH_SDK_VERSION, CDN_BASE, cdnDistBaseFor, CDN_MATH_BASE, buildCdnProfile, buildDistProfile, buildStaticProfile, staticGraphDir, staticSdkBase, staticEntryBase };
@@ -199,8 +199,8 @@ var UX_HANDLE_ZONES = Object.freeze([
199
199
  'scale-t', 'scale-b', 'scale-l', 'scale-r'
200
200
  ]);
201
201
 
202
- // The keys of a ux `draggable` block. Declared data only: STUDIO's Hand drag (2D and 3D) moves
203
- // any declared object with a position authority and does not read it.
202
+ // The render modes a part may be cursor-dragged in. Only 2D: a 3D scene never cursor-drags
203
+ // (reposition is the aim + SPACE carry), so there is no per-object 3D knob to declare.
204
204
  var UX_DRAGGABLE_MODES = Object.freeze(['2d']);
205
205
 
206
206
  // When a manipulable object's visual shell renders (generalizes the
@@ -236,8 +236,8 @@ function _uxFail(msg) {
236
236
  * resizable — boolean (default true). false ⇒ scale handles are never
237
237
  * offered even for the SELECTED object (its corners never
238
238
  * resize; the first-and-every interaction is select/move).
239
- * draggable — { '2d':boolean } (default true). Declared data only: no STUDIO
240
- * surface reads it ('3d' is not a key).
239
+ * draggable — { '2d':boolean } (default true). false disables the 2D
240
+ * cursor-drag. (A 3D scene never cursor-drags; '3d' is not a key.)
241
241
  * handles — string[] ⊆ UX_HANDLE_ZONES (default = ALL zones). The
242
242
  * live interaction zones; a zone NOT listed is downgraded
243
243
  * to 'move' by the overlay (never a resize on the selecting
@@ -273,7 +273,7 @@ function normalizeUx(partial) {
273
273
  Object.keys(partial.draggable).forEach(function (k) {
274
274
  if (UX_DRAGGABLE_MODES.indexOf(k) === -1) {
275
275
  _uxFail('"draggable.' + k + '" is not a draggable mode ([' + UX_DRAGGABLE_MODES.join(', ') +
276
- ']).');
276
+ ']) — a 3D scene never cursor-drags.');
277
277
  }
278
278
  });
279
279
  var dr = { '2d': true };
@@ -35,9 +35,16 @@
35
35
  export const HOST_SDK_SCRIPT = 'DeSciXAppSDK.js';
36
36
 
37
37
  /**
38
- * The publisher's front page, beside the IDE entry (site-graph.js::STATIC_APP_PAGE). PUBLISHER-provided
38
+ * The attribute that declares a file host-provided, on the element that consumes it, in the
39
+ * bytes the browser executes. Both the bundle gate (the file must be ABSENT from the bundle) and
40
+ * the publisher (the file must be PRESENT beside the page) read the set from this attribute.
41
+ */
42
+ export const HOST_PROVIDED_ATTR = 'data-frqtl-host-provided';
43
+
44
+ /**
45
+ * The publisher's front page, beside the IDE entry (router.js::STATIC_APP_PAGE). PUBLISHER-provided
39
46
  * like HOST_SDK_SCRIPT: the static build declares it once as `<link rel="home" href=HOST_FRONT_PAGE
40
- * site-graph.js::HOST_PROVIDED_ATTR>` (apps/ide/vite.config.js), the bundle gate asserts the bundle does not ship
47
+ * HOST_PROVIDED_ATTR>` (apps/ide/vite.config.js), the bundle gate asserts the bundle does not ship
41
48
  * it, and lib/features/ide/home-link.js::homeHrefOf reads the declaration back.
42
49
  */
43
50
  export const HOST_FRONT_PAGE = 'index.html';
@@ -76,7 +83,7 @@ export const CONTRACT_VIOLATIONS = Object.freeze({
76
83
  'view-no-available': Object.freeze({ setCalls: 0, means: 'view has no available() function' }),
77
84
  'view-no-set': Object.freeze({ setCalls: 0, means: 'view has no set() function' }),
78
85
  'available-threw': Object.freeze({ setCalls: 0, means: 'view.available() threw' }),
79
- 'view-no-modes': Object.freeze({ setCalls: 0, means: 'a fallback was given but view.MODES is not published as the contract\'s object (absent, or an array)' }),
86
+ 'view-no-modes': Object.freeze({ setCalls: 0, means: 'a fallback was given but view.MODES is not published' }),
80
87
  'set-threw': Object.freeze({ setCalls: 1, means: 'view.set(mode) threw (or view.set(fallback), the mode view.MODES offered)' }),
81
88
  'set-returned-other': Object.freeze({ setCalls: 1, means: 'view.set(mode) returned something other than the mode it was asked for' }),
82
89
  });
@@ -184,10 +191,6 @@ export async function declareHostView({ sdk, mode, fallback, root } = {}) {
184
191
  if (!modes || typeof modes !== 'object') {
185
192
  return violated(target, 'view-no-modes', 'fallback given but view.MODES is not published (got ' + String(modes) + ')');
186
193
  }
187
- if (Array.isArray(modes)) {
188
- return violated(target, 'view-no-modes', 'fallback given but view.MODES is an array ([' + modes.join(', ') + ']), ' +
189
- 'not the published { NAME: mode } object');
190
- }
191
194
  const offered = Object.values(modes);
192
195
  const list = '[' + offered.join(', ') + ']';
193
196
  if (!offered.includes(mode)) {
@@ -3,8 +3,7 @@
3
3
  /**
4
4
  * index.js — the published door to the host-view declarer: `@descix/frqtl-web/host-view` and
5
5
  * `@descix/frqtl-node/host-view`. Exactly the names below, re-exported from THE declarer (host-view.js); its
6
- * static-build vocabulary (HOST_FRONT_PAGE) stays FRAQTL's own. The host-provided attribute a publisher reads is
7
- * published by `./site-graph` (site-graph.js::HOST_PROVIDED_ATTR).
6
+ * static-build vocabulary (HOST_PROVIDED_ATTR, HOST_FRONT_PAGE) stays FRAQTL's own.
8
7
  *
9
8
  * HOST_VIEW_EXPORTS the published names (the parity gate holds both packages' ./host-view to this table)
10
9
  *
@@ -13,14 +13,7 @@
13
13
  * parseManifest, serializeManifest, manifestFor manifest.js (THE owner of frqtl.json)
14
14
  * RECORD_FILES, RECORD_KEYS, CHANGE_KEYS, OPS, BY,
15
15
  * CLIP_SECONDS, CLIP_NAME, clipName, jsonText,
16
- * rowFaults, recordFolderFaults, applyRows record-format.js (THE owner of the Record folder's shape and
17
- * of its change rows' shape and meaning: rowFaults checks one row,
18
- * applyRows applies them to a block)
19
- *
20
- * The entry stands alone: it loads the parts roster (every published kind registers on import, objects/kinds.js),
21
- * so applyRows can spell a 6-number rect by its kind's descriptor with nothing else imported. The roster is imported
22
- * HERE, by the package door, and never by record-format.js: a scene page reaches record-format statically
23
- * (RecipeContext → Record.js) and loads the roster only in its boot's modules phase, where a failed part is reported.
16
+ * recordFolderFaults record-format.js (THE owner of the Record folder's shape)
24
17
  *
25
18
  * PROJECT_EXPORTS is this entry's export list; a conformance test holds the module's exports equal to
26
19
  * it, and the package gate holds it equal across @descix/frqtl-web and @descix/frqtl-node.
@@ -31,14 +24,11 @@ export const PROJECT_EXPORTS = Object.freeze(['FRQTL_WEB_SPECIFIERS', 'libPathOf
31
24
  'linkProject', 'sketchProject', 'SKETCH_ENTRY', 'projectIdentity',
32
25
  'MANIFEST_FILE', 'MANIFEST_KEYS', 'normalizeManifest', 'parseManifest', 'serializeManifest', 'manifestFor',
33
26
  'RECORD_FILES', 'RECORD_KEYS', 'CHANGE_KEYS', 'OPS', 'BY', 'CLIP_SECONDS', 'CLIP_NAME', 'clipName', 'jsonText',
34
- 'rowFaults', 'recordFolderFaults', 'applyRows']);
35
-
36
- // The parts roster (see above): a side-effect import, so ./project stands alone.
37
- import '../../frqtl/parts/index.js';
27
+ 'recordFolderFaults']);
38
28
 
39
29
  export { FRQTL_WEB_SPECIFIERS, libPathOf, importMapFor, pageImportMapFor, FRQTL_WEB_HOST_SPECIFIERS } from './specifiers.js';
40
30
  export { linkProject, sketchProject, SKETCH_ENTRY } from './link.js';
41
31
  export { projectIdentity } from './identity.js';
42
32
  export { MANIFEST_FILE, MANIFEST_KEYS, normalizeManifest, parseManifest, serializeManifest, manifestFor } from './manifest.js';
43
33
  export { RECORD_FILES, RECORD_KEYS, CHANGE_KEYS, OPS, BY, CLIP_SECONDS, CLIP_NAME, clipName, jsonText,
44
- rowFaults, recordFolderFaults, applyRows } from './record-format.js';
34
+ recordFolderFaults } from './record-format.js';
@@ -22,14 +22,9 @@
22
22
  * CLIP_SECONDS { min, max } — the length of one clip, in seconds of playback
23
23
  * CLIP_NAME the clip file pattern; clipName(n) → 'clip-NN.mp4' (n from 1)
24
24
  * jsonText(v) JSON.stringify(v, null, 2) + '\n' — every JSON file of the folder
25
- * rowFaults(row, at?) → string[] [] for a valid change row, every fault by name otherwise — THE one shape check of
26
- * a row (its keys, tick, name, by, op in OPS, from/to per op); recordFolderFaults, applyRows and
27
- * serializeRecordFolder ask it, so a host checking a row before it writes or applies one asks it too
28
25
  * recordFolderFaults(files) → string[] [] for a complete §6 folder, every fault by name otherwise
29
26
  * serializeRecordFolder(parts) → { files, record, clips } | { empty: true } THE writer (Record.js calls it;
30
27
  * it runs recordFolderFaults on its own output and THROWS on any fault)
31
- * applyRows(partsBlock, rows) → partsBlock THE applier: a parts block with change rows applied in order (a new
32
- * block; the input is never mutated)
33
28
  *
34
29
  * `files` is a tree { path → string | Uint8Array }: JSON and project text as strings (or UTF-8 bytes), clips
35
30
  * as bytes. Values in §6 files are strict JSON, in record.json's own vocabulary; a placeholder ("*",
@@ -38,7 +33,6 @@
38
33
 
39
34
  import { MANIFEST_FILE } from './manifest.js';
40
35
  import { entryOf } from './link.js';
41
- import { spellRect, spellCenter } from './parts-spelling.js';
42
36
 
43
37
  /** The folder's §6 paths. */
44
38
  export const RECORD_FILES = Object.freeze({
@@ -131,17 +125,8 @@ function _placement(v) {
131
125
 
132
126
  const MOVE_SHAPE = 'move carries from/to as ONE key, {center: [x, y, z]} or {rect: [4 numbers flat | 6 with a z-extent]}, the same key and length in both';
133
127
 
134
- /**
135
- * rowFaults(row, at?) → string[] — THE shape check of one change row: [] when valid, otherwise every fault by name.
136
- * Checks the keys (exactly CHANGE_KEYS), `tick` (a whole tick ≥ 0), `name` (the declared name), `by` (one of BY),
137
- * `op` (one of OPS) and `from`/`to` (strict JSON, in that op's shape; a move that moves nothing is a fault).
138
- * A row alone carries no folder facts: tickRange, tick order and one shape per name's moves are recordFolderFaults'.
139
- * @param {*} c the row
140
- * @param {string} [at='row'] the row's label at the head of each fault (e.g. 'changes[3]')
141
- * @returns {string[]}
142
- */
143
- export function rowFaults(c, at) {
144
- if (at === undefined) { at = 'row'; }
128
+ /** The faults of one change row against its op. */
129
+ function _rowFaults(c, at) {
145
130
  const bad = [];
146
131
  if (!_isPlain(c)) { return [at + ' is not a change {' + CHANGE_KEYS.join(', ') + '}']; }
147
132
  const keys = Object.keys(c);
@@ -240,7 +225,7 @@ export function recordFolderFaults(files) {
240
225
  let last = -Infinity;
241
226
  rec.changes.forEach(function (c, i) {
242
227
  const at = RECORD_FILES.record + ' changes[' + i + ']';
243
- rowFaults(c, at).forEach(function (f) { bad.push(f); });
228
+ _rowFaults(c, at).forEach(function (f) { bad.push(f); });
244
229
  if (!_isPlain(c)) { return; }
245
230
  if (Number.isInteger(c.tick)) {
246
231
  if (range && (c.tick < range[0] || c.tick > range[1])) { bad.push(at + ' at tick ' + c.tick + ' lies outside tickRange ' + JSON.stringify(range)); }
@@ -344,7 +329,7 @@ export function serializeRecordFolder(p) {
344
329
  // Check the rows as HELD, before any text: JSON.stringify writes NaN/Infinity as null and drops an undefined key,
345
330
  // so a check of the written text would read a different value from the one the Record held.
346
331
  const held = [];
347
- record.changes.forEach(function (c, i) { held.push.apply(held, rowFaults(c, 'changes[' + i + ']')); });
332
+ record.changes.forEach(function (c, i) { held.push.apply(held, _rowFaults(c, 'changes[' + i + ']')); });
348
333
  if (held.length) { throw new Error('[record-format] a change row is not strict JSON: ' + held.join('; ') + ' (FAIL-LOUD.)'); }
349
334
  const files = {};
350
335
  files[RECORD_FILES.record] = jsonText(record);
@@ -358,80 +343,3 @@ export function serializeRecordFolder(p) {
358
343
  }
359
344
  return { files: files, record: record, clips: clips.map(function (c, i) { return { file: clipName(i + 1), firstTick: c.firstTick, lastTick: c.lastTick }; }) };
360
345
  }
361
-
362
- // ── the applier ─────────────────────────────────────────────────────────────────
363
-
364
- function _applyFail(i, msg) {
365
- throw new Error('[record-format] applyRows: rows[' + i + '] ' + msg + '. (FAIL-LOUD.)');
366
- }
367
-
368
- /** The element count an entry's `center` value spells, or null. */
369
- function _centerLength(props) {
370
- return Array.isArray(props.center) ? props.center.length : null;
371
- }
372
-
373
- /**
374
- * applyRows(partsBlock, rows) → partsBlock — THE applier of §6 change rows to a parts block
375
- * ({ "<name>": ["<registered kind name>", {props}] }, the parts.before.json / parts.after.json value), in order. Pure:
376
- * returns a NEW block; neither argument is mutated. Per op (OPS):
377
- * move entry `name` takes `to`'s one position key, spelled in the entry's own form
378
- * setDeclared entry `name` takes each key of `to`, spelled in the entry's own form
379
- * add `to` becomes entry `name`, as the LAST key
380
- * remove entry `name` is dropped
381
- * fork entry `name`'s kind becomes `to.kind` (its props are unchanged)
382
- * The spelling is the writer's own rule (parts-spelling.js spellRect / spellCenter: a 6-number rect beside spelled
383
- * `z`/`depth` keys, a two-number center), read off the block, so a block a hand changed and the rows that change
384
- * wrote agree: applyRows(parts.before, record.changes) is parts.after. A 6-number rect row asks its kind's descriptor
385
- * (ObjectSchema.derivedReads): the ./project entry (index.js) imports the parts roster, so every published kind is
386
- * registered wherever ./project is loaded, and a scene page has registered them by its boot's modules phase; a
387
- * project's own kind (a fork's parts/<Kind>.js) is registered when its module is imported. This module itself imports
388
- * no part: the scene page reaches it statically (RecipeContext → Record.js), and a static barrel import here would load
389
- * every part with the page module, ahead of the boot record (a failed part would then leave no boot banner).
390
- * THROWS, naming the row index and the offending value: a block that is not { name: [kind name, {props}] }; rows
391
- * that are not an array; a row rowFaults names (an op that is not one of OPS, its keys, its from/to shape — the
392
- * faults in the error); a 6-number rect row on a kind no imported module registered; a name the block does not
393
- * hold (move, setDeclared, remove, fork) or already holds (add); a fork whose `from` is not the entry's kind.
394
- * @param {Object<string, [string, object]>} partsBlock
395
- * @param {object[]} rows
396
- * @returns {Object<string, [string, object]>}
397
- */
398
- export function applyRows(partsBlock, rows) {
399
- const block = _partsValue(partsBlock, 'applyRows partsBlock');
400
- if (!Array.isArray(rows)) {
401
- throw new TypeError('[record-format] applyRows(partsBlock, rows): rows is the list of change rows (record.json changes), got ' +
402
- JSON.stringify(rows) + '. (FAIL-LOUD.)');
403
- }
404
- rows.forEach(function (row, i) {
405
- const faults = rowFaults(row, 'rows[' + i + ']');
406
- if (faults.length) { _applyFail(i, 'is not a change row: ' + faults.join('; ')); }
407
- const name = row.name;
408
- const has = Object.prototype.hasOwnProperty.call(block, name);
409
- if (row.op === 'add') {
410
- if (has) { _applyFail(i, 'adds "' + name + '", which the block already holds as ' + JSON.stringify(block[name])); }
411
- block[name] = JSON.parse(JSON.stringify(row.to));
412
- return;
413
- }
414
- if (!has) {
415
- _applyFail(i, '(' + row.op + ') names the part "' + name + '", which the block does not hold (parts: ' +
416
- Object.keys(block).join(', ') + ')');
417
- }
418
- const entry = block[name];
419
- if (row.op === 'remove') { delete block[name]; return; }
420
- if (row.op === 'fork') {
421
- if (entry[0] !== row.from) {
422
- _applyFail(i, 'forks "' + name + '" from the kind ' + JSON.stringify(row.from) + ', but the block declares it as ' + JSON.stringify(entry[0]));
423
- }
424
- block[name] = [row.to.kind, entry[1]];
425
- return;
426
- }
427
- // move / setDeclared: the row's capture-form values, spelled in the entry's own form.
428
- const props = JSON.parse(JSON.stringify(row.to));
429
- const own = entry[1];
430
- try {
431
- spellRect(props, { kind: entry[0], baseline: row.from, entryKeys: function () { return Object.keys(own); } });
432
- spellCenter(props, { entryKeys: function () { return Object.keys(own); }, centerLength: function () { return _centerLength(own); } });
433
- } catch (e) { throw new Error('[record-format] applyRows: rows[' + i + '] (' + row.op + ') of "' + name + '": ' + ((e && e.message) || String(e))); }
434
- block[name] = [entry[0], Object.assign({}, own, props)];
435
- });
436
- return block;
437
- }
@@ -20,7 +20,7 @@
20
20
  * stay prefixes. No filesystem computation, so a vendored dist root
21
21
  * takes the same call.
22
22
  * FRQTL_WEB_HOST_SPECIFIERS rows { specifier, libPath, why } a HOST PAGE imports and a sketch never does:
23
- * ./boot (FRQTL_WEB_BOOT, the scene doors), ./registry, ./project, ./host-view and ./site-graph. libPathOf
23
+ * ./boot (FRQTL_WEB_BOOT, the scene doors), ./registry and ./project. libPathOf
24
24
  * refuses every one of them, so a sketch cannot boot a page.
25
25
  * pageImportMapFor(libRootUrl) → importMapFor(libRootUrl) plus every FRQTL_WEB_HOST_SPECIFIERS row: the map
26
26
  * of a page that boots a scene through the doors and runs sketches beside it.
@@ -103,13 +103,11 @@ export const FRQTL_WEB_BOOT = Object.freeze({ specifier: '@descix/frqtl-web/boot
103
103
  export const FRQTL_WEB_HOST_SPECIFIERS = Object.freeze([
104
104
  FRQTL_WEB_BOOT,
105
105
  Object.freeze({ specifier: '@descix/frqtl-web/registry', libPath: 'shim/registry/index.js',
106
- why: 'the walk-through rungs, the showcase roster, the scene list (sceneGroups), projectOf, showcaseHref + showcaseUrl + SHOWCASE_SITE, STUDIO\'s deep-link landing record' }),
106
+ why: 'the walk-through rungs, the showcase roster, the scene list (sceneGroups), projectOf' }),
107
107
  Object.freeze({ specifier: '@descix/frqtl-web/project', libPath: 'shim/project/index.js',
108
108
  why: 'the specifier table, the link site, sketchProject and the project identity' }),
109
109
  Object.freeze({ specifier: '@descix/frqtl-web/host-view', libPath: 'shim/host/index.js',
110
- why: 'the DeSciX host-view declarer: a page declares its own view' }),
111
- Object.freeze({ specifier: '@descix/frqtl-web/site-graph', libPath: 'shim/engine/site-graph.js',
112
- why: 'the static site\'s shape: the graph directory, the build-stamp attribute, the build id pattern, the IDE entry page, the host-provided attribute' })
110
+ why: 'the DeSciX host-view declarer: a page declares its own view' })
113
111
  ]);
114
112
 
115
113
  /** The package a self-reference names. */
@@ -5,7 +5,7 @@
5
5
  * roster scene the GYM plays, and the showcase copy around them (the intro card, the through-line
6
6
  * and the one invitation). It is the ONE owner of every word of that copy.
7
7
  *
8
- * EXHIBITS is the ONE source for the front-page tiles (their links: showcase-link.js::showcaseHref) and the scene card:
8
+ * EXHIBITS is the ONE source for the front-page tiles, their GYM deep links and the scene card:
9
9
  * nine rows in front-page order, each
10
10
  * `{ kind, id, mode, title, tile, what, why, how, controls, still }`.
11
11
  * - `kind` is 'rung' (a walk-through rung, lib/shim/registry/walkthrough.js); `id` resolves there. A row of
@@ -162,18 +162,9 @@ assertShowcaseIntro(SHOWCASE_INTRO);
162
162
  // (the egpt-frqtl front page's #proof tiles: each tile's <b> and its sentence), verbatim;
163
163
  // `what`, `why`, `how`, `controls` and each `still.alt` are the authored captions.
164
164
  const ROSTER = [
165
- {
166
- kind: 'rung', id: "cl1d-mirror-route", mode: "3d",
167
- still: { tick: 3600, alt: "Ten brightly coloured mirror blocks in a ring, seen face-on, one cyan block on the right standing inside the ring out of its place; a thick, glowing band of gold, red, pink and green light swirls around a dark centre holding faint purple and green eddies, and green and pink rays reach out between the mirrors into the dark." },
168
- title: "Infinite mirror",
169
- tile: "Ten mirrors in a ring. Light walks the loop. No Fresnel equations.",
170
- what: "Ten mirrors in a ring. Light goes round and round the loop, reflected and diffused from mirror to mirror, each mirror colouring the light it sends on.",
171
- why: "Conventional renderers cut every light path off after a set number of bounces and treat shadows, reflections and indirect light as separate effects. Solving the light directly in a 5 m room would take Frontier about 3 billion years.",
172
- how: "One emitter and ten walls set as mirrors. Light leaves in every direction; shadowing, reflection and obstruction are all live, with no limit on the objects in its path, and the diffusion is real. No Fresnel equations.",
173
- },
174
165
  {
175
166
  kind: 'rung', id: "dse-tunnel-rebuild", mode: "3d",
176
- still: { tick: 7200, alt: "Three red blocks with blue slit walls between them, seen at a tilt from behind the source; a fan of yellow rays spreads from a point at lower left into the slits, and beyond them, at upper right, a heat-map plate of blue and green squares shows light and dark bands with a red hot spot at its centre." },
167
+ still: { tick: 7200, alt: "Three red blocks with blue slit walls between them inside a dark glass box; a cloud of yellow dots hangs above the slits, and below them a flat heat-map plate of blue squares glows yellow-green along a central band." },
177
168
  title: "Double slit",
178
169
  tile: "Two slits, one particle at a time. Feynman's “only mystery,” with no amplitudes to add.",
179
170
  what: "Particles go through two slits one at a time, and bright and dark bands build up on the detector plate below them, live in your browser tab: the pattern Feynman called quantum mechanics' \"only mystery\". EGPT conceptually holds computer science and physics are linked by P=NP and the principle of least action - that is, everything in reality is efficiently computable. The Lean RET, the derivation of EntropyReal from an IIDParticleSource, and the P=NP capstones are modern formalizations of proofs and ideas advanced by Gian-Carlo Rota circa the late 1970s. The EGPT Lean proofs transparently show the most rigorously advanced proofs ever offered for bridging not only quantum and classical mechanics but mathematics and all the other sciences. Watch it run, read its code, and judge for yourself whether this is true P=NP quantum computing.",
@@ -189,6 +180,15 @@ const ROSTER = [
189
180
  why: "Games paint glow and god rays onto the finished picture as a separate screen effect, aimed from where the sun is on the screen rather than from any light in the scene.",
190
181
  how: "One sphere emitter, shining in every direction. The god rays are rendered from the density of the particles themselves. No Standard Model, no equations, and the engine does not know whether you are looking at a star, a candle flame or an atom.",
191
182
  },
183
+ {
184
+ kind: 'rung', id: "cl1d-mirror-route", mode: "3d",
185
+ still: { tick: 1200, alt: "Ten brightly coloured mirrors in a ring, seen from above; a dense band of gold, orange and green dots circles a dark, empty centre inside it, and faint gold and green rays fan out from that light between the mirrors into the dark space around." },
186
+ title: "Infinite mirror",
187
+ tile: "Ten mirrors in a ring. Light walks the loop. No Fresnel equations.",
188
+ what: "Ten mirrors in a ring. Light goes round and round the loop, reflected and diffused from mirror to mirror, each mirror colouring the light it sends on.",
189
+ why: "Conventional renderers cut every light path off after a set number of bounces and treat shadows, reflections and indirect light as separate effects. Solving the light directly in a 5 m room would take Frontier about 3 billion years.",
190
+ how: "One emitter and ten walls set as mirrors. Light leaves in every direction; shadowing, reflection and obstruction are all live, with no limit on the objects in its path, and the diffusion is real. No Fresnel equations.",
191
+ },
192
192
  {
193
193
  kind: 'rung', id: "r5-fountain-pool",
194
194
  still: { tick: 300, alt: "A dark teal surface scattered with white glints like light on water, with a faint ring around a dark dot at its centre." },
@@ -11,15 +11,9 @@
11
11
  * exhibits.js the showcase roster
12
12
  * scene-roster.js sceneGroups() — THE scene list both views show (the showcase, then the walk-through groups)
13
13
  * scene-source.js projectOf(id, { mode }) — a rung as a project folder + its renderState (fetch in a page, file read in node)
14
- * showcase-link.js showcaseHref(row), showcaseUrl(row), SHOWCASE_SITE — a showcase tile's link (relative, absolute)
15
- * and the site that serves it; `row` is an element of THIS barrel's EXHIBITS
16
- * studio-landing.js STUDIO_LANDING_ATTR, STUDIO_LANDING_OUTCOMES, recordStudioLanding — how STUDIO resolved the deep
17
- * link it opened with, recorded on <html> (what a gate following a tile reads)
18
14
  */
19
15
 
20
16
  export * from './walkthrough.js';
21
17
  export * from './exhibits.js';
22
18
  export * from './scene-roster.js';
23
19
  export * from './scene-source.js';
24
- export * from './showcase-link.js';
25
- export * from './studio-landing.js';