@esportsplus/reactivity 0.1.19 → 0.1.20

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/.editorconfig CHANGED
@@ -1,9 +1,9 @@
1
- root = true
2
-
3
- [*]
4
- indent_style = space
5
- indent_size = 4
6
- charset = utf-8
7
- trim_trailing_whitespace = true
8
- insert_final_newline = true
9
- end_of_line = lf
1
+ root = true
2
+
3
+ [*]
4
+ indent_style = space
5
+ indent_size = 4
6
+ charset = utf-8
7
+ trim_trailing_whitespace = true
8
+ insert_final_newline = true
9
+ end_of_line = lf
package/.gitattributes CHANGED
@@ -1,2 +1,2 @@
1
- # Auto detect text files and perform LF normalization
2
- * text=auto
1
+ # Auto detect text files and perform LF normalization
2
+ * text=auto
@@ -0,0 +1,23 @@
1
+ # To get started with Dependabot version updates, you'll need to specify which
2
+ # package ecosystems to update and where the package manifests are located.
3
+ # Please see the documentation for all configuration options:
4
+ # https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5
+
6
+ version: 2
7
+ registries:
8
+ npm-npmjs:
9
+ token: ${{secrets.NPM_TOKEN}}
10
+ type: npm-registry
11
+ url: https://registry.npmjs.org
12
+ updates:
13
+ - package-ecosystem: "npm"
14
+ directory: "/"
15
+ groups:
16
+ production-dependencies:
17
+ dependency-type: "production"
18
+ development-dependencies:
19
+ dependency-type: "development"
20
+ registries:
21
+ - npm-npmjs
22
+ schedule:
23
+ interval: "daily"
@@ -0,0 +1,7 @@
1
+ name: bump
2
+ on:
3
+ push:
4
+ branches: '**' # only trigger on branches, not on tags
5
+ jobs:
6
+ bump:
7
+ uses: esportsplus/workflows/.github/workflows/bump.yml@main
@@ -0,0 +1,14 @@
1
+ name: publish to npm
2
+ on:
3
+ release:
4
+ types: [published]
5
+ workflow_dispatch:
6
+ workflow_run:
7
+ workflows: [bump]
8
+ types:
9
+ - completed
10
+ jobs:
11
+ publish:
12
+ secrets:
13
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN_PUBLISHING }}
14
+ uses: esportsplus/workflows/.github/workflows/publish.yml@main
@@ -1,19 +1,9 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SIGNAL = exports.ROOT = exports.EFFECT = exports.DISPOSED = exports.DIRTY = exports.COMPUTED = exports.CLEAN = exports.CHECK = void 0;
4
1
  const CLEAN = 0;
5
- exports.CLEAN = CLEAN;
6
2
  const CHECK = 1;
7
- exports.CHECK = CHECK;
8
3
  const DIRTY = 2;
9
- exports.DIRTY = DIRTY;
10
4
  const DISPOSED = 3;
11
- exports.DISPOSED = DISPOSED;
12
5
  const COMPUTED = 0;
13
- exports.COMPUTED = COMPUTED;
14
6
  const EFFECT = 1;
15
- exports.EFFECT = EFFECT;
16
7
  const ROOT = 2;
17
- exports.ROOT = ROOT;
18
8
  const SIGNAL = 3;
19
- exports.SIGNAL = SIGNAL;
9
+ export { CHECK, CLEAN, COMPUTED, DIRTY, DISPOSED, EFFECT, ROOT, SIGNAL };
package/build/index.js CHANGED
@@ -1,34 +1,6 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- var __importDefault = (this && this.__importDefault) || function (mod) {
17
- return (mod && mod.__esModule) ? mod : { "default": mod };
18
- };
19
- Object.defineProperty(exports, "__esModule", { value: true });
20
- exports.signal = exports.root = exports.effect = exports.dispose = exports.computed = exports.reactive = exports.resource = exports.macro = void 0;
21
- var macro_1 = require("./macro");
22
- Object.defineProperty(exports, "macro", { enumerable: true, get: function () { return __importDefault(macro_1).default; } });
23
- var resource_1 = require("./resource");
24
- Object.defineProperty(exports, "resource", { enumerable: true, get: function () { return __importDefault(resource_1).default; } });
25
- var reactive_1 = require("./reactive");
26
- Object.defineProperty(exports, "reactive", { enumerable: true, get: function () { return __importDefault(reactive_1).default; } });
27
- var signal_1 = require("./signal");
28
- Object.defineProperty(exports, "computed", { enumerable: true, get: function () { return signal_1.computed; } });
29
- Object.defineProperty(exports, "dispose", { enumerable: true, get: function () { return signal_1.dispose; } });
30
- Object.defineProperty(exports, "effect", { enumerable: true, get: function () { return signal_1.effect; } });
31
- Object.defineProperty(exports, "root", { enumerable: true, get: function () { return signal_1.root; } });
32
- Object.defineProperty(exports, "signal", { enumerable: true, get: function () { return signal_1.signal; } });
33
- __exportStar(require("./constants"), exports);
34
- __exportStar(require("./types"), exports);
1
+ export { default as macro } from './macro';
2
+ export { default as resource } from './resource';
3
+ export { default as reactive } from './reactive';
4
+ export { computed, dispose, effect, root, signal } from './signal';
5
+ export * from './constants';
6
+ export * from './types';
package/build/macro.d.ts CHANGED
@@ -6,5 +6,5 @@ declare class Macro<A extends unknown[], R> extends CustomFunction {
6
6
  constructor(fn: Function<A, R>, options?: Options);
7
7
  dispose(): void;
8
8
  }
9
- declare const _default: <A extends unknown[], R>(fn: (instance: Computed<(...args: A) => R>) => (...args: A) => R, options?: Options) => Macro<A, R>;
9
+ declare const _default: <A extends unknown[], R>(fn: Function<A, R>, options?: Options) => Macro<A, R>;
10
10
  export default _default;
package/build/macro.js CHANGED
@@ -1,22 +1,17 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const custom_function_1 = __importDefault(require("@esportsplus/custom-function"));
7
- const signal_1 = require("./signal");
8
- class Macro extends custom_function_1.default {
1
+ import CustomFunction from '@esportsplus/custom-function';
2
+ import { computed } from './signal';
3
+ class Macro extends CustomFunction {
9
4
  #factory;
10
5
  constructor(fn, options = {}) {
11
6
  super((...args) => {
12
7
  return this.#factory.get()(...args);
13
8
  });
14
- this.#factory = (0, signal_1.computed)(fn, options);
9
+ this.#factory = computed(fn, options);
15
10
  }
16
11
  dispose() {
17
12
  this.#factory.dispose();
18
13
  }
19
14
  }
20
- exports.default = (fn, options = {}) => {
15
+ export default (fn, options = {}) => {
21
16
  return new Macro(fn, options);
22
17
  };
@@ -1,12 +1,9 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ReactiveObjectArray = exports.ReactiveArray = void 0;
4
- const signal_1 = require("../signal");
5
- const object_1 = require("./object");
1
+ import { dispose, signal } from '../signal';
2
+ import { ReactiveObject } from './object';
6
3
  function factory(data, options = {}) {
7
4
  let signals = [];
8
5
  for (let i = 0, n = data.length; i < n; i++) {
9
- signals.push(new object_1.ReactiveObject(data[i], options));
6
+ signals.push(new ReactiveObject(data[i], options));
10
7
  }
11
8
  return signals;
12
9
  }
@@ -17,7 +14,7 @@ class ReactiveArray extends Array {
17
14
  #signal;
18
15
  constructor(data) {
19
16
  super(...data);
20
- this.#signal = (0, signal_1.signal)(false);
17
+ this.#signal = signal(false);
21
18
  }
22
19
  set length(n) {
23
20
  if (n > this.length) {
@@ -102,7 +99,6 @@ class ReactiveArray extends Array {
102
99
  return length;
103
100
  }
104
101
  }
105
- exports.ReactiveArray = ReactiveArray;
106
102
  class ReactiveObjectArray extends ReactiveArray {
107
103
  #options;
108
104
  constructor(data, options = {}) {
@@ -116,22 +112,22 @@ class ReactiveObjectArray extends ReactiveArray {
116
112
  return unsupported('reverse');
117
113
  }
118
114
  pop() {
119
- return (0, signal_1.dispose)(super.pop());
115
+ return dispose(super.pop());
120
116
  }
121
117
  push(...values) {
122
118
  return super.push(...factory(values, this.#options));
123
119
  }
124
120
  shift() {
125
- return (0, signal_1.dispose)(super.shift());
121
+ return dispose(super.shift());
126
122
  }
127
123
  sort() {
128
124
  return unsupported('sort');
129
125
  }
130
126
  splice(start, deleteCount = super.length, ...values) {
131
- return (0, signal_1.dispose)(super.splice(start, deleteCount, ...factory(values, this.#options)));
127
+ return dispose(super.splice(start, deleteCount, ...factory(values, this.#options)));
132
128
  }
133
129
  unshift(...values) {
134
130
  return super.unshift(...factory(values, this.#options));
135
131
  }
136
132
  }
137
- exports.ReactiveObjectArray = ReactiveObjectArray;
133
+ export { ReactiveArray, ReactiveObjectArray };
@@ -1,6 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const object_1 = require("./object");
4
- exports.default = (data, options) => {
5
- return new object_1.ReactiveObject(data, options);
1
+ import { ReactiveObject } from './object';
2
+ export default (data, options) => {
3
+ return new ReactiveObject(data, options);
6
4
  };
@@ -1,9 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ReactiveObject = void 0;
4
- const signal_1 = require("../signal");
5
- const utilities_1 = require("../utilities");
6
- const array_1 = require("./array");
1
+ import { computed, signal } from '../signal';
2
+ import { defineProperty, isArray } from '../utilities';
3
+ import { ReactiveArray, ReactiveObjectArray } from './array';
7
4
  class ReactiveObject {
8
5
  nodes = {};
9
6
  constructor(data, options = {}) {
@@ -11,23 +8,23 @@ class ReactiveObject {
11
8
  for (let key in data) {
12
9
  let input = data[key];
13
10
  if (typeof input === 'function') {
14
- let node = nodes[key] = (0, signal_1.computed)(input, options);
15
- (0, utilities_1.defineProperty)(this, key, {
11
+ let node = nodes[key] = computed(input, options);
12
+ defineProperty(this, key, {
16
13
  enumerable: true,
17
14
  get() {
18
15
  return node.get();
19
16
  }
20
17
  });
21
18
  }
22
- else if ((0, utilities_1.isArray)(input)) {
19
+ else if (isArray(input)) {
23
20
  let node, test = input[0];
24
21
  if (typeof test === 'object' && test !== null && test?.constructor?.name === 'Object') {
25
- node = nodes[key] = new array_1.ReactiveObjectArray(input, options);
22
+ node = nodes[key] = new ReactiveObjectArray(input, options);
26
23
  }
27
24
  else {
28
- node = nodes[key] = new array_1.ReactiveArray(input);
25
+ node = nodes[key] = new ReactiveArray(input);
29
26
  }
30
- (0, utilities_1.defineProperty)(this, key, {
27
+ defineProperty(this, key, {
31
28
  enumerable: true,
32
29
  get() {
33
30
  node.track();
@@ -36,8 +33,8 @@ class ReactiveObject {
36
33
  });
37
34
  }
38
35
  else {
39
- let node = nodes[key] = (0, signal_1.signal)(input, options);
40
- (0, utilities_1.defineProperty)(this, key, {
36
+ let node = nodes[key] = signal(input, options);
37
+ defineProperty(this, key, {
41
38
  enumerable: true,
42
39
  get() {
43
40
  return node.get();
@@ -56,4 +53,4 @@ class ReactiveObject {
56
53
  }
57
54
  }
58
55
  }
59
- exports.ReactiveObject = ReactiveObject;
56
+ export { ReactiveObject };
package/build/resource.js CHANGED
@@ -1,11 +1,6 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const custom_function_1 = __importDefault(require("@esportsplus/custom-function"));
7
- const signal_1 = require("./signal");
8
- class Resource extends custom_function_1.default {
1
+ import CustomFunction from '@esportsplus/custom-function';
2
+ import { signal } from './signal';
3
+ class Resource extends CustomFunction {
9
4
  #data;
10
5
  #input;
11
6
  #ok;
@@ -31,9 +26,9 @@ class Resource extends custom_function_1.default {
31
26
  this.#ok.set(false);
32
27
  });
33
28
  });
34
- this.#data = (0, signal_1.signal)(undefined, options);
35
- this.#input = (0, signal_1.signal)(null, options);
36
- this.#ok = (0, signal_1.signal)(null, options);
29
+ this.#data = signal(undefined, options);
30
+ this.#input = signal(null, options);
31
+ this.#ok = signal(null, options);
37
32
  }
38
33
  get data() {
39
34
  return this.#data.get();
@@ -50,6 +45,6 @@ class Resource extends custom_function_1.default {
50
45
  this.#ok.dispose();
51
46
  }
52
47
  }
53
- exports.default = (fn, options = {}) => {
48
+ export default (fn, options = {}) => {
54
49
  return new Resource(fn, options);
55
50
  };
package/build/signal.d.ts CHANGED
@@ -20,12 +20,12 @@ declare class Reactive<T> {
20
20
  once<T>(event: Event, listener: Listener<T>): void;
21
21
  set(value: T): T;
22
22
  }
23
- declare const computed: <T>(fn: (instance: Computed<T>) => T, options?: Options) => Computed<T>;
23
+ declare const computed: <T>(fn: Computed<T>['fn'], options?: Options) => Computed<T>;
24
24
  declare const dispose: <T extends {
25
25
  dispose: VoidFunction;
26
- }>(dispose?: T | T[] | null | undefined) => T | T[] | null | undefined;
26
+ }>(dispose?: T[] | T | null) => T | T[] | null | undefined;
27
27
  declare const effect: (fn: Effect['fn']) => Effect;
28
- declare const root: <T>(fn: (instance: Root) => T, scheduler?: Scheduler) => T;
28
+ declare const root: <T>(fn: NeverAsync<(instance: Root) => T>, scheduler?: Scheduler) => T;
29
29
  declare const signal: <T>(value: T, options?: Options) => Signal<T>;
30
30
  export { computed, dispose, effect, root, signal };
31
31
  export { Reactive };
package/build/signal.js CHANGED
@@ -1,8 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Reactive = exports.signal = exports.root = exports.effect = exports.dispose = exports.computed = void 0;
4
- const constants_1 = require("./constants");
5
- const utilities_1 = require("./utilities");
1
+ import { CHECK, CLEAN, COMPUTED, DIRTY, DISPOSED, EFFECT, ROOT, SIGNAL } from './constants';
2
+ import { isArray } from './utilities';
6
3
  let index = 0, observer = null, observers = null, scope = null;
7
4
  class Reactive {
8
5
  changed = null;
@@ -19,7 +16,7 @@ class Reactive {
19
16
  value;
20
17
  constructor(state, type, value) {
21
18
  let root = null;
22
- if (type !== constants_1.ROOT) {
19
+ if (type !== ROOT) {
23
20
  if (scope !== null) {
24
21
  root = scope;
25
22
  }
@@ -27,7 +24,7 @@ class Reactive {
27
24
  root = observer.root;
28
25
  }
29
26
  if (root == null) {
30
- if (type === constants_1.EFFECT) {
27
+ if (type === EFFECT) {
31
28
  throw new Error(`Reactivity: 'effect' cannot be created without a reactive root`);
32
29
  }
33
30
  }
@@ -65,7 +62,7 @@ class Reactive {
65
62
  }
66
63
  }
67
64
  dispose() {
68
- if (this.state === constants_1.DISPOSED) {
65
+ if (this.state === DISPOSED) {
69
66
  return;
70
67
  }
71
68
  this.dispatch('cleanup', this);
@@ -74,10 +71,10 @@ class Reactive {
74
71
  this.listeners = null;
75
72
  this.observers = null;
76
73
  this.sources = null;
77
- this.state = constants_1.DISPOSED;
74
+ this.state = DISPOSED;
78
75
  }
79
76
  get() {
80
- if (this.state === constants_1.DISPOSED) {
77
+ if (this.state === DISPOSED) {
81
78
  return this.value;
82
79
  }
83
80
  if (observer !== null) {
@@ -93,13 +90,13 @@ class Reactive {
93
90
  observers.push(this);
94
91
  }
95
92
  }
96
- if (this.type === constants_1.COMPUTED || this.type === constants_1.EFFECT) {
93
+ if (this.type === COMPUTED || this.type === EFFECT) {
97
94
  sync(this);
98
95
  }
99
96
  return this.value;
100
97
  }
101
98
  on(event, listener) {
102
- if (this.state === constants_1.DIRTY) {
99
+ if (this.state === DIRTY) {
103
100
  if (event !== 'cleanup') {
104
101
  throw new Error(`Reactivity: events set within computed or effects must use the 'cleanup' event name`);
105
102
  }
@@ -129,17 +126,16 @@ class Reactive {
129
126
  this.on(event, listener);
130
127
  }
131
128
  set(value) {
132
- if (this.type !== constants_1.SIGNAL && observer !== this) {
129
+ if (this.type !== SIGNAL && observer !== this) {
133
130
  throw new Error(`Reactivity: 'set' method is only available on signals`);
134
131
  }
135
132
  if (this.changed(this.value, value)) {
136
133
  this.value = value;
137
- notify(this.observers, constants_1.DIRTY);
134
+ notify(this.observers, DIRTY);
138
135
  }
139
136
  return this.value;
140
137
  }
141
138
  }
142
- exports.Reactive = Reactive;
143
139
  function changed(a, b) {
144
140
  return a !== b;
145
141
  }
@@ -150,11 +146,11 @@ function notify(nodes, state) {
150
146
  for (let i = 0, n = nodes.length; i < n; i++) {
151
147
  let node = nodes[i];
152
148
  if (node.state < state) {
153
- if (node.type === constants_1.EFFECT && node.state === constants_1.CLEAN) {
149
+ if (node.type === EFFECT && node.state === CLEAN) {
154
150
  node.root.scheduler(node.task);
155
151
  }
156
152
  node.state = state;
157
- notify(node.observers, constants_1.CHECK);
153
+ notify(node.observers, CHECK);
158
154
  }
159
155
  }
160
156
  }
@@ -172,19 +168,19 @@ function removeSourceObservers(node, start) {
172
168
  }
173
169
  }
174
170
  function sync(node) {
175
- if (node.state === constants_1.CHECK && node.sources !== null) {
171
+ if (node.state === CHECK && node.sources !== null) {
176
172
  for (let i = 0, n = node.sources.length; i < n; i++) {
177
173
  sync(node.sources[i]);
178
- if (node.state === constants_1.DIRTY) {
174
+ if (node.state === DIRTY) {
179
175
  break;
180
176
  }
181
177
  }
182
178
  }
183
- if (node.state === constants_1.DIRTY) {
179
+ if (node.state === DIRTY) {
184
180
  update(node);
185
181
  }
186
182
  else {
187
- node.state = constants_1.CLEAN;
183
+ node.state = CLEAN;
188
184
  }
189
185
  }
190
186
  function update(node) {
@@ -221,7 +217,7 @@ function update(node) {
221
217
  removeSourceObservers(node, index);
222
218
  node.sources.length = index;
223
219
  }
224
- if (node.type === constants_1.COMPUTED) {
220
+ if (node.type === COMPUTED) {
225
221
  node.set(value);
226
222
  }
227
223
  }
@@ -230,19 +226,18 @@ function update(node) {
230
226
  observer = o;
231
227
  observers = os;
232
228
  }
233
- node.state = constants_1.CLEAN;
229
+ node.state = CLEAN;
234
230
  }
235
231
  const computed = (fn, options) => {
236
- let instance = new Reactive(constants_1.DIRTY, constants_1.COMPUTED, undefined);
232
+ let instance = new Reactive(DIRTY, COMPUTED, undefined);
237
233
  instance.changed = options?.changed || changed;
238
234
  instance.fn = fn;
239
235
  return instance;
240
236
  };
241
- exports.computed = computed;
242
237
  const dispose = (dispose) => {
243
238
  if (dispose == null) {
244
239
  }
245
- else if ((0, utilities_1.isArray)(dispose)) {
240
+ else if (isArray(dispose)) {
246
241
  for (let i = 0, n = dispose.length; i < n; i++) {
247
242
  dispose[i].dispose();
248
243
  }
@@ -252,19 +247,17 @@ const dispose = (dispose) => {
252
247
  }
253
248
  return dispose;
254
249
  };
255
- exports.dispose = dispose;
256
250
  const effect = (fn) => {
257
- let instance = new Reactive(constants_1.DIRTY, constants_1.EFFECT, null);
251
+ let instance = new Reactive(DIRTY, EFFECT, null);
258
252
  instance.fn = fn;
259
253
  instance.task = () => instance.get();
260
254
  update(instance);
261
255
  return instance;
262
256
  };
263
- exports.effect = effect;
264
257
  const root = (fn, scheduler) => {
265
258
  let o = observer, s = scope;
266
259
  if (scheduler === undefined) {
267
- if (o?.type === constants_1.EFFECT) {
260
+ if (o?.type === EFFECT) {
268
261
  scope = o.root;
269
262
  }
270
263
  if (scope === null) {
@@ -273,7 +266,7 @@ const root = (fn, scheduler) => {
273
266
  scheduler = scope.scheduler;
274
267
  }
275
268
  observer = null;
276
- scope = new Reactive(constants_1.CLEAN, constants_1.ROOT, null);
269
+ scope = new Reactive(CLEAN, ROOT, null);
277
270
  scope.scheduler = scheduler;
278
271
  scope.tracking = fn.length > 0;
279
272
  let result = fn.call(null, scope);
@@ -281,10 +274,10 @@ const root = (fn, scheduler) => {
281
274
  scope = s;
282
275
  return result;
283
276
  };
284
- exports.root = root;
285
277
  const signal = (value, options) => {
286
- let instance = new Reactive(constants_1.CLEAN, constants_1.SIGNAL, value);
278
+ let instance = new Reactive(CLEAN, SIGNAL, value);
287
279
  instance.changed = options?.changed || changed;
288
280
  return instance;
289
281
  };
290
- exports.signal = signal;
282
+ export { computed, dispose, effect, root, signal };
283
+ export { Reactive };
package/build/types.js CHANGED
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
@@ -1,7 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isArray = exports.defineProperty = void 0;
4
1
  const { isArray } = Array;
5
- exports.isArray = isArray;
6
2
  const { defineProperty } = Object;
7
- exports.defineProperty = defineProperty;
3
+ export { defineProperty, isArray };
package/package.json CHANGED
@@ -1,20 +1,20 @@
1
- {
2
- "author": "ICJR",
3
- "dependencies": {
4
- "@esportsplus/custom-function": "^0.0.1"
5
- },
6
- "devDependencies": {
7
- "@esportsplus/typescript": "^0.0.16"
8
- },
9
- "main": "build/index.js",
10
- "name": "@esportsplus/reactivity",
11
- "private": false,
12
- "scripts": {
13
- "build": "tsc && tsc-alias",
14
- "-": "-",
15
- "prepare": "npm run build",
16
- "prepublishOnly": "npm run build"
17
- },
18
- "types": "build/index.d.ts",
19
- "version": "0.1.19"
20
- }
1
+ {
2
+ "author": "ICJR",
3
+ "dependencies": {
4
+ "@esportsplus/custom-function": "^0.0.1"
5
+ },
6
+ "devDependencies": {
7
+ "@esportsplus/typescript": "^0.0.21"
8
+ },
9
+ "main": "build/index.js",
10
+ "name": "@esportsplus/reactivity",
11
+ "private": false,
12
+ "scripts": {
13
+ "build": "tsc && tsc-alias",
14
+ "-": "-",
15
+ "prepare": "npm run build",
16
+ "prepublishOnly": "npm run build"
17
+ },
18
+ "types": "build/index.d.ts",
19
+ "version": "0.1.20"
20
+ }
package/readme.md CHANGED
@@ -1,2 +1,2 @@
1
- https://github.com/maverick-js/signals
1
+ https://github.com/maverick-js/signals
2
2
  https://github.com/modderme123/reactively
package/src/constants.ts CHANGED
@@ -1,19 +1,19 @@
1
- const CLEAN = 0;
2
-
3
- const CHECK = 1;
4
-
5
- const DIRTY = 2;
6
-
7
- const DISPOSED = 3;
8
-
9
-
10
- const COMPUTED = 0;
11
-
12
- const EFFECT = 1;
13
-
14
- const ROOT = 2;
15
-
16
- const SIGNAL = 3;
17
-
18
-
1
+ const CLEAN = 0;
2
+
3
+ const CHECK = 1;
4
+
5
+ const DIRTY = 2;
6
+
7
+ const DISPOSED = 3;
8
+
9
+
10
+ const COMPUTED = 0;
11
+
12
+ const EFFECT = 1;
13
+
14
+ const ROOT = 2;
15
+
16
+ const SIGNAL = 3;
17
+
18
+
19
19
  export { CHECK, CLEAN, COMPUTED, DIRTY, DISPOSED, EFFECT, ROOT, SIGNAL };