@vue-storefront/next 1.1.1-rc.1 → 1.1.1
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/CHANGELOG.md +1 -1
- package/dist/client.d.mts +4 -4
- package/dist/client.d.ts +4 -4
- package/dist/index.d.mts +2 -3
- package/dist/index.d.ts +2 -3
- package/dist/{types-pLNAZ_nM.d.mts → types-C_UwxYcn.d.mts} +6 -2
- package/dist/{types-pLNAZ_nM.d.ts → types-C_UwxYcn.d.ts} +6 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## 1.1.1
|
|
4
4
|
|
|
5
|
-
- **[FIXED]** "The inferred type of '
|
|
5
|
+
- **[FIXED]** "The inferred type of 'SdkProvider' cannot be named without a reference to (...)" error when calling `createSdkContext`.
|
|
6
6
|
|
|
7
7
|
## 1.1.0
|
|
8
8
|
|
package/dist/client.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SDKApi } from '@vue-storefront/sdk';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import { b as CreateSdkContextReturn } from './types-C_UwxYcn.mjs';
|
|
3
|
+
import 'react';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Creates a new SDK context. This function is dedicated for the client-side usage.
|
|
@@ -20,6 +20,6 @@ import { b as SdkProviderProps } from './types-pLNAZ_nM.mjs';
|
|
|
20
20
|
* Finally you can use the `useSdk` in any client component of your application.
|
|
21
21
|
* @returns [SdkProvider, useSdk] - The SDK provider and the `useSdk` hook.
|
|
22
22
|
*/
|
|
23
|
-
declare function createSdkContext<TSdk extends SDKApi<any>>(sdk: TSdk):
|
|
23
|
+
declare function createSdkContext<TSdk extends SDKApi<any>>(sdk: TSdk): CreateSdkContextReturn<TSdk>;
|
|
24
24
|
|
|
25
|
-
export {
|
|
25
|
+
export { CreateSdkContextReturn, createSdkContext };
|
package/dist/client.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SDKApi } from '@vue-storefront/sdk';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import { b as CreateSdkContextReturn } from './types-C_UwxYcn.js';
|
|
3
|
+
import 'react';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Creates a new SDK context. This function is dedicated for the client-side usage.
|
|
@@ -20,6 +20,6 @@ import { b as SdkProviderProps } from './types-pLNAZ_nM.js';
|
|
|
20
20
|
* Finally you can use the `useSdk` in any client component of your application.
|
|
21
21
|
* @returns [SdkProvider, useSdk] - The SDK provider and the `useSdk` hook.
|
|
22
22
|
*/
|
|
23
|
-
declare function createSdkContext<TSdk extends SDKApi<any>>(sdk: TSdk):
|
|
23
|
+
declare function createSdkContext<TSdk extends SDKApi<any>>(sdk: TSdk): CreateSdkContextReturn<TSdk>;
|
|
24
24
|
|
|
25
|
-
export {
|
|
25
|
+
export { CreateSdkContextReturn, createSdkContext };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { C as Config, a as CreateSdkReturn } from './types-
|
|
2
|
-
export { D as DynamicContext, G as GetSdkContext, b as SdkProviderProps, S as StaticContext } from './types-pLNAZ_nM.mjs';
|
|
1
|
+
import { C as Config, a as CreateSdkReturn } from './types-C_UwxYcn.mjs';
|
|
3
2
|
import '@vue-storefront/sdk';
|
|
4
3
|
import 'react';
|
|
5
4
|
|
|
@@ -63,4 +62,4 @@ interface CreateSdkOptions {
|
|
|
63
62
|
*/
|
|
64
63
|
declare function createSdk<TConfig extends Record<string, any>>(options: CreateSdkOptions, configDefinition: Config<TConfig>): CreateSdkReturn<TConfig>;
|
|
65
64
|
|
|
66
|
-
export {
|
|
65
|
+
export { type CreateSdkOptions, createSdk };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { C as Config, a as CreateSdkReturn } from './types-
|
|
2
|
-
export { D as DynamicContext, G as GetSdkContext, b as SdkProviderProps, S as StaticContext } from './types-pLNAZ_nM.js';
|
|
1
|
+
import { C as Config, a as CreateSdkReturn } from './types-C_UwxYcn.js';
|
|
3
2
|
import '@vue-storefront/sdk';
|
|
4
3
|
import 'react';
|
|
5
4
|
|
|
@@ -63,4 +62,4 @@ interface CreateSdkOptions {
|
|
|
63
62
|
*/
|
|
64
63
|
declare function createSdk<TConfig extends Record<string, any>>(options: CreateSdkOptions, configDefinition: Config<TConfig>): CreateSdkReturn<TConfig>;
|
|
65
64
|
|
|
66
|
-
export {
|
|
65
|
+
export { type CreateSdkOptions, createSdk };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { buildModule, middlewareModule
|
|
1
|
+
import { SDKApi, buildModule, middlewareModule } from '@vue-storefront/sdk';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
|
|
4
4
|
type GetSdkContext = {
|
|
@@ -66,5 +66,9 @@ interface CreateSdkReturn<TConfig extends Record<string, any>> {
|
|
|
66
66
|
*/
|
|
67
67
|
getSdk: (dynamicContext?: GetSdkContext) => SDKApi<TConfig>;
|
|
68
68
|
}
|
|
69
|
+
type CreateSdkContextReturn<TSdk extends SDKApi<any>> = readonly [
|
|
70
|
+
({ children }: SdkProviderProps) => JSX.Element,
|
|
71
|
+
() => TSdk
|
|
72
|
+
];
|
|
69
73
|
|
|
70
|
-
export type { Config as C,
|
|
74
|
+
export type { Config as C, CreateSdkReturn as a, CreateSdkContextReturn as b };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { buildModule, middlewareModule
|
|
1
|
+
import { SDKApi, buildModule, middlewareModule } from '@vue-storefront/sdk';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
|
|
4
4
|
type GetSdkContext = {
|
|
@@ -66,5 +66,9 @@ interface CreateSdkReturn<TConfig extends Record<string, any>> {
|
|
|
66
66
|
*/
|
|
67
67
|
getSdk: (dynamicContext?: GetSdkContext) => SDKApi<TConfig>;
|
|
68
68
|
}
|
|
69
|
+
type CreateSdkContextReturn<TSdk extends SDKApi<any>> = readonly [
|
|
70
|
+
({ children }: SdkProviderProps) => JSX.Element,
|
|
71
|
+
() => TSdk
|
|
72
|
+
];
|
|
69
73
|
|
|
70
|
-
export type { Config as C,
|
|
74
|
+
export type { Config as C, CreateSdkReturn as a, CreateSdkContextReturn as b };
|