@lacspace/logo 1.0.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/LICENSE +51 -0
- package/README.md +130 -0
- package/dist/index.cjs +736 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +112 -0
- package/dist/index.d.ts +112 -0
- package/dist/index.js +726 -0
- package/dist/index.js.map +1 -0
- package/package.json +71 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
Lacspace Free Licence
|
|
2
|
+
Version 1.0, August 2026
|
|
3
|
+
|
|
4
|
+
Copyright (c) 2026 Lacspace
|
|
5
|
+
|
|
6
|
+
PREAMBLE
|
|
7
|
+
|
|
8
|
+
This software is published by Lacspace under the Lacspace Free Licence — a free,
|
|
9
|
+
permissive licence that lets you use this software for any purpose, including in
|
|
10
|
+
commercial products and services, at no cost. It grants the same freedoms as
|
|
11
|
+
common permissive open-source licences; the only condition is that this notice
|
|
12
|
+
travels with the software. The canonical, always-current text of this licence is
|
|
13
|
+
maintained at https://lacspace.com/licenses/lacspace-free-1.0
|
|
14
|
+
|
|
15
|
+
GRANT OF RIGHTS
|
|
16
|
+
|
|
17
|
+
Permission is hereby granted, free of charge, to any person or organisation
|
|
18
|
+
obtaining a copy of this software and its associated documentation and data files
|
|
19
|
+
(the "Software"), to deal in the Software without restriction, including without
|
|
20
|
+
limitation the rights to use, copy, modify, merge, publish, distribute,
|
|
21
|
+
sublicense, and/or sell copies of the Software, and to permit persons to whom the
|
|
22
|
+
Software is furnished to do so, subject to the conditions below. These rights are
|
|
23
|
+
granted for any purpose, personal or commercial, and are perpetual, worldwide,
|
|
24
|
+
non-exclusive, and royalty-free.
|
|
25
|
+
|
|
26
|
+
CONDITIONS
|
|
27
|
+
|
|
28
|
+
The above copyright notice, this permission notice, and the name of this licence
|
|
29
|
+
("Lacspace Free Licence") shall be included in all copies or substantial portions
|
|
30
|
+
of the Software.
|
|
31
|
+
|
|
32
|
+
TRADEMARKS
|
|
33
|
+
|
|
34
|
+
This licence does not grant permission to use the trade names, trademarks, service
|
|
35
|
+
marks, logos, or product names of Lacspace, except as required to reproduce the
|
|
36
|
+
notice above or to describe the origin of the Software in a truthful manner.
|
|
37
|
+
|
|
38
|
+
DISCLAIMER OF WARRANTY AND LIMITATION OF LIABILITY
|
|
39
|
+
|
|
40
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
41
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
42
|
+
FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
43
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN
|
|
44
|
+
AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
|
|
45
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
The Lacspace Free Licence is a source-available, permissive licence and is not (as
|
|
50
|
+
of this version) an OSI-approved licence. In substance it grants the same freedoms
|
|
51
|
+
as the MIT Licence. Learn more at https://lacspace.com/licenses
|
package/README.md
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
# @lacspace/logo
|
|
4
|
+
|
|
5
|
+
**Generate real logos from a name + a few keywords — no AI.**
|
|
6
|
+
|
|
7
|
+
[](https://www.npmjs.com/package/@lacspace/logo)
|
|
8
|
+
[](https://packagephobia.com/result?p=@lacspace/logo)
|
|
9
|
+
[](https://bundlephobia.com/package/@lacspace/logo)
|
|
10
|
+
[](https://www.npmjs.com/package/@lacspace/logo)
|
|
11
|
+
[](https://github.com/lacspace/npm-packages/blob/main/LICENSE)
|
|
12
|
+
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
> Give a brand **name** and a few **keywords** and get an on-brand **SVG logo** — a monogram, an icon lockup, a geometric mark or an emblem. Choices (palette, type, icon, shape, layout) come deterministically from a curated JSON brain, so the same brief always yields the same logo, and a changed seed spins endless variations. Editable, infinitely scalable, and rasterizable to PNG/JPEG/WebP via [`@lacspace/image`](https://www.npmjs.com/package/@lacspace/image).
|
|
16
|
+
|
|
17
|
+
**Not AI art — designed brand assets.** Instant, free, reproducible, keyless, zero-dependency, isomorphic.
|
|
18
|
+
|
|
19
|
+
## Install
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm i @lacspace/logo
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## One brief → a logo
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
import { generateLogo } from "@lacspace/logo";
|
|
29
|
+
|
|
30
|
+
const { svg, palette, icon } = generateLogo({
|
|
31
|
+
name: "Kopi House",
|
|
32
|
+
keywords: "coffee, cozy, artisanal, warm",
|
|
33
|
+
});
|
|
34
|
+
// svg → a complete <svg> string (coffee ☕ mark, warm amber palette, emblem seal)
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Pass a longer brief and it extracts the keywords for you:
|
|
38
|
+
|
|
39
|
+
```ts
|
|
40
|
+
generateLogo({
|
|
41
|
+
name: "Ledgerly",
|
|
42
|
+
brief: "A trustworthy fintech that automates bookkeeping for small businesses.",
|
|
43
|
+
});
|
|
44
|
+
// → finance mood, deep-indigo palette, wallet icon, clean corporate type
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## 12 concepts to choose from (the slot-machine)
|
|
48
|
+
|
|
49
|
+
```ts
|
|
50
|
+
import { generateLogoSet } from "@lacspace/logo";
|
|
51
|
+
|
|
52
|
+
const concepts = generateLogoSet({ name: "Orbit Labs", keywords: "ai, network, fast" }, 12);
|
|
53
|
+
// 12 reproducible variations — different engines, palettes, layouts
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## See *why* it chose what it did
|
|
57
|
+
|
|
58
|
+
```ts
|
|
59
|
+
import { suggest } from "@lacspace/logo";
|
|
60
|
+
|
|
61
|
+
suggest({ name: "Ledgerly", keywords: "fintech trust money" });
|
|
62
|
+
// { mood: "finance", paletteId: "deep-indigo", fontId: "...", iconKey: "wallet",
|
|
63
|
+
// notes: ["mood \"Finance\" from keywords", "palette Deep Indigo", ...] }
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## The five engines
|
|
67
|
+
|
|
68
|
+
| Engine | What you get |
|
|
69
|
+
| --- | --- |
|
|
70
|
+
| `monogram` | Initials on a gradient badge (circle · squircle · hexagon · shield · seal) |
|
|
71
|
+
| `wordmark` | A keyword-matched **icon** locked up with the name |
|
|
72
|
+
| `abstract` | A seeded **geometric mark** — orbit/network, venn, arcs, burst, waves, dot-grid |
|
|
73
|
+
| `emblem` | A seal/ring with an icon and the name **curved along the bottom** |
|
|
74
|
+
| `lettermark` | One big display letter filled with the brand gradient |
|
|
75
|
+
|
|
76
|
+
Let the brief pick the engine, or force one: `generateLogo({ name, engine: "emblem" })`.
|
|
77
|
+
|
|
78
|
+
## Everything is overridable
|
|
79
|
+
|
|
80
|
+
```ts
|
|
81
|
+
generateLogo({
|
|
82
|
+
name: "Aurelia",
|
|
83
|
+
keywords: "luxury, beauty",
|
|
84
|
+
palette: "royal-gold", // force a palette id
|
|
85
|
+
font: "playfair-luxe", // force a type pairing
|
|
86
|
+
icon: "crown", // force an icon
|
|
87
|
+
shape: "seal", // circle | rounded | squircle | hexagon | shield | seal | diamond | blob | none
|
|
88
|
+
layout: "emblem", // icon-left | icon-top | stacked | wordmark-only | emblem | mark-only
|
|
89
|
+
engine: "emblem",
|
|
90
|
+
background: "surface", // transparent | solid | surface | gradient
|
|
91
|
+
size: 512,
|
|
92
|
+
seed: 7, // deterministic variation
|
|
93
|
+
});
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Export to raster (PNG / JPEG / WebP) with a size budget
|
|
97
|
+
|
|
98
|
+
Logos are SVG — universal and editable. To rasterize, pair with `@lacspace/image`:
|
|
99
|
+
|
|
100
|
+
```ts
|
|
101
|
+
import { generateLogo } from "@lacspace/logo";
|
|
102
|
+
import { rasterizeSvg, fit } from "@lacspace/image";
|
|
103
|
+
|
|
104
|
+
const { svg } = generateLogo({ name: "Orbit Labs", keywords: "ai, network" });
|
|
105
|
+
const surface = await rasterizeSvg(svg, { width: 512, height: 512 }); // browser Canvas / optional sharp in Node
|
|
106
|
+
const png = await fit(surface, { format: "png", maxSize: "40kb" });
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
> **SVG renders everywhere.** Rasterizing text logos in **Node** needs the optional `sharp` peer (`npm i sharp`); in the **browser** it uses the native Canvas with no extra deps. The geometric/icon marks rasterize anywhere.
|
|
110
|
+
|
|
111
|
+
## The JSON brain (extensible)
|
|
112
|
+
|
|
113
|
+
The creativity lives in data you can extend: `palettes` (mood-tagged), `fonts` (curated Google pairings), `icons` (keyword-tagged line glyphs), `moods` (style presets), plus a color/vibe keyword interpreter. They're exported for building your own UI:
|
|
114
|
+
|
|
115
|
+
```ts
|
|
116
|
+
import { PALETTES, FONTS, ICONS, MOODS } from "@lacspace/logo";
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## API
|
|
120
|
+
|
|
121
|
+
- `generateLogo(brief)` → `{ svg, width, height, engine, palette, font, icon, shape, layout, mood, seed, interpreted }`
|
|
122
|
+
- `generateLogoSet(brief, count = 12)` → `LogoResult[]`
|
|
123
|
+
- `suggest(brief)` → the interpretation only (no render)
|
|
124
|
+
- `tokenize(brief)`, `initials(name)`, and the `PALETTES` / `FONTS` / `ICONS` / `MOODS` data
|
|
125
|
+
|
|
126
|
+
## License
|
|
127
|
+
|
|
128
|
+
[Lacspace Free Licence v1.0](https://github.com/lacspace/npm-packages/blob/main/LICENSE) — free, permissive, Lacspace-branded.
|
|
129
|
+
|
|
130
|
+
<div align="center"><sub>Part of the <a href="https://developer.lacspace.com/packages">Lacspace</a> ecosystem · zero-dependency · isomorphic · fully typed</sub></div>
|