@inkeep/cxkit-primitives 0.0.0-dev-20250221234142

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.
Files changed (477) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1 -0
  3. package/dist/atoms/api/analytics/conversation.cjs +1 -0
  4. package/dist/atoms/api/analytics/conversation.d.cts +3 -0
  5. package/dist/atoms/api/analytics/conversation.d.ts +3 -0
  6. package/dist/atoms/api/analytics/conversation.js +37 -0
  7. package/dist/atoms/api/analytics/events.cjs +1 -0
  8. package/dist/atoms/api/analytics/events.d.cts +2 -0
  9. package/dist/atoms/api/analytics/events.d.ts +2 -0
  10. package/dist/atoms/api/analytics/events.js +30 -0
  11. package/dist/atoms/api/analytics/feedback.cjs +1 -0
  12. package/dist/atoms/api/analytics/feedback.d.cts +11 -0
  13. package/dist/atoms/api/analytics/feedback.d.ts +11 -0
  14. package/dist/atoms/api/analytics/feedback.js +26 -0
  15. package/dist/atoms/avatars/ai.cjs +1 -0
  16. package/dist/atoms/avatars/ai.d.cts +3 -0
  17. package/dist/atoms/avatars/ai.d.ts +3 -0
  18. package/dist/atoms/avatars/ai.js +88 -0
  19. package/dist/atoms/avatars/user.cjs +1 -0
  20. package/dist/atoms/avatars/user.d.cts +3 -0
  21. package/dist/atoms/avatars/user.d.ts +3 -0
  22. package/dist/atoms/avatars/user.js +27 -0
  23. package/dist/atoms/codeblock/index.cjs +1 -0
  24. package/dist/atoms/codeblock/index.d.cts +10 -0
  25. package/dist/atoms/codeblock/index.d.ts +10 -0
  26. package/dist/atoms/codeblock/index.js +40 -0
  27. package/dist/atoms/custom-styles.cjs +1 -0
  28. package/dist/atoms/custom-styles.d.cts +5 -0
  29. package/dist/atoms/custom-styles.d.ts +5 -0
  30. package/dist/atoms/custom-styles.js +57 -0
  31. package/dist/atoms/dialog.cjs +1 -0
  32. package/dist/atoms/dialog.d.cts +68 -0
  33. package/dist/atoms/dialog.d.ts +68 -0
  34. package/dist/atoms/dialog.js +185 -0
  35. package/dist/atoms/icons/built-in-icon-renderer.cjs +1 -0
  36. package/dist/atoms/icons/built-in-icon-renderer.d.cts +6 -0
  37. package/dist/atoms/icons/built-in-icon-renderer.d.ts +6 -0
  38. package/dist/atoms/icons/built-in-icon-renderer.js +49 -0
  39. package/dist/atoms/icons/built-in-icons.cjs +1 -0
  40. package/dist/atoms/icons/built-in-icons.d.cts +72 -0
  41. package/dist/atoms/icons/built-in-icons.d.ts +72 -0
  42. package/dist/atoms/icons/built-in-icons.js +79 -0
  43. package/dist/atoms/icons/checkbox-icon.cjs +1 -0
  44. package/dist/atoms/icons/checkbox-icon.d.cts +1 -0
  45. package/dist/atoms/icons/checkbox-icon.d.ts +1 -0
  46. package/dist/atoms/icons/checkbox-icon.js +24 -0
  47. package/dist/atoms/icons/custom-icon.cjs +1 -0
  48. package/dist/atoms/icons/custom-icon.d.cts +6 -0
  49. package/dist/atoms/icons/custom-icon.d.ts +6 -0
  50. package/dist/atoms/icons/custom-icon.js +19 -0
  51. package/dist/atoms/icons/index.cjs +1 -0
  52. package/dist/atoms/icons/index.d.cts +2 -0
  53. package/dist/atoms/icons/index.d.ts +2 -0
  54. package/dist/atoms/icons/index.js +6 -0
  55. package/dist/atoms/icons/inkeep-default-icons.cjs +1 -0
  56. package/dist/atoms/icons/inkeep-default-icons.d.cts +2 -0
  57. package/dist/atoms/icons/inkeep-default-icons.d.ts +2 -0
  58. package/dist/atoms/icons/inkeep-default-icons.js +23 -0
  59. package/dist/atoms/link.cjs +1 -0
  60. package/dist/atoms/link.d.cts +14 -0
  61. package/dist/atoms/link.d.ts +14 -0
  62. package/dist/atoms/link.js +35 -0
  63. package/dist/atoms/markdown/components.cjs +1 -0
  64. package/dist/atoms/markdown/components.d.cts +27 -0
  65. package/dist/atoms/markdown/components.d.ts +27 -0
  66. package/dist/atoms/markdown/components.js +64 -0
  67. package/dist/atoms/markdown/index.cjs +1 -0
  68. package/dist/atoms/markdown/index.d.cts +15 -0
  69. package/dist/atoms/markdown/index.d.ts +15 -0
  70. package/dist/atoms/markdown/index.js +79 -0
  71. package/dist/atoms/markdown/rehype-inline-code-property.cjs +1 -0
  72. package/dist/atoms/markdown/rehype-inline-code-property.d.cts +1 -0
  73. package/dist/atoms/markdown/rehype-inline-code-property.d.ts +1 -0
  74. package/dist/atoms/markdown/rehype-inline-code-property.js +12 -0
  75. package/dist/atoms/portal-with-theme.cjs +1 -0
  76. package/dist/atoms/portal-with-theme.d.cts +2 -0
  77. package/dist/atoms/portal-with-theme.d.ts +2 -0
  78. package/dist/atoms/portal-with-theme.js +12 -0
  79. package/dist/atoms/portal.cjs +1 -0
  80. package/dist/atoms/portal.d.cts +8 -0
  81. package/dist/atoms/portal.d.ts +8 -0
  82. package/dist/atoms/portal.js +19 -0
  83. package/dist/atoms/shadow/context.cjs +2 -0
  84. package/dist/atoms/shadow/context.d.cts +14 -0
  85. package/dist/atoms/shadow/context.d.ts +14 -0
  86. package/dist/atoms/shadow/context.js +55 -0
  87. package/dist/atoms/shadow/create.cjs +1 -0
  88. package/dist/atoms/shadow/create.d.cts +8 -0
  89. package/dist/atoms/shadow/create.d.ts +8 -0
  90. package/dist/atoms/shadow/create.js +56 -0
  91. package/dist/atoms/shadow/index.d.cts +1 -0
  92. package/dist/atoms/shadow/index.d.ts +1 -0
  93. package/dist/atoms/shadow/root.cjs +1 -0
  94. package/dist/atoms/shadow/root.d.cts +5 -0
  95. package/dist/atoms/shadow/root.d.ts +5 -0
  96. package/dist/atoms/shadow/root.js +22 -0
  97. package/dist/atoms/shadow/use-ensured-forwarded-ref.cjs +1 -0
  98. package/dist/atoms/shadow/use-ensured-forwarded-ref.d.cts +2 -0
  99. package/dist/atoms/shadow/use-ensured-forwarded-ref.d.ts +2 -0
  100. package/dist/atoms/shadow/use-ensured-forwarded-ref.js +11 -0
  101. package/dist/atoms/shadow/utils.cjs +1 -0
  102. package/dist/atoms/shadow/utils.d.cts +9 -0
  103. package/dist/atoms/shadow/utils.d.ts +9 -0
  104. package/dist/atoms/shadow/utils.js +16 -0
  105. package/dist/components/chat-button.cjs +1 -0
  106. package/dist/components/chat-button.d.cts +11 -0
  107. package/dist/components/chat-button.d.ts +11 -0
  108. package/dist/components/chat-button.js +42 -0
  109. package/dist/components/embedded-chat/chat-provider.cjs +1 -0
  110. package/dist/components/embedded-chat/chat-provider.d.cts +19 -0
  111. package/dist/components/embedded-chat/chat-provider.d.ts +19 -0
  112. package/dist/components/embedded-chat/chat-provider.js +22 -0
  113. package/dist/components/embedded-chat/use-captcha.cjs +1 -0
  114. package/dist/components/embedded-chat/use-captcha.d.cts +13 -0
  115. package/dist/components/embedded-chat/use-captcha.d.ts +13 -0
  116. package/dist/components/embedded-chat/use-captcha.js +56 -0
  117. package/dist/components/embedded-chat/use-chat-action.cjs +1 -0
  118. package/dist/components/embedded-chat/use-chat-action.d.cts +9 -0
  119. package/dist/components/embedded-chat/use-chat-action.d.ts +9 -0
  120. package/dist/components/embedded-chat/use-chat-action.js +26 -0
  121. package/dist/components/embedded-chat/use-inkeep-chat.cjs +4 -0
  122. package/dist/components/embedded-chat/use-inkeep-chat.d.cts +25 -0
  123. package/dist/components/embedded-chat/use-inkeep-chat.d.ts +25 -0
  124. package/dist/components/embedded-chat/use-inkeep-chat.js +227 -0
  125. package/dist/components/embedded-chat.cjs +17 -0
  126. package/dist/components/embedded-chat.d.cts +415 -0
  127. package/dist/components/embedded-chat.d.ts +415 -0
  128. package/dist/components/embedded-chat.js +1840 -0
  129. package/dist/components/embedded-search/search-provider.cjs +1 -0
  130. package/dist/components/embedded-search/search-provider.d.cts +21 -0
  131. package/dist/components/embedded-search/search-provider.d.ts +21 -0
  132. package/dist/components/embedded-search/search-provider.js +19 -0
  133. package/dist/components/embedded-search/search-query.graphql.cjs +82 -0
  134. package/dist/components/embedded-search/search-query.graphql.js +86 -0
  135. package/dist/components/embedded-search/transform-results.cjs +1 -0
  136. package/dist/components/embedded-search/transform-results.d.cts +3 -0
  137. package/dist/components/embedded-search/transform-results.d.ts +3 -0
  138. package/dist/components/embedded-search/transform-results.js +113 -0
  139. package/dist/components/embedded-search/use-inkeep-search.cjs +1 -0
  140. package/dist/components/embedded-search/use-inkeep-search.d.cts +21 -0
  141. package/dist/components/embedded-search/use-inkeep-search.d.ts +21 -0
  142. package/dist/components/embedded-search/use-inkeep-search.js +137 -0
  143. package/dist/components/embedded-search.cjs +1 -0
  144. package/dist/components/embedded-search.d.cts +229 -0
  145. package/dist/components/embedded-search.d.ts +229 -0
  146. package/dist/components/embedded-search.js +390 -0
  147. package/dist/components/factory.cjs +1 -0
  148. package/dist/components/factory.d.cts +19 -0
  149. package/dist/components/factory.d.ts +19 -0
  150. package/dist/components/factory.js +39 -0
  151. package/dist/components/index.cjs +1 -0
  152. package/dist/components/index.d.cts +11 -0
  153. package/dist/components/index.d.ts +11 -0
  154. package/dist/components/index.js +31 -0
  155. package/dist/components/intelligent-form/actions/context-model-response.cjs +9 -0
  156. package/dist/components/intelligent-form/actions/context-model-response.d.cts +10 -0
  157. package/dist/components/intelligent-form/actions/context-model-response.d.ts +10 -0
  158. package/dist/components/intelligent-form/actions/context-model-response.js +36 -0
  159. package/dist/components/intelligent-form/actions/escalation-schema.cjs +1 -0
  160. package/dist/components/intelligent-form/actions/escalation-schema.d.cts +2 -0
  161. package/dist/components/intelligent-form/actions/escalation-schema.d.ts +2 -0
  162. package/dist/components/intelligent-form/actions/escalation-schema.js +48 -0
  163. package/dist/components/intelligent-form/actions/qa-model-messages.cjs +27 -0
  164. package/dist/components/intelligent-form/actions/qa-model-messages.d.cts +2 -0
  165. package/dist/components/intelligent-form/actions/qa-model-messages.d.ts +2 -0
  166. package/dist/components/intelligent-form/actions/qa-model-messages.js +45 -0
  167. package/dist/components/intelligent-form/actions/qa-model-response.cjs +1 -0
  168. package/dist/components/intelligent-form/actions/qa-model-response.d.cts +14 -0
  169. package/dist/components/intelligent-form/actions/qa-model-response.d.ts +14 -0
  170. package/dist/components/intelligent-form/actions/qa-model-response.js +46 -0
  171. package/dist/components/intelligent-form/intelligent-form-provider.cjs +1 -0
  172. package/dist/components/intelligent-form/intelligent-form-provider.d.cts +29 -0
  173. package/dist/components/intelligent-form/intelligent-form-provider.d.ts +29 -0
  174. package/dist/components/intelligent-form/intelligent-form-provider.js +23 -0
  175. package/dist/components/intelligent-form/use-inkeep-intelligent-form.cjs +1 -0
  176. package/dist/components/intelligent-form/use-inkeep-intelligent-form.d.cts +30 -0
  177. package/dist/components/intelligent-form/use-inkeep-intelligent-form.d.ts +30 -0
  178. package/dist/components/intelligent-form/use-inkeep-intelligent-form.js +157 -0
  179. package/dist/components/intelligent-form.cjs +1 -0
  180. package/dist/components/intelligent-form.d.cts +135 -0
  181. package/dist/components/intelligent-form.d.ts +135 -0
  182. package/dist/components/intelligent-form.js +568 -0
  183. package/dist/components/modal/modal-provider.cjs +1 -0
  184. package/dist/components/modal/modal-provider.d.cts +13 -0
  185. package/dist/components/modal/modal-provider.d.ts +13 -0
  186. package/dist/components/modal/modal-provider.js +8 -0
  187. package/dist/components/modal/use-inkeep-modal.cjs +1 -0
  188. package/dist/components/modal/use-inkeep-modal.d.cts +8 -0
  189. package/dist/components/modal/use-inkeep-modal.d.ts +8 -0
  190. package/dist/components/modal/use-inkeep-modal.js +30 -0
  191. package/dist/components/modal.cjs +1 -0
  192. package/dist/components/modal.d.cts +18 -0
  193. package/dist/components/modal.d.ts +18 -0
  194. package/dist/components/modal.js +40 -0
  195. package/dist/components/searchbar.cjs +1 -0
  196. package/dist/components/searchbar.d.cts +23 -0
  197. package/dist/components/searchbar.d.ts +23 -0
  198. package/dist/components/searchbar.js +54 -0
  199. package/dist/components/tagline-logo-icon.cjs +1 -0
  200. package/dist/components/tagline-logo-icon.d.cts +1 -0
  201. package/dist/components/tagline-logo-icon.d.ts +1 -0
  202. package/dist/components/tagline-logo-icon.js +34 -0
  203. package/dist/hooks/index.cjs +1 -0
  204. package/dist/hooks/index.d.cts +12 -0
  205. package/dist/hooks/index.d.ts +12 -0
  206. package/dist/hooks/index.js +27 -0
  207. package/dist/hooks/use-boolean.cjs +1 -0
  208. package/dist/hooks/use-boolean.d.cts +10 -0
  209. package/dist/hooks/use-boolean.d.ts +10 -0
  210. package/dist/hooks/use-boolean.js +17 -0
  211. package/dist/hooks/use-browser-storage.cjs +1 -0
  212. package/dist/hooks/use-browser-storage.d.cts +17 -0
  213. package/dist/hooks/use-browser-storage.d.ts +17 -0
  214. package/dist/hooks/use-browser-storage.js +88 -0
  215. package/dist/hooks/use-component-classnames.cjs +1 -0
  216. package/dist/hooks/use-component-classnames.d.cts +6 -0
  217. package/dist/hooks/use-component-classnames.d.ts +6 -0
  218. package/dist/hooks/use-component-classnames.js +14 -0
  219. package/dist/hooks/use-container-size.cjs +1 -0
  220. package/dist/hooks/use-container-size.d.cts +5 -0
  221. package/dist/hooks/use-container-size.d.ts +5 -0
  222. package/dist/hooks/use-container-size.js +18 -0
  223. package/dist/hooks/use-copy-to-clipboard.cjs +1 -0
  224. package/dist/hooks/use-copy-to-clipboard.d.cts +3 -0
  225. package/dist/hooks/use-copy-to-clipboard.d.ts +3 -0
  226. package/dist/hooks/use-copy-to-clipboard.js +19 -0
  227. package/dist/hooks/use-instant-update.cjs +1 -0
  228. package/dist/hooks/use-instant-update.d.cts +17 -0
  229. package/dist/hooks/use-instant-update.d.ts +17 -0
  230. package/dist/hooks/use-instant-update.js +16 -0
  231. package/dist/hooks/use-is-mounted.cjs +1 -0
  232. package/dist/hooks/use-is-mounted.d.cts +1 -0
  233. package/dist/hooks/use-is-mounted.d.ts +1 -0
  234. package/dist/hooks/use-is-mounted.js +11 -0
  235. package/dist/hooks/use-media-query.cjs +1 -0
  236. package/dist/hooks/use-media-query.d.cts +1 -0
  237. package/dist/hooks/use-media-query.d.ts +1 -0
  238. package/dist/hooks/use-media-query.js +14 -0
  239. package/dist/hooks/use-resize-observer.cjs +1 -0
  240. package/dist/hooks/use-resize-observer.d.cts +12 -0
  241. package/dist/hooks/use-resize-observer.d.ts +12 -0
  242. package/dist/hooks/use-resize-observer.js +32 -0
  243. package/dist/hooks/use-scroll-to-bottom.cjs +1 -0
  244. package/dist/hooks/use-scroll-to-bottom.d.cts +13 -0
  245. package/dist/hooks/use-scroll-to-bottom.d.ts +13 -0
  246. package/dist/hooks/use-scroll-to-bottom.js +52 -0
  247. package/dist/hooks/use-scrolling-fades.cjs +1 -0
  248. package/dist/hooks/use-scrolling-fades.d.cts +2 -0
  249. package/dist/hooks/use-scrolling-fades.d.ts +2 -0
  250. package/dist/hooks/use-scrolling-fades.js +18 -0
  251. package/dist/hooks/use-settle-action.cjs +1 -0
  252. package/dist/hooks/use-settle-action.d.cts +3 -0
  253. package/dist/hooks/use-settle-action.d.ts +3 -0
  254. package/dist/hooks/use-settle-action.js +11 -0
  255. package/dist/index.cjs +1 -0
  256. package/dist/index.d.cts +11 -0
  257. package/dist/index.d.ts +11 -0
  258. package/dist/index.js +152 -0
  259. package/dist/node_modules/.pnpm/react-icons@5.4.0_react@19.0.0/node_modules/react-icons/fa6/index.cjs +1 -0
  260. package/dist/node_modules/.pnpm/react-icons@5.4.0_react@19.0.0/node_modules/react-icons/fa6/index.js +92 -0
  261. package/dist/node_modules/.pnpm/react-icons@5.4.0_react@19.0.0/node_modules/react-icons/fi/index.cjs +1 -0
  262. package/dist/node_modules/.pnpm/react-icons@5.4.0_react@19.0.0/node_modules/react-icons/fi/index.js +8 -0
  263. package/dist/node_modules/.pnpm/react-icons@5.4.0_react@19.0.0/node_modules/react-icons/hi2/index.cjs +1 -0
  264. package/dist/node_modules/.pnpm/react-icons@5.4.0_react@19.0.0/node_modules/react-icons/hi2/index.js +8 -0
  265. package/dist/node_modules/.pnpm/react-icons@5.4.0_react@19.0.0/node_modules/react-icons/io5/index.cjs +1 -0
  266. package/dist/node_modules/.pnpm/react-icons@5.4.0_react@19.0.0/node_modules/react-icons/io5/index.js +128 -0
  267. package/dist/node_modules/.pnpm/react-icons@5.4.0_react@19.0.0/node_modules/react-icons/lib/iconBase.cjs +1 -0
  268. package/dist/node_modules/.pnpm/react-icons@5.4.0_react@19.0.0/node_modules/react-icons/lib/iconBase.js +109 -0
  269. package/dist/node_modules/.pnpm/react-icons@5.4.0_react@19.0.0/node_modules/react-icons/lib/iconContext.cjs +1 -0
  270. package/dist/node_modules/.pnpm/react-icons@5.4.0_react@19.0.0/node_modules/react-icons/lib/iconContext.js +13 -0
  271. package/dist/node_modules/.pnpm/react-icons@5.4.0_react@19.0.0/node_modules/react-icons/lu/index.cjs +1 -0
  272. package/dist/node_modules/.pnpm/react-icons@5.4.0_react@19.0.0/node_modules/react-icons/lu/index.js +68 -0
  273. package/dist/providers/attachment-item-provider.cjs +1 -0
  274. package/dist/providers/attachment-item-provider.d.cts +9 -0
  275. package/dist/providers/attachment-item-provider.d.ts +9 -0
  276. package/dist/providers/attachment-item-provider.js +13 -0
  277. package/dist/providers/attachments-bar-provider.cjs +1 -0
  278. package/dist/providers/attachments-bar-provider.d.cts +30 -0
  279. package/dist/providers/attachments-bar-provider.d.ts +30 -0
  280. package/dist/providers/attachments-bar-provider.js +64 -0
  281. package/dist/providers/base-events-provider.cjs +1 -0
  282. package/dist/providers/base-events-provider.d.cts +8 -0
  283. package/dist/providers/base-events-provider.d.ts +8 -0
  284. package/dist/providers/base-events-provider.js +39 -0
  285. package/dist/providers/chat-events-provider.cjs +1 -0
  286. package/dist/providers/chat-events-provider.d.cts +12 -0
  287. package/dist/providers/chat-events-provider.d.ts +12 -0
  288. package/dist/providers/chat-events-provider.js +66 -0
  289. package/dist/providers/chat-form-provider.cjs +1 -0
  290. package/dist/providers/chat-form-provider.d.cts +23 -0
  291. package/dist/providers/chat-form-provider.d.ts +23 -0
  292. package/dist/providers/chat-form-provider.js +66 -0
  293. package/dist/providers/config-provider.cjs +1 -0
  294. package/dist/providers/config-provider.d.cts +24 -0
  295. package/dist/providers/config-provider.d.ts +24 -0
  296. package/dist/providers/config-provider.js +37 -0
  297. package/dist/providers/conversation-provider.cjs +1 -0
  298. package/dist/providers/conversation-provider.d.cts +12 -0
  299. package/dist/providers/conversation-provider.d.ts +12 -0
  300. package/dist/providers/conversation-provider.js +49 -0
  301. package/dist/providers/feedback-item-provider.cjs +1 -0
  302. package/dist/providers/feedback-item-provider.d.cts +10 -0
  303. package/dist/providers/feedback-item-provider.d.ts +10 -0
  304. package/dist/providers/feedback-item-provider.js +16 -0
  305. package/dist/providers/feedback-provider.cjs +1 -0
  306. package/dist/providers/feedback-provider.d.cts +19 -0
  307. package/dist/providers/feedback-provider.d.ts +19 -0
  308. package/dist/providers/feedback-provider.js +82 -0
  309. package/dist/providers/form-field-provider.cjs +1 -0
  310. package/dist/providers/form-field-provider.d.cts +15 -0
  311. package/dist/providers/form-field-provider.d.ts +15 -0
  312. package/dist/providers/form-field-provider.js +17 -0
  313. package/dist/providers/help-menu-provider.cjs +1 -0
  314. package/dist/providers/help-menu-provider.d.cts +11 -0
  315. package/dist/providers/help-menu-provider.d.ts +11 -0
  316. package/dist/providers/help-menu-provider.js +19 -0
  317. package/dist/providers/index.cjs +1 -0
  318. package/dist/providers/index.d.cts +19 -0
  319. package/dist/providers/index.d.ts +19 -0
  320. package/dist/providers/index.js +63 -0
  321. package/dist/providers/intelligent-form-field-provider.cjs +1 -0
  322. package/dist/providers/intelligent-form-field-provider.d.cts +15 -0
  323. package/dist/providers/intelligent-form-field-provider.d.ts +15 -0
  324. package/dist/providers/intelligent-form-field-provider.js +19 -0
  325. package/dist/providers/markdown-provider.cjs +1 -0
  326. package/dist/providers/markdown-provider.d.cts +9 -0
  327. package/dist/providers/markdown-provider.d.ts +9 -0
  328. package/dist/providers/markdown-provider.js +8 -0
  329. package/dist/providers/message-attachments-provider.cjs +1 -0
  330. package/dist/providers/message-attachments-provider.d.cts +13 -0
  331. package/dist/providers/message-attachments-provider.d.ts +13 -0
  332. package/dist/providers/message-attachments-provider.js +27 -0
  333. package/dist/providers/message-provider.cjs +1 -0
  334. package/dist/providers/message-provider.d.cts +10 -0
  335. package/dist/providers/message-provider.d.ts +10 -0
  336. package/dist/providers/message-provider.js +14 -0
  337. package/dist/providers/root-provider.cjs +1 -0
  338. package/dist/providers/root-provider.d.cts +8 -0
  339. package/dist/providers/root-provider.d.ts +8 -0
  340. package/dist/providers/root-provider.js +21 -0
  341. package/dist/providers/search-events-provider.cjs +1 -0
  342. package/dist/providers/search-events-provider.d.cts +11 -0
  343. package/dist/providers/search-events-provider.d.ts +11 -0
  344. package/dist/providers/search-events-provider.js +18 -0
  345. package/dist/providers/source-item-provider.cjs +1 -0
  346. package/dist/providers/source-item-provider.d.cts +12 -0
  347. package/dist/providers/source-item-provider.d.ts +12 -0
  348. package/dist/providers/source-item-provider.js +13 -0
  349. package/dist/providers/theme-provider.cjs +1 -0
  350. package/dist/providers/theme-provider.d.cts +3 -0
  351. package/dist/providers/theme-provider.d.ts +3 -0
  352. package/dist/providers/theme-provider.js +65 -0
  353. package/dist/providers/user-provider.cjs +1 -0
  354. package/dist/providers/user-provider.d.cts +13 -0
  355. package/dist/providers/user-provider.d.ts +13 -0
  356. package/dist/providers/user-provider.js +34 -0
  357. package/dist/providers/widget-provider.cjs +1 -0
  358. package/dist/providers/widget-provider.d.cts +9 -0
  359. package/dist/providers/widget-provider.d.ts +9 -0
  360. package/dist/providers/widget-provider.js +8 -0
  361. package/dist/utils/component-ids.cjs +1 -0
  362. package/dist/utils/component-ids.d.cts +632 -0
  363. package/dist/utils/component-ids.d.ts +632 -0
  364. package/dist/utils/component-ids.js +340 -0
  365. package/dist/utils/compose-event-handlers.cjs +1 -0
  366. package/dist/utils/compose-event-handlers.d.cts +3 -0
  367. package/dist/utils/compose-event-handlers.d.ts +3 -0
  368. package/dist/utils/compose-event-handlers.js +10 -0
  369. package/dist/utils/compose-refs.cjs +1 -0
  370. package/dist/utils/compose-refs.d.cts +5 -0
  371. package/dist/utils/compose-refs.d.ts +5 -0
  372. package/dist/utils/compose-refs.js +30 -0
  373. package/dist/utils/default-settings.cjs +1 -0
  374. package/dist/utils/default-settings.d.cts +244 -0
  375. package/dist/utils/default-settings.d.ts +244 -0
  376. package/dist/utils/default-settings.js +75 -0
  377. package/dist/utils/form.cjs +1 -0
  378. package/dist/utils/form.d.cts +3 -0
  379. package/dist/utils/form.d.ts +3 -0
  380. package/dist/utils/form.js +17 -0
  381. package/dist/utils/generate-uid.cjs +1 -0
  382. package/dist/utils/generate-uid.d.cts +2 -0
  383. package/dist/utils/generate-uid.d.ts +2 -0
  384. package/dist/utils/generate-uid.js +14 -0
  385. package/dist/utils/get-message-metadata.cjs +10 -0
  386. package/dist/utils/get-message-metadata.d.cts +8 -0
  387. package/dist/utils/get-message-metadata.d.ts +8 -0
  388. package/dist/utils/get-message-metadata.js +142 -0
  389. package/dist/utils/graphql-client.cjs +1 -0
  390. package/dist/utils/graphql-client.d.cts +8 -0
  391. package/dist/utils/graphql-client.d.ts +8 -0
  392. package/dist/utils/graphql-client.js +23 -0
  393. package/dist/utils/highlight-emphasis.cjs +1 -0
  394. package/dist/utils/highlight-emphasis.d.cts +4 -0
  395. package/dist/utils/highlight-emphasis.d.ts +4 -0
  396. package/dist/utils/highlight-emphasis.js +15 -0
  397. package/dist/utils/merge-props.cjs +1 -0
  398. package/dist/utils/merge-props.d.cts +7 -0
  399. package/dist/utils/merge-props.d.ts +7 -0
  400. package/dist/utils/merge-props.js +41 -0
  401. package/dist/utils/misc.cjs +1 -0
  402. package/dist/utils/misc.d.cts +13 -0
  403. package/dist/utils/misc.d.ts +13 -0
  404. package/dist/utils/misc.js +36 -0
  405. package/dist/utils/reset-query-params.cjs +1 -0
  406. package/dist/utils/reset-query-params.d.cts +1 -0
  407. package/dist/utils/reset-query-params.d.ts +1 -0
  408. package/dist/utils/reset-query-params.js +13 -0
  409. package/dist/utils/tools/links-schema.cjs +1 -0
  410. package/dist/utils/tools/links-schema.d.cts +64 -0
  411. package/dist/utils/tools/links-schema.d.ts +64 -0
  412. package/dist/utils/tools/links-schema.js +85 -0
  413. package/dist/utils/transform-source/breadcrumbs.cjs +1 -0
  414. package/dist/utils/transform-source/breadcrumbs.d.cts +2 -0
  415. package/dist/utils/transform-source/breadcrumbs.d.ts +2 -0
  416. package/dist/utils/transform-source/breadcrumbs.js +16 -0
  417. package/dist/utils/transform-source/common-words/long.cjs +1 -0
  418. package/dist/utils/transform-source/common-words/long.d.cts +1 -0
  419. package/dist/utils/transform-source/common-words/long.d.ts +1 -0
  420. package/dist/utils/transform-source/common-words/long.js +69 -0
  421. package/dist/utils/transform-source/common-words/lowercase.cjs +1 -0
  422. package/dist/utils/transform-source/common-words/lowercase.d.cts +1 -0
  423. package/dist/utils/transform-source/common-words/lowercase.d.ts +1 -0
  424. package/dist/utils/transform-source/common-words/lowercase.js +48 -0
  425. package/dist/utils/transform-source/common-words/short.cjs +1 -0
  426. package/dist/utils/transform-source/common-words/short.d.cts +1 -0
  427. package/dist/utils/transform-source/common-words/short.d.ts +1 -0
  428. package/dist/utils/transform-source/common-words/short.js +141 -0
  429. package/dist/utils/transform-source/description.cjs +1 -0
  430. package/dist/utils/transform-source/description.d.cts +2 -0
  431. package/dist/utils/transform-source/description.d.ts +2 -0
  432. package/dist/utils/transform-source/description.js +10 -0
  433. package/dist/utils/transform-source/icon.cjs +1 -0
  434. package/dist/utils/transform-source/icon.d.cts +2 -0
  435. package/dist/utils/transform-source/icon.d.ts +2 -0
  436. package/dist/utils/transform-source/icon.js +9 -0
  437. package/dist/utils/transform-source/index.cjs +1 -0
  438. package/dist/utils/transform-source/index.d.cts +2 -0
  439. package/dist/utils/transform-source/index.d.ts +2 -0
  440. package/dist/utils/transform-source/index.js +21 -0
  441. package/dist/utils/transform-source/tabs.cjs +1 -0
  442. package/dist/utils/transform-source/tabs.d.cts +2 -0
  443. package/dist/utils/transform-source/tabs.d.ts +2 -0
  444. package/dist/utils/transform-source/tabs.js +13 -0
  445. package/dist/utils/transform-source/title.cjs +1 -0
  446. package/dist/utils/transform-source/title.d.cts +2 -0
  447. package/dist/utils/transform-source/title.d.ts +2 -0
  448. package/dist/utils/transform-source/title.js +12 -0
  449. package/dist/utils/transform-source/utils/description-without-title.cjs +1 -0
  450. package/dist/utils/transform-source/utils/description-without-title.d.cts +11 -0
  451. package/dist/utils/transform-source/utils/description-without-title.d.ts +11 -0
  452. package/dist/utils/transform-source/utils/description-without-title.js +12 -0
  453. package/dist/utils/transform-source/utils/index.cjs +1 -0
  454. package/dist/utils/transform-source/utils/index.d.cts +6 -0
  455. package/dist/utils/transform-source/utils/index.d.ts +6 -0
  456. package/dist/utils/transform-source/utils/index.js +16 -0
  457. package/dist/utils/transform-source/utils/misc.cjs +1 -0
  458. package/dist/utils/transform-source/utils/misc.d.cts +2 -0
  459. package/dist/utils/transform-source/utils/misc.d.ts +2 -0
  460. package/dist/utils/transform-source/utils/misc.js +15 -0
  461. package/dist/utils/transform-source/utils/standardize-common-words.cjs +1 -0
  462. package/dist/utils/transform-source/utils/standardize-common-words.d.cts +1 -0
  463. package/dist/utils/transform-source/utils/standardize-common-words.d.ts +1 -0
  464. package/dist/utils/transform-source/utils/standardize-common-words.js +26 -0
  465. package/dist/utils/transform-source/utils/standardize-organization-display-name.cjs +1 -0
  466. package/dist/utils/transform-source/utils/standardize-organization-display-name.d.cts +8 -0
  467. package/dist/utils/transform-source/utils/standardize-organization-display-name.d.ts +8 -0
  468. package/dist/utils/transform-source/utils/standardize-organization-display-name.js +10 -0
  469. package/dist/utils/transform-source/utils/standardize-suffixes.cjs +1 -0
  470. package/dist/utils/transform-source/utils/standardize-suffixes.d.cts +5 -0
  471. package/dist/utils/transform-source/utils/standardize-suffixes.d.ts +5 -0
  472. package/dist/utils/transform-source/utils/standardize-suffixes.js +16 -0
  473. package/dist/utils/transform-source/utils/strip-branding-keywords.cjs +1 -0
  474. package/dist/utils/transform-source/utils/strip-branding-keywords.d.cts +17 -0
  475. package/dist/utils/transform-source/utils/strip-branding-keywords.d.ts +17 -0
  476. package/dist/utils/transform-source/utils/strip-branding-keywords.js +14 -0
  477. package/package.json +111 -0
@@ -0,0 +1,35 @@
1
+ "use client";
2
+ import { jsx as o } from "react/jsx-runtime";
3
+ import { forwardRef as a } from "react";
4
+ import { useInkeepConfig as d } from "../providers/config-provider.js";
5
+ const s = a(({ isExternal: e, ...r }, n) => /* @__PURE__ */ o(
6
+ "a",
7
+ {
8
+ target: e ? "_blank" : void 0,
9
+ rel: e ? "noopener" : void 0,
10
+ ...r,
11
+ ref: n
12
+ }
13
+ ));
14
+ s.displayName = "Link";
15
+ const f = a(({ href: e, appendToUrl: r, ...n }, t) => {
16
+ const { baseSettings: i } = d(), c = Object.assign({}, i.appendQueryParamsToUrls, r), p = e && m(e, c);
17
+ return /* @__PURE__ */ o(s, { ref: t, href: p, ...n });
18
+ });
19
+ f.displayName = "LinkWithQueryParams";
20
+ function m(e, r) {
21
+ if (!r)
22
+ return e;
23
+ try {
24
+ const n = new URL(e);
25
+ for (const t of Object.keys(r))
26
+ r[t] && n.searchParams.append(t, r[t]);
27
+ return n.href;
28
+ } catch {
29
+ return e;
30
+ }
31
+ }
32
+ export {
33
+ s as Link,
34
+ f as LinkWithQueryParams
35
+ };
@@ -0,0 +1 @@
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../../components/factory.cjs"),d=require("../link.cjs"),k=o.ikp("h1",{_id:"markdownH1"}),n=o.ikp("h2",{_id:"markdownH2"}),e=o.ikp("p",{_id:"markdownP"}),i=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"}),C=o.ikp("div",{_id:"codeblockHeader"}),M=o.ikp("span",{_id:"codeblockHeaderLanguage"}),g=o.ikp("button",{_id:"codeblockCopyButton",type:"button"}),u=o.ikp("div",{_id:"codeblockHighlighterWrapper"}),h=o.ikp("div",{_id:"codeblockHighlighter"}),_=o.ikp("code",{_id:"codeblockCode"});exports.CodeblockCode=_;exports.CodeblockContainer=s;exports.CodeblockCopyButton=g;exports.CodeblockHeader=C;exports.CodeblockHeaderLanguage=M;exports.CodeblockHighlighter=h;exports.CodeblockHighlighterWrapper=u;exports.MarkdownCode=b;exports.MarkdownH1=k;exports.MarkdownH2=n;exports.MarkdownLi=i;exports.MarkdownLink=c;exports.MarkdownOl=a;exports.MarkdownP=e;exports.MarkdownSourceLink=t;exports.MarkdownTable=l;exports.MarkdownTd=p;exports.MarkdownTh=w;exports.MarkdownUl=r;
@@ -0,0 +1,27 @@
1
+ import { ForwardRefExoticComponent, DetailedHTMLProps, HTMLAttributes, LiHTMLAttributes, OlHTMLAttributes, RefAttributes, TableHTMLAttributes, ThHTMLAttributes, TdHTMLAttributes, ButtonHTMLAttributes } from 'react';
2
+ import { PolymorphicProps } from '../..';
3
+ import { LinkProps } from '../link';
4
+ import { UrlQueryParam } from '@inkeep/cxkit-types';
5
+ export declare const MarkdownH1: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "_id">>>;
6
+ export declare const MarkdownH2: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "_id">>>;
7
+ export declare const MarkdownP: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "_id">>>;
8
+ export declare const MarkdownLi: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "_id"> & Partial<Pick< DetailedHTMLProps<LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "_id">>>;
9
+ export declare const MarkdownUl: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "_id">>>;
10
+ export declare const MarkdownOl: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, "_id"> & Partial<Pick< DetailedHTMLProps<OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, "_id">>>;
11
+ export declare const MarkdownLink: ForwardRefExoticComponent< PolymorphicProps & Omit<Omit< LinkProps & {
12
+ appendToUrl?: UrlQueryParam;
13
+ }, "ref"> & RefAttributes<HTMLAnchorElement>, "_id"> & Partial<Pick<Omit< LinkProps & {
14
+ appendToUrl?: UrlQueryParam;
15
+ }, "ref"> & RefAttributes<HTMLAnchorElement>, "_id">>>;
16
+ export declare const MarkdownSourceLink: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, "_id">>>;
17
+ export declare const MarkdownTable: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, "_id"> & Partial<Pick< DetailedHTMLProps<TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, "_id">>>;
18
+ export declare const MarkdownTh: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>, "_id"> & Partial<Pick< DetailedHTMLProps<ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>, "_id">>>;
19
+ export declare const MarkdownTd: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, "_id"> & Partial<Pick< DetailedHTMLProps<TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, "_id">>>;
20
+ export declare const MarkdownCode: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, "_id">>>;
21
+ export declare const CodeblockContainer: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id">>>;
22
+ export declare const CodeblockHeader: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id">>>;
23
+ export declare const CodeblockHeaderLanguage: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "_id">>>;
24
+ export declare const CodeblockCopyButton: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "type" | "_id"> & Partial<Pick< DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "type" | "_id">>>;
25
+ export declare const CodeblockHighlighterWrapper: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id">>>;
26
+ export declare const CodeblockHighlighter: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id">>>;
27
+ export declare const CodeblockCode: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, "_id">>>;
@@ -0,0 +1,27 @@
1
+ import { ForwardRefExoticComponent, DetailedHTMLProps, HTMLAttributes, LiHTMLAttributes, OlHTMLAttributes, RefAttributes, TableHTMLAttributes, ThHTMLAttributes, TdHTMLAttributes, ButtonHTMLAttributes } from 'react';
2
+ import { PolymorphicProps } from '../..';
3
+ import { LinkProps } from '../link';
4
+ import { UrlQueryParam } from '@inkeep/cxkit-types';
5
+ export declare const MarkdownH1: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "_id">>>;
6
+ export declare const MarkdownH2: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "_id">>>;
7
+ export declare const MarkdownP: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "_id">>>;
8
+ export declare const MarkdownLi: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "_id"> & Partial<Pick< DetailedHTMLProps<LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "_id">>>;
9
+ export declare const MarkdownUl: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "_id">>>;
10
+ export declare const MarkdownOl: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, "_id"> & Partial<Pick< DetailedHTMLProps<OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, "_id">>>;
11
+ export declare const MarkdownLink: ForwardRefExoticComponent< PolymorphicProps & Omit<Omit< LinkProps & {
12
+ appendToUrl?: UrlQueryParam;
13
+ }, "ref"> & RefAttributes<HTMLAnchorElement>, "_id"> & Partial<Pick<Omit< LinkProps & {
14
+ appendToUrl?: UrlQueryParam;
15
+ }, "ref"> & RefAttributes<HTMLAnchorElement>, "_id">>>;
16
+ export declare const MarkdownSourceLink: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, "_id">>>;
17
+ export declare const MarkdownTable: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, "_id"> & Partial<Pick< DetailedHTMLProps<TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, "_id">>>;
18
+ export declare const MarkdownTh: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>, "_id"> & Partial<Pick< DetailedHTMLProps<ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>, "_id">>>;
19
+ export declare const MarkdownTd: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, "_id"> & Partial<Pick< DetailedHTMLProps<TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, "_id">>>;
20
+ export declare const MarkdownCode: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, "_id">>>;
21
+ export declare const CodeblockContainer: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id">>>;
22
+ export declare const CodeblockHeader: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id">>>;
23
+ export declare const CodeblockHeaderLanguage: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "_id">>>;
24
+ export declare const CodeblockCopyButton: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "type" | "_id"> & Partial<Pick< DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "type" | "_id">>>;
25
+ export declare const CodeblockHighlighterWrapper: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id">>>;
26
+ export declare const CodeblockHighlighter: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id">>>;
27
+ export declare const CodeblockCode: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, "_id">>>;
@@ -0,0 +1,64 @@
1
+ "use client";
2
+ import { ikp as o } from "../../components/factory.js";
3
+ import { LinkWithQueryParams as d } from "../link.js";
4
+ const r = o("h1", {
5
+ _id: "markdownH1"
6
+ }), i = o("h2", {
7
+ _id: "markdownH2"
8
+ }), c = o("p", {
9
+ _id: "markdownP"
10
+ }), k = o("li", {
11
+ _id: "markdownLi"
12
+ }), a = o("ul", {
13
+ _id: "markdownUl"
14
+ }), t = o("ol", {
15
+ _id: "markdownOl"
16
+ }), l = o(d, {
17
+ _id: "markdownLink"
18
+ }), w = o("sup", {
19
+ _id: "markdownSourceLink"
20
+ }), s = o("table", {
21
+ _id: "markdownTable"
22
+ }), b = o("th", {
23
+ _id: "markdownTh"
24
+ }), _ = o("td", {
25
+ _id: "markdownTd"
26
+ }), m = o("code", {
27
+ _id: "markdownCode"
28
+ }), C = o("div", {
29
+ _id: "codeblockContainer"
30
+ }), h = o("div", {
31
+ _id: "codeblockHeader"
32
+ }), p = o("span", {
33
+ _id: "codeblockHeaderLanguage"
34
+ }), g = o("button", {
35
+ _id: "codeblockCopyButton",
36
+ type: "button"
37
+ }), u = o("div", {
38
+ _id: "codeblockHighlighterWrapper"
39
+ }), H = o("div", {
40
+ _id: "codeblockHighlighter"
41
+ }), M = o("code", {
42
+ _id: "codeblockCode"
43
+ });
44
+ export {
45
+ M as CodeblockCode,
46
+ C as CodeblockContainer,
47
+ g as CodeblockCopyButton,
48
+ h as CodeblockHeader,
49
+ p as CodeblockHeaderLanguage,
50
+ H as CodeblockHighlighter,
51
+ u as CodeblockHighlighterWrapper,
52
+ m as MarkdownCode,
53
+ r as MarkdownH1,
54
+ i as MarkdownH2,
55
+ k as MarkdownLi,
56
+ l as MarkdownLink,
57
+ t as MarkdownOl,
58
+ c as MarkdownP,
59
+ w as MarkdownSourceLink,
60
+ s as MarkdownTable,
61
+ _ as MarkdownTd,
62
+ b as MarkdownTh,
63
+ a as MarkdownUl
64
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),x=require("react"),M=require("react-markdown"),m=require("rehype-raw"),y=require("../../providers/markdown-provider.cjs"),g=require("../codeblock/index.cjs"),n=require("./components.cjs"),C=require("./rehype-inline-code-property.cjs");const b=({children:c,componentStyles:a,shouldOpenLinksInNewTab:h,onLinkClick:u,onCodeCopy:k,...p})=>{if(!c)return null;const w={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}),ol:({children:r,node:o})=>{const t=o?.properties?.start;return e.jsx(n.MarkdownOl,{style:{"--start":t?.toString()??"0"},children:r})},a:({children:r,href:o})=>{const t=x.Children.toArray(r),i=t[0],d=typeof i=="string"&&/^\(\d+\)$/.test(i)&&t.length===1,s=d?i.match(/\d+/):r,l=e.jsx(n.MarkdownLink,{isExternal:h,href:o,onClick:()=>{u?.(o,s?.toString())},children:s});return d?e.jsx(n.MarkdownSourceLink,{children:l}):l},img:({src:r,alt:o})=>`![${o||""}](${r||""})`,table:({children:r})=>e.jsx(n.MarkdownTable,{children:r}),th:({children:r,isHeader:o})=>o?e.jsx(n.MarkdownTh,{children:r}):e.jsx(n.MarkdownTd,{children:r}),pre:({children:r})=>e.jsx("pre",{children:r}),code:({children:r,inline:o,className:t})=>o?e.jsx(n.MarkdownCode,{children:r}):e.jsx(g.CodeBlock,{className:t,onCopy:k,children:r})},j=e.jsx(M,{rehypePlugins:[m,C.rehypeInlineCodeProperty],components:w,disallowedElements:f,children:c.toString(),...p});return e.jsx(y.ChatMarkdownProvider,{componentStyles:a,children:j})},f=["script","iframe","frame","embed","meta","base","form","style","object"];exports.Markdown=b;
@@ -0,0 +1,15 @@
1
+ import { ComponentPropsWithRef } from 'react';
2
+ import { CodeProps } from '../codeblock';
3
+ import { MarkdownComponentID } from '../../utils/component-ids';
4
+ export interface MarkdownProps {
5
+ shouldOpenLinksInNewTab?: boolean;
6
+ componentStyles?: Partial<Record<MarkdownComponentID, string>>;
7
+ onCodeCopy?: CodeProps['onCopy'];
8
+ /**
9
+ * Callback when a link is clicked.
10
+ * @param href - the destination of the link
11
+ * @param label - the link text
12
+ */
13
+ onLinkClick?: (href: string | undefined, label: string | undefined) => void;
14
+ }
15
+ export declare const Markdown: ({ children, componentStyles, shouldOpenLinksInNewTab, onLinkClick, onCodeCopy, ...props }: ComponentPropsWithRef<"div"> & MarkdownProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,15 @@
1
+ import { ComponentPropsWithRef } from 'react';
2
+ import { CodeProps } from '../codeblock';
3
+ import { MarkdownComponentID } from '../../utils/component-ids';
4
+ export interface MarkdownProps {
5
+ shouldOpenLinksInNewTab?: boolean;
6
+ componentStyles?: Partial<Record<MarkdownComponentID, string>>;
7
+ onCodeCopy?: CodeProps['onCopy'];
8
+ /**
9
+ * Callback when a link is clicked.
10
+ * @param href - the destination of the link
11
+ * @param label - the link text
12
+ */
13
+ onLinkClick?: (href: string | undefined, label: string | undefined) => void;
14
+ }
15
+ export declare const Markdown: ({ children, componentStyles, shouldOpenLinksInNewTab, onLinkClick, onCodeCopy, ...props }: ComponentPropsWithRef<"div"> & MarkdownProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,79 @@
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import f from "react";
3
+ import u from "react-markdown";
4
+ import M from "rehype-raw";
5
+ import { ChatMarkdownProvider as y } from "../../providers/markdown-provider.js";
6
+ import { CodeBlock as g } from "../codeblock/index.js";
7
+ import { MarkdownCode as C, MarkdownTh as b, MarkdownTd as S, MarkdownTable as P, MarkdownSourceLink as x, MarkdownOl as L, MarkdownUl as R, MarkdownLi as T, MarkdownP as $, MarkdownH2 as j, MarkdownH1 as A, MarkdownLink as E } from "./components.js";
8
+ import { rehypeInlineCodeProperty as H } from "./rehype-inline-code-property.js";
9
+ const F = ({
10
+ children: i,
11
+ componentStyles: a,
12
+ shouldOpenLinksInNewTab: h,
13
+ onLinkClick: s,
14
+ onCodeCopy: m,
15
+ ...p
16
+ }) => {
17
+ if (!i) return null;
18
+ const k = {
19
+ h1: ({ children: r }) => /* @__PURE__ */ n(A, { children: r }),
20
+ h2: ({ children: r }) => /* @__PURE__ */ n(j, { children: r }),
21
+ p: ({ children: r }) => /* @__PURE__ */ n($, { children: r }),
22
+ li: ({ children: r }) => /* @__PURE__ */ n(T, { children: r }),
23
+ ul: ({ children: r }) => /* @__PURE__ */ n(R, { children: r }),
24
+ ol: ({ children: r, node: e }) => {
25
+ const o = e?.properties?.start;
26
+ return /* @__PURE__ */ n(
27
+ L,
28
+ {
29
+ style: {
30
+ "--start": o?.toString() ?? "0"
31
+ },
32
+ children: r
33
+ }
34
+ );
35
+ },
36
+ a: ({ children: r, href: e }) => {
37
+ const o = f.Children.toArray(r), t = o[0], d = typeof t == "string" && /^\(\d+\)$/.test(t) && o.length === 1, c = d ? t.match(/\d+/) : r, l = /* @__PURE__ */ n(
38
+ E,
39
+ {
40
+ isExternal: h,
41
+ href: e,
42
+ onClick: () => {
43
+ s?.(e, c?.toString());
44
+ },
45
+ children: c
46
+ }
47
+ );
48
+ return d ? /* @__PURE__ */ n(x, { children: l }) : l;
49
+ },
50
+ img: ({ src: r, alt: e }) => `![${e || ""}](${r || ""})`,
51
+ table: ({ children: r }) => /* @__PURE__ */ n(P, { children: r }),
52
+ th: ({ children: r, isHeader: e }) => e ? /* @__PURE__ */ n(b, { children: r }) : /* @__PURE__ */ n(S, { children: r }),
53
+ pre: ({ children: r }) => /* @__PURE__ */ n("pre", { children: r }),
54
+ code: ({ children: r, inline: e, className: o }) => e ? /* @__PURE__ */ n(C, { children: r }) : /* @__PURE__ */ n(g, { className: o, onCopy: m, children: r })
55
+ }, w = /* @__PURE__ */ n(
56
+ u,
57
+ {
58
+ rehypePlugins: [M, H],
59
+ components: k,
60
+ disallowedElements: _,
61
+ children: i.toString(),
62
+ ...p
63
+ }
64
+ );
65
+ return /* @__PURE__ */ n(y, { componentStyles: a, children: w });
66
+ }, _ = [
67
+ "script",
68
+ "iframe",
69
+ "frame",
70
+ "embed",
71
+ "meta",
72
+ "base",
73
+ "form",
74
+ "style",
75
+ "object"
76
+ ];
77
+ export {
78
+ F as Markdown
79
+ };
@@ -0,0 +1 @@
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("unist-util-visit");function n(){return t=>{r.visit(t,"element",(e,l,i)=>{e.tagName==="code"&&(i&&i.tagName==="pre"?e.properties.inline=!1:e.properties.inline=!0)})}}exports.rehypeInlineCodeProperty=n;
@@ -0,0 +1 @@
1
+ export declare function rehypeInlineCodeProperty(): (tree: any) => void;
@@ -0,0 +1 @@
1
+ export declare function rehypeInlineCodeProperty(): (tree: any) => void;
@@ -0,0 +1,12 @@
1
+ "use client";
2
+ import { visit as t } from "unist-util-visit";
3
+ function l() {
4
+ return (r) => {
5
+ t(r, "element", (e, n, i) => {
6
+ e.tagName === "code" && (i && i.tagName === "pre" ? e.properties.inline = !1 : e.properties.inline = !0);
7
+ });
8
+ };
9
+ }
10
+ export {
11
+ l as rehypeInlineCodeProperty
12
+ };
@@ -0,0 +1 @@
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("./portal.cjs"),s=require("../providers/theme-provider.cjs"),c=require("../providers/config-provider.cjs"),u=({children:t,...r})=>{const{baseSettings:o}=c.useInkeepConfig(),{rootElement:i}=o;return e.jsx(n.Portal,{host:i,...r,children:e.jsx(s.ThemeProvider,{children:t})})};exports.PortalWithTheme=u;
@@ -0,0 +1,2 @@
1
+ import { PortalProps } from './portal';
2
+ export declare const PortalWithTheme: ({ children, ...props }: PortalProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { PortalProps } from './portal';
2
+ export declare const PortalWithTheme: ({ children, ...props }: PortalProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,12 @@
1
+ "use client";
2
+ import { jsx as o } from "react/jsx-runtime";
3
+ import { Portal as i } from "./portal.js";
4
+ import { ThemeProvider as n } from "../providers/theme-provider.js";
5
+ import { useInkeepConfig as s } from "../providers/config-provider.js";
6
+ const l = ({ children: t, ...e }) => {
7
+ const { baseSettings: r } = s(), { rootElement: m } = r;
8
+ return /* @__PURE__ */ o(i, { host: m, ...e, children: /* @__PURE__ */ o(n, { children: t }) });
9
+ };
10
+ export {
11
+ l as PortalWithTheme
12
+ };
@@ -0,0 +1 @@
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),i=require("react-dom"),p=typeof document<"u"?e.useLayoutEffect:e.useEffect;function m(u){const{children:s,target:a,tag:f,host:l}=u,n=e.useRef(null),t=e.useRef(null),[,d]=e.useReducer(r=>r+1,0);p(()=>{if(!n.current)return;const r=n.current.ownerDocument,c=l??r.body;return t.current=r.createElement(f??"inkeep-portal"),c.appendChild(t.current),d(),()=>{t.current&&c.removeChild(t.current)}},[]);const o=a?.current??t.current;return o?i.createPortal(s,o):e.createElement("span",{ref:n})}exports.Portal=m;
@@ -0,0 +1,8 @@
1
+ import { JSX } from 'react';
2
+ export interface PortalProps {
3
+ children: React.ReactNode;
4
+ target?: React.RefObject<HTMLElement>;
5
+ tag?: string;
6
+ host?: HTMLElement | null;
7
+ }
8
+ export declare function Portal(props: PortalProps): JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { JSX } from 'react';
2
+ export interface PortalProps {
3
+ children: React.ReactNode;
4
+ target?: React.RefObject<HTMLElement>;
5
+ tag?: string;
6
+ host?: HTMLElement | null;
7
+ }
8
+ export declare function Portal(props: PortalProps): JSX.Element;
@@ -0,0 +1,19 @@
1
+ "use client";
2
+ import { useRef as c, useReducer as i, useLayoutEffect as p, useEffect as m, createElement as h } from "react";
3
+ import { createPortal as E } from "react-dom";
4
+ const y = typeof document < "u" ? p : m;
5
+ function C(u) {
6
+ const { children: f, target: s, tag: a, host: d } = u, r = c(null), e = c(null), [, l] = i((t) => t + 1, 0);
7
+ y(() => {
8
+ if (!r.current) return;
9
+ const t = r.current.ownerDocument, o = d ?? t.body;
10
+ return e.current = t.createElement(a ?? "inkeep-portal"), o.appendChild(e.current), l(), () => {
11
+ e.current && o.removeChild(e.current);
12
+ };
13
+ }, []);
14
+ const n = s?.current ?? e.current;
15
+ return n ? E(f, n) : h("span", { ref: r });
16
+ }
17
+ export {
18
+ C as Portal
19
+ };
@@ -0,0 +1,2 @@
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),n=require("react"),m=require("./root.cjs"),p=require("@radix-ui/react-id"),c=n.createContext(void 0),d=()=>n.useContext(c);function u({wrapperStyles:e={},children:i,customStyles:a,styles:l}){const[s,h]=n.useState(null),[r,x]=n.useState(null),w=n.useMemo(()=>({shadowHost:s,rootElement:r}),[s,r]),S=p.useId(),f=m.default.div;return o.jsxs(f,{id:`inkeep-shadow${S}`,ref:t=>{t&&h(t)},style:e,children:[o.jsx("style",{type:"text/css",dangerouslySetInnerHTML:{__html:`@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;900&display=swap');
2
+ ${l}`}}),a,o.jsx("div",{id:"inkeep-widget-root",ref:t=>{t&&x(t)},style:e,children:o.jsx(c.Provider,{value:w,children:s&&r&&i})})]})}const v=e=>d()?e.children:o.jsx(u,{...e});exports.InkeepShadow=v;exports.InkeepShadowProvider=u;exports.ShadowContext=c;exports.useShadow=d;
@@ -0,0 +1,14 @@
1
+ import { CSSProperties, PropsWithChildren, Context, ReactNode, ReactPortal, ReactElement, JSXElementConstructor } from 'react';
2
+ export declare const ShadowContext: Context<ShadowContextValue | undefined>;
3
+ export type ShadowContextValue = {
4
+ shadowHost: HTMLDivElement | null;
5
+ rootElement: HTMLDivElement | null;
6
+ };
7
+ export declare const useShadow: () => ShadowContextValue | undefined;
8
+ export interface InkeepShadowProps extends PropsWithChildren {
9
+ wrapperStyles?: CSSProperties;
10
+ customStyles?: React.ReactNode;
11
+ styles?: string;
12
+ }
13
+ export declare function InkeepShadowProvider({ wrapperStyles, children, customStyles, styles, }: InkeepShadowProps): import("react/jsx-runtime").JSX.Element;
14
+ export declare const InkeepShadow: (props: InkeepShadowProps) => string | number | bigint | boolean | Iterable< ReactNode> | Promise<string | number | bigint | boolean | ReactPortal | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable< ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
@@ -0,0 +1,14 @@
1
+ import { CSSProperties, PropsWithChildren, Context, ReactNode, ReactPortal, ReactElement, JSXElementConstructor } from 'react';
2
+ export declare const ShadowContext: Context<ShadowContextValue | undefined>;
3
+ export type ShadowContextValue = {
4
+ shadowHost: HTMLDivElement | null;
5
+ rootElement: HTMLDivElement | null;
6
+ };
7
+ export declare const useShadow: () => ShadowContextValue | undefined;
8
+ export interface InkeepShadowProps extends PropsWithChildren {
9
+ wrapperStyles?: CSSProperties;
10
+ customStyles?: React.ReactNode;
11
+ styles?: string;
12
+ }
13
+ export declare function InkeepShadowProvider({ wrapperStyles, children, customStyles, styles, }: InkeepShadowProps): import("react/jsx-runtime").JSX.Element;
14
+ export declare const InkeepShadow: (props: InkeepShadowProps) => string | number | bigint | boolean | Iterable< ReactNode> | Promise<string | number | bigint | boolean | ReactPortal | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable< ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
@@ -0,0 +1,55 @@
1
+ "use client";
2
+ import { jsxs as x, jsx as o } from "react/jsx-runtime";
3
+ import { createContext as p, useContext as w, useState as i, useMemo as v } from "react";
4
+ import y from "./root.js";
5
+ import { useId as S } from "@radix-ui/react-id";
6
+ const c = p(void 0), g = () => w(c);
7
+ function I({
8
+ wrapperStyles: t = {},
9
+ children: s,
10
+ customStyles: d,
11
+ styles: l
12
+ }) {
13
+ const [n, u] = i(null), [r, m] = i(null), a = v(() => ({ shadowHost: n, rootElement: r }), [n, r]), h = S(), f = y.div;
14
+ return /* @__PURE__ */ x(
15
+ f,
16
+ {
17
+ id: `inkeep-shadow${h}`,
18
+ ref: (e) => {
19
+ e && u(e);
20
+ },
21
+ style: t,
22
+ children: [
23
+ /* @__PURE__ */ o(
24
+ "style",
25
+ {
26
+ type: "text/css",
27
+ dangerouslySetInnerHTML: {
28
+ __html: `@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;900&display=swap');
29
+ ${l}`
30
+ }
31
+ }
32
+ ),
33
+ d,
34
+ /* @__PURE__ */ o(
35
+ "div",
36
+ {
37
+ id: "inkeep-widget-root",
38
+ ref: (e) => {
39
+ e && m(e);
40
+ },
41
+ style: t,
42
+ children: /* @__PURE__ */ o(c.Provider, { value: a, children: n && r && s })
43
+ }
44
+ )
45
+ ]
46
+ }
47
+ );
48
+ }
49
+ const E = (t) => g() ? t.children : /* @__PURE__ */ o(I, { ...t });
50
+ export {
51
+ E as InkeepShadow,
52
+ I as InkeepShadowProvider,
53
+ c as ShadowContext,
54
+ g as useShadow
55
+ };
@@ -0,0 +1 @@
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),s=require("react"),m=require("react-dom"),w=require("./utils.cjs"),p=require("react-dom/server"),x=require("./use-ensured-forwarded-ref.cjs");function g({children:e="",...a}){let t="";return s.isValidElement(e)?t=p.renderToString(e):typeof e=="string"&&(t=e),u.jsx("template",{...a,dangerouslySetInnerHTML:{__html:t}})}function q({root:e,children:a=null}){return m.createPortal(a,e)}function y(e){return s.forwardRef(({mode:t="open",delegatesFocus:l=!1,styleSheets:c=[],ssr:n=!1,children:f=null,...R},d)=>{const r=x.useEnsuredForwardedRef(d),[o,h]=s.useState(null),S=`node_${t}${l}`;return s.useLayoutEffect(()=>{if(r.current)try{if(typeof d=="function"&&d(r.current),n){const{shadowRoot:j}=r.current;h(j);return}const i=r.current.attachShadow({mode:t,delegatesFocus:l});c.length>0&&(i.adoptedStyleSheets=c),h(i)}catch(i){w.handleError({error:i,styleSheets:c,root:o})}},[d,r,c]),u.jsx(e.tag,{ref:r,...R,children:(o||n)&&u.jsx(w.Context.Provider,{value:o,children:n?u.jsx(g,{shadowroot:t,shadowrootmode:t,children:e.render({root:o,ssr:n,children:f})}):u.jsx(q,{root:o,children:e.render({root:o,ssr:n,children:f})})})},S)})}exports.create=y;
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ import { RenderFn, ShadowRootProps } from '@inkeep/cxkit-types';
3
+ interface CreateOptions {
4
+ tag: React.ElementType;
5
+ render: RenderFn;
6
+ }
7
+ export declare function create(options: CreateOptions): React.ForwardRefExoticComponent<ShadowRootProps & React.RefAttributes<Element>>;
8
+ export {};
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ import { RenderFn, ShadowRootProps } from '@inkeep/cxkit-types';
3
+ interface CreateOptions {
4
+ tag: React.ElementType;
5
+ render: RenderFn;
6
+ }
7
+ export declare function create(options: CreateOptions): React.ForwardRefExoticComponent<ShadowRootProps & React.RefAttributes<Element>>;
8
+ export {};
@@ -0,0 +1,56 @@
1
+ "use client";
2
+ import { jsx as a } from "react/jsx-runtime";
3
+ import R, { forwardRef as s, useState as S, useLayoutEffect as C } from "react";
4
+ import { createPortal as _ } from "react-dom";
5
+ import { handleError as g, Context as y } from "./utils.js";
6
+ import { renderToString as E } from "react-dom/server";
7
+ import { useEnsuredForwardedRef as x } from "./use-ensured-forwarded-ref.js";
8
+ function T({ children: o = "", ...d }) {
9
+ let t = "";
10
+ return R.isValidElement(o) ? t = E(o) : typeof o == "string" && (t = o), /* @__PURE__ */ a("template", { ...d, dangerouslySetInnerHTML: { __html: t } });
11
+ }
12
+ function v({ root: o, children: d = null }) {
13
+ return _(d, o);
14
+ }
15
+ function I(o) {
16
+ return s(
17
+ ({
18
+ mode: t = "open",
19
+ delegatesFocus: i = !1,
20
+ styleSheets: f = [],
21
+ ssr: n = !1,
22
+ children: l = null,
23
+ ...h
24
+ }, u) => {
25
+ const r = x(u), [e, m] = S(null), p = `node_${t}${i}`;
26
+ return C(() => {
27
+ if (r.current)
28
+ try {
29
+ if (typeof u == "function" && u(r.current), n) {
30
+ const { shadowRoot: w } = r.current;
31
+ m(w);
32
+ return;
33
+ }
34
+ const c = r.current.attachShadow({
35
+ mode: t,
36
+ delegatesFocus: i
37
+ });
38
+ f.length > 0 && (c.adoptedStyleSheets = f), m(c);
39
+ } catch (c) {
40
+ g({ error: c, styleSheets: f, root: e });
41
+ }
42
+ }, [u, r, f]), /* @__PURE__ */ a(o.tag, { ref: r, ...h, children: (e || n) && /* @__PURE__ */ a(y.Provider, { value: e, children: n ? /* @__PURE__ */ a(T, { shadowroot: t, shadowrootmode: t, children: o.render({
43
+ root: e,
44
+ ssr: n,
45
+ children: l
46
+ }) }) : /* @__PURE__ */ a(v, { root: e, children: o.render({
47
+ root: e,
48
+ ssr: n,
49
+ children: l
50
+ }) }) }) }, p);
51
+ }
52
+ );
53
+ }
54
+ export {
55
+ I as create
56
+ };
@@ -0,0 +1 @@
1
+ export * from './context';
@@ -0,0 +1 @@
1
+ export * from './context';
@@ -0,0 +1 @@
1
+ "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("humps");require("react");const g=require("./create.cjs"),t=new Map;function n(c={},s="core",u=({children:r})=>r){return new Proxy(c,{get:function(f,a){const o=l.decamelize(a,{separator:"-"}),e=`${s}-${o}`;if(!t.has(e)){const i=g.create({tag:o,render:u});t.set(e,i)}return t.get(e)}})}const d=n();exports.createProxy=n;exports.default=d;
@@ -0,0 +1,5 @@
1
+ import { RenderFn, Root } from '@inkeep/cxkit-types';
2
+ export declare const useShadowRoot: () => ShadowRoot | null;
3
+ export declare function createProxy(target?: Root, id?: string, render?: RenderFn): Root;
4
+ declare const _default: Root;
5
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import { RenderFn, Root } from '@inkeep/cxkit-types';
2
+ export declare const useShadowRoot: () => ShadowRoot | null;
3
+ export declare function createProxy(target?: Root, id?: string, render?: RenderFn): Root;
4
+ declare const _default: Root;
5
+ export default _default;
@@ -0,0 +1,22 @@
1
+ "use client";
2
+ import { decamelize as m } from "humps";
3
+ import "react";
4
+ import { create as f } from "./create.js";
5
+ const e = /* @__PURE__ */ new Map();
6
+ function p(n = {}, c = "core", a = ({ children: o }) => o) {
7
+ return new Proxy(n, {
8
+ get: function(u, s) {
9
+ const r = m(s, { separator: "-" }), t = `${c}-${r}`;
10
+ if (!e.has(t)) {
11
+ const i = f({ tag: r, render: a });
12
+ e.set(t, i);
13
+ }
14
+ return e.get(t);
15
+ }
16
+ });
17
+ }
18
+ const y = p();
19
+ export {
20
+ p as createProxy,
21
+ y as default
22
+ };
@@ -0,0 +1 @@
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react");function t(e){const u=r.useRef(e?.current);return r.useEffect(()=>{e&&(e.current=u.current)},[e]),u}exports.useEnsuredForwardedRef=t;
@@ -0,0 +1,2 @@
1
+ import { RefObject } from 'react';
2
+ export declare function useEnsuredForwardedRef<T>(forwardedRef: RefObject<T>): RefObject<T>;
@@ -0,0 +1,2 @@
1
+ import { RefObject } from 'react';
2
+ export declare function useEnsuredForwardedRef<T>(forwardedRef: RefObject<T>): RefObject<T>;