@w3ux/observables-connect 0.9.21 → 0.9.22

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,3 +1,5 @@
1
1
  export * from './get';
2
2
  export * from './local';
3
+ export * from './observables';
4
+ export * from './state';
3
5
  export * from './util';
package/accounts/index.js CHANGED
@@ -1,5 +1,7 @@
1
1
  export * from './get';
2
2
  export * from './local';
3
+ export * from './observables';
4
+ export * from './state';
3
5
  export * from './util';
4
6
 
5
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/accounts/index.ts"],"names":[],"mappings":"AAGA,cAAc,OAAO,CAAA;AACrB,cAAc,SAAS,CAAA;AACvB,cAAc,QAAQ,CAAA","file":"index.js","sourcesContent":["/* @license Copyright 2024 w3ux authors & contributors\nSPDX-License-Identifier: GPL-3.0-only */\n\nexport * from './get'\nexport * from './local'\nexport * from './util'\n"]}
1
+ {"version":3,"sources":["../src/accounts/index.ts"],"names":[],"mappings":"AAGA,cAAc,OAAO,CAAA;AACrB,cAAc,SAAS,CAAA;AACvB,cAAc,eAAe,CAAA;AAC7B,cAAc,SAAS,CAAA;AACvB,cAAc,QAAQ,CAAA","file":"index.js","sourcesContent":["/* @license Copyright 2024 w3ux authors & contributors\nSPDX-License-Identifier: GPL-3.0-only */\n\nexport * from './get'\nexport * from './local'\nexport * from './observables'\nexport * from './state'\nexport * from './util'\n"]}
@@ -0,0 +1,3 @@
1
+ export declare const unsubs: Record<string, () => void>;
2
+ export declare const addUnsub: (id: string, unsub: () => void) => void;
3
+ export declare const unsubAll: () => void;
@@ -0,0 +1,13 @@
1
+ export const unsubs = {};
2
+ export const addUnsub = (id, unsub) => {
3
+ unsubs[id] = unsub;
4
+ };
5
+ export const unsubAll = () => {
6
+ Object.values(unsubs).forEach((unsub) => {
7
+ unsub();
8
+ });
9
+ };
10
+
11
+ //# sourceMappingURL=state.js.map
12
+
13
+ //# sourceMappingURL=state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/accounts/state.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,MAAM,GAA+B,EAAE,CAAA;AAGpD,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,EAAU,EAAE,KAAiB,EAAE,EAAE;IACxD,MAAM,CAAC,EAAE,CAAC,GAAG,KAAK,CAAA;AACpB,CAAC,CAAA;AAGD,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,EAAE;IAC3B,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;QACtC,KAAK,EAAE,CAAA;IACT,CAAC,CAAC,CAAA;AACJ,CAAC,CAAA","file":"state.js","sourcesContent":["/* @license Copyright 2024 w3ux authors & contributors\nSPDX-License-Identifier: GPL-3.0-only */\n\nexport const unsubs: Record<string, () => void> = {}\n\n// Add an extension id to unsub state\nexport const addUnsub = (id: string, unsub: () => void) => {\n unsubs[id] = unsub\n}\n\n// Unsubscribe to all unsubs\nexport const unsubAll = () => {\n Object.values(unsubs).forEach((unsub) => {\n unsub()\n })\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@w3ux/observables-connect",
3
- "version": "0.9.21",
3
+ "version": "0.9.22",
4
4
  "license": "GPL-3.0-only",
5
5
  "dependencies": {
6
6
  "@w3ux/extension-assets": "^2.2.0",