openvibers/openvibe.surf Commits

openvibe-shared v4.228.0 (was v4.227.0) (#167)

OP OpenVibers committed 17 h ago · 24a6bb55a7 · 6 files, +16 −20

* openvibe-shared v4.228.0 (was v4.227.0)

Opened by scripts/pin-bump.js in OpenVibers/OpenVibe.Shared after the v4.228.0 release.

* Home: the pick block is Shared's showcase.pick(), tabs on a phone; the old chips only jumped, so every pane showed

Changes

ddiff --git a/README.md b/README.md
iindex f25889c..6d76d60 100644
---- a/README.md
++++ b/README.md
@@@ -264,5 +264,5 @@ Part of the [OpenVibe network](https://openvibe.network). Built in the open by
<!-- versions:start -->
- openvibe-contracts: v0.417.0
- openvibe-sdk: v0.161.0
--- openvibe-shared: v4.227.0
++- openvibe-shared: v4.228.0
<!-- versions:end -->
ddiff --git a/STATUS.json b/STATUS.json
iindex 424fd4d..84983eb 100644
---- a/STATUS.json
++++ b/STATUS.json
@@@ -10,11 +10,11 @@
"domain": "openvibe.surf",
"contracts": "openvibe-contracts v0.417.0",
"sdk": "openvibe-sdk v0.161.0",
-- "shared": "openvibe-shared v4.227.0",
++ "shared": "openvibe-shared v4.228.0",
"packages": [
"openvibe-contracts v0.417.0",
"openvibe-sdk v0.161.0",
-- "openvibe-shared v4.227.0"
++ "openvibe-shared v4.228.0"
],
"summary": "openvibe.surf, the Surf room: Network sign-in as OAuth client `surf`; Ride (OpenVibe.Games' surf maps, cached 60 s, embedded); Watch (a lean-back TV over OpenVibe.Live's live streams, clips and AI moments, clips and moments playing in the page over HLS) plus watch together (in-memory SSE parties); Web (Surf with Vibe: one OpenVibe.Actor task made with the person's own Network token). No database.",
"works": [
ddiff --git a/package-lock.json b/package-lock.json
iindex 115b9b8..89b2f53 100644
---- a/package-lock.json
++++ b/package-lock.json
@@@ -16,7 +16,7 @@
"helmet": "^8.1.0",
"openvibe-contracts": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.417.0",
"openvibe-sdk": "https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags/v0.161.0",
-- "openvibe-shared": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.227.0"
++ "openvibe-shared": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.228.0"
},
"engines": {
"node": ">=22.0.0"
@@@ -1184,9 +1184,9 @@
}
},
"node_modules/openvibe-shared": {
-- "version": "4.227.0",
-- "resolved": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.227.0",
-- "integrity": "sha512-/PqSqCC/vw/iwvkhDipLyixPyrtTcMpPhZ8UQ35fGDfAEJt43du2MYmZetu/TUysz+iJ9/Z7+VCFsFI1XzuF3Q==",
++ "version": "4.228.0",
++ "resolved": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.228.0",
++ "integrity": "sha512-HR0Hac/K+qKmwMf2QZWCFxW+uVja36nyAtxVbNFgPGUDFdmWhmb6RMoP/CkU0+GSCPsC50k6aTS+oPx2czDgGg==",
"license": "MIT",
"dependencies": {
"clean-css": "^5.3.3",
ddiff --git a/package.json b/package.json
iindex bd2dd01..d15070a 100644
---- a/package.json
++++ b/package.json
@@@ -22,7 +22,7 @@
"helmet": "^8.1.0",
"openvibe-contracts": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.417.0",
"openvibe-sdk": "https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags/v0.161.0",
-- "openvibe-shared": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.227.0"
++ "openvibe-shared": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.228.0"
},
"engines": {
"node": ">=22.0.0"
ddiff --git a/server/views/short.js b/server/views/short.js
iindex d444539..1e6552e 100644
---- a/server/views/short.js
++++ b/server/views/short.js
@@@ -1,4 +1,5 @@
'use strict';
++const { pick } = require('openvibe-shared/showcase');
/**
* The home on a phone (the owner's short-pages rule, 2026-10-30): one or two screens, app-like.
*
@@@ -21,16 +22,11 @@ const esc = (s) => String(s == null ? '' : s).replace(/&/g, '&amp;').replace(/</
* pickBlock({ key, label, head, panes }) head: the heading of the block, or '' when the block already has one.
* panes: [{ id, label, html }]
*/
--function pickBlock({ key, label, head = '', panes, bodyClass = '' }) {
-- // A pane with nothing to show is left out, so the chips and the rules that show them match the page.
-- panes = (panes || []).filter((p) => p.html);
-- if (!panes.length) return '';
-- // Every pane is shown (the owner, 2026-10-31: never hide content to shorten a page); the chips are links that jump
-- // to a pane. They used to be radio chips that showed one pane and hid the others.
-- const chips = panes.map((p) => `<a class="pick-chip" href="#${esc(p.id)}">${esc(p.label)}</a>`).join('');
-- const body = panes.map((p) => `<div class="pick-pane" id="${esc(p.id)}">${p.html}</div>`).join('');
-- const bar = `${head ? `<div class="pick-head"><h2>${esc(head)}</h2></div>` : ''}<nav class="pick-row" aria-label="${esc(label)}">${chips}</nav>`;
-- return `<div class="pick" id="pick-${esc(key)}"><div class="pick-bar">${bar}</div><div class="pick-body${bodyClass ? ' ' + esc(bodyClass) : ''}">${body}</div></div>`;
++// 4.228.0: Shared's showcase.pick() draws the block (tabs on a phone, every pane in the page, a link to a pane opens
++// it); this copy only jumped to a pane with chips, so a phone showed them all (the owner, 11-12). The ids are this
++// site's own, so its links keep working.
++function pickBlock({ key, label, head = '', headId = '', bodyClass = '', panes, checked = '' }) {
++ return pick({ key, label, head, headId, bodyClass, checked: checked ? checked : '', panes: (panes || []).map((p) => ({ id: p.id, label: p.label, html: p.html })) });
}
/** No longer needed (every pane shows): kept so a caller that still asks for the rules gets none. */
ddiff --git a/test/home-short.test.js b/test/home-short.test.js
iindex ee98647..909346a 100644
---- a/test/home-short.test.js
++++ b/test/home-short.test.js
@@@ -18,8 +18,8 @@ const { boot, check, done } = require('./helpers/boot');
const page = r.text;
assert.ok(page.includes('<div class="pick" id="pick-scenes">'), 'the scenes block is on the home');
const block = page.slice(page.indexOf('<div class="pick" id="pick-scenes">'));
-- assert.ok(!/type="radio"/.test(block), 'no radio chips');
-- const chips = [...block.matchAll(/<a class="pick-chip" href="#(scene-\d+)">([^<]+)<\/a>/g)];
++ assert.ok(/<input type=\"radio\" class=\"ov-parts-r\"[^>]* checked>/.test(block), 'the first part is open on a phone (Shared pick(): tabs, 11-12)');
++ const chips = [...block.matchAll(/<label for="ovp-[a-z0-9]+-(scene-\d+)">([^<]+)(?: <span class="ov-parts-n">[^<]*<\/span>)?<\/label>/g)];
assert.deepStrictEqual(chips.map((m) => m[1]), ['scene-0', 'scene-1', 'scene-2'], 'a link per scene');
const panes = [...block.matchAll(/<div class="pick-pane" id="scene-(\d+)">/g)].map((m) => m[1]);
assert.deepStrictEqual(panes, ['0', '1', '2'], 'every scene is in the page');