@knitli/docs-components 1.0.2 → 1.0.4

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 CHANGED
@@ -1,14 +1,10 @@
1
- # Changelog
1
+ ### Changelog
2
2
 
3
- All notable changes to this project will be documented in this file.
3
+ All notable changes to this project will be documented in this file. Dates are displayed in UTC.
4
4
 
5
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
- and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
5
+ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
7
6
 
8
- ## [Unreleased]
7
+ #### 1.0.4
9
8
 
10
- ### Added
11
- - Initial package structure
12
- - DocsHeader component with Knitli branding
13
- - Copper Archive CSS theme
14
- - Logo assets and usage guide
9
+ - chore: Updated licensing and README to clarify difference between Knitli brand assets (proprietary) and the rest of the project (MIT OR Apache-2.0).
10
+ - chore: Updated configuration and tsconfig
package/README.md CHANGED
@@ -1,6 +1,16 @@
1
1
  # @knitli/docs-components
2
2
 
3
- Shared branded components for Knitli documentation sites. This package is **not licensed**, which means you cannot include its components in your project without Knitli's written authorization. For license inquiries, contact <license_request@knitli.com>
3
+ Shared branded components for Knitli documentation sites.
4
+
5
+ ## License
6
+
7
+ ### Knitli Brand Assets
8
+
9
+ This package includes Knitli brand assets, such as the Knitli logo. These are proprietary and not licensed. You may not use or modify them in any way without Knitli's written permission.
10
+
11
+ ### Other Materials
12
+
13
+ All other materials in this package are licensed under either the Apache-2.0 or MIT license. You can choose either.
4
14
 
5
15
  ## Installation
6
16
 
@@ -203,8 +213,4 @@ npm publish
203
213
 
204
214
  ## Changelog
205
215
 
206
- See [CHANGELOG.md](./CHANGELOG.md)
207
-
208
- ## License
209
-
210
- Not licensed.
216
+ See [CHANGELOG.md](./CHANGELOG.md)
package/package.json CHANGED
@@ -1,11 +1,23 @@
1
1
  {
2
2
  "author": "Knitli Inc.",
3
3
  "description": "Shared branded components for Knitli documentation sites",
4
+ "dependencies": {
5
+ "astro": "catalog:astro-core",
6
+ "lightningcss": "catalog:optimization",
7
+ "svgo": "catalog:optimization"
8
+
9
+ },
4
10
  "devDependencies": {
5
- "@types/node": "^24.0.0",
6
- "astro": "^5.17.0",
11
+ "astro": "catalog:astro-core",
7
12
  "auto-changelog": "^2.4.0",
8
- "typescript": "^5.3.0"
13
+ "typescript": "catalog:dev-common",
14
+ "bun": "catalog:dev-common",
15
+ "@biomejs/biome": "catalog:dev-common",
16
+ "@types/node": "catalog:types",
17
+ "@knitli/tsconfig": "*"
18
+ },
19
+ "engine": {
20
+ "node": ">=24.0.0"
9
21
  },
10
22
  "exports": {
11
23
  ".": "./dist/index.js",
@@ -31,7 +43,7 @@
31
43
  "components",
32
44
  "starlight"
33
45
  ],
34
- "license": "LicenseRef-Not_Licensed",
46
+ "license": "(MIT OR Apache-2.0) AND LicenseRef-KnitliProprietary",
35
47
  "main": "./dist/index.js",
36
48
  "name": "@knitli/docs-components",
37
49
  "peerDependencies": {
@@ -43,11 +55,12 @@
43
55
  "url": "git+https://github.com/knitli/knitli-site.git"
44
56
  },
45
57
  "scripts": {
46
- "build": "tsc",
58
+ "build": "bunx tsc",
47
59
  "prepublishOnly": "bun run build",
48
- "version": "auto-changelog -p && git add CHANGELOG.md"
60
+ "version": "auto-changelog -p && git add CHANGELOG.md",
61
+ "publish": "bun publish --access public"
49
62
  },
50
63
  "type": "module",
51
64
  "types": "./dist/index.d.ts",
52
- "version": "1.0.2"
65
+ "version": "1.0.4"
53
66
  }
@@ -1,27 +1,6 @@
1
1
  ---
2
- // SPDX-FileCopyrightText: 2025 Knitli Inc.
3
- // SPDX-FileContributor: Adam Poulemanos <adam@knit.li>
4
- //
5
- // SPDX-License-Identifier: MIT OR Apache-2.0
6
- //
7
- // Main branded header for Knitli documentation sites
8
- // Provides navigation, branding, and breadcrumb support
9
-
10
- interface Props {
11
- currentProduct?: 'ReCoco' | 'CodeWeaver' | 'Thread';
12
- currentPath?: string;
13
- productUrl?: string;
14
- showBreadcrumb?: boolean;
15
- variant?: 'default' | 'minimal';
16
- }
17
-
18
- const {
19
- currentProduct,
20
- currentPath = '',
21
- productUrl = '',
22
- showBreadcrumb = true,
23
- variant = 'default',
24
- } = Astro.props;
2
+ // Custom header with actual Knitli logo
3
+ const { pathname } = Astro.url;
25
4
 
26
5
  // Environment-aware URL configuration
27
6
  const isDev = import.meta.env.DEV;
@@ -43,49 +22,29 @@ const getSiteUrls = () => {
43
22
  };
44
23
 
45
24
  const urls = getSiteUrls();
46
- const isDocsHome = currentPath === '/' || currentPath === '';
47
- const shouldShowBreadcrumb = showBreadcrumb && !isDocsHome && currentProduct;
25
+ const isDocsHome = pathname === '/' || pathname === '';
26
+ const shouldShowBreadcrumb = !isDocsHome;
27
+
48
28
  ---
49
29
 
50
- <header class:list={['docs-header', { minimal: variant === 'minimal' }]}>
30
+ <header class="docs-header">
51
31
  <div class="docs-header-content">
52
32
  <!-- Knitli Logo + Docs Section -->
53
33
  <a href={urls.marketing} class="docs-logo" aria-label="Knitli home">
54
- <svg class="logo-icon" width="32" height="32" viewBox="0 0 100 100" fill="none" aria-hidden="true">
55
- <!-- Simplified Knitli knot icon -->
56
- <circle cx="50" cy="50" r="35" fill="var(--docs-copper)" opacity="0.15"/>
57
- <path
58
- d="M50 20 L50 50 L65 50"
59
- stroke="var(--docs-slate)"
60
- stroke-width="4"
61
- fill="none"
62
- stroke-linecap="round"
63
- stroke-linejoin="round"
64
- />
65
- <path
66
- d="M35 50 L50 50 L50 80"
67
- stroke="var(--docs-slate)"
68
- stroke-width="4"
69
- fill="none"
70
- stroke-linecap="round"
71
- stroke-linejoin="round"
72
- />
73
- <circle cx="50" cy="50" r="6" fill="var(--docs-copper)"/>
74
- </svg>
34
+ <img src={`${import.meta.env.BASE_URL}/knitli-logo.svg`} alt="Knitli" class="logo-icon" />
75
35
  <span class="logo-text">
76
- <span class="logo-brand">Knitli</span>
77
36
  <span class="logo-separator">/</span>
78
37
  <span class="logo-section">docs</span>
79
38
  </span>
80
39
  </a>
81
40
 
82
- <!-- Breadcrumb (if not on docs home and product specified) -->
41
+ <!-- Breadcrumb -->
83
42
  {shouldShowBreadcrumb && (
84
43
  <nav class="docs-breadcrumb" aria-label="Breadcrumb">
85
44
  <a href="/">Documentation</a>
86
45
  <span class="breadcrumb-separator" aria-hidden="true">→</span>
87
- <a href={productUrl || `/${currentProduct}`} class="breadcrumb-product">
88
- {currentProduct}
46
+ <a href="/ReCoco" class="breadcrumb-product">
47
+ ReCoco
89
48
  </a>
90
49
  </nav>
91
50
  )}
@@ -122,28 +81,13 @@ const shouldShowBreadcrumb = showBreadcrumb && !isDocsHome && currentProduct;
122
81
  </header>
123
82
 
124
83
  <style>
125
- :root {
126
- --docs-copper: oklch(0.58 0.08 50); /* #b56c30 */
127
- --docs-slate: oklch(0.35 0.02 240); /* #485563 */
128
- --docs-parchment: oklch(0.96 0.015 70);
129
- }
130
-
131
84
  .docs-header {
132
- background: var(--docs-parchment);
133
- border-bottom: 1px solid oklch(0.85 0.01 50);
85
+ background: white;
86
+ border-bottom: 1px solid #e5e7eb;
87
+ border-radius: 0 0 6px 2px; /* Chamfered bottom corners only */
134
88
  position: sticky;
135
89
  top: 0;
136
90
  z-index: 100;
137
-
138
- /* Copper accent line */
139
- box-shadow:
140
- inset 0 -2px 0 var(--docs-copper),
141
- 0 1px 3px rgba(0, 0, 0, 0.05);
142
- }
143
-
144
- .docs-header.minimal {
145
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
146
- border-bottom: 1px solid oklch(0.90 0.01 60);
147
91
  }
148
92
 
149
93
  .docs-header-content {
@@ -158,7 +102,7 @@ const shouldShowBreadcrumb = showBreadcrumb && !isDocsHome && currentProduct;
158
102
  .docs-logo {
159
103
  display: flex;
160
104
  align-items: center;
161
- gap: 0.75rem;
105
+ gap: 0.5rem;
162
106
  text-decoration: none;
163
107
  transition: opacity 0.2s ease;
164
108
  }
@@ -168,48 +112,45 @@ const shouldShowBreadcrumb = showBreadcrumb && !isDocsHome && currentProduct;
168
112
  }
169
113
 
170
114
  .logo-icon {
115
+ height: 32px;
116
+ width: auto;
171
117
  flex-shrink: 0;
172
118
  }
173
119
 
174
120
  .logo-text {
175
- font-family: "DM Mono", "Roboto Mono", "Courier New", monospace;
121
+ font-family: system-ui, -apple-system, sans-serif;
176
122
  font-size: 1.125rem;
177
123
  font-weight: 600;
178
124
  line-height: 1;
179
- }
180
-
181
- .logo-brand {
182
- color: var(--docs-slate);
125
+ color: #374151;
183
126
  }
184
127
 
185
128
  .logo-separator {
186
- color: var(--docs-copper);
187
- opacity: 0.5;
188
- margin: 0 0.25rem;
129
+ color: #9ca3af;
130
+ margin: 0 0.5rem;
189
131
  }
190
132
 
191
133
  .logo-section {
192
- color: var(--docs-copper);
134
+ color: #6b7280;
193
135
  }
194
136
 
195
137
  .docs-breadcrumb {
196
138
  display: flex;
197
139
  align-items: center;
140
+ align-self: flex-end;
198
141
  gap: 0.5rem;
199
- font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
200
142
  font-size: 0.875rem;
201
- color: var(--docs-slate);
202
- opacity: 0.7;
143
+ color: #6b7280;
203
144
  }
204
145
 
205
146
  .docs-breadcrumb a {
206
147
  color: inherit;
207
148
  text-decoration: none;
208
- transition: opacity 0.2s ease;
149
+ transition: color 0.2s ease;
209
150
  }
210
151
 
211
152
  .docs-breadcrumb a:hover {
212
- opacity: 1;
153
+ color: #111827;
213
154
  text-decoration: underline;
214
155
  }
215
156
 
@@ -219,7 +160,7 @@ const shouldShowBreadcrumb = showBreadcrumb && !isDocsHome && currentProduct;
219
160
 
220
161
  .breadcrumb-product {
221
162
  font-weight: 500;
222
- opacity: 1;
163
+ color: #111827;
223
164
  }
224
165
 
225
166
  .spacer {
@@ -233,33 +174,20 @@ const shouldShowBreadcrumb = showBreadcrumb && !isDocsHome && currentProduct;
233
174
  }
234
175
 
235
176
  .docs-nav a {
236
- font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
237
177
  font-size: 0.9375rem;
238
- color: var(--docs-slate);
178
+ color: #374151;
239
179
  text-decoration: none;
240
180
  position: relative;
241
181
  padding: 0.25rem 0;
242
182
  transition: color 0.2s ease;
243
183
  }
244
184
 
245
- .docs-nav a::after {
246
- content: '';
247
- position: absolute;
248
- bottom: 0;
249
- left: 0;
250
- width: 0;
251
- height: 1px;
252
- background: var(--docs-copper);
253
- transition: width 0.2s ease;
254
- }
255
-
256
- .docs-nav a:hover::after,
257
- .docs-nav a.active::after {
258
- width: 100%;
185
+ .docs-nav a:hover {
186
+ color: #111827;
259
187
  }
260
188
 
261
189
  .docs-nav a.active {
262
- color: var(--docs-copper);
190
+ color: #111827;
263
191
  font-weight: 500;
264
192
  }
265
193
 
@@ -285,7 +213,6 @@ const shouldShowBreadcrumb = showBreadcrumb && !isDocsHome && currentProduct;
285
213
  .docs-breadcrumb {
286
214
  order: 3;
287
215
  width: 100%;
288
- padding-left: 0;
289
216
  }
290
217
 
291
218
  .spacer {
@@ -297,32 +224,8 @@ const shouldShowBreadcrumb = showBreadcrumb && !isDocsHome && currentProduct;
297
224
  font-size: 0.875rem;
298
225
  }
299
226
 
300
- .logo-text {
301
- font-size: 1rem;
302
- }
303
- }
304
-
305
- /* Tablet */
306
- @media (min-width: 769px) and (max-width: 1024px) {
307
- .docs-nav {
308
- gap: 1.5rem;
309
- }
310
- }
311
-
312
- /* Accessibility */
313
- .docs-logo:focus-visible,
314
- .docs-nav a:focus-visible,
315
- .docs-breadcrumb a:focus-visible {
316
- outline: 3px solid var(--docs-copper);
317
- outline-offset: 4px;
318
- border-radius: 4px;
319
- }
320
-
321
- /* Reduced motion */
322
- @media (prefers-reduced-motion: reduce) {
323
- * {
324
- animation-duration: 0.01ms !important;
325
- transition-duration: 0.01ms !important;
227
+ .logo-icon {
228
+ height: 28px;
326
229
  }
327
230
  }
328
231
  </style>
package/dist/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from './types/index.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAQA,cAAc,kBAAkB,CAAC"}
package/dist/index.js DELETED
@@ -1,13 +0,0 @@
1
- // SPDX-FileCopyrightText: 2025 Knitli Inc.
2
- // SPDX-FileContributor: Adam Poulemanos <adam@knit.li>
3
- //
4
- // SPDX-License-Identifier: MIT OR Apache-2.0
5
- //
6
- // Main exports for @knitli/docs-components package
7
- // Export type definitions
8
- export * from './types/index.js';
9
- // Components are exported via package.json exports field
10
- // Import them directly:
11
- // import DocsHeader from '@knitli/docs-components/DocsHeader.astro';
12
- // import DocsFooter from '@knitli/docs-components/DocsFooter.astro';
13
- // import DocsBreadcrumb from '@knitli/docs-components/DocsBreadcrumb.astro';
@@ -1,72 +0,0 @@
1
- /**
2
- * Supported Knitli products for documentation
3
- */
4
- export type ProductName = 'ReCoco' | 'CodeWeaver' | 'Thread';
5
- /**
6
- * Site URLs configuration
7
- */
8
- export interface SiteUrls {
9
- marketing: string;
10
- blog: string;
11
- docs: string;
12
- }
13
- /**
14
- * Props for DocsHeader component
15
- */
16
- export interface DocsHeaderProps {
17
- /**
18
- * Current product being documented
19
- */
20
- currentProduct?: ProductName;
21
- /**
22
- * Current URL path
23
- */
24
- currentPath?: string;
25
- /**
26
- * URL to the product's documentation home
27
- */
28
- productUrl?: string;
29
- /**
30
- * Whether to show breadcrumb navigation
31
- * @default true
32
- */
33
- showBreadcrumb?: boolean;
34
- /**
35
- * Visual variant of the header
36
- * @default 'default'
37
- */
38
- variant?: 'default' | 'minimal';
39
- }
40
- /**
41
- * Props for DocsFooter component
42
- */
43
- export interface DocsFooterProps {
44
- /**
45
- * Visual variant of the footer
46
- * @default 'default'
47
- */
48
- variant?: 'default' | 'minimal';
49
- }
50
- /**
51
- * Props for DocsBreadcrumb component
52
- */
53
- export interface DocsBreadcrumbProps {
54
- /**
55
- * Current product name
56
- */
57
- product?: ProductName;
58
- /**
59
- * URL to the product's documentation home
60
- */
61
- productUrl?: string;
62
- /**
63
- * Current path within the product docs
64
- */
65
- path?: string;
66
- /**
67
- * Visual variant of the breadcrumb
68
- * @default 'default'
69
- */
70
- variant?: 'default' | 'compact';
71
- }
72
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAOA;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,YAAY,GAAG,QAAQ,CAAC;AAE7D;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,cAAc,CAAC,EAAE,WAAW,CAAC;IAE7B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CACjC;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CACjC;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IAEtB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CACjC"}
@@ -1,7 +0,0 @@
1
- // SPDX-FileCopyrightText: 2025 Knitli Inc.
2
- // SPDX-FileContributor: Adam Poulemanos <adam@knit.li>
3
- //
4
- // SPDX-License-Identifier: MIT OR Apache-2.0
5
- //
6
- // TypeScript type definitions for docs-components package
7
- export {};