@knitli/docs-components 1.3.5 → 1.3.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.
@@ -12,10 +12,24 @@ import { Image } from "astro:assets";
12
12
  // @ts-expect-error: 2604
13
13
  import { Icon } from "@astrojs/starlight/components";
14
14
  import type { StarlightIcon } from "@astrojs/starlight/types";
15
- import * as logos from "@knitli/shared-layouts";
16
15
  import type { ImageMetadata } from "astro";
17
16
  import type { Product } from "../data/products.js";
18
17
 
18
+ // Direct asset imports from docs-components' own logo directory
19
+ import codeweaverPrimary from "../assets/logos/codeweaver-primary.svg";
20
+ import codeweaverReverse from "../assets/logos/codeweaver-reverse.svg";
21
+ import recocoLogoSm from "../assets/logos/recoco-sm.webp";
22
+ import threadLogoDark from "../assets/logos/Thread_vector_mono_parchment.svg";
23
+ import threadLogoLight from "../assets/logos/Thread_vector_mono_aubergine.svg";
24
+
25
+ const logoMap: Record<string, ImageMetadata> = {
26
+ codeweaverPrimary,
27
+ codeweaverReverse,
28
+ recocoLogoSm,
29
+ threadLogoDark,
30
+ threadLogoLight,
31
+ };
32
+
19
33
  interface Props {
20
34
  /** Product data from the catalog */
21
35
  product: Product;
@@ -25,14 +39,8 @@ interface Props {
25
39
 
26
40
  const { product, icon } = Astro.props;
27
41
 
28
- /** Resolve a logo key string to an actual ImageMetadata asset from shared-layouts */
29
- const resolveLogoAsset = (key: string): ImageMetadata | undefined =>
30
- (logos as Record<string, ImageMetadata>)[key];
31
-
32
- const logo = product.logo ? resolveLogoAsset(product.logo) : undefined;
33
- const darkLogo = product.darkLogo
34
- ? resolveLogoAsset(product.darkLogo)
35
- : undefined;
42
+ const logo = product.logo ? logoMap[product.logo] : undefined;
43
+ const darkLogo = product.darkLogo ? logoMap[product.darkLogo] : undefined;
36
44
  const isClickable = product.docsUrl && product.status !== "coming-soon";
37
45
 
38
46
  const imageAttrs = {
package/dist/index.js CHANGED
@@ -48,7 +48,7 @@ var require_SeoMeta = __commonJS((exports, module) => {
48
48
 
49
49
  // src/components/ProductCard.astro
50
50
  var require_ProductCard = __commonJS((exports, module) => {
51
- module.exports = "./ProductCard-gebg6mpp.astro";
51
+ module.exports = "./ProductCard-m8yzqt5y.astro";
52
52
  });
53
53
 
54
54
  // src/components/ProductGrid.astro
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knitli/docs-components",
3
- "version": "1.3.5",
3
+ "version": "1.3.7",
4
4
  "description": "Shared branded components for Knitli documentation sites",
5
5
  "keywords": [
6
6
  "knitli",
@@ -65,7 +65,6 @@
65
65
  },
66
66
  "devDependencies": {
67
67
  "@biomejs/biome": "^2.4.2",
68
- "@knitli/shared-file-types": "0.1.0",
69
68
  "@knitli/shared-layouts": "0.1.0",
70
69
  "@knitli/tsconfig": "0.2.0",
71
70
  "@types/bun": "^1.3.4",
@@ -12,10 +12,24 @@ import { Image } from "astro:assets";
12
12
  // @ts-expect-error: 2604
13
13
  import { Icon } from "@astrojs/starlight/components";
14
14
  import type { StarlightIcon } from "@astrojs/starlight/types";
15
- import * as logos from "@knitli/shared-layouts";
16
15
  import type { ImageMetadata } from "astro";
17
16
  import type { Product } from "../data/products.js";
18
17
 
18
+ // Direct asset imports from docs-components' own logo directory
19
+ import codeweaverPrimary from "../assets/logos/codeweaver-primary.svg";
20
+ import codeweaverReverse from "../assets/logos/codeweaver-reverse.svg";
21
+ import recocoLogoSm from "../assets/logos/recoco-sm.webp";
22
+ import threadLogoDark from "../assets/logos/Thread_vector_mono_parchment.svg";
23
+ import threadLogoLight from "../assets/logos/Thread_vector_mono_aubergine.svg";
24
+
25
+ const logoMap: Record<string, ImageMetadata> = {
26
+ codeweaverPrimary,
27
+ codeweaverReverse,
28
+ recocoLogoSm,
29
+ threadLogoDark,
30
+ threadLogoLight,
31
+ };
32
+
19
33
  interface Props {
20
34
  /** Product data from the catalog */
21
35
  product: Product;
@@ -25,14 +39,8 @@ interface Props {
25
39
 
26
40
  const { product, icon } = Astro.props;
27
41
 
28
- /** Resolve a logo key string to an actual ImageMetadata asset from shared-layouts */
29
- const resolveLogoAsset = (key: string): ImageMetadata | undefined =>
30
- (logos as Record<string, ImageMetadata>)[key];
31
-
32
- const logo = product.logo ? resolveLogoAsset(product.logo) : undefined;
33
- const darkLogo = product.darkLogo
34
- ? resolveLogoAsset(product.darkLogo)
35
- : undefined;
42
+ const logo = product.logo ? logoMap[product.logo] : undefined;
43
+ const darkLogo = product.darkLogo ? logoMap[product.darkLogo] : undefined;
36
44
  const isClickable = product.docsUrl && product.status !== "coming-soon";
37
45
 
38
46
  const imageAttrs = {