@vknext/shared 1.3.2 → 1.3.4

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.
@@ -1 +1 @@
1
- import{getGlobalThis as e}from"../../../helpers/getGlobalThis.js";const t=new Map,r=(e,r)=>{const a=t.get(e);a&&a.delete(r)},a=t=>{const r=e(),{variable:l,getValue:n,setValue:o,enumerable:s}=t,u=Object.getOwnPropertyDescriptor(r,l);Object.defineProperty(r,l,{get:n,set:e=>(o(e),u?.set?.call(r,e),s||(t.enumerable=!0,a(t)),!0),configurable:!0,enumerable:s})},l=(e,l)=>{if(t.has(e)){return t.get(e).add(l),()=>r(e,l)}const n=new Set;n.add(l),t.set(e,n);let o=window[e];return o&&l(o),a({variable:e,enumerable:e in window,getValue:()=>o,setValue:e=>{o=e;for(const t of n)t(e)}}),()=>r(e,l)};export{l as default};
1
+ import{getGlobalThis as e}from"../../../helpers/getGlobalThis.js";const t=()=>{const t=e();return t.__callbacksGlobals||(t.__callbacksGlobals=new Map),t.__callbacksGlobals},l=(e,l)=>{const a=t().get(e);a&&a.delete(l)},a=(a,s)=>{const o=t();if(o.has(a)){return o.get(a).add(s),()=>l(a,s)}const r=new Set;r.add(s),o.set(a,r);let c=window[a];return c&&s(c),(t=>{const l=e(),{variable:a,getValue:s,setValue:o}=t,r=Object.getOwnPropertyDescriptor(l,a);Object.defineProperty(l,a,{get:s,set:e=>(o(e),r?.set?.call(l,e),!0),configurable:!1,enumerable:!0})})({variable:a,getValue:()=>c,setValue:e=>{c=e;for(const t of r)t(e)}}),()=>l(a,s)};export{a as default};
@@ -833,6 +833,10 @@ interface IStories {
833
833
  }
834
834
 
835
835
  declare global {
836
+ /**
837
+ * !!! internal !!!
838
+ */
839
+ var __callbacksGlobals: Map<any, Set<Callback<any>>> | undefined;
836
840
  var Hls: typeof HlsJs | undefined;
837
841
  var TopNotifier: ITopNotifier;
838
842
  var Wall: IWall;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vknext/shared",
3
- "version": "1.3.2",
3
+ "version": "1.3.4",
4
4
  "description": "vk next shared",
5
5
  "type": "module",
6
6
  "files": [