storion 0.10.1 → 0.11.0

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.
@@ -3,12 +3,12 @@ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { en
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
4
  import { memo, useRef, useMemo, createElement, createContext, useContext, useId, useReducer, useState, useEffect, useLayoutEffect, forwardRef } from "react";
5
5
  import { container } from "../storion.js";
6
- import { append, applyExcept, applyFor, clamp, decrement, divide, forStores, increment, list, map, merge, multiply, prepend, reset, resolver, toggle, trigger, withMeta } from "../storion.js";
7
- import { P as ProviderMissingError, w as withHooks, d as AsyncFunctionError, t as tryStabilize, h as strictEqual, j as ScopedOutsideSelectorError, s as storeTuple, i as isSpec, k as STORION_TYPE, l as resolveEquality, a as store } from "../effect-BDQU8Voz.js";
8
- import { E, H, I, L, z, S, y, x, n, v, e, o, m, p, B, q, u } from "../effect-BDQU8Voz.js";
6
+ import { append, applyExcept, applyFor, clamp, decrement, disposalGroup, divide, forStores, getNamedGroup, increment, list, map, merge, multiply, prepend, reset, resolver, toggle, trigger, withMeta } from "../storion.js";
7
+ import { P as ProviderMissingError, w as withHooks, d as AsyncFunctionError, t as tryStabilize, h as strictEqual, j as ScopedOutsideSelectorError, s as storeTuple, i as isSpec, k as STORION_TYPE, l as dev, m as resolveEquality, a as store } from "../effect-1beiYe_c.js";
8
+ import { E, H, I, L, B, S, z, y, o, x, e, q, n, p, C, v, u } from "../effect-1beiYe_c.js";
9
9
  import { e as emitter } from "../emitter-j4rC71vY.js";
10
10
  import { jsx } from "react/jsx-runtime";
11
- import { m as m2 } from "../meta-40r-AZfe.js";
11
+ import { m } from "../meta-40r-AZfe.js";
12
12
  const StoreContext = createContext(null);
13
13
  const StoreProvider = memo(
14
14
  ({ container: value, children }) => {
@@ -181,8 +181,8 @@ function useStore(selector) {
181
181
  return useStoreWithContainer(selector, container2);
182
182
  }
183
183
  const isServer = typeof window === "undefined";
184
- const useIsomorphicLayoutEffect = isServer ? useEffect : useLayoutEffect;
185
- const shouldScheduleDispose = !isServer && typeof useLayoutEffect === "function";
184
+ const useIsomorphicLayoutEffect = isServer || !dev() ? useEffect : useLayoutEffect;
185
+ const shouldScheduleDispose = !isServer && dev() && typeof useLayoutEffect === "function";
186
186
  class ScopeController {
187
187
  constructor(container2) {
188
188
  /** Whether the effect has committed (is active) */
@@ -409,39 +409,41 @@ export {
409
409
  H as HooksContextError,
410
410
  I as InvalidActionError,
411
411
  L as LifetimeMismatchError,
412
- z as LocalStoreDependencyError,
412
+ B as LocalStoreDependencyError,
413
413
  ProviderMissingError,
414
414
  STORION_TYPE,
415
415
  S as SetupPhaseError,
416
- y as StoreDisposedError,
416
+ z as StoreDisposedError,
417
417
  StoreProvider,
418
- x as StorionError,
418
+ y as StorionError,
419
419
  append,
420
420
  applyExcept,
421
421
  applyFor,
422
- n as batch,
422
+ o as batch,
423
423
  clamp,
424
424
  container,
425
425
  create,
426
426
  decrement,
427
- v as deepEqual,
427
+ x as deepEqual,
428
+ disposalGroup,
428
429
  divide,
429
430
  e as effect,
430
- o as equality,
431
+ q as equality,
431
432
  forStores,
433
+ getNamedGroup,
432
434
  increment,
433
- m as is,
435
+ n as is,
434
436
  list,
435
437
  map,
436
438
  merge,
437
- m2 as meta,
439
+ m as meta,
438
440
  multiply,
439
441
  p as pick,
440
- B as pool,
442
+ C as pool,
441
443
  prepend,
442
444
  reset,
443
445
  resolver,
444
- q as shallowEqual,
446
+ v as shallowEqual,
445
447
  stable,
446
448
  store,
447
449
  strictEqual,
@@ -1 +1 @@
1
- {"version":3,"file":"useStore.d.ts","sourceRoot":"","sources":["../../src/react/useStore.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAWH,OAAO,EAKL,KAAK,cAAc,EAEnB,KAAK,QAAQ,EACb,KAAK,YAAY,EAElB,MAAM,UAAU,CAAC;AA6BlB;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,SAAS,MAAM,EACpD,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,EACrB,SAAS,EAAE,cAAc,GACxB,YAAY,CAAC,CAAC,CAAC,CAyNjB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,wBAAgB,QAAQ,CAAC,CAAC,SAAS,MAAM,EACvC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,GACpB,YAAY,CAAC,CAAC,CAAC,CAKjB"}
1
+ {"version":3,"file":"useStore.d.ts","sourceRoot":"","sources":["../../src/react/useStore.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAWH,OAAO,EAKL,KAAK,cAAc,EAEnB,KAAK,QAAQ,EACb,KAAK,YAAY,EAElB,MAAM,UAAU,CAAC;AA8BlB;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,SAAS,MAAM,EACpD,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,EACrB,SAAS,EAAE,cAAc,GACxB,YAAY,CAAC,CAAC,CAAC,CAyNjB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,wBAAgB,QAAQ,CAAC,CAAC,SAAS,MAAM,EACvC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,GACpB,YAAY,CAAC,CAAC,CAAC,CAKjB"}