@inkeep/cxkit-primitives 0.5.38 → 0.5.39
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/index.cjs +1 -1
- package/dist/index.d.cts +464 -0
- package/dist/index.d.ts +464 -0
- package/dist/index.js +112 -99
- package/dist/providers/base-events-provider.cjs +1 -1
- package/dist/providers/base-events-provider.js +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,152 +1,165 @@
|
|
|
1
|
-
import { AttachmentItemProvider as
|
|
2
|
-
import { AttachmentsBarProvider as f, useAttachmentsBar as
|
|
3
|
-
import { BaseEventsProvider as
|
|
4
|
-
import { ChatEventsProvider as
|
|
5
|
-
import { ChatFormProvider as
|
|
1
|
+
import { AttachmentItemProvider as i, useAttachmentItem as p } from "./providers/attachment-item-provider.js";
|
|
2
|
+
import { AttachmentsBarProvider as f, useAttachmentsBar as u } from "./providers/attachments-bar-provider.js";
|
|
3
|
+
import { BaseEventsProvider as C, useBaseEvents as l } from "./providers/base-events-provider.js";
|
|
4
|
+
import { ChatEventsProvider as h, ChatEventsProviderWithBase as I, useChatEvents as P } from "./providers/chat-events-provider.js";
|
|
5
|
+
import { ChatFormProvider as S, useChatForm as g, useChatFormState as F } from "./providers/chat-form-provider.js";
|
|
6
6
|
import { InkeepConfigProvider as b, WebWidgetInteractionType as k, useInkeepConfig as B } from "./providers/config-provider.js";
|
|
7
|
-
import { InkeepConversationProvider as
|
|
8
|
-
import { FeedbackItemProvider as
|
|
9
|
-
import { FeedbackProvider as U, useMessageFeedback as
|
|
10
|
-
import { FormFieldProvider as
|
|
11
|
-
import { HelpMenuProvider as
|
|
12
|
-
import { ChatMarkdownProvider as
|
|
13
|
-
import { MessageAttachmentsProvider as
|
|
7
|
+
import { InkeepConversationProvider as E, SHARE_QUERY_PARAM as R, useInkeepConversation as w } from "./providers/conversation-provider.js";
|
|
8
|
+
import { FeedbackItemProvider as W, useFeedbackItem as T } from "./providers/feedback-item-provider.js";
|
|
9
|
+
import { FeedbackProvider as U, useMessageFeedback as D } from "./providers/feedback-provider.js";
|
|
10
|
+
import { FormFieldProvider as L, useFormField as O } from "./providers/form-field-provider.js";
|
|
11
|
+
import { HelpMenuProvider as _, useHelpMenu as j, useHelpMenuState as J } from "./providers/help-menu-provider.js";
|
|
12
|
+
import { ChatMarkdownProvider as N, useChatMarkdown as Y } from "./providers/markdown-provider.js";
|
|
13
|
+
import { MessageAttachmentsProvider as G, useMessageAttachments as V } from "./providers/message-attachments-provider.js";
|
|
14
14
|
import { MessageProvider as Z, useMessage as $, useOptionalMessage as ee } from "./providers/message-provider.js";
|
|
15
15
|
import { RootProvider as re } from "./providers/root-provider.js";
|
|
16
|
-
import { SourceItemProvider as
|
|
17
|
-
import { ThemeProvider as
|
|
16
|
+
import { SourceItemProvider as me, useSourceItem as ae } from "./providers/source-item-provider.js";
|
|
17
|
+
import { ThemeProvider as ne } from "./providers/theme-provider.js";
|
|
18
18
|
import { UserProvider as pe, useUser as de } from "./providers/user-provider.js";
|
|
19
|
-
import { WidgetProvider as
|
|
20
|
-
import { ikp as
|
|
19
|
+
import { WidgetProvider as ue, useWidget as xe } from "./providers/widget-provider.js";
|
|
20
|
+
import { ikp as le, jsxFactory as ve } from "./components/factory.js";
|
|
21
21
|
import * as e from "./components/embedded-chat.js";
|
|
22
|
-
import { ChatProvider as
|
|
22
|
+
import { ChatProvider as Ie, useChat as Pe } from "./components/embedded-chat/chat-provider.js";
|
|
23
23
|
import * as o from "./components/embedded-search.js";
|
|
24
|
-
import { SearchProvider as
|
|
24
|
+
import { SearchProvider as Se, SearchProviderImpl as ge, useSearch as Fe } from "./components/embedded-search/search-provider.js";
|
|
25
25
|
import * as r from "./components/modal.js";
|
|
26
26
|
import { ModalProvider as be, useModal as ke } from "./components/modal/modal-provider.js";
|
|
27
27
|
import * as t from "./components/intelligent-form.js";
|
|
28
|
-
import { IntelligentFormProvider as Ae, IntelligentFormProviderImpl as
|
|
29
|
-
import * as
|
|
30
|
-
import * as
|
|
31
|
-
import { useBoolean as
|
|
28
|
+
import { IntelligentFormProvider as Ae, IntelligentFormProviderImpl as Ee, useIntelligentForm as Re } from "./components/intelligent-form/intelligent-form-provider.js";
|
|
29
|
+
import * as m from "./components/chat-button.js";
|
|
30
|
+
import * as a from "./components/searchbar.js";
|
|
31
|
+
import { useBoolean as ye } from "./hooks/use-boolean.js";
|
|
32
32
|
import { passesBrowserStorageChecks as Te, useBrowserStorage as He } from "./hooks/use-browser-storage.js";
|
|
33
|
-
import { useComponentClassNames as
|
|
34
|
-
import { useContainerSize as
|
|
35
|
-
import { useCopyToClipboard as
|
|
36
|
-
import { useInstantUpdate as
|
|
37
|
-
import { useIsMounted as
|
|
38
|
-
import { useMediaQuery as
|
|
39
|
-
import { useResizeObserver as
|
|
33
|
+
import { useComponentClassNames as De } from "./hooks/use-component-classnames.js";
|
|
34
|
+
import { useContainerSize as Le } from "./hooks/use-container-size.js";
|
|
35
|
+
import { useCopyToClipboard as Qe } from "./hooks/use-copy-to-clipboard.js";
|
|
36
|
+
import { useInstantUpdate as je } from "./hooks/use-instant-update.js";
|
|
37
|
+
import { useIsMounted as Ke } from "./hooks/use-is-mounted.js";
|
|
38
|
+
import { useMediaQuery as Ye } from "./hooks/use-media-query.js";
|
|
39
|
+
import { useResizeObserver as Ge } from "./hooks/use-resize-observer.js";
|
|
40
40
|
import { useScrollingFades as Xe } from "./hooks/use-scrolling-fades.js";
|
|
41
41
|
import { useSettleAction as $e } from "./hooks/use-settle-action.js";
|
|
42
42
|
import { useScrollToBottom as oo } from "./hooks/use-scroll-to-bottom.js";
|
|
43
|
-
import { callAll as to, dataAttr as
|
|
44
|
-
import { SearchBarComponentIds as
|
|
43
|
+
import { callAll as to, dataAttr as mo, getInitials as ao, getMessageContent as so, isString as no, maybeRender as io, parseIfJson as po, toKebabCase as fo } from "./utils/misc.js";
|
|
44
|
+
import { SearchBarComponentIds as xo, aiChatComponentIds as Co, aiSearchComponentIds as lo, chatButtonComponentIds as vo, componentIDs as ho, intelligentFormComponentIds as Io, markDownComponentIds as Po, miscellanousComponentIds as co, modalComponentIds as So } from "./utils/component-ids.js";
|
|
45
45
|
import { composeRefs as Fo, useComposedRefs as Mo } from "./utils/compose-refs.js";
|
|
46
46
|
import { Portal as ko } from "./atoms/portal.js";
|
|
47
47
|
import { CustomIcon as Ao } from "./atoms/icons/custom-icon.js";
|
|
48
|
-
import { BuiltInIconRenderer as
|
|
49
|
-
import { PortalWithTheme as
|
|
50
|
-
import {
|
|
48
|
+
import { BuiltInIconRenderer as Ro } from "./atoms/icons/built-in-icon-renderer.js";
|
|
49
|
+
import { PortalWithTheme as yo } from "./atoms/portal-with-theme.js";
|
|
50
|
+
import { Command as To, CommandDialog as Ho, CommandEmpty as Uo, CommandInput as Do, CommandItem as zo, CommandList as Lo, CommandLoading as Oo, CommandRoot as Qo, CommandSeparator as _o, defaultFilter as jo, useCommandState as Jo, useCommandStore as Ko } from "./atoms/cmdk/index.js";
|
|
51
|
+
import { InkeepShadow as Yo, InkeepShadowProvider as qo, ShadowContext as Go, useShadow as Vo } from "./atoms/shadow/context.js";
|
|
51
52
|
export {
|
|
52
|
-
|
|
53
|
+
i as AttachmentItemProvider,
|
|
53
54
|
f as AttachmentsBarProvider,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
55
|
+
C as BaseEventsProvider,
|
|
56
|
+
Ro as BuiltInIconRenderer,
|
|
57
|
+
m as ChatButtonPrimitive,
|
|
58
|
+
h as ChatEventsProvider,
|
|
59
|
+
I as ChatEventsProviderWithBase,
|
|
60
|
+
S as ChatFormProvider,
|
|
61
|
+
N as ChatMarkdownProvider,
|
|
62
|
+
Ie as ChatProvider,
|
|
63
|
+
To as Command,
|
|
64
|
+
Ho as CommandDialog,
|
|
65
|
+
Uo as CommandEmpty,
|
|
66
|
+
Do as CommandInput,
|
|
67
|
+
zo as CommandItem,
|
|
68
|
+
Lo as CommandList,
|
|
69
|
+
Oo as CommandLoading,
|
|
70
|
+
Qo as CommandRoot,
|
|
71
|
+
_o as CommandSeparator,
|
|
62
72
|
Ao as CustomIcon,
|
|
63
73
|
e as EmbeddedChatPrimitive,
|
|
64
74
|
o as EmbeddedSearchPrimitive,
|
|
65
|
-
|
|
75
|
+
W as FeedbackItemProvider,
|
|
66
76
|
U as FeedbackProvider,
|
|
67
|
-
|
|
68
|
-
|
|
77
|
+
L as FormFieldProvider,
|
|
78
|
+
_ as HelpMenuProvider,
|
|
69
79
|
b as InkeepConfigProvider,
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
80
|
+
E as InkeepConversationProvider,
|
|
81
|
+
Yo as InkeepShadow,
|
|
82
|
+
qo as InkeepShadowProvider,
|
|
73
83
|
t as IntelligentFormPrimitive,
|
|
74
84
|
Ae as IntelligentFormProvider,
|
|
75
|
-
|
|
76
|
-
|
|
85
|
+
Ee as IntelligentFormProviderImpl,
|
|
86
|
+
G as MessageAttachmentsProvider,
|
|
77
87
|
Z as MessageProvider,
|
|
78
88
|
r as ModalPrimitive,
|
|
79
89
|
be as ModalProvider,
|
|
80
90
|
ko as Portal,
|
|
81
|
-
|
|
91
|
+
yo as PortalWithTheme,
|
|
82
92
|
re as RootProvider,
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
93
|
+
R as SHARE_QUERY_PARAM,
|
|
94
|
+
xo as SearchBarComponentIds,
|
|
95
|
+
a as SearchBarPrimitive,
|
|
96
|
+
Se as SearchProvider,
|
|
97
|
+
ge as SearchProviderImpl,
|
|
98
|
+
Go as ShadowContext,
|
|
99
|
+
me as SourceItemProvider,
|
|
100
|
+
ne as ThemeProvider,
|
|
91
101
|
pe as UserProvider,
|
|
92
102
|
k as WebWidgetInteractionType,
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
103
|
+
ue as WidgetProvider,
|
|
104
|
+
Co as aiChatComponentIds,
|
|
105
|
+
lo as aiSearchComponentIds,
|
|
96
106
|
to as callAll,
|
|
97
|
-
|
|
98
|
-
|
|
107
|
+
vo as chatButtonComponentIds,
|
|
108
|
+
ho as componentIDs,
|
|
99
109
|
Fo as composeRefs,
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
ao as
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
110
|
+
mo as dataAttr,
|
|
111
|
+
jo as defaultFilter,
|
|
112
|
+
ao as getInitials,
|
|
113
|
+
so as getMessageContent,
|
|
114
|
+
le as ikp,
|
|
115
|
+
Io as intelligentFormComponentIds,
|
|
116
|
+
no as isString,
|
|
117
|
+
ve as jsxFactory,
|
|
118
|
+
Po as markDownComponentIds,
|
|
119
|
+
io as maybeRender,
|
|
120
|
+
co as miscellanousComponentIds,
|
|
121
|
+
So as modalComponentIds,
|
|
111
122
|
po as parseIfJson,
|
|
112
123
|
Te as passesBrowserStorageChecks,
|
|
113
124
|
fo as toKebabCase,
|
|
114
125
|
p as useAttachmentItem,
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
126
|
+
u as useAttachmentsBar,
|
|
127
|
+
l as useBaseEvents,
|
|
128
|
+
ye as useBoolean,
|
|
118
129
|
He as useBrowserStorage,
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
130
|
+
Pe as useChat,
|
|
131
|
+
P as useChatEvents,
|
|
132
|
+
g as useChatForm,
|
|
122
133
|
F as useChatFormState,
|
|
123
|
-
|
|
124
|
-
|
|
134
|
+
Y as useChatMarkdown,
|
|
135
|
+
Jo as useCommandState,
|
|
136
|
+
Ko as useCommandStore,
|
|
137
|
+
De as useComponentClassNames,
|
|
125
138
|
Mo as useComposedRefs,
|
|
126
|
-
|
|
127
|
-
|
|
139
|
+
Le as useContainerSize,
|
|
140
|
+
Qe as useCopyToClipboard,
|
|
128
141
|
T as useFeedbackItem,
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
142
|
+
O as useFormField,
|
|
143
|
+
j as useHelpMenu,
|
|
144
|
+
J as useHelpMenuState,
|
|
132
145
|
B as useInkeepConfig,
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
146
|
+
w as useInkeepConversation,
|
|
147
|
+
je as useInstantUpdate,
|
|
148
|
+
Re as useIntelligentForm,
|
|
149
|
+
Ke as useIsMounted,
|
|
150
|
+
Ye as useMediaQuery,
|
|
138
151
|
$ as useMessage,
|
|
139
152
|
V as useMessageAttachments,
|
|
140
|
-
|
|
153
|
+
D as useMessageFeedback,
|
|
141
154
|
ke as useModal,
|
|
142
155
|
ee as useOptionalMessage,
|
|
143
|
-
|
|
156
|
+
Ge as useResizeObserver,
|
|
144
157
|
oo as useScrollToBottom,
|
|
145
158
|
Xe as useScrollingFades,
|
|
146
159
|
Fe as useSearch,
|
|
147
160
|
$e as useSettleAction,
|
|
148
|
-
|
|
149
|
-
|
|
161
|
+
Vo as useShadow,
|
|
162
|
+
ae as useSourceItem,
|
|
150
163
|
de as useUser,
|
|
151
|
-
|
|
164
|
+
xe as useWidget
|
|
152
165
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("react/jsx-runtime"),t=require("react"),y=require("../atoms/api/analytics/events.cjs"),B=require("./config-provider.cjs"),b=require("./user-provider.cjs"),p=t.createContext(void 0),f=({children:e})=>{const{baseSettings:s,componentType:n}=B.useInkeepConfig(),{apiKey:o,analyticsApiBaseUrl:r,tags:i,privacyPreferences:d,env:E}=s,{userProperties:c}=b.useUser(),a=t.useMemo(()=>({widgetLibraryVersion:"0.5.
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("react/jsx-runtime"),t=require("react"),y=require("../atoms/api/analytics/events.cjs"),B=require("./config-provider.cjs"),b=require("./user-provider.cjs"),p=t.createContext(void 0),f=({children:e})=>{const{baseSettings:s,componentType:n}=B.useInkeepConfig(),{apiKey:o,analyticsApiBaseUrl:r,tags:i,privacyPreferences:d,env:E}=s,{userProperties:c}=b.useUser(),a=t.useMemo(()=>({widgetLibraryVersion:"0.5.39",componentType:n,tags:i}),[n,i]),u=!d.optOutAllAnalytics&&E!=="development",g={logEvent:t.useCallback(async v=>{const m={...a,...v.properties},l={eventName:v.eventName,properties:m,userProperties:c};u&&y.logEvent(l,o,r),s.onEvent?.(l)},[u,s,o,r,c,a])};return P.jsx(p.Provider,{value:g,children:e})},x=()=>{const e=t.useContext(p);if(!e)throw new Error("useBaseEvents must be used within a BaseEventsProvider");return e};exports.BaseEventsProvider=f;exports.useBaseEvents=x;
|
|
@@ -7,7 +7,7 @@ import { useUser as b } from "./user-provider.js";
|
|
|
7
7
|
const m = x(void 0), U = ({ children: e }) => {
|
|
8
8
|
const { baseSettings: t, componentType: o } = C(), { apiKey: n, analyticsApiBaseUrl: s, tags: r, privacyPreferences: u, env: l } = t, { userProperties: i } = b(), a = d(
|
|
9
9
|
() => ({
|
|
10
|
-
widgetLibraryVersion: "0.5.
|
|
10
|
+
widgetLibraryVersion: "0.5.39",
|
|
11
11
|
componentType: o,
|
|
12
12
|
tags: r
|
|
13
13
|
}),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inkeep/cxkit-primitives",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.39",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "Inkeep, Inc. Customer License (IICL) v1.1",
|
|
6
6
|
"homepage": "",
|
|
@@ -59,9 +59,9 @@
|
|
|
59
59
|
"remark-gfm": "^4.0.1",
|
|
60
60
|
"unist-util-visit": "^5.0.0",
|
|
61
61
|
"use-sync-external-store": "^1.4.0",
|
|
62
|
-
"@inkeep/cxkit-color-mode": "0.5.
|
|
63
|
-
"@inkeep/cxkit-theme": "0.5.
|
|
64
|
-
"@inkeep/cxkit-types": "0.5.
|
|
62
|
+
"@inkeep/cxkit-color-mode": "0.5.39",
|
|
63
|
+
"@inkeep/cxkit-theme": "0.5.39",
|
|
64
|
+
"@inkeep/cxkit-types": "0.5.39"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
67
|
"@biomejs/biome": "1.9.4",
|