@knitli/docs-components 1.3.2 → 1.3.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knitli/docs-components",
3
- "version": "1.3.2",
3
+ "version": "1.3.5",
4
4
  "description": "Shared branded components for Knitli documentation sites",
5
5
  "keywords": [
6
6
  "knitli",
@@ -13,7 +13,7 @@
13
13
  "repository": {
14
14
  "type": "git",
15
15
  "url": "git+https://github.com/knitli/knitli-site.git",
16
- "directory": "packages/docs-components"
16
+ "directory": "packages/shared/docs-components"
17
17
  },
18
18
  "license": "(MIT OR Apache-2.0) AND LicenseRef-KnitliProprietary",
19
19
  "author": "Knitli Inc.",
@@ -53,33 +53,41 @@
53
53
  "CHANGELOG.md"
54
54
  ],
55
55
  "scripts": {
56
- "build": "vite build && tsc -p tsconfig.build.json --noCheck",
57
- "copy-assets": "bun run scripts/copy-assets.mjs",
58
- "prepublishOnly": "bun run copy-assets && bun run build",
59
- "deploy": "npm publish --access public"
56
+ "prebuild": "bunx astro sync --quiet || true",
57
+ "build": "bun run ./build.ts",
58
+ "postbuild": "tsc --emitDeclarationOnly --declaration --noCheck --outDir dist",
59
+ "deploy": "bun publish --tag latest",
60
+ "prepack": "bun run build"
60
61
  },
61
62
  "dependencies": {
62
- "astro-contributors": "catalog:astro-plugins",
63
- "astro-seo-meta": "catalog:astro-plugins"
63
+ "astro-contributors": "^0.8.0",
64
+ "astro-seo-meta": "^6.0.0"
64
65
  },
65
66
  "devDependencies": {
66
- "@biomejs/biome": "catalog:dev-common",
67
- "@knitli/shared-file-types": "workspace:*",
68
- "@knitli/shared-layouts": "workspace:*",
69
- "@knitli/tsconfig": "*",
70
- "@types/node": "catalog:types",
71
- "@types/react": "catalog:types",
72
- "astro": "catalog:astro-core",
73
- "bun": "catalog:dev-common",
74
- "lightningcss": "catalog:optimization",
75
- "svgo": "catalog:optimization",
76
- "typescript": "catalog:dev-common",
77
- "vite": "catalog:dev-common",
78
- "vitest": "catalog:dev-common"
67
+ "@biomejs/biome": "^2.4.2",
68
+ "@knitli/shared-file-types": "0.1.0",
69
+ "@knitli/shared-layouts": "0.1.0",
70
+ "@knitli/tsconfig": "0.2.0",
71
+ "@types/bun": "^1.3.4",
72
+ "@types/node": "^24.0.2",
73
+ "@types/react": "^19.2.14",
74
+ "astro": "^6.0.4",
75
+ "bun": "^1.3.9",
76
+ "lightningcss": "^1.30.2",
77
+ "svgo": "^4.0.0",
78
+ "typescript": "^5.9.3",
79
+ "vite": "^7.0.0",
80
+ "vitest": "^4.0.18"
79
81
  },
80
82
  "peerDependencies": {
81
- "@astrojs/starlight": "catalog:astro-core",
82
- "astro": "catalog:astro-core"
83
+ "@astrojs/starlight": "^0.38.1",
84
+ "astro": "^6.0.4"
85
+ },
86
+ "publishConfig": {
87
+ "access": "public",
88
+ "provenance": false,
89
+ "registry": "https://registry.npmjs.org/",
90
+ "tag": "latest"
83
91
  },
84
92
  "engine": {
85
93
  "node": "catalog:"
@@ -1,8 +0,0 @@
1
- import { dirname, join } from 'node:path';
2
- import { fileURLToPath } from 'node:url';
3
-
4
- const __dirname$1 = dirname(fileURLToPath(import.meta.url));
5
- const faviconIco = join(__dirname$1, "favicon.ico");
6
- const faviconSvg = join(__dirname$1, "favicon.svg");
7
-
8
- export { faviconIco, faviconSvg };
@@ -1,25 +0,0 @@
1
- import { dirname, join } from 'node:path';
2
- import { fileURLToPath } from 'node:url';
3
-
4
- const __dirname$1 = dirname(fileURLToPath(import.meta.url));
5
- const knitliLogo = join(__dirname$1, "knitli_logo.svg");
6
- const headlineLogoLight = join(__dirname$1, "headline_logo.webp");
7
- const headlineLogoDark = join(__dirname$1, "headline_logo_dark.webp");
8
- const codeweaverPrimary = join(__dirname$1, "codeweaver-primary.svg");
9
- const codeweaverReverse = join(__dirname$1, "codeweaver-reverse.svg");
10
- const knitliWordmark = join(__dirname$1, "knitli_wordmark.svg");
11
- const recocoLogoXl = join(__dirname$1, "recoco-xl.webp");
12
- const recocoLogoLg = join(__dirname$1, "recoco-lg.webp");
13
- const recocoLogoMed = join(__dirname$1, "recoco-med.webp");
14
- const recocoLogoSm = join(__dirname$1, "recoco-sm.webp");
15
- const recocoLogoXs = join(__dirname$1, "recoco-xs.webp");
16
- const threadLogoDark = join(
17
- __dirname$1,
18
- "Thread_vector_mono_parchment.svg"
19
- );
20
- const threadLogoLight = join(
21
- __dirname$1,
22
- "Thread_vector_mono_aubergine.svg"
23
- );
24
-
25
- export { codeweaverPrimary, codeweaverReverse, headlineLogoDark, headlineLogoLight, knitliLogo, knitliWordmark, recocoLogoLg, recocoLogoMed, recocoLogoSm, recocoLogoXl, recocoLogoXs, threadLogoDark, threadLogoLight };
@@ -1,12 +0,0 @@
1
- import { dirname, join } from 'node:path';
2
- import { fileURLToPath } from 'node:url';
3
-
4
- const __dirname$1 = dirname(fileURLToPath(import.meta.url));
5
- const codeweaverTheme = join(__dirname$1, "codeweaver-theme.css");
6
- const globalStyles = join(__dirname$1, "global.css");
7
- const knitliTheme = join(__dirname$1, "knitli-theme.css");
8
- const textures = join(__dirname$1, "textures.css");
9
- const typography = join(__dirname$1, "typography.css");
10
- const variables = join(__dirname$1, "variables.css");
11
-
12
- export { codeweaverTheme, globalStyles, knitliTheme, textures, typography, variables };
@@ -1,23 +0,0 @@
1
- const catalogData = /* #__PURE__ */ JSON.parse("[{\"slug\":\"recoco\",\"name\":\"Recoco\",\"tagline\":\"Intelligent data pipelines\",\"description\":\"Build intelligent data pipelines and ETL workflows. Only process changed data.\",\"highlight\":\"Pure Rust, minimal dependencies, maximum efficiency.\",\"status\":\"available\",\"docsUrl\":\"/recoco/\",\"external\":false,\"logo\":\"recocoLogoSm\",\"darkLogo\":\"recocoLogoSm\",\"order\":1,\"featured\":true},{\"slug\":\"codeweaver\",\"name\":\"CodeWeaver\",\"tagline\":\"AI code context engine\",\"description\":\"Your AI code assistants can do better.\",\"highlight\":\"CodeWeaver gives AI agents tailored code context and project understanding, stopping hallucinations, cutting token waste, and supercharging your AI coding workflows.\",\"footnote\":\"Now in Alpha.\",\"status\":\"coming-soon\",\"external\":false,\"logo\":\"codeweaverPrimary\",\"darkLogo\":\"codeweaverReverse\",\"order\":2,\"featured\":true},{\"slug\":\"thread\",\"name\":\"Thread\",\"tagline\":\"Ultra-fast codebase analysis\",\"description\":\"An ultra-fast, Rust-native, codebase analysis platform.\",\"highlight\":\"Real-time code understanding and navigation for the largest codebases. Delivers 50x+ speed improvements over comparable tools with minimal resource usage. Works locally, on the edge, or in the cloud.\",\"footnote\":\"Limited features available now, full release coming soon.\",\"status\":\"available\",\"docsUrl\":\"https://docs.rs/thread\",\"external\":true,\"logo\":\"threadLogoLight\",\"darkLogo\":\"threadLogoDark\",\"order\":3,\"featured\":true}]");
2
-
3
- const products = catalogData;
4
- function featuredProducts() {
5
- return products.filter((p) => p.featured !== false).sort((a, b) => a.order - b.order);
6
- }
7
- function availableProducts() {
8
- return products.filter((p) => p.status !== "coming-soon");
9
- }
10
- function getProduct(slug) {
11
- return products.find((p) => p.slug === slug);
12
- }
13
- function getProductByName(name) {
14
- return products.find((p) => p.name === name);
15
- }
16
- function productNames() {
17
- return products.map((p) => p.name);
18
- }
19
- function getProductSitemaps(baseUrl = "https://docs.knitli.com") {
20
- return products.filter((p) => p.docsUrl && !p.external && p.status !== "coming-soon").map((p) => `${baseUrl}/${p.slug}/sitemap-index.xml`);
21
- }
22
-
23
- export { availableProducts, featuredProducts, getProduct, getProductByName, getProductSitemaps, productNames, products };
@@ -1,7 +0,0 @@
1
- import { dirname, join } from 'node:path';
2
- import { fileURLToPath } from 'node:url';
3
-
4
- const __dirname$1 = dirname(fileURLToPath(import.meta.url));
5
- const docsStyle = join(__dirname$1, "custom.css");
6
-
7
- export { docsStyle };
@@ -1 +0,0 @@
1
-
@@ -1,42 +0,0 @@
1
- // Script to sync brand assets from @knitli/shared-layouts into this package's src/assets/.
2
- // Run via: bun run copy-assets
3
- // Called automatically by prepublishOnly before building.
4
- import { cpSync, mkdirSync } from "node:fs";
5
- import { dirname, resolve } from "node:path";
6
- import { fileURLToPath } from "node:url";
7
-
8
- const __dirname = dirname(fileURLToPath(import.meta.url));
9
- const pkgRoot = resolve(__dirname, "..");
10
- const layoutsAssets = resolve(pkgRoot, "../layouts/src/assets");
11
-
12
- const targets = [
13
- {
14
- src: `${layoutsAssets}/logos`,
15
- dest: `${pkgRoot}/src/assets/logos`,
16
- filter: (f) => !f.endsWith("index.ts"),
17
- },
18
- {
19
- src: `${layoutsAssets}/favicon`,
20
- dest: `${pkgRoot}/src/assets/favicon`,
21
- filter: (f) => !f.endsWith("index.ts"),
22
- },
23
- {
24
- src: `${layoutsAssets}/styles`,
25
- dest: `${pkgRoot}/src/assets/styles`,
26
- filter: (f) => f.endsWith(".css"),
27
- },
28
- ];
29
-
30
- for (const { src, dest, filter } of targets) {
31
- mkdirSync(dest, { recursive: true });
32
- cpSync(src, dest, {
33
- recursive: true,
34
- filter: (src) => {
35
- // Always allow directories
36
- if (!src.includes(".")) return true;
37
- return filter(src);
38
- },
39
- });
40
- console.log(`Copied ${src} → ${dest}`);
41
- }
42
- console.log("Asset sync complete.");
@@ -1,38 +0,0 @@
1
- // Post-build script: copies static asset files (SVG, webp, CSS) from src/assets/ to dist/assets/
2
- // so that the compiled dist/assets/*/index.js files can resolve them via import.meta.url.
3
- import { cpSync, mkdirSync } from "node:fs";
4
- import { dirname, resolve } from "node:path";
5
- import { fileURLToPath } from "node:url";
6
-
7
- const __dirname = dirname(fileURLToPath(import.meta.url));
8
- const pkgRoot = resolve(__dirname, "..");
9
-
10
- const copies = [
11
- { src: `${pkgRoot}/src/assets/logos`, dest: `${pkgRoot}/dist/assets/logos` },
12
- {
13
- src: `${pkgRoot}/src/assets/favicon`,
14
- dest: `${pkgRoot}/dist/assets/favicon`,
15
- },
16
- {
17
- src: `${pkgRoot}/src/assets/styles`,
18
- dest: `${pkgRoot}/dist/assets/styles`,
19
- },
20
- {
21
- src: `${pkgRoot}/src/styles`,
22
- dest: `${pkgRoot}/dist/styles`,
23
- },
24
- ];
25
-
26
- for (const { src, dest } of copies) {
27
- mkdirSync(dest, { recursive: true });
28
- cpSync(src, dest, {
29
- recursive: true,
30
- filter: (src) => {
31
- // Copy binary assets and CSS, skip TS source files
32
- if (!src.includes(".")) return true; // directories
33
- return /\.(svg|webp|png|jpg|jpeg|ico|css)$/.test(src);
34
- },
35
- });
36
- console.log(`Copied assets: ${src} → ${dest}`);
37
- }
38
- console.log("Dist asset copy complete.");