@bongos/core 1.24.55 → 1.24.57

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 (37) hide show
  1. package/.bongos-core.json +67 -37
  2. package/docs/copy-inventory.md +16 -16
  3. package/docs/copy-registry.json +17 -17
  4. package/docs/module-api-changelog.md +4 -0
  5. package/docs/page-readings.json +18 -18
  6. package/modules/hall-ui/public/approval-queue.css +9 -9
  7. package/modules/hall-ui/public/atlas.css +5 -1
  8. package/modules/hall-ui/public/atlas.js +14 -11
  9. package/modules/hall-ui/public/city-draw.js +14 -14
  10. package/modules/hall-ui/public/sky-draw.js +24 -6
  11. package/modules/hall-ui/public/sky-interaction.js +1 -1
  12. package/modules/hall-ui/public/sky-panel.js +1 -1
  13. package/modules/hall-ui/public/studio.css +22 -22
  14. package/modules/hall-ui/public/thinking.css +46 -48
  15. package/modules/hall-ui/public/tweak-editor.css +18 -18
  16. package/modules/hall-ui/public/welcome-boot.css +5 -8
  17. package/modules/hall-ui/public/welcome-boot.js +11 -15
  18. package/package-lock.json +2 -2
  19. package/package.json +1 -1
  20. package/release-notes.json +12 -0
  21. package/scripts/bongos/css-literal-scan.js +144 -0
  22. package/scripts/bongos/design-generators-fresh.js +32 -0
  23. package/scripts/bongos/fitness-ratchets.js +70 -3
  24. package/scripts/bongos/fitness.js +3 -2
  25. package/scripts/gds/css-literal-scan.js +7 -0
  26. package/scripts/gds/design-generators-fresh.js +6 -0
  27. package/src/bongos/module-scope-map.js +1 -1
  28. package/src/module-api.js +1 -1
  29. package/tests/design_counts_ratchet.mjs +134 -0
  30. package/tests/hall_catalog_world.mjs +7 -2
  31. package/tests/hall_city.mjs +5 -4
  32. package/tests/hall_private_palettes.mjs +148 -0
  33. package/tests/hall_sky.mjs +29 -32
  34. package/tests/hall_street.mjs +3 -2
  35. package/tests/helpers.mjs +25 -1
  36. package/tests/welcome_boot.mjs +1 -1
  37. package/tests/welcome_boot_browser.mjs +1 -1
@@ -26,6 +26,7 @@ import path from 'node:path';
26
26
  import vm from 'node:vm';
27
27
  import { createRequire } from 'node:module';
28
28
  import { fileURLToPath } from 'node:url';
29
+ import { cityTokens } from './helpers.mjs';
29
30
 
30
31
  const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
31
32
  const PUB = path.join(ROOT, 'modules/hall-ui/public');
@@ -83,7 +84,7 @@ test('the street palette is the prototype theme() (less the iso half city-draw.j
83
84
  const t = new Proto({ mode }).theme(mode);
84
85
  delete t.iso;
85
86
  assert.deepEqual(S.theme(mode), t, mode);
86
- assert.deepEqual(City.isoTheme(mode), new Proto({ mode }).theme(mode).iso, 'and the iso half is still city-draw.js\'s');
87
+ assert.deepEqual(City.isoTheme(mode), cityTokens(new Proto({ mode }).theme(mode).iso), 'and the iso half is still city-draw.js\'s');
87
88
  }
88
89
  });
89
90
 
@@ -123,7 +124,7 @@ test('a task not started is the prototype\'s workItem "ready" slab, and the more
123
124
  const a = []; const b = [];
124
125
  p.workItem(a, T, 'engineer', 'ready', 660, 19, 0);
125
126
  S.work(b, S.theme('dark'), 'slab', 660, 0, 19, 6, false);
126
- assert.deepEqual(b, a, 'the slab, at a base of 0 as workItem draws it');
127
+ assert.deepEqual(b, cityTokens(a), 'the slab, at a base of 0 as workItem draws it');
127
128
  const c = []; const d = [];
128
129
  p.workItem(c, T, 'engineer', 'backlog', 660, 40, 0);
129
130
  S.work(d, S.theme('dark'), 'stakes', 660, 0, 40, 0, false);
package/tests/helpers.mjs CHANGED
@@ -980,7 +980,12 @@ export function bootSkyPage({
980
980
  setTimeout: windowObj.setTimeout, clearTimeout: windowObj.clearTimeout,
981
981
  MutationObserver, console, Event, URLSearchParams, Math, Number, Date, JSON, Map, Set, Promise, Object, Array, String, Infinity, NaN,
982
982
  };
983
- if (styles) sandbox.getComputedStyle = (el) => ({ getPropertyValue: (name) => (el && String(el.className || '').split(/\s+/).includes('sky-stage') && name in styles ? styles[name] : '') });
983
+ if (styles) sandbox.getComputedStyle = (el) => ({
984
+ getPropertyValue: (name) => (el && String(el.className || '').split(/\s+/).includes('sky-stage') && name in styles ? styles[name] : ''),
985
+ // task 1005087: sky-draw.js resolves a colour token by computing it on a probe
986
+ // (style.color = 'var(--ink)'); `styles` answers it with the computed colour.
987
+ get color() { const m = /var\((--[\w-]+)\)/.exec(String((el && el.style && el.style.color) || '')); return (m && styles[m[1]]) || ''; },
988
+ });
984
989
  sandbox.globalThis = sandbox;
985
990
  vm.createContext(sandbox);
986
991
  for (const [name, src] of SKY_SRC) vm.runInContext(src, sandbox, { filename: name });
@@ -1355,3 +1360,22 @@ export async function insertTestBuilders(db, rows, { onConflict = 'ON CONFLICT (
1355
1360
  );
1356
1361
  return out;
1357
1362
  }
1363
+
1364
+ // The governor city's iso palette moved onto the pack's tokens (task 1005087): city-draw.js
1365
+ // writes var(--bg-card), var(--accent) and color-mix()es of --ink / --sea / --accent where
1366
+ // docs/design/mocks/governor-city/Street.dc.html (the design of record) has the neutral pack's
1367
+ // literals. Mapping the prototype's output through the same substitution keeps the "draws
1368
+ // exactly the prototype's paths" tests honest: every path, every other colour, unchanged.
1369
+ export function cityTokens(x) {
1370
+ const pct = (a) => `${Math.round(parseFloat(a) * 1000) / 10}%`;
1371
+ const one = (s) => s
1372
+ .replace(/^rgba\(23,24,26,([.\d]+)\)$/, (m, a) => `color-mix(in srgb, var(--ink) ${pct(a)}, transparent)`)
1373
+ .replace(/^rgba\(91,111,208,([.\d]+)\)$/, (m, a) => `color-mix(in srgb, var(--sea) ${pct(a)}, transparent)`)
1374
+ .replace(/^rgba\(251,149,105,([.\d]+)\)$/, (m, a) => `color-mix(in srgb, var(--accent) ${pct(a)}, transparent)`)
1375
+ .replace(/^#fbfafc$/, 'var(--bg-card)')
1376
+ .replace(/^#fb9569$/, 'var(--accent)');
1377
+ if (typeof x === 'string') return one(x);
1378
+ if (Array.isArray(x)) return x.map(cityTokens);
1379
+ if (x && typeof x === 'object') return Object.fromEntries(Object.entries(x).map(([k, v]) => [k, cityTokens(v)]));
1380
+ return x;
1381
+ }
@@ -62,7 +62,7 @@ test('both paintings ship, as WebP, in the one shape the motion is laid out for'
62
62
 
63
63
  test('every light sits inside the painting, and every pulse climbs inside its tower', () => {
64
64
  const inside = ([x, y]) => x >= 0 && x <= W.AW && y >= 0 && y <= W.AH;
65
- for (const b of W.BEACONS) assert.ok(inside(b), 'beacon ' + b);
65
+ assert.equal(W.BEACONS, undefined, 'the blinking mast lights are gone (task 1005087)');
66
66
  for (const t of W.TOWERS) assert.ok(inside([t.x, t.y]) && inside([t.x + t.w, t.y + t.h]), 'tower inside the painting');
67
67
  const runs = W.pulseRuns(W.TOWERS, 3, 7);
68
68
  assert.equal(runs.length, W.TOWERS.length * 3);
@@ -264,7 +264,7 @@ const look = (page) => page.evaluate(() => {
264
264
  test('by day the day painting opens from a white veil; by night the night one from black, with its lights', { skip }, async () => {
265
265
  for (const [time, want] of [
266
266
  [new Date(2026, 9, 23, 10, 0), { day: true, night: false, veil: 'rgb(255, 255, 255)', art: '/builders/welcome-day.webp', beacons: 0 }],
267
- [new Date(2026, 9, 23, 22, 0), { day: false, night: true, veil: 'rgb(0, 0, 0)', art: '/builders/welcome-night.webp', beacons: 4 }],
267
+ [new Date(2026, 9, 23, 22, 0), { day: false, night: true, veil: 'rgb(0, 0, 0)', art: '/builders/welcome-night.webp', beacons: 0 }], // task 1005087 took the beacons out
268
268
  ]) {
269
269
  const ctx = await hall({ time });
270
270
  const { page } = await open(ctx);