@supersuit/artifacts 0.4.2 → 0.4.4
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/CHANGELOG.md +40 -0
- package/lib/brand/backdrop.d.ts +3 -2
- package/lib/brand/backdrop.js +34 -9
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,46 @@
|
|
|
3
3
|
`@supersuit/artifacts`. One entry per version, newest first. Each entry says what changed, how a
|
|
4
4
|
host can tell whether it is affected (DETECTOR), what a host does about it (REMEDY), and the tests.
|
|
5
5
|
|
|
6
|
+
## 0.4.4 (2026-09-26)
|
|
7
|
+
|
|
8
|
+
**The glow stays on the cool-to-magenta arc.**
|
|
9
|
+
|
|
10
|
+
- 0.4.3's nine colours included coral, amber and lime, which put the warm half of the spectrum on
|
|
11
|
+
the page and read as a rainbow. `GLOW_PASTELS` is now brand blue, magenta, teal, purple, pink,
|
|
12
|
+
cyan, violet, sky and lavender: as many colours, none of them red, orange, yellow or green.
|
|
13
|
+
- **DETECTOR:** the animated ground shows orange, yellow or green.
|
|
14
|
+
- **REMEDY:** update the dependency. A pack that passes its own `backdrop.colors` keeps them.
|
|
15
|
+
- **Tests:** every default colour's hue sits between cyan and pink.
|
|
16
|
+
|
|
17
|
+
## 0.4.3 (2026-09-26)
|
|
18
|
+
|
|
19
|
+
**The bubble ground runs smooth on a phone, and the glow runs the whole spectrum.**
|
|
20
|
+
|
|
21
|
+
- The backdrop blurred the whole viewport (`filter: blur(40px)`) and hard-light blended every
|
|
22
|
+
bubble, so each frame re-rasterised the full screen and stuttered on a phone. Both are gone:
|
|
23
|
+
only `transform` animates, on its own layer (`will-change`, `translate3d`). The softness now
|
|
24
|
+
comes from the gradient itself (`closest-side`, fading to zero inside the bubble), which also
|
|
25
|
+
stops the gradients showing hard edges without the blur.
|
|
26
|
+
- `GLOW_PASTELS` grows from six washed pastels to nine saturated hues (blue, violet, magenta,
|
|
27
|
+
rose, coral, amber, lime, mint, cyan), one bubble each, spread over the page so neighbours
|
|
28
|
+
overlap at their edges instead of averaging to grey in the middle.
|
|
29
|
+
- **DETECTOR:** the animated ground stutters on a phone, or reads as grey-beige rather than colour.
|
|
30
|
+
- **REMEDY:** update the dependency. A pack that passes its own `backdrop.colors` keeps them.
|
|
31
|
+
- **Tests:** no full-screen blur or blend in the backdrop and `will-change:transform` present; the
|
|
32
|
+
default palette has at least nine colours and renders one bubble per colour.
|
|
33
|
+
|
|
34
|
+
## 0.4.2 (2026-09-26)
|
|
35
|
+
|
|
36
|
+
**The read-along highlight waits for play.**
|
|
37
|
+
|
|
38
|
+
- The first word's timing starts at 0, so an untouched page sat with its first word lit before
|
|
39
|
+
anything played. `ArtifactReader` now lights nothing until the first play or seek. The word
|
|
40
|
+
choice is exported as `litWordIndex(words, now, started)`.
|
|
41
|
+
- **DETECTOR:** a narrated page shows its first word highlighted at 0:00 before play.
|
|
42
|
+
- **REMEDY:** update the dependency; no host change.
|
|
43
|
+
- **Tests:** nothing lit before start; the word under the playhead once started; nothing in a
|
|
44
|
+
gap after a word ends.
|
|
45
|
+
|
|
6
46
|
## 0.4.1 (2026-09-26)
|
|
7
47
|
|
|
8
48
|
**Big files upload straight to the bucket.**
|
package/lib/brand/backdrop.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Backdrop } from './pack.js';
|
|
2
|
-
/** The Freedom Glow
|
|
3
|
-
* the
|
|
2
|
+
/** The Freedom Glow: blue light moving through the cool-to-magenta arc, one bubble per colour.
|
|
3
|
+
* Never the warm half (no red, orange, yellow or green), so no frame can read as a rainbow.
|
|
4
|
+
* Saturated rather than pastel; the veil is what keeps a light page reading as light. */
|
|
4
5
|
export declare const GLOW_PASTELS: string[];
|
|
5
6
|
export declare function Bubbles({ backdrop }: {
|
|
6
7
|
backdrop: Backdrop;
|
package/lib/brand/backdrop.js
CHANGED
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
/** The Freedom Glow
|
|
3
|
-
* the
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
/** The Freedom Glow: blue light moving through the cool-to-magenta arc, one bubble per colour.
|
|
3
|
+
* Never the warm half (no red, orange, yellow or green), so no frame can read as a rainbow.
|
|
4
|
+
* Saturated rather than pastel; the veil is what keeps a light page reading as light. */
|
|
5
|
+
export const GLOW_PASTELS = [
|
|
6
|
+
'31,107,255', // brand blue
|
|
7
|
+
'224,82,196', // magenta
|
|
8
|
+
'25,181,201', // teal
|
|
9
|
+
'156,92,240', // purple
|
|
10
|
+
'255,111,174', // pink
|
|
11
|
+
'34,195,230', // cyan
|
|
12
|
+
'123,107,230', // violet
|
|
13
|
+
'90,162,255', // sky
|
|
14
|
+
'199,125,255', // lavender
|
|
15
|
+
];
|
|
16
|
+
// [animation, duration s, transform-origin] per bubble, after animate-ui's six plus three more.
|
|
6
17
|
const MOTION = [
|
|
7
18
|
['a-bubble-v', 30, 'center center'],
|
|
8
19
|
['a-bubble-c', 20, 'calc(50% - 400px) center'],
|
|
@@ -10,25 +21,39 @@ const MOTION = [
|
|
|
10
21
|
['a-bubble-h', 40, 'calc(50% - 200px) center'],
|
|
11
22
|
['a-bubble-c', 20, 'calc(50% - 800px) calc(50% + 200px)'],
|
|
12
23
|
['a-bubble-v', 35, 'calc(50% + 300px) calc(50% - 200px)'],
|
|
24
|
+
['a-bubble-h', 45, 'calc(50% + 200px) calc(50% + 300px)'],
|
|
25
|
+
['a-bubble-c', 30, 'calc(50% + 600px) calc(50% - 300px)'],
|
|
26
|
+
['a-bubble-v', 25, 'calc(50% - 300px) calc(50% + 400px)'],
|
|
27
|
+
];
|
|
28
|
+
// [top %, left %] per bubble: spread over the page so neighbours overlap at their edges only.
|
|
29
|
+
// Stacked in the middle, nine translucent hues average to grey.
|
|
30
|
+
const HOME = [
|
|
31
|
+
[-10, -15], [-15, 45], [15, 20], [30, -20], [35, 50], [55, 10], [65, 45], [80, -15], [85, 35],
|
|
13
32
|
];
|
|
33
|
+
// Only `transform` animates, on its own layer, so the browser moves finished bitmaps and never
|
|
34
|
+
// repaints. The first version put a 40px blur over the whole viewport and hard-light blended every
|
|
35
|
+
// bubble, which re-rasterised the full screen each frame and stuttered on a phone; the radial
|
|
36
|
+
// gradients already fade to nothing, so neither was buying softness.
|
|
14
37
|
const CSS = `
|
|
15
|
-
@keyframes a-bubble-v{0%,100%{transform:
|
|
38
|
+
@keyframes a-bubble-v{0%,100%{transform:translate3d(0,-50%,0)}50%{transform:translate3d(0,50%,0)}}
|
|
16
39
|
@keyframes a-bubble-c{0%{transform:rotate(0deg)}50%{transform:rotate(180deg)}100%{transform:rotate(360deg)}}
|
|
17
|
-
@keyframes a-bubble-h{0%,100%{transform:
|
|
18
|
-
[data-artifact-backdrop] .a-bubble{position:absolute;width:
|
|
40
|
+
@keyframes a-bubble-h{0%,100%{transform:translate3d(-50%,-10%,0)}50%{transform:translate3d(50%,10%,0)}}
|
|
41
|
+
[data-artifact-backdrop] .a-bubble{position:absolute;width:70%;height:60%;border-radius:9999px;will-change:transform;backface-visibility:hidden;animation-timing-function:ease-in-out;animation-iteration-count:infinite}
|
|
19
42
|
@media (prefers-reduced-motion: reduce){[data-artifact-backdrop] .a-bubble{animation:none!important}}
|
|
20
43
|
`;
|
|
21
44
|
export function Bubbles({ backdrop }) {
|
|
22
45
|
const colors = backdrop.colors?.length ? backdrop.colors : GLOW_PASTELS;
|
|
23
46
|
const veil = Math.round((backdrop.veil ?? 0.4) * 100);
|
|
24
|
-
return (_jsxs("div", { "data-artifact-backdrop": "bubbles", "aria-hidden": true, style: { position: 'fixed', inset: 0, zIndex: -1, overflow: 'hidden', background: 'var(--a-ground)', pointerEvents: 'none' }, children: [_jsx("style", { dangerouslySetInnerHTML: { __html: CSS } }), _jsx("div", { style: { position: 'absolute', inset: 0
|
|
47
|
+
return (_jsxs("div", { "data-artifact-backdrop": "bubbles", "aria-hidden": true, style: { position: 'fixed', inset: 0, zIndex: -1, overflow: 'hidden', background: 'var(--a-ground)', pointerEvents: 'none' }, children: [_jsx("style", { dangerouslySetInnerHTML: { __html: CSS } }), _jsx("div", { style: { position: 'absolute', inset: 0 }, children: colors.map((c, i) => {
|
|
25
48
|
const [name, secs, origin] = MOTION[i % MOTION.length];
|
|
26
49
|
return (_jsx("div", { className: "a-bubble", style: {
|
|
27
|
-
background: `radial-gradient(
|
|
50
|
+
background: `radial-gradient(closest-side, rgba(${c},0.9) 0%, rgba(${c},0.6) 35%, rgba(${c},0.2) 70%, rgba(${c},0) 100%)`,
|
|
28
51
|
animationName: name,
|
|
29
52
|
animationDuration: `${secs}s`,
|
|
30
53
|
animationDirection: i % 2 ? 'reverse' : 'normal',
|
|
31
54
|
transformOrigin: origin,
|
|
55
|
+
top: `${HOME[i % HOME.length][0]}%`,
|
|
56
|
+
left: `${HOME[i % HOME.length][1]}%`,
|
|
32
57
|
} }, i));
|
|
33
58
|
}) }), _jsx("div", { style: { position: 'absolute', inset: 0, background: `color-mix(in srgb, var(--a-ground) ${veil}%, transparent)` } })] }));
|
|
34
59
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@supersuit/artifacts",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.4",
|
|
4
4
|
"description": "Publish markdown as branded, read-aloud pages from a Next.js app: the artifacts store, the route factory, the read-along reader, brand packs, password and confidential pages, and share cards.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|