@descix/frqtl-web 0.6.0 → 0.6.1-p2.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.
@@ -35,6 +35,10 @@
35
35
 
36
36
  'use strict';
37
37
 
38
+ // The static site's shape (graph dir, build stamp, build id, entry page) — owned by site-graph.js, imported from
39
+ // 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 } from './site-graph.js';
41
+
38
42
  // ── Path profiles ────────────────────────────────────────────────────────────
39
43
  //
40
44
  // Each profile maps a frqtl-relative prefix → URL prefix.
@@ -148,7 +152,7 @@ var DIST_PROFILE = buildDistProfile('../..');
148
152
  // lib/shim/engine/test/router.test.mjs asserts them against the two
149
153
  // package.json#version fields so a forgotten bump fails `make verify`, not a
150
154
  // silent stale-CDN-URL bug.
151
- var CDN_SDK_VERSION = '0.6.0'; // sdk/frqtl-web/package.json#version (the ONE version owner) — bound by router.test.mjs
155
+ var CDN_SDK_VERSION = '0.6.1-p2.1'; // sdk/frqtl-web/package.json#version (the ONE version owner) — bound by router.test.mjs
152
156
  var CDN_MATH_SDK_VERSION = '0.3.2'; // sdk/egpt-math-sdk/package.json#version — bound by router.test.mjs; bumped with each npm publish
153
157
 
154
158
  /**
@@ -302,15 +306,9 @@ function buildStaticProfile(graphBase, entryBase) {
302
306
  };
303
307
  }
304
308
 
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}$/;
309
+ // The static site's sdk directory, relative to the site's document (site-graph.js::SITE_GRAPH_DIR);
310
+ // the entries sit directly in it, the graph under its build-stamped child.
311
+ var STATIC_SDK_DIR = './' + SITE_GRAPH_DIR;
314
312
 
315
313
  /**
316
314
  * The validated build id, or a thrown error naming what was supplied.
@@ -381,11 +379,6 @@ function documentSiteBuild() {
381
379
  return assertSiteBuildId(attr);
382
380
  }
383
381
 
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
-
389
382
  // The static IDE bundle's own chunk directory (vite assetsDir), relative to the document. Not
390
383
  // `assets/`: the DeSciX platform routes `/assets/` on an app subdomain to app MEDIA, not the site.
391
384
  var STATIC_APP_ASSETS_DIR = 'app-assets';
@@ -507,7 +500,7 @@ var _assertProfileParity = (function () {
507
500
  * // CDN mode (static hosting — the artifact host shell has no server, no page anchor):
508
501
  * const cdnRouter = engineRouter({ mode: 'cdn', engine: 'wasm' });
509
502
  * console.log(cdnRouter.resolve('compat/engine.js'));
510
- * // 'https://cdn.jsdelivr.net/npm/@descix/frqtl-web@0.6.0/dist/frqtl/compat/engine.js'
503
+ * // 'https://cdn.jsdelivr.net/npm/@descix/frqtl-web@0.6.1-p2.1/dist/frqtl/compat/engine.js'
511
504
  *
512
505
  * // CDN mode, self-hosted: a copy of dist/ served from the consumer's own origin:
513
506
  * const selfHosted = engineRouter({ mode: 'cdn', engine: 'wasm', base: 'https://example.org/vendor/frqtl-web/dist' });
@@ -687,4 +680,4 @@ export function engineRouter(opts) {
687
680
 
688
681
 
689
682
  // Export profiles for the sdk build to consume.
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 };
683
+ 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 };
@@ -0,0 +1,44 @@
1
+ /* Copyright 2023-2026 by Essam Abadir */
2
+
3
+ /**
4
+ * site-graph.js — the shape of a static FRQTL site: the names a site's documents carry and the
5
+ * directory its build-stamped graph sits in. The ONE owner and the ONE import door of each: lib/shim/engine/router.js
6
+ * and every other consumer import them from here (the router never re-exports them), and a node consumer that reads a SERVED
7
+ * site (a publisher's gate) imports them through the package export `@descix/frqtl-web/site-graph`
8
+ * (or `@descix/frqtl-node/site-graph`), never typing them.
9
+ *
10
+ * SITE_GRAPH_DIR 'pub' — the site directory holding the fixed entries and, under
11
+ * SITE_GRAPH_DIR/<build>/, the build-stamped module graph
12
+ * SITE_BUILD_ATTR the <html> attribute of the IDE document carrying <build>
13
+ * SITE_BUILD_ID_RE a <build>: the 8-hex-digit short sha of the commit the bundle was built from
14
+ * STATIC_APP_PAGE the IDE bundle's entry document, beside the publisher's front page
15
+ * HOST_PROVIDED_ATTR the attribute declaring a file host-provided (the publisher vendors it beside the page)
16
+ * SITE_GRAPH_EXPORTS the published names (the parity gate holds both packages' ./site-graph to this table)
17
+ *
18
+ * Host-neutral ESM with no imports: it loads unchanged in node and in a page.
19
+ */
20
+
21
+ /** The names `./site-graph` publishes. */
22
+ export const SITE_GRAPH_EXPORTS = Object.freeze(['SITE_GRAPH_DIR', 'SITE_BUILD_ATTR', 'SITE_BUILD_ID_RE', 'STATIC_APP_PAGE', 'HOST_PROVIDED_ATTR']);
23
+
24
+ /** The static site's graph directory name (the entries sit in it, the graph under its build-stamped child). */
25
+ export const SITE_GRAPH_DIR = 'pub';
26
+
27
+ /** The <html> attribute carrying the static site's build id — the cross-repo contract. */
28
+ export const SITE_BUILD_ATTR = 'data-frqtl-site-build';
29
+
30
+ /** A build id: the 8-hex-digit short sha of the commit the bundle was built from. */
31
+ export const SITE_BUILD_ID_RE = /^[0-9a-f]{8}$/;
32
+
33
+ /**
34
+ * The static IDE bundle's entry document, beside its front page. The bundle ships THIS name and no
35
+ * index.html: a site's index.html is the publisher's front page (lib/shim/host/host-view.js::HOST_FRONT_PAGE).
36
+ */
37
+ export const STATIC_APP_PAGE = 'app.html';
38
+
39
+ /**
40
+ * The attribute that declares a file host-provided, on the element that consumes it, in the bytes the browser
41
+ * executes (the static build writes it: apps/ide/vite.config.js). Both the bundle gate (the file must be ABSENT from
42
+ * the bundle) and the publisher (the file must be PRESENT beside the page) read the set from this attribute.
43
+ */
44
+ export const HOST_PROVIDED_ATTR = 'data-frqtl-host-provided';
@@ -35,16 +35,9 @@
35
35
  export const HOST_SDK_SCRIPT = 'DeSciXAppSDK.js';
36
36
 
37
37
  /**
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
38
+ * The publisher's front page, beside the IDE entry (site-graph.js::STATIC_APP_PAGE). PUBLISHER-provided
46
39
  * like HOST_SDK_SCRIPT: the static build declares it once as `<link rel="home" href=HOST_FRONT_PAGE
47
- * HOST_PROVIDED_ATTR>` (apps/ide/vite.config.js), the bundle gate asserts the bundle does not ship
40
+ * site-graph.js::HOST_PROVIDED_ATTR>` (apps/ide/vite.config.js), the bundle gate asserts the bundle does not ship
48
41
  * it, and lib/features/ide/home-link.js::homeHrefOf reads the declaration back.
49
42
  */
50
43
  export const HOST_FRONT_PAGE = 'index.html';
@@ -83,7 +76,7 @@ export const CONTRACT_VIOLATIONS = Object.freeze({
83
76
  'view-no-available': Object.freeze({ setCalls: 0, means: 'view has no available() function' }),
84
77
  'view-no-set': Object.freeze({ setCalls: 0, means: 'view has no set() function' }),
85
78
  'available-threw': Object.freeze({ setCalls: 0, means: 'view.available() threw' }),
86
- 'view-no-modes': Object.freeze({ setCalls: 0, means: 'a fallback was given but view.MODES is not published' }),
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)' }),
87
80
  'set-threw': Object.freeze({ setCalls: 1, means: 'view.set(mode) threw (or view.set(fallback), the mode view.MODES offered)' }),
88
81
  'set-returned-other': Object.freeze({ setCalls: 1, means: 'view.set(mode) returned something other than the mode it was asked for' }),
89
82
  });
@@ -191,6 +184,10 @@ export async function declareHostView({ sdk, mode, fallback, root } = {}) {
191
184
  if (!modes || typeof modes !== 'object') {
192
185
  return violated(target, 'view-no-modes', 'fallback given but view.MODES is not published (got ' + String(modes) + ')');
193
186
  }
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
+ }
194
191
  const offered = Object.values(modes);
195
192
  const list = '[' + offered.join(', ') + ']';
196
193
  if (!offered.includes(mode)) {
@@ -3,7 +3,8 @@
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_PROVIDED_ATTR, HOST_FRONT_PAGE) stays FRAQTL's own.
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).
7
8
  *
8
9
  * HOST_VIEW_EXPORTS the published names (the parity gate holds both packages' ./host-view to this table)
9
10
  *
@@ -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 and ./project. libPathOf
23
+ * ./boot (FRQTL_WEB_BOOT, the scene doors), ./registry, ./project, ./host-view and ./site-graph. 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,11 +103,13 @@ 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' }),
106
+ why: 'the walk-through rungs, the showcase roster, the scene list (sceneGroups), projectOf, showcaseHref + showcaseUrl + SHOWCASE_SITE, STUDIO\'s deep-link landing record' }),
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' })
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' })
111
113
  ]);
112
114
 
113
115
  /** 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 GYM deep links and the scene card:
8
+ * EXHIBITS is the ONE source for the front-page tiles (their links: showcase-link.js::showcaseHref) 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
@@ -11,9 +11,15 @@
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)
14
18
  */
15
19
 
16
20
  export * from './walkthrough.js';
17
21
  export * from './exhibits.js';
18
22
  export * from './scene-roster.js';
19
23
  export * from './scene-source.js';
24
+ export * from './showcase-link.js';
25
+ export * from './studio-landing.js';
@@ -0,0 +1,61 @@
1
+ /* Copyright 2023-2026 by Essam Abadir */
2
+
3
+ /**
4
+ * showcase-link.js — the ONE writer of a showcase tile's link: where a roster row opens on the site that serves
5
+ * the IDE. Every front page (the publisher sites, Gods World) composes its tile hrefs from these two names and types
6
+ * no query, page or origin of its own.
7
+ *
8
+ * showcaseHref(row) → 'app.html?preset=author&walkthrough=<id>[&mode=<mode>]', relative to the serving site's root:
9
+ * the IDE entry page (site-graph.js::STATIC_APP_PAGE) opened on STUDIO at the row's rung. `mode`
10
+ * is the row's EFFECTIVE mode (exhibits.js normalizes it: on a multi-mode rung the mode the row
11
+ * names, else the rung's default; null on a single-mode rung, which carries no `mode`), so the
12
+ * link opens the mode the tile's still shows.
13
+ * showcaseUrl(row) → the same link, absolute on SHOWCASE_SITE.origin: what a front page on ANY other origin uses.
14
+ * Whether a page links relative (it is the serving site) or absolute is the page's own fact.
15
+ * SHOWCASE_SITE → { app, origin } — the DeSciX app that serves the IDE and its public origin.
16
+ *
17
+ * `row` must be an element of the EXHIBITS array imported from the SAME module instance (the ./registry export):
18
+ * a copied, JSON-deserialized or second-copy row is refused, loudly.
19
+ *
20
+ * It writes no IDE state: the query is a link, read by the one parser (lib/features/ide/deep-link.js::parseDeepLink).
21
+ * The shim cannot import that parser (shim → features is illegal), so the binding is a round-trip conformance test
22
+ * in lib/features/ide/test/showcase-link-round-trip.test.mjs: for every EXHIBITS row the parsed link shows STUDIO,
23
+ * names the row's rung and mode, and is refused by nothing.
24
+ *
25
+ * Host-neutral ESM: it runs unchanged in node and in a page (the `./registry` export).
26
+ */
27
+
28
+ import { STATIC_APP_PAGE } from '../engine/site-graph.js';
29
+ import { EXHIBITS } from './exhibits.js';
30
+
31
+ /** The IDE surface a showcase tile opens: STUDIO (presets.js PRESETS.author; the round-trip test binds the two). */
32
+ const SHOWCASE_SURFACE = 'author';
33
+
34
+ /** The DeSciX app serving the IDE every showcase tile opens, and its public origin (no trailing slash). */
35
+ export const SHOWCASE_SITE = Object.freeze({ app: 'egpt-frqtl', origin: 'https://egpt-frqtl.descix.net' });
36
+
37
+ /**
38
+ * @param {object} row an element of EXHIBITS (exhibits.js)
39
+ * @returns {string} the tile's link, relative to the serving site's root
40
+ * @throws {Error} a row that is not on the roster
41
+ */
42
+ export function showcaseHref(row) {
43
+ if (EXHIBITS.indexOf(row) === -1) {
44
+ throw new Error('[showcase-link] showcaseHref(row): not a showcase roster row — pass an element of EXHIBITS ' +
45
+ '(lib/shim/registry/exhibits.js), got ' + JSON.stringify(row && { kind: row.kind, id: row.id }) + '. (FAIL-LOUD.)');
46
+ }
47
+ const params = new URLSearchParams();
48
+ params.set('preset', SHOWCASE_SURFACE);
49
+ params.set('walkthrough', row.id);
50
+ if (row.mode !== null) { params.set('mode', row.mode); }
51
+ return STATIC_APP_PAGE + '?' + params.toString();
52
+ }
53
+
54
+ /**
55
+ * @param {object} row an element of EXHIBITS (exhibits.js), from the same module instance
56
+ * @returns {string} the tile's link, absolute on SHOWCASE_SITE.origin
57
+ * @throws {Error} a row that is not on the roster
58
+ */
59
+ export function showcaseUrl(row) {
60
+ return new URL(showcaseHref(row), SHOWCASE_SITE.origin + '/').href;
61
+ }
@@ -0,0 +1,67 @@
1
+ /* Copyright 2023-2026 by Essam Abadir */
2
+
3
+ /**
4
+ * studio-landing.js — the ONE record of how STUDIO resolved the deep link it opened with, as host-view.js records
5
+ * its view outcome: STUDIO's resolver (lib/features/ide/studio-landing-of.js::studioLandingOf) decides the row and
6
+ * AuthorView.jsx writes it on `document.documentElement` under STUDIO_LANDING_ATTR, through recordStudioLanding,
7
+ * and a gate that opens a link (a showcase tile, showcase-link.js) reads that attribute instead of STUDIO's DOM or
8
+ * its error copy.
9
+ *
10
+ * STUDIO_LANDING_ATTR the <html> attribute carrying the outcome id
11
+ * STUDIO_LANDING_OUTCOMES the closed table: one row per branch of STUDIO's link resolution, `{ id, means }`
12
+ * recordStudioLanding(root, id) writes `id` on `root` (an Element, or null to only validate); an id outside the
13
+ * table THROWS — that is a defect in the writer, never a landing
14
+ *
15
+ * The rows are the branches the resolution already takes, no more: the link's keys are read by the one parser
16
+ * (lib/features/ide/deep-link.js) and the refusal of a key STUDIO does not own is its deepLinkRefusalOf. `ok` says the
17
+ * linked scene RESOLVED and was handed to STUDIO's selection path; whether that scene then boots is the boot record's
18
+ * business (boot-phases.js), not this one's.
19
+ *
20
+ * Lives in the registry, published by `./registry`: the outcome is the landing of the link showcaseHref writes, so a
21
+ * gate following a tile takes both from one module instance; the parser's own home (lib/features) has no package
22
+ * door, and shim may not import features.
23
+ *
24
+ * Host-neutral ESM with no imports: it runs unchanged in node and in a page.
25
+ */
26
+
27
+ /** The <html> attribute STUDIO records its deep-link landing on. */
28
+ export const STUDIO_LANDING_ATTR = 'data-frqtl-studio-landing';
29
+
30
+ /** The closed table of STUDIO deep-link landings, in the order the resolver tests them (lib/features/ide/test/studio-landing-of.test.mjs holds it). */
31
+ export const STUDIO_LANDING_OUTCOMES = Object.freeze([
32
+ { id: 'refused-key',
33
+ means: 'the link carries a key STUDIO does not own, or a deleted key (deep-link.js deepLinkRefusalOf): the refusal is on the deep-link strip and the opening rung opens' },
34
+ { id: 'conflict',
35
+ means: 'the link names both a walkthrough and a saved project: nothing opens' },
36
+ { id: 'mode-without-walkthrough',
37
+ means: 'the link names a mode and no walkthrough: nothing opens' },
38
+ { id: 'unknown-walkthrough',
39
+ means: 'the linked walkthrough is not in the walkthrough registry (walkthroughById): nothing opens' },
40
+ { id: 'unknown-mode',
41
+ means: 'the linked mode is not one the linked rung declares (walkthroughModes): nothing opens' },
42
+ { id: 'project-unreadable',
43
+ means: 'the linked saved project is present but its folder is refused by the load: nothing opens' },
44
+ { id: 'project-not-found',
45
+ means: 'no saved project of the linked name in this browser: nothing opens' },
46
+ { id: 'ok',
47
+ means: 'the linked walkthrough (in the linked mode, else its default) or saved project resolved and was handed to STUDIO\'s selection path' },
48
+ { id: 'first-contact',
49
+ means: 'no STUDIO deep link: the walkthrough registry\'s opening rung opens' },
50
+ ].map(Object.freeze));
51
+
52
+ const IDS = new Set(STUDIO_LANDING_OUTCOMES.map((r) => r.id));
53
+
54
+ /**
55
+ * @param {Element|null} root the document element STUDIO runs in (null: validate only)
56
+ * @param {string} id a STUDIO_LANDING_OUTCOMES id
57
+ * @returns {string} id
58
+ * @throws {Error} an id the table does not list
59
+ */
60
+ export function recordStudioLanding(root, id) {
61
+ if (!IDS.has(id)) {
62
+ throw new Error('[studio-landing] \'' + id + '\' is not a STUDIO_LANDING_OUTCOMES row — declared: [' +
63
+ [...IDS].join(', ') + ']. (FAIL-LOUD.)');
64
+ }
65
+ if (root) { root.setAttribute(STUDIO_LANDING_ATTR, id); }
66
+ return id;
67
+ }
package/llms.txt CHANGED
@@ -2,22 +2,23 @@
2
2
 
3
3
  > A discrete cellular-automata physics engine (compiled Rust → WASM) for the browser: interference,
4
4
  > blackbody spectra and binding emerge from per-pixel rules (1 px/tick, single occupancy, momentum).
5
- > 0.6.0 on npm dist-tag `latest`. Node twin: @descix/frqtl-node.
5
+ > 0.6.1-p2.1 on npm dist-tag `next`. Node twin: @descix/frqtl-node.
6
6
 
7
7
  - Install: `npm install @descix/frqtl-web`
8
- - Live page (claude.ai artifact-safe): https://cdn.jsdelivr.net/npm/@descix/frqtl-web@0.6.0/dist/artifact/double-slit.html
9
- - One-file form (global FRQTL): https://cdn.jsdelivr.net/npm/@descix/frqtl-web@0.6.0/dist/frqtl-web.min.js — example https://cdn.jsdelivr.net/npm/@descix/frqtl-web@0.6.0/dist/artifact/sun.html
8
+ - Live page (claude.ai artifact-safe): https://cdn.jsdelivr.net/npm/@descix/frqtl-web@0.6.1-p2.1/dist/artifact/double-slit.html
9
+ - One-file form (global FRQTL): https://cdn.jsdelivr.net/npm/@descix/frqtl-web@0.6.1-p2.1/dist/frqtl-web.min.js — example https://cdn.jsdelivr.net/npm/@descix/frqtl-web@0.6.1-p2.1/dist/artifact/sun.html
10
10
  - A scene is an ES module: `export default function buildExperiment(exp)`, first statement
11
11
  `exp.createCanvas(w, h, cfg)` (2D, p5) or `exp.createScene(w, h, d, cfg)` (3D, three); parts from
12
- `@descix/frqtl-web/parts`. Example: https://cdn.jsdelivr.net/npm/@descix/frqtl-web@0.6.0/dist/frqtl/scenes/double-slit.js
12
+ `@descix/frqtl-web/parts`. Example: https://cdn.jsdelivr.net/npm/@descix/frqtl-web@0.6.1-p2.1/dist/frqtl/scenes/double-slit.js
13
13
  - Doors (`@descix/frqtl-web/boot`): `bootScene(mount, buildExperiment, opts)`;
14
14
  `bootProject(mount, { files: { 'sketch.js': text }, entry: 'sketch.js' }, opts)` or `{ url, entry }`; a folder whose
15
15
  `frqtl.json` names its entry boots as `{ files }` or `{ url }` with no `entry`.
16
16
  - `./project`: `FRQTL_WEB_SPECIFIERS`, `libPathOf`, `importMapFor`, `pageImportMapFor`, `FRQTL_WEB_HOST_SPECIFIERS`, `linkProject`, `sketchProject`, `SKETCH_ENTRY`, `projectIdentity`, `MANIFEST_FILE`, `MANIFEST_KEYS`, `normalizeManifest`, `parseManifest`, `serializeManifest`, `manifestFor` (the owner of `frqtl.json`), `RECORD_FILES`, `RECORD_KEYS`, `CHANGE_KEYS`, `OPS`, `BY`, `CLIP_SECONDS`, `CLIP_NAME`, `clipName`, `jsonText`, `recordFolderFaults` (the owner of a Record folder's shape; `recordFolderFaults(files)` is `[]` for a complete Record).
17
- - `./registry`: walk-through rungs and `projectOf(id, { mode })` → `{ manifest, files, renderState }` (boot it with `bootProject(mount, { files }, { renderState })`).
17
+ - `./registry`: walk-through rungs and `projectOf(id, { mode })` → `{ manifest, files, renderState }` (boot it with `bootProject(mount, { files }, { renderState })`); a showcase tile's link (`showcaseHref(row)` relative to the serving site, `showcaseUrl(row)` absolute on `SHOWCASE_SITE.origin`; `row` is an element of the same imported `EXHIBITS`, and the link carries the row's effective mode on a multi-mode rung), and how STUDIO resolved the link it opened with (`STUDIO_LANDING_ATTR` on `<html>`, a `STUDIO_LANDING_OUTCOMES` id).
18
18
  - `./kinds`: `registerKind`, `kindNamed`, `kindOf`, `registeredKinds` (a composed fork registers its renamed class).
19
19
  - `./host-view`: `declareHostView`, `HOST_VIEW_OUTCOMES`, `CONTRACT_VIOLATIONS`, `HOST_SDK_SCRIPT` (an app asks its DeSciX shell for a view, once: `declareHostView({ sdk: window.DeSciX, mode, fallback })`; the outcome is on the html element's dataset).
20
+ - `./site-graph`: `SITE_GRAPH_DIR`, `SITE_BUILD_ATTR`, `SITE_BUILD_ID_RE`, `STATIC_APP_PAGE`, `HOST_PROVIDED_ATTR` (the static site's shape: graph directory, build-stamp attribute, build id pattern, IDE entry page, the attribute declaring a file host-provided; for a reader of a served site, both packages)
20
21
  - `await recipeContext.fork(name, NewKind, { by })`: copies the `parts` entry's part file into the folder as `parts/<NewKind>.js` (class renamed, imports rewritten to package specifiers) and re-runs the scene in place.
21
- - API reference: https://cdn.jsdelivr.net/npm/@descix/frqtl-web@0.6.0/dist/sdk.html
22
- - Full agent guide: https://cdn.jsdelivr.net/npm/@descix/frqtl-web@0.6.0/CLAUDE.md
22
+ - API reference: https://cdn.jsdelivr.net/npm/@descix/frqtl-web@0.6.1-p2.1/dist/sdk.html
23
+ - Full agent guide: https://cdn.jsdelivr.net/npm/@descix/frqtl-web@0.6.1-p2.1/CLAUDE.md
23
24
  - Acceptance is visual; no CLI ships. No account, credits or tokens are needed.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@descix/frqtl-web",
3
- "version": "0.6.0",
3
+ "version": "0.6.1-p2.1",
4
4
  "description": "FRQTL for the browser \u2014 the discrete fractal physics engine (compiled Rust \u2192 WASM), its parts as ES modules, the scene doors (bootScene, bootProject) and frqtl-web.min.js.",
5
5
  "type": "module",
6
6
  "engines": {
@@ -17,6 +17,7 @@
17
17
  "./project": "./dist/shim/project/index.js",
18
18
  "./registry": "./dist/shim/registry/index.js",
19
19
  "./host-view": "./dist/shim/host/index.js",
20
+ "./site-graph": "./dist/shim/engine/site-graph.js",
20
21
  "./shim/controls/registry.js": "./dist/shim/controls/registry.js",
21
22
  "./shim/render/sun-look.js": "./dist/shim/render/sun-look.js",
22
23
  "./compat/renderer/display-slot.js": "./dist/frqtl/compat/renderer/display-slot.js",
@@ -44,7 +45,7 @@
44
45
  "./dist-manifest.json": "./dist/dist-manifest.json",
45
46
  "./package.json": "./package.json"
46
47
  },
47
- "exportsNotes": "Every target is a file the build places at its lib-identity path (dist/frqtl/..., dist/shim/...), the same module a page imports by URL: one module, one URL. `.` is the parts barrel + the scene doors + the shared package core (lib/frqtl/boot-entry.js). `./boot` is the scene doors alone (doors.js); its node condition refuses, naming @descix/frqtl-node. `./parts` and `./parts/*` are the parts directory (one part = one file). `./project` is the specifier table, the link site, the project identity and the frqtl.json owner (lib/shim/project/index.js). `./registry` is the walk-through rungs, the showcase roster and the scene list. `./dist-manifest.json` is the per-file sha256 record a self-hosting consumer checks its copy against. dist/frqtl-web.min.js is a FILE, not an export: the esbuild IIFE of the same entry, global FRQTL. The expected shape of this map is owned by sdk/_build/exports-contract.mjs.",
48
+ "exportsNotes": "The exports map is documented in README.md, section Exports.",
48
49
  "files": [
49
50
  "dist",
50
51
  "README.md",