@inkeep/cxkit-primitives 0.5.30 → 0.5.31
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/dist/atoms/icons/built-in-icons.cjs +1 -1
- package/dist/atoms/icons/built-in-icons.js +44 -41
- package/dist/atoms/icons/inkeep-default-icons.cjs +1 -1
- package/dist/atoms/icons/inkeep-default-icons.js +1 -0
- package/dist/atoms/markdown/components.cjs +1 -1
- package/dist/atoms/markdown/components.js +27 -24
- package/dist/atoms/markdown/index.cjs +1 -1
- package/dist/atoms/markdown/index.js +54 -41
- package/dist/components/embedded-search/search-query.graphql.cjs +7 -0
- package/dist/components/embedded-search/search-query.graphql.js +7 -0
- package/dist/components/embedded-search/use-inkeep-search.cjs +1 -1
- package/dist/components/embedded-search/use-inkeep-search.js +98 -92
- package/dist/components/embedded-search.cjs +1 -1
- package/dist/components/embedded-search.js +426 -277
- package/dist/index.d.cts +141 -2
- package/dist/index.d.ts +141 -2
- package/dist/node_modules/.pnpm/react-icons@5.4.0_react@19.0.0/node_modules/react-icons/lu/index.cjs +1 -1
- package/dist/node_modules/.pnpm/react-icons@5.4.0_react@19.0.0/node_modules/react-icons/lu/index.js +29 -17
- package/dist/providers/base-events-provider.cjs +1 -1
- package/dist/providers/base-events-provider.js +1 -1
- package/dist/utils/component-ids.cjs +1 -1
- package/dist/utils/component-ids.js +29 -13
- package/dist/utils/default-settings.cjs +1 -1
- package/dist/utils/default-settings.js +4 -3
- package/dist/utils/transform-source/icon.cjs +1 -1
- package/dist/utils/transform-source/icon.js +1 -1
- package/package.json +5 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../../node_modules/.pnpm/react-icons@5.4.0_react@19.0.0/node_modules/react-icons/fa6/index.cjs"),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../../node_modules/.pnpm/react-icons@5.4.0_react@19.0.0/node_modules/react-icons/fa6/index.cjs"),u=require("../../node_modules/.pnpm/react-icons@5.4.0_react@19.0.0/node_modules/react-icons/fi/index.cjs"),e=require("../../node_modules/.pnpm/react-icons@5.4.0_react@19.0.0/node_modules/react-icons/io5/index.cjs"),n=require("../../node_modules/.pnpm/react-icons@5.4.0_react@19.0.0/node_modules/react-icons/lu/index.cjs"),a={FaBook:o.FaBook,FaGithub:o.FaGithub,FaDatabase:o.FaDatabase,FaStackOverflow:o.FaStackOverflow,FaChrome:o.FaChrome,FaPhone:o.FaPhone,FaEnvelope:o.FaEnvelope,FaPencil:o.FaPencil,FaBlog:o.FaBlog,FaSort:o.FaSort,FaPenSquare:o.FaPenToSquare,FaChevronRight:o.FaChevronRight,FaChevronUp:o.FaChevronUp,FaFilePdf:o.FaFilePdf,FaDiscourse:o.FaDiscourse,FaDiscord:o.FaDiscord,FaSlack:o.FaSlack,IoDocumentTextSharp:e.IoDocumentTextSharp,IoDocumentSharp:e.IoDocumentSharp,IoSend:e.IoSend,IoInformationCircleOutline:e.IoInformationCircleOutline,IoLinkOutline:e.IoLinkOutline,IoThumbsUpSharp:e.IoThumbsUpSharp,IoThumbsDownSharp:e.IoThumbsDownSharp,IoSearch:e.IoSearch,IoCopyOutline:e.IoCopyOutline,IoCopy:e.IoCopy,IoReturnDownBackOutline:e.IoReturnDownBackOutline,IoChevronForwardOutline:e.IoChevronForwardOutline,IoReturnDownForward:e.IoReturnDownForward,IoCloseOutline:e.IoCloseOutline,IoCheckmarkOutline:e.IoCheckmarkOutline,IoBookOutline:e.IoBookOutline,IoReaderOutline:e.IoReaderOutline,IoHelpBuoyOutline:e.IoHelpBuoyOutline,IoPeopleOutline:e.IoPeopleOutline,IoDocumentTextOutline:e.IoDocumentTextOutline,IoChatbubblesOutline:e.IoChatbubblesOutline,FaRegFilePdf:o.FaRegFilePdf,IoLogoDiscord:e.IoLogoDiscord,IoLogoGithub:e.IoLogoGithub,IoTerminal:e.IoTerminal,FaBriefcase:o.FaBriefcase,IoPlayCircleOutline:e.IoPlayCircleOutline,IoPencilOutline:e.IoPencilOutline,IoCheckmarkDoneOutline:e.IoCheckmarkDoneOutline,IoHomeOutline:e.IoHomeOutline,IoMail:e.IoMail,IoOpenOutline:e.IoOpenOutline,FaTelegram:o.FaTelegram,FaTable:o.FaTable,FaMagnifyingGlass:o.FaMagnifyingGlass,LuArrowLeft:n.LuArrowLeft,LuCircleCheck:n.LuCircleCheck,LuCommand:n.LuCommand,LuCopy:n.LuCopy,LuCheck:n.LuCheck,LuCornerDownLeft:n.LuCornerDownLeft,LuGlobe:n.LuGlobe,LuLink:n.LuLink,LuRepeat:n.LuRepeat,LuThumbsDown:n.LuThumbsDown,LuThumbsUp:n.LuThumbsUp,LuUsers:n.LuUsers,LuUser:n.LuUser,LuArrowUpRight:n.LuArrowUpRight,LuBookOpen:n.LuBookOpen,LuChevronDown:n.LuChevronDown,LuLoaderCircle:n.LuLoaderCircle,FiEdit:u.FiEdit,LuSparkles:n.LuSparkles,LuCornerDownRight:n.LuCornerDownRight};exports.iconMap=a;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { FaMagnifyingGlass as o, FaTable as e, FaTelegram as
|
|
3
|
-
import { FiEdit as
|
|
4
|
-
import { IoOpenOutline as
|
|
5
|
-
import {
|
|
6
|
-
const
|
|
7
|
-
FaBook:
|
|
2
|
+
import { FaMagnifyingGlass as o, FaTable as e, FaTelegram as n, FaBriefcase as a, FaRegFilePdf as r, FaSlack as u, FaDiscord as i, FaDiscourse as t, FaFilePdf as l, FaChevronUp as I, FaChevronRight as F, FaPenToSquare as L, FaSort as h, FaBlog as c, FaPencil as m, FaEnvelope as p, FaPhone as C, FaChrome as O, FaStackOverflow as s, FaDatabase as k, FaGithub as D, FaBook as b } from "../../node_modules/.pnpm/react-icons@5.4.0_react@19.0.0/node_modules/react-icons/fa6/index.js";
|
|
3
|
+
import { FiEdit as f } from "../../node_modules/.pnpm/react-icons@5.4.0_react@19.0.0/node_modules/react-icons/fi/index.js";
|
|
4
|
+
import { IoOpenOutline as w, IoMail as S, IoHomeOutline as d, IoCheckmarkDoneOutline as g, IoPencilOutline as T, IoPlayCircleOutline as P, IoTerminal as R, IoLogoGithub as B, IoLogoDiscord as v, IoChatbubblesOutline as y, IoDocumentTextOutline as U, IoPeopleOutline as G, IoHelpBuoyOutline as x, IoReaderOutline as M, IoBookOutline as q, IoCheckmarkOutline as A, IoCloseOutline as E, IoReturnDownForward as H, IoChevronForwardOutline as j, IoReturnDownBackOutline as z, IoCopy as J, IoCopyOutline as K, IoSearch as N, IoThumbsDownSharp as Q, IoThumbsUpSharp as V, IoLinkOutline as W, IoInformationCircleOutline as X, IoSend as Y, IoDocumentSharp as Z, IoDocumentTextSharp as _ } from "../../node_modules/.pnpm/react-icons@5.4.0_react@19.0.0/node_modules/react-icons/io5/index.js";
|
|
5
|
+
import { LuCornerDownRight as $, LuSparkles as oo, LuLoaderCircle as eo, LuChevronDown as no, LuBookOpen as ao, LuArrowUpRight as ro, LuUser as uo, LuUsers as io, LuThumbsUp as to, LuThumbsDown as lo, LuRepeat as Io, LuLink as Fo, LuGlobe as Lo, LuCornerDownLeft as ho, LuCheck as co, LuCopy as mo, LuCommand as po, LuCircleCheck as Co, LuArrowLeft as Oo } from "../../node_modules/.pnpm/react-icons@5.4.0_react@19.0.0/node_modules/react-icons/lu/index.js";
|
|
6
|
+
const fo = {
|
|
7
|
+
FaBook: b,
|
|
8
8
|
FaGithub: D,
|
|
9
9
|
FaDatabase: k,
|
|
10
|
-
FaStackOverflow:
|
|
11
|
-
FaChrome:
|
|
12
|
-
FaPhone:
|
|
13
|
-
FaEnvelope:
|
|
14
|
-
FaPencil:
|
|
15
|
-
FaBlog:
|
|
10
|
+
FaStackOverflow: s,
|
|
11
|
+
FaChrome: O,
|
|
12
|
+
FaPhone: C,
|
|
13
|
+
FaEnvelope: p,
|
|
14
|
+
FaPencil: m,
|
|
15
|
+
FaBlog: c,
|
|
16
16
|
FaSort: h,
|
|
17
|
-
FaPenSquare:
|
|
17
|
+
FaPenSquare: L,
|
|
18
18
|
FaChevronRight: F,
|
|
19
19
|
FaChevronUp: I,
|
|
20
20
|
FaFilePdf: l,
|
|
@@ -38,42 +38,45 @@ const ko = {
|
|
|
38
38
|
IoCheckmarkOutline: A,
|
|
39
39
|
IoBookOutline: q,
|
|
40
40
|
IoReaderOutline: M,
|
|
41
|
-
IoHelpBuoyOutline:
|
|
42
|
-
IoPeopleOutline:
|
|
41
|
+
IoHelpBuoyOutline: x,
|
|
42
|
+
IoPeopleOutline: G,
|
|
43
43
|
IoDocumentTextOutline: U,
|
|
44
44
|
IoChatbubblesOutline: y,
|
|
45
45
|
FaRegFilePdf: r,
|
|
46
46
|
IoLogoDiscord: v,
|
|
47
|
-
IoLogoGithub:
|
|
48
|
-
IoTerminal:
|
|
49
|
-
FaBriefcase:
|
|
47
|
+
IoLogoGithub: B,
|
|
48
|
+
IoTerminal: R,
|
|
49
|
+
FaBriefcase: a,
|
|
50
50
|
IoPlayCircleOutline: P,
|
|
51
|
-
IoPencilOutline:
|
|
52
|
-
IoCheckmarkDoneOutline:
|
|
53
|
-
IoHomeOutline:
|
|
54
|
-
IoMail:
|
|
55
|
-
IoOpenOutline:
|
|
56
|
-
FaTelegram:
|
|
51
|
+
IoPencilOutline: T,
|
|
52
|
+
IoCheckmarkDoneOutline: g,
|
|
53
|
+
IoHomeOutline: d,
|
|
54
|
+
IoMail: S,
|
|
55
|
+
IoOpenOutline: w,
|
|
56
|
+
FaTelegram: n,
|
|
57
57
|
FaTable: e,
|
|
58
58
|
FaMagnifyingGlass: o,
|
|
59
|
-
LuArrowLeft:
|
|
60
|
-
LuCircleCheck:
|
|
61
|
-
LuCommand:
|
|
62
|
-
LuCopy:
|
|
63
|
-
LuCheck:
|
|
64
|
-
LuCornerDownLeft:
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
59
|
+
LuArrowLeft: Oo,
|
|
60
|
+
LuCircleCheck: Co,
|
|
61
|
+
LuCommand: po,
|
|
62
|
+
LuCopy: mo,
|
|
63
|
+
LuCheck: co,
|
|
64
|
+
LuCornerDownLeft: ho,
|
|
65
|
+
LuGlobe: Lo,
|
|
66
|
+
LuLink: Fo,
|
|
67
|
+
LuRepeat: Io,
|
|
68
|
+
LuThumbsDown: lo,
|
|
69
|
+
LuThumbsUp: to,
|
|
70
|
+
LuUsers: io,
|
|
71
|
+
LuUser: uo,
|
|
72
|
+
LuArrowUpRight: ro,
|
|
71
73
|
LuBookOpen: ao,
|
|
72
|
-
LuChevronDown:
|
|
73
|
-
LuLoaderCircle:
|
|
74
|
-
FiEdit:
|
|
75
|
-
LuSparkles:
|
|
74
|
+
LuChevronDown: no,
|
|
75
|
+
LuLoaderCircle: eo,
|
|
76
|
+
FiEdit: f,
|
|
77
|
+
LuSparkles: oo,
|
|
78
|
+
LuCornerDownRight: $
|
|
76
79
|
};
|
|
77
80
|
export {
|
|
78
|
-
|
|
81
|
+
fo as iconMap
|
|
79
82
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={search:"IoSearch",thumbsUp:"LuThumbsUp",thumbsDown:"LuThumbsDown",messageCopy:"LuCopy",messageCopied:"LuCheck",messageRevise:"FiEdit",codeCopy:"LuCopy",codeCopied:"LuCheck",openLinkInNewTab:"LuArrowUpRight",openLinkInSameTab:"LuCornerDownLeft",breadcrumbSeparator:"FaChevronRight",switchToSearch:"IoSearch",switchToChat:"LuSparkles",chatSubmit:"IoSend",close:"IoCloseOutline",info:"IoInformationCircleOutline",command:"LuCommand"};exports.defaultBuiltInIcons=e;
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={search:"IoSearch",thumbsUp:"LuThumbsUp",thumbsDown:"LuThumbsDown",messageCopy:"LuCopy",messageCopied:"LuCheck",messageRevise:"FiEdit",codeCopy:"LuCopy",codeCopied:"LuCheck",openLinkInNewTab:"LuArrowUpRight",openLinkInSameTab:"LuCornerDownLeft",newLine:"LuCornerDownRight",breadcrumbSeparator:"FaChevronRight",switchToSearch:"IoSearch",switchToChat:"LuSparkles",chatSubmit:"IoSend",close:"IoCloseOutline",info:"IoInformationCircleOutline",command:"LuCommand"};exports.defaultBuiltInIcons=e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../../components/factory.cjs"),d=require("../link.cjs"),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../../components/factory.cjs"),d=require("../link.cjs"),n=o.ikp("h1",{_id:"markdownH1"}),k=o.ikp("h2",{_id:"markdownH2"}),i=o.ikp("p",{_id:"markdownP"}),e=o.ikp("li",{_id:"markdownLi"}),r=o.ikp("ul",{_id:"markdownUl"}),a=o.ikp("ol",{_id:"markdownOl"}),c=o.ikp(d.LinkWithQueryParams,{_id:"markdownLink"}),t=o.ikp("sup",{_id:"markdownSourceLink"}),l=o.ikp("table",{_id:"markdownTable"}),w=o.ikp("th",{_id:"markdownTh"}),p=o.ikp("td",{_id:"markdownTd"}),b=o.ikp("code",{_id:"markdownCode"}),s=o.ikp("div",{_id:"codeblockContainer"}),M=o.ikp("div",{_id:"codeblockHeader"}),C=o.ikp("span",{_id:"codeblockHeaderLanguage"}),u=o.ikp("button",{_id:"codeblockCopyButton",type:"button"}),g=o.ikp("div",{_id:"codeblockHighlighterWrapper"}),_=o.ikp("div",{_id:"codeblockHighlighter"}),h=o.ikp("code",{_id:"codeblockCode"}),H=o.ikp("input",{_id:"markdownInput"});exports.CodeblockCode=h;exports.CodeblockContainer=s;exports.CodeblockCopyButton=u;exports.CodeblockHeader=M;exports.CodeblockHeaderLanguage=C;exports.CodeblockHighlighter=_;exports.CodeblockHighlighterWrapper=g;exports.MarkdownCode=b;exports.MarkdownH1=n;exports.MarkdownH2=k;exports.MarkdownInput=H;exports.MarkdownLi=e;exports.MarkdownLink=c;exports.MarkdownOl=a;exports.MarkdownP=i;exports.MarkdownSourceLink=t;exports.MarkdownTable=l;exports.MarkdownTd=p;exports.MarkdownTh=w;exports.MarkdownUl=r;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { ikp as o } from "../../components/factory.js";
|
|
3
3
|
import { LinkWithQueryParams as d } from "../link.js";
|
|
4
|
-
const
|
|
4
|
+
const e = o("h1", {
|
|
5
5
|
_id: "markdownH1"
|
|
6
6
|
}), i = o("h2", {
|
|
7
7
|
_id: "markdownH2"
|
|
@@ -9,9 +9,9 @@ const r = o("h1", {
|
|
|
9
9
|
_id: "markdownP"
|
|
10
10
|
}), k = o("li", {
|
|
11
11
|
_id: "markdownLi"
|
|
12
|
-
}),
|
|
12
|
+
}), t = o("ul", {
|
|
13
13
|
_id: "markdownUl"
|
|
14
|
-
}),
|
|
14
|
+
}), a = o("ol", {
|
|
15
15
|
_id: "markdownOl"
|
|
16
16
|
}), l = o(d, {
|
|
17
17
|
_id: "markdownLink"
|
|
@@ -19,46 +19,49 @@ const r = o("h1", {
|
|
|
19
19
|
_id: "markdownSourceLink"
|
|
20
20
|
}), s = o("table", {
|
|
21
21
|
_id: "markdownTable"
|
|
22
|
-
}),
|
|
22
|
+
}), _ = o("th", {
|
|
23
23
|
_id: "markdownTh"
|
|
24
|
-
}),
|
|
24
|
+
}), b = o("td", {
|
|
25
25
|
_id: "markdownTd"
|
|
26
26
|
}), m = o("code", {
|
|
27
27
|
_id: "markdownCode"
|
|
28
|
-
}),
|
|
28
|
+
}), p = o("div", {
|
|
29
29
|
_id: "codeblockContainer"
|
|
30
|
-
}),
|
|
30
|
+
}), u = o("div", {
|
|
31
31
|
_id: "codeblockHeader"
|
|
32
|
-
}),
|
|
32
|
+
}), C = o("span", {
|
|
33
33
|
_id: "codeblockHeaderLanguage"
|
|
34
|
-
}),
|
|
34
|
+
}), h = o("button", {
|
|
35
35
|
_id: "codeblockCopyButton",
|
|
36
36
|
type: "button"
|
|
37
|
-
}),
|
|
37
|
+
}), M = o("div", {
|
|
38
38
|
_id: "codeblockHighlighterWrapper"
|
|
39
|
-
}),
|
|
39
|
+
}), g = o("div", {
|
|
40
40
|
_id: "codeblockHighlighter"
|
|
41
|
-
}),
|
|
41
|
+
}), H = o("code", {
|
|
42
42
|
_id: "codeblockCode"
|
|
43
|
+
}), L = o("input", {
|
|
44
|
+
_id: "markdownInput"
|
|
43
45
|
});
|
|
44
46
|
export {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
47
|
+
H as CodeblockCode,
|
|
48
|
+
p as CodeblockContainer,
|
|
49
|
+
h as CodeblockCopyButton,
|
|
50
|
+
u as CodeblockHeader,
|
|
51
|
+
C as CodeblockHeaderLanguage,
|
|
52
|
+
g as CodeblockHighlighter,
|
|
53
|
+
M as CodeblockHighlighterWrapper,
|
|
52
54
|
m as MarkdownCode,
|
|
53
|
-
|
|
55
|
+
e as MarkdownH1,
|
|
54
56
|
i as MarkdownH2,
|
|
57
|
+
L as MarkdownInput,
|
|
55
58
|
k as MarkdownLi,
|
|
56
59
|
l as MarkdownLink,
|
|
57
|
-
|
|
60
|
+
a as MarkdownOl,
|
|
58
61
|
c as MarkdownP,
|
|
59
62
|
w as MarkdownSourceLink,
|
|
60
63
|
s as MarkdownTable,
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
+
b as MarkdownTd,
|
|
65
|
+
_ as MarkdownTh,
|
|
66
|
+
t as MarkdownUl
|
|
64
67
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),j=require("react"),x=require("react-markdown"),M=require("rehype-raw"),y=require("remark-gfm"),g=require("../../providers/markdown-provider.cjs"),f=require("../codeblock/index.cjs"),n=require("./components.cjs"),b=require("./rehype-inline-code-property.cjs");const q=({children:d,componentStyles:a,shouldOpenLinksInNewTab:h,onLinkClick:u,onCodeCopy:k,...p})=>{if(!d)return null;const m={h1:({children:r})=>e.jsx(n.MarkdownH1,{children:r}),h2:({children:r})=>e.jsx(n.MarkdownH2,{children:r}),p:({children:r})=>e.jsx(n.MarkdownP,{children:r}),li:({children:r})=>e.jsx(n.MarkdownLi,{children:r}),ul:({children:r})=>e.jsx(n.MarkdownUl,{children:r}),input:({type:r,checked:t,disabled:o,readOnly:i,required:c,value:s})=>e.jsx(n.MarkdownInput,{type:r,checked:t,disabled:o,readOnly:i,required:c,value:s}),ol:({children:r,node:t})=>{const o=t?.properties?.start,i=typeof o=="number"?o:void 0;return e.jsx(n.MarkdownOl,{style:{"--start":o?.toString()??"0"},start:i,children:r})},a:({children:r,href:t})=>{const o=j.Children.toArray(r),i=o[0],c=typeof i=="string"&&/^\(\d+\)$/.test(i)&&o.length===1,s=c?i.match(/\d+/):r,l=e.jsx(n.MarkdownLink,{isExternal:h,href:t,onClick:()=>{u?.(t,s?.toString())},children:s});return c?e.jsx(n.MarkdownSourceLink,{children:l}):l},img:({src:r,alt:t})=>``,table:({children:r})=>e.jsx(n.MarkdownTable,{children:r}),th:({children:r,isHeader:t})=>t?e.jsx(n.MarkdownTh,{children:r}):e.jsx(n.MarkdownTd,{children:r}),pre:({children:r})=>e.jsx("pre",{children:r}),code:({children:r,inline:t,className:o})=>t?e.jsx(n.MarkdownCode,{children:r}):e.jsx(f.CodeBlock,{className:o,onCopy:k,children:r})},w=e.jsx(x,{remarkPlugins:[y],rehypePlugins:[M,b.rehypeInlineCodeProperty],components:m,disallowedElements:C,children:d.toString(),...p});return e.jsx(g.ChatMarkdownProvider,{componentStyles:a,children:w})},C=["script","iframe","frame","embed","meta","base","form","style","object"];exports.Markdown=q;
|
|
@@ -1,30 +1,42 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import f from "react";
|
|
3
|
+
import w from "react-markdown";
|
|
4
4
|
import M from "rehype-raw";
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
import y from "remark-gfm";
|
|
6
|
+
import { ChatMarkdownProvider as g } from "../../providers/markdown-provider.js";
|
|
7
|
+
import { CodeBlock as C } from "../codeblock/index.js";
|
|
8
|
+
import { MarkdownCode as b, MarkdownTh as P, MarkdownTd as S, MarkdownTable as x, MarkdownSourceLink as L, MarkdownOl as R, MarkdownInput as T, MarkdownUl as $, MarkdownLi as j, MarkdownP as v, MarkdownH2 as A, MarkdownH1 as E, MarkdownLink as H } from "./components.js";
|
|
9
|
+
import { rehypeInlineCodeProperty as I } from "./rehype-inline-code-property.js";
|
|
10
|
+
const J = ({
|
|
11
|
+
children: l,
|
|
11
12
|
componentStyles: a,
|
|
12
13
|
shouldOpenLinksInNewTab: h,
|
|
13
|
-
onLinkClick:
|
|
14
|
-
onCodeCopy:
|
|
14
|
+
onLinkClick: m,
|
|
15
|
+
onCodeCopy: s,
|
|
15
16
|
...p
|
|
16
17
|
}) => {
|
|
17
|
-
if (!
|
|
18
|
+
if (!l) return null;
|
|
18
19
|
const k = {
|
|
19
|
-
h1: ({ children: r }) => /* @__PURE__ */
|
|
20
|
-
h2: ({ children: r }) => /* @__PURE__ */
|
|
21
|
-
p: ({ children: r }) => /* @__PURE__ */
|
|
22
|
-
li: ({ children: r }) => /* @__PURE__ */
|
|
23
|
-
ul: ({ children: r }) => /* @__PURE__ */
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
20
|
+
h1: ({ children: r }) => /* @__PURE__ */ n(E, { children: r }),
|
|
21
|
+
h2: ({ children: r }) => /* @__PURE__ */ n(A, { children: r }),
|
|
22
|
+
p: ({ children: r }) => /* @__PURE__ */ n(v, { children: r }),
|
|
23
|
+
li: ({ children: r }) => /* @__PURE__ */ n(j, { children: r }),
|
|
24
|
+
ul: ({ children: r }) => /* @__PURE__ */ n($, { children: r }),
|
|
25
|
+
input: ({ type: r, checked: e, disabled: o, readOnly: t, required: i, value: d }) => /* @__PURE__ */ n(
|
|
26
|
+
T,
|
|
27
|
+
{
|
|
28
|
+
type: r,
|
|
29
|
+
checked: e,
|
|
30
|
+
disabled: o,
|
|
31
|
+
readOnly: t,
|
|
32
|
+
required: i,
|
|
33
|
+
value: d
|
|
34
|
+
}
|
|
35
|
+
),
|
|
36
|
+
ol: ({ children: r, node: e }) => {
|
|
37
|
+
const o = e?.properties?.start, t = typeof o == "number" ? o : void 0;
|
|
38
|
+
return /* @__PURE__ */ n(
|
|
39
|
+
R,
|
|
28
40
|
{
|
|
29
41
|
style: {
|
|
30
42
|
"--start": o?.toString() ?? "0"
|
|
@@ -34,37 +46,38 @@ const D = ({
|
|
|
34
46
|
}
|
|
35
47
|
);
|
|
36
48
|
},
|
|
37
|
-
a: ({ children: r, href:
|
|
38
|
-
const o =
|
|
39
|
-
|
|
49
|
+
a: ({ children: r, href: e }) => {
|
|
50
|
+
const o = f.Children.toArray(r), t = o[0], i = typeof t == "string" && /^\(\d+\)$/.test(t) && o.length === 1, d = i ? t.match(/\d+/) : r, c = /* @__PURE__ */ n(
|
|
51
|
+
H,
|
|
40
52
|
{
|
|
41
53
|
isExternal: h,
|
|
42
|
-
href:
|
|
54
|
+
href: e,
|
|
43
55
|
onClick: () => {
|
|
44
|
-
|
|
56
|
+
m?.(e, d?.toString());
|
|
45
57
|
},
|
|
46
|
-
children:
|
|
58
|
+
children: d
|
|
47
59
|
}
|
|
48
60
|
);
|
|
49
|
-
return
|
|
61
|
+
return i ? /* @__PURE__ */ n(L, { children: c }) : c;
|
|
50
62
|
},
|
|
51
|
-
img: ({ src: r, alt:
|
|
52
|
-
table: ({ children: r }) => /* @__PURE__ */
|
|
53
|
-
th: ({ children: r, isHeader:
|
|
54
|
-
pre: ({ children: r }) => /* @__PURE__ */
|
|
55
|
-
code: ({ children: r, inline:
|
|
56
|
-
}, u = /* @__PURE__ */
|
|
57
|
-
|
|
63
|
+
img: ({ src: r, alt: e }) => ``,
|
|
64
|
+
table: ({ children: r }) => /* @__PURE__ */ n(x, { children: r }),
|
|
65
|
+
th: ({ children: r, isHeader: e }) => e ? /* @__PURE__ */ n(P, { children: r }) : /* @__PURE__ */ n(S, { children: r }),
|
|
66
|
+
pre: ({ children: r }) => /* @__PURE__ */ n("pre", { children: r }),
|
|
67
|
+
code: ({ children: r, inline: e, className: o }) => e ? /* @__PURE__ */ n(b, { children: r }) : /* @__PURE__ */ n(C, { className: o, onCopy: s, children: r })
|
|
68
|
+
}, u = /* @__PURE__ */ n(
|
|
69
|
+
w,
|
|
58
70
|
{
|
|
59
|
-
|
|
71
|
+
remarkPlugins: [y],
|
|
72
|
+
rehypePlugins: [M, I],
|
|
60
73
|
components: k,
|
|
61
|
-
disallowedElements:
|
|
62
|
-
children:
|
|
74
|
+
disallowedElements: _,
|
|
75
|
+
children: l.toString(),
|
|
63
76
|
...p
|
|
64
77
|
}
|
|
65
78
|
);
|
|
66
|
-
return /* @__PURE__ */
|
|
67
|
-
},
|
|
79
|
+
return /* @__PURE__ */ n(g, { componentStyles: a, children: u });
|
|
80
|
+
}, _ = [
|
|
68
81
|
"script",
|
|
69
82
|
"iframe",
|
|
70
83
|
"frame",
|
|
@@ -76,5 +89,5 @@ const D = ({
|
|
|
76
89
|
"object"
|
|
77
90
|
];
|
|
78
91
|
export {
|
|
79
|
-
|
|
92
|
+
J as Markdown
|
|
80
93
|
};
|
|
@@ -18,12 +18,19 @@ const n = `query GetSearchResults($searchInput: SearchInput!) {
|
|
|
18
18
|
... on DocumentationRecord {
|
|
19
19
|
pathBreadcrumbs
|
|
20
20
|
contentType
|
|
21
|
+
topLevelHeadings {
|
|
22
|
+
anchor
|
|
23
|
+
url
|
|
24
|
+
content
|
|
25
|
+
}
|
|
21
26
|
}
|
|
22
27
|
}
|
|
23
28
|
pathHeadings {
|
|
29
|
+
anchor
|
|
24
30
|
content
|
|
25
31
|
}
|
|
26
32
|
content {
|
|
33
|
+
anchor
|
|
27
34
|
content
|
|
28
35
|
}
|
|
29
36
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),te=require("../../providers/config-provider.cjs"),se=require("../../hooks/use-media-query.cjs"),re=require("./search-query.graphql.cjs"),ne=require("./transform-results.cjs"),ce=require("../../providers/search-events-provider.cjs"),ae=require("../../hooks/use-instant-update.cjs"),ue=require("../../utils/graphql-client.cjs"),oe=()=>{const{baseSettings:B,searchSettings:H}=te.useInkeepConfig(),{apiKey:T,aiApiBaseUrl:$,userAuthToken:i,filters:Q}=B,{maxResults:w,placeholder:q,defaultQuery:z,debounceTimeMs:C,onQueryChange:D,searchFunctionsRef:K,tabs:h,filters:k}=H,{logEvent:v}=ce.useSearchEvents(),[n,E]=t.useState(z),M=t.useRef(null),[I,f]=t.useState(!1),[W,d]=t.useState(null),[G,u]=t.useState("NONE"),J=t.useCallback(e=>{u(e)},[]),[y,b]=t.useState([]),s=ne.useTransformResults(y,n),A=typeof h?.[0]=="string"?h[0]:h[0][0],[m,P]=t.useState(A),{disableTransition:U,disabled:V}=ae.useInstantUpdate(),X=t.useCallback(e=>{U(),P(e);const r=s[e][0].id;u(r)},[s,U]);t.useEffect(()=>{let e=m in s?m:Object.keys(s)[0];if(!s[e]?.length){const a=Object.keys(s).find(l=>s[l]?.length);a?e=a:e=A}if(!e)return;P(e);const r=s[e]?.[0];r&&u(r.id)},[s]);const g=se.useMediaQuery("(max-width: 768px)"),o=t.useRef({}),S=t.useRef(null),p=t.useRef(null);t.useImperativeHandle(K,()=>({updateQuery(e){E(e)},focusInput:()=>{M.current?.focus()}}));const _=`${$}/graphql`,j=t.useMemo(()=>({Authorization:`Bearer ${T}`,"Content-Type":"application/json",...i?{"User-Token":i}:{}}),[T,i]),F=t.useCallback(async e=>{const r=new AbortController;S.current=r;try{d(null);const l=(await ue.graphqlRequest(_,re.default,{searchInput:e},j,r.signal))?.search.searchHits;o.current[e.searchQuery]=l,b(l)}catch(a){if(a.name==="AbortError")return;d("Failed to fetch search results. Please try again.")}finally{f(!1)}},[_,j]),L=t.useCallback(e=>{const r=o.current[e.searchQuery];v({eventName:"search_query_response_received",properties:{searchQuery:e.searchQuery,totalResults:r?.length}})},[]),N=()=>{S.current&&(S.current.abort(),f(!1))},O=t.useCallback(e=>{if(p.current&&window.clearTimeout(p.current),!e.searchQuery){N(),b([]),d(null);return}p.current=window.setTimeout(()=>{N(),v({eventName:"search_query_submitted",properties:{searchQuery:e.searchQuery}}),o.current[e.searchQuery]?(b(o.current[e.searchQuery]),L(e)):(f(!0),F(e).then(()=>{L(e)}))},C)},[C,F]),R=t.useMemo(()=>({searchQuery:n,filters:{...Q,...k,limit:w}}),[n,w,Q,k]);t.useEffect(()=>{D?.(R.searchQuery),O(R)},[O,R]);const c=t.useRef(null),[Y,x]=t.useState(!1);t.useEffect(()=>(c.current!==null&&window.clearTimeout(c.current),n?c.current=window.setTimeout(()=>{x(!0)},400):x(!1),()=>{c.current!==null&&window.clearTimeout(c.current)}),[n]);const Z=t.useCallback(e=>E(e.target.value),[]),ee=t.useMemo(()=>q||(g?"Search...":"Search for anything..."),[q,g]);return{results:s,resultsList:y,hasContent:Y&&(y.length>0||I),loading:I,error:W,query:n,onInput:Z,placeholder:ee,tab:m,onTabChange:X,selectedItem:G,setSelectedItem:u,onSelectedItemChange:J,transitionsDisabled:V,inputRef:M,isMobile:g}};exports.useInkeepSearch=oe;
|