@bongos/core 1.19.878 → 1.19.879
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/.bongos-core.json +34 -79
- package/docs/copy-inventory.md +195 -283
- package/docs/copy-registry.json +254 -1141
- package/docs/file-map.md +2 -2
- package/docs/module-api-changelog.md +2 -0
- package/modules/hall-ui/module.json +1 -1
- package/modules/hall-ui/public/builders.js +1 -13
- package/modules/hall-ui/public/dom-utils.js +4 -4
- package/modules/hall-ui/public/hall-render.js +2 -18
- package/modules/hall-ui/public/index.html +0 -3
- package/modules/hall-ui/public/panel.css +8 -9
- package/modules/hall-ui/public/settings.css +0 -5
- package/modules/hall-ui/public/settings.html +0 -29
- package/modules/hall-ui/public/settings.js +1 -26
- package/modules/hall-ui/public/shell.js +0 -1
- package/modules/hall-ui/public/style.css +0 -44
- package/modules/hall-ui/public/watch.html +0 -7
- package/modules/hall-ui/public/watch.js +1 -37
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/src/bongos/serve-internal.js +11 -11
- package/src/module-api.js +1 -1
- package/tests/government_page_gates.mjs +1 -1
- package/tests/hall_landing_boot.mjs +1 -1
- package/tests/hall_nav.mjs +1 -1
- package/tests/hall_oversight_world.mjs +5 -5
- package/tests/hall_page_gate_map.mjs +11 -2
- package/tests/hall_settings_world.mjs +21 -18
- package/modules/hall-ui/public/box-panel.js +0 -456
- package/modules/hall-ui/public/harbor.css +0 -9
- package/modules/hall-ui/public/harbor.html +0 -69
- package/modules/hall-ui/public/harbor.js +0 -367
- package/modules/hall-ui/public/harbor.states.json +0 -77
- package/modules/hall-ui/public/pair.css +0 -23
- package/modules/hall-ui/public/pair.html +0 -58
- package/modules/hall-ui/public/pair.js +0 -132
- package/modules/hall-ui/public/pair.states.json +0 -14
package/tests/hall_nav.mjs
CHANGED
|
@@ -287,7 +287,7 @@ test('sidebar groups read by audience, in order', () => {
|
|
|
287
287
|
// 'deploy' (task 1003159, ADR 0293) is the SECOND archon item, beside 'government':
|
|
288
288
|
// its gate is the `core.pin.move` atom, archon-floor and system:true. It sits with
|
|
289
289
|
// the steering surfaces because that is what it is — the owner's third release gate.
|
|
290
|
-
assert.deepEqual(nav[4].items.map((i) => i.id), ['watch', '
|
|
290
|
+
assert.deepEqual(nav[4].items.map((i) => i.id), ['watch', 'gate', 'sessions', 'project-settings', 'deploy', 'government']);
|
|
291
291
|
});
|
|
292
292
|
|
|
293
293
|
test('Economy lives in Docs and points at the reward-schedule page', () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// tests/hall_oversight_world.mjs — the oversight family in the chrome world
|
|
2
|
-
// (task 1003469, goal 1000081): government, watch
|
|
2
|
+
// (task 1003469, goal 1000081): government, watch and gate share one
|
|
3
3
|
// archetype sheet (oversight.css) the way the records share record.css and the
|
|
4
4
|
// reading rooms room.css. These are static pins over the shipped source: the
|
|
5
5
|
// family sheet is linked and spends only the fifteen, every page renders the
|
|
@@ -17,7 +17,7 @@ import { fileURLToPath } from 'node:url';
|
|
|
17
17
|
const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
|
|
18
18
|
const PUB = path.join(ROOT, 'modules', 'hall-ui', 'public');
|
|
19
19
|
const read = (f) => fs.readFileSync(path.join(PUB, f), 'utf8').replace(/\r\n/g, '\n');
|
|
20
|
-
const PAGES = ['government', 'watch', '
|
|
20
|
+
const PAGES = ['government', 'watch', 'gate'];
|
|
21
21
|
|
|
22
22
|
test('every oversight page links the family sheet, before its own', () => {
|
|
23
23
|
for (const p of PAGES) {
|
|
@@ -76,8 +76,8 @@ test('Government renders the rank description the create form collects', () => {
|
|
|
76
76
|
assert.match(read('government.html'), /id="gov-create-desc"/, 'the form still collects it');
|
|
77
77
|
});
|
|
78
78
|
|
|
79
|
-
test('
|
|
80
|
-
for (const p of ['
|
|
79
|
+
test('Gate carries no coloured band: state is a pill', () => {
|
|
80
|
+
for (const p of ['gate']) {
|
|
81
81
|
assert.ok(!/__roof|__seal/.test(read(`${p}.js`)), `${p}.js emits no roof or seal band`);
|
|
82
82
|
assert.ok(!/__roof|__seal/.test(read(`${p}.css`)), `${p}.css has no band rule`);
|
|
83
83
|
assert.match(read(`${p}.js`), /fact-pill fact-pill--/, `${p}.js paints state as a .fact-pill`);
|
|
@@ -91,7 +91,7 @@ test('the shared confirm modal sits on --z-modal, closed by one hairline and no
|
|
|
91
91
|
const modal = css.slice(css.indexOf('.ov-modal {'), css.indexOf('.ov-modal .scroll__h'));
|
|
92
92
|
assert.ok(!/box-shadow/.test(modal), 'no shadow under the dialog');
|
|
93
93
|
assert.match(modal, /border: var\(--line\) solid var\(--rule\)/, 'one rule hairline');
|
|
94
|
-
for (const p of ['
|
|
94
|
+
for (const p of ['gate']) {
|
|
95
95
|
assert.match(read(`${p}.js`), /className = 'ov-modal-bg'/, `${p}.js opens the family modal`);
|
|
96
96
|
assert.ok(!/-modal-bg/.test(read(`${p}.css`)), `${p}.css no longer styles a modal of its own`);
|
|
97
97
|
}
|
|
@@ -44,7 +44,6 @@ const SRC = fs.readFileSync(path.join(ROOT, 'src/bongos/serve-internal.js'), 'ut
|
|
|
44
44
|
const ORACLE = {
|
|
45
45
|
// Any signed-in builder — no rank floor.
|
|
46
46
|
'/builders/work': 'requireBuilderPage',
|
|
47
|
-
'/builders/pair': 'requireBuilderPage',
|
|
48
47
|
'/builders/settings': 'requireBuilderPage',
|
|
49
48
|
'/builders/atlas': 'requireBuilderPage',
|
|
50
49
|
'/builders/modules': 'requireBuilderPage',
|
|
@@ -74,7 +73,6 @@ const ORACLE = {
|
|
|
74
73
|
|
|
75
74
|
// Metic+ operator surfaces (the Governance nav group).
|
|
76
75
|
'/builders/watch': 'requireGovernmentPage',
|
|
77
|
-
'/builders/harbor': 'requireGovernmentPage',
|
|
78
76
|
'/builders/gate': 'requireGovernmentPage',
|
|
79
77
|
'/builders/sessions': 'requireGovernmentPage',
|
|
80
78
|
// The five fundamentals of the project (task 1003280, goal 1000072). Same tier as
|
|
@@ -155,6 +153,14 @@ const ORACLE = {
|
|
|
155
153
|
// catch. GONE_PAGES below keeps the row honest if the file ever returns.
|
|
156
154
|
'/builders/my-projects': null,
|
|
157
155
|
|
|
156
|
+
// Gone with the dev box (task 1003890, goal 1000091). Harbor was the Archon
|
|
157
|
+
// view of the box fleet and pair the device-pairing page; the fleet was turned
|
|
158
|
+
// off at the control plane by task 1003886, so both pages drove an API that no
|
|
159
|
+
// longer answers. Their gates left serve-internal.js with them — a gate in
|
|
160
|
+
// front of nothing is the dead-guard shape the check below exists to catch.
|
|
161
|
+
'/builders/harbor': null,
|
|
162
|
+
'/builders/pair': null,
|
|
163
|
+
|
|
158
164
|
// Gone too, and for a reason worth keeping in front of the next reader: this
|
|
159
165
|
// was a bespoke refusal PAGE ("not yet — ship three tasks to graduate"), the
|
|
160
166
|
// deniedTo of the thetes+ gate. Task 1002613 replaced that whole idea with a
|
|
@@ -278,6 +284,9 @@ const GONE_PAGES = {
|
|
|
278
284
|
'/builders/my-projects': 'task 1003308 — the hub owns "my projects"',
|
|
279
285
|
// Task 1003450 — the shell's ?denied= banner replaced the bespoke refusal page.
|
|
280
286
|
'/builders/not-ready': 'task 1003450 — the shell renders the refusal from ?denied=',
|
|
287
|
+
// Task 1003890 — the dev-box deprecation removed the fleet these two drove.
|
|
288
|
+
'/builders/harbor': 'task 1003890 — the dev box is gone, so its Archon view is too',
|
|
289
|
+
'/builders/pair': 'task 1003890 — the dev box is gone, so its pairing page is too',
|
|
281
290
|
};
|
|
282
291
|
|
|
283
292
|
test('a row that is null because the page left the hall serves no page', () => {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// tests/hall_settings_world.mjs — the PANEL family in the chrome world
|
|
2
|
-
// (task 1003308, goal 1000081): settings
|
|
2
|
+
// (task 1003308, goal 1000081): settings and profile. Pair left with the dev
|
|
3
|
+
// box (task 1003890).
|
|
3
4
|
//
|
|
4
5
|
// tests/hall_tokens.mjs pins the TIER these pages spend; this pins how they
|
|
5
6
|
// spend it. Everything here is a fact that is silent in a browser: the page
|
|
@@ -9,9 +10,9 @@
|
|
|
9
10
|
//
|
|
10
11
|
// What it locks:
|
|
11
12
|
// * ONE ARCHETYPE SHEET. panel.css holds the row, the switch, the field, the
|
|
12
|
-
// chip control and the family's voices; the
|
|
13
|
-
//
|
|
14
|
-
// * THE ONE h1. None of
|
|
13
|
+
// chip control and the family's voices; the page sheets hold only what one
|
|
14
|
+
// page has. Every page links panel.css BEFORE its own sheet.
|
|
15
|
+
// * THE ONE h1. None of them had one — the hall predates the floor — so
|
|
15
16
|
// every render failed one-header-main-h1. The h1 is the page's name in the
|
|
16
17
|
// room voice, and it lives in the static markup so the DOM has it in every
|
|
17
18
|
// state, not only the happy path.
|
|
@@ -26,14 +27,14 @@
|
|
|
26
27
|
// * WHITE ON THE ACCENT, AND THE ONE EXCEPTION. Eight literals across three
|
|
27
28
|
// sheets are gone; the Discord blurple pair stays, because it is Discord's
|
|
28
29
|
// mark and not the world's, and it is named as the exception in a comment.
|
|
29
|
-
// * THE COMPAT ALIASES.
|
|
30
|
+
// * THE COMPAT ALIASES. Every sheet in the family, zero aliases spent.
|
|
30
31
|
//
|
|
31
32
|
// Reproduce the renders these came from (the family needs the fixture harness —
|
|
32
33
|
// every panel is filled from /me/* reads the kit stub does not carry):
|
|
33
34
|
// node scripts/hall-preview/server.js --port 4621 --fixture-me
|
|
34
35
|
// node modules/ui-design/kit/render.js --states modules/hall-ui/public/settings.states.json \
|
|
35
36
|
// --base-in http://builders.localhost:4621 --base-out http://builders.localhost:4621
|
|
36
|
-
// (and profile
|
|
37
|
+
// (and profile .states.json the same way)
|
|
37
38
|
|
|
38
39
|
import { test } from 'node:test';
|
|
39
40
|
import assert from 'node:assert/strict';
|
|
@@ -48,9 +49,10 @@ const stripComments = (css) => css.replace(/\/\*[\s\S]*?\*\//g, '');
|
|
|
48
49
|
|
|
49
50
|
// not-ready was the fourth until task 1003450 deleted the page — see
|
|
50
51
|
// tests/hall_page_gate_map.mjs (GONE_PAGES) for why, and for the row that stops
|
|
51
|
-
// it coming back ungated
|
|
52
|
-
|
|
53
|
-
const
|
|
52
|
+
// it coming back ungated; pair left the same way in task 1003890. The archetype
|
|
53
|
+
// is unaffected: the pages that remain still spend it.
|
|
54
|
+
const PAGES = ['settings', 'profile'];
|
|
55
|
+
const SHEETS = ['panel.css', 'settings.css', 'profile.css'];
|
|
54
56
|
|
|
55
57
|
const panelCss = read('panel.css');
|
|
56
58
|
const settingsCss = read('settings.css');
|
|
@@ -94,7 +96,7 @@ test('the archetype holds the row, the switch, the field and the voices; the pag
|
|
|
94
96
|
for (const sel of ['.prow', '.sw', '.sw__track', '.sw__knob', '.field-label', '.pinput', '.chip-ctl', '.panel-note', '.panel-status', '.gate']) {
|
|
95
97
|
assert.ok(ruleOf(panelCss, sel), `panel.css defines ${sel}`);
|
|
96
98
|
}
|
|
97
|
-
for (const sheet of ['settings.css', '
|
|
99
|
+
for (const sheet of ['settings.css', 'profile.css']) {
|
|
98
100
|
const css = read(sheet);
|
|
99
101
|
for (const sel of ['.prow', '.sw', '.sw__track', '.pinput', '.chip-ctl']) {
|
|
100
102
|
assert.equal(ruleOf(css, sel), null, `${sheet} must not redefine ${sel} — that is how the family would drift`);
|
|
@@ -104,7 +106,7 @@ test('the archetype holds the row, the switch, the field and the voices; the pag
|
|
|
104
106
|
|
|
105
107
|
// ---- 2. the one h1, in the static markup ----------------------------------
|
|
106
108
|
|
|
107
|
-
test('each
|
|
109
|
+
test('each page in the family has exactly one h1, in the family\'s page head', () => {
|
|
108
110
|
for (const p of PAGES) {
|
|
109
111
|
const html = read(`${p}.html`).replace(/<!--[\s\S]*?-->/g, '');
|
|
110
112
|
const h1s = html.match(/<h1\b/g) || [];
|
|
@@ -301,7 +303,7 @@ test('no sheet in the family spends a compat alias', () => {
|
|
|
301
303
|
});
|
|
302
304
|
|
|
303
305
|
test('white on the accent is gone, and the Discord mark is the one named exception', () => {
|
|
304
|
-
for (const sheet of ['panel.css', '
|
|
306
|
+
for (const sheet of ['panel.css', 'profile.css']) {
|
|
305
307
|
const bare = stripComments(read(sheet));
|
|
306
308
|
assert.doesNotMatch(bare, /#[0-9a-f]{3,8}\b/i, `${sheet} carries no colour literal`);
|
|
307
309
|
assert.doesNotMatch(bare, /:\s*white\b/i, `${sheet} carries no named white`);
|
|
@@ -318,16 +320,17 @@ test('white on the accent is gone, and the Discord mark is the one named excepti
|
|
|
318
320
|
assert.match(selector, /\.settings-btn--discord/, `${lit} is spent only on the Discord button`);
|
|
319
321
|
}
|
|
320
322
|
assert.match(settingsCss, /THIRD-PARTY MARK, KEPT ON PURPOSE/, 'the exception is named in a comment so a literal sweep leaves it alone');
|
|
321
|
-
// the save/accent buttons take --accent-on. `.
|
|
322
|
-
//
|
|
323
|
-
//
|
|
323
|
+
// the save/accent buttons take --accent-on. `.craft-save` is a member of the
|
|
324
|
+
// base pill rule AND the save rule, so the save rule is found by its own name
|
|
325
|
+
// and the member is asserted against it. (`.pair-approve` was its sibling here
|
|
326
|
+
// until task 1003890 removed the pair page.)
|
|
324
327
|
const save = ruleOf(panelCss, '.pbtn--save');
|
|
325
328
|
assert.ok(save, '.pbtn--save has a rule');
|
|
326
329
|
assert.match(save, /background:\s*var\(--accent\)/);
|
|
327
330
|
assert.match(save, /color:\s*var\(--accent-on\)/, 'the dark ink for the salmon — white on it fails AA');
|
|
328
331
|
const saveSelector = stripComments(panelCss).match(/([^{}]*\.pbtn--save[^{}]*)\{/);
|
|
329
332
|
assert.ok(saveSelector, 'the save rule\'s selector list is readable');
|
|
330
|
-
for (const member of ['.craft-save'
|
|
333
|
+
for (const member of ['.craft-save']) {
|
|
331
334
|
assert.ok(saveSelector[1].split(',').map((s) => s.trim()).includes(member), `${member} is the accent door on its page`);
|
|
332
335
|
}
|
|
333
336
|
});
|
|
@@ -394,14 +397,14 @@ test('the profile identity band is a MODIFIER on the shell\'s .profile, never a
|
|
|
394
397
|
|
|
395
398
|
// ---- 6. the floors are reproducible ------------------------------------------
|
|
396
399
|
|
|
397
|
-
test('
|
|
400
|
+
test('every page in the family has a states file, so the floors are reproducible', () => {
|
|
398
401
|
for (const p of PAGES) {
|
|
399
402
|
const json = JSON.parse(read(`${p}.states.json`));
|
|
400
403
|
assert.equal(json.surface, 'hall-ui', `${p}.states.json names its surface`);
|
|
401
404
|
assert.ok(Object.keys(json.states).length >= 2, `${p}.states.json renders more than the default state`);
|
|
402
405
|
}
|
|
403
406
|
assert.ok(Object.keys(JSON.parse(read('settings.states.json')).states).length >= 4, 'settings renders every rail group');
|
|
404
|
-
for (const fx of ['me__sessions'
|
|
407
|
+
for (const fx of ['me__sessions']) {
|
|
405
408
|
assert.ok(fs.existsSync(path.join(ROOT, 'scripts', 'hall-preview', 'fixtures', `${fx}.json`)),
|
|
406
409
|
`the harness serves ${fx} — without it the page only ever rendered its empty state`);
|
|
407
410
|
}
|