@logomarks/lookbook 0.0.0-stage → 0.1.0

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 ADDED
@@ -0,0 +1,29 @@
1
+ # Changelog
2
+
3
+ All notable changes to `@logomarks/lookbook` are documented here.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [0.1.0] — 2026-11-15
9
+
10
+ The first cut, moved from the Logomarks site's Lookbook. Its cards are the site's, byte for byte, apart from the
11
+ accent (tests/equivalence.test.js).
12
+
13
+ ### Added
14
+
15
+ - **The wall** (`lookbook()`): `card`, `feed` and `backgrounds`, with the brand picker, the typefaces, the accent, the
16
+ links and the photos to skip as options. Fifteen older looks (a mark on a photo, glass, a colour, paper, a live
17
+ gradient or shader) and the drawn looks, dealt by weight, fitted to the mark (the bloom and club sets), never
18
+ repeating a neighbour's look, name, line or photo; look sets narrow the deal (`among`). `shuffled`, seeded.
19
+ - **The drawn looks** (`/looks`): forty-six, in six sets (the first, the 2027 set, bloom, street, club, studio), each
20
+ pure HTML with its values in `style`, its ids under the card's, its motion in CSS; `LOOK_LOOP` for video exports,
21
+ `retarget` for another mark on a card, `refit` for a name sized from its width.
22
+ - **The mark measures** (`/marks`): the box, the ink share, the optical size (wide, slim or light marks drawn up to
23
+ 1.3× bigger, capped per look in CSS), cells by count, and the thermal look's heat field.
24
+ - **The promo cards**: `headlineCard`, `sponsorCard`, `openSlotCard`, with the site's words given.
25
+ - **The runner** (`/live`): `liveCards` (motion, shaders and smoke only near the screen; two costly looks and ten
26
+ shaders at a time, via @arraypress/effects-astro's `whenNear` and `budget`), `shaders`, `smoke` with one set of
27
+ presets (`SMOKE.card`, `SMOKE.layer`), and `holoPointer`.
28
+ - **The styles**: `wall.css` (the wall, its cards, the toolbar, the expanded view, Plain mode) and `wall-looks.css`.
29
+ - **One accent**: `ACCENT`, `#C8FF00`, wherever a look prints the lime (the old `#D4FF3A` too); the CSS reads `--hi`.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 ArrayPress Limited
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,57 @@
1
- # Temporary Holding Version
1
+ # @logomarks/lookbook
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ A logomark dressed as a made-up brand, in sixty-odd looks: on a photo, glass, a colour, paper or a live gradient, or the mark itself redrawn (traced, constructed, pixelated, neon, contoured, thermal, liquid chrome, holo foil, embroidered, editorial and more). Pure functions returning HTML, so a page built on the server and its script in the browser make the same cards. Motion is CSS only, with a still final frame and a Plain mode.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install @logomarks/lookbook
9
+ ```
10
+
11
+ ## Quick start
12
+
13
+ ```js
14
+ import { lookbook, shuffled } from '@logomarks/lookbook';
15
+ import '@logomarks/lookbook/wall.css';
16
+ import '@logomarks/lookbook/wall-looks.css';
17
+
18
+ const wall = lookbook({
19
+ brand: (mark, seed, avoid) => ({ name: 'Quintfold', line: 'Studio', tagline: 'Made with care', tld: '.studio' }),
20
+ faces: [["'Space Grotesk Variable', sans-serif", 600, '-0.045em', 'none']],
21
+ href: (mark) => `/marks/${mark.slug}`,
22
+ });
23
+
24
+ const assets = { photos: ['/img/photos/street-1.webp'], glass: ['/img/glass/bloom-1.webp'] };
25
+ const { html, h } = wall.card(mark, 0, assets); // one card, h = its height over its width
26
+ const cards = wall.feed(marks, shuffled(order, 7), 0, 36, 0, assets); // neighbours never repeat a look, name or photo
27
+ ```
28
+
29
+ In the browser, start what moves only near the screen:
30
+
31
+ ```js
32
+ import { liveCards, holoPointer } from '@logomarks/lookbook/live';
33
+
34
+ liveCards({ observe: [document.querySelector('.wall')] });
35
+ holoPointer();
36
+ ```
37
+
38
+ ## What's in it
39
+
40
+ - `@logomarks/lookbook`: `lookbook({ brand, faces, accent?, href?, skip? })` gives `card`, `feed` and `backgrounds`; `shuffled`; the promo cards `headlineCard`, `sponsorCard`, `openSlotCard`; `WEIGHTS`, `EVERY`, `ACCENT` (`#C8FF00`) and the look tables.
41
+ - `@logomarks/lookbook/looks`: the drawn looks, `LOOK_KINDS`, `LOOK_LABEL`, `LOOK_LOOP` (each moving look's loop, for a video), `LOOK_RATIO`, `LOOK_WEIGHTS`, `retarget` (another mark on a card) and `refit`.
42
+ - `@logomarks/lookbook/marks`: a mark's box, ink share, optical size (`opticalVars`), cells and heat field.
43
+ - `@logomarks/lookbook/live`: `liveCards`, `shaders`, `smoke` with its presets `SMOKE`, and `holoPointer`.
44
+ - `wall.css` and `wall-looks.css`: the cards and the drawn looks. They read the page's theme tokens (`--text`, `--muted`, `--border`, `--surface`, `--display`, `--mono`) and the accent `--hi`.
45
+
46
+ The pictures go by their file names: `club-N` the club hall, `club-dancer-N` and `club-crowd-N` its people, portraits (`modern`, `y2k` …) and the rest in `photos`; flowers (`bloom-N`, `dahlia-N`, `iris-N`, `lily-N`, `marigold-N`, `palm-N`) and abstracts in `glass`.
47
+
48
+ ## Links
49
+
50
+ - [Changelog](CHANGELOG.md)
51
+ - [Licence](LICENSE)
52
+ - [`@logomarks/core`](https://github.com/Logomarks/core), the SVG reader and pixel grid it measures marks with
53
+ - [logomarks.ai/lookbook](https://logomarks.ai/lookbook), where it runs
54
+
55
+ ## Licence
56
+
57
+ MIT © ArrayPress Limited; author David Sherlock.
package/package.json CHANGED
@@ -1,6 +1,87 @@
1
1
  {
2
2
  "name": "@logomarks/lookbook",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0",
4
+ "description": "A logomark dressed as a made-up brand, in sixty-odd looks: on a photo, glass, a colour, paper or a live gradient, or the mark itself redrawn (traced, constructed, reeded, pixelated, neon, split-flap, contoured, thermal, liquid chrome, holo foil, ASCII, embroidered, frosted, editorial and more). Pure functions returning HTML, the same on the server and in the browser, with their CSS (motion in CSS only, a still final frame, a Plain mode), an optical size for wide, slim or light marks, and a browser runner that starts only what's near the screen.",
5
+ "type": "module",
6
+ "main": "src/index.js",
7
+ "types": "src/index.d.ts",
8
+ "sideEffects": [
9
+ "*.css"
10
+ ],
11
+ "exports": {
12
+ ".": {
13
+ "types": "./src/index.d.ts",
14
+ "import": "./src/index.js",
15
+ "default": "./src/index.js"
16
+ },
17
+ "./looks": {
18
+ "types": "./src/looks/index.d.ts",
19
+ "import": "./src/looks/index.js",
20
+ "default": "./src/looks/index.js"
21
+ },
22
+ "./marks": {
23
+ "types": "./src/marks.d.ts",
24
+ "import": "./src/marks.js",
25
+ "default": "./src/marks.js"
26
+ },
27
+ "./live": {
28
+ "types": "./src/live.d.ts",
29
+ "import": "./src/live.js",
30
+ "default": "./src/live.js"
31
+ },
32
+ "./wall.css": "./src/styles/wall.css",
33
+ "./wall-looks.css": "./src/styles/wall-looks.css",
34
+ "./package.json": "./package.json"
35
+ },
36
+ "files": [
37
+ "src",
38
+ "README.md",
39
+ "CHANGELOG.md",
40
+ "LICENSE"
41
+ ],
42
+ "scripts": {
43
+ "test": "node --test tests/*.test.js",
44
+ "typecheck": "tsc --noEmit"
45
+ },
46
+ "keywords": [
47
+ "brand",
48
+ "branding",
49
+ "cards",
50
+ "css-animation",
51
+ "gradient",
52
+ "logo",
53
+ "logomark",
54
+ "logomarks",
55
+ "lookbook",
56
+ "masonry",
57
+ "mockup",
58
+ "optical-size",
59
+ "shader",
60
+ "svg"
61
+ ],
62
+ "author": "David Sherlock",
63
+ "license": "MIT",
64
+ "repository": {
65
+ "type": "git",
66
+ "url": "git+https://github.com/Logomarks/lookbook.git"
67
+ },
68
+ "homepage": "https://www.npmjs.com/package/@logomarks/lookbook",
69
+ "bugs": "https://github.com/Logomarks/lookbook/issues",
70
+ "engines": {
71
+ "node": ">=20.0.0"
72
+ },
73
+ "publishConfig": {
74
+ "access": "public",
75
+ "registry": "https://registry.npmjs.org/"
76
+ },
77
+ "dependencies": {
78
+ "@arraypress/effects-astro": "^0.8.0",
79
+ "@arraypress/og-image": "^1.5.1",
80
+ "@arraypress/text": "^2.2.0",
81
+ "@logomarks/core": "^0.2.0"
82
+ },
83
+ "devDependencies": {
84
+ "@types/node": "^26.6.6",
85
+ "typescript": "^6.0.3"
86
+ }
87
+ }
package/src/index.d.ts ADDED
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @module @logomarks/lookbook
3
+ *
4
+ * The Lookbook's card engine: a mark dressed as a made-up brand, in sixty-odd looks (`lookbook()`'s `card` and `feed`),
5
+ * the cards between the marks (`headlineCard`, `sponsorCard`, `openSlotCard`), and the look tables. The drawn looks are
6
+ * also `@logomarks/lookbook/looks`, the mark measures `@logomarks/lookbook/marks`, the browser runner
7
+ * `@logomarks/lookbook/live`; the styles are `@logomarks/lookbook/wall.css` and `@logomarks/lookbook/wall-looks.css`.
8
+ */
9
+ /** The wall: `lookbook()` (its cards and feed), `shuffled`, the accent, the looks' weights and how often a promo card comes. */
10
+ export { ACCENT, EVERY, WEIGHTS, lookbook, shuffled } from './wall.js';
11
+ export type { Brand, BrandPicker, Card, Face, Kind, Lookbook, LookbookOptions, Recent, WallAssets, WallMark } from './wall.js';
12
+ /** The cards between the marks. */
13
+ export { headlineCard, sponsorCard, openSlotCard } from './promo.js';
14
+ /** The drawn looks' kinds and tables (the rest of them in `@logomarks/lookbook/looks`). */
15
+ export { LOOK_KINDS, LOOK_LABEL, LOOK_LOOP, LOOK_RATIO, LOOK_WEIGHTS, isLook } from './looks/index.js';
16
+ export type { LookKind } from './looks/index.js';
package/src/index.js ADDED
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @module @logomarks/lookbook
3
+ *
4
+ * The Lookbook's card engine: a mark dressed as a made-up brand, in sixty-odd looks (`lookbook()`'s `card` and `feed`),
5
+ * the cards between the marks (`headlineCard`, `sponsorCard`, `openSlotCard`), and the look tables. The drawn looks are
6
+ * also `@logomarks/lookbook/looks`, the mark measures `@logomarks/lookbook/marks`, the browser runner
7
+ * `@logomarks/lookbook/live`; the styles are `@logomarks/lookbook/wall.css` and `@logomarks/lookbook/wall-looks.css`.
8
+ */
9
+
10
+ /** The wall: `lookbook()` (its cards and feed), `shuffled`, the accent, the looks' weights and how often a promo card comes. */
11
+ export { ACCENT, EVERY, WEIGHTS, lookbook, shuffled } from './wall.js';
12
+
13
+ /** The cards between the marks. */
14
+ export { headlineCard, sponsorCard, openSlotCard } from './promo.js';
15
+ /** The drawn looks' kinds and tables (the rest of them in `@logomarks/lookbook/looks`). */
16
+ export { LOOK_KINDS, LOOK_LABEL, LOOK_LOOP, LOOK_RATIO, LOOK_WEIGHTS, isLook } from './looks/index.js';
package/src/live.d.ts ADDED
@@ -0,0 +1,105 @@
1
+ /**
2
+ * @module @logomarks/lookbook/live
3
+ *
4
+ * The live cards, in the browser: the shader and gradient cards' backgrounds, the drawn looks' CSS motion and the
5
+ * smoke on a promo card, each running only while near the screen (effects-astro's `whenNear`: a browser keeps ~16
6
+ * WebGL contexts and drops the oldest; a drawn card animates while it has `is-live`), and the costly ones taking turns
7
+ * (effects-astro's `budget`). Also the smoke presets, and the holo foil following the pointer.
8
+ */
9
+ /** Stops what was started. */
10
+ export type Stop = () => void;
11
+ /** The smoke's greys: pale on a dark ground, dark on white (Ink's `dark`). */
12
+ export declare const SMOKE_GREYS: {
13
+ readonly dark: readonly ['#9A9CA3', '#C9CBD1', '#6E7078', '#E6E7EA'];
14
+ readonly light: readonly ['#65636C', '#36343A', '#918F97', '#1D1C21'];
15
+ };
16
+ /** The smoke presets (Ink's settings, without the colours): one for a promo card on the wall, one for a layer behind a
17
+ * card's words elsewhere. Both soft grey and semi-transparent, so the words over them read. */
18
+ export declare const SMOKE: {
19
+ /** A promo card's smoke: a puff on its own every few seconds; a click opens the card's link, so no drops. */
20
+ readonly card: {
21
+ readonly trail: 0.12;
22
+ readonly fade: 1.3;
23
+ readonly diffusion: 0.35;
24
+ readonly curl: 26;
25
+ readonly radius: 0.8;
26
+ readonly opacity: 0.3;
27
+ readonly momentum: 0.55;
28
+ readonly drops: false;
29
+ readonly idle: 2.4;
30
+ };
31
+ /** A wisp behind a card's words: it clears in a second or two, the swirl settles quickly, a drop every few seconds. */
32
+ readonly layer: {
33
+ readonly trail: 0.09;
34
+ readonly fade: 1.5;
35
+ readonly diffusion: 0.35;
36
+ readonly curl: 26;
37
+ readonly radius: 0.7;
38
+ readonly opacity: 0.26;
39
+ readonly momentum: 0.6;
40
+ readonly idle: 4.2;
41
+ };
42
+ };
43
+ /**
44
+ * Smoke in an element (its first canvas): a preset in the greys for its ground.
45
+ *
46
+ * @param el The element the pointer stirs (its canvas is drawn into).
47
+ * @param options `preset` (`card`, the default, or `layer`); `light`: on a light ground.
48
+ * @returns Stops it.
49
+ */
50
+ export declare function smoke(
51
+ el: HTMLElement,
52
+ options?: {
53
+ preset?: keyof typeof SMOKE;
54
+ light?: boolean;
55
+ },
56
+ ): Stop;
57
+ /**
58
+ * A starter for the shader and gradient cards: each card's live background (its `data-shader` config, Paper's shaders
59
+ * in effects-astro), at most `cap` at once (a browser drops the oldest WebGL context past about sixteen, and a dropped
60
+ * card's canvas goes blank). Without WebGL, or with a bad config, the card keeps its still CSS background.
61
+ *
62
+ * @param cap The most running at once (10).
63
+ * @returns Starts a card; what it returns stops it (or gives up its place in the queue).
64
+ */
65
+ export declare function shaders(cap?: number): (card: HTMLElement) => Stop;
66
+ /** What `liveCards` watches and how. */
67
+ export type LiveOptions = {
68
+ /** Where the cards are found (the document). */
69
+ scope?: ParentNode;
70
+ /** Elements whose new cards are watched as they come (the wall, the expanded view's stage). */
71
+ observe?: Element[];
72
+ /** Plain mode: when true, the shader and gradient cards don't run (their backgrounds are hidden). */
73
+ plain?: () => boolean;
74
+ /** Starts a `[data-smoke]` card (a sponsor's); `smoke(card)` by default. */
75
+ smoke?: (card: HTMLElement) => Stop;
76
+ /** How many costly looks (`data-anim="heavy"`) move at once: 1 on a small or low-power screen, else 2. */
77
+ heavy?: number;
78
+ /** How many shader and gradient cards run at once (10). */
79
+ gl?: number;
80
+ /** How near the screen a card starts (`150px`). */
81
+ margin?: string;
82
+ /** Cards whose motion never waits its turn (the expanded view's, `.lv-card`). */
83
+ always?: (card: HTMLElement) => boolean;
84
+ };
85
+ /** The watcher `liveCards` returns. */
86
+ export type LiveCards = {
87
+ /** Watches cards not yet watched; lets go of any that left the page (or that Plain hid). */
88
+ watch: () => void;
89
+ /** Starts the matching cards again (the smoke, when the theme changes). */
90
+ restart: (match: (card: HTMLElement) => boolean) => void;
91
+ };
92
+ /**
93
+ * 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
94
+ * time), a shader or gradient card's background (ten at a time), a promo card's smoke. Nothing runs off screen.
95
+ *
96
+ * @param options Where to look and how much may run at once.
97
+ */
98
+ export declare function liveCards(options?: LiveOptions): LiveCards;
99
+ /**
100
+ * The holo foil follows the pointer over its card (`--hx`, `--hy`, −1 to 1; wall-looks.css).
101
+ *
102
+ * @param target Where the pointer is listened to (the window).
103
+ * @returns Stops listening.
104
+ */
105
+ export declare function holoPointer(target?: Window | HTMLElement): Stop;
package/src/live.js ADDED
@@ -0,0 +1,146 @@
1
+ /**
2
+ * @module @logomarks/lookbook/live
3
+ *
4
+ * The live cards, in the browser: the shader and gradient cards' backgrounds, the drawn looks' CSS motion and the
5
+ * smoke on a promo card, each running only while near the screen (effects-astro's `whenNear`: a browser keeps ~16
6
+ * WebGL contexts and drops the oldest; a drawn card animates while it has `is-live`), and the costly ones taking turns
7
+ * (effects-astro's `budget`). Also the smoke presets, and the holo foil following the pointer.
8
+ */
9
+
10
+ import { ink } from '@arraypress/effects-astro/runtime/ink';
11
+ import { paperShader } from '@arraypress/effects-astro/runtime/paper';
12
+ import { whenNear } from '@arraypress/effects-astro/runtime/near';
13
+ import { budget } from '@arraypress/effects-astro/runtime/budget';
14
+
15
+ /** The smoke's greys: pale on a dark ground, dark on white (Ink's `dark`). */
16
+ export const SMOKE_GREYS = {
17
+ dark: ['#9A9CA3', '#C9CBD1', '#6E7078', '#E6E7EA'],
18
+ light: ['#65636C', '#36343A', '#918F97', '#1D1C21'],
19
+ };
20
+
21
+ /** The smoke presets (Ink's settings, without the colours): one for a promo card on the wall, one for a layer behind a
22
+ * card's words elsewhere. Both soft grey and semi-transparent, so the words over them read. */
23
+ export const SMOKE = {
24
+ /** A promo card's smoke: a puff on its own every few seconds; a click opens the card's link, so no drops. */
25
+ card: { trail: 0.12, fade: 1.3, diffusion: 0.35, curl: 26, radius: 0.8, opacity: 0.3, momentum: 0.55, drops: false, idle: 2.4 },
26
+ /** A wisp behind a card's words: it clears in a second or two, the swirl settles quickly, a drop every few seconds. */
27
+ layer: { trail: 0.09, fade: 1.5, diffusion: 0.35, curl: 26, radius: 0.7, opacity: 0.26, momentum: 0.6, idle: 4.2 },
28
+ };
29
+
30
+ /**
31
+ * Smoke in an element (its first canvas): a preset in the greys for its ground.
32
+ *
33
+ * @param el The element the pointer stirs (its canvas is drawn into).
34
+ * @param options `preset` (`card`, the default, or `layer`); `light`: on a light ground.
35
+ * @returns Stops it.
36
+ */
37
+ export function smoke(el, options = {}) {
38
+ const { preset = 'card', light = false } = options;
39
+ return ink(el, { colors: [...(light ? SMOKE_GREYS.light : SMOKE_GREYS.dark)], dark: light, ...SMOKE[preset] });
40
+ }
41
+
42
+ /**
43
+ * A starter for the shader and gradient cards: each card's live background (its `data-shader` config, Paper's shaders
44
+ * in effects-astro), at most `cap` at once (a browser drops the oldest WebGL context past about sixteen, and a dropped
45
+ * card's canvas goes blank). Without WebGL, or with a bad config, the card keeps its still CSS background.
46
+ *
47
+ * @param cap The most running at once (10).
48
+ * @returns Starts a card; what it returns stops it (or gives up its place in the queue).
49
+ */
50
+ export function shaders(cap = 10) {
51
+ const take = budget(cap);
52
+ return (card) => {
53
+ try {
54
+ const config = JSON.parse(card.dataset.shader ?? '{}');
55
+ return take(card, () => paperShader(card, config));
56
+ } catch {
57
+ return () => {}; // no WebGL: the card keeps its still look
58
+ }
59
+ };
60
+ }
61
+
62
+ const LIVE = '[data-shader], [data-smoke], [data-anim]';
63
+
64
+ /**
65
+ * 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
66
+ * time), a shader or gradient card's background (ten at a time), a promo card's smoke. Nothing runs off screen.
67
+ *
68
+ * @param options Where to look and how much may run at once.
69
+ */
70
+ export function liveCards(options = {}) {
71
+ const scope = options.scope ?? document;
72
+ const margin = options.margin ?? '150px';
73
+ const plain = options.plain ?? (() => false);
74
+ const always = options.always ?? ((card) => card.classList.contains('lv-card'));
75
+ const smokeOf = options.smoke ?? ((card) => smoke(card));
76
+ const watching = new Map();
77
+ /** The costly looks (liquid chrome, puff, the point cloud, the laser, the slit-scan) take turns; the others keep their
78
+ * still until one leaves the screen. */
79
+ const heavy = budget(options.heavy ?? (matchMedia('(max-width: 700px)').matches || (navigator.hardwareConcurrency ?? 8) <= 4 ? 1 : 2));
80
+ const shader = shaders(options.gl ?? 10);
81
+ const live = (card) => () => {
82
+ card.classList.add('is-live');
83
+ return () => card.classList.remove('is-live');
84
+ };
85
+ const motion = (card) => (card.dataset.anim !== 'heavy' || always(card) ? live(card)() : heavy(card, live(card)));
86
+ const start = (card) => () => {
87
+ if (card.dataset.anim !== undefined) return motion(card);
88
+ if (card.dataset.shader) return shader(card);
89
+ try {
90
+ return smokeOf(card);
91
+ } catch {
92
+ return () => {}; // no WebGL: the card stays as it is
93
+ }
94
+ };
95
+ const near = (card) => whenNear(card, start(card), { margin });
96
+ const watch = () => {
97
+ for (const [card, stop] of watching)
98
+ if (!card.isConnected || (plain() && card.dataset.shader)) {
99
+ stop();
100
+ watching.delete(card);
101
+ }
102
+ for (const card of scope.querySelectorAll(LIVE))
103
+ if (!watching.has(card) && !(plain() && card.dataset.shader)) watching.set(card, near(card));
104
+ };
105
+ const restart = (match) => {
106
+ for (const [card, stop] of watching)
107
+ if (match(card)) {
108
+ stop();
109
+ watching.set(card, near(card));
110
+ }
111
+ };
112
+ for (const el of options.observe ?? []) new MutationObserver(watch).observe(el, { childList: true, subtree: true });
113
+ watch();
114
+ return { watch, restart };
115
+ }
116
+
117
+ /**
118
+ * The holo foil follows the pointer over its card (`--hx`, `--hy`, −1 to 1; wall-looks.css).
119
+ *
120
+ * @param target Where the pointer is listened to (the window).
121
+ * @returns Stops listening.
122
+ */
123
+ export function holoPointer(target = window) {
124
+ const move = (e) => {
125
+ const p = e;
126
+ const card = p.target?.closest?.('.wc-holo');
127
+ if (!card) return;
128
+ const r = card.getBoundingClientRect();
129
+ card.style.setProperty('--hx', (((p.clientX - r.left) / r.width) * 2 - 1).toFixed(3));
130
+ card.style.setProperty('--hy', (((p.clientY - r.top) / r.height) * 2 - 1).toFixed(3));
131
+ };
132
+ const out = (e) => {
133
+ const p = e;
134
+ const card = p.target?.closest?.('.wc-holo');
135
+ if (card && !card.contains(p.relatedTarget)) {
136
+ card.style.removeProperty('--hx');
137
+ card.style.removeProperty('--hy');
138
+ }
139
+ };
140
+ target.addEventListener('pointermove', move, { passive: true });
141
+ target.addEventListener('pointerout', out, { passive: true });
142
+ return () => {
143
+ target.removeEventListener('pointermove', move);
144
+ target.removeEventListener('pointerout', out);
145
+ };
146
+ }
@@ -0,0 +1,40 @@
1
+ /**
2
+ * @module @logomarks/lookbook/looks/bloom
3
+ *
4
+ * The bloom set: Lookbook looks on the flower backgrounds (public/assets/img/logomarks/glass: bloom, dahlia, iris,
5
+ * lily, marigold and palm), after the owner's dance-event and festival posters (2026-11-08): a dark flower full bleed,
6
+ * the mark at its heart, big condensed capitals, small event meta. One CSS block each in wall-looks.css.
7
+ *
8
+ * - bloomposter: an event poster, wide. The name split either side of the mark, a date and a tagline under it, a small
9
+ * lockup in the corner.
10
+ * - bloomglow: the flower dimmed, the mark's outline drawing itself in the flower's own colour and glowing (animated).
11
+ * - bloomband: the mark tiled small across the top as a pattern that fades into the flower, the lockup centred.
12
+ */
13
+ import { type LookCtx, type LookOut } from './kit.js';
14
+ /** The bloom looks: dealt only to marks that suit an emblem on a flower (`bloomFits`). */
15
+ export declare const BLOOM_KINDS: ReadonlySet<string>;
16
+ /** Whether a mark suits the bloom looks: abstract and round, like a festival emblem (the owner, 2026-11-08: "the more
17
+ * abstract shapes (and circular ones) probably look best"; a letter, a teacup or a grid between two words reads as a
18
+ * typo). An abstract, nature, sky or symbol subject, no letter, not a letter, badge, iso, glitch, grid, animal or
19
+ * inflated style, and tagged round or radial (about 230 marks). */
20
+ export declare function bloomFits(m: { subject?: readonly string[]; style?: string; letter?: string; tags?: readonly string[] }): boolean;
21
+ /** The glow colour that suits a flower background: its series, and for the neon blooms their own hue. */
22
+ export declare function bloomInk(src: string): string;
23
+ /** The name split for either side of the mark: two halves of a two-word name, or the name and its trade's first word. */
24
+ export declare function splitName(name: string, line: string): [string, string];
25
+ /** bloomposter: a dark flower full bleed, NAME ◎ WORD across the middle in condensed capitals with the mark between,
26
+ * a date and the tagline under it, and a small stacked lockup in the corner. */
27
+ declare function bloomposter(c: LookCtx): LookOut;
28
+ /** bloomglow: the flower dimmed, the mark's outline drawing itself in the flower's colour, then glowing; the name in
29
+ * wide-tracked capitals under it. */
30
+ declare function bloomglow(c: LookCtx): LookOut;
31
+ /** bloomband: a band of the mark tiled small across the top, fading down into the flower; the mark big and white in
32
+ * the middle, the name under it. */
33
+ declare function bloomband(c: LookCtx): LookOut;
34
+ /** The bloom set's builders, by kind. */
35
+ export declare const BLOOM: {
36
+ bloomposter: typeof bloomposter;
37
+ bloomglow: typeof bloomglow;
38
+ bloomband: typeof bloomband;
39
+ };
40
+ export {};