@logomarks/lookbook 0.5.0 → 0.6.1

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/src/live.js CHANGED
@@ -26,9 +26,18 @@ const FIELD_EFFECTS = {
26
26
  'truchet-field': () => import('@arraypress/effects-astro/runtime/truchet-field').then((m) => m.truchetField),
27
27
  'pixel-horizon': () => import('@arraypress/effects-astro/runtime/pixel-horizon').then((m) => m.pixelHorizon),
28
28
  'fluted-glow': () => import('@arraypress/effects-astro/runtime/fluted-glow').then((m) => m.flutedGlow),
29
+ 'fluid-folds': () => import('@arraypress/effects-astro/runtime/fluid-folds').then((m) => m.fluidFolds),
30
+ 'fluted-bokeh': () => import('@arraypress/effects-astro/runtime/fluted-bokeh').then((m) => m.flutedBokeh),
31
+ 'photo-bokeh': () => import('@arraypress/effects-astro/runtime/photo-bokeh').then((m) => m.photoBokeh),
32
+ 'lens-flare': () => import('@arraypress/effects-astro/runtime/lens-flare').then((m) => m.lensFlare),
33
+ caustics: () => import('@arraypress/effects-astro/runtime/caustics').then((m) => m.caustics),
34
+ 'rain-on-glass': () => import('@arraypress/effects-astro/runtime/rain-on-glass').then((m) => m.rainOnGlass),
35
+ 'sun-wall': () => import('@arraypress/effects-astro/runtime/sun-wall').then((m) => m.sunWall),
29
36
  // the glass cards (./glass.js): the mark itself in glass
30
37
  'glass-drop': () => import('@arraypress/effects-astro/runtime/glass-drop').then((m) => m.glassDrop),
31
38
  'glass-stack': () => import('@arraypress/effects-astro/runtime/glass-stack').then((m) => m.glassStack),
39
+ // the paint card (./glass.js): the mark sprayed, its paint running
40
+ 'paint-drip': () => import('@arraypress/effects-astro/runtime/paint-drip').then((m) => m.paintDrip),
32
41
  };
33
42
 
34
43
  /**
@@ -67,7 +76,12 @@ function field(card, config) {
67
76
  };
68
77
  }
69
78
  import { whenNear } from '@arraypress/effects-astro/runtime/near';
79
+ import { fitNames, fitWatch } from './fit.js';
80
+
81
+ /** Every card's name fitted to its card (./fit.js): `fitName`, `fitNames`, `fitWatch`. */
82
+ export { fitName, fitNames, fitWatch } from './fit.js';
70
83
  import { budget } from '@arraypress/effects-astro/runtime/budget';
84
+ import { shareContexts } from '@arraypress/effects-astro/runtime/shared-gl';
71
85
 
72
86
  /** The smoke's greys: pale on a dark ground, dark on white (Ink's `dark`). */
73
87
  export const SMOKE_GREYS = {
@@ -97,15 +111,17 @@ export function smoke(el, options = {}) {
97
111
  }
98
112
 
99
113
  /**
100
- * A starter for the shader, gradient and ASCII noise cards: each card's live background (its `data-shader` config, Paper's
101
- * shaders or the ASCII noise field in effects-astro), at most `cap` at once (a browser drops the oldest WebGL context
102
- * past about sixteen, and a dropped card's canvas goes blank). Without WebGL, or with a bad config, the card keeps its
103
- * still background.
114
+ * A starter for the shader, gradient and field cards: each card's live background (its `data-shader` config, Paper's
115
+ * shaders or an effects-astro field). They share one WebGL context (effects-astro's `shareContexts`), so every card on
116
+ * screen runs; `cap` can still limit them. Without WebGL, or with a bad config, the card keeps its still background.
104
117
  *
105
- * @param cap The most running at once (10).
118
+ * @param cap The most running at once (all of them).
106
119
  * @returns Starts a card; what it returns stops it (or gives up its place in the queue).
107
120
  */
108
- export function shaders(cap = 10) {
121
+ export function shaders(cap = Infinity) {
122
+ // every card draws in one shared WebGL context and copies its frame into its own canvas (effects-astro's
123
+ // shared-gl), so the browser's cap of about sixteen contexts no longer limits how many run: all on screen do
124
+ shareContexts();
109
125
  const take = budget(cap);
110
126
  return (card) => {
111
127
  try {
@@ -146,11 +162,25 @@ function release(card) {
146
162
  old.replaceWith(old.cloneNode(false));
147
163
  }
148
164
 
165
+ /**
166
+ * How many costly looks run at once: one on a phone or a small machine, four on a mid one, ten on a desktop with eight
167
+ * cores or more (a screenful of cards; their starts are staggered).
168
+ *
169
+ * @returns The cap.
170
+ */
171
+ export function heavyCap() {
172
+ const cores = (typeof navigator !== 'undefined' && navigator.hardwareConcurrency) || 8;
173
+ const phone = typeof matchMedia === 'function' && matchMedia('(max-width: 700px)').matches;
174
+ if (phone || cores <= 4) return 1;
175
+ return cores >= 8 ? 10 : 4;
176
+ }
177
+
149
178
  const LIVE = '[data-shader], [data-smoke], [data-anim]';
150
179
 
151
180
  /**
152
- * Runs a wall's live cards: a drawn look's motion while near (from its first frame each time; the costly ones two at a
153
- * time), a shader or gradient card's background (ten at a time), a promo card's smoke. Nothing runs off screen.
181
+ * Runs a wall's live cards: a drawn look's motion while near (from its first frame each time; the costly ones a few at a
182
+ * time, `heavyCap`), a shader, gradient or field card's background (every one on screen: they share one WebGL context),
183
+ * a promo card's smoke. Nothing runs off screen.
154
184
  *
155
185
  * @param options Where to look and how much may run at once.
156
186
  */
@@ -163,13 +193,23 @@ export function liveCards(options = {}) {
163
193
  const watching = new Map();
164
194
  /** The costly looks (liquid chrome, puff, the point cloud, the laser, the slit-scan) take turns; the others keep their
165
195
  * still until one leaves the screen. */
166
- const heavy = budget(options.heavy ?? (matchMedia('(max-width: 700px)').matches || (navigator.hardwareConcurrency ?? 8) <= 4 ? 1 : 2));
167
- const shader = shaders(options.gl ?? 10);
196
+ const heavy = budget(options.heavy ?? heavyCap());
197
+ const shader = shaders(options.gl ?? Infinity);
168
198
  const live = (card) => () => {
169
199
  card.classList.add('is-live');
170
200
  return () => card.classList.remove('is-live');
171
201
  };
172
- const motion = (card) => (card.dataset.anim !== 'heavy' || always(card) ? live(card)() : heavy(card, live(card)));
202
+ /** A costly look starts a moment after its turn comes, each a little later than the last, so they don't all begin
203
+ * (and peak) on the same frame. */
204
+ let order = 0;
205
+ const staggered = (card) => () => {
206
+ const timer = setTimeout(() => card.classList.add('is-live'), (order++ % 6) * 160);
207
+ return () => {
208
+ clearTimeout(timer);
209
+ card.classList.remove('is-live');
210
+ };
211
+ };
212
+ const motion = (card) => (card.dataset.anim !== 'heavy' || always(card) ? live(card)() : heavy(card, staggered(card)));
173
213
  const start = (card) => () => {
174
214
  if (card.dataset.anim !== undefined) return motion(card);
175
215
  if (card.dataset.shader) return shader(card);
@@ -198,7 +238,16 @@ export function liveCards(options = {}) {
198
238
  };
199
239
  for (const el of options.observe ?? []) new MutationObserver(watch).observe(el, { childList: true, subtree: true });
200
240
  watch();
201
- return { watch, restart };
241
+ // every name fitted to its card, as cards come and change size and when the fonts load (`fit: false` leaves them)
242
+ if (options.fit !== false) fitWatch(scope, { observe: options.observe ?? [] });
243
+ return {
244
+ watch: () => {
245
+ watch();
246
+ // a style change (Plain on or off, a name typed) shows names that were hidden: fit those too
247
+ if (options.fit !== false) fitNames(scope);
248
+ },
249
+ restart,
250
+ };
202
251
  }
203
252
 
204
253
  /**
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @module @logomarks/lookbook/looks/blur
3
+ *
4
+ * The Lookbook's long-exposure set (2026-11-28): smear (a portrait dragged into light streaks, left, right or up) and
5
+ * defocus (a portrait drifting out of focus and back), the lockup crisp in the middle.
6
+ */
7
+ import { type LookCtx, type LookOut } from './kit.js';
8
+ /** The portraits that take a long exposure: silhouettes, rim lights and the off-focus ones. */
9
+ export declare const EXPOSED: RegExp;
10
+ /** How many dragged copies a smear lays over the portrait. */
11
+ export declare const COPIES: number;
12
+ /** The long-exposure set's looks. */
13
+ export declare const BLUR: {
14
+ smear: (c: LookCtx) => LookOut;
15
+ defocus: (c: LookCtx) => LookOut;
16
+ };
@@ -0,0 +1,71 @@
1
+ /**
2
+ * @module @logomarks/lookbook/looks/blur
3
+ *
4
+ * The Lookbook's long-exposure set (2026-11-28; the owner's reference of a silhouette whose face trails horizontal light
5
+ * streaks, "an animation for portraits that slowly blurs/motion blurs"): smear and defocus, on the silhouette, rim-light
6
+ * and off-focus portraits. Same rules as ./index.js (pure HTML strings from the card's seeded random, per-card values as
7
+ * custom properties in `style`, ids under the card's uid, motion in CSS only and only while `is-live`, the still styles
8
+ * the final frame); the styles are a block at the end of wall-looks.css.
9
+ *
10
+ * - smear: the portrait sharp, and over it five copies of it pushed one way in steps, each fainter and blurred along the
11
+ * push only (an SVG filter: `feGaussianBlur stdDeviation="N 0"`), so the head and the light behind it drag into
12
+ * streaks like a long exposure. A dark silhouette on light drags dark (`darken`), a rim-lit face on dark drags its light
13
+ * (`lighten`). The push is dealt left, right or up. While live the trail draws in and stretches out again (8 s, eased);
14
+ * the still is the trail at full stretch. The mark and the name sit crisp in the middle, one line.
15
+ * - defocus: the portrait slowly drifts out of focus and back, the lockup sharp over it; the still is in focus.
16
+ */
17
+
18
+ import { escapeHtml } from '@arraypress/text';
19
+ import { def, mk, pickOf } from './kit.js';
20
+ import { sansEms } from './studio.js';
21
+
22
+ /** The portraits that take a long exposure: silhouettes, rim lights and the off-focus ones. */
23
+ export const EXPOSED = /\/(silhouette|rimlight|offfocus)-\d+\.webp$/;
24
+ /** How many dragged copies a smear lays over the portrait. */
25
+ export const COPIES = 5;
26
+
27
+ /** The lockup: the mark and the name on one line in the middle, in white (the name sized from its width). */
28
+ const lockup = (c, cls) =>
29
+ `<span class="wx-bllock ${cls}" style="--chars:${sansEms(c.name)}"><span class="wx-blrow"><svg class="wx-blmark" viewBox="0 0 512 512" aria-hidden="true">${mk(`<use href="#${c.uid}-m" />`)}</svg>` +
30
+ `<b class="wc-name" style="${c.type}">${escapeHtml(c.name)}</b></span></span>`;
31
+
32
+ /** smear: the portrait and its dragged copies, each blurred along the push by its own filter, fainter as they go. */
33
+ function smear(c) {
34
+ const pick = pickOf(c);
35
+ const src = c.photo(EXPOSED);
36
+ // a silhouette is dark on light: it drags dark; a rim light or an off-focus face is light on dark: it drags its light
37
+ const blend = /\/silhouette-/.test(src) ? 'darken' : 'lighten';
38
+ const way = pick(['left', 'left', 'right', 'right', 'up']);
39
+ const [dx, dy] = way === 'left' ? [-1, 0] : way === 'right' ? [1, 0] : [0, -1];
40
+ const step = 2.8 + c.r() * 1.4; // percent of the card between copies, at full stretch
41
+ const filters = Array.from({ length: COPIES }, (_, i) => {
42
+ const s = 6 + i * 7;
43
+ return `<filter id="${c.uid}-sm${i}" x="-60%" y="-60%" width="220%" height="220%" color-interpolation-filters="sRGB"><feGaussianBlur stdDeviation="${dx ? `${s} 0` : `0 ${s}`}" /></filter>`;
44
+ }).join('');
45
+ const copies = Array.from(
46
+ { length: COPIES },
47
+ (_, i) =>
48
+ `<img src="${src}" alt="" loading="lazy" decoding="async" style="--i:${i + 1};--o:${(0.55 - i * 0.09).toFixed(2)};filter:url(#${c.uid}-sm${i})" />`,
49
+ ).join('');
50
+ return {
51
+ style: `;--bg:#07080a;--fg:#fff;--sx:${dx ? (dx * step).toFixed(2) : '0'}%;--sy:${dy ? (dy * step).toFixed(2) : '0'}%;--bl:${blend};--d:-${(c.r() * 6).toFixed(2)}s`,
52
+ attrs: ' data-anim="heavy"',
53
+ inner:
54
+ `<svg class="wx-def" aria-hidden="true"><defs>${def(c)}${filters}</defs></svg>` +
55
+ `<img src="${src}" alt="" loading="lazy" decoding="async" />` +
56
+ `<span class="wx-smtrail is-${way}" aria-hidden="true">${copies}</span>` +
57
+ lockup(c, 'is-smear'),
58
+ };
59
+ }
60
+
61
+ /** defocus: the portrait in focus, then slowly out and back; a soft dark veil so the lockup reads at every stage. */
62
+ function defocus(c) {
63
+ const src = c.photo(EXPOSED);
64
+ return {
65
+ style: `;--bg:#07080a;--fg:#fff;--d:-${(c.r() * 6).toFixed(2)}s`,
66
+ attrs: '',
67
+ inner: `<svg class="wx-def" aria-hidden="true"><defs>${def(c)}</defs></svg>` + `<img class="wx-dfimg" src="${src}" alt="" loading="lazy" decoding="async" />` + lockup(c, 'is-defocus'),
68
+ };
69
+ }
70
+
71
+ export const BLUR = { smear, defocus };
@@ -0,0 +1,139 @@
1
+ /**
2
+ * @module @logomarks/lookbook/looks/exposure
3
+ *
4
+ * The camera set (2026-11-28; the owner, after the long-exposure looks: "if you think of more styles similar lets add
5
+ * them"): slow, cinematic photo motion on the portraits, each a trick of a camera or a lens, the lockup crisp in the
6
+ * middle as on smear and defocus (./blur.js). Same rules as ./index.js: pure HTML strings from the card's seeded random,
7
+ * per-card values as custom properties in `style`, ids under the card's uid, motion in CSS only and only while
8
+ * `is-live`, the still styling the final frame; the styles are a block at the end of wall-looks.css.
9
+ *
10
+ * A zoom burst (copies scaled out from the face) was tried and left out: in one colour over these dark portraits it
11
+ * read as a soft glow, not a burst.
12
+ *
13
+ * - strobe: a stroboscopic exposure: three or four hard ghosts of the portrait stepped one way, fainter as they go,
14
+ * lit one by one, held, and faded. The still has every ghost lit.
15
+ * - chromadrift: the portrait split into its red, green and blue (each a copy through a colour matrix, screened back
16
+ * together over black, so aligned they make the photo again), the channels drifting slowly apart and back; the still
17
+ * holds a fine colour fringe.
18
+ * - reeded: the portrait seen through upright glass reeds, each strip showing the photo magnified and shifted, a
19
+ * highlight down each reed's edge, the image sliding slowly across behind the glass.
20
+ * - filmburn: a film burn: a warm light leak blooms in from one edge across the portrait and recedes, with film grain
21
+ * and a faint gate flicker. The still is the burn at its height.
22
+ * - haze: heat shimmer: the portrait through a slow turbulence displacement that rises like hot air, the lockup sharp.
23
+ */
24
+
25
+ import { escapeHtml } from '@arraypress/text';
26
+ import { def, mk, pickOf } from './kit.js';
27
+ import { sansEms } from './studio.js';
28
+
29
+ /** The portraits the camera set takes: silhouettes, rim lights, off-focus faces, and the earlier lit portraits. */
30
+ export const CAMERA = /\/(silhouette|rimlight|offfocus|modern|y2k|red-bob|teal-shades|violet-shades|pink-holo|blue-braids)-?\d*\.webp$/;
31
+ /** The lit portraits only (the burn and the colour split want light to work with: no silhouettes). */
32
+ export const LIT = /\/(rimlight|offfocus|modern|y2k|red-bob|teal-shades|violet-shades|pink-holo|blue-braids)-?\d*\.webp$/;
33
+
34
+ /** The lockup: the mark and the name on one line in the middle, in white (the name sized from its width), as on ./blur.js. */
35
+ const lockup = (c, cls) =>
36
+ `<span class="wx-bllock ${cls}" style="--chars:${sansEms(c.name)}"><span class="wx-blrow"><svg class="wx-blmark" viewBox="0 0 512 512" aria-hidden="true">${mk(`<use href="#${c.uid}-m" />`)}</svg>` +
37
+ `<b class="wc-name" style="${c.type}">${escapeHtml(c.name)}</b></span></span>`;
38
+
39
+ const img = (src, extra = '') => `<img src="${src}" alt="" loading="lazy" decoding="async"${extra} />`;
40
+ const delay = (c) => `--d:-${(c.r() * 6).toFixed(2)}s`;
41
+ /** A silhouette is dark on light: its copies blend dark; a lit face on dark blends its light. */
42
+ const blendOf = (src) => (/\/silhouette-/.test(src) ? 'darken' : 'lighten');
43
+
44
+ /** strobe: hard ghosts stepped one way, lit one by one. */
45
+ function strobe(c) {
46
+ const pick = pickOf(c);
47
+ const src = c.photo(CAMERA);
48
+ const n = pick([3, 4]);
49
+ const way = pick(['left', 'right']);
50
+ const step = (way === 'left' ? -1 : 1) * (5.5 + c.r() * 2.5);
51
+ const ghosts = Array.from({ length: n }, (_, i) => img(src, ` style="--i:${i + 1};--o:${(0.5 - i * (0.36 / n)).toFixed(2)}"`)).join('');
52
+ return {
53
+ style: `;--bg:#07080a;--fg:#fff;--sx:${step.toFixed(2)}%;--n:${n};--bl:${blendOf(src)};${delay(c)}`,
54
+ attrs: '',
55
+ inner:
56
+ `<svg class="wx-def" aria-hidden="true"><defs>${def(c)}</defs></svg>` +
57
+ img(src) +
58
+ `<span class="wx-stghosts is-${way}" aria-hidden="true">${ghosts}</span>` +
59
+ lockup(c, 'is-strobe'),
60
+ };
61
+ }
62
+
63
+ /** chromadrift: the photo as three colour channels screened over black, drifting apart and back. */
64
+ const CHANNELS = [
65
+ ['r', '1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0'],
66
+ ['g', '0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0'],
67
+ ['b', '0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0'],
68
+ ];
69
+ function chromadrift(c) {
70
+ const pick = pickOf(c);
71
+ const src = c.photo(LIT);
72
+ // the drift's direction: mostly sideways, sometimes on a slant
73
+ const a = pick([0, 0, 0, 20, -20, 90]) * (Math.PI / 180);
74
+ const amt = 1.6 + c.r() * 0.8; // percent of the card, red one way and blue the other
75
+ const filters = CHANNELS.map(([k, m]) => `<filter id="${c.uid}-cd${k}" color-interpolation-filters="sRGB"><feColorMatrix type="matrix" values="${m}" /></filter>`).join('');
76
+ const layers = CHANNELS.map(([k], i) => img(src, ` class="is-${k}" style="--k:${i - 1};filter:url(#${c.uid}-cd${k})"`)).join('');
77
+ return {
78
+ style: `;--bg:#000;--fg:#fff;--cx:${(Math.cos(a) * amt).toFixed(2)}%;--cy:${(Math.sin(a) * amt).toFixed(2)}%;${delay(c)}`,
79
+ attrs: ' data-anim="heavy"',
80
+ inner: `<svg class="wx-def" aria-hidden="true"><defs>${def(c)}${filters}</defs></svg>` + `<span class="wx-cdlayers" aria-hidden="true">${layers}</span>` + lockup(c, 'is-chromadrift'),
81
+ };
82
+ }
83
+
84
+ /** reeded: upright glass reeds, each a strip showing the photo magnified about its own middle (so neighbouring reeds
85
+ * repeat a little of each other, as reeded glass does), a highlight down each edge, the image sliding slowly behind. */
86
+ function reeded(c) {
87
+ const pick = pickOf(c);
88
+ const src = c.photo(CAMERA);
89
+ const n = pick([7, 9, 11]);
90
+ const mag = 1.14 + c.r() * 0.12; // how much each reed magnifies what's behind it
91
+ const reeds = Array.from({ length: n }, (_, i) => `<i style="--i:${i}">${img(src)}</i>`).join('');
92
+ return {
93
+ style: `;--bg:#07080a;--fg:#fff;--n:${n};--mag:${mag.toFixed(3)};--drift:${(3 + c.r() * 3).toFixed(1)}%;${delay(c)}`,
94
+ attrs: '',
95
+ inner: `<svg class="wx-def" aria-hidden="true"><defs>${def(c)}</defs></svg>` + `<span class="wx-reeds" aria-hidden="true">${reeds}</span>` + lockup(c, 'is-reeded'),
96
+ };
97
+ }
98
+
99
+ /** filmburn: a warm leak blooming in from an edge, with grain and a gate flicker. */
100
+ function filmburn(c) {
101
+ const pick = pickOf(c);
102
+ const src = c.photo(LIT);
103
+ const edge = pick(['left', 'right', 'top', 'corner']);
104
+ const hue = pick([
105
+ ['#ff5a1f', '#ffb347', '#ff2d55'],
106
+ ['#ff7a00', '#ffd166', '#e63946'],
107
+ ['#ff3d00', '#ff9e40', '#ffd54f'],
108
+ ]);
109
+ const grain = `<filter id="${c.uid}-fg" x="0" y="0" width="100%" height="100%"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="2" seed="${Math.floor(c.r() * 90)}" /><feColorMatrix type="saturate" values="0" /></filter>`;
110
+ return {
111
+ style: `;--bg:#07080a;--fg:#fff;--b1:${hue[0]};--b2:${hue[1]};--b3:${hue[2]};${delay(c)}`,
112
+ attrs: '',
113
+ inner:
114
+ `<svg class="wx-def" aria-hidden="true"><defs>${def(c)}${grain}</defs></svg>` +
115
+ img(src, ' class="wx-fbimg"') +
116
+ `<span class="wx-burn is-${edge}" aria-hidden="true"></span>` +
117
+ `<svg class="wx-grain" aria-hidden="true" preserveAspectRatio="none"><rect width="100%" height="100%" filter="url(#${c.uid}-fg)" /></svg>` +
118
+ lockup(c, 'is-filmburn'),
119
+ };
120
+ }
121
+
122
+ /** haze: heat shimmer, a turbulence displacement that rises over the portrait. */
123
+ function haze(c) {
124
+ const src = c.photo(CAMERA);
125
+ const f = (0.008 + c.r() * 0.004).toFixed(4);
126
+ const filter = `<filter id="${c.uid}-hz" x="-5%" y="-5%" width="110%" height="110%"><feTurbulence type="fractalNoise" baseFrequency="${f} ${(Number(f) * 4).toFixed(4)}" numOctaves="2" seed="${Math.floor(c.r() * 90)}" /><feDisplacementMap in="SourceGraphic" scale="${(14 + c.r() * 8).toFixed(1)}" xChannelSelector="R" yChannelSelector="G" /></filter>`;
127
+ return {
128
+ style: `;--bg:#07080a;--fg:#fff;${delay(c)}`,
129
+ attrs: ' data-anim="heavy"',
130
+ inner:
131
+ `<svg class="wx-def" aria-hidden="true"><defs>${def(c)}${filter}</defs></svg>` +
132
+ // the filter rides on the frame, which climbs; the photo inside climbs down as much, so the photo holds still
133
+ // and the shimmer rises through it
134
+ `<span class="wx-hzframe" style="filter:url(#${c.uid}-hz)">${img(src, ' class="wx-hzimg"')}</span>` +
135
+ lockup(c, 'is-haze'),
136
+ };
137
+ }
138
+
139
+ export const EXPOSURE = { strobe, chromadrift, reeded, filmburn, haze };
@@ -71,6 +71,18 @@ export declare const LOOK_KINDS: readonly [
71
71
  'editorial',
72
72
  'brandsheet',
73
73
  'overprint',
74
+ 'brutal',
75
+ 'sortglitch',
76
+ 'smear',
77
+ 'defocus',
78
+ 'strobe',
79
+ 'chromadrift',
80
+ 'reeded',
81
+ 'filmburn',
82
+ 'haze',
83
+ 'decay',
84
+ 'halfscan',
85
+ 'tidal',
74
86
  ];
75
87
  /** A drawn look's kind. */
76
88
  export type LookKind = (typeof LOOK_KINDS)[number];
@@ -165,8 +177,9 @@ export declare const ACID: {
165
177
  */
166
178
  export declare function wideEms(name: string): number;
167
179
  /**
168
- * Refits a name that's sized from its width (`data-fit`: the terminal's and the editorial's) after its text changes: a
169
- * name typed in the Lookbook's toolbar.
180
+ * Refits a name after its text changes (a name typed in the Lookbook's toolbar): one sized from its width (`data-fit`:
181
+ * the terminal's, the editorial's, the brutal poster's) is sized again, the glitch card's slices are cut again, and every
182
+ * name is fitted to its card.
170
183
  *
171
184
  * @param el The name's element.
172
185
  */
@@ -18,12 +18,20 @@
18
18
  import { escapeHtml } from '@arraypress/text';
19
19
  import { hash, rng } from '@arraypress/og-image/palette';
20
20
  import { markBox, markCells, heatField } from '../marks.js';
21
- import { f1, pad2, withLength, def, use, mk, meta, nameB, art, around, framed, pickOf, markUrl } from './kit.js';
21
+ import { f1, pad2, withLength, def, use, mk, meta, nameB, art, around, framed, pickOf, markUrl, wideEms } from './kit.js';
22
22
  import { MODERN, retargetModern } from './modern.js';
23
23
  import { BLOOM } from './bloom.js';
24
24
  import { STREET, retargetStreet } from './street.js';
25
25
  import { CLUB } from './club.js';
26
26
  import { STUDIO, sansEms } from './studio.js';
27
+ import { STARK, slices } from './stark.js';
28
+ import { BLUR } from './blur.js';
29
+ import { EXPOSURE } from './exposure.js';
30
+ import { TONE } from './tone.js';
31
+ import { fitName } from '../fit.js';
32
+
33
+ /** A name's width in Michroma capitals, in ems (./kit.js): the terminal's and the brutal poster's names are sized from it. */
34
+ export { wideEms };
27
35
 
28
36
  /** The mark as a CSS background image (./kit.js). */
29
37
  export { markUrl };
@@ -85,6 +93,22 @@ export const LOOK_KINDS = [
85
93
  'editorial',
86
94
  'brandsheet',
87
95
  'overprint',
96
+ // the stark set, on the 2026-11-28 photos (./stark.js)
97
+ 'brutal',
98
+ 'sortglitch',
99
+ // the long-exposure set, on the silhouette, rim-light and off-focus portraits (./blur.js)
100
+ 'smear',
101
+ 'defocus',
102
+ // the camera set, slow camera and lens tricks on the portraits (./exposure.js)
103
+ 'strobe',
104
+ 'chromadrift',
105
+ 'reeded',
106
+ 'filmburn',
107
+ 'haze',
108
+ // the moving photo set (./tone.js): dither decay, a halftone scan, a drifting duotone
109
+ 'decay',
110
+ 'halfscan',
111
+ 'tidal',
88
112
  ];
89
113
 
90
114
  /** The animated ones (marked `data-anim`, started on screen). */
@@ -118,6 +142,19 @@ const ANIMATED = new Set([
118
142
  'clubpulse',
119
143
  'frost',
120
144
  'spectral',
145
+ 'sortglitch',
146
+ 'smear',
147
+ 'defocus',
148
+ 'strobe',
149
+ 'chromadrift',
150
+ 'reeded',
151
+ 'filmburn',
152
+ 'haze',
153
+ 'decay',
154
+ 'halfscan',
155
+ 'tidal',
156
+ 'brutal',
157
+ 'acidmap',
121
158
  ]);
122
159
 
123
160
  /**
@@ -155,6 +192,19 @@ export const LOOK_LOOP = {
155
192
  clubpulse: { cycle: 8, speed: 1.4 }, // the mark fades up, four light pulses, it fades: 5.7 s
156
193
  frost: { cycle: 12, speed: 2 }, // the three lights drift out and back: 6 s
157
194
  spectral: { cycle: 10, speed: 2 }, // the spectrum slides one whole tile: 5 s
195
+ sortglitch: { cycle: 5, speed: 1 }, // the slices hold, jump twice, settle: 5 s
196
+ smear: { cycle: 8, speed: 1.4 }, // the trail draws in and stretches out again: 5.7 s
197
+ defocus: { cycle: 8, speed: 1.4 }, // in focus, slowly out, back in: 5.7 s
198
+ strobe: { cycle: 7, speed: 1.2 }, // the ghosts light one by one, hold, go out: 5.8 s
199
+ chromadrift: { cycle: 8, speed: 1.4 }, // the channels drift apart and back: 5.7 s
200
+ reeded: { cycle: 9, speed: 1.5 }, // the photo slides behind the reeds and back: 6 s
201
+ filmburn: { cycle: 9, speed: 1.5 }, // the burn blooms and recedes (the gate flicker 36 times): 6 s
202
+ haze: { cycle: 14, speed: 2.5 }, // the shimmer rises and sinks back: 5.6 s
203
+ decay: { cycle: 10, speed: 1.5 }, // decayed, recovers, breaks off again: 6.7 s
204
+ halfscan: { cycle: 10, speed: 1.5 }, // the band sweeps off, comes round, rests: 6.7 s
205
+ tidal: { cycle: 12, speed: 2 }, // three tones and back, the light passing once: 6 s
206
+ brutal: { cycle: 14, speed: 2.5 }, // the photo pushes in and back, a raking light crosses the concrete once: 5.6 s
207
+ acidmap: { cycle: 12, speed: 2 }, // the portrait drifts in and back, a lime light crosses it once: 6 s
158
208
  };
159
209
 
160
210
  /** How often each look is dealt, against the older looks' weights (`WEIGHTS`: photo 3, gradient 3, mono 2 … crop 1, 23
@@ -207,6 +257,18 @@ export const LOOK_WEIGHTS = {
207
257
  editorial: 0.4,
208
258
  brandsheet: 0.4,
209
259
  overprint: 0.4,
260
+ brutal: 0,
261
+ sortglitch: 0,
262
+ smear: 0,
263
+ defocus: 0,
264
+ strobe: 0,
265
+ chromadrift: 0,
266
+ reeded: 0,
267
+ filmburn: 0,
268
+ haze: 0,
269
+ decay: 0,
270
+ halfscan: 0,
271
+ tidal: 0,
210
272
  };
211
273
 
212
274
  /** Each look's card shape (width / height). */
@@ -257,6 +319,18 @@ export const LOOK_RATIO = {
257
319
  editorial: '4 / 5',
258
320
  brandsheet: '4 / 5',
259
321
  overprint: '1 / 1',
322
+ brutal: '4 / 5',
323
+ sortglitch: '4 / 5',
324
+ smear: '4 / 5',
325
+ defocus: '4 / 5',
326
+ strobe: '4 / 5',
327
+ chromadrift: '4 / 5',
328
+ reeded: '4 / 5',
329
+ filmburn: '4 / 5',
330
+ haze: '4 / 5',
331
+ decay: '4 / 5',
332
+ halfscan: '4 / 5',
333
+ tidal: '4 / 5',
260
334
  };
261
335
 
262
336
  /** Names for the expanded view's background label. */
@@ -307,6 +381,18 @@ export const LOOK_LABEL = {
307
381
  editorial: 'Editorial',
308
382
  brandsheet: 'Brand sheet',
309
383
  overprint: 'Overprint',
384
+ brutal: 'Brutalist poster',
385
+ sortglitch: 'Glitch card',
386
+ smear: 'Long exposure',
387
+ defocus: 'Defocus',
388
+ strobe: 'Strobe',
389
+ chromadrift: 'Colour split',
390
+ reeded: 'Reeded glass',
391
+ filmburn: 'Film burn',
392
+ haze: 'Heat haze',
393
+ decay: 'Signal decay',
394
+ halfscan: 'Halftone scan',
395
+ tidal: 'Tone drift',
310
396
  };
311
397
 
312
398
  /* ---------- the looks ---------- */
@@ -817,7 +903,7 @@ function longshadow(c) {
817
903
  /** The acid set's colours: lime, teal, near-black. */
818
904
  export const ACID = { lime: '#c6f432', teal: '#0f8b8d', black: '#0b0f0c' };
819
905
  /** Portraits among the wall's photos (the rest are figures at a distance and helmets). */
820
- const PORTRAITS = /\/(modern|y2k|red-bob|teal-shades|violet-shades|pink-holo|blue-braids)-?\d*\.webp$/;
906
+ const PORTRAITS = /\/(modern|y2k|red-bob|teal-shades|violet-shades|pink-holo|blue-braids|rimlight|dithered|offfocus)-?\d*\.webp$/;
821
907
 
822
908
  /** acidmap: a portrait, black and white, gradient-mapped near-black → teal → lime (an SVG filter on the photo); the mark
823
909
  * big in white or lime, the name small in wide-tracked capitals, one line of tight copy. */
@@ -890,30 +976,25 @@ function outlinewall(c) {
890
976
 
891
977
  /* ---------- the terminal set: a crypto / HUD board in the accent (acid lime) on black ---------- */
892
978
 
893
- /** Michroma's capitals, in ems (measured): most are about 1, M and W far wider, I a sliver. */
894
- const WIDE = { M: 1.37, W: 1.63, N: 1.13, I: 0.28, ' ': 0.28, E: 0.88, F: 0.84, J: 0.84, L: 0.81, T: 0.94, '&': 1.19, '-': 0.5 };
895
-
896
979
  /**
897
- * A name's width in ems, set in Michroma capitals (the terminal's name is sized to its measure from this; a count of
898
- * letters cut MANSARD off at the card's edge).
899
- *
900
- * @param name The name.
901
- */
902
- export function wideEms(name) {
903
- let w = 0;
904
- for (const ch of name.toUpperCase()) w += WIDE[ch] ?? 1.04;
905
- return Math.max(4, +w.toFixed(2));
906
- }
907
-
908
- /**
909
- * Refits a name that's sized from its width (`data-fit`: the terminal's and the editorial's) after its text changes: a
910
- * name typed in the Lookbook's toolbar.
980
+ * Refits a name after its text changes (a name typed in the Lookbook's toolbar): one sized from its width (`data-fit`:
981
+ * the terminal's, the editorial's, the brutal poster's) is sized again, the glitch card's slices are cut again, and every
982
+ * name is fitted to its card (../fit.js).
911
983
  *
912
984
  * @param el The name's element.
913
985
  */
914
986
  export function refit(el) {
987
+ const text = el.dataset.slices ? (el.firstChild?.nodeType === 3 ? el.firstChild.textContent : el.textContent) ?? '' : (el.textContent ?? '');
915
988
  const fit = el.dataset.fit;
916
- if (fit) el.style.setProperty('--chars', String((fit === 'wide' ? wideEms : sansEms)(el.textContent ?? '')));
989
+ if (fit) el.style.setProperty('--chars', String((fit === 'wide' ? wideEms : sansEms)(text)));
990
+ // the glitch card's slices, cut again for the new name (setting the name's text took them away)
991
+ if (el.dataset.slices) {
992
+ el.textContent = text;
993
+ el.insertAdjacentHTML('beforeend', slices(el.dataset.slices, text));
994
+ el.style.setProperty('--chars', String(sansEms(text.toUpperCase())));
995
+ }
996
+ // and fitted to its card
997
+ if (typeof window !== 'undefined') fitName(el);
917
998
  }
918
999
 
919
1000
  /** terminal: a HUD on black: status lines typing in one by one in lime mono, a lime panel with chamfered corners,
@@ -1008,6 +1089,10 @@ const LOOKS = {
1008
1089
  ...STREET,
1009
1090
  ...CLUB,
1010
1091
  ...STUDIO,
1092
+ ...STARK,
1093
+ ...BLUR,
1094
+ ...EXPOSURE,
1095
+ ...TONE,
1011
1096
  };
1012
1097
 
1013
1098
  /** Whether a kind is one of the drawn looks. */
@@ -70,3 +70,11 @@ export declare const pickOf: (c: LookCtx) => <T>(xs: readonly T[]) => T;
70
70
  * its optical size, capped here (a background can't read `--mk-scale`): no taller than the 448 fit, so it stays clear of
71
71
  * the name under it. */
72
72
  export declare function markUrl(paths: string, fill: string): string;
73
+
74
+ /**
75
+ * A name's width in ems, set in Michroma capitals (the terminal's and the brutal poster's names are sized to their
76
+ * measure from this).
77
+ *
78
+ * @param name The name.
79
+ */
80
+ export declare function wideEms(name: string): number;
package/src/looks/kit.js CHANGED
@@ -52,3 +52,19 @@ export function markUrl(paths, fill) {
52
52
  const svg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 500" preserveAspectRatio="none"><g fill="${fill}" transform="translate(200 250) scale(${(0.4844 * k).toFixed(4)}) translate(-256 -256)">${paths}</g></svg>`;
53
53
  return `url('data:image/svg+xml,${encodeURIComponent(svg)}')`;
54
54
  }
55
+
56
+ /** Michroma's capitals, in ems (measured): most are about 1, M and W far wider, I a sliver. */
57
+ const WIDE = { M: 1.37, W: 1.63, N: 1.13, I: 0.28, ' ': 0.28, E: 0.88, F: 0.84, J: 0.84, L: 0.81, T: 0.94, '&': 1.19, '-': 0.5 };
58
+
59
+ /**
60
+ * A name's width in ems, set in Michroma capitals (the terminal's name is sized to its measure from this; a count of
61
+ * letters cut MANSARD off at the card's edge).
62
+ *
63
+ * @param name The name.
64
+ */
65
+ export function wideEms(name) {
66
+ let w = 0;
67
+ for (const ch of name.toUpperCase()) w += WIDE[ch] ?? 1.04;
68
+ return Math.max(4, +w.toFixed(2));
69
+ }
70
+
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @module @logomarks/lookbook/looks/stark
3
+ *
4
+ * The Lookbook's stark set (2026-11-28): brutal (a Swiss poster on the brutalist concrete photos, the name in wide
5
+ * capitals the full measure) and sortglitch (a pixel-sorted portrait, the name cut into level slices pushed aside).
6
+ */
7
+ import { type LookCtx, type LookOut } from './kit.js';
8
+ /**
9
+ * A name's slices for the glitch card, as `<i>` copies drawn from `data-t` by CSS.
10
+ *
11
+ * @param spec `y0,y1,dx,ink;…` (percent, percent, hundredths of an em, 1 for the accent).
12
+ * @param text The name.
13
+ */
14
+ export declare function slices(spec: string, text: string): string;
15
+ /** The stark set's looks. */
16
+ export declare const STARK: {
17
+ brutal: (c: LookCtx) => LookOut;
18
+ sortglitch: (c: LookCtx) => LookOut;
19
+ };