rask-ui 0.18.2 → 0.18.3

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/component.js CHANGED
@@ -1,7 +1,6 @@
1
1
  import { createComponentVNode, Component, } from "inferno";
2
2
  import { getCurrentObserver, Observer, Signal } from "./observation";
3
3
  import { syncBatch } from "./batch";
4
- import { PROXY_MARKER } from "./useState";
5
4
  export class RaskStatelessComponent extends Component {
6
5
  isNotified = false;
7
6
  isReconciling = false;
@@ -183,12 +182,6 @@ function createReactiveProps(comp) {
183
182
  reactiveProps[prop] = value;
184
183
  continue;
185
184
  }
186
- // Skip objects/arrays - they're already reactive if they're proxies
187
- // No need to wrap them in additional signals
188
- if (typeof value === "object" && value !== null && PROXY_MARKER in value) {
189
- reactiveProps[prop] = value;
190
- continue;
191
- }
192
185
  // Only create reactive getters for primitives
193
186
  Object.defineProperty(reactiveProps, prop, {
194
187
  enumerable: true,
@@ -77,7 +77,7 @@ export declare class Observer {
77
77
  private subsHead;
78
78
  private subsTail;
79
79
  private readonly onNotify;
80
- constructor(onNotify: () => void);
80
+ constructor(onNotify: () => void, shouldQueue?: boolean);
81
81
  /** Called from Signal.notify() */
82
82
  _notify(): void;
83
83
  /** Subscribe this observer to a signal */
@@ -1 +1 @@
1
- {"version":3,"file":"observation.d.ts","sourceRoot":"","sources":["../src/observation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AASH,wBAAgB,kBAAkB,yBAEjC;AAED;;;GAGG;AACH,cAAM,YAAY;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,QAAQ,CAAC;IAGnB,YAAY,EAAE,YAAY,GAAG,IAAI,CAAQ;IACzC,YAAY,EAAE,YAAY,GAAG,IAAI,CAAQ;IAGzC,cAAc,EAAE,YAAY,GAAG,IAAI,CAAQ;IAC3C,cAAc,EAAE,YAAY,GAAG,IAAI,CAAQ;I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Gd,cAAc,EAAE,MAAM,CAAC;gBAEX,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM;CAK9D;AAED;;GAEG;AACH,qBAAa,MAAM;IACjB,OAAO,CAAC,IAAI,CAA6B;IACzC,OAAO,CAAC,IAAI,CAA6B;IAGzC,OAAO,CAAC,KAAK,CAAK;IAElB,8DAA8D;IAC9D,UAAU,CAAC,QAAQ,EAAE,QAAQ,GAAG,YAAY;IAe5C,wDAAwD;IACxD,YAAY,CAAC,GAAG,EAAE,YAAY;IAe9B;;OAEG;IACH,MAAM;CAgBP;AAED;;;GAGG;AACH,qBAAa,QAAQ;IACnB,UAAU,UAAS;IAGnB,OAAO,CAAC,QAAQ,CAA6B;IAC7C,OAAO,CAAC,QAAQ,CAA6B;IAG7C,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAa;gBAE1B,QAAQ,EAAE,MAAM,IAAI,EAAE,WAAW,UAAO;IAcpD,kCAAkC;IAClC,OAAO;IAMP,0CAA0C;IAC1C,eAAe,CAAC,MAAM,EAAE,MAAM;IAe9B,oDAAoD;IACpD,OAAO,CAAC,YAAY;IAiBpB,kCAAkC;IAClC,OAAO;IAUP,sCAAsC;IACtC,OAAO;CAKR"}
@@ -133,14 +133,19 @@ export class Observer {
133
133
  subsTail = null;
134
134
  // Only ONE notify callback closure per observer
135
135
  onNotify;
136
- constructor(onNotify) {
136
+ constructor(onNotify, shouldQueue = true) {
137
137
  const onNotifyQueued = onNotify;
138
138
  onNotifyQueued.__queued = false;
139
- this.onNotify = () => {
140
- if (onNotifyQueued.__queued)
141
- return;
142
- queue(onNotify);
143
- };
139
+ if (shouldQueue) {
140
+ this.onNotify = () => {
141
+ if (onNotifyQueued.__queued)
142
+ return;
143
+ queue(onNotify);
144
+ };
145
+ }
146
+ else {
147
+ this.onNotify = onNotify;
148
+ }
144
149
  }
145
150
  /** Called from Signal.notify() */
146
151
  _notify() {
@@ -23,7 +23,7 @@ export function useDerived(computed) {
23
23
  value,
24
24
  });
25
25
  }
26
- });
26
+ }, false);
27
27
  useCleanup(() => computedObserver.dispose());
28
28
  Object.defineProperty(proxy, prop, {
29
29
  enumerable: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rask-ui",
3
- "version": "0.18.2",
3
+ "version": "0.18.3",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",