@blinkdotnew/react 1.0.1 → 1.0.2
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.d.mts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +4 -2
- package/dist/index.mjs +4 -2
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BlinkClient, Agent, UIMessage, Sandbox, AgentResponse } from '@blinkdotnew/sdk';
|
|
1
|
+
import { BlinkClientConfig, BlinkClient, Agent, UIMessage, Sandbox, AgentResponse } from '@blinkdotnew/sdk';
|
|
2
2
|
export * from '@blinkdotnew/sdk';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import { ReactNode } from 'react';
|
|
@@ -14,6 +14,8 @@ interface BlinkProviderProps {
|
|
|
14
14
|
publishableKey?: string;
|
|
15
15
|
/** Secret key for server-side usage (do not expose in browser!) */
|
|
16
16
|
secretKey?: string;
|
|
17
|
+
/** Auth configuration (mode, coreUrl, etc.) */
|
|
18
|
+
auth?: BlinkClientConfig['auth'];
|
|
17
19
|
/** Children components */
|
|
18
20
|
children: ReactNode;
|
|
19
21
|
}
|
|
@@ -36,7 +38,7 @@ interface BlinkProviderProps {
|
|
|
36
38
|
* }
|
|
37
39
|
* ```
|
|
38
40
|
*/
|
|
39
|
-
declare function BlinkProvider({ projectId, publishableKey, secretKey, children, }: BlinkProviderProps): react_jsx_runtime.JSX.Element;
|
|
41
|
+
declare function BlinkProvider({ projectId, publishableKey, secretKey, auth, children, }: BlinkProviderProps): react_jsx_runtime.JSX.Element;
|
|
40
42
|
/**
|
|
41
43
|
* Get the Blink client from context
|
|
42
44
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BlinkClient, Agent, UIMessage, Sandbox, AgentResponse } from '@blinkdotnew/sdk';
|
|
1
|
+
import { BlinkClientConfig, BlinkClient, Agent, UIMessage, Sandbox, AgentResponse } from '@blinkdotnew/sdk';
|
|
2
2
|
export * from '@blinkdotnew/sdk';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import { ReactNode } from 'react';
|
|
@@ -14,6 +14,8 @@ interface BlinkProviderProps {
|
|
|
14
14
|
publishableKey?: string;
|
|
15
15
|
/** Secret key for server-side usage (do not expose in browser!) */
|
|
16
16
|
secretKey?: string;
|
|
17
|
+
/** Auth configuration (mode, coreUrl, etc.) */
|
|
18
|
+
auth?: BlinkClientConfig['auth'];
|
|
17
19
|
/** Children components */
|
|
18
20
|
children: ReactNode;
|
|
19
21
|
}
|
|
@@ -36,7 +38,7 @@ interface BlinkProviderProps {
|
|
|
36
38
|
* }
|
|
37
39
|
* ```
|
|
38
40
|
*/
|
|
39
|
-
declare function BlinkProvider({ projectId, publishableKey, secretKey, children, }: BlinkProviderProps): react_jsx_runtime.JSX.Element;
|
|
41
|
+
declare function BlinkProvider({ projectId, publishableKey, secretKey, auth, children, }: BlinkProviderProps): react_jsx_runtime.JSX.Element;
|
|
40
42
|
/**
|
|
41
43
|
* Get the Blink client from context
|
|
42
44
|
*
|
package/dist/index.js
CHANGED
|
@@ -50,15 +50,17 @@ function BlinkProvider({
|
|
|
50
50
|
projectId,
|
|
51
51
|
publishableKey,
|
|
52
52
|
secretKey,
|
|
53
|
+
auth,
|
|
53
54
|
children
|
|
54
55
|
}) {
|
|
55
56
|
const client = (0, import_react.useMemo)(
|
|
56
57
|
() => (0, import_sdk.createClient)({
|
|
57
58
|
projectId,
|
|
58
59
|
publishableKey,
|
|
59
|
-
secretKey
|
|
60
|
+
secretKey,
|
|
61
|
+
auth
|
|
60
62
|
}),
|
|
61
|
-
[projectId, publishableKey, secretKey]
|
|
63
|
+
[projectId, publishableKey, secretKey, auth]
|
|
62
64
|
);
|
|
63
65
|
const value = (0, import_react.useMemo)(
|
|
64
66
|
() => ({
|
package/dist/index.mjs
CHANGED
|
@@ -10,15 +10,17 @@ function BlinkProvider({
|
|
|
10
10
|
projectId,
|
|
11
11
|
publishableKey,
|
|
12
12
|
secretKey,
|
|
13
|
+
auth,
|
|
13
14
|
children
|
|
14
15
|
}) {
|
|
15
16
|
const client = useMemo(
|
|
16
17
|
() => createClient({
|
|
17
18
|
projectId,
|
|
18
19
|
publishableKey,
|
|
19
|
-
secretKey
|
|
20
|
+
secretKey,
|
|
21
|
+
auth
|
|
20
22
|
}),
|
|
21
|
-
[projectId, publishableKey, secretKey]
|
|
23
|
+
[projectId, publishableKey, secretKey, auth]
|
|
22
24
|
);
|
|
23
25
|
const value = useMemo(
|
|
24
26
|
() => ({
|