@ludekarts/minirdx 0.5.0-beta.1 → 0.5.0-beta.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.
package/dist/index.d.ts CHANGED
@@ -1,11 +1,14 @@
1
1
  export type Action<S> = (state: () => S, ...args: any[]) => S | Promise<S>;
2
+ type ActionEventName<A> = keyof A | "link";
3
+ type Middleware<S> = (state: () => S, actionName: string) => S | Promise<S>;
2
4
  type OmitFirstParam<T extends (...args: any[]) => any> = T extends (state: any, ...args: infer P) => any ? P : never;
3
5
  export interface Store<S, A extends Record<string, Action<S>>> {
4
6
  state: () => S;
5
7
  actions: {
6
8
  [K in keyof A]: (...args: OmitFirstParam<A[K]>) => Promise<S>;
7
9
  };
8
- on: (action: keyof A | ((state: S, actionName: keyof A) => void), listener?: (state: S, actionName: keyof A) => void) => () => void;
10
+ on: (action: keyof A | ((state: S, actionName: ActionEventName<A>) => void), listener?: (state: S, actionName: ActionEventName<A>) => void) => () => void;
11
+ tap: (action: keyof A | Middleware<S>, middleware?: Middleware<S>) => () => void;
9
12
  }
10
13
  export declare function createStore<S, A extends Record<string, Action<S>>>(config: {
11
14
  state: S;
@@ -14,7 +17,7 @@ export declare function createStore<S, A extends Record<string, Action<S>>>(conf
14
17
  export declare function selector<S, Args extends any[]>(path: string, action: (...args: Args) => any): (state: () => S, ...args: OmitFirstParam<typeof action>) => S | Promise<S>;
15
18
  type SelectorObject<V> = {
16
19
  getter: (state: unknown) => V;
17
- setter: (_state: unknown, value: V) => V;
20
+ setter: (state: unknown, value: V) => V;
18
21
  };
19
22
  export declare function createSelector<V>(selector: string): SelectorObject<V>;
20
23
  export declare function link<T>(...args: any[]): Readonly<{
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=["on","state","actions"];function _(t){let{state:n,actions:a}=t;const r=[],s=new Map;E(n,(e,o)=>{if(b(e)){const{setter:u}=g(`state.${o}`),i=c=>{u(l(),c),y()};e._rdx_link_(i)}});const f=Object.fromEntries(Object.entries(a).map(([e,o])=>{if($.includes(e))throw new Error(`MiniRdxError: "${e}" is a reserved keyword`);if(typeof o!="function")throw new Error(`MiniRdxError: "${e}" should be a function`);return[e,(...u)=>new Promise((i,c)=>{p(e,w=>o(w,...u),i,c)})]}));function p(e,o,u,i){try{const c=o(l);S(c)?c.then(w=>d(w,e,u)).catch(i):d(c,e,u)}catch(c){i(c)}}function d(e,o,u){var i;n=e,r.length&&r.forEach(c=>c(n,o)),(i=s.get(o))==null||i.forEach(c=>c(n,o)),u(n)}function l(){return n}function y(){const e=x(n)?{...n}:Array.isArray(n)?[...n]:n;r.length&&r.forEach(o=>o(e,"link"))}function h(e,o){var u;if(typeof e=="function"&&o===void 0)return r.push(e),()=>{const i=r.indexOf(e);i>=0&&r.splice(i,1)};if(typeof e=="string"&&o)return s.has(e)||s.set(e,[]),(u=s.get(e))==null||u.push(o),()=>{const i=s.get(e);if(!i)return;const c=i.indexOf(o);c>=0&&i.splice(c,1)};throw new Error("MiniRdxError: Invalid arguments. Try: state.on(action: string, listener: ActionListener)")}return{state:l,actions:f,on:h}}function m(t,n){const{getter:a,setter:r}=g(t),s=f=>Array.isArray(f)?[...f]:x(f)?{...f}:f;return function(p,...d){const l=n(a(p()),...d);if(S(l))return Promise.resolve(l).then(h=>{const e=r(p(),h);return s(e)});const y=r(p(),l);return s(y)}}function g(t){if(/^state\.[\w\[\]\d\.]+$/.test(t))return{getter:new Function("state",`return ${t}`),setter:new Function("state","value",`{${t} = value; return state;}`)};throw new Error('MiniRDXError: Selector should be a string with dot notation starting with "state." e.g.: "state.user.cars[1].model" ')}function A(...t){return Object.freeze({_rdx_link_:n=>{const a=t.pop(),r=t,s=()=>{n(a(...r.map(f=>f.state())))};r.forEach(f=>f.on(()=>s())),s()}})}function S(t){return!!t&&(typeof t=="object"||typeof t=="function")&&typeof t.then=="function"}function E(t,n,a=""){if(!(typeof t!="object"||t===null)){for(const r in t)if(O(t,r)){const s=t[r],f=/\d+/.test(r)?`[${r}]`:`.${r}`,p=a?`${a}${f}`:r;n(s,p),typeof s=="object"&&s!==null&&E(s,n,p)}}}function b(t){return t!==null&&typeof t=="object"&&O(t,"_rdx_link_")}function O(t,n){return Object.prototype.hasOwnProperty.call(t,n)}function x(t){return!!t&&typeof t!="symbol"&&typeof t!="string"&&typeof t!="number"&&typeof t!="boolean"&&typeof t!="function"&&!Array.isArray(t)}exports.createSelector=g;exports.createStore=_;exports.link=A;exports.selector=m;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=["on","tap","state","actions"];function P(t){let{state:e,actions:u}=t;const r=[],s=new Map,o=new Map;_(e,(n,i)=>{if(T(n)){const{setter:l}=A(`state.${i}`),f=c=>{l(y(),c),S()};n._rdx_link_(f)}});const a=Object.fromEntries(Object.entries(u).map(([n,i])=>{if(k.includes(n))throw new Error(`MiniRdxError: "${n}" is a reserved keyword`);if(typeof i!="function")throw new Error(`MiniRdxError: "${n}" should be a function`);return[n,(...l)=>new Promise((f,c)=>{p(n,i,l,f,c)})]}));function p(n,i,l,f,c){try{const d=L(n),w=h=>i(h,...l);g(d,n).then(()=>Promise.resolve(w(y))).then(h=>E(h,n,f)).catch(c)}catch(d){c(d)}}function g(n,i){return n.reduce((l,f)=>l.then(()=>Promise.resolve(f(y,i))).then(c=>{e=c}),Promise.resolve())}function E(n,i,l){var f;e=n,r.length&&r.forEach(c=>c(e,i)),(f=s.get(i))==null||f.forEach(c=>c(e,i)),l(e)}function y(){return e}function S(){const n=m(e)?{...e}:Array.isArray(e)?[...e]:e;e=n,r.length&&r.forEach(i=>i(n,"link"))}function x(n,i){var l;if(typeof n=="function"&&i===void 0)return r.push(n),()=>{const f=r.indexOf(n);f>=0&&r.splice(f,1)};if(typeof n=="string"&&i)return s.has(n)||s.set(n,[]),(l=s.get(n))==null||l.push(i),()=>{const f=s.get(n);if(!f)return;const c=f.indexOf(i);c>=0&&f.splice(c,1)};throw new Error("MiniRdxError: Invalid arguments. Try: state.on(action: string, listener: ActionListener)")}function I(n,i){var w;const c=typeof n=="function"&&i===void 0?"*":typeof n=="string"&&typeof i=="function"?n:null,d=typeof i=="function"?i:n;if(c===null||typeof d!="function")throw new Error("MiniRdxError: Invalid arguments. Try: state.tap(actionName, middleware)");return!o.has(c)&&o.set(c,[]),(w=o.get(c))==null||w.push(d),()=>{const h=o.get(c);if(!h)return;const O=h.indexOf(d);O>=0&&h.splice(O,1)}}function L(n){const i=o.get("*")||[],l=o.get(n)||[];return[...i,...l]}return{state:y,on:x,actions:a,tap:I}}function $(t,e){const{getter:u,setter:r}=A(t),s=o=>Array.isArray(o)?[...o]:m(o)?{...o}:o;return function(a,...p){const g=e(u(a()),...p);if(b(g))return Promise.resolve(g).then(y=>{const S=r(a(),y);return s(S)});const E=r(a(),g);return s(E)}}function A(t){const e=R(t);return{getter:u=>{let r=u;for(const s of e)r=r[s];return r},setter:(u,r)=>{let s=u;for(let o=0;o<e.length-1;o++)s=s[e[o]];return s[e[e.length-1]]=r,u}}}function R(t){if(!/^state(?:\.[A-Za-z_$][\w$]*|\[\d+\])+$/.test(t))throw new Error('MiniRDXError: Selector should be a string with dot notation starting with "state." e.g.: "state.user.cars[1].model" ');const e=t.slice(6),u=[];let r=0;for(;r<e.length;){const s=e[r];if(s==="."){r++;continue}if(s==="["){const a=e.indexOf("]",r+1),p=e.slice(r+1,a);u.push(Number(p)),r=a+1;continue}let o=r;for(;o<e.length&&/[\w$]/.test(e[o]);)o++;u.push(e.slice(r,o)),r=o}return u}function D(...t){return Object.freeze({_rdx_link_:e=>{const u=t.pop(),r=t,s=()=>{e(u(...r.map(o=>o.state())))};r.forEach(o=>o.on(()=>s())),s()}})}function b(t){return!!t&&(typeof t=="object"||typeof t=="function")&&typeof t.then=="function"}function _(t,e,u="",r=new WeakSet){if(!(typeof t!="object"||t===null)&&!r.has(t)){r.add(t);for(const s in t)if(M(t,s)){const o=t[s],a=/\d+/.test(s)?`[${s}]`:`.${s}`,p=u?`${u}${a}`:s;e(o,p),typeof o=="object"&&o!==null&&_(o,e,p,r)}}}function T(t){return t!==null&&typeof t=="object"&&M(t,"_rdx_link_")}function M(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function m(t){return!!t&&typeof t!="symbol"&&typeof t!="string"&&typeof t!="number"&&typeof t!="boolean"&&typeof t!="function"&&!Array.isArray(t)}exports.createSelector=A;exports.createStore=P;exports.link=D;exports.selector=$;
@@ -1,140 +1,191 @@
1
- const $ = ["on", "state", "actions"];
2
- function A(t) {
3
- let { state: e, actions: a } = t;
4
- const r = [], s = /* @__PURE__ */ new Map();
5
- x(e, (n, o) => {
6
- if (_(n)) {
7
- const { setter: u } = g(`state.${o}`), i = (c) => {
8
- u(d(), c), l();
1
+ const k = ["on", "tap", "state", "actions"];
2
+ function D(t) {
3
+ let { state: e, actions: u } = t;
4
+ const r = [], s = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
5
+ S(e, (n, i) => {
6
+ if (R(n)) {
7
+ const { setter: l } = O(`state.${i}`), f = (c) => {
8
+ l(y(), c), A();
9
9
  };
10
- n._rdx_link_(i);
10
+ n._rdx_link_(f);
11
11
  }
12
12
  });
13
- const f = Object.fromEntries(
14
- Object.entries(a).map(([n, o]) => {
15
- if ($.includes(n))
13
+ const a = Object.fromEntries(
14
+ Object.entries(u).map(([n, i]) => {
15
+ if (k.includes(n))
16
16
  throw new Error(`MiniRdxError: "${n}" is a reserved keyword`);
17
- if (typeof o != "function")
17
+ if (typeof i != "function")
18
18
  throw new Error(`MiniRdxError: "${n}" should be a function`);
19
19
  return [
20
20
  n,
21
- (...u) => new Promise((i, c) => {
22
- p(
23
- n,
24
- (w) => o(w, ...u),
25
- i,
26
- c
27
- );
21
+ (...l) => new Promise((f, c) => {
22
+ p(n, i, l, f, c);
28
23
  })
29
24
  ];
30
25
  })
31
26
  );
32
- function p(n, o, u, i) {
27
+ function p(n, i, l, f, c) {
33
28
  try {
34
- const c = o(d);
35
- E(c) ? c.then(
36
- (w) => y(w, n, u)
37
- ).catch(i) : y(c, n, u);
38
- } catch (c) {
39
- i(c);
29
+ const d = m(n), g = (h) => i(h, ...l);
30
+ w(d, n).then(() => Promise.resolve(g(y))).then(
31
+ (h) => E(h, n, f)
32
+ ).catch(c);
33
+ } catch (d) {
34
+ c(d);
40
35
  }
41
36
  }
42
- function y(n, o, u) {
43
- var i;
44
- e = n, r.length && r.forEach((c) => c(e, o)), (i = s.get(o)) == null || i.forEach((c) => c(e, o)), u(e);
37
+ function w(n, i) {
38
+ return n.reduce(
39
+ (l, f) => l.then(() => Promise.resolve(f(y, i))).then((c) => {
40
+ e = c;
41
+ }),
42
+ Promise.resolve()
43
+ );
44
+ }
45
+ function E(n, i, l) {
46
+ var f;
47
+ e = n, r.length && r.forEach((c) => c(e, i)), (f = s.get(i)) == null || f.forEach((c) => c(e, i)), l(e);
45
48
  }
46
- function d() {
49
+ function y() {
47
50
  return e;
48
51
  }
49
- function l() {
50
- const n = S(e) ? { ...e } : Array.isArray(e) ? [...e] : e;
51
- r.length && r.forEach((o) => o(n, "link"));
52
+ function A() {
53
+ const n = M(e) ? { ...e } : Array.isArray(e) ? [...e] : e;
54
+ e = n, r.length && r.forEach((i) => i(n, "link"));
52
55
  }
53
- function h(n, o) {
54
- var u;
55
- if (typeof n == "function" && o === void 0)
56
+ function I(n, i) {
57
+ var l;
58
+ if (typeof n == "function" && i === void 0)
56
59
  return r.push(n), () => {
57
- const i = r.indexOf(n);
58
- i >= 0 && r.splice(i, 1);
60
+ const f = r.indexOf(n);
61
+ f >= 0 && r.splice(f, 1);
59
62
  };
60
- if (typeof n == "string" && o)
61
- return s.has(n) || s.set(n, []), (u = s.get(n)) == null || u.push(o), () => {
62
- const i = s.get(n);
63
- if (!i) return;
64
- const c = i.indexOf(o);
65
- c >= 0 && i.splice(c, 1);
63
+ if (typeof n == "string" && i)
64
+ return s.has(n) || s.set(n, []), (l = s.get(n)) == null || l.push(i), () => {
65
+ const f = s.get(n);
66
+ if (!f) return;
67
+ const c = f.indexOf(i);
68
+ c >= 0 && f.splice(c, 1);
66
69
  };
67
70
  throw new Error(
68
71
  "MiniRdxError: Invalid arguments. Try: state.on(action: string, listener: ActionListener)"
69
72
  );
70
73
  }
74
+ function L(n, i) {
75
+ var g;
76
+ const c = typeof n == "function" && i === void 0 ? "*" : typeof n == "string" && typeof i == "function" ? n : null, d = typeof i == "function" ? i : n;
77
+ if (c === null || typeof d != "function")
78
+ throw new Error(
79
+ "MiniRdxError: Invalid arguments. Try: state.tap(actionName, middleware)"
80
+ );
81
+ return !o.has(c) && o.set(c, []), (g = o.get(c)) == null || g.push(d), () => {
82
+ const h = o.get(c);
83
+ if (!h) return;
84
+ const _ = h.indexOf(d);
85
+ _ >= 0 && h.splice(_, 1);
86
+ };
87
+ }
88
+ function m(n) {
89
+ const i = o.get("*") || [], l = o.get(n) || [];
90
+ return [...i, ...l];
91
+ }
71
92
  return {
72
- state: d,
73
- actions: f,
74
- on: h
93
+ state: y,
94
+ on: I,
95
+ actions: a,
96
+ tap: L
75
97
  };
76
98
  }
77
- function m(t, e) {
78
- const { getter: a, setter: r } = g(t), s = (f) => Array.isArray(f) ? [...f] : S(f) ? { ...f } : f;
79
- return function(p, ...y) {
80
- const d = e(a(p()), ...y);
81
- if (E(d))
82
- return Promise.resolve(d).then((h) => {
83
- const n = r(p(), h);
84
- return s(n);
99
+ function T(t, e) {
100
+ const { getter: u, setter: r } = O(t), s = (o) => Array.isArray(o) ? [...o] : M(o) ? { ...o } : o;
101
+ return function(a, ...p) {
102
+ const w = e(u(a()), ...p);
103
+ if ($(w))
104
+ return Promise.resolve(w).then((y) => {
105
+ const A = r(a(), y);
106
+ return s(A);
85
107
  });
86
- const l = r(p(), d);
87
- return s(l);
108
+ const E = r(a(), w);
109
+ return s(E);
88
110
  };
89
111
  }
90
- function g(t) {
91
- if (/^state\.[\w\[\]\d\.]+$/.test(t))
92
- return {
93
- getter: new Function("state", `return ${t}`),
94
- setter: new Function(
95
- "state",
96
- "value",
97
- `{${t} = value; return state;}`
98
- )
99
- };
100
- throw new Error(
101
- 'MiniRDXError: Selector should be a string with dot notation starting with "state." e.g.: "state.user.cars[1].model" '
102
- );
112
+ function O(t) {
113
+ const e = P(t);
114
+ return {
115
+ getter: (u) => {
116
+ let r = u;
117
+ for (const s of e)
118
+ r = r[s];
119
+ return r;
120
+ },
121
+ setter: (u, r) => {
122
+ let s = u;
123
+ for (let o = 0; o < e.length - 1; o++)
124
+ s = s[e[o]];
125
+ return s[e[e.length - 1]] = r, u;
126
+ }
127
+ };
128
+ }
129
+ function P(t) {
130
+ if (!/^state(?:\.[A-Za-z_$][\w$]*|\[\d+\])+$/.test(t))
131
+ throw new Error(
132
+ 'MiniRDXError: Selector should be a string with dot notation starting with "state." e.g.: "state.user.cars[1].model" '
133
+ );
134
+ const e = t.slice(6), u = [];
135
+ let r = 0;
136
+ for (; r < e.length; ) {
137
+ const s = e[r];
138
+ if (s === ".") {
139
+ r++;
140
+ continue;
141
+ }
142
+ if (s === "[") {
143
+ const a = e.indexOf("]", r + 1), p = e.slice(r + 1, a);
144
+ u.push(Number(p)), r = a + 1;
145
+ continue;
146
+ }
147
+ let o = r;
148
+ for (; o < e.length && /[\w$]/.test(e[o]); )
149
+ o++;
150
+ u.push(e.slice(r, o)), r = o;
151
+ }
152
+ return u;
103
153
  }
104
- function L(...t) {
154
+ function b(...t) {
105
155
  return Object.freeze({
106
156
  _rdx_link_: (e) => {
107
- const a = t.pop(), r = t, s = () => {
108
- e(a(...r.map((f) => f.state())));
157
+ const u = t.pop(), r = t, s = () => {
158
+ e(u(...r.map((o) => o.state())));
109
159
  };
110
- r.forEach((f) => f.on(() => s())), s();
160
+ r.forEach((o) => o.on(() => s())), s();
111
161
  }
112
162
  });
113
163
  }
114
- function E(t) {
164
+ function $(t) {
115
165
  return !!t && (typeof t == "object" || typeof t == "function") && typeof t.then == "function";
116
166
  }
117
- function x(t, e, a = "") {
118
- if (!(typeof t != "object" || t === null)) {
119
- for (const r in t)
120
- if (O(t, r)) {
121
- const s = t[r], f = /\d+/.test(r) ? `[${r}]` : `.${r}`, p = a ? `${a}${f}` : r;
122
- e(s, p), typeof s == "object" && s !== null && x(s, e, p);
167
+ function S(t, e, u = "", r = /* @__PURE__ */ new WeakSet()) {
168
+ if (!(typeof t != "object" || t === null) && !r.has(t)) {
169
+ r.add(t);
170
+ for (const s in t)
171
+ if (x(t, s)) {
172
+ const o = t[s], a = /\d+/.test(s) ? `[${s}]` : `.${s}`, p = u ? `${u}${a}` : s;
173
+ e(o, p), typeof o == "object" && o !== null && S(o, e, p, r);
123
174
  }
124
175
  }
125
176
  }
126
- function _(t) {
127
- return t !== null && typeof t == "object" && O(t, "_rdx_link_");
177
+ function R(t) {
178
+ return t !== null && typeof t == "object" && x(t, "_rdx_link_");
128
179
  }
129
- function O(t, e) {
180
+ function x(t, e) {
130
181
  return Object.prototype.hasOwnProperty.call(t, e);
131
182
  }
132
- function S(t) {
183
+ function M(t) {
133
184
  return !!t && typeof t != "symbol" && typeof t != "string" && typeof t != "number" && typeof t != "boolean" && typeof t != "function" && !Array.isArray(t);
134
185
  }
135
186
  export {
136
- g as createSelector,
137
- A as createStore,
138
- L as link,
139
- m as selector
187
+ O as createSelector,
188
+ D as createStore,
189
+ b as link,
190
+ T as selector
140
191
  };
@@ -1 +1 @@
1
- "use strict";const c=require("react");function y(r){const{state:e,on:n,actions:i}=r;function a(t){const[p,d]=c.useState(typeof t=="function"?t(e()):e());return c.useEffect(()=>n(u=>{const o=typeof t=="function"?t(u):u;d(s=>Object.is(s,o)?s:o)}),[n,t]),p}function f(){return i}function S(){return n}return{useStore:a,useStoreActions:f,useStoreListeners:S}}module.exports=y;
1
+ "use strict";const i=require("react");function j(r){const{state:c,on:o,actions:a}=r;function f(t,s){const d=typeof t=="function"?t(c()):c(),[D,E]=i.useState(d);return i.useEffect(()=>{const b=typeof s=="function"?s:(n,e)=>Object.is(n,e);return o(n=>{const e=typeof t=="function"?t(n):n;E(u=>b(u,e)?u:e)})},[o,t,s]),D}function S(){return a}function p(){return o}return{useStore:f,useStoreActions:S,useStoreListeners:p}}module.exports=j;
@@ -1,23 +1,24 @@
1
- import { useState as d, useEffect as m } from "react";
2
- function j(c) {
3
- const { state: e, on: n, actions: i } = c;
4
- function r(t) {
5
- const [S, p] = d(
6
- typeof t == "function" ? t(e()) : e()
7
- );
8
- return m(() => n((o) => {
9
- const u = typeof t == "function" ? t(o) : o;
10
- p((s) => Object.is(s, u) ? s : u);
11
- }), [n, t]), S;
12
- }
13
- function f() {
14
- return i;
1
+ import { useState as E, useEffect as b } from "react";
2
+ function y(i) {
3
+ const { state: s, on: e, actions: f } = i;
4
+ function r(t, u) {
5
+ const S = typeof t == "function" ? t(s()) : s(), [d, m] = E(S);
6
+ return b(() => {
7
+ const D = typeof u == "function" ? u : (n, o) => Object.is(n, o);
8
+ return e((n) => {
9
+ const o = typeof t == "function" ? t(n) : n;
10
+ m((c) => D(c, o) ? c : o);
11
+ });
12
+ }, [e, t, u]), d;
15
13
  }
16
14
  function a() {
17
- return n;
15
+ return f;
16
+ }
17
+ function p() {
18
+ return e;
18
19
  }
19
- return { useStore: r, useStoreActions: f, useStoreListeners: a };
20
+ return { useStore: r, useStoreActions: a, useStoreListeners: p };
20
21
  }
21
22
  export {
22
- j as default
23
+ y as default
23
24
  };
package/dist/react.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Store, Action } from './index';
2
2
  export default function createStoreHooks<S, A extends Record<string, Action<S>>>(store: Store<S, A>): {
3
- useStore: <T = S>(selector?: (state: S) => T) => T;
3
+ useStore: <T = S>(selector?: (state: S) => T, equalityFn?: (prev: T, next: T) => boolean) => T;
4
4
  useStoreActions: () => Store<S, A>["actions"];
5
- useStoreListeners: () => (action: keyof A | ((state: S, actionName: keyof A) => void), listener?: ((state: S, actionName: keyof A) => void) | undefined) => () => void;
5
+ useStoreListeners: () => (action: keyof A | ((state: S, actionName: "link" | keyof A) => void), listener?: ((state: S, actionName: "link" | keyof A) => void) | undefined) => () => void;
6
6
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ludekarts/minirdx",
3
- "version": "0.5.0-beta.1",
3
+ "version": "0.5.0-beta.2",
4
4
  "description": "Minimal state management library",
5
5
  "scripts": {
6
6
  "dev": "vite build --watch",