openvibers/openvibe.vision Commits

Motion: Calm reduces, only Off removes (Shared 4.183.0) (#138)

OP OpenVibers committed 3 days ago · 60ad7fcf2f · 7 files, +10 −13

Calm (the Motion setting, or a device that asks for less motion) used to stop
every effect here. Pin openvibe-shared 4.183.0 and drop the rules that stopped an
effect under prefers-reduced-motion or html[data-ov-motion=reduced]: Calm plays
every effect, smaller and slower, and only html[data-ov-motion=off] stops it.

Changes

ddiff --git a/README.md b/README.md
iindex 51cf39d..ce9fbbe 100644
---- a/README.md
++++ b/README.md
@@@ -327,5 +327,5 @@ Offer discovery is configured by `VISION_DEALS_SEARCH_URL` and `VISION_SHOES_SEA
<!-- versions:start -->
- openvibe-contracts: v0.384.0
- openvibe-sdk: v0.125.0
--- openvibe-shared: v4.179.0
++- openvibe-shared: v4.183.0
<!-- versions:end -->
ddiff --git a/STATUS.json b/STATUS.json
iindex 9618520..6c68155 100644
---- a/STATUS.json
++++ b/STATUS.json
@@@ -10,7 +10,7 @@
"domain": "openvibe.vision",
"contracts": "openvibe-contracts v0.384.0",
"sdk": "openvibe-sdk v0.125.0",
-- "shared": "openvibe-shared v4.179.0",
++ "shared": "openvibe-shared v4.183.0",
"packages": [
"openvibe-contracts v0.384.0",
"openvibe-sdk v0.125.0",
ddiff --git a/node_modules b/node_modules
nnew file mode 120000
iindex 0000000..3354b53
---- /dev/null
++++ b/node_modules
@@@ -0,0 +1 @@
++/home/workstation/.cache/openvibe-deps/OpenVibe.Vision/084cd80658bd9947/node_modules
\\ No newline at end of file
ddiff --git a/package-lock.json b/package-lock.json
iindex c0e7eb6..ea7be0f 100644
---- a/package-lock.json
++++ b/package-lock.json
@@@ -20,7 +20,7 @@
"onnxruntime-node": "^1.31.1",
"openvibe-contracts": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.384.0",
"openvibe-sdk": "https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags/v0.125.0",
-- "openvibe-shared": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.179.0",
++ "openvibe-shared": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.183.0",
"pg": "^8.23.0",
"sharp": "^0.33.5"
},
@@@ -2669,9 +2669,9 @@
}
},
"node_modules/openvibe-shared": {
-- "version": "4.179.0",
-- "resolved": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.179.0",
-- "integrity": "sha512-Fjffjq3gLINhiXTqQJwsKQT/QbV4TYvsmz6GTp5hBJ8xA6KUQgu0wDgCQ3BRxCZ0ehmn0HGVAHUI+5m0LtPQCQ==",
++ "version": "4.183.0",
++ "resolved": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.183.0",
++ "integrity": "sha512-vp9gg++Dhyj3h0cwvBjujM6dSFYoeXdh1UXdZ6OXP/NjG672Fs7uRANV4MjT467JtFDN7r7qLI3OJAwGQxOuQw==",
"license": "MIT",
"dependencies": {
"jsonwebtoken": "^9.0.0",
ddiff --git a/package.json b/package.json
iindex b3ef79d..c36bfde 100644
---- a/package.json
++++ b/package.json
@@@ -30,7 +30,7 @@
"onnxruntime-node": "^1.31.1",
"openvibe-contracts": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.384.0",
"openvibe-sdk": "https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags/v0.125.0",
-- "openvibe-shared": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.179.0",
++ "openvibe-shared": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.183.0",
"pg": "^8.23.0",
"sharp": "^0.33.5"
},
ddiff --git a/public/css/vision.css b/public/css/vision.css
iindex f6adbc8..2fc71c7 100644
---- a/public/css/vision.css
++++ b/public/css/vision.css
@@@ -107,7 +107,7 @@ html, body { margin: 0; background: var(--bg-primary, #0a0f1c); color: var(--tex
.vi-demo-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--text-muted, #7386a3); transition: transform .2s; }
.vi-demo-switch.is-on { background: color-mix(in srgb, var(--room-accent) 55%, transparent); }
.vi-demo-switch.is-on::after { transform: translateX(16px); background: var(--room-strong); }
--@media (prefers-reduced-motion: reduce) { .vi-task, .vi-demo-switch::after { transition: none; } .vi-task:hover { transform: none; } }
++html[data-ov-motion=off] .vi-task:hover{transform: none}
/* The consent switch: a real toggle (the checkbox keeps role="switch" for assistive tech) */
.vi-check:has(> input[role=switch]) { display: inline-flex; align-items: center; gap: 10px; padding: 0; border: 0; background: none; font-weight: 700; cursor: pointer; }
@@@ -117,7 +117,6 @@ html, body { margin: 0; background: var(--bg-primary, #0a0f1c); color: var(--tex
.vi-check > input[role=switch]:checked::after { transform: translateX(18px); background: var(--room-strong); }
.vi-check > input[role=switch]:focus-visible { outline: 2px solid var(--room-accent); outline-offset: 2px; }
.vi-check > input[role=switch]:disabled { opacity: .5; cursor: not-allowed; }
--@media (prefers-reduced-motion: reduce) { .vi-check > input[role=switch], .vi-check > input[role=switch]::after { transition: none; } }
/* ── Clean by default (§9b): the task pages ─────────────────────────────────────────────────────────────────────
One input, one result under it, examples a tap away. The tool column is deliberately narrow so the page reads
@@@ -229,7 +228,6 @@ html, body { margin: 0; background: var(--bg-primary, #0a0f1c); color: var(--tex
.vi-match, .vi-findings-list li { gap: 8px; }
.vi-findings-list b { min-width: 0; }
}
--@media (prefers-reduced-motion: reduce) { .vi-drop { transition: none; } }
/* The task list stays a readable column on a desk; the scene table scrolls inside its stage on a phone. */
.vi-tasklist, .vi-more-row { max-width: 820px; }
@@@ -244,7 +242,6 @@ html, body { margin: 0; background: var(--bg-primary, #0a0f1c); color: var(--tex
.vi-options[open] summary::after, .vi-disclose[open] summary::after, .vi-api[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.vi-purpose .vi-disclose { border-top: 0; padding-top: 0; margin-top: 2px; }
.vi-purpose .vi-disclose summary { color: var(--room-strong); font-size: .8125rem; min-height: 44px; }
--@media (prefers-reduced-motion: reduce) { .vi-options summary::after, .vi-disclose summary::after, .vi-api summary::after { transition: none; } }
.vi a.vi-example { color: var(--text-primary, #e6edf7); }
.vi a.vi-example:hover { color: var(--room-strong); }
.vi input::placeholder, .vi textarea::placeholder { color: var(--text-muted, #8c99b0); opacity: 1; }
@@@ -365,7 +362,6 @@ html, body { margin: 0; background: var(--bg-primary, #0a0f1c); color: var(--tex
.vi-sc-box em { position: absolute; left: -3px; top: -22px; padding: 1px 6px; border-radius: 4px; font: 700 10.5px/1.4 system-ui, sans-serif; font-style: normal; color: var(--room-on, #fff); background: var(--room-fill, var(--room-accent)); white-space: nowrap; }
.vi-sc-rec { position: absolute; left: 8px; top: 6px; font: 700 10px/1 ui-monospace, monospace; color: #fff; opacity: .8; }
.vi-sc-rec::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: #ef4444; }
--@media (prefers-reduced-motion: reduce) { .vi-sc-pane, .vi-sc-tab { transition: none; } }
/* On a phone the room's picture is a faint corner decoration (room.css); the scene is content, so it joins the flow
under the hero's buttons, full strength. */
@media (max-width: 759px) { .sc-room-pic:has(.vi-scene) { position: static; z-index: auto; width: auto; opacity: 1; pointer-events: auto; margin-top: 8px; } }
ddiff --git a/test/hero-scene.test.js b/test/hero-scene.test.js
iindex d167549..82ba1c2 100644
---- a/test/hero-scene.test.js
++++ b/test/hero-scene.test.js
@@@ -22,5 +22,5 @@ const css = fs.readFileSync(path.join(__dirname, '..', 'public', 'css', 'vision.
assert.match(css, /@media \(max-width: 759px\) \{ \.sc-room-pic:has\(\.vi-scene\) \{ position: static;[^}]*opacity: 1;/, 'in the flow on a phone, full strength');
assert.ok(!/\.vi-sc[\w-]*[^{]*\{[^}]*display:\s*none/.test(css), 'nothing in the scene is display:none');
assert.match(css, /\.vi-scene:has\(\[data-ov-ghost-step="2"\]\[data-ov-ghost-on\]\) \.vi-sc-find/, 'the chosen step shows its pane');
--assert.match(css, /@media \(prefers-reduced-motion: reduce\) \{ \.vi-sc-pane, \.vi-sc-tab \{ transition: none; \} \}/);
++assert.ok(!/prefers-reduced-motion|data-ov-motion=reduced/.test(css), 'Calm keeps the scene: its panes and tabs keep their transitions, only motion off stops them');
console.log('hero scene: all checks passed');