@dloizides/logo-kit 0.3.1 → 0.4.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/CHANGELOG.md +15 -3
- package/README.md +11 -1
- package/dist/BrandRuntime-vxA8ddzp.d.ts +32 -0
- package/dist/cli.js +675 -632
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +18 -8
- package/dist/index.js +117 -24
- package/dist/index.js.map +1 -1
- package/dist/runtime.d.ts +15 -1
- package/dist/runtime.js +21 -1
- package/dist/runtime.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.1
|
|
4
|
+
|
|
5
|
+
- `MountOptions.mode` is typed as the `Mode` const enum.
|
|
6
|
+
- Fix: the 0.4.0 note placed `resolveRuntime` in `/runtime`; it is exported from the root entry.
|
|
7
|
+
|
|
8
|
+
## 0.4.0
|
|
9
|
+
|
|
10
|
+
- `resolveRuntime(brand)` (build time, root entry `@dloizides/logo-kit`) and `mountBrand(host, runtime, opts)` (`@dloizides/logo-kit/runtime`): intro, wordmark reveal and idle; reduced motion mounts the still with no motion and no idle.
|
|
11
|
+
- `pullBrand` / `brandCopyDrift` and CLI `pull-brand` + `check-brand-copy` (drift = exit 1, line endings ignored).
|
|
12
|
+
- Limit: the HTML wordmark plays `letter-stagger` for `typewriter` and `mask-wipe` (no glyph positions) and lists it in `runtime.limits`.
|
|
13
|
+
- Brand data removed from the repo: examples, parity fixtures and pick demo are made-up brands or gone; brands with no token reference now default to the `flier` generator palette.
|
|
14
|
+
|
|
3
15
|
## 0.3.1
|
|
4
16
|
|
|
5
17
|
- Fix: `startIdle` caps `durationMs` at `IDLE_CAP_MS` (600 ms), so a longer value no longer holds the idle class past the idle budget.
|
|
@@ -7,7 +19,7 @@
|
|
|
7
19
|
|
|
8
20
|
## 0.3.0
|
|
9
21
|
|
|
10
|
-
- Intro recipe `grow-settle` (
|
|
22
|
+
- Intro recipe `grow-settle` ("Settle overshoot"): the base floods, the parts grow from circles, then the whole mark swells 4% and settles back; ends at 1180 ms.
|
|
11
23
|
- Wordmark reveal recipes `letter-stagger`, `slide-from-mark`, `typewriter`, `mask-wipe`, `tracking-settle` (`wordmarkReveal`): CSS for letters classed `<prefix>-l<i>`, word width from the letter advances, a configurable start offset; reduced motion shows the name at once. `brand.json` `motion.wordmark` takes a recipe name or `{ recipe, startMs }`.
|
|
12
24
|
- Idle recipes `rim-glint`, `faces-part`, `breath`, `orbit-spark` (`idleRecipe`), each at most 600 ms (`IDLE_CAP_MS`), played while a trigger class is on; `brand.json` `motion.idle` names one. Unknown wordmark or idle recipes are reported like intro and micro ones.
|
|
13
25
|
- Browser-safe subpath `@dloizides/logo-kit/runtime` (no fs, no resvg): `startIdle(el, { minMs, maxMs })` adds the idle class every 8-15 s by default, skips a run while the tab is hidden, never runs under prefers-reduced-motion, and returns `stop()`.
|
|
@@ -26,8 +38,8 @@
|
|
|
26
38
|
|
|
27
39
|
## 0.1.1
|
|
28
40
|
|
|
29
|
-
- First published version. Reversed check covers visibility as well as contrast; Pulse is no longer a micro preset (every micro preset stays under 300 ms); export output is byte-for-byte parity-tested against the live
|
|
41
|
+
- First published version. Reversed check covers visibility as well as contrast; Pulse is no longer a micro preset (every micro preset stays under 300 ms); export output is byte-for-byte parity-tested against the live brand files; the built CLI is spawn-tested.
|
|
30
42
|
|
|
31
43
|
## 0.1.0
|
|
32
44
|
|
|
33
|
-
- First release: generate, check, export, pick; parity configs for
|
|
45
|
+
- First release: generate, check, export, pick; parity configs for two brands.
|
package/README.md
CHANGED
|
@@ -11,4 +11,14 @@ Checks: 16/32 px legibility, one colour, reversed, contrast >= 3:1 on light and
|
|
|
11
11
|
|
|
12
12
|
Motion presets: draw, flood, stagger-rise, scale-pop, orbit, wipe, morph-from-circle, sweep, pulse (intro) and spread, pulse (micro). Intro <= 1200 ms and micro <= 300 ms unless `motion.allowLongIntro` names a reason. Reduced motion shows the final still.
|
|
13
13
|
|
|
14
|
-
Examples: `examples/
|
|
14
|
+
Examples (made-up brands): `examples/quillo/brand.json`, `examples/tarn/brand.json`.
|
|
15
|
+
|
|
16
|
+
## Brand runtime
|
|
17
|
+
|
|
18
|
+
A brand's `brand.json` lives in its owner's private repo; this package holds only generic code.
|
|
19
|
+
|
|
20
|
+
- `logo-kit pull-brand <source brand.json> [--out brand/x.brand.json]` copies it into a sibling app.
|
|
21
|
+
- `logo-kit check-brand-copy <copy> --source <source brand.json>` exits 1 when the copy drifted.
|
|
22
|
+
- Build time: `resolveRuntime(loadBrand(file))` returns plain markup (intro + still per mode, wordmark, idle).
|
|
23
|
+
- Browser: `import { mountBrand } from '@dloizides/logo-kit/runtime'`; `mountBrand(host, runtime, { mode, showName })` returns `unmount()`. Under `prefers-reduced-motion: reduce` it mounts the still, no motion CSS, no idle.
|
|
24
|
+
- Limit: the HTML wordmark has no glyph positions, so `typewriter` and `mask-wipe` play `letter-stagger`; `runtime.limits` names it.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
declare const enum Mode {
|
|
2
|
+
Light = "light",
|
|
3
|
+
Dark = "dark"
|
|
4
|
+
}
|
|
5
|
+
declare const MODES: readonly Mode[];
|
|
6
|
+
|
|
7
|
+
interface BrandModeRuntime {
|
|
8
|
+
intro: string;
|
|
9
|
+
still: string;
|
|
10
|
+
}
|
|
11
|
+
interface BrandWordmarkRuntime {
|
|
12
|
+
recipe: string;
|
|
13
|
+
html: string;
|
|
14
|
+
css: string;
|
|
15
|
+
}
|
|
16
|
+
interface BrandIdleRuntime {
|
|
17
|
+
className: string;
|
|
18
|
+
durationMs: number;
|
|
19
|
+
css: string;
|
|
20
|
+
}
|
|
21
|
+
/** A brand's resolved logo markup, passed to mountBrand. */
|
|
22
|
+
interface BrandRuntime {
|
|
23
|
+
name: string;
|
|
24
|
+
slug: string;
|
|
25
|
+
light: BrandModeRuntime;
|
|
26
|
+
dark: BrandModeRuntime;
|
|
27
|
+
wordmark: BrandWordmarkRuntime | null;
|
|
28
|
+
idle: BrandIdleRuntime | null;
|
|
29
|
+
limits: string[];
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export { type BrandRuntime as B, Mode as M, type BrandIdleRuntime as a, type BrandModeRuntime as b, type BrandWordmarkRuntime as c, MODES as d };
|