cozy-sharing 8.1.0 → 8.2.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 CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [8.2.0](https://github.com/cozy/cozy-libs/compare/cozy-sharing@8.1.0...cozy-sharing@8.2.0) (2023-07-26)
7
+
8
+
9
+ ### Features
10
+
11
+ * Add useSharingContext ([cfe9346](https://github.com/cozy/cozy-libs/commit/cfe93462ce8730973f83d0cf3ef5a69233d67fd6))
12
+
13
+
14
+
15
+
16
+
6
17
  # [8.1.0](https://github.com/cozy/cozy-libs/compare/cozy-sharing@8.0.1...cozy-sharing@8.1.0) (2023-07-25)
7
18
 
8
19
 
@@ -0,0 +1,8 @@
1
+ import { useContext } from 'react';
2
+ import SharingContext from '../context';
3
+
4
+ var useSharingContext = function useSharingContext() {
5
+ return useContext(SharingContext);
6
+ };
7
+
8
+ export { useSharingContext };
package/dist/index.js CHANGED
@@ -3,6 +3,7 @@ import SharingContext from './context';
3
3
  import withLocales from './withLocales';
4
4
  export default SharingProvider;
5
5
  export { SharingContext, withLocales };
6
+ export { useSharingContext } from './hooks/useSharingContext';
6
7
  export { SharedDocument } from './SharedDocument';
7
8
  export { SharedStatus } from './SharedStatus';
8
9
  export { SharedBadge } from './SharedBadge';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cozy-sharing",
3
- "version": "8.1.0",
3
+ "version": "8.2.0",
4
4
  "description": "Provides sharing login for React applications.",
5
5
  "main": "dist/index.js",
6
6
  "author": "Cozy",
@@ -61,5 +61,5 @@
61
61
  "sideEffects": [
62
62
  "*.css"
63
63
  ],
64
- "gitHead": "96da95e604fb54d72ce03b220cf91e112f8fb5f1"
64
+ "gitHead": "72212af70b52fbfd6540f48f34d9da61a08f92a6"
65
65
  }
@@ -0,0 +1,7 @@
1
+ import { useContext } from 'react'
2
+
3
+ import SharingContext from '../context'
4
+
5
+ const useSharingContext = () => useContext(SharingContext)
6
+
7
+ export { useSharingContext }
package/src/index.jsx CHANGED
@@ -6,6 +6,7 @@ export default SharingProvider
6
6
 
7
7
  export { SharingContext, withLocales }
8
8
 
9
+ export { useSharingContext } from './hooks/useSharingContext'
9
10
  export { SharedDocument } from './SharedDocument'
10
11
  export { SharedStatus } from './SharedStatus'
11
12
  export { SharedBadge } from './SharedBadge'