@inkeep/cxkit-docusaurus 0.5.4 → 0.5.6

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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=e=>e;exports.defineConfig=n;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=e=>{typeof window<"u"&&(window.InkeepConfig=e)};exports.defineConfig=n;
@@ -1,6 +1,6 @@
1
1
  import { PluginConfig } from './types';
2
2
  export type * from '@inkeep/cxkit-react';
3
- export declare const defineConfig: (config: PluginConfig) => PluginConfig;
3
+ export declare const defineConfig: (config: PluginConfig) => void;
4
4
  declare global {
5
5
  interface Window {
6
6
  InkeepConfig: PluginConfig;
@@ -1,6 +1,6 @@
1
1
  import { PluginConfig } from './types';
2
2
  export type * from '@inkeep/cxkit-react';
3
- export declare const defineConfig: (config: PluginConfig) => PluginConfig;
3
+ export declare const defineConfig: (config: PluginConfig) => void;
4
4
  declare global {
5
5
  interface Window {
6
6
  InkeepConfig: PluginConfig;
@@ -1,4 +1,6 @@
1
- const n = (e) => e;
1
+ const e = (n) => {
2
+ typeof window < "u" && (window.InkeepConfig = n);
3
+ };
2
4
  export {
3
- n as defineConfig
5
+ e as defineConfig
4
6
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("@docusaurus/useDocusaurusContext"),o=require("merge-anything");function c(i){const{siteConfig:t}=a(),e=t.themeConfig,r=o.merge(e.inkeep??{},window.InkeepConfig??{})[i],n=e.prism.theme,s=e.prism.darkTheme||n,g={baseSettings:{primaryBrandColor:"",colorMode:{sync:{target:"html",attributes:["data-theme"],isDarkMode:m=>m["data-theme"]==="dark"}},organizationDisplayName:t.title,theme:{syntaxHighlighter:{lightTheme:n,darkTheme:s}}}};return o.merge(g,r??{})}exports.useConfig=c;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("@docusaurus/useDocusaurusContext"),i=require("merge-anything");function d(r){const{siteConfig:t}=c(),e=t.themeConfig,s=typeof window<"u"?window.InkeepConfig:{},n=i.merge(e.inkeep??{},s??{})[r];if(!n)return null;const o=e.prism.theme,g=e.prism.darkTheme||o,m={baseSettings:{primaryBrandColor:"",colorMode:{sync:{target:"html",attributes:["data-theme"],isDarkMode:a=>a["data-theme"]==="dark"}},organizationDisplayName:t.title,theme:{syntaxHighlighter:{lightTheme:o,darkTheme:g}}}};return i.merge(m,n??{})}exports.useConfig=d;
@@ -1,3 +1,3 @@
1
1
  import { PluginConfig } from '../types';
2
2
  import { InkeepConfig } from '@inkeep/cxkit-react';
3
- export declare function useConfig(component: keyof PluginConfig): InkeepConfig;
3
+ export declare function useConfig(component: keyof PluginConfig): InkeepConfig | null;
@@ -1,3 +1,3 @@
1
1
  import { PluginConfig } from '../types';
2
2
  import { InkeepConfig } from '@inkeep/cxkit-react';
3
- export declare function useConfig(component: keyof PluginConfig): InkeepConfig;
3
+ export declare function useConfig(component: keyof PluginConfig): InkeepConfig | null;
@@ -1,27 +1,29 @@
1
- import g from "@docusaurus/useDocusaurusContext";
1
+ import h from "@docusaurus/useDocusaurusContext";
2
2
  import { merge as i } from "merge-anything";
3
- function f(n) {
4
- const { siteConfig: t } = g(), e = t.themeConfig, r = i(e.inkeep ?? {}, window.InkeepConfig ?? {})[n], o = e.prism.theme, s = e.prism.darkTheme || o, m = {
3
+ function p(r) {
4
+ const { siteConfig: t } = h(), e = t.themeConfig, s = typeof window < "u" ? window.InkeepConfig : {}, o = i(e.inkeep ?? {}, s ?? {})[r];
5
+ if (!o) return null;
6
+ const n = e.prism.theme, m = e.prism.darkTheme || n, a = {
5
7
  baseSettings: {
6
8
  primaryBrandColor: "",
7
9
  colorMode: {
8
10
  sync: {
9
11
  target: "html",
10
12
  attributes: ["data-theme"],
11
- isDarkMode: (a) => a["data-theme"] === "dark"
13
+ isDarkMode: (g) => g["data-theme"] === "dark"
12
14
  }
13
15
  },
14
16
  organizationDisplayName: t.title,
15
17
  theme: {
16
18
  syntaxHighlighter: {
17
- lightTheme: o,
18
- darkTheme: s
19
+ lightTheme: n,
20
+ darkTheme: m
19
21
  }
20
22
  }
21
23
  }
22
24
  };
23
- return i(m, r ?? {});
25
+ return i(a, o ?? {});
24
26
  }
25
27
  export {
26
- f as useConfig
28
+ p as useConfig
27
29
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkeep/cxkit-docusaurus",
3
- "version": "0.5.4",
3
+ "version": "0.5.6",
4
4
  "description": "Docusaurus plugin for Inkeep Chat and Search components",
5
5
  "license": "Inkeep, Inc. Customer License (IICL) v1.1",
6
6
  "homepage": "",
@@ -35,12 +35,12 @@
35
35
  "typescript": "5.7.3",
36
36
  "vite": "5.4.11",
37
37
  "vite-plugin-dts": "4.4.0",
38
- "@inkeep/cxkit-types": "0.5.4"
38
+ "@inkeep/cxkit-types": "0.5.6"
39
39
  },
40
40
  "dependencies": {
41
41
  "merge-anything": "6.0.2",
42
42
  "path": "^0.12.7",
43
- "@inkeep/cxkit-react": "0.5.4"
43
+ "@inkeep/cxkit-react": "0.5.6"
44
44
  },
45
45
  "module": "dist/index.js",
46
46
  "types": "dist/index.d.ts",
@@ -60,7 +60,6 @@
60
60
  },
61
61
  "scripts": {
62
62
  "build": "vite build",
63
- "lint": "biome lint ./src",
64
63
  "typecheck": "tsc"
65
64
  }
66
65
  }