storion 0.11.1 → 0.11.2

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.
@@ -0,0 +1,6 @@
1
+ function isPromiseLike(value) {
2
+ return typeof value === "object" && value !== null && "then" in value && typeof value.then === "function";
3
+ }
4
+ export {
5
+ isPromiseLike as i
6
+ };
@@ -1,7 +1,5 @@
1
1
  import { m as meta } from "../meta-40r-AZfe.js";
2
- function isPromiseLike(value) {
3
- return typeof value === "object" && value !== null && "then" in value && typeof value.then === "function";
4
- }
2
+ import { i as isPromiseLike } from "../isPromiseLike-bFkfHAbm.js";
5
3
  const notPersisted = meta();
6
4
  function persist(options) {
7
5
  const { filter, fields, handler, onError, force = false } = options;
@@ -4,11 +4,11 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
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
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";
7
+ import { P as ProviderMissingError, w as withHooks, e as AsyncFunctionError, t as tryStabilize, s as strictEqual, S as ScopedOutsideSelectorError, f as storeTuple, g as isSpec, h as STORION_TYPE, j as dev, k as resolveEquality, l as store } from "../effect-BfoYEdFF.js";
8
+ import { E, H, I, L, C, z, B, y, n, x, o, q, m, p, D, v, u } from "../effect-BfoYEdFF.js";
9
9
  import { e as emitter } from "../emitter-j4rC71vY.js";
10
10
  import { jsx } from "react/jsx-runtime";
11
- import { m } from "../meta-40r-AZfe.js";
11
+ import { m as m2 } from "../meta-40r-AZfe.js";
12
12
  const StoreContext = createContext(null);
13
13
  const StoreProvider = memo(
14
14
  ({ container: value, children }) => {
@@ -409,17 +409,17 @@ export {
409
409
  H as HooksContextError,
410
410
  I as InvalidActionError,
411
411
  L as LifetimeMismatchError,
412
- B as LocalStoreDependencyError,
412
+ C as LocalStoreDependencyError,
413
413
  ProviderMissingError,
414
414
  STORION_TYPE,
415
- S as SetupPhaseError,
416
- z as StoreDisposedError,
415
+ z as SetupPhaseError,
416
+ B as StoreDisposedError,
417
417
  StoreProvider,
418
418
  y as StorionError,
419
419
  append,
420
420
  applyExcept,
421
421
  applyFor,
422
- o as batch,
422
+ n as batch,
423
423
  clamp,
424
424
  container,
425
425
  create,
@@ -427,19 +427,19 @@ export {
427
427
  x as deepEqual,
428
428
  disposalGroup,
429
429
  divide,
430
- e as effect,
430
+ o as effect,
431
431
  q as equality,
432
432
  forStores,
433
433
  getNamedGroup,
434
434
  increment,
435
- n as is,
435
+ m as is,
436
436
  list,
437
437
  map,
438
438
  merge,
439
- m as meta,
439
+ m2 as meta,
440
440
  multiply,
441
441
  p as pick,
442
- C as pool,
442
+ D as pool,
443
443
  prepend,
444
444
  reset,
445
445
  resolver,
package/dist/storion.js CHANGED
@@ -1,7 +1,7 @@
1
- import { D as tryDispose, i as isSpec, u as untrack, k as STORION_TYPE, o as batch, F as unwrapFn, v as shallowEqual, m as resolveEquality } from "./effect-1beiYe_c.js";
2
- import { d, E, H, I, L, B, P, S, z, y, x, e, q, n, p, C, a, h } from "./effect-1beiYe_c.js";
1
+ import { F as tryDispose, g as isSpec, u as untrack, h as STORION_TYPE, n as batch, G as unwrapFn, v as shallowEqual, k as resolveEquality } from "./effect-BfoYEdFF.js";
2
+ import { e, E, H, I, L, C, P, z, B, y, x, o, q, m, p, D, l, s } from "./effect-BfoYEdFF.js";
3
3
  import { e as emitter } from "./emitter-j4rC71vY.js";
4
- import { m } from "./meta-40r-AZfe.js";
4
+ import { m as m2 } from "./meta-40r-AZfe.js";
5
5
  function createMetaQuery(entries) {
6
6
  const entryArray = Array.isArray(entries) ? entries : entries ? [entries] : [];
7
7
  const single = (type) => {
@@ -557,7 +557,7 @@ function list(options) {
557
557
  }
558
558
  }
559
559
  if (removed.length === 0) return 0;
560
- const sortedIndices = [...indicesToRemove].sort((a2, b) => b - a2);
560
+ const sortedIndices = [...indicesToRemove].sort((a, b) => b - a);
561
561
  batch(() => {
562
562
  setter((draft) => {
563
563
  const arr = draft ?? [];
@@ -597,7 +597,7 @@ function list(options) {
597
597
  }
598
598
  }
599
599
  if (removed.length === 0) return 0;
600
- const sortedIndices = [...indicesToRemove].sort((a2, b) => b - a2);
600
+ const sortedIndices = [...indicesToRemove].sort((a, b) => b - a);
601
601
  batch(() => {
602
602
  setter((draft) => {
603
603
  const arr = draft ?? [];
@@ -1106,16 +1106,16 @@ function withMeta(factory, meta) {
1106
1106
  });
1107
1107
  }
1108
1108
  export {
1109
- d as AsyncFunctionError,
1109
+ e as AsyncFunctionError,
1110
1110
  E as EffectRefreshError,
1111
1111
  H as HooksContextError,
1112
1112
  I as InvalidActionError,
1113
1113
  L as LifetimeMismatchError,
1114
- B as LocalStoreDependencyError,
1114
+ C as LocalStoreDependencyError,
1115
1115
  P as ProviderMissingError,
1116
1116
  STORION_TYPE,
1117
- S as SetupPhaseError,
1118
- z as StoreDisposedError,
1117
+ z as SetupPhaseError,
1118
+ B as StoreDisposedError,
1119
1119
  y as StorionError,
1120
1120
  append,
1121
1121
  applyExcept,
@@ -1127,25 +1127,25 @@ export {
1127
1127
  x as deepEqual,
1128
1128
  disposalGroup,
1129
1129
  divide,
1130
- e as effect,
1130
+ o as effect,
1131
1131
  q as equality,
1132
1132
  forStores,
1133
1133
  getNamedGroup,
1134
1134
  increment,
1135
- n as is,
1135
+ m as is,
1136
1136
  list,
1137
1137
  map,
1138
1138
  merge,
1139
- m as meta,
1139
+ m2 as meta,
1140
1140
  multiply,
1141
1141
  p as pick,
1142
- C as pool,
1142
+ D as pool,
1143
1143
  prepend,
1144
1144
  reset,
1145
1145
  createResolver as resolver,
1146
1146
  shallowEqual,
1147
- a as store,
1148
- h as strictEqual,
1147
+ l as store,
1148
+ s as strictEqual,
1149
1149
  toggle,
1150
1150
  trigger,
1151
1151
  untrack,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "storion",
3
- "version": "0.11.1",
3
+ "version": "0.11.2",
4
4
  "description": "Reactive stores for modern apps. Type-safe. Auto-tracked. Effortlessly composable",
5
5
  "type": "module",
6
6
  "main": "./dist/storion.js",