hermes-io 2.4.44 → 2.4.46

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/README.md CHANGED
@@ -1,27 +1,23 @@
1
- # hermes-io
2
- A lightweight React library that allows communication between components by using the observer pattern and the hook api.
1
+ # hermes-io <img src="https://hermes-io-docs.vercel.app/img/logo.png" width="40" height="40" />
2
+
3
+ A lightweight React library that allows communication between components by using the observer pattern and the hook api.
3
4
 
4
5
  ```
5
6
  npm i hermes-io --save
6
7
  ```
8
+ Documentation: [here](https://hermes-io-docs.vercel.app/)
7
9
 
8
- Check the documentation: [here](https://hermes-io-docs.vercel.app/)
9
10
 
10
- # Hermes-io CLI
11
- This CLI is the official scaffolding generator for [hermes-io](https://www.npmjs.com/package/hermes-io#get-started), its generates a simple folder structure that guaranty separation of concerns encompassing pivotal elements such as: [contexts](https://github.com/Maxtermax/hermes-io#context), [hooks](https://github.com/Maxtermax/hermes-io#useobserver-hook) and [observers](https://github.com/Maxtermax/hermes-io#observer).
11
+ ## Devtool
12
12
 
13
- ```
14
- npm i hermes-io-cli -g
15
- ```
13
+ Install from chrome web store [here](https://chrome.google.com/webstore/detail/hermes-io/pjdkgcpikfmkncldipldmimanfkpeedm?hl=en)
16
14
 
17
- Check the documentation: [here](https://hermes-io-docs.vercel.app/docs/basics/Toolkit#usage)
15
+
18
16
 
19
- ## Chrome extension
20
- Install from chrome web store [here](https://chrome.google.com/webstore/detail/hermes-io/pjdkgcpikfmkncldipldmimanfkpeedm?hl=en)
17
+ ![chrome extension](https://raw.githubusercontent.com/Maxtermax/hermes-io-devtools/master/demo.gif)
18
+
19
+ ## Contributing:
21
20
 
22
- ![chrome extension](https://raw.githubusercontent.com/Maxtermax/hermes-io-devtools/master/demo.gif)
23
-
24
- ## Contributing:
25
21
  Feel free to open a PR explaining your changes, this library is open to suggestions and improvements.
26
22
 
27
23
  https://github.com/Maxtermax/hermes-io
@@ -1 +1 @@
1
- function _array_like_to_array(r,t){(null==t||t>r.length)&&(t=r.length);for(var e=0,n=Array(t);e<t;e++)n[e]=r[e];return n}import{useState as r,useRef as t}from"react";import{useObserver as e}from"../hooks/useObserver";export var useMutations=function(n){var o=n.store,a=n.id,i=n.events,l=n.noUpdate,u=void 0!==l&&l,v=n.onChange,s=r(!1),c=(s[0],s[1]),f=t(null);return e({listener:function(r,t){for(var e,n=function(r,t){var e="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(e)return(e=e.call(r)).next.bind(e);if(Array.isArray(r)||(e=function(r,t){if(r){if("string"==typeof r)return _array_like_to_array(r,void 0);var e=Object.prototype.toString.call(r).slice(8,-1);if("Object"===e&&r.constructor&&(e=r.constructor.name),"Map"===e||"Set"===e)return Array.from(e);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return _array_like_to_array(r,void 0)}}(r))){e&&(r=e);var n=0;return function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(i);!(e=n()).done;){var o=e.value;if(r.value.type===o){var l,s,f=null==(s=r.value)?void 0:null==(l=s.payload)?void 0:l.value;(!r.value.targets||r.value.targets.includes(a))&&!1===u&&c(function(r){return!r}),null==v||v(f,t)}}},contexts:[o.context],observer:o.observer}),f};
1
+ function _array_like_to_array(r,t){(null==t||t>r.length)&&(t=r.length);for(var e=0,n=Array(t);e<t;e++)n[e]=r[e];return n}import{useState as r,useRef as t}from"react";import{useObserver as e}from"../hooks/useObserver";var randomId=function(){var r,t;return(null==(t=crypto)?void 0:null==(r=t.randomUUID)?void 0:r.call(t))||Math.random().toString(36).substring(2,16)};export var useMutations=function(n){var o=n.store,a=n.id,i=n.events,l=n.noUpdate,u=void 0!==l&&l,v=n.onChange,d=r(randomId()),s=(d[0],d[1]),c=t(null);return e({listener:function(r,t){for(var e,n=function(r,t){var e="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(e)return(e=e.call(r)).next.bind(e);if(Array.isArray(r)||(e=function(r,t){if(r){if("string"==typeof r)return _array_like_to_array(r,void 0);var e=Object.prototype.toString.call(r).slice(8,-1);if("Object"===e&&r.constructor&&(e=r.constructor.name),"Map"===e||"Set"===e)return Array.from(e);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return _array_like_to_array(r,void 0)}}(r))){e&&(r=e);var n=0;return function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(i);!(e=n()).done;){var o=e.value;if(r.value.type===o){var l,d,c=null==(d=r.value)?void 0:null==(l=d.payload)?void 0:l.value;(!r.value.targets||r.value.targets.includes(a))&&!1===u&&s(randomId()),null==v||v(c,t)}}},contexts:[o.context],observer:o.observer}),c};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hermes-io",
3
- "version": "2.4.44",
3
+ "version": "2.4.46",
4
4
  "description": "A lightweight React library that allows communication between Reactjs components by using the observer pattern and the hook api",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib/index.js",