@signaldb/mobx 2.0.0-beta.1 → 2.0.0-beta.10

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/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- declare const mobxReactivityAdapter: import("@signaldb/core").ReactivityAdapter<{
1
+ declare const mobxReactivityAdapter: import('@signaldb/core').ReactivityAdapter<{
2
2
  depend: () => void;
3
3
  notify: () => void;
4
4
  raw: {
package/dist/index.mjs CHANGED
@@ -1,26 +1,27 @@
1
- import { onBecomeUnobserved as t, observable as n, runInAction as r } from "mobx";
2
- import { createReactivityAdapter as c } from "@signaldb/core";
3
- const p = c({
4
- create: () => {
5
- const e = n({ count: 0 });
6
- return {
7
- depend: () => {
8
- e.count;
9
- },
10
- notify: () => {
11
- r(() => {
12
- e.count += 1;
13
- });
14
- },
15
- raw: e
16
- };
17
- },
18
- isInScope: void 0,
19
- onDispose(e, { raw: o }) {
20
- t(o, "count", e);
21
- }
1
+ import { observable as e, onBecomeUnobserved as t, runInAction as n } from "mobx";
2
+ import { createReactivityAdapter as r } from "@signaldb/core";
3
+ //#region src/index.ts
4
+ var i = r({
5
+ create: () => {
6
+ let t = e({ count: 0 });
7
+ return {
8
+ depend: () => {
9
+ t.count;
10
+ },
11
+ notify: () => {
12
+ n(() => {
13
+ t.count += 1;
14
+ });
15
+ },
16
+ raw: t
17
+ };
18
+ },
19
+ isInScope: void 0,
20
+ onDispose(e, { raw: n }) {
21
+ t(n, "count", e);
22
+ }
22
23
  });
23
- export {
24
- p as default
25
- };
26
- //# sourceMappingURL=index.mjs.map
24
+ //#endregion
25
+ export { i as default };
26
+
27
+ //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../src/index.ts"],"sourcesContent":["import { observable, runInAction, onBecomeUnobserved, } from 'mobx';\nimport { createReactivityAdapter } from '@signaldb/core';\nconst mobxReactivityAdapter = createReactivityAdapter({\n create: () => {\n const dep = observable({ count: 0 });\n return {\n depend: () => {\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n dep.count;\n },\n notify: () => {\n runInAction(() => {\n dep.count += 1;\n });\n },\n raw: dep,\n };\n },\n isInScope: undefined,\n onDispose(callback, { raw: dep }) {\n onBecomeUnobserved(dep, 'count', callback);\n },\n});\nexport default mobxReactivityAdapter;\n"],"names":["mobxReactivityAdapter","createReactivityAdapter","dep","observable","runInAction","callback","onBecomeUnobserved"],"mappings":";;AAEA,MAAMA,IAAwBC,EAAwB;AAAA,EAClD,QAAQ,MAAM;AACV,UAAMC,IAAMC,EAAW,EAAE,OAAO,GAAG;AACnC,WAAO;AAAA,MACH,QAAQ,MAAM;AAEV,QAAAD,EAAI;AAAA,MACR;AAAA,MACA,QAAQ,MAAM;AACV,QAAAE,EAAY,MAAM;AACd,UAAAF,EAAI,SAAS;AAAA,QACjB,CAAC;AAAA,MACL;AAAA,MACA,KAAKA;AAAA,IAAA;AAAA,EAEb;AAAA,EACA,WAAW;AAAA,EACX,UAAUG,GAAU,EAAE,KAAKH,KAAO;AAC9B,IAAAI,EAAmBJ,GAAK,SAASG,CAAQ;AAAA,EAC7C;AACJ,CAAC;"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["import {\n observable,\n runInAction,\n onBecomeUnobserved,\n} from 'mobx'\nimport { createReactivityAdapter } from '@signaldb/core'\n\nconst mobxReactivityAdapter = createReactivityAdapter({\n create: () => {\n const dep = observable({ count: 0 })\n return {\n depend: () => {\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n dep.count\n },\n notify: () => {\n runInAction(() => {\n dep.count += 1\n })\n },\n raw: dep,\n }\n },\n isInScope: undefined,\n onDispose(callback, { raw: dep }) {\n onBecomeUnobserved(dep, 'count', callback)\n },\n})\n\nexport default mobxReactivityAdapter\n"],"mappings":";;;AAOA,IAAM,IAAwB,EAAwB;CACpD,cAAc;EACZ,IAAM,IAAM,EAAW,EAAE,OAAO,EAAE,CAAC;EACnC,OAAO;GACL,cAAc;IAEZ,EAAI;GACN;GACA,cAAc;IACZ,QAAkB;KAChB,EAAI,SAAS;IACf,CAAC;GACH;GACA,KAAK;EACP;CACF;CACA,WAAW,KAAA;CACX,UAAU,GAAU,EAAE,KAAK,KAAO;EAChC,EAAmB,GAAK,SAAS,CAAQ;CAC3C;AACF,CAAC"}
package/dist/index.umd.js CHANGED
@@ -1,2 +1,2 @@
1
- (function(e,n){typeof exports=="object"&&typeof module<"u"?module.exports=n(require("mobx"),require("@signaldb/core")):typeof define=="function"&&define.amd?define(["mobx","@signaldb/core"],n):(e=typeof globalThis<"u"?globalThis:e||self,e.SignalDB=n(e.mobx,e.core))})(this,(function(e,n){"use strict";return n.createReactivityAdapter({create:()=>{const t=e.observable({count:0});return{depend:()=>{t.count},notify:()=>{e.runInAction(()=>{t.count+=1})},raw:t}},isInScope:void 0,onDispose(t,{raw:o}){e.onBecomeUnobserved(o,"count",t)}})}));
2
- //# sourceMappingURL=index.umd.js.map
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t(require("mobx"),require("@signaldb/core")):typeof define==`function`&&define.amd?define([`mobx`,`@signaldb/core`],t):(e=typeof globalThis<`u`?globalThis:e||self,e.SignalDB=t(e.mobx,e._signaldb_core))})(this,function(e,t){return(0,t.createReactivityAdapter)({create:()=>{let t=(0,e.observable)({count:0});return{depend:()=>{t.count},notify:()=>{(0,e.runInAction)(()=>{t.count+=1})},raw:t}},isInScope:void 0,onDispose(t,{raw:n}){(0,e.onBecomeUnobserved)(n,`count`,t)}})});
2
+ //# sourceMappingURL=index.umd.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.umd.js","sources":["../src/index.ts"],"sourcesContent":["import { observable, runInAction, onBecomeUnobserved, } from 'mobx';\nimport { createReactivityAdapter } from '@signaldb/core';\nconst mobxReactivityAdapter = createReactivityAdapter({\n create: () => {\n const dep = observable({ count: 0 });\n return {\n depend: () => {\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n dep.count;\n },\n notify: () => {\n runInAction(() => {\n dep.count += 1;\n });\n },\n raw: dep,\n };\n },\n isInScope: undefined,\n onDispose(callback, { raw: dep }) {\n onBecomeUnobserved(dep, 'count', callback);\n },\n});\nexport default mobxReactivityAdapter;\n"],"names":["createReactivityAdapter","dep","observable","runInAction","callback","onBecomeUnobserved"],"mappings":"oTAE8BA,EAAAA,wBAAwB,CAClD,OAAQ,IAAM,CACV,MAAMC,EAAMC,EAAAA,WAAW,CAAE,MAAO,EAAG,EACnC,MAAO,CACH,OAAQ,IAAM,CAEVD,EAAI,KACR,EACA,OAAQ,IAAM,CACVE,EAAAA,YAAY,IAAM,CACdF,EAAI,OAAS,CACjB,CAAC,CACL,EACA,IAAKA,CAAA,CAEb,EACA,UAAW,OACX,UAAUG,EAAU,CAAE,IAAKH,GAAO,CAC9BI,qBAAmBJ,EAAK,QAASG,CAAQ,CAC7C,CACJ,CAAC"}
1
+ {"version":3,"file":"index.umd.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["import {\n observable,\n runInAction,\n onBecomeUnobserved,\n} from 'mobx'\nimport { createReactivityAdapter } from '@signaldb/core'\n\nconst mobxReactivityAdapter = createReactivityAdapter({\n create: () => {\n const dep = observable({ count: 0 })\n return {\n depend: () => {\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n dep.count\n },\n notify: () => {\n runInAction(() => {\n dep.count += 1\n })\n },\n raw: dep,\n }\n },\n isInScope: undefined,\n onDispose(callback, { raw: dep }) {\n onBecomeUnobserved(dep, 'count', callback)\n },\n})\n\nexport default mobxReactivityAdapter\n"],"mappings":"gTAOM,EAAA,EAAA,yBAAgD,CACpD,WAAc,CACZ,IAAM,GAAA,EAAA,EAAA,YAAiB,CAAE,MAAO,CAAE,CAAC,EACnC,MAAO,CACL,WAAc,CAEZ,EAAI,KACN,EACA,WAAc,EACZ,EAAA,EAAA,iBAAkB,CAChB,EAAI,OAAS,CACf,CAAC,CACH,EACA,IAAK,CACP,CACF,EACA,UAAW,IAAA,GACX,UAAU,EAAU,CAAE,IAAK,GAAO,EAChC,EAAA,EAAA,oBAAmB,EAAK,QAAS,CAAQ,CAC3C,CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signaldb/mobx",
3
- "version": "2.0.0-beta.1",
3
+ "version": "2.0.0-beta.10",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "build": "rimraf dist && vite build",
@@ -54,5 +54,8 @@
54
54
  "peerDependencies": {
55
55
  "@signaldb/core": "1.x || ^2.0.0-0",
56
56
  "mobx": "6.x.x"
57
+ },
58
+ "devDependencies": {
59
+ "mobx": "^7.0.0"
57
60
  }
58
61
  }