@usenavii/core 0.4.0 → 0.5.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 +133 -0
- package/README.md +3 -3
- package/dist/index.cjs +816 -61
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +151 -3
- package/dist/index.d.ts +151 -3
- package/dist/index.js +814 -62
- package/dist/index.js.map +1 -1
- package/dist/parts.cjs +262 -43
- package/dist/parts.cjs.map +1 -1
- package/dist/parts.d.cts +16 -6
- package/dist/parts.d.ts +16 -6
- package/dist/parts.js +262 -43
- package/dist/parts.js.map +1 -1
- package/dist/types-CF0rfKly.d.cts +120 -0
- package/dist/types-CF0rfKly.d.ts +120 -0
- package/package.json +3 -2
- package/dist/types-BfsKZ8zK.d.cts +0 -66
- package/dist/types-BfsKZ8zK.d.ts +0 -66
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `@usenavii/core` and `@usenavii/react`.
|
|
4
|
+
|
|
5
|
+
Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). Versioning: [SemVer](https://semver.org). Both packages ship in lockstep.
|
|
6
|
+
|
|
7
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
## [0.22.0] - 2026-05-26
|
|
10
|
+
|
|
11
|
+
### Added (`@usenavii/core` 0.5.0)
|
|
12
|
+
- **Pack overhaul** — all 7 packs given distinct visual identities via new render flags (`flat`, `bgColor`, `featureStroke`, `paletteExclusive`, `glow`). Each pack now reads as a different illustration system, not just a recoloring.
|
|
13
|
+
- **New body shapes** (pack-only, base seeds unchanged): `squircle` (full-bleed corporate tile), `pumpkin`, `ghost`, `skullHead`.
|
|
14
|
+
- **New mouth styles** (pack-only): `jagged` (carved-pumpkin grin), `fangs` (vampire teeth).
|
|
15
|
+
- **New toppers**: `witchHat`, `pumpkinStem`, `ghostSheet`, `bob`, `bun`, `ponytail`.
|
|
16
|
+
- **New accessory**: `earring` (palette-themed stud + drop pair).
|
|
17
|
+
- **New outfit**: `tie` (corporate necktie — knot + tapered blade).
|
|
18
|
+
- **`Pack.glow`** flag emits an outer-glow SVG filter behind the body (Gaussian blur tinted by palette). Used by Neon.
|
|
19
|
+
- **`AvatarSpec.flat` / `bgColor` / `featureStroke` / `glow`** — render directives the engine reads to alter body/face rendering per enabled pack.
|
|
20
|
+
- **`featureStroke` multiplier** scales stroke widths on eyes, mouth, glasses uniformly. Office bumps to 1.35, Neon 1.5, Mono down to 1.15 (delicate).
|
|
21
|
+
- **New `office-bright` pack** — vivid sibling of Office for marketing/design teams.
|
|
22
|
+
|
|
23
|
+
### Changed (`@usenavii/core` 0.5.0)
|
|
24
|
+
- Pack picks now **authoritative** — `resolvePartPool` no longer intersects against base pool, so packs can introduce ids unknown to the base (e.g. Office's squircle). Type system enforces validity.
|
|
25
|
+
- Office, Halloween, Pastel, Neon, Mono, Earth packs reauthored with theme-cohesive picks, style hints, and exclusive palette pools.
|
|
26
|
+
- Office uses full-bleed squircle + white plate + necktie outfits + bolder strokes for ID-badge look.
|
|
27
|
+
- Halloween uses pumpkin/ghost/skullHead bodies + jagged/fangs mouths + witchHat/stem/sheet toppers + dark night plate.
|
|
28
|
+
- Neon emits an outer glow halo via SVG filter behind the body.
|
|
29
|
+
- Mono switched to full-bleed squircle (was contained orb) for editorial tile look.
|
|
30
|
+
|
|
31
|
+
### Added (API host)
|
|
32
|
+
- **Polar.sh license verification** — `POST /license/verify` now proxies to Polar's `/v1/customer-portal/license-keys/validate` (replaces Gumroad). Validates `status === 'granted'`, expiry, and optional benefit-id match.
|
|
33
|
+
- **`GET /checkout`** — redirects to Polar checkout w/ configured product preselected. Powered by `@polar-sh/hono`.
|
|
34
|
+
- **`GET /portal`** — Polar customer portal proxy (license re-fetch, refund request).
|
|
35
|
+
- **`POST /polar/webhooks`** — signature-verified webhook receiver, logs events.
|
|
36
|
+
- New env vars: `POLAR_ORGANIZATION_ID`, `POLAR_PRODUCT_ID`, `POLAR_BENEFIT_ID`, `POLAR_ACCESS_TOKEN`, `POLAR_SUCCESS_URL`, `POLAR_WEBHOOK_SECRET`, `POLAR_SERVER`.
|
|
37
|
+
- Compose file wires all Polar vars from `/opt/navii/.env`.
|
|
38
|
+
- 8 new license unit tests w/ fetch mock covering granted/revoked/expired/wrong-product/upstream-error paths.
|
|
39
|
+
|
|
40
|
+
### Changed (API host)
|
|
41
|
+
- Privacy page swapped Gumroad references for Polar.sh.
|
|
42
|
+
- `AppOptions` renamed `gumroadProductPermalink` → `polarOrganizationId` + related Polar fields.
|
|
43
|
+
|
|
44
|
+
### Added (Figma plugin)
|
|
45
|
+
- **Style hint pill row** in Packs panel — Auto / Masc / Femme / Neutral toggle. Persisted via `navii.style` localStorage. Disabled when no pack active.
|
|
46
|
+
- Plugin checkout URL now points at `${API_BASE}/checkout` (instead of hardcoded Gumroad link), letting us swap payment providers without re-publishing.
|
|
47
|
+
|
|
48
|
+
### Fixed (Figma plugin)
|
|
49
|
+
- Left column in Packs panel was not scrollable when content overflowed (e.g. with new Style hint section). Added `overflow-y: auto` + `min-height: 0` to `.col-left`.
|
|
50
|
+
|
|
51
|
+
## [0.21.2] - 2026-05-26
|
|
52
|
+
|
|
53
|
+
### Changed (API host)
|
|
54
|
+
- Golly logo now links to `https://gollyexpress.com/` and is labeled "Golly Express".
|
|
55
|
+
|
|
56
|
+
## [0.21.1] - 2026-05-26
|
|
57
|
+
|
|
58
|
+
### Added (API host)
|
|
59
|
+
- Golly and Fleetlinq logos in the landing "built with navii" wall.
|
|
60
|
+
- Client-side Fisher-Yates shuffle of logos on every page load, so positions vary while the response itself stays cacheable.
|
|
61
|
+
|
|
62
|
+
### Changed (API host)
|
|
63
|
+
- On viewports ≤540px the two logo rows collapse into a single wrapping row via `display: contents`. Desktop unchanged.
|
|
64
|
+
|
|
65
|
+
## [0.21.0] - 2026-05-26
|
|
66
|
+
|
|
67
|
+
### Added (API host)
|
|
68
|
+
- Landing "built with navii" logo wall section above the playground, in two centered rows.
|
|
69
|
+
- `GET /logos/:file` route serving PNG/SVG/JPG/WEBP assets from `packages/api/public/logos` with a filename whitelist and path-traversal guard.
|
|
70
|
+
- Dockerfile copies `packages/api/public` into the runtime image so the route works in production.
|
|
71
|
+
|
|
72
|
+
## [0.20.1] - 2026-05-25
|
|
73
|
+
|
|
74
|
+
### Fixed
|
|
75
|
+
- `@usenavii/core`: `StylePartSubset` now includes `eyes` and `mouth` so pastel pack `styleHints` typecheck. No runtime change — pack already used these fields.
|
|
76
|
+
- `@usenavii/react`: `NaviiProps` no longer collides with React's `style: CSSProperties`. Engine-level style hint moved to `styleHint?: 'masc' | 'femme' | 'neutral'`. Inline CSS via `style` still works.
|
|
77
|
+
|
|
78
|
+
## [0.20.0] - 2026-05-25
|
|
79
|
+
|
|
80
|
+
Deployment-only release. No changes to `@usenavii/core` or `@usenavii/react` (both remain at 0.4.0).
|
|
81
|
+
|
|
82
|
+
### Added (API host)
|
|
83
|
+
- `/privacy` — public privacy policy page covering avatar requests, license verification, and analytics.
|
|
84
|
+
- `/support` — public support page with contact email, GitHub issues link, and console-capture instructions.
|
|
85
|
+
- Both pages linked from landing + docs footers and listed in `/sitemap.xml`.
|
|
86
|
+
|
|
87
|
+
### Added (Figma plugin)
|
|
88
|
+
- `networkAccess.reasoning` in `manifest.json` explaining why `api.navii.dev` and `navii.dev` are allowlisted.
|
|
89
|
+
- Offline pre-flight on insert, fill-random, and license-verify — surfaces a clear notification instead of failing silently when `navigator.onLine` is `false`.
|
|
90
|
+
- `notify` message type so the UI iframe can push toasts through `figma.notify`.
|
|
91
|
+
|
|
92
|
+
## [0.4.0] - 2026-05-23
|
|
93
|
+
|
|
94
|
+
### Added
|
|
95
|
+
- `Navii.random()` — pick a random seed and return its avatar, so callers don't need to bring their own RNG.
|
|
96
|
+
|
|
97
|
+
## [0.3.0] - 2026-05-22
|
|
98
|
+
|
|
99
|
+
### Added
|
|
100
|
+
- Outfit slot, builder-only and opt-in: `collar`, `scarf`, `bowtie`, `sunflower`, `necklace`.
|
|
101
|
+
|
|
102
|
+
## [0.2.1] - 2026-05-22
|
|
103
|
+
|
|
104
|
+
### Changed
|
|
105
|
+
- Each package now ships its own README to npm (`@usenavii/core` and `@usenavii/react` show distinct landing pages on npmjs.com).
|
|
106
|
+
|
|
107
|
+
## [0.2.0] - 2026-05-22
|
|
108
|
+
|
|
109
|
+
### Added
|
|
110
|
+
- `Navii.build(parts)` — compose an avatar from explicit part choices, no seed required.
|
|
111
|
+
- `Navii.seed(...)` — public seed-to-parts derivation surface.
|
|
112
|
+
- Snapshot test coverage for `build` and `seed`.
|
|
113
|
+
|
|
114
|
+
## [0.1.0] - 2026-05-22
|
|
115
|
+
|
|
116
|
+
### Added
|
|
117
|
+
- Initial public release of `@usenavii/core` and `@usenavii/react`.
|
|
118
|
+
- Deterministic avatar engine: `Navii(seed)` returns a stable SVG string for any seed.
|
|
119
|
+
- React binding: `<Navii seed="..." />`.
|
|
120
|
+
- Dual ESM/CJS build via tsup. TypeScript types included.
|
|
121
|
+
|
|
122
|
+
[Unreleased]: https://github.com/uxderrick/navii/compare/v0.22.0...HEAD
|
|
123
|
+
[0.22.0]: https://github.com/uxderrick/navii/compare/v0.21.2...v0.22.0
|
|
124
|
+
[0.21.2]: https://github.com/uxderrick/navii/compare/v0.21.1...v0.21.2
|
|
125
|
+
[0.21.1]: https://github.com/uxderrick/navii/compare/v0.21.0...v0.21.1
|
|
126
|
+
[0.21.0]: https://github.com/uxderrick/navii/compare/v0.20.1...v0.21.0
|
|
127
|
+
[0.20.1]: https://github.com/uxderrick/navii/compare/v0.20.0...v0.20.1
|
|
128
|
+
[0.20.0]: https://github.com/uxderrick/navii/compare/v0.19.0...v0.20.0
|
|
129
|
+
[0.4.0]: https://github.com/uxderrick/navii/compare/v0.3.0...v0.4.0
|
|
130
|
+
[0.3.0]: https://github.com/uxderrick/navii/compare/v0.2.1...v0.3.0
|
|
131
|
+
[0.2.1]: https://github.com/uxderrick/navii/compare/v0.2.0...v0.2.1
|
|
132
|
+
[0.2.0]: https://github.com/uxderrick/navii/compare/v0.1.0...v0.2.0
|
|
133
|
+
[0.1.0]: https://github.com/uxderrick/navii/releases/tag/v0.1.0
|
package/README.md
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
**Deterministic mascot avatars from a seed.** Pure TypeScript engine. Same seed in → byte-identical SVG out, every time. No state, no uploads, no network.
|
|
4
4
|
|
|
5
5
|
<p align="center">
|
|
6
|
-
<img src="https://
|
|
6
|
+
<img src="https://api.navii.dev/group?seeds=aria,milo,nova,kai,sage,eden,luna,rio,pip,wren,zane,iris&size=72&overlap=0.32&ring=%230a0a0b&tileBg=%23ffffff" alt="Navii cast" />
|
|
7
7
|
</p>
|
|
8
8
|
|
|
9
|
-
- [Live demo](https://navii.
|
|
10
|
-
- [Docs](https://navii.
|
|
9
|
+
- [Live demo](https://navii.dev) — interactive playground + cast
|
|
10
|
+
- [Docs](https://navii.dev/docs)
|
|
11
11
|
- [GitHub](https://github.com/uxderrick/navii)
|
|
12
12
|
|
|
13
13
|
## Install
|