@inkeep/cxkit-docusaurus 0.5.3 → 0.5.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.
@@ -1,3 +1,8 @@
1
1
  import { PluginConfig } from './types';
2
2
  export type * from '@inkeep/cxkit-react';
3
3
  export declare const defineConfig: (config: PluginConfig) => PluginConfig;
4
+ declare global {
5
+ interface Window {
6
+ InkeepConfig: PluginConfig;
7
+ }
8
+ }
@@ -1,3 +1,8 @@
1
1
  import { PluginConfig } from './types';
2
2
  export type * from '@inkeep/cxkit-react';
3
3
  export declare const defineConfig: (config: PluginConfig) => PluginConfig;
4
+ declare global {
5
+ interface Window {
6
+ InkeepConfig: PluginConfig;
7
+ }
8
+ }
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("react"),c=require("@inkeep/cxkit-react"),a=require("../utils/config.cjs");function i(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const r=i(u);function l(){const e=a.useConfig("ChatButton");return e?r.createElement(r.Fragment,null,r.createElement(c.InkeepChatButton,{...e})):null}exports.default=l;
@@ -0,0 +1,10 @@
1
+ import * as t from "react";
2
+ import { InkeepChatButton as n } from "@inkeep/cxkit-react";
3
+ import { useConfig as r } from "../utils/config.js";
4
+ function u() {
5
+ const e = r("ChatButton");
6
+ return e ? /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(n, { ...e })) : null;
7
+ }
8
+ export {
9
+ u as default
10
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react"),u=require("./ChatButton.cjs");function r({children:t}){return e.createElement(e.Fragment,null,t,e.createElement(u.default,null))}exports.default=r;
@@ -0,0 +1,8 @@
1
+ import t from "react";
2
+ import r from "./ChatButton.js";
3
+ function o({ children: e }) {
4
+ return /* @__PURE__ */ t.createElement(t.Fragment, null, e, /* @__PURE__ */ t.createElement(r, null));
5
+ }
6
+ export {
7
+ o as default
8
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("react"),o=require("@inkeep/cxkit-react"),u=require("../utils/config.cjs");function i(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const c=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,c.get?c:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const n=i(a);function l(){const e=u.useConfig("SearchBar");return e?n.createElement(n.Fragment,null,n.createElement(o.InkeepSearchBar,{...e})):null}exports.default=l;
@@ -0,0 +1,10 @@
1
+ import * as r from "react";
2
+ import { InkeepSearchBar as t } from "@inkeep/cxkit-react";
3
+ import { useConfig as a } from "../utils/config.js";
4
+ function c() {
5
+ const e = a("SearchBar");
6
+ return e ? /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(t, { ...e })) : null;
7
+ }
8
+ export {
9
+ c as default
10
+ };
@@ -0,0 +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,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 | null;
3
+ export declare function useConfig(component: keyof PluginConfig): InkeepConfig;
@@ -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 | null;
3
+ export declare function useConfig(component: keyof PluginConfig): InkeepConfig;
@@ -0,0 +1,27 @@
1
+ import g from "@docusaurus/useDocusaurusContext";
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 = {
5
+ baseSettings: {
6
+ primaryBrandColor: "",
7
+ colorMode: {
8
+ sync: {
9
+ target: "html",
10
+ attributes: ["data-theme"],
11
+ isDarkMode: (a) => a["data-theme"] === "dark"
12
+ }
13
+ },
14
+ organizationDisplayName: t.title,
15
+ theme: {
16
+ syntaxHighlighter: {
17
+ lightTheme: o,
18
+ darkTheme: s
19
+ }
20
+ }
21
+ }
22
+ };
23
+ return i(m, r ?? {});
24
+ }
25
+ export {
26
+ f as useConfig
27
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkeep/cxkit-docusaurus",
3
- "version": "0.5.3",
3
+ "version": "0.5.4",
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.3"
38
+ "@inkeep/cxkit-types": "0.5.4"
39
39
  },
40
40
  "dependencies": {
41
41
  "merge-anything": "6.0.2",
42
42
  "path": "^0.12.7",
43
- "@inkeep/cxkit-react": "0.5.3"
43
+ "@inkeep/cxkit-react": "0.5.4"
44
44
  },
45
45
  "module": "dist/index.js",
46
46
  "types": "dist/index.d.ts",