@dogsbay/adapter-tigera 0.2.0-beta.138 → 0.2.0-beta.140

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.
@@ -20,6 +20,9 @@
20
20
  * - `<InstallOpenShiftManifests />` (Calico 3.30 on): the download with its `--exclude` flags,
21
21
  * then Tigera's own `<ConfigDataplaneOpenShiftManifests />`, included as converted.
22
22
  * - `<FossaReport />` (Calico Enterprise): a link to the attribution report.
23
+ * - `<CalicoProducts />` (every product's "about" pages): a card per product, title and
24
+ * description, from the `products` list in the component's own source, read as data (it is
25
+ * not exported) and written as `calico-products.json` for `::data-cards`.
23
26
  * Paths are relative to the docs folder imported, so each version reads its own copy.
24
27
  *
25
28
  * Fidelity notes, against the components:
@@ -66,7 +69,9 @@ declare function alternateRegistry(ctx: PreprocessContext): TemplateComponent |
66
69
  * (3.29, Calico Enterprise) converts as it is.
67
70
  */
68
71
  declare function openshiftManifests(ctx: PreprocessContext): TemplateComponent | undefined;
72
+ declare function calicoProducts(ctx: PreprocessContext): TemplateComponent | undefined;
69
73
  export declare const TIGERA_DATA_COMPONENTS: {
74
+ CalicoProducts: typeof calicoProducts;
70
75
  MaintenanceImageOptionsAlternateRegistry: typeof alternateRegistry;
71
76
  InstallOpenShiftManifests: typeof openshiftManifests;
72
77
  FossaReport: TemplateComponent;
@@ -20,6 +20,9 @@
20
20
  * - `<InstallOpenShiftManifests />` (Calico 3.30 on): the download with its `--exclude` flags,
21
21
  * then Tigera's own `<ConfigDataplaneOpenShiftManifests />`, included as converted.
22
22
  * - `<FossaReport />` (Calico Enterprise): a link to the attribution report.
23
+ * - `<CalicoProducts />` (every product's "about" pages): a card per product, title and
24
+ * description, from the `products` list in the component's own source, read as data (it is
25
+ * not exported) and written as `calico-products.json` for `::data-cards`.
23
26
  * Paths are relative to the docs folder imported, so each version reads its own copy.
24
27
  *
25
28
  * Fidelity notes, against the components:
@@ -507,7 +510,22 @@ No FOSSA attribution report available for this version.
507
510
  fromData: ["releases"],
508
511
  data: { "releases.json": "releases.json" },
509
512
  };
513
+ /** The component whose `products` list (title, description) is the product editions' cards. */
514
+ const CALICO_PRODUCTS = "src/___new___/components/CalicoProducts/index.tsx";
515
+ function calicoProducts(ctx) {
516
+ const project = ctx.projectRoot ? `${ctx.projectRoot}/` : "";
517
+ const instance = ctx.instanceRoot ?? "";
518
+ // Data sources are relative to the docs folder: climb out of it to the project, not the corpus
519
+ const inside = instance.slice(project.length);
520
+ const up = inside ? inside.split("/").map(() => "..").join("/") : ".";
521
+ return {
522
+ name: "calico-products",
523
+ text: `::data-cards{src="calico-products"}\n`,
524
+ data: { "calico-products.json": { module: `${up}/${CALICO_PRODUCTS}`, binding: "products" } },
525
+ };
526
+ }
510
527
  export const TIGERA_DATA_COMPONENTS = {
528
+ CalicoProducts: calicoProducts,
511
529
  MaintenanceImageOptionsAlternateRegistry: alternateRegistry,
512
530
  InstallOpenShiftManifests: openshiftManifests,
513
531
  FossaReport: FOSSA,
package/dist/index.js CHANGED
@@ -34,7 +34,6 @@ const TIGERA_COMPONENTS = {
34
34
  propsFromAttrs: (a) => ({ docId: a.docId, title: a.title || a.label, href: a.to || a.href }),
35
35
  },
36
36
  DocCardLinkLayout: { type: "cards", container: true },
37
- CalicoProducts: { type: "cards", container: true },
38
37
  // Conditional rendering — keep the inner content, drop the wrapper.
39
38
  If: { type: "if", container: true, strip: true },
40
39
  // A caption under an image (theme MDX component): its text is kept, the wrapper dropped
@@ -51,6 +50,7 @@ const TIGERA_COMPONENTS = {
51
50
  // component that was the sole content of a tab made the tab label vanish.
52
51
  const TIGERA_JS_COMPONENTS = [
53
52
  "AutoHostendpointsMigrate",
53
+ "CalicoProducts",
54
54
  "CalicoWindowsInstall",
55
55
  "ComponentVersions",
56
56
  "ConfigDataplaneOpenShiftManifests",
@@ -76,7 +76,6 @@ const TIGERA_SELF_CLOSING = [
76
76
  "DocCardLink",
77
77
  "PaidProductDocCardLink",
78
78
  "GeekDetails",
79
- "CalicoProducts",
80
79
  ...TIGERA_JS_COMPONENTS,
81
80
  ];
82
81
  // Inline replacements for icon components used within prose.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dogsbay/adapter-tigera",
3
- "version": "0.2.0-beta.138",
3
+ "version": "0.2.0-beta.140",
4
4
  "description": "Tigera/Calico site adapter for @dogsbay/format-docusaurus — resolves $[variable] substitution and Tigera-specific MDX components.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -11,8 +11,8 @@
11
11
  "README.md"
12
12
  ],
13
13
  "dependencies": {
14
- "@dogsbay/corpus": "0.2.0-beta.138",
15
- "@dogsbay/format-docusaurus": "0.2.0-beta.138"
14
+ "@dogsbay/corpus": "0.2.0-beta.140",
15
+ "@dogsbay/format-docusaurus": "0.2.0-beta.140"
16
16
  },
17
17
  "devDependencies": {
18
18
  "@types/node": "^22.20.1",