@adhese/sdk-react 0.9.13 → 1.0.0
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 +23 -0
- package/dist/sdkReact.d.ts +37 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @adhese/sdk-react
|
|
2
2
|
|
|
3
|
+
## 1.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- ff93b63: 🎉🎉🎉 – Release 1.0.0 – 🎉🎉🎉
|
|
8
|
+
|
|
9
|
+
This release marks the first stable release of the Adhese SDK packages. From here on out we will follow semantic
|
|
10
|
+
versioning, meaning that all patch and minor updates will be backwards compatible. Major updates will introduce
|
|
11
|
+
breaking changes.
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies [ff93b63]
|
|
16
|
+
- Updated dependencies [21aad18]
|
|
17
|
+
- @adhese/sdk@1.0.0
|
|
18
|
+
- @adhese/sdk-shared@1.0.0
|
|
19
|
+
|
|
20
|
+
## 0.9.14
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- 1feb9ff: Fix types not being published
|
|
25
|
+
|
|
3
26
|
## 0.9.13
|
|
4
27
|
|
|
5
28
|
### Patch Changes
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { PropsWithChildren, ReactElement, RefObject } from 'react';
|
|
2
|
+
import { AdheseOptions, Adhese, AdheseSlotOptions, AdheseSlot as AdheseSlot$1 } from '@adhese/sdk';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Provider to create an Adhese instance with the given options. Via the `useAdhese` hook, the Adhese instance can be
|
|
6
|
+
* used in all child components.
|
|
7
|
+
* @constructor
|
|
8
|
+
*/
|
|
9
|
+
declare function AdheseProvider({ children, options }: PropsWithChildren<{
|
|
10
|
+
options: AdheseOptions;
|
|
11
|
+
}>): ReactElement;
|
|
12
|
+
/**
|
|
13
|
+
* Hook to get the Adhese instance from the nearest `AdheseProvider`. When the Adhese instance is not available yet, `null`
|
|
14
|
+
*/
|
|
15
|
+
declare function useAdhese(): Adhese | undefined;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Hook to create an Adhese slot. The slot will be disposed when the component is unmounted. The slot will be created
|
|
19
|
+
* when the containing element is available and the Adhese instance is available.
|
|
20
|
+
* @param elementRef The ref to the containing element
|
|
21
|
+
* @param options The options to create the slot
|
|
22
|
+
*/
|
|
23
|
+
declare function useAdheseSlot(elementRef: RefObject<HTMLElement>, options: Omit<AdheseSlotOptions, 'containingElement' | 'context'>): AdheseSlot$1 | null;
|
|
24
|
+
|
|
25
|
+
type AdheseSlotProps = {
|
|
26
|
+
/**
|
|
27
|
+
* Callback to be called when the slot is created or disposed
|
|
28
|
+
*/
|
|
29
|
+
onChange?(slot: AdheseSlot$1 | null): void;
|
|
30
|
+
} & Omit<AdheseSlotOptions, 'containingElement' | 'context'>;
|
|
31
|
+
/**
|
|
32
|
+
* Component to create an Adhese slot. The slot will be disposed when the component is unmounted. The slot will be
|
|
33
|
+
* created when the containing element is available and the Adhese instance is available.
|
|
34
|
+
*/
|
|
35
|
+
declare function AdheseSlot({ onChange, ...options }: AdheseSlotProps): ReactElement;
|
|
36
|
+
|
|
37
|
+
export { AdheseProvider, AdheseSlot, useAdhese, useAdheseSlot };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adhese/sdk-react",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "1.0.0",
|
|
5
5
|
"description": "Adhese SDK",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -25,12 +25,12 @@
|
|
|
25
25
|
"prepareRelease": "npm run build"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
|
-
"@adhese/sdk": ">=
|
|
28
|
+
"@adhese/sdk": ">=1.0.0",
|
|
29
29
|
"react": ">=16.13",
|
|
30
30
|
"react-dom": ">=16.13"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@adhese/sdk-shared": "^0.
|
|
33
|
+
"@adhese/sdk-shared": "^1.0.0",
|
|
34
34
|
"use-deep-compare-effect": "^1.8.1"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|