@logomarks/brand-kit 0.0.0-stage → 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.
Files changed (110) hide show
  1. package/CHANGELOG.md +71 -0
  2. package/LICENSE +21 -0
  3. package/README.md +49 -2
  4. package/docs/api.md +104 -0
  5. package/docs/development.md +25 -0
  6. package/docs/identity.md +77 -0
  7. package/docs/platforms.md +50 -0
  8. package/docs/styles.md +23 -0
  9. package/package.json +91 -4
  10. package/src/brand/brand.d.ts +72 -0
  11. package/src/brand/brand.js +61 -0
  12. package/src/brand/font.d.ts +32 -0
  13. package/src/brand/font.js +31 -0
  14. package/src/brand/mark.d.ts +45 -0
  15. package/src/brand/mark.js +94 -0
  16. package/src/brand/type.d.ts +26 -0
  17. package/src/brand/type.js +57 -0
  18. package/src/color/palette.d.ts +41 -0
  19. package/src/color/palette.js +85 -0
  20. package/src/color/swatches.d.ts +30 -0
  21. package/src/color/swatches.js +122 -0
  22. package/src/color/tokens.d.ts +11 -0
  23. package/src/color/tokens.js +75 -0
  24. package/src/deck/frame.d.ts +14 -0
  25. package/src/deck/frame.js +54 -0
  26. package/src/deck/index.d.ts +45 -0
  27. package/src/deck/index.js +61 -0
  28. package/src/deck/slides/colour.js +42 -0
  29. package/src/deck/slides/construction.js +49 -0
  30. package/src/deck/slides/cover.js +29 -0
  31. package/src/deck/slides/in-use.js +68 -0
  32. package/src/deck/slides/logo.js +47 -0
  33. package/src/deck/slides/palette.js +38 -0
  34. package/src/deck/slides/space.js +49 -0
  35. package/src/deck/slides/type.js +34 -0
  36. package/src/deck/slides/usage.js +82 -0
  37. package/src/favicon/favicons.d.ts +28 -0
  38. package/src/favicon/favicons.js +85 -0
  39. package/src/favicon/ico.d.ts +18 -0
  40. package/src/favicon/ico.js +50 -0
  41. package/src/finish/finish.d.ts +16 -0
  42. package/src/finish/finish.js +70 -0
  43. package/src/index.d.ts +62 -0
  44. package/src/index.js +42 -0
  45. package/src/kit/brand-json.d.ts +28 -0
  46. package/src/kit/brand-json.js +41 -0
  47. package/src/kit/index.d.ts +34 -0
  48. package/src/kit/index.js +64 -0
  49. package/src/kit/lockups.d.ts +12 -0
  50. package/src/kit/lockups.js +48 -0
  51. package/src/kit/marks.d.ts +10 -0
  52. package/src/kit/marks.js +50 -0
  53. package/src/kit/readme.d.ts +6 -0
  54. package/src/kit/readme.js +37 -0
  55. package/src/kit/sheet.d.ts +8 -0
  56. package/src/kit/sheet.js +207 -0
  57. package/src/lockup/lockup.d.ts +41 -0
  58. package/src/lockup/lockup.js +79 -0
  59. package/src/lockup/seal.d.ts +73 -0
  60. package/src/lockup/seal.js +177 -0
  61. package/src/render/pdf.d.ts +6 -0
  62. package/src/render/pdf.js +114 -0
  63. package/src/render/png.d.ts +19 -0
  64. package/src/render/png.js +62 -0
  65. package/src/social/artwork.d.ts +41 -0
  66. package/src/social/artwork.js +95 -0
  67. package/src/social/design.d.ts +12 -0
  68. package/src/social/design.js +52 -0
  69. package/src/social/frames.d.ts +6 -0
  70. package/src/social/frames.js +23 -0
  71. package/src/social/index.d.ts +38 -0
  72. package/src/social/index.js +61 -0
  73. package/src/social/layout.d.ts +28 -0
  74. package/src/social/layout.js +129 -0
  75. package/src/social/og.d.ts +6 -0
  76. package/src/social/og.js +64 -0
  77. package/src/social/platforms.d.ts +40 -0
  78. package/src/social/platforms.js +67 -0
  79. package/src/social/readme.d.ts +6 -0
  80. package/src/social/readme.js +42 -0
  81. package/src/social/seal.d.ts +14 -0
  82. package/src/social/seal.js +56 -0
  83. package/src/social/signature.d.ts +6 -0
  84. package/src/social/signature.js +38 -0
  85. package/src/social/styles/bold.d.ts +4 -0
  86. package/src/social/styles/bold.js +55 -0
  87. package/src/social/styles/gradient.d.ts +10 -0
  88. package/src/social/styles/gradient.js +47 -0
  89. package/src/social/styles/index.d.ts +29 -0
  90. package/src/social/styles/index.js +19 -0
  91. package/src/social/styles/minimal.d.ts +4 -0
  92. package/src/social/styles/minimal.js +29 -0
  93. package/src/social/styles/pattern.d.ts +4 -0
  94. package/src/social/styles/pattern.js +45 -0
  95. package/src/social/styles/tone.d.ts +6 -0
  96. package/src/social/styles/tone.js +26 -0
  97. package/src/texture/parts.d.ts +19 -0
  98. package/src/texture/parts.js +109 -0
  99. package/src/texture/patterns.d.ts +13 -0
  100. package/src/texture/patterns.js +178 -0
  101. package/src/texture/texture.d.ts +51 -0
  102. package/src/texture/texture.js +108 -0
  103. package/src/util/files.d.ts +13 -0
  104. package/src/util/files.js +42 -0
  105. package/src/util/page.d.ts +29 -0
  106. package/src/util/page.js +55 -0
  107. package/src/util/svg.d.ts +12 -0
  108. package/src/util/svg.js +74 -0
  109. package/src/version.d.ts +2 -0
  110. package/src/version.js +2 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,71 @@
1
+ # Changelog
2
+
3
+ All notable changes to `@logomarks/brand-kit` 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.4.1] — 2026-11-06
9
+
10
+ ### Fixed
11
+
12
+ - Texture fills never change a mark's geometry. A mark of one piece is no longer cut into quarters with a channel (it read as damaged). It's filled whole with handwriting in the brand colour, or with `seam: true` (or an angle) two textures meet along a line inside the fill, both clipped to the mark's own outline. Marks of two to four pieces and the alternating rule past four are unchanged. `markParts(svg)` returns the parts only; `split`, `gap` and `SPLITS` are removed, and `seamSide`, `ONE_PIECE` and `defaultTextures(count, seam)` are added.
13
+
14
+ ## [0.4.0] — 2026-11-06
15
+
16
+ ### Added
17
+
18
+ - **The seal**, `sealLockup()` and `sealOn()`: a round badge lockup with the name round the top, the tagline round the bottom (right way up), dots or stars between them, thin rings and the mark centred. The ring text is kerned and outlined by covers. The type is sized to the arc, and the mark clears the inner ring. It's in the kit as `lockup/seal-on-{light,dark,color}.{svg,png}`, on the brand sheet, and as seal avatars (`social/seal/<id>`) for every image cropped to a circle.
19
+ - **Texture fills**, `texturedMark()` and `texturedMarkSvg()`: the mark split into its parts (`markParts()`), each clipped and filled with grid paper, handwriting, torn paper, dots, stripes, checks, cross-hatching or a flat fill. Colours turn round the hue wheel from the brand colour. Marks of more than four pieces alternate flat pieces. `brandKit({ texture })` writes `mark/texture/`.
20
+ - **Printed finishes**, `finish: 'letterpress' | 'riso' | 'stamp'` on `brandKit`, `markFiles`, `lockupFiles`, `socialPack`, `socialSvg` and `artwork`: image-effects' new `print` filter on the ink (the logo only, never the background), seeded. Seals print finer and at three-quarter strength so their words stay legible. `finishMarkup()` and `finishLayer()` apply it to anything.
21
+ - **The `gradient` style**: a grainy gradient field (covers' `mesh` and `grain`) of the brand colour's steps, held to a lightness band the logo reads on. It's opt-in: `DEFAULT_STYLES` is the three earlier styles, `STYLE_IDS` all four.
22
+ - **Named swatch cards**, `swatches()`, `swatchStack()` and `swatchCards()`: the palette light to dark as overlapping rounded cards, each with the nearest colour name (from color-utils 1.5, never repeated), hex, RGB and OKLCH, and text that clears 4.5:1. They're in `colors/swatches.{png,svg}`, on the brand sheet, and in `brand.json` as `colors.swatches`.
23
+ - **The guidelines deck**, `guidelinesDeck()` and `deckSlideSvg()`: nine 1920 × 1080 slides (cover, logo, clear space and size, colour, palette, typography, construction, do and don't, in use) as SVG and PNG, and a 16:9 PDF. `pngsToPdf()` writes the PDF with no PDF library, embedding each PNG as a calibrated-sRGB Flate image. `brandKit({ deck })` writes `deck/` by default.
24
+ - `tileSvg()`: any 512-unit artwork on a tile. `markTile` is now built on it, with byte-identical output.
25
+
26
+ ### Changed
27
+
28
+ - The brand sheet's Logo section has a seal row, and its Colour section stacks the named swatches beside the roles' contrast.
29
+ - The brand sheet's drawing helpers moved to `util/page.js`, which the sheet, the deck and the swatch cards share. Before the new sections were added, the sheet was byte-identical through the move.
30
+ - `logo.layouts` in `brand.json` includes `'seal'`.
31
+ - Depends on `@arraypress/color-utils` `^1.5.0` (colour names) and `@logomarks/image-effects` `^0.2.0` (the `print` filter). Until they're published, the devDependencies link the sibling folders.
32
+
33
+ ## [0.3.2] — 2026-11-06
34
+
35
+ ### Changed
36
+
37
+ - Depends on `@logomarks/core` `^0.1.2` (renamed from `@logomarks/marks-kit`), `@logomarks/image-effects` `^0.1.1` (renamed from `@arraypress/image-effects`) and `@arraypress/covers` `^1.3.1` (which uses the renamed image-effects); no code changes beyond the names.
38
+
39
+ ## [0.3.1] — 2026-11-05
40
+
41
+ ### Changed
42
+
43
+ - Renamed to `@logomarks/brand-kit`; no code changes. It depends on `@logomarks/marks-kit` (renamed from `@arraypress/marks-kit`), and the brand sheet's credit and `brand.json`'s `generator` name `@logomarks/brand-kit`.
44
+
45
+ ## [0.3.0] — 2026-11-05
46
+
47
+ ### Added
48
+
49
+ - `source: { name, url, license }` on a brand: where the mark came from, written to `brand.json` as `mark` (the CLI credits a Logomarks mark and its CC0 licence).
50
+
51
+ ## [0.2.0] — 2026-11-05
52
+
53
+ ### Added
54
+
55
+ - **`artwork(brand, { width, height, style, kind, safe, margin, animated })`** and `artworkPng`: a style drawn at any size, for prints, screens and mockups, with the logo laid out by the canvas's kind (`'logo'`, `'post'`, `'banner'` …) inside a margin. `artworkSpec`, `artworkCover`, `artworkKind` and `ARTWORK_MARGIN` expose the steps. The `logomarks` CLI's mockups draw their prints with it.
56
+ - `styleCover(brand, spec, style, { seed, animated })`: the covers options for a style on any spec, which the social images, artwork and the brand sheet's hero now share. Their output is unchanged, byte for byte.
57
+
58
+ ## [0.1.0] — 2026-11-05
59
+
60
+ The brand kit from the Logomarks CLI (`kit/`, `brand/`), the studio (`kit.ts`, `render.ts`, `brand-kit.ts`, `sheet-extras.ts`, the `fx` lockup) and `tools/make-icons.cjs`, written once, with a social pack.
61
+
62
+ ### Added
63
+
64
+ - **`brandKit({ svg, name, color, font, tagline, url, styles })`** returns every file as a `Map`, plus `brand.json`'s contents:
65
+ - the mark as SVG (`currentColor`, primary, on light, dark and colour, auto light/dark) and PNG from 64 to 2048 px;
66
+ - favicons: a PNG-in-ICO at 16/32/48, `favicon.svg`, the 180 px Apple touch icon, 192/512 `any` and maskable icons (the whole mark in the 80% safe circle), `site.webmanifest` and `head.html`;
67
+ - horizontal and stacked lockups on light, dark and colour, the name as outlines (shaped by covers' HarfBuzz);
68
+ - a 50–950 OKLCH palette, with ink and paper tinted to the brand's hue, the mark and text colours that clear WCAG, and every pairing's ratio and level, as CSS custom properties, a Tailwind v4 theme and W3C design tokens;
69
+ - a one-page brand sheet (PNG, and SVG with every word as outlines), `brand.json` and a README.
70
+ - **`socialPack(brand, { platforms, styles, animated })`**: 24 images across Instagram, LinkedIn, X, YouTube, Facebook, TikTok, Twitch, Discord, Threads and Bluesky, at sizes checked against the platforms in November 2026 (sources in `docs/platforms.md`). Each comes in three styles (`minimal`, `bold`, `pattern`), with the logo kept inside each platform's safe zone and avatars' marks inside their circle. Animated SVGs (covers motion) cover avatars, stories and banners. The pack also has an email signature PNG and HTML, the Open Graph card through `@arraypress/og-image`, and a README with the sizes, sources and video commands.
71
+ - Every part is exported on its own: `faviconSet`, `lockup`, `typeset`, `palette`, `ico`/`readIco`, `brandSheet`, `socialSvg`/`socialPng`/`socialCover`, `socialFrames` and more. PNGs are drawn by a host `rasterize`, by sharp, or by a canvas.
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,50 @@
1
- # Temporary Holding Version
1
+ # @logomarks/brand-kit
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 complete brand kit, guidelines deck and social pack from a logomark, a name, a colour and a typeface, returned in memory as a `Map` of files.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install @logomarks/brand-kit sharp
9
+ npm install @arraypress/og-image # optional: the Open Graph card
10
+ ```
11
+
12
+ ## Quick start
13
+
14
+ ```js
15
+ import { readFile, writeFile, mkdir } from 'node:fs/promises';
16
+ import path from 'node:path';
17
+ import { brandKit } from '@logomarks/brand-kit';
18
+
19
+ const { files } = await brandKit({
20
+ svg: await readFile('mark.svg', 'utf8'),
21
+ name: 'Shear Studio',
22
+ color: '#ff5c3a',
23
+ font: { name: 'Space Grotesk', data: await readFile('SpaceGrotesk-SemiBold.ttf'), weight: 600 },
24
+ finish: 'letterpress', // optional: 'riso' or 'stamp' too
25
+ texture: true, // optional: the mark collaged from textures
26
+ });
27
+ for (const [file, data] of files) {
28
+ await mkdir(path.dirname(`kit/${file}`), { recursive: true });
29
+ await writeFile(`kit/${file}`, data);
30
+ }
31
+ ```
32
+
33
+ ## What's in it
34
+
35
+ - [API](https://github.com/Logomarks/brand-kit/blob/main/docs/api.md): the mark on light, dark and colour, favicons and a real `.ico`, outlined lockups, a 50–950 OKLCH palette with WCAG pairings, CSS and design tokens, `brand.json`, the brand sheet, and every part on its own
36
+ - [Platforms](https://github.com/Logomarks/brand-kit/blob/main/docs/platforms.md): the social pack's sizes and safe zones, with sources
37
+ - [Seal, textures, finishes, swatches and the deck](https://github.com/Logomarks/brand-kit/blob/main/docs/identity.md): the round seal lockup, texture-collaged marks, letterpress, riso and stamp finishes, named swatch cards and the nine-slide guidelines deck with its PDF
38
+ - [Styles and motion](https://github.com/Logomarks/brand-kit/blob/main/docs/styles.md): `minimal`, `bold`, `pattern` and `gradient`, and the animated SVGs
39
+ - [Development](https://github.com/Logomarks/brand-kit/blob/main/docs/development.md): tests and snapshots
40
+
41
+ ## Links
42
+
43
+ - [Docs](https://github.com/Logomarks/brand-kit/tree/main/docs)
44
+ - [Changelog](https://github.com/Logomarks/brand-kit/blob/main/CHANGELOG.md)
45
+ - [Licence](https://github.com/Logomarks/brand-kit/blob/main/LICENSE)
46
+ - [GitHub](https://github.com/Logomarks/brand-kit)
47
+
48
+ ## Licence
49
+
50
+ MIT © ArrayPress Limited; author David Sherlock.
package/docs/api.md ADDED
@@ -0,0 +1,104 @@
1
+ # API
2
+
3
+ Every file comes back in memory as a `Map` of path to bytes or text, so the host can write it to a folder or zip it. Text is outlines throughout, so no file needs a font. SVGs are byte-identical for the same input. It renders through [covers](https://www.npmjs.com/package/@arraypress/covers) (layout, type, motion) and [color-utils](https://www.npmjs.com/package/@arraypress/color-utils) (OKLCH), with sharp in Node and a canvas in browsers, or any rasteriser you pass in.
4
+
5
+ Everything is exported from `@logomarks/brand-kit`. A function that takes a brand accepts either the inputs below or a brand already resolved by `resolveBrand()`, which sets the name once and is quicker to reuse.
6
+
7
+ ## Brand inputs
8
+
9
+ | Option | | |
10
+ |---|---|---|
11
+ | `svg` | required | The logomark: an SVG of filled shapes. It's fitted to the Logomarks standard (512 canvas, longest side 448, centred) by `@logomarks/core`. Nested `<g transform>`s aren't applied. |
12
+ | `name` | required | The brand's name, set as outlines in the typeface. |
13
+ | `color` | `#d4ff3a` | The brand colour, hex. |
14
+ | `font` | Inter 600 | A family covers already has (`'Inter'`), or `{ name, data \| src, weight, tracking, case, url, license }`: covers' `FontSource` plus `tracking` (em, default -0.02), `case` (`'none'`, `'uppercase'`, `'lowercase'`), and the `url` and `license` that `brand.json` and the sheet show. |
15
+ | `source` | | Where the mark came from, `{ name, url, license }`: written to `brand.json` as `mark`. |
16
+ | `tagline`, `url`, `handle` | | Shown on social images, the sheet, the email signature and the OG card. `handle` defaults to `@` plus the slug. |
17
+
18
+ ## `brandKit(options)`
19
+
20
+ `options` are the brand inputs plus:
21
+
22
+ - `styles`, `platforms` and `animated` (see `socialPack`);
23
+ - `social` (default `true`), `deck` (default `true`) and `seal` (default `true`);
24
+ - `finish` (`'letterpress'`, `'riso'` or `'stamp'`) and `texture` (`true` or texture options; see [identity.md](identity.md));
25
+ - `small` (a simplified mark SVG for the 16–48 px favicons) and `rasterize`.
26
+
27
+ It returns `{ files, brand }`, where `brand` is `brand.json`'s contents.
28
+
29
+ | Path | |
30
+ |---|---|
31
+ | `mark/svg/` | `mark.svg` (`currentColor`), `mark-primary.svg`, `mark-on-light.svg`, `mark-on-dark.svg`, `mark-on-color.svg` (on its ground), `mark-auto.svg` (follows light or dark mode) |
32
+ | `mark/png/` | `mark-primary-{64…2048}.png` (transparent), `mark-on-{light,dark,color}-1024.png` (on a ground) |
33
+ | `mark/…-<finish>` | With `finish`: `svg/mark-on-{light,dark,color}-<finish>.svg` and `png/…-1024.png` |
34
+ | `mark/texture/` | With `texture`: `mark-textured.svg`, `mark-textured-1024.png` |
35
+ | `favicon/` | `favicon.ico` (16/32/48), `favicon.svg`, `apple-touch-icon.png`, `icon-{192,512}.png`, `icon-maskable-{192,512}.png`, `site.webmanifest`, `head.html` |
36
+ | `lockup/` | `{horizontal,stacked}-on-{light,dark,color}.{svg,png}`, `seal-on-{light,dark,color}.{svg,png}` (and `-<finish>`) |
37
+ | `colors/` | `palette.css` (custom properties, OKLCH noted), `tailwind.css` (a v4 `@theme`), `tokens.json` (W3C design tokens, with WCAG pairings), `swatches.{png,svg}` (named swatch cards) |
38
+ | `brand-sheet.{png,svg}` | The one-page brand sheet |
39
+ | `deck/` | `01-cover.{png,svg}` … `09-in-use.{png,svg}`, `guidelines.pdf` |
40
+ | `social/` | The social pack |
41
+ | `brand.json`, `README.md` | |
42
+
43
+ ## `socialPack(brand, options)`
44
+
45
+ | Option | Default | |
46
+ |---|---|---|
47
+ | `platforms` | all | Image ids (`'x-header'`) or platform names (`'YouTube'`). |
48
+ | `styles` | `DEFAULT_STYLES` | `'minimal'`, `'bold'`, `'pattern'`; `'gradient'` when named. |
49
+ | `animated` | `true` | `*.animated.svg` for avatars, stories and banners. |
50
+ | `finish` | | A printed finish on every image's logo. |
51
+ | `seal` | `true` | `seal/<id>.{png,svg}`: the seal filling each avatar's circle. |
52
+ | `signature`, `og` | `true` | The email signature, and the Open Graph card. |
53
+ | `rasterize` | | See below. |
54
+
55
+ Files: `<style>/<id>.png`, `<style>/<id>.svg`, `<style>/<id>.animated.svg`, `email/signature.png`, `email/signature.html`, `og-image.png` and `README.md`. The OG card is drawn by `@arraypress/og-image` when it's installed; otherwise it uses the bold style.
56
+
57
+ ## `artwork(brand, options)`
58
+
59
+ One of the styles on a canvas of your own (a business card, a poster, a sleeve, a billboard), laid out as a social image is. `artworkPng` draws it.
60
+
61
+ | Option | Default | |
62
+ |---|---|---|
63
+ | `width`, `height` | required | Pixels. |
64
+ | `style` | `'bold'` | `'minimal'`, `'bold'`, `'pattern'`, `'gradient'`. |
65
+ | `finish` | | A printed finish on the logo. |
66
+ | `kind` | by shape | How the logo is laid out: `'logo'` the mark alone, `'post'` stacked, `'banner'` horizontal (any `PlatformKind`). Wider than 1.6:1 is a banner, else a post. |
67
+ | `safe` | inside `margin` | `[x, y, width, height]`, where the logo and words go. |
68
+ | `margin` | `0.1` | Round the safe zone, as a share of the shorter side. |
69
+ | `animated` | `false` | covers motion. |
70
+
71
+ `artworkSpec(options)` is the canvas as a `PlatformSpec`, `artworkCover(brand, options)` the covers options, and `styleCover(brand, spec, style, { seed, animated })` the step both artwork and the social images share. The brand sheet's hero is artwork.
72
+
73
+ ## Parts
74
+
75
+ | Export | |
76
+ |---|---|
77
+ | `resolveBrand(input)` | The brand resolved: mark, palette, font, the name as outlines, `grounds`, `lockup(layout, colors)`. |
78
+ | `faviconSet(brand, { small, rasterize })` | The favicon files, for a site's root. |
79
+ | `markFiles`, `lockupFiles` | The mark's and lockups' files. |
80
+ | `brandSheet(brand)` | `{ svg, png }`. |
81
+ | `brandJson(brand, files)` | `brand.json`'s contents. |
82
+ | `palette(hex)` | `{ primary, onPrimary, ink, paper, step, scale, text, mark, pairings, steps }`. The mark keeps the brand colour, or moves one scale step at most, where it clears 3:1 (4.5:1 when a step allows); otherwise it's ink or paper. Text clears 4.5:1. |
83
+ | `paletteCss`, `paletteTailwind`, `paletteTokens` | The palette as files. |
84
+ | `lockup({ mark, name, layout, markColor, textColor, ground, clear })` | `{ svg, body, width, height, mark }`. The name's cap height is 0.42 of the mark's height beside it and 0.3 under it, with a quarter of the mark's height clear all round. |
85
+ | `typeset(text, font)` | The text as outlines at 100 px: `{ paths, box, cap }`. |
86
+ | `loadMark(svg)`, `markSvg`, `markAutoSvg`, `markTile`, `markBody`, `padForCircle` | The mark: fitted, painted, tiled, kept inside a circle. |
87
+ | `ico(images)`, `readIco(bytes)` | Write and read a PNG-in-ICO file. |
88
+ | `socialCover(brand, id, style, { animated })` | The covers cover options for one image, to inspect or tweak. |
89
+ | `socialSvg`, `socialPng` | One image. |
90
+ | `socialFrames(brand, id, style, { fps, seconds })` | An async generator of SVG stills, to encode to MP4 or GIF. |
91
+ | `emailSignature(brand, { image })`, `ogImage(brand)` | The signature's PNG and HTML; the OG card. |
92
+ | `placeLogo`, `safeBox`, `markPattern` | Layout helpers the styles use. |
93
+ | `sealLockup`, `sealOn`, `sealGeometry`, `sealAvatar`, `sealAvatarSvg` | The seal and seal avatars ([identity.md](identity.md)). |
94
+ | `texturedMark`, `texturedMarkSvg`, `markParts`, `textureColors`, `defaultTextures`, `TEXTURES` | Texture fills. |
95
+ | `finishEffect`, `finishMarkup`, `finishLayer`, `FINISHES` | Printed finishes. |
96
+ | `swatches`, `swatchStack`, `swatchCards` | Named swatches and the stacked cards. |
97
+ | `guidelinesDeck`, `deckSlideSvg`, `SLIDES`, `DECK` | The guidelines deck. |
98
+ | `tileSvg(body, { size, ground, pad, radius, circle, defs })` | Any 512-unit artwork on a tile. |
99
+ | `toPng(svg, { width, height, rasterize })`, `pngSize(png)` | SVG to PNG; a PNG's size. |
100
+ | `pngsToPdf(pngs, { width, height, title })`, `decodePng(png)` | PNGs as one PDF, a page each; a PNG's RGB pixels. |
101
+
102
+ ## Rendering
103
+
104
+ PNGs come from a host's `rasterize(svg, { width, height })` when one is given (the `logomarks` CLI passes resvg-wasm). Otherwise they come from sharp in Node, or a canvas in a browser through `@logomarks/image-effects/raster`. SVGs need neither.
@@ -0,0 +1,25 @@
1
+ # Development
2
+
3
+ ```bash
4
+ npm install
5
+ npm test # node --test
6
+ npm run typecheck # tsc over the hand-written .d.ts files
7
+ UPDATE_SNAPSHOTS=1 npm test # rewrite tests/snapshots/
8
+ ```
9
+
10
+ Until `@arraypress/color-utils` 1.5 and `@logomarks/image-effects` 0.2 are on npm, the devDependencies link the sibling folders (`file:../color-utils`, `file:../image-effects`), while `dependencies` keep the semver ranges consumers get. Drop the `file:` links once they're published.
11
+
12
+ Tests:
13
+
14
+ - `social.test.js` checks every size against the spec table, and the logo inside every safe zone, geometrically and in pixels (avatars inside their circle, the YouTube banner's safe area, every minimal image).
15
+ - `favicon.test.js` checks the `.ico`'s structure and the maskable safe circle.
16
+ - `color.test.js` checks WCAG for 43 brand colours.
17
+ - `determinism.test.js` checks that the same input gives byte-identical text files.
18
+ - `texture.test.js` checks part counts (4, 9 and 1), that a one-piece mark keeps its outline (whole or seamed, measured in pixels), reading order, clip paths and determinism.
19
+ - `finish.test.js` checks the finishes' files, seeding, that the stamp breaks up more ink than letterpress, and the gradient style's contrast band for 43 colours.
20
+ - `seal.test.js` checks the circle maths, that nothing is drawn between the mark and the inner ring (in pixels), and determinism.
21
+ - `swatches.test.js` checks unique names and 4.5:1 text on every swatch for 43 brand colours.
22
+ - `deck.test.js` checks nine 1920 × 1080 slides, determinism, the PDF's structure and xref, and PNG decoding.
23
+ - `snapshots.test.js` compares PNGs of four Logomarks marks, as thumbnails with a small tolerance, since libvips versions anti-alias differently.
24
+
25
+ The fixtures are six CC0 Logomarks marks and three OFL faces (`tests/fixtures/fonts/OFL.txt`).
@@ -0,0 +1,77 @@
1
+ # Seal, textures, finishes, swatches and the deck
2
+
3
+ Everything here is in `brandKit()` by default, or behind one option, and every part is exported on its own. Output is deterministic: the same brand and seed give the same bytes.
4
+
5
+ ## The seal
6
+
7
+ `sealLockup(brand, { markColor, textColor, ground, top, bottom, rings, separator })` returns a round badge: the name round the top in tracked capitals, a second line (the tagline by default) round the bottom reading the right way up, dots or stars between them (`separator: 'dot' | 'star' | 'none'`), thin rings inside and out, and the mark centred. Classic for bakeries, roasters and delis.
8
+
9
+ - The ring text is set by covers on an arc, kerned and then outlined, so the SVG needs no font.
10
+ - Both lines sit in one band. The top line's capitals stand outward from their baseline and the bottom line's inward, so the bottom baseline sits a cap height further out.
11
+ - The type size is the largest the arc allows: 150° for the top line with a bottom line, 250° alone, and 120° for the bottom line.
12
+ - The mark is scaled so its farthest point clears the inner ring by 7.5% of the diameter. `seal.geometry` has every radius, for checking.
13
+ - `sealOn(brand, way, { finish })` is the seal on `'on-light'`, `'on-dark'` or `'on-color'` (a disc of the brand colour). With a finish, the ink is printed finer (`SEAL_DETAIL`) and at three-quarter strength (`SEAL_PRINT`), so the ring's words stay legible.
14
+ - In the kit: `lockup/seal-on-{light,dark,color}.{svg,png}`, plus `-<finish>` variants; on the brand sheet under Logo; and in the social pack as `social/seal/<id>.{png,svg}` for every image cropped to a circle (`sealAvatar`, `SEAL_FILL` 0.94 of the circle).
15
+
16
+ ## Textures
17
+
18
+ `texturedMark(brand, { textures, colors, seam, seed })` fills each of the mark's pieces with a texture, clipped to the piece's exact outline. The mark's geometry is never changed. `texturedMarkSvg(brand, { size, ground, pad, radius, ...})` returns it as a file.
19
+
20
+ | Texture | |
21
+ |---|---|
22
+ | `grid` | Graph paper: fine lines and a heavier line every four. |
23
+ | `solid` | Flat, in the brand colour. |
24
+ | `scribble` | Joined, slanted handwriting (cycloid loops and humps, wandering sizes, words). |
25
+ | `torn` | A sheet torn across the piece, a white fibre edge, dots on what's revealed. |
26
+ | `dots`, `stripes`, `checker`, `hatch` | Polka dots, diagonal stripes, checks, cross-hatching. |
27
+
28
+ - **Pieces.** `markParts(svg)` returns the mark's separate parts in reading order. Details under 1% of the ink ride with the nearest part.
29
+ - **One piece.** A mark of one piece is filled whole, with handwriting in the brand colour. With `seam: true` (or an angle in degrees) two textures meet along a line inside the fill. The second is drawn over the first beyond the line (`seamSide`), so there's no channel and no gap.
30
+ - **Textures per piece.** By default two to four pieces take grid, solid, scribble and torn. A mark of more than four pieces alternates textured and flat pieces so it stays calm (`defaultTextures`).
31
+ - **Colours.** `textureColors(palette)` gives the brand colour and three more round the hue wheel at a friendly lightness (yellows kept light), each with a deep ink of its own hue. Pass `colors` to choose your own.
32
+ - In the kit, with `texture: true` (or the options): `mark/texture/mark-textured.svg` and `mark-textured-1024.png`.
33
+
34
+ ## Finishes
35
+
36
+ `finish: 'letterpress' | 'riso' | 'stamp'` (or `{ finish, amount, rough, edge, breakup, specks, size, uneven, squeeze, grain }`) is image-effects' `print` filter on the ink.
37
+
38
+ | Finish | Look |
39
+ |---|---|
40
+ | `letterpress` | Crisp, a faint wobble, a denser rim, light breakup at the edge. |
41
+ | `riso` | Fine paper-showing speckle and grain, uneven drum coverage. |
42
+ | `stamp` | A rubber stamp: rough edges chewed by breakup, uneven pressure, specks. |
43
+
44
+ The ink is cut rather than faded: it's either there or not. The filter is drawn in the artwork's own units, so the speckle scales with the logo. It's seeded by the brand and the file. `finishMarkup(markup, canvas, finish, seed, id, detail)` and `finishLayer(layer, finish, seed)` apply it to your own markup or covers layers.
45
+
46
+ | Option | Where it applies |
47
+ |---|---|
48
+ | `markFiles(brand, { finish })`, `brandKit({ finish })` | `mark/svg/mark-on-{light,dark,color}-<finish>.svg` and `mark/png/…-1024.png` |
49
+ | `lockupFiles(brand, { finish })` | `lockup/seal-on-*-<finish>.{svg,png}` |
50
+ | `socialPack(brand, { finish })`, `socialSvg(…, { finish })` | Every image's logo (the background stays clean) |
51
+ | `artwork(brand, { finish })` | The artwork's logo |
52
+
53
+ ## The grainy gradient style
54
+
55
+ `style: 'gradient'` puts the brand colour and its 900 and 300 steps in a covers `mesh` field with `grain`. The field is held to a lightness band the logo clears everywhere: deep under paper, pale under ink (`gradientField`). It's in `STYLE_IDS` but not `DEFAULT_STYLES`, so the social pack draws it only when it's named. Grain makes heavy PNGs, and Bluesky's 1,000,000-byte limit can be exceeded at 3000 × 1000.
56
+
57
+ ## Swatch cards
58
+
59
+ `swatches(palette)` returns the palette's named swatches, light to dark: paper, 100, 300, the brand colour, 700, 900 and ink. Each has a name from `@arraypress/color-utils`' `nearestColorNames`, never repeated (a taken name becomes "Deep …" or "Pale …"), plus hex, RGB, OKLCH, and text that clears 4.5:1 (pure black or white when the tinted ink can't).
60
+
61
+ `swatchCards(brand, { width })` draws them as overlapping rounded cards, name large, hex and role at the right. The kit writes them to `colors/swatches.{png,svg}`. The brand sheet's Colour section stacks them beside the roles' contrast, and `brand.json`'s `colors.swatches` lists them.
62
+
63
+ ## The guidelines deck
64
+
65
+ `guidelinesDeck(brand, { slides, pdf })` draws nine 1920 × 1080 slides as SVG (every word outlined) and PNG, plus one PDF with a 16:9 page per slide:
66
+
67
+ 1. **Cover**: the bold style full bleed, with the title, edition and contents.
68
+ 2. **Logo**: on ink, paper and the brand colour.
69
+ 3. **Clear space and size**: the clear-space boxes, and the mark from 16 to 64 px.
70
+ 4. **Colour**: full-height columns with name, hex, RGB and OKLCH.
71
+ 5. **Palette**: the swatch cards and the WCAG pairings.
72
+ 6. **Typography**: the face, a line, the name huge, the alphabet and the settings.
73
+ 7. **Construction**: the mark on its 512 grid of 32-unit modules, the 448 fit, its outline.
74
+ 8. **Do and don't**: three grounds and the seal; then stretched, recoloured, with effects, and turned.
75
+ 9. **In use**: business cards on a desk; a story, a post, the seal avatar and a header.
76
+
77
+ `deckSlideSvg(brand, id)` draws one slide. The PDF is written without a PDF library: `pngsToPdf(pngs)` decodes each PNG and embeds it as a Flate image in calibrated sRGB, using image-effects' zlib, so it runs in Node, browsers and Workers. In the kit (`deck: true` by default) the files are `deck/01-cover.{png,svg}` … `deck/09-in-use.{png,svg}` and `deck/guidelines.pdf`.
@@ -0,0 +1,50 @@
1
+ # Platforms
2
+
3
+ Every social image, checked against the platforms in November 2026. **Official** means the platform publishes the figure; **community** means it doesn't, and the size is the most widely cited one. The data is `PLATFORMS` in [`src/social/platforms.js`](../src/social/platforms.js); `safe` is `[x, y, width, height]`, where the logo and words go.
4
+
5
+ | Platform | Image | Id | Size | Kind | Safe zone | Notes | Source |
6
+ |---|---|---|---|---|---|---|---|
7
+ | Instagram | Post, square | `instagram-post` | 1080×1080 | post | 65, 65, 950, 950 | | [official](https://www.facebook.com/help/instagram/1631821640426723) |
8
+ | Instagram | Post, portrait 4:5 | `instagram-portrait` | 1080×1350 | post | 94, 135, 892, 1080 | The profile grid shows every post centre-cropped to 3:4. | [official](https://www.facebook.com/help/instagram/1631821640426723) |
9
+ | Instagram | Post, portrait 3:4 (the tallest uncropped) | `instagram-portrait-3x4` | 1080×1440 | post | 76, 86, 929, 1267 | Since 2025 Instagram keeps 1.91:1 to 3:4 uncropped; 3:4 fills a grid tile exactly. | [official](https://www.facebook.com/help/instagram/1631821640426723) |
10
+ | Instagram | Story | `instagram-story` | 1080×1920 | story | 65, 269, 950, 979 | Meta: keep 14% at the top, 35% at the bottom and 6% at the sides free of text and logos. | [official](https://www.facebook.com/business/ads-guide/update/image/instagram-story) |
11
+ | Instagram | Highlight cover | `instagram-highlight` | 1080×1920 | highlight, circle | 180, 600, 720, 720 | Uploaded as a story; only the centre circle shows. | [community](https://instasize.com/size-guides/instagram/highlight-cover) |
12
+ | LinkedIn | Company page logo | `linkedin-logo` | 400×400 | logo | 40, 40, 320, 320 | | [official](https://www.linkedin.com/help/linkedin/answer/a563309) |
13
+ | LinkedIn | Company page cover | `linkedin-company-cover` | 1512×256 | banner | 360, 28, 1112, 200 | The logo overlaps the bottom left. | [official](https://www.linkedin.com/help/linkedin/answer/a563309) |
14
+ | LinkedIn | Personal profile background | `linkedin-banner` | 1584×396 | banner | 600, 40, 940, 316 | The profile photo over the bottom left is measured from the desktop profile. | [official](https://www.linkedin.com/help/linkedin/answer/a566232) |
15
+ | X | Profile photo | `x-avatar` | 400×400 | avatar, circle | 0, 0, 400, 400 | | [official](https://help.x.com/en/managing-your-account/common-issues-when-uploading-profile-photo) |
16
+ | X | Header | `x-header` | 1500×500 | banner | 420, 60, 930, 380 | About 60 px may be cropped top and bottom; the avatar position is measured. | [official](https://help.x.com/en/managing-your-account/common-issues-when-uploading-profile-photo) |
17
+ | YouTube | Profile picture | `youtube-avatar` | 800×800 | avatar, circle | 0, 0, 800, 800 | Shown at 98×98; 800×800 is the common upload size. | [community](https://support.google.com/youtube/answer/10456525) |
18
+ | YouTube | Channel banner | `youtube-banner` | 2560×1440 | banner | 507, 508, 1546, 423 | YouTube: text and logos in the 1235×338 centre of a 2048×1152 upload (1546×423 at 2560×1440). TV shows it all. | [official](https://support.google.com/youtube/answer/10456525) |
19
+ | YouTube | Video thumbnail template | `youtube-thumbnail` | 3840×2160 | thumbnail | 230, 170, 3380, 1820 | 3840×2160 is the recommended size (minimum 640 wide). | [official](https://support.google.com/youtube/answer/72431) |
20
+ | Facebook | Profile picture | `facebook-profile` | 320×320 | avatar, circle | 0, 0, 320, 320 | | [official](https://www.facebook.com/help/125379114252045) |
21
+ | Facebook | Page cover (851×315 at 2×) | `facebook-cover` | 1702×630 | banner | 260, 70, 1182, 490 | Phones show a taller crop than desktop; key content stays central. | [official](https://www.facebook.com/help/125379114252045) |
22
+ | TikTok | Profile photo | `tiktok-avatar` | 400×400 | avatar, circle | 0, 0, 400, 400 | TikTok states only a 20×20 minimum. | [community](https://moda.app/resources/sizes/tiktok-profile-picture) |
23
+ | Twitch | Profile picture | `twitch-avatar` | 256×256 | avatar, circle | 0, 0, 256, 256 | | [official](https://help.twitch.tv/s/article/twitch-account-settings) |
24
+ | Twitch | Profile banner | `twitch-banner` | 1200×480 | banner | 96, 58, 1008, 365 | | [official](https://help.twitch.tv/s/article/twitch-account-settings) |
25
+ | Twitch | Offline screen (video player banner) | `twitch-offline` | 1920×1080 | screen | 192, 108, 1536, 864 | | [community](https://www.streamscheme.com/twitch-image-sizes/) |
26
+ | Discord | Server icon | `discord-icon` | 512×512 | avatar, circle | 0, 0, 512, 512 | | [community](https://moda.app/resources/sizes/discord-server-icon) |
27
+ | Discord | Server banner | `discord-banner` | 1920×1080 | banner | 230, 216, 1459, 648 | Minimum 960×540; cropped on phones. | [official](https://support.discord.com/hc/en-us/articles/360028716472-Server-Banners) |
28
+ | Threads | Profile picture | `threads-avatar` | 640×640 | avatar, circle | 0, 0, 640, 640 | Threads has no banner; the picture syncs with Instagram by default. | [community](https://linearity.io/blog/threads-size-guide/) |
29
+ | Bluesky | Avatar | `bluesky-avatar` | 1000×1000 | avatar, circle | 0, 0, 1000, 1000 | PNG or JPEG, at most 1,000,000 bytes (official). | [community](https://github.com/bluesky-social/atproto/blob/main/lexicons/app/bsky/actor/profile.json) |
30
+ | Bluesky | Banner | `bluesky-banner` | 3000×1000 | banner | 600, 120, 2250, 760 | PNG or JPEG, at most 1,000,000 bytes (official); the avatar overlaps the bottom left. | [community](https://github.com/bluesky-social/atproto/blob/main/lexicons/app/bsky/actor/profile.json) |
31
+ | Email | Signature | `email/signature` | 640×160 | shown at 320×80 | | Gmail allows up to 1000×100 shown; drawn at 2× | [official](https://support.google.com/mail/answer/8395) |
32
+ | Web | Open Graph card | `og-image` | 1200×630 | | | LinkedIn's minimum is 1200×627; X crops to 2:1 | [official](https://developers.facebook.com/docs/sharing/webmasters/images/) |
33
+
34
+ ## Changes from older guides
35
+
36
+ - **Instagram** keeps 1.91:1 to **3:4** uncropped since 2025, and the profile grid crops every post to 3:4. Both 4:5 (`instagram-portrait`) and 3:4 (`instagram-portrait-3x4`) are drawn.
37
+ - **YouTube thumbnails** are now 3840×2160 (minimum 640 wide).
38
+ - **LinkedIn company covers** are now 1512×256; the logo minimum is 268×268 (400×400 drawn).
39
+ - **Facebook covers**: Meta recommends 851×315; it's drawn at 2× for sharp phones.
40
+ - **Instagram stories** follow Meta's current guidance: 14% top, 35% bottom and 6% sides free of text and logos.
41
+ - **Threads** has no banner.
42
+
43
+ ## Favicons
44
+
45
+ | File | Size | Source |
46
+ |---|---|---|
47
+ | `favicon.ico` | 16, 32, 48 | [Evil Martians](https://evilmartians.com/chronicles/how-to-favicon-in-2021-six-files-that-fit-most-needs) |
48
+ | `apple-touch-icon.png` | 180, full bleed | [Apple](https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/ConfiguringWebApplications/ConfiguringWebApplications.html) |
49
+ | `icon-192.png`, `icon-512.png` | 192, 512 (`any`) | [web.dev](https://web.dev/articles/add-manifest) |
50
+ | `icon-maskable-*.png` | 192, 512, the mark in the centred 80% circle | [web.dev](https://web.dev/articles/maskable-icon) |
package/docs/styles.md ADDED
@@ -0,0 +1,23 @@
1
+ # Styles and motion
2
+
3
+ Each social image is a covers layer stack (`socialCover()` returns it). The logo always goes inside the platform's safe zone:
4
+
5
+ - **Avatars and highlight covers** show the mark alone, its farthest point within 60% of the crop circle's radius.
6
+ - **Posts and stories** use the stacked lockup.
7
+ - **Banners and screens** use the horizontal lockup.
8
+ - **The YouTube thumbnail** is a template: the logo top left, the headline (the tagline, else the name) large in the bottom left.
9
+
10
+ | Style | Ground | Logo | Device | Animated |
11
+ |---|---|---|---|---|
12
+ | `minimal` | Paper; ink when only ink keeps the mark in the brand colour (a pale or neon brand) | The brand's own colours, smaller, with room round it | The tagline in tracked capitals | The logo breathes (scale 1.03, 3.2 s, alternating) |
13
+ | `bold` | The brand colour, edge to edge | Ink or paper, whichever reads; left-aligned on wide banners | The mark huge and cropped off the edge, 10% toward the logo's colour (a supergraphic) | The supergraphic drifts and turns 4° (14 s); in a circle the mark breathes |
14
+ | `pattern` | Ink, with the mark repeated as an offset grid in a tone of the brand colour | On a plate of the brand colour | The repeat | The pattern drifts one period in 24 s and loops seamlessly |
15
+ | `gradient` | A grainy gradient field of the brand colour's 900 and 300 steps, held to a lightness band the logo reads on | Paper on a deep field, ink on a pale one | covers `mesh` and `grain` | The logo breathes |
16
+
17
+ `gradient` is opt-in: the social pack draws `DEFAULT_STYLES` (the first three) unless `styles` names it, since its grain makes heavy PNGs.
18
+
19
+ Any style takes `finish` (`'letterpress'`, `'riso'`, `'stamp'`) to print the logo; see [identity.md](identity.md).
20
+
21
+ ## Motion
22
+
23
+ Motion is covers' `motion` option: CSS keyframes in the SVG, with no script. It plays in an `<img>`, holds still under `prefers-reduced-motion`, and `renderSvg(cover, { t })` draws any frame with the timing a browser uses. `socialFrames()` yields those stills. Encode them with ffmpeg (the pack's README has the commands) for platforms that take MP4 or GIF rather than SVG.
package/package.json CHANGED
@@ -1,6 +1,93 @@
1
1
  {
2
2
  "name": "@logomarks/brand-kit",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.4.1",
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
+ "type": "module",
6
+ "main": "src/index.js",
7
+ "types": "src/index.d.ts",
8
+ "sideEffects": false,
9
+ "exports": {
10
+ ".": {
11
+ "types": "./src/index.d.ts",
12
+ "import": "./src/index.js",
13
+ "default": "./src/index.js"
14
+ },
15
+ "./package.json": "./package.json"
16
+ },
17
+ "files": [
18
+ "src",
19
+ "docs",
20
+ "README.md",
21
+ "CHANGELOG.md",
22
+ "LICENSE"
23
+ ],
24
+ "scripts": {
25
+ "test": "node --test --test-concurrency=1 tests/*.test.js",
26
+ "typecheck": "tsc --noEmit"
27
+ },
28
+ "keywords": [
29
+ "branding",
30
+ "brand-kit",
31
+ "logo",
32
+ "logomark",
33
+ "lockup",
34
+ "favicon",
35
+ "ico",
36
+ "pwa",
37
+ "palette",
38
+ "oklch",
39
+ "wcag",
40
+ "design-tokens",
41
+ "social-media",
42
+ "instagram",
43
+ "youtube-banner",
44
+ "og-image",
45
+ "svg",
46
+ "brand-guidelines",
47
+ "seal",
48
+ "badge",
49
+ "letterpress",
50
+ "risograph",
51
+ "texture",
52
+ "swatches",
53
+ "pdf"
54
+ ],
55
+ "author": "David Sherlock",
56
+ "license": "MIT",
57
+ "homepage": "https://www.npmjs.com/package/@logomarks/brand-kit",
58
+ "repository": {
59
+ "type": "git",
60
+ "url": "git+https://github.com/Logomarks/brand-kit.git"
61
+ },
62
+ "engines": {
63
+ "node": ">=20.0.0"
64
+ },
65
+ "publishConfig": {
66
+ "access": "public",
67
+ "registry": "https://registry.npmjs.org/"
68
+ },
69
+ "dependencies": {
70
+ "@arraypress/color-utils": "^1.5.0",
71
+ "@arraypress/covers": "^1.3.1",
72
+ "@logomarks/core": "^0.1.2",
73
+ "@logomarks/image-effects": "^0.2.0"
74
+ },
75
+ "peerDependencies": {
76
+ "@arraypress/og-image": "^1.5.0",
77
+ "sharp": ">=0.33.0"
78
+ },
79
+ "peerDependenciesMeta": {
80
+ "@arraypress/og-image": {
81
+ "optional": true
82
+ },
83
+ "sharp": {
84
+ "optional": true
85
+ }
86
+ },
87
+ "devDependencies": {
88
+ "@arraypress/og-image": "^1.5.1",
89
+ "@types/node": "^26.6.5",
90
+ "sharp": "^0.35.5",
91
+ "typescript": "^6.0.3"
92
+ }
93
+ }
@@ -0,0 +1,72 @@
1
+ // A brand, resolved once and shared by every file.
2
+ import type { BrandFont, ResolvedFont } from './font.js';
3
+ import type { Mark } from './mark.js';
4
+ import type { TypeSet } from './type.js';
5
+ import type { Palette } from '../color/palette.js';
6
+ import type { Lockup, LockupLayout, LockupInput } from '../lockup/lockup.js';
7
+
8
+ /** What a brand is made from. */
9
+ export interface BrandInput {
10
+ /** The logomark: an SVG of filled shapes (fitted to the 512/448 standard). */
11
+ svg: string;
12
+ /** The brand's name. */
13
+ name: string;
14
+ /** The brand colour, hex. Default `#d4ff3a`. */
15
+ color?: string;
16
+ /** The typeface: a family covers has (`'Inter'`, the default) or a font with its bytes or path. */
17
+ font?: string | BrandFont;
18
+ /** A line under the name on social images and the sheet. */
19
+ tagline?: string;
20
+ /** The website, for the email signature and the sheet. */
21
+ url?: string;
22
+ /** The social handle. Default `@` and the slug without hyphens. */
23
+ handle?: string;
24
+ /** Where the mark came from, for `brand.json` (a mark from a library, its page and licence). */
25
+ source?: MarkSource;
26
+ }
27
+
28
+ /** Where a brand's mark came from. */
29
+ export interface MarkSource {
30
+ /** The mark's name. */
31
+ name: string;
32
+ /** Its page. */
33
+ url?: string;
34
+ /** Its licence, as an SPDX id (`'CC0-1.0'`). */
35
+ license?: string;
36
+ }
37
+
38
+ /** A logo ground: the ground, and the mark's and name's colours on it. */
39
+ export interface Ground {
40
+ ground: string;
41
+ mark: string;
42
+ text: string;
43
+ }
44
+
45
+ /** The three grounds a logo is shown on. */
46
+ export type Grounds = Record<'on-light' | 'on-dark' | 'on-color', Ground>;
47
+
48
+ /** A resolved brand. */
49
+ export interface Brand {
50
+ name: string;
51
+ slug: string;
52
+ tagline: string;
53
+ url: string;
54
+ handle: string;
55
+ /** Where the mark came from, when given. */
56
+ source?: MarkSource;
57
+ mark: Mark;
58
+ palette: Palette;
59
+ font: ResolvedFont;
60
+ /** The name as outlines. */
61
+ nameSet: TypeSet;
62
+ grounds: Grounds;
63
+ /** A lockup in a layout and colours. */
64
+ lockup(layout: LockupLayout, colors: Pick<LockupInput, 'markColor' | 'textColor' | 'ground' | 'clear'>): Lockup;
65
+ }
66
+
67
+ /** Logomarks' yellow. */
68
+ export const DEFAULT_COLOR: '#d4ff3a';
69
+ /** The three grounds and the logo's colours on each. */
70
+ export function grounds(palette: Palette): Grounds;
71
+ /** A brand from its inputs (a resolved brand passes through). */
72
+ export function resolveBrand(input: BrandInput | Brand): Promise<Brand>;