@logomarks/brand-kit 0.6.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/CHANGELOG.md +6 -0
- package/docs/api.md +1 -0
- package/package.json +1 -1
- package/src/brand/brand.d.ts +4 -0
- package/src/brand/brand.js +16 -0
- package/src/favicon/favicons.d.ts +1 -1
- package/src/favicon/favicons.js +2 -2
- package/src/index.d.ts +1 -1
- package/src/index.js +1 -1
- package/src/kit/light-dark.d.ts +1 -1
- package/src/kit/light-dark.js +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,12 @@ All notable changes to `@logomarks/brand-kit` are documented here.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.6.1] — 2026-11-15
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- `faviconSet` and `lightDarkSet` no longer set the brand's name in type, which they never used: they take a bare `{ svg, color }` (and an optional `name` for the manifest) and load no font, so a browser page can make them without configuring covers. Their files are byte-identical. `resolveMarkBrand(input)`, exported, is that lighter resolution.
|
|
13
|
+
|
|
8
14
|
## [0.6.0] — 2026-11-15
|
|
9
15
|
|
|
10
16
|
### Added
|
package/docs/api.md
CHANGED
|
@@ -78,6 +78,7 @@ One of the styles on a canvas of your own (a business card, a poster, a sleeve,
|
|
|
78
78
|
| Export | |
|
|
79
79
|
|---|---|
|
|
80
80
|
| `resolveBrand(input)` | The brand resolved: mark, palette, font, the name as outlines (`nameSet`, `nameType`), the lockups' tagline (`taglineSet`, `taglineType`, or null), `grounds`, `lockup(layout, colors)`. |
|
|
81
|
+
| `resolveMarkBrand({ svg, color, name? })` | Only the mark and the palette (no name set in type, no font loaded): what `faviconSet` and `lightDarkSet` use, so they take a bare `{ svg, color }`. |
|
|
81
82
|
| `faviconSet(brand, { small, rasterize, adaptive })` | The favicon files, for a site's root. `adaptive`: `favicon.svg` is the mark alone, in ink for the browser's light mode and paper for its dark mode (`adaptiveIcon`), not on a tile. |
|
|
82
83
|
| `lightDarkSet(brand, { rasterize })` | The mark for light and dark grounds: `svg/mark-for-light.svg` (ink), `svg/mark-for-dark.svg` (paper), `svg/mark-auto.svg` (follows the reader's mode), transparent PNGs at 512, 1024 and 2048, and `preview/on-light.png` / `on-dark.png`. |
|
|
83
84
|
| `markFiles`, `lockupFiles` | The mark's and lockups' files. |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@logomarks/brand-kit",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "A complete brand kit from a logomark, a name, a colour and a typeface: the mark on light, dark and colour, favicons and a real .ico, outlined lockups and a round seal, a 50-950 OKLCH palette with WCAG pairings and named swatch cards, CSS and design tokens, brand.json, a brand sheet and a guidelines deck (PNG, SVG and PDF). Plus texture-collaged and letterpress, riso or stamp-printed marks, and a social pack at every platform's current sizes in four styles, with animated SVGs and seal avatars.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
package/src/brand/brand.d.ts
CHANGED
|
@@ -104,3 +104,7 @@ export const TAGLINE_TYPE: Readonly<{ tracking: 80; caps: false }>;
|
|
|
104
104
|
export function taglineType(o: true | TaglineType, face: ResolvedFont): ResolvedTaglineType;
|
|
105
105
|
/** A brand from its inputs (a resolved brand passes through). */
|
|
106
106
|
export function resolveBrand(input: BrandInput | Brand): Promise<Brand>;
|
|
107
|
+
/** What the mark's own files need: the name as given, the mark and the palette (no type set, no font loaded). */
|
|
108
|
+
export type MarkBrand = Pick<Brand, 'name' | 'mark' | 'palette'>;
|
|
109
|
+
/** Only the mark and the palette (and the name as given), without setting the name in type. */
|
|
110
|
+
export function resolveMarkBrand(input: Pick<BrandInput, 'svg' | 'color'> & { name?: string } | Brand): MarkBrand;
|
package/src/brand/brand.js
CHANGED
|
@@ -73,6 +73,22 @@ export async function resolveBrand(input) {
|
|
|
73
73
|
};
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
+
/**
|
|
77
|
+
* Only what the mark's own files need (the favicons, the light and dark
|
|
78
|
+
* set): the mark fitted and the palette, without setting the name in type,
|
|
79
|
+
* so no font is loaded. A resolved brand is returned as it is.
|
|
80
|
+
*
|
|
81
|
+
* @param {import('./brand.js').BrandInput | import('./brand.js').Brand} input - The brand, or just `{ svg, color, name? }`.
|
|
82
|
+
* @returns {import('./brand.js').MarkBrand} The name (as given), the mark and the palette.
|
|
83
|
+
* @throws {TypeError} Without a mark.
|
|
84
|
+
*/
|
|
85
|
+
export function resolveMarkBrand(input) {
|
|
86
|
+
if (isBrand(input)) return input;
|
|
87
|
+
const { svg, name = '', color = DEFAULT_COLOR } = input;
|
|
88
|
+
if (!svg) throw new TypeError('brand-kit: `svg` (the mark) is required');
|
|
89
|
+
return { name: name.trim(), mark: loadMark(svg), palette: makePalette(color) };
|
|
90
|
+
}
|
|
91
|
+
|
|
76
92
|
/**
|
|
77
93
|
* Whether something is already a resolved brand.
|
|
78
94
|
*
|
|
@@ -29,4 +29,4 @@ export function manifest(name: string, color: string): object;
|
|
|
29
29
|
/** The mark alone, transparent, one ink in light mode and another in dark, cropped close for a tab. */
|
|
30
30
|
export function adaptiveIcon(mark: { paths: string }, light: string, dark: string): string;
|
|
31
31
|
/** The favicon set, as files for a site's root. */
|
|
32
|
-
export function faviconSet(brand: BrandInput | Brand, options?: FaviconOptions): Promise<FileMap>;
|
|
32
|
+
export function faviconSet(brand: BrandInput | Brand | { svg: string; color?: string; name?: string }, options?: FaviconOptions): Promise<FileMap>;
|
package/src/favicon/favicons.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { markTile, padForCircle, loadMark } from '../brand/mark.js';
|
|
11
|
-
import {
|
|
11
|
+
import { resolveMarkBrand } from '../brand/brand.js';
|
|
12
12
|
import { toPng } from '../render/png.js';
|
|
13
13
|
import { ico } from './ico.js';
|
|
14
14
|
import { fileMap, jsonFile } from '../util/files.js';
|
|
@@ -79,7 +79,7 @@ export const adaptiveIcon = (mark, light, dark) =>
|
|
|
79
79
|
* @returns {Promise<import('../util/files.js').FileMap>} `favicon.ico`, `favicon.svg`, the PNGs, `site.webmanifest` and `head.html`.
|
|
80
80
|
*/
|
|
81
81
|
export async function faviconSet(input, { small, rasterize, adaptive = false } = {}) {
|
|
82
|
-
const brand =
|
|
82
|
+
const brand = resolveMarkBrand(input);
|
|
83
83
|
const { mark, palette: p } = brand;
|
|
84
84
|
const tiny = small ? loadMark(small) : mark;
|
|
85
85
|
const icon = { color: p.onPrimary, ground: p.primary };
|
package/src/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
export { brandKit } from './kit/index.js';
|
|
4
4
|
export { socialPack, ANIMATED_KINDS } from './social/index.js';
|
|
5
|
-
export { resolveBrand, grounds, taglineType, DEFAULT_COLOR, TAGLINE_TYPE } from './brand/brand.js';
|
|
5
|
+
export { resolveBrand, resolveMarkBrand, grounds, taglineType, DEFAULT_COLOR, TAGLINE_TYPE } from './brand/brand.js';
|
|
6
6
|
export { loadMark, markBody, markSvg, markAutoSvg, markTile, tileSvg, padForCircle } from './brand/mark.js';
|
|
7
7
|
export { resolveFont, DEFAULT_FONT } from './brand/font.js';
|
|
8
8
|
export { typeset, hasGlyph, missingGlyphs, withoutChars } from './brand/type.js';
|
package/src/index.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
export { brandKit } from './kit/index.js';
|
|
9
9
|
export { socialPack, ANIMATED_KINDS } from './social/index.js';
|
|
10
|
-
export { resolveBrand, grounds, taglineType, DEFAULT_COLOR, TAGLINE_TYPE } from './brand/brand.js';
|
|
10
|
+
export { resolveBrand, resolveMarkBrand, grounds, taglineType, DEFAULT_COLOR, TAGLINE_TYPE } from './brand/brand.js';
|
|
11
11
|
export { loadMark, markBody, markSvg, markAutoSvg, markTile, tileSvg, padForCircle } from './brand/mark.js';
|
|
12
12
|
export { resolveFont, DEFAULT_FONT } from './brand/font.js';
|
|
13
13
|
export { typeset, hasGlyph, missingGlyphs, withoutChars } from './brand/type.js';
|
package/src/kit/light-dark.d.ts
CHANGED
|
@@ -6,4 +6,4 @@ import type { Rasterize } from '../render/png.js';
|
|
|
6
6
|
/** The transparent PNGs' sizes: 512, 1024, 2048. */
|
|
7
7
|
export const LIGHT_DARK_PNG_SIZES: readonly number[];
|
|
8
8
|
/** The mark in ink for light grounds and paper for dark ones (SVG and PNG), an SVG that follows the reader's mode, and a preview of each. */
|
|
9
|
-
export function lightDarkSet(brand: BrandInput | Brand, options?: { rasterize?: Rasterize }): Promise<FileMap>;
|
|
9
|
+
export function lightDarkSet(brand: BrandInput | Brand | { svg: string; color?: string; name?: string }, options?: { rasterize?: Rasterize }): Promise<FileMap>;
|
package/src/kit/light-dark.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @module kit/light-dark
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import {
|
|
10
|
+
import { resolveMarkBrand } from '../brand/brand.js';
|
|
11
11
|
import { markSvg, markTile, markAutoSvg } from '../brand/mark.js';
|
|
12
12
|
import { toPng } from '../render/png.js';
|
|
13
13
|
import { fileMap } from '../util/files.js';
|
|
@@ -27,7 +27,7 @@ const PREVIEW = 1024;
|
|
|
27
27
|
* `svg/mark-auto.svg`, `png/mark-for-{light,dark}-<size>.png` and `preview/on-{light,dark}.png`.
|
|
28
28
|
*/
|
|
29
29
|
export async function lightDarkSet(input, { rasterize } = {}) {
|
|
30
|
-
const { mark, palette: p } =
|
|
30
|
+
const { mark, palette: p } = resolveMarkBrand(input);
|
|
31
31
|
const ways = /** @type {const} */ ([['for-light', p.ink, p.paper], ['for-dark', p.paper, p.ink]]);
|
|
32
32
|
const files = fileMap();
|
|
33
33
|
for (const [way, ink] of ways) files.set(`svg/mark-${way}.svg`, markSvg(mark, ink));
|