open-brandkit 0.4.7

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 (61) hide show
  1. package/LICENSE +72 -0
  2. package/README.md +284 -0
  3. package/dist/adapters/next/brandkit-page.d.ts +15 -0
  4. package/dist/adapters/next/brandkit-page.d.ts.map +1 -0
  5. package/dist/adapters/next/brandkit-page.js +1085 -0
  6. package/dist/adapters/next/brandkit-page.js.map +1 -0
  7. package/dist/adapters/next/index.d.ts +3 -0
  8. package/dist/adapters/next/index.d.ts.map +1 -0
  9. package/dist/adapters/next/index.js +3 -0
  10. package/dist/adapters/next/index.js.map +1 -0
  11. package/dist/adapters/next/manifest.d.ts +33 -0
  12. package/dist/adapters/next/manifest.d.ts.map +1 -0
  13. package/dist/adapters/next/manifest.js +57 -0
  14. package/dist/adapters/next/manifest.js.map +1 -0
  15. package/dist/adapters/next/route-handlers.d.ts +102 -0
  16. package/dist/adapters/next/route-handlers.d.ts.map +1 -0
  17. package/dist/adapters/next/route-handlers.js +451 -0
  18. package/dist/adapters/next/route-handlers.js.map +1 -0
  19. package/dist/adapters/next/server.d.ts +2 -0
  20. package/dist/adapters/next/server.d.ts.map +1 -0
  21. package/dist/adapters/next/server.js +2 -0
  22. package/dist/adapters/next/server.js.map +1 -0
  23. package/dist/cli/index.d.ts +3 -0
  24. package/dist/cli/index.d.ts.map +1 -0
  25. package/dist/cli/index.js +1079 -0
  26. package/dist/cli/index.js.map +1 -0
  27. package/dist/core/assets.d.ts +34 -0
  28. package/dist/core/assets.d.ts.map +1 -0
  29. package/dist/core/assets.js +200 -0
  30. package/dist/core/assets.js.map +1 -0
  31. package/dist/core/banner-renderer.d.ts +21 -0
  32. package/dist/core/banner-renderer.d.ts.map +1 -0
  33. package/dist/core/banner-renderer.js +119 -0
  34. package/dist/core/banner-renderer.js.map +1 -0
  35. package/dist/core/build.d.ts +13 -0
  36. package/dist/core/build.d.ts.map +1 -0
  37. package/dist/core/build.js +345 -0
  38. package/dist/core/build.js.map +1 -0
  39. package/dist/core/colors.d.ts +12 -0
  40. package/dist/core/colors.d.ts.map +1 -0
  41. package/dist/core/colors.js +335 -0
  42. package/dist/core/colors.js.map +1 -0
  43. package/dist/core/config.d.ts +103 -0
  44. package/dist/core/config.d.ts.map +1 -0
  45. package/dist/core/config.js +119 -0
  46. package/dist/core/config.js.map +1 -0
  47. package/dist/core/index.d.ts +8 -0
  48. package/dist/core/index.d.ts.map +1 -0
  49. package/dist/core/index.js +8 -0
  50. package/dist/core/index.js.map +1 -0
  51. package/dist/core/static-page.d.ts +3 -0
  52. package/dist/core/static-page.d.ts.map +1 -0
  53. package/dist/core/static-page.js +1830 -0
  54. package/dist/core/static-page.js.map +1 -0
  55. package/dist/core/types.d.ts +163 -0
  56. package/dist/core/types.d.ts.map +1 -0
  57. package/dist/core/types.js +2 -0
  58. package/dist/core/types.js.map +1 -0
  59. package/docs/STYLE_CONTRACT.md +48 -0
  60. package/examples/acme-studio-color-system.md +99 -0
  61. package/package.json +89 -0
package/LICENSE ADDED
@@ -0,0 +1,72 @@
1
+ Open BrandKit Source-Available License
2
+ Version 1.0
3
+
4
+ Copyright (c) 2026 Tim Campbell Works, LLC.
5
+
6
+ Permission is granted, free of charge, to any person or organization obtaining
7
+ a copy of this software and associated documentation files (the "Software"), to
8
+ use, copy, install, run, modify, and create derivative works of the Software for
9
+ personal, internal, client, agency, commercial, and noncommercial projects,
10
+ subject to the terms below.
11
+
12
+ 1. Permitted Use
13
+
14
+ You may use Open BrandKit to create, build, customize, deploy, and maintain
15
+ brand kit pages and related assets for yourself, your organization, your
16
+ clients, or products and services you operate.
17
+
18
+ You may charge for services, consulting, implementation work, design work,
19
+ client websites, hosting, or products that use Open BrandKit as part of a
20
+ larger project, provided that you are not selling Open BrandKit itself or a
21
+ substantially similar competing product.
22
+
23
+ Brand assets, generated pages, generated images, generated manifests, and other
24
+ outputs created for your own projects remain subject to your own rights and the
25
+ rights of the brand owners whose assets you use. This license does not claim
26
+ ownership over your brand assets or generated project output.
27
+
28
+ 2. Restrictions
29
+
30
+ You may not sell, sublicense, repackage, redistribute, publish, or offer Open
31
+ BrandKit, in whole or substantial part, as a standalone product, competing
32
+ package, hosted installer, template marketplace item, software-as-a-service
33
+ offering, or other product whose value derives primarily from Open BrandKit
34
+ itself.
35
+
36
+ You may not remove or obscure copyright notices, license notices, or attribution
37
+ notices included with the Software.
38
+
39
+ You may not use the Open BrandKit name, marks, or project identity to imply
40
+ endorsement, sponsorship, or affiliation without written permission.
41
+
42
+ 3. Sharing Changes
43
+
44
+ You may fork, study, modify, and share changes to the Software for collaboration,
45
+ review, contribution, or non-resale purposes, provided that shared copies or
46
+ substantial portions retain this license and all required notices.
47
+
48
+ Any public fork, derivative, variation, improvement, or modified version of Open
49
+ BrandKit that is released must be distributed under this license or terms that
50
+ are substantially equivalent.
51
+
52
+ 4. Contributions
53
+
54
+ By submitting a contribution to this repository, you agree that your contribution
55
+ is provided under the terms of this license. You represent that you have the
56
+ right to submit the contribution under these terms.
57
+
58
+ 5. Separate Commercial Licensing
59
+
60
+ If you want to sell, repackage, redistribute, host, or otherwise commercialize
61
+ Open BrandKit itself in a way this license does not allow, you must obtain a
62
+ separate written license from the copyright holders.
63
+
64
+ 6. Disclaimer
65
+
66
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
67
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
68
+ FOR A PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
69
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER
70
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM,
71
+ OUT OF, OR IN CONNECTION WITH THE SOFTWARE OR THE USE OF OR OTHER DEALINGS IN
72
+ THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,284 @@
1
+ # Open BrandKit
2
+
3
+ Open BrandKit turns the brand files you already have into a polished, shareable
4
+ brand kit page for your website.
5
+
6
+ Most teams eventually need the same little portal: approved logos, colors,
7
+ favicons, social images, avatars, and download buttons. Those assets usually end
8
+ up scattered across folders, design files, old Slack threads, and "which one is
9
+ current?" conversations.
10
+
11
+ Open BrandKit exists so a website repo can become the source of truth. Put the
12
+ approved brand files in the project, run the installer, and your site gets a
13
+ `/brandkit` page that stays tied to the assets you actually ship.
14
+
15
+ Open BrandKit is source-available. You can use it in personal, internal,
16
+ client, agency, and commercial projects, but you cannot repackage or resell Open
17
+ BrandKit itself as a standalone or competing product.
18
+
19
+ ## What It Creates
20
+
21
+ Open BrandKit can generate a brand kit with:
22
+
23
+ - Logo lockups, wordmarks, and icons grouped into clear sections.
24
+ - Download buttons for approved assets.
25
+ - Brand color cards pulled from a source file.
26
+ - Avatar and favicon generation from your icon files.
27
+ - Ready-to-use social banner images.
28
+ - ZIP downloads for asset groups.
29
+ - A generated manifest for the brand kit page.
30
+
31
+ The page has an opinionated default design on purpose. A new install should feel
32
+ complete immediately, with the brand inputs doing the changing: your name, your
33
+ logos, your icons, your wordmarks, and your colors.
34
+
35
+ ## What It Works With
36
+
37
+ Open BrandKit currently works best with:
38
+
39
+ - A Next.js App Router site.
40
+ - Tailwind CSS 3 or 4.
41
+ - Logos and icons stored in your repo, usually under `public/logos`.
42
+ - SVG or PNG brand assets.
43
+ - A color source file in Markdown, JSON, CSV, or TypeScript config.
44
+ - Vercel or any host that can serve a normal Next.js app.
45
+
46
+ The generated Next.js page is Tailwind-first. Having Tailwind installed is only
47
+ half of the requirement: your app also needs to include Open BrandKit's shipped
48
+ components when Tailwind builds its CSS. During `init`, Open BrandKit tries to
49
+ wire that up for you.
50
+
51
+ For Tailwind 3, the installer adds Open BrandKit to the `content` paths in
52
+ `tailwind.config.*`. For Tailwind 4, it adds an `@source` directive to your app
53
+ stylesheet. If `/brandkit` loads but looks unstyled, this scan path is the first
54
+ thing to check.
55
+
56
+ The installer patches common Tailwind setups automatically. If your Tailwind
57
+ configuration is highly custom, generated, or split across unusual files, Open
58
+ BrandKit may leave it untouched and print the exact scan/source line to add by
59
+ hand.
60
+
61
+ ## What It Does Not Do
62
+
63
+ Open BrandKit does not design your brand for you. It expects approved source
64
+ files to already exist.
65
+
66
+ It also does not yet support every framework. The public installer and
67
+ interactive page are focused on Next.js first.
68
+
69
+ The social banner preset controls can run on production when you wire the Next
70
+ routes. Custom banner uploads, resets, and favicon installation stay local-only
71
+ because they write files that cannot be saved back to your repo from a deployed
72
+ site.
73
+
74
+ ## Prepare Your Assets
75
+
76
+ Start with a folder of approved brand files. Clear filenames help Open BrandKit
77
+ group things correctly.
78
+
79
+ Example:
80
+
81
+ ```text
82
+ public/logos/acme-logo.svg
83
+ public/logos/acme-logo-white.svg
84
+ public/logos/acme-wordmark-black.svg
85
+ public/logos/acme-wordmark-blue.svg
86
+ public/logos/acme-icon-green.svg
87
+ public/logos/acme-icon-white.svg
88
+ ```
89
+
90
+ Useful filename words:
91
+
92
+ - `logo` for full logo lockups.
93
+ - `wordmark` for text-only marks.
94
+ - `icon`, `symbol`, or `favicon` for compact marks.
95
+ - color words like `blue`, `black`, `white`, `green`, or your own color names.
96
+
97
+ Then add a color source file.
98
+
99
+ Example Markdown:
100
+
101
+ ```md
102
+ ## Brand Colors
103
+
104
+ ### Primary Colors
105
+
106
+ | Name | Hex |
107
+ | --- | --- |
108
+ | Acme Blue | #2457ff |
109
+ | Acme Green | #32d583 |
110
+
111
+ ### Secondary Colors
112
+
113
+ | Name | Hex |
114
+ | --- | --- |
115
+ | Acme Black | #101828 |
116
+ | Acme Gray | #667085 |
117
+ ```
118
+
119
+ Primary colors render as a two-column section. Secondary colors render as a
120
+ three-column section. Use those headings when you want Open BrandKit to lay out
121
+ the color system like the default brand kit.
122
+
123
+ For print swatches, use the exact heading `## Print Color Shades`. Open BrandKit
124
+ uses that heading to render Pantone-style chips with RGB, CMYK, and hex values
125
+ instead of ordinary brand color cards. See
126
+ `examples/acme-studio-color-system.md` for a fuller color-system example.
127
+
128
+ ## Install
129
+
130
+ From the root of an existing Next.js app:
131
+
132
+ ```bash
133
+ npx open-brandkit init --install --build
134
+ ```
135
+
136
+ The installer asks for your brand name, logo folder, color file, route, and app
137
+ directory. By default, the brand kit lives at:
138
+
139
+ ```text
140
+ /brandkit
141
+ ```
142
+
143
+ For a noninteractive install:
144
+
145
+ ```bash
146
+ npx open-brandkit init \
147
+ --install \
148
+ --brand "Acme" \
149
+ --short-name Acme \
150
+ --logos public/logos \
151
+ --colors docs/brand-colors.md \
152
+ --route /brandkit \
153
+ --app-dir src/app \
154
+ --build
155
+ ```
156
+
157
+ Use `app` instead of `src/app` if your project does not use a `src` directory.
158
+
159
+ After install, your app should have Tailwind pointed at the package code. The
160
+ installer handles the common Tailwind 3 and Tailwind 4 setups automatically, but
161
+ custom Tailwind setups may need a manual check.
162
+
163
+ ## What Gets Added
164
+
165
+ Open BrandKit writes a small set of files into your app:
166
+
167
+ ```text
168
+ brandkit.config.ts
169
+ src/app/brandkit/page.tsx
170
+ src/app/brandkit/layout.tsx
171
+ src/app/brandkit/favicon/route.ts
172
+ src/app/brandkit/banners/route.ts
173
+ src/app/brandkit/banners/presets/route.ts
174
+ src/app/brandkit/download/[group]/route.ts
175
+ public/brandkit/*
176
+ ```
177
+
178
+ It also adds a script:
179
+
180
+ ```json
181
+ {
182
+ "scripts": {
183
+ "brandkit:build": "open-brandkit build"
184
+ }
185
+ }
186
+ ```
187
+
188
+ ## Use It
189
+
190
+ Start your app:
191
+
192
+ ```bash
193
+ npm run dev
194
+ ```
195
+
196
+ Then open:
197
+
198
+ ```text
199
+ http://localhost:3000/brandkit
200
+ ```
201
+
202
+ When you change logos or colors, rebuild the brand kit:
203
+
204
+ ```bash
205
+ npm run brandkit:build
206
+ ```
207
+
208
+ The build output includes the Open BrandKit version that generated the files, so
209
+ it is easier to troubleshoot installs across projects.
210
+
211
+ ## Customize
212
+
213
+ Most customization lives in `brandkit.config.ts`.
214
+
215
+ Use it to change:
216
+
217
+ - Brand name and description.
218
+ - Logo source folder.
219
+ - Color source file.
220
+ - Logo grouping rules.
221
+ - Banner presets.
222
+ - Banner mark variants.
223
+ - Output paths.
224
+
225
+ The defaults are meant to be useful without heavy configuration. If your source
226
+ files are named clearly, Open BrandKit should infer a good first version.
227
+
228
+ ## Asset Variant Colors
229
+
230
+ In the social banner generator, the "Color" control selects a mark file. It does
231
+ not recolor the artwork.
232
+
233
+ That means a logo like this:
234
+
235
+ ```text
236
+ acme-logo.svg
237
+ acme-logo-blue.svg
238
+ acme-logo-white.svg
239
+ ```
240
+
241
+ becomes three selectable logo variants. Open BrandKit uses filename hints and SVG
242
+ fill colors to choose reasonable color dots for those options.
243
+
244
+ ## Deploy
245
+
246
+ Commit the generated files and deploy your site as usual.
247
+
248
+ On Vercel, `/brandkit` works like any other Next.js route once the files are in
249
+ the repo.
250
+
251
+ If the deployed page appears unstyled, make sure the deployed app is using the
252
+ same Tailwind scan/source change that worked locally. Open BrandKit's styles are
253
+ compiled by the host app, not loaded from a separate stylesheet.
254
+
255
+ ## License
256
+
257
+ Open BrandKit is source-available.
258
+
259
+ You may use it commercially in your own projects, internal company work, client
260
+ work, agency projects, websites, and products. You may charge for services,
261
+ implementation, design, hosting, or client work that uses Open BrandKit as part
262
+ of a larger project.
263
+
264
+ You may not sell, sublicense, repackage, redistribute, publish, or offer Open
265
+ BrandKit itself as a standalone product, competing package, hosted installer,
266
+ template marketplace item, or software-as-a-service product whose value derives
267
+ primarily from Open BrandKit.
268
+
269
+ See `LICENSE` for the full terms.
270
+
271
+ ## Status
272
+
273
+ Open BrandKit is early. The main path today is:
274
+
275
+ ```text
276
+ existing Next.js app + local brand assets -> generated /brandkit page
277
+ ```
278
+
279
+ ## Up Next
280
+
281
+ Additional installation paths are planned, including Astro and other static or
282
+ framework-specific setups. For now, the public installer is intentionally focused
283
+ on Next.js App Router projects so the generated brand kit matches the full
284
+ interactive experience.
@@ -0,0 +1,15 @@
1
+ import type { BrandKitManifest } from '../../core/types.js';
2
+ import type { BrandKitBannerControls } from './manifest.js';
3
+ export type BrandKitPageEndpoints = {
4
+ bannerPresets?: string;
5
+ bannerUpload?: string;
6
+ favicon?: string;
7
+ };
8
+ export type BrandKitPageProps = {
9
+ bannerControls?: BrandKitBannerControls;
10
+ canUseDevActions?: boolean;
11
+ endpoints?: BrandKitPageEndpoints;
12
+ manifest: BrandKitManifest;
13
+ };
14
+ export declare function BrandKitPage({ bannerControls, canUseDevActions, endpoints, manifest, }: BrandKitPageProps): import("react/jsx-runtime").JSX.Element;
15
+ //# sourceMappingURL=brandkit-page.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"brandkit-page.d.ts","sourceRoot":"","sources":["../../../src/adapters/next/brandkit-page.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAOV,gBAAgB,EAGjB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAA;AAE3D,MAAM,MAAM,qBAAqB,GAAG;IAClC,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,cAAc,CAAC,EAAE,sBAAsB,CAAA;IACvC,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,SAAS,CAAC,EAAE,qBAAqB,CAAA;IACjC,QAAQ,EAAE,gBAAgB,CAAA;CAC3B,CAAA;AA0+ED,wBAAgB,YAAY,CAAC,EAC3B,cAAc,EACd,gBAAuB,EACvB,SAAS,EACT,QAAQ,GACT,EAAE,iBAAiB,2CAkUnB"}